/* ==========================================================================
   AHRES GPS TRACKER - Signature Engineering by ahres.dev
   Hardware-Accelerated Automotive Telemetry & Security Engine
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@500;600;700;800&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  /* ahres.dev Cyber Emerald & Deep Matrix Palette */
  --bg-deep: #020703;
  --bg-primary: #030a05;
  --bg-secondary: #05140a;
  --bg-surface: rgba(4, 14, 7, 0.82);
  --bg-surface-hover: rgba(6, 22, 11, 0.94);
  --bg-surface-elevated: rgba(6, 22, 11, 0.96);
  --bg-glass: rgba(3, 10, 6, 0.85);
  --bg-glass-card: rgba(4, 16, 8, 0.78);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;

  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-bright: rgba(0, 255, 102, 0.3);
  --border-accent: rgba(0, 255, 102, 0.45);
  --border-glow: rgba(0, 255, 102, 0.45);

  /* ahres.dev Primary Neon Accents */
  --primary: #00ff66;
  --primary-rgb: 0, 255, 102;
  --primary-glow: rgba(0, 255, 102, 0.65);
  --secondary: #00f0ff;
  --secondary-rgb: 0, 240, 255;
  --secondary-glow: rgba(0, 240, 255, 0.55);
  --accent: #10b981;
  --accent-rgb: 16, 185, 129;

  --neon-blue: #00f0ff;
  --neon-blue-glow: rgba(0, 240, 255, 0.35);
  --neon-azure: #0284c7;
  --neon-emerald: #00ff66;
  --neon-emerald-glow: rgba(0, 255, 102, 0.45);
  --neon-amber: #f59e0b;
  --neon-crimson: #ef4444;
  --neon-purple: #8b5cf6;

  /* Elevation Shadows */
  --shadow-hud: 0 16px 36px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 255, 102, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  --shadow-neon: 0 0 20px rgba(0, 255, 102, 0.35);
  --shadow-drawer: 0 -12px 40px rgba(0, 0, 0, 0.8);

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --topbar-height: 68px;
  --sidebar-width: 440px;
}

[data-theme="light"] {
  --bg-deep: #e2e8f0;
  --bg-primary: #f1f5f9;
  --bg-secondary: #ffffff;
  --bg-surface: rgba(255, 255, 255, 0.85);
  --bg-surface-hover: rgba(241, 245, 249, 0.95);
  --bg-glass: rgba(255, 255, 255, 0.88);
  --bg-glass-card: rgba(255, 255, 255, 0.8);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --border-glass: rgba(0, 0, 0, 0.08);
  --border-glass-bright: rgba(0, 0, 0, 0.14);
  --border-accent: rgba(37, 99, 235, 0.4);

  --shadow-hud: 0 12px 30px rgba(0, 0, 0, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.8);
  --shadow-neon: 0 0 15px rgba(37, 99, 235, 0.2);
  --shadow-drawer: 0 -12px 40px rgba(0, 0, 0, 0.15);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* App Layout */
.app-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  position: relative;
  background: radial-gradient(circle at 50% 0%, rgba(14, 28, 54, 0.4) 0%, var(--bg-deep) 100%);
}

/* Topbar Header */
.topbar {
  height: var(--topbar-height);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.brand-logo-ahres {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(0, 255, 102, 0.08);
  border: 1px solid rgba(0, 255, 102, 0.35);
  border-radius: var(--radius-md);
  box-shadow: 0 0 16px rgba(0, 255, 102, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  transition: all var(--transition-smooth);
  flex-shrink: 0;
}

.brand-logo-ahres:hover {
  border-color: var(--primary);
  box-shadow: 0 0 24px rgba(0, 255, 102, 0.45);
  transform: scale(1.05);
}

.brand-titles-col {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

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

.brand-title-white {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #ffffff;
}

.brand-title-dev {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(0, 255, 102, 0.4));
}

.brand-author-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(0, 255, 102, 0.1);
  border: 1px solid rgba(0, 255, 102, 0.3);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.brand-author-link:hover {
  background: rgba(0, 255, 102, 0.25);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(0, 255, 102, 0.4);
}

.brand-sub-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-vehicle-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-hw-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--secondary);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

/* Sound Wave Bars matching ahres.dev */
.sound-wave-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
}

