/* ==========================================================================
   ALL-STAR CRASH CANVAS AI — ULTRA-MODERN GLASSMORPHISM DESIGN SYSTEM
   Author: Antigravity AI
   Target: All-Star Auto Body (Oxnard, CA)
   ========================================================================== */

:root {
  /* Color Tokens - Cyber Midnight & Safety Accents */
  --bg-dark: #07090e;
  --bg-surface: #0e131f;
  --bg-glass: rgba(15, 22, 36, 0.72);
  --bg-glass-elevated: rgba(22, 31, 51, 0.85);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-glow: rgba(0, 212, 255, 0.25);
  
  --primary-cyan: #00d4ff;
  --primary-cyan-glow: rgba(0, 212, 255, 0.4);
  --accent-emerald: #00ff88;
  --accent-emerald-glow: rgba(0, 255, 136, 0.35);
  --accent-crimson: #ff334b;
  --accent-amber: #ffb703;

  /* Text Tokens */
  --text-pure: #ffffff;
  --text-main: #e2e8f0;
  --text-muted: #8b9bb4;
  --text-dim: #4c5a73;

  /* Road & Canvas Tokens */
  --asphalt: #181b22;
  --road-line-yellow: #f59e0b;
  --road-line-white: rgba(255, 255, 255, 0.85);
  --curb-red: #ef4444;

  /* Typography */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Shadows & Depth */
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-floating: 0 16px 40px -10px rgba(0, 0, 0, 0.6);
  --shadow-cyan-glow: 0 0 25px rgba(0, 212, 255, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

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

/* Glassmorphism Generic Utility */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-floating);
}

.glass-hud {
  background: rgba(11, 17, 28, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  box-shadow: var(--shadow-subtle);
}

/* App Container Grid */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  background: radial-gradient(circle at 50% 0%, rgba(0, 212, 255, 0.05) 0%, transparent 60%),
              radial-gradient(circle at 100% 100%, rgba(0, 255, 136, 0.04) 0%, transparent 50%),
              var(--bg-dark);
}

/* ==========================================================================
   HEADER NAVIGATION
   ========================================================================== */

.app-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-radius: 0 0 16px 16px;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

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

.brand-logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #00d4ff, #00ff88);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 18px var(--primary-cyan-glow);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text-pure);
}

.brand-subtitle {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--primary-cyan);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-pill {
  background: rgba(0, 212, 255, 0.18);
  border: 1px solid var(--primary-cyan);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 8px;
  color: var(--primary-cyan);
}

/* Claim Metadata Bar in Header */
.claim-metadata-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.35);
  padding: 6px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-dim);
}

.meta-input {
  background: transparent;
  border: none;
  color: var(--text-pure);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  outline: none;
  width: 140px;
  transition: color 0.2s ease;
}

.meta-input:focus {
  color: var(--primary-cyan);
}

.meta-vin {
  width: 155px;
  font-family: monospace;
  letter-spacing: 0.5px;
}

.meta-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.08);
}

.carrier-tag {
  font-size: 11px;
  font-weight: 700;
  color: #ff5964;
  letter-spacing: 0.5px;
}

/* Header Action Buttons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn .icon {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, #00d4ff, #0077ff);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 119, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 25px rgba(0, 212, 255, 0.5);
}

.btn-voice {
  background: rgba(0, 255, 136, 0.12);
  border: 1px solid rgba(0, 255, 136, 0.35);
  color: var(--accent-emerald);
  position: relative;
}

.btn-voice:hover {
  background: rgba(0, 255, 136, 0.22);
  box-shadow: 0 0 20px var(--accent-emerald-glow);
  transform: translateY(-1px);
}

.mic-pulse {
  width: 8px;
  height: 8px;
  background: var(--accent-emerald);
  border-radius: 50%;
  animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 10px var(--accent-emerald); }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* ==========================================================================
   WORKSPACE LAYOUT
   ========================================================================== */

