:root {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  color: #19232c;
  background: #edf0f2;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --page: #edf0f2;
  --surface: #fff;
  --surface-raised: #f7f8f9;
  --ink: #19232c;
  --muted: #687680;
  --soft: #87939c;
  --rule: #dfe4e7;
  --accent: #c72035;
  --accent-hover: #a8182a;
  --good: #236d50;
  --good-wash: #e8f2ed;
  --bad: #aa2533;
  --bad-wash: #f8eaec;
  --nav: rgba(255, 255, 255, .94);
  --shadow: 0 16px 46px rgba(24, 35, 44, .09);
  --radius: 4px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  color: #edf1f4;
  background: #11171d;
  --page: #11171d;
  --surface: #1a222a;
  --surface-raised: #222c35;
  --ink: #edf1f4;
  --muted: #a8b2ba;
  --soft: #85919a;
  --rule: #36414b;
  --accent: #ed5665;
  --accent-hover: #ff7480;
  --good: #8bd0a9;
  --good-wash: #20372d;
  --bad: #ff9ba4;
  --bad-wash: #3b252a;
  --nav: rgba(26, 34, 42, .95);
  --shadow: 0 20px 52px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--page); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--page); color: var(--ink); font-size: 16px; line-height: 1.45; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

.app-shell { position: relative; width: min(100%, 480px); min-height: 100vh; margin: 0 auto; padding: 0 24px calc(106px + env(safe-area-inset-bottom, 0px)); background: var(--surface); box-shadow: var(--shadow); }
.app-header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--rule); }
.header-tools { display: flex; align-items: center; gap: 8px; }
.lang-switch { display: flex; height: 36px; padding: 2px; border: 1px solid var(--rule); border-radius: 18px; }
.lang-switch button { min-width: 40px; height: 100%; padding: 0 8px; border: 0; border-radius: 16px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .03em; cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.wordmark { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-size: 17px; font-weight: 650; letter-spacing: -.045em; }
.mark { width: 31px; height: 23px; overflow: visible; fill: none; stroke: var(--accent); stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: 50%; background: transparent; cursor: pointer; }
.theme-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.moon-icon { display: none; }
:root[data-theme="dark"] .sun-icon { display: none; }
:root[data-theme="dark"] .moon-icon { display: block; }

main { padding-top: 25px; }
.screen { min-height: calc(100vh - 205px); }
.car-switcher { display: flex; align-items: center; gap: 7px; overflow-x: auto; margin: -6px 0 12px; padding: 2px 0 6px; scrollbar-width: none; }
.car-switcher::-webkit-scrollbar { display: none; }
.car-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 11px; border: 1px solid var(--rule); border-radius: 17px; background: var(--surface-raised); color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.car-pill:hover { border-color: var(--ink); color: var(--ink); }
.car-pill[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.car-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); flex: none; }
.car-dot.is-over { background: var(--accent); }
.car-pill-reg { opacity: .75; font-size: 11px; font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.car-add-pill { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 11px; border: 1px dashed var(--rule); border-radius: 17px; background: transparent; color: var(--accent); font-size: 12.5px; font-weight: 620; white-space: nowrap; cursor: pointer; }
.car-add-pill:hover { border-color: var(--accent); background: var(--surface-raised); }
.vehicle-line { min-height: 32px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 13px; letter-spacing: .015em; }
.vehicle-pip { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.vehicle-divider { padding: 0 3px; color: var(--soft); }
.vehicle-reg { padding: 1px 7px; border: 1px solid var(--rule); border-radius: 2px; background: var(--surface-raised); color: var(--ink); font-size: 11px; font-weight: 640; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.vehicle-year { margin-left: auto; color: var(--soft); }

.onboarding-card { margin: 14px 0 6px; padding: 16px 17px 14px; border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--surface-raised); }
.onboarding-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ob-dismiss { min-height: 28px; font-size: 12px; }
.ob-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ob-step { padding-top: 9px; border-top: 1px solid var(--rule); font-size: 13px; }
.ob-step-head { display: flex; align-items: center; gap: 8px; }
.ob-badge { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--surface); font-size: 11px; font-weight: 650; flex: none; }
.ob-badge.is-done { background: var(--good); color: #fff; }
.ob-link { margin-left: auto; min-height: 28px; font-size: 12px; color: var(--accent); font-weight: 620; }
.ob-reg-row { margin-top: 8px; }
.ob-reg-row input { min-height: 40px; padding: 0 11px; border: 1px solid var(--rule); border-radius: 3px; background: var(--surface); color: var(--ink); font-size: 14px; }
.ob-reg-row .reg-lookup-btn { min-height: 40px; min-width: 96px; font-size: 13px; }

.status-intro { margin: 27px 0 23px; }
.last-reading, .overline { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
h1 { margin: 0; font-size: clamp(29px, 8vw, 36px); font-weight: 590; letter-spacing: -.055em; line-height: 1.1; }
.status-copy { max-width: 32ch; margin: 9px 0 0; color: var(--muted); font-size: 16px; line-height: 1.45; }
.status-copy strong { color: var(--good); font-weight: 650; }
.status-copy.is-bad strong { color: var(--bad); }

.odometer-panel { position: relative; overflow: hidden; padding: 21px 20px 19px; border-radius: var(--radius); background: var(--surface-raised); }
.odometer-panel::before { position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: var(--accent); content: ""; }
.odometer-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 13px; }
.plan-caption { color: var(--soft); font-size: 12px; white-space: nowrap; }
.odometer-value { display: flex; align-items: baseline; gap: 8px; margin: 5px 0 17px; font-size: clamp(54px, 15vw, 70px); font-weight: 540; font-variant-numeric: tabular-nums; letter-spacing: -.075em; line-height: 1; }
.odometer-value .unit { color: var(--muted); font-size: 20px; font-weight: 450; letter-spacing: -.02em; }
.distance-track { position: relative; height: 7px; overflow: visible; border-radius: 1px; background: var(--rule); }
.distance-driven { position: absolute; top: 0; left: 0; height: 100%; background: var(--good); }
.distance-marker { position: absolute; top: -5px; width: 2px; height: 17px; background: var(--ink); transform: translateX(-1px); }
.distance-key { display: flex; justify-content: space-between; gap: 10px; margin-top: 13px; color: var(--muted); font-size: 12px; }
.distance-key span { display: flex; align-items: center; gap: 6px; }
.distance-key b { color: var(--ink); font-weight: 610; font-variant-numeric: tabular-nums; }
.key-dot { width: 6px; height: 6px; border-radius: 50%; }
.driven-dot { background: var(--good); }
.plan-dot { background: var(--ink); }

.daily-stats { display: grid; grid-template-columns: 1fr 1fr; margin: 20px 0 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.stat { min-height: 83px; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 13px 10px 13px 0; }
.stat + .stat { padding-left: 18px; border-left: 1px solid var(--rule); }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-value { color: var(--ink); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.stat-hint { color: var(--soft); font-size: 11px; }
.stat-value.good { color: var(--good); }
.stat-value.bad { color: var(--bad); }

.forecast-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 0 15px; border-bottom: 1px solid var(--rule); }
.forecast-copy { display: flex; flex-direction: column; gap: 2px; }
.forecast-label { color: var(--muted); font-size: 13px; }
.forecast-hint { color: var(--soft); font-size: 12px; }
.forecast-value { flex: none; font-size: 20px; font-weight: 630; font-variant-numeric: tabular-nums; letter-spacing: -.045em; }

.pace-banner { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; padding: 13px 15px; border-radius: var(--radius); border-left: 3px solid var(--good); background: var(--surface-raised); font-size: 13px; line-height: 1.45; }
.pace-banner.is-warn { border-left-color: var(--accent); background: var(--bad-wash); }
.pace-banner-item { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; color: var(--ink); }
.pace-banner-item span { color: var(--muted); }
.pace-banner-item strong { font-weight: 630; font-variant-numeric: tabular-nums; }

.budget-card { margin-top: 18px; padding: 18px 18px 16px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface-raised); }
.budget-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.budget-pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 12px; font-size: 11.5px; font-weight: 650; background: var(--good-wash); color: var(--good); }
.budget-pill.is-warn { background: var(--bad-wash); color: var(--bad); }
.budget-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 10px; }
.budget-cell { padding: 12px 14px; border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); display: flex; flex-direction: column; gap: 3px; }
.budget-label { font-size: 12px; color: var(--muted); font-weight: 550; }
.budget-value { font-size: 20px; font-weight: 630; font-variant-numeric: tabular-nums; color: var(--ink); display: flex; align-items: baseline; gap: 4px; }
.budget-value .unit { font-size: 13px; font-weight: 500; color: var(--muted); }
.budget-sub { font-size: 11px; color: var(--soft); }
.budget-advice { margin: 4px 0 0; padding: 8px 11px; border-radius: 3px; background: var(--surface); border: 1px solid var(--rule); color: var(--muted); font-size: 12px; line-height: 1.4; }
.budget-advice strong { color: var(--ink); }