.sound-wave-bar {
  width: 2px;
  background: currentColor;
  border-radius: 1px;
  height: 3px;
  transition: height 0.2s ease;
}

.btn-icon.active .sound-wave-bar:nth-child(1) {
  animation: s-wave .8s infinite ease-in-out .1s;
}
.btn-icon.active .sound-wave-bar:nth-child(2) {
  animation: s-wave .8s infinite ease-in-out .3s;
}
.btn-icon.active .sound-wave-bar:nth-child(3) {
  animation: s-wave .8s infinite ease-in-out .2s;
}

@keyframes s-wave {
  0%, 100% { height: 3px; }
  50% { height: 11px; }
}

.topbar-stats {
  display: none;
  align-items: center;
  gap: 12px;
}

@media (min-width: 860px) {
  .topbar-stats {
    display: flex;
  }
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass);
  font-size: 13px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

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

.stat-pill .value {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--neon-blue);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: relative;
}

.status-online {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.status-online .status-dot {
  background-color: var(--neon-emerald);
  box-shadow: 0 0 10px var(--neon-emerald);
  animation: radarPulse 2s infinite;
}

.status-moving {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
}

.status-moving .status-dot {
  background-color: var(--neon-blue);
  box-shadow: 0 0 10px var(--neon-blue);
  animation: radarPulse 1.2s infinite;
}

.status-offline {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.2);
}

.status-offline .status-dot {
  background-color: #64748b;
}

@keyframes radarPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 210, 255, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(0, 210, 255, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 210, 255, 0); }
}

.badge-acc {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.acc-on {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.2));
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.acc-off {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.25);
}

/* Action Icon Buttons */
.btn-icon {
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.06);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-icon:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-glass-bright);
  transform: translateY(-1px);
}

/* Workspace & Map */
.workspace {
  position: relative;
  flex: 1;
  width: 100%;
  height: calc(100vh - var(--topbar-height));
  display: flex;
  overflow: hidden;
}

#map-container {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  background: #090d16;
  z-index: 10;
}

/* Dark mode map styling */
.map-dark-filter .leaflet-tile-pane {
  filter: brightness(0.65) invert(1) contrast(1.4) hue-rotate(200deg) saturate(0.4);
}

/* Floating Cockpit HUD Over the Map */
.cockpit-hud {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.hud-panel {
  pointer-events: auto;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-hud);
  display: flex;
  align-items: center;
  gap: 20px;
  animation: fadeInDown 0.4s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Circular Speed Gauge Widget */
.speed-gauge-widget {
  position: relative;
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gauge-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 6;
}

.gauge-progress {
  fill: none;
  stroke: url(#gauge-gradient);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  transition: stroke-dashoffset 0.5s ease-out;
}

.speed-gauge-text {
  position: absolute;
  text-align: center;
}

.speed-gauge-val {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.speed-gauge-unit {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

.hud-telemetry-data {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hud-device-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-details-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.hud-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.04);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-glass);
}

/* Floating Map Controls */
.map-floating-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-control-btn {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-hud);
  cursor: pointer;
  transition: all 0.2s ease;
}

.map-control-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--neon-blue);
  box-shadow: 0 0 16px var(--neon-blue-glow);
  transform: translateY(-2px);
}

.map-control-btn.active {
  background: linear-gradient(135deg, #00d2ff 0%, #3b82f6 100%);
  color: #ffffff;
  border-color: #00d2ff;
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.5);
}

/* Drawer / Dispatch Sidebar */
.panel-drawer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60vh;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index: 800;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-drawer);
  transition: transform 0.3s cubic-bezier(0.33, 1, 0.68, 1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

@media (min-width: 992px) {
  .panel-drawer {
    position: relative;
    width: var(--sidebar-width);
    height: 100%;
    border-radius: 0;
    border-top: none;
    border-left: 1px solid var(--border-glass);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  }
}

.drawer-handle {
  width: 100%;
  padding: 10px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: grab;
}

@media (min-width: 992px) {
  .drawer-handle {
    display: none;
  }
}

.handle-bar {
  width: 44px;
  height: 5px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-full);
}