.workspace {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
  padding: 12px 14px;
  gap: 12px;
}

/* SIDEBAR TOOLBOX (LEFT) */
.sidebar-toolbox {
  width: 290px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 20px;
  overflow-y: auto;
  z-index: 20;
}

.tool-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-dim);
}

.section-badge {
  background: rgba(0, 212, 255, 0.12);
  color: var(--primary-cyan);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Template Road Cards Grid */
.template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.template-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.template-card span {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.template-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.template-card.active {
  background: rgba(0, 212, 255, 0.12);
  border-color: var(--primary-cyan);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

.template-card.active span {
  color: var(--primary-cyan);
}

/* CSS Illustrated Previews of Roadways */
.template-preview {
  width: 100%;
  height: 48px;
  background: #151821;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.tpl-parking {
  background: #151821;
  background-image: repeating-linear-gradient(45deg, transparent, transparent 14px, rgba(255,255,255,0.4) 14px, rgba(255,255,255,0.4) 16px);
}

.tpl-cross {
  background: #151821;
}
.tpl-cross::before {
  content: "";
  position: absolute;
  top: 50%; left: 0; right: 0; height: 16px;
  transform: translateY(-50%);
  background: #252a36;
}
.tpl-cross::after {
  content: "";
  position: absolute;
  left: 50%; top: 0; bottom: 0; width: 16px;
  transform: translateX(-50%);
  background: #252a36;
}

.tpl-tjunction {
  background: #151821;
}
.tpl-tjunction::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 18px;
  background: #252a36;
}
.tpl-tjunction::after {
  content: "";
  position: absolute;
  left: 50%; top: 18px; bottom: 0; width: 18px;
  transform: translateX(-50%);
  background: #252a36;
}

.tpl-highway {
  background: #1a1d26;
  background-image: linear-gradient(to right, transparent 48%, rgba(245,158,11,0.8) 48%, rgba(245,158,11,0.8) 52%, transparent 52%);
}

/* Quick Forensic Crash Scenarios Grid */
.scenario-buttons-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scenario-quick-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  width: 100%;
}

.scenario-quick-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 153, 51, 0.4);
  transform: translateX(3px);
}

.scenario-quick-btn.active {
  background: rgba(255, 119, 0, 0.14);
  border-color: #ff7700;
  box-shadow: 0 0 12px rgba(255, 119, 0, 0.25);
}

.scen-icon {
  font-size: 18px;
  line-height: 1;
}

.scen-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.scen-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-pure);
}

.scenario-quick-btn.active .scen-title {
  color: #ff9933;
}

.scen-sub {
  font-size: 9px;
  color: var(--text-dim);
}

/* Vehicle Role Toggle */
.role-selector {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 3px;
  border-radius: 8px;
  gap: 4px;
}

.role-btn {
  flex: 1;
  padding: 7px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.role-btn.active {
  background: var(--bg-glass-elevated);
  color: var(--text-pure);
  box-shadow: var(--shadow-subtle);
}

.role-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.dot-a { background: #0066ff; box-shadow: 0 0 6px #0066ff; }
.dot-b { background: #ff7700; box-shadow: 0 0 6px #ff7700; }

/* Color Swatches */
.color-palette {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}

.color-label {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
}

.color-swatches {
  display: flex;
  gap: 8px;
}

.color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.color-swatch:hover {
  transform: scale(1.15);
}

.color-swatch.active {
  border-color: #ffffff;
  transform: scale(1.15);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Vehicle Selector Buttons */
.vehicle-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tool-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.tool-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(3px);
}

.tool-icon {
  width: 20px;
  height: 38px;
  color: var(--primary-cyan);
}

.tool-label-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.tool-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
}

.tool-sub {
  font-size: 10px;
  color: var(--text-dim);
}

/* Evidence Grid */
.evidence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.evidence-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 9px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.evidence-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-pure);
  transform: translateY(-1px);
}

