/* Aethrovia design system — one visual language for the marketing site,
   the mechanic board, every form/dialog, and the public garage page.
   Black + signal yellow (garage signage, Cypriot rear plates). Hand-written,
   no framework. Fonts are vendored in static/fonts/ (SIL OFL), no CDN.
   NEVER use indigo or indigo-leaning blue/violet anywhere (CLAUDE.md). */

/* ---------- Fonts ---------- */
/* manrope-cyrillic-wght-normal */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-cyrillic-wght-normal.e58febde317b.woff2") format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-wght-normal.938c6e8019b6.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-ext-wght-normal.6d36d5bdedfa.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-greek-wght-normal.42b71be38af5.woff2") format("woff2-variations");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("../fonts/jetbrains-mono-latin-wght-normal.b058178d7f30.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+2000-206F, U+2212;
}

:root {
  color-scheme: light;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --black: #0d0d0e;
  --black-2: #1c1c1f;
  --black-3: #2c2c30;
  --on-black: #f4f2ec;
  --on-black-muted: #a9a69e;

  --ink: #0d0d0e;
  --text: #34332f;
  --muted: #6c6a64;
  --faint: #a2a098;

  --bg: #f5f4ef;
  --surface: #ffffff;
  --surface-2: #faf9f5;
  --border: #e5e2da;
  --border-strong: #cdc9bf;

  --accent: #facc15;
  --accent-hover: #eab308;
  --accent-tint: #fef7cd;
  --accent-ink: #0d0d0e;

  --success: #157a3b;
  --success-tint: #e2f3e7;
  --warning: #b45309;
  --warning-tint: #fdefd9;
  --danger: #b42318;
  --danger-tint: #fdecea;
  --neutral-tint: #efede7;

  --radius-sm: 7px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(13, 13, 14, .06);
  --shadow-md: 0 10px 30px rgba(13, 13, 14, .12);
  --shadow-lg: 0 24px 60px rgba(13, 13, 14, .22);
  --focus-ring: 0 0 0 3px rgba(250, 204, 21, .6);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  color: var(--ink);
  margin: 0 0 .5em;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.02em;
}
p { margin: 0 0 1em; }
a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--ink); }
img { max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
table { border-collapse: collapse; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.num, time { font-variant-numeric: tabular-nums; }

.container { max-width: 1120px; margin-inline: auto; padding-inline: 24px; }
.visually-hidden {
  /* width/height !important too: a hidden <legend> otherwise kept its
     full width and made the Picked-up dialog scroll sideways on phones. */
  position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 100; padding: 12px 20px; background: var(--accent); color: var(--ink); }
.skip-link:focus { top: 12px; }

/* ---------- Topbar & footer (every page) ---------- */
.topbar {
  background: linear-gradient(90deg, #101012 0%, var(--black) 58%, #101012 100%);
  border-bottom: 1px solid rgba(244, 242, 236, .12);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .24), 0 8px 22px rgba(13, 13, 14, .08);
  color: var(--on-black); position: sticky; top: 0; z-index: 20;
}
.topbar-inner {
  max-width: 1280px; margin-inline: auto; padding: 0 24px; min-height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-width: 0; font-weight: 800; font-size: 1.02rem;
  color: var(--on-black); text-decoration: none; letter-spacing: -.01em;
}
.brand:hover { color: #fff; }
/* The logo (aethrovia.com's kit, aethrovia-site/tools/logo.py): the road
   mark on Garage's yellow tile, and AETHROVIA outlined in JetBrains Mono. */
.brand-mark { display: block; width: 34px; height: 34px; flex-shrink: 0; }
.brand-name { display: block; width: auto; height: 15px; flex-shrink: 0; }
.brand-context {
  display: inline-block; position: relative; min-width: 0; max-width: 190px; margin-left: 4px; padding-left: 14px;
  overflow: hidden; color: var(--on-black-muted); font-size: .77rem; font-weight: 700;
  letter-spacing: .01em; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap;
}
.brand-context::before {
  content: ""; position: absolute; width: 1px; height: 20px; margin-left: -14px;
  background: rgba(244, 242, 236, .22); transform: translateY(-2px);
}
.topbar-nav { display: flex; align-items: center; gap: 22px; font-size: .9rem; flex-wrap: wrap; }
.topbar-nav a:not(.btn) { color: var(--on-black-muted); text-decoration: none; font-weight: 600; }
.topbar-nav a:not(.btn):hover { color: #fff; }

/* Signed-in app navigation (board, history, stats, settings) */
.app-nav {
  display: flex; align-items: center; align-self: center; gap: 2px; padding: 4px;
  background: rgba(255, 255, 255, .075); border: 1px solid rgba(244, 242, 236, .12);
  border-radius: 12px;
}
.app-nav a {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 8px;
  color: var(--on-black-muted); font-size: .86rem; font-weight: 700; text-decoration: none;
  transition: background .15s, color .15s, box-shadow .15s;
}
.app-nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.app-nav a[aria-current="page"] {
  background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .28); color: var(--ink);
}
.app-user {
  display: flex; align-items: center; gap: 10px; padding-left: 18px;
  border-left: 1px solid rgba(244, 242, 236, .16); color: var(--on-black-muted); font-size: .85rem;
}
.app-user form { margin: 0; }
.app-user-identity { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.app-user-avatar {
  display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border-radius: 50%;
  background: var(--black-3); color: var(--on-black); font-size: .72rem; font-weight: 800;
}
.user-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-user .btn-ghost { color: var(--on-black-muted); }
.app-user .btn-ghost:hover { background: var(--black-3); color: #fff; }
.topbar-left { display: flex; align-items: center; gap: 28px; min-width: 0; }

.main { flex: 1 0 auto; width: 100%; }

.site-footer { border-top: 1px solid var(--border); margin-top: 48px; }
.site-footer-inner {
  max-width: 1120px; margin-inline: auto; padding: 26px 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  color: var(--muted); font-size: .84rem;
}
.site-footer-inner nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer-inner a { color: var(--muted); text-decoration: none; }
.site-footer-inner a:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 42px; padding: 0 18px; border-radius: var(--radius-sm); border: 1.5px solid transparent;
  font-size: .9rem; font-weight: 700; line-height: 1; white-space: nowrap; cursor: pointer;
  text-decoration: none; transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); border-color: var(--ink); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn-dark { background: var(--black); color: #fff; border-color: var(--black); }
.btn-dark:hover { background: var(--black-3); border-color: var(--black-3); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-success { background: var(--surface); color: var(--success); border-color: #9fd3b0; }
.btn-success:hover { background: var(--success-tint); border-color: var(--success); color: var(--success); }
.btn-ghost { background: transparent; color: var(--text); border-color: transparent; }
.btn-ghost:hover { background: var(--neutral-tint); color: var(--ink); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: #f0c4bf; }
.btn-danger:hover { background: var(--danger-tint); border-color: var(--danger); }
.btn-sm { height: 34px; padding: 0 12px; font-size: .82rem; }
.btn-lg { height: 50px; padding: 0 26px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn .icon { width: 16px; height: 16px; flex-shrink: 0; }

/* ---------- Forms ---------- */
.form p { margin: 0 0 16px; }
.form label { display: block; font-size: .8rem; font-weight: 700; color: var(--ink); margin-bottom: 6px; letter-spacing: .01em; }
.form input:not([type=checkbox]):not([type=radio]),
.form select, .form textarea, .input {
  width: 100%; min-height: 44px; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: .95rem; font-weight: 500; color: var(--ink); background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.form input::placeholder, .form textarea::placeholder, .input::placeholder { color: var(--faint); font-weight: 500; }
.form input:hover, .form select:hover, .form textarea:hover, .input:hover { border-color: #b5b0a4; }
.form input:focus, .form select:focus, .form textarea:focus, .input:focus {
  outline: none; border-color: var(--ink); box-shadow: var(--focus-ring);
}
.form textarea { resize: vertical; min-height: 96px; }
.form .helptext { display: block; margin-top: 5px; font-size: .78rem; color: var(--muted); }
.form .check-link { display: inline-block; margin-top: 6px; font-size: .82rem; font-weight: 600; color: var(--ink); }
.form .check-link[hidden] { display: none; }
.form ul.errorlist { list-style: none; margin: 6px 0 0; padding: 0; color: var(--danger); font-size: .82rem; font-weight: 600; }
.form ul.errorlist.nonfield { background: var(--danger-tint); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 16px; }
.form p:has(input[type=checkbox]),
.form .field:has(> input[type=checkbox]) { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.form p:has(input[type=checkbox]) label,
.form .field:has(> input[type=checkbox]) > label { margin: 0; font-weight: 600; order: 2; font-size: .88rem; flex: 1; min-width: 0; }
.form .field:has(> input[type=checkbox]) > .errorlist { order: 3; flex-basis: 100%; }
.form .field:has(> input[type=checkbox]) > .helptext { order: 4; flex-basis: 100%; margin: -4px 0 0 28px; }
.form input[type=checkbox], .form input[type=radio] { width: 18px; height: 18px; accent-color: var(--ink); flex-shrink: 0; }
.phone-field { display: flex; gap: 8px; }
.phone-field select { flex: 0 0 auto; width: 176px !important; }
.phone-field input { flex: 1; min-width: 0; }
.form fieldset {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 22px 24px 8px; margin: 0 0 22px; background: var(--surface);
}
/* A floated legend sits inside the card as its heading, instead of on
   the card's border (where browsers put a legend by default). */
.form legend { float: left; width: 100%; padding: 0; margin: 0 0 16px; font-weight: 800; color: var(--ink); font-size: 1.05rem; }
.form legend + * { clear: both; }
.form .fieldset-note { clear: both; margin: -10px 0 18px; font-size: .84rem; color: var(--muted); }
.form .fieldset-note a { color: var(--ink); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid > .span-2 { grid-column: 1 / -1; }
.form-section-title {
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin: 6px 0 12px; display: flex; align-items: center; gap: 10px;
}
.form-section-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
[x-cloak] { display: none !important; }

/* Validation: required markers, invalid fields, error summary */
.form .field { margin: 0 0 16px; }
.form label.required::after, .req-mark { content: " *"; color: var(--danger); font-weight: 800; }
.form-legend-note { font-size: .78rem; color: var(--muted); margin: 0 0 14px; }
.form p:has(> .errorlist) input:not([type=checkbox]), .form p:has(> .errorlist) select, .form p:has(> .errorlist) textarea,
.form .field:has(> .errorlist) input:not([type=checkbox]), .form .field:has(> .errorlist) select, .form .field:has(> .errorlist) textarea,
.form [aria-invalid="true"] {
  border-color: var(--danger) !important; background: #fffafa;
}
.form ul.errorlist li::before { content: "! "; font-weight: 800; }
.form input:user-invalid:not(:focus), .form textarea:user-invalid:not(:focus) { border-color: var(--danger); }
.alert-error { background: var(--danger-tint); border-color: #f3c3bd; color: #7a1a12; }
.label-static { display: block; font-size: .8rem; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.value-static { display: block; font-size: .95rem; font-weight: 700; color: var(--ink); padding: 4px 0; }
.fine-credit { font-size: .72rem; color: var(--faint); margin-top: -6px; }
.fine-credit a { color: var(--muted); }

/* Select-or-other (oil / coolant) */
.select-other { display: flex; flex-direction: column; gap: 8px; }

.form-actions.is-split { justify-content: space-between; align-items: center; }

/* Opening-hours editor (templates/garages/_hours_editor.html) */
.hours-editor { border-top: 1px solid var(--border); margin-bottom: 8px; }
.hours-day:last-child { border-bottom: 0; }
.hours-day {
  display: grid; grid-template-columns: 150px 1fr auto; grid-template-areas: "day shifts copy";
  gap: 8px 16px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--border);
}
.hours-day .switch { grid-area: day; }
.hours-shifts { grid-area: shifts; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hours-copy { grid-area: copy; position: relative; }
.hours-shift { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.form .hours-shift select.time-select {
  width: 104px; min-height: 40px; padding: 7px 10px; font-variant-numeric: tabular-nums; font-weight: 600;
}
.hours-to { color: var(--muted); font-weight: 700; }
.hours-closed { display: flex; align-items: center; min-height: 40px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.hours-day.is-closed .hours-day-name { color: var(--muted); }
.hours-day .errorlist { margin: 0 !important; }
.hours-day.has-error select.time-select { border-color: var(--danger); }
.hours-remove { width: 34px; padding: 0; color: var(--muted); }
.hours-copy > .btn { min-height: 40px; height: 40px; }
.hours-copy-panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 232px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); padding: 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.hours-copy-title { font-size: .78rem; font-weight: 800; color: var(--ink); }
.hours-copy-quick { display: flex; gap: 6px; margin-bottom: 4px; }
.hours-copy-quick .btn { flex: 1; }
.form label.hours-copy-day { display: flex; align-items: center; gap: 10px; margin: 0; padding: 5px 2px; font-size: .88rem; font-weight: 600; cursor: pointer; }
.hours-copy-panel .btn-block { margin-top: 6px; }

/* On/off switch — a checkbox with role="switch" */
.form label.switch { display: inline-flex; align-items: center; gap: 12px; margin: 0; min-height: 40px; cursor: pointer; font-size: .92rem; }
.form .switch input[type=checkbox] {
  appearance: none; -webkit-appearance: none; position: relative; flex-shrink: 0; cursor: pointer;
  width: 40px; height: 24px; margin: 0; border-radius: 999px; background: var(--border-strong); transition: background .15s;
}
.form .switch input[type=checkbox]::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s;
}
.form .switch input[type=checkbox]:checked { background: var(--ink); }
.form .switch input[type=checkbox]:checked::before { transform: translateX(16px); background: var(--accent); }
.form .switch input[type=checkbox]:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.hours-day-name { font-weight: 700; }

/* ---------- Cards, badges, alerts, plates ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 28px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 800; letter-spacing: .02em; white-space: nowrap; line-height: 1.2;
}
.badge-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-new { background: var(--accent); color: var(--accent-ink); }
.badge-progress { background: var(--neutral-tint); color: #4b4a45; }
.badge-ready, .badge-open { background: var(--success-tint); color: var(--success); }
.badge-warning { background: var(--warning-tint); color: var(--warning); }
.badge-closed { background: var(--danger-tint); color: var(--danger); }
.badge-muted { background: var(--neutral-tint); color: var(--muted); }
.badge-count { background: var(--black); color: #fff; min-width: 22px; justify-content: center; padding: 3px 7px; }

.plate {
  display: inline-block; font-family: var(--font-mono); font-weight: 700; font-size: .92rem;
  letter-spacing: .08em; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--ink); border-radius: 5px; padding: 3px 8px 2px; line-height: 1.3;
  white-space: nowrap; box-shadow: inset 0 0 0 1px var(--surface), inset 0 0 0 2px #e9e6de;
}
.plate-lg { font-size: 1.05rem; padding: 4px 10px 3px; }

.alert { border-radius: var(--radius-md); padding: 14px 18px; margin-bottom: 20px; font-size: .9rem; border: 1px solid transparent; font-weight: 600; }
.alert-warning { background: var(--accent-tint); border-color: #f3dc72; color: #4a3b00; }
.alert-success { background: var(--success-tint); border-color: #bfe3cb; color: #0e5229; }
.alert a { font-weight: 800; }

/* ---------- App page shell (settings/stats/onboarding/auth) ---------- */
.page { max-width: 760px; margin: 0 auto; padding: 36px 24px 72px; }
.page-narrow { max-width: 480px; }
.page-wide { max-width: 1280px; }

.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: 1.75rem; }
.page-head p { color: var(--muted); margin: 6px 0 0; }
.eyebrow { display: block; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); margin-bottom: 18px; text-decoration: none; font-weight: 600; }
.back-link:hover { color: var(--ink); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 24px 0 40px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px 20px 18px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.stat-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent); }
.stat-card strong { display: block; font-size: 2.1rem; font-weight: 800; color: var(--ink); margin-bottom: 2px; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.stat-card span { font-size: .82rem; color: var(--muted); font-weight: 600; }

/* ---------- Toolbar: search + summary + actions ---------- */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.search {
  position: relative; flex: 1 1 320px; max-width: 460px;
}
.search input {
  width: 100%; height: 44px; border: 1.5px solid var(--border-strong); border-radius: 999px;
  padding: 0 40px 0 42px; font-size: .92rem; font-weight: 500; color: var(--ink); background: var(--surface);
}
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-color: var(--ink); box-shadow: var(--focus-ring); }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search .search-icon { position: absolute; left: 15px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .htmx-indicator {
  position: absolute; right: 16px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  border: 2px solid var(--border-strong); border-top-color: var(--ink); border-radius: 50%;
  animation: spin .7s linear infinite; opacity: 0; transition: opacity .15s;
}
.search .htmx-indicator.htmx-request, .htmx-request .search .htmx-indicator { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

.summary { display: flex; gap: 8px; flex-wrap: wrap; }
.summary-item {
  display: inline-flex; align-items: baseline; gap: 6px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px; font-size: .82rem; color: var(--muted); font-weight: 600;
}
.summary-item strong { color: var(--ink); font-size: .98rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.summary-item.is-ready strong { color: var(--success); }
.summary-item.is-new { background: var(--accent-tint); border-color: #f3dc72; }

/* ---------- Data table (board + history) ---------- */
.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.table-card.is-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.data-table th {
  position: sticky; top: 60px; z-index: 2; background: var(--surface-2);
  text-align: left; padding: 0; border-bottom: 1px solid var(--border);
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
  white-space: nowrap;
}
.table-card.is-scroll .data-table th { top: 0; }
.data-table th:first-child { border-top-left-radius: var(--radius-md); }
.data-table th:last-child { border-top-right-radius: var(--radius-md); }
.data-table th > span, .data-table th .sort { display: flex; align-items: center; gap: 6px; padding: 12px 16px; }
.data-table th .sort {
  width: 100%; border: 0; background: none; font: inherit; color: inherit; letter-spacing: inherit;
  text-transform: inherit; cursor: pointer; text-align: left;
}
.data-table th .sort:hover { color: var(--ink); }
.data-table th .sort::after { content: "↕"; font-size: .85rem; color: var(--faint); letter-spacing: 0; }
.data-table th[aria-sort="ascending"] .sort,
.data-table th[aria-sort="descending"] .sort { color: var(--ink); }
.data-table th[aria-sort="ascending"] .sort::after { content: "↑"; color: var(--ink); }
.data-table th[aria-sort="descending"] .sort::after { content: "↓"; color: var(--ink); }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: top; font-size: .9rem; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tbody tr.is-ready td:first-child { box-shadow: inset 4px 0 0 var(--success); }
.data-table tbody tr.is-new td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
.data-table .cell-main { color: var(--ink); font-weight: 700; display: block; }
.data-table .cell-sub { display: block; font-size: .8rem; color: var(--muted); margin-top: 2px; }
.data-table .cell-empty { color: var(--faint); }
.data-table .cell-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.data-table .c-customer .badge { margin-top: 6px; }
.data-table .cell-sub.is-overdue { color: var(--warning); font-weight: 600; }
.data-table td.c-actions { text-align: right; white-space: nowrap; }
.data-table td.c-time, .data-table td.c-finished, .data-table td.c-plate { white-space: nowrap; }
.data-table .empty-state { text-align: center; padding: 56px 20px; color: var(--muted); }
/* History: one <tbody> per period (Today, Yesterday, …), headed by this row. */
.data-table tr.group-row th {
  position: static; background: var(--bg); padding: 10px 16px; border-radius: 0;
  font-size: .78rem; letter-spacing: .06em; color: var(--ink);
}
.data-table tbody:first-of-type tr.group-row th { border-top: 0; }
.data-table tr.group-row th > .group-range { display: inline; padding: 0; margin-left: 8px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--muted); }
.data-table tbody tr.group-row:hover { background: none; }
.data-table tbody:not(:last-child) tr:last-child td { border-bottom: 1px solid var(--border); }
.empty-state strong { display: block; color: var(--ink); font-size: 1.02rem; margin-bottom: 4px; }

.link-button {
  border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--muted);
  cursor: pointer; text-decoration: underline; text-decoration-color: var(--border-strong);
  text-underline-offset: 3px; font-size: .82rem;
}
.link-button:hover { color: var(--ink); text-decoration-color: var(--accent); }

.snippet {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: .84rem; color: var(--text); max-width: 300px; margin: 0;
}
.snippet + .snippet { margin-top: 6px; }
.snippet-label { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: 4px; }
/* Border, not vertical padding: line-clamp clips at the padding edge, so
   padding let the top of a third line show under the box. */

.row-actions { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; }
.row-actions form { margin: 0; }

/* "More" menu on each board row (a <details>, so no JS needed to open it) */
.row-menu { position: relative; }
.row-menu > summary { list-style: none; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu-panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; min-width: 190px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); padding: 6px; display: flex; flex-direction: column; text-align: left;
}
.row-menu-panel form { margin: 0; }
.row-menu-panel button {
  width: 100%; border: 0; background: none; text-align: left; padding: 10px 12px; border-radius: 8px;
  font-weight: 700; font-size: .86rem; color: var(--ink); cursor: pointer;
}
.row-menu-panel button:hover { background: var(--neutral-tint); }
.row-menu-panel > a {
  display: block; padding: 10px 12px; border-radius: 8px; font-weight: 700; font-size: .86rem;
  color: var(--ink); text-decoration: none;
}
.row-menu-panel > a:hover { background: var(--neutral-tint); }
.row-menu-panel hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }
.row-menu-panel .is-danger { color: var(--danger); }
.row-menu-panel .is-danger:hover { background: var(--danger-tint); }

.mobile-sort { display: none; }
.mobile-sort.is-empty { display: none; }
.mobile-sort label { flex-shrink: 0; white-space: nowrap; }
.mobile-sort select {
  flex: 1; min-width: 0; max-width: 100%;
  height: 40px; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 0 10px; background: var(--surface); color: var(--ink); font-weight: 700;
}

.pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; font-size: .86rem; color: var(--muted); font-weight: 600; }

/* ---------- Board ---------- */
.board-shell { max-width: 1280px; margin: 0 auto; padding: 28px 24px 72px; }
.board-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.board-head h1 { font-size: 1.8rem; margin: 0; }
.board-jobs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.board-section-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.board-section-head h2 { font-size: 1.05rem; margin: 0; }
.board-section-count { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.board-empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.board-empty h2 { margin: 0 0 8px; font-size: 1.15rem; color: var(--ink); }
.board-empty p { margin: 0; }
.board-empty .form-actions { justify-content: center; margin-top: 20px; }
.board-section-empty { margin: 0; padding: 20px; color: var(--muted); font-size: .88rem; }
/* In the shop and Ready are two tables: fixed column widths line them up. */
@media (min-width: 901px) {
  .board-jobs .data-table { table-layout: fixed; }
  .board-jobs .data-table th.c-plate { width: 116px; }
  .board-jobs .data-table th.c-status { width: 150px; }
  .board-jobs .data-table th.c-actions { width: 250px; }
  .board-jobs .data-table td { overflow-wrap: anywhere; }
}
/* The top bar names the garage; the page repeats it only where the top
   bar has to truncate or hide it. */
.page-garage { display: none; }
@media (max-width: 860px) {
  .page-garage { display: block; }
}
.record-head { margin-bottom: 8px; }
.record-visit { color: var(--muted); font-size: .8rem; line-height: 1.7; margin: 0 0 18px; }
.record-visit-actions { margin: -6px 0 18px; }
.record-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.record-nav button { min-width: 0; padding: 12px 2px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: inherit; font-size: .8rem; cursor: pointer; }
.record-nav button[aria-current] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 700; }
.record-nav button:hover { color: var(--ink); }
.record-section { min-height: 230px; }
.record-section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.record-section-head h3 { margin: 0; font-size: 1rem; }
.record-summary { margin: 0; }
.record-summary > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.record-summary dt { color: var(--muted); }
.record-summary dd { margin: 0; overflow-wrap: anywhere; }
.record-summary dd .link-button { margin-left: 8px; }
.record-summary > div:last-child { border-bottom: 0; }
.record-caption, .record-empty { color: var(--muted); font-size: .85rem; }
.record-actions { border-top: 1px solid var(--border); margin-top: 24px; padding-top: 16px; font-size: .82rem; color: var(--muted); }
.record-actions summary { cursor: pointer; }
.record-actions[open] summary { margin-bottom: 10px; }
.record-saved { color: var(--success); font-size: .85rem; margin: 0 0 12px; }
.record-summary .cell-sub { display: block; color: var(--muted); font-size: .78rem; margin-top: 4px; }
.note-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.note-heading .note-meta { margin: 0; }
.service-section-title { margin: 24px 0 12px; font-size: 1rem; }
.service-extra { margin: 16px 0; }
.service-extra > summary { margin-bottom: 12px; cursor: pointer; color: var(--muted); font-size: .85rem; }
.sms-sender { margin: 0 0 16px; color: var(--muted); font-size: .78rem; }
.sms-thread { list-style: none; display: flex; flex-direction: column; gap: 18px; padding: 16px; margin: 0; background: var(--surface-2); border-radius: var(--radius-md); }
.sms-message { width: fit-content; max-width: 90%; align-self: flex-end; }
.sms-recipient { margin: 0 4px 4px; text-align: right; color: var(--muted); font-size: .72rem; }
.sms-bubble { padding: 12px 14px; background: #e8f2ed; border-radius: 16px 16px 4px 16px; }
.sms-bubble p { margin: 0; font-size: .88rem; line-height: 1.6; overflow-wrap: anywhere; }
.sms-meta { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin: 5px 4px 0; font-size: .7rem; color: var(--muted); }
.sms-status { white-space: nowrap; }
.sms-message.is-problem .sms-bubble { background: var(--warning-tint); }
.sms-message.is-problem .sms-status { color: var(--warning); }
.sms-older { align-self: center; }

/* ---------- Auth pages (centered card) ---------- */
.auth-page .main { display: flex; align-items: center; justify-content: center; padding: 48px 20px; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 34px; box-shadow: var(--shadow-md); }
.auth-card h1 { font-size: 1.55rem; }
.auth-card .lede { color: var(--muted); font-size: .92rem; margin-bottom: 24px; }
.auth-links { margin-top: 18px; font-size: .87rem; text-align: center; color: var(--muted); }
/* 404 / 400 / expired form (templates/error.html) */
.error-card > :last-child { margin-bottom: 0; }
.error-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 0; }

/* ---------- Check-in form (checkin app, public) ---------- */
.checkin-page .auth-card { max-width: 480px; }
.checkin-page .form .field:has(> input[type=checkbox]) { align-items: flex-start; }
.checkin-page .form .field:has(> input[type=checkbox]) > label { font-size: .85rem; line-height: 1.45; }
.form .field > label.label-light { font-weight: 500; }
@media (max-width: 480px) {
  .checkin-page .auth-card { padding: 24px 18px; }
}

.tab-switch { display: flex; background: var(--neutral-tint); border-radius: 999px; padding: 4px; margin-bottom: 20px; }
.tab-btn { flex: 1; border: none; background: transparent; padding: 8px 18px; border-radius: 999px; font-size: .86rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.tab-btn.is-active { background: var(--black); color: #fff; }

/* ---------- Dialog (Note / Details / Edit plate / Add car) ---------- */
/* position: fixed, as the browser's own modal dialog is — anything else puts
   a top-layer dialog at the top of the *document*, so on a long board
   scrolled down a phone it opened above the screen (2026-09-25). */
dialog.dialog {
  position: fixed; border: none; border-radius: var(--radius-lg); padding: 0;
  left: env(safe-area-inset-left); right: env(safe-area-inset-right);
  top: calc(var(--dialog-viewport-top, 0px) + var(--dialog-viewport-height, 100dvh) / 2);
  bottom: auto; margin-block: 0; transform: translateY(-50%);
  width: min(560px, calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right))); box-shadow: var(--shadow-lg);
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overscroll-behavior: contain;
  max-height: calc(var(--dialog-viewport-height, 100dvh) - 32px);
  scroll-padding-top: calc(var(--dialog-header-height, 68px) + 12px); scroll-padding-bottom: 88px;
  color: var(--text); background: var(--surface);
}
dialog.dialog::backdrop { background: rgba(13, 13, 14, .55); backdrop-filter: blur(2px); }
.dialog-inner { padding: 26px 28px 28px; }
/* Focused mechanic forms. Suggestions remain inside the dialog's scroll area. */
.mechanic-progress { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; color: var(--muted); font-size: .85rem; }
.draft-notice { padding: 14px; margin-bottom: 18px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--neutral-tint); }
.draft-notice p { margin: 0 0 10px; }
.history-more { list-style: none; padding: 12px 0; }
.mechanic-wizard [data-mechanic-step] { min-height: 180px; }
.mechanic-wizard h3 { font-size: 1.1rem; margin: 0 0 20px; }
.mechanic-nav { position: sticky; bottom: -28px; background: var(--surface); padding: 14px 0; border-top: 1px solid var(--border); flex-wrap: wrap; z-index: 2; }
.mechanic-nav .spacer { flex: 1; }
.wizard-review { margin: 0 0 20px; }
.wizard-review > div { padding: 10px 0; border-bottom: 1px solid var(--border); }
.wizard-review dt { font-size: .8rem; color: var(--muted); }
.wizard-review dd { margin: 4px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.car-picker-control { display: flex; gap: 6px; }
.car-picker-control input { min-width: 0; flex: 1; }
.car-picker-field { position: relative; }
.car-picker-toggle { display: none; flex: 0 0 44px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); font-size: 1.1rem; cursor: pointer; }
.js .car-picker-toggle { display: block; }
.car-picker-options { max-height: 220px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--border); border-radius: var(--radius-md); margin-top: 6px; }
.car-picker-field > .car-picker-options { position: absolute; top: 100%; left: 0; z-index: 5; width: 100%; margin-top: 4px; background: var(--surface); box-shadow: var(--shadow-md); }
.car-picker-options button { display: block; width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--border); background: var(--surface); text-align: left; color: var(--ink); font: inherit; cursor: pointer; }
.car-picker-options button:hover, .car-picker-options button.is-active { background: var(--neutral-tint); }
.car-picker-options .helptext { padding: 8px 12px; }
.form fieldset.language-choice { border: 0; padding: 0; background: none; }
.form .language-choice legend { font-size: .8rem; font-weight: 600; margin-bottom: 6px; }
.language-options { display: flex; flex-wrap: wrap; gap: 4px; }
.language-options label { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 36px; margin: 0; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .78rem; font-weight: 500; cursor: pointer; }
.language-options input[type=radio] { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; }
.language-flag { display: block; flex: 0 0 18px; width: 18px; height: 12px; overflow: hidden; border-radius: 1px; }
.language-options label:has(:checked) { border-color: var(--ink); background: var(--neutral-tint); }
.language-options label:focus-within { box-shadow: var(--focus-ring); }
.manual-checkin .lookup-status { min-height: 1.5em; margin: -12px 0 16px; }
.lookup-suggestion { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; }
.manual-checkin .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.manual-checkin .mechanic-nav { bottom: 0; }
@media (max-width: 480px) {
  .manual-checkin .form-grid { grid-template-columns: minmax(0, 1fr); }
}
.checkin-qr { text-align: center; }
.checkin-qr > img { display: block; width: min(320px, 100%); height: auto; margin: 0 auto 12px; background: #fff; }
.checkin-qr > p { margin: 0 0 12px; }
.qr-expand { display: block; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; color: var(--ink); font: inherit; cursor: pointer; }
.qr-expand img { display: block; width: min(300px, 65vw); height: auto; }
.qr-expand span { display: block; margin-top: 8px; }
dialog.qr-fullscreen { position: fixed; inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border: 0; padding: 20px; box-sizing: border-box; background: #fff; color: #111; text-align: center; }
.qr-fullscreen > button { float: right; }
.qr-fullscreen h2 { clear: both; padding-top: 20px; }
.qr-fullscreen img { display: block; width: min(80vw, 65dvh, 700px); height: auto; margin: 20px auto; }
@media (max-width: 760px) {
  .mechanic-nav { bottom: -22px; }
  .mechanic-nav .btn { flex: 1 1 auto; }
  .mechanic-nav .spacer { display: none; }
}
/* Sticky, so it stays reachable while a long dialog (Notes, Details) is
   scrolled; the negative bottom margin keeps it out of the layout. */
.dialog-close {
  position: sticky; top: 12px; z-index: 1; display: grid; place-items: center;
  width: 34px; height: 34px; margin: 12px 12px -46px auto; padding: 0;
  border-radius: 999px; border: none; background: var(--neutral-tint); color: var(--ink);
  font-size: 1rem; line-height: 1; cursor: pointer;
}
.dialog-close:hover { background: var(--border); }
.dialog-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; padding-right: 40px; }
.dialog-head h2 { font-size: 1.2rem; margin: 0; }
.dialog .dialog-inner { padding-top: 0; }
.dialog .dialog-head {
  position: sticky; top: 0; z-index: 30; background: var(--surface);
  min-height: 68px; padding: 20px 54px 16px 0; border-bottom: 1px solid var(--border);
}
.dialog-head h2 { min-width: 0; overflow-wrap: anywhere; }
.dialog-close { z-index: 31; }
html:has(dialog[open]) { overflow: hidden; }
.dialog-saved { display: flex; align-items: center; gap: 12px; padding: 12px 0; font-weight: 800; color: var(--ink); font-size: 1.05rem; }
.dialog-saved::before {
  content: "✓"; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-size: 1rem;
}
.dialog-saved.is-warning { align-items: flex-start; font-weight: 700; }
.dialog-saved.is-warning::before { content: "!"; flex-shrink: 0; background: var(--warning-tint); color: var(--warning); font-weight: 900; }
/* "Picked up. [Undo]" and the buttons under a warning */
.dialog-saved-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.saved-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 0; }

.hours-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.hours-presets-label { font-size: .78rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-right: 4px; }

/* ---------- Onboarding wizard (templates/onboarding/form.html) ---------- */
/* Without JS there's no .js class: every step shows, no step header. */
.wizard-steps { display: none; list-style: none; gap: 6px; flex-wrap: wrap; margin: 0 0 20px; padding: 0; }
.wizard-ready .wizard-steps { display: flex; }
.wizard-steps button {
  display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 7px 12px 7px 7px;
  border-radius: 999px; font: inherit; font-weight: 700; font-size: .84rem; color: var(--ink); cursor: pointer;
}
.wizard-steps button span {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--neutral-tint); font-size: .76rem;
}
.wizard-steps button[aria-current="step"] { background: var(--black); color: #fff; }
.wizard-steps button[aria-current="step"] span { background: var(--accent); color: var(--accent-ink); }
.wizard-steps button:disabled { cursor: default; color: var(--muted); }
.wizard-progress { display: none; align-items: center; gap: 10px; font-size: .86rem; color: var(--muted); margin: 0 0 16px; }
.wizard-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--neutral-tint); overflow: hidden; }
.wizard-bar span { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.wizard-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px 24px 10px; margin-bottom: 18px;
}
.wizard-panel h2 { font-size: 1.15rem; margin: 0 0 16px; }
.wizard-sub { border-left: 3px solid var(--border); padding-left: 14px; margin-bottom: 8px; }
.wizard-more { border-top: 1px solid var(--border); padding: 14px 0; }
.wizard-more summary { cursor: pointer; font-weight: 700; font-size: .92rem; }
.wizard-more[open] summary { margin-bottom: 14px; }
.wizard-nav {
  position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 10px;
  padding: 12px 0; background: var(--bg); border-top: 1px solid var(--border);
}
.wizard-nav .spacer { flex: 1; }
@media (max-width: 760px) {
  .wizard-ready .wizard-steps { display: none; }
  .wizard-ready .wizard-progress { display: flex; }
  .wizard-panel { padding: 18px 16px 6px; }
}

/* Failed request feedback stays visible until that action succeeds or navigation. */
.request-problem {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50;
  width: min(560px, calc(100vw - 32px)); padding: 12px 16px; border-radius: var(--radius-md);
  background: var(--warning-tint); color: #5a2a00; border: 1px solid #f0c48a;
  font-size: .9rem; font-weight: 700; box-shadow: var(--shadow-md);
}
.request-problem[hidden] { display: none; }
.request-recovery { display: inline-block; font-weight: 800; text-decoration: underline; }

/* Confirm dialog (Mark ready / Picked up): who, then the exact message */
.confirm-summary { display: grid; gap: 6px; margin: 0 0 18px; font-size: .92rem; }
.confirm-summary > div { display: flex; gap: 12px; }
.confirm-summary dt { flex: 0 0 76px; color: var(--muted); font-weight: 700; }
.confirm-summary dd { margin: 0; font-weight: 600; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.confirm-lede { font-size: .86rem; color: var(--muted); font-weight: 600; margin: 0 0 8px; }
.message-preview {
  margin: 0 0 18px; padding: 12px 14px; background: var(--success-tint); border-radius: var(--radius-sm);
  border-top-left-radius: 2px; font-size: .9rem; color: var(--ink); overflow-wrap: anywhere;
}
.confirm-note { font-size: .84rem; color: var(--muted); margin: -6px 0 18px; }

/* Scheduled reminders inside the Note dialog */
.reminder-list { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.reminder-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface-2);
  font-size: .88rem;
}
.reminder-list .helptext { display: block; margin-top: 4px; font-size: .78rem; color: var(--warning); }

/* Past notes inside the Note dialog */
.notes-list { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: 280px; overflow-y: auto; }
.notes-list li { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface-2); }
.note-meta { font-size: .76rem; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.note-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.note-chip { font-size: .74rem; font-weight: 700; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; color: var(--ink); font-variant-numeric: tabular-nums; }
.note-text { font-size: .88rem; color: var(--text); white-space: pre-line; overflow-wrap: anywhere; margin: 0; }
.note-meta { overflow-wrap: anywhere; }

/* A car's messages, both ways, inside the Note dialog */
.message-history { margin: 0 0 22px; }
.message-history > summary { cursor: pointer; margin-bottom: 10px; list-style: none; }
.message-history > summary::-webkit-details-marker { display: none; }
.history-toggle {
  order: 3; font-size: .72rem; font-weight: 800; letter-spacing: .04em; color: var(--ink);
  border: 1px solid var(--border-strong); border-radius: 999px; padding: 2px 10px; text-transform: none;
}
.history-toggle::before { content: "Show"; }
.message-history[open] .history-toggle::before { content: "Hide"; }
.history-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.history-list li { border-radius: var(--radius-sm); padding: 10px 12px; max-width: 88%; }
.history-list .is-out { background: var(--surface-2); border: 1px solid var(--border); align-self: flex-end; }
.history-list .is-out.is-problem { border-color: var(--warning); }

/* Tap-to-call numbers: ink, never a link blue */
.phone-link { color: inherit; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.phone-link:hover { text-decoration-color: var(--accent); }
a.cell-main, a.cell-sub { display: block; }

/* Details dialog: erasing a customer's data, kept out of the way */
.danger-zone { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; }
.danger-zone > summary { cursor: pointer; font-weight: 700; font-size: .86rem; color: var(--danger); }
.danger-zone .helptext { display: block; margin: 8px 0 12px; }

/* ---------- Public garage page ---------- */
.public-page .main .container { max-width: 640px; padding-top: 36px; padding-bottom: 64px; }
.garage-hero { margin-bottom: 24px; }
.garage-hero h1 { font-size: 2.1rem; line-height: 1.15; margin-bottom: 10px; overflow-wrap: anywhere; }
.garage-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; font-size: .95rem; color: var(--text); }
.garage-status strong { font-weight: 800; }
.garage-status.is-open strong { color: var(--success); }
.garage-status.is-closed strong { color: var(--danger); }
.garage-status-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.garage-status.is-open .garage-status-dot { color: var(--success); box-shadow: 0 0 0 4px var(--success-tint); }
.garage-status.is-closed .garage-status-dot { color: var(--danger); box-shadow: 0 0 0 4px var(--danger-tint); }
.garage-status-detail { color: var(--muted); font-weight: 600; }

/* Address and phone: what it is on the left (readable, copyable — they
   may be calling from another phone), the action on the right. */
.contact-list { list-style: none; margin: 0 0 20px; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.contact-row { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.contact-row + .contact-row { border-top: 1px solid var(--border); }
.contact-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--neutral-tint); color: var(--ink); flex-shrink: 0; }
.contact-icon svg { width: 20px; height: 20px; }
.contact-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.contact-label { font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.contact-value { color: var(--ink); font-weight: 700; font-size: 1rem; overflow-wrap: anywhere; }
a.contact-value { text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
a.contact-value:hover { text-decoration-color: var(--ink); }
.contact-phone { font-variant-numeric: tabular-nums; letter-spacing: .01em; user-select: all; }
.contact-action { flex-shrink: 0; min-width: 120px; }

.hours-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 18px 18px 6px; margin-bottom: 20px; }
.hours-card h2 { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; margin: 0 0 6px; }
.hours-card-icon { width: 20px; height: 20px; }
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table th, .hours-table td { padding: 11px 10px; text-align: left; border-bottom: 1px solid var(--border); font-size: .92rem; font-variant-numeric: tabular-nums; vertical-align: top; }
.hours-table tr:last-child th, .hours-table tr:last-child td { border-bottom: 0; }
.hours-table th { color: var(--text); font-weight: 600; }
.hours-table td { text-align: right; color: var(--ink); font-weight: 600; }
.hours-table .shift { display: block; }
.hours-table .hours-closed-day { color: var(--faint); font-weight: 600; }
.hours-table tr.is-today th, .hours-table tr.is-today td { background: var(--accent-tint); font-weight: 800; color: var(--ink); }
.hours-table tr.is-today th { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.hours-table tr.is-today td { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.today-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--black); color: var(--on-black); font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; vertical-align: 1px; }

.review-row { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--ink); font-weight: 700; text-decoration: none; }
.review-row:hover { border-color: var(--ink); text-decoration: none; color: var(--ink); }
.review-row:focus-visible { outline: none; box-shadow: var(--focus-ring); border-color: var(--ink); }
.review-row span { flex: 1; }
.review-star { width: 20px; height: 20px; color: var(--accent-hover); }
.review-arrow { width: 18px; height: 18px; color: var(--muted); }
.fine-print { margin-top: 36px; font-size: .8rem; color: var(--faint); }
.lang-switch { display: flex; align-items: center; gap: 6px; }
.lang-switch select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background: var(--black-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23a9a69e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--on-black); border: 1px solid transparent; border-radius: 999px;
  padding: 6px 32px 6px 14px; font-size: .85rem; font-weight: 700;
}
.lang-switch select:hover { border-color: var(--on-black-muted); }
.lang-switch select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang-switch select option { color: var(--ink); background: #fff; }
.lang-switch button { font-size: .85rem; }

/* ---------- Marketing site ---------- */
.kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.kicker::before { content: ""; width: 18px; height: 4px; background: var(--accent); border-radius: 2px; }

.hero { padding: 64px 0 60px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 4.8vw, 3.5rem); max-width: 580px; letter-spacing: -.035em; }
.hero h1 mark { background: linear-gradient(transparent 58%, var(--accent) 58%); color: inherit; padding: 0 .05em; }
.hero .lede { font-size: 1.08rem; color: var(--muted); max-width: 470px; margin: 18px 0 28px; }
.hero-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: .84rem; color: var(--muted); }

.board-mock { background: var(--black); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-lg); }
.board-mock-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--on-black-muted); margin: 2px 4px 12px; font-weight: 800; }
.board-mock .card { padding: 0; overflow: hidden; border: 0; }
.board-mock-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.board-mock-head strong { font-size: .98rem; color: var(--ink); }
.board-mock-head span { font-size: .78rem; color: var(--muted); font-weight: 700; }
.mock-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.mock-row:last-child { border-bottom: 0; }
.mock-row.is-ready { box-shadow: inset 4px 0 0 var(--success); }
.mock-row.is-new { box-shadow: inset 4px 0 0 var(--accent); }
.mock-row .cell-main { color: var(--ink); font-weight: 700; font-size: .88rem; display: block; }
.mock-row .cell-sub { color: var(--muted); font-size: .76rem; display: block; }
.mock-row .btn { height: 32px; padding: 0 12px; font-size: .78rem; }
.board-mock .btn[disabled] { opacity: 1; cursor: default; }

.section { padding: 64px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
.section-head p { color: var(--muted); margin-top: 10px; margin-bottom: 0; }

.feature-list { border-top: 1px solid var(--border); }
.feature-row { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--border); align-items: start; }
.feature-row .step-no { font-family: var(--font-mono); color: var(--ink); font-weight: 700; font-size: .85rem; background: var(--accent); border-radius: 6px; text-align: center; padding: 3px 0; }
.feature-row h3 { font-size: 1.06rem; margin-bottom: 6px; }
.feature-row p { color: var(--muted); font-size: .9rem; margin: 0; max-width: 520px; }

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.step-card { border-top: 4px solid var(--ink); padding-top: 18px; }
.step-card strong { font-family: var(--font-mono); color: var(--ink); font-size: .78rem; background: var(--accent); padding: 2px 8px; border-radius: 4px; }
.step-card h3 { font-size: 1.06rem; margin: 14px 0 6px; }
.step-card p { color: var(--muted); font-size: .9rem; margin: 0; }

.included-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.included-list li { display: grid; grid-template-columns: .7fr 1.3fr; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.included-list b { font-size: .95rem; color: var(--ink); font-weight: 800; }
.included-list span { font-size: .9rem; color: var(--muted); }

.cta-band { background: var(--black); color: #fff; border-radius: var(--radius-lg); padding: 48px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.cta-band h2 { color: #fff; font-size: clamp(1.55rem, 3vw, 2.1rem); }
.cta-band p { color: var(--on-black-muted); margin: 10px 0 0; max-width: 440px; }
.cta-band .kicker { color: var(--accent); }
.cta-price { text-align: right; }
.cta-price strong { display: block; font: 800 3rem/1 var(--font); letter-spacing: -.03em; color: var(--accent); }
.cta-price span { display: block; font-size: .82rem; color: var(--on-black-muted); margin: 6px 0 18px; }

/* ---------- Landing page ---------- */
.landing-hero { background: var(--black); color: var(--on-black); padding: 76px 0 78px; }
.landing-hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 72px; align-items: center; }
.landing-hero .kicker { color: var(--accent); }
.landing-hero h1 { color: #fff; font-size: clamp(2.65rem, 5.2vw, 4.55rem); line-height: 1.02; letter-spacing: -.055em; max-width: 650px; }
.landing-hero h1 span { color: var(--accent); }
.landing-hero .hero-lede { color: var(--on-black-muted); font-size: 1.08rem; line-height: 1.65; max-width: 500px; margin: 24px 0 30px; }
.landing-hero .hero-note { color: var(--on-black-muted); }
.landing-hero .btn-ghost { color: var(--on-black); }
.landing-hero .btn-ghost:hover { background: var(--black-3); }
.message-dot { display: inline-block; width: 8px; height: 8px; background: var(--accent); border-radius: 50%; margin-right: 5px; }
.proof-strip { background: var(--accent); color: var(--ink); }
.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding-top: 23px; padding-bottom: 23px; }
.proof-grid div { display: flex; flex-direction: column; gap: 2px; }
.proof-grid strong { font-size: .9rem; font-weight: 800; }
.proof-grid span { font-size: .8rem; color: #554c0b; }
.landing-section { padding-top: 82px; padding-bottom: 82px; }
.landing-section-head { max-width: 700px; margin-bottom: 42px; }
.landing-section-head h2 { font-size: clamp(1.9rem, 3.3vw, 2.65rem); max-width: 630px; }
.landing-section-head p:last-child { max-width: 560px; font-size: .98rem; }
.landing-cta { margin-top: 0; }
.cta-form { min-width: 0; }
.cta-form .form { display: grid; gap: 13px; }
.cta-form .form label { color: var(--on-black); }
.cta-form .form input:not([type=checkbox]):not([type=radio]),
.cta-form .form select { background: #fff; }
.cta-form .form p { margin: 0; }
.cta-form .phone-field { gap: 8px; }
@media (min-width: 761px) {
  .cta-form .phone-field select { width: 142px !important; }
}
.lead-field ul.errorlist { margin: 5px 0 0; }
.lead-success { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid #4d4d52; border-radius: var(--radius-md); color: #fff; }
.lead-success span { color: var(--on-black-muted); font-size: .9rem; }
.lead-dialog { width: min(420px, calc(100vw - 24px)); }
.lead-dialog .dialog-saved { padding-right: 40px; }
.lead-dialog-note { margin: 0 0 0 46px; color: var(--muted); }

.pricing-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 32px; }
.pricing-cards--simple { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
.price-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 26px; box-shadow: var(--shadow-sm); }
.price-card:first-child { background: var(--black); border-color: var(--black); }
.price-card:first-child .price-name, .price-card:first-child .price-amount { color: #fff; }
.price-card:first-child .price-amount { color: var(--accent); }
.price-card:first-child p { color: var(--on-black-muted); }
.price-card strong.price-name { display: block; font-size: .95rem; color: var(--ink); margin-bottom: 8px; font-weight: 800; }
.price-card .price-amount { font-size: 1.8rem; font-weight: 800; color: var(--ink); margin-bottom: 10px; letter-spacing: -.02em; }
.price-card p { color: var(--muted); font-size: .88rem; margin: 0; }

.faq-list { border-top: 1px solid var(--border); }
.faq-item { padding: 22px 0; border-bottom: 1px solid var(--border); }
.faq-item h2 { font-size: 1.06rem; margin-bottom: 8px; }
.faq-item p { color: var(--muted); margin: 0; }

.container.content-page { padding-top: 44px; padding-bottom: 64px; }
/* Manrope's ligatures turn "(c)" into "©" — wrong in the Terms' "(a), (b),
   (c)" lists. Checked in Chrome; "no-contextual" alone didn't stop it. */
.content-page { font-variant-ligatures: none; }
.content-page h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.content-page h2 { font-size: 1.28rem; margin: 36px 0 10px; }
.content-page p, .content-page li { color: var(--text); max-width: 680px; }
.content-page .meta { color: var(--muted); font-size: .86rem; }
.content-page ul, .content-page ol { max-width: 680px; padding-left: 20px; }
.content-page li { margin-bottom: 8px; }
/* The Terms' contents: two columns where there's room. */
.terms-contents ol { columns: 2 240px; column-gap: 32px; margin: 18px 0 8px; }
.terms-contents li { margin-bottom: 4px; break-inside: avoid; }
.privacy-lang { font-size: .88rem; margin-bottom: 18px; }
/* A fact only the business can supply — must be filled in before launch */
.todo { background: var(--accent-tint); outline: 1px dashed var(--warning); border-radius: 3px; padding: 0 3px; }

/* ---------- Utility ---------- */
.text-muted { color: var(--muted); }
.mt-0 { margin-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .data-table .c-latest { display: none; }
}
@media (max-width: 860px) {
  .brand-context { max-width: 118px; }
  .app-nav a { padding: 0 10px; }
  .app-user .user-name { display: none; }
}
@media (max-width: 760px) {
  .topbar-inner { min-height: 64px; padding: 0 12px; gap: 8px; }
  .topbar-left { gap: 10px; min-width: 0; flex: 1; }
  .app-nav { gap: 0; padding: 2px; border-radius: 10px; overflow-x: auto; scrollbar-width: none; }
  .app-nav::-webkit-scrollbar { display: none; }
  .app-nav a { padding: 0 7px; font-size: .82rem; white-space: nowrap; }
  .app-user .btn-sm { padding: 0 8px; }
  .topbar-nav { gap: 14px; }
  .topbar-nav > a:not(.btn) { display: none; }
  .brand-name, .brand-context { display: none; }
  .container { padding-inline: 16px; }
  .hero { padding: 40px 0 44px; }
  .hero-grid, .steps-grid, .pricing-cards, .cta-band { grid-template-columns: 1fr; gap: 32px; }
  .cta-band { padding: 32px 24px; }
  .cta-price { text-align: left; }
  .included-list li { grid-template-columns: 1fr; gap: 6px; }
  .section { padding: 44px 0; }
  .site-footer-inner { padding-inline: 16px; }
  .phone-field { flex-wrap: wrap; }
  .phone-field select { width: 100% !important; }
  .phone-field input { flex-basis: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .page { padding: 24px 16px 56px; }
  .board-shell { padding: 20px 12px 56px; }
  .board-head h1 { font-size: 1.45rem; }
  .toolbar .btn-add { width: 100%; }
  .toolbar .spacer { display: none; }
  .search { max-width: none; flex-basis: 100%; }
  .dialog-inner { padding: 22px 18px 22px; }
}
@media (max-width: 900px) {
  /* Tables collapse to cards; the mobile sort <select> replaces the headers. */
  .mobile-sort { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: .8rem; font-weight: 700; color: var(--muted); }
  .data-table thead { display: none; }
  .data-table, .data-table tbody { display: block; }
  .data-table tbody tr {
    display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 14px;
    border-bottom: 1px solid var(--border);
    grid-template-areas: "plate status" "customer customer" "car time" "latest latest" "actions actions";
  }
  .data-table tbody tr:last-child { border-bottom: 0; }
  .data-table tbody tr.is-ready { box-shadow: inset 4px 0 0 var(--success); }
  .data-table tbody tr.is-new { box-shadow: inset 4px 0 0 var(--accent); }
  .data-table tbody tr td:first-child { box-shadow: none !important; }
  .data-table td { display: block; padding: 0; border: 0; }
  .data-table .c-plate { grid-area: plate; }
  .data-table .c-status { grid-area: status; justify-self: end; }
  .data-table .c-customer { grid-area: customer; }
  .data-table .c-car { grid-area: car; }
  .data-table .c-time { grid-area: time; text-align: right; }
  .data-table .c-finished { grid-area: time; text-align: right; }
  .data-table .c-time:has(+ .c-finished) { display: none; }
  .data-table .c-latest { display: block; grid-area: latest; }
  .data-table .c-latest:empty { display: none; }
  .data-table td.c-actions { grid-area: actions; text-align: left; }
  .data-table .row-actions { display: flex; justify-content: stretch; width: 100%; }
  .data-table .row-actions > * { flex: 1; }
  .data-table .row-actions .btn { width: 100%; }
  .data-table .row-menu { flex: 0 0 auto; }
  .data-table td.empty-state { grid-column: 1 / -1; }
  /* The desktop rule that closes each History period with a line drew one
     under every cell once cells are blocks; the card's own line does it. */
  .data-table tbody:not(:last-child) tr:last-child td { border-bottom: 0; }
  .data-table tbody:not(:last-child) tr:last-child { border-bottom: 1px solid var(--border); }
  .data-table tbody tr.group-row { display: block; padding: 0; }
  .data-table tr.group-row th { display: block; padding: 10px 14px; }
  .hours-day { grid-template-columns: 1fr auto; grid-template-areas: "day copy" "shifts shifts"; padding: 10px 0; }
  .hours-day.is-closed .hours-shifts { display: none; }
  .form .hours-shift select.time-select { width: 96px; }
  .data-table tbody tr.empty-row { display: block; }
  .snippet { max-width: none; }
}

@media (max-width: 760px) {
  .landing-hero { padding: 48px 0 52px; }
  .landing-hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .landing-hero h1 { font-size: clamp(2.55rem, 12vw, 3.7rem); }
  .landing-hero .hero-lede { font-size: 1rem; }
  .proof-grid { grid-template-columns: 1fr; gap: 15px; padding-top: 22px; padding-bottom: 22px; }
  .proof-grid div { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: baseline; }
  .proof-grid span { text-align: right; }
  .landing-section { padding-top: 54px; padding-bottom: 54px; }
}

/* ---------- Pricing page ---------- */
.pricing-page { background: var(--bg); }
.pricing-intro { padding: 72px 0 42px; text-align: center; }
.pricing-intro .kicker { justify-content: center; }
.pricing-intro h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); letter-spacing: -.045em; }
.pricing-intro p:last-child { color: var(--muted); max-width: 570px; margin: 16px auto 0; font-size: 1.02rem; }
.pricing-offer { display: grid; grid-template-columns: .84fr 1.16fr; max-width: 920px; padding-bottom: 72px; }
.pricing-offer-main { background: var(--black); color: #fff; border-radius: var(--radius-lg) 0 0 var(--radius-lg); padding: 42px; display: flex; flex-direction: column; align-items: flex-start; }
.offer-label { color: var(--accent); text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 800; margin: 0 0 18px; }
.offer-price { display: flex; flex-direction: column; margin-bottom: 18px; }
.offer-price span { color: var(--accent); font-size: clamp(3.3rem, 7vw, 5.1rem); line-height: .95; font-weight: 800; letter-spacing: -.06em; }
.offer-price small { color: var(--on-black-muted); font-size: .85rem; margin-top: 10px; }
.offer-trial { color: var(--on-black-muted); font-size: .9rem; margin: 0 0 28px; }
.offer-trial strong { color: #fff; }
.pricing-included { background: var(--surface); border: 1px solid var(--border); border-left: 0; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; padding: 42px; }
.pricing-included .offer-label { color: var(--ink); }
.pricing-included h2 { font-size: 1.45rem; max-width: 320px; margin-bottom: 25px; }
.pricing-included ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border); }
.pricing-included li { padding: 12px 0 12px 24px; border-bottom: 1px solid var(--border); color: var(--text); font-size: .9rem; position: relative; }
.pricing-included li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 800; }
.pricing-next { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.pricing-next-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 30px; padding-bottom: 30px; }
.pricing-next .kicker { margin-bottom: 8px; }
.pricing-next h2 { font-size: 1.25rem; margin: 0; }

@media (max-width: 760px) {
  .pricing-intro { padding: 50px 0 30px; text-align: left; }
  .pricing-intro .kicker { justify-content: flex-start; }
  .pricing-offer { grid-template-columns: 1fr; padding-bottom: 50px; }
  .pricing-offer-main { border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 30px 24px; }
  .pricing-included { border-left: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); padding: 30px 24px; }
  .pricing-next-inner { align-items: flex-start; flex-direction: column; }
}

/* ---------- Ops (/ops, superusers only) ---------- */
.ops { overflow-wrap: anywhere; }
.ops-layout > * { min-width: 0; }
.ops .eyebrow a { color: inherit; text-decoration: none; }
.ops .eyebrow a:hover { color: var(--ink); }
.ops .stats-grid { margin: 0 0 32px; }
.ops .stat-card strong { font-size: 1.8rem; }
.ops-section-title { font-size: 1.15rem; margin: 0 0 14px; }
.ops-attention { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 36px; align-items: start; }
.ops-panel { padding: 20px 22px; margin-bottom: 16px; }
.ops-attention .ops-panel { margin: 0; }
.ops-panel h2 { font-size: 1.05rem; margin: 0 0 14px; }
.ops-panel h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .98rem; margin: 0 0 10px; }
.ops-hint { font-size: .82rem; color: var(--muted); margin: -4px 0 10px; }
.ops-empty { margin: 0; }
.ops-list { list-style: none; margin: 0; padding: 0; }
.ops-list > li { padding: 10px 0; border-top: 1px solid var(--border); font-size: .9rem; }
.ops-list > li:first-child { border-top: 0; padding-top: 0; }
.ops-list a { color: var(--ink); font-weight: 700; }
.ops-list .cell-sub { display: block; font-size: .8rem; color: var(--muted); margin-top: 2px; }
.ops-list .cell-sub a { font-weight: 600; }
.ops-list .badge { margin-left: 6px; }
.ops-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ops-links { display: flex; flex-wrap: wrap; gap: 8px; }
.ops-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.ops-aside { min-width: 0; }
.ops-person { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.ops-person .cell-main { display: block; color: var(--ink); font-weight: 700; }
.ops-person .cell-sub .badge { margin: 4px 0 0; }
.ops-person-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ops-person-actions form { margin: 0; }
.ops-add { margin-top: 14px; }
.ops-add > summary { list-style: none; }
.ops-add > summary::-webkit-details-marker { display: none; }
.ops-add[open] > summary { margin-bottom: 16px; }
.ops-notes { list-style: none; margin: 18px 0 0; padding: 0; }
.ops-notes li { padding: 12px 0; border-top: 1px solid var(--border); }
.ops-notes p { margin: 0 0 4px; font-size: .9rem; white-space: normal; overflow-wrap: anywhere; }
.ops-notes .cell-sub { font-size: .78rem; color: var(--muted); }
.ops-panel .form textarea { min-height: 72px; }
.qr-preview { display: block; width: 180px; height: 180px; margin: 0 0 8px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.qr-target { margin: 0 0 12px; font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.qr-panel > p.helptext { margin: 14px 0 0; font-size: .8rem; color: var(--muted); }
.ops-admin-link { font-size: .82rem; margin: 4px 0 0; }
.ops-admin-link a { color: var(--muted); }
.ops-due { color: var(--danger); font-weight: 800; }
.ops .data-table a.cell-main { text-decoration: none; }
.ops .data-table a.cell-main:hover { text-decoration: underline; }
.ops .data-table td .badge + .badge { margin-left: 4px; }

.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filter-tabs a {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  font-size: .82rem; font-weight: 700; text-decoration: none;
}
.filter-tabs a strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.filter-tabs a:hover { border-color: var(--ink); color: var(--ink); }
.filter-tabs a[aria-current="page"] { background: var(--black); border-color: var(--black); color: #fff; }
.filter-tabs a[aria-current="page"] strong { color: var(--accent); }

.badge-lead-new { background: var(--accent); color: var(--accent-ink); }
.badge-lead-contacted { background: var(--neutral-tint); color: #4b4a45; }
.badge-lead-demo { background: var(--warning-tint); color: var(--warning); }
.badge-lead-won { background: var(--success-tint); color: var(--success); }
.badge-lead-lost { background: var(--neutral-tint); color: var(--muted); }

@media (max-width: 1000px) {
  .ops-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  /* Ops tables: each row a card, each cell labelled from data-label. */
  .data-table.is-stacked tbody tr { display: block; padding: 12px 14px; grid-template-areas: none; }
  .data-table.is-stacked td { position: relative; padding: 4px 0 4px 112px; min-height: 26px; }
  .data-table.is-stacked td::before { content: attr(data-label); position: absolute; left: 0; top: 6px; width: 100px; font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
  .data-table.is-stacked td.empty-state { padding: 40px 12px; }
  .data-table.is-stacked td.empty-state::before { content: none; }
}
@media (max-width: 760px) {
  .ops-attention { grid-template-columns: 1fr; }
  /* The Garages page has its own Onboard button; the topbar has no room. */
  .ops-topbar-onboard { display: none; }
  /* The support banner has its own "Back to Ops" link. */
  .app-ops-link { display: none; }
  .ops-links .btn { flex: 1; }
}

/* ---------- Holidays & closures (garage settings) ---------- */
.closures-card { margin-top: 28px; }
.closures-card h2 { font-size: 1.1rem; margin: 0 0 8px; }
.closures-card h3 { font-size: .95rem; margin: 22px 0 8px; }
.closures-card > p { color: var(--muted); font-size: .9rem; }
.closure-list, .holiday-list { list-style: none; margin: 0 0 16px; padding: 0; font-size: .88rem; }
.closure-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--border); }
.closure-list li span { min-width: 0; overflow-wrap: anywhere; }
.holiday-list li { padding: 5px 0; border-top: 1px solid var(--border); }
.closure-form .form-actions { margin-top: 4px; }

/* ---------- Picked up: when it was collected (board/_confirm_action.html) ---------- */
.form fieldset.pickup-when { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin: 0 0 12px; padding: 0; border: 0; background: none; }
.pickup-when label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; }
.pickup-when-at { margin: 0 0 14px; }
/* A visit's service details (board/_service_fields.html): the reading
   with its unit beside it, and the garage interval under the next service. */
.odometer-row { display: flex; gap: 8px; align-items: center; }
.odometer-row > input { flex: 1 1 auto; min-width: 0; }
.form .odometer-row select { flex: 0 0 auto; width: auto; min-width: 92px; }
.service-interval { align-self: end; }
.service-interval .helptext { display: block; margin-top: 6px; }
.service-warning, .form .helptext.service-warning { color: var(--warning); font-weight: 600; }

/* ---------- Support access (garage settings, and the support view banner) ---------- */
.support-card { margin-top: 28px; }
.support-card h2 { font-size: 1.1rem; margin: 0 0 8px; }
.support-card h3 { font-size: .95rem; margin: 22px 0 8px; }
.support-card p { color: var(--muted); font-size: .9rem; }
.team-list { margin: 16px 0 0; }
.account-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.account-actions form { margin: 0; }
.team-list > li:first-child { border-top: 1px solid var(--border); padding-top: 10px; }
.support-state { font-weight: 800; color: var(--ink) !important; }
.support-state.is-open { color: var(--warning) !important; }
.support-log { list-style: none; margin: 0; padding: 0; font-size: .84rem; }
.support-log li { padding: 7px 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.support-log code { font-family: var(--font-mono); font-size: .78rem; }
.support-banner { background: var(--warning-tint); color: #5b2d05; border-bottom: 1px solid #f1cf9f; padding: 10px 24px; font-size: .86rem; text-align: center; }
.support-banner a { color: inherit; font-weight: 800; margin-left: 6px; }
.ops-in-person { flex-basis: 100%; font-size: .8rem; }
.ops-in-person summary { color: var(--muted); cursor: pointer; font-weight: 600; }
.ops-in-person form { margin-top: 8px; }
.ops-privacy { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 16px; font-size: .88rem; color: var(--muted); margin: 0 0 20px; }
.ops-privacy strong { color: var(--ink); }
.ops-privacy.is-open { background: var(--warning-tint); border-color: #f1cf9f; color: #5b2d05; }
.ops-narrow { max-width: 560px; }
.ops-service + .ops-service { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; }
.ops-service .helptext { margin: 8px 0 0; font-size: .8rem; color: var(--muted); }
.ops-kv { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: .82rem; }
.ops-kv dt { font-family: var(--font-mono); font-size: .74rem; color: var(--muted); padding-top: 1px; overflow-wrap: anywhere; }
.ops-kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .ops-kv { grid-template-columns: 1fr; gap: 0; }
  .ops-kv dd { margin-bottom: 6px; }
}
.dpa-text, .dpa-form { margin-top: 20px; }
.dpa-text h2:first-of-type { margin-top: 16px; }
.dpa-text ul ul { margin-top: 8px; }
.dpa-form h2 { margin-top: 0; }
details.dpa-text > summary { cursor: pointer; }
details.dpa-text[open] > summary { margin-bottom: 8px; }
.lead-privacy { margin: 0; font-size: .78rem; color: var(--on-black-muted); }
.lead-privacy a { color: var(--on-black); }

/* ---------- Invoices (payments/_invoices.html: Settings → Billing, Ops → Plan & billing) ---------- */
.invoice-list { list-style: none; margin: 0; padding: 0; }
.invoice-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(96px, auto); align-items: center; gap: 8px 24px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.invoice-list li:first-child { padding-top: 0; }
.invoice-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.invoice-main strong { display: block; font-size: .88rem; }
.invoice-meta { display: block; margin-top: 4px; font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
.invoice-meta > span { white-space: nowrap; }
.invoice-amount { display: flex; align-items: center; justify-content: flex-end; gap: 12px; font-size: .88rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.invoice-links { display: flex; justify-content: flex-end; gap: 16px; font-size: .8rem; font-weight: 800; }
@media (max-width: 560px) {
  .invoice-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .invoice-links { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 760px), (pointer: coarse) {
  .invoice-links a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---------- Phones & touch screens ----------
   Most mechanics and every customer use a phone (2026-09-25 mobile audit:
   320–414px, real touch emulation). Two rules for them:
   - form fields at 16px: iOS Safari zooms the whole page into any field
     under 16px when it's tapped, and doesn't zoom back out;
   - tap targets about 44px tall (Apple HIG; WCAG 2.5.5), so a thumb
     doesn't hit "Remove" when it meant "Notes".
   (pointer: coarse) also covers tablets and touch laptops at any width. */
@media (max-width: 760px), (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]),
  select, textarea { font-size: max(16px, 1rem) !important; }

  .btn, .btn-sm { min-height: 44px; height: auto; max-width: 100%; white-space: normal; padding-block: 10px; line-height: 1.3; }
  .app-nav a { min-height: 44px; }
  .data-table .row-actions .btn, .data-table .row-actions .row-menu > summary { height: 44px; }
  .row-menu-panel button, .row-menu-panel > a { display: flex; align-items: center; min-height: 44px; }
  .tab-btn { min-height: 44px; }
  .lang-switch select { min-height: 44px; }
  .brand { min-height: 44px; min-width: 44px; }
  .dialog-close { width: 44px; height: 44px; margin-bottom: -56px; }
  .topbar { padding-top: env(safe-area-inset-top); }
  .topbar-inner { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .page, .board-shell, .container, .site-footer-inner { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .site-footer-inner { padding-bottom: max(26px, env(safe-area-inset-bottom)); }
  .mechanic-nav, .manual-checkin .mechanic-nav { bottom: 0; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .mechanic-nav .btn { flex: 1 1 auto; }
  .mechanic-nav .spacer { display: none; }
  .form-actions { flex-wrap: wrap; }
  .link-button { min-height: 44px; min-width: 44px; text-align: left; }
  .link-button::after { content: none; }
  summary { min-height: 44px; padding-block: 11px; }
  .row-menu > summary { padding-block: 10px; }
  .form .hours-shift select.time-select, .hours-copy > .btn, .form label.switch,
  .mobile-sort select, .language-options label { min-height: 44px; }
  .hours-copy > .btn { height: auto; }
  .form label.hours-copy-day { min-height: 44px; }
  .hours-copy-panel { max-width: calc(100vw - 72px); }
  .record-summary > div { grid-template-columns: minmax(0, .85fr) minmax(0, 1.25fr); }
  .note-text, .note-meta, .record-visit, .data-table .cell-main, .data-table .cell-sub,
  .snippet, .eyebrow { overflow-wrap: anywhere; }
  .data-table td { min-width: 0; }
  .pagination { flex-wrap: wrap; }
  .pagination > .num { order: -1; width: 100%; text-align: center; }
  .pagination > .btn { flex: 1; }
  .pagination > span:empty { display: none; }

  /* Text-sized links and buttons get a taller tap area that moves nothing:
     an invisible box 12px above and below the text. */
  .phone-link, .auth-links a, .fine-print a, .ops .data-table td a, .eyebrow a,
  .form .check-link {
    position: relative;
  }
  .phone-link::after, .auth-links a::after, .fine-print a::after,
  .ops .data-table td a::after, .eyebrow a::after, .form .check-link::after {
    content: ""; position: absolute; inset: -12px -4px;
  }
  .data-table .row-actions { flex-wrap: wrap; }
  .site-footer-inner a { display: inline-block; padding-block: 11px; }
  .site-footer-inner nav { gap: 6px 18px; }

  /* Checkbox and radio rows: the whole label is the target, 44px tall. */
  .form .field:has(> input[type=checkbox]) > label,
  .pickup-when label { padding-block: 11px; }
  /* Check-in rows are top-aligned: move the box down with its label's text. */
  .checkin-page .form .field:has(> input[type=checkbox]) > input[type=checkbox] { margin-top: 12px; }
  .pickup-when label { min-height: 44px; }
  .danger-zone > summary, .wizard-more > summary, .ops-in-person > summary,
  .message-history > summary { padding-block: 10px; }
  .hours-remove { width: 44px; }
  .mobile-sort label { white-space: nowrap; }
  .mobile-sort select { flex: 1; min-width: 0; }
  .filter-tabs a { min-height: 40px; align-items: center; }

  /* Small labels stay readable at arm's length. */
  .badge { font-size: .75rem; }
  .snippet-label { font-size: .72rem; }
}

@media (max-width: 480px) {
  /* Cards keep more of a narrow screen for the fields. */
  .auth-page .main { padding: 24px 12px; }
  .auth-card { padding: 26px 18px; }
  .card { padding: 20px 16px; }

  /* The public page: the round icon goes so the address / number keep
     their room beside the button. */
  .contact-row { padding: 14px 16px; gap: 12px; }
  .contact-icon { display: none; }
  .contact-action { min-width: 0; padding-inline: 16px; }
  .hours-card { padding: 16px 14px 4px; }
  .garage-hero h1 { font-size: 1.8rem; }
}

/* The narrowest phones: the button under the address / number. */
@media (max-width: 340px) {
  .contact-row { flex-wrap: wrap; }
  .contact-action { width: 100%; }
}

/* Board / History / Stats / Settings plus Log out don't fit a 320–400px
   bar: Log out moves to the bottom of Settings (templates/board/
   garage_settings.html) and the four tabs share the bar evenly. */
@media (max-width: 420px) {
  .app-user { display: none; }
  .topbar-left { gap: 6px; }
  .app-nav { flex: 1; justify-content: space-between; }
  .app-nav { gap: 4px; }
  .app-nav a { min-width: 44px; padding: 0 7px; font-size: .78rem; }
}

/* Mobile review: keep feedback, controls and records in the visible flow. */
code { font-family: var(--font-mono); }
/* The one anchor offset: public-flows.js measures the sticky bar (0 while it's
   static). Don't add per-element scroll-margin-top on top — the two add up. */
html { scroll-padding-top: calc(var(--topbar-height, 68px) + 12px); }
.dpa-logout { margin-bottom: 20px; }
.mfa-recovery-codes { padding-left: 0; list-style: none; }
.mfa-recovery-codes code { font-size: .9rem; font-weight: 600; }
.auth-card code { color: var(--ink); font-weight: 600; }
.opt-out-actions { flex-direction: column; }
#dialog-title:focus { outline: none; }
.dialog-saved, .dialog-saved-row { padding-right: 56px; }
.dialog-saved-row .dialog-saved { padding-right: 0; }
.dialog-saved::before { flex-shrink: 0; }
.note-meta .cell-sub { display: block; margin-top: 4px; }
.page .notes-list { max-height: none; overflow: visible; }
.sms-meta { flex-wrap: wrap; }
.sms-error { flex-basis: 100%; color: var(--danger); }
.form .field:has(> input[type=checkbox]) { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 10px; }
.form .field:has(> input[type=checkbox]) > input { margin: 0; }
.form .field:has(> input[type=checkbox]) > label { grid-column: 2; }
.form .field:has(> input[type=checkbox]) > :is(.helptext, .errorlist) { grid-column: 2; margin-left: 0; }
.request-dismiss { min-height: 44px; padding: 0 8px; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
input[type=search]::-webkit-search-cancel-button { appearance: none; width: 20px; height: 20px; background: var(--ink); cursor: pointer; clip-path: polygon(20% 10%, 50% 40%, 80% 10%, 90% 20%, 60% 50%, 90% 80%, 80% 90%, 50% 60%, 20% 90%, 10% 80%, 40% 50%, 10% 20%); }
@media (max-width: 760px), (pointer: coarse) {
  .notes-list { max-height: none; overflow: visible; }
  .car-picker-field > .car-picker-options { position: static; box-shadow: none; overscroll-behavior: auto; }
  .mechanic-nav { flex-wrap: nowrap; }
  .mechanic-nav .btn { flex: 1 1 0; min-width: 0; }
  .dialog .form-actions > .btn { flex: 1 1 0; min-width: 0; }
  .dialog .form-actions > .btn-ghost { flex: 0 1 auto; }
  .form .hours-shift { flex-wrap: nowrap; gap: 6px; }
  .form .hours-shift select.time-select { width: 96px; min-width: 0; flex: 0 1 96px; padding-inline: 4px; }
  .hours-remove { flex: 0 0 44px; }
  .mobile-sort { padding-inline: 0; }
  .c-car .link-button { display: inline-flex; align-items: flex-start; line-height: inherit; }
  .checkin-qr-card { text-align: center; }
  .checkin-qr-card .form-actions { justify-content: center; }
  .contact-action { min-width: 96px; width: 96px; flex-shrink: 0; }
  .auth-card > .helptext { text-align: center; }
}
/* Width only: on a touch tablet the buttons stay beside the search box. */
@media (max-width: 760px) { .toolbar > .btn { width: 100%; } }
@media (max-width: 340px) { .contact-action { width: 100%; } }
@media (max-width: 900px) {
  .data-table tbody tr:has(.c-finished) { grid-template-areas: "plate status" "customer customer" "car finished" "time time" "actions actions"; }
  .data-table .c-time:has(+ .c-finished) { display: block; text-align: left; }
  .data-table .c-time:has(+ .c-finished)::before { content: "Checked in "; font-size: .78rem; color: var(--muted); }
  .data-table .c-finished { grid-area: finished; }
}
@media (max-height: 450px) and (pointer: coarse) {
  .dialog .dialog-head, .mechanic-nav { position: static; }
  dialog.dialog { scroll-padding-top: 56px; scroll-padding-bottom: 12px; }
}
