/* ==========================================================================
   Dental Caries Discrete Event Simulation (DES) Platform
   Light Theme with Soft Pastel Shades & Professional Design
   ========================================================================== */

:root {
  /* Typography */
  --font-display: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Canvas & Backgrounds */
  --bg-main: #f3f2ef;           /* Canvas warm light-grey */
  --bg-card: #ffffff;           /* Clean white card surface */
  --bg-card-hover: #fafafa;
  --bg-header: #ffffff;
  --bg-input: #ffffff;
  --bg-subtle: #f8f9fa;
  --bg-hover-subtle: #f3f6f8;

  /* Borders & Dividers */
  --border-color: #e0e0e0;
  --border-subtle: #eaeaea;
  --border-focus: #0a66c2;

  /* Typography Colors */
  --text-main: #191919;         /* High-contrast deep slate/black */
  --text-muted: #575757;        /* Secondary label grey */
  --text-dim: #717171;          /* Tertiary / placeholder */

  /* Brand Colors */
  --primary: #0a66c2;           /* Blue */
  --primary-hover: #004182;
  --primary-light: #378fe9;
  --primary-glow: rgba(10, 102, 194, 0.16);

  /* Soft Pastel Shades (Semantic Accents) */
  --pastel-blue-bg: #e7f3ff;
  --pastel-blue-text: #0a66c2;
  --pastel-blue-border: #cce4ff;

  --pastel-green-bg: #e6f4ea;
  --pastel-green-text: #137333;
  --pastel-green-border: #ceead6;

  --pastel-amber-bg: #fef7e0;
  --pastel-amber-text: #b06000;
  --pastel-amber-border: #feefc3;

  --pastel-coral-bg: #fce8e6;
  --pastel-coral-text: #c5221f;
  --pastel-coral-border: #fad2cf;

  --pastel-purple-bg: #f3e8fd;
  --pastel-purple-text: #7627bb;
  --pastel-purple-border: #e8d0fb;

  --pastel-cyan-bg: #e4f7f6;
  --pastel-cyan-text: #007b74;
  --pastel-cyan-border: #cbf0ee;

  /* Clinical Intervention Pastel Palette */
  --c-ohe: #2563eb;      /* Oral Health Education (Blue) */
  --c-fv: #10b981;       /* Fluoride Varnish (Emerald) */
  --c-art: #f59e0b;      /* ART (Amber) */
  --c-ssc: #8b5cf6;      /* Stainless Steel Crowns (Purple) */
  --c-pulp: #ef4444;     /* Pulpectomy (Red) */
  --c-gic: #ec4899;      /* GIC / Composite (Pink) */
  --c-scale: #06b6d4;    /* Scaling (Cyan) */
  --c-adm: #64748b;      /* Admission NVA (Slate) */

  /* Shadows (Card Style) */
  --shadow-sm: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 3px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 0 0 1px rgba(0, 0, 0, 0.10), 0 8px 24px rgba(0, 0, 0, 0.10);
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-full: 9999px;
  --transition: all 0.18s ease-in-out;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

/* App Container */
.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* Top Navigation Bar */
.top-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 20px;
  box-shadow: 0 2px 4px rgba(10, 102, 194, 0.25);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #191919;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Country Selector Control */
.country-selector-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  flex-shrink: 0;
}
.country-selector-wrap:hover,
.country-selector-wrap:focus-within {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.country-selector-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.country-dropdown {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

/* Nav Actions (Two-Row Organized Layout) */
.nav-actions-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.nav-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.nav-actions-row-top {
  justify-content: flex-end;
}

.nav-actions-row-bottom {
  justify-content: flex-end;
}

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

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--pastel-blue-bg);
  color: var(--pastel-blue-text);
  border: 1px solid var(--pastel-blue-border);
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-green {
  background: var(--pastel-green-bg);
  color: var(--pastel-green-text);
  border-color: var(--pastel-green-border);
}

.badge-amber {
  background: var(--pastel-amber-bg);
  color: var(--pastel-amber-text);
  border-color: var(--pastel-amber-border);
}

.badge-coral {
  background: var(--pastel-coral-bg);
  color: var(--pastel-coral-text);
  border-color: var(--pastel-coral-border);
}

.badge-purple {
  background: var(--pastel-purple-bg);
  color: var(--pastel-purple-text);
  border-color: var(--pastel-purple-border);
}

/* Info 'i' Button */
.info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--pastel-blue-bg);
  color: var(--primary);
  border: 1px solid var(--pastel-blue-border);
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
  margin-left: 6px;
  vertical-align: middle;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}
