/* ==========================================================================
   HABIS Aid — TN 108 Real-Time Emergency CAD & AI Auto-Dispatch Engine v5.0
   High-Contrast Clinical UI, Smooth Screen Transitions & Biometric Loader
   ========================================================================== */

:root {
  --navy-950: #060b16;
  --navy-900: #0f172a;
  --navy-800: #1e293b;
  --navy-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;

  --coral-600: #e11d48;
  --coral-700: #be123c;
  --coral-100: #ffe4e6;
  --coral-50: #fff1f2;

  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-100: #fef3c7;
  --amber-50: #fffbeb;

  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --teal-100: #ccfbf1;
  --teal-50: #f0fdfa;

  --purple-600: #7c3aed;
  --purple-50: #f5f3ff;

  --blue-600: #2563eb;
  --blue-50: #eff6ff;

  --radius-sm: 7px;
  --radius-md: 11px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.09);
  --shadow-lg: 0 18px 38px rgba(15, 23, 42, 0.18);

  --font-sans: 'Inter', 'Noto Sans Tamil', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100vh;
  background: radial-gradient(circle at top right, #e2e8f0 0%, #f1f5f9 55%, #f8fafc 100%);
  color: var(--navy-900);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.48;
  -webkit-font-smoothing: antialiased;
}

.font-mono { font-family: var(--font-mono); }
.text-center { text-align: center; }
.text-teal { color: var(--teal-600); font-weight: 700; }
.hidden { display: none !important; }

/* ==========================================================================
   1. Safety & Clinical Protocol Banner
   ========================================================================== */
.safety-banner {
  background: var(--navy-950);
  color: var(--slate-200);
  padding: 7px 22px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 8px;
}

.safety-banner__left,
.safety-banner__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.safety-banner__text strong { color: var(--white); }

.badge-pill {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.badge-pill--red {
  background: var(--coral-600);
  color: var(--white);
}

.badge-pill--teal {
  background: var(--teal-50);
  color: var(--teal-700);
  border: 1px solid var(--teal-600);
}

.telemetry-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5eead4;
}

.telemetry-clock {
  font-family: var(--font-mono);
  color: var(--white);
  font-weight: 600;
}

.divider-pipe { color: var(--navy-700); }

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.pulse-dot--teal {
  background: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.25);
}

.pulse-dot--coral {
  background: var(--coral-600);
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.3);
  animation: pulseDot 1.6s infinite;
}

.pulse-dot--amber {
  background: var(--amber-600);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.25);
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.75; }
}

/* ==========================================================================
   2. Top Header & Step Switcher
   ========================================================================== */
.top-header {
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(10px);
  color: var(--white);
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 4px 16px rgba(6, 11, 22, 0.28);
  position: sticky;
  top: 0;
  z-index: 1000;
  flex-wrap: wrap;
}

.top-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--navy-800);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
}

.brand-subbadge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(20, 184, 166, 0.2);
  color: #5eead4;
  border: 1px solid rgba(20, 184, 166, 0.4);
}

.security-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--slate-300);
}

.brand-subtitle {
  font-size: 12px;
  color: var(--slate-400);
}

.screen-nav {
  display: flex;
  align-items: center;
  background: var(--navy-950);
  padding: 5px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  gap: 6px;
}

.screen-nav__connector {
  color: var(--slate-400);
  font-weight: 700;
  font-size: 14px;
  padding: 0 2px;
}

.screen-tab {
  background: transparent;
  color: var(--slate-300);
  border: none;
  padding: 8px 15px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.screen-tab:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.screen-tab.active {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: var(--white);
  border: 1px solid rgba(20, 184, 166, 0.5);
  box-shadow: 0 2px 10px rgba(20, 184, 166, 0.2);
}

.screen-tab__num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-family: var(--font-mono);
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.screen-tab.active .screen-tab__num {
  background: var(--teal-600);
  color: var(--white);
}

.screen-tab__counter {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.22);
  color: #5eead4;
}

.top-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  font-size: 13px;
  padding: 8px 14px;
}

