/* ==========================================================================
   #OSUNDECIDES - Citizen Election Transparency Engine v3.6
   Consensus Deduplication, Empty States & Live Collation Switcher
   ========================================================================== */

:root {
  /* Color Palette - Nigerian Green & Osun Gold */
  --emerald: #059669;
  --emerald-hover: #047857;
  --emerald-light: #ecfdf5;
  --emerald-border: #a7f3d0;
  --emerald-glow: rgba(5, 150, 105, 0.25);

  --gold: #f59e0b;
  --gold-hover: #d97706;
  --gold-light: #fffbeb;
  --gold-border: #fde68a;

  --pdp: #0284c7;
  --pdp-light: #f0f9ff;
  --pdp-border: #bae6fd;

  --apc: #10b981;
  --apc-light: #ecfdf5;
  --apc-border: #a7f3d0;

  --lp: #dc2626;
  --lp-light: #fef2f2;
  --lp-border: #fecaca;

  --wa: #25d366;
  --wa-hover: #1eb954;

  --danger: #ef4444;
  --danger-light: #fef2f2;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --success: #10b981;
  --info: #0ea5e9;

  /* Surfaces & Backgrounds */
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f1f5f9;
  --bg-dark-base: #070b12;
  --bg-dark-card: #0f172a;
  --bg-dark-elevated: #1e293b;

  --border-light: #e2e8f0;
  --border-subtle: #cbd5e1;
  --border-dark: #1e293b;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radius & Shadows */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  --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-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
}

/* Strict Zero-Overflow Resets */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: #0f172a;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Top Status Ribbon */
.top-status-bar {
  width: 100%;
  background: #070b12;
  color: #cbd5e1;
  font-size: 0.78rem;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.status-bar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(5, 150, 105, 0.2);
  color: #34d399;
  font-weight: 800;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
}

.live-dot-pulse {
  width: 6px;
  height: 6px;
  background: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 8px #34d399;
  animation: liveBlink 1.4s infinite ease-in-out;
}

@keyframes liveBlink {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.4; }
  100% { transform: scale(1); opacity: 1; }
}

.ticker-message {
  font-weight: 500;
  color: #94a3b8;
  font-size: 0.75rem;
}

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

.badge-ai {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  font-weight: 700;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
}

.badge-wa {
  background: rgba(37, 211, 102, 0.15);
  color: #4ade80;
  font-weight: 700;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  text-decoration: none;
}
.badge-wa:hover {
  background: rgba(37, 211, 102, 0.3);
}

.time-stamp {
  font-family: var(--font-mono);
  color: #64748b;
  font-size: 0.72rem;
}

/* App Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-dark);
  color: #fff;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  gap: 12px;
  flex-wrap: nowrap;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.osun-map-symbol {
  width: 42px;
  height: 42px;
  background: #0f172a;
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.brand-group:hover .osun-map-symbol {
  transform: scale(1.05);
  border-color: var(--gold);
}

.osun-map-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.4));
}

.osun-map-footer-icon {
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
}

.brand-headline {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-hash { color: #38bdf8; }
.brand-focus { color: var(--gold); }

.brand-subtitle {
  display: block;
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 500;
}

/* Nav Tabs */
.app-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: 100%;
}
.app-nav::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-tab.active {
  background: var(--emerald);
  color: #fff;
  box-shadow: 0 2px 8px var(--emerald-glow);
}

.nav-pill-badge {
  background: var(--gold);
  color: #070b12;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: var(--radius-full);
}

.nav-count-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  padding: 1px 5px;
  border-radius: var(--radius-full);
}

.nav-alert-badge {
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  padding: 1px 5px;
  border-radius: var(--radius-full);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-emerald {
  background: linear-gradient(135deg, var(--emerald) 0%, #047857 100%);
  color: #fff;
  box-shadow: 0 3px 10px var(--emerald-glow);
}
.btn-emerald:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  box-shadow: 0 5px 14px rgba(5, 150, 105, 0.4);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, #d97706 100%);
  color: #070b12;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.3);
}
.btn-gold:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #fff;
}

