/* ═══════════════════════════════════════════════════════
   DESIGN TOKENS — JanVikas AI
   Category: Government Intelligence / AI-Native Dashboard
   Style: Dark OLED + Glassmorphism + HUD + Executive
═══════════════════════════════════════════════════════ */

/* ─── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  /* Core Palette */
  --bg-void:        #03040A;
  --bg-deep:        #070B14;
  --bg-surface:     #0D1526;
  --bg-elevated:    #111E38;
  --bg-card:        #0F1929;
  --bg-glass:       rgba(13, 21, 38, 0.72);
  --bg-glass-light: rgba(255,255,255,0.04);
  --bg-hover:       rgba(99, 137, 255, 0.06);

  /* Brand Indigo — Primary Intelligence */
  --indigo-100: #E0E7FF;
  --indigo-300: #A5B4FC;
  --indigo-400: #818CF8;
  --indigo-500: #6366F1;
  --indigo-600: #4F46E5;
  --indigo-glow: rgba(99, 102, 241, 0.25);

  /* Amber — Priority & Warning */
  --amber-300: #FCD34D;
  --amber-400: #FBBF24;
  --amber-500: #F59E0B;
  --amber-glow: rgba(245, 158, 11, 0.2);

  /* Emerald — Positive Signals */
  --emerald-400: #34D399;
  --emerald-500: #10B981;
  --emerald-glow: rgba(16, 185, 129, 0.2);

  /* Crimson — Critical / Urgent */
  --crimson-400: #F87171;
  --crimson-500: #EF4444;
  --crimson-glow: rgba(239, 68, 68, 0.2);

  /* Sky — Secondary Intelligence */
  --sky-300: #7DD3FC;
  --sky-400: #38BDF8;
  --sky-500: #0EA5E9;

  /* Violet — AI Insights */
  --violet-400: #C084FC;
  --violet-500: #A855F7;
  --violet-glow: rgba(168, 85, 247, 0.2);

  /* Text Scale */
  --text-primary:   #F0F4FF;
  --text-secondary: #94A3B8;
  --text-tertiary:  #4B5E7F;
  --text-muted:     #2D3F5C;
  --text-accent:    #818CF8;

  /* Borders */
  --border-subtle:  rgba(99, 137, 255, 0.1);
  --border-glass:   rgba(255, 255, 255, 0.07);
  --border-accent:  rgba(99, 102, 241, 0.4);

  /* Shadows */
  --shadow-card:    0 4px 24px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.04) inset;
  --shadow-glow:    0 0 40px rgba(99,102,241,0.15);
  --shadow-amber:   0 0 30px rgba(245,158,11,0.15);

  /* Radii */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  14px;
  --r-xl:  20px;
  --r-2xl: 28px;

  /* Typography */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Sidebar */
  --sidebar-w: 240px;
  --topbar-h:  60px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-void);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
/* ─── Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 4px; }

/* ─── Layout ─────────────────────────────────────────── */
.app-shell { display: flex; min-height: 100vh; overflow-x: hidden; }
/* ─── Sidebar ────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-deep);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.logo-emblem {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--indigo-500), var(--violet-500));
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 20px var(--indigo-glow);
  flex-shrink: 0;
}

.logo-text { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--text-primary); letter-spacing: -0.3px; }
.logo-sub  { font-size: 10px; color: var(--text-tertiary); letter-spacing: 0.8px; text-transform: uppercase; font-family: var(--font-mono); }

.sidebar-scope {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.scope-label { font-size: 9px; color: var(--text-tertiary); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px; font-family: var(--font-mono); }

.scope-selector {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-glass-light);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  cursor: pointer;
  transition: background 0.15s;
}

.scope-selector:hover { background: var(--bg-hover); }
.scope-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--emerald-400); box-shadow: 0 0 6px var(--emerald-400); flex-shrink: 0; }
.scope-name { font-size: 12px; font-weight: 500; color: var(--text-primary); flex: 1; }
.scope-arrow { font-size: 10px; color: var(--text-tertiary); }

.sidebar-nav { padding: 12px 10px; flex: 1; }

.nav-group { margin-bottom: 20px; }
.nav-group-label {
  font-size: 9px; color: var(--text-tertiary); letter-spacing: 1.2px;
  text-transform: uppercase; font-family: var(--font-mono);
  padding: 0 8px; margin-bottom: 4px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 1px;
  text-decoration: none;
}

.nav-item:hover { background: var(--bg-glass-light); }

.nav-item.active {
  background: linear-gradient(90deg, rgba(99,102,241,0.15), rgba(99,102,241,0.05));
  border-left: 2px solid var(--indigo-500);
  padding-left: 8px;
}

.nav-icon { font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; }
.nav-label { font-size: 12.5px; font-weight: 500; color: var(--text-secondary); }
.nav-item.active .nav-label { color: var(--text-primary); }

.nav-badge {
  margin-left: auto;
  font-size: 9px;
  font-family: var(--font-mono);
  background: rgba(239,68,68,0.2);
  color: var(--crimson-400);
  border-radius: 20px;
  padding: 1px 6px;
  font-weight: 500;
}

.nav-badge.amber   { background: rgba(245,158,11,0.2);  color: var(--amber-400); }
.nav-badge.indigo  { background: rgba(99,102,241,0.2);  color: var(--indigo-400); }
.nav-badge.emerald { background: rgba(16,185,129,0.2);  color: var(--emerald-400); }

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
}

.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
  border-radius: var(--r-md);
  background: var(--bg-glass-light);
  cursor: pointer;
}

.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: white;
  flex-shrink: 0;
}

.user-name  { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.user-role  { font-size: 10px; color: var(--text-tertiary); }

/* ─── Top Navigation ─────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: var(--topbar-h);
  background: rgba(7, 11, 20, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky; top: 0; z-index: 90;
}

.topbar-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.breadcrumb-current { color: var(--text-primary); font-weight: 500; font-family: var(--font-body); font-size: 13px; }
.breadcrumb-sep { color: var(--text-muted); }
.topbar-spacer { flex: 1; }

.topbar-pulse {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--emerald-400);
  font-family: var(--font-mono);
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 20px;
  padding: 4px 10px;
}

.pulse-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--emerald-400);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(52,211,153,0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(52,211,153,0); }
}

.topbar-time {
  font-size: 11px; color: var(--text-tertiary);
  font-family: var(--font-mono);
  background: var(--bg-glass-light);
  border: 1px solid var(--border-glass);
  padding: 4px 10px; border-radius: var(--r-sm);
}

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

.icon-btn {
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  background: var(--bg-glass-light);
  border: 1px solid var(--border-glass);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px; position: relative;
  transition: all 0.15s;
}

.icon-btn:hover { background: var(--bg-hover); border-color: var(--border-accent); }

.notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--crimson-500);
  border: 1px solid var(--bg-deep);
}

.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-glass-light);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  width: 220px;
  cursor: text;
}

.search-bar input {
  background: none; border: none; outline: none;
  font-size: 12px; color: var(--text-secondary);
  font-family: var(--font-body);
  width: 100%;
}

.search-bar input::placeholder { color: var(--text-muted); }

/* ─── Dashboard ──────────────────────────────────────── */
.page { padding: 24px; }

