/* =========================================================================
   CarMechanixx — one stylesheet for the website, My Garage, staff tools and
   the technician app. No build step needed.
   ========================================================================= */

:root {
  /* 1.3.3 brand palette: rich green, saffron yellow and white */
  --green-950: #03281A;
  --green-900: #053D27;
  --green: #0A6B43;
  --green-700: #075233;
  --green-500: #16995F;
  --green-400: #34B37A;
  --green-200: #BFE5D0;
  --green-100: #DDF1E5;
  --green-50: #EFF8F2;
  --yellow: #FFC21F;
  --yellow-300: #FFDD70;
  --yellow-600: #EBA700;
  --yellow-100: #FFF0C2;
  --yellow-50: #FFF8E2;
  --yellow-700: #7A5600;
  --ink: #0F241A;
  --ink-2: #2F4237;
  --muted: #56665D;
  --line: #DCE5DE;
  --line-2: #EAF0EB;
  --line-strong: #8C9A90; /* control borders: 3:1 on white */
  --bg: #F6FAF7;
  --surface: #FFFFFF;
  --charcoal: #0C2B1E;
  --danger: #B3261E;
  --danger-50: #FBE9E6;
  --info: #1F5F8B;
  --info-50: #E6EEF5;
  --warning: #8A5A00;
  --warning-50: #FFF4D2;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 1px 2px rgba(7, 50, 30, .06), 0 6px 18px -6px rgba(7, 50, 30, .10);
  --shadow-lg: 0 18px 44px -14px rgba(7, 50, 30, .28);
  --grad-green: linear-gradient(180deg, #0E7F50 0%, #0A6B43 100%);
  --grad-yellow: linear-gradient(180deg, #FFD54F 0%, #FFC21F 100%);
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Bricolage Grotesque", "IBM Plex Sans", system-ui, sans-serif;
  --font-brand: "Archivo", "Bricolage Grotesque", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--bg); }
img, svg, video { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-700); text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(30px, 4.6vw, 52px); font-weight: 700; }
h2 { font-size: clamp(24px, 3vw, 36px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 700; }
h4 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 1em; text-wrap: pretty; }
::selection { background: var(--yellow); color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
code, .mono { font-family: var(--font-mono); font-size: .92em; font-variant-numeric: tabular-nums; }
small, .small { font-size: 13px; }
.muted { color: var(--muted); }
.ink { color: var(--ink); }
.danger-text { color: var(--danger); }
.success-text { color: var(--green-700); }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.upper { text-transform: uppercase; letter-spacing: .06em; font-size: 12px; font-weight: 600; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--green); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
[hidden] { display: none !important; }

/* ---------- layout helpers ---------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 760px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 28px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.row-top { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.grid-4 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.split { display: grid; gap: 20px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 960px) { .split { grid-template-columns: minmax(0, 1fr); } }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.w-full { width: 100%; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; font: 600 15px/1.2 var(--font); cursor: pointer; text-decoration: none !important; transition: background .15s, border-color .15s, color .15s, transform .1s; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.btn:active:not([disabled]):not(.is-disabled) { transform: translateY(1px); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(6, 107, 52, .55); outline-offset: 2px; }
.btn-primary { background: var(--grad-green); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 6px 16px -8px rgba(7, 82, 51, .55); }
.btn-primary:hover { background: linear-gradient(180deg, #0A6B43, #075233); color: #fff; }
.btn-accent { background: var(--grad-yellow); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 6px 16px -8px rgba(201, 138, 0, .65); }
.btn-accent:hover { background: linear-gradient(180deg, #FFC21F, #F2B300); color: var(--ink); }
.btn-dark { background: var(--charcoal); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.btn-dark:hover { background: #062F1F; color: #fff; }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--ink-2); background: #F7F9F6; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--line-2); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #8C1D16; color: #fff; }
.btn-sm { min-height: 38px; padding: 7px 14px; font-size: 14px; border-radius: 9px; }
@media (pointer: coarse) { .btn-sm { min-height: 44px; } }
.btn-lg { min-height: 54px; padding: 14px 24px; font-size: 17px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .55; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; color: var(--green); font: inherit; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ---------- forms ---------- */
label, .label { display: block; font-weight: 600; font-size: 14px; color: var(--ink); margin-bottom: 6px; }
.field { display: flex; flex-direction: column; }
.field + .field { margin-top: 14px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.error { font-size: 13px; color: var(--danger); margin-top: 4px; }
input:not([type]), input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], input[type=date], input[type=time], input[type=search], input[type=url], input[type=datetime-local], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; font: 16px/1.4 var(--font); color: var(--ink);
}
::placeholder { color: #6B736E; opacity: 1; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); }
input.is-invalid, select.is-invalid, textarea.is-invalid { border-color: var(--danger); }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.checkbox input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--green); flex: none; }
.form-grid { display: grid; gap: 14px 16px; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.input-group { display: flex; }
.input-group > input { border-radius: 10px 0 0 10px; }
.input-group > .btn { border-radius: 0 10px 10px 0; }
.prefix-input { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; overflow: hidden; }
.prefix-input:focus-within { border-color: var(--green); outline: 3px solid rgba(6, 107, 52, .35); outline-offset: 2px; }
.prefix-input span { display: flex; align-items: center; padding: 0 12px; background: var(--line-2); color: var(--muted); font-weight: 600; }
.prefix-input input { border: 0; border-radius: 0; }
.otp-input { letter-spacing: .5em; font-family: var(--font-mono); font-size: 22px !important; text-align: center; }

/* ---------- cards / surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.card-tight { padding: 14px 16px; }
.card-flush { padding: 0; overflow: hidden; }
.card h2, .card h3 { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; font-size: 18px; }
.section-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin: 0 0 12px; }
.panel-muted { background: var(--line-2); border-radius: var(--radius); padding: 14px 16px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.kv { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 8px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }

/* ---------- badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.badge-success { background: var(--green-50); color: var(--green-700); }
.badge-warning { background: var(--warning-50); color: var(--warning); }
.badge-danger { background: var(--danger-50); color: var(--danger); }
.badge-info { background: var(--info-50); color: var(--info); }
.badge-dark { background: var(--charcoal); color: #fff; }
.badge-muted { background: var(--line-2); color: var(--muted); }
.badge-neutral { background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.chip.is-active, .chip:has(input:checked) { border-color: var(--green); background: var(--green-50); color: var(--green-700); font-weight: 600; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }

/* ---------- alerts / flash ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius); border: 1px solid; font-size: 14px; }
.alert-success { background: var(--green-50); border-color: var(--green-100); color: var(--green-700); }
.alert-error { background: var(--danger-50); border-color: #F2C3BC; color: var(--danger); }
.alert-warning { background: var(--warning-50); border-color: #EBD48A; color: var(--warning); }
.alert-info { background: var(--info-50); border-color: #C3D5E6; color: var(--info); }
.alert ul { margin: 6px 0 0 18px; padding: 0; }
.flash-stack { position: fixed; z-index: 90; top: 16px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100% - 24px)); display: flex; flex-direction: column; gap: 8px; }
.flash-stack .alert { box-shadow: var(--shadow-lg); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); background: #FBFCFA; white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #FBFCFA; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table a.row-link { color: var(--ink); font-weight: 600; }
.table-compact td, .table-compact th { padding: 8px 10px; }

/* ---------- tabs / filters ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; }
.tabs a.is-active { color: var(--ink); border-bottom-color: var(--green); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filters .field { min-width: 150px; }
.filters .field + .field { margin-top: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; flex-wrap: wrap; }
.seg a, .seg button { padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--muted); border: 0; background: none; cursor: pointer; text-decoration: none; border-right: 1px solid var(--line-2); }
.seg a:last-child, .seg button:last-child { border-right: 0; }
.seg .is-active { background: var(--charcoal); color: #fff; }

/* ---------- KPI tiles + charts ---------- */
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi .kpi-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi .kpi-value { font-family: var(--font-display); font-size: 28px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .kpi-sub { font-size: 12px; color: var(--muted); }
.kpi.is-accent { background: var(--charcoal); border-color: var(--charcoal); }
.kpi.is-accent .kpi-label, .kpi.is-accent .kpi-sub { color: #C9D0CA; }
.kpi.is-accent .kpi-value { color: var(--yellow); }
.kpi-link { text-decoration: none !important; color: inherit; }
.kpi-link:hover .kpi { border-color: #AEB7AF; }
.chart { width: 100%; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .axis { font: 11px var(--font); fill: var(--muted); }
.chart .gridline { stroke: var(--line-2); stroke-width: 1; }
.chart .bar { fill: var(--green); }
.chart .bar:hover { fill: var(--green-700); }
.chart .line { fill: none; stroke: var(--green); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--green-50); }
.chart .point { fill: #fff; stroke: var(--green); stroke-width: 2; }
.hbar { display: grid; grid-template-columns: minmax(90px, 40%) 1fr auto; gap: 10px; align-items: center; font-size: 14px; padding: 5px 0; }
.hbar .track { height: 10px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.hbar .fill { height: 100%; background: var(--green); border-radius: 999px; }
.hbar .val { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 36px; text-align: right; }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 16px 26px; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: -6px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 1px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--green); }
.timeline li.is-done::after { background: var(--green); }
.timeline li.is-pending::after { border-color: var(--line); }
.timeline .t-title { font-weight: 600; font-size: 14px; }
.timeline .t-meta { font-size: 12px; color: var(--muted); }
.timeline .t-body { font-size: 14px; color: var(--ink-2); margin-top: 2px; white-space: pre-line; }

/* ---------- steps (booking) ---------- */
.steps { display: flex; gap: 6px; margin-bottom: 18px; }
.steps span { flex: 1; height: 5px; border-radius: 999px; background: var(--line); }
.steps span.is-done { background: var(--green); }
.choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); }
.choice { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; min-height: 64px; text-align: left; font: inherit; color: inherit; width: 100%; }
.choice:hover { border-color: #AEB7AF; }
.choice.is-selected, .choice:has(input:checked) { border-color: var(--green); background: var(--green-50); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .c-title { font-weight: 600; }
.choice .c-sub { font-size: 13px; color: var(--muted); }
.choice .c-price { font-weight: 700; color: var(--green-700); }
.choice[disabled], .choice.is-disabled { opacity: .45; cursor: not-allowed; }

/* ---------- avatar / empty ---------- */
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--green-50); color: var(--green-700); font-weight: 700; font-size: 13px; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 64px; height: 64px; font-size: 20px; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty h3 { color: var(--ink); }

/* ---------- media grid ---------- */
.media-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.media-tile { position: relative; border-radius: 10px; overflow: hidden; background: var(--line-2); aspect-ratio: 1 / 1; border: 1px solid var(--line); }
.media-tile img, .media-tile video { width: 100%; height: 100%; object-fit: cover; }
.media-tile .m-tag { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 6px; }
.media-tile .m-vis { position: absolute; right: 6px; top: 6px; }
.media-tile .m-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(0,0,0,.25); font-size: 28px; }

/* ---------- modal / dropdown ---------- */
dialog.modal { border: 0; border-radius: var(--radius-lg); padding: 0; width: min(560px, calc(100% - 24px)); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(15, 20, 15, .45); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-body { padding: 20px; max-height: 70vh; overflow: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; }
.dropdown-menu a, .dropdown-menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; color: var(--ink); font: 14px var(--font); background: none; border: 0; cursor: pointer; text-decoration: none; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--line-2); }

/* ---------- pagination ---------- */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.pagination a, .pagination span { min-width: 36px; height: 36px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; color: var(--ink); background: #fff; text-decoration: none; }
.pagination .is-active { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }
.pagination .is-disabled { color: #AEB7AF; }

/* =========================================================================
   PUBLIC WEBSITE
   ========================================================================= */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line-2); }
.site-header .container { display: flex; align-items: center; gap: 20px; min-height: 68px; }
/* Logo: map pin holding a hex nut ("we come to you, and fix it") + CarMechanixx wordmark. */
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-brand); font-stretch: 112%; font-weight: 800; font-size: 21px; letter-spacing: -.02em; line-height: 1; color: var(--ink); text-decoration: none !important; }
.logo-mark { height: 34px; width: auto; flex: none; display: inline-flex; align-items: center; }
.logo-mark svg { height: 100%; width: auto; display: block; overflow: visible; }
.logo-word { white-space: nowrap; }
.logo b { color: var(--green); font-weight: 800; }
/* On dark surfaces the pin turns yellow and the nut charcoal. */
.sidebar .lm-pin, .site-footer .lm-pin, .on-dark .lm-pin, .sidebar .lm-hole, .site-footer .lm-hole, .on-dark .lm-hole { fill: var(--yellow); }
.sidebar .lm-nut, .site-footer .lm-nut, .on-dark .lm-nut { fill: var(--charcoal); stroke: var(--charcoal); }
.site-nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.site-nav a { padding: 8px 12px; color: var(--ink-2); font-weight: 500; font-size: 15px; border-radius: 8px; text-decoration: none; }
.site-nav a:hover { background: var(--line-2); color: var(--ink); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; cursor: pointer; }
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch; background: #fff; border-bottom: 1px solid var(--line); padding: 10px 20px 18px; }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px; }
}

