/* ==========================================================================
   INKLUSIGEO.ID : DAS SERAYU HULU SPATIAL DASHBOARD
   Design System: Clean Minimalist White Theme (Aesthetics Aligned with inklusigeo.id)
   ========================================================================== */

:root {
  /* Surface & Background Palette (inklusigeo.id signature) */
  --bg-primary: #f8fafc;             /* Slate 50 container background */
  --bg-secondary: #ffffff;           /* Crisp pure white */
  --bg-card: #ffffff;                /* Pure white card surface */
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.94);

  --border-subtle: #e2e8f0;          /* Subtle light grey border */
  --border-hover: #cbd5e1;
  --border-focus: #0f7d5b;

  /* Typography Colors */
  --text-main: #0f172a;              /* Slate 900 primary dark ink */
  --text-muted: #475569;             /* Slate 600 secondary text */
  --text-dim: #64748b;               /* Slate 500 captions/metadata */

  /* InklusiGeo Brand Signature Colors */
  --brand: #0f7d5b;                  /* Emerald brand primary */
  --brand-light: #10b981;            /* Vibrant emerald */
  --brand-deep: #0a5c43;             /* Dark forest emerald */
  --brand-tint: #ecfdf5;             /* Pale emerald badge background */
  --brand-glow: rgba(16, 185, 129, 0.2);

  /* Functional Accents */
  --cyan-accent: #0284c7;            /* Hydro blue */
  --cyan-bg: #f0f9ff;
  
  --emerald: #059669;
  --emerald-bg: #ecfdf5;
  
  --amber: #d97706;
  --amber-bg: #fffbeb;
  
  --crimson: #dc2626;
  --crimson-bg: #fef2f2;

  --purple: #7c3aed;
  --purple-bg: #f5f3ff;

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Elevation & Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-float: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

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

html, body {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.app-header {
  height: 68px;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 1000;
  position: relative;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* InklusiGeo Official Brand Link */
.brand-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  user-select: none;
  flex-shrink: 0;
}

.brand-link:hover {
  transform: translateY(-1px);
}

.brand-emblem {
  height: 42px;
  width: auto;
  max-width: 42px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(15, 125, 91, 0.18));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand-link:hover .brand-emblem {
  transform: scale(1.05);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: #0f172a;                 /* Black ink for high contrast */
  letter-spacing: -0.03em;
}

.brand-dot {
  color: var(--brand);             /* InklusiGeo Emerald */
  transition: text-shadow 0.2s ease;
}

.brand-link:hover .brand-dot {
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.brand-sub {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.01em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Switcher Buttons (Executive vs Analyst) */
.view-switcher {
  display: flex;
  background: #f1f5f9;
  padding: 0.25rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.switcher-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.switcher-btn:hover {
  color: var(--text-main);
}

.switcher-btn.active {
  background: #ffffff;
  color: var(--brand);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Action Buttons */
.action-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.story-btn {
  background: var(--purple-bg);
  color: var(--purple);
  border-color: rgba(124, 58, 237, 0.2);
}

.story-btn:hover {
  background: #ede9fe;
  border-color: rgba(124, 58, 237, 0.35);
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.15);
}

.chat-trigger-btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 125, 91, 0.25);
}

.chat-trigger-btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 12px rgba(15, 125, 91, 0.35);
  transform: translateY(-1px);
}

/* ==========================================================================
   KPI Banner
   ========================================================================== */

.kpi-banner {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
  padding: 1.15rem 1.5rem;
  background-color: #f8fafc;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.kpi-card {
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 20px;
  padding: 1.25rem 1.4rem;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 10px -2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kpi-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.07), 0 4px 8px -2px rgba(15, 23, 42, 0.03);
}

.kpi-card[data-metric="aoi"]:hover {
  border-color: rgba(2, 132, 199, 0.4);
}

.kpi-card[data-metric="pelanggaran"]:hover {
  border-color: rgba(220, 38, 38, 0.4);
}

.kpi-card[data-metric="lereng"]:hover {
  border-color: rgba(217, 119, 6, 0.4);
}