/* Navigation Tabs */
.panel-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  background: rgba(10, 16, 26, 0.75);
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-glass);
  gap: 4px;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  transition: all 0.2s ease;
}

.tab-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(0, 255, 102, 0.18), rgba(0, 240, 255, 0.22));
  border-color: rgba(0, 255, 102, 0.45);
  box-shadow: 0 0 15px rgba(0, 255, 102, 0.15);
}

/* Model Features Preview Box in Modals */
.model-features-preview {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.model-features-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.model-features-category {
  color: var(--neon-cyan);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
}

.model-features-proto {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.model-features-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.model-feature-chip {
  padding: 3px 7px;
  border-radius: var(--radius-xs);
  font-size: 10px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border-glass);
}

.model-feature-chip.is-active {
  background: rgba(0, 255, 102, 0.12);
  color: var(--neon-emerald);
  border-color: rgba(0, 255, 102, 0.35);
}

.model-feature-chip.is-warn {
  background: rgba(245, 158, 11, 0.12);
  color: var(--neon-amber);
  border-color: rgba(245, 158, 11, 0.35);
}

.model-feature-note {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--neon-amber);
  background: rgba(245, 158, 11, 0.08);
  border-left: 2px solid var(--neon-amber);
  padding: 6px 8px;
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
}

/* Tab Content Areas */
.tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: none;
  scrollbar-width: thin;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Select & Input Controls */
.device-select-bar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.select-input, .input-field {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass-bright);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  outline: none;
  font-size: 13px;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.select-input:focus, .input-field:focus {
  border-color: #00d2ff;
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.3);
}

