/* PitstopDash - customer app styles.
   Brand: the approved navy / red identity shared with PaddockDesk, with a
   racing blue for interactive elements. Mobile first: the base styles are the
   phone layout; wider screens add the sidebar and two-column dashboard. */

:root {
  --navy: #08294f;
  --navy-900: #051a33;
  --navy-800: #0a2342;
  --navy-700: #123a6a;
  --red: #e90a17;
  --red-700: #b80712;
  --blue: #1d6fe0;
  --blue-700: #1557b3;
  --bg: #f2f4f8;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --line: #e1e7ef;
  --line-strong: #cdd6e2;
  --text: #0e1a2b;
  --muted: #46576c;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(8, 41, 79, 0.06), 0 2px 8px rgba(8, 41, 79, 0.05);
  --shadow-lg: 0 10px 40px rgba(5, 26, 51, 0.25);
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  --sidebar: 260px;
  --tabbar-h: 64px;
  --gutter: 16px;

  --t-slate: #46576c; --t-slate-bg: #eef2f7;
  --t-blue: #1557b3; --t-blue-bg: #e7f0fd;
  --t-violet: #6a3fc1; --t-violet-bg: #f1ebfd;
  --t-amber: #9a6200; --t-amber-bg: #fff4dc;
  --t-orange: #b44a00; --t-orange-bg: #ffeddf;
  --t-green: #13784a; --t-green-bg: #e4f6ec;
  --t-red: #c0101b; --t-red-bg: #fde8e9;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.45; color: var(--text); background: var(--bg); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; letter-spacing: 0.2px; }
h2 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 8px; }
p:last-child { margin-bottom: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.tiny { font-size: 0.8rem; }
.strong { font-weight: 700; }
.icon { width: 20px; height: 20px; flex: none; }
.link { color: var(--blue-700); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; font-size: 0.95rem; }
.link .icon { width: 16px; height: 16px; }
.link:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid rgba(29, 111, 224, 0.5); outline-offset: 2px; }
main:focus { outline: none; }
.eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }

/* ---------- Tones ---------- */
.tone-slate { --tone: var(--t-slate); --tone-bg: var(--t-slate-bg); }
.tone-blue { --tone: var(--t-blue); --tone-bg: var(--t-blue-bg); }
.tone-violet { --tone: var(--t-violet); --tone-bg: var(--t-violet-bg); }
.tone-amber { --tone: var(--t-amber); --tone-bg: var(--t-amber-bg); }
.tone-orange { --tone: var(--t-orange); --tone-bg: var(--t-orange-bg); }
.tone-green { --tone: var(--t-green); --tone-bg: var(--t-green-bg); }
.tone-red { --tone: var(--t-red); --tone-bg: var(--t-red-bg); }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; color: var(--tone, var(--t-slate)); background: var(--tone-bg, var(--t-slate-bg)); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tone); margin-right: 6px; vertical-align: 1px; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 0.75rem; font-weight: 800; line-height: 1; }

/* UK number plate (rear: yellow) */
.plate { display: inline-block; font-family: "Arial Narrow", Arial, sans-serif; font-weight: 800; letter-spacing: 1px; background: #ffd400; color: #111; border: 1.5px solid #111; border-radius: 5px; padding: 3px 9px; font-size: 0.95rem; white-space: nowrap; line-height: 1.2; }
.plate.sm { font-size: 0.78rem; padding: 1px 6px; vertical-align: 2px; }
.plate.lg { font-size: 1.25rem; padding: 6px 14px; }

/* ---------- Shell (mobile first) ---------- */
#app { min-height: 100vh; }
.sidebar { display: none; }
.main-col { min-width: 0; padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px var(--gutter); padding-top: calc(10px + env(safe-area-inset-top)); background: var(--navy); color: #fff; border-bottom: 3px solid var(--red); }
.topbar-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, 0.1); }
.brand { display: inline-flex; align-items: center; text-decoration: none; color: #fff; min-height: 36px; }
.brand-logo { height: 34px; width: auto; }
.sidebar .brand-logo { height: auto; width: 100%; max-height: 72px; object-fit: contain; }
/* Placeholder until the approved logo file is added. Plain text on purpose: not a logo design. */
.brand-text { font-family: var(--font); font-weight: 700; font-size: 1.15rem; color: #fff; padding: 4px 10px; border: 1px dashed rgba(255, 255, 255, 0.4); border-radius: 6px; }
.demo-banner { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px var(--gutter); background: var(--t-amber-bg); color: var(--t-amber); font-size: 0.85rem; font-weight: 600; border-bottom: 1px solid #f3dfae; }
.demo-banner .icon { width: 16px; height: 16px; }
.page { padding: 18px var(--gutter) 28px; max-width: 1180px; margin: 0 auto; display: grid; gap: 16px; align-content: start; }
.page[aria-busy="true"] { opacity: 0.6; transition: opacity 0.2s 0.15s; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 16px rgba(8, 41, 79, 0.06); }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: var(--tabbar-h); text-decoration: none; color: var(--muted); font-size: 0.72rem; font-weight: 700; }
.tab .icon { width: 24px; height: 24px; }
.tab.is-active { color: var(--navy); }
.tab.is-active::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--red); }
.tab .nav-badge { position: absolute; top: 6px; left: calc(50% + 6px); }
.tab .badge { min-width: 18px; height: 18px; font-size: 0.7rem; }