.info-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: scale(1.15);
  box-shadow: 0 2px 5px rgba(10, 102, 194, 0.3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.35;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  background: #ffffff;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-secondary:hover {
  background: var(--pastel-blue-bg);
  border-color: var(--primary-hover);
}

.btn-outline {
  background: #ffffff;
  color: var(--text-muted);
  border-color: var(--border-color);
}
.btn-outline:hover {
  background: var(--bg-hover-subtle);
  color: var(--text-main);
  border-color: #b0b0b0;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 0.77rem;
}

/* Segmented Tabs Navigation */
.tabs-navigation {
  display: flex;
  gap: 6px;
  background: #ffffff;
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
  scrollbar-width: thin;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-hover-subtle);
}
.tab-btn.active {
  background: var(--primary);
  color: #ffffff;
}

/* Tab Panels */
.tab-panel {
  display: none;
  animation: fadeIn 0.2s ease forwards;
}
.tab-panel.active {
  display: block;
}

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

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  margin-bottom: 20px;
}
.card:hover {
  box-shadow: var(--shadow-md);
}

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

.card-title {
  font-size: 1.08rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #191919;
}

.card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* KPI Banner Grid - Balanced 6-Column Responsive Layout */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 1280px) {
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.kpi-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
}
.kpi-card.green::before { background: #10b981; }
.kpi-card.amber::before { background: #f59e0b; }
.kpi-card.rose::before { background: #ef4444; }
.kpi-card.purple::before { background: #8b5cf6; }

.kpi-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  color: #191919;
  line-height: 1.1;
  margin-bottom: 6px;
}

.kpi-subtext {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Feasibility Tiers Cards */
.tiers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.tier-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.tier-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.tier-card.active {
  border-color: var(--primary);
  background: #fbfdff;
  box-shadow: 0 0 0 2px var(--primary-glow), var(--shadow-sm);
}

.tier-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.tier-name {
  font-size: 1rem;
  font-weight: 700;
  color: #191919;
}

.tier-specs {
  font-size: 0.77rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.tier-metric-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.81rem;
}
.tier-metric-row .val {
  font-weight: 700;
  color: #191919;
}

.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: #eef2f6;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 10px 0 8px;
}
.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* Control Sliders Panel */
.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-top: 12px;
}

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

.control-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}
.control-value-badge {
  color: var(--primary);
  font-weight: 700;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: #e0e0e0;
  border-radius: var(--radius-full);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s ease;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* ==========================================================================
   ANIMATED CAMP SIMULATOR & UPGRADED GANTT TIMELINE
   ========================================================================== */

/* Animation Control Bar */
.sim-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

/* Live Scenario & Camp Operational Sliders Panel */
.camp-sliders-panel {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
}

.camp-sliders-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.camp-sliders-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.camp-tier-quick-picks {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-camp-tier.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.sim-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-clock-display {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--pastel-blue-bg);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--pastel-blue-border);
}

.speed-selector-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.speed-chip {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 1px solid var(--border-color);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 700;
  transition: var(--transition);
}
.speed-chip.active, .speed-chip:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Zoom View Selector */
.timeline-zoom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.zoom-btn-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.zoom-btn {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.zoom-btn.active, .zoom-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Gantt Legend with Color Flags */
.gantt-legend-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: 0.76rem;
}

.legend-flag-item {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}
.legend-flag-item:hover {
  background: var(--bg-hover-subtle);
}
.legend-flag-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Timeline Container & Multi-Track */
.timeline-container {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  position: relative;
}

.timeline-header-hours {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
  margin-bottom: 12px;
  margin-left: 170px;
  font-size: 0.72rem;
  color: var(--text-dim);
  position: relative;
}

.timeline-hour-mark {
  flex: 1;
  text-align: left;
}

.timeline-row {
  display: flex;
  align-items: center;
  height: 48px;
  border-bottom: 1px dashed #e2e8f0;
  position: relative;
}

.timeline-server-label {
  width: 170px;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  color: #191919;
}

.timeline-track {
  flex: 1;
  height: 36px;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  border: 1px solid #edf2f7;
  position: relative;
  overflow: hidden;
}

/* Timeline Playhead / Current Time Line */
.timeline-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ef4444;
  z-index: 20;
  pointer-events: none;
  transition: left 0.1s linear;
}
.timeline-playhead::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
}