.btn-gold-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.btn-gold-outline:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: var(--gold);
  color: #fff;
}

.btn-secondary {
  background: #ffffff;
  color: #475569;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: var(--border-subtle);
}

.btn-danger-outline {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}
.btn-danger-outline:hover {
  background: var(--danger-light);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.78rem;
}

.btn-lg {
  padding: 12px 20px;
  font-size: 0.95rem;
}

.btn-block {
  width: 100%;
}

/* Prominent Data Mode Switcher */
.data-mode-toggle-group {
  display: inline-flex;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.data-mode-toggle-group .btn {
  border: none;
  background: transparent;
  color: #94a3b8;
  border-radius: 999px;
  box-shadow: none;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.data-mode-toggle-group .btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.data-mode-toggle-group .btn.active {
  background: #059669;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.4);
}

.data-mode-toggle-group #btn-mode-benchmark.active {
  background: #d97706;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4);
}

/* Viewport & Views */
.app-viewport {
  flex: 1;
  padding: 24px 0 56px;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

.app-view {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
  width: 100%;
}

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

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

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 14px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 16px;
}

.view-kicker {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--emerald);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #0f172a;
  line-height: 1.2;
}

.view-desc {
  color: #475569;
  font-size: 0.9rem;
  margin-top: 4px;
  max-width: 760px;
}

.view-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Telemetry Cards */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  width: 100%;
}

.telemetry-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

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

.telemetry-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.telemetry-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #64748b;
}

.telemetry-icon-circle {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.telemetry-value {
  font-size: 1.85rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #0f172a;
  line-height: 1.1;
  margin-bottom: 4px;
}

.telemetry-sub {
  font-size: 0.78rem;
  color: #475569;
  font-weight: 600;
}

.telemetry-bar-bg {
  height: 6px;
  background: var(--bg-surface-alt);
  border-radius: var(--radius-full);
  margin-top: 10px;
  overflow: hidden;
}

.telemetry-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
}

.telemetry-trend {
  font-size: 0.72rem;
  margin-top: 8px;
  font-weight: 600;
  color: #64748b;
}

.card-alert {
  background: #fff8f8;
  border-color: #fecaca;
}

.link-alert {
  color: var(--danger);
  text-decoration: none;
  font-weight: 700;
}

/* Master Race Standing Card */
.master-race-card {
  background: var(--bg-dark-card);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-dark);
}

.race-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-dark);
  padding-bottom: 12px;
  margin-bottom: 18px;
}

.race-header h3 {
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-pill-live {
  background: rgba(5, 150, 105, 0.2);
  color: #34d399;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.race-bars-wrapper {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.race-cand-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.race-cand-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
}

.race-cand-name {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-party {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
}

.badge-pdp { background: #e0f2fe; color: #0369a1; }
.badge-apc { background: #dcfce7; color: #15803d; }
.badge-lp { background: #fee2e2; color: #b91c1c; }
.badge-other { background: #f1f5f9; color: #475569; }

.race-cand-tally {
  font-family: var(--font-mono);
  font-weight: 700;
}

.race-bar-bg {
  height: 9px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.race-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s ease-in-out;
}

/* 30 LGAs Section */
.lga-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 14px;
}

.lga-section-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
}

.lga-filters-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  width: 260px;
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 0.85rem;
}

.search-box input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: #fff;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  outline: none;
}
.search-box input:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px var(--emerald-glow);
}

.select-box select, .vault-filter-selects select {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: #fff;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: #0f172a;
  outline: none;
  cursor: pointer;
}

.lga-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  width: 100%;
}

.lga-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lga-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-subtle);
}

.lga-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--bg-surface-alt);
  padding-bottom: 8px;
}

.lga-card-name {
  font-size: 1.05rem;
  font-weight: 800;
}