.evidence-icon {
  font-size: 15px;
}

/* ==========================================================================
   CENTER CANVAS VIEWPORT
   ========================================================================== */

.canvas-viewport {
  flex: 1;
  position: relative;
  border-radius: 14px;
  background: #090c12;
  overflow: hidden;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.canvas-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#crashCanvas {
  background: #11141c;
  cursor: crosshair;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
}

/* Compass HUD */
.compass-rose {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
}

.compass-arrow {
  width: 0; 
  height: 0; 
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 12px solid #ff334b;
}

.compass-n {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-pure);
  letter-spacing: 0.5px;
}

/* Measurement Guide HUD */
.measurement-hud {
  position: absolute;
  top: 18px;
  left: 18px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-cyan);
  pointer-events: none;
  z-index: 10;
}

/* Viewport Floating Controls */
.viewport-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  padding: 6px 12px;
  gap: 8px;
  z-index: 10;
}

.ctrl-btn {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-pure);
}

.ctrl-btn.active {
  background: rgba(0, 212, 255, 0.2);
  border-color: var(--primary-cyan);
  color: var(--primary-cyan);
}

.zoom-level {
  font-size: 12px;
  font-weight: 700;
  min-width: 48px;
  text-align: center;
  color: var(--text-muted);
}

.ctrl-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   SIDEBAR INSPECTOR (RIGHT)
   ========================================================================== */

.sidebar-inspector {
  width: 310px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  padding: 18px;
  gap: 20px;
  overflow-y: auto;
  z-index: 20;
}

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

.inspector-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-pure);
}

.status-indicator {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent-emerald);
}

.empty-inspector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 10px;
  color: var(--text-dim);
}

.empty-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.empty-inspector p {
  font-size: 12px;
  line-height: 1.6;
}

.inspector-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.prop-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prop-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-dim);
}

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

.role-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
}
.role-badge.client {
  background: rgba(0, 102, 255, 0.2);
  color: #3b82f6;
  border: 1px solid #3b82f6;
}

.vehicle-badge {
  background: rgba(255, 255, 255, 0.06);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

.range-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-range {
  flex: 1;
  accent-color: var(--primary-cyan);
}

.range-val {
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
  min-width: 35px;
  color: var(--text-pure);
}

.input-with-unit {
  position: relative;
  display: flex;
  align-items: center;
}

.num-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-pure);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  outline: none;
}

.num-input:focus {
  border-color: var(--primary-cyan);
}

.unit {
  position: absolute;
  right: 12px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
}

.custom-select {
  width: 100%;
  background: rgba(14, 20, 32, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-pure);
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

.custom-select:focus {
  border-color: var(--primary-cyan);
}

.prop-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-danger {
  background: rgba(255, 51, 75, 0.15);
  color: var(--accent-crimson);
  border: 1px solid rgba(255, 51, 75, 0.3);
}
.btn-danger:hover {
  background: rgba(255, 51, 75, 0.25);
}

/* ADF Summary Card */
.adf-summary-card {
  margin-top: auto;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px;
}

.summary-header {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--primary-cyan);
  margin-bottom: 6px;
}

.adf-narrative {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ==========================================================================
   VOICE AI DICTATION MODAL
   ========================================================================== */

.glass-modal {
  border: none;
  background: transparent;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.glass-modal[open] {
  display: flex;
}

.glass-modal::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.modal-content {
  background: rgba(13, 19, 33, 0.95);
  border: 1px solid var(--border-glass);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px var(--primary-cyan-glow);
  width: 520px;
  max-width: 95vw;
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-large {
  width: 620px;
}

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

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-title-group h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-pure);
  margin: 0;
}

.modal-sub {
  font-size: 11px;
  color: var(--primary-cyan);
  font-weight: 500;
  display: block;
}

.modal-icon {
  font-size: 24px;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}
.btn-close:hover { color: var(--text-pure); }

.modal-desc {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Voice Controls Bar */
.voice-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(0, 0, 0, 0.35);
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.lang-selector-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
}

.lang-select {
  background: #181d29;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-pure);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
}

.lang-select:focus {
  border-color: var(--primary-cyan);
}

/* Dictation Toggle Button */
.btn-record {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 255, 136, 0.2));
  border: 1px solid var(--primary-cyan);
  color: #fff;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-record:hover {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.35), rgba(0, 255, 136, 0.35));
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.3);
  transform: translateY(-1px);
}

