/* ===== MSP Dashboard — EU Mission Soil Theme ===== */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- CSS Variables — Light EU Soil Theme --- */
:root {
  /* Background */
  --bg-primary: #f5f3ee;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #fafaf7;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-input: #f7f6f2;
  --bg-header: #003875;

  /* Borders */
  --border-subtle: #e8e4da;
  --border-light: #d5d0c4;
  --border-focus: rgba(0, 56, 117, 0.4);

  /* Text */
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a5a;
  --text-muted: #8a8a96;
  --text-accent: #003875;
  --text-on-dark: #ffffff;

  /* Task Colors — earthy/nature palette */
  --task1: #003875;
  --task1-bg: rgba(0, 56, 117, 0.08);
  --task2: #2e7d32;
  --task2-bg: rgba(46, 125, 50, 0.08);
  --task3: #e6a817;
  --task3-bg: rgba(230, 168, 23, 0.08);
  --task4: #d4740e;
  --task4-bg: rgba(212, 116, 14, 0.08);
  --task5: #6a994e;
  --task5-bg: rgba(106, 153, 78, 0.08);

  /* Status Colors */
  --status-not-started: #8a8a96;
  --status-in-progress: #003875;
  --status-submitted: #e6a817;
  --status-approved: #2e7d32;
  --status-delayed: #c62828;

  /* Accent */
  --accent: #003875;
  --accent-light: #1565c0;
  --accent-glow: rgba(0, 56, 117, 0.12);

  /* Greens from the branding */
  --green-primary: #6a994e;
  --green-light: #a7c957;
  --green-dark: #386641;
  --green-bright: #8bc34a;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.05);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #c5c0b4;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: #a09b8f;
}

/* --- Layout --- */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0;
}

/* --- Header --- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-xl);
  margin-bottom: 0;
  background: var(--bg-header);
  border-bottom: 4px solid var(--green-primary);
  position: relative;
  overflow: hidden;
}

/* Organic green shape overlay — mimics the EU Soil branding curves */
.app-header::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -40px;
  width: 350px;
  height: 250px;
  background: radial-gradient(ellipse at 60% 40%, var(--green-primary) 0%, var(--green-light) 40%, transparent 70%);
  opacity: 0.25;
  border-radius: 50%;
  pointer-events: none;
}

.app-header::after {
  content: '';
  position: absolute;
  bottom: -80px;
  right: 100px;
  width: 200px;
  height: 200px;
  background: radial-gradient(ellipse, var(--green-bright) 0%, transparent 70%);
  opacity: 0.15;
  border-radius: 50%;
  pointer-events: none;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  z-index: 1;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.app-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-on-dark);
}

.app-subtitle {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

/* --- Navigation Tabs --- */
.nav-tabs {
  display: flex;
  gap: var(--space-xs);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  padding: 3px;
  z-index: 1;
}

.nav-tab {
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-on-dark);
  background: rgba(255, 255, 255, 0.1);
}

.nav-tab.active {
  background: var(--text-on-dark);
  color: var(--bg-header);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* --- Header Meta --- */
.header-meta {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  z-index: 1;
}

.current-date {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: right;
}

.current-date strong {
  color: var(--text-on-dark);
  font-weight: 600;
}

/* --- Content Area --- */
.dashboard-view.active,
.management-view.active {
  padding: var(--space-xl);
}

/* --- Glass Card --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-card);
}

.card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
}

.card-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

/* --- KPI Cards --- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.kpi-card {
  position: relative;
  overflow: hidden;
  padding-bottom: 14px;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.kpi-card::after {
  /* subtle radial accent in top-right */
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, var(--bg-card-hover) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.6;
}