.lga-meta-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.badge-complete { background: #dcfce7; color: #166534; }
.badge-ongoing { background: #fef3c7; color: #92400e; }
.badge-disputed { background: #fee2e2; color: #991b1b; }
.badge-pending { background: #f1f5f9; color: #64748b; }

.lga-scores-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.lga-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.lga-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: #475569;
  border-top: 1px solid var(--bg-surface-alt);
  padding-top: 8px;
}

/* ==========================================================================
   MULTI-INPUT SUBMISSION MODE TABS (Smart Text / Photo / Voice)
   ========================================================================== */
.input-mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.mode-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  font-weight: 700;
  font-size: 0.84rem;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-tab-btn:hover {
  background: var(--bg-surface-alt);
  color: #0f172a;
}

.mode-tab-btn.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.text-parser-actions {
  margin-top: 10px;
}

/* Upload & Citizen Submission View */
.upload-layout-grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  width: 100%;
}

.panel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}

.panel-card h3 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.panel-intro {
  font-size: 0.82rem;
  color: #475569;
  margin-bottom: 14px;
}

/* Voice Submission Panel */
.voice-sub-panel {
  background: #fffdf5;
  border: 1.5px solid #fde68a;
}

.voice-recorder-ui {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.btn-voice-record-main {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 2px solid var(--gold);
  color: #b45309;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15);
}

.btn-voice-record-main:hover {
  background: #fffbeb;
}

.btn-voice-record-main.recording {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
  animation: pulseRec 1.2s infinite;
}

.voice-wave-anim {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 20px;
}

.wave-bar {
  width: 4px;
  height: 100%;
  background: var(--danger);
  border-radius: var(--radius-full);
  animation: waveMotion 0.8s infinite ease-in-out;
}
.wave-bar:nth-child(2) { animation-delay: 0.15s; }
.wave-bar:nth-child(3) { animation-delay: 0.3s; }
.wave-bar:nth-child(4) { animation-delay: 0.45s; }
.wave-bar:nth-child(5) { animation-delay: 0.6s; }

@keyframes waveMotion {
  0%, 100% { height: 6px; }
  50% { height: 22px; }
}

.or-separator {
  text-align: center;
  position: relative;
  margin: 12px 0 8px;
}
.or-separator::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: #e2e8f0;
}
.or-separator span {
  position: relative;
  background: #fffdf5;
  padding: 0 8px;
  font-size: 0.68rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.guide-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.guide-list li {
  display: flex;
  gap: 10px;
  font-size: 0.82rem;
}

.guide-list strong {
  display: block;
  font-size: 0.88rem;
  color: #0f172a;
  margin-bottom: 2px;
}

.guide-list p {
  color: #475569;
  font-size: 0.78rem;
  line-height: 1.4;
}

.guide-icon {
  font-size: 1.15rem;
  margin-top: 2px;
}

.form-container-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-md);
}

.form-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 14px;
  border-bottom: 1px solid var(--bg-surface-alt);
  padding-bottom: 8px;
}

.form-section-head:first-child {
  margin-top: 0;
}

.step-num {
  width: 24px;
  height: 24px;
  background: var(--emerald);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
}

.form-section-head h4 {
  font-size: 1rem;
  font-weight: 800;
}

.form-section-head small {
  color: #64748b;
  font-size: 0.75rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

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

.form-field label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
}

.req {
  color: var(--danger);
}

.app-input {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: #fff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: #0f172a;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.app-input:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px var(--emerald-glow);
}

.file-upload-zone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  background: var(--bg-surface-alt);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  margin-bottom: 12px;
}

.file-upload-zone:hover {
  border-color: var(--emerald);
  background: var(--emerald-light);
}

.file-hidden-input {
  display: none;
}

.drop-icon-wrap {
  font-size: 2.2rem;
  color: var(--emerald);
  margin-bottom: 6px;
}

.drop-zone-prompt h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.drop-zone-prompt p {
  font-size: 0.78rem;
  color: #475569;
  margin-bottom: 6px;
}