.btn-record.recording {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  border-color: #f87171;
  color: #fff;
  animation: pulseRecording 1.5s infinite;
}

.record-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-cyan);
}

.btn-record.recording .record-dot {
  background: #fff;
  box-shadow: 0 0 8px #fff;
}

@keyframes pulseRecording {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Audio Wave Visualizer */
.audio-visualizer-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 52px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 136, 0.15);
  transition: all 0.3s ease;
}

.audio-visualizer-box.is-listening {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.wave-bar {
  width: 4px;
  height: 8px;
  background: rgba(0, 255, 136, 0.3);
  border-radius: 2px;
  transition: all 0.2s ease;
}

.audio-visualizer-box.is-listening .wave-bar {
  background: var(--accent-emerald);
  animation: soundWave 1.2s infinite ease-in-out;
}

.audio-visualizer-box.is-listening .wave-bar:nth-child(2) { animation-delay: 0.15s; }
.audio-visualizer-box.is-listening .wave-bar:nth-child(3) { animation-delay: 0.3s; }
.audio-visualizer-box.is-listening .wave-bar:nth-child(4) { animation-delay: 0.45s; }
.audio-visualizer-box.is-listening .wave-bar:nth-child(5) { animation-delay: 0.3s; }
.audio-visualizer-box.is-listening .wave-bar:nth-child(6) { animation-delay: 0.15s; }

@keyframes soundWave {
  0%, 100% { height: 10px; opacity: 0.4; }
  50% { height: 38px; opacity: 1; box-shadow: 0 0 10px var(--accent-emerald); }
}

.speech-status {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  font-style: italic;
}

/* Transcript Container & Textarea */
.transcript-container {
  background: rgba(0, 0, 0, 0.35);
  padding: 12px;
  border-radius: 12px;
  border-left: 3px solid var(--primary-cyan);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.transcript-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.live-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--primary-cyan);
}

.word-counter {
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 600;
}

.voice-transcript-area {
  width: 100%;
  background: rgba(16, 22, 36, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease;
}

.voice-transcript-area:focus {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

/* Quick Scenario Presets */
.preset-scenarios-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preset-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-dim);
}

.preset-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 6px 12px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.preset-chip:hover {
  background: rgba(0, 212, 255, 0.15);
  border-color: var(--primary-cyan);
  color: #fff;
  transform: translateY(-1px);
}

.preset-chip.active {
  background: rgba(0, 212, 255, 0.25);
  border-color: var(--primary-cyan);
  color: var(--primary-cyan);
}

.btn-glow {
  box-shadow: 0 0 20px var(--primary-cyan-glow);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
}

/* User Guide Modal Styles */
.modal-guide {
  width: 760px;
  max-width: 95vw;
}

.guide-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 6px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

.guide-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: all 0.2s ease;
}

.guide-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 212, 255, 0.3);
  transform: translateY(-2px);
}

.guide-card-icon {
  font-size: 24px;
  line-height: 1;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.guide-card-content h4 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-cyan);
  margin-bottom: 4px;
}

.guide-card-content p {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted);
}

.guide-card-content strong {
  color: var(--text-pure);
}

.guide-card-content em {
  color: var(--accent-amber);
  font-style: normal;
}

.guide-card-content code {
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--accent-emerald);
  font-size: 10px;
}

.shortcuts-bar {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.shortcuts-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-dim);
}