/* ---------- Page furniture ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.page-head p { margin-top: 4px; }
.page-actions { display: flex; gap: 8px; }
.back-link { display: inline-flex; align-items: center; gap: 2px; color: var(--blue-700); font-weight: 600; text-decoration: none; margin-bottom: -6px; width: fit-content; }
.back-link .icon { width: 18px; height: 18px; }

.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-700) 100%); color: #fff; border-radius: var(--radius); padding: 22px 20px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; border: 18px solid rgba(233, 10, 23, 0.85); opacity: 0.9; }
.hero > * { position: relative; z-index: 1; }
.hero .eyebrow { color: rgba(255, 255, 255, 0.75); }
.hero-sub { color: rgba(255, 255, 255, 0.85); margin-top: 6px; }
.vehicle-hero .hero-sub { color: var(--muted); }
.vehicle-hero { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h2 .plate { margin-left: 6px; }
.section { display: grid; gap: 10px; min-width: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; }

.callout { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--tone); background: var(--tone-bg); font-weight: 600; }
section.callout { margin: 0; }
.demo-note { display: flex; gap: 8px; align-items: flex-start; font-size: 0.82rem; color: var(--muted); margin: 0; }
.demo-note .icon { width: 16px; height: 16px; margin-top: 2px; }

.empty { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 18px 8px; color: var(--text); }
.empty .icon { width: 28px; height: 28px; color: var(--muted); margin-bottom: 4px; }

/* Action list on Home */
.actions { display: grid; gap: 8px; }
.action { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--tone); border-radius: var(--radius-sm); text-decoration: none; box-shadow: var(--shadow); }
.action:hover { border-color: var(--line-strong); border-left-color: var(--tone); }
.action-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--tone-bg); color: var(--tone); flex: none; }
.action-main { display: grid; flex: 1; min-width: 0; }
.action-main .small { color: var(--muted); }
.action > .icon { color: var(--muted); }

/* Rows */
.rows { display: grid; margin: -4px -8px; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-radius: var(--radius-sm); text-decoration: none; color: inherit; min-width: 0; }
.row + .row { border-top: 1px solid var(--line); }
a.row:hover { background: var(--surface-2); }
.row-lead { flex: none; }
.row-main { display: grid; flex: 1; min-width: 0; gap: 2px; }
.row-title { font-weight: 700; }
.row-sub { font-size: 0.88rem; color: var(--muted); overflow-wrap: anywhere; }
.row-trail { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.row-chevron { color: var(--line-strong); }
.lead-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--tone-bg, var(--t-blue-bg)); color: var(--tone, var(--blue-700)); }
.date-tile { display: grid; justify-items: center; width: 46px; padding: 4px 0; border-radius: 10px; background: var(--navy); color: #fff; line-height: 1.1; }
.date-tile span { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.8; }
.date-tile strong { font-size: 1.25rem; font-family: var(--font-display); }
.amount { font-weight: 800; font-variant-numeric: tabular-nums; }

/* Vehicle cards */
.vehicle-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 85%); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 8px; margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); scroll-padding: var(--gutter); }
.vehicle-strip > * { scroll-snap-align: start; }
.vehicle-grid { display: grid; gap: 14px; }
.vehicle-card { display: grid; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: inherit; border-top: 4px solid var(--navy); }
.vehicle-card:hover { border-color: var(--line-strong); border-top-color: var(--red); }
.vc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.vc-name { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; margin: 0; line-height: 1.1; }
.vc-status { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--tone-bg); color: var(--tone); }
.vc-status .icon { margin-top: 1px; }
.vc-reasons { display: block; font-size: 0.85rem; font-weight: 600; }
.vc-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 0; }
.vc-facts dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.vc-facts dd { margin: 0; font-weight: 600; font-size: 0.92rem; }