.hero { padding: 48px 0 40px; background: linear-gradient(180deg, #F2F8F4 0%, #FAFAF7 100%); }
.hero-grid { display: grid; gap: 36px; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.hero h1 { margin-bottom: 14px; }
.hero h1 em { font-style: normal; color: var(--green); }
.hero p.lead { font-size: 19px; color: var(--ink-2); max-width: 540px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 18px; }
.hero-proof { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.hero-proof span { display: inline-flex; gap: 6px; align-items: center; }
.hero-visual { position: relative; border-radius: 24px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--green-50); border: 1px solid var(--green-100); }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge { position: absolute; left: 16px; bottom: 16px; background: #fff; border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; font-size: 14px; }
.hero-badge strong { font-family: var(--font-display); font-size: 22px; color: var(--green); }

.selector-card { margin-top: -10px; position: relative; z-index: 2; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 18px; }
.selector-grid { display: grid; gap: 12px; grid-template-columns: 1.2fr auto 1fr 1fr 1fr auto; align-items: end; }
.selector-or { align-self: center; color: var(--muted); font-weight: 600; font-size: 13px; padding-top: 22px; }
@media (max-width: 1000px) { .selector-grid { grid-template-columns: 1fr 1fr; } .selector-or { display: none; } }
@media (max-width: 560px) { .selector-grid { grid-template-columns: minmax(0, 1fr); } }
.reg-input { text-transform: uppercase; font-family: var(--font-mono); letter-spacing: .08em; font-weight: 600; }

.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head p { color: var(--muted); max-width: 620px; margin: 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }

.service-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; color: inherit; text-decoration: none !important; transition: border-color .15s, transform .15s, box-shadow .15s; }
.service-card:hover { border-color: #AEB7AF; transform: translateY(-2px); box-shadow: var(--shadow); color: inherit; }
.service-card .sc-img { aspect-ratio: 16 / 10; background: var(--green-50); display: flex; align-items: center; justify-content: center; color: var(--green); overflow: hidden; }
.service-card .sc-img img { width: 100%; height: 100%; object-fit: cover; }
.service-card .sc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.service-card h3 { font-size: 18px; margin: 0; }
.service-card p { color: var(--muted); font-size: 14px; margin: 0; flex: 1; }
.service-card .sc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 14px; }
.service-card .sc-link { color: var(--green); font-weight: 600; }

.steps-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); counter-reset: step; }
.step-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px; position: relative; }
.step-card .num { width: 34px; height: 34px; border-radius: 50%; background: var(--yellow); color: var(--ink); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.step-card h3 { font-size: 17px; }
.step-card p { color: var(--muted); font-size: 14px; margin: 0; }

.report-preview { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
@media (max-width: 900px) { .report-preview { grid-template-columns: minmax(0, 1fr); } }
.health-card { background: var(--charcoal); color: #E6F1EA; border-radius: 22px; padding: 24px; box-shadow: var(--shadow-lg); }
.health-card .hc-top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; }
.health-card .hc-score { font-family: var(--font-display); font-size: 56px; font-weight: 700; color: var(--yellow); line-height: 1; }
.health-card .hc-out { font-size: 18px; color: #AEB7AF; }
.health-card .hc-cond { margin-left: auto; font-weight: 600; }
.health-card .hc-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-top: 1px solid #1D4A35; font-size: 15px; }
.health-card .hc-note { font-size: 12px; color: #AEB7AF; margin-top: 12px; }
.hc-chip { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .03em; padding: 3px 9px; border-radius: 6px; white-space: nowrap; }
.hc-good { background: #CDEBDA; color: #053D27; }
.hc-soon { background: #FFE7A0; color: #4A3B00; }
.hc-replace { background: #F6C9C0; color: #5E1A10; }
.hc-na { background: #2A5A44; color: #C9D0CA; }

.why-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.why-item { padding: 20px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.why-item .wi-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--green-50); color: var(--green); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.why-item h3 { font-size: 17px; }
.why-item p { color: var(--muted); font-size: 14px; margin: 0; }

.review-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.stars { color: #C98B00; letter-spacing: 2px; font-size: 16px; }
.cta-band { background: var(--green); color: #fff; border-radius: 24px; padding: 36px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0; }
.cta-band p { color: #D3EBDC; margin: 6px 0 0; }

.site-footer { background: var(--charcoal); color: #C9D0CA; padding: 48px 0 28px; margin-top: 40px; font-size: 14px; }
.site-footer a { color: #E6F1EA; }
.site-footer h4 { color: #fff; font-size: 15px; }
.footer-grid { display: grid; gap: 24px; grid-template-columns: 1.5fr repeat(3, 1fr); }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-bottom { border-top: 1px solid #1D4A35; margin-top: 28px; padding-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: #9FBDAD; }
.wa-float { position: fixed; right: 16px; bottom: 16px; z-index: 30; width: 56px; height: 56px; border-radius: 50%; background: #1FA855; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); }
.wa-float:hover { color: #fff; background: #0E7F50; }

.page-hero { padding: 40px 0 28px; background: #F2F8F4; border-bottom: 1px solid var(--line-2); }
.page-hero p { color: var(--ink-2); max-width: 680px; font-size: 18px; }
.breadcrumbs { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.breadcrumbs a { color: var(--muted); }
.prose { max-width: 760px; }
.prose h2 { font-size: 24px; margin-top: 1.4em; }
.prose ul { padding-left: 20px; }
.check-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list li::before { content: ""; width: 20px; height: 20px; flex: none; margin-top: 2px; border-radius: 50%; background: var(--green-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23088541' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 10.5l3 3 6-7'/%3E%3C/svg%3E") center / 16px no-repeat; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; font-size: 20px; color: var(--green); line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }

/* booking wizard */
.book-layout { display: grid; gap: 24px; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); align-items: start; padding: 28px 0 60px; }
@media (max-width: 960px) { .book-layout { grid-template-columns: minmax(0, 1fr); } }
.book-layout > * { min-width: 0; }
.book-summary { position: sticky; top: 88px; }
.summary-line { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 6px 0; }
.summary-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 18px; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 6px; }
.slot-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.date-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.date-strip .choice { min-width: 84px; align-items: center; text-align: center; }
.sticky-cta { position: sticky; bottom: 0; background: linear-gradient(180deg, rgba(250,250,247,0), var(--bg) 30%); padding: 16px 0 8px; display: flex; gap: 10px; justify-content: space-between; }

/* =========================================================================
   MY GARAGE
   ========================================================================= */
.garage-nav { background: #fff; border-bottom: 1px solid var(--line-2); }
.garage-nav .container { display: flex; gap: 2px; overflow-x: auto; }
.garage-nav a { padding: 13px 14px; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; }
.garage-nav a.is-active { color: var(--ink); border-bottom-color: var(--green); }
.vehicle-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.vehicle-card .vc-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.plate { display: inline-block; font-family: var(--font-mono); font-weight: 600; letter-spacing: .06em; background: #FFFDF2; border: 1.5px solid var(--ink); border-radius: 6px; padding: 2px 8px; font-size: 14px; }
.score-ring { --p: 0; width: 76px; height: 76px; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--line-2) 0); display: flex; align-items: center; justify-content: center; flex: none; }
.score-ring span { width: 60px; height: 60px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.score-ring.is-fair { background: conic-gradient(#C98B00 calc(var(--p) * 1%), var(--line-2) 0); }
.score-ring.is-bad { background: conic-gradient(var(--danger) calc(var(--p) * 1%), var(--line-2) 0); }

/* =========================================================================
   STAFF APP (Admin, Ops, CRM)
   ========================================================================= */
body.staff { background: #F4F5F2; }
.staff-shell { display: flex; min-height: 100vh; }
.sidebar { width: 252px; flex: none; background: var(--charcoal); color: #C9D0CA; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .logo { color: #fff; padding: 18px 18px 14px; font-size: 19px; }
.sidebar .logo b, .site-footer .logo b, .on-dark .logo b { color: var(--yellow); }
.nav-group { padding: 8px 10px; }
.nav-group-title { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .08em; color: #8C948E; padding: 10px 10px 6px; text-transform: uppercase; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #D9DED9; font-size: 14px; font-weight: 500; text-decoration: none !important; }
.nav-link:hover { background: #1B4632; color: #fff; }
.nav-link.is-active { background: #1D4A35; color: #fff; box-shadow: inset 3px 0 0 var(--yellow); }
.nav-link svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav-link .count { margin-left: auto; background: var(--yellow); color: var(--ink); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.sidebar-foot { margin-top: auto; padding: 14px 18px; font-size: 12px; color: #8C948E; border-top: 1px solid #1B4632; }
.staff-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(244,245,242,.95); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 10px 24px; min-height: 60px; }
.topbar .search { flex: 1; max-width: 520px; position: relative; }
.topbar .search input { padding-left: 38px; background: #fff; }
.topbar .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.topbar .search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 11px var(--font-mono); color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; background: var(--line-2); }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { border-color: #AEB7AF; color: var(--ink); }
.icon-btn .bubble { position: absolute; top: -4px; right: -4px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; min-width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.page { padding: 22px 24px 48px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: 26px; margin: 0; }
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.menu-btn { display: none; }
@media (max-width: 1000px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.is-open { transform: none; box-shadow: var(--shadow-lg); }
  .menu-btn { display: inline-flex; }
  .page { padding: 16px 14px 40px; }
  .topbar { padding: 10px 14px; }
}
.banner { padding: 10px 24px; background: var(--warning-50); color: var(--warning); border-bottom: 1px solid #EBD48A; font-size: 14px; }
.banner a { color: var(--warning); font-weight: 600; text-decoration: underline; }

/* dispatch board / kanban */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.board-col { background: #ECEFEA; border-radius: 14px; padding: 10px; min-height: 160px; display: flex; flex-direction: column; gap: 8px; }
.board-col.is-over { outline: 2px dashed var(--green); outline-offset: -4px; }
.board-col-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 6px; font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.board-col-head .n { background: #fff; border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.job-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: inherit; text-decoration: none !important; cursor: grab; }
.job-card:hover { border-color: #AEB7AF; color: inherit; }
.job-card .jc-top { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 13px; }
.job-card .jc-code { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.job-card.is-warn { border-color: #F2B500; background: #FFFDF2; }
.job-card.is-danger { border-color: #E3A69C; background: #FFF8F6; }
.job-card.dragging { opacity: .5; }

/* =========================================================================
   TECHNICIAN APP (mobile first)
   ========================================================================= */
body.tech { background: #F2F4F0; padding-bottom: 78px; }
.appbar { position: sticky; top: 0; z-index: 30; background: var(--charcoal); color: #fff; display: flex; align-items: center; gap: 10px; padding: 10px 14px; min-height: 56px; }
.appbar a, .appbar button { color: #fff; }
.appbar .title { font-family: var(--font-display); font-weight: 700; font-size: 18px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tech-page { padding: 14px; max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 10px; font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: none; min-height: 60px; justify-content: center; position: relative; }
.tabbar a.is-active { color: var(--green); }
.tabbar svg { width: 22px; height: 22px; }
.tabbar .bubble { position: absolute; top: 6px; left: calc(50% + 6px); background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; min-width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.t-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none !important; }
a.t-card:hover { border-color: #AEB7AF; color: inherit; }
.t-card .t-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.t-card .t-title { font-weight: 700; font-size: 16px; }
.t-card .t-sub { color: var(--muted); font-size: 14px; }
.big-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 58px; border-radius: 14px; border: 0; font: 700 17px/1.2 var(--font); cursor: pointer; text-decoration: none !important; }
.big-btn.primary { background: var(--green); color: #fff; }
.big-btn.primary:hover { background: var(--green-700); color: #fff; }
.big-btn.accent { background: var(--yellow); color: var(--ink); }
.big-btn.outline { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.big-btn[disabled] { opacity: .5; cursor: not-allowed; }
.status-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.status-track span { text-align: center; padding: 7px 2px; border-radius: 8px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; background: var(--line-2); color: var(--muted); }
.status-track span.is-done { background: var(--green); color: #fff; }
.status-track span.is-current { background: var(--yellow); color: var(--ink); }
.action-list { display: flex; flex-direction: column; gap: 8px; }
.action-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none !important; min-height: 60px; }
.action-item:hover { border-color: #AEB7AF; color: var(--ink); }
.action-item .ai-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--green-50); color: var(--green); display: flex; align-items: center; justify-content: center; flex: none; }
.action-item .ai-text { flex: 1; min-width: 0; }
.action-item .ai-title { font-weight: 700; }
.action-item .ai-sub { font-size: 13px; color: var(--muted); }
.action-item.is-done .ai-icon { background: var(--green); color: #fff; }
.capture-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.capture-tile { position: relative; border: 2px dashed #AEB7AF; border-radius: 14px; background: #fff; aspect-ratio: 4 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; overflow: hidden; padding: 8px; }
.capture-tile input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.capture-tile.has-file { border-style: solid; border-color: var(--green); }
.capture-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.capture-tile .ct-label { position: relative; z-index: 2; background: rgba(255,255,255,.92); padding: 3px 8px; border-radius: 6px; }
.capture-tile .ct-state { position: absolute; z-index: 2; right: 6px; top: 6px; }
.rating-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.rating-seg label { margin: 0; }
.rating-seg input { position: absolute; opacity: 0; pointer-events: none; }
.rating-seg span { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; text-align: center; padding: 0 2px; }
.rating-seg input:checked + span.r-good { background: var(--green-50); border-color: var(--green); color: var(--green-700); }
.rating-seg input:checked + span.r-soon { background: var(--warning-50); border-color: #E6B100; color: var(--warning); }
.rating-seg input:checked + span.r-replace { background: var(--danger-50); border-color: #E3A69C; color: var(--danger); }
.rating-seg input:checked + span.r-na { background: var(--line-2); border-color: #AEB7AF; color: var(--muted); }
.insp-item { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.insp-item .ii-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.insp-item .ii-name { font-weight: 700; }
.upload-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
.progress { height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--green); width: 0; transition: width .2s; }
.offline-bar { background: var(--warning-50); color: var(--warning); text-align: center; font-size: 13px; font-weight: 600; padding: 6px; }

/* =========================================================================
   AUTH + INSTALL
   ========================================================================= */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: linear-gradient(180deg, #F2F8F4, #FAFAF7); }
.auth-card { width: min(440px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); }
.auth-card .logo { margin-bottom: 18px; }
.auth-card h1 { font-size: 26px; }
.demo-otp { background: var(--yellow-50); border: 1px dashed #E6B100; border-radius: 10px; padding: 10px 12px; font-size: 14px; color: var(--yellow-700); }

/* =========================================================================
   PRINT (reports, invoices)
   ========================================================================= */
.doc { background: #fff; max-width: 860px; margin: 24px auto; padding: 36px; border: 1px solid var(--line); border-radius: 12px; }
.doc-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 18px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; }
.doc th, .doc td { padding: 8px 6px; border-bottom: 1px solid var(--line-2); text-align: left; }
.doc .num { text-align: right; }
.no-print { }
@media print {
  body { background: #fff !important; }
  .no-print, .site-header, .site-footer, .garage-nav, .wa-float, .sidebar, .topbar, .tabbar, .appbar { display: none !important; }
  .doc { border: 0; margin: 0; padding: 0; max-width: none; }
  a { color: inherit; }
}

/* Upload queue tile states */
.capture-tile.has-preview { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.capture-tile.has-preview::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.28); border-radius: inherit; }
.capture-tile .ct-state:empty { display: none; }
.capture-tile.is-uploading .ct-state, .capture-tile.is-done .ct-state, .capture-tile.is-failed .ct-state { font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 999px; background: #fff; color: var(--ink); text-shadow: none; }
.capture-tile.is-done { border-color: var(--green); }
.capture-tile.is-done .ct-state { background: var(--green); color: #fff; }
.capture-tile.is-failed { border-color: #B3261E; }
.capture-tile.is-failed .ct-state { background: #B3261E; color: #fff; }

/* Heading-size utilities (keep semantic tags, change size) */
.h2 { font-size: clamp(22px, 2.6vw, 30px); }
.h3 { font-size: 21px; }
.h4 { font-size: 16px; }
.card-pad { padding: 16px; }
.code-block { background: #0C2B1E; color: #E8F1E9; padding: 12px 14px; border-radius: 10px; overflow-x: auto; font-family: var(--font-mono); font-size: 13px; white-space: pre-wrap; word-break: break-all; }

/* ===== admin-core ===== */
/* Admin core: health report rendered inside the staff panel */
.admin-report-body .doc { margin: 0; padding: 24px; max-width: none; }
@media (max-width: 640px) { .admin-report-body .doc { padding: 16px; } }

/* ===== admin-config ===== */
/* Admin catalog & configuration (categories, services, pricing, parts, users, roles, audit, settings) */
.cfg-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--line-2); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); flex: none; }
.cfg-thumb-lg { width: 180px; height: 110px; border-radius: 10px; object-fit: cover; background: var(--line-2); display: block; }
.cfg-checks { display: grid; gap: 10px 18px; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); }
.cfg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cfg-chips .chip { padding: 4px 10px; font-size: 13px; position: relative; }
.cfg-inline { display: inline; margin: 0; }
.cfg-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
.table tr.cfg-row-low td { background: var(--warning-50); }
.table tr.cfg-row-off td { color: var(--muted); }
.table tr.cfg-row-off td a.row-link { color: var(--muted); }
.cfg-table-form td { vertical-align: middle; }
.cfg-table-form input[type=text], .cfg-table-form input[type=number], .cfg-table-form input[type=time], .cfg-table-form select {
  min-height: 36px; padding: 6px 8px; font-size: 14px; min-width: 70px;
}
.cfg-table-form .checkbox { font-weight: 400; font-size: 14px; }
.cfg-lock { font-size: 12px; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; font-weight: 500; }
.cfg-perm { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.cfg-perm:last-child { border-bottom: 0; }
.cfg-perm input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--green); flex: none; }
.cfg-perm .cfg-perm-key { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.cfg-diff { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.cfg-diff th, .cfg-diff td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line-2); vertical-align: top; word-break: break-word; }
.cfg-diff th { color: var(--muted); font-weight: 600; width: 22%; }
.cfg-diff .cfg-old { color: var(--danger); }
.cfg-diff .cfg-new { color: var(--green-700); }
.cfg-details > summary { cursor: pointer; color: var(--green-700); font-weight: 600; font-size: 13px; }
.cfg-pins { font-family: var(--font-mono); font-size: 12px; color: var(--muted); word-break: break-word; }
.cfg-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--line); flex: none; }
.cfg-dot.is-ok { background: var(--green); }
.cfg-dot.is-off { background: var(--danger); }
.cfg-keys { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.cfg-keys li { display: flex; gap: 8px; align-items: center; }
.cfg-keys code { font-family: var(--font-mono); font-size: 12px; }
.cfg-faq-row { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.cfg-faq-row:last-child { border-bottom: 0; }
.cfg-icon-preview { display: inline-flex; align-items: center; gap: 8px; color: var(--green-700); }
.cfg-section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
.cfg-list-nav { display: grid; gap: 2px; }
.cfg-list-nav a { padding: 8px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.cfg-list-nav a:hover { background: var(--line-2); }
.cfg-list-nav a.is-active { background: var(--green-50); color: var(--green-700); font-weight: 600; }
@media (max-width: 900px) {
  .cfg-actions { flex-wrap: wrap; justify-content: flex-start; }
}
.cfg-split-left { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: start; }
@media (max-width: 960px) { .cfg-split-left { grid-template-columns: minmax(0, 1fr); } }
.table tr.cfg-row-current td { background: var(--green-50); }
.cfg-split-nav { display: grid; gap: 20px; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); align-items: start; }
@media (max-width: 960px) { .cfg-split-nav { grid-template-columns: minmax(0, 1fr); } }

/* ===== ops ===== */
/* =========================================================================
   OPERATIONS (dispatch board, schedule, map, pick list, availability)
   ========================================================================= */
.date-nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.date-nav input[type=date] { width: auto; min-width: 150px; }
.ops-kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }

/* board cards */
.ops-board .job-card { cursor: default; }
.job-card a.jc-link { color: var(--ink); font-weight: 700; }
.job-card .jc-meta { color: var(--muted); font-size: 12px; }
.job-card .jc-plate { font-size: 11px; padding: 0 5px; margin-left: 4px; }
.job-card .jc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 2px; }
.job-card .jc-tech { font-size: 12px; font-weight: 600; }
.job-card .jc-alerts { list-style: none; margin: 2px 0 0; padding: 0; font-size: 12px; font-weight: 600; }
.job-card .jc-alerts li.is-warn { color: var(--warning); }
.job-card .jc-alerts li.is-danger { color: var(--danger); }
.job-card .btn { margin-top: 4px; }
.board-col-empty { font-size: 12px; color: var(--muted); text-align: center; padding: 14px 4px; }

/* assign modal */
.assign-option { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; margin: 0; cursor: pointer; font-weight: 400; }
.assign-option:has(input:checked) { border-color: var(--green); background: var(--green-50); }
.assign-option input { width: 18px; height: 18px; accent-color: var(--green); }
.assign-option.is-unavailable { opacity: .7; }
.assign-option .ao-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.assign-option .ao-name { font-weight: 700; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.assign-option .ao-meta { font-size: 12px; color: var(--muted); }
.assign-option .ao-reasons { display: flex; gap: 4px; flex-wrap: wrap; }
.assign-option .ao-score { font-family: var(--font-mono); font-weight: 600; font-size: 14px; background: var(--line-2); border-radius: 8px; padding: 4px 8px; }

/* schedule grid */
.sched { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.sched th, .sched td { border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); padding: 8px; vertical-align: top; min-width: 190px; text-align: left; }
.sched th { background: #FBFCFA; font-size: 12px; position: sticky; top: 0; z-index: 2; }
.sched th.sched-tech, .sched td.sched-tech { position: sticky; left: 0; background: #fff; min-width: 170px; z-index: 1; }
.sched th.sched-tech { z-index: 3; background: #FBFCFA; }
.sched td.is-off { background: repeating-linear-gradient(45deg, #F6F7F4, #F6F7F4 6px, #EFF1EC 6px, #EFF1EC 12px); color: var(--muted); }
.sched .job-card + .job-card { margin-top: 6px; }
.unassigned-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.unassigned-strip .us-slot { min-width: 230px; max-width: 280px; background: #ECEFEA; border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }

/* availability grid */
.avail { border-collapse: separate; border-spacing: 0; font-size: 12px; width: 100%; }
.avail th, .avail td { padding: 5px 4px; border-bottom: 1px solid var(--line-2); text-align: center; white-space: nowrap; }
.avail th { font-size: 11px; color: var(--muted); font-weight: 600; }
.avail th.av-name, .avail td.av-name { text-align: left; position: sticky; left: 0; background: #fff; min-width: 170px; padding-left: 12px; }
.avail th.is-weekend { color: var(--danger); }
.avail th.is-today { color: var(--ink); }
.av-cell { display: block; min-width: 62px; border-radius: 8px; padding: 6px 4px; text-decoration: none !important; font-weight: 600; border: 1.5px solid transparent; line-height: 1.25; }
.av-cell:hover { border-color: #AEB7AF; }
.av-available { background: var(--green-50); color: var(--green-700); }
.av-half { background: var(--yellow-50); color: var(--yellow-700); }
.av-leave { background: var(--danger-50); color: var(--danger); }
.av-off { background: var(--line-2); color: var(--muted); }
.av-cell .av-jobs { display: block; font-weight: 500; font-size: 11px; opacity: .85; }
.av-cell.is-selected { border-color: var(--ink); }
.av-cell.is-clash { border-color: var(--danger); border-style: dashed; }
.av-legend { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.av-legend span { padding: 3px 8px; border-radius: 6px; font-weight: 600; }

/* map */
.ops-map { width: 100%; height: 460px; background: var(--line-2); }
.dot-on { color: var(--green); }
.dot-off { color: #AEB7AF; }

/* job page */
.approval-row { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.approval-row + .approval-row { margin-top: 10px; }
.approval-record { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.approval-record input[type=text] { flex: 1 1 220px; min-height: 36px; padding: 6px 10px; }
tr.is-struck td { color: var(--muted); text-decoration: line-through; }
tr.is-struck td:last-child { text-decoration: none; }
.check-row { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.media-tile .m-file { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.rating-counts { display: flex; gap: 6px; flex-wrap: wrap; }

/* pick list */
.pick-box { display: inline-block; width: 16px; height: 16px; border: 1.5px solid var(--ink-2); border-radius: 4px; }
.pick-check { width: 28px; }
@media print {
  .pick-card { break-inside: avoid; border-color: #999; }
  .page-head .row { display: none !important; }
  .page { padding: 0; }
}

/* ===== crm ===== */
/* ---------- CRM: WhatsApp inbox ---------- */
.crm-inbox { display: grid; gap: 16px; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .crm-inbox { grid-template-columns: minmax(0, 1fr); } .crm-inbox-thread { order: -1; } }
.crm-inbox-list { max-height: calc(100vh - 170px); overflow-y: auto; }
.crm-convo { display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none !important; }
.crm-convo:hover { background: #FBFCFA; color: var(--ink); }
.crm-convo.is-active { background: var(--green-50); box-shadow: inset 3px 0 0 var(--green); }
.crm-convo-snippet { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-thread { display: flex; flex-direction: column; gap: 8px; max-height: 58vh; overflow-y: auto; padding: 4px 2px; }
.crm-msg { max-width: min(78%, 560px); padding: 8px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45; border: 1px solid var(--line); background: #fff; align-self: flex-start; }
.crm-msg.is-out { align-self: flex-end; background: #EAF6EF; border-color: #CDEBDA; }
.crm-msg-meta { font-size: 11px; color: var(--muted); margin-top: 4px; text-align: right; }

/* ---------- CRM: follow-up "done" form ---------- */
.crm-done-form input[type=text] { min-width: 140px; }
@media (max-width: 640px) { .crm-done-form { flex-wrap: wrap; } }

/* Long labels in report chips may wrap on very small phones */
@media (max-width: 380px) { .hc-chip { white-space: normal; } }
.doc { overflow-wrap: anywhere; }
@media (max-width: 600px) { .doc { padding: 18px; margin: 12px auto; } }
@media (max-width: 640px) { .topbar .search kbd { display: none; } }

/* ===== Admin → Website cards ===== */
.wb-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.wb-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.wb-card:hover { box-shadow: 0 6px 20px rgba(20, 30, 25, .08); transform: translateY(-1px); }
.wb-card.is-hidden { opacity: .62; }
.wb-media { position: relative; aspect-ratio: 4 / 3; background: var(--line-2); display: flex; align-items: center; justify-content: center; }
.wb-media img { width: 100%; height: 100%; object-fit: cover; }
.wb-icon { width: 72px; height: 72px; border-radius: 18px; background: #fff; display: flex; align-items: center; justify-content: center; color: var(--green); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.wb-flag { position: absolute; top: 10px; left: 10px; background: var(--charcoal); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.wb-pos { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,.92); color: var(--ink); font-family: var(--font-mono); font-size: 12px; font-weight: 600; min-width: 26px; height: 26px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.wb-body { padding: 14px 16px 6px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.wb-body h3 { font-size: 16px; margin: 0; }
.wb-body p { margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wb-body .badge { align-self: flex-start; }
.wb-actions { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line-2); }
.wb-actions form { display: inline-flex; margin: 0; }
.wb-actions .icon-btn[disabled] { opacity: .35; cursor: default; }
.wb-preview { aspect-ratio: 4 / 3; border-radius: var(--radius); border: 1px dashed var(--line); background: var(--line-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.wb-preview img { width: 100%; height: 100%; object-fit: cover; }
.wb-tab-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wb-tab-group + .wb-tab-group { margin-top: -6px; }
.wb-tab-label { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); min-width: 110px; }
.wb-tab-group .tabs { flex: 1; min-width: 0; }
.wb-quicklinks { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.wb-quicklinks .chip { padding: 3px 10px; font-size: 12px; }
/* category button picture picker */
.cat-icon-now { display: flex; align-items: center; gap: 12px; }
.cat-icon-now img { border-radius: 16px; }
.cat-icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.cat-icon-opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 2px solid var(--line-2); border-radius: 14px; cursor: pointer; text-align: center; }
.cat-icon-opt small { font-size: 11px; line-height: 1.2; color: var(--ink-2); }
.cat-icon-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cat-icon-opt:has(input:checked) { border-color: var(--green); background: var(--green-50); }
.cat-icon-opt:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }
.cat-icon-opt img { border-radius: 12px; }
.cat-icon-auto { width: 48px; height: 48px; border-radius: 12px; background: var(--line-2); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: var(--muted); }
/* Admin → Apps */
.apps-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.app-card { display: flex; flex-direction: column; gap: 14px; }
.app-card-icon { border-radius: 16px; box-shadow: 0 8px 20px -10px rgba(15,30,60,.45); flex: none; }
.app-card-qr { display: flex; justify-content: center; }
.app-card-qr svg { border-radius: 12px; border: 1px solid var(--line); }
.app-card-link { display: flex; gap: 8px; }
.app-card-link input { flex: 1; min-width: 0; font-size: 13px; }
.app-steps { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.inline { display: inline; }
/* (1.3: the admin bottom bar was removed; the sidebar opens from the menu button) */
.wb-grid.is-banner { grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); }
.wb-grid.is-banner .wb-media { aspect-ratio: 8 / 3; background: #EAF0EB; }
.wb-grid.is-banner .wb-media img { object-fit: contain; }

/* 1.3.1 — no sideways scrolling on narrow admin screens */
.table-wrap { position: relative; } /* keeps hidden screen-reader labels inside the scroll box */
.timeline .t-body, .timeline .t-title { overflow-wrap: anywhere; min-width: 0; }
.page-head .badge { white-space: normal; max-width: 100%; }

/* ---------- 1.3.2: technician contact card ---------- */
.tech-contact { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: #F2F8F4; box-shadow: inset 0 0 0 1px #D5EBDD; }
.tech-contact-avatar { width: 52px; height: 52px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--green-100); display: flex; align-items: center; justify-content: center; font: 700 18px/1 var(--font-display); color: var(--green-700); overflow: hidden; }
.tech-contact-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tech-contact-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tech-contact-role { font-size: 13px; color: #4A524D; }
.tech-contact-name { font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }
.tech-contact-number { width: fit-content; font-size: 15px; font-weight: 600; color: var(--green-700); font-variant-numeric: tabular-nums; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.tech-contact-number:hover { color: var(--ink); }
.tech-contact-meta { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: #4A524D; }
.tech-contact-call { min-height: 48px; padding: 0 18px; border-radius: 999px; font-size: 16px; }
@media (max-width: 360px) {
  .tech-contact { grid-template-columns: 44px minmax(0, 1fr); }
  .tech-contact-avatar { width: 44px; height: 44px; font-size: 16px; }
  .tech-contact-call { grid-column: 1 / -1; width: 100%; }
}

/* ---------- 1.3.2: app install and account-switch pages ---------- */
.auth-app-badge { display: flex; gap: 16px; align-items: center; }
.auth-app-badge img { border-radius: 18px; box-shadow: 0 10px 24px -14px rgba(20, 30, 20, .55); flex: none; }
.auth-app-badge h1 { font-size: 24px; }
.install-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--ink-2); }
.auth-install { display: flex; flex-direction: column; gap: 10px; }
.app-scope code { font-size: 12px; background: var(--line-2); padding: 2px 6px; border-radius: 6px; color: var(--ink-2); }

/* Inside a card the technician row sits flat between hairlines (no card inside a card). */
.card .tech-contact { padding: 16px 0; border-radius: 0; background: none; box-shadow: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.card .tech-contact-avatar { background: var(--green-50); box-shadow: inset 0 0 0 2px var(--yellow); }