.btn--flow-nav {
  background: rgba(20, 184, 166, 0.16);
  color: #5eead4;
  border-color: rgba(20, 184, 166, 0.45);
}

.btn--flow-nav:hover {
  background: rgba(20, 184, 166, 0.3);
  color: var(--white);
}

.btn--primary-new {
  background: var(--coral-600);
  color: var(--white);
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(225, 29, 72, 0.35);
}

.btn--primary-new:hover {
  background: var(--coral-700);
}

.btn--gps-live {
  background: var(--teal-600);
  color: var(--white);
  font-size: 12.5px;
  padding: 7px 13px;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.28);
}

.btn--gps-live:hover {
  background: var(--teal-700);
}

.btn--navy-sm {
  background: var(--navy-900);
  color: var(--white);
  padding: 8px 14px;
  white-space: nowrap;
}

.btn--navy-sm:hover {
  background: var(--navy-800);
}

.btn--ghost-sm {
  background: var(--white);
  border: 1px solid var(--slate-300);
  color: var(--slate-600);
  padding: 5px 10px;
  font-size: 12px;
}

/* ==========================================================================
   3. Creative Biometric ECG & Satellite Transition Overlay
   ========================================================================== */
.transition-loader {
  position: fixed;
  inset: 0;
  background: rgba(6, 11, 22, 0.92);
  backdrop-filter: blur(10px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeInOverlay 0.25s ease;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

.transition-loader__card {
  background: linear-gradient(180deg, #0f172a 0%, #090e1a 100%);
  border: 1px solid rgba(20, 184, 166, 0.4);
  border-radius: 20px;
  padding: 32px 36px;
  max-width: 640px;
  width: 100%;
  text-align: center;
  color: var(--white);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 40px rgba(13, 148, 136, 0.2);
}

.loader-radar-wrap {
  position: relative;
  width: 78px;
  height: 78px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #14b8a6;
  animation: radarExpand 1.8s infinite ease-out;
}

.radar-ring--2 {
  animation-delay: 0.7s;
  border-color: var(--coral-600);
}

@keyframes radarExpand {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.65); opacity: 0; }
}

.radar-core {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--coral-600);
  color: var(--white);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(225, 29, 72, 0.6);
  z-index: 2;
}

.ecg-monitor {
  background: rgba(6, 11, 22, 0.85);
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: 10px;
  height: 76px;
  margin-bottom: 18px;
  overflow: hidden;
  position: relative;
}

.ecg-svg {
  width: 100%;
  height: 100%;
}

.ecg-grid-line {
  stroke: rgba(148, 163, 184, 0.15);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.ecg-wave {
  fill: none;
  stroke: #14b8a6;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawEcg 1.6s linear infinite;
  filter: drop-shadow(0 0 6px rgba(20, 184, 166, 0.8));
}

@keyframes drawEcg {
  0% { stroke-dashoffset: 1000; }
  100% { stroke-dashoffset: 0; }
}

.loader-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #5eead4;
  display: block;
  margin-bottom: 6px;
}

.loader-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.loader-subtitle {
  font-size: 13px;
  color: var(--slate-300);
  margin-bottom: 18px;
}

.loader-progress-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 18px;
}

.loader-progress-bar {
  height: 100%;
  width: 15%;
  background: linear-gradient(90deg, #14b8a6 0%, #e11d48 100%);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.loader-steps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  text-align: left;
}

.loader-step {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--slate-400);
  transition: all 0.2s ease;
}

.loader-step.active {
  background: rgba(20, 184, 166, 0.16);
  border-color: rgba(20, 184, 166, 0.5);
  color: #5eead4;
  font-weight: 700;
}

/* ==========================================================================
   4. Screen Transitions & Screen 1 Focused Intake Layout
   ========================================================================== */