.status-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: var(--tone-bg); color: var(--tone); border: 1px solid color-mix(in srgb, var(--tone) 20%, transparent); }
.status-banner .icon { width: 26px; height: 26px; }

/* Health report */
.health-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.health-score { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--tone-bg); color: var(--tone); font-weight: 800; font-size: 1.05rem; }
.health-counts { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); }
.health-items { list-style: none; margin: 12px 0 0; padding: 0; display: grid; }
.hi { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.hi-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--tone); margin-top: 7px; flex: none; }
.hi-main { display: grid; flex: 1; gap: 2px; min-width: 0; }

.facts { display: grid; gap: 8px; margin: 0 0 10px; }
.facts > div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.bullets { margin: 4px 0 0; padding-left: 18px; color: var(--muted); }

/* Job tracker */
.job-card { display: block; text-decoration: none; color: inherit; border-left: 4px solid var(--red); }
.job-card:hover { border-color: var(--line-strong); border-left-color: var(--red); }
.tracker { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); margin: 16px 0 8px; padding: 0; }
.step { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; }
.step::before { content: ""; position: absolute; top: 12px; left: -50%; right: 50%; height: 3px; background: var(--line); z-index: 0; }
.step:first-child::before { display: none; }
.step.is-done::before, .step.is-current::before { background: var(--blue); }
.step-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line-strong); color: #fff; }
.step-dot .icon { width: 14px; height: 14px; stroke-width: 3; }
.step.is-done .step-dot { background: var(--blue); border-color: var(--blue); }
.step.is-current .step-dot { border-color: var(--red); box-shadow: 0 0 0 5px rgba(233, 10, 23, 0.15); }
.step-label { font-size: 0.75rem; font-weight: 700; color: var(--muted); }
.step.is-current .step-label { color: var(--text); }
.job-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; font-size: 0.9rem; color: var(--muted); }
.job-meta span { display: inline-flex; align-items: center; gap: 6px; }
.job-meta .icon { width: 16px; height: 16px; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.timeline li { display: flex; gap: 12px; position: relative; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 5px; top: 18px; bottom: -14px; width: 2px; background: var(--line); }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--tone); flex: none; margin-top: 5px; }
.timeline .from-customer p:last-child { font-style: italic; }