/* Glassmorphic Cards */
.telemetry-card {
  background: var(--bg-glass-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.card-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Modern Grid Cards */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.grid-item {
  background: rgba(8, 14, 24, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.2s ease;
}

.grid-item:hover {
  border-color: var(--border-glass-bright);
}

.grid-item .label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.grid-item .value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.grid-item .subtext {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #00d2ff 0%, #0072ff 100%);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(0, 114, 255, 0.35);
}

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

.btn-danger {
  background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(255, 65, 108, 0.35);
}

.btn-danger:hover {
  box-shadow: 0 6px 24px rgba(255, 75, 43, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-glass-bright);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* Filter Chips */
.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-chip:hover {
  border-color: var(--border-glass-bright);
  color: var(--text-primary);
}

.filter-chip.active {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.2), rgba(59, 130, 246, 0.3));
  color: #ffffff;
  border-color: #00d2ff;
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.3);
}

/* Playback Box */
.playback-box {
  background: var(--bg-glass-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.scrubber-slider {
  width: 100%;
  accent-color: #00d2ff;
  height: 6px;
  cursor: pointer;
}

/* Packet Terminal */
.packet-log {
  background: #04070c;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #38bdf8;
  height: 150px;
  overflow-y: auto;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* SMS Configurator List */
.sms-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sms-item {
  background: rgba(10, 16, 26, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s ease;
}

.sms-item:hover {
  border-color: var(--border-glass-bright);
}

.sms-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sms-code {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.4);
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
}

.sms-actions {
  display: flex;
  gap: 6px;
}

.sms-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Wiring Diagram */
.wiring-box {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
}

.wire-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border-glass);
}

.wire-item:last-child {
  border-bottom: none;
}

.wire-color {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 10px currentColor;
}

.wire-red { background: #ef4444; color: rgba(239, 68, 68, 0.5); }
.wire-black { background: #1e293b; border: 1px solid #475569; color: transparent; }
.wire-orange { background: #f97316; color: rgba(249, 115, 22, 0.5); }
.wire-yellow { background: #eab308; color: rgba(234, 179, 8, 0.5); }

/* Custom Futuristic Vehicle Marker on Map */
.custom-vehicle-div {
  background: transparent;
  border: none;
}

.vehicle-marker-container {
  position: relative;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vehicle-radar-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(0, 210, 255, 0.2);
  border: 1px solid rgba(0, 210, 255, 0.6);
  animation: radarExpand 2s infinite ease-out;
}

@keyframes radarExpand {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

.vehicle-marker {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d2ff 0%, #0052d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.8), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vehicle-marker svg {
  width: 22px;
  height: 22px;
}

/* Toast Notification System */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

/* Mobile Peek Header */
.mobile-peek-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 4px 16px;
  font-size: 13px;
  font-weight: 700;
}

@media (min-width: 992px) {
  .mobile-peek-info {
    display: none;
  }
}

.mobile-peek-info .value {
  font-family: var(--font-mono);
  color: var(--neon-blue);
}

/* Mobile Bottom Navigation (< 992px) */
.mobile-bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-glass-bright);
  z-index: 1100;
  padding: 0 10px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  justify-content: space-around;
  align-items: center;
}

@media (min-width: 992px) {
  .mobile-bottom-nav {
    display: none;
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 60px;
}

.mobile-nav-item:hover, .mobile-nav-item.active {
  color: var(--neon-blue);
}

.mobile-nav-item.active svg {
  stroke: var(--neon-blue);
  filter: drop-shadow(0 0 8px var(--neon-blue-glow));
}

/* Mobile Drawer Transformations */
@media (max-width: 991px) {
  .workspace {
    height: calc(100dvh - var(--topbar-height) - 64px);
  }

  .panel-drawer {
    height: 72vh;
    bottom: 64px;
    transform: translateY(calc(100% - 54px)); /* Collapsed peek bar by default */
  }

  .panel-drawer.drawer-expanded {
    transform: translateY(0);
  }

  .cockpit-hud {
    top: 12px;
    left: 12px;
    right: 70px;
  }

  .hud-panel {
    padding: 10px 14px;
    gap: 12px;
  }

  .speed-gauge-widget {
    width: 62px;
    height: 62px;
  }

  .speed-gauge-val {
    font-size: 18px;
  }

  .hud-device-name {
    font-size: 13px;
  }

  .btn-text-desktop {
    display: none;
  }
}

/* Modal Overlay & Card for Mobile Connect */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass-bright);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-glass);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.mobile-url-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.mobile-url-text {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;
  word-break: break-all;
}

.qr-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #ffffff;
  border-radius: var(--radius-md);
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.qr-box svg {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* APK Download Box in Modal & Settings */
.apk-download-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.apk-badge-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #10b981;
}

.apk-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

.btn-apk-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-apk-download:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
  color: #ffffff;
}

/* SPZ License Plate Badges */
.spz-pill-sm {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: #ffffff;
  color: #0f172a;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #94a3b8;
  margin-left: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.spz-input-wrapper {
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-glass-bright);
}

.spz-eu-badge {
  background: #1e3a8a;
  color: #fbbf24;
  font-size: 11px;
  font-weight: 900;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #3b82f6;
}

.spz-input {
  background: transparent !important;
  color: #0f172a !important;
  font-family: var(--font-mono) !important;
  font-weight: 800 !important;
  font-size: 14px !important;
  letter-spacing: 0.08em;
  border: none !important;
  box-shadow: none !important;
  text-transform: uppercase;
}

/* Alert Bell Button & Pulsing Counter */
.btn-alert-bell {
  position: relative;
}

.badge-alert-pill {
  position: absolute;
  top: -3px;
  right: -3px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
  animation: pulseBadge 1.8s infinite;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); box-shadow: 0 0 12px rgba(239, 68, 68, 0.9); }
}

/* Cockpit HUD Enhancements */
.hud-name-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-veh-icon {
  font-size: 16px;
}