/* Gantt Block */
.timeline-block {
  position: absolute;
  top: 2px;
  bottom: 2px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 0.68rem;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.1s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.timeline-block:hover {
  transform: scaleY(1.1);
  filter: brightness(1.12);
  z-index: 15;
}
.timeline-block.highlight {
  box-shadow: 0 0 0 2px #0a66c2, 0 2px 8px rgba(10, 102, 194, 0.4);
  filter: brightness(1.2);
}

/* Milestone Flags */
.timeline-flag {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  border-left: 1px dashed #ef4444;
  z-index: 12;
  pointer-events: none;
}
.timeline-flag-label {
  position: absolute;
  top: -18px;
  transform: translateX(-50%);
  background: var(--pastel-coral-bg);
  color: var(--pastel-coral-text);
  border: 1px solid var(--pastel-coral-border);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Live Camp Event Log */
.camp-event-log {
  max-height: 180px;
  overflow-y: auto;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.78rem;
  font-family: 'Courier New', Courier, monospace;
  margin-top: 14px;
  scrollbar-width: thin;
}
.log-entry {
  padding: 3px 0;
  border-bottom: 1px solid #edf2f7;
}
.log-entry .time {
  color: var(--primary);
  font-weight: 700;
}

/* Flowchart Visual Pipeline */
.flowchart-pipeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  overflow-x: auto;
  margin-top: 14px;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  min-width: 140px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.flow-step.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.flow-step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--pastel-blue-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.flow-step-title {
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.flow-step-desc {
  font-size: 0.69rem;
  color: var(--text-dim);
}

.flow-arrow {
  color: #a0aec0;
  font-size: 1.1rem;
}

/* Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: #ffffff;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: left;
  white-space: nowrap;
}

table.data-table th {
  background: #f8f9fa;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  user-select: none;
}

table.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  color: #191919;
}
table.data-table tr:hover td {
  background: #f3f6f8;
}

/* Table Toolbar */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  min-width: 260px;
}
.search-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}
.search-input-wrap input {
  background: transparent;
  border: none;
  outline: none;
  color: #191919;
  font-size: 0.84rem;
  width: 100%;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.form-input {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: #191919;
  font-family: var(--font-body);
  font-size: 0.86rem;
  outline: none;
  transition: var(--transition);
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active {
  display: flex;
}

.modal-dialog {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 24px;
  position: relative;
  animation: modalPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-dialog-wide {
  max-width: 920px;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.4rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close-btn:hover {
  background: #f0f0f0;
  color: #191919;
}

/* Explainer Popover Content */
.explainer-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}
.explainer-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--pastel-blue-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.explainer-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #191919;
}
.explainer-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--pastel-amber-bg);
  color: var(--pastel-amber-text);
  font-weight: 600;
}
.explainer-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 12px 0;
  font-size: 0.84rem;
  line-height: 1.5;
}
.explainer-box strong {
  color: var(--primary);
}