.workspace-screen {
  display: none;
  padding: 18px 22px 36px;
  max-width: 1660px;
  margin: 0 auto;
  animation: screenSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.workspace-screen.active {
  display: block;
}

@keyframes screenSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.intake-hero-bar {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.status-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 4px;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 4px;
}

.status-tag--live {
  background: var(--navy-900);
  color: #5eead4;
}

.status-tag--teal {
  background: var(--teal-700);
  color: var(--white);
}

.screen-heading {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  color: var(--navy-900);
}

.screen-subheading {
  font-size: 13px;
  color: var(--slate-600);
  max-width: 820px;
  margin-top: 2px;
}

.preset-selector-card {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  min-width: 340px;
}

.preset-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 4px;
}

/* Two-Panel Focused Intake Grid */
.intake-two-panels {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 20px;
  align-items: start;
}

.card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.card-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  gap: 12px;
}

.card-header--compact {
  padding: 12px 16px;
}

.section-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--teal-700);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  color: var(--navy-900);
}

.intake-panel__body {
  padding: 18px 20px;
}

.form-error-banner {
  background: var(--coral-50);
  border: 1.5px solid var(--coral-600);
  color: var(--coral-700);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 700;
}

.form-section {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--slate-200);
}

.form-section--last {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.form-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 10px;
  flex-wrap: wrap;
}

.form-section__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-900);
}

.form-section__subtext {
  font-size: 12px;
  color: var(--slate-500);
}

.live-priority-preview {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--coral-100);
  color: var(--coral-700);
  border: 1px solid var(--coral-600);
}

.form-row {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.form-row:last-child { margin-bottom: 0; }
.form-row--2col { grid-template-columns: 1fr 1fr; }
.form-row--3col { grid-template-columns: 1.15fr 1.15fr 0.7fr; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
}

.form-group label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--navy-800);
}

.req { color: var(--coral-600); }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--slate-300);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--navy-900);
  background: var(--white);
  transition: all 0.15s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.16);
}

.form-input.input-invalid,
.form-select.input-invalid {
  border-color: var(--coral-600);
  background: var(--coral-50);
}

.form-input--sm,
.form-select--sm {
  padding: 6px 10px;
  font-size: 12.5px;
}

.form-select--xs {
  padding: 4px 8px;
  font-size: 12px;
  width: auto;
}

.field-error {
  display: none;
  font-size: 11.5px;
  color: var(--coral-600);
  font-weight: 700;
}

.field-error.visible { display: block; }

.number-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stepper-btn {
  width: 34px;
  height: 38px;
  border: 1.5px solid var(--slate-300);
  background: var(--slate-50);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

/* Primary Triage Observations */
.triage-obs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.obs-box {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
}

.obs-box__label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 6px;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.seg-btn {
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--slate-300);
  background: var(--white);
  color: var(--slate-600);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.seg-btn.active {
  background: var(--navy-900);
  color: var(--white);
  border-color: var(--navy-900);
}

.seg-btn--warn.active {
  background: var(--amber-600);
  border-color: var(--amber-700);
  color: var(--white);
}

.seg-btn--crit.active {
  background: var(--coral-600);
  border-color: var(--coral-700);
  color: var(--white);
}

/* Clinical Symptom Chips */
.symptom-search-wrap { width: 250px; }

.symptom-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 8px;
}

.symptom-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--slate-200);
  background: var(--white);
  cursor: pointer;
  text-align: left;
  transition: all 0.14s ease;
}

.symptom-chip:hover {
  border-color: var(--slate-400);
  transform: translateY(-1px);
}

.symptom-chip__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 6px;
}

.symptom-chip__en {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--navy-900);
}

.symptom-chip__ta {
  font-size: 11.5px;
  color: var(--slate-600);
  margin-top: 2px;
}

.symptom-chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.symptom-chip[data-severity="Critical"] .symptom-chip__dot { background: var(--coral-600); }
.symptom-chip[data-severity="High"] .symptom-chip__dot { background: var(--amber-600); }
.symptom-chip[data-severity="Standard"] .symptom-chip__dot { background: var(--teal-600); }

.symptom-chip.selected[data-severity="Critical"] {
  border-color: var(--coral-600);
  background: var(--coral-50);
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.12);
}

.symptom-chip.selected[data-severity="High"] {
  border-color: var(--amber-600);
  background: var(--amber-50);
}