.hud-badges-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.badge-guard {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.badge-guard.guard-off {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.badge-guard.guard-on {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

/* Parking Guard Map Control */
.map-control-btn.guard-active {
  background: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  border-color: #f59e0b;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.6);
  animation: pulseGuard 2s infinite ease-in-out;
}

@keyframes pulseGuard {
  0%, 100% { box-shadow: 0 0 10px rgba(245, 158, 11, 0.5); }
  50% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.9); }
}

/* Vehicle Editor Modal Grid & Color Picker */
.icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.icon-pick-btn {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-pick-btn:hover {
  border-color: #00d2ff;
  color: var(--text-primary);
  background: rgba(0, 210, 255, 0.08);
}

.icon-pick-btn.active {
  border-color: #00d2ff;
  background: rgba(0, 210, 255, 0.18);
  color: #00d2ff;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.icon-pick-btn .icon-emoji {
  font-size: 20px;
}

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

.color-pick-pill {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.color-pick-pill.active {
  border-color: #ffffff;
  box-shadow: 0 0 12px currentColor;
  transform: scale(1.2);
}

/* Custom Checkbox */
.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
}

.custom-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #00d2ff;
  cursor: pointer;
}

/* Alert Center Cards */
.modal-card-wide {
  max-width: 520px;
}

.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.alert-card {
  background: rgba(8, 14, 24, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
}

.alert-card.unread {
  border-left: 3px solid #00d2ff;
  background: rgba(0, 210, 255, 0.05);
}

.alert-card.type-geofence {
  border-left: 3px solid #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

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

.alert-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.alert-time {
  font-size: 11px;
  color: var(--text-muted);
}

.alert-msg {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.alert-card-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

/* ==========================================================================
   ahres.dev Visual Signatures, Grid Mesh & Corner Telemetry
   ========================================================================== */

/* Subtle Matrix Grid Mesh Overlay */
.grid-mesh {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: linear-gradient(to right, rgba(0, 255, 102, 0.02) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(0, 255, 102, 0.02) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  z-index: 400;
}

/* Corner Micro-Telemetry on Map */
.corner-telemetry {
  position: absolute;
  bottom: 18px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.85rem;
  background: rgba(3, 10, 6, 0.88);
  border: 1px solid rgba(0, 255, 102, 0.25);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
}

.corner-telemetry span.active-val,
.corner-telemetry a.active-val {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.corner-telemetry a.active-val:hover {
  text-decoration: underline;
  text-shadow: 0 0 8px var(--primary-glow);
}

.corner-left {
  left: 20px;
  display: none;
}

.corner-right {
  right: 64px;
  display: none;
}

@media (min-width: 1024px) {
  .corner-left,
  .corner-right {
    display: flex;
  }
}

/* Cockpit HUD Brand Tag */
.hud-brand-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: rgba(0, 255, 102, 0.08);
  border: 1px solid rgba(0, 255, 102, 0.25);
  border-radius: var(--radius-full);
  margin-top: 6px;
}

.hud-tech-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--secondary);
}

/* ahres.dev Signature Card in Settings */
.ahres-dev-card {
  border: 1px solid rgba(0, 255, 102, 0.35) !important;
  background: linear-gradient(145deg, rgba(6, 22, 11, 0.94) 0%, rgba(2, 10, 4, 0.96) 100%) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 102, 0.12) !important;
  position: relative;
  overflow: hidden;
}

.ahres-dev-card::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -40%;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(0, 255, 102, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.ahres-dev-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ahres-dev-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ahres-dev-glyph {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.ahres-dev-title-block {
  display: flex;
  flex-direction: column;
}

.ahres-dev-heading {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.ahres-dev-subheading {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--primary);
  font-weight: 500;
}

.ahres-dev-bio {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.ahres-specs-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
  margin-bottom: 14px;
}

.ahres-spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.ahres-spec-label {
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.ahres-spec-val {
  color: #ffffff;
  font-family: var(--font-mono);
  font-weight: 500;
}

.ahres-spec-val.highlight {
  color: var(--primary);
  font-weight: 700;
}

.ahres-dev-actions {
  display: flex;
  gap: 8px;
}

.btn-ahres-web {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(0, 255, 102, 0.12);
  border: 1px solid rgba(0, 255, 102, 0.4);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-ahres-web:hover {
  background: rgba(0, 255, 102, 0.24);
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(0, 255, 102, 0.35);
  color: #ffffff;
}

/* Sidebar & Mobile Drawer Brand Footer */
.sidebar-brand-footer {
  margin-top: 24px;
  padding: 16px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.footer-dev-line {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-bottom: 4px;
}

.footer-dev-link {
  color: var(--primary);
  font-family: var(--font-mono);
  font-weight: 700;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-dev-link:hover {
  color: #ffffff;
  text-shadow: 0 0 8px var(--primary);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}

/* ==========================================================================
   v0.7.0 ADVANCED FEATURES: Kniha Jízd, Imobilizér & HW Diagnostika ST-901L
   ========================================================================== */

/* Hardware Status Badges */
.badge-hw {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hw-power-ok {
  background: rgba(0, 255, 102, 0.12);
  color: var(--neon-emerald);
  border: 1px solid rgba(0, 255, 102, 0.35);
}

.hw-power-cut {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.6);
  animation: pulse-red 1.2s infinite ease-in-out;
}

.hw-relay-ok {
  background: rgba(0, 240, 255, 0.12);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 240, 255, 0.35);
}

.hw-relay-cut {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.6);
  animation: pulse-amber 1.5s infinite ease-in-out;
}

@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 4px rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 14px rgba(239, 68, 68, 0.85); }
}

@keyframes pulse-amber {
  0%, 100% { box-shadow: 0 0 4px rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 14px rgba(245, 158, 11, 0.85); }
}

/* Cockpit HUD Live Street Address */
.hud-address-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 3px 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  color: var(--text-secondary);
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-address-row svg {
  color: var(--primary);
  flex-shrink: 0;
}

.hud-address-row span {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Floating Immobilizer Map Control Button */
.btn-immobilizer {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

.btn-immobilizer.immobilized {
  background: rgba(239, 68, 68, 0.25) !important;
  color: #f87171 !important;
  border-color: #ef4444 !important;
  animation: pulse-red 1.2s infinite;
}

.btn-immobilizer:hover {
  border-color: #fbbf24;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.5);
}

/* Danger Button Style */
.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.5);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.4);
  color: #ffffff;
}

/* Trip Filter Pills */
.trip-filter-pills {
  display: flex;
  gap: 6px;
}

.trip-filter-pill {
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.trip-filter-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.trip-filter-pill.active {
  background: rgba(0, 255, 102, 0.15);
  color: var(--neon-emerald);
  border-color: var(--neon-emerald);
}

/* Trip Logbook Card List */
.trip-logbook-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.trip-card-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 12px;
  transition: all var(--transition-fast);
}

.trip-card-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 255, 102, 0.3);
}

.trip-card-item.active-trip {
  border-left: 3px solid var(--neon-emerald);
  background: rgba(0, 255, 102, 0.04);
}

.trip-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.trip-date-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.trip-type-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
}