/* Figures Gallery Grid */
.figure-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 20px;
}

.figure-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.figure-card:hover {
  box-shadow: var(--shadow-md);
}

.figure-img-wrap {
  background: #ffffff;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
}
.figure-img-wrap img {
  max-width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
}

.figure-caption {
  padding: 16px;
}
.figure-title {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: #191919;
}
.figure-text {
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Math block */
.math-block {
  background: #f8fafc;
  border-left: 3px solid var(--primary);
  padding: 10px 16px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 10px 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.86rem;
  color: #0369a1;
  overflow-x: auto;
}

/* How to Use Guide Steps */
.guide-step-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid var(--border-color);
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.guide-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pastel-blue-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.guide-step-content h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: #191919;
}
.guide-step-content p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 1050px) {
  .top-navbar {
    flex-wrap: wrap;
    padding: 10px 16px;
  }
  .nav-actions-container {
    width: 100%;
    align-items: flex-start;
    margin-top: 4px;
  }
  .nav-actions-row {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}
@media (max-width: 900px) {
  .top-navbar {
    flex-direction: column;
    align-items: stretch;
  }
  .nav-actions-container {
    align-items: stretch;
  }
  .nav-actions-row {
    justify-content: flex-start;
  }
}
@media (max-width: 600px) {
  .app-container {
    padding: 0 10px 40px;
  }
  .figure-gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   2D DISCRETE EVENT SIMULATION (DES) FACILITY & CLINIC ROOM VISUALIZER
   ========================================================================== */

.des-facility-card {
  margin-bottom: 20px;
}

.facility-status-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stat-pill {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.78rem;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-pill strong {
  color: #0f172a;
}

.facility-floorplan {
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  gap: 16px;
  margin: 16px 0;
}

@media (max-width: 1100px) {
  .facility-floorplan {
    grid-template-columns: 1fr;
  }
}

.facility-zone {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.zone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.zone-reception {
  background: #fafbfc;
  border-color: #cbd5e1;
}

.zone-discharge {
  background: #f0fdf4;
  border-color: var(--pastel-green-border);
}

.treatment-bays-cluster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.zone-triage {
  border-left: 4px solid #8b5cf6;
}

.zone-dentist {
  border-left: 4px solid var(--primary);
  background: #fcfdfe;
}

.zone-aux-fv {
  border-left: 4px solid #10b981;
  background: #fcfdfd;
}

.zone-teacher {
  border-left: 4px solid #06b6d4;
  background: #fcfdfd;
}

.resource-status-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.status-busy {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}
.status-busy::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #16a34a;
  border-radius: 50%;
  animation: pulse-dot 1.2s infinite;
}

.status-busy-clinical {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}
.status-busy-clinical::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #dc2626;
  border-radius: 50%;
  animation: pulse-dot 1.2s infinite;
}

.status-idle {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
.status-idle::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #94a3b8;
  border-radius: 50%;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.workstation-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.station-queue-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.73rem;
  color: var(--text-dim);
  background: #f8fafc;
  padding: 4px 8px;
  border-radius: 4px;
}

.mini-queue-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 22px;
  align-items: center;
}

.provider-avatar-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.provider-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.provider-icon.dent-avatar {
  background: var(--pastel-blue-bg);
  color: var(--primary);
  border: 1px solid var(--pastel-blue-border);
}

.provider-icon.aux-avatar {
  background: var(--pastel-green-bg);
  color: var(--pastel-green-text);
  border: 1px solid var(--pastel-green-border);
}

.provider-icon.teach-avatar {
  background: var(--pastel-teal-bg);
  color: var(--pastel-teal-text);
  border: 1px solid var(--pastel-teal-border);
}

.provider-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: #1e293b;
}

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