.symptom-chip.selected[data-severity="Standard"] {
  border-color: var(--teal-600);
  background: var(--teal-50);
}

/* Real Geocoder Search Bar & Dropdown */
.geocode-search-bar {
  display: flex;
  gap: 8px;
}

.geocode-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border: 1.5px solid var(--navy-900);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 1200;
  max-height: 210px;
  overflow-y: auto;
  margin-top: 4px;
}

.geocode-item {
  padding: 9px 12px;
  border-bottom: 1px solid var(--slate-200);
  font-size: 12.5px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.geocode-item:hover {
  background: var(--teal-50);
}

.geocode-item strong {
  color: var(--navy-900);
}

.geocode-item span {
  font-size: 11px;
  color: var(--slate-500);
}

.landmark-presets-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.landmark-presets-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--slate-500);
}

.landmark-pill {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--slate-300);
  background: var(--slate-50);
  color: var(--navy-800);
  cursor: pointer;
}

.landmark-pill.active {
  background: var(--navy-900);
  color: var(--white);
  border-color: var(--navy-900);
}

.intake-map-wrapper {
  border: 1.5px solid var(--slate-300);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
}

.intake-map {
  height: 255px;
  width: 100%;
  background: #e2e8f0;
}

.gis-telemetry-strip {
  background: var(--navy-900);
  color: var(--white);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11.5px;
}

.gis-label {
  color: var(--slate-400);
  font-weight: 700;
  font-size: 10px;
  margin-right: 5px;
}

.gis-val { font-weight: 600; }
.gis-val--teal { color: #5eead4; }

/* Primary Submit & Launch Box */
.intake-submit-box {
  background: linear-gradient(180deg, #fff1f2 0%, #ffffff 100%);
  border: 1.5px solid rgba(225, 29, 72, 0.35);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.safety-check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  color: var(--navy-900);
  margin-bottom: 12px;
}

.safety-check-row input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--teal-600);
}

.btn--launch-dispatch {
  width: 100%;
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  color: var(--white);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: none;
  box-shadow: 0 8px 22px rgba(225, 29, 72, 0.35);
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn--launch-dispatch:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(225, 29, 72, 0.48);
}

.btn-launch__icon {
  font-size: 24px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-launch__text {
  display: flex;
  flex-direction: column;
}

.btn-launch__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.btn-launch__sub {
  font-size: 12px;
  color: var(--coral-100);
}

/* ==========================================================================
   5. Screen 2: Fleet Breakdown Cards & Auto-Dispatch Banner
   ========================================================================== */
.fleet-tier-header {
  margin-bottom: 16px;
}

.fleet-tier-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

.hub-top-bar__left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn--back-intake {
  background: var(--navy-900);
  color: var(--white);
  padding: 9px 15px;
  font-size: 13px;
}

.clinical-ref-pill {
  background: var(--teal-50);
  border: 1px solid var(--teal-600);
  color: var(--teal-700);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
}

.fleet-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.tier-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-top: 4px solid var(--navy-900);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}

.tier-card--als { border-top-color: var(--coral-600); }
.tier-card--bls { border-top-color: var(--teal-600); }
.tier-card--neo { border-top-color: var(--purple-600); }
.tier-card--bike { border-top-color: var(--amber-600); }
.tier-card--er { border-top-color: var(--blue-600); }

.tier-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.tier-card__badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  color: var(--slate-600);
}

.tier-card__icon { font-size: 18px; }

.tier-card__counts {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}

.tier-card__avail {
  font-size: 26px;
  font-weight: 800;
  color: var(--navy-900);
}

.tier-card__total {
  font-size: 12px;
  font-weight: 600;
  color: var(--slate-500);
}

.tier-card__equip {
  font-size: 11.5px;
  color: var(--slate-600);
}

/* Auto-Dispatch Highlight Banner */
.auto-dispatch-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: var(--white);
  border: 1.5px solid rgba(20, 184, 166, 0.55);
  border-radius: var(--radius-lg);
  padding: 15px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-md);
}