.trip-type-badge.business {
  background: rgba(0, 240, 255, 0.12);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.trip-type-badge.private {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.trip-route-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.trip-endpoint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-primary);
}

.trip-dot-start {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neon-emerald);
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--neon-emerald);
}

.trip-dot-end {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
  box-shadow: 0 0 6px #ef4444;
}

.trip-metrics-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
}

.trip-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.trip-metric-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #ffffff;
}

.trip-actions-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.btn-trip-action {
  flex: 1;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all var(--transition-fast);
}

.btn-trip-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* User Profile Badge (Google OAuth) in Topbar */
.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 8px 3px 4px;
  background: rgba(0, 255, 102, 0.05);
  border: 1px solid rgba(0, 255, 102, 0.25);
  border-radius: 9999px;
  box-shadow: 0 0 10px rgba(0, 255, 102, 0.1);
}

.user-avatar-pic {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--neon-emerald);
}

.user-info-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}

.user-name {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
}

.user-email {
  font-size: 9px;
  font-family: var(--font-mono);
  color: var(--neon-emerald);
}

.btn-logout-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.btn-logout-icon:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
}

/* Fullscreen Google OAuth Security Lock Overlay */
.auth-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: radial-gradient(circle at center, rgba(3, 15, 6, 0.96) 0%, rgba(1, 4, 2, 0.99) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInAuth 0.3s ease-out;
}

@keyframes fadeInAuth {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(8, 14, 10, 0.85);
  border: 1px solid rgba(0, 255, 102, 0.3);
  box-shadow: 0 0 35px rgba(0, 255, 102, 0.15), 0 20px 40px rgba(0, 0, 0, 0.8);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-emerald), var(--neon-cyan), transparent);
}