.current-patient-box {
  background: #f8fafc;
  border: 1px dashed var(--border-color);
  border-radius: 6px;
  padding: 10px;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.current-patient-box.active-patient {
  background: #ffffff;
  border: 1px solid var(--primary);
  box-shadow: 0 1px 3px rgba(10, 102, 194, 0.1);
}

.patient-placeholder {
  font-size: 0.75rem;
  font-style: italic;
  color: #94a3b8;
  text-align: center;
}

.patient-active-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.patient-tag {
  font-size: 0.76rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 5px;
}

.proc-progress-wrap {
  width: 100%;
  height: 5px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 4px;
}

.proc-progress-bar {
  height: 100%;
  background: var(--primary);
  transition: width 0.2s linear;
}

.student-queue-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px 2px;
}

.student-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-full);
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.student-chip:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: var(--primary);
}

.student-chip.age-primary {
  border-color: #93c5fd;
  color: #1e40af;
}

.student-chip.age-upper {
  border-color: #c4b5fd;
  color: #5b21b6;
}

.student-chip.age-secondary {
  border-color: #6ee7b7;
  color: #065f46;
}

.student-chip.chip-done {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}

.des-insight-banner {
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.82rem;
  color: #1e3a8a;
  line-height: 1.5;
}

.insight-icon {
  font-size: 1.1rem;
  color: var(--primary);
  margin-top: 2px;
}

/* ==========================================================================
   NATIONAL POLICY OVERVIEW BANNER (PLAIN ENGLISH FOR CLINICIANS & POLICYMAKERS)
   ========================================================================== */
.executive-policy-banner {
  background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
  border: 1px solid #bfdbfe;
  border-left: 5px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(10, 102, 194, 0.06);
}

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

.policy-banner-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.policy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  background: #dbeafe;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.tier-badge-pill {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.policy-live-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 3px 9px;
  border-radius: var(--radius-full);
}

.policy-briefing-body {
  margin-bottom: 16px;
}

.policy-briefing-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #1e293b;
  font-weight: 450;
}

.policy-briefing-text strong {
  font-weight: 700;
  color: #0f172a;
}

.policy-key-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.policy-highlight-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.highlight-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.highlight-icon.blue { background: #dbeafe; color: #1d4ed8; }
.highlight-icon.green { background: #d1fae5; color: #047857; }
.highlight-icon.purple { background: #ede9fe; color: #6d28d9; }
.highlight-icon.amber { background: #fef3c7; color: #b45309; }

.highlight-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.highlight-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.highlight-val {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2px;
}

/* Control sublabel */
.control-sublabel {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
  margin-bottom: 2px;
}

/* ==========================================================================
   DYNAMIC CLINICAL WORKFLOW & BOTTLENECK ALERT (FOR DENTISTS & DOCTORS)
   ========================================================================== */
.clinic-alert-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 16px;
  border: 1px solid transparent;
  transition: var(--transition);
}

.clinic-alert-icon {
  font-size: 1.3rem;
  line-height: 1;
  padding-top: 2px;
  flex-shrink: 0;
}

.clinic-alert-content {
  flex: 1;
}

.clinic-alert-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.clinic-alert-text {
  font-size: 0.82rem;
  line-height: 1.5;
  color: inherit;
  opacity: 0.95;
}

.clinic-alert-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
}

/* Three Alert States */
.clinic-alert-box.clinic-alert-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #14532d;
}
.clinic-alert-box.clinic-alert-success .clinic-alert-icon { color: #16a34a; }
.clinic-alert-box.clinic-alert-success .clinic-alert-badge {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.clinic-alert-box.clinic-alert-warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #78350f;
}
.clinic-alert-box.clinic-alert-warning .clinic-alert-icon { color: #d97706; }
.clinic-alert-box.clinic-alert-warning .clinic-alert-badge {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
}

.clinic-alert-box.clinic-alert-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e3a8a;
}
.clinic-alert-box.clinic-alert-info .clinic-alert-icon { color: #2563eb; }
.clinic-alert-box.clinic-alert-info .clinic-alert-badge {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}

/* ==========================================================================
   COMPREHENSIVE HOW TO USE GUIDE STYLES
   ========================================================================== */
.guide-nav-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 4px 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 10;
  scrollbar-width: thin;
}

.guide-nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
  transition: var(--transition);
  cursor: pointer;
}

.guide-nav-pill:hover, .guide-nav-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 4px rgba(10, 102, 194, 0.2);
}

.guide-section {
  margin-bottom: 28px;
  scroll-margin-top: 60px;
}

.guide-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid var(--border-color);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.guide-section-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-section-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--pastel-blue-bg);
  color: var(--primary);
  border: 1px solid var(--pastel-blue-border);
}

.guide-card-inner {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.guide-card-inner h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-card-inner p {
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 8px;
}

.guide-card-inner ul, .guide-card-inner ol {
  padding-left: 20px;
  font-size: 0.83rem;
  color: #334155;
  line-height: 1.6;
  margin-bottom: 10px;
}

.guide-card-inner li {
  margin-bottom: 6px;
}

.guide-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.guide-kpi-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px;
}

.guide-kpi-item-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.guide-kpi-item-desc {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.5;
}

.guide-kpi-item-math {
  font-size: 0.73rem;
  font-family: monospace;
  color: var(--primary);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 8px;
}

.guide-action-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 12px 0;
}

.guide-action-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #166534;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.guide-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: #e2e8f0;
  color: #334155;
  margin: 2px 4px 2px 0;
}

/* ==========================================================================
   Visual De-cluttering & Usability Optimization Elements
   ========================================================================== */

/* 1. Segmented Sub-Navigation Bar (Tab 2 Multi-View Architecture) */
.subnav-segmented-tabs {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 6px;
  border-radius: var(--radius-md);
  margin: 18px 0 16px 0;
  border: 1px solid var(--border-color);
}

.subnav-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #475569;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s ease;
}

.subnav-btn:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.7);
}

.subnav-btn.active {
  color: var(--primary);
  background: #ffffff;
  font-weight: 700;
  border-color: #cbd5e1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.subnav-btn .subnav-count-badge {
  font-size: 0.72rem;
  background: #e2e8f0;
  color: #334155;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.subnav-btn.active .subnav-count-badge {
  background: var(--pastel-blue-bg);
  color: var(--primary);
}

/* 2. Collapsible Camp Sliders Drawer */
.camp-sliders-panel {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 14px;
  padding: 12px 16px;
  transition: all 0.2s ease;
}

.camp-sliders-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.collapsible-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.collapsible-toggle-btn:hover {
  background: #edf2f7;
  color: var(--primary);
}

.collapsible-toggle-btn .toggle-icon {
  font-size: 0.75rem;
  transition: transform 0.25s ease;
  color: var(--text-muted);
}

.camp-sliders-panel.collapsed .camp-sliders-body {
  display: none !important;
}

.camp-sliders-panel.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

.camp-sliders-panel.collapsed {
  padding: 10px 16px;
  background: #fdfdfd;
}

/* 3. Quick-Click Zonal Filter Pills for Subnational Disaggregation (Tab 4) */
.zonal-pills-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border-subtle);
}

.zonal-pill-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 4px;
}

.zonal-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease;
}

.zonal-pill:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.zonal-pill.active {
  background: var(--pastel-blue-bg);
  color: var(--primary);
  border-color: var(--pastel-blue-border);
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(10, 102, 194, 0.1);
}

.zonal-pill .pill-badge {
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.08);
  padding: 1px 6px;
  border-radius: 10px;
}

.zonal-pill.active .pill-badge {
  background: rgba(10, 102, 194, 0.2);
  color: var(--primary);
}

/* 4. Table Scroll Container with Sticky Headers */
.table-scroll-container {
  max-height: 460px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.table-scroll-container .data-table thead th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 5. Clean Heatmap Matrix Styling (Tab 5) */
#heatmapTableBody td {
  transition: background-color 0.15s ease;
}

#heatmapTableBody tr:hover td {
  filter: brightness(0.97);
}



