:root {
  --bg-obsidian: #050913;
  --bg-sidebar: #070d1b;
  --bg-card: rgba(12, 21, 39, 0.88);
  --bg-card-elevated: rgba(16, 28, 52, 0.94);
  --bg-glass-input: rgba(10, 18, 34, 0.85);
  --border-subtle: rgba(56, 189, 248, 0.15);
  --border-glow: rgba(56, 189, 248, 0.38);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-blue: #2563eb;
  --accent-cyan: #38bdf8;
  --accent-teal: #14b8a6;
  --accent-emerald: #10b981;
  --accent-purple: #8b5cf6;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --shadow-card: 0 14px 34px -8px rgba(2, 6, 23, 0.78), inset 0 1px 0 rgba(148, 163, 184, 0.08);
  --shadow-glow-blue: 0 0 24px rgba(37, 99, 235, 0.32);
  --shadow-glow-emerald: 0 0 24px rgba(16, 185, 129, 0.25);
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 7px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background-color: var(--bg-obsidian);
  background-image:
    radial-gradient(ellipse 65% 45% at 22% 0%, rgba(29, 78, 216, 0.18), transparent 65%),
    radial-gradient(ellipse 55% 40% at 88% 18%, rgba(16, 185, 129, 0.11), transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 100%, rgba(14, 165, 233, 0.09), transparent 70%);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* App Shell */
.app-shell {
  display: grid;
  grid-template-columns: 246px 1fr;
  height: 100vh;
  width: 100vw;
}

/* Sidebar */
.sidebar {
  background: linear-gradient(180deg, #070e1d 0%, #050a15 100%);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  min-height: 0;
  overflow: hidden;
  padding: 20px 14px 16px;
  user-select: none;
  z-index: 10;
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px 18px;
  flex-shrink: 0;
}

.brand-logo-orb {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #38bdf8, #1d4ed8 70%, #0f172a 100%);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.brand-title-group {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #ffffff;
  text-transform: uppercase;
}

.brand-subtitle {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.9px;
  color: var(--accent-cyan);
  text-transform: uppercase;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.35) transparent;
}

.nav-list::-webkit-scrollbar {
  width: 5px;
}

.nav-list::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.35);
  border-radius: 999px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11px;
  padding: 9px 13px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  transition: all 0.18s ease;
  text-align: left;
  width: 100%;
  flex-shrink: 0;
}

.nav-item-left {
  display: flex;
  align-items: center;
  gap: 11px;
}

.nav-icon {
  width: 18px;
  height: 18px;
  opacity: 0.82;
  flex-shrink: 0;
}

.nav-item:hover {
  color: #ffffff;
  background: rgba(30, 58, 138, 0.25);
  border-color: rgba(56, 189, 248, 0.15);
}

.nav-item.active {
  color: #ffffff;
  font-weight: 600;
  background: linear-gradient(90deg, rgba(29, 78, 216, 0.92) 0%, rgba(2, 132, 199, 0.55) 70%, rgba(2, 132, 199, 0.12) 100%);
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow: 0 4px 18px rgba(29, 78, 216, 0.38), inset 3px 0 0 #38bdf8;
}

.nav-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.28);
  flex-shrink: 0;
}

.nav-badge.red {
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.55);
  border-color: rgba(239, 68, 68, 0.45);
}

.sidebar-footer {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(56, 189, 248, 0.12);
  flex-shrink: 0;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-md);
  background: rgba(12, 22, 42, 0.78);
  border: 1px solid rgba(56, 189, 248, 0.16);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12.5px;
  color: #fff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.user-meta {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Content Area */
.main-area {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Top Bar */
.topbar {
  height: 62px;
  padding: 0 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.1);
  background: rgba(6, 11, 22, 0.72);
  backdrop-filter: blur(12px);
  flex-shrink: 0;
}

.search-box {
  position: relative;
  width: 440px;
  max-width: 48vw;
}

