/*
 * MotoMetrics - Brand Identity & Design System CSS
 * Enhanced with NHTSA Data Visualizations
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Orbitron:wght@400;600;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

body[data-app-loading="1"] {
  overflow: hidden;
}

.app-load-splash {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-color);
  background-image:
    radial-gradient(circle at 50% 0%, rgba(0, 210, 255, 0.14) 0%, transparent 58%),
    radial-gradient(circle at 12% 18%, rgba(99, 102, 241, 0.12) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  transition: opacity 0.38s ease, visibility 0.38s ease;
}

html[data-theme="light"] .app-load-splash {
  background-image:
    radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.12) 0%, transparent 58%),
    radial-gradient(circle at 12% 18%, rgba(99, 102, 241, 0.10) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
}

.app-load-splash--done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-load-splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-align: center;
  padding: 1.5rem;
}

.app-load-spinner {
  position: relative;
  width: 72px;
  height: 72px;
}

.app-load-spinner-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--accent-cyan);
  border-right-color: rgba(0, 210, 255, 0.35);
  animation: app-load-spin 0.95s linear infinite;
  box-shadow: 0 0 24px var(--accent-cyan-glow);
}

html[data-theme="light"] .app-load-spinner-ring {
  border-color: rgba(2, 6, 23, 0.08);
  border-top-color: var(--accent-cyan);
  border-right-color: rgba(2, 132, 199, 0.28);
}

.app-load-spinner-gauge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
}

.app-load-spinner-gauge svg {
  width: 28px;
  height: 28px;
  opacity: 0.95;
}

.app-load-brand {
  margin: 0;
  font-family: var(--font-hud);
  font-size: clamp(1.15rem, 4vw, 1.55rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--text-primary);
  background: linear-gradient(to right, #fff, var(--accent-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

html[data-theme="light"] .app-load-brand {
  background: linear-gradient(to right, #0f172a, #1e3a8a);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.app-load-brand span {
  color: var(--accent-cyan);
  -webkit-text-fill-color: var(--accent-cyan);
}

.app-load-status {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

@keyframes app-load-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-load-spinner-ring {
    animation: none;
    border-top-color: var(--accent-cyan);
  }
}

:root {
  --bg-color: #080c14;
  --bg-gradient-start: #080c14;
  --bg-gradient-end: #111827;
  --card-bg: rgba(17, 24, 39, 0.75);
  --card-border: rgba(255, 255, 255, 0.07);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --surface-0: rgba(0, 0, 0, 0.20);
  --surface-1: rgba(0, 0, 0, 0.25);
  --surface-2: rgba(255, 255, 255, 0.03);
  --border-soft: rgba(255, 255, 255, 0.08);
  --shadow-soft: rgba(0, 0, 0, 0.25);
  
  /* Brand Glow Accents */
  --accent-cyan: #00d2ff;
  --accent-cyan-glow: rgba(0, 210, 255, 0.35);
  
  --color-success: #10b981;
  --color-success-glow: rgba(16, 185, 129, 0.35);
  
  --color-warning: #f59e0b;
  --color-warning-glow: rgba(245, 158, 11, 0.35);
  
  --color-danger: #ef4444;
  --color-danger-glow: rgba(239, 68, 68, 0.35);
  
  --border-radius-lg: 16px;
  --border-radius-md: 10px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-hud: 'Orbitron', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* App chrome — identical across Drive / Simple / Advanced */
  --chrome-brand-logo-size: 36px;
  --chrome-brand-icon-size: 21px;
  --chrome-brand-title-size: clamp(1.08rem, 3.4vw, 1.4rem);
  --chrome-brand-gap: 0.65rem;
  --chrome-header-margin-bottom: 1rem;
  --chrome-header-padding-bottom: 0.85rem;
  --chrome-session-logo-size: 26px;
  --chrome-session-title-size: 0.82rem;
  --chrome-session-meta-size: 0.62rem;
  --chrome-session-padding: 0.35rem 0.45rem;
  --chrome-session-gap: 0.2rem;
  --chrome-garage-toggle-size: 2rem;
}

/* Light theme overrides */
html[data-theme="light"] {
  /* Brighter, less "grey sheet" background */
  --bg-color: #f7fbff;
  --bg-gradient-start: #f7fbff;
  --bg-gradient-end: #eef4ff;
  /* Slightly tinted cards to avoid flat grey */
  --card-bg: rgba(255, 255, 255, 0.92);
  --card-border: rgba(2, 6, 23, 0.10);
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --accent-cyan: #0284c7;
  --accent-cyan-glow: rgba(2, 132, 199, 0.22);
  /* High-contrast light surfaces (readable forms) */
  --surface-0: rgba(255, 255, 255, 0.75);
  --surface-1: rgba(255, 255, 255, 0.92);
  --surface-2: rgba(255, 255, 255, 0.80);
  --border-soft: rgba(2, 6, 23, 0.18);
  --shadow-soft: rgba(2, 6, 23, 0.08);
}

/* Light theme body background polish */
html[data-theme="light"] body {
  background-image:
    radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.12) 0%, transparent 58%),
    radial-gradient(circle at 12% 18%, rgba(99, 102, 241, 0.10) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
}

html[data-theme="light"] .brand-title {
  background: linear-gradient(to right, #0f172a, #1e3a8a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html[data-theme="light"] .brand-title span {
  background: linear-gradient(to right, var(--accent-cyan), #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  background-image: radial-gradient(circle at 50% 0%, rgba(0, 210, 255, 0.08) 0%, transparent 60%),
                    linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  padding-bottom: 2rem;
}

/* Base App Layout */
.app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--chrome-header-gap, 0.5rem);
  margin-bottom: var(--chrome-header-margin-bottom, 1rem);
  border-bottom: 1px solid var(--card-border);
  padding-bottom: var(--chrome-header-padding-bottom, 0.85rem);
}

.header-brand {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: var(--chrome-brand-gap, 0.65rem);
  min-width: 0;
}

.brand-text {
  min-width: 0;
  overflow: hidden;
}

.brand-tagline {
  margin: 0.15rem 0 0;
  font-size: 0.68rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.header-meta {
  margin: 0.4rem 0 0;
  padding-left: calc(var(--chrome-brand-logo-size, 36px) + var(--chrome-brand-gap, 0.65rem));
  font-size: 0.62rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  line-height: 1.35;
}

.header-meta-sep {
  margin: 0 0.2rem;
  opacity: 0.65;
}

.app-build-stamp {
  display: none;
  margin: 0;
}

.header-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex: 0 0 auto;
  flex-shrink: 0;
  padding-top: 0;
  width: auto;
  max-width: 62%;
}

.header-toolbar-primary {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.header-toolbar-mode {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  margin-left: auto;
}

.header-tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  line-height: 1;
}

.header-tool-pill--signed-in {
  border-color: rgba(0, 210, 255, 0.45);
  color: var(--accent-cyan);
}

.header-tool-pill [data-lucide] {
  width: 14px;
  height: 14px;
  opacity: 0.85;
}

.header-icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--text-primary);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.header-icon-btn [data-lucide] {
  width: 16px;
  height: 16px;
}

.header-icon-btn:hover {
  border-color: rgba(0, 210, 255, 0.45);
  background: rgba(0, 210, 255, 0.08);
}

.header-icon-btn:active {
  transform: scale(0.97);
}

.header-conn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  padding: 0.32rem 0.45rem;
  border-radius: 8px;
  line-height: 1;
  cursor: default;
  appearance: none;
  -webkit-appearance: none;
}

.header-conn--connect {
  cursor: pointer;
}

.header-conn--connect:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 210, 255, 0.06);
}

.header-conn--connect:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

.header-conn:disabled {
  opacity: 0.85;
  cursor: wait;
}

.header-conn .status-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  margin: 0;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.header-settings {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.header-select {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 0.3rem 0.35rem;
  max-width: 5.5rem;
}

.header-select#pref-country {
  max-width: 6.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .brand-tagline {
    display: none;
  }

  .header-meta {
    padding-left: 0;
    font-size: 0.58rem;
  }

  #app-version-updated {
    display: block;
    margin-top: 0.1rem;
  }

  .header-meta-sep:first-of-type {
    display: none;
  }

  .app-header {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: var(--chrome-header-margin-bottom, 1rem);
    padding-bottom: var(--chrome-header-padding-bottom, 0.85rem);
  }

  .header-brand {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 42%;
  }

  .brand-title {
    font-size: var(--chrome-brand-title-size, clamp(1.08rem, 3.4vw, 1.4rem));
  }

  .header-toolbar {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.2rem;
    max-width: none;
  }

  .header-toolbar-primary {
    flex-wrap: nowrap;
    gap: 0.2rem;
    min-width: 0;
    justify-content: flex-end;
  }

  .header-toolbar-mode {
    flex-shrink: 0;
    gap: 0.2rem;
  }

  .header-icon-btn,
  .header-tool-pill,
  .header-conn {
    min-width: 34px;
    min-height: 34px;
    padding: 0.3rem;
    font-size: 0.62rem;
  }

  .header-conn {
    padding: 0.3rem 0.42rem;
  }

  .ui-mode-toggle--icons .ui-mode-btn {
    width: 2.15rem;
    min-width: 2.15rem;
    min-height: 34px;
  }

  .header-select {
    max-width: 4.8rem;
    font-size: 0.6rem;
  }
}

/* Persistent vehicle context bar */
.vehicle-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: -0.25rem 0 0.85rem;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
  box-shadow: var(--shadow-soft);
}

.vehicle-bar--empty {
  opacity: 0.92;
}

.vehicle-bar--ready {
  border-color: rgba(0, 210, 255, 0.35);
}

html[data-theme="light"] .vehicle-bar--ready {
  border-color: rgba(2, 132, 199, 0.4);
}

.vehicle-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.vehicle-bar-main {
  min-width: 0;
  flex: 1;
}

.vehicle-bar-title-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.vehicle-make-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.vehicle-make-logo--sm {
  width: 22px;
  height: 22px;
}

.vehicle-make-monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 6px;
  font-family: var(--font-hud);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 210, 255, 0.45);
  background: rgba(0, 210, 255, 0.08);
}

.vehicle-make-monogram--sm {
  width: 22px;
  height: 22px;
  font-size: 0.62rem;
  border-radius: 5px;
}

.vehicle-make-logo.hidden,
.vehicle-make-monogram.hidden {
  display: none !important;
}

.vehicle-ecu-ymm-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex-shrink: 0;
}

.vehicle-bar-title {
  font-family: var(--font-hud);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.vehicle-bar-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.vehicle-bar-meta #vehicle-bar-vin:empty + .vehicle-bar-sep {
  display: none;
}

.vehicle-bar-meta #vehicle-bar-vin:empty {
  display: none;
}

.vehicle-bar-results-btn {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-family: var(--font-hud);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
  background: var(--surface-2);
  border: 1px solid rgba(0, 210, 255, 0.4);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.vehicle-bar-results-btn:hover {
  border-color: rgba(0, 210, 255, 0.65);
}

.vehicle-bar-scenario {
  color: var(--accent-cyan);
  font-weight: 600;
}

.app-top-nav.top-tabs {
  margin: 0 0 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-soft);
}

.session-context {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--chrome-session-gap, 0.2rem);
  margin: 0 0 0.2rem;
  padding: var(--chrome-session-padding, 0.35rem 0.45rem);
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}

.session-focus-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.garage-toggle-btn {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--chrome-garage-toggle-size, 2rem);
  height: var(--chrome-garage-toggle-size, 2rem);
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  color: var(--text-secondary);
  cursor: pointer;
}

.garage-toggle-btn:hover,
.garage-toggle-btn--open {
  border-color: rgba(0, 210, 255, 0.45);
  color: var(--accent-cyan);
  background: rgba(0, 210, 255, 0.08);
}

.garage-toggle-btn svg {
  width: 1rem;
  height: 1rem;
}

.garage-toggle-badge {
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  min-width: 0.95rem;
  height: 0.95rem;
  padding: 0 0.2rem;
  border-radius: 999px;
  background: var(--accent-cyan);
  color: #041018;
  font-size: 0.55rem;
  font-weight: 800;
  line-height: 0.95rem;
  text-align: center;
}

.session-focus-vehicle {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.session-focus-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.session-focus-title {
  font-family: var(--font-hud);
  font-size: var(--chrome-session-title-size, 0.82rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-focus-meta {
  margin-top: 0.06rem;
  font-size: var(--chrome-session-meta-size, 0.62rem);
  line-height: 1.25;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-focus-vehicle .vehicle-make-logo,
.session-focus-vehicle .vehicle-make-monogram {
  width: var(--chrome-session-logo-size, 26px);
  height: var(--chrome-session-logo-size, 26px);
}

.session-focus-vehicle .vehicle-make-monogram {
  font-size: 0.68rem;
  border-radius: 6px;
}

.session-focus-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.session-focus-results-btn {
  flex-shrink: 0;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 210, 255, 0.45);
  background: rgba(0, 210, 255, 0.1);
  color: var(--accent-cyan);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.session-focus-results-btn:hover {
  background: rgba(0, 210, 255, 0.18);
}

.garage-drawer {
  margin-top: 0.15rem;
  padding: 0.35rem;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
}

.garage-drawer-list {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.3rem;
  max-height: 11rem;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  margin: 0;
}

.garage-drawer-list .vehicle-garage-chip-row {
  max-width: none;
  width: 100%;
}

.garage-drawer-list .vehicle-garage-chip {
  min-width: 0;
  max-width: none;
  width: 100%;
  border-radius: 8px;
  border-right: 1px solid var(--border-soft);
}

.garage-drawer-list .vehicle-garage-chip-row .vehicle-garage-chip {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.garage-drawer-list .vehicle-garage-chip--add {
  width: 100%;
  max-width: none;
}

.garage-drawer-list .vehicle-garage-chip--expanded {
  gap: 0.35rem;
  padding: 0.55rem 0.65rem;
  align-items: stretch;
}

.vehicle-garage-chip-vin-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 0.12rem;
}

.vehicle-garage-chip-vin-label {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  flex-shrink: 0;
}

.vehicle-garage-chip-vin {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  word-break: break-all;
  flex: 1;
  min-width: 0;
  color: var(--text-primary);
  background: transparent;
  padding: 0;
}

.vehicle-garage-vin-copy {
  font: inherit;
  font-size: 0.58rem;
  font-weight: 600;
  padding: 0.14rem 0.42rem;
  border-radius: 4px;
  border: 1px solid var(--border-soft);
  background: var(--surface-3);
  color: var(--accent-cyan);
  cursor: pointer;
  flex-shrink: 0;
}

.vehicle-garage-vin-copy:hover {
  border-color: rgba(0, 210, 255, 0.45);
  background: rgba(0, 210, 255, 0.08);
}

.vehicle-garage-chip-spec {
  font-size: 0.6rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: block;
  width: 100%;
}

.vehicle-garage-chip-spec--pending {
  font-style: italic;
  opacity: 0.75;
}

body.garage-switch-loading #simple-dashboard,
body.garage-switch-loading #drive-dashboard,
body.garage-switch-loading .dashboard-grid {
  pointer-events: none;
  opacity: 0.55;
  transition: opacity 0.15s ease;
}

body.garage-switch-loading .vehicle-bar,
body.garage-switch-loading .session-focus-bar,
body.garage-switch-loading .garage-drawer {
  opacity: 1;
  pointer-events: auto;
}

.session-status-line {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.15rem 0.05rem 0;
  font-size: 0.62rem;
  line-height: 1.3;
  color: var(--text-muted);
}

.session-status-line.hidden {
  display: none;
}

.session-status-dot {
  flex-shrink: 0;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--text-muted);
}

.session-status-dot--live {
  background: var(--color-success);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.session-status-dot--saved {
  background: #f59e0b;
}

.session-status-dot--off {
  background: var(--text-muted);
  opacity: 0.65;
}

.session-status-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-bar.ui-advanced-only {
  display: none !important;
}

.session-vehicle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  min-width: 0;
}

.session-vehicle-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-left: auto;
}

.session-vehicle-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.session-status-panel {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.session-context-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.scenario-chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.66rem;
  font-weight: 600;
  padding: 0.26rem 0.48rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  color: var(--text-secondary);
  flex-shrink: 0;
  cursor: pointer;
  min-height: 0;
}

.scenario-chip-btn:hover {
  border-color: rgba(0, 210, 255, 0.45);
  color: var(--text-primary);
}

.scenario-chip-btn i,
.scenario-chip-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.scenario-popover {
  position: absolute;
  top: calc(100% + 0.3rem);
  right: 0;
  left: auto;
  z-index: 60;
  min-width: 11.5rem;
  padding: 0.3rem;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
  box-shadow: 0 8px 24px var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.scenario-popover[hidden],
.scenario-popover.hidden {
  display: none !important;
}

.scenario-option {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.55rem 0.65rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
}

.scenario-option:hover,
.scenario-option:focus-visible {
  background: var(--surface-2);
  outline: none;
}

.scenario-option[aria-selected="true"],
.scenario-option--active {
  background: rgba(0, 210, 255, 0.12);
  color: var(--accent-cyan);
  font-weight: 600;
}

.session-scenario-select--popover {
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 40px;
  font-size: 0.78rem;
}

.auto-analysis-strip {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
}

.auto-analysis-dot {
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: var(--text-muted);
}

.auto-analysis-kicker {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.12rem;
}

.auto-analysis-label {
  display: block;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-primary);
}

.auto-analysis-strip--live {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.06);
}

.auto-analysis-strip--live .auto-analysis-dot {
  background: var(--color-success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.auto-analysis-strip--learning {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.06);
}

.auto-analysis-strip--learning .auto-analysis-dot {
  background: var(--color-warning);
}

.auto-analysis-strip--warn {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.08);
}

.auto-analysis-strip--warn .auto-analysis-dot {
  background: var(--color-warning);
}

.auto-analysis-strip--off {
  opacity: 0.92;
}

.auto-analysis-strip--off .auto-analysis-dot {
  opacity: 0.55;
}

.session-context-scenario-label,
.vehicle-picker-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  flex-shrink: 0;
}

.session-scenario-select {
  font-size: 0.68rem;
  min-width: 10rem;
  max-width: 14rem;
  padding: 0.28rem 0.4rem;
}

.vehicle-picker-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.4rem;
  flex: 1 1 auto;
  min-width: 0;
}

.vehicle-picker-wrap.hidden,
.vehicle-ecu-summary.hidden {
  display: none !important;
}

.vehicle-picker-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  flex: 1 1 auto;
  min-width: 0;
}

.vehicle-picker-select {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text-primary);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 0.26rem 0.35rem;
  max-width: 5.5rem;
}

.vehicle-picker-select#ymm-year {
  max-width: 4.2rem;
}

.vehicle-picker-select#ymm-make {
  max-width: 6.5rem;
}

.vehicle-picker-select#ymm-model {
  max-width: 6rem;
}

.vehicle-picker-select#ymm-spec {
  max-width: 5rem;
}

.vehicle-picker-select:disabled {
  opacity: 0.45;
}

.vehicle-ecu-summary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.72rem;
  font-family: var(--font-mono);
}

.vehicle-ecu-ymm {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.78rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-ecu-vin {
  color: var(--text-muted);
  font-size: 0.6rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-vehicle-hint {
  margin: 0.3rem 0 0;
  font-size: 0.62rem;
  line-height: 1.35;
}

.session-vehicle-hint.hidden {
  display: none;
}

.vehicle-garage {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.vehicle-garage-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  overflow-x: auto;
  padding-bottom: 0;
  margin-top: 0;
  -webkit-overflow-scrolling: touch;
  align-items: stretch;
}

.vehicle-garage-chip-row {
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
  gap: 0;
  max-width: 11.5rem;
}

.vehicle-garage-chip-row .vehicle-garage-chip {
  flex: 1 1 auto;
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.vehicle-garage-chip-delete {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  padding: 0;
  border: 1px solid var(--border-soft);
  border-left: none;
  border-radius: 0 8px 8px 0;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
}

.vehicle-garage-chip-delete:hover {
  color: var(--color-danger);
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.08);
}

.vehicle-garage-chip-row:has(.vehicle-garage-chip--active) .vehicle-garage-chip-delete {
  border-color: rgba(0, 210, 255, 0.45);
}

.vehicle-garage-hidden-wrap {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border-soft);
}

.vehicle-garage-hidden-title {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.vehicle-garage-hidden-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
}

.vehicle-garage-hidden-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.vehicle-garage-restore-btn {
  flex-shrink: 0;
}

.vehicle-garage-chip--add {
  border-radius: 8px;
}
  border-style: dashed;
  opacity: 0.92;
  min-width: 4.5rem;
}

.vehicle-garage-chip--add .vehicle-garage-chip-label {
  color: var(--accent-cyan);
}

.session-vehicle-actions--garage {
  position: relative;
  flex-shrink: 0;
  margin-left: auto;
}

.vehicle-garage-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-cyan);
}

.vehicle-garage-hint {
  font-size: 0.6rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.vehicle-garage-chip {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  min-width: 6.75rem;
  max-width: 10rem;
  padding: 0.26rem 0.42rem;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  color: var(--text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.vehicle-garage-chip:hover {
  border-color: rgba(0, 210, 255, 0.45);
}

.vehicle-garage-chip--active {
  border-color: rgba(0, 210, 255, 0.55);
  background: rgba(0, 210, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(0, 210, 255, 0.12);
}

.vehicle-garage-chip-label {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.vehicle-garage-chip-meta {
  font-size: 0.58rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.vehicle-source-badge {
  font-size: 0.58rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-cyan);
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid rgba(0, 210, 255, 0.35);
  border-radius: 999px;
  padding: 0.12rem 0.4rem;
  flex-shrink: 0;
}

.session-change-vehicle-btn {
  font-size: 0.62rem !important;
  padding: 0.2rem 0.45rem !important;
}

.tab-btn.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .session-scenario-select {
    min-width: 100%;
    max-width: 100%;
  }

  .vehicle-picker-row {
    width: 100%;
  }

  .vehicle-picker-select {
    flex: 1 1 calc(50% - 0.25rem);
    max-width: none;
  }
}

html[data-theme="light"] .vehicle-bar-results-btn {
  border-color: rgba(2, 132, 199, 0.45);
}

/* Top tabs */
.top-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0 0 0.5rem;
}

.tab-btn {
  font-size: 0.72rem;
  font-family: var(--font-hud);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tab-btn.active {
  color: var(--text-primary);
  border-color: rgba(0, 210, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.12);
}

html[data-theme="light"] .tab-btn.active {
  border-color: rgba(2, 132, 199, 0.55);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14);
}

/* Tab visibility */
[data-tab] { display: none; }
body[data-active-tab="settings"] [data-tab="settings"],
body[data-active-tab="capture"] [data-tab="capture"],
body[data-active-tab="analyze"] [data-tab="analyze"],
body[data-active-tab="live-data"] [data-tab="live-data"],
body[data-active-tab="data-stream"] [data-tab="data-stream"],
body[data-active-tab="invoice"] [data-tab="invoice"],
body[data-active-tab="maintenance"] [data-tab="maintenance"],
body[data-active-tab="sessions"] [data-tab="sessions"],
body[data-active-tab="admin"] [data-tab="sessions"] {
  display: block;
}

body[data-active-tab="maintenance"] .dashboard-grid,
body[data-active-tab="maintenance"] #simple-dashboard,
body[data-active-tab="maintenance"] #drive-dashboard {
  display: none !important;
}

body[data-active-tab="maintenance"] #maintenance-dashboard {
  display: block !important;
}

body[data-active-tab="settings"] #focus-settings-dashboard {
  display: block !important;
}

body[data-active-tab="settings"] #focus-settings-dashboard.hidden {
  display: block !important;
}

body[data-active-tab="settings"] #focus-settings-dashboard .panel,
body[data-active-tab="settings"] #focus-settings-dashboard .focus-settings-head {
  display: block;
}

.admin-only-block,
.admin-only-hint {
  display: block;
}

.admin-toolbar-admin-only {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

button.header-tool-pill {
  cursor: pointer;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  font: inherit;
  color: inherit;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

button.header-tool-pill:hover {
  border-color: rgba(0, 210, 255, 0.45);
}

/* In tab mode, stack columns for simplicity */
body[data-active-tab] .dashboard-grid {
  grid-template-columns: 1fr;
}

.brand-logo {
  flex-shrink: 0;
  width: var(--chrome-brand-logo-size, 36px);
  height: var(--chrome-brand-logo-size, 36px);
  background: linear-gradient(135deg, var(--accent-cyan), #3b82f6);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--accent-cyan-glow);
}

.brand-logo svg {
  width: var(--chrome-brand-icon-size, 21px);
  height: var(--chrome-brand-icon-size, 21px);
  stroke: #080c14;
}

.brand-logo-mark {
  display: none;
  width: var(--chrome-brand-icon-size, 21px);
  height: var(--chrome-brand-icon-size, 21px);
  object-fit: contain;
}

.brand-title {
  font-family: var(--font-hud);
  font-size: var(--chrome-brand-title-size, clamp(1.08rem, 3.4vw, 1.4rem));
  font-weight: 900;
  letter-spacing: -0.05em;
  background: linear-gradient(to right, #ffffff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.brand-title span {
  background: linear-gradient(to right, var(--accent-cyan), #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Panel buttons (not header toolbar) */
.telemetry-btn {
  font-size: 0.7rem;
  font-family: var(--font-hud);
  font-weight: 600;
  color: var(--text-primary);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.telemetry-btn:active {
  background: rgba(0, 210, 255, 0.12);
  border-color: var(--accent-cyan);
}

.scenario-vin-block {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 0.75rem;
  background: var(--surface-1);
}

.scenario-vin-intro {
  margin: 0.25rem 0 0.6rem;
}

.vin-location-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.65rem;
}

.scenario-vin-input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
}

.scenario-vin-field-grow {
  flex: 1;
  min-width: 200px;
}

.vin-verify-status {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.vin-verify-status.vin-verify-ok {
  color: var(--accent-green, #3dd68c);
}

.vin-verify-status.vin-verify-warn {
  color: #e6a817;
}

html[data-theme="light"] .vin-verify-status.vin-verify-ok {
  color: #047857;
}

html[data-theme="light"] .vin-verify-status.vin-verify-warn {
  color: #b45309;
}

.scenario-vin-photo-hint {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.72rem;
}

.scenario-vin-photo-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.scenario-vin-photo-card {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  overflow: hidden;
}

.scenario-vin-photo-card img {
  width: 100%;
  height: 88px;
  object-fit: cover;
  display: block;
}

.scenario-vin-photo-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  word-break: break-all;
  flex: 1;
  min-width: 0;
}

.scenario-media-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
}

.scenario-media-remove-btn {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.scenario-media-remove-btn:hover {
  color: var(--color-danger);
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.08);
}

.scenario-vin-photo-card-meta {
  font-size: 0.62rem;
  font-family: var(--font-mono);
  padding: 0.25rem 0.45rem 0.4rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.scenario-vin-photo-actions label {
  display: block;
  font-size: 0.72rem;
  margin-bottom: 0.25rem;
}

.scenario-issue-textarea {
  min-height: 4.5rem;
}

.telemetry-review-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.telemetry-review-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.telemetry-meta-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
}

.telemetry-meta-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.telemetry-meta-val {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-primary);
}

.telemetry-review-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 0.75rem;
}

.telemetry-review-list {
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  max-height: 360px;
  overflow: auto;
  padding: 0.5rem;
}

.telemetry-record-item {
  width: 100%;
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

.telemetry-record-item:active {
  border-color: var(--accent-cyan);
  background: rgba(0, 210, 255, 0.08);
}

.telemetry-record-title {
  font-family: var(--font-hud);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.telemetry-record-sub {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  word-break: break-word;
}

.financial-report-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.financial-report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.financial-report-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-muted);
}

.financial-directive-badge {
  font-family: var(--font-hud);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(0, 210, 255, 0.12);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
}

.financial-directive-badge.critical,
.financial-directive-badge.stop-sale {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--color-danger);
  color: #fca5a5;
}

.financial-summary-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.financial-metric {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
}

.financial-metric-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.financial-metric-value {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.financial-metric-value.exposure {
  color: #fbbf24;
}

.financial-ui-narrative {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 0.65rem;
}

.financial-exposure-reasons {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-secondary);
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.06);
}

.financial-exposure-reasons.hidden {
  display: none;
}

.financial-exposure-reasons ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

.financial-exposure-reasons li + li {
  margin-top: 0.25rem;
}

.financial-line-copy {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.financial-line-items {
  list-style: none;
  max-height: 160px;
  overflow-y: auto;
}

.financial-line-item {
  display: flex;
  gap: 0.5rem;
  font-size: 0.72rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.financial-line-amt {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-cyan);
  min-width: 4.5rem;
}

.financial-line-item.oop .financial-line-amt {
  color: #fbbf24;
}

@media (max-width: 640px) {
  .financial-summary-row {
    grid-template-columns: 1fr;
  }
}

/* Admin panel */
.admin-hint {
  margin-bottom: 0.75rem;
}

.admin-env-banner {
  font-size: 0.78rem;
  line-height: 1.45;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border-soft);
}

.admin-env-banner.hidden {
  display: none;
}

.admin-env-warn {
  background: rgba(230, 168, 23, 0.12);
  border-color: rgba(230, 168, 23, 0.45);
  color: var(--text-primary);
}

html[data-theme="light"] .admin-env-warn {
  background: rgba(180, 120, 0, 0.1);
}

.admin-env-info {
  background: rgba(0, 210, 255, 0.08);
  border-color: rgba(0, 210, 255, 0.35);
}

.admin-key-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.admin-key-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-key-input {
  flex: 1;
  min-width: 180px;
  max-width: 320px;
}

.admin-status {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.admin-stat-card {
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
}

.admin-stat-card.admin-stat-wide {
  grid-column: span 2;
}

.admin-stat-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
}

.admin-stat-val {
  font-family: var(--font-hud);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.admin-type-breakdown {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.admin-kb-section {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 210, 255, 0.25);
  background: var(--surface-1);
}

.admin-capture-section {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(120, 200, 120, 0.35);
  background: var(--surface-1);
}

.admin-capture-hint {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin: 0 0 0.75rem;
  line-height: 1.45;
}

.admin-capture-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.admin-capture-progress-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-capture-empty {
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 0.5rem 0;
}

.admin-capture-card {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 0.75rem;
  background: var(--surface-2);
}

.admin-capture-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.admin-capture-vehicle {
  margin: 0;
  font-size: 0.95rem;
}

.admin-capture-vin {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.admin-capture-score-pill {
  flex-shrink: 0;
  font-family: var(--font-hud);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 210, 255, 0.12);
  border: 1px solid rgba(0, 210, 255, 0.35);
}

.admin-capture-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-1);
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.admin-capture-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(0, 210, 255, 0.85), rgba(80, 220, 140, 0.85));
}

.admin-capture-progress-label {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.admin-capture-modality-block {
  margin-bottom: 0.65rem;
}

.admin-capture-modalities {
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-capture-modality {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  padding: 0.22rem 0;
  font-size: 0.74rem;
  line-height: 1.4;
}

.admin-capture-modality--done {
  color: var(--text-secondary);
}

.admin-capture-modality--partial {
  color: var(--text-primary);
}

.admin-capture-modality-mark {
  flex-shrink: 0;
  width: 1rem;
  text-align: center;
  font-weight: 700;
}

.admin-capture-modality--done .admin-capture-modality-mark {
  color: rgba(80, 220, 140, 0.95);
}

.admin-capture-modality--partial .admin-capture-modality-mark {
  color: rgba(255, 190, 80, 0.95);
}

.admin-diag-card {
  border-color: rgba(0, 210, 255, 0.22);
}

.admin-diag-health-pill {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-family: var(--font-hud);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
}

.admin-diag-health--good {
  background: rgba(80, 220, 140, 0.12);
  border-color: rgba(80, 220, 140, 0.35);
}

.admin-diag-health--partial {
  background: rgba(255, 190, 80, 0.12);
  border-color: rgba(255, 190, 80, 0.35);
}

.admin-diag-health--poor {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
}

.admin-diag-monitor-line {
  margin: 0 0 0.55rem;
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.admin-diag-issue {
  color: rgba(239, 68, 68, 0.95);
}

.admin-diag-ok {
  color: var(--text-secondary);
}

.admin-diag-issues {
  margin-top: 0.35rem;
}

.admin-diag-scan-meta {
  color: var(--text-secondary);
  font-size: 0.68rem;
}

.admin-capture-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 720px) {
  .admin-capture-columns {
    grid-template-columns: 1fr;
  }
}

.admin-capture-subtitle {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-family: var(--font-hud);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.admin-capture-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.74rem;
  line-height: 1.45;
}

.admin-capture-next {
  color: var(--text-primary);
}

.admin-capture-details {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.admin-capture-details summary {
  cursor: pointer;
  user-select: none;
}

.admin-capture-milestones {
  margin: 0.45rem 0 0;
  padding: 0;
  list-style: none;
}

.admin-capture-milestone {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  padding: 0.25rem 0;
}

.admin-capture-milestone--done {
  color: var(--text-secondary);
}

.admin-capture-milestone-mark {
  flex-shrink: 0;
  width: 1rem;
  text-align: center;
  font-weight: 700;
}

.admin-capture-milestone--done .admin-capture-milestone-mark {
  color: rgba(80, 220, 140, 0.95);
}

.admin-kb-title {
  font-size: 0.8rem;
  font-family: var(--font-hud);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.35rem;
}

.admin-kb-hint {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin: 0 0 0.6rem;
}

.admin-kb-grid {
  margin-bottom: 0;
}

.admin-stat-mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.admin-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
}

.admin-filter-select {
  width: auto;
  min-width: 130px;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 0.75rem;
}

.admin-list {
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  max-height: 420px;
  overflow: auto;
  padding: 0.5rem;
}

.admin-record-item {
  width: 100%;
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.45rem;
  cursor: pointer;
  color: var(--text-primary);
}

.admin-record-item.active,
.admin-record-item:hover {
  border-color: rgba(0, 210, 255, 0.45);
  background: rgba(0, 210, 255, 0.06);
}

.admin-record-item--invoice {
  opacity: 0.82;
  border-style: dashed;
}

.admin-record-item--invoice .admin-record-type {
  color: var(--text-muted);
}

.admin-record-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.admin-record-type {
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent-cyan);
}

.admin-record-score {
  font-family: var(--font-hud);
  font-weight: 700;
}

.admin-record-vehicle {
  font-size: 0.78rem;
  margin: 0.2rem 0;
}

.admin-record-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.admin-sync-pill {
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.admin-sync-cloud {
  color: var(--accent-green);
}

.admin-sync-local-only {
  color: var(--accent-amber, #e6a817);
}

.admin-empty {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.5rem;
}

.admin-detail-summary {
  margin-bottom: 0.75rem;
}

.admin-analysis-trace-panel {
  margin-bottom: 0.75rem;
  max-height: 320px;
  overflow: auto;
}

.admin-trace-block-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0 0 0.35rem;
}

.admin-trace-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
}

.admin-trace-total {
  font-size: 0.85rem;
}

.admin-trace-meta {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.admin-trace-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-trace-step {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  background: var(--surface-1);
}

.admin-trace-step--error {
  border-color: rgba(220, 53, 69, 0.45);
}

.admin-trace-step-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
  font-size: 0.76rem;
}

.admin-trace-step-name {
  font-weight: 600;
  flex: 1 1 auto;
}

.admin-trace-step-ms {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.admin-trace-step-status {
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: var(--surface-2);
}

.admin-trace-step-status--ok {
  color: var(--color-success, #198754);
}

.admin-trace-step-status--error {
  color: var(--color-danger, #dc3545);
}

.admin-trace-step-detail {
  margin: 0.35rem 0 0;
  font-size: 0.68rem;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-muted);
  background: transparent;
  border: none;
  padding: 0;
}

.admin-trace-pill {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.admin-trace-empty {
  margin: 0;
  font-size: 0.75rem;
}

.admin-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 0.75rem;
  font-size: 0.78rem;
}

.admin-detail-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.admin-detail-tab-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0.5rem 0 0.25rem;
  display: block;
}

.admin-json {
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 0.6rem;
  font-size: 0.68rem;
  max-height: 220px;
  overflow: auto;
  margin: 0 0 0.5rem;
}

.admin-reanalysis-out {
  max-height: 160px;
}

@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-detail-grid {
    grid-template-columns: 1fr;
  }
}

.telemetry-review-json {
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  max-height: 360px;
  overflow: auto;
  padding: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-primary);
}

@media (max-width: 980px) {
  .telemetry-review-meta {
    grid-template-columns: 1fr;
  }
  .telemetry-review-grid {
    grid-template-columns: 1fr;
  }
}

/* Glassmorphism Panel styles */
.panel {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: 0 10px 30px var(--shadow-soft);
  transition: var(--transition-smooth);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 0.75rem;
}

.panel-header--inline {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

.panel-header--inline .btn-small {
  width: auto;
  flex-shrink: 0;
}

.panel-title {
  font-family: var(--font-hud);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-title svg {
  width: 18px;
  height: 18px;
  color: var(--accent-cyan);
}

/* Dashboard Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 992px) {
  .dashboard-grid {
    grid-template-columns: 1.1fr 1.9fr;
  }
}

.column-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.column-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Calibration and Connection Deck */
.connection-widget {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mode-toggle-group {
  display: flex;
  background: var(--surface-1);
  padding: 0.3rem;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--card-border);
}

.mode-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.mode-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-cyan);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.connection-mode-hint {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0.35rem 0 0.65rem;
}

.mode-toggle-group--triple .mode-btn {
  font-size: 0.78rem;
  padding: 0.45rem 0.35rem;
}

.ble-adapter-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin: -0.35rem 0 0.15rem;
}

.ble-adapter-meta.hidden {
  display: none !important;
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent-cyan);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.btn-link:hover {
  color: var(--text-primary);
}

.wifi-deck {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.wifi-deck.hidden {
  display: none !important;
}

.wifi-deck-intro code {
  font-size: 0.85em;
}

#sim-deck-controls.hidden {
  display: none !important;
}

.sim-mode-banner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.5rem 1rem;
  background: linear-gradient(90deg, rgba(0, 210, 255, 0.12), rgba(120, 80, 255, 0.08));
  border-bottom: 1px solid rgba(0, 210, 255, 0.25);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.sim-mode-banner.hidden {
  display: none !important;
}

body[data-connection-mode="sim"] .sim-mode-banner {
  display: flex;
}

.sim-mode-banner-icon {
  color: var(--accent-cyan);
  font-size: 1rem;
}

.sim-mode-banner-text {
  flex: 1;
  min-width: 12rem;
}

.sim-mode-banner-copy {
  flex: 1;
  min-width: 10rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sim-mode-banner-vehicle {
  font-family: var(--font-hud);
  font-weight: 700;
  color: var(--accent-cyan);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sim-mode-exit-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

body.live-obd-disabled .ui-live-obd-only:not(#mode-sim-btn):not(#sim-mode-exit-live) {
  opacity: 0.42;
  pointer-events: none;
  filter: grayscale(0.35);
}

body.live-obd-disabled .sim-live-hint {
  display: block !important;
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.06);
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
}

.garage-chip-demo-tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.15);
  border: 1px solid rgba(167, 139, 250, 0.35);
}

.invoice-fleet-tag {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.invoice-fleet-tag--demo {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.3);
}

.invoice-fleet-tag--live {
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.sim-deck-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.sim-deck-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(0, 210, 255, 0.15);
  border: 1px solid rgba(0, 210, 255, 0.35);
  color: var(--accent-cyan);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sim-deck-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.sim-path-steps {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px dashed rgba(0, 210, 255, 0.2);
  border-radius: var(--border-radius-md);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.sim-path-steps li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sim-path-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: rgba(0, 210, 255, 0.12);
  border: 1px solid rgba(0, 210, 255, 0.3);
  color: var(--accent-cyan);
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}

.sim-profile-detail {
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: rgba(0, 210, 255, 0.04);
  border: 1px solid rgba(0, 210, 255, 0.15);
  border-radius: var(--border-radius-md);
  font-size: 0.72rem;
}

.sim-profile-detail-grid {
  display: grid;
  gap: 0.35rem;
}

.sim-profile-detail-label {
  display: inline-block;
  min-width: 6.5rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  margin-right: 0.35rem;
}

/* Simulator Car Selectors */
.sim-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 480px) {
  .sim-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.sim-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-md);
  padding: 0.75rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: left;
}

.sim-card:hover {
  background: rgba(0, 210, 255, 0.03);
  border-color: rgba(0, 210, 255, 0.25);
  transform: translateY(-2px);
}

.sim-card.active {
  background: rgba(0, 210, 255, 0.06);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.15);
}

.sim-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem;
  width: 100%;
}

.sim-card-title {
  font-family: var(--font-hud);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 0;
  flex: 1 1 auto;
}

.sim-card-score {
  font-family: var(--font-hud);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-cyan);
  line-height: 1.1;
  flex-shrink: 0;
}

.sim-card-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.sim-card-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 0.25rem;
}

.sim-card.active .sim-card-label {
  color: var(--accent-cyan);
}

.demo-showcase-launch {
  margin: 0.75rem 0 0.5rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 210, 255, 0.22);
  background: rgba(0, 210, 255, 0.04);
}

.demo-showcase-cta {
  width: 100%;
  max-width: 22rem;
  margin: 0.5rem auto 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.88rem;
}

.simple-hero-empty .demo-showcase-cta {
  margin-top: 0.75rem;
}

.demo-showcase-hint {
  margin: 0.45rem auto 0;
  max-width: 22rem;
  font-size: 0.76rem;
  text-align: center;
  line-height: 1.4;
}

.demo-showcase-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.65rem 0;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
}

.demo-showcase-nav-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  flex: 1 1 8rem;
}

.header-tool-pill--demo {
  border-color: rgba(0, 210, 255, 0.35);
  background: rgba(0, 210, 255, 0.08);
  font-size: 0.68rem;
  padding: 0.32rem 0.45rem;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.header-tool-pill--demo.header-tool-pill--demo-active,
body.demo-mode-active .header-tool-pill--demo {
  border-color: var(--accent-cyan);
  background: rgba(0, 180, 255, 0.24);
  color: #0077a8;
  box-shadow:
    0 0 0 1px rgba(0, 210, 255, 0.5),
    0 0 14px rgba(0, 180, 255, 0.28);
}

.header-tool-pill--demo.header-tool-pill--demo-active svg,
body.demo-mode-active .header-tool-pill--demo svg {
  color: var(--accent-cyan);
  stroke: var(--accent-cyan);
}

.header-tool-pill--demo .header-tool-pill-text {
  font-size: 0.68rem;
}

.header-tool-pill--demo [data-lucide] {
  width: 13px;
  height: 13px;
}

.mode-btn.mode-btn--demo-active,
body.demo-mode-active #mode-sim-btn.active {
  border-color: var(--accent-cyan);
  background: rgba(0, 180, 255, 0.2);
  color: #0077a8;
  box-shadow: inset 0 0 0 1px rgba(0, 210, 255, 0.35);
}

.simple-score-val--high {
  color: var(--color-success);
}

.simple-score-val--mid {
  color: var(--color-warning);
}

.simple-score-val--low {
  color: var(--color-danger);
}

.simple-hero-scored .simple-score-val {
  font-family: var(--font-hud);
  font-size: clamp(2.5rem, 12vw, 3.5rem);
  font-weight: 900;
  line-height: 1;
}

.health-score-exposure {
  margin: 0 0 0.85rem;
}

.health-score-exposure .unified-money-grid {
  margin: 0;
}

.health-score-math {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin: -0.35rem 0 0.85rem;
  padding: 0.45rem 0.55rem;
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}

.health-score-empty {
  margin: 0;
}

body[data-demo-showcase="1"] .sim-mode-banner {
  border-color: rgba(0, 210, 255, 0.45);
}

.sim-demo-panel {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-soft);
}

.sim-demo-intro {
  margin-bottom: 0.65rem;
  font-size: 0.78rem;
  line-height: 1.45;
}

.sim-demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.sim-demo-run-btn {
  flex: 1 1 auto;
  min-height: 44px;
  font-size: 0.82rem;
}

.sim-demo-status {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.sim-demo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.sim-demo-thumb {
  width: 96px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
}

.sim-demo-thumb img {
  display: block;
  width: 100%;
  height: 64px;
  object-fit: cover;
  background: #0f172a;
}

.sim-demo-thumb-audio {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  color: var(--accent-cyan);
  font-size: 0.62rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sim-demo-thumb-label {
  font-size: 0.58rem;
  padding: 0.25rem 0.35rem;
  color: var(--text-muted);
  line-height: 1.2;
}

/* Connect button */
.connect-btn {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #3b82f6 100%);
  color: #080c14;
  font-family: var(--font-hud);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.05em;
  border: none;
  border-radius: var(--border-radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: 0 4px 20px var(--accent-cyan-glow);
  position: relative;
  overflow: hidden;
}

.connect-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 30%;
  height: 200%;
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(30deg);
  transition: none;
}

.connect-btn:hover::after {
  left: 130%;
  transition: all 0.8s ease-in-out;
}

.connect-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 210, 255, 0.5);
}

.connect-btn.connected {
  background: linear-gradient(135deg, var(--color-success) 0%, #059669 100%);
  box-shadow: 0 4px 20px var(--color-success-glow);
}

.connect-btn:active {
  transform: translateY(1px);
}

.scan-history-btn {
  margin-bottom: 0.65rem;
}

.vin-auto-panel {
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
  padding: 0.75rem;
  border-radius: var(--border-radius-md);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 210, 255, 0.15);
}

.vin-group {
  margin-bottom: 0.35rem;
}

.vin-field {
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.vin-decode-status {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.vin-decode-status.success {
  color: var(--color-success);
}

.vin-decode-status.error {
  color: #fca5a5;
}

.prefs-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.prefs-panel .form-group label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  display: block;
  margin-bottom: 0.25rem;
}

.prefs-panel select.input-field {
  width: 100%;
  font-size: 0.8rem;
}

.connect-btn.secondary-connect {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  font-size: 0.85rem;
  padding: 0.65rem 0.9rem;
}

.connect-btn.secondary-connect:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.15);
}

html[data-theme="light"] .connect-btn.secondary-connect {
  background: var(--surface-1);
  color: var(--text-primary);
  border: 1.5px solid rgba(2, 6, 23, 0.28);
  box-shadow: 0 1px 2px rgba(2, 6, 23, 0.06);
}

html[data-theme="light"] .connect-btn.secondary-connect:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 210, 255, 0.06);
  box-shadow: 0 0 0 1px rgba(0, 210, 255, 0.25);
}

.stream-buffer-panel {
  margin-top: 0.75rem;
}

.stream-buffer-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.stream-buffer-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text-secondary);
  font-family: var(--font-sans);
}

.elm-stream-buffer-view {
  width: 100%;
  min-height: 140px;
  max-height: 220px;
  resize: vertical;
  background: #03060c;
  border: 1px solid rgba(0, 210, 255, 0.2);
  border-radius: var(--border-radius-md);
  color: #fde68a;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.45;
  padding: 0.65rem 0.75rem;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.85);
}

html[data-theme="light"] .elm-stream-buffer-view {
  background: var(--surface-1);
  border-color: var(--border-soft);
  color: var(--text-primary);
  box-shadow: inset 0 2px 10px var(--shadow-soft);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-danger);
  box-shadow: 0 0 10px var(--color-danger-glow);
}

.status-dot.active {
  background: var(--color-success);
  box-shadow: 0 0 10px var(--color-success-glow);
  animation: pulse 1.5s infinite alternate;
}

.status-dot.connecting {
  background: var(--color-warning);
  box-shadow: 0 0 10px var(--color-warning-glow);
  animation: pulse 0.7s infinite alternate;
}

.status-dot.saved {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.35);
}

@keyframes pulse {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

/* Retro Live Terminal Canvas */
.terminal-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

.terminal-box {
  background: #040810;
  border: 1px solid rgba(0, 210, 255, 0.15);
  border-radius: var(--border-radius-md);
  padding: 1rem;
  height: 240px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #a7f3d0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.8);
}

html[data-theme="light"] .terminal-box {
  background: var(--surface-1);
  border-color: var(--border-soft);
  color: var(--text-primary);
  box-shadow: inset 0 2px 10px var(--shadow-soft);
}

html[data-theme="light"] .terminal-line.rx {
  color: #065f46;
}

html[data-theme="light"] .terminal-line.sys {
  color: rgba(15, 23, 42, 0.70);
}

html[data-theme="light"] .terminal-line.noise {
  color: rgba(185, 28, 28, 0.65);
}

.terminal-line {
  word-break: break-all;
  white-space: pre-wrap;
}

.terminal-line.tx {
  color: var(--accent-cyan);
}

.terminal-line.rx {
  color: #34d399;
}

html[data-theme="light"] .terminal-line.rx {
  color: #065f46;
}

.terminal-line.noise {
  color: rgba(239, 68, 68, 0.5);
  font-size: 0.75rem;
}

.terminal-line.sys {
  color: var(--text-muted);
}

.terminal-controls {
  display: flex;
  gap: 0.5rem;
}

.btn-small {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-family: var(--font-sans);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

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

.btn-small.filter-active {
  border-color: var(--color-success);
  color: var(--color-success);
  background: rgba(16, 185, 129, 0.05);
}

/* Seller Transparency Scorecard Panel */
.scorecard-widget {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 576px) {
  .scorecard-widget {
    grid-template-columns: 180px 1fr;
  }
}

.score-radial-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.radial-gauge {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gauge-circle {
  transform: rotate(-90deg);
  width: 140px;
  height: 140px;
}

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

.gauge-fill {
  fill: none;
  stroke: var(--accent-cyan);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 377;
  stroke-dashoffset: 377;
  transition: stroke-dashoffset 0.8s ease-in-out;
}

.gauge-text-val {
  position: absolute;
  font-family: var(--font-hud);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gauge-text-val span {
  font-size: 0.7rem;
  font-family: var(--font-sans);
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 500;
}

.score-details-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}

.risk-level-badge {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-hud);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--text-muted);
}

.risk-level-badge.risk-low {
  background: rgba(16, 185, 129, 0.12);
  border-color: var(--color-success);
  color: var(--color-success);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

.risk-level-badge.risk-medium {
  background: rgba(245, 158, 11, 0.12);
  border-color: var(--color-warning);
  color: var(--color-warning);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.1);
}

.risk-level-badge.risk-high {
  background: rgba(239, 68, 68, 0.12);
  border-color: var(--color-danger);
  color: var(--color-danger);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.1);
  animation: pulse-border 1.5s infinite alternate;
}

.risk-explanation {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Deductions List */
.deductions-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.deduction-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  padding: 0.5rem;
  border-left: 3px solid var(--color-warning);
}

.deduction-item.critical {
  border-left-color: var(--color-danger);
  background: rgba(239, 68, 68, 0.02);
}

.deduction-pts {
  font-family: var(--font-hud);
  font-weight: 700;
  color: #fca5a5;
  white-space: nowrap;
}

/* SMS Negotiator Box */
.sms-widget {
  margin-top: 1rem;
  background: var(--surface-1);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--card-border);
  padding: 1rem;
}

.sms-title {
  font-family: var(--font-hud);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sms-textarea {
  background: #05080f;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 0.75rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  width: 100%;
  height: 120px;
  resize: none;
  outline: none;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

html[data-theme="light"] .sms-textarea {
  background: var(--surface-1);
  border-color: var(--border-soft);
  color: var(--text-primary);
}

/* Proactive Wear & OBD Dashboard */
.obd-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.ble-env-banner {
  font-size: 0.72rem;
  line-height: 1.45;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ble-env-banner.hidden {
  display: none;
}

.ble-env-banner.ble-env-ok {
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
}

html[data-theme="light"] .ble-env-banner.ble-env-ok {
  color: #065f46;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.28);
}

.ble-env-banner.ble-env-warn {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
}

.ble-env-banner.ble-env-error {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
}

.panel-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0 0 0.65rem;
}

.legend-ready {
  color: var(--color-success);
}

.legend-incomplete {
  color: var(--color-danger);
}

.legend-unsupported {
  color: var(--text-muted);
}

.obd-monitor-pill {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  transition: var(--transition-smooth);
}

.obd-monitor-pill.ready {
  border-color: rgba(16, 185, 129, 0.15);
}

.obd-monitor-pill.incomplete {
  border-color: rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.01);
}

.monitor-state-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
}

.monitor-state-dot.ready {
  background: var(--color-success);
  box-shadow: 0 0 5px var(--color-success);
}

.monitor-state-dot.incomplete {
  background: var(--color-danger);
  box-shadow: 0 0 5px var(--color-danger);
}

.monitor-state-dot.unsupported {
  background: var(--text-muted);
}

.wear-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wear-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--card-border);
  padding: 0.85rem;
}

.wear-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-align: left;
}

.wear-name {
  font-family: var(--font-hud);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.wear-supplier {
  font-size: 0.75rem;
  color: var(--accent-cyan);
}

.wear-details {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.wear-health-wrapper {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.wear-health-bar {
  width: 80px;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  overflow: hidden;
}

.wear-health-fill {
  height: 100%;
  background: var(--color-success);
  border-radius: 5px;
  width: 100%;
  transition: var(--transition-smooth);
}

.wear-health-fill.warning {
  background: var(--color-warning);
}

.wear-health-fill.danger {
  background: var(--color-danger);
}

.wear-health-txt {
  font-family: var(--font-hud);
  font-size: 0.75rem;
  font-weight: 700;
}

body[data-kitt-ui="off"] #header-kitt-btn,
body[data-kitt-ui="off"] #drive-kitt-btn,
body[data-kitt-ui="off"] #kitt-companion {
  display: none !important;
}

/* Email receipt inbox */
.receipt-inbox-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.receipt-inbox-intake {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-soft);
  background: rgba(0, 210, 255, 0.04);
}

.receipt-inbox-intake-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.receipt-inbox-intake-email {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-cyan);
  word-break: break-all;
}

.receipt-inbox-intake-hint {
  margin: 0.15rem 0 0;
}

.receipt-inbox-section-title {
  margin: 0 0 0.45rem;
  font-family: var(--font-hud);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
}

.receipt-inbox-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.receipt-inbox-row {
  padding: 0.65rem 0.75rem;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
}

.receipt-inbox-row--needs_vehicle,
.receipt-inbox-row--suggested {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.05);
}

.receipt-inbox-row--assigned {
  border-color: rgba(16, 185, 129, 0.28);
}

.receipt-inbox-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.receipt-inbox-row-main {
  flex: 1;
  min-width: 0;
}

.receipt-inbox-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem 0.65rem;
}

@media (max-width: 520px) {
  .receipt-inbox-facts {
    grid-template-columns: 1fr 1fr;
  }
  .receipt-inbox-fact:last-child {
    grid-column: 1 / -1;
  }
}

.receipt-inbox-fact-label {
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.1rem;
}

.receipt-inbox-fact-val {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  word-break: break-word;
}

.receipt-inbox-fact-val--amount {
  color: var(--accent-cyan);
  font-size: 0.88rem;
}

.receipt-inbox-vendor {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.receipt-inbox-meta {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.12rem;
}

.receipt-inbox-status {
  flex-shrink: 0;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-cyan);
}

.receipt-inbox-summary {
  margin: 0.4rem 0 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.receipt-inbox-lines {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.receipt-inbox-preview {
  margin-top: 0.5rem;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: rgba(0, 0, 0, 0.12);
}

.receipt-inbox-preview > summary {
  cursor: pointer;
  padding: 0.45rem 0.6rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent-cyan);
  list-style: none;
}

.receipt-inbox-preview > summary::-webkit-details-marker {
  display: none;
}

.receipt-inbox-preview-body {
  padding: 0 0.65rem 0.6rem;
  border-top: 1px solid var(--border-soft);
}

.receipt-inbox-preview-line {
  margin: 0.4rem 0 0;
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--text-muted);
  word-break: break-word;
}

.receipt-inbox-preview-k {
  display: inline-block;
  min-width: 4.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
}

.receipt-inbox-preview-text {
  margin: 0.45rem 0 0;
  padding: 0.5rem 0.55rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  line-height: 1.45;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 12rem;
  overflow: auto;
}

.receipt-inbox-preview-empty {
  margin: 0.45rem 0 0;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.receipt-inbox-assign {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.receipt-inbox-vehicle-select {
  flex: 1 1 10rem;
  min-width: 0;
  font: inherit;
  font-size: 0.72rem;
  padding: 0.28rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
  color: var(--text-primary);
}

/* Issue insight inbox (note / media reassessment) */
.issue-insight-inbox {
  margin: 0.5rem 0 0.65rem;
}

.issue-insight-inbox-inner {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.7rem 0.8rem;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(45, 212, 191, 0.35);
  background: rgba(45, 212, 191, 0.08);
}

.issue-insight-inbox-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
}

.issue-insight-inbox-title {
  margin: 0;
  flex: 1 1 auto;
  font-size: 0.82rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.issue-insight-inbox-title [data-lucide] {
  width: 15px;
  height: 15px;
}

.issue-insight-inbox-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  color: #0f766e;
  background: rgba(45, 212, 191, 0.35);
}

.issue-insight-inbox-dismiss {
  margin-left: auto;
}

.issue-insight-inbox-hint {
  margin: 0;
  font-size: 0.72rem;
}

.issue-insight-inbox-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.issue-insight-inbox-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--card-bg);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.issue-insight-inbox-row:hover,
.issue-insight-inbox-row:focus-visible {
  border-color: rgba(45, 212, 191, 0.55);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.2);
}

.issue-insight-inbox-row--read {
  opacity: 0.82;
}

.issue-insight-inbox-row-kicker {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0f766e;
}

.issue-insight-inbox-row--read .issue-insight-inbox-row-kicker {
  color: var(--text-muted);
}

.issue-insight-inbox-row-title {
  font-size: 0.78rem;
  line-height: 1.3;
}

.issue-insight-inbox-row-preview {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.issue-insight-inbox-row-time {
  font-size: 0.64rem;
  color: var(--text-muted);
}

#simple-issue-insight-card .issue-insight-inbox-inner {
  border: none;
  background: transparent;
  padding: 0;
}

#simple-issue-insight-card .issue-insight-inbox-head {
  padding-bottom: 0.15rem;
}

/* Invoice OCR & Pricing Arbitrage Panel */
.ocr-dropzone {
  border: 2px dashed rgba(0, 210, 255, 0.25);
  background: rgba(0, 210, 255, 0.02);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.ocr-dropzone:hover {
  background: rgba(0, 210, 255, 0.05);
  border-color: var(--accent-cyan);
}

.ocr-dropzone svg {
  width: 40px;
  height: 40px;
  color: var(--accent-cyan);
}

.ocr-dropzone p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.ocr-progress {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  height: 6px;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 0.5rem;
  display: none;
}

.ocr-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-cyan);
  transition: width 0.1s ease;
}

.ocr-progress-text {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  margin-top: 0.25rem;
  display: none;
}

.invoice-vehicle-banner {
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  line-height: 1.45;
  border: 1px solid var(--border-soft);
  background: var(--bg-elevated);
}

.invoice-vehicle-banner--ok {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.06);
}

.invoice-vehicle-banner--warn {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.06);
}

.invoice-assign-panel {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-soft);
}

.invoice-assign-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.invoice-assign-title {
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0;
}

.invoice-assign-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.invoice-assign-row {
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.02);
}

.invoice-assign-row-main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.5rem;
}

.invoice-assign-row-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.invoice-assign-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.invoice-assign-select {
  flex: 1 1 10rem;
  min-width: 0;
  font-size: 0.8rem;
}

/* Arbitrage Results Card */
.arbitrage-results-card {
  margin-top: 1.5rem;
  display: none;
  flex-direction: column;
  gap: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.25rem;
}

.arbitrage-summary-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}

.summary-metric {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 0.75rem;
  text-align: center;
}

.metric-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.metric-value {
  font-family: var(--font-hud);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.metric-value.savings {
  color: var(--color-success);
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.audit-table-wrapper {
  overflow-x: auto;
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}

.audit-table th {
  border-bottom: 1px solid var(--card-border);
  padding: 0.5rem 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.audit-table td {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.audit-table tr:hover {
  background: rgba(255, 255, 255, 0.01);
}

.text-danger {
  color: var(--color-danger);
}

.text-success {
  color: var(--color-success);
}

/* ================= NEW: NHTSA & PREDICTION STYLES ================= */

.nhtsa-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

@media (min-width: 768px) {
  .nhtsa-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.nhtsa-section-head {
  margin-bottom: 0.5rem;
}

.nhtsa-section-title {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.nhtsa-recalls-intro {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.65rem;
}

.nhtsa-recalls-box {
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: var(--border-radius-md);
  padding: 0.75rem;
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nhtsa-loading,
.nhtsa-load-error {
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 0.5rem 0;
  margin: 0;
}

.nhtsa-load-error {
  color: var(--color-danger);
}

.recall-empty-state {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  padding: 1.5rem 1rem;
}

.recall-empty-state i {
  color: var(--color-success);
  width: 28px;
  height: 28px;
  display: block;
  margin: 0 auto 0.5rem;
}

.recall-item-card {
  background: transparent;
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--color-danger);
  border-radius: 6px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  text-align: left;
}

.recall-item-card--critical {
  border-left-width: 4px;
  border-left-color: #ff3b3b;
  border-color: rgba(255, 59, 59, 0.45);
  box-shadow: inset 0 0 0 1px rgba(255, 59, 59, 0.12);
}

.recall-warnings {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.recall-warning {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.recall-warning--stop {
  color: #fff;
  background: var(--color-danger);
}

.recall-warning--outside {
  color: #ffb020;
  background: rgba(255, 176, 32, 0.15);
  border: 1px solid rgba(255, 176, 32, 0.4);
}

.recall-warning--ota {
  color: var(--accent-cyan);
  background: rgba(0, 210, 255, 0.1);
}

.recall-applies {
  padding: 0.45rem 0.5rem 0.45rem 0.6rem;
  border-radius: 4px;
  border: 1px solid var(--border-soft);
  border-left-width: 3px;
  background: transparent;
}

.recall-applies-likely {
  border-left-color: #10b981;
  border-color: rgba(16, 185, 129, 0.4);
}

.recall-applies-verify {
  border-left-color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.45);
}

.recall-applies-unlikely {
  border-left-color: var(--text-muted);
}

.recall-applies-head {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-hud);
  color: var(--text-primary);
}

.recall-applies-detail {
  margin: 0.25rem 0 0;
  font-size: 0.68rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.recall-block {
  font-size: 0.68rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.recall-block p {
  margin: 0.2rem 0 0;
}

.recall-block-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.recall-block--action {
  background: transparent;
  border: 1px solid rgba(0, 210, 255, 0.35);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 6px;
  padding: 0.45rem 0.5rem 0.45rem 0.6rem;
}

.recall-action-list {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.recall-action-list li {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  font-size: 0.68rem;
  line-height: 1.4;
}

.recall-action-num {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--surface-2);
  font-size: 0.6rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
}

.recall-action-list a {
  color: var(--accent-cyan);
}

.recall-advance-bar {
  margin: 0.65rem 0;
  padding: 0.65rem 0.75rem;
  border-radius: var(--border-radius-md);
  background: rgba(0, 210, 255, 0.06);
  border: 1px solid rgba(0, 210, 255, 0.18);
}

.recall-advance-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.recall-advance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.recall-advance-link {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(0, 210, 255, 0.25);
  background: rgba(0, 210, 255, 0.08);
  color: var(--accent-cyan);
}

.recall-advance-link--primary {
  background: rgba(0, 210, 255, 0.14);
  border-color: rgba(0, 210, 255, 0.4);
}

.recall-advance-link--phone {
  border-color: rgba(120, 200, 120, 0.35);
  background: rgba(80, 180, 80, 0.1);
  color: #8fd98f;
}

.action-queue-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.35rem 0 0.5rem;
}

.action-queue-link {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(0, 210, 255, 0.22);
  color: var(--accent-cyan);
}

.action-queue-link--primary {
  background: rgba(0, 210, 255, 0.1);
}

.action-queue-link--phone {
  border-color: rgba(120, 200, 120, 0.35);
  color: #8fd98f;
}

.provider-discovery {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.provider-discovery-title {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary, #e8eef5);
}

.provider-discovery-intro {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--text-muted, #9aa8b8);
}

.provider-discovery-cards {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.provider-discovery-card {
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.provider-discovery-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.provider-discovery-card-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
}

.provider-discovery-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(0, 210, 255, 0.15);
  color: var(--accent-cyan);
}

.provider-discovery-tag {
  font-size: 0.62rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(120, 200, 120, 0.12);
  color: #8fd98f;
}

.provider-discovery-summary {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--text-muted, #9aa8b8);
}

.provider-discovery-links,
.drive-outreach-provider-search .provider-discovery-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.provider-discovery-link {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(0, 210, 255, 0.22);
  color: var(--accent-cyan);
}

.provider-discovery-link--primary {
  background: rgba(0, 210, 255, 0.1);
}

.provider-discovery-vetting {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--text-muted, #9aa8b8);
}

.drive-findings-dtc-scope,
.drive-findings-dtc-related {
  margin: 0.25rem 0 0.35rem;
  font-size: 0.72rem;
  color: var(--text-muted, #9aa8b8);
}

.drive-findings-dtc-related code {
  font-size: 0.68rem;
}

.drive-outreach-provider-search {
  margin: 0.5rem 0 0.65rem;
}

.drive-outreach-provider-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
}

.odometer-unlock-btn {
  flex-shrink: 0;
  font-size: 0.68rem;
  padding: 0.2rem 0.5rem;
}

.timeline-odometer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.action-queue-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.recall-outreach-status {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--accent-cyan-glow);
  color: var(--accent-cyan);
  vertical-align: middle;
}

.recall-concierge-dialog {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.recall-concierge-dialog.hidden {
  display: none !important;
}

.recall-concierge-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(4px);
}

.recall-concierge-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  max-height: min(90vh, 640px);
  overflow: auto;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg, 12px);
  padding: 1rem 1rem 1.15rem;
  box-shadow: 0 24px 64px var(--shadow-soft);
  color: var(--text-primary);
}

.recall-concierge-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.recall-concierge-title {
  margin: 0;
  font-family: var(--font-hud);
  font-size: 1rem;
  color: var(--text-primary);
}

.recall-concierge-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.recall-concierge-sub {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.recall-concierge-intro {
  margin-bottom: 0.75rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.recall-concierge-channels {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.recall-concierge-channel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  cursor: pointer;
  color: var(--text-primary);
  font: inherit;
}

.recall-concierge-channel:hover {
  border-color: var(--accent-cyan);
  background: var(--surface-1);
}

.recall-concierge-channel--primary {
  border-color: var(--accent-cyan);
  background: var(--accent-cyan-glow);
}

.recall-concierge-channel-label {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-primary);
}

.recall-concierge-channel-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.recall-concierge-status-block {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-soft);
}

.recall-concierge-status-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.recall-concierge-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.recall-concierge-status-btn.active {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.recall-concierge-followup {
  margin: 0.65rem 0 0;
  font-size: 0.72rem;
  color: var(--accent-cyan);
}

.recall-item-title {
  font-family: var(--font-hud);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
}

.recall-item-desc {
  font-size: 0.72rem;
  color: var(--text-primary);
  line-height: 1.45;
  opacity: 0.92;
}

.recall-item-id {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent-cyan);
}

/* Consumer Complaints Charts */
.complaints-chart-box {
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: var(--border-radius-md);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.complaint-bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.complaint-bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.complaint-bar-bg {
  height: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.complaint-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), #3b82f6);
  border-radius: 4px;
  width: 0%; /* Animated on load */
  transition: width 0.8s ease-out;
}

/* Predictive Failure Cards */
.forecast-repairs-section {
  margin-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1rem;
}

.timeline-driving-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: flex-end;
  margin: 0.5rem 0 0.35rem;
  padding: 0.45rem 0.55rem;
  background: transparent;
  border: 1px dashed var(--border-soft);
  border-radius: 8px;
}

@media (max-width: 640px) {
  .timeline-driving-inputs {
    flex-direction: column;
    align-items: stretch;
  }

  .timeline-driving-field,
  .timeline-odometer-field {
    width: 100%;
    min-width: 0;
  }

  .timeline-driving-input {
    max-width: none;
    width: 100%;
  }

  .locale-icon-settings {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    width: 100%;
  }

  .locale-zip-control {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .locale-zip-input {
    width: 100%;
  }

  .sms-widget {
    padding: 0.85rem;
  }

  .sms-title {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .financial-line-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }

  .financial-line-amt {
    min-width: 0;
  }
}

.timeline-driving-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 7rem;
}

.timeline-driving-field label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.timeline-driving-input {
  font-size: 0.72rem;
  padding: 0.3rem 0.4rem;
  max-width: 8rem;
}

.timeline-driving-annual-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.timeline-distance-unit {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  white-space: nowrap;
}

.repair-timeline-hint {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin: 0 0 0.35rem;
  line-height: 1.35;
}

.repair-timeline-now {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
}

.repair-timeline-now-pin {
  display: block;
  width: 2px;
  height: 100%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(0, 210, 255, 0.6);
}

.repair-timeline-now-label {
  position: absolute;
  top: -0.15rem;
  left: 50%;
  transform: translate(-50%, -100%);
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
  white-space: nowrap;
  background: var(--surface-1);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  border: 1px solid rgba(0, 210, 255, 0.4);
}

.mileage-marker--past {
  opacity: 0.65;
  border-color: var(--text-muted);
  background: transparent;
}

.mileage-marker--now {
  border-color: rgba(16, 185, 129, 0.65);
  background: transparent;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.25);
}

.mileage-marker--upcoming {
  border-color: rgba(0, 210, 255, 0.35);
}

.repair-timeline-status {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  flex-shrink: 0;
}

.repair-timeline-status--past {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
}

.repair-timeline-status--now {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
}

.repair-timeline-status--upcoming {
  color: var(--accent-cyan);
  background: rgba(0, 210, 255, 0.1);
}

.repair-timeline-timing {
  font-size: 0.62rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.repair-timeline-host {
  margin: 0.65rem 0 0.85rem;
}

.repair-timeline-host.hidden,
.repair-timeline-panel.hidden {
  display: none !important;
}

.repair-timeline-panel {
  margin: 0.75rem 0;
  padding: 0.65rem;
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}

.repair-timeline-panel-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.repair-timeline-section {
  margin-bottom: 0.85rem;
}

.repair-timeline-section:last-child {
  margin-bottom: 0;
}

.repair-timeline-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.repair-timeline-axis {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.repair-timeline-axis--time {
  color: var(--accent-cyan);
  opacity: 0.9;
  margin-top: -0.1rem;
}

.repair-timeline-axis--ticks {
  position: relative;
  height: 1.35rem;
  margin-bottom: 0.35rem;
}

.repair-timeline-tick {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.55rem;
  white-space: nowrap;
  color: var(--accent-cyan);
}

.repair-timeline-subsection {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border-soft);
}

.repair-timeline-section-title--sub {
  font-size: 0.62rem;
  color: var(--accent-cyan);
}

.repair-timeline-track {
  position: relative;
  height: 3.5rem;
  background: transparent;
  border-radius: 6px;
  border: 1px solid var(--border-soft);
  margin-bottom: 0.5rem;
}

.repair-timeline-track.scan-track,
.repair-timeline-track.time-track {
  height: 3rem;
}

.repair-timeline-track.time-track {
  margin-bottom: 0.35rem;
}

.repair-timeline-marker {
  position: absolute;
  top: 0.35rem;
  min-width: 4rem;
  max-width: 7rem;
  padding: 0.2rem 0.3rem;
  border-radius: 4px;
  font-size: 0.58rem;
  line-height: 1.25;
  border: 1px solid rgba(0, 210, 255, 0.35);
  background: rgba(0, 210, 255, 0.1);
}

.repair-timeline-marker.scan-marker {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.12);
}

.repair-timeline-marker-label {
  display: block;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.repair-timeline-marker-meta {
  display: block;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.repair-timeline-marker-time {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  color: var(--accent-cyan);
  margin-top: 0.1rem;
}

.repair-timeline-marker.time-marker {
  min-width: 3.5rem;
  max-width: 5.5rem;
  transform: translateX(-50%);
  text-align: center;
  border-color: rgba(0, 210, 255, 0.5);
}

.repair-timeline-marker-pin {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  margin: 0 auto 0.15rem;
}

.repair-timeline-legend {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.repair-timeline-legend li {
  font-size: 0.68rem;
  color: var(--text-secondary);
  line-height: 1.35;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
}

.repair-timeline-legend strong {
  color: var(--text-primary);
}

.repair-timeline-cost {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
}

.prediction-empty-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 1rem;
  grid-column: span 2;
}

.prediction-card-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.35;
  margin-bottom: 0.25rem;
}

.prediction-price-wholesale {
  color: var(--accent-cyan);
}

.prediction-price-retail {
  color: var(--color-danger);
}

.prediction-deck-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

@media (min-width: 576px) {
  .prediction-deck-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.prediction-item-card {
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: var(--border-radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
}

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

.prediction-part-name {
  font-family: var(--font-hud);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.prediction-mileage-badge {
  font-family: var(--font-hud);
  font-size: 0.65rem;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--color-warning);
  color: var(--color-warning);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.prediction-card-prices {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.15);
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

/* Manual Lookup Form Elements */
.ymm-lookup-form.ymm-locked {
  opacity: 0.55;
  pointer-events: none;
}

.ymm-lookup-form.ymm-locked .input-field,
.ymm-lookup-form.ymm-locked .lookup-btn {
  cursor: not-allowed;
}

.ymm-lookup-hint {
  margin-top: 0.5rem;
}

.ymm-lookup-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 1rem;
  margin-top: 0.5rem;
}

/* Scenario / multi-modal panel */
.scenario-panel {
  margin-top: 0.75rem;
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  background: rgba(0, 0, 0, 0.12);
  padding: 0.9rem;
}

.scenario-header {
  margin-bottom: 0.6rem;
}

.scenario-title {
  font-family: var(--font-hud);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.scenario-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  line-height: 1.35;
}

.scenario-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

@media (min-width: 576px) {
  .scenario-grid {
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }
}

.scenario-wide {
  grid-column: 1 / -1;
}

.scenario-textarea {
  min-height: 44px;
  resize: vertical;
}

.hidden-file-input {
  /* Do not use display:none or [hidden] — breaks iOS/Android file picker from button.click() */
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0.001;
  overflow: hidden;
}

.scenario-vin-photo-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.btn-small--secondary {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
}

.scenario-vin-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.scenario-dropzone {
  margin-top: 0.5rem;
  border: 1px dashed var(--border-soft);
  background: var(--surface-1);
  border-radius: 10px;
  padding: 0.8rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.scenario-dropzone:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

.scenario-dropzone.dragover {
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(34, 211, 238, 0.08);
  color: var(--text-primary);
}

.scenario-media-hint {
  margin-top: 0.5rem;
}

.scenario-media-preview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

@media (min-width: 576px) {
  .scenario-media-preview {
    grid-template-columns: 1fr 1fr;
  }
}

.scenario-media-card {
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
  border-radius: 10px;
  padding: 0.55rem;
}

.scenario-media-card-title {
  font-size: 0.72rem;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 0.35rem;
  word-break: break-word;
}

.scenario-media-card-meta {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.scenario-media-card img,
.scenario-media-card video {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 0.4rem;
}

.scenario-media-card audio {
  width: 100%;
  margin-top: 0.4rem;
}

.scenario-media-ocr-hint {
  margin-top: 0.45rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.capture-media-summary {
  margin: 0.65rem 0 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: rgba(56, 189, 248, 0.04);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.capture-media-summary.hidden {
  display: none;
}

.capture-media-row + .capture-media-row {
  margin-top: 0.35rem;
}

.capture-media-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-cyan);
  margin-right: 0.35rem;
}

.capture-media-gallery {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(56, 189, 248, 0.15);
}

.capture-media-gallery.hidden {
  display: none;
}

.capture-media-gallery-head {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.55rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.capture-media-gallery-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.capture-media-gallery-empty {
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--text-muted);
  margin: 0;
}

.capture-media-gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

@media (min-width: 576px) {
  .capture-media-gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.capture-media-gallery-card {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface-1);
  padding: 0.5rem;
}

.capture-media-gallery-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  word-break: break-word;
}

.capture-media-gallery-body .media-inline-player,
.capture-media-gallery-body .media-view-trigger {
  width: 100%;
}

.media-inline-player img,
.media-view-trigger img,
.scenario-media-card .media-view-trigger img,
.scenario-vin-photo-card .media-view-trigger img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: block;
}

.media-view-trigger {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0.35rem 0 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
}

.media-inline-player video,
.scenario-media-card video,
.capture-media-gallery-body video {
  width: 100%;
  max-height: 220px;
  border-radius: 8px;
  margin-top: 0.35rem;
  background: #000;
}

.media-inline-player audio,
.scenario-media-card audio,
.capture-media-gallery-body audio {
  width: 100%;
  margin-top: 0.35rem;
}

.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.media-lightbox.hidden {
  display: none;
}

.media-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.88);
}

.media-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
  padding: 0.85rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.media-lightbox-close {
  position: absolute;
  top: 0.45rem;
  right: 0.55rem;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.media-lightbox-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 0 2rem 0.65rem 0;
  word-break: break-word;
}

.media-lightbox-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.media-lightbox-body img {
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  border-radius: 10px;
}

.media-lightbox-body video,
.media-lightbox-body audio {
  width: 100%;
  max-height: calc(100vh - 8rem);
}

.media-lightbox-download {
  color: var(--accent-cyan);
  font-weight: 700;
}

.sim-demo-thumb-body .media-view-trigger img,
.sim-demo-thumb-body .media-inline-player audio {
  margin-top: 0;
}

.sim-demo-thumb-body .media-inline-player {
  width: 100%;
}

/* Silent monitor */
.monitor-intro {
  margin-bottom: 0.75rem;
}

.monitor-settings-grid {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.monitor-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-secondary);
  cursor: pointer;
}

.monitor-toggle input {
  margin-top: 0.15rem;
}

.monitor-status-pill {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.monitor-status-pill--live {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-success);
}

.monitor-live-panel {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: rgba(0, 210, 255, 0.03);
}

.monitor-headline {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.35rem;
}

.monitor-detail {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin: 0 0 0.45rem;
}

.monitor-insights-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.monitor-insight {
  font-size: 0.74rem;
  line-height: 1.4;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
}

.monitor-insight--warn {
  border-left: 3px solid var(--color-warning);
}

.monitor-insight--alert {
  border-left: 3px solid var(--color-danger);
}

.monitor-insight--info {
  border-left: 3px solid var(--accent-cyan);
}

.status-dot--pulse {
  animation: monitor-pulse 2s ease-in-out infinite;
}

@keyframes monitor-pulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45);
  }
  50% {
    opacity: 0.85;
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
}

.monitor-audio-dialog {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.monitor-audio-dialog.hidden {
  display: none;
}

.monitor-audio-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.88);
}

.monitor-audio-panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
  padding: 1rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.monitor-audio-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.monitor-audio-message {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-secondary);
  margin: 0 0 0.5rem;
}

.monitor-audio-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.monitor-audio-progress {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.monitor-audio-progress-bar {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-cyan), #3b82f6);
  width: 0%;
  transition: width 0.15s linear;
}

.monitor-audio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#simple-monitor-card .simple-step {
  font-size: 0.9rem;
  line-height: 1;
}

.test-user-login-dialog {
  position: fixed;
  inset: 0;
  z-index: 10070;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

body.test-user-login-open,
body[data-auth-required="1"] {
  overflow: hidden;
}

body.test-user-login-open .app-container,
body.test-user-login-open .sim-mode-banner,
body[data-auth-required="1"] .app-container,
body[data-auth-required="1"] .sim-mode-banner {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

body.test-user-login-open .test-user-login-dialog,
body[data-auth-required="1"] .test-user-login-dialog {
  display: flex !important;
  pointer-events: auto;
}

/* Sign-in must sit above the loading splash on cold start (Capacitor iOS). */
body[data-auth-required="1"] .app-load-splash {
  z-index: 10060;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.test-user-login-dialog.hidden {
  display: none;
}

.test-user-login-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(6px);
}

.test-user-login-panel {
  position: relative;
  z-index: 1;
  width: min(360px, calc(100% - 2rem));
  max-height: min(92vh, 720px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 18px;
  border: 1px solid rgba(0, 210, 255, 0.28);
  background:
    radial-gradient(circle at 50% -20%, rgba(0, 210, 255, 0.14) 0%, transparent 55%),
    var(--surface-1);
  padding: 1.5rem 1.25rem 1.25rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.test-user-login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.test-user-login-logo {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-cyan), #3b82f6);
  box-shadow: 0 0 22px rgba(0, 210, 255, 0.35);
}

.test-user-login-logo img {
  width: 36px;
  height: 36px;
  display: block;
}

.test-user-login-brand-name {
  margin: 0;
  font-family: var(--font-hud);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  background: linear-gradient(to right, #ffffff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.test-user-login-brand-name span {
  background: linear-gradient(to right, var(--accent-cyan), #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html[data-theme="light"] .test-user-login-brand-name {
  background: linear-gradient(to right, #0f172a, #1e3a8a);
  -webkit-background-clip: text;
}

html[data-theme="light"] .test-user-login-brand-name span {
  background: linear-gradient(to right, var(--accent-cyan), #2563eb);
  -webkit-background-clip: text;
}

.test-user-login-form .form-group {
  margin-bottom: 0.75rem;
}

.test-user-login-input {
  font-size: 16px;
  min-height: 48px;
}

.test-user-login-error {
  font-size: 0.78rem;
  color: var(--color-danger);
  margin: 0 0 0.65rem;
}

.test-user-login-error.hidden {
  display: none;
}

.test-user-login-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.5rem;
}

.test-user-login-submit-btn {
  width: 100%;
  min-height: 48px;
  justify-content: center;
}

#test-user-badge {
  cursor: pointer;
  border: none;
  font: inherit;
}

#test-user-badge .header-tool-pill-text--sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#test-user-badge:not(.header-tool-pill--signed-in) [data-lucide] {
  opacity: 0.42;
}

#test-user-badge.header-tool-pill--signed-in [data-lucide] {
  opacity: 1;
  color: var(--accent-cyan);
}

.test-user-account-menu {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(3.5rem, calc(env(safe-area-inset-top) + 2.5rem)) 1rem 1rem;
}

.test-user-account-menu.hidden {
  display: none;
}

.test-user-account-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.test-user-account-menu-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 18rem);
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: var(--card-bg);
  box-shadow: 0 16px 48px var(--shadow-soft);
}

.test-user-account-menu-name {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.test-user-account-menu-meta {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
  word-break: break-word;
}

.test-user-account-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.test-user-logout-btn {
  min-height: 44px;
  justify-content: center;
}

.sms-widget--owner .sms-title {
  color: var(--color-success);
}

.repair-timeline-status--done {
  background: rgba(16, 185, 129, 0.12);
  color: var(--color-success);
}

.repair-timeline-legend-item--clickable {
  cursor: pointer;
}

.repair-timeline-legend-item--clickable:hover {
  background: rgba(0, 210, 255, 0.06);
  border-radius: 6px;
}

.repair-timeline-legend-item--done {
  opacity: 0.85;
}

.repair-timeline-mark-hint {
  display: block;
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.repair-timeline-section--done {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border-soft);
}

.milestone-done-dialog {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.milestone-done-dialog.hidden {
  display: none;
}

.milestone-done-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.milestone-done-dialog-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 380px);
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.milestone-done-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.milestone-done-item-label {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.milestone-done-field {
  margin-bottom: 0.65rem;
}

.milestone-done-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.milestone-done-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.scenario-media-status {
  margin: 0.5rem 0;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.4;
}

.scenario-media-status.hidden {
  display: none;
}

.scenario-media-status--processing {
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
  color: var(--text-primary);
}

.scenario-media-status--done {
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
  color: var(--text-primary);
}

.scenario-media-status--error {
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
}

.scenario-media-findings {
  margin: 0.5rem 0;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: rgba(56, 189, 248, 0.05);
  font-size: 0.78rem;
  line-height: 1.45;
}

.scenario-media-findings.hidden {
  display: none;
}

.scenario-media-findings-row + .scenario-media-findings-row {
  margin-top: 0.3rem;
}

.scenario-media-findings-next {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.scenario-structured-ocr-summary {
  margin: 0 0 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.06);
  font-size: 0.78rem;
  line-height: 1.45;
}

.scenario-structured-ocr-summary.hidden {
  display: none;
}

.scenario-structured-ocr-row + .scenario-structured-ocr-row {
  margin-top: 0.3rem;
}

.scenario-media-ocr-hint--processing {
  color: var(--color-warning);
  animation: pulse-opacity 1.2s ease-in-out infinite;
}

@keyframes pulse-opacity {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.sms-widget--seller .sms-title {
  color: var(--accent-cyan);
}

.prediction-source-tag {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  margin-right: 0.35rem;
}

.scenario-structured {
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
  border-radius: 10px;
  padding: 0.75rem;
}

.scenario-structured-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

@media (min-width: 576px) {
  .scenario-structured-row {
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }
}

.scenario-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.scenario-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.scenario-detected {
  margin-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.75rem;
}

.scenario-detected-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.scenario-detected-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.35;
}

.scenario-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

@media (min-width: 576px) {
  .ymm-lookup-form {
    grid-template-columns: 80px 1.2fr 1.2fr auto;
    align-items: end;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: left;
}

.form-group label {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.input-field {
  background: #060a12;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  outline: none;
  transition: var(--transition-smooth);
}

html[data-theme="light"] .input-field {
  background: #ffffff;
  border-color: rgba(2, 6, 23, 0.22);
  color: var(--text-primary);
}

html[data-theme="light"] .input-field::placeholder {
  color: rgba(15, 23, 42, 0.45);
}

html[data-theme="light"] .form-group label {
  color: rgba(15, 23, 42, 0.65);
}

.input-field:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 5px rgba(0, 210, 255, 0.2);
}

.lookup-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  font-family: var(--font-hud);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.lookup-btn:hover {
  background: rgba(0, 210, 255, 0.1);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.15);
}

/* ─── Simple vs Advanced UI mode ─────────────────────────────────────────── */
.ui-mode-toggle {
  display: inline-flex;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-1);
}

.ui-mode-toggle--icons .ui-mode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  min-width: 2.25rem;
  padding: 0.4rem;
}

.ui-mode-toggle--icons .ui-mode-btn [data-lucide] {
  width: 1rem;
  height: 1rem;
}

.ui-mode-btn {
  font-family: var(--font-hud);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.4rem 0.65rem;
  min-height: 36px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.ui-mode-btn[aria-pressed="true"] {
  background: rgba(0, 210, 255, 0.15);
  color: var(--accent-cyan);
}

body[data-ui-mode="simple"] .header-meta {
  display: none;
}

body[data-ui-mode="simple"] .brand-tagline,
body[data-ui-mode="drive"] .brand-tagline {
  display: none;
}

body[data-ui-mode="simple"] #header-conn-label,
body[data-ui-mode="drive"] #header-conn-label {
  display: none;
}

body[data-ui-mode="simple"] .header-settings--compact .header-select {
  max-width: 4.25rem;
  padding: 0.28rem 0.3rem;
  font-size: 0.58rem;
}

body[data-ui-mode="simple"] .header-tool-pill:not(.header-tool-pill--demo):not(.header-tool-pill--kitt) .header-tool-pill-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header-tool-pill--icon {
  position: relative;
  padding: 0.4rem 0.45rem;
  min-width: 2.25rem;
  justify-content: center;
}

.header-tool-pill--icon .header-tool-pill-text {
  font-size: 0.68rem;
}

body[data-ui-mode="advanced"] #test-user-badge .header-tool-pill-text--sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body[data-ui-mode="simple"] .ui-advanced-only {
  display: none !important;
}

body[data-ui-mode="advanced"] .top-tabs.ui-advanced-only {
  display: flex;
}

body[data-ui-mode="advanced"] .dashboard-grid.ui-advanced-only {
  display: grid;
}

body[data-ui-mode="advanced"] .vehicle-bar.ui-advanced-only {
  display: block;
}

body[data-ui-mode="simple"] #simple-dashboard {
  display: block;
}

body[data-ui-mode="advanced"] #simple-dashboard {
  display: none !important;
}

.simple-dashboard {
  display: none;
  max-width: 520px;
  margin: 0 auto 1.5rem;
}

body[data-ui-mode="simple"] #simple-scenario-card,
body[data-ui-mode="simple"] #simple-monitor-card {
  display: none !important;
}

body[data-ui-mode="simple"] .simple-step {
  display: none;
}

body[data-ui-mode="simple"] .simple-card-head {
  margin-bottom: 0.35rem;
}

body[data-ui-mode="simple"] .simple-card-title {
  font-size: 0.82rem;
}

.simple-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 24px var(--shadow-soft);
}

.simple-hero-score-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.simple-hero-empty {
  text-align: left;
}

.simple-hero-score-val--empty {
  font-family: var(--font-hud);
  font-size: 3.25rem;
  font-weight: 900;
  line-height: 1;
  color: var(--text-muted);
  opacity: 0.45;
}

.simple-hero-empty-text {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.simple-hero-scored {
  text-align: left;
}

.simple-hero-scored .simple-score-row {
  justify-content: flex-start;
  margin-bottom: 0.2rem;
}

.simple-hero-scored .simple-score-val {
  font-size: 3.5rem;
}

.simple-hero-scored .simple-score-denom {
  font-size: 1.25rem;
  margin-bottom: 0.45rem;
}

.simple-hero-scored .simple-score-bar {
  margin: 0.35rem 0 0.45rem;
  max-width: 100%;
}

.simple-hero-scored .risk-level-badge {
  margin-top: 0.15rem;
}

.simple-ask-moto-btn {
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-width: 4.25rem;
  padding: 0.45rem 0.55rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 210, 255, 0.45);
  background: rgba(0, 210, 255, 0.1);
  color: var(--accent-cyan);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.simple-ask-moto-btn-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
}

.simple-ask-moto-btn:hover {
  border-color: rgba(0, 210, 255, 0.75);
  background: rgba(0, 210, 255, 0.16);
}

.simple-ask-moto-btn:active {
  transform: scale(0.96);
}

.simple-ask-moto-btn [data-lucide] {
  width: 1.45rem;
  height: 1.45rem;
}

body[data-ui-mode="simple"] #header-ask-moto span {
  display: none;
}

.simple-results-detail.hidden {
  display: none !important;
}

.simple-more-details {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
}

.simple-more-details-summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  list-style: none;
}

.simple-more-details-summary::-webkit-details-marker {
  display: none;
}

.simple-summary {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.simple-ask-moto-dialog {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(0.75rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

body.simple-ask-moto-open {
  overflow: hidden;
}

.simple-ask-moto-dialog.hidden {
  display: none !important;
}

.simple-ask-moto-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(6px);
}

.simple-ask-moto-sheet {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(100%, 520px);
  height: min(82dvh, 640px);
  max-height: min(82dvh, 640px);
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 0.75rem 0.85rem 0.85rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.simple-ask-moto-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  flex-shrink: 0;
}

.simple-ask-moto-sheet > #user-agent-chat {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.simple-ask-moto-title {
  margin: 0;
  font-family: var(--font-hud);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.simple-ask-moto-close {
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.simple-ask-moto-sheet .agent-chat {
  flex: 1 1 auto;
  min-height: 0;
  border: none;
  padding: 0.25rem 0 0;
  background: transparent;
  overflow: hidden;
}

.simple-ask-moto-sheet .agent-chat-title {
  display: none;
}

.simple-ask-moto-sheet .agent-chat-starters,
.simple-ask-moto-sheet .agent-chat-followups {
  flex-shrink: 0;
}

.simple-ask-moto-sheet .agent-chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.simple-ask-moto-sheet .agent-chat-form {
  flex-shrink: 0;
  margin-top: 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--card-border);
  background: var(--card-bg);
}

.simple-ask-moto-sheet .agent-chat-status {
  flex-shrink: 0;
}

.simple-intro {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.simple-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 1rem 1.1rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 8px 24px var(--shadow-soft);
}

.simple-card-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

.simple-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  font-family: var(--font-hud);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-cyan);
  background: rgba(0, 210, 255, 0.12);
  border: 1px solid rgba(0, 210, 255, 0.35);
  flex-shrink: 0;
}

.simple-card-title {
  font-family: var(--font-hud);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.simple-status-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.simple-meta-line {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
  word-break: break-word;
}

.simple-step--results {
  font-size: 0.85rem;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--color-warning);
}

.simple-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  align-items: stretch;
}

.simple-actions .connect-btn {
  width: auto;
  min-height: 44px;
  height: 44px;
  padding: 0 0.85rem;
  margin: 0;
  box-sizing: border-box;
  justify-content: center;
  font-size: 0.82rem;
  flex: 0 1 auto;
}

.simple-actions .secondary-connect {
  min-width: 8.75rem;
  max-width: 11.5rem;
}

.simple-actions .scan-history-btn {
  flex: 1 1 9.5rem;
  min-width: 9.5rem;
  margin-bottom: 0;
}

.simple-hint {
  margin-top: 0.55rem;
  font-size: 0.75rem;
}

.simple-results-empty {
  padding: 0.5rem 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.simple-results-empty .btn-small {
  margin-top: 0.65rem;
  width: 100%;
  min-height: 44px;
}

.simple-results-body.hidden {
  display: none !important;
}

.simple-score-hero {
  text-align: center;
  padding: 0.5rem 0 0.75rem;
}

.simple-score-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.15rem;
  margin-bottom: 0.15rem;
}

.simple-score-val {
  font-family: var(--font-hud);
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  color: var(--text-primary);
}

.simple-score-denom {
  font-family: var(--font-hud);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.simple-score-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  margin: 0.45rem auto 0.55rem;
  max-width: 220px;
}

.simple-score-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.simple-score-bar-fill.score-high {
  background: linear-gradient(90deg, var(--color-success), #34d399);
}

.simple-score-bar-fill.score-mid {
  background: linear-gradient(90deg, var(--color-warning), #fbbf24);
}

.simple-score-bar-fill.score-low {
  background: linear-gradient(90deg, var(--color-danger), #f87171);
}

.simple-score-math {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin: 0 0 0.55rem;
  padding: 0.45rem 0.55rem;
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}

.simple-score-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.simple-summary {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.simple-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.simple-metric {
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
}

.simple-metric-label {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.simple-metric-value {
  font-family: var(--font-hud);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.simple-metric-detail {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.simple-issues-heading {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0 0 0.4rem;
}

.simple-issues-list {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}

.simple-issues-list li {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  font-size: 0.8rem;
  padding: 0.45rem 0.55rem;
  border-left: 3px solid var(--color-warning);
  background: var(--surface-1);
  border-radius: 0 8px 8px 0;
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.simple-issue-pts {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--color-danger);
  min-width: 3.4rem;
}

.simple-issue-pts--note {
  color: var(--text-muted);
}

.simple-issues-list li.critical {
  border-left-color: var(--color-danger);
}

.simple-footer-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.5rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-soft);
}

.simple-advanced-btn {
  width: 100%;
  min-height: 48px;
  justify-content: center;
}

.simple-footer-actions .btn-small {
  width: 100%;
  min-height: 44px;
}

.simple-sessions-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.simple-sessions-toolbar .btn-small {
  flex: 1 1 auto;
  min-height: 44px;
}

.simple-sessions-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 280px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.simple-sessions-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  padding: 0.35rem 0;
}

.simple-session-item {
  width: 100%;
  text-align: left;
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  cursor: pointer;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.simple-session-item:hover,
.simple-session-item.active {
  border-color: rgba(0, 210, 255, 0.45);
  background: rgba(0, 210, 255, 0.06);
}

.simple-session-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.simple-session-type {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.simple-session-score {
  font-family: var(--font-hud);
  font-weight: 800;
  font-size: 1rem;
}

.simple-session-vehicle {
  font-size: 0.8rem;
  margin: 0.2rem 0;
  font-weight: 600;
}

.simple-session-meta {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  line-height: 1.35;
}

.session-time-gmt,
.session-time-local {
  display: block;
}

.session-time-block {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.admin-record-meta .session-time-block {
  flex: 1 1 auto;
  min-width: 0;
}

@media (min-width: 480px) {
  .simple-dashboard {
    max-width: 100%;
  }
}

/* ─── Mobile / narrow screens ───────────────────────────────────────────── */
@media (max-width: 768px) {
  html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    overflow-x: hidden;
    width: 100%;
    font-size: 16px;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .app-container {
    width: 100%;
    max-width: 100%;
    padding: 0.65rem;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    overflow-x: visible;
    box-sizing: border-box;
  }

  .sim-mode-banner {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }

  .sim-mode-banner-text,
  .sim-mode-banner-copy {
    min-width: 0;
  }

  .app-header {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: var(--chrome-header-margin-bottom, 1rem);
    padding-bottom: var(--chrome-header-padding-bottom, 0.85rem);
  }

  .header-brand {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
  }

  .brand-title {
    font-size: var(--chrome-brand-title-size, clamp(1.08rem, 3.4vw, 1.4rem));
  }

  .brand-tagline {
    display: none;
  }

  .header-meta {
    font-size: 0.55rem;
    padding-left: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  #app-version-updated {
    display: none;
  }

  #header-conn-label {
    display: none;
  }

  #telemetry-export-trigger {
    display: none;
  }

  .brand-wrapper {
    gap: 0.45rem;
  }

  .brand-logo {
    width: 30px;
    height: 30px;
  }

  .brand-logo svg {
    width: 17px;
    height: 17px;
  }

  .header-toolbar {
    width: auto;
    flex: 0 0 auto;
    min-width: 0;
    max-width: none;
    margin-left: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.18rem;
  }

  .header-toolbar-primary {
    flex-wrap: nowrap;
    gap: 0.2rem;
    min-width: 0;
    justify-content: flex-end;
  }

  .header-toolbar-mode {
    flex-shrink: 0;
    gap: 0.2rem;
  }

  .header-icon-btn,
  .header-tool-pill,
  .header-conn {
    min-width: 36px;
    min-height: 36px;
    padding: 0.35rem;
  }

  .header-conn {
    padding: 0.35rem;
    font-size: 0.62rem;
    justify-content: center;
  }

  .ui-mode-toggle--icons .ui-mode-btn {
    width: 2.25rem;
    min-width: 2.25rem;
    min-height: 36px;
  }

  .ui-mode-btn {
    flex: 0 0 auto;
    min-height: 44px;
  }

  .simple-dashboard {
    max-width: 100%;
  }

  .header-select {
    min-height: 44px;
    font-size: 0.8rem;
    max-width: none;
    flex: 1 1 auto;
  }

  .top-tabs,
  .app-top-nav.top-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    gap: 0.4rem;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
    width: 100%;
    max-width: 100%;
  }

  .top-tabs::-webkit-scrollbar,
  .app-top-nav.top-tabs::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    flex-shrink: 0;
    scroll-snap-align: start;
    min-height: 44px;
    padding: 0.55rem 0.9rem;
    font-size: 0.72rem;
  }

  body[data-ui-mode="drive"] .sim-mode-banner {
    padding: 0.35rem 0.65rem;
    font-size: 0.68rem;
    gap: 0.35rem;
  }

  body[data-ui-mode="drive"] .sim-mode-banner-text {
    min-width: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body[data-ui-mode="drive"] .sim-mode-banner-vehicle {
    display: none;
  }

  body[data-ui-mode="drive"] .drive-insights-label,
  body[data-ui-mode="drive"] .drive-health-label {
    margin-bottom: 0.35rem;
  }

  body[data-ui-mode="drive"] .drive-insights-block,
  body[data-ui-mode="drive"] .drive-health-block {
    margin-bottom: 0.45rem;
  }

  body[data-ui-mode="drive"] .drive-action-btn {
    min-height: 44px;
  }

  .session-context {
    padding: var(--chrome-session-padding, 0.35rem 0.45rem);
    gap: var(--chrome-session-gap, 0.2rem);
  }

  .session-focus-bar {
    flex-wrap: wrap;
    row-gap: 0.35rem;
  }

  .session-focus-vehicle {
    flex: 1 1 8rem;
    min-width: 0;
  }

  .session-focus-meta {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .session-focus-actions {
    margin-left: auto;
  }

  .session-focus-results-btn {
    padding: 0.28rem 0.45rem;
    font-size: 0.62rem;
  }

  .session-status-line {
    align-items: flex-start;
  }

  .session-status-text {
    white-space: normal;
    line-height: 1.35;
  }

  .vehicle-garage-hint {
    display: none;
  }

  .vehicle-garage-head {
    margin-bottom: 0.28rem;
  }

  .session-vehicle-row {
    gap: 0.35rem;
  }

  .scenario-chip-label {
    display: none;
  }

  .scenario-chip-btn {
    padding: 0.34rem;
    min-width: 34px;
  }

  .session-change-vehicle-btn {
    padding: 0.28rem 0.4rem !important;
    font-size: 0.58rem !important;
  }

  .vehicle-ecu-ymm {
    font-size: 0.82rem;
  }

  .session-source-banner-label,
  .auto-analysis-label {
    font-size: 0.72rem;
  }

  .session-source-banner-kicker,
  .auto-analysis-kicker {
    font-size: 0.58rem;
  }

  .vehicle-picker-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    width: 100%;
  }

  .vehicle-picker-select {
    width: 100%;
    max-width: none;
    min-height: 44px;
    font-size: 0.8rem;
  }

  .vehicle-picker-select#ymm-spec {
    grid-column: 1 / -1;
  }

  .panel {
    padding: 1rem;
    border-radius: 12px;
  }

  .panel-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .panel-header.panel-header--inline {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .panel-header.panel-header--inline .panel-title {
    min-width: 0;
    flex: 1 1 auto;
  }

  .panel-header.panel-header--inline .btn-small {
    width: auto;
    min-height: 36px;
    flex-shrink: 0;
    padding: 0.45rem 0.65rem;
    font-size: 0.78rem;
  }

  .panel-title {
    font-size: 0.95rem;
  }

  .panel-hint,
  .admin-hint {
    font-size: 0.82rem;
    line-height: 1.5;
  }

  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .admin-toolbar .btn-small,
  .admin-toolbar-admin-only .btn-small {
    width: 100%;
    min-height: 44px;
    font-size: 0.85rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
  }

  .admin-toolbar-admin-only {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    width: 100%;
  }

  .admin-meta-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .admin-meta-row > span {
    font-size: 0.82rem;
  }

  .admin-filter-select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    font-size: 0.85rem;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-list {
    max-height: 240px;
  }

  .admin-record-item {
    padding: 0.75rem;
    min-height: 44px;
  }

  .admin-record-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .admin-json {
    font-size: 0.72rem;
    max-height: 180px;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .vin-location-checklist {
    grid-template-columns: 1fr;
  }

  .scenario-vin-field-grow {
    min-width: 0;
    width: 100%;
  }

  .scenario-vin-input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .scenario-vin-input-row .btn-small,
  .scenario-media-actions .btn-small,
  .scenario-wide .btn-small {
    min-height: 44px;
    width: 100%;
    font-size: 0.85rem;
    padding: 0.65rem;
  }

  .input-field,
  .lookup-btn,
  textarea.input-field {
    font-size: 16px;
    min-height: 44px;
  }

  .scenario-structured-row {
    grid-template-columns: 1fr;
  }

  .scenario-media-card img,
  .scenario-vin-photo-card img {
    max-width: 100%;
    height: auto;
  }

  .financial-summary-row {
    grid-template-columns: 1fr;
  }

  .terminal-controls .btn-small {
    min-height: 40px;
    padding: 0.45rem 0.65rem;
  }
}

/* Locale icon controls (Settings tab) */
.locale-icon-settings {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.vehicle-locale-fields {
  width: 100%;
}

.vehicle-locale-fields .locale-zip-control {
  flex: 1 1 8rem;
  min-width: 0;
}

.locale-icon-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--surface-1);
  cursor: pointer;
}

.locale-icon-control [data-lucide] {
  width: 1.15rem;
  height: 1.15rem;
  color: var(--accent-cyan);
  pointer-events: none;
}

.locale-zip-control {
  min-width: 8.5rem;
}

.locale-zip-input {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 600;
  width: 6.75rem;
  padding: 0.15rem 0.25rem;
  outline: none;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.locale-zip-input--invalid {
  color: var(--color-danger, #f87171);
}

.locale-zip-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
}

.locale-zip-status {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted);
  min-height: 1rem;
}

.locale-zip-status--ok {
  color: var(--color-success, #4ade80);
}

.locale-zip-status--pending {
  color: var(--text-muted);
}

.locale-zip-status--error {
  color: var(--color-danger, #f87171);
}

.vehicle-locale-panel {
  margin-top: 0.5rem;
}

.vehicle-locale-panel--disabled .vehicle-locale-fields,
.vehicle-locale-panel--disabled #vehicle-locale-use-global {
  opacity: 0.55;
  pointer-events: none;
}

.vehicle-locale-locked-hint {
  color: var(--color-warning, #fbbf24);
  font-size: 0.78rem;
  line-height: 1.4;
}

.vehicle-locale-active {
  font-weight: 600;
  color: var(--accent-cyan);
}

.valuation-adj-why {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.88em;
}

.valuation-private-hst {
  margin-top: 0.35rem;
}

.health-check-summary-stat--muted {
  color: var(--text-muted);
  font-style: italic;
}

.locale-icon-select {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.timeline-odometer-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.odometer-source-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 210, 255, 0.35);
  border-radius: 999px;
  padding: 0.2rem 0.45rem;
  white-space: nowrap;
}

.timeline-driving-input[readonly] {
  opacity: 0.92;
  cursor: default;
}

/* Live metrics dashboard */
.live-data-status {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-hud);
}

.live-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.live-metric-card {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0.55rem 0.6rem 0.45rem;
  background: var(--surface-1);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 108px;
}

.live-metric-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.live-metric-value {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--font-hud);
  color: var(--text-primary);
  line-height: 1.1;
}

.live-metric-spark {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 28px;
  margin-top: auto;
}

.live-metric-spark span {
  flex: 1;
  min-width: 2px;
  background: rgba(0, 210, 255, 0.55);
  border-radius: 2px 2px 0 0;
}

.live-metric-spark--empty {
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.15), transparent);
}

.live-metric-count {
  font-size: 0.58rem;
  color: var(--text-muted);
}

.live-metric-hint {
  font-size: 0.58rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.health-checks-panel {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-soft);
}

.health-section-title {
  margin: 0 0 0.45rem;
  font-family: var(--font-hud);
  font-size: 0.82rem;
  color: var(--text-primary);
}

.health-section-title--prominent {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0.35rem 0 0.5rem;
}

.health-checks-collapsible {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--surface-1);
  overflow: hidden;
}

.health-checks-collapsible[open] .health-checks-collapse-action::after {
  content: " (tap to collapse)";
  font-weight: 400;
  color: var(--text-muted);
}

.health-checks-collapse-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-hud);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-cyan);
  user-select: none;
}

.health-checks-collapse-summary::-webkit-details-marker {
  display: none;
}

.health-checks-collapse-meta {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-muted);
}

.health-checks-collapsible .health-check-intro,
.health-checks-collapsible .health-check-list {
  padding: 0 0.75rem 0.75rem;
}

.health-obd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.health-obd-card {
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 0.45rem 0.5rem;
  background: var(--surface-1);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.health-obd-card--ok { border-color: rgba(34, 197, 94, 0.35); }
.health-obd-card--warn { border-color: rgba(251, 191, 36, 0.45); }
.health-obd-card--alert { border-color: rgba(239, 68, 68, 0.45); }
.health-obd-card--neutral { border-color: var(--border-soft); }

.health-obd-label {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.health-obd-value {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-hud);
  color: var(--text-primary);
}

.health-obd-detail {
  font-size: 0.62rem;
  color: var(--text-muted);
  line-height: 1.25;
}

.health-check-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.health-check-summary-stat {
  font-size: 0.68rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
}

.health-check-summary-stat--issue {
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.health-check-summary-stat--pending {
  border-color: rgba(251, 191, 36, 0.4);
  color: #fbbf24;
}

.health-check-summary-stat--exposure {
  border-color: rgba(0, 210, 255, 0.35);
  color: var(--accent-cyan);
}

.health-check-intro {
  margin-bottom: 0.65rem;
}

.health-check-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.health-check-row {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0.65rem 0.7rem;
  background: var(--surface-1);
}

.health-check-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.health-check-label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.health-check-badge {
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
}

.health-check-badge--critical {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.health-check-exposure {
  font-size: 0.62rem;
  color: var(--accent-cyan);
  margin-left: auto;
}

.health-check-prompt {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  color: var(--text-primary);
}

.health-check-why {
  margin: 0 0 0.45rem;
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.health-check-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
}

.health-check-status-btn {
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
}

.health-check-status-btn.active {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: var(--accent-cyan-glow);
}

.health-check-status-btn[data-health-status="issue"].active {
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
}

.health-check-pending-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-style: italic;
}

.health-check-pending-label--hint {
  font-style: normal;
}

.scan-finding,
.financial-scan-findings .scan-finding,
.simple-scan-findings .scan-finding {
  margin: 0.75rem 0 1rem;
  padding: 1rem 1rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
}

.scan-finding--high,
.scan-finding--critical {
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(160deg, rgba(245, 158, 11, 0.08), var(--card-bg));
}

.scan-finding--critical {
  border-color: rgba(239, 68, 68, 0.45);
  background: linear-gradient(160deg, rgba(239, 68, 68, 0.08), var(--card-bg));
}

.scan-finding-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.scan-finding-badge {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-warning);
}

.scan-finding-badge--critical {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.scan-finding-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  flex: 1 1 100%;
}

.scan-finding-summary {
  margin: 0 0 0.65rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.scan-finding-evidence ul,
.scan-finding-steps ol {
  margin: 0.35rem 0 0.65rem;
  padding-left: 1.15rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.scan-finding-evidence strong,
.scan-finding-steps strong {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.scan-finding-steps li {
  margin-bottom: 0.4rem;
}

.scan-finding-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.35rem;
  border-radius: 999px;
  background: var(--accent-cyan);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  vertical-align: top;
}

.scan-finding-note {
  margin: 0.25rem 0 0;
  font-size: 0.72rem;
}

.simple-scan-findings.hidden,
.financial-scan-findings:empty {
  display: none;
}

.health-check-note-label {
  display: block;
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.health-check-note {
  width: 100%;
  min-height: 2.5rem;
  font-size: 0.72rem;
}

.health-check-photo-hint {
  margin: 0.35rem 0 0;
}

.simple-health-summary {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.simple-health-stand {
  margin: 0 0 0.35rem;
  font-weight: 600;
  color: var(--text-primary);
}

.simple-health-exposure {
  margin: 0 0 0.5rem;
  color: var(--accent-cyan);
  font-size: 0.72rem;
}

.simple-health-subhead {
  margin: 0.35rem 0 0.2rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.simple-health-list {
  margin: 0 0 0.35rem;
  padding-left: 1.1rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.simple-health-list .health-simple-exp {
  color: var(--text-muted);
  font-size: 0.65rem;
}

.simple-health-issue {
  color: #f87171;
}

.simple-metric--wide {
  grid-column: 1 / -1;
}

.simple-market-summary {
  font-size: 0.72rem;
  line-height: 1.4;
  margin-top: 0.25rem;
}

/* --- Vehicle valuation --- */
.vehicle-valuation-panel {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-soft);
}

.vehicle-valuation-panel.hidden {
  display: none;
}

.vehicle-valuation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.vehicle-valuation-title {
  margin: 0;
  font-family: var(--font-hud);
  font-size: 0.82rem;
}

.vehicle-valuation-body {
  margin-top: 0.5rem;
}

.valuation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr));
  gap: 0.75rem;
}

.valuation-block {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  background: var(--surface-1);
  min-width: 0;
}

.valuation-block--highlight {
  border-color: rgba(0, 210, 255, 0.35);
  background: var(--accent-cyan-glow);
}

.valuation-block--wide {
  grid-column: 1 / -1;
}

.valuation-block-title {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  line-height: 1.35;
  word-wrap: break-word;
}

.valuation-sub-title {
  margin-top: 0.65rem;
}

.valuation-block-hint {
  margin: 0.25rem 0 0;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.valuation-range-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  font-family: var(--font-hud);
  font-weight: 700;
  color: var(--text-primary);
}

.valuation-range-mid {
  font-size: 1.15rem;
  color: var(--accent-cyan);
}

.valuation-fair-mid {
  font-size: 1.35rem;
  font-weight: 700;
  font-family: var(--font-hud);
  color: var(--text-primary);
}

.valuation-adj-list {
  margin: 0.35rem 0;
  padding-left: 1rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
  word-wrap: break-word;
}

.valuation-adj-list--muted {
  color: var(--text-muted);
  font-style: italic;
}

.valuation-offer-hint,
.valuation-true-cost {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
}

.valuation-asking-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.valuation-currency {
  font-weight: 700;
  color: var(--text-muted);
}

.valuation-asking-input {
  flex: 1;
}

.valuation-over-ask {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  color: var(--accent-cyan);
}

.valuation-over-ask--high {
  color: #f87171;
}

.valuation-tax-list {
  margin: 0.25rem 0;
  padding-left: 1rem;
  font-size: 0.68rem;
}

.valuation-tax-total {
  margin-top: 0.25rem;
}

.valuation-sources {
  margin-top: 0.45rem;
  font-size: 0.68rem;
}

.valuation-comp-list {
  margin: 0.35rem 0 0;
  padding-left: 1rem;
  font-size: 0.68rem;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.valuation-comp-list li {
  margin-bottom: 0.35rem;
  line-height: 1.4;
}

.valuation-comp-price {
  font-weight: 700;
  color: var(--accent-cyan);
}

.valuation-warn {
  font-size: 0.68rem;
  color: #fbbf24;
}

.valuation-proj-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 0.35rem;
}

.valuation-proj-table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.valuation-proj-table th,
.valuation-proj-table td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  vertical-align: top;
  line-height: 1.35;
}

.valuation-proj-table th {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
}

.valuation-proj-table td:nth-child(n + 2):nth-child(-n + 5) {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.valuation-proj-note {
  color: var(--text-muted);
  max-width: none;
  min-width: 8rem;
  font-size: 0.68rem;
  line-height: 1.4;
}

.valuation-proj-cards {
  display: none;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.35rem;
}

.valuation-proj-card {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: var(--surface-2);
}

.valuation-proj-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-weight: 700;
  font-family: var(--font-hud);
  color: var(--text-primary);
}

.valuation-proj-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.65rem;
  font-size: 0.72rem;
}

.valuation-proj-card-row {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}

.valuation-proj-card-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.valuation-proj-card-value {
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.valuation-proj-card-note {
  margin: 0.45rem 0 0;
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .valuation-proj-table-wrap {
    display: none;
  }

  .valuation-proj-cards {
    display: flex;
  }

  .valuation-fair-mid {
    font-size: 1.2rem;
  }

  .valuation-range-mid {
    font-size: 1rem;
  }

  #valuation-status {
    font-size: 0.72rem;
    line-height: 1.45;
  }

  .valuation-block {
    padding: 0.65rem 0.7rem;
  }

  .valuation-block-title {
    font-size: 0.66rem;
    line-height: 1.35;
  }
}

/* --- Unified money view (Drive / Simple / Advanced) --- */
.unified-money-dual-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.unified-money-dual-col {
  padding: 0.75rem 0.65rem;
  border-radius: var(--radius-md, 10px);
  background: var(--panel-bg, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  text-align: center;
}

.unified-money-dual-kicker {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.unified-money-dual-val {
  display: block;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
  font-family: var(--font-display, inherit);
}

.unified-money-dual-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.unified-money-subline--dual {
  margin-top: 0.25rem;
}

.unified-money-block {
  width: 100%;
}

.unified-money-hero {
  margin-bottom: 0.55rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
}

.unified-money-hero-kicker {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.unified-money-hero-val {
  font-family: var(--font-hud);
  font-size: clamp(1.85rem, 9vw, 2.75rem);
  font-weight: 900;
  line-height: 1.05;
  margin: 0.15rem 0;
  color: var(--text-primary);
}

.unified-money-hero-val--market {
  font-size: clamp(1.35rem, 7vw, 2rem);
}

.unified-money-hero--equity .unified-money-hero-val {
  color: var(--color-success);
}

.unified-money-hero--underwater .unified-money-hero-val {
  color: var(--color-danger);
}

.unified-money-hero-sub,
.unified-money-subline {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-secondary);
}

.unified-money-denom {
  font-size: 0.45em;
  color: var(--text-muted);
  font-weight: 700;
}

.unified-money-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.unified-money-col {
  padding: 0.45rem 0.35rem;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--card-bg);
  text-align: center;
}

.unified-money-col-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.unified-money-metric {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  margin-top: 0.2rem;
}

.unified-money-metric-kicker {
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.unified-money-score {
  font-family: var(--font-hud);
  font-size: clamp(1.25rem, 6vw, 1.65rem);
  font-weight: 900;
  line-height: 1;
}

.unified-money-repair {
  font-family: var(--font-hud);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

.unified-money-cta {
  display: block;
  width: 100%;
  margin-top: 0.55rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: transparent;
  color: var(--accent-cyan);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.unified-money-cta:hover {
  border-color: rgba(0, 210, 255, 0.45);
  background: rgba(0, 210, 255, 0.06);
}

.unified-money-position {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.unified-money-position--muted {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted, rgba(255, 255, 255, 0.55));
}

.unified-money-hero--prompt .unified-money-hero-val--prompt {
  opacity: 0.45;
  font-size: 2rem;
}

.drive-system--action {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.drive-system--action:hover {
  border-color: rgba(0, 210, 255, 0.4);
}

.drive-system-cta,
.health-summary-cta {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.drive-insights-action,
.drive-health-summary-action,
.drive-warning-action {
  width: 100%;
  border: 1px dashed var(--border-soft);
  border-radius: 10px;
  background: var(--surface-1);
  color: var(--text-secondary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  padding: 0.65rem 0.75rem;
}

.drive-health-summary-action {
  border-style: solid;
}

.drive-warning-action {
  color: var(--color-warning);
  border-color: rgba(245, 158, 11, 0.35);
}

.garage-drawer-footer {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border-soft);
}

.garage-drawer-hint {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.garage-drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* --- Ownership position (Analyze → Resale value & timing) --- */
.ownership-financing-block,
.ownership-position-block {
  margin-bottom: 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
}

.ownership-payment-toggle {
  display: flex;
  margin: 0.65rem 0 0.85rem;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--card-border);
  overflow: hidden;
  background: var(--surface-1);
}

.ownership-payment-btn {
  flex: 1;
  margin: 0;
  padding: 0.65rem 0.45rem;
  border: none;
  border-right: 1px solid var(--card-border);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.78rem;
  line-height: 1.25;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.ownership-payment-btn:last-child {
  border-right: none;
}

.ownership-payment-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.ownership-payment-btn.active {
  background: rgba(0, 210, 255, 0.14);
  color: var(--accent-cyan);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--accent-cyan);
}

.ownership-payment-label--short {
  display: none;
}

.ownership-subsection-title {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-primary);
}

.ownership-expense-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.75rem;
  margin: 0.45rem 0 0.65rem;
}

.ownership-expense-row {
  min-width: 0;
}

.ownership-expense-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.ownership-expense-input-row {
  margin-bottom: 0;
}

.ownership-expense-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.ownership-expense-chip {
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
}

.ownership-expense-chip:hover {
  border-color: rgba(0, 210, 255, 0.45);
  color: var(--accent-cyan);
}

.ownership-total-in-box {
  margin: 0.65rem 0 0.35rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 210, 255, 0.25);
  background: rgba(0, 210, 255, 0.06);
}

.ownership-total-in-rows {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.45rem;
}

.ownership-total-in-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.ownership-total-in-row span:last-child {
  font-family: var(--font-hud);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.ownership-total-in-row--total {
  padding-top: 0.45rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ownership-total-in-row--total span:last-child {
  font-size: 1.05rem;
  color: var(--accent-cyan);
}

@media (max-width: 520px) {
  .ownership-expense-grid {
    grid-template-columns: 1fr;
  }

  .ownership-payment-btn {
    font-size: 0.72rem;
    padding: 0.6rem 0.3rem;
  }

  .ownership-payment-label--long {
    display: none;
  }

  .ownership-payment-label--short {
    display: inline;
  }
}

.ownership-financing-detail.hidden {
  display: none !important;
}

.ownership-rate-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.ownership-rate-input-row {
  flex: 1;
  min-width: 6rem;
}

.ownership-rate-suffix {
  font-weight: 700;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

.ownership-loan-term-select {
  width: 100%;
  max-width: 12rem;
}

.ownership-loan-estimate {
  margin: 0.65rem 0 0.35rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: rgba(0, 210, 255, 0.04);
}

.ownership-loan-estimate--summary {
  margin-top: 0.35rem;
}

.ownership-loan-estimate-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.78rem;
  padding: 0.15rem 0;
}

.ownership-loan-estimate-row strong {
  color: var(--accent-cyan);
}

.equity-writeoff-banner {
  margin: 0.5rem 0 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.08);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
}

.equity-exposure-block {
  margin: 0.75rem 0 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-soft);
}

.equity-section {
  margin-bottom: 0.65rem;
}

.equity-section-title {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.equity-item-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.equity-item {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border-soft);
}

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

.equity-item-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
}

.equity-item-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
}

.equity-item-range {
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent-cyan);
  white-space: nowrap;
}

.equity-item-range--note {
  color: var(--text-muted);
  font-weight: 600;
}

.equity-item-reason {
  margin: 0.12rem 0 0;
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.equity-item-due {
  display: inline-block;
  margin-top: 0.12rem;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
}

.equity-section-total,
.equity-counted-total {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  color: var(--text-primary);
}

.equity-counted-total strong {
  color: var(--accent-cyan);
}

.ownership-field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0.35rem 0 0.25rem;
}

.ownership-field-hint,
.ownership-privacy-note {
  margin: 0.25rem 0 0.55rem;
}

.ownership-estimate-link-wrap {
  margin: 0.35rem 0 0.15rem;
}

.ownership-estimate-panel {
  margin: 0.55rem 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
}

.ownership-estimate-panel.hidden {
  display: none !important;
}

.ownership-estimate-row {
  margin-bottom: 0.45rem;
}

.ownership-estimate-apply {
  margin-top: 0.35rem;
}

.ownership-confirmed {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-success);
}

.ownership-optional {
  font-weight: 500;
  color: var(--text-muted);
}

.ownership-lease-soon {
  margin: 0.35rem 0 0;
  font-style: italic;
  color: var(--text-secondary);
}

.ownership-market-range {
  font-family: var(--font-hud);
  font-size: clamp(1.35rem, 6vw, 1.85rem);
  font-weight: 900;
  color: var(--text-primary);
  margin: 0.35rem 0 0.15rem;
}

.ownership-position-prompt {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.ownership-position-hero {
  font-family: var(--font-hud);
  font-size: clamp(2rem, 10vw, 3rem);
  font-weight: 900;
  line-height: 1.05;
  margin: 0.45rem 0 0.2rem;
  font-variant-numeric: tabular-nums;
}

.ownership-position-hero--equity {
  color: var(--color-success);
}

.ownership-position-hero--underwater {
  color: var(--color-danger);
}

.ownership-position-hero--even {
  color: var(--text-primary);
}

.ownership-position-verdict {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ownership-position-range-hint {
  margin: 0 0 0.65rem;
}

.ownership-position-lines {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ownership-position-line-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
  color: var(--text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ownership-position-line-btn:hover {
  border-color: rgba(0, 210, 255, 0.35);
}

.ownership-position-line-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.ownership-position-line-value {
  font-family: var(--font-hud);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ownership-position-line-detail {
  margin: 0.25rem 0.15rem 0.35rem;
  padding: 0 0.65rem;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.ownership-position-line-detail.hidden {
  display: none !important;
}

.ownership-source-tag {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.08rem 0.35rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.ownership-source-tag--known {
  background: rgba(16, 185, 129, 0.12);
  color: var(--color-success);
}

.ownership-source-tag--estimated {
  background: rgba(245, 158, 11, 0.12);
  color: var(--color-warning);
}

.ownership-source-tag--assumed {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
}

.ownership-selling-row {
  max-width: 12rem;
}

/* --- Action queue --- */
.action-queue-panel {
  margin-bottom: 0.75rem;
}

.action-queue-panel-hint {
  font-size: 0.72rem;
  margin: 0;
}

.action-queue {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.action-queue.hidden {
  display: none;
}

.action-queue-empty {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.action-queue-empty.hidden {
  display: none;
}

.action-queue-card {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-left-width: 4px;
}

.action-queue-card--now {
  border-left-color: var(--color-danger, #ef4444);
}

.action-queue-card--before {
  border-left-color: var(--color-warning, #f59e0b);
}

.action-queue-card--plan {
  border-left-color: #eab308;
}

.action-queue-card--verify {
  border-left-color: var(--accent, #00d2ff);
}

.action-queue-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.action-queue-priority {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
}

.action-queue-priority--now {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.action-queue-priority--before {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.action-queue-card-amt {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.action-queue-card-title {
  margin: 0 0 0.3rem;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
}

.action-queue-card-why {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.action-queue-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.45rem;
}

.action-queue-source {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text-muted);
}

.action-queue-steps {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.action-queue-steps li {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  margin-bottom: 0.25rem;
  line-height: 1.35;
}

.action-queue-step-num {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--surface-2);
  font-size: 0.62rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.action-queue-copy {
  margin-top: 0.15rem;
}

/* ─── Admin data assets intelligence ─────────────────────────────────────── */
.admin-data-intelligence-section {
  margin-top: 0.5rem;
}

.admin-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.35rem 0 0.65rem;
}

.admin-section-nav-link {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-cyan);
  text-decoration: none;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
}

.admin-section-nav-link:hover {
  border-color: rgba(0, 210, 255, 0.45);
}

.admin-capture-section[id],
.admin-kb-section[id] {
  scroll-margin-top: 4.5rem;
}

.admin-data-intelligence {
  margin-top: 0.65rem;
}

.admin-intel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.admin-intel-meta {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.admin-intel-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-intel-filter {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.admin-intel-select {
  min-width: 7.5rem;
  font-size: 0.75rem;
  padding: 0.35rem 0.45rem;
}

.admin-intel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.admin-intel-section {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
}

.admin-intel-section-title {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.admin-intel-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-intel-item {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-secondary);
}

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

.admin-intel-item strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.8rem;
  margin-bottom: 0.12rem;
}

.admin-intel-item-sub {
  display: block;
  color: var(--text-muted);
  font-size: 0.74rem;
}

.admin-intel-item--high {
  border-left: 2px solid var(--color-danger);
  padding-left: 0.45rem;
}

.admin-intel-item--medium {
  border-left: 2px solid var(--color-warning);
  padding-left: 0.45rem;
}

.admin-intel-item--trend {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
}

.admin-intel-trend-arrow {
  font-family: var(--font-hud);
  font-weight: 900;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.admin-intel-trend--up .admin-intel-trend-arrow {
  color: var(--color-success);
}

.admin-intel-trend--down .admin-intel-trend-arrow {
  color: var(--color-danger);
}

.admin-intel-trend--flat .admin-intel-trend-arrow {
  color: var(--text-muted);
}

.admin-intel-empty {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.admin-intel-section--plan {
  margin-bottom: 0.65rem;
}

.admin-intel-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.admin-intel-plan-col h5 {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.admin-intel-plan-col ul {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.admin-intel-subtitle {
  margin: 0.5rem 0 0.35rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.admin-intel-table-wrap {
  overflow-x: auto;
}

.admin-intel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
}

.admin-intel-table th,
.admin-intel-table td {
  padding: 0.35rem 0.45rem;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  vertical-align: top;
}

.admin-intel-table th {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.admin-intel-vin {
  font-size: 0.68rem;
}

.admin-intel-priority {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-intel-priority--high {
  color: var(--color-danger);
}

.admin-intel-priority--medium {
  color: var(--color-warning);
}

.admin-intel-priority--low {
  color: var(--color-success);
}

.admin-intel-buckets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.admin-intel-bucket {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: var(--surface-1);
}

.admin-intel-bucket--high {
  color: var(--color-success);
}

.admin-intel-bucket--mid {
  color: var(--color-warning);
}

.admin-intel-bucket--low {
  color: var(--color-danger);
}

/* ─── Drive / Simple / Advanced UI modes ─────────────────────────────────── */

body[data-ui-mode="drive"] .ui-advanced-only,
body[data-ui-mode="drive"] #simple-dashboard {
  display: none !important;
}

body[data-ui-mode="drive"] #drive-dashboard {
  display: block;
}

body[data-ui-mode="drive"] .header-meta,
body[data-ui-mode="drive"] #header-conn-label {
  display: none;
}

body[data-ui-mode="drive"] .session-status-line {
  display: none !important;
}

body[data-ui-mode="drive"] .session-status-panel {
  display: none;
}

body[data-ui-mode="drive"] .vehicle-garage-head {
  margin-bottom: 0.15rem;
}

body[data-ui-mode="drive"] .vehicle-garage-chip {
  padding: 0.22rem 0.38rem;
  min-height: 0;
}

body[data-ui-mode="drive"] .vehicle-garage-chip-label {
  font-size: 0.72rem;
}

body[data-ui-mode="drive"] .vehicle-garage-chip-meta {
  font-size: 0.58rem;
}

body[data-ui-mode="drive"] .vehicle-garage-hint {
  display: none;
}

body[data-ui-mode="drive"] #session-source-banner {
  display: none;
}

body[data-ui-mode="drive"] .auto-analysis-strip {
  display: none;
}

body[data-ui-mode="drive"] .drive-dashboard {
  margin-top: 0;
  padding-top: 0;
}

body[data-ui-mode="drive"] .drive-status-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.5rem;
  margin-bottom: 0.35rem;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  font-size: 0.72rem;
  line-height: 1.3;
  cursor: pointer;
}

body[data-ui-mode="drive"] .drive-status-bar:hover {
  border-color: rgba(0, 210, 255, 0.35);
  background: rgba(0, 210, 255, 0.05);
}

body[data-ui-mode="drive"] .drive-status-dot {
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--text-muted);
}

body[data-ui-mode="drive"] .drive-status-dot--live {
  background: var(--color-success);
}

body[data-ui-mode="drive"] .drive-status-dot--off {
  background: var(--color-danger);
  opacity: 0.75;
}

body[data-ui-mode="drive"] .drive-status-text {
  color: var(--text-secondary);
  min-width: 0;
}

body[data-ui-mode="drive"] .drive-status-bar--live {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.06);
}

body[data-ui-mode="drive"] .drive-score-block {
  padding: 0.65rem 0.5rem 0.55rem;
  margin-bottom: 0.45rem;
}

body[data-ui-mode="drive"] .score-exposure-grid--drive {
  gap: 0.35rem;
}

body[data-ui-mode="drive"] .score-exposure-col {
  padding: 0.35rem 0.25rem;
}

body[data-ui-mode="drive"] .drive-live-dials-wrap {
  margin-bottom: 0.45rem;
}

body[data-ui-mode="drive"] .drive-live-dials-label {
  display: none;
}

body[data-ui-mode="drive"] .drive-connection {
  display: none !important;
}

body[data-ui-mode="drive"] .drive-live-dial-hint {
  font-size: 0.62rem;
  line-height: 1.25;
}

body[data-ui-mode="drive"] .drive-insights-label {
  margin-bottom: 0.28rem;
  font-size: 0.68rem;
}

body[data-ui-mode="drive"] .drive-insights-grid {
  gap: 0;
}

body[data-ui-mode="drive"] .vehicle-garage-list {
  gap: 0.2rem;
  padding-bottom: 0;
}

body[data-ui-mode="simple"] .vehicle-garage-hint {
  display: none;
}

body[data-ui-mode="simple"] #drive-dashboard,
body[data-ui-mode="advanced"] #drive-dashboard {
  display: none !important;
}

/* Session source: live OBD vs saved garage browse */
.session-source-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
}

.session-source-banner-dot {
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: var(--text-muted);
}

.session-source-banner-dot--live {
  background: var(--color-success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.session-source-banner-dot--saved {
  background: var(--color-warning);
}

.session-source-banner-dot--off {
  background: var(--color-danger);
  opacity: 0.85;
}

.session-source-banner--live {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.06);
}

.session-source-banner--saved {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.06);
}

.session-source-banner--off {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.04);
}

.session-source-banner-kicker {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.12rem;
}

.session-source-banner-label {
  display: block;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-primary);
}

.vehicle-garage-chip--connected {
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.15);
}

.vehicle-garage-chip--connected .vehicle-garage-chip-meta {
  color: var(--color-success);
}

/* Health check mode (formerly Drive) — large checklist layout */
.drive-health-check-mode {
  margin-bottom: 0.85rem;
}

.drive-health-check-mode-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0.65rem 0 0.45rem;
  padding: 0 0.1rem;
}

.drive-health-check-mode-label--checks {
  margin-top: 0.85rem;
}

.drive-health-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.drive-health-metric {
  padding: 0.75rem 0.8rem;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  min-height: 4.5rem;
}

.drive-health-metric--ok {
  border-color: rgba(34, 197, 94, 0.35);
}

.drive-health-metric--warn {
  border-color: rgba(245, 158, 11, 0.4);
}

.drive-health-metric--alert {
  border-color: rgba(239, 68, 68, 0.45);
}

.drive-health-metric-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.drive-health-metric-value {
  display: block;
  font-family: var(--font-hud);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
  margin-top: 0.2rem;
  color: var(--text-primary);
}

.drive-health-metric-detail {
  display: block;
  font-size: 0.68rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  line-height: 1.35;
}

.drive-checklist-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 0.65rem;
}

.drive-checklist-progress-open {
  color: var(--color-warning);
  font-weight: 600;
}

.drive-checklist-progress-risk {
  color: var(--accent-cyan);
  font-weight: 600;
}

.drive-checklist-open {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.drive-check-card {
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  padding: 1rem 1rem 0.95rem;
  box-shadow: 0 10px 28px var(--shadow-soft);
}

.drive-check-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.drive-check-card-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
  color: var(--text-primary);
}

.drive-check-card-prompt {
  margin: 0 0 0.35rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.drive-check-card-exp {
  margin: 0 0 0.65rem;
  font-size: 0.74rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.drive-check-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.drive-check-btn {
  min-height: 3.25rem;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--surface-0);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.75rem 0.65rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.drive-check-btn--ok {
  border-color: rgba(34, 197, 94, 0.45);
  color: #16a34a;
  background: rgba(34, 197, 94, 0.08);
}

.drive-check-btn--ok:active,
.drive-check-btn--ok:hover {
  background: rgba(34, 197, 94, 0.16);
}

.drive-check-btn--issue {
  border-color: rgba(239, 68, 68, 0.4);
  color: #dc2626;
  background: rgba(239, 68, 68, 0.06);
}

.drive-check-btn--issue:active,
.drive-check-btn--issue:hover {
  background: rgba(239, 68, 68, 0.12);
}

.drive-checklist-done {
  margin-top: 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--surface-0);
  padding: 0.35rem 0.65rem 0.55rem;
}

.drive-checklist-done-summary {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.45rem 0.15rem;
}

.drive-checklist-done-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-bottom: 0.25rem;
}

.drive-check-done-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.55rem 0.45rem;
  border-radius: 10px;
  background: var(--card-bg);
  font-size: 0.8rem;
}

.drive-check-done-row--ok .drive-check-done-status {
  color: #16a34a;
  font-weight: 700;
}

.drive-check-done-row--issue .drive-check-done-status {
  color: #dc2626;
  font-weight: 700;
}

.drive-check-undo {
  border: none;
  background: transparent;
  color: var(--accent-cyan);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.35rem;
}

.drive-checklist-all-done {
  margin: 0.25rem 0 0.5rem;
  font-size: 0.86rem;
  color: var(--color-success);
  font-weight: 600;
}

body[data-ui-mode="drive"] .drive-action-btn {
  min-height: 3rem;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
}

body[data-ui-mode="drive"] .drive-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

body[data-ui-mode="drive"] .drive-ask-moto-btn {
  grid-column: 1 / -1;
}

/* Drive mode — large glance layout */
.drive-dashboard {
  display: none;
  max-width: 100%;
  margin: 0.08rem auto 0.75rem;
  padding: 0;
}

.drive-dashboard.hidden {
  display: none !important;
}

body[data-ui-mode="drive"] .drive-dashboard.hidden {
  display: none !important;
}

.drive-connection {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
}

.drive-connection-dot {
  flex-shrink: 0;
  width: 0.65rem;
  height: 0.65rem;
  margin-top: 0;
  align-self: center;
  border-radius: 50%;
}

.drive-connection-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.drive-connection-label {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 0.15rem;
}

.drive-live-dials-wrap {
  margin-bottom: 0.75rem;
}

.drive-live-dials-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
  padding: 0 0.15rem;
}

.drive-live-dials-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.drive-live-dial {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 7.25rem;
  padding: 0.85rem 0.65rem;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  text-align: center;
}

.drive-live-dial-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.drive-live-dial-value {
  font-family: var(--font-hud);
  font-size: clamp(1.85rem, 9vw, 2.65rem);
  font-weight: 900;
  line-height: 1.1;
  margin: 0.2rem 0;
  color: var(--text-primary);
}

.drive-live-dial-arc {
  height: 4px;
  border-radius: 2px;
  background: var(--surface-2);
  overflow: hidden;
  margin: 0.35rem 0;
}

.drive-live-dial-arc span {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--accent-cyan);
  transition: width 0.35s ease;
}

.drive-live-dial--ok .drive-live-dial-arc span {
  background: var(--color-success);
}

.drive-live-dial--warn .drive-live-dial-arc span,
.drive-live-dial--neutral .drive-live-dial-arc span {
  background: var(--color-warning);
}

.drive-live-dial--danger .drive-live-dial-arc span {
  background: var(--color-danger);
}

.drive-live-dial--unknown {
  opacity: 0.88;
}

.drive-live-dial-hint {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  font-size: 0.68rem;
  line-height: 1.3;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.drive-live-empty {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px dashed var(--border-soft);
}

.drive-score-block {
  text-align: center;
  padding: 1.25rem 1rem 1rem;
  margin-bottom: 0.75rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  box-shadow: 0 8px 24px var(--shadow-soft);
}

.drive-score-val {
  font-family: var(--font-hud);
  font-size: clamp(4.5rem, 22vw, 6.5rem);
  font-weight: 900;
  line-height: 1;
  color: var(--text-primary);
}

.drive-score-denom {
  font-family: var(--font-hud);
  font-size: 1.75rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

/* Score + exposure horizons (Today / 90 / 180 days) */
.score-exposure-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
}

.score-exposure-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.45rem 0.35rem;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
}

.score-exposure-col--today {
  border-color: rgba(0, 210, 255, 0.35);
  background: rgba(0, 210, 255, 0.06);
}

.score-exposure-col-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.score-exposure-score-row {
  display: flex;
  align-items: baseline;
  gap: 0.12rem;
  line-height: 1;
}

.score-exposure-score-val {
  font-family: var(--font-hud);
  font-weight: 900;
  color: var(--text-primary);
}

.score-exposure-score-val.score-high {
  color: var(--color-success);
}

.score-exposure-score-val.score-mid {
  color: var(--color-warning);
}

.score-exposure-score-val.score-low {
  color: var(--color-danger);
}

.score-exposure-score-denom {
  font-family: var(--font-hud);
  font-size: 0.72em;
  color: var(--text-muted);
  font-weight: 600;
}

.score-exposure-money {
  font-family: var(--font-hud);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.01em;
}

.score-exposure-empty {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.score-exposure-grid--drive .score-exposure-score-val {
  font-size: clamp(1.65rem, 8vw, 2.35rem);
}

.score-exposure-grid--drive .score-exposure-score-denom {
  font-size: 0.85rem;
}

.score-exposure-grid--drive .score-exposure-money {
  font-size: 0.95rem;
}

.score-exposure-grid--simple .score-exposure-score-val {
  font-size: clamp(1.65rem, 8vw, 2.35rem);
}

.score-exposure-grid--simple .score-exposure-money {
  font-size: 0.95rem;
}

.score-exposure-horizons-advanced {
  width: 100%;
  max-width: 320px;
}

.score-exposure-grid--advanced {
  gap: 0.35rem;
}

.score-exposure-grid--advanced .score-exposure-col-label {
  font-size: 0.58rem;
}

.score-exposure-grid--advanced .score-exposure-score-val {
  font-size: 1.35rem;
}

.score-exposure-grid--advanced .score-exposure-money {
  font-size: 0.72rem;
}

.drive-score-exposure {
  width: 100%;
}

.drive-risk-pill {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.drive-risk-pill.risk-low {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-success);
}

.drive-risk-pill.risk-medium {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-warning);
}

.drive-risk-pill.risk-high {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-danger);
}

.drive-insights-block {
  margin-bottom: 0.45rem;
}

.drive-systems-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.drive-system--compact {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  font-size: 0.72rem;
  min-width: calc(50% - 0.2rem);
  flex: 1 1 calc(50% - 0.2rem);
  max-width: 100%;
}

.drive-system--compact.drive-system--ok {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
}

.drive-system--compact.drive-system--warn,
.drive-system--compact.drive-system--neutral {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
}

.drive-system--compact.drive-system--risk {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
}

.drive-system-name {
  font-weight: 600;
  color: var(--text-primary);
}

.drive-system-verdict {
  font-weight: 800;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.drive-system--compact .drive-system-verdict {
  color: var(--color-success);
}

.drive-system--compact.drive-system--warn .drive-system-verdict,
.drive-system--compact.drive-system--neutral .drive-system-verdict {
  color: var(--color-warning);
}

.drive-system--compact.drive-system--risk .drive-system-verdict {
  color: var(--color-danger);
}

.drive-system:not(.drive-system--compact) {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--card-bg);
  margin-bottom: 0;
}

.drive-system--warn,
.drive-system--neutral {
  border-left: 3px solid var(--color-warning);
}

.drive-system--risk {
  border-left: 3px solid var(--color-danger);
}

.drive-system-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.drive-system-verdict--ok {
  color: var(--color-success);
}

.drive-system-verdict--warn,
.drive-system-verdict--neutral {
  color: var(--color-warning);
}

.drive-system-verdict--risk {
  color: var(--color-danger);
}

.drive-system-detail {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-secondary);
}

.drive-insights-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
  padding: 0 0.15rem;
}

.drive-insights-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.drive-insight {
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: var(--card-bg);
}

.drive-insight--ok {
  border-left: 3px solid var(--color-success);
}

.drive-insight--warn,
.drive-insight--neutral {
  border-left: 3px solid var(--color-warning);
}

.drive-insight--risk {
  border-left: 3px solid var(--color-danger);
}

.drive-insight--unknown {
  border-left: 3px solid var(--text-muted);
  opacity: 0.88;
}

.drive-insight-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.drive-insight-verdict {
  font-family: var(--font-hud);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
}

.drive-insight--ok .drive-insight-verdict {
  color: var(--color-success);
}

.drive-insight--warn .drive-insight-verdict,
.drive-insight--neutral .drive-insight-verdict {
  color: var(--color-warning);
}

.drive-insight--risk .drive-insight-verdict {
  color: var(--color-danger);
}

.drive-insight--unknown .drive-insight-verdict {
  color: var(--text-muted);
}

.drive-insight-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-align: right;
}

.drive-insight-meter {
  position: relative;
  height: 0.4rem;
  margin-bottom: 0.5rem;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.drive-insight-meter::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(239, 68, 68, 0.22) 0%,
    rgba(239, 68, 68, 0.22) 33%,
    rgba(245, 158, 11, 0.22) 33%,
    rgba(245, 158, 11, 0.22) 66%,
    rgba(16, 185, 129, 0.22) 66%,
    rgba(16, 185, 129, 0.22) 100%
  );
  opacity: 0.55;
}

.drive-insight-meter-fill {
  position: relative;
  z-index: 1;
  height: 100%;
  border-radius: 999px;
  background: var(--text-primary);
  transition: width 0.35s ease;
}

.drive-insight--ok .drive-insight-meter-fill {
  background: var(--color-success);
}

.drive-insight--warn .drive-insight-meter-fill,
.drive-insight--neutral .drive-insight-meter-fill {
  background: var(--color-warning);
}

.drive-insight--risk .drive-insight-meter-fill {
  background: var(--color-danger);
}

.drive-insight-detail {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.drive-insights-empty {
  margin: 0;
  font-size: 0.88rem;
}

.drive-health-block {
  padding: 1rem;
  margin-bottom: 0.75rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
}

.drive-health-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.drive-health-summary {
  font-size: 1.05rem;
  line-height: 1.45;
}

.drive-warning {
  padding: 0;
  margin-bottom: 0.75rem;
  border: none;
  background: transparent;
  color: var(--color-danger);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.drive-health-metric--link {
  cursor: pointer;
  width: 100%;
  font: inherit;
  text-align: left;
}

.unified-money-dual-col--link {
  cursor: pointer;
  width: 100%;
  font: inherit;
  text-align: center;
}

.unified-money-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.unified-money-cta--inline {
  flex: 1 1 auto;
}

.drive-checklist-progress-link {
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.drive-evidence-btn--recommended {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 1px var(--accent-cyan-glow);
}

.drive-capture-guide {
  margin-bottom: 0.55rem;
  padding: 0.65rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 210, 255, 0.28);
  background: rgba(0, 210, 255, 0.08);
}

.drive-capture-guide-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-cyan);
}

.drive-capture-guide-title {
  margin: 0 0 0.25rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.drive-capture-guide-why,
.drive-capture-guide-steps {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.drive-capture-guide-steps {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
}

.drive-issue-media-thumb {
  position: relative;
}

.drive-media-delete-trigger {
  position: absolute;
  top: 0.15rem;
  right: 0.15rem;
  z-index: 2;
  width: 1.4rem;
  height: 1.4rem;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.drive-media-delete-confirm {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem;
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.92);
}

.drive-media-delete-confirm.hidden {
  display: none !important;
}

.drive-media-delete-confirm-text {
  margin: 0;
  font-size: 0.65rem;
  text-align: center;
  color: var(--text-primary);
}

.drive-media-delete-yes {
  border-color: rgba(239, 68, 68, 0.45);
  color: var(--color-danger);
}

#drive-scan-findings,
#drive-findings-codes,
#drive-checklist-issues,
#drive-open-checks,
.drive-issue-card[data-health-current-status="issue"] {
  scroll-margin-top: var(--drive-scroll-offset, 5rem);
}

.drive-exposure {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 0.85rem;
}

.drive-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.drive-action-btn {
  min-height: 52px;
  font-size: 1.05rem !important;
  justify-content: center;
}

.drive-ask-moto-btn {
  border-color: rgba(0, 210, 255, 0.45);
  background: rgba(0, 210, 255, 0.1);
  color: var(--accent-cyan);
}

.drive-ask-moto-btn:hover {
  border-color: rgba(0, 210, 255, 0.75);
  background: rgba(0, 210, 255, 0.16);
}

/* Health check gauge + danger zones */
.health-status-gauge {
  position: relative;
  height: 0.55rem;
  margin: 0.35rem 0 0.65rem;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-2);
}

.health-status-gauge-zones {
  display: flex;
  height: 100%;
}

.health-status-gauge-zones .zone {
  flex: 1;
}

.health-status-gauge-zones .zone--ok {
  background: rgba(16, 185, 129, 0.35);
}

.health-status-gauge-zones .zone--warn {
  background: rgba(245, 158, 11, 0.35);
}

.health-status-gauge-zones .zone--danger {
  background: rgba(239, 68, 68, 0.35);
}

.health-status-gauge-needle {
  position: absolute;
  top: -3px;
  width: 3px;
  height: calc(100% + 6px);
  margin-left: -1.5px;
  background: var(--text-primary);
  border-radius: 2px;
  box-shadow: 0 0 0 2px var(--card-bg);
}

.health-status-banner {
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.55rem;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.35;
}

.health-status-banner--ok {
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
  color: var(--color-success);
}

.health-status-banner--warn {
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
}

.health-status-banner--danger {
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
}

.simple-health-stand {
  font-size: 0.88rem;
  margin: 0.25rem 0;
}

.simple-health-exposure {
  font-size: 0.82rem;
  color: var(--accent-cyan);
  margin: 0.15rem 0 0.35rem;
}

.simple-health-subhead {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0.45rem 0 0.25rem;
}

.simple-health-list {
  margin: 0 0 0.35rem;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  line-height: 1.4;
}

.simple-health-issue {
  color: var(--color-danger);
}

/* Compact maintenance timeline (mobile / simple / drive) */
.repair-timeline-section--compact {
  margin-bottom: 1rem;
}

.repair-timeline-compact-you {
  font-size: 0.82rem;
  margin: 0 0 0.55rem;
}

.repair-timeline-compact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.repair-timeline-compact-card {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
}

.repair-timeline-compact-card--past {
  border-left: 3px solid var(--color-danger);
}

.repair-timeline-compact-card--due {
  border-left: 3px solid var(--color-warning);
}

.repair-timeline-compact-card--upcoming {
  border-left: 3px solid var(--color-success);
}

.repair-timeline-compact-card-head {
  font-size: 0.88rem;
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.repair-timeline-compact-card-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.repair-timeline-compact-card-note,
.repair-timeline-compact-card-cost {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  line-height: 1.35;
}

.repair-timeline-compact-card-cost {
  color: var(--color-danger);
  font-weight: 600;
}

/* Simple mode — larger touch targets on mobile */
@media (max-width: 640px) {
  body[data-ui-mode="simple"] .simple-card-title {
    font-size: 1rem;
  }

  body[data-ui-mode="simple"] .simple-hero-scored .simple-score-val {
    font-size: 4.25rem;
  }

  body[data-ui-mode="simple"] .simple-hero-scored .simple-score-denom {
    font-size: 1.45rem;
  }

  body[data-ui-mode="simple"] .panel-hint,
  body[data-ui-mode="simple"] .simple-health-stand {
    font-size: 0.95rem;
  }

  body[data-ui-mode="simple"] .simple-card {
    padding: 1rem 0.85rem;
  }

  body[data-ui-mode="simple"] .connect-btn,
  body[data-ui-mode="simple"] .btn-small {
    min-height: 48px;
    font-size: 0.95rem;
  }

  body[data-ui-mode="drive"] .session-source-banner-label {
    font-size: 0.92rem;
  }

  body[data-ui-mode="drive"] .drive-health-summary .simple-health-stand {
    font-size: 1.1rem;
  }

  .drive-insight-verdict {
    font-size: 1.55rem;
  }

  .drive-insight-detail {
    font-size: 1rem;
  }
}

/* ─── iOS native app (Capacitor) ───────────────────────────────────────── */
html[data-motometrics-ios-native="1"],
body.motometrics-ios-app {
  --ios-safe-top: env(safe-area-inset-top, 0px);
  --ios-safe-bottom: env(safe-area-inset-bottom, 0px);
  --ios-safe-left: env(safe-area-inset-left, 0px);
  --ios-safe-right: env(safe-area-inset-right, 0px);
  --ios-gutter: max(1rem, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --ios-tabbar-height: 3.65rem;
}

html[data-motometrics-ios-native="1"],
html[data-motometrics-ios-native="1"] body,
body.motometrics-ios-app {
  overflow-x: clip;
  max-width: 100%;
}

html[data-motometrics-ios-native="1"] body,
body.motometrics-ios-app {
  padding-bottom: 0;
  overscroll-behavior-y: none;
}

html[data-motometrics-ios-native="1"] .sim-mode-banner,
body.motometrics-ios-app .sim-mode-banner {
  padding-top: max(0.5rem, var(--ios-safe-top));
  padding-left: var(--ios-gutter);
  padding-right: var(--ios-gutter);
  padding-bottom: 0.45rem;
  gap: 0.45rem;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

html[data-motometrics-ios-native="1"] .app-container,
body.motometrics-ios-app .app-container {
  padding-top: 0.35rem;
  padding-left: var(--ios-gutter);
  padding-right: var(--ios-gutter);
  padding-bottom: max(1rem, var(--ios-safe-bottom));
  width: 100%;
  max-width: 100%;
  overflow-x: visible;
  box-sizing: border-box;
}

html[data-motometrics-ios-native="1"] body[data-ios-bottom-nav="1"] .app-container,
body.motometrics-ios-app[data-ios-bottom-nav="1"] .app-container {
  padding-bottom: calc(var(--ios-tabbar-height) + var(--ios-safe-bottom) + 0.75rem);
}

html[data-motometrics-ios-native="1"] .sim-mode-banner-vehicle,
body.motometrics-ios-app .sim-mode-banner-vehicle {
  display: none;
}

html[data-motometrics-ios-native="1"] .sim-mode-banner-text,
body.motometrics-ios-app .sim-mode-banner-text {
  min-width: 0;
}

html[data-motometrics-ios-native="1"] .sim-mode-banner-copy,
body.motometrics-ios-app .sim-mode-banner-copy {
  min-width: 0;
}

html[data-motometrics-ios-native="1"] .app-header,
body.motometrics-ios-app .app-header {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  margin-bottom: 0.55rem;
  padding-bottom: 0.45rem;
  gap: 0.45rem;
  border-bottom-color: var(--border-soft);
  overflow: visible;
}

html[data-motometrics-ios-native="1"] .header-brand,
body.motometrics-ios-app .header-brand {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
}

html[data-motometrics-ios-native="1"] .brand-wrapper,
body.motometrics-ios-app .brand-wrapper {
  min-width: 0;
}

html[data-motometrics-ios-native="1"] .brand-title,
body.motometrics-ios-app .brand-title {
  font-size: 1rem;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html[data-motometrics-ios-native="1"] .header-meta,
body.motometrics-ios-app .header-meta {
  padding-left: 0;
}

html[data-motometrics-ios-native="1"] .header-toolbar,
body.motometrics-ios-app .header-toolbar {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  overflow: visible;
}

html[data-motometrics-ios-native="1"] .header-toolbar-primary,
body.motometrics-ios-app .header-toolbar-primary {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 0.28rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.1rem;
}

html[data-motometrics-ios-native="1"] .header-toolbar-primary::-webkit-scrollbar,
body.motometrics-ios-app .header-toolbar-primary::-webkit-scrollbar {
  display: none;
}

html[data-motometrics-ios-native="1"] .header-toolbar-primary > *,
body.motometrics-ios-app .header-toolbar-primary > * {
  flex-shrink: 0;
}

html[data-motometrics-ios-native="1"] .header-toolbar-mode,
body.motometrics-ios-app .header-toolbar-mode {
  display: flex;
  flex: 0 0 auto;
  width: 100%;
  justify-content: flex-end;
  align-items: center;
  gap: 0.3rem;
  padding-top: 0.35rem;
  margin-top: 0;
  border-top: 1px solid var(--border-soft);
}

html[data-motometrics-ios-native="1"] .header-toolbar-mode::before,
body.motometrics-ios-app .header-toolbar-mode::before {
  content: "View";
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: auto;
}

html[data-motometrics-ios-native="1"] .ui-mode-toggle--icons .ui-mode-btn,
body.motometrics-ios-app .ui-mode-toggle--icons .ui-mode-btn {
  width: 2.5rem;
  min-width: 2.5rem;
  min-height: 40px;
}

html[data-motometrics-ios-native="1"] body[data-ui-mode="advanced"] .top-tabs.ui-advanced-only,
body.motometrics-ios-app[data-ui-mode="advanced"] .top-tabs.ui-advanced-only {
  display: flex !important;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0.45rem;
  scrollbar-width: none;
  width: 100%;
  max-width: 100%;
}

html[data-motometrics-ios-native="1"] body[data-ui-mode="advanced"] .top-tabs.ui-advanced-only::-webkit-scrollbar,
body.motometrics-ios-app[data-ui-mode="advanced"] .top-tabs.ui-advanced-only::-webkit-scrollbar {
  display: none;
}

html[data-motometrics-ios-native="1"] body[data-ui-mode="advanced"] .tab-btn,
body.motometrics-ios-app[data-ui-mode="advanced"] .tab-btn {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  font-size: 0.74rem;
}


html[data-motometrics-ios-native="1"] .header-icon-btn,
html[data-motometrics-ios-native="1"] .header-tool-pill,
html[data-motometrics-ios-native="1"] .header-conn,
body.motometrics-ios-app .header-icon-btn,
body.motometrics-ios-app .header-tool-pill,
body.motometrics-ios-app .header-conn {
  min-width: 40px;
  min-height: 40px;
}

html[data-motometrics-ios-native="1"] .session-context,
body.motometrics-ios-app .session-context {
  margin-bottom: 0.65rem;
  padding: 0.45rem 0.55rem;
  border-radius: 14px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}

html[data-motometrics-ios-native="1"] .session-focus-bar,
body.motometrics-ios-app .session-focus-bar {
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
}

html[data-motometrics-ios-native="1"] .session-focus-title,
body.motometrics-ios-app .session-focus-title {
  font-size: 0.92rem;
}

html[data-motometrics-ios-native="1"] .scenario-chip-label,
body.motometrics-ios-app .scenario-chip-label {
  display: inline;
  font-size: 0.68rem;
  max-width: 4.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-motometrics-ios-native="1"] .session-status-line,
body.motometrics-ios-app .session-status-line {
  margin-top: 0.35rem;
  font-size: 0.78rem;
}

html[data-motometrics-ios-native="1"] .simple-dashboard,
body.motometrics-ios-app .simple-dashboard {
  max-width: 100%;
  margin-bottom: 0.75rem;
}

html[data-motometrics-ios-native="1"] .simple-hero,
body.motometrics-ios-app .simple-hero {
  border-radius: 16px;
  padding: 1rem 0.9rem;
}

html[data-motometrics-ios-native="1"] .simple-card,
body.motometrics-ios-app .simple-card {
  border-radius: 16px;
  padding: 1rem 0.9rem;
  margin-bottom: 0.65rem;
}

html[data-motometrics-ios-native="1"] .connect-btn,
html[data-motometrics-ios-native="1"] #simple-connect-card .connect-btn,
body.motometrics-ios-app .connect-btn,
body.motometrics-ios-app #simple-connect-card .connect-btn {
  min-height: 52px;
  font-size: 1rem;
  border-radius: 14px;
}

html[data-motometrics-ios-native="1"] .btn-small,
body.motometrics-ios-app .btn-small {
  min-height: 44px;
}

html[data-motometrics-ios-native="1"] .input-field,
html[data-motometrics-ios-native="1"] .scenario-textarea,
body.motometrics-ios-app .input-field,
body.motometrics-ios-app .scenario-textarea {
  font-size: 16px;
  border-radius: 12px;
}

/* Capture panel is advanced-only on web; always available on iOS simple mode. */
html[data-motometrics-ios-native="1"] body[data-ui-mode="simple"] .dashboard-grid.ui-advanced-only,
body.motometrics-ios-app[data-ui-mode="simple"] .dashboard-grid.ui-advanced-only {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 0.25rem;
}

html[data-motometrics-ios-native="1"] body[data-ui-mode="simple"] .dashboard-grid [data-tab],
body.motometrics-ios-app[data-ui-mode="simple"] .dashboard-grid [data-tab] {
  display: none !important;
}

html[data-motometrics-ios-native="1"] body[data-ui-mode="simple"] #scenario-capture-panel,
body.motometrics-ios-app[data-ui-mode="simple"] #scenario-capture-panel {
  display: block !important;
  border-radius: 16px;
}

html[data-motometrics-ios-native="1"] #scenario-capture-panel .scenario-dropzone,
body.motometrics-ios-app #scenario-capture-panel .scenario-dropzone {
  min-height: 3.25rem;
  padding: 0.85rem;
  font-size: 0.88rem;
}

html[data-motometrics-ios-native="1"] .ble-env-banner,
body.motometrics-ios-app .ble-env-banner {
  border-radius: 12px;
  font-size: 0.78rem;
  margin-bottom: 0.5rem;
}

html[data-motometrics-ios-native="1"] .simple-ask-moto-sheet,
body.motometrics-ios-app .simple-ask-moto-sheet {
  height: min(88dvh, 720px);
  max-height: min(88dvh, 720px);
  border-radius: 20px 20px 0 0;
  margin-top: auto;
}

html[data-motometrics-ios-native="1"] .simple-ask-moto-dialog,
body.motometrics-ios-app .simple-ask-moto-dialog {
  align-items: flex-end;
  padding-bottom: 0;
}

html[data-motometrics-ios-native="1"] .agent-chat-chip,
body.motometrics-ios-app .agent-chat-chip {
  min-height: 40px;
  font-size: 0.8rem;
  padding: 0.45rem 0.7rem;
}

.ios-native-tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 11000;
  align-items: stretch;
  justify-content: space-around;
  gap: 0.15rem;
  padding: 0.35rem max(0.5rem, var(--ios-safe-right, env(safe-area-inset-right)))
    max(0.4rem, var(--ios-safe-bottom, env(safe-area-inset-bottom)))
    max(0.5rem, var(--ios-safe-left, env(safe-area-inset-left)));
  background: color-mix(in srgb, var(--bg-color) 92%, transparent);
  border-top: 1px solid var(--card-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

html[data-motometrics-ios-native="1"] .ios-native-tabbar:not([hidden]),
body.motometrics-ios-app .ios-native-tabbar:not([hidden]) {
  display: flex;
}

.ios-tabbar-btn {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 48px;
  padding: 0.2rem 0.15rem;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.ios-tabbar-btn [data-lucide] {
  width: 1.15rem;
  height: 1.15rem;
}

.ios-tabbar-btn.is-active {
  color: var(--accent-cyan);
  background: rgba(0, 210, 255, 0.1);
}

.ios-tabbar-btn:active {
  transform: scale(0.97);
}

/* ─── Android native app (Capacitor) ────────────────────────────────────── */
html[data-motometrics-android-native="1"],
html[data-motometrics-android-native="1"] body,
body.motometrics-android-app {
  overflow-x: hidden;
  overflow-y: auto;
  max-width: 100%;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: auto;
  touch-action: pan-y;
}

/* fixed backgrounds break vertical scroll in Android WebView */
html[data-motometrics-android-native="1"] body,
body.motometrics-android-app {
  background-attachment: scroll;
  min-height: 100%;
  height: auto;
}

html[data-motometrics-android-native="1"],
body.motometrics-android-app {
  --android-safe-top: 32px;
  --android-safe-bottom: env(safe-area-inset-bottom, 0px);
  --android-gutter: max(0.75rem, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
}

/* Push all page chrome (incl. demo banner above .app-container) below the status bar. */
html[data-motometrics-android-native="1"] body,
body.motometrics-android-app {
  padding-top: var(--android-safe-top);
  box-sizing: border-box;
}

html[data-motometrics-android-native="1"] .app-container,
body.motometrics-android-app .app-container {
  padding-top: 0.35rem;
  padding-left: var(--android-gutter);
  padding-right: var(--android-gutter);
  overflow-x: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

html[data-motometrics-android-native="1"] .sim-mode-banner,
body.motometrics-android-app .sim-mode-banner {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  padding-left: var(--android-gutter);
  padding-right: var(--android-gutter);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  font-size: 0.72rem;
  gap: 0.4rem;
  flex-wrap: nowrap;
  align-items: center;
}

html[data-motometrics-android-native="1"] .sim-mode-banner-text,
body.motometrics-android-app .sim-mode-banner-text {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  line-height: 1.25;
}

html[data-motometrics-android-native="1"] .sim-mode-exit-btn,
body.motometrics-android-app .sim-mode-exit-btn {
  flex-shrink: 0;
  font-size: 0.68rem;
  padding: 0.28rem 0.45rem;
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-motometrics-android-native="1"] .sim-mode-banner-vehicle,
body.motometrics-android-app .sim-mode-banner-vehicle {
  display: none;
}

html[data-motometrics-android-native="1"] body[data-ios-bottom-nav="1"] .app-container,
body.motometrics-android-app[data-ios-bottom-nav="1"] .app-container {
  padding-bottom: calc(var(--ios-tabbar-height) + var(--android-safe-bottom) + 0.75rem);
}

/* Always show compact MotoMetrics logo + wordmark on Android native. */
html[data-motometrics-android-native="1"] .header-brand,
body.motometrics-android-app .header-brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
}

html[data-motometrics-android-native="1"] .brand-wrapper,
body.motometrics-android-app .brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  min-width: 0;
  flex: 0 0 auto;
}

html[data-motometrics-android-native="1"] .brand-logo,
body.motometrics-android-app .brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

html[data-motometrics-android-native="1"] .brand-logo-mark,
body.motometrics-android-app .brand-logo-mark {
  display: block;
  width: 18px;
  height: 18px;
}

html[data-motometrics-android-native="1"] .brand-logo [data-lucide],
body.motometrics-android-app .brand-logo [data-lucide] {
  display: none;
}

html[data-motometrics-android-native="1"] .brand-text,
body.motometrics-android-app .brand-text {
  display: block;
  min-width: 0;
  overflow: visible;
}

html[data-motometrics-android-native="1"] .brand-title,
body.motometrics-android-app .brand-title {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  max-width: none;
  background: none;
  -webkit-text-fill-color: #0f172a;
  color: #0f172a;
}

html[data-motometrics-android-native="1"] .brand-title span,
body.motometrics-android-app .brand-title span {
  background: none;
  -webkit-text-fill-color: #0284c7;
  color: #0284c7;
}

html[data-motometrics-android-native="1"] .brand-tagline,
body.motometrics-android-app .brand-tagline {
  display: none;
}

html[data-motometrics-android-native="1"] .header-meta,
body.motometrics-android-app .header-meta {
  display: none;
}

/* Stacked header on Android: brand row, then one scrollable toolbar row (all modes). */
html[data-motometrics-android-native="1"] .app-header,
body.motometrics-android-app .app-header {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.3rem;
  margin-bottom: 0.35rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border-soft);
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

html[data-motometrics-android-native="1"] .header-brand,
body.motometrics-android-app .header-brand {
  width: 100%;
  max-width: 100%;
  flex: 0 0 auto;
  min-width: 0;
  overflow: hidden;
}

html[data-motometrics-android-native="1"] .brand-wrapper,
body.motometrics-android-app .brand-wrapper {
  max-width: 100%;
}

html[data-motometrics-android-native="1"] .header-toolbar,
body.motometrics-android-app .header-toolbar {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.22rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}

html[data-motometrics-android-native="1"] .header-toolbar-primary,
body.motometrics-android-app .header-toolbar-primary {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  flex-wrap: nowrap;
  gap: 0.2rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.05rem;
}

html[data-motometrics-android-native="1"] .header-toolbar-primary::-webkit-scrollbar,
body.motometrics-android-app .header-toolbar-primary::-webkit-scrollbar {
  display: none;
}

html[data-motometrics-android-native="1"] .header-toolbar-primary > *,
body.motometrics-android-app .header-toolbar-primary > * {
  flex-shrink: 0;
}

html[data-motometrics-android-native="1"] .header-toolbar-mode,
body.motometrics-android-app .header-toolbar-mode {
  display: flex;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  border-top: none;
  padding-top: 0;
  margin-top: 0;
  gap: 0.18rem;
}

html[data-motometrics-android-native="1"] .header-toolbar-mode::before,
body.motometrics-android-app .header-toolbar-mode::before {
  display: none;
}

html[data-motometrics-android-native="1"] .header-icon-btn,
html[data-motometrics-android-native="1"] .header-tool-pill,
html[data-motometrics-android-native="1"] .header-conn,
body.motometrics-android-app .header-icon-btn,
body.motometrics-android-app .header-tool-pill,
body.motometrics-android-app .header-conn {
  min-width: 34px;
  min-height: 34px;
  padding: 0.18rem;
}

html[data-motometrics-android-native="1"] #try-demo-car-header .header-tool-pill-text,
html[data-motometrics-android-native="1"] #header-kitt-btn .header-tool-pill-text,
body.motometrics-android-app #try-demo-car-header .header-tool-pill-text,
body.motometrics-android-app #header-kitt-btn .header-tool-pill-text {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  display: inline;
}

html[data-motometrics-android-native="1"] .ui-mode-toggle--icons .ui-mode-btn,
body.motometrics-android-app .ui-mode-toggle--icons .ui-mode-btn {
  width: 2.15rem;
  min-width: 2.15rem;
  min-height: 34px;
}

html[data-motometrics-android-native="1"] body[data-ui-mode="advanced"] .top-tabs.ui-advanced-only,
body.motometrics-android-app[data-ui-mode="advanced"] .top-tabs.ui-advanced-only {
  margin-top: 0;
  margin-bottom: 0.35rem;
  padding-bottom: 0.2rem;
  gap: 0.22rem;
}

html[data-motometrics-android-native="1"] body[data-ui-mode="advanced"] .tab-btn,
body.motometrics-android-app[data-ui-mode="advanced"] .tab-btn {
  min-height: 36px;
  padding: 0.38rem 0.62rem;
  font-size: 0.66rem;
}

html[data-motometrics-android-native="1"] .session-context,
body.motometrics-android-app .session-context {
  margin-bottom: 0.45rem;
  padding: 0.38rem 0.45rem;
}

html[data-motometrics-android-native="1"] .session-focus-bar,
body.motometrics-android-app .session-focus-bar {
  gap: 0.32rem;
  min-width: 0;
}

html[data-motometrics-android-native="1"] .session-focus-title,
body.motometrics-android-app .session-focus-title {
  font-size: 0.78rem;
}

html[data-motometrics-android-native="1"] .session-focus-meta,
body.motometrics-android-app .session-focus-meta {
  font-size: 0.58rem;
}

html[data-motometrics-android-native="1"] .session-focus-actions,
body.motometrics-android-app .session-focus-actions {
  gap: 0.22rem;
}

html[data-motometrics-android-native="1"] .scenario-chip-label,
body.motometrics-android-app .scenario-chip-label {
  max-width: 3.25rem;
  font-size: 0.6rem;
}

html[data-motometrics-android-native="1"] .session-focus-results-btn,
body.motometrics-android-app .session-focus-results-btn {
  font-size: 0.56rem;
  padding: 0.22rem 0.42rem;
}

html[data-motometrics-android-native="1"] .session-status-line,
body.motometrics-android-app .session-status-line {
  font-size: 0.68rem;
  margin-top: 0.28rem;
  line-height: 1.3;
}

html[data-motometrics-android-native="1"] .simple-dashboard,
html[data-motometrics-android-native="1"] .dashboard-grid,
html[data-motometrics-android-native="1"] .column-left,
html[data-motometrics-android-native="1"] .column-right,
body.motometrics-android-app .simple-dashboard,
body.motometrics-android-app .dashboard-grid,
body.motometrics-android-app .column-left,
body.motometrics-android-app .column-right {
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}

html[data-motometrics-android-native="1"] .panel-header--inline,
html[data-motometrics-android-native="1"] .vehicle-valuation-head,
html[data-motometrics-android-native="1"] .simple-card-head,
body.motometrics-android-app .panel-header--inline,
body.motometrics-android-app .vehicle-valuation-head,
body.motometrics-android-app .simple-card-head {
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

html[data-motometrics-android-native="1"] .panel-header--inline .panel-title,
html[data-motometrics-android-native="1"] .vehicle-valuation-title,
body.motometrics-android-app .panel-header--inline .panel-title,
body.motometrics-android-app .vehicle-valuation-title {
  min-width: 0;
  flex: 1 1 auto;
}

html[data-motometrics-android-native="1"] .panel-header--inline .btn-small,
body.motometrics-android-app .panel-header--inline .btn-small {
  flex-shrink: 0;
}

/* Orbitron may not load offline in the WebView — use system numerals for scores. */
html[data-motometrics-android-native="1"] .unified-money-hero-val,
html[data-motometrics-android-native="1"] .unified-money-score,
html[data-motometrics-android-native="1"] .unified-money-repair,
html[data-motometrics-android-native="1"] .brand-title,
body.motometrics-android-app .unified-money-hero-val,
body.motometrics-android-app .unified-money-score,
body.motometrics-android-app .unified-money-repair,
body.motometrics-android-app .brand-title {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

html[data-motometrics-android-native="1"] .unified-money-col,
body.motometrics-android-app .unified-money-col {
  min-width: 0;
  padding: 0.5rem 0.28rem 0.55rem;
  overflow: visible;
}

html[data-motometrics-android-native="1"] .unified-money-repair,
body.motometrics-android-app .unified-money-repair {
  font-size: clamp(0.62rem, 2.8vw, 0.78rem);
  line-height: 1.15;
  white-space: nowrap;
}

html[data-motometrics-android-native="1"] .unified-money-grid,
body.motometrics-android-app .unified-money-grid {
  gap: 0.28rem;
}

html[data-motometrics-android-native="1"] .drive-health-metric-value,
html[data-motometrics-android-native="1"] .drive-health-metric-detail,
body.motometrics-android-app .drive-health-metric-value,
body.motometrics-android-app .drive-health-metric-detail {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

html[data-motometrics-android-native="1"] .drive-health-metric-value,
body.motometrics-android-app .drive-health-metric-value {
  font-size: clamp(0.95rem, 4.5vw, 1.2rem);
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
}

html[data-motometrics-android-native="1"] .drive-health-metric,
body.motometrics-android-app .drive-health-metric {
  min-height: 0;
  padding: 0.62rem 0.55rem;
  overflow: hidden;
}

/* Advanced Capture tab: keep panels inside the viewport (no right-edge overrun). */
html[data-motometrics-android-native="1"] .dashboard-grid,
html[data-motometrics-android-native="1"] .column-left,
html[data-motometrics-android-native="1"] .column-right,
html[data-motometrics-android-native="1"] .panel,
body.motometrics-android-app .dashboard-grid,
body.motometrics-android-app .column-left,
body.motometrics-android-app .column-right,
body.motometrics-android-app .panel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

html[data-motometrics-android-native="1"] #scenario-capture-panel,
body.motometrics-android-app #scenario-capture-panel {
  overflow-x: hidden;
}

html[data-motometrics-android-native="1"] #scenario-capture-panel .panel-header,
body.motometrics-android-app #scenario-capture-panel .panel-header {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.35rem;
}

html[data-motometrics-android-native="1"] #scenario-capture-panel .panel-hint,
body.motometrics-android-app #scenario-capture-panel .panel-hint {
  flex: 1 1 100%;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

html[data-motometrics-android-native="1"] .scenario-panel,
html[data-motometrics-android-native="1"] .scenario-grid,
html[data-motometrics-android-native="1"] .scenario-wide,
html[data-motometrics-android-native="1"] .form-group,
html[data-motometrics-android-native="1"] .scenario-structured,
html[data-motometrics-android-native="1"] .scenario-dropzone,
html[data-motometrics-android-native="1"] .scenario-media-preview,
html[data-motometrics-android-native="1"] .scenario-vin-photo-preview,
body.motometrics-android-app .scenario-panel,
body.motometrics-android-app .scenario-grid,
body.motometrics-android-app .scenario-wide,
body.motometrics-android-app .form-group,
body.motometrics-android-app .scenario-structured,
body.motometrics-android-app .scenario-dropzone,
body.motometrics-android-app .scenario-media-preview,
body.motometrics-android-app .scenario-vin-photo-preview {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

html[data-motometrics-android-native="1"] .scenario-grid,
html[data-motometrics-android-native="1"] .scenario-structured-row,
html[data-motometrics-android-native="1"] .scenario-media-preview,
html[data-motometrics-android-native="1"] .vin-location-checklist,
body.motometrics-android-app .scenario-grid,
body.motometrics-android-app .scenario-structured-row,
body.motometrics-android-app .scenario-media-preview,
body.motometrics-android-app .vin-location-checklist {
  grid-template-columns: 1fr !important;
}

html[data-motometrics-android-native="1"] .input-field,
html[data-motometrics-android-native="1"] .scenario-textarea,
html[data-motometrics-android-native="1"] .scenario-vin-input-row,
body.motometrics-android-app .input-field,
body.motometrics-android-app .scenario-textarea,
body.motometrics-android-app .scenario-vin-input-row {
  max-width: 100%;
}

@media (max-width: 640px) {
  html[data-motometrics-android-native="1"] .header-brand,
  body.motometrics-android-app .header-brand {
    max-width: 100%;
    width: 100%;
  }

  html[data-motometrics-android-native="1"] .header-toolbar,
  body.motometrics-android-app .header-toolbar {
    width: 100%;
    max-width: 100%;
  }
}