.kpi-card[data-accent="blue"]::before { background: linear-gradient(90deg, var(--task1), var(--accent-light)); }
.kpi-card[data-accent="green"]::before { background: linear-gradient(90deg, var(--task2), var(--green-light)); }
.kpi-card[data-accent="amber"]::before { background: linear-gradient(90deg, var(--task3), #f0c040); }
.kpi-card[data-accent="orange"]::before { background: linear-gradient(90deg, var(--task4), #e8913a); }
.kpi-card[data-accent="purple"]::before { background: linear-gradient(90deg, var(--task5), var(--green-bright)); }
.kpi-card[data-accent="red"]::before { background: linear-gradient(90deg, var(--status-delayed), #e57373); }

.kpi-value {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 1;
}

.kpi-value-sm { font-size: 1.4rem; }

.kpi-value-sub {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 2px;
}

.kpi-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

.kpi-label strong {
  color: var(--text-primary);
  font-weight: 700;
}

.kpi-icon {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  font-size: 1.6rem;
  opacity: 0.22;
  z-index: 1;
}

.kpi-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--bg-primary);
  overflow: hidden;
}

.kpi-progress-fill {
  height: 100%;
  border-radius: 0 4px 4px 0;
  transition: width 1.1s cubic-bezier(.2,.7,.3,1);
  box-shadow: 0 0 8px currentColor;
}

/* --- Year Tabs --- */
.year-tabs {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.year-tab {
  padding: 6px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
}

.year-tab:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.year-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-dark);
}

/* --- Charts Grid --- */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.charts-grid .card.full-width {
  grid-column: 1 / -1;
}

/* --- Progress Ring (large gradient) --- */
.progress-ring-container {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  padding: var(--space-sm) 0;
}

.progress-ring {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.progress-ring svg {
  width: 140px;
  height: 140px;
  transform: rotate(-90deg);
}

.progress-ring .ring-bg {
  fill: none;
  stroke: var(--bg-primary);
  stroke-width: 12;
}

.progress-ring .ring-fill {
  fill: none;
  stroke: url(#ringGradient);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.4s cubic-bezier(.2,.7,.3,1);
}

.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.ring-text {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ring-suffix {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.ring-sub {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 500;
}

.progress-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-detail-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-detail-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
}

.progress-detail-row .dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}

.progress-detail-row .label {
  color: var(--text-secondary);
  flex: 1;
}

.progress-detail-row .value {
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.progress-detail-row .value-pct {
  font-size: 0.7rem;
  color: var(--text-muted);
  min-width: 32px;
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.mini-bar {
  height: 4px;
  background: var(--bg-primary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.mini-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1.1s cubic-bezier(.2,.7,.3,1);
}

/* --- Task Progress (stacked status segments) --- */
.task-progress-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.task-progress-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.task-progress-name {
  font-size: 0.78rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.task-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.task-progress-label {
  font-weight: 600;
}

.task-progress-pct {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.task-progress-pct strong {
  color: var(--text-primary);
  font-size: 0.85rem;
}

.task-stack-bar {
  height: 12px;
  background: var(--bg-primary);
  border-radius: var(--radius-full);
  overflow: hidden;
  display: flex;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.task-stack-seg {
  height: 100%;
  transition: width 1.1s cubic-bezier(.2,.7,.3,1);
  cursor: help;
}
.task-stack-seg:hover {
  filter: brightness(1.1);
}

.task-stack-empty {
  width: 100%;
  text-align: center;
  font-size: 0.65rem;
  line-height: 12px;
  color: var(--text-muted);
}

/* ============================= */
/* === GANTT (redesigned) ===    */
/* ============================= */

.gantt-container {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* --- Toolbar --- */
.g-toolbar {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.g-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
}

.g-status-row {
  font-size: 0.7rem;
  padding-top: 2px;
  border-top: 1px dashed var(--border-subtle);
}

.g-toolbar-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}

.g-search {
  flex: 1;
  min-width: 200px;
  padding: 6px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-family: inherit;
  font-size: 0.8rem;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}
.g-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.g-divider {
  width: 1px;
  height: 22px;
  background: var(--border-light);
  margin: 0 2px;
}

.g-spacer { flex: 1; }

.g-chip-group {
  display: flex;
  gap: 4px;
}

.g-chip {
  --chip-color: var(--text-muted);
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.g-chip:hover {
  border-color: var(--chip-color);
  color: var(--chip-color);
}
.g-chip.active {
  background: var(--chip-color);
  color: #fff;
  border-color: var(--chip-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.g-chip-status {
  font-size: 0.68rem;
  padding: 3px 9px;
}

.g-chip-type.active {
  background: var(--text-primary);
  color: var(--bg-card);
  border-color: var(--text-primary);
}

.g-mode-toggle {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.g-mode {
  border: none;
  background: transparent;
  padding: 5px 12px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.g-mode:hover { color: var(--text-primary); }
.g-mode.active {
  background: var(--accent);
  color: #fff;
}

.g-zoom {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.g-zoom .g-icon-btn {
  border: none;
  background: transparent;
  padding: 4px 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
}
.g-zoom .g-icon-btn:hover { background: var(--bg-input); color: var(--text-primary); }
.g-zoom-val {
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 0 6px;
  font-variant-numeric: tabular-nums;
  min-width: 38px;
  text-align: center;
}

.g-icon-btn.g-jump {
  padding: 5px 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.g-icon-btn.g-jump:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* --- Scroll & Board --- */
.g-scroll {
  overflow: auto;
  max-height: 70vh;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  position: relative;
}

.g-board {
  position: relative;
  width: max-content;
  min-width: 100%;
  font-size: 0.72rem;
}

/* --- Rows --- */
.g-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  position: relative;
}

.g-label {
  width: var(--g-label-w);
  flex-shrink: 0;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  position: sticky;
  left: 0;
  z-index: 3;
  border-right: 1px solid var(--border-subtle);
  box-shadow: 4px 0 8px -6px rgba(0, 0, 0, 0.15);
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Header rows --- sticky top */
.g-head-row {
  background: var(--bg-card);
  position: sticky;
  z-index: 4;
}
.g-head-years   { top: 0; z-index: 6; }
.g-head-quarters { top: 26px; z-index: 5; }
.g-head-months  { top: 50px; z-index: 4; }

.g-head-row .g-label {
  z-index: 7;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-size: 0.65rem;
  background: var(--bg-card);
}
.g-head-years .g-label { border-bottom: 0; }

/* Tracks */
.g-track {
  position: relative;
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
}

.g-years {
  height: 26px;
}
.g-year {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-on-dark);
  letter-spacing: 0.02em;
  border-right: 1px solid rgba(255, 255, 255, 0.4);
}
.g-year.y1 { background: linear-gradient(180deg, var(--task1), #002a5a); }
.g-year.y2 { background: linear-gradient(180deg, var(--green-primary), #4d7837); }
.g-year.y3 { background: linear-gradient(180deg, var(--task3), #b8861a); }
.g-year:last-child { border-right: 0; }

.g-quarters {
  height: 24px;
  background: var(--bg-input);
}
.g-quarter {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-right: 1px solid var(--border-subtle);
}
.g-quarter:nth-child(odd) { background: rgba(0, 56, 117, 0.04); }

.g-months {
  height: 22px;
  background: var(--bg-card);
}
.g-month {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-muted);
  border-right: 1px solid rgba(0, 0, 0, 0.04);
  font-variant-numeric: tabular-nums;
}
.g-month.past   { color: #b6b3aa; }
.g-month.current {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border-radius: 4px 4px 0 0;
}

/* --- Body --- */
.g-body {
  position: relative;
}

/* Task header row */
.g-task-row {
  background: var(--bg-card-hover);
  border-top: 2px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.g-task-label {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  user-select: none;
  background: var(--bg-card-hover);
  font-size: 0.78rem;
}
.g-task-label:hover { background: #efece4; }
.g-caret {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}
.g-caret.collapsed { transform: rotate(-90deg); }
.g-task-pill {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}
.g-task-count {
  margin-left: auto;
  font-size: 0.65rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-weight: 600;
}
.g-task-track {
  background: linear-gradient(90deg, var(--task-color, var(--text-muted)) 0%, transparent 70%);
  opacity: 0.06;
}

/* Subtask group label (detailed mode) */
.g-subgroup-row {
  background: rgba(0, 0, 0, 0.015);
  min-height: 20px;
}
.g-subgroup-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.015);
  padding-left: 28px;
}
.g-subgroup-track {
  background: rgba(0, 0, 0, 0.015);
}

/* Subtask row (roadmap mode) */
.g-subtask-row { background: var(--bg-card); }
.g-subtask-row:nth-child(even of .g-subtask-row) { background: #fbfaf6; }
.g-subtask-row:hover { background: #f7f5ed; }
.g-subtask-row:hover .g-label { background: #f7f5ed; }
.g-subtask-label {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding-left: 28px;
}
.g-subtask-name {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.g-subtask-count {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Item row (detailed mode) */
.g-item-row { background: var(--bg-card); }
.g-item-row:hover { background: #fbf9f1; }
.g-item-row:hover .g-label { background: #fbf9f1; }
.g-item-label {
  padding-left: 36px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-items: flex-start;
  overflow: hidden;
}
.g-item-ref {
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}
.g-item-title {
  font-size: 0.68rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Item track */
.g-item-track {
  position: relative;
  background:
    linear-gradient(to right, transparent 0 calc(var(--g-month-w) - 1px), rgba(0, 0, 0, 0.025) calc(var(--g-month-w) - 1px) var(--g-month-w))
    repeat-x;
  background-size: var(--g-month-w) 100%;
}

/* Vertical guides */
.g-guide-month, .g-guide-quarter, .g-guide-year {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  pointer-events: none;
}
.g-guide-quarter { background: rgba(0, 0, 0, 0.06); }
.g-guide-year    { background: rgba(0, 56, 117, 0.18); width: 1.5px; }

/* --- Bars --- */
.g-bar {
  --bar-color: var(--text-muted);
  position: absolute;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0 6px;
  background: var(--bar-color);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  z-index: 1;
}
.g-bar:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  z-index: 5;
  filter: brightness(1.05);
}

.g-bar-label {
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.02em;
}
.g-bar-glyph {
  margin-left: 4px;
  font-size: 0.72rem;
  opacity: 0.95;
}

/* Single-month deliverable chip */
.g-bar-single { min-width: 22px; }

/* Range bar end marker (for milestone ranges) */
.g-bar-milestone {
  background: transparent;
  padding: 0;
  border-top: 2px dashed var(--bar-color);
  border-radius: 0;
  box-shadow: none;
}
.g-bar-milestone .g-bar-end-marker {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bar-color);
  font-size: 0.85rem;
  text-shadow: 0 1px 1px rgba(255,255,255,0.6);
}
.g-bar-end-left  { left: -6px; }
.g-bar-end-right { right: -6px; }

/* Single-month milestone diamond */
.g-milestone {
  background: var(--bar-color);
  border-radius: 3px;
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.g-milestone:hover {
  transform: rotate(45deg) translateY(-1px) scale(1.15);
}
.g-milestone .g-bar-glyph {
  transform: rotate(-45deg);
  margin: 0;
  font-size: 0.7rem;
  color: #fff;
}

/* Status overlays on bars */
.g-bar.gs-not-started {
  background: repeating-linear-gradient(
    45deg,
    var(--bar-color) 0 6px,
    color-mix(in srgb, var(--bar-color) 70%, white) 6px 12px
  );
  opacity: 0.55;
  color: rgba(255, 255, 255, 0.9);
}
.g-bar.gs-in-progress {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--bar-color) 100%, white) 0%,
    color-mix(in srgb, var(--bar-color) 80%, black) 100%);
}
.g-bar.gs-submitted {
  background: var(--bar-color);
  outline: 2px dashed var(--status-submitted);
  outline-offset: -2px;
}
.g-bar.gs-approved {
  background: linear-gradient(180deg, var(--bar-color), color-mix(in srgb, var(--bar-color) 80%, black));
  border: 1.5px solid var(--status-approved);
}
.g-bar.gs-delayed {
  background: var(--bar-color);
  border: 2px solid var(--status-delayed);
  box-shadow: 0 0 0 1px rgba(198, 40, 40, 0.25), 0 1px 2px rgba(0, 0, 0, 0.12);
}

/* Milestone status — use border instead of bg overlays */
.g-milestone.gs-not-started { background: color-mix(in srgb, var(--bar-color) 50%, white); border-color: #fff; }
.g-milestone.gs-submitted    { border-color: var(--status-submitted); border-style: dashed; }
.g-milestone.gs-approved     { border-color: var(--status-approved); }
.g-milestone.gs-delayed      { border-color: var(--status-delayed); box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.2); }

/* --- Today line --- */
.g-today {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--status-delayed);
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(198, 40, 40, 0.4);
}
.g-today-pill {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--status-delayed);
  color: #fff;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* --- Empty state --- */
.g-empty {
  padding: var(--space-2xl);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- Legend --- */
.g-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.7rem;
  color: var(--text-secondary);
}
.g-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.g-legend-swatch {
  width: 18px;
  height: 12px;
  border-radius: 3px;
  background: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.65rem;
}
.g-legend-swatch.g-leg-deliv { background: var(--accent); }
.g-legend-swatch.g-leg-mile { background: var(--task3); border-radius: 2px; transform: rotate(45deg); width: 12px; height: 12px; }
.g-legend-swatch.gs-not-started { background: repeating-linear-gradient(45deg, #94a3b8 0 4px, #cbd5e1 4px 8px); }
.g-legend-swatch.gs-in-progress { background: var(--task1); }
.g-legend-swatch.gs-submitted { background: var(--accent); outline: 2px dashed var(--status-submitted); outline-offset: -2px; }
.g-legend-swatch.gs-approved { background: var(--green-primary); border: 1.5px solid var(--status-approved); }
.g-legend-swatch.gs-delayed { background: var(--task1); border: 2px solid var(--status-delayed); }
.g-legend-divider {
  width: 1px;
  height: 16px;
  background: var(--border-light);
}

/* Responsive: tighter on small screens */
@media (max-width: 800px) {
  .g-toolbar-row { gap: 6px; }
  .g-search { min-width: 140px; }
  .g-chip { padding: 3px 8px; font-size: 0.68rem; }
  .g-scroll { max-height: 60vh; }
}

/* --- Monthly Workload Chart (stacked bars + cumulative line) --- */
.workload-chart {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-top: var(--space-sm);
}

.workload-legend {
  display: flex;
  gap: var(--space-md);
  font-size: 0.7rem;
  color: var(--text-secondary);
  align-items: center;
  padding: 0 var(--space-xs);
}
.wl-leg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.wl-leg-sw {
  width: 12px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}
.wl-leg-sw.deliv { background: linear-gradient(180deg, var(--accent), var(--accent-light)); }
.wl-leg-sw.mile { background: linear-gradient(180deg, var(--task3), #f0c040); }
.wl-leg-sw.cum {
  background: transparent;
  border: 0;
  border-top: 2px solid var(--green-primary);
  height: 0;
  width: 18px;
  border-radius: 0;
}

.workload-area {
  position: relative;
  height: 220px;
  padding: 8px 0 0 0;
  border-bottom: 1px solid var(--border-subtle);
}

.workload-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.workload-line-stroke {
  fill: none;
  stroke: var(--green-primary);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 2px rgba(106, 153, 78, 0.3));
}

.workload-line-area {
  opacity: 0.85;
}

.workload-bars {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 100%;
  z-index: 1;
}

.workload-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}

.workload-bar-group.past { opacity: 0.55; }
.workload-bar-group.future { opacity: 1; }
.workload-bar-group.current {
  z-index: 3;
}
.workload-bar-group.current::before {
  content: '';
  position: absolute;
  inset: -4px -4px 16px -4px;
  background: rgba(0, 56, 117, 0.06);
  border-radius: var(--radius-sm);
  pointer-events: none;
}
.workload-bar-group.current::after {
  content: '';
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(0, 56, 117, 0.18);
}

.workload-stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  max-width: 26px;
}

.workload-bar {
  width: 100%;
  border-radius: 0;
  transition: height 0.7s cubic-bezier(.2,.7,.3,1), filter var(--transition-fast);
  position: relative;
}

.workload-bar.deliverables {
  background: linear-gradient(180deg, var(--accent), var(--accent-light));
  border-radius: 0 0 3px 3px;
}

.workload-bar.milestones {
  background: linear-gradient(180deg, var(--task3), #f0c040);
  border-radius: 3px 3px 0 0;
}

.workload-bar-group:hover {
  z-index: 4;
}
.workload-bar-group:hover .workload-bar {
  filter: brightness(1.15) saturate(1.1);
}
.workload-bar-group:hover .workload-bar.deliverables { box-shadow: 0 0 8px rgba(0, 56, 117, 0.35); }
.workload-bar-group:hover .workload-bar.milestones { box-shadow: 0 0 8px rgba(230, 168, 23, 0.45); }

.workload-label {
  font-size: 0.55rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.workload-bar-group.current .workload-label {
  color: var(--accent);
  font-weight: 700;
}

/* Workload tooltip */
.workload-tooltip {
  position: absolute;
  background: rgba(26, 26, 46, 0.96);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.7rem;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  min-width: 140px;
  backdrop-filter: blur(8px);
}
.wt-month {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: #fff;
}
.wt-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0;
  color: rgba(255, 255, 255, 0.85);
}
.wt-sw {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}
.wt-sw.deliv { background: var(--accent-light); }
.wt-sw.mile { background: var(--task3); }
.wt-total {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-weight: 700;
  text-align: right;
  color: #fff;
}

/* Tooltip */
.tooltip {
  position: fixed;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.75rem;
  color: var(--text-primary);
  pointer-events: none;
  z-index: 1000;
  max-width: 300px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.tooltip.visible {
  opacity: 1;
}

.tooltip-ref {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 2px;
}

.tooltip-title {
  color: var(--text-secondary);
  line-height: 1.4;
}

.tooltip-meta {
  margin-top: 4px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* --- Status Distribution (Donut chart) --- */
.status-distribution {
  display: flex;
  flex-direction: column;
}

.donut-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  padding: var(--space-sm) 0;
}

.donut-chart {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.donut-chart svg {
  width: 140px;
  height: 140px;
  overflow: visible;
}

.donut-seg {
  transition: transform 220ms ease, opacity 220ms ease, stroke-width 220ms ease;
  cursor: pointer;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.06));
}
.donut-seg.dim {
  opacity: 0.25;
}
.donut-seg.hl {
  stroke-width: 26;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.18));
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}
.donut-center-val {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.donut-center-lbl {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}
.donut-center-sub {
  margin-top: 6px;
  font-size: 0.7rem;
  color: var(--task2);
  font-weight: 700;
}

.donut-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.donut-legend-item {
  display: grid;
  grid-template-columns: 14px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.donut-legend-item:hover {
  background: var(--bg-card-hover);
}
.donut-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}
.donut-legend-label { font-weight: 500; }
.donut-legend-count {
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.donut-legend-pct {
  font-size: 0.7rem;
  color: var(--text-muted);
  min-width: 36px;
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* --- Upcoming Deadlines (modern card list) --- */
.deadline-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.deadline-card {
  display: grid;
  grid-template-columns: minmax(64px, 72px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--task-color, var(--text-muted));
  transition: all var(--transition-fast);
  position: relative;
  isolation: isolate;
  /* Do not use overflow: hidden here — it clips the left accent border
     and can interact badly with hover transform + pseudo-element overlays. */
  overflow: visible;
}

/* Decorative tint only — must sit *below* the date block and text (z-index) */
.deadline-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--task-color, #64748b) 0%, transparent 45%);
  opacity: 0.07;
  pointer-events: none;
}

.deadline-date-block,
.deadline-info {
  position: relative;
  z-index: 1;
}

.deadline-card:hover {
  transform: translateX(2px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border-color: var(--task-color, var(--border-light));
}

/* Avoid a strong white gradient — it was washing out the first column (month / date) */
.deadline-card.overdue {
  border-left-color: var(--status-delayed);
  background: var(--bg-card);
  box-shadow: inset 0 0 0 1px rgba(198, 40, 40, 0.12);
}
.deadline-card.overdue::before {
  background: linear-gradient(135deg, rgba(198, 40, 40, 0.1) 0%, transparent 52%);
}
.deadline-card.critical {
  border-left-color: var(--status-delayed);
}
.deadline-card.soon {
  border-left-color: var(--task3);
}

.deadline-date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.deadline-month {
  font-size: 0.6rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--task-color, var(--text-muted));
  letter-spacing: 0.06em;
}

.deadline-day {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.deadline-year {
  font-size: 0.55rem;
  color: var(--text-muted);
  font-weight: 600;
}

.deadline-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.deadline-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.deadline-ref {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.deadline-status {
  font-size: 0.6rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.deadline-title {
  font-size: 0.78rem;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deadline-badge {
  font-size: 0.6rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 700;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.deadline-overdue, .deadline-critical {
  background: rgba(198, 40, 40, 0.12);
  color: var(--status-delayed);
}

.deadline-soon {
  background: rgba(230, 168, 23, 0.15);
  color: #b8860b;
}

.deadline-upcoming {
  background: rgba(0, 56, 117, 0.08);
  color: var(--accent);
}

.deadline-urgency-bar {
  height: 3px;
  background: var(--bg-primary);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 2px;
}

.deadline-urgency-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1.2s cubic-bezier(.2,.7,.3,1);
  box-shadow: 0 0 4px currentColor;
}

/* Inline status pill (used in deadlines + elsewhere) */
.status-pill {
  display: inline-block;
}
.status-pill.status-not-started { background: rgba(138,138,150,0.15); color: #5a5a66; }
.status-pill.status-in-progress { background: rgba(0,56,117,0.12); color: var(--accent); }
.status-pill.status-submitted { background: rgba(230,168,23,0.18); color: #b8860b; }
.status-pill.status-approved { background: rgba(46,125,50,0.15); color: var(--task2); }
.status-pill.status-delayed { background: rgba(198,40,40,0.15); color: var(--status-delayed); }

/* ============================= */
/* === MANAGEMENT VIEW ===       */
/* ============================= */

.management-view {
  display: none;
}

.management-view.active {
  display: block;
}

.dashboard-view {
  display: none;
}

.dashboard-view.active {
  display: block;
}

/* --- Filters Bar --- */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-select,
.filter-input {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.8rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.filter-select:focus,
.filter-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.filter-select option {
  background: var(--bg-secondary);
}

.filter-input {
  min-width: 200px;
}

.filter-separator {
  width: 1px;
  height: 24px;
  background: var(--border-subtle);
  margin: 0 var(--space-sm);
}

/* --- Action Buttons --- */
.actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.bulk-actions {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn:hover {
  background: var(--bg-primary);
  border-color: var(--border-light);
  color: var(--text-primary);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-dark);
}

.btn-primary:hover {
  background: var(--accent-light);
  box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-danger {
  color: var(--status-delayed);
}

.btn-danger:hover {
  background: rgba(198, 40, 40, 0.06);
  border-color: var(--status-delayed);
}

.save-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: all var(--transition-base);
}

.save-indicator.saving {
  color: var(--task3);
}

.save-indicator.saved {
  color: var(--task2);
}

.selected-count {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* --- Data Table --- */
.data-table-container {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 5;
}

.data-table th {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-on-dark);
  background: var(--bg-header);
  border-bottom: 2px solid var(--green-primary);
  cursor: pointer;
  user-select: none;
  transition: color var(--transition-fast);
}

.data-table th:hover {
  color: rgba(255, 255, 255, 0.8);
}

.data-table th.sorted-asc::after {
  content: ' ↑';
  color: var(--green-light);
}

.data-table th.sorted-desc::after {
  content: ' ↓';
  color: var(--green-light);
}

.data-table td {
  padding: 6px var(--space-md);
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: middle;
}

.data-table tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: rgba(106, 153, 78, 0.04);
}

.data-table tbody tr.selected {
  background: rgba(0, 56, 117, 0.05);
}

.data-table tbody tr.recently-modified {
  animation: recentPulse 2s ease;
}

@keyframes recentPulse {
  0% { background: rgba(46, 125, 50, 0.12); }
  100% { background: transparent; }
}

/* Row checkbox */
.row-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Task badge */
.task-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
}

.task-badge.task-1 { background: var(--task1-bg); color: var(--task1); }
.task-badge.task-2 { background: var(--task2-bg); color: var(--task2); }
.task-badge.task-3 { background: var(--task3-bg); color: var(--task3); }
.task-badge.task-4 { background: var(--task4-bg); color: var(--task4); }
.task-badge.task-5 { background: var(--task5-bg); color: var(--task5); }

/* Type badge */
.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  font-weight: 500;
}

.type-badge.deliverable {
  color: var(--accent);
}

.type-badge.milestone {
  color: var(--task3);
}

.type-badge .type-icon {
  font-size: 0.6rem;
}

/* Status Select */
.status-select {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
}

.status-select:hover {
  border-color: var(--border-light);
}

.status-select:focus {
  border-color: var(--border-focus);
}

.status-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.status-not-started { background: rgba(138, 138, 150, 0.1); color: var(--status-not-started); }
.status-in-progress { background: rgba(0, 56, 117, 0.1); color: var(--status-in-progress); }
.status-submitted { background: rgba(230, 168, 23, 0.12); color: #9e7a0c; }
.status-approved { background: rgba(46, 125, 50, 0.1); color: var(--status-approved); }
.status-delayed { background: rgba(198, 40, 40, 0.08); color: var(--status-delayed); }

/* Date input */
.date-input {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  outline: none;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.date-input:hover {
  border-color: var(--border-light);
  background: var(--bg-input);
}

.date-input:focus {
  border-color: var(--border-focus);
  background: var(--bg-input);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Notes input */
.notes-input {
  width: 200px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  outline: none;
  transition: all var(--transition-fast);
}

.notes-input:hover {
  border-color: var(--border-light);
  background: var(--bg-input);
}

.notes-input:focus {
  border-color: var(--border-focus);
  background: var(--bg-input);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.title-cell {
  max-width: 350px;
  white-space: normal;
  line-height: 1.4;
}

/* --- Stats Summary Row --- */
.table-stats {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.table-stats strong {
  color: var(--text-primary);
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-in {
  animation: fadeIn 0.5s ease forwards;
}

.card {
  animation: fadeIn 0.4s ease forwards;
}

.kpi-grid .card:nth-child(1) { animation-delay: 0.05s; }
.kpi-grid .card:nth-child(2) { animation-delay: 0.1s; }
.kpi-grid .card:nth-child(3) { animation-delay: 0.15s; }
.kpi-grid .card:nth-child(4) { animation-delay: 0.2s; }
.kpi-grid .card:nth-child(5) { animation-delay: 0.25s; }
.kpi-grid .card:nth-child(6) { animation-delay: 0.3s; }

/* --- Responsive --- */
@media (max-width: 1200px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    gap: var(--space-md);
    align-items: flex-start;
  }
  
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filters-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-separator {
    display: none;
  }
}

/* ============================= */
/* === AUTH & USER MGMT ===     */
/* ============================= */

/* --- Login Overlay --- */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top left, var(--bg-header), var(--task1));
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  backdrop-filter: blur(10px);
}

.login-overlay.visible {
  display: flex;
}

.login-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.95);
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  text-align: center;
  position: relative;
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-logo {
  font-size: 3.5rem;
  margin-bottom: var(--space-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
  background: var(--bg-secondary);
  border-radius: 50%;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.login-card h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--bg-header);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}

.login-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-xl);
}

.form-group {
  margin-bottom: var(--space-lg);
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input, .form-group select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--transition-fast);
  outline: none;
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.btn-full {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  margin-top: var(--space-md);
}

.login-error {
  background: rgba(198, 40, 40, 0.08);
  color: var(--status-delayed);
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: var(--space-md);
  display: none;
}

.login-success {
  background: rgba(46, 125, 50, 0.08);
  color: var(--status-approved);
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: var(--space-md);
  display: none;
}

.login-success.visible {
  display: block;
}

.login-code-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-lg);
}

#login-code {
  letter-spacing: 0.4em;
  font-size: 1.4rem;
  text-align: center;
  font-weight: 700;
}

.login-back-btn {
  margin-top: var(--space-sm);
  background: transparent;
  color: var(--text-secondary);
  border: none;
  box-shadow: none;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* --- Header User Info --- */
.user-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 4px 6px 4px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  color: var(--text-on-dark);
}

#user-name {
  font-weight: 700;
  font-size: 0.85rem;
}

.user-role-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  background: var(--green-primary);
  border-radius: var(--radius-full);
  color: #fff;
}

.logout-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 600;
}

.logout-btn:hover {
  background: var(--status-delayed);
  color: white;
}

/* --- Users View --- */
.users-view {
  display: none;
}

.users-view.active {
  display: block;
  padding: var(--space-xl);
}

.users-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.users-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--bg-header);
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-card);
  width: 100%;
  max-width: 450px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: var(--space-lg);
  background: var(--bg-header);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.modal-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

#user-form {
  padding: var(--space-xl);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.btn-secondary {
  background: var(--bg-primary);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: var(--border-subtle);
}

/* ============================= */
/* === Extra dashboard pages === */
/* ============================= */

.dash-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 var(--space-lg);
  padding: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.dash-subnav-btn {
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.dash-subnav-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.dash-subnav-btn.active {
  background: var(--accent);
  color: var(--text-on-dark);
}

.dash-page {
  display: none;
}

.dash-page.active {
  display: block;
}

.dash-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: flex-end;
  margin-bottom: var(--space-lg);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-select,
.filter-input {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.8rem;
  min-width: 140px;
}

.dash-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.dash-stat {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-card);
}

.dash-stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

.dash-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.dash-stat-hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.charts-grid .card.full-width {
  grid-column: 1 / -1;
}

.muted {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 400;
}

.dash-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.dash-table-wrap {
  overflow: auto;
  max-height: 480px;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.dash-table th,
.dash-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

.dash-table th {
  position: sticky;
  top: 0;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.act-legend,
.act-legend span {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.act-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 6px;
}

.act-task-row {
  display: grid;
  grid-template-columns: 180px 1fr 48px;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.act-task-label {
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.act-task-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
}

.act-stack {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-input);
}

.act-seg {
  height: 100%;
}

.tree-map {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tree-cell {
  flex: 1 1 120px;
  min-height: 64px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tree-cell span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.act-gantt-scale {
  position: relative;
  height: 18px;
  margin: 0 0 6px 240px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.act-gantt-scale span {
  position: absolute;
  transform: translateX(-50%);
}

.act-gantt {
  max-height: 420px;
  overflow: auto;
  border-top: 1px solid var(--border-subtle);
}

.act-gantt-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 28px;
}

.act-gantt-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.act-gantt-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
}

.act-gantt-track {
  position: relative;
  height: 14px;
  background: var(--bg-input);
  border-radius: 4px;
}

.act-gantt-bar {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 4px;
}

.funnel-row {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.funnel-bar {
  background: var(--accent);
  color: var(--text-on-dark);
  text-align: center;
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
}

.rag-bar-row,
.heat-row {
  display: grid;
  grid-template-columns: 90px 1fr 36px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.rag-track {
  height: 10px;
  background: var(--bg-input);
  border-radius: 6px;
  overflow: hidden;
}

.rag-fill {
  height: 100%;
}

.heat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.heat-row {
  grid-template-columns: 92px repeat(3, 1fr);
}

.heat-cell {
  min-height: 56px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.heat-y {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.heat-x {
  display: grid;
  grid-template-columns: 92px repeat(3, 1fr);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
}

.rag-donut-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.rag-donut {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  mask: radial-gradient(circle, transparent 48%, #000 50%);
  -webkit-mask: radial-gradient(circle, transparent 48%, #000 50%);
}

.act-legend {
  flex-wrap: wrap;
}

.task-switcher {
  gap: 8px;
}

.dash-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.dash-chip.active {
  background: var(--accent);
  color: var(--text-on-dark);
  border-color: var(--accent);
}

.event-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--space-md);
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.event-item.is-past {
  opacity: 0.7;
}

.event-month {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--accent);
}

.event-head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}

.event-title {
  font-weight: 600;
}

.pay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
}

.pay-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  background: var(--bg-input);
}

.pay-card.is-due {
  border-color: var(--task3);
}

.dash-empty {
  background: var(--bg-card);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
  max-width: 640px;
  margin: var(--space-xl) auto;
}

.dash-empty h3 {
  margin-bottom: var(--space-sm);
}

.dash-empty p {
  color: var(--text-secondary);
}

@media (max-width: 900px) {
  .charts-grid,
  .act-task-row,
  .act-gantt-row,
  .event-item {
    grid-template-columns: 1fr;
  }

  .act-gantt-scale {
    margin-left: 0;
  }
}

.event-body { min-width: 0; }
.rag-bars { display: flex; flex-direction: column; gap: 8px; }
.event-item.is-past,
.event-item.is-past { opacity: 0.7; }
.pay-card.is-due,
.pay-card.is-due { border-color: var(--task3); }