.shortcuts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shortcut-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.shortcut-tag kbd {
  background: #11141d;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 9px;
  color: var(--primary-cyan);
}

/* Micro-Rotation & Cardinal Angle Buttons */
.micro-rotate-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.btn-micro-rot {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 5px 2px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-micro-rot:hover {
  background: rgba(0, 212, 255, 0.15);
  border-color: var(--primary-cyan);
  color: #fff;
}

.cardinal-rotate-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 6px;
}

.btn-cardinal-rot {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 5px;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.btn-cardinal-rot:hover {
  background: rgba(0, 255, 136, 0.15);
  border-color: var(--accent-emerald);
  color: #fff;
}

/* Driveway Template Preview */
.tpl-driveway {
  background: #112415;
  position: relative;
}
.tpl-driveway::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0; height: 20px;
  background: #181b24;
}
.tpl-driveway::after {
  content: "";
  position: absolute;
  left: 35%; width: 25px; top: 0; bottom: 20px;
  background: #282e3d;
  border-left: 1px dashed rgba(255,255,255,0.3);
  border-right: 1px dashed rgba(255,255,255,0.3);
}

/* Google Maps / Satellite Layer Modal */
.modal-map {
  width: 650px;
  max-width: 95vw;
}

.map-search-bar {
  display: flex;
  gap: 10px;
}

.map-input {
  flex: 1;
  background: rgba(16, 22, 36, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-size: 13px;
  font-family: var(--font-main);
  outline: none;
}
.map-input:focus {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.25);
}

.map-presets-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.map-presets-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-dim);
}

.map-presets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.map-preset-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.map-preset-btn:hover {
  background: rgba(0, 212, 255, 0.12);
  border-color: var(--primary-cyan);
  color: #fff;
  transform: translateY(-1px);
}

.map-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(0, 0, 0, 0.35);
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 10px;
}

.opacity-control {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.opacity-control .custom-range {
  flex: 1;
}

.btn-file-upload {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 8px 14px;
}

/* ==========================================================================
   QUICK HEADER ACCIDENT LOCATION BAR
   ========================================================================== */
.header-location-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(0, 212, 255, 0.25);
  padding: 4px 10px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.header-location-bar:focus-within {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.3);
}

.loc-pin {
  font-size: 14px;
}

.header-loc-input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 12px;
  font-family: var(--font-main);
  width: 250px;
  outline: none;
}
.header-loc-input::placeholder {
  color: var(--text-dim);
}

.btn-sm-loc {
  padding: 5px 12px;
  font-size: 11px;
  border-radius: 6px;
  white-space: nowrap;
}

/* ==========================================================================
   SATELLITE ROADS & LOCATION CONTROLS HUD
   ========================================================================== */
.satellite-hud {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 12px;
  z-index: 15;
  background: rgba(13, 19, 33, 0.88);
  border: 1px solid rgba(0, 212, 255, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  pointer-events: auto;
}

.sat-hud-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.sat-badge-live {
  font-weight: 800;
  color: var(--primary-cyan);
  letter-spacing: 0.5px;
}

.sat-address-text {
  color: #fff;
  font-weight: 600;
  max-width: 380px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sat-hud-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sat-group-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  margin-right: 2px;
}

.sat-btn-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sat-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sat-btn:hover {
  background: rgba(0, 212, 255, 0.15);
  border-color: var(--primary-cyan);
  color: #fff;
}

.sat-btn.active {
  background: rgba(0, 212, 255, 0.25);
  border-color: var(--primary-cyan);
  color: var(--primary-cyan);
  font-weight: 700;
}

.sat-btn-danger {
  color: #ff5964;
  border-color: rgba(255, 89, 100, 0.3);
}
.sat-btn-danger:hover {
  background: rgba(255, 89, 100, 0.2);
  border-color: #ff5964;
  color: #fff;
}

.sat-pan-cluster {
  display: flex;
  align-items: center;
  gap: 3px;
}

.sat-pan-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sat-pan-btn:hover {
  background: rgba(0, 255, 136, 0.2);
  border-color: var(--accent-emerald);
}

.sat-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.15);
}