/* Estimates */
.est-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.est-line { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; display: grid; gap: 8px; transition: border-color 0.15s, background 0.15s; }
.est-line[data-decision="approved"] { border-color: var(--t-green); background: var(--t-green-bg); }
.est-line[data-decision="declined"] { background: var(--surface-2); }
.est-line-top { display: flex; justify-content: space-between; gap: 12px; }
.est-title { margin: 6px 0 2px; }
.est-price { display: grid; justify-items: end; flex: none; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border: 0; margin: 4px 0 0; padding: 0; }
.choice-opt { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); font-weight: 700; cursor: pointer; background: var(--surface); }
.choice-opt input { position: absolute; opacity: 0; pointer-events: none; }
.choice-opt:has(input:focus-visible) { outline: 3px solid rgba(29, 111, 224, 0.5); outline-offset: 2px; }
.choice-opt.approve:has(input:checked) { background: var(--t-green); border-color: var(--t-green); color: #fff; }
.choice-opt.decline:has(input:checked) { background: var(--muted); border-color: var(--muted); color: #fff; }

.totals { display: grid; gap: 6px; margin: 12px 0; }
.totals > div { display: flex; justify-content: space-between; gap: 12px; }
.totals dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.total-strong { font-size: 1.15rem; font-weight: 800; padding-top: 8px; border-top: 1px solid var(--line); }
.total-strong dd { font-weight: 800; }

/* Invoice table */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.lines { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.lines th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 6px 4px; border-bottom: 1px solid var(--line-strong); }
.lines td { padding: 10px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.lines .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Messages */
.thread { display: grid; gap: 14px; }
.thread-head h1 { font-size: 1.5rem; }
.bubbles { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 16px; box-shadow: var(--shadow); }
.bubble.theirs { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; justify-self: start; }
.bubble.mine { background: var(--navy); color: #fff; border-bottom-right-radius: 4px; justify-self: end; }
.bubble-meta { font-size: 0.75rem; font-weight: 700; opacity: 0.75; margin-bottom: 2px; }
.bubble-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.composer { display: flex; gap: 8px; align-items: flex-end; position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px); background: var(--surface); padding: 8px; border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); }
.composer textarea { flex: 1; border: 0; resize: none; padding: 8px; min-height: 44px; background: transparent; }
.composer textarea:focus { outline: none; }
.composer:focus-within { border-color: var(--blue); }

/* Forms and buttons */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-weight: 700; font-size: 0.92rem; }
.field-row { display: grid; gap: 14px; }
input[type="date"], select, textarea, input[type="text"] { width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 3px solid rgba(29, 111, 224, 0.2); outline-offset: 0; }
.form-error { color: var(--t-red); font-weight: 700; margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px; border-radius: var(--radius-sm); border: 1.5px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--red-700); }
.btn-secondary { background: var(--surface); color: var(--navy); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--navy); }
.btn-ghost { background: transparent; color: var(--blue-700); }
.btn-ghost:hover { background: var(--t-blue-bg); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 0.9rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn-row .btn { flex: 1; }
.hide-sm { display: none; }
.card p .icon { width: 16px; height: 16px; display: inline; vertical-align: -3px; margin-right: 4px; }

#toasts { position: fixed; left: var(--gutter); right: var(--gutter); bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px); display: grid; gap: 8px; z-index: 50; pointer-events: none; }
.toast { justify-self: center; background: var(--navy-900); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow-lg); font-weight: 600; animation: toast-in 0.2s ease-out; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

.dash-grid { display: grid; gap: 16px; min-width: 0; }
.dash-main, .dash-side { display: grid; gap: 16px; align-content: start; min-width: 0; }

/* ---------- Wider phones / tablets ---------- */
@media (min-width: 600px) {
  :root { --gutter: 24px; }
  .vehicle-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .field-row { grid-template-columns: 1fr 1fr; }
  .btn-row .btn { flex: 0 0 auto; }
  .hide-sm { display: inline; }
  .hero { padding: 28px; }
  h1 { font-size: 2.2rem; }
}

/* ---------- Desktop: sidebar replaces the tab bar ---------- */
@media (min-width: 960px) {
  #app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
  .sidebar { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 18px 12px; background: var(--navy); color: #fff; border-right: 3px solid var(--red); }
  .sidebar .brand { display: flex; justify-content: center; padding: 4px 6px 22px; }
  .nav { display: grid; gap: 2px; }
  .nav-link { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 8px; color: rgba(255, 255, 255, 0.86); text-decoration: none; font-weight: 600; }
  .nav-link:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
  .nav-link.is-active { background: rgba(255, 255, 255, 0.12); color: #fff; }
  .nav-link.is-active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 3px 3px 0; background: var(--red); }
  .nav-link .nav-badge { margin-left: auto; }
  .sidebar-foot { margin-top: auto; display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
  .demo-tag { margin: 0 12px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
  .topbar, .tabbar { display: none; }
  .main-col { padding-bottom: 0; }
  .page { padding: 28px 32px 48px; gap: 20px; }
  .dash-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .vehicle-strip { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); overflow: visible; margin: 0; padding: 0; }
  .actions { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .sticky-summary { position: sticky; top: 20px; }
  .composer { bottom: 16px; }
  #toasts { bottom: 24px; left: auto; right: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .sidebar, .topbar, .tabbar, .demo-banner, .composer, .btn, #toasts { display: none !important; }
  .main-col { padding: 0; }
  body { background: #fff; }
  .card { box-shadow: none; }
}