.holiday-nudge { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--surface-raised); display: flex; flex-direction: column; gap: 8px; }
.holiday-nudge-badge { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 2px 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--rule); font-size: 11px; font-weight: 650; color: var(--accent); }
.holiday-nudge-badge svg { width: 13px; height: 13px; }
.holiday-nudge-title { margin: 0; font-size: 14px; font-weight: 640; color: var(--ink); }
.holiday-nudge-copy { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.holiday-nudge-btn { margin-top: 4px; padding: 8px 12px; min-height: 38px; border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); color: var(--ink); font-size: 12.5px; font-weight: 600; cursor: pointer; text-align: center; }
.holiday-nudge-btn:hover { border-color: var(--accent); color: var(--accent); }

.tool-card { margin-top: 22px; padding: 18px 18px 16px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface-raised); }
.tool-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tool-overline { margin: 0 0 3px; color: var(--accent); font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.tool-title { margin: 0; font-size: 17px; font-weight: 630; letter-spacing: -.03em; line-height: 1.25; }
.tool-copy { margin: 7px 0 14px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.band-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.band-options button { min-height: 40px; padding: 0 8px; border: 1px solid var(--rule); border-radius: 3px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 620; font-variant-numeric: tabular-nums; cursor: pointer; }
.band-options button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.band-inputs { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); font-size: 13px; font-weight: 600; }
.compact-input { width: 146px; }
.compact-input input { width: 100%; min-height: 40px; padding: 0 58px 0 10px; border: 1px solid var(--rule); border-radius: 3px; background: var(--surface); color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.compact-input > span { font-size: 12px; right: 10px; }
.band-comparison { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.band-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.band-row span { color: var(--muted); }
.band-row strong { font-size: 15px; font-weight: 630; font-variant-numeric: tabular-nums; }
.band-verdict { margin-top: 4px; padding: 9px 11px; border-radius: 3px; background: var(--good-wash); color: var(--good); font-size: 12.5px; font-weight: 620; line-height: 1.35; }
.band-verdict.is-neutral { background: var(--surface); color: var(--muted); border: 1px solid var(--rule); }
.compact-btn { min-height: 42px; margin-top: 12px; font-size: 13px; background: var(--surface); }

.trip-presets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-bottom: 12px; }
@media (min-width: 520px) {
  .trip-presets { grid-template-columns: repeat(4, 1fr); }
}
.trip-presets button { min-height: 38px; padding: 0 6px; border: 1px solid var(--rule); border-radius: 3px; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; text-align: center; }
.trip-presets button:hover { border-color: var(--ink); }
.trip-presets button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.trip-results { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }

.alert-list { display: flex; flex-direction: column; margin-top: 10px; }
.alert-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.alert-item:last-child { border-bottom: 0; }
.alert-info { display: flex; flex-direction: column; gap: 2px; }
.alert-name { font-size: 14px; font-weight: 610; color: var(--ink); }
.alert-desc { font-size: 12px; color: var(--muted); line-height: 1.4; }
.alert-badge { display: inline-block; margin-top: 4px; align-self: flex-start; padding: 2px 7px; border-radius: 2px; background: var(--good-wash); color: var(--good); font-size: 11px; font-weight: 630; }
.alert-badge.is-warn { background: var(--bad-wash); color: var(--bad); }
.alert-toggle { position: relative; flex: none; width: 42px; height: 24px; margin-top: 2px; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); cursor: pointer; transition: background .15s ease; }
.alert-toggle::after { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); content: ""; transition: transform .15s ease, background .15s ease; }
.alert-toggle[aria-pressed="true"] { border-color: var(--good); background: var(--good-wash); }
.alert-toggle[aria-pressed="true"]::after { background: var(--good); transform: translateX(18px); }

.checklist-box { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); }
.checklist-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.checklist-title { font-size: 13px; font-weight: 630; color: var(--ink); }
.checklist-count { font-size: 12px; font-weight: 620; font-variant-numeric: tabular-nums; color: var(--muted); }
.checklist-items { display: grid; grid-template-columns: 1fr; gap: 6px; }
.checklist-item { display: flex; align-items: center; gap: 9px; min-height: 32px; font-size: 13px; color: var(--ink); cursor: pointer; }
.checklist-item input { width: 17px; height: 17px; margin: 0; accent-color: var(--good); }
.checklist-item.is-done span { color: var(--muted); text-decoration: line-through; }

.checklist-status-hint { margin-top: 8px; font-size: 12px; color: var(--muted); display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.cl-hint-tag { font-weight: 560; color: var(--muted); }
.checklist-status-hint .text-action { font-size: 12px; min-height: 28px; }

.checklist-pill-card { margin-top: 14px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface-raised); overflow: hidden; transition: box-shadow .15s ease; }
.cl-pill-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; min-height: 44px; }
.cl-pill-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cl-pill-icon { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 4px; background: var(--good-wash); color: var(--good); flex: none; }
.cl-pill-title { font-size: 13px; font-weight: 620; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-pill-badge { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 10px; font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; background: var(--surface); border: 1px solid var(--rule); color: var(--muted); }
.cl-pill-badge.is-done { background: var(--good-wash); color: var(--good); border-color: transparent; }
.cl-pill-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.cl-pill-hide-btn { padding: 4px 8px; border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 550; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.cl-pill-hide-btn:hover { color: var(--ink); }
.cl-pill-toggle-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 600; cursor: pointer; }
.cl-pill-toggle-btn:hover { border-color: var(--accent); color: var(--accent); }
.cl-pill-chevron { transition: transform .2s ease; }
.checklist-pill-card.is-expanded .cl-pill-chevron { transform: rotate(180deg); }
.cl-pill-body { padding: 0 14px 12px; border-top: 1px solid var(--rule); }
.cl-pill-body .checklist-items { margin-top: 8px; }

.reg-lookup-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.reg-lookup-row input { text-transform: uppercase; font-variant-numeric: tabular-nums; letter-spacing: .04em; font-weight: 610; }
.reg-lookup-btn { width: auto; min-width: 118px; padding: 0 16px; white-space: nowrap; }
.reg-samples { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.plate-chip { min-height: 28px; padding: 0 9px; border: 1px solid var(--rule); border-radius: 2px; background: var(--surface-raised); color: var(--ink); font-size: 11.5px; font-weight: 620; font-variant-numeric: tabular-nums; letter-spacing: .03em; cursor: pointer; }
.plate-chip:hover { border-color: var(--ink); }

.primary-action { width: 100%; min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 19px; border: 0; border-radius: 3px; background: var(--accent); color: #fff; font-size: 16px; font-weight: 630; cursor: pointer; transition: background .16s ease, transform .16s ease; }
.primary-action:hover { background: var(--accent-hover); }
.primary-action:active { transform: translateY(1px); }
.action-plus { display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid rgba(255,255,255,.7); border-radius: 50%; font-size: 20px; font-weight: 400; line-height: 1; }
.dealer-ad { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 3px 16px; margin-top: 21px; padding: 14px 15px 14px 17px; border: 1px solid var(--rule); border-left: 3px solid #677987; background: var(--surface); }
.ad-label { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.ad-title { font-size: 15px; font-weight: 620; letter-spacing: -.02em; }
.ad-copy { max-width: 35ch; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.ad-cta { align-self: center; grid-column: 2; grid-row: 2 / span 2; min-height: 42px; padding: 8px 0 8px 8px; border: 0; background: transparent; color: var(--ink); font-size: 12px; font-weight: 620; text-align: right; cursor: pointer; }
.example-note { margin: 14px 0 0; color: var(--muted); font-size: 12px; }
.example-note button { padding: 0; border: 0; background: none; color: var(--accent); text-decoration: underline; cursor: pointer; }
.phone-install-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 3px; background: var(--surface-raised); color: var(--muted); font-size: 12px; }
.phone-install-label { font-weight: 620; color: var(--ink); }
.phone-install-bar a { color: var(--accent); font-weight: 620; text-decoration: underline; text-underline-offset: 2px; }

.bottom-nav { position: fixed; z-index: 5; bottom: 0; left: 50%; display: grid; width: min(100%, 480px); grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--rule); background: var(--nav); backdrop-filter: blur(14px); transform: translateX(-50%); }
.nav-item { min-height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: transparent; color: var(--muted); font-size: 10.5px; font-weight: 540; cursor: pointer; }
.nav-item svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav-item[aria-current="page"] { color: var(--accent); }

/* Elevated Center Hero Navigation Item */
.nav-item-hero { position: relative; margin-top: -12px; }
.hero-icon-wrap { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #0284c7, #0ea5e9); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(14, 165, 233, 0.45); border: 2px solid var(--surface-raised); transition: transform .15s ease, box-shadow .15s ease; }
.nav-item-hero:hover .hero-icon-wrap { transform: scale(1.06); box-shadow: 0 6px 18px rgba(14, 165, 233, 0.6); }
.nav-item-hero[aria-current="page"] .hero-icon-wrap { background: linear-gradient(135deg, #0369a1, #0284c7); box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.3), 0 6px 18px rgba(14, 165, 233, 0.5); }
.nav-item-hero span { font-weight: 650; }

/* Dashboard & Native Map Telemetry */
.dashboard-telemetry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.telemetry-card { padding: 12px 14px; border-radius: 8px; background: var(--surface-raised); border: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; }
.telemetry-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.telemetry-value { font-size: 20px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 2px; }
.telemetry-unit { font-size: 12px; font-weight: 600; color: var(--muted); }
.telemetry-sub { font-size: 11.5px; color: var(--muted); line-height: 1.3; }

.traffic-source-badge { font-size: 11px; font-weight: 650; padding: 3px 8px; border-radius: 12px; background: rgba(56, 189, 248, 0.12); color: #0284c7; border: 1px solid rgba(56, 189, 248, 0.3); }
[data-theme="dark"] .traffic-source-badge { color: #38bdf8; }

.map-wrapper { margin: 14px 0; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; position: relative; }
.dashboard-map-container { z-index: 1; min-height: 280px; }
[data-theme="dark"] .dashboard-map-container .leaflet-tile { filter: brightness(0.7) invert(1) contrast(3) hue-rotate(200deg) saturate(0.3) brightness(0.7); }

/* Floating Map Overlay Controls */
.map-overlay-controls { position: absolute; bottom: 12px; right: 12px; z-index: 500; display: flex; gap: 8px; }
.map-overlay-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 20px; border: 1px solid var(--rule); background: var(--surface-raised); color: var(--ink); font-size: 11.5px; font-weight: 650; box-shadow: 0 4px 12px rgba(0,0,0,0.12); cursor: pointer; transition: all .15s ease; backdrop-filter: blur(8px); }
.map-overlay-btn:hover { background: var(--surface); border-color: var(--accent); transform: translateY(-1px); }
.map-overlay-btn.active { border-color: #0284c7; background: rgba(2, 132, 199, 0.12); color: #0284c7; }
.live-dot-pulse { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; display: inline-block; box-shadow: 0 0 0 rgba(34, 197, 94, 0.6); animation: livePulse 2s infinite; }
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Field Label Split & GPS Button */
.field-label-split { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.gps-btn { background: none; border: none; padding: 0; color: var(--accent); font-size: 12.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; transition: opacity .15s; }
.gps-btn:hover { text-decoration: underline; opacity: 0.85; }

/* Custom Map Markers & Radar GPS Pulse */
.custom-map-pin { text-align: center; }
.map-pin-inner { width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 3px 8px rgba(0,0,0,0.25); border: 2px solid #fff; margin: 0 auto; }
.pin-symbol { transform: rotate(45deg); font-size: 11px; font-weight: 800; }
.pin-label { font-size: 10px; font-weight: 700; background: var(--surface-raised); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--rule); margin-top: 3px; white-space: nowrap; box-shadow: 0 2px 4px rgba(0,0,0,0.1); color: var(--ink); }

.gps-pulse-pin { position: relative; }
.gps-pulse-core { width: 14px; height: 14px; border-radius: 50%; background: #0284c7; border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.3); position: absolute; top: 5px; left: 5px; z-index: 2; }
.gps-pulse-ring { width: 24px; height: 24px; border-radius: 50%; background: rgba(2, 132, 199, 0.35); position: absolute; top: 0; left: 0; animation: radarPing 1.8s cubic-bezier(0, 0, 0.2, 1) infinite; }
@keyframes radarPing {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.quick-dest-row { margin: 12px 0 16px; }
.quick-dest-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.dest-chip { padding: 5px 10px; border-radius: 14px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s ease; }
.dest-chip:hover { border-color: var(--accent); background: var(--accent-wash); }

.ai-route-results { margin-top: 20px; border-top: 1px solid var(--rule); padding-top: 16px; }
.ai-results-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.results-title { font-size: 14px; font-weight: 650; margin: 0; }
.ai-recommend-pill { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: var(--good-wash); color: var(--good); }

.route-cards-list { display: flex; flex-direction: column; gap: 10px; }
.route-card { padding: 12px 14px; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); transition: border-color .15s, box-shadow .15s, transform .15s; cursor: pointer; }
.route-card:hover { border-color: var(--accent); }
.route-card.is-active { border-color: #0284c7; box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.35); background: var(--surface-raised); }
.route-card.is-recommended { border-color: var(--good); background: var(--surface-raised); box-shadow: 0 2px 10px rgba(34, 197, 94, 0.12); }
.route-card.is-recommended.is-active { border-color: #0284c7; box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.4), 0 2px 10px rgba(34, 197, 94, 0.15); }
.route-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.route-title { font-size: 14px; font-weight: 650; }
.route-score-pill { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 12px; }
.route-score-pill.high { background: var(--good-wash); color: var(--good); }
.route-score-pill.medium { background: var(--accent-wash); color: var(--accent); }
.route-meta-row { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.route-traffic-tag { font-size: 11.5px; padding: 2px 6px; border-radius: 4px; background: rgba(0,0,0,0.05); }
[data-theme="dark"] .route-traffic-tag { background: rgba(255,255,255,0.08); }
.route-traffic-tag.waze { color: #0284c7; }
.route-traffic-tag.google { color: #e11d48; }
.route-action-btn { width: auto; padding: 6px 12px; min-height: 32px; font-size: 12px; margin-top: 6px; }

.form-screen { padding-bottom: 20px; }
.view-heading { margin: 12px 0 27px; }
.view-heading .overline { margin-bottom: 8px; color: var(--accent); font-weight: 600; }
.view-heading p:last-child { margin: 9px 0 0; color: var(--muted); font-size: 15px; }
.field { display: flex; flex-direction: column; gap: 7px; margin: 0 0 19px; }
.field label { font-size: 14px; font-weight: 600; }
.field input { width: 100%; min-height: 52px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 3px; background: var(--surface); color: var(--ink); font-size: 17px; }
.field input::placeholder { color: var(--soft); }
.field input.invalid { border-color: var(--bad); }
.input-with-unit { position: relative; }
.input-with-unit input { padding-right: 50px; font-variant-numeric: tabular-nums; }
.input-with-unit > span { position: absolute; top: 50%; right: 14px; color: var(--muted); transform: translateY(-50%); }
.field-help { color: var(--muted); font-size: 13px; line-height: 1.45; }
.audi-panel { display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin: 0 0 22px; width: 100%; }
.vehicle-brand-bar { display: flex; flex-direction: column; gap: 6px; }
.field-label-small { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; color: var(--muted); }
.brand-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.brand-chip { padding: 5px 12px; font-size: 12px; font-weight: 650; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface-raised); color: var(--ink); cursor: pointer; transition: all 0.15s ease; }
.brand-chip:hover { border-color: var(--accent); }
.brand-chip.is-active, .brand-chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-contrast, #fff); border-color: var(--accent); }
.vehicle-hub-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--rule); border-radius: 6px; background: rgba(0, 0, 0, 0.03); }
[data-theme="dark"] .vehicle-hub-card { background: rgba(255, 255, 255, 0.03); }
.vehicle-hub-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vehicle-brand-badge { font-size: 13px; font-weight: 700; color: var(--ink); }
.vehicle-telematics-pill { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 999px; background: rgba(0, 168, 112, 0.15); color: #00a870; }
.vehicle-hub-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.audi-panel .scan-action { margin: 0; width: 100%; }
.scan-action { width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--rule); border-radius: 3px; background: var(--surface-raised); font-weight: 630; cursor: pointer; }
.scan-action svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.scan-action:disabled { opacity: .55; cursor: progress; }
.scan-status { margin: 0; color: var(--ink); font-size: 14px; }
.scan-status.is-error { color: var(--bad); }
.scan-preview { margin: 0; }
.scan-preview img { display: block; width: 100%; height: 148px; object-fit: cover; border-radius: 3px; background: var(--surface-raised); }
.scan-options { display: flex; flex-direction: column; gap: 8px; }
.scan-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.scan-choices button { min-height: 40px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 3px; background: transparent; font-variant-numeric: tabular-nums; font-weight: 630; cursor: pointer; }
.scan-choices button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.confirm-read { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; font-weight: 600; cursor: pointer; }
.confirm-read input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
fieldset { min-width: 0; margin: 0 0 23px; padding: 0; border: 0; }
fieldset legend { width: 100%; margin-bottom: 14px; padding: 0 0 8px; border-bottom: 1px solid var(--rule); font-size: 16px; font-weight: 630; letter-spacing: -.02em; }
.error-message { min-height: 0; margin: 0; color: var(--bad); font-size: 14px; }
.error-message:not(:empty) { margin: -4px 0 14px; }
.history-stats { margin-top: 4px; }
.history-empty { margin-top: 8px; padding: 22px 0 4px; border-top: 1px solid var(--rule); }
.history-empty .empty-title { margin: 0; font-size: 22px; font-weight: 620; letter-spacing: -.04em; }
.history-empty p:last-child { max-width: 32ch; margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.pace-chart { margin: 18px 0 2px; }
.pace-scroll { overflow-x: auto; scroll-padding-inline: 4px; }
.pace-plot { position: relative; height: 168px; }
.pace-line { position: absolute; right: 0; left: 0; z-index: 1; border-top: 1.5px dashed var(--ink); pointer-events: none; bottom: calc(22px + (100% - 22px) * var(--line-ratio, .5)); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 100%; border-bottom: 1px solid var(--rule); }
.bar { flex: 1 0 36px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; min-width: 36px; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.bar-fill { width: 100%; height: calc((100% - 22px) * var(--ratio)); min-height: 4px; background: var(--good); }
.bar.above .bar-fill { background: var(--accent); }
.bar-label { height: 16px; font-size: 11px; line-height: 16px; }
.bar.is-selected .bar-fill { box-shadow: inset 0 0 0 2px var(--ink); }
.bar.is-selected .bar-label { color: var(--ink); font-weight: 650; }
.chart-legend { flex-wrap: wrap; justify-content: flex-start; gap: 8px 16px; margin-top: 12px; }
.chart-legend > span { white-space: nowrap; }
.above-dot { background: var(--accent); }
.key-dash { display: block; width: 14px; height: 0; border-top: 2px dashed var(--ink); }
.secondary-action:hover { border-color: var(--ink); }
.history-list { margin: 8px 0 0; padding: 0; list-style: none; }
.history-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 16px; min-height: 72px; padding: 12px 0; border-bottom: 1px solid var(--rule); scroll-margin-bottom: 120px; }
.history-list .date { color: var(--muted); font-size: 13px; }
.history-list .km { font-size: 17px; font-weight: 620; font-variant-numeric: tabular-nums; }
.history-list .period { color: var(--soft); font-size: 13px; }
.history-list .row-action { justify-self: end; min-width: 44px; min-height: 44px; padding: 0 2px; text-align: right; }
.history-list li.is-selected { margin: 0 -12px; padding-right: 12px; padding-left: 12px; background: var(--surface-raised); box-shadow: inset 3px 0 0 var(--accent); }
.history-list .confirm-copy { grid-column: 1 / -1; margin: 6px 0 0; color: var(--ink); font-size: 14px; }
.history-list .row-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.secondary-action { width: 100%; min-height: 52px; margin-top: 19px; border: 1px solid var(--rule); border-radius: 3px; background: transparent; font-weight: 600; cursor: pointer; }
.contract-tools { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--rule); }
.settings-tools { border-top: none; margin-top: 8px; padding-top: 0; }
.settings-data-card { margin-top: 18px; }
.settings-screen { padding-bottom: 30px; }
.text-action { min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.text-action.destructive { color: var(--bad); }
.confirm { display: flex; flex-wrap: wrap; gap: 10px; }
.confirm .text-action { font-weight: 600; }
.toast { position: fixed; z-index: 10; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); left: 50%; max-width: calc(100vw - 36px); padding: 12px 18px; border-radius: 3px; background: var(--ink); color: var(--surface); font-size: 14px; font-weight: 570; box-shadow: var(--shadow); transform: translateX(-50%); }

/* Contract Active Card & Forms */
.contract-active-card { margin-top: 18px; padding: 18px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface-raised); box-shadow: var(--shadow); }
.contract-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.contract-badge-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.contract-car-title { font-size: 16px; font-weight: 650; color: var(--ink); }
.contract-reg-pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; background: var(--surface); border: 1px solid var(--rule); color: var(--ink); letter-spacing: .04em; }
.contract-fuel-pill { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 600; background: var(--accent-wash); color: var(--accent); }
.contract-eu-tag { font-size: 12px; font-weight: 560; color: var(--muted); }
.contract-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 14px 0 16px; }
@media (min-width: 480px) { .contract-grid { grid-template-columns: repeat(3, 1fr); } }
.contract-grid-item { padding: 10px 12px; border-radius: 6px; background: var(--surface); border: 1px solid var(--rule); display: flex; flex-direction: column; gap: 3px; }
.contract-grid-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.contract-grid-val { font-size: 15px; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.contract-grid-sub { font-size: 12px; color: var(--muted); }
.contract-card-actions { margin-top: 14px; }
.contract-history-section { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--rule); }
.history-heading-sub { margin-bottom: 18px; }
.form-actions-row { display: flex; gap: 10px; margin-top: 16px; }
.form-actions-row button { margin-top: 0; }

/* Visual Car Carousel & Silhouettes */
.car-carousel { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 14px; margin: 0 -4px 14px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.car-carousel::-webkit-scrollbar { display: none; }
.car-card { flex: 0 0 160px; scroll-snap-align: start; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface-raised); cursor: pointer; text-align: left; display: flex; flex-direction: column; justify-content: space-between; transition: all .15s ease; position: relative; }
.car-card:hover { border-color: var(--muted); }
.car-card[aria-pressed="true"] { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 1.5px var(--accent), var(--shadow); }
.car-card-top { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-bottom: 6px; }
.car-mark-badge { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 700; color: #fff; flex: none; }
.car-mark-badge.is-ok { background: var(--good); }
.car-mark-badge.is-warn { background: var(--bad); }
.car-mark-badge.is-question { background: var(--warn, #e67e22); }
.car-card-reg { font-size: 11px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.car-card-silhouette { height: 38px; display: flex; align-items: center; justify-content: center; margin: 4px 0 6px; color: var(--soft); }
.car-card[aria-pressed="true"] .car-card-silhouette { color: var(--accent); }
.car-svg { width: 96px; height: 38px; fill: currentColor; }
.car-card-info { min-width: 0; }
.car-card-name { display: block; font-size: 13px; font-weight: 620; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car-card-stat { display: block; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 1px; }
.car-add-card { flex: 0 0 100px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1.5px dashed var(--rule); background: transparent; color: var(--muted); cursor: pointer; }
.car-add-card:hover { border-color: var(--accent); color: var(--accent); }
.car-add-icon { font-size: 20px; font-weight: 600; line-height: 1; }
.car-add-label { font-size: 12px; font-weight: 600; }

/* Language Selector Card */
.lang-picker-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
@media (min-width: 480px) { .lang-picker-grid { grid-template-columns: repeat(4, 1fr); } }
.lang-chip { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .15s ease; }
.lang-chip:hover { border-color: var(--accent); }
.lang-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-wash); color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.lang-flag { font-size: 16px; }

/* Daylight & Clock Theme Card */
.theme-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.theme-chip { padding: 8px 14px; border: 1px solid var(--rule); border-radius: 20px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s ease; }
.theme-chip:hover { border-color: var(--accent); }
.theme-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-wash); color: var(--accent); }

/* Cloud Sync & Account Card */
.cloud-status-badge { font-size: 11px; font-weight: 650; padding: 2px 8px; border-radius: 10px; background: var(--surface); border: 1px solid var(--rule); color: var(--muted); }
.cloud-status-badge.is-connected, .cloud-status-badge.is-online { background: var(--good-wash); color: var(--good); border-color: transparent; }
.account-user-profile { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px; border-radius: 8px; background: var(--surface2); border: 1px solid var(--rule); }
.account-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--surface); border: 1px solid var(--rule); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.account-details { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.account-name { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.account-email { font-size: 12px; color: var(--muted); line-height: 1.2; }
.account-type-badge { display: inline-flex; width: fit-content; margin-top: 4px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.account-type-badge.is-private { background: rgba(56, 189, 248, 0.12); color: #0284c7; }
.account-type-badge.is-business { background: rgba(168, 85, 247, 0.12); color: #9333ea; }
.account-actions-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.compact-btn { width: auto; padding: 0 16px; min-height: 40px; margin-top: 0; font-size: 13px; font-weight: 600; border-radius: 6px; }
.btn-logout { color: var(--bad); border: 1px solid rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.05); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s ease; }
.btn-logout:hover { background: rgba(239, 68, 68, 0.12); border-color: var(--bad); color: var(--bad); }
.btn-logout svg { flex-shrink: 0; }
.app-version-badge { font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; padding: 2px 8px; border-radius: 10px; background: var(--surface); border: 1px solid var(--rule); color: var(--muted); }
.update-actions-row { margin-top: 12px; }

/* Live Smart Odometer Scanner & Torch Controls */
.scanner-modal { position: fixed; inset: 0; z-index: 120; background: #000; display: flex; flex-direction: column; overflow: hidden; }
.scanner-viewfinder { flex: 1; position: relative; width: 100%; height: 100%; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #05070a; }
#scanner-video { width: 100%; height: 100%; object-fit: cover; }
#scanner-overlay-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.scanner-hud { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: calc(env(safe-area-inset-top, 20px) + 24px) 24px calc(env(safe-area-inset-bottom, 20px) + 120px); pointer-events: none; }
.hud-reticle { position: relative; width: 85%; max-width: 320px; aspect-ratio: 16 / 7; border: 1px dashed rgba(255,255,255,.2); border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hud-bracket { position: absolute; width: 22px; height: 22px; border: 3px solid #38bdf8; }
.hud-bracket.top-left { top: 0; left: 0; border-right: none; border-bottom: none; border-top-left-radius: 8px; }
.hud-bracket.top-right { top: 0; right: 0; border-left: none; border-bottom: none; border-top-right-radius: 8px; }
.hud-bracket.bottom-left { bottom: 0; left: 0; border-right: none; border-top: none; border-bottom-left-radius: 8px; }
.hud-bracket.bottom-right { bottom: 0; right: 0; border-left: none; border-top: none; border-bottom-right-radius: 8px; }
.hud-scan-line { position: absolute; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, #38bdf8 50%, transparent); box-shadow: 0 0 10px #38bdf8; animation: hud-scan 2.2s ease-in-out infinite alternate; }
@keyframes hud-scan {
  0% { top: 10%; opacity: .4; }
  50% { opacity: 1; }
  100% { top: 90%; opacity: .4; }
}
.hud-lock-box { position: absolute; border: 2px solid #22c55e; background: rgba(34, 197, 94, 0.15); border-radius: 6px; box-shadow: 0 0 16px rgba(34,197,94,.6); animation: hud-lock-pulse .4s ease-out; }
@keyframes hud-lock-pulse {
  0% { transform: scale(1.15); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.hud-status { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 20px; background: rgba(15, 23, 42, 0.75); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.15); color: #f8fafc; font-size: 13px; font-weight: 550; letter-spacing: -0.01em; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.hud-pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #38bdf8; box-shadow: 0 0 8px #38bdf8; animation: hud-dot 1.2s infinite; }
@keyframes hud-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: .4; }
}
.hud-detected-pill { padding: 6px 14px; border-radius: 16px; background: rgba(34, 197, 94, 0.85); backdrop-filter: blur(6px); color: #fff; font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }

.scanner-controls { position: absolute; bottom: 0; left: 0; right: 0; padding: 16px 24px calc(env(safe-area-inset-bottom, 20px) + 16px); background: linear-gradient(180deg, transparent 0%, rgba(5,7,10,.85) 30%, #05070a 100%); display: flex; flex-direction: column; align-items: center; gap: 16px; z-index: 10; }
.torch-ctrl-bar { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 24px; background: rgba(30, 41, 59, 0.75); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.12); color: #cbd5e1; font-size: 12px; font-weight: 600; }
.torch-label { display: inline-flex; align-items: center; gap: 4px; color: #94a3b8; }
.torch-chips { display: inline-flex; gap: 6px; }
.torch-chip { padding: 4px 10px; border-radius: 14px; border: 1px solid rgba(255,255,255,.15); background: transparent; color: #cbd5e1; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s ease; }
.torch-chip:hover { border-color: #38bdf8; }
.torch-chip.is-active, .torch-chip[aria-pressed="true"] { background: #38bdf8; border-color: #38bdf8; color: #0f172a; font-weight: 700; box-shadow: 0 0 10px rgba(56,189,248,.4); }

.scanner-action-row { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 320px; }
.scanner-close-btn, .scanner-file-fallback { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(30, 41, 59, 0.6); color: #f8fafc; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s; }
.scanner-close-btn:hover, .scanner-file-fallback:hover { background: rgba(51, 65, 85, 0.9); }
.scanner-manual-shutter { width: 68px; height: 68px; border-radius: 50%; border: 3px solid #f8fafc; background: transparent; padding: 4px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .1s; }
.scanner-manual-shutter:active { transform: scale(0.94); }
.shutter-inner { width: 100%; height: 100%; border-radius: 50%; background: #f8fafc; transition: background .15s; }
.scanner-manual-shutter:hover .shutter-inner { background: #38bdf8; }

/* Modal Backdrop & Dialog */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.45); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 18px; }
.modal-card { width: 100%; max-width: 420px; background: var(--surface-raised); border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 20px 48px rgba(0,0,0,.2); padding: 22px; position: relative; max-height: calc(100vh - 40px); overflow-y: auto; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.modal-close { background: transparent; border: 0; font-size: 18px; color: var(--muted); cursor: pointer; padding: 4px; line-height: 1; }
.modal-close:hover { color: var(--ink); }
.modal-subtitle { font-size: 13px; color: var(--muted); margin: 0 0 16px; line-height: 1.45; }

/* Dual-Profile Segmented Switch */
.auth-profile-toggle { display: flex; border-radius: 8px; background: var(--surface); border: 1px solid var(--rule); padding: 3px; gap: 4px; margin-bottom: 16px; }
.auth-profile-btn { flex: 1; padding: 8px 12px; border-radius: 6px; border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 650; cursor: pointer; transition: all .15s ease; text-align: center; }
.auth-profile-btn.is-active, .auth-profile-btn[aria-pressed="true"] { background: var(--surface-raised); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }

/* 1-Tap Social Connect Section */
.auth-social-section { margin-bottom: 16px; }
.social-btn-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
.social-connect-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s ease; }
.social-connect-btn:hover { border-color: var(--accent); background: var(--surface-raised); }
.auth-divider-line { display: flex; align-items: center; text-align: center; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; margin: 12px 0 6px; }
.auth-divider-line::before, .auth-divider-line::after { content: ''; flex: 1; border-bottom: 1px solid var(--rule); }
.auth-divider-line span { padding: 0 10px; }

.modal-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.modal-actions button { margin-top: 0; }
.modal-switch-mode { margin-top: 12px; text-align: center; }

/* Non-Intrusive Beta Survey Dock */
.beta-survey-dock {
  position: fixed;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: min(440px, calc(100% - 24px));
  z-index: 45;
  animation: survey-slide-up 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}
.beta-survey-dock[hidden] {
  display: none !important;
}
@keyframes survey-slide-up {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.survey-dock-card {
  background: var(--surface-raised);
  border: 1px solid var(--accent);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.survey-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.survey-tag {
  display: flex;
  align-items: center;
  gap: 6px;
}
.survey-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 2px 8px;
  border-radius: 6px;
}
.survey-stage {
  font-size: 0.7rem;
  color: var(--muted);
}
.survey-close-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
}
.survey-close-btn:hover {
  background: var(--surface);
  color: var(--ink);
}
.survey-question {
  margin: 0 0 6px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}
.survey-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.survey-opt-chip {
  background: var(--surface);
  border: 1px solid var(--rule);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.survey-opt-chip:hover {
  border-color: var(--accent);
  background: var(--surface-raised);
}
.survey-opt-chip.selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.survey-text-input {
  width: 100%;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.8rem;
  margin-top: 4px;
  box-sizing: border-box;
}
.survey-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2px;
}
.survey-progress-dot {
  font-size: 0.72rem;
  color: var(--muted);
}
.survey-submit-btn {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.survey-submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* VIP Beta Invitation & iPhone Onboarding */
.invite-card {
  max-width: 440px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.invite-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
  margin-bottom: 4px;
}
[data-theme="dark"] .invite-badge {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
}
.invite-vehicle-callout {
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
[data-theme="dark"] .invite-vehicle-callout {
  background: rgba(255, 255, 255, 0.03);
}
.invite-callout-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
}
.invite-ios-guide {
  padding: 14px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.05);
  border: 1px solid rgba(37, 99, 235, 0.2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
[data-theme="dark"] .invite-ios-guide {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.35);
}
.ios-guide-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.ios-guide-title svg {
  color: #2563eb;
}
.ios-steps-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.standalone-success-box,
.inapp-alert-box,
.desktop-guide-box {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--ink);
  line-height: 1.4;
}
.inapp-alert-box {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.35);
}
.desktop-guide-box {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.35);
}
.ios-steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink);
}
.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.invite-hero-graphic {
  background: radial-gradient(circle at 50% 30%, rgba(13, 148, 136, 0.22) 0%, rgba(15, 23, 42, 0.02) 80%);
  border-radius: 12px;
  padding: 10px 12px 6px 12px;
  border: 1px solid rgba(13, 148, 136, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.invite-car-svg {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
}
.invite-hero-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
  flex-wrap: wrap;
}
.invite-quota-pill {
  font-size: 11px;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
}
.share-icon-glyph {
  display: inline-block;
  font-size: 14px;
  padding: 1px 4px;
  background: rgba(37, 99, 235, 0.15);
  border-radius: 4px;
  vertical-align: middle;
}
.invite-trust-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px dashed var(--rule);
  border-radius: 8px;
  font-size: 10.5px;
  color: var(--muted);
}
[data-theme="dark"] .invite-trust-row {
  background: rgba(255, 255, 255, 0.02);
}
.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}
.trust-chip svg {
  color: #10b981;
}

@media (min-width: 700px) {
  body { padding: 28px 0; }
  .app-shell { min-height: calc(100vh - 56px); border: 1px solid var(--rule); }
  .bottom-nav { bottom: 28px; border-right: 1px solid var(--rule); border-left: 1px solid var(--rule); }
}

@media (max-width: 360px) {
  .app-shell { padding-right: 18px; padding-left: 18px; }
  .odometer-panel { padding-right: 15px; padding-left: 17px; }
  .distance-key { font-size: 11px; }
  .field-pair { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