.sat-range {
  width: 90px;
  height: 5px;
  cursor: pointer;
}

.sat-scale-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--primary-cyan);
  min-width: 38px;
  text-align: center;
}

.sat-btn-icon {
  padding: 2px 7px;
  font-size: 11px;
  font-weight: bold;
}

.sat-quick-scales {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 2px;
}

.sat-btn-xs {
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 4px;
}

/* Modal Map Enhancements */
.map-status-msg {
  font-size: 11px;
  color: var(--accent-emerald);
  min-height: 16px;
  margin-top: 4px;
}

.map-provider-bar {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.provider-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.google-api-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px dashed rgba(255, 153, 0, 0.4);
  border-radius: 8px;
  padding: 10px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.api-key-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.api-key-hint {
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* ==========================================================================
   VIEW MODE SELECTOR PILL (HEADER)
   ========================================================================== */

.view-mode-pill-bar {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 24px;
  padding: 3px;
  gap: 3px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}

.view-pill-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.view-pill-btn:hover {
  color: var(--text-pure);
  background: rgba(255, 255, 255, 0.06);
}

.view-pill-btn.active {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.25), rgba(0, 255, 136, 0.2));
  color: #00ff88;
  box-shadow: 0 2px 10px rgba(0, 212, 255, 0.25);
  border: 1px solid rgba(0, 255, 136, 0.4);
}

.view-pill-btn .pill-icon {
  font-size: 14px;
}

/* ==========================================================================
   DUAL / MULTI-VIEWPORT CONTAINER & PANELS
   ========================================================================== */

.viewport-panels-container {
  width: 100%;
  height: 100%;
  display: flex;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* MODE 1: TOP VIEW ONLY */
.viewport-panels-container.mode-top .view-panel-top {
  display: flex;
  width: 100%;
  height: 100%;
}
.viewport-panels-container.mode-top .view-panel-iso {
  display: none;
}

/* MODE 2: ISOMETRIC 3D VIEW ONLY */
.viewport-panels-container.mode-iso .view-panel-top {
  display: none;
}
.viewport-panels-container.mode-iso .view-panel-iso {
  display: flex;
  width: 100%;
  height: 100%;
}

/* MODE 3: DUAL SPLIT VIEW (SIDE BY SIDE: TOP VIEW LEFT, ISOMETRIC RIGHT) */
.viewport-panels-container.mode-split {
  display: flex;
  flex-direction: row;
  gap: 10px;
  padding: 8px;
}

.viewport-panels-container.mode-split .view-panel-top {
  display: flex;
  flex: 1;
  min-width: 0;
  border-radius: 12px;
  border: 1px solid rgba(0, 212, 255, 0.2);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  background: #090c12;
}

.viewport-panels-container.mode-split .view-panel-iso {
  display: flex;
  flex: 1;
  min-width: 0;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 136, 0.25);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  background: #090c12;
}

/* VIEW PANEL COMMON STYLES */
.view-panel {
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.panel-view-header {
  position: absolute;
  top: 12px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  z-index: 15;
}

.panel-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(10, 15, 25, 0.85);
  border: 1px solid rgba(0, 212, 255, 0.35);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #00d4ff;
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.panel-badge-pill.iso {
  border-color: rgba(0, 255, 136, 0.4);
  color: #00ff88;
}

.dot-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00d4ff;
  box-shadow: 0 0 8px #00d4ff;
}

.dot-live.iso {
  background: #00ff88;
  box-shadow: 0 0 8px #00ff88;
}

.panel-sub-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.5);
  padding: 3px 8px;
  border-radius: 4px;
}