.drop-badge {
  font-size: 0.68rem;
  background: rgba(5, 150, 105, 0.12);
  color: var(--emerald);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.drop-zone-preview {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.drop-zone-preview img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.preview-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  padding: 6px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hash-tag {
  font-size: 0.68rem;
  color: #38bdf8;
}

.btn-remove-photo {
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: var(--radius-xs);
  padding: 3px 6px;
  font-size: 0.68rem;
  cursor: pointer;
}

.ai-ocr-status-bar {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.party-scores-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.score-input-card {
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.party-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.party-label small {
  font-size: 0.68rem;
  color: #475569;
  font-weight: 600;
}

.party-pdp-card { background: var(--pdp-light); border: 1px solid var(--pdp-border); }
.party-apc-card { background: var(--apc-light); border: 1px solid var(--apc-border); }
.party-lp-card { background: var(--lp-light); border: 1px solid var(--lp-border); }
.party-other-card { background: #f8fafc; border: 1px solid var(--border-light); }

.score-input {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  text-align: center;
  padding: 6px;
}

.checksum-result-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-light);
  margin-bottom: 20px;
}

.checksum-result-box.valid {
  background: var(--emerald-light);
  border-color: var(--emerald-border);
  color: #065f46;
}

.checksum-result-box.invalid {
  background: var(--danger-light);
  border-color: #fecaca;
  color: #991b1b;
}

.checksum-icon {
  font-size: 1.5rem;
}

.checksum-title {
  font-weight: 800;
  font-size: 0.9rem;
}

.checksum-desc {
  font-size: 0.78rem;
}

/* Batch Ingestion Styles */
.batch-layout-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.batch-dropzone-card {
  background: #ffffff;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.batch-dropzone-card:hover {
  border-color: var(--emerald);
  background: var(--emerald-light);
}

.batch-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
}

.batch-drop-inner h3 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.batch-drop-inner p {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 12px;
}

.batch-status-panel {
  display: flex;
  flex-direction: column;
}

.batch-status-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.batch-queue-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
}

.batch-item-row {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: var(--bg-surface-alt);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.batch-item-meta h4 {
  font-size: 0.88rem;
  font-weight: 800;
}

.batch-item-meta p {
  font-size: 0.76rem;
  color: #475569;
}

/* ==========================================================================
   EMPTY STATE STYLING ACROSS ALL MODULES
   ========================================================================== */
.empty-state-card {
  background: var(--bg-surface);
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-xl);
  padding: 48px 24px;
  text-align: center;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.empty-state-icon.empty-emerald { background: var(--emerald-light); color: var(--emerald); }
.empty-state-icon.empty-gold { background: var(--gold-light); color: var(--gold); }
.empty-state-icon.empty-info { background: #e0f2fe; color: #0284c7; }
.empty-state-icon.empty-danger { background: var(--danger-light); color: var(--danger); }

.empty-state-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.empty-state-desc {
  font-size: 0.85rem;
  color: #64748b;
  max-width: 520px;
  line-height: 1.5;
}

.empty-state-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Parity Split View */
.parity-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.parity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.parity-pu-select {
  flex: 1;
  max-width: 500px;
}

.parity-pu-select label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 4px;
}

.parity-split-view {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.parity-pane {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
}

.pane-head {
  margin-bottom: 10px;
}

.pane-head h4 {
  font-size: 0.9rem;
  font-weight: 800;
}

.pane-img-box {
  background: #0f172a;
  border-radius: var(--radius-sm);
  height: 260px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.pane-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.pane-scores {
  font-size: 0.8rem;
  color: #0f172a;
  background: #fff;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-light);
}

.parity-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.pf-info {
  font-size: 0.82rem;
}

/* Incidents Feed */
.incidents-layout-grid {
  display: grid;
  grid-template-columns: 1.4fr minmax(0, 1fr);
  gap: 24px;
  width: 100%;
}

.incident-filter-bar {
  margin-bottom: 14px;
}

.incidents-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.incident-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.incident-card.inc-high {
  border-left: 4px solid var(--danger);
  background: #fff8f8;
}

.incident-card.inc-med {
  border-left: 4px solid var(--warning);
  background: #fffdf5;
}

.inc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inc-title {
  font-weight: 800;
  font-size: 0.9rem;
}

.inc-desc {
  font-size: 0.82rem;
  color: #475569;
}

.inc-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #64748b;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 6px;
  margin-top: 2px;
}

.hotspot-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--bg-surface-alt);
}
.hotspot-item:last-child {
  border-bottom: none;
}

/* Database Architecture Schema Cards */
.db-schema-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.db-table-card {
  background: #0f172a;
  border-radius: var(--radius-md);
  border: 1px solid #1e293b;
  padding: 14px;
}

.db-table-head {
  border-bottom: 1px solid #334155;
  padding-bottom: 8px;
  margin-bottom: 10px;
  font-weight: 700;
}

.db-field-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #94a3b8;
}

