:root {
  --bg: #03060f;
  --panel: rgba(9, 15, 29, 0.88);
  --panel-solid: #0a1120;
  --card: rgba(15, 23, 42, 0.78);
  --border: rgba(0, 240, 255, 0.22);
  --border-soft: rgba(148, 163, 184, 0.16);
  --text: #eef4fc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #00f0ff;
  --accent-rgb: 0, 240, 255;
  --emerald: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --purple: #a855f7;
  --gold: #d4af37;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 0%, rgba(var(--accent-rgb), 0.08), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(168, 85, 247, 0.07), transparent 40%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  overflow-x: hidden;
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  color: inherit;
  border: none;
  background: none;
}

.page-root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- TOPBAR (sticky 1-line at 1280px+, never overlaps) ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  min-height: 44px;
  padding: 5px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  background: rgba(4, 8, 18, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.94rem;
  color: var(--text);
  white-space: nowrap;
}

.brand-link img {
  height: 21px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.nav-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}

.nav-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.topbar-center {
  display: flex;
  align-items: center;
}

.veh-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.veh-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.top-select {
  background: var(--panel-solid);
  color: var(--text);
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  padding: 3px 6px;
  font-size: 0.71rem;
  font-weight: 600;
}

.top-btn {
  padding: 4px 8px;
  border-radius: 7px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.71rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.15s;
}

.top-btn:hover,
.top-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
}

.clock-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: rgba(var(--accent-rgb), 0.06);
  white-space: nowrap;
}

/* ---------- MAIN MULTI-SCREEN COCKPIT GRID ---------- */
.cockpit-main {
  flex: 1;
  display: grid;
  gap: 8px;
  padding: 8px 10px;
  grid-template-columns: minmax(320px, 1.38fr) minmax(245px, 0.92fr) minmax(305px, 1.15fr) minmax(200px, 0.72fr);
  grid-template-rows: minmax(480px, calc(100vh - 196px)) auto;
  grid-template-areas:
    "gps dashboard central rear"
    "controls controls controls controls";
  align-items: stretch;
}

.gps-screen { grid-area: gps; }
.dashboard-screen { grid-area: dashboard; }
.central-screen { grid-area: central; }
.rear-column {
  grid-area: rear;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.controls-panel { grid-area: controls; }

@media (max-width: 1179px) {
  .cockpit-main {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(430px, auto) minmax(380px, auto) auto;
    grid-template-areas:
      "gps dashboard"
      "central rear"
      "controls controls";
  }
  .rear-column {
    flex-direction: row;
  }
  .rear-column .screen {
    flex: 1;
  }
}

@media (max-width: 760px) {
  .cockpit-main {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(420px, auto) auto auto auto auto;
    grid-template-areas:
      "gps"
      "dashboard"
      "central"
      "rear"
      "controls";
  }
  .rear-column {
    flex-direction: column;
  }
}

/* ---------- GENERIC DISPLAY FRAME ---------- */
.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 0 18px rgba(var(--accent-rgb), 0.04);
  overflow: hidden;
  transition: filter 0.2s, border-color 0.25s;
}

.screen-header {
  flex-shrink: 0;
  min-height: 36px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  background: rgba(2, 6, 15, 0.72);
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.screen-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

.screen-footer {
  flex-shrink: 0;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  background: rgba(2, 6, 15, 0.8);
  border-top: 1px solid var(--border-soft);
}

.chip-btn {
  padding: 4px 8px;
  border-radius: 7px;
  border: 1px solid var(--border-soft);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-muted);
  font-size: 0.71rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.14s;
}

.chip-btn:hover,
.chip-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.14);
}

/* ---------- SCREEN 1: GPS 3D + ADAS VIEWPORT ---------- */
.gps-screen .screen-body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.viewport-wrap {
  position: relative;
  flex: 1;
  min-height: 290px;
  width: 100%;
  background: #02050d;
  overflow: hidden;
}

#demo-3d-viewport {
  width: 100%;
  height: 100%;
  position: relative;
}

.hud-top {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
  z-index: 8;
}

.hud-pills-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.hud-pill {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-soft);
  color: var(--text);
  white-space: nowrap;
}

.hud-pill.green { border-color: rgba(34, 197, 94, 0.55); color: #86efac; }
.hud-pill.yellow { border-color: rgba(245, 158, 11, 0.6); color: #fde68a; }
.hud-pill.red { border-color: rgba(239, 68, 68, 0.7); color: #fca5a5; }
.hud-pill.cyan { border-color: var(--border); color: var(--accent); }
#hud-signal-pill { pointer-events: auto; }

.next-turn-card {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-radius: 10px;
  background: rgba(3, 7, 18, 0.84);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.55);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  max-width: 215px;
}

.nt-arrow {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  color: #030712;
  background: var(--accent);
  flex-shrink: 0;
  animation: nt-pulse 1.2s ease-in-out infinite;
}

@keyframes nt-pulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.06); filter: brightness(1.25); }
}

.nt-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.nt-dist {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
}

.nt-street {
  font-size: 0.66rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gta-minimap-wrap {
  position: absolute;
  left: 8px;
  bottom: 64px;
  width: 146px;
  height: 98px;
  border-radius: 10px;
  background: #0d1320;
  border: 2px solid rgba(148, 163, 184, 0.48);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.68), inset 0 0 0 1px rgba(0, 240, 255, 0.16);
  overflow: hidden;
  pointer-events: none;
  z-index: 9;
}

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

.gta-mini-overlay {
  position: absolute;
  left: 6px;
  bottom: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  font-weight: 800;
  color: #f8fafc;
  text-shadow: 0 1px 3px #000, 0 0 6px #000;
  letter-spacing: -0.02em;
}

.gta-health-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2px;
  background: #020617;
  padding: 1px;
}

.gta-bar-seg.g { background: #22c55e; }
.gta-bar-seg.b { background: #38bdf8; }
.gta-bar-seg.y { background: #f59e0b; }

.hud-bottom {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  pointer-events: none;
  z-index: 8;
}

.nav-hud-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
}

.nav-arrow-box {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.nav-hud-meta {
  flex: 1;
  min-width: 0;
}

.nav-hud-street {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-hud-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- SCREEN 2: DIGITAL CLUSTER ---------- */
.cluster-wrap {
  padding: 7px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cluster-alert {
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.22);
  border: 1px solid var(--red);
  color: #fecaca;
  font-size: 0.69rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gauges-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.gauge-box {
  position: relative;
  border-radius: 10px;
  padding: 7px 9px;
  background: rgba(5, 10, 22, 0.88);
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gauge-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.gauge-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.gauge-main-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.gauge-num {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
}

.gauge-unit {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.gear-badge {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(var(--accent-rgb), 0.16);
  border: 1px solid var(--border);
  color: var(--accent);
  line-height: 1.2;
}

.speed-sign {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f8fafc;
  color: #0f172a;
  border: 3px solid #ef4444;
  font-size: 0.62rem;
  font-weight: 900;
}

.speed-sign.over {
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.85);
}

.bar-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 2px;
}

.bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.18s ease, background 0.18s ease;
}

.adas-radar-card {
  border-radius: 10px;
  padding: 5px 7px;
  background: rgba(4, 9, 20, 0.9);
  border: 1px solid var(--border-soft);
}

.adas-radar-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.61rem;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  margin-bottom: 3px;
}

#cl-adas-svg {
  width: 100%;
  height: 112px;
  display: block;
}

.mini-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.mini-metric {
  border-radius: 8px;
  padding: 5px 6px;
  background: rgba(7, 13, 28, 0.88);
  border: 1px solid var(--border-soft);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
}

.telltales-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.tt-pill {
  padding: 4px 3px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.5);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.61rem;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tt-pill.on-green { background: rgba(34, 197, 94, 0.2); border-color: var(--emerald); color: #86efac; }
.tt-pill.on-blue { background: rgba(56, 189, 248, 0.22); border-color: #38bdf8; color: #bae6fd; }
.tt-pill.on-amber { background: rgba(245, 158, 11, 0.24); border-color: var(--amber); color: #fde68a; }
.tt-pill.on-red { background: rgba(239, 68, 68, 0.26); border-color: var(--red); color: #fecaca; }

/* ---------- SCREEN 3: CENTRAL MULTIMEDIA ---------- */
.central-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 7px;
  gap: 6px;
}

.tabs-bar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.tab-btn {
  padding: 4px 8px;
  border-radius: 7px;
  border: 1px solid var(--border-soft);
  background: rgba(7, 13, 28, 0.88);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  transition: all 0.15s;
}

.tab-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.14);
}

.tab-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: rgba(5, 10, 22, 0.85);
  padding: 8px;
}

.sec-head {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  margin: 0 0 6px;
  padding-left: 6px;
  border-left: 3px solid var(--accent);
}

.cards-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.action-tile {
  text-align: left;
  padding: 7px 8px;
  border-radius: 9px;
  border: 1px solid var(--border-soft);
  background: rgba(15, 23, 42, 0.78);
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: all 0.15s;
}

.action-tile:hover,
.action-tile.active {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
}

.action-tile strong {
  font-size: 0.74rem;
  color: var(--text);
}

.action-tile span {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.birdeye-box {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

#birdeye-canvas,
#rta-canvas {
  width: 100%;
  border-radius: 10px;
  background: #02050d;
  border: 1px solid var(--border-soft);
  display: block;
}

.climate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.climate-zone {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: rgba(15, 23, 42, 0.75);
  text-align: center;
}

.climate-deg {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--accent);
  margin: 4px 0;
}

.stepper-row {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.ai-chat-log {
  max-height: 82px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  border-radius: 8px;
  background: rgba(2, 6, 15, 0.9);
  border: 1px solid var(--border-soft);
  margin-bottom: 6px;
}

.ai-msg {
  font-size: 0.71rem;
  line-height: 1.3;
  padding: 4px 7px;
  border-radius: 7px;
}

.ai-msg.bot {
  background: rgba(var(--accent-rgb), 0.1);
  border-left: 3px solid var(--accent);
}

.ai-msg.user {
  background: rgba(148, 163, 184, 0.14);
  align-self: flex-end;
}

.ai-input-row {
  display: flex;
  gap: 5px;
  margin-bottom: 5px;
}

.ai-input {
  flex: 1;
  background: #030712;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  padding: 5px 8px;
  color: var(--text);
  font-size: 0.72rem;
}

/* ---------- SCREEN 4: REAR SCREENS (RSE) ---------- */
.rear-column .screen {
  flex: 1;
  min-height: 0;
}

.rear-body {
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.rear-preview {
  padding: 7px;
  border-radius: 9px;
  border: 1px solid var(--border-soft);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.12), rgba(15, 23, 42, 0.9));
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rear-preview.off {
  opacity: 0.4;
  background: #02050c;
}

.rear-title {
  font-size: 0.73rem;
  font-weight: 800;
  color: var(--text);
}

.rear-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ---------- BOTTOM CONTROLS DECK ---------- */
.controls-panel {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 6px 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 7px;
}

@media (max-width: 1179px) {
  .controls-panel {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .controls-panel {
    grid-template-columns: 1fr;
  }
}

.ctrl-group {
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: rgba(5, 10, 22, 0.85);
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ctrl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.ctrl-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.cbtn {
  flex: 1 1 auto;
  padding: 5px 8px;
  border-radius: 7px;
  border: 1px solid var(--border-soft);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  font-size: 0.71rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  transition: all 0.14s;
}

.cbtn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cbtn.active {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.18);
  color: var(--accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.25);
}

.cbtn.warn.active,
.cbtn.warn:hover {
  border-color: var(--amber);
  color: #fde68a;
}

.cbtn.danger.active,
.cbtn.danger:hover {
  border-color: var(--red);
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
}

.slider-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.slider-label strong {
  font-family: var(--font-mono);
  color: var(--accent);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
  margin: 0;
}

/* ---------- TOASTS ---------- */
.toast-stack {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
  max-width: 360px;
}

.toast {
  padding: 9px 13px;
  border-radius: 10px;
  background: rgba(6, 11, 24, 0.95);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  animation: toastIn 0.2s ease;
}

.toast.warn { border-color: var(--amber); color: #fde68a; }
.toast.err { border-color: var(--red); color: #fecaca; }

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

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.25); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.45); }