/* ISOMETRIC HEADER TOOLBAR */
.iso-header-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px 8px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.iso-tool-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.iso-tool-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.iso-tool-btn.active {
  color: #00ff88;
  background: rgba(0, 255, 136, 0.15);
}

.iso-angle-tag {
  font-size: 10px;
  font-weight: 700;
  color: #00d4ff;
  padding: 2px 6px;
  background: rgba(0, 212, 255, 0.12);
  border-radius: 4px;
}

.iso-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.12);
}

/* CANVAS SIZING & FIT */
.view-panel .canvas-wrapper {
  flex: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.view-panel canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.15s ease-out;
}

#isometricCanvas {
  background: #090c12;
  cursor: grab;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
}

#isometricCanvas:active {
  cursor: grabbing;
}

/* ==========================================================================
   VIRTUAL CLAIMS PO# SEARCH BAR & SECURITY AUTH GATE STYLING
   ========================================================================== */

.meta-po-item {
  min-width: 140px;
}

.po-search-box {
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-po-input {
  width: 65px !important;
  color: #00ff88 !important;
  font-weight: 800 !important;
  background: rgba(0, 255, 136, 0.08) !important;
  border-color: rgba(0, 255, 136, 0.3) !important;
  text-align: center;
}

.meta-po-input:focus {
  border-color: #00ff88 !important;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.3) !important;
}

.btn-fetch-po {
  background: linear-gradient(135deg, #00d4ff, #0077ff);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-fetch-po:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

/* User Auth Header Status Pill */
.user-auth-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-user-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
}

.auth-status-dot {
  width: 7px;
  height: 7px;
  background: #00ff88;
  border-radius: 50%;
  box-shadow: 0 0 6px #00ff88;
}

.auth-user-email {
  font-size: 10px;
  font-weight: 700;
  color: #e2e8f0;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-logout-small, .btn-login-small {
  background: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  border: none;
  border-radius: 3px;
  font-size: 9px;
  padding: 2px 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-logout-small:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

.btn-login-small {
  background: rgba(0, 212, 255, 0.15);
  color: #00d4ff;
  font-weight: 700;
  padding: 4px 8px;
}

/* Security Gate Modal Backdrop */
.security-gate-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 16, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.security-gate-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(8, 12, 22, 0.98));
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 18px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 212, 255, 0.15);
  overflow: hidden;
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.security-card-header {
  background: rgba(0, 212, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.security-brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.security-shield-icon {
  font-size: 28px;
}

.security-brand-logo h2 {
  font-size: 16px;
  font-weight: 900;
  color: #f8fafc;
  letter-spacing: 1.5px;
  margin: 0;
}

.security-subtag {
  font-size: 9px;
  font-weight: 800;
  color: #00d4ff;
  letter-spacing: 0.8px;
}

.security-domain-pill {
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: #00d4ff;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.security-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.security-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

.btn-junior-bypass {
  width: 100%;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.5);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.btn-junior-bypass:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.45);
}

.btn-flash {
  font-size: 22px;
}

.bypass-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.bypass-text strong {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.bypass-text span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
}

.security-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 4px 0;
}

.security-divider::before, .security-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.security-divider span {
  padding: 0 10px;
  font-size: 10px;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.8px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-input-group label {
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 6px;
  display: block;
}

.auth-input-group input {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 10px 14px;
  color: #ffffff;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.auth-input-group input:focus {
  border-color: #00d4ff;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
}

.auth-error-banner {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-size: 11px;
  padding: 8px 12px;
  border-radius: 6px;
  line-height: 1.4;
}

.btn-verify-access {
  width: 100%;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 11px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-verify-access:hover {
  filter: brightness(1.15);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.4);
}

.whitelist-info-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
}

.info-title {
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
  display: block;
  margin-bottom: 6px;
}

.whitelist-tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.whitelist-tags li {
  font-size: 11px;
  color: #38bdf8;
  font-family: monospace;
}