.auth-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #ffffff;
  margin: 0;
  text-transform: uppercase;
}

.auth-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.auth-author-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--neon-emerald);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2px;
}

.auth-body {
  margin-top: 20px;
}

.auth-lock-status {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.lock-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(0, 255, 102, 0.1);
  border: 1px solid rgba(0, 255, 102, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-emerald);
  flex-shrink: 0;
}

.lock-status-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.lock-status-email {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--neon-cyan);
}

.auth-instruction {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.google-btn-container {
  display: flex;
  justify-content: center;
  margin: 16px 0;
  min-height: 44px;
}

.auth-error-box {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: #fca5a5;
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 16px;
  text-align: left;
}

.auth-dev-toggle {
  margin-top: 14px;
}

.btn-link-muted {
  background: none;
  border: none;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  padding: 4px;
  transition: color var(--transition-fast);
}

.btn-link-muted:hover {
  color: var(--neon-cyan);
}

.auth-manual-box {
  margin-top: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  text-align: left;
}

.auth-footer {
  margin-top: 22px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* Fleet Management & Vehicle Cards */
.fleet-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fleet-card {
  background: rgba(13, 22, 38, 0.75);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--transition-fast);
  position: relative;
  backdrop-filter: blur(8px);
}

.fleet-card:hover {
  border-color: rgba(0, 240, 255, 0.35);
  background: rgba(15, 27, 48, 0.85);
}

.fleet-card.is-active {
  border-color: var(--neon-emerald);
  box-shadow: 0 0 15px rgba(0, 255, 102, 0.15);
}

.fleet-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fleet-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.fleet-vehicle-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.fleet-card-title-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.fleet-vehicle-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fleet-vehicle-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-size: 11px;
}

.fleet-tracker-id {
  font-family: var(--font-mono);
  color: var(--neon-cyan);
  font-weight: 600;
}

.fleet-card-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 6px 12px;
  font-size: 11px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.fleet-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

/* SMS Commands Cards */
.sms-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sms-card {
  background: rgba(10, 18, 30, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--transition-fast);
}

.sms-card:hover {
  border-color: rgba(0, 240, 255, 0.3);
}

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

.sms-step-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(0, 240, 255, 0.15);
  color: var(--neon-cyan);
  font-family: var(--font-mono);
}

.sms-card-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.sms-card-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.35;
}

.sms-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}

.sms-code {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--neon-emerald);
  flex: 1;
  word-break: break-all;
}

.btn-sms-copy, .btn-sms-send {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  transition: all var(--transition-fast);
  text-decoration: none;
  border: none;
}

.btn-sms-copy {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-sms-copy:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--neon-cyan);
  color: #fff;
}

.btn-sms-send {
  background: rgba(0, 255, 102, 0.15);
  color: var(--neon-emerald);
  border: 1px solid rgba(0, 255, 102, 0.3);
}

.btn-sms-send:hover {
  background: rgba(0, 255, 102, 0.25);
  border-color: var(--neon-emerald);
  color: #fff;
}

/* User Management Card & List */
.users-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: border-color var(--transition-fast);
}

.user-card:hover {
  border-color: rgba(0, 255, 102, 0.3);
}

.user-card-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.user-card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  background: rgba(0, 255, 102, 0.12);
  color: var(--neon-emerald);
  border: 1px solid rgba(0, 255, 102, 0.3);
}

.user-card-avatar.is-admin {
  background: rgba(0, 240, 255, 0.12);
  color: var(--neon-cyan);
  border-color: rgba(0, 240, 255, 0.3);
}

.user-card-text {
  min-width: 0;
}

.user-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-card-name {
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-card-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge-role-admin {
  display: inline-block;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--radius-xs);
  background: rgba(0, 240, 255, 0.15);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.badge-role-user {
  display: inline-block;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--radius-xs);
  background: rgba(0, 255, 102, 0.12);
  color: var(--neon-emerald);
  border: 1px solid rgba(0, 255, 102, 0.3);
}

.user-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}