.auto-dispatch-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #5eead4;
  margin-bottom: 4px;
}

.auto-dispatch-headline {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
}

.auto-dispatch-sub {
  font-size: 12.5px;
  color: var(--slate-300);
  margin-top: 2px;
}

.auto-dispatch-banner__right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.override-control {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.override-control label {
  font-size: 11px;
  color: var(--slate-300);
  font-weight: 600;
}

/* 3-Column Hub Grid */
.hub-grid {
  display: grid;
  grid-template-columns: 380px 1fr 370px;
  gap: 16px;
  align-items: start;
}

.btn--teal-sm {
  background: var(--teal-600);
  color: var(--white);
  padding: 6px 11px;
  font-size: 12px;
}

.queue-filter-bar {
  padding: 10px 14px;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.queue-filter-pills {
  display: flex;
  gap: 5px;
}

.filter-pill {
  flex: 1;
  padding: 4px 8px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 5px;
  border: 1px solid var(--slate-300);
  background: var(--slate-50);
  color: var(--slate-600);
  cursor: pointer;
}

.filter-pill.active {
  background: var(--navy-900);
  color: var(--white);
  border-color: var(--navy-900);
}

.segregated-queues-scroll {
  max-height: 590px;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.queue-group__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
}

.queue-group__header--amber {
  background: var(--amber-50);
  color: var(--amber-700);
  border: 1px solid rgba(217, 119, 6, 0.3);
}

.queue-group__header--teal {
  background: var(--teal-50);
  color: var(--teal-700);
  border: 1px solid rgba(13, 148, 136, 0.3);
}

.queue-group__title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}

.queue-count-badge {
  background: var(--white);
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.queue-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.queue-card {
  border: 1px solid var(--slate-200);
  border-left: 4px solid var(--slate-400);
  border-radius: var(--radius-sm);
  padding: 10px 11px;
  background: var(--white);
  cursor: pointer;
  transition: all 0.14s ease;
}

.queue-card.selected {
  background: var(--slate-50);
  box-shadow: 0 0 0 1.5px var(--navy-900);
}

.queue-card--Critical { border-left-color: var(--coral-600); }
.queue-card--High { border-left-color: var(--amber-600); }
.queue-card--Standard { border-left-color: var(--teal-600); }

.queue-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.queue-card__id {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--navy-900);
}

.queue-card__loc {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy-800);
  margin-bottom: 4px;
}

.queue-card__symptoms {
  font-size: 11.5px;
  color: var(--slate-600);
  margin-bottom: 8px;
}

.queue-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--slate-200);
}

.btn--auto-assign-xs {
  background: var(--coral-600);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
}

/* Badges */
.priority-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
}