.page-header { margin-bottom: 24px; }

.page-eyebrow {
  font-size: 10px; color: var(--indigo-400);
  letter-spacing: 2px; text-transform: uppercase;
  font-family: var(--font-mono); margin-bottom: 6px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 700;
  color: var(--text-primary); letter-spacing: -0.5px;
  line-height: 1.2; margin-bottom: 6px;
}

.page-subtitle { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

.page-header-row {
  display: flex; align-items: flex-end;
  justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}

/* ─── Buttons ────────────────────────────────────────── */
.header-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500;
  border-radius: var(--r-sm); padding: 7px 14px;
  cursor: pointer; border: none; transition: all 0.15s;
  font-family: var(--font-body);
}

.btn-primary {
  background: linear-gradient(135deg, var(--indigo-500), var(--violet-500));
  color: white;
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}

.btn-primary:hover { box-shadow: 0 4px 24px rgba(99,102,241,0.5); transform: translateY(-1px); }

.btn-ghost {
  background: var(--bg-glass-light);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
}

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

.btn-amber {
  background: rgba(245,158,11,0.15);
  border: 1px solid rgba(245,158,11,0.3);
  color: var(--amber-400);
}

/* ─── Alert Banner ───────────────────────────────────── */
.priority-alert {
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(245,158,11,0.08));
  border: 1px solid rgba(99,102,241,0.3);
  border-left: 3px solid var(--indigo-500);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 16px;
  position: relative; overflow: hidden;
}

.priority-alert::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 10% 50%, rgba(99,102,241,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.alert-badge {
  background: linear-gradient(135deg, var(--indigo-500), var(--violet-500));
  color: white; font-size: 9px; letter-spacing: 1.5px;
  text-transform: uppercase; font-family: var(--font-mono);
  padding: 3px 8px; border-radius: 4px; flex-shrink: 0;
  font-weight: 600;
}

.alert-content { flex: 1; }
.alert-headline { font-size: 14px; font-weight: 600; color: var(--text-primary); font-family: var(--font-display); margin-bottom: 3px; }
.alert-detail { font-size: 12px; color: var(--text-secondary); }
.alert-detail strong { color: var(--amber-400); }

.alert-action {
  background: var(--indigo-500); color: white;
  border: none; border-radius: var(--r-sm);
  padding: 7px 14px; font-size: 11px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  font-family: var(--font-body); letter-spacing: 0.3px;
  transition: all 0.15s; flex-shrink: 0;
}

.alert-action:hover { background: var(--indigo-600); }

/* ─── Executive Hero Cockpit (Hackathon Transformation) ─── */
.executive-hero-cockpit {
  display: flex; flex-direction: column; gap: 24px; margin-bottom: 32px;
}
.hero-top-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.hero-welcome .page-title {
  font-size: 32px;
  background: linear-gradient(135deg, #FFFFFF 0%, #A5B4FC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.priority-cockpit-card {
  background: linear-gradient(135deg, rgba(17, 30, 56, 0.85), rgba(13, 21, 38, 0.95));
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: var(--r-xl);
  padding: 28px 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(99, 102, 241, 0.15);
  position: relative; overflow: hidden;
  backdrop-filter: blur(16px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.priority-cockpit-card:hover {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 50px rgba(99, 102, 241, 0.25);
}
.priority-cockpit-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--indigo-500), var(--violet-500), var(--emerald-400));
}
.cockpit-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 10px;
}
.cockpit-badge {
  background: linear-gradient(135deg, var(--indigo-500), var(--violet-500));
  color: white; font-size: 10px; font-family: var(--font-mono); font-weight: 700;
  padding: 5px 12px; border-radius: 20px; letter-spacing: 1px;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}
.cockpit-ai-score {
  font-size: 12px; font-family: var(--font-mono); color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04); padding: 4px 12px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.08);
}
.cockpit-title {
  font-family: var(--font-display); font-size: 28px; font-weight: 800;
  color: var(--text-primary); letter-spacing: -0.5px; margin-bottom: 12px; line-height: 1.25;
}
.cockpit-reason {
  font-size: 14px; color: var(--text-secondary); line-height: 1.6; max-width: 900px; margin-bottom: 24px;
}
.cockpit-hud-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px;
}
.hud-box {
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-md); padding: 16px; transition: all 0.2s ease;
}
.hud-box:hover {
  background: rgba(255, 255, 255, 0.06); border-color: rgba(99, 102, 241, 0.3); transform: translateY(-2px);
}
.hud-label {
  font-size: 11px; font-family: var(--font-mono); color: var(--text-tertiary); text-transform: uppercase; margin-bottom: 6px; letter-spacing: 0.5px;
}
.hud-value {
  font-size: 20px; font-weight: 700; font-family: var(--font-display); margin-bottom: 4px;
}
.hud-sub {
  font-size: 11px; color: var(--text-muted); font-family: var(--font-mono);
}
.cockpit-cta-row {
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
}

/* ─── Section 2: Map + AI Intelligence Command Deck ─── */
.section-map-intelligence {
  display: grid;
  grid-template-columns: 1.6fr 1.4fr;
  gap: 24px;
  margin-bottom: 32px;
  align-items: stretch;
}
.section-map-intelligence .heatmap-panel,
.section-map-intelligence .ai-panel {
  grid-column: auto !important;
  grid-row: auto !important;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.section-map-intelligence .heatmap-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.section-map-intelligence .india-map-placeholder {
  flex: 1;
  min-height: 520px;
  aspect-ratio: auto !important;
  border-radius: var(--r-xl);
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.section-map-intelligence .ai-panel-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.section-map-intelligence .insight-list {
  max-height: 380px;
  overflow-y: auto;
  padding-right: 6px;
}
.section-map-intelligence .ai-panel {
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.9), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(99, 102, 241, 0.1);
}
.section-map-intelligence .governance-copilot {
  margin-top: auto;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-lg);
  padding: 16px;
}
@media (max-width: 1200px) {
  .section-map-intelligence {
    grid-template-columns: 1fr;
  }
}