.search-input {
  width: 100%;
  background: var(--bg-glass-input);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 9px;
  padding: 8px 14px 8px 36px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: all 0.18s ease;
}

.search-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.22);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(13, 24, 46, 0.9);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill-badge:hover {
  border-color: var(--border-glow);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.dot.green { background: var(--accent-emerald); box-shadow: 0 0 8px var(--accent-emerald); }
.dot.cyan { background: var(--accent-cyan); box-shadow: 0 0 8px var(--accent-cyan); }
.dot.red { background: var(--accent-red); box-shadow: 0 0 8px var(--accent-red); }
.dot.amber { background: var(--accent-amber); box-shadow: 0 0 8px var(--accent-amber); }

.icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(13, 24, 46, 0.9);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.icon-btn:hover {
  color: #fff;
  border-color: var(--border-glow);
}

.notif-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

/* Scrollable Viewport */
.viewport {
  flex: 1;
  overflow-y: auto;
  padding: 20px 26px 32px;
}

/* Welcome Header Row */
.welcome-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 16px;
}

.welcome-title {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #ffffff;
}

.welcome-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.period-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.select-glass {
  background: rgba(12, 22, 42, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.22);
  color: var(--text-primary);
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
}

/* 4-Card KPI Strip */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.kpi-card {
  background: linear-gradient(145deg, rgba(14, 25, 47, 0.92), rgba(8, 15, 29, 0.96));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 15px;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-glow);
}

.kpi-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.45), transparent);
}

.kpi-orb {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.kpi-orb.cyan {
  background: radial-gradient(circle at 30% 30%, rgba(56, 189, 248, 0.32), rgba(14, 116, 144, 0.12));
  border: 1px solid rgba(56, 189, 248, 0.42);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
  color: #38bdf8;
}

.kpi-orb.purple {
  background: radial-gradient(circle at 30% 30%, rgba(139, 92, 246, 0.35), rgba(76, 29, 149, 0.12));
  border: 1px solid rgba(167, 139, 250, 0.42);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.28);
  color: #c4b5fd;
}

.kpi-orb.emerald {
  background: radial-gradient(circle at 30% 30%, rgba(16, 185, 129, 0.32), rgba(6, 95, 70, 0.12));
  border: 1px solid rgba(52, 211, 153, 0.42);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
  color: #34d399;
}

.kpi-orb.blue {
  background: radial-gradient(circle at 30% 30%, rgba(37, 99, 235, 0.36), rgba(30, 58, 138, 0.14));
  border: 1px solid rgba(96, 165, 250, 0.42);
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.28);
  color: #60a5fa;
}

.kpi-body {
  flex: 1;
  min-width: 0;
}

.kpi-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.kpi-value-row {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 3px;
}

.kpi-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.kpi-delta {
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.kpi-delta.up { color: #34d399; }
.kpi-delta.warn { color: #fbbf24; }
.kpi-delta.red { color: #f87171; }

.kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dashboard Main Grid (Matches C9 Reference Layout) */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.38fr 1.15fr 1.05fr;
  grid-template-rows: auto auto;
  gap: 16px;
}

.panel-card {
  background: linear-gradient(155deg, rgba(13, 23, 43, 0.9), rgba(7, 13, 26, 0.95));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 10px;
}

.panel-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.panel-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(15, 27, 50, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: var(--text-secondary);
}

/* Donut + Legend Layout */
.donut-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 1;
}

.donut-wrap {
  position: relative;
  width: 146px;
  height: 146px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-center {
  position: absolute;
  text-align: center;
  pointer-events: none;
}

.donut-center-val {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.donut-center-lbl {
  font-size: 10.5px;
  color: var(--text-secondary);
}

.legend-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  gap: 8px;
}

.legend-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.legend-swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.legend-val {
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* Right Stack: AI Insights + Alerts */
.right-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-insights-body {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brain-graphic {
  width: 92px;
  height: 92px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(45, 212, 191, 0.45));
}

.ai-insights-text {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.ai-highlight {
  color: #34d399;
  font-weight: 700;
}

.btn-glow {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(90deg, rgba(29, 78, 216, 0.85), rgba(14, 165, 233, 0.75));
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.35);
  cursor: pointer;
  transition: all 0.16s ease;
}

.btn-glow:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

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

.alert-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  background: rgba(15, 26, 48, 0.68);
  border: 1px solid rgba(56, 189, 248, 0.12);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.alert-item:hover {
  border-color: rgba(56, 189, 248, 0.35);
}

.alert-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.alert-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 6-Column Kanban Board */
.kanban-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.kanban-col {
  background: rgba(10, 18, 34, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 62vh;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.12);
  font-weight: 700;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.kanban-card {
  background: linear-gradient(145deg, rgba(16, 29, 54, 0.92), rgba(10, 19, 36, 0.96));
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 9px;
  padding: 11px 12px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.kanban-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.kanban-card-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 7px;
  line-height: 1.35;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(30, 58, 138, 0.45);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.tag.sev-high { background: rgba(127, 29, 29, 0.55); color: #fca5a5; border-color: rgba(239, 68, 68, 0.45); }
.tag.sev-med { background: rgba(120, 53, 15, 0.55); color: #fcd34d; border-color: rgba(245, 158, 11, 0.45); }
.tag.emerald { background: rgba(6, 78, 59, 0.55); color: #6ee7b7; border-color: rgba(16, 185, 129, 0.45); }

/* Data Tables (Scorecard / Workforce) */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.data-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  background: rgba(10, 18, 34, 0.65);
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.08);
  color: var(--text-primary);
  vertical-align: top;
}

.data-table tr:hover td {
  background: rgba(30, 58, 138, 0.16);
}

/* Code / Markdown Viewer */
.code-viewer {
  background: rgba(5, 10, 20, 0.92);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  color: #e2e8f0;
  white-space: pre-wrap;
  max-height: 68vh;
  overflow-y: auto;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  background: linear-gradient(155deg, #0d182e, #070d1a);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 780px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-content {
  padding: 18px 20px;
  overflow-y: auto;
}

/* Brief v2: Persistent 90-Day Revenue Plan Left Rail (Issue #4) */
.workspace-with-rail {
  display: grid;
  grid-template-columns: 300px 1fr;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.plan-rail {
  background: linear-gradient(180deg, rgba(8, 16, 32, 0.95) 0%, rgba(5, 10, 21, 0.98) 100%);
  border-right: 1px solid var(--border-subtle);
  padding: 16px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plan-rail-header {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.25), rgba(16, 185, 129, 0.14));
  border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: var(--radius-md);
  padding: 12px;
}

.plan-phase-card {
  background: rgba(11, 20, 38, 0.86);
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: var(--radius-md);
  padding: 10px 11px;
  transition: border-color 0.18s ease;
}

.plan-phase-card:hover {
  border-color: rgba(56, 189, 248, 0.38);
}

.plan-progress-track {
  width: 100%;
  height: 7px;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 999px;
  overflow: hidden;
  margin: 7px 0;
  border: 1px solid rgba(56, 189, 248, 0.16);
}

.plan-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #38bdf8, #10b981);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.plan-checklist {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(56, 189, 248, 0.12);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.plan-check-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 11.5px;
  line-height: 1.35;
  color: #cbd5e1;
}

.plan-check-item.done {
  color: #6ee7b7;
  text-decoration: line-through;
  opacity: 0.85;
}

/* Stale Data Contract Banner (Issue #12) */
.stale-feed-banner {
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.48), rgba(127, 29, 29, 0.38));
  border: 1px solid rgba(245, 158, 11, 0.48);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: #fde68a;
}

/* Filter Pill Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}

.filter-pill {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(56, 189, 248, 0.22);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover,
.filter-pill.active {
  background: rgba(37, 99, 235, 0.35);
  border-color: #38bdf8;
  color: #ffffff;
}

/* Clickable KPI row & Solution Cards (Issue #10) */
.kpi-row-clickable {
  cursor: pointer;
  transition: background 0.15s ease;
}

.kpi-row-clickable:hover td {
  background: rgba(37, 99, 235, 0.24) !important;
}

.solution-card {
  background: rgba(10, 19, 36, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 10px;
}

@media (max-width: 1180px) {
  .workspace-with-rail {
    grid-template-columns: 250px 1fr;
  }
}

.content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 36px;
}

.glass-card {
  background: linear-gradient(155deg, rgba(13, 23, 43, 0.92), rgba(7, 13, 26, 0.96));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(90deg, #2563eb, #0284c7);
  border: 1px solid rgba(56, 189, 248, 0.48);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(13, 24, 46, 0.88);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-ghost:hover {
  border-color: var(--border-glow);
  color: #ffffff;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(6, 78, 59, 0.38);
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 11.5px;
  font-weight: 600;
  color: #6ee7b7;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.search-box input {
  width: 100%;
  background: var(--bg-glass-input);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 9px;
  padding: 8px 14px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}

.hero-banner {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.24) 0%, rgba(12, 22, 42, 0.92) 60%, rgba(16, 185, 129, 0.14) 100%);
  border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
}

.hero-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  text-transform: uppercase;
}

.hero-title {
  font-size: 21px;
  font-weight: 800;
  color: #ffffff;
  margin-top: 4px;
}

.hero-subtitle {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.hero-stat {
  background: rgba(8, 15, 30, 0.82);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.hero-stat:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

.hero-stat-label {
  font-size: 11px;
  color: var(--text-secondary);
}

.hero-stat-value {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-up {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(6, 78, 59, 0.6);
  color: #6ee7b7;
}

.badge-warn {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(120, 53, 15, 0.6);
  color: #fcd34d;
}

.badge-alert {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(127, 29, 29, 0.65);
  color: #fca5a5;
}

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

.issue-item {
  background: rgba(9, 17, 34, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: var(--radius-md);
  padding: 11px 13px;
}

.issue-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.issue-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.issue-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.tag.blue {
  background: rgba(30, 58, 138, 0.5);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.4);
}

.tag.amber {
  background: rgba(120, 53, 15, 0.55);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.45);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.marketing-3col-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.responsive-3col-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu-btn,
.mobile-nav-close,
.sidebar-backdrop {
  display: none;
}

.main-area,
.content-scroll,
.glass-card,
.hero-banner,
.dashboard-grid > *,
.marketing-3col-grid > *,
.responsive-3col-grid > * {
  min-width: 0;
}

/* Issue #26: Mobile Responsive Layout (< 768px) */
@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }

  .app-shell {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100vw;
    height: 100dvh;
    overflow-x: hidden;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(286px, 84vw);
    max-width: 84vw;
    height: 100dvh;
    max-height: 100dvh;
    z-index: 1000;
    transform: translateX(-105%);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 18px 0 44px rgba(0, 0, 0, 0.85);
  }

  .sidebar.drawer-open {
    transform: translateX(0);
  }

  .sidebar-backdrop.open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(4px);
    z-index: 990;
  }

  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    border-radius: 9px;
    background: rgba(13, 24, 46, 0.92);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    cursor: pointer;
    flex-shrink: 0;
  }

  .mobile-nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
  }

  .nav-item {
    min-height: 44px;
    padding: 10px 13px;
  }

  .main-area {
    width: 100%;
    max-width: 100vw;
    height: 100dvh;
    overflow-x: hidden;
  }

  .topbar {
    height: auto;
    min-height: 58px;
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .search-box {
    flex: 1 1 160px;
    width: auto;
    max-width: none;
    min-width: 0;
  }

  .search-box input {
    min-height: 44px;
    font-size: 13px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: wrap;
  }

  .topbar-actions .status-pill {
    display: none;
  }

  .topbar-actions .btn-ghost,
  .topbar-actions .btn-primary {
    min-height: 44px;
    padding: 8px 10px;
    font-size: 11.5px;
    flex: 1 1 auto;
    justify-content: center;
  }

  .content-scroll {
    padding: 12px 12px 28px;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }

  .glass-card,
  .hero-banner {
    padding: 14px 14px;
    max-width: 100%;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .dashboard-grid,
  .marketing-3col-grid,
  .responsive-3col-grid,
  .kpi-strip {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .hero-stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .hero-title {
    font-size: 18px;
  }

  .filter-pill,
  .btn-primary,
  .btn-ghost {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .data-table th,
  .data-table td {
    padding: 8px 10px;
    font-size: 12px;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .impact-northstar-grid,
  .impact-daily-strip,
  .impact-kpi-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================================
   Issue #29: Impact Tab (50 KPIs across Sections A–J + Daily Impact Card)
   ============================================================================ */
.impact-northstar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.impact-hero-card {
  background: linear-gradient(155deg, rgba(13, 27, 50, 0.94), rgba(7, 15, 30, 0.98));
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.impact-hero-card:hover {
  transform: translateY(-2px);
}

.impact-daily-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.impact-strip-cell {
  background: rgba(10, 19, 36, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 10px;
  padding: 10px 12px;
}

.impact-strip-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.impact-strip-val {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.impact-strip-sub {
  font-size: 10.5px;
  color: #93c5fd;
  margin-top: 2px;
}

.impact-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.impact-kpi-card {
  background: rgba(10, 19, 36, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.impact-kpi-card.live {
  border-color: rgba(16, 185, 129, 0.28);
}

.impact-kpi-card.awaiting {
  border-color: rgba(245, 158, 11, 0.24);
  background: rgba(15, 22, 38, 0.78);
}

.impact-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.55);
}

.impact-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.impact-kpi-num {
  font-size: 10.5px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.04em;
}

.impact-kpi-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.impact-kpi-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}

.impact-kpi-value {
  font-weight: 800;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.impact-kpi-value.val-live {
  font-size: 19px;
  color: #6ee7b7;
}

.impact-kpi-value.val-awaiting {
  font-size: 12.5px;
  color: #fde68a;
}

.impact-kpi-unit {
  font-size: 10.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.impact-kpi-spark {
  flex-shrink: 0;
}

.impact-kpi-footer {
  padding-top: 7px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.impact-sparkline {
  display: block;
}


/* Issue #62: Blog Approvals Tab & Full-Body HTML Preview */
.blog-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
  gap: 16px;
}

@media (max-width: 980px) {
  .blog-cards-grid {
    grid-template-columns: 1fr;
  }
}

.blog-body-preview {
  padding: 14px 16px;
  background: rgba(2, 6, 23, 0.82);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 10px;
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.6;
  max-height: 520px;
  overflow-y: auto;
}

.blog-body-preview h2 {
  font-size: 15px;
  font-weight: 800;
  color: #38bdf8;
  margin: 14px 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.18);
}

.blog-body-preview h3 {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  margin: 10px 0 4px;
}

.blog-body-preview p {
  margin: 6px 0;
  color: #cbd5e1;
}

.blog-body-preview ul,
.blog-body-preview ol {
  margin: 6px 0 8px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.blog-body-preview a {
  color: #38bdf8;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-body-preview hr {
  border: none;
  border-top: 1px dashed rgba(148, 163, 184, 0.25);
  margin: 12px 0;
}

.blog-body-preview .recess-event-entry {
  padding: 10px 12px;
  margin: 8px 0;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-left: 3px solid #38bdf8;
  border-radius: 8px;
}

.blog-body-preview .recess-honorable-mentions .recess-event-entry {
  border-left-color: #f59e0b;
  background: rgba(30, 27, 18, 0.45);
}