.db-field-list li {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.04);
}

.db-field-list li span {
  color: #38bdf8;
}

.mb-4 {
  margin-bottom: 20px;
}

/* Open API Console */
.api-console-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
}

.api-endpoint-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.endpoint-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.badge-get {
  background: #0284c7;
  color: #fff;
  font-weight: 800;
  font-size: 0.68rem;
  padding: 2px 5px;
  border-radius: var(--radius-xs);
}

.code-box {
  background: #0f172a;
  border-radius: var(--radius-md);
  padding: 12px;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  max-height: 200px;
  overflow-y: auto;
}

/* Evidence Vault View */
.vault-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}

.vault-search {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.vault-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
}

.vault-search input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  outline: none;
}
.vault-search input:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px var(--emerald-glow);
}

.vault-filter-selects {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.vault-card-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.evidence-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.82rem;
}

.evidence-table th {
  background: var(--bg-surface-alt);
  padding: 10px 14px;
  font-weight: 800;
  color: #475569;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.evidence-table td {
  padding: 14px;
  border-bottom: 1px solid var(--bg-surface-alt);
  vertical-align: middle;
}

.evidence-table tr:hover {
  background: #f8fafc;
}

.btn-inspect-table {
  background: #ffffff;
  border: 1px solid var(--border-light);
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: var(--shadow-sm);
}
.btn-inspect-table:hover {
  background: var(--emerald);
  color: #fff;
  border-color: var(--emerald);
}

/* Fraud Radar View */
.radar-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  width: 100%;
}

.radar-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.radar-box h3 {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: var(--font-mono);
  margin: 8px 0 4px;
}