.priority-badge--critical { background: var(--coral-600); color: var(--white); }
.priority-badge--high { background: var(--amber-600); color: var(--white); }
.priority-badge--standard { background: var(--teal-600); color: var(--white); }

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.status-badge--awaiting { background: var(--amber-100); color: var(--amber-700); }
.status-badge--dispatched { background: var(--teal-100); color: var(--teal-700); }
.status-badge--enroute { background: #e0e7ff; color: #4338ca; }
.status-badge--onscene { background: var(--navy-900); color: #5eead4; }
.status-badge--closed { background: var(--slate-200); color: var(--slate-600); }

/* Tactical Map & Right Column */
.map-layer-toggles { display: flex; gap: 6px; }

.layer-btn {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 5px;
  border: 1px solid var(--slate-300);
  background: var(--white);
  color: var(--slate-600);
  cursor: pointer;
}

.layer-btn.active {
  background: var(--navy-900);
  color: var(--white);
  border-color: var(--navy-900);
}

.tactical-map-container { position: relative; }
.tactical-map { height: 475px; width: 100%; background: #e2e8f0; }

.map-legend {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 500;
  background: rgba(15, 23, 42, 0.92);
  color: var(--white);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11px;
}

.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-pin { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.legend-pin--crit { background: var(--coral-600); }
.legend-pin--amb { background: #14b8a6; }
.legend-pin--hosp { background: #3b82f6; }
.legend-line { width: 16px; height: 3px; background: #10b981; display: inline-block; }

.hub-selected-case-bar {
  padding: 12px 16px;
  background: var(--slate-50);
  border-top: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hub-selected-case__top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.hub-case-id { font-weight: 700; font-size: 14px; }
.hub-case-unit { font-size: 12px; color: var(--teal-700); font-weight: 700; }
.hub-selected-case__loc { font-size: 12.5px; color: var(--slate-600); }
.hub-selected-case__actions { display: flex; align-items: center; gap: 8px; }

.hub-right-col { display: flex; flex-direction: column; gap: 16px; }

.fleet-panel-list {
  max-height: 295px;
  overflow-y: auto;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.fleet-unit-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.fleet-unit-id {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--navy-900);
}

.fleet-unit-loc { font-size: 11px; color: var(--slate-500); }

.fleet-avail-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}

.fleet-avail-tag--Available {
  background: var(--teal-50);
  color: var(--teal-700);
  border: 1px solid rgba(13, 148, 136, 0.35);
}

.fleet-avail-tag--Dispatched {
  background: var(--coral-50);
  color: var(--coral-700);
  border: 1px solid rgba(225, 29, 72, 0.3);
}

.mdt-signal-box {
  background: var(--navy-900);
  color: var(--white);
  padding: 10px 14px;
}

.mdt-signal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  margin-bottom: 8px;
}

.mdt-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.mdt-metric {
  background: var(--navy-800);
  padding: 6px 8px;
  border-radius: 5px;
}

.mdt-metric__k { display: block; font-size: 10px; color: var(--slate-400); }
.mdt-metric__v { font-size: 11px; font-weight: 700; }

.er-matrix-list {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.er-hosp-row {
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.er-hosp-name { font-size: 12.5px; font-weight: 700; }
.er-hosp-sub { font-size: 11px; color: var(--slate-500); }

.er-beds-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--teal-50);
  color: var(--teal-700);
  border: 1px solid rgba(13, 148, 136, 0.35);
  white-space: nowrap;
}

/* Modal & Toasts */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 11, 22, 0.72);
  backdrop-filter: blur(4px);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-dialog {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 610px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  background: var(--navy-900);
  color: var(--white);
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title { font-family: var(--font-display); font-size: 17px; }
.modal-close-btn { background: transparent; border: none; color: var(--slate-300); font-size: 18px; cursor: pointer; }
.modal-body { padding: 18px 20px; }

.modal-alert-strip {
  background: var(--teal-50);
  border: 1px solid var(--teal-600);
  color: var(--teal-700);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 14px;
}

.modal-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.modal-summary-item {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
}

.modal-summary-item--full { grid-column: 1 / -1; }
.modal-summary-label { display: block; font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: var(--slate-500); margin-bottom: 3px; }
.modal-summary-val { font-size: 13px; font-weight: 700; color: var(--navy-900); }

.modal-footer {
  padding: 13px 20px;
  background: var(--slate-50);
  border-top: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.btn--ghost { background: var(--white); border: 1px solid var(--slate-300); color: var(--navy-800); }
.btn--confirm-dispatch { background: var(--coral-600); color: var(--white); font-weight: 700; padding: 9px 18px; }

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 3500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 400px;
}

.toast {
  background: var(--navy-900);
  color: var(--white);
  border-left: 4px solid var(--teal-600);
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 12.5px;
}

.toast--coral { border-left-color: var(--coral-600); }

.custom-map-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  border: 2px solid #fff;
}

.pin-crit { background: #e11d48; }
.pin-amber { background: #d97706; }
.pin-amb { background: #0d9488; }
.pin-hosp { background: #2563eb; border-radius: 6px; }

@media (max-width: 1280px) {
  .intake-two-panels,
  .hub-grid { grid-template-columns: 1fr; }
  .fleet-breakdown-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .form-row--2col,
  .form-row--3col,
  .triage-obs-grid,
  .fleet-breakdown-grid { grid-template-columns: 1fr; }
}