:root {
  color-scheme: light;
  --bg: #eef0f2;
  --surface: #ffffff;
  --surface-2: #f5f6f7;
  --surface-3: #e7e9ec;
  --text: #17191c;
  --muted: #626872;
  --line: #d6d9de;
  --line-strong: #b8bec7;
  --accent: #d83b26;
  --accent-hover: #b82c1b;
  --accent-soft: #fbe8e4;
  --on-accent: #ffffff;
  --danger: #b42318;
  --success: #1f7a46;
  --warning: #8a5a00;
  --warning-bg: #fff8e8;
  --focus: #1677d2;
  --header: #17191c;
  --header-text: #f7f7f5;
  --header-muted: #aeb3bb;
  --shadow: 0 1px 2px rgba(17, 24, 39, .08), 0 8px 24px rgba(17, 24, 39, .05);
  --radius: 7px;
  --radius-small: 4px;
  --page-background-image: url("../images/garage-light-desktop-v2.dae2c3f541f2.webp");
  --page-overlay: rgba(238, 240, 242, .9);
  --auth-overlay: linear-gradient(90deg, rgba(238, 240, 242, .94) 0%, rgba(238, 240, 242, .78) 45%, rgba(238, 240, 242, .28) 78%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1113;
    --surface: #171a1e;
    --surface-2: #1d2126;
    --surface-3: #272c32;
    --text: #f2f3f4;
    --muted: #a3a9b2;
    --line: #30363d;
    --line-strong: #49515c;
    --accent: #f0543e;
    --accent-hover: #ff6b55;
    --accent-soft: #39201d;
    --on-accent: #111315;
    --danger: #ff7065;
    --success: #67d391;
    --warning: #f1be5a;
    --warning-bg: #2b2416;
    --focus: #62aef3;
    --header: #0b0d0f;
    --header-text: #f5f5f3;
    --header-muted: #9ca3ad;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 30px rgba(0, 0, 0, .18);
    --page-background-image: url("../images/garage-dark-desktop-v2.51f6b6c14faf.webp");
    --page-overlay: rgba(15, 17, 19, .84);
    --auth-overlay: linear-gradient(90deg, rgba(8, 10, 12, .94) 0%, rgba(8, 10, 12, .76) 46%, rgba(8, 10, 12, .24) 80%);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1113;
  --surface: #171a1e;
  --surface-2: #1d2126;
  --surface-3: #272c32;
  --text: #f2f3f4;
  --muted: #a3a9b2;
  --line: #30363d;
  --line-strong: #49515c;
  --accent: #f0543e;
  --accent-hover: #ff6b55;
  --accent-soft: #39201d;
  --on-accent: #111315;
  --danger: #ff7065;
  --success: #67d391;
  --warning: #f1be5a;
  --warning-bg: #2b2416;
  --focus: #62aef3;
  --header: #0b0d0f;
  --header-text: #f5f5f3;
  --header-muted: #9ca3ad;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 30px rgba(0, 0, 0, .18);
  --page-background-image: url("../images/garage-dark-desktop-v2.51f6b6c14faf.webp");
  --page-overlay: rgba(15, 17, 19, .84);
  --auth-overlay: linear-gradient(90deg, rgba(8, 10, 12, .94) 0%, rgba(8, 10, 12, .76) 46%, rgba(8, 10, 12, .24) 80%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  background-color: var(--bg);
  background-image: var(--page-background-image);
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--page-overlay);
  pointer-events: none;
}
:root[data-theme="dark"] body::before {
  background: var(--page-overlay);
}
.auth-shell {
  background-color: #0b0d0f;
  background-image: var(--page-background-image);
  background-position: center;
  background-size: cover;
}
.auth-shell::before { background: var(--auth-overlay); }
.auth-shell .container { display: grid; align-items: center; }
.auth-shell .auth-card { width: min(450px, 100%); margin-right: auto; margin-left: 0; }
.auth-shell .register-card { width: min(560px, 100%); }
.auth-shell .login-layout { width: 100%; display: grid; grid-template-columns: minmax(340px, 430px) minmax(390px, 560px); align-items: center; justify-content: space-between; gap: clamp(30px, 6vw, 76px); }
.auth-shell .login-layout .auth-card { width: 100%; margin: 0; }
.auth-shell .footer { position: relative; background: rgba(8, 10, 12, .78); color: #a3a9b2; }
a { color: var(--accent); text-decoration: none; text-underline-offset: .2em; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { margin: 0; color: var(--text); font-weight: 720; line-height: 1.13; letter-spacing: -.025em; }
h1 { font-size: clamp(2rem, 5vw, 3.6rem); max-width: 18ch; }
h2 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
h3 { font-size: 1.1rem; }
p { margin: .8em 0; }
svg { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  transform: translateY(-150%);
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--focus);
  padding: 9px 12px;
}
.skip-link:focus { transform: translateY(0); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: clamp(22px, 4vw, 54px);
  padding: 0 clamp(16px, 4vw, 52px);
  background: var(--header);
  border-bottom: 1px solid #30343a;
}
.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; color: var(--header-text); font-size: .93rem; font-weight: 800; letter-spacing: .08em; }
.brand:hover { text-decoration: none; }
.brand-copy { display: flex; flex-direction: column; justify-content: center; line-height: 1.05; }
.brand-name { white-space: nowrap; }
.brand-site { margin-top: 4px; color: #00a0e4; font-size: .62rem; font-weight: 600; letter-spacing: .08em; text-transform: lowercase; }
.brand-accent { color: var(--accent); }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #3a4048; border-radius: var(--radius-small); background: #22262b; }
.brand-mark svg { width: 25px; fill: var(--header-text); }
.nav { min-width: 0; align-self: stretch; display: flex; flex: 1 1 auto; align-items: stretch; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { position: relative; display: flex; align-items: center; padding: 0 12px; color: var(--header-muted); font-size: .9rem; white-space: nowrap; }
.nav a:hover { color: var(--header-text); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--header-text); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; right: 12px; bottom: -1px; left: 12px; height: 3px; background: var(--accent); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.logout { margin: 0; }
.link-button, .theme-toggle, .menu-toggle { min-width: 42px; min-height: 42px; border: 1px solid #3a4048; border-radius: var(--radius-small); background: transparent; color: var(--header-muted); cursor: pointer; }
.link-button { padding: 7px 11px; font-size: .88rem; }
.link-button:hover, .theme-toggle:hover, .menu-toggle:hover { color: var(--header-text); border-color: #646c77; }
.theme-toggle { display: grid; place-items: center; padding: 0; }
.menu-toggle { display: none; place-items: center; align-content: center; gap: 4px; padding: 0; }
.menu-toggle span { width: 19px; height: 2px; background: currentColor; transition: transform .18s ease, opacity .18s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-logout { display: none; }
.theme-icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-icon-moon { display: block; }
}

.container { width: min(1160px, 100%); min-height: calc(100vh - 145px); margin: 0 auto; padding: clamp(36px, 6vw, 72px) 22px 80px; }
.hero { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 36px; margin-bottom: 42px; padding: 12px 0 26px 22px; border-left: 4px solid var(--accent); border-bottom: 1px solid var(--line); }
.hero .muted { max-width: 650px; font-size: 1.04rem; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.muted { color: var(--muted); }
.small-text { font-size: .88rem; }
.center { text-align: center; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-left: 3px solid var(--line-strong); margin-bottom: 48px; background: var(--surface); box-shadow: var(--shadow); }
.metric { min-width: 0; padding: 20px 22px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric span { display: block; color: var(--muted); font-size: .78rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.metric strong { display: block; margin-top: 8px; font-size: clamp(1.4rem, 3vw, 2rem); font-variant-numeric: tabular-nums; line-height: 1.1; white-space: nowrap; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 40px 0 16px; }
.section-head h1 { font-size: clamp(2rem, 4vw, 3rem); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.card > h2 { margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.car-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.car-card { position: relative; overflow: hidden; padding: 0; border-top: 3px solid var(--line-strong); transition: border-color .18s ease, box-shadow .18s ease; }
.car-card:hover { border-top-color: var(--accent); box-shadow: 0 12px 30px rgba(0, 0, 0, .13); }
.car-photo { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-3); color: var(--muted); border-bottom: 1px solid var(--line); }
.car-photo::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: var(--accent); opacity: 0; transition: opacity .18s ease; }
.car-card:hover .car-photo::after { opacity: 1; }
.car-photo img { width: 100%; height: 100%; object-fit: contain; }
.car-placeholder { display: grid; place-items: center; width: 74px; height: 74px; border: 1px solid var(--line-strong); color: var(--muted); font-size: 2rem; font-weight: 750; }
.card-body { padding: 22px; }
.card-body h3 a { color: var(--text); }
.card-body .muted { min-height: 1.5em; }
.empty { text-align: center; padding: 50px 24px; }
.empty h2, .empty h3 { margin-bottom: 10px; }
.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 34px; }
.two-columns + .card { margin-top: 22px; }

.list { display: flex; flex-direction: column; gap: 8px; }
.card-list { gap: 10px; }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 66px; padding: 14px 17px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: var(--radius-small); color: var(--text); transition: border-color .16s ease, background .16s ease; }
.list-item + .list-item { margin-top: 8px; }
.list-item:hover { background: var(--surface-2); border-left-color: var(--accent); text-decoration: none; }
.list-item span { display: block; margin-top: 3px; color: var(--muted); font-size: .9rem; }
.list-item .muted { margin-bottom: 0; }
.list-item.due { border-left-color: var(--warning); background: var(--warning-bg); }
.list-item-main { flex: 1 1 auto; min-width: 0; color: inherit; }
.list-item-main:hover { color: inherit; text-decoration: none; }
.work-list-item > .actions { flex: 0 0 auto; }
.planned-work-item { display: grid; grid-template-columns: minmax(0, 1fr) 230px; align-items: center; }
.planned-work-item.completed { border-left-color: #2e8b57; }
.planned-work-info { min-width: 0; }
.planned-work-heading { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plan-status { display: inline-flex !important; align-items: center; width: fit-content; margin: 0 !important; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .72rem !important; font-weight: 750; line-height: 1; }
.plan-status.pending { background: var(--surface-2); color: var(--text); }
.plan-status.completed { border-color: #2e8b57; background: rgba(46, 139, 87, .12); color: #2e8b57; }
.plan-completed-details { color: #2e8b57 !important; font-weight: 650; }
.actions.planned-work-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 230px; gap: 10px; flex-wrap: nowrap; }
.planned-work-actions .button { width: 100%; min-width: 0; padding-right: 8px; padding-left: 8px; white-space: nowrap; }
.planned-work-actions .calendar-action { grid-column: 1; }
.planned-work-actions .done-action { grid-column: 2; }
.planned-work-actions .delete-action { grid-column: 1 / -1; }
.planned-work-actions.no-calendar .done-action { grid-column: 1; }
.planned-work-actions.no-calendar .delete-action { grid-column: 2; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 17px; border: 1px solid var(--accent); border-radius: var(--radius-small); background: var(--accent); color: var(--on-accent); font-weight: 680; line-height: 1.1; cursor: pointer; transition: background .16s ease, border-color .16s ease; }
.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); text-decoration: none; }
.button.secondary { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.button.secondary:hover { background: var(--surface-2); border-color: var(--accent); color: var(--text); }
.button.ghost { background: transparent; border-color: var(--line-strong); color: var(--muted); }
.button.ghost:hover { border-color: var(--text); color: var(--text); }
.button.danger { background: var(--danger); border-color: var(--danger); color: var(--on-accent); }
.button.small { min-height: 38px; padding: 8px 12px; font-size: .86rem; }
.button.wide { width: 100%; }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.car-actions { display: flex; gap: 8px; margin-top: 18px; }
.car-actions .button { flex: 1; }

.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 36px; }
.quick-action { display: flex; align-items: center; gap: 16px; min-height: 76px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: var(--radius-small); color: var(--text); }
.quick-action:hover { border-left-color: var(--accent); background: var(--surface-2); text-decoration: none; }
.quick-action.primary { border-color: var(--accent); border-left-color: var(--accent-hover); background: var(--accent); color: var(--on-accent); }
.quick-action.primary:hover { background: var(--accent-hover); }
.quick-action-icon { flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--accent); font-size: 1.35rem; }
.quick-action.primary .quick-action-icon { border-color: rgba(255, 255, 255, .55); color: var(--on-accent); }
.quick-action-text { display: flex; flex-direction: column; gap: 2px; }
.quick-action-text strong { font-size: 1.03rem; }
.quick-action-text small { color: var(--muted); font-size: .86rem; }
.quick-action.primary .quick-action-text small { color: color-mix(in srgb, var(--on-accent) 78%, transparent); }

.narrow { max-width: 660px; margin-right: auto; margin-left: auto; }
.auth-card { max-width: 450px; margin: 24px auto; border-top: 3px solid var(--accent); }
.register-card { max-width: 560px; }
.registration-features { margin: 20px 0 24px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.registration-features li { position: relative; padding: 11px 0 11px 28px; border-bottom: 1px solid var(--line); }
.registration-features li::before { position: absolute; top: 11px; left: 1px; color: var(--accent); font-weight: 800; content: "✓"; }
.registration-features strong, .registration-features span { display: block; }
.registration-features strong { margin-bottom: 2px; }
.registration-features span { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.auth-features { border-top: 3px solid var(--line-strong); }
.auth-features h2 { max-width: none; font-size: clamp(1.45rem, 2.4vw, 2rem); }
.auth-features .registration-features { margin-bottom: 0; }
.auth-features .registration-features li { padding-top: 15px; padding-bottom: 15px; }
.auth-features .registration-features li::before { top: 15px; }
.auth-features .registration-features span { font-size: .94rem; }
.auth-card h1, .narrow.card h1 { max-width: none; margin-bottom: 22px; font-size: clamp(1.8rem, 4vw, 2.5rem); }
label { display: block; margin: 17px 0; color: var(--text); font-size: .9rem; font-weight: 650; }
label small { display: block; margin-top: 6px; color: var(--muted); font-weight: 400; }
.photo-field > small { display: block; margin-top: 7px; color: var(--muted); font-size: .82rem; font-weight: 400; }
.input, input[type="email"], input[type="password"], input[type="text"], input[type="number"], input[type="date"], input[type="file"], select, textarea { display: block; width: 100%; min-height: 45px; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-small); background: var(--surface-2); color: var(--text); }
input[type="file"] { padding: 7px; }
input[type="file"]::file-selector-button { min-height: 30px; margin-right: 10px; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--surface); color: var(--text); cursor: pointer; }
textarea { min-height: 112px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--text); }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: 3px solid var(--focus); outline-offset: 1px; }
.error { display: block; margin-top: 6px; color: var(--danger); font-size: .86rem; font-weight: 600; }
.error ul { margin: 0; padding-left: 18px; }
.form-stack .form-group { margin-bottom: 8px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-section { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-section-title { margin: 0 0 12px; font-size: 1.08rem; }
.form-details { margin: 12px 0 16px; border: 1px solid var(--line-strong); background: var(--surface-2); }
.form-details summary { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 13px; color: var(--text); cursor: pointer; list-style: none; }
.form-details-heading { min-height: 58px; display: flex; align-items: center; padding: 10px 13px; color: var(--text); border-bottom: 1px solid var(--line); background: var(--surface-3); }
.form-details summary::-webkit-details-marker { display: none; }
.form-details summary:hover { background: var(--surface-3); }
.form-details summary strong, .form-details-heading strong, .details-hint { display: block; }
.details-hint { margin-top: 3px; color: var(--muted); font-size: .76rem; font-weight: 500; }
.details-chevron { flex: 0 0 11px; width: 11px; height: 11px; margin-right: 4px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform .16s ease; }
.form-details .when-open { display: none; }
.form-details[open] summary { border-bottom: 1px solid var(--line); background: var(--surface-3); }
.form-details[open] .details-chevron { transform: rotate(225deg); }
.form-details[open] .when-closed { display: none; }
.form-details[open] .when-open { display: inline; }
.form-details > label, .form-details > .form-group { margin-right: 13px; margin-left: 13px; }
.form-details > :last-child { margin-bottom: 15px; }
.photos-block { padding-top: 4px; border-top: 1px solid var(--line); }
.form-action-bar { margin-top: 18px; }
.form-action-bar-with-delete { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.map-picker { margin: -6px 0 20px; padding: 16px; border: 1px solid var(--line); background: var(--surface-2); }
.map-picker-head strong { font-size: .95rem; }
.map-picker-head p { margin: 4px 0 12px; }
.map-search { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 8px; }
.map-search .input { margin: 0; }
.map-results { max-height: 210px; margin-bottom: 8px; overflow-y: auto; border: 1px solid var(--line-strong); background: var(--surface); }
.map-results button { display: block; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.map-results button:last-child { border-bottom: 0; }
.map-results button:hover { background: var(--surface-3); }
.service-center-map { width: 100%; height: 340px; overflow: hidden; border: 1px solid var(--line-strong); background: var(--surface-3); }
.map-picker [data-map-status] { margin-bottom: 0; }
.map-attribution { margin: 4px 0 0; font-size: .72rem; text-align: right; }

.photo-current, .photo-edit-result img { display: block; width: min(100%, 420px); aspect-ratio: 4 / 3; margin-top: 12px; border: 1px solid var(--line); background: #202328; object-fit: contain; }
.photo-edit-result { margin-top: 12px; }
.photo-edit-result img { margin: 0 0 10px; }
.photo-editor-dialog { width: min(820px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 0; overflow: auto; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: 0 24px 80px rgba(0, 0, 0, .55); }
.photo-editor-dialog::backdrop { background: rgba(3, 5, 7, .82); }
.photo-editor-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 22px 15px; border-bottom: 1px solid var(--line); background: var(--surface); }
.photo-editor-head h2 { font-size: 1.45rem; }
.photo-editor-head .eyebrow { margin-bottom: 4px; }
.photo-editor-close { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-small); background: transparent; color: var(--text); font-size: 1.7rem; line-height: 1; cursor: pointer; }
.photo-editor-help { margin: 16px 22px; font-size: .9rem; }
.photo-editor-stage { margin: 0 22px; overflow: hidden; border: 1px solid var(--line-strong); background: #202328; }
.photo-editor-stage canvas { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; touch-action: none; cursor: grab; }
.photo-editor-stage canvas.is-dragging { cursor: grabbing; }
.photo-editor-tools { display: flex; align-items: flex-end; gap: 18px; padding: 17px 22px 10px; }
.photo-editor-tools > label { flex: 1 1 280px; margin: 0; }
.photo-editor-tools input[type="range"] { width: 100%; margin-top: 9px; accent-color: var(--accent); }
.photo-editor-error { margin: 8px 22px; }
.photo-editor-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; border-top: 1px solid var(--line); background: var(--surface); }

.odometer { margin: 8px 0 0; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 1.25rem; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.odometer::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-radius: 50%; background: var(--accent); vertical-align: .12em; }
.odometer.large { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.filter { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 22px; }
.filter-select { flex: 1 1 320px; max-width: 360px; margin: 0; }
.filter-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.select-control { position: relative; display: block; }
.select-control::after { position: absolute; top: 50%; right: 16px; width: 9px; height: 9px; margin-top: -7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); pointer-events: none; content: ""; }
.select-control:focus-within::after { border-color: var(--focus); }
.filter-select select { max-width: none; min-height: 46px; margin: 0; padding: 10px 44px 10px 13px; appearance: none; -webkit-appearance: none; border-color: var(--line-strong); background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; }
.filter-select select::-ms-expand { display: none; }
.filter-select select option { background: var(--surface); color: var(--text); }
.details { display: grid; grid-template-columns: 140px 1fr; gap: 11px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; font-weight: 600; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--surface-3); }
.gallery figcaption { margin-top: 5px; color: var(--muted); font-size: .82rem; }
.comment { padding: 14px 0; border-top: 1px solid var(--line); }
.comment time { display: block; color: var(--muted); font-size: .8rem; }
.messages { margin-bottom: 22px; }
.message { padding: 13px 15px; border: 1px solid var(--line-strong); border-left: 4px solid var(--focus); border-radius: var(--radius-small); background: var(--surface); }
.message.error { border-left-color: var(--danger); color: var(--text); }
.message.success { border-left-color: #2e8b57; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 24px; color: var(--muted); }
.footer { padding: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; text-align: center; }
.footer span { color: var(--text); font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.footer-credit { margin-top: 5px; }
.footer-credit a { color: var(--muted); font-weight: 650; }
.mobile-quick-nav { display: none; }

.data-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.data-chip { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-small); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.data-chip:hover { border-color: var(--accent); background: var(--surface-2); text-decoration: none; }
.chip-label { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.chip-value { font-size: .9rem; font-weight: 680; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.copy-btn.copied { border-color: var(--success); box-shadow: 0 0 0 2px rgba(31, 122, 70, .22); }
.copy-btn.copied .chip-value { color: var(--success); }
.chip-hint { margin-top: 6px; }
.copy-notification { position: fixed; top: 78px; right: 18px; z-index: 70; max-width: min(320px, calc(100vw - 32px)); padding: 12px 15px; border: 1px solid var(--success); border-left: 4px solid var(--success); border-radius: var(--radius-small); background: var(--surface); color: var(--text); font-weight: 680; box-shadow: var(--shadow); opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .16s ease, transform .16s ease; }
.copy-notification.is-visible { opacity: 1; transform: translateY(0); }
.copy-notification.is-error { border-color: var(--danger); }

.car-detail-hero.has-photo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 410px); align-items: center; }
.car-detail-info .actions { margin-top: 20px; }
.car-detail-photo { width: 100%; margin: 0; border: 1px solid var(--line-strong); background: var(--surface-3); }
.car-detail-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

@media (max-width: 900px) {
  .topbar { gap: 18px; padding: 0 16px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .car-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-columns { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .auth-shell .login-layout { grid-template-columns: minmax(300px, 390px) minmax(330px, 1fr); gap: 24px; }
  .car-detail-hero.has-photo { grid-template-columns: 1fr; }
  .car-detail-photo { width: min(100%, 560px); }
}

@media (max-width: 760px) {
  .auth-shell .login-layout { width: min(560px, 100%); grid-template-columns: 1fr; justify-self: center; }
  .auth-shell .login-layout .auth-card { width: min(450px, 100%); justify-self: center; }
  .auth-features { width: 100%; }
}

@media (max-width: 720px) {
  :root { --page-background-image: url("../images/garage-light-mobile-v2.0b1f7bab7b61.webp"); }
  :root[data-theme="dark"] { --page-background-image: url("../images/garage-dark-mobile-v2.db494886f29a.webp"); }
  body { padding-bottom: calc(65px + env(safe-area-inset-bottom, 0px)); }
  body { background-position: center top; background-size: auto 100vh; }
  .topbar { min-height: 56px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand { gap: 8px; font-size: .84rem; }
  .brand-site { margin-top: 3px; font-size: .58rem; }
  .nav { margin-right: -2px; }
  .nav a { padding: 0 9px; font-size: .84rem; }
  .nav a[aria-current="page"]::after { right: 9px; left: 9px; }
  .logout { display: none; }
  .container { padding: 34px 16px 56px; }
  .hero { align-items: flex-start; flex-direction: column; padding-left: 16px; }
  .mobile-quick-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 40; display: grid; grid-template-columns: 1fr 1fr; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line-strong); background: var(--surface); }
  .mobile-quick-link { min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); color: var(--text); font-size: .9rem; font-weight: 680; }
  .mobile-quick-link:hover { text-decoration: none; }
  .mobile-quick-link.primary { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
  .form-action-bar { position: sticky; bottom: 0; z-index: 15; margin: 18px -28px -28px; padding: 12px 28px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--surface); }
  .button, .button.small { min-height: 44px; }
  .copy-notification { top: 68px; right: 16px; left: 16px; max-width: none; }
  .auth-shell { background-position: 62% center; }
  .auth-shell::before { background: var(--page-overlay); }
  .auth-shell .auth-card { margin-right: auto; margin-left: auto; }
}

@media (max-width: 720px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --page-background-image: url("../images/garage-dark-mobile-v2.db494886f29a.webp"); }
}

@media (max-width: 540px) {
  .topbar { flex-wrap: nowrap; height: 58px; min-height: 58px; padding-top: 0; padding-bottom: 0; }
  .brand, .topbar-actions { align-self: center; }
  .topbar-actions { gap: 7px; }
  .nav { position: absolute; top: calc(100% + 1px); right: 8px; left: 8px; display: none; height: auto; margin: 0; padding: 7px; overflow: visible; flex-direction: column; align-items: stretch; border: 1px solid #343a42; background: var(--header); box-shadow: 0 18px 42px rgba(0, 0, 0, .38); }
  .nav.is-open { display: flex; }
  .nav a { min-height: 46px; padding: 11px 13px; border-bottom: 1px solid #292e34; font-size: .95rem; }
  .nav a[aria-current="page"] { padding-left: 10px; border-left: 3px solid var(--accent); background: #202328; }
  .nav a[aria-current="page"]::after { display: none; }
  .nav-logout { display: block; margin: 0; }
  .nav-logout button { width: 100%; min-height: 46px; padding: 11px 13px; border: 0; background: transparent; color: var(--header-muted); text-align: left; cursor: pointer; }
  .nav-logout button:hover { color: var(--header-text); background: #202328; }
  .theme-toggle, .menu-toggle { min-height: 40px; min-width: 40px; }
  .menu-toggle { display: grid; }
  .container { padding-top: 28px; }
  h1 { font-size: 2rem; }
  .metrics, .car-grid, .quick-actions, .gallery { grid-template-columns: 1fr; }
  .metric { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric:nth-child(3) { border-bottom: 1px solid var(--line); }
  .metric:last-child { border-bottom: 0; }
  .card { padding: 21px; }
  .car-card { padding: 0; }
  .list-item { align-items: flex-start; flex-direction: column; }
  .list-item .actions { width: 100%; }
  .planned-work-item { grid-template-columns: 1fr; gap: 12px; }
  .planned-work-actions { width: 100%; }
  .filter { flex-direction: column; }
  .filter-select { width: 100%; max-width: none; flex-basis: auto; }
  .filter .button { width: 100%; }
  .details { grid-template-columns: 1fr; gap: 2px; }
  .details dd + dt { margin-top: 10px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .map-search { grid-template-columns: 1fr; }
  .service-center-map { height: 300px; }
  .form-action-bar { margin-right: -21px; margin-left: -21px; padding-right: 21px; padding-left: 21px; }
  .section-head { align-items: flex-start; }
  .section-head .button { flex: 0 0 auto; }
  .photo-editor-dialog { width: 100vw; max-width: none; max-height: 100vh; height: 100vh; border: 0; border-radius: 0; }
  .photo-editor-head { padding: 14px 16px 12px; }
  .photo-editor-help { margin: 12px 16px; }
  .photo-editor-stage { margin: 0 12px; }
  .photo-editor-tools { align-items: stretch; flex-direction: column; gap: 12px; padding: 14px 16px 8px; }
  .photo-editor-tools > label { flex-basis: auto; }
  .photo-editor-tools .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .photo-editor-actions { padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); }
  .photo-editor-actions .button { flex: 1; }
}

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