/* Quiet Responder — ASMR Dispatch Design System */

:root {
  /* Harmonious Color Palette */
  --bg-obsidian: #08090c;
  --bg-panel: rgba(14, 16, 22, 0.7);
  --bg-card: rgba(22, 26, 36, 0.55);
  --border-color: rgba(255, 255, 255, 0.06);
  --border-neon: rgba(0, 229, 255, 0.12);
  
  /* Neon Lights */
  --neon-blue: #00e5ff;
  --neon-red: #ff3b30;
  --neon-green: #30d158;
  --neon-amber: #ff9f0a;
  --neon-yellow: #ffe600;
  --neon-purple: #bf5af2;
  --neon-dim-blue: rgba(0, 229, 255, 0.35);

  /* Typography Colors */
  --text-primary: #e4e6eb;
  --text-muted: #8e9297;
  --text-dark: #0f1115;

  /* Font stacks */
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-obsidian);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  user-select: none;
}

/* Custom Scrollbar */
.scrollable {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}
.scrollable::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.scrollable::-webkit-scrollbar-track {
  background: transparent;
}
.scrollable::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}
.scrollable::-webkit-scrollbar-thumb:hover {
  background: var(--neon-blue);
}

/* Glassmorphism Panels */
.panel {
  background: var(--bg-panel);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  min-height: 0;
}

.panel-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
}

.panel-header h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.panel-content {
  flex: 1;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.card-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
}

/* Onboarding Dialog Overlay */
dialog[open] {
  border: none;
  background: transparent;
  color: inherit;
  width: 100vw;
  height: 100vh;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(25px) brightness(0.3);
  z-index: 1000;
}

.dialog-content {
  background: rgba(18, 22, 30, 0.85);
  border: 1px solid var(--neon-dim-blue);
  border-radius: 16px;
  padding: 35px;
  width: 480px;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 0 50px rgba(0, 229, 255, 0.15);
  backdrop-filter: blur(10px);
}

.dialog-content h2 {
  font-size: 26px;
  letter-spacing: 0.08em;
  color: var(--neon-blue);
  font-weight: 700;
  margin-bottom: 6px;
}

.dialog-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.dialog-warning {
  background: rgba(255, 159, 10, 0.06);
  border: 1px solid rgba(255, 159, 10, 0.2);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.warning-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-amber);
  box-shadow: 0 0 10px var(--neon-amber);
  animation: flash-led 1s infinite alternate;
  flex-shrink: 0;
}

.dialog-actions button {
  width: 100%;
}

/* Master Layout Grid */
.console-container {
  display: grid;
  grid-template-rows: 50px 1fr 140px;
  height: 100vh;
  width: 100vw;
  padding: 10px;
  gap: 10px;
}

/* Header bar styling */
.console-header {
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0 20px;
  backdrop-filter: blur(10px);
}

.header-logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-power-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3a3a3a;
  transition: all 0.3s;
}
.logo-power-led.active {
  background: var(--neon-blue);
  box-shadow: 0 0 10px var(--neon-blue);
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.sys-version {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 2px 6px;
  border-radius: 4px;
}

.header-status-panel {
  display: flex;
  gap: 30px;
}

.status-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-label {
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.trust-meter-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  width: 140px;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  position: relative;
}

.trust-bar {
  background: linear-gradient(90deg, var(--neon-green), #68ff00);
  height: 100%;
  transition: width 0.5s ease-out;
}

.trust-value {
  position: absolute;
  right: 6px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  line-height: 12px;
  color: var(--text-primary);
}

.sys-led-group {
  display: flex;
  gap: 6px;
}

.sys-led {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid var(--border-color);
}
.sys-led.led-green {
  color: #a4ffb0;
  background: rgba(48, 209, 88, 0.15);
  border-color: rgba(48, 209, 88, 0.4);
  box-shadow: 0 0 6px rgba(48, 209, 88, 0.2);
}
.sys-led.led-off {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border-color);
}
.sys-led.led-red {
  color: #ffb4b0;
  background: rgba(255, 59, 48, 0.2);
  border-color: rgba(255, 59, 48, 0.5);
  box-shadow: 0 0 8px rgba(255, 59, 48, 0.4);
  animation: flash-alert 0.6s infinite alternate;
}

.clock-display {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--neon-blue);
  text-shadow: 0 0 5px rgba(0, 229, 255, 0.3);
}

/* Master Toggle Switch */
.mute-switch-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.switch-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.switch-button {
  background: #1b1e26;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  width: 44px;
  height: 22px;
  position: relative;
  cursor: pointer;
  outline: none;
  transition: background 0.2s;
}

.switch-button.toggle-on {
  background: rgba(0, 229, 255, 0.25);
  border-color: var(--neon-blue);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.2);
}

.switch-nob {
  background: #a1a7b5;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.switch-button.toggle-on .switch-nob {
  transform: translateX(22px);
  background: var(--neon-blue);
  box-shadow: 0 0 8px var(--neon-blue);
}

/* Console Body Columns */
.console-body {
  grid-row: 2;
  display: grid;
  grid-template-columns: 280px 1fr 340px;
  gap: 10px;
  overflow: hidden;
}

/* Left Panel */
.left-panel {
  grid-column: 1;
}

.oscilloscope-canvas {
  width: 100%;
  height: 90px;
  background: #050608;
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 4px;
}

/* ASMR Mixer fader inputs */
.mixer-container {
  gap: 10px;
}

.mixer-channel {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.channel-info {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.channel-name {
  color: var(--text-muted);
}

.channel-val {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--neon-blue);
}

/* Styling range inputs like faders */
input[type=range].fader {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}

input[type=range].fader:focus {
  outline: none;
}

input[type=range].fader::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  cursor: pointer;
  background: #191c24;
  border-radius: 2px;
  border: 1px solid rgba(255,255,255,0.03);
}

input[type=range].fader::-webkit-slider-thumb {
  height: 16px;
  width: 12px;
  border-radius: 2px;
  background: #3e4452;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 1px 3px rgba(0,0,0,0.5);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -6px;
  transition: background 0.15s;
}

input[type=range].fader::-webkit-slider-thumb:hover {
  background: var(--neon-blue);
  box-shadow: 0 0 6px var(--neon-blue);
}

/* Gauges */
.gauges-row {
  display: flex;
  justify-content: space-around;
  margin-bottom: 12px;
}

.knob-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.dial {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, #252a36 0%, #12151c 100%);
  border: 2px solid #3c4250;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.05), 0 3px 6px rgba(0,0,0,0.4);
  position: relative;
  cursor: pointer;
}

.dial-marker {
  width: 2px;
  height: 12px;
  background: var(--neon-blue);
  box-shadow: 0 0 5px var(--neon-blue);
  position: absolute;
  left: 50%;
  top: 4px;
  margin-left: -1px;
  transform-origin: bottom center;
  transition: transform 0.1s;
}

.knob-label {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.knob-val {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-primary);
}

.test-log {
  background: #050608;
  border: 1px solid var(--border-color);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 9px;
  color: #34c759;
  min-height: 28px;
  margin-top: 10px;
}

/* Center Panel (Map & Telemetry) */
.center-panel {
  grid-column: 2;
  border-color: var(--border-neon);
  box-shadow: inset 0 0 30px rgba(0, 229, 255, 0.02);
}

.map-controls {
  padding: 10px;
  background: rgba(0,0,0,0.15);
  border-bottom: 1px solid var(--border-color);
}

.intensity-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.control-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.radio-selectors {
  display: flex;
  background: #11141c;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.btn-int {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-int:hover {
  color: var(--text-primary);
}
.btn-int.active {
  background: #252c3c;
  color: var(--neon-blue);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.15);
}

.map-container {
  flex: 1;
  position: relative;
  background: #050609;
  overflow: hidden;
}

.map-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: 
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 30px 30px;
}

.map-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Map node styling */
.road-line {
  fill: none;
  stroke: rgba(0, 229, 255, 0.07);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.road-centerline {
  fill: none;
  stroke: rgba(0, 229, 255, 0.03);
  stroke-width: 1;
  stroke-linecap: round;
}
.river-line {
  fill: none;
  stroke: #0a1f33;
  stroke-width: 32;
  stroke-linecap: round;
}
.park-block {
  fill: #061f12;
  opacity: 0.6;
}

/* Stations */
.station-node {
  stroke-width: 2;
  cursor: pointer;
  transition: r 0.2s, filter 0.2s;
}
.station-node:hover {
  r: 12;
  filter: drop-shadow(0 0 6px var(--glow-color));
}

/* Incidents glowing nodes */
.incident-node {
  animation: radar-pulse 1.8s infinite ease-out;
  cursor: pointer;
}

@keyframes radar-pulse {
  0% {
    r: 6;
    stroke-width: 2;
    stroke-opacity: 0.8;
  }
  50% {
    r: 14;
    stroke-width: 4;
    stroke-opacity: 0.4;
  }
  100% {
    r: 22;
    stroke-width: 1;
    stroke-opacity: 0;
  }
}

/* Vehicle dots */
.vehicle-node {
  cursor: pointer;
  transition: transform 0.1s linear, r 0.2s;
  filter: drop-shadow(0 0 4px var(--v-color));
}
.vehicle-node:hover {
  r: 9;
}
.vehicle-node.selected {
  stroke: #ffffff;
  stroke-width: 2;
  r: 9;
  filter: drop-shadow(0 0 8px var(--v-color));
}

/* Vehicle route lines */
.route-line {
  fill: none;
  stroke-width: 1.5;
  stroke-dasharray: 4, 4;
  animation: route-dash 20s linear infinite;
  opacity: 0.6;
}

@keyframes route-dash {
  to {
    stroke-dashoffset: -1000;
  }
}

/* Telemetry display panels */
.telemetry-panel {
  border-top: 1px solid var(--border-color);
  padding: 12px;
  background: rgba(0,0,0,0.15);
  border-radius: 0;
}

.telemetry-empty {
  font-family: var(--font-mono);
  font-size: 10px;
  text-align: center;
  color: var(--text-muted);
  padding: 14px 0;
  letter-spacing: 0.05em;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.telemetry-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cell-label {
  font-size: 8px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.cell-val {
  font-size: 13px;
  font-weight: 600;
}

.gauge-bar-container {
  width: 100%;
  height: 12px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.gauge-bar {
  height: 100%;
  transition: width 0.3s;
}

.gauge-bar-val {
  position: absolute;
  right: 4px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  line-height: 10px;
  color: var(--text-primary);
}

.bg-green { background: var(--neon-green); }
.bg-amber { background: var(--neon-amber); }
.bg-red { background: var(--neon-red); }

.siren-switches {
  display: flex;
  gap: 4px;
}

.btn-siren {
  border: 1px solid var(--border-color);
  background: #1b1e26;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
}
.btn-siren.active {
  background: var(--neon-blue);
  color: var(--text-dark);
  border-color: var(--neon-blue);
  font-weight: 700;
  box-shadow: 0 0 5px var(--neon-blue);
}

/* Pulsing heartbeat animation */
.pulsing {
  animation: pulse-txt 1.2s infinite alternate;
}
@keyframes pulse-txt {
  from { opacity: 0.6; }
  to { opacity: 1; text-shadow: 0 0 6px var(--neon-red); }
}

/* Right Panel: Teletype Call Feeds */
.right-panel {
  grid-column: 3;
}

.teletype-viewport {
  background: #040507;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 12px;
  height: 130px;
  max-height: 130px;
  overflow-y: auto;
  margin-bottom: 12px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.8);
}

.teletype-text {
  font-size: 11px;
  line-height: 1.5;
  color: #dedede;
  white-space: pre-wrap;
  position: relative;
}

/* Cursor typewriter effect */
.teletype-text::after {
  content: '_';
  color: var(--neon-blue);
  animation: cursor-blink 0.8s infinite;
}

@keyframes cursor-blink {
  50% { opacity: 0; }
}

.incident-meta-rows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  font-size: 9px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.meta-label {
  color: var(--text-muted);
}

.meta-val {
  font-weight: 500;
}

.timer-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timer-label {
  font-size: 8px;
  color: var(--text-muted);
}

.timer-progress-bar {
  width: 100%;
  height: 6px;
  background: #11131c;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.02);
}

.timer-bar {
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-red));
  height: 100%;
  width: 100%;
  transition: width 0.1s linear;
}

/* Dispatch Buttons */
.dispatch-controls {
  gap: 8px;
}

.dispatch-buttons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.btn-dispatch {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-color);
  background: #1c202a;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.05), 0 2px 4px rgba(0,0,0,0.3);
}

.dispatch-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2e3442;
  transition: all 0.2s;
}

/* Glow on hover/active states */
.btn-dispatch:enabled:hover {
  background: #252b39;
  border-color: var(--d-color);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.1);
}

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

.btn-dispatch:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Class color declarations */
.btn-police { --d-color: var(--neon-blue); }
.btn-police:enabled:active .dispatch-led, .btn-police.active .dispatch-led {
  background: var(--neon-blue);
  box-shadow: 0 0 10px var(--neon-blue);
}

.btn-fire { --d-color: var(--neon-red); }
.btn-fire:enabled:active .dispatch-led, .btn-fire.active .dispatch-led {
  background: var(--neon-red);
  box-shadow: 0 0 10px var(--neon-red);
}

.btn-ems { --d-color: var(--neon-green); }
.btn-ems:enabled:active .dispatch-led, .btn-ems.active .dispatch-led {
  background: var(--neon-green);
  box-shadow: 0 0 10px var(--neon-green);
}

.btn-rescue { --d-color: var(--neon-amber); }
.btn-rescue:enabled:active .dispatch-led, .btn-rescue.active .dispatch-led {
  background: var(--neon-amber);
  box-shadow: 0 0 10px var(--neon-amber);
}

.btn-utility { --d-color: var(--neon-yellow); }
.btn-utility:enabled:active .dispatch-led, .btn-utility.active .dispatch-led {
  background: var(--neon-yellow);
  box-shadow: 0 0 10px var(--neon-yellow);
}

.active-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 100px;
}

.active-incidents-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.empty-list {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  padding: 20px 0;
}

/* Active Incident Item progress list */
.active-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.active-item:hover {
  background: rgba(255,255,255,0.04);
}
.active-item.selected {
  border-color: var(--neon-blue);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.1);
}

.active-item-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.active-item-title {
  font-weight: 600;
}

.active-item-units {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
}

.active-item-progress-container {
  width: 100%;
  height: 4px;
  background: #000;
  border-radius: 2px;
  overflow: hidden;
}

.active-item-progress-bar {
  height: 100%;
  background: var(--neon-blue);
  width: 0%;
  transition: width 1s linear;
}

/* Footer & Tabs Layout */
.console-footer {
  grid-row: 3;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.tabs-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tab-selectors {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0,0,0,0.15);
}

.tab-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.05em;
  border-right: 1px solid var(--border-color);
}
.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.01);
}
.tab-btn.active {
  color: var(--neon-blue);
  background: var(--bg-card);
  border-bottom: 1.5px solid var(--neon-blue);
}

.tab-viewport {
  flex: 1;
  padding: 14px;
  position: relative;
  overflow-y: auto;
}

.tab-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.tab-content.hidden {
  display: none !important;
}

/* Tab 1: Logs layout */
.logs-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
  height: 100%;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  height: 100%;
}

.stat-box {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.stat-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--neon-blue);
  text-shadow: 0 0 5px rgba(0,229,255,0.2);
}

.stat-name {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 4px;
}

.logs-feed {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.logs-stream {
  flex: 1;
  background: #050608;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 10px;
  font-size: 10px;
  overflow-y: auto;
  min-height: 80px;
  max-height: 110px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.8);
}

.log-entry {
  padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,0.01);
  line-height: 1.4;
}
.log-entry.log-system { color: var(--text-muted); }
.log-entry.log-success { color: var(--neon-green); }
.log-entry.log-alert { color: var(--neon-red); }
.log-entry.log-info { color: var(--neon-blue); }

/* Tab 2: Scenario lab layout */
.lab-layout {
  display: grid;
  grid-template-columns: 260px 320px 1fr;
  gap: 14px;
  height: 100%;
}

.lab-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}
.form-row label {
  color: var(--text-muted);
}

.input-mono, .select-mono {
  background: #11131a;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  outline: none;
}
.input-mono:focus, .select-mono:focus {
  border-color: var(--neon-blue);
}

.slider-mono {
  -webkit-appearance: none;
  background: #11131a;
  height: 4px;
  border-radius: 2px;
  outline: none;
  width: 120px;
}
.slider-mono::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--neon-blue);
  cursor: pointer;
}

.lab-db-sync {
  font-size: 10px;
  gap: 8px;
}

.pb-telemetry-text {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 8px;
  font-size: 9px;
  line-height: 1.6;
}

.pb-buttons-row {
  display: flex;
  gap: 6px;
}
.pb-buttons-row button {
  flex: 1;
}

.scrape-progress-log {
  background: #050608;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 9px;
  color: var(--text-muted);
  min-height: 24px;
  max-height: 38px;
  overflow-y: auto;
}

.lab-scenarios {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.scenarios-list {
  flex: 1;
  background: #050608;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 110px;
}

.scenario-item-loading {
  font-size: 9px;
  color: var(--text-muted);
  text-align: center;
  padding: 20px 0;
}

.scenario-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.01);
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.scenario-item:hover {
  background: rgba(255,255,255,0.03);
  border-color: var(--neon-blue);
}
.scenario-item.active {
  background: rgba(0, 229, 255, 0.05);
  border-color: var(--neon-blue);
}

.scenario-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.scenario-title {
  font-size: 11px;
  font-weight: 600;
}

.scenario-desc {
  font-size: 9px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.scenario-btn-play {
  background: transparent;
  border: 1px solid var(--neon-blue);
  color: var(--neon-blue);
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s;
}
.scenario-btn-play:hover {
  background: var(--neon-blue);
  color: var(--text-dark);
  box-shadow: 0 0 5px var(--neon-blue);
}

/* Global button modifiers */
.btn-primary {
  background: var(--neon-blue);
  color: var(--text-dark);
  border: none;
  font-weight: 700;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 229, 255, 0.2);
  transition: all 0.2s;
}
.btn-primary:hover {
  background: #40eeff;
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.35);
}
.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 10px;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover {
  border-color: var(--neon-blue);
  color: var(--neon-blue);
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.1);
}

.btn-danger {
  background: rgba(255, 59, 48, 0.15);
  border: 1px solid rgba(255, 59, 48, 0.4);
  color: #ffb4b0;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}
.btn-danger:enabled:hover {
  background: rgba(255, 59, 48, 0.25);
  border-color: var(--neon-red);
  box-shadow: 0 0 8px rgba(255, 59, 48, 0.2);
}
.btn-danger:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Animations */
@keyframes flash-led {
  from { opacity: 0.3; }
  to { opacity: 1; }
}

@keyframes flash-alert {
  from { opacity: 0.4; background: rgba(255, 59, 48, 0.15); }
  to { opacity: 1; background: rgba(255, 59, 48, 0.4); box-shadow: 0 0 10px var(--neon-red); }
}

.text-green { color: var(--neon-green); }
.text-amber { color: var(--neon-amber); }
.text-neon-red { color: var(--neon-red); }
.text-neon-blue { color: var(--neon-blue); }
.text-neon-green { color: var(--neon-green); }
.text-neon-amber { color: var(--neon-amber); }
.text-neon-yellow { color: var(--neon-yellow); }
.text-mono { font-family: var(--font-mono); }
.hidden { display: none !important; }

/* Responsive adjustments for mobile */
@media (max-width: 1024px) {
  .console-container {
    grid-template-rows: 60px 1fr;
    height: auto;
    overflow-y: auto;
  }
  .console-body {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }
  .left-panel, .right-panel {
    grid-column: 1;
  }
  .hide-mobile {
    display: none !important;
  }
  .console-footer {
    grid-row: auto;
    height: 380px;
    margin-top: 10px;
  }
  .lab-layout, .logs-grid {
    grid-template-columns: 1fr;
  }
  .telemetry-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Highway Road Styles */
.highway-line {
  fill: none;
  stroke: rgba(191, 90, 242, 0.12);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.highway-centerline {
  fill: none;
  stroke: rgba(191, 90, 242, 0.55);
  stroke-width: 2.5;
  stroke-linecap: round;
}