.badge-danger { background: #fee2e2; color: var(--danger); font-size: 0.68rem; font-weight: 800; padding: 2px 6px; border-radius: 4px; }
.badge-warning { background: #fef3c7; color: #d97706; font-size: 0.68rem; font-weight: 800; padding: 2px 6px; border-radius: 4px; }
.badge-info { background: #e0f2fe; color: #0284c7; font-size: 0.68rem; font-weight: 800; padding: 2px 6px; border-radius: 4px; }
.badge-gold { background: #fffbeb; color: #b45309; font-size: 0.68rem; font-weight: 800; padding: 2px 6px; border-radius: 4px; }

.anomaly-ledger-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.anomaly-ledger-head {
  border-bottom: 1px solid var(--bg-surface-alt);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

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

.anomaly-item {
  border: 1px solid #fecaca;
  background: #fff8f8;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.anomaly-meta h4 {
  font-size: 0.9rem;
  font-weight: 800;
  color: #991b1b;
}

.anomaly-meta p {
  font-size: 0.78rem;
  color: #7f1d1d;
  margin-top: 2px;
}

/* Modals */
.app-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.app-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 11, 18, 0.85);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  background: #ffffff;
  width: 90%;
  max-width: 980px;
  max-height: 90vh;
  border-radius: var(--radius-xl);
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.modal-card.modal-sm {
  max-width: 500px;
}

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

.modal-badge {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--emerald);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: #64748b;
  cursor: pointer;
}

.modal-body-grid {
  display: grid;
  grid-template-columns: 1.1fr minmax(0, 1fr);
  padding: 20px 22px;
  gap: 22px;
}

.modal-image-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.image-controls {
  display: flex;
  gap: 6px;
}

.btn-img-ctrl {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-light);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
}
.btn-img-ctrl:hover {
  background: var(--emerald);
  color: #fff;
}

.image-viewport-wrapper {
  background: #0f172a;
  border-radius: var(--radius-md);
  height: 380px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inspect-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.inspect-img.inverted {
  filter: invert(1) contrast(1.4);
}

.modal-data-pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.proof-card, .tally-breakdown-card {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
}

.proof-card h4, .tally-breakdown-card h4 {
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.proof-row {
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
  margin-bottom: 6px;
}

.proof-label {
  font-weight: 700;
  color: #475569;
}

.proof-val {
  word-break: break-all;
}

.tally-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.t-met {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
}

.t-met-lbl {
  display: block;
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 700;
}

.t-met strong {
  font-family: var(--font-mono);
  font-size: 1.05rem;
}

.party-pills-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #0f172a;
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  animation: slideInToast 0.3s ease;
  border-left: 4px solid var(--emerald);
}

@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Footer */
.app-footer {
  background: var(--bg-dark-base);
  color: #94a3b8;
  border-top: 1px solid var(--border-dark);
  padding: 48px 0 0;
  margin-top: auto;
  width: 100%;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-bottom: 40px;
}

.footer-brand p {
  font-size: 0.82rem;
  line-height: 1.6;
  margin-top: 10px;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 14px;
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.8rem;
}
.footer-col a:hover {
  color: #fff;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(5, 150, 105, 0.15);
  color: #34d399;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  margin-top: 12px;
}

.footer-bottom-bar {
  border-top: 1px solid var(--border-dark);
  padding: 16px 0;
  font-size: 0.75rem;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Helpers */
.text-emerald { color: var(--emerald) !important; }
.text-gold { color: var(--gold) !important; }
.text-pdp { color: var(--pdp) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: #64748b !important; }
.text-xs { font-size: 0.65rem; }
.text-sm { font-size: 0.78rem; }
.font-mono { font-family: var(--font-mono); }
.bg-emerald { background: var(--emerald); }
.bg-emerald-light { background: var(--emerald-light); }
.bg-gold-light { background: var(--gold-light); }
.bg-pdp-light { background: var(--pdp-light); }
.bg-danger-light { background: var(--danger-light); }

/* Responsive Breakpoints */
@media (max-width: 1200px) {
  .app-nav {
    max-width: 580px;
  }
  .btn-sm-resp span {
    display: none;
  }
}

@media (max-width: 1024px) {
  .telemetry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .upload-layout-grid,
  .batch-layout-grid,
  .parity-split-view,
  .incidents-layout-grid,
  .api-console-grid,
  .db-schema-grid,
  .modal-body-grid {
    grid-template-columns: 1fr;
  }
  .radar-summary-grid {
    grid-template-columns: 1fr;
  }
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
    padding: 8px 0;
    gap: 8px;
  }
  
  /* Sticky Horizontal Nav Bar with Scroll Indicator Shadow */
  .app-nav {
    order: 3;
    width: 100%;
    max-width: 100%;
    margin-top: 4px;
    padding: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    gap: 4px;
    background: rgba(15, 23, 42, 0.95);
    border-radius: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
  }
  .app-nav::-webkit-scrollbar {
    display: block;
    height: 3px;
  }
  .app-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.25);
    border-radius: 4px;
  }
  
  .nav-tab {
    padding: 8px 12px;
    font-size: 0.76rem;
    flex-shrink: 0;
  }

  .view-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 18px;
  }
  
  .view-title {
    font-size: 1.35rem;
  }

  /* Full-width Responsive Mode Switcher */
  .view-controls {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .data-mode-toggle-group {
    width: 100%;
    display: flex;
    border-radius: 12px;
    padding: 3px;
    box-sizing: border-box;
  }

  .data-mode-toggle-group .btn {
    flex: 1;
    justify-content: center;
    padding: 9px 8px;
    font-size: 0.78rem;
    white-space: nowrap;
    border-radius: 9px;
  }

  .telemetry-grid,
  .party-scores-grid,
  .form-grid-3,
  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .search-box,
  .lga-filters-toolbar,
  .vault-filter-selects,
  .select-box,
  .vault-filter-selects select {
    width: 100%;
  }

  .modal-card {
    width: 95%;
    max-height: 94vh;
  }
}

@media (max-width: 480px) {
  .top-status-bar {
    font-size: 0.68rem;
    padding: 4px 0;
  }
  
  .top-status-bar .ticker-message {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
  }

  .status-actions {
    display: none;
  }

  .brand-headline {
    font-size: 0.95rem;
  }

  .brand-subtitle {
    font-size: 0.62rem;
  }

  .data-mode-toggle-group .btn {
    font-size: 0.72rem;
    padding: 8px 4px;
    gap: 4px;
  }

  .data-mode-toggle-group .btn span {
    font-size: 0.72rem;
  }

  .telemetry-value {
    font-size: 1.35rem;
  }

  .btn {
    padding: 7px 10px;
    font-size: 0.75rem;
  }
}

/* Inline Historical Baseline Context Banner */
.historical-alert-banner {
  background: linear-gradient(135deg, #1e1302 0%, #2a1b05 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-left: 4px solid #f59e0b;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  animation: fadeIn 0.3s ease-in-out;
}

.historical-alert-banner .hab-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.historical-alert-banner .hab-content {
  flex: 1;
}

.historical-alert-banner .hab-content strong {
  display: block;
  font-size: 0.82rem;
  color: #fbbf24;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.historical-alert-banner .hab-content p {
  margin: 0;
  font-size: 0.78rem;
  color: #e2e8f0;
  line-height: 1.45;
}

.historical-alert-banner .btn {
  flex-shrink: 0;
  white-space: nowrap;
  background: #f59e0b;
  color: #000;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.historical-alert-banner .btn:hover {
  background: #d97706;
}

@media (max-width: 768px) {
  .historical-alert-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
  }
  .historical-alert-banner .btn {
    width: 100%;
    justify-content: center;
  }
}


/* =============================================================================
   MISSION CTA BANNER — Submit View
   ============================================================================= */
.mission-cta-banner {
  background: linear-gradient(135deg, #0a1628 0%, #0d2137 60%, #0a1e2e 100%);
  border: 1px solid rgba(5, 150, 105, 0.3);
  border-radius: 16px;
  padding: 36px 40px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}

.mission-cta-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #059669, #34d399, #059669);
}

.mission-cta-inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.mission-cta-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #34d399;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.mission-cta-kicker::before {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.25);
  animation: pulse-green 1.5s ease-in-out infinite;
}

.mission-cta-headline {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin: 0 0 10px 0;
}

.mission-cta-body {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.65;
  margin: 0;
  max-width: 680px;
}

.mission-cta-body strong {
  color: #fff;
  font-weight: 700;
}

/* 3-step flow */
.mission-cta-steps {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cta-step {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px 16px;
  flex: 1;
  min-width: 160px;
}

.cta-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #059669;
  color: #fff;
  font-weight: 900;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cta-step-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  line-height: 1.3;
}

.cta-step-arrow {
  color: rgba(52, 211, 153, 0.6);
  font-size: 1rem;
  flex-shrink: 0;
}

/* Trust badges row */
.mission-cta-trust {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.mission-cta-trust span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.3px;
}

.mission-cta-trust span i {
  color: #34d399;
  font-size: 0.75rem;
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.25); }
  50% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.08); }
}

@media (max-width: 768px) {
  .mission-cta-banner { padding: 24px 20px; }
  .mission-cta-headline { font-size: 1.25rem; }
  .mission-cta-steps { flex-direction: column; }
  .cta-step-arrow { transform: rotate(90deg); }
  .cta-step { min-width: unset; width: 100%; }
  .mission-cta-trust { gap: 12px; }
}