/* ─── Section 3: Priority Recommendation Cards Grid ─── */
.priority-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
  padding: 0 20px 24px;
}
.priority-rec-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.65), rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.priority-rec-card:hover {
  border-color: rgba(99, 102, 241, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(99, 102, 241, 0.15);
}
.priority-rec-card.rank-1 {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(15, 23, 42, 0.9));
}
.prc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.prc-rank-badge {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-display);
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border-glass);
}
.prc-rank-badge.rank-1 { background: rgba(245, 158, 11, 0.2); color: var(--amber-400); border-color: rgba(245, 158, 11, 0.4); }
.prc-rank-badge.rank-2 { background: rgba(99, 102, 241, 0.2); color: var(--indigo-300); border-color: rgba(99, 102, 241, 0.4); }
.prc-rank-badge.rank-3 { background: rgba(168, 85, 247, 0.2); color: var(--violet-300); border-color: rgba(168, 85, 247, 0.4); }
.prc-score-badge {
  font-size: 11px;
  font-family: var(--font-mono);
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.prc-sdg-tag {
  font-size: 10px;
  color: #818cf8;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
}
.prc-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.prc-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display);
  margin: 0;
  line-height: 1.3;
}
.prc-location {
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  margin-top: 2px;
}
.prc-metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--r-md);
  padding: 10px;
}
.prc-metric-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.prc-m-label {
  font-size: 9.5px;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  text-transform: uppercase;
}
.prc-m-value {
  font-size: 11.5px;
  font-weight: 600;
  font-family: var(--font-mono);
  display: flex;
  flex-direction: column;
}
.prc-ai-est-tag {
  font-size: 8.5px;
  color: var(--text-muted);
  font-weight: 400;
}
.prc-ai-reasoning {
  background: rgba(99, 102, 241, 0.06);
  border-left: 3px solid var(--indigo-500);
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
}
.prc-ai-label {
  font-size: 9.5px;
  font-family: var(--font-mono);
  color: var(--indigo-300);
  font-weight: 600;
  margin-bottom: 3px;
}
.prc-ai-text {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}
.prc-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}
.prc-action-btn {
  flex: 1;
  min-width: 140px;
  font-size: 11px;
}
.prc-docket-btn {
  font-size: 11px;
}
.prc-conf {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--emerald-400);
  margin-left: auto;
}

/* ─── Section 4: Citizen Evidence & AI Reasoning Network ─── */
.section-evidence-reasoning {
  display: grid;
  grid-template-columns: 1.1fr 1.9fr;
  gap: 24px;
  margin-bottom: 32px;
  align-items: start;
}
@media (max-width: 1100px) {
  .section-evidence-reasoning { grid-template-columns: 1fr; }
}

/* ─── Section 5: Advanced Planning Analytics Command Center ─── */
.section-analytics-command {
  margin-bottom: 32px;
}
.analytics-tab-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.analytics-tab-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 8px 16px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.analytics-tab-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
  border-color: rgba(99, 102, 241, 0.3);
}
.analytics-tab-btn.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(79, 70, 229, 0.15));
  border-color: var(--indigo-500);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}
.analytics-tab-pane {
  animation: fadeInPane 0.25s ease-in-out;
}
@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Cards ──────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
  cursor: default;
}

.kpi-card:hover { border-color: var(--border-accent); }

.kpi-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-color, var(--indigo-500)), transparent);
  opacity: 0.4;
}

.kpi-card.c-amber   { --accent-color: var(--amber-400); }
.kpi-card.c-emerald { --accent-color: var(--emerald-400); }
.kpi-card.c-crimson { --accent-color: var(--crimson-400); }
.kpi-card.c-sky     { --accent-color: var(--sky-400); }
.kpi-card.c-violet  { --accent-color: var(--violet-400); }
.kpi-card.c-indigo  { --accent-color: var(--indigo-500); }

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

.kpi-icon-wrap {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}

.kpi-trend {
  font-size: 10px; font-family: var(--font-mono);
  display: flex; align-items: center; gap: 3px;
  padding: 2px 6px; border-radius: 4px;
}

.kpi-trend.up   { color: var(--emerald-400); background: rgba(16,185,129,0.1); }
.kpi-trend.down { color: var(--crimson-400); background: rgba(239,68,68,0.1); }
.kpi-trend.flat { color: var(--text-tertiary); background: rgba(255,255,255,0.05); }

.kpi-value {
  font-size: 28px; font-weight: 700;
  font-family: var(--font-display); letter-spacing: -1px;
  color: var(--text-primary); line-height: 1; margin-bottom: 4px;
}

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

.kpi-sparkline {
  height: 28px; margin-top: 12px;
  display: flex; align-items: flex-end; gap: 2px;
}

.spark-bar {
  flex: 1; border-radius: 2px 2px 0 0;
  background: var(--accent-color, var(--indigo-500));
  opacity: 0.3;
  transition: opacity 0.2s;
}

.spark-bar.active { opacity: 0.9; }
.spark-bar:hover  { opacity: 0.7; }

/* ─── Charts ─────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  grid-template-rows: auto;
  gap: 24px;
  margin-bottom: 32px;
  align-items: start;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  overflow: hidden;
  position: relative;
}

.panel-header {
  padding: 16px 20px 0;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}

.panel-eyebrow { font-size: 9px; color: var(--text-tertiary); letter-spacing: 1.2px; text-transform: uppercase; font-family: var(--font-mono); margin-bottom: 3px; }
.panel-title   { font-size: 13px; font-weight: 600; color: var(--text-primary); font-family: var(--font-display); }
.panel-actions { display: flex; gap: 6px; }

.pill-btn {
  font-size: 10px; font-family: var(--font-mono);
  padding: 4px 9px; border-radius: 20px;
  cursor: pointer; border: none; transition: all 0.15s;
}

.pill-btn.active   { background: rgba(99,102,241,0.2); color: var(--indigo-300); border: 1px solid rgba(99,102,241,0.3); }
.pill-btn.inactive { background: transparent; color: var(--text-tertiary); border: 1px solid var(--border-glass); }
.pill-btn.inactive:hover { color: var(--text-secondary); background: var(--bg-glass-light); }

/* India Heatmap Panel */
.heatmap-panel { grid-column: auto; grid-row: auto; }

.heatmap-container { padding: 0 20px 20px; position: relative; }