.kpi-card[data-metric="rehabilitasi"]:hover {
  border-color: rgba(15, 125, 91, 0.4);
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.kpi-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.kpi-badge {
  font-size: 0.7rem;
  padding: 0.25rem 0.7rem;
  border-radius: 9999px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.kpi-badge.neutral {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.kpi-badge.red {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fee2e2;
}

.kpi-badge.amber {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fef3c7;
}

.kpi-badge.green {
  background: #ecfdf5;
  color: #0f7d5b;
  border: 1px solid #d1fae5;
}

.kpi-value {
  font-family: var(--font-heading);
  font-size: 1.95rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.kpi-value .unit {
  font-size: 0.92rem;
  font-weight: 600;
  color: #94a3b8;
  margin-left: 0.2rem;
}

.kpi-subtext {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.5;
}

.kpi-subtext strong {
  color: #0f172a;
  font-weight: 600;
}

/* ==========================================================================
   Workspace Grid (Map + Side Analytics)
   ========================================================================== */

.main-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 68px);
  min-height: 0;
  overflow: hidden;
}

.workspace-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 430px;
  min-height: 0;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Map Section */
.map-section {
  position: relative;
  height: 100%;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}

.map-view {
  width: 100%;
  height: 100%;
  background: #e2e8f0;
}

/* Map Overlays */
.map-overlay-controls {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.overlay-panel {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #eef2f6;
  border-radius: 16px;
  padding: 0.85rem 1.15rem;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.08), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
}

.panel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.panel-heading {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand);
  margin-bottom: 0;
}

.btn-panel-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-panel-action:hover {
  background: #f1f5f9;
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.floating-pill-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid #e2e8f0;
  border-radius: 9999px;
  padding: 0.45rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-main);
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.12), 0 2px 4px -1px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 500;
}

.floating-pill-toggle:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: 0 8px 20px -2px rgba(15, 23, 42, 0.16);
}

.floating-pill-toggle.legend-pill {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
}

.active-count-badge {
  background: var(--brand);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.1rem 0.42rem;
  border-radius: 9999px;
  line-height: 1;
}

.overlay-panel.hidden,
.map-legend.hidden,
.floating-pill-toggle.hidden {
  display: none !important;
}

.layer-item {
  margin-bottom: 0.4rem;
}

.layer-item label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}

.layer-item input[type="checkbox"] {
  accent-color: var(--brand);
  cursor: pointer;
}

.layer-item label:hover {
  color: var(--text-main);
}

.basemap-panel {
  display: flex;
  padding: 0.3rem;
  gap: 0.3rem;
  background: #f1f5f9;
  border-radius: 12px;
}

.bm-btn {
  flex: 1;
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 0.35rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bm-btn.active {
  background: #ffffff;
  color: var(--brand);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Legend */
.map-legend {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 500;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #eef2f6;
  border-radius: 16px;
  padding: 0.9rem 1.2rem;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.08), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
  max-width: 320px;
}

.legend-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.5rem;
}

.legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 0.8rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.legend-line {
  width: 16px;
  height: 0px;
  flex-shrink: 0;
}

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

/* Kabupaten Pill Badge on Map */
.kab-badge {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border: 1.5px solid #d97706;
  border-radius: 9999px;
  padding: 3px 10px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  color: #92400e;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kab-badge:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}

.kab-badge.wonosobo {
  border-color: #0284c7;
  color: #0369a1;
}

/* Story Tour Floating Controller */
.story-controller {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 600;
  width: 90%;
  max-width: 580px;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.story-controller.hidden {
  display: none;
}

.story-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 20px;
  padding: 1.35rem 1.6rem;
  box-shadow: 0 20px 35px -8px rgba(124, 58, 237, 0.12), 0 10px 20px -3px rgba(0, 0, 0, 0.06);
}

.story-step-badge {
  display: inline-block;
  background: var(--purple-bg);
  color: var(--purple);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  margin-bottom: 0.4rem;
}

.story-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.story-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.story-nav {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

.nav-tour-btn {
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.45rem 0.95rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-tour-btn:hover {
  background: #e2e8f0;
}

.nav-tour-btn.primary {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

.nav-tour-btn.close {
  background: transparent;
  color: var(--text-dim);
  border: none;
}

/* ==========================================================================
   Right Panel: Analytics Aside
   ========================================================================== */

.analytics-aside {
  background: #ffffff;
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.aside-tabs {
  flex-shrink: 0;
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  background: #f8fafc;
  z-index: 10;
}

.aside-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.85rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.aside-tab:hover {
  color: var(--text-main);
}

.aside-tab.active {
  color: var(--brand);
  background: #ffffff;
  border-bottom-color: var(--brand);
}

.tab-pane {
  display: none;
  padding: 0.8rem 1rem;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.tab-pane.active {
  display: flex;
}

.tab-pane::-webkit-scrollbar {
  width: 5px;
}

.tab-pane::-webkit-scrollbar-track {
  background: #f8fafc;
}

.tab-pane::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

.tab-pane::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.pane-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 700;
}

.pane-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.35;
  margin-top: -0.15rem;
}

.pane-header-box {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.view-segmented-control {
  display: flex;
  background: #f1f5f9;
  border-radius: 9px;
  padding: 0.2rem;
  gap: 0.2rem;
}

.seg-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 7px;
  padding: 0.35rem 0.5rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
}

.seg-btn:hover {
  color: var(--text-main);
}

.seg-btn.active {
  background: #ffffff;
  color: var(--brand);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.chart-container {
  height: 150px;
  position: relative;
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  padding: 0.45rem 0.7rem;
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.04);
  transition: all 0.25s ease;
}

.chart-container.full-view {
  height: 180px;
}

.traj-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  flex-shrink: 0;
}

.stat-pill {
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 9px;
  padding: 0.35rem 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.sp-header {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

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

.sp-dot.pos { background: #059669; }
.sp-dot.neg { background: #0284c7; }
.sp-dot.warning { background: #d97706; }

.sp-title {
  font-size: 0.63rem;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-body {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.15rem;
}

.sp-val {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.sp-val.pos { color: #059669; }
.sp-val.neg { color: #0284c7; }
.sp-val.warning { color: #d97706; }

.sp-badge {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 0.08rem 0.25rem;
  border-radius: 4px;
  white-space: nowrap;
}

.sp-badge.pos { background: #ecfdf5; color: #059669; }
.sp-badge.neg { background: #f0f9ff; color: #0284c7; }
.sp-badge.warning { background: #fffbeb; color: #d97706; }

.hidden {
  display: none !important;
}

.chart-container-half {
  height: 215px;
  position: relative;
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 14px;
  padding: 0.65rem 0.85rem;
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.04);
  flex-shrink: 0;
}

/* Data Table */
.data-table-wrapper {
  overflow-x: hidden;
  border-radius: 14px;
  border: 1px solid #eef2f6;
  background: #ffffff;
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.04);
  flex-shrink: 0;
}

.metric-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.72rem;
  text-align: left;
}

.metric-table th {
  background: #f8fafc;
  padding: 0.42rem 0.45rem;
  font-weight: 700;
  font-size: 0.66rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.metric-table td {
  padding: 0.38rem 0.45rem;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-main);
}

.metric-table tr:hover td {
  background-color: #f8fafc;
}

.metric-table tr:last-child td {
  border-bottom: none;
}

.traj-class-cell {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

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

.traj-dot.forest { background: #059669; }
.traj-dot.agrico { background: #d97706; }
.traj-dot.shrub  { background: #eab308; }
.traj-dot.built  { background: #475569; }
.traj-dot.mono   { background: #b45309; }

.t-name {
  display: block;
  font-size: 0.71rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.15;
}

.t-sub {
  display: block;
  font-size: 0.6rem;
  color: var(--text-muted);
  line-height: 1.05;
}

.num-val {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #334155;
  font-size: 0.7rem;
}

.text-right {
  text-align: right;
}

.delta-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.12rem 0.35rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.64rem;
  font-variant-numeric: tabular-nums;
}

.delta-chip.pos {
  background: #ecfdf5;
  color: #059669;
}

.delta-chip.neg {
  background: #fef2f2;
  color: #dc2626;
}

.metric-table td.pos { color: #059669; font-weight: 600; }
.metric-table td.neg { color: #dc2626; font-weight: 600; }

/* Summary Boxes */
.summary-box-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.summary-box {
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  padding: 0.75rem 0.95rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
  transition: all 0.2s ease;
}

.summary-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -3px rgba(15, 23, 42, 0.06);
}

.summary-box.alert {
  border-color: #fee2e2;
  background: linear-gradient(180deg, #fffafa, #ffffff);
}

.summary-box.warning {
  border-color: #fef3c7;
  background: linear-gradient(180deg, #fffdf7, #ffffff);
}

.summary-box.critical {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff5f5, #ffffff);
}

.s-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.summary-box.alert .s-title { color: #dc2626; }
.summary-box.warning .s-title { color: #b45309; }
.summary-box.critical .s-title { color: #b91c1c; }

.s-desc {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Policy Cards */
.policy-card {
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 14px;
  padding: 0.9rem 1.05rem;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.04);
  margin-bottom: 0.75rem;
}

.policy-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -3px rgba(15, 23, 42, 0.07);
}

.policy-card.p1:hover { border-color: rgba(220, 38, 38, 0.4); }
.policy-card.p2:hover { border-color: rgba(217, 119, 6, 0.4); }
.policy-card.p3:hover { border-color: rgba(15, 125, 91, 0.4); }
.policy-card.p-monev:hover { border-color: rgba(124, 58, 237, 0.4); }

.p-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}

.p-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
}

.p-badge.red { background: #fef2f2; color: #dc2626; border: 1px solid #fee2e2; }
.p-badge.orange { background: #fffbeb; color: #b45309; border: 1px solid #fef3c7; }
.p-badge.green { background: #ecfdf5; color: #0f7d5b; border: 1px solid #d1fae5; }
.p-badge.purple { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }

.p-loc {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.policy-card h4 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.policy-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ==========================================================================
   AI Chatbot Drawer
   ========================================================================== */

.chatbot-drawer {
  position: fixed;
  top: 68px;
  right: 0;
  width: 430px;
  height: calc(100vh - 68px);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--border-subtle);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.08);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.chatbot-drawer.closed {
  transform: translateX(100%);
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
}

.chat-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(15, 125, 91, 0.3);
}

.chat-title-group h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 700;
}

.chat-title-group p {
  font-size: 0.7rem;
  color: var(--brand);
  font-weight: 600;
}

.chat-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.chat-close-btn:hover {
  color: var(--text-main);
}

/* Quick Prompts */
.quick-prompts {
  display: flex;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-subtle);
  background: #f8fafc;
  scrollbar-width: none;
}

.quick-prompts::-webkit-scrollbar {
  display: none;
}

.prompt-chip {
  white-space: nowrap;
  background: var(--brand-tint);
  border: 1px solid rgba(15, 125, 91, 0.2);
  color: var(--brand-deep);
  padding: 0.35rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.prompt-chip:hover {
  background: #d1fae5;
  border-color: var(--brand);
}

/* Chat Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #fafaf9;
}

.message {
  display: flex;
  flex-direction: column;
  max-width: 88%;
  font-size: 0.8rem;
  line-height: 1.5;
  animation: fadeIn 0.2s ease;
}

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

.message.user-msg {
  align-self: flex-end;
}

.message.user-msg .msg-content {
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff;
  border-radius: 14px 14px 2px 14px;
  padding: 0.65rem 0.95rem;
  box-shadow: 0 2px 6px rgba(15, 125, 91, 0.2);
}

.message.bot-msg,
.message.system-msg {
  align-self: flex-start;
}

.message.bot-msg .msg-content,
.message.system-msg .msg-content {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: 14px 14px 14px 2px;
  padding: 0.75rem 0.95rem;
  box-shadow: var(--shadow-sm);
}

.message.bot-msg .msg-content strong {
  color: var(--brand-deep);
}

.chat-input-bar {
  padding: 0.85rem 1rem;
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 0.5rem;
}

.chat-input-bar input {
  flex: 1;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  color: var(--text-main);
  font-size: 0.8rem;
  outline: none;
  font-family: var(--font-body);
}

.chat-input-bar input:focus {
  border-color: var(--brand);
  background: #ffffff;
}

.btn-send {
  background: var(--brand);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-send:hover {
  background: var(--brand-light);
  transform: scale(1.05);
}

/* ==========================================================================
   Executive View Layout Tweak
   ========================================================================== */

body.executive-mode .analytics-aside {
  display: none;
}

body.executive-mode .workspace-grid {
  grid-template-columns: 1fr;
}

/* Utility */
.hidden {
  display: none !important;
}

/* Header Inklusi Button */
.inklusi-btn {
  background: #f1f5f9;
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.inklusi-btn:hover {
  background: #e2e8f0;
  color: var(--brand);
  border-color: var(--border-hover);
}

/* ==========================================================================
   BERANDA / HOME VIEW STYLING (InklusiGeo.id Design Language)
   Solid borders, clean editorial contrast, no AI dashline patterns
   ========================================================================== */

.home-view {
  flex: 1;
  height: calc(100vh - 68px);
  overflow-y: auto;
  overflow-x: hidden;
  background-color: #f8fafc;
  color: var(--text-main);
  scroll-behavior: smooth;
}

/* --- Hero Section --- */
.home-hero {
  position: relative;
  background-color: #0b132b;
  background-image: 
    linear-gradient(to right, #0b132b 0%, rgba(11, 19, 43, 0.95) 42%, rgba(11, 19, 43, 0.4) 75%, rgba(11, 19, 43, 0.8) 100%),
    linear-gradient(to bottom, rgba(11, 19, 43, 0.4) 0%, transparent 35%, rgba(11, 19, 43, 0.95) 100%),
    url('assets/hero-overlay.webp');
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  color: #ffffff;
  padding: 4.5rem 2rem 4.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.hero-inner {
  max-width: 1140px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-announcement {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 9999px;
  padding: 0.35rem 1rem;
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  display: inline-block;
  box-shadow: 0 0 8px #10b981;
}

.hero-announcement-text {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #a7f3d0;
  font-family: var(--font-body);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #ffffff;
  max-width: 980px;
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
  max-width: 880px;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.g-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8rem 1.6rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.925rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.g-btn-primary {
  background: #059669;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.g-btn-primary:hover {
  background: #047857;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.45);
}

.g-btn-secondary {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.g-btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.g-btn-outline {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.g-btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

/* ==========================================================================
   Unified Connected Rail (Modern Seamless Metric Bar)
   Single continuous glass container with internal hairline dividers
   ========================================================================== */
.hero-rail-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.hero-rail-item {
  padding: 1.5rem 1.6rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background-color 0.25s ease;
  position: relative;
}

.hero-rail-item:last-child {
  border-right: none;
}

.hero-rail-item:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

.rail-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 0.85rem;
}

/* Micro Status Pill Badges */
.rail-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.65rem;
  border-radius: 9999px;
  text-transform: uppercase;
}

.rail-tag.neutral {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.rail-tag.danger {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.rail-tag.warning {
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.rail-tag.success {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.tag-dot.red {
  background-color: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.7);
}

.tag-dot.amber {
  background-color: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.7);
}

.tag-dot.green {
  background-color: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
}

.rail-number {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 0.45rem;
}

.rail-unit {
  font-size: 0.95rem;
  font-weight: 600;
  color: #94a3b8;
  margin-left: 0.15rem;
}

.rail-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 0.25rem;
  line-height: 1.35;
}

.rail-desc {
  font-size: 0.775rem;
  color: #94a3b8;
  line-height: 1.45;
}

/* --- Section General Styling --- */
.home-section {
  padding: 5rem 2rem;
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.home-section.bg-alt {
  background-color: #f8fafc;
}

.home-section.bg-dark {
  background: linear-gradient(135deg, #0b132b 0%, #0f172a 100%);
  color: #ffffff;
}

.section-container {
  max-width: 1140px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 3.5rem;
}

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #059669;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.15rem;
  font-weight: 800;
  line-height: 1.25;
  color: #0f172a;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1rem;
  line-height: 1.65;
  color: #475569;
}

/* --- Story Cards Grid --- */
.story-grid-three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.story-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2rem 1.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -2px rgba(0, 0, 0, 0.02);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.story-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.story-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  border: 1px solid #e2e8f0;
}

.story-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 0.85rem;
}

.story-card-text {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.65;
}

/* --- Disclaimer & Transparency Panel --- */
.disclaimer-panel {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 3rem 2.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.disclaimer-header {
  margin-bottom: 2.5rem;
}

.disclaimer-badge {
  display: inline-block;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 0.725rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.disclaimer-title {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.disclaimer-subtitle {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.6;
}

.disclaimer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.disclaimer-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.5rem;
}

.disclaimer-item-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.bullet-tag {
  background: #0f7d5b;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.disclaimer-item-body {
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.6;
}

/* --- Future Roadmap Grid --- */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.roadmap-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.roadmap-card:hover {
  transform: translateY(-3px);
  border-color: #059669;
  box-shadow: 0 8px 16px rgba(5, 150, 105, 0.08);
}

.roadmap-card-phase {
  font-size: 0.725rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  margin-bottom: 0.85rem;
}

.roadmap-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.roadmap-card-desc {
  font-size: 0.865rem;
  color: #475569;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.roadmap-tag {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  display: inline-block;
}

/* --- Call To Action Section --- */
.cta-banner {
  text-align: center;
  max-width: 840px;
  margin: 0 auto;
}

.cta-eyebrow {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #34d399;
  margin-bottom: 0.75rem;
}

.cta-title {
  font-family: var(--font-heading);
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 1.25rem;
}

.cta-desc {
  font-size: 1.05rem;
  color: #cbd5e1;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* --- Footer (Crisp White Theme for Maximum Brand Visibility) --- */
.home-footer {
  background-color: #ffffff;
  color: #475569;
  padding: 4.5rem 2rem 2.5rem;
  border-top: 1px solid #e2e8f0;
}

.footer-container {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid #f1f5f9;
}

.footer-brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  margin-bottom: 1.15rem;
}

.footer-logo {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 2px 6px rgba(15, 125, 91, 0.15));
}

.footer-brand-text {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
}

.footer-tagline {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #64748b;
  max-width: 480px;
  margin-bottom: 1.5rem;
}

.footer-social-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-link-pill {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #e2e8f0;
  font-size: 0.775rem;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-link-pill:hover {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.12);
  transform: translateY(-1px);
}

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-list {
  list-style: none;
  font-size: 0.875rem;
  line-height: 1.85;
  color: #64748b;
}

.footer-list li span {
  color: #0f172a;
  font-weight: 600;
}

.footer-bottom {
  max-width: 1140px;
  margin: 2rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #94a3b8;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom-links a {
  color: #64748b;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
  color: #059669;
}

.footer-bottom-links .sep {
  margin: 0 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .hero-rail-container {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-rail-item:nth-child(2) {
    border-right: none;
  }
  .hero-rail-item:nth-child(1),
  .hero-rail-item:nth-child(2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .story-grid-three {
    grid-template-columns: 1fr;
  }
  .disclaimer-grid {
    grid-template-columns: 1fr;
  }
  .roadmap-grid {
    grid-template-columns: 1fr;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-title {
    font-size: 2.15rem;
  }
}

@media (max-width: 640px) {
  .hero-rail-container {
    grid-template-columns: 1fr;
  }
  .hero-rail-item {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .hero-rail-item:last-child {
    border-bottom: none;
  }
  .hero-actions {
    flex-direction: column;
  }
  .g-btn {
    width: 100%;
  }
  .cta-buttons {
    flex-direction: column;
  }
}

/* ==========================================================================
   Protected Layer & AES-256 Passcode Auth Modal
   ========================================================================== */
.layer-item-protected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.layer-protected-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  cursor: pointer;
  margin: 0;
}

.lock-status-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid;
  flex-shrink: 0;
  line-height: 1.3;
}

.lock-status-btn.locked {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.35);
}

.lock-status-btn.locked:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: #f59e0b;
  transform: translateY(-1px);
}

.lock-status-btn.unlocked {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.35);
}

.lock-status-btn.unlocked:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: #10b981;
}

/* Modal Overlay */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(11, 19, 43, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  transition: opacity 0.25s ease;
}

.auth-modal-overlay.hidden {
  display: none;
}

.auth-modal-card {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  animation: modalEnter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: #f8fafc;
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.auth-modal-header {
  padding: 1.35rem 1.5rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  position: relative;
}

.auth-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-title-container {
  flex: 1;
}

.auth-modal-title {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.auth-modal-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 500;
}

.auth-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.auth-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.auth-modal-body {
  padding: 1.4rem 1.5rem;
}

.auth-desc {
  font-size: 0.86rem;
  line-height: 1.55;
  color: #cbd5e1;
  margin: 0 0 1.25rem;
}

.auth-input-group {
  margin-bottom: 1.2rem;
}

.auth-input-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.5rem;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrapper.shake {
  animation: shakeAuth 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shakeAuth {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

.auth-pass-input {
  width: 100%;
  padding: 0.8rem 2.75rem 0.8rem 1rem;
  background: rgba(2, 6, 23, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  color: #ffffff;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 1rem;
  letter-spacing: 0.12em;
  outline: none;
  transition: all 0.2s ease;
}

.auth-pass-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
  background: rgba(2, 6, 23, 0.95);
}

.btn-eye-toggle {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.2s;
}

.btn-eye-toggle:hover {
  color: #38bdf8;
}

.auth-feedback-msg {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  line-height: 1.4;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  font-weight: 500;
}

.auth-feedback-msg.error {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.auth-feedback-msg.success {
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.auth-info-box {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 0.9rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #bae6fd;
}

.auth-info-box svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.auth-modal-footer {
  padding: 1rem 1.5rem 1.35rem;
  background: rgba(2, 6, 23, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.btn-auth-secondary {
  padding: 0.6rem 1.15rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #cbd5e1;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-auth-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.btn-auth-primary {
  padding: 0.6rem 1.35rem;
  background: #0284c7;
  border: none;
  color: #ffffff;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.btn-auth-primary:hover {
  background: #0369a1;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.45);
}

.btn-auth-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.spinner-inline {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

