:root {
  --bg: #080d18;
  --glass-bg: rgba(11, 17, 30, 0.80);
  --glass-border: rgba(148, 163, 184, 0.18);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #009ee3;
  --magenta: #e5007d;
  --emerald: #10b981;
  --amber: #f59e0b;
  --danger: #ef4444;
  --radius: 14px;
  --shadow: 0 12px 38px rgba(0, 0, 0, 0.48);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  user-select: none;
}

#map {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#labels-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.v-label {
  position: absolute;
  transform: translate(-50%, -100%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px 2px 4px;
  border-radius: 999px;
  background: rgba(10, 15, 28, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.v-label:hover, .v-label.selected {
  transform: translate(-50%, -105%) scale(1.12);
  border-color: #fff;
  z-index: 20;
}

.v-label .vl-line {
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}

.v-label .vl-num {
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

/* Splash Screen */
.splash {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, #0f1c34 0%, #060a13 100%);
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.splash.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-card {
  text-align: center;
  padding: 36px 44px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  max-width: 420px;
  width: 90%;
}

.splash-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand-lia {
  background: linear-gradient(135deg, #009ee3, #e5007d);
  padding: 4px 14px;
  border-radius: 10px;
  color: #fff;
}

.brand-3d {
  color: #f8fafc;
}

.splash-sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.splash-bar {
  margin-top: 22px;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.splash-fill {
  height: 100%;
  width: 22%;
  background: linear-gradient(90deg, #009ee3, #e5007d);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.splash-status {
  margin-top: 12px;
  font-size: 12px;
  color: #7dd3fc;
}

/* Top HUD */
.hud-top {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.hud-top > * {
  pointer-events: auto;
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  animation: pulseDot 2s infinite;
}

.live-dot.warn {
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.65; }
}

.brand-title {
  font-size: 14px;
  letter-spacing: 0.03em;
}

.brand-title strong {
  color: #38bdf8;
}

.brand-clock {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #cbd5e1;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.hud-kpis {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 16px;
}

.kpi-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
}

.kpi-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.kpi-val {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.kpi-val.small { font-size: 12px; color: #cbd5e1; }
.accent-cyan { color: #38bdf8; }
.accent-emerald { color: #34d399; }
.accent-amber { color: #fbbf24; }

.kpi-sep {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.12);
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
}

.segmented {
  display: flex;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  padding: 2px;
}

.segmented button {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 600;
  transition: all 0.16s ease;
}

.segmented button.active {
  background: linear-gradient(135deg, #009ee3, #0284c7);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 158, 227, 0.4);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}

.badge-btn {
  position: relative;
}

.count-pill {
  background: var(--magenta);
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
}

/* Left Panel */
.hud-left {
  position: fixed;
  top: 72px;
  left: 12px;
  bottom: 58px;
  width: 296px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.26s ease, opacity 0.26s ease;
}

body.hud-hidden .hud-left,
body.hud-hidden .hud-landmarks {
  transform: translateX(-115%);
  opacity: 0;
  pointer-events: none;
}

.panel-header {
  padding: 12px 12px 8px;
  position: relative;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 7px 10px;
  color: var(--muted);
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 12.5px;
}

#search-clear {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
}

.search-results {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 52px;
  background: rgba(13, 20, 36, 0.97);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  max-height: 280px;
  overflow-y: auto;
  z-index: 40;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6);
}

.sr-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sr-item:hover {
  background: rgba(56, 189, 248, 0.14);
}

.sr-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
}

.mode-filters {
  display: flex;
  gap: 4px;
  padding: 0 12px 10px;
  flex-wrap: wrap;
}

.chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--muted);
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}

.chip.active, .chip:hover {
  background: rgba(0, 158, 227, 0.24);
  border-color: rgba(0, 158, 227, 0.65);
  color: #fff;
}

.panel-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.link-btn {
  background: none;
  border: none;
  color: #38bdf8;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.routes-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
}

.route-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s ease, opacity 0.15s ease;
}

.route-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.route-row.muted {
  opacity: 0.36;
}

.route-row.highlighted {
  background: rgba(56, 189, 248, 0.16);
  outline: 1px solid rgba(56, 189, 248, 0.45);
}

.route-pill {
  min-width: 34px;
  text-align: center;
  padding: 3px 6px;
  border-radius: 7px;
  font-weight: 800;
  font-size: 11.5px;
  flex-shrink: 0;
}

.route-info {
  flex: 1;
  min-width: 0;
}

.route-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-meta {
  font-size: 10.5px;
  color: var(--muted);
}

.route-count {
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.09);
  padding: 2px 7px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.route-vis-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
}

.panel-footer {
  padding: 8px 12px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  color: #cbd5e1;
  cursor: pointer;
}

.toggle-row input {
  accent-color: #009ee3;
  cursor: pointer;
}

/* Bottom Landmarks Bar */
.hud-landmarks {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 16;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  max-width: calc(100vw - 24px);
  overflow-x: auto;
  transition: transform 0.26s ease, opacity 0.26s ease;
}

.lm-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.hud-landmarks button {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: #e2e8f0;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.13s ease;
}

.hud-landmarks button:hover {
  background: rgba(0, 158, 227, 0.3);
  border-color: #38bdf8;
}

/* Right Inspector */
.hud-right {
  position: fixed;
  top: 72px;
  right: 12px;
  width: 328px;
  max-height: calc(100vh - 90px);
  z-index: 18;
  padding: 14px;
  overflow-y: auto;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.close-btn:hover {
  background: rgba(239, 68, 68, 0.28);
}

.insp-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 28px;
}

.line-badge-lg {
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  flex-shrink: 0;
}

.stop-icon-lg {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.insp-title-wrap {
  min-width: 0;
  flex: 1;
}

.insp-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.insp-sub {
  margin-top: 2px;
  font-size: 11.5px;
  color: #7dd3fc;
  font-weight: 600;
}

.cam-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 12px;
}

.cam-modes button {
  padding: 6px 8px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-weight: 700;
  font-size: 11.5px;
  cursor: pointer;
}

.cam-modes button.active {
  background: linear-gradient(135deg, #009ee3, #e5007d);
  border-color: transparent;
  color: #fff;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.tele-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tele-lbl {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.tele-val {
  font-size: 13px;
  font-weight: 800;
}

.specs-strip {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.09);
  border: 1px solid rgba(56, 189, 248, 0.22);
  color: #bae6fd;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 10px;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 6px;
}

.tl-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.tl-name {
  font-weight: 600;
  font-size: 12px;
}

.tl-eta {
  font-weight: 800;
  font-size: 12px;
  color: #38bdf8;
  white-space: nowrap;
}

.stop-routes-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.mini-pill {
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 800;
}

.departures-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.dep-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.dep-row:hover {
  background: rgba(255, 255, 255, 0.11);
}

.dep-time {
  margin-left: auto;
  text-align: right;
  font-weight: 800;
  font-size: 12.5px;
  color: #34d399;
}

.dep-delay {
  font-size: 10px;
  color: var(--amber);
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(3, 7, 15, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  position: relative;
  width: min(560px, 95vw);
  max-height: 86vh;
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.fleet-modal-card {
  width: min(980px, 96vw);
  height: min(640px, 88vh);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header .close-btn {
  position: static;
}

.modal-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.alerts-body {
  overflow-y: auto;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alert-card {
  padding: 12px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.alert-card h4 {
  font-size: 13px;
  margin-bottom: 4px;
  color: #fcd34d;
}

.alert-card p {
  font-size: 12px;
  color: #e2e8f0;
  line-height: 1.45;
}

.fleet-showcase-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 12px;
  padding-top: 12px;
}

.fleet-selector {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

.fleet-item {
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.14s ease;
}

.fleet-item:hover, .fleet-item.active {
  background: rgba(0, 158, 227, 0.22);
  border-color: #38bdf8;
}

.fleet-item-title {
  font-weight: 700;
  font-size: 12.5px;
}

.fleet-item-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.fleet-stage-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 45%, #16233d 0%, #090e1a 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#fleet-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.fleet-info-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fs-title {
  font-size: 18px;
  font-weight: 900;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.fs-meta {
  font-size: 12px;
  color: #bae6fd;
}

.fs-live-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: auto;
}

.fs-live-btn {
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(16, 185, 129, 0.55);
  color: #a7f3d0;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.fs-live-btn:hover {
  background: rgba(16, 185, 129, 0.4);
  color: #fff;
}

.fleet-hint {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-size: 11px;
  color: var(--muted);
  pointer-events: none;
}

.v-photo-wrap {
  position: relative;
  margin-top: 10px;
  border-radius: 10px;
  overflow: hidden;
  height: 118px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.v-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.v-photo-tag {
  position: absolute;
  bottom: 6px;
  left: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(8, 13, 24, 0.82);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.fs-photo-card {
  position: absolute;
  bottom: 12px;
  left: 12px;
  width: 196px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.65);
  background: #0b1120;
}

.fs-photo-card img {
  width: 100%;
  height: 114px;
  object-fit: cover;
  display: block;
}

.fs-photo-cap {
  padding: 4px 8px;
  font-size: 10.5px;
  font-weight: 700;
  color: #cbd5e1;
  text-align: center;
}

.hover-tooltip {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  padding: 6px 10px;
  border-radius: 9px;
  background: rgba(8, 13, 24, 0.94);
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  font-size: 11.5px;
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.25); border-radius: 999px; }

.mobile-sheet-handle {
  display: none;
}

/* Geo & Compass Dock */
.hud-geo-dock {
  position: fixed;
  right: 12px;
  bottom: 130px;
  z-index: 17;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.geo-btn {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  border: 1px solid var(--glass-border);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  cursor: pointer;
  padding: 0;
  transition: all 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}

.geo-btn:hover {
  border-color: rgba(56, 189, 248, 0.55);
}

.geo-btn.active {
  background: rgba(0, 158, 227, 0.34);
  border-color: #38bdf8;
  color: #fff;
  box-shadow: 0 0 16px rgba(0, 158, 227, 0.45);
}

.geo-btn.compass-live {
  background: rgba(16, 185, 129, 0.32);
  border-color: #34d399;
  color: #fff;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.45);
}

.geo-sub {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
}

#compass-needle {
  transition: transform 0.12s linear;
}

.nearby-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.nearby-row:hover {
  background: rgba(0, 158, 227, 0.18);
  border-color: rgba(56, 189, 248, 0.4);
}

.nearby-dist {
  margin-left: auto;
  text-align: right;
  font-weight: 800;
  color: #38bdf8;
  white-space: nowrap;
}

.toast {
  position: fixed;
  top: calc(74px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(11, 17, 30, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #f1f5f9;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .hide-md { display: none; }
  .hud-left { width: 250px; }
  .hud-right { width: 280px; }
  .fleet-showcase-grid { grid-template-columns: 1fr; grid-template-rows: 160px 1fr; }
}

@media (max-width: 768px) {
  .hide-sm { display: none; }
  .brand-clock { display: none; }

  .hud-top {
    top: calc(8px + env(safe-area-inset-top));
    left: 8px;
    right: 8px;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .hud-brand {
    padding: 5px 10px;
    gap: 6px;
  }

  .brand-title {
    font-size: 12px;
    white-space: nowrap;
  }

  .hud-kpis {
    padding: 5px 10px;
    gap: 8px;
  }

  .kpi-val { font-size: 12.5px; }
  .kpi-label { font-size: 8.5px; white-space: nowrap; }

  .hud-actions {
    width: 100%;
    justify-content: space-between;
    padding: 5px 8px;
    gap: 6px;
  }

  .segmented button {
    padding: 4px 9px;
    font-size: 11px;
  }

  .btn-icon {
    padding: 5px 9px;
  }

  #btn-toggle-hud {
    display: none;
  }

  .mobile-sheet-handle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px 4px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .sheet-pill {
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.45);
  }

  .sheet-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .hud-left {
    top: auto;
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: auto;
    height: 60vh;
    max-height: 64vh;
    transition: height 0.24s ease, transform 0.24s ease;
  }

  .hud-left.mobile-collapsed {
    height: auto;
  }

  .hud-left.mobile-collapsed .panel-section-title,
  .hud-left.mobile-collapsed .routes-list,
  .hud-left.mobile-collapsed .panel-footer {
    display: none;
  }

  .hud-landmarks {
    display: none;
  }

  .hud-right {
    top: auto;
    bottom: calc(8px + env(safe-area-inset-bottom));
    left: 8px;
    right: 8px;
    width: auto;
    max-height: 58vh;
    z-index: 25;
  }

  body.inspector-open .hud-left {
    display: none;
  }

  .maplibregl-ctrl-bottom-right {
    bottom: 136px !important;
    right: 4px !important;
  }

  .hud-geo-dock {
    right: 8px;
    bottom: calc(250px + env(safe-area-inset-bottom));
    gap: 7px;
  }

  .toast {
    top: calc(106px + env(safe-area-inset-top));
    font-size: 11.5px;
    max-width: 90vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