.india-map-placeholder {
  width: 100%;
  aspect-ratio: 0.85;
  background: var(--bg-elevated);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-glass);
  position: relative; overflow: visible;
  min-height: 340px;
}

.india-map-placeholder svg { width: 100%; height: 100%; }

.map-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 40%, rgba(99,102,241,0.12) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 60%, rgba(245,158,11,0.10) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 80%, rgba(239,68,68,0.08) 0%, transparent 40%);
}

.hotspot {
  position: absolute; border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  animation: hotspot-pulse 3s ease-in-out infinite;
}

@keyframes hotspot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--hs-color); opacity: 1; }
  50% { box-shadow: 0 0 0 8px transparent; opacity: 0.85; }
}

.map-legend {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 12px;
}

.legend-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Tables ─────────────────────────────────────────────── */
.priority-panel { grid-column: auto; grid-row: auto; }
.priority-table { padding: 0 20px 20px; }

.ptable { width: 100%; border-collapse: collapse; }

.ptable th {
  font-size: 9px; font-family: var(--font-mono);
  color: var(--text-tertiary); text-transform: uppercase;
  letter-spacing: 0.8px; padding: 0 8px 10px;
  text-align: left; border-bottom: 1px solid var(--border-subtle);
}

.ptable td {
  padding: 10px 8px; font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
}

.ptable tr:hover td { background: var(--bg-hover); }
.ptable tr:last-child td { border-bottom: none; }

.rank-badge {
  width: 22px; height: 22px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; font-family: var(--font-display);
}

.rank-1 { background: rgba(245,158,11,0.2);  color: var(--amber-400);  border: 1px solid rgba(245,158,11,0.3); }
.rank-2 { background: rgba(99,102,241,0.2);  color: var(--indigo-400); border: 1px solid rgba(99,102,241,0.3); }
.rank-3 { background: rgba(168,85,247,0.2);  color: var(--violet-400); border: 1px solid rgba(168,85,247,0.3); }
.rank-4,
.rank-5,
.rank-6 { background: rgba(255,255,255,0.05); color: var(--text-secondary); border: 1px solid var(--border-glass); }

.project-name { font-weight: 500; color: var(--text-primary); font-size: 12px; line-height: 1.3; }
.project-loc  { font-size: 10px; color: var(--text-tertiary); font-family: var(--font-mono); margin-top: 2px; }

.score-bar-wrap { display: flex; align-items: center; gap: 8px; }

.score-bar-bg {
  flex: 1; height: 5px; background: var(--bg-elevated);
  border-radius: 10px; overflow: hidden;
}

.score-bar-fill { height: 100%; border-radius: 10px; }
.score-val { font-size: 11px; font-weight: 600; font-family: var(--font-mono); white-space: nowrap; }

.tag {
  display: inline-block;
  font-size: 9px; padding: 2px 6px; border-radius: 4px;
  font-family: var(--font-mono); font-weight: 500;
}

.tag-infra  { background: rgba(14,165,233,0.15);  color: var(--sky-400);     border: 1px solid rgba(14,165,233,0.2); }
.tag-health { background: rgba(16,185,129,0.15);  color: var(--emerald-400); border: 1px solid rgba(16,185,129,0.2); }
.tag-edu    { background: rgba(245,158,11,0.15);  color: var(--amber-400);   border: 1px solid rgba(245,158,11,0.2); }
.tag-water  { background: rgba(56,189,248,0.15);  color: var(--sky-300);     border: 1px solid rgba(56,189,248,0.2); }
.tag-agri   { background: rgba(52,211,153,0.15);  color: var(--emerald-400); border: 1px solid rgba(52,211,153,0.2); }
.tag-energy { background: rgba(168,85,247,0.15);  color: var(--violet-400);  border: 1px solid rgba(168,85,247,0.2); }
.tag-road   { background: rgba(251,191,36,0.15);  color: var(--amber-300);   border: 1px solid rgba(251,191,36,0.2); }

/* AI Insight Panel */
.ai-panel {
  grid-column: auto;
  grid-row: auto;
  background: linear-gradient(180deg, rgba(99,102,241,0.07) 0%, var(--bg-card) 40%);
  border-color: rgba(99,102,241,0.2);
}

.ai-header-accent {
  height: 2px;
  background: linear-gradient(90deg, var(--indigo-500), var(--violet-500), transparent);
  border-radius: 1px;
}

.ai-panel-inner { padding: 16px 18px; }

.ai-status-bar {
  display: flex; align-items: center; gap: 8px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--r-sm);
  padding: 8px 12px; margin-bottom: 16px;
}

.ai-brain-icon { font-size: 16px; }
.ai-status-text { font-size: 11px; color: var(--indigo-300); font-family: var(--font-mono); flex: 1; }
.ai-active-tag  { font-size: 9px; background: rgba(16,185,129,0.2); color: var(--emerald-400); padding: 2px 7px; border-radius: 4px; border: 1px solid rgba(16,185,129,0.3); }

.insight-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }

.insight-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-md);
  padding: 12px 14px;
  position: relative; overflow: hidden;
  cursor: pointer; transition: all 0.2s;
}

.insight-card:hover { border-color: var(--border-accent); transform: translateX(2px); }

.insight-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--ins-color, var(--indigo-500));
  border-radius: 3px 0 0 3px;
}

.insight-card.warn { --ins-color: var(--amber-500); }
.insight-card.crit { --ins-color: var(--crimson-500); }
.insight-card.pos  { --ins-color: var(--emerald-500); }
.insight-card.info { --ins-color: var(--sky-500); }

.insight-top { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.insight-icon  { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.insight-title { font-size: 12px; font-weight: 600; color: var(--text-primary); line-height: 1.3; font-family: var(--font-display); }
.insight-body  { font-size: 11px; color: var(--text-secondary); line-height: 1.5; padding-left: 23px; }
.insight-meta  { font-size: 10px; color: var(--text-tertiary); font-family: var(--font-mono); padding-left: 23px; margin-top: 6px; }

.confidence-bar-wrap {
  padding-left: 23px; margin-top: 8px;
  display: flex; align-items: center; gap: 8px;
}

.conf-label { font-size: 9px; color: var(--text-tertiary); font-family: var(--font-mono); white-space: nowrap; }
.conf-track { flex: 1; height: 3px; background: var(--bg-surface); border-radius: 3px; overflow: hidden; }
.conf-fill  { height: 100%; border-radius: 3px; background: var(--ins-color, var(--indigo-500)); }
.conf-val   { font-size: 9px; color: var(--text-secondary); font-family: var(--font-mono); }

/* Copilot ───────────────────────────────────────────── */
.governance-copilot {
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(168,85,247,0.1));
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: var(--r-md);
  padding: 14px;
  margin-top: 4px;
}

.copilot-title {
  font-size: 11px; font-weight: 600; color: var(--indigo-300);
  font-family: var(--font-display); margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}

.copilot-prompt {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 11px; color: var(--text-secondary);
  line-height: 1.5; margin-bottom: 10px;
  font-family: var(--font-mono);
}

.copilot-response {
  font-size: 12px; color: var(--text-primary);
  line-height: 1.6; margin-bottom: 10px;
}

.copilot-response strong { color: var(--amber-400); }
.copilot-tags { display: flex; gap: 6px; flex-wrap: wrap; }

/* Citizen Suggestions ───────────────────────────────── */
.signals-panel { grid-column: auto; grid-row: auto; }
.signals-feed { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 8px; }

.signal-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-md);
  cursor: pointer; transition: all 0.15s;
}

.signal-item:hover { background: var(--bg-hover); border-color: var(--border-accent); }

.signal-sentiment { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }

.sent-crit { background: var(--crimson-500); box-shadow: 0 0 6px var(--crimson-500); }
.sent-warn { background: var(--amber-500);   box-shadow: 0 0 6px var(--amber-500); }
.sent-pos  { background: var(--emerald-500); box-shadow: 0 0 6px var(--emerald-500); }

.signal-content { flex: 1; }
.signal-quote { font-size: 11px; color: var(--text-primary); line-height: 1.5; margin-bottom: 4px; font-style: italic; }
.signal-meta  { font-size: 10px; color: var(--text-tertiary); font-family: var(--font-mono); }

.signal-impact {
  font-size: 10px; font-family: var(--font-mono);
  padding: 2px 7px; border-radius: 4px; flex-shrink: 0;
  align-self: flex-start;
}

.imp-high { background: rgba(239,68,68,0.15);  color: var(--crimson-400); border: 1px solid rgba(239,68,68,0.2); }
.imp-med  { background: rgba(245,158,11,0.15); color: var(--amber-400);   border: 1px solid rgba(245,158,11,0.2); }
.imp-low  { background: rgba(16,185,129,0.15); color: var(--emerald-400); border: 1px solid rgba(16,185,129,0.2); }

/* Project Comparison ────────────────────────────────── */
.analytics-band {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.cluster-grid {
  padding: 0 20px 20px;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cluster-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-md);
  padding: 12px;
  cursor: pointer; transition: all 0.2s;
  position: relative;
}

.cluster-card:hover { border-color: var(--border-accent); transform: translateY(-1px); }

.cluster-icon  { font-size: 20px; margin-bottom: 8px; }
.cluster-name  { font-size: 11px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; font-family: var(--font-display); }
.cluster-count { font-size: 22px; font-weight: 700; color: var(--text-primary); font-family: var(--font-display); letter-spacing: -0.5px; }
.cluster-unit  { font-size: 9px; color: var(--text-tertiary); font-family: var(--font-mono); margin-left: 2px; }

.cluster-bar  { height: 3px; background: var(--bg-surface); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.cluster-fill { height: 100%; border-radius: 3px; }

.data-source-item {
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.data-source-item:hover {
  background: var(--bg-hover) !important;
  border-color: rgba(99, 102, 241, 0.4) !important;
  transform: translateX(3px);
}

/* Infrastructure gaps */
.infra-gaps { padding: 0 20px 20px; }

.gap-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 8px; border-bottom: 1px solid rgba(255,255,255,0.03);
  cursor: pointer; transition: all 0.2s; border-radius: var(--r-sm);
}

.gap-row:hover { background: rgba(99,102,241,0.1); transform: translateX(3px); }

.gap-row:last-child { border-bottom: none; }

.gap-category { font-size: 11px; color: var(--text-secondary); flex: 0 0 100px; }
.gap-track    { flex: 1; height: 6px; background: var(--bg-elevated); border-radius: 6px; overflow: hidden; }
.gap-fill     { height: 100%; border-radius: 6px; transition: width 0.3s; }
.gap-val      { font-size: 10px; font-family: var(--font-mono); color: var(--text-secondary); flex: 0 0 30px; text-align: right; }
.gap-delta    { font-size: 9px; font-family: var(--font-mono); flex: 0 0 40px; text-align: right; }
.gap-delta.neg { color: var(--crimson-400); }
.gap-delta.pos { color: var(--emerald-400); }

/* Hotspot table */
.hotspot-table { padding: 0 20px 20px; }
.hs-table { width: 100%; }

.hs-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px; border-bottom: 1px solid rgba(255,255,255,0.03);
  cursor: pointer; transition: all 0.2s; border-radius: var(--r-sm);
}

.hs-row:hover { background: rgba(245,158,11,0.1); transform: translateX(3px); }

.hs-row:last-child { border-bottom: none; }

.hs-rank     { font-size: 11px; font-family: var(--font-mono); color: var(--text-muted); flex: 0 0 20px; }
.hs-location { flex: 1; }
.hs-city     { font-size: 11px; font-weight: 500; color: var(--text-primary); }
.hs-state    { font-size: 9px; color: var(--text-tertiary); font-family: var(--font-mono); }
.hs-heat     { display: flex; gap: 2px; align-items: flex-end; }
.heat-block  { width: 4px; border-radius: 1px; }
.hs-score    { font-size: 11px; font-weight: 600; font-family: var(--font-mono); flex: 0 0 36px; text-align: right; }

/* Executive Brief ───────────────────────────────────── */
.brief-section { margin-bottom: 24px; }

.brief-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  overflow: hidden;
}

.brief-header {
  padding: 20px 24px;
  background: linear-gradient(90deg, rgba(99,102,241,0.1), rgba(168,85,247,0.05));
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; gap: 16px;
}

.brief-icon-wrap {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--indigo-500), var(--violet-500));
  border-radius: var(--r-md); display: flex; align-items: center; justify-content: center;
  font-size: 22px; box-shadow: 0 4px 16px rgba(99,102,241,0.3); flex-shrink: 0;
}

.brief-meta { flex: 1; }
.brief-title    { font-size: 15px; font-weight: 700; color: var(--text-primary); font-family: var(--font-display); }
.brief-subtitle { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; font-family: var(--font-mono); }

.brief-body {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 240px;
  gap: 0;
}

.brief-col {
  padding: 20px 24px;
  border-right: 1px solid var(--border-subtle);
}

.brief-col:last-child { border-right: none; }

.brief-col-title {
  font-size: 9px; color: var(--indigo-400); letter-spacing: 1.5px;
  text-transform: uppercase; font-family: var(--font-mono);
  margin-bottom: 12px;
}

.brief-finding { font-size: 12px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 10px; }
.brief-finding strong    { color: var(--text-primary); }
.brief-finding.highlight { color: var(--amber-400); }

.brief-metrics { display: flex; flex-direction: column; gap: 10px; }

.brief-metric {
  display: flex; align-items: center; justify-content: space-between;
}

.bm-label { font-size: 11px; color: var(--text-tertiary); }
.bm-val   { font-size: 12px; font-weight: 600; font-family: var(--font-mono); }

.brief-recommend {
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--r-md); padding: 14px;
}

.rec-number { font-size: 32px; font-weight: 700; font-family: var(--font-display); letter-spacing: -1px; color: var(--indigo-400); line-height: 1; margin-bottom: 4px; }
.rec-label  { font-size: 10px; color: var(--text-tertiary); font-family: var(--font-mono); margin-bottom: 10px; }
.rec-item   { font-size: 11px; color: var(--text-secondary); margin-bottom: 6px; display: flex; gap: 6px; line-height: 1.4; }
.rec-item::before { content: '→'; color: var(--indigo-400); flex-shrink: 0; }

.brief-generate-btn {
  background: linear-gradient(135deg, var(--indigo-500), var(--violet-500));
  color: white; border: none;
  padding: 10px 16px; border-radius: var(--r-sm);
  font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: var(--font-body); margin-top: 12px;
  width: 100%; letter-spacing: 0.3px;
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

.brief-generate-btn:hover { box-shadow: 0 4px 24px rgba(99,102,241,0.5); transform: translateY(-1px); }

/* Status bar */
.status-bar {
  background: var(--bg-deep);
  border-top: 1px solid var(--border-subtle);
  padding: 8px 24px;
  display: flex; align-items: center; gap: 16px;
  font-size: 10px; font-family: var(--font-mono);
  color: var(--text-tertiary);
}

.status-item { display: flex; align-items: center; gap: 5px; }
.status-dot  { width: 5px; height: 5px; border-radius: 50%; background: var(--emerald-400); }
.status-dot.warn { background: var(--amber-400); }
.status-spacer { flex: 1; }

.status-gdg-badge {
  background: linear-gradient(90deg, rgba(66,133,244,0.2), rgba(234,67,53,0.2), rgba(251,188,4,0.2), rgba(52,168,83,0.2));
  border: 1px solid rgba(255,255,255,0.1);
  padding: 3px 10px; border-radius: 4px;
  font-size: 9px; color: var(--text-secondary); letter-spacing: 0.5px;
}

/* Score breakdown */
.score-breakdown { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }

.sb-row { display: flex; align-items: center; gap: 8px; }

.sb-factor {
  font-size: 10px; color: var(--text-tertiary); flex: 0 0 110px;
  font-family: var(--font-mono); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}

.sb-weight { font-size: 9px; color: var(--text-muted); font-family: var(--font-mono); flex: 0 0 24px; text-align: right; }
.sb-track  { flex: 1; height: 4px; background: var(--bg-elevated); border-radius: 4px; overflow: hidden; }
.sb-fill   { height: 100%; border-radius: 4px; }
.sb-val    { font-size: 10px; font-family: var(--font-mono); font-weight: 600; flex: 0 0 28px; text-align: right; }

/* Copilot chips */
.copilot-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }

.copilot-chip {
  font-size: 10px; font-family: var(--font-mono); color: var(--indigo-300);
  background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.2);
  border-radius: 20px; padding: 4px 10px; cursor: pointer;
  transition: all 0.15s; white-space: nowrap;
}

.copilot-chip:hover { background: rgba(99,102,241,0.2); border-color: rgba(99,102,241,0.4); color: var(--indigo-100); }

/* Hotspot hierarchy */
.hotspot-hierarchy { display: flex; align-items: center; gap: 4px; padding: 6px 20px 10px; flex-wrap: wrap; }

.hh-level {
  font-size: 9px; font-family: var(--font-mono); padding: 3px 8px;
  border-radius: 4px; border: 1px solid var(--border-glass);
  color: var(--text-tertiary); background: var(--bg-glass-light);
  cursor: pointer; transition: all 0.15s;
}

.hh-level.active { background: rgba(99,102,241,0.15); border-color: rgba(99,102,241,0.35); color: var(--indigo-300); }
.hh-sep { font-size: 10px; color: var(--text-muted); }

/* AI Workflow Strip */
.ai-workflow-strip { padding: 0 20px 20px; }

.ai-workflow-pipe {
  display: flex; align-items: center; gap: 0;
  overflow-x: auto; padding: 4px 0;
}

.ai-pipe-step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }

.ai-pipe-node {
  width: 52px; height: 52px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; border: 1px solid var(--border-glass);
  background: var(--bg-elevated);
  position: relative; transition: border-color 0.2s;
}

.ai-pipe-node:hover { border-color: var(--border-accent); }

.ai-pipe-node.active {
  background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(168,85,247,0.15));
  border-color: rgba(99,102,241,0.4);
  box-shadow: 0 0 16px rgba(99,102,241,0.2);
}

.ai-pipe-node.gemini {
  background: linear-gradient(135deg, rgba(66,133,244,0.25), rgba(52,168,83,0.15));
  border-color: rgba(66,133,244,0.4);
  box-shadow: 0 0 16px rgba(66,133,244,0.2);
}

.ai-pipe-label {
  font-size: 8.5px; font-family: var(--font-mono); color: var(--text-tertiary);
  text-align: center; max-width: 60px; line-height: 1.3; letter-spacing: 0.3px;
}

.ai-pipe-arrow { font-size: 12px; color: var(--text-muted); margin: 0 4px; flex-shrink: 0; padding-bottom: 18px; }

.gemini-badge {
  position: absolute; bottom: -6px; right: -6px;
  width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(135deg, #4285F4, #34A853, #FBBC04, #EA4335);
  font-size: 10px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--bg-deep);
}

/* Multilingual signal cards */
.signal-item-v2 {
  background: var(--bg-elevated); border: 1px solid var(--border-glass);
  border-radius: var(--r-md); overflow: hidden;
  cursor: pointer; transition: all 0.15s; margin-bottom: 8px;
}

.signal-item-v2:hover { border-color: var(--border-accent); }

.signal-original   { padding: 10px 12px 8px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.signal-translated { padding: 8px 12px;      border-bottom: 1px solid rgba(255,255,255,0.04); }

.signal-orig-label {
  font-size: 8.5px; font-family: var(--font-mono); color: var(--text-muted);
  letter-spacing: 0.8px; text-transform: uppercase; margin-bottom: 3px;
}

.signal-orig-text { font-size: 12px; color: var(--text-secondary); line-height: 1.4; font-style: italic; }

.signal-trans-label {
  font-size: 8.5px; font-family: var(--font-mono); color: var(--indigo-400);
  letter-spacing: 0.8px; text-transform: uppercase; margin-bottom: 3px;
  display: flex; align-items: center; gap: 5px;
}

.signal-trans-text { font-size: 12px; color: var(--text-primary); line-height: 1.4; }

.signal-meta-row {
  padding: 8px 12px; display: flex; flex-wrap: wrap;
  gap: 6px; align-items: center;
}

.sig-tag { font-size: 9px; font-family: var(--font-mono); padding: 2px 7px; border-radius: 4px; font-weight: 500; }

.sig-tag-lang    { background: rgba(66,133,244,0.15);  color: #7DB3F7;            border: 1px solid rgba(66,133,244,0.25); }
.sig-tag-theme   { background: rgba(56,189,248,0.12);  color: var(--sky-300);     border: 1px solid rgba(56,189,248,0.2); }
.sig-tag-cluster { background: rgba(99,102,241,0.12);  color: var(--indigo-300);  border: 1px solid rgba(99,102,241,0.2); }
.sig-tag-source  { background: rgba(255,255,255,0.05); color: var(--text-tertiary); border: 1px solid var(--border-glass); }
.sig-tag-impact  { background: rgba(16,185,129,0.12);  color: var(--emerald-400); border: 1px solid rgba(16,185,129,0.2); }
.sig-tag-contrib { background: rgba(245,158,11,0.12);  color: var(--amber-400);   border: 1px solid rgba(245,158,11,0.2); }

/* Evidence Fusion Engine */
.fusion-section { margin-bottom: 24px; }

.fusion-panel {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl); overflow: hidden;
}

.fusion-header {
  padding: 16px 24px; border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(90deg, rgba(99,102,241,0.08), rgba(16,185,129,0.04));
  display: flex; align-items: center; justify-content: space-between;
}

.fusion-sources {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; padding: 20px 24px; position: relative;
}

.fusion-source-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 8px; border: 1px solid var(--border-glass);
  border-radius: var(--r-md); margin: 4px; cursor: pointer;
  transition: all 0.2s; background: var(--bg-elevated);
  text-align: center; position: relative; overflow: hidden;
}

.fusion-source-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--fsc-color, var(--indigo-500)); opacity: 0.7;
}

.fusion-source-card:hover {
  border-color: var(--fsc-color, var(--indigo-500));
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.fsc-icon { font-size: 22px; }
.fsc-name { font-size: 10px; font-weight: 600; color: var(--text-primary); font-family: var(--font-display); line-height: 1.2; }
.fsc-sub  { font-size: 8.5px; color: var(--text-tertiary); font-family: var(--font-mono); line-height: 1.3; }

.fusion-center-node {
  background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(16,185,129,0.15));
  border: 1px solid rgba(99,102,241,0.4); border-radius: var(--r-lg);
  padding: 12px 24px; margin: 0 24px;
  display: flex; align-items: center; gap: 12px;
}

/* Misc utilities */
.divider { height: 1px; background: var(--border-subtle); margin: 16px 0; }
.flex-row { display: flex; align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.text-mono { font-family: var(--font-mono); }
.text-sm   { font-size: 11px; }
.text-xs   { font-size: 10px; }

.mini-chart { display: flex; align-items: flex-end; gap: 3px; height: 40px; }
.mc-bar     { flex: 1; border-radius: 3px 3px 0 0; min-height: 4px; }

/* Glowing border animation */
@keyframes border-spin {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.glowing-border { position: relative; }

.glowing-border::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: calc(var(--r-xl) + 1px);
  background: linear-gradient(90deg, var(--indigo-500), var(--violet-500), var(--amber-400), var(--indigo-500));
  background-size: 300% 100%;
  animation: border-spin 4s linear infinite;
  z-index: -1; opacity: 0.5;
}

.annotate {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; color: var(--text-tertiary);
  font-family: var(--font-mono); vertical-align: middle;
}

/* Copilot modal */
.copilot-modal-overlay {
  position: fixed; inset: 0; z-index: 999999 !important;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}

.copilot-modal-overlay.open { opacity: 1; pointer-events: auto !important; }

.copilot-modal {
  background: var(--bg-card);
  border: 1px solid rgba(99,102,241,0.4);
  border-radius: var(--r-xl);
  width: 580px; max-width: 96vw; max-height: 80vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6), var(--shadow-glow);
  overflow: hidden;
}

.copilot-modal-header {
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(168,85,247,0.1));
  border-bottom: 1px solid rgba(99,102,241,0.2);
  display: flex; align-items: center; gap: 12px;
}

.copilot-modal-header-title {
  font-size: 14px; font-weight: 700;
  font-family: var(--font-display); color: var(--text-primary);
  flex: 1;
}

.copilot-modal-close {
  background: none; border: none; font-size: 18px;
  color: var(--text-tertiary); cursor: pointer; line-height: 1;
  transition: color 0.15s;
}

.copilot-modal-close:hover { color: var(--text-primary); }

.copilot-chat-area {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 200px;
}

.chat-msg { font-size: 13px; line-height: 1.6; }
.chat-msg.user   { color: var(--indigo-300); font-family: var(--font-mono); font-size: 11px; }
.chat-msg.assistant { color: var(--text-primary); background: var(--bg-elevated); padding: 10px 14px; border-radius: var(--r-md); border: 1px solid var(--border-glass); }
.chat-msg .label { font-size: 9px; letter-spacing: 0.8px; text-transform: uppercase; font-family: var(--font-mono); color: var(--text-muted); margin-bottom: 4px; }

.copilot-input-row {
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex; gap: 8px;
}

.copilot-input {
  flex: 1; background: var(--bg-elevated); border: 1px solid var(--border-glass);
  border-radius: var(--r-sm); padding: 8px 12px;
  font-size: 12px; color: var(--text-primary); font-family: var(--font-body);
  outline: none; transition: border-color 0.15s;
}

.copilot-input:focus { border-color: var(--border-accent); }
.copilot-input::placeholder { color: var(--text-muted); }

.copilot-send {
  background: linear-gradient(135deg, var(--indigo-500), var(--violet-500));
  color: white; border: none; border-radius: var(--r-sm);
  padding: 8px 16px; font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: var(--font-body);
  transition: all 0.15s;
}

.copilot-send:hover { opacity: 0.9; }
.copilot-chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 16px 12px; }

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 1200px) {
  :root { --sidebar-w: 200px; }
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .analytics-band { grid-template-columns: 1fr 1fr; }
  .brief-body { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .ai-panel,
  .heatmap-panel,
  .priority-panel,
  .signals-panel { grid-column: 1; grid-row: auto; }
  .analytics-band { grid-template-columns: 1fr; }
  .brief-body { grid-template-columns: 1fr; }
  .page { padding: 16px; }
}

/* ─── Leaflet map container ──────────────────────────── */
/* The india-map-placeholder already has aspect-ratio:0.85
   We make the inner #jv-map fill it completely.          */
#jv-map {
  width: 100%;
  height: 100%;
  min-height: 380px;
  border-radius: var(--r-lg);
  background: var(--bg-elevated);
  display: block;
}
/* Leaflet popup — transparent wrapper so our custom HTML
   is the only visual element                            */
.jv-popup .leaflet-popup-content-wrapper,
.jv-popup .leaflet-popup-tip-container,
.jv-popup .leaflet-popup-tip {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  border: none !important;
}
.jv-popup .leaflet-popup-content {
  margin: 0 !important;
  width: auto !important;
}
.jv-popup .leaflet-popup-close-button {
  color: #94A3B8 !important;
  font-size: 16px !important;
  top: 6px !important;
  right: 8px !important;
}
.jv-popup .leaflet-popup-close-button:hover { color: #F0F4FF !important; }

/* Leaflet tooltip — minimal dark style */
.jv-tooltip.leaflet-tooltip {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: var(--r-sm) !important;
  color: var(--text-primary) !important;
  padding: 4px 10px !important;
  font-size: 10px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
  white-space: nowrap;
}
.jv-tooltip.leaflet-tooltip::before { display: none !important; }

/* Zoom control — dark theme */
.leaflet-control-zoom a {
  background: var(--bg-elevated) !important;
  border-color: var(--border-glass) !important;
  color: var(--text-secondary) !important;
}
.leaflet-control-zoom a:hover {
  background: var(--bg-hover) !important;
  color: var(--text-primary) !important;
}
.leaflet-bar { border: 1px solid var(--border-glass) !important; box-shadow: none !important; }

/* Attribution */
.leaflet-control-attribution {
  background: rgba(7,11,20,0.7) !important;
  color: var(--text-muted) !important;
  font-size: 8px !important;
  border-radius: var(--r-sm) 0 0 0 !important;
}
.leaflet-control-attribution a { color: var(--text-tertiary) !important; }

/* ─── PRINT MODE CUSTOM STYLING (EXECUTIVE PDF EXPORT) ─── */
@media print {
  /* Set background and general color rules */
  body, html, .main-content, .page, .panel, .brief-panel, .brief-col {
    background: #ffffff !important;
    color: #000000 !important;
    font-family: "Inter", "Helvetica", "Arial", sans-serif !important;
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Force display of background colors for charts and progress fills */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Hide interactive, sidebar, and non-printable elements */
  .sidebar, 
  .topbar, 
  .header-actions, 
  .panel-actions, 
  .pill-btn, 
  .copilot-modal-overlay, 
  #jv-lightbox,
  .map-empty-overlay,
  .leaflet-control-zoom,
  .leaflet-control-attribution,
  #tracker-line,
  #chart-tooltip,
  .alert-images,
  .copilot-chips {
    display: none !important;
  }

  /* Expand main-content to fill whole print canvas */
  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .page {
    padding: 0 !important;
  }

  /* Ensure nice layout grids and columns split evenly */
  .dashboard-grid {
    display: block !important;
  }

  .analytics-band {
    display: block !important;
    margin-bottom: 20px !important;
    page-break-inside: avoid !important;
  }

  /* Ensure each dashboard card fits on printed sheet beautifully */
  .panel, .brief-panel {
    background: #ffffff !important;
    border: 1px solid #dddddd !important;
    border-radius: 8px !important;
    margin-bottom: 24px !important;
    padding: 16px !important;
    page-break-inside: avoid !important;
    box-shadow: none !important;
  }

  /* Official Government Document Header Banner */
  .page::before {
    content: "JANVIKAS AI · OFFICIAL CONSTITUENCY DEVELOPMENT PORTAL · PARLIAMENTARY BRIEF" !important;
    display: block !important;
    font-family: var(--font-mono), monospace !important;
    font-size: 9px !important;
    color: #555555 !important;
    border-bottom: 1px solid #cccccc !important;
    padding-bottom: 8px !important;
    margin-bottom: 20px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
  }

  /* Make tables high-fidelity and crisp on white paper */
  table {
    width: 100% !important;
    border-collapse: collapse !important;
  }

  th, td {
    border-bottom: 1px solid #dddddd !important;
    color: #000000 !important;
    padding: 10px 8px !important;
  }

  th {
    background: #f5f5f5 !important;
    font-weight: bold !important;
  }

  /* Score fill-bars printed clearly */
  .score-bar-bg {
    background: #e2e8f0 !important;
    border: 1px solid #cbd5e1 !important;
  }

  .score-bar-fill {
    background: #6366f1 !important;
  }

  .sb-track {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
  }

  .sb-fill {
    background: #3b82f6 !important;
  }

  /* Scheme Recommendation Highlight Boxes */
  .scheme-rec-box {
    background: #f8fafc !important;
    border-left: 3px solid #0284c7 !important;
    border-top: 1px solid #e2e8f0 !important;
    border-right: 1px solid #e2e8f0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 6px 12px !important;
  }

  .scheme-rec-box * {
    color: #000000 !important;
  }

  /* UN SDG Badges */
  .sdg-badge {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
  }

  /* Brief Section dual columns printed stacked or in clear page blocks */
  .brief-section {
    display: block !important;
  }

  .brief-body {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
  }

  .brief-col {
    border: 1px solid #e2e8f0 !important;
    padding: 12px !important;
    background: #f8fafc !important;
    border-radius: 6px !important;
  }

  /* Ensure page numbers are appended at the footer */
  @page {
    size: A4 portrait;
    margin: 1.5cm;
  }
}
