:root {
    --page: #eef2f6;
    --surface: #ffffff;
    --surface-2: #f7f9fb;
    --ink: #111827;
    --muted: #607086;
    --line: #d9e1ea;
    --line-strong: #c6d1df;
    --brand: #0f3d2e;
    --brand-2: #17614a;
    --accent: #2563eb;
    --accent-2: #1d4ed8;
    --success: #168a56;
    --danger: #d63b3b;
    --warning: #d98f08;
    --shadow: 0 16px 36px rgba(15, 23, 42, 0.09);
    --shadow-soft: 0 8px 22px rgba(15, 23, 42, 0.07);
}

@font-face {
    font-family: "CleaningBayPlate";
    src:
        url("/assets/fonts/uk-number-plate.woff2") format("woff2"),
        url("/assets/fonts/uk-number-plate.otf") format("opentype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    background: var(--page);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #f7fafc 0%, var(--page) 34rem);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    max-width: none;
    margin: 0 auto;
    padding: 20px 18px 14px;
}

.topbar h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: normal;
}

.topbar p {
    margin: 8px 0 0;
    color: var(--muted);
    font-weight: 650;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 12px 16px;
    border: 1px solid rgba(15, 61, 46, 0.14);
    border-radius: 8px;
    color: #0b1726;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow-soft);
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.brand span {
    color: var(--brand);
}

.site-logo {
    display: block;
    width: auto;
    max-width: 460px;
    max-height: 94px;
    object-fit: contain;
}

.garage-logo {
    display: block;
    width: auto;
    max-width: 260px;
    max-height: 78px;
    padding: 10px 14px;
    border: 1px solid rgba(15, 61, 46, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-soft);
    object-fit: contain;
}

.mobile-nav-bar {
    display: none;
    align-items: stretch;
    max-width: none;
    margin: 0 auto 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: #0f172a;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.mobile-nav-current {
    display: flex;
    align-items: center;
    min-height: 72px;
    padding: 0 32px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
    font-size: 20px;
    font-weight: 800;
}

.mobile-home-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 72px;
    padding: 0 24px;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 18px;
    font-weight: 850;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.08);
}

.mobile-home-link:hover {
    background: rgba(255, 255, 255, 0.14);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 90px;
    min-height: 72px;
    margin-left: auto;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 30px;
    height: 4px;
    border-radius: 999px;
    background: #ffffff;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: none;
    margin: 0 auto 16px;
    padding: 8px;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.main-nav a {
    min-width: max-content;
    padding: 10px 14px;
    border-radius: 8px;
    color: #dbe6f4;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.main-nav a.active,
.main-nav a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
}

.main-nav a:last-child {
    margin-left: auto;
    color: #ffd7d7;
}

.context-bar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
}

.context-card {
    display: grid;
    gap: 4px;
}

.context-card strong {
    font-size: 18px;
    font-weight: 850;
}

.context-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.context-switcher {
    display: flex;
    align-items: end;
    gap: 10px;
}

.context-switcher label {
    min-width: 260px;
}

.context-switcher button {
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    color: #ffffff;
    background: var(--accent);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

main {
    max-width: none;
    margin: 0 auto;
    padding: 0 8px 32px;
}

.flash,
.welcome {
    margin: 0 0 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
}

.flash {
    padding: 14px 16px;
    font-weight: 750;
}

.flash.success {
    border-color: rgba(22, 138, 86, 0.32);
    color: #0b5b37;
    background: #e7f7ef;
}

.flash.error {
    border-color: rgba(214, 59, 59, 0.32);
    color: #9d2222;
    background: #ffebeb;
}

.flash.warning {
    border-color: rgba(217, 143, 8, 0.34);
    color: #6b4300;
    background: #fff7df;
}

.global-home-alert {
    display: grid;
    gap: 6px;
    margin: 0 0 18px;
    padding: 16px 18px;
    border: 1px solid rgba(220, 38, 38, 0.24);
    border-left: 6px solid #dc2626;
    border-radius: 8px;
    color: #7f1d1d;
    background: #fef2f2;
    box-shadow: var(--shadow-soft);
}

.global-home-alert strong {
    color: #991b1b;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.global-home-alert span {
    color: #111827;
    font-size: 18px;
    font-weight: 850;
    white-space: pre-wrap;
}

.welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
}

.welcome strong {
    display: block;
    color: var(--brand);
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
}

.welcome span {
    color: var(--ink);
    font-size: 20px;
    font-weight: 800;
    text-align: right;
}

.welcome-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.welcome-action {
    flex: 0 0 auto;
    border-radius: 8px;
    padding: 11px 14px;
    color: #ffffff;
    background: var(--accent);
    font-weight: 850;
    text-decoration: none;
}

.welcome-action:hover {
    background: var(--accent-2);
}

.home-vehicle-search,
.vehicle-search-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    align-items: end;
    gap: 8px;
}

.home-vehicle-search {
    flex: 1 1 360px;
    max-width: 520px;
}

.home-vehicle-search label,
.vehicle-search-form label {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.home-vehicle-search input,
.vehicle-search-form input {
    min-height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 9px 11px;
    color: var(--ink);
    background: #ffffff;
    font: inherit;
    font-weight: 800;
    text-transform: uppercase;
}

.home-vehicle-search button,
.vehicle-search-form button {
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    padding: 9px 13px;
    color: #ffffff;
    background: var(--brand);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.home-vehicle-search button:hover,
.vehicle-search-form button:hover {
    background: var(--accent-2);
}

.home-recall-alert {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(220, 38, 38, 0.35);
    border-radius: 8px;
    padding: 9px 12px;
    color: #991b1b;
    background: #fee2e2;
    font-weight: 900;
    text-decoration: none;
}

.home-recall-alert strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    border-radius: 8px;
    color: #ffffff;
    background: #dc2626;
    font-size: 16px;
}

.home-recall-alert span {
    color: #991b1b;
    font-size: 14px;
    text-align: left;
}

.home-recall-alert:hover {
    border-color: rgba(185, 28, 28, 0.55);
    background: #fecaca;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(520px, 0.82fr);
    gap: 14px;
}

.dashboard-grid > *,
.stack {
    min-width: 0;
}

.dashboard-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    align-items: start;
}

.dashboard-board-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 320px;
    padding: 14px;
}

.dashboard-group-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.dashboard-group-header h2 {
    margin-bottom: 6px;
    font-size: 18px;
    line-height: 1.1;
}

.dashboard-group-header h2 a {
    color: inherit;
    text-decoration: none;
}

.dashboard-group-header h2 a:hover {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.dashboard-group-header span {
    flex: 0 0 auto;
    border: 1px solid rgba(23, 97, 74, 0.2);
    border-radius: 8px;
    padding: 6px 9px;
    color: var(--brand);
    background: #dcfce7;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.dashboard-day-heading {
    margin-top: 6px;
}

.dashboard-card-list {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
}

.dashboard-job-card {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.dashboard-job-card.done {
    opacity: 0.58;
}

.dashboard-job-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.dashboard-job-card .reg-plate {
    flex: 0 0 auto;
    width: 112px;
    max-width: 100%;
    padding: 6px 8px 5px;
    border: 2px solid #111827;
    border-radius: 4px;
    color: #111827;
    background: #ffd53d;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.45),
        0 3px 7px rgba(15, 23, 42, 0.12);
    font-family: "CleaningBayPlate", "Mandatory", "UKNumberPlate", Impact, "Arial Narrow", Arial, sans-serif;
    font-size: 15px;
    font-stretch: condensed;
    font-weight: 700;
    letter-spacing: 0.35px;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
}

.dashboard-job-card .reg-plate:hover {
    color: #111827;
    border-color: #000000;
    background: #ffe166;
}

.dashboard-job-card .reg-plate.vin-plate,
.vehicle-row .reg-plate.vin-plate {
    background: #e5e7eb;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: normal;
}

.dashboard-vehicle-title {
    color: var(--ink);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.18;
    overflow-wrap: anywhere;
    text-decoration: none;
    text-transform: uppercase;
}

.dashboard-vehicle-title:hover {
    color: var(--brand-2);
}

.dashboard-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.dashboard-chip,
.dashboard-tags span,
.dashboard-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 4px 8px;
    color: #334155;
    background: var(--surface-2);
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
    text-decoration: none;
}

.dashboard-tags a {
    color: var(--accent);
    background: #eff6ff;
}

.dashboard-tags a.dashboard-recall-button {
    border-color: #fecaca;
    color: #ffffff;
    background: #dc2626;
}

.dashboard-tags a.dashboard-recall-button:hover {
    background: #b91c1c;
}

.dashboard-tags .dashboard-demo-cleaned-tag {
    border-color: rgba(14, 116, 144, 0.18);
    color: #155e75;
    background: #cffafe;
}

.dashboard-tags .dashboard-test-drive-tag {
    border-color: rgba(180, 83, 9, 0.18);
    color: #92400e;
    background: #fef3c7;
}

.dashboard-job-note {
    margin: 0;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 6px 8px;
    color: #6b4300;
    background: #fff7df;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.admin-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding: 24px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(15, 61, 46, 0.94), rgba(15, 23, 42, 0.94)),
        var(--brand);
    box-shadow: var(--shadow);
    color: #ffffff;
}

.admin-hero h2 {
    margin: 5px 0 6px;
    font-size: 28px;
    line-height: 1.1;
}

.admin-hero p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 650;
}

.eyebrow {
    color: #b9f3da;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.hero-action {
    flex: 0 0 auto;
    border: 0;
    border-radius: 8px;
    padding: 12px 16px;
    color: #0f172a;
    background: #ffffff;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    font: inherit;
}

.stat-grid,
.admin-link-grid,
.settings-link-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-link-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.settings-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-card,
.admin-link-card {
    border: 1px solid rgba(198, 209, 223, 0.88);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.stat-card {
    display: grid;
    gap: 12px;
    min-height: 150px;
    padding: 20px;
    overflow: hidden;
    position: relative;
}

.stat-card::after {
    position: absolute;
    right: -28px;
    bottom: -28px;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: rgba(15, 61, 46, 0.08);
    content: "";
}

.stat-card[data-tone="blue"]::after {
    background: rgba(37, 99, 235, 0.1);
}

.stat-card[data-tone="orange"]::after {
    background: rgba(217, 143, 8, 0.13);
}

.stat-card[data-tone="slate"]::after {
    background: rgba(15, 23, 42, 0.1);
}

.stat-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.stat-card-top b,
.admin-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 900;
}

.stat-card-top b {
    width: 38px;
    height: 38px;
    color: #ffffff;
    background: var(--brand);
}

.stat-card[data-tone="blue"] .stat-card-top b {
    background: var(--accent);
}

.stat-card[data-tone="orange"] .stat-card-top b {
    background: var(--warning);
}

.stat-card[data-tone="slate"] .stat-card-top b {
    background: #334155;
}

.stat-card-top span,
.stat-card small {
    color: var(--muted);
    font-weight: 800;
}

.stat-card-top span {
    font-size: 13px;
    text-transform: uppercase;
}

.stat-card strong {
    font-size: 42px;
    line-height: 1;
}

.admin-link-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    color: var(--ink);
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.admin-link-card:hover {
    border-color: rgba(37, 99, 235, 0.4);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

.system-settings-panel {
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(0, 2fr);
    align-items: end;
    gap: 18px;
    margin-bottom: 18px;
}

.system-settings-panel h2 {
    margin-bottom: 8px;
}

.system-settings-panel .muted {
    margin: 0;
}

.system-settings-form {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 12px;
}

.system-settings-group {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.9);
}

.system-settings-group h3 {
    margin: 0;
    color: var(--green);
    font-size: 17px;
}

.system-settings-inline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.system-settings-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
}

.system-settings-form label span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
}

.system-settings-form input {
    width: 86px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 10px;
    color: var(--ink);
    font: inherit;
    font-weight: 850;
}

.system-settings-form textarea {
    min-height: 96px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 12px;
    color: var(--ink);
    background: #ffffff;
    font: inherit;
    font-weight: 750;
    resize: vertical;
}

.system-settings-form .system-toggle-row {
    display: flex;
    align-items: center;
    min-height: 43px;
    gap: 10px;
    color: var(--ink);
}

.system-settings-form .system-toggle-row input {
    width: 18px;
    height: 18px;
    padding: 0;
}

.system-settings-form button {
    justify-self: end;
    border: 0;
    border-radius: 8px;
    padding: 11px 14px;
    color: #ffffff;
    background: var(--accent);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.system-settings-form button:hover {
    background: var(--accent-2);
}

.admin-link-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 20px;
}

.admin-card-icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    font-size: 13px;
}

.admin-link-card span,
.admin-back {
    color: var(--muted);
    font-weight: 750;
}

.admin-link-card .admin-card-icon {
    color: #ffffff;
}

.admin-back {
    display: inline-flex;
    margin-bottom: 14px;
    text-decoration: none;
}

.admin-back:hover {
    color: var(--accent);
}

.audit-log-list {
    display: grid;
    gap: 10px;
}

.audit-event {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.audit-event-main {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.audit-event-main strong {
    font-size: 16px;
}

.audit-type {
    width: fit-content;
    border-radius: 8px;
    padding: 4px 8px;
    color: #0b5b37;
    background: #e7f7ef;
    font-size: 12px;
    font-weight: 900;
}

.audit-meta,
.audit-event time {
    color: var(--muted);
    font-size: 14px;
    font-weight: 750;
}

.audit-event time {
    flex: 0 0 auto;
    text-align: right;
}

.tool-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.tool-search button {
    border: 0;
    border-radius: 8px;
    padding: 11px 16px;
    color: #ffffff;
    background: var(--accent);
    font: inherit;
    font-weight: 850;
    cursor: pointer;
}

.tool-search button:disabled {
    cursor: wait;
    opacity: 0.78;
}

.mot-stats-hero {
    align-items: stretch;
}

.mot-stats-total-card {
    display: grid;
    min-width: 220px;
    align-content: center;
    gap: 8px;
    padding: 18px 22px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 8px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), #1d4ed8);
    box-shadow: var(--shadow-soft);
}

.mot-stats-total-card span {
    font-size: 13px;
    font-weight: 900;
    opacity: 0.86;
    text-transform: uppercase;
}

.mot-stats-total-card strong {
    font-size: 54px;
    line-height: 1;
}

.mot-stats-panel {
    display: grid;
    gap: 20px;
}

.mot-stats-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.mot-stats-heading h2 {
    margin: 0;
}

.mot-stats-heading span {
    color: var(--muted);
    font-weight: 850;
}

.mot-chart {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
    gap: 12px;
    min-height: 360px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.mot-chart-month {
    display: grid;
    grid-template-rows: minmax(240px, 1fr) auto;
    gap: 10px;
    min-width: 0;
}

.mot-chart-bar-wrap {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 240px;
}

.mot-chart-value {
    position: absolute;
    top: -4px;
    z-index: 1;
    border-radius: 999px;
    padding: 4px 9px;
    color: var(--green);
    background: #e7f7ef;
    font-size: 14px;
    font-weight: 950;
}

.mot-chart-bar {
    width: 100%;
    max-width: 58px;
    min-height: 10px;
    border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, #34d399, var(--green));
    box-shadow: 0 12px 22px rgba(20, 83, 45, 0.18);
}

.mot-chart-month strong {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
}

.lookup-loader {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(5px);
}

.lookup-loader.is-visible {
    display: flex;
}

.lookup-loader-card {
    display: grid;
    gap: 14px;
    width: min(420px, 100%);
    padding: 24px;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
    text-align: center;
}

.lookup-loader-card strong {
    color: var(--ink);
    font-size: 22px;
}

.lookup-loader-card > span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 750;
}

.lookup-road {
    position: relative;
    height: 72px;
    overflow: hidden;
    border-radius: 8px;
    background:
        linear-gradient(180deg, #eff6ff, #ffffff 58%, #e2e8f0 58%, #e2e8f0 63%, #ffffff 63%),
        #ffffff;
}

.lookup-road::before {
    content: "";
    position: absolute;
    right: -80px;
    bottom: 25px;
    width: 180%;
    height: 4px;
    background: repeating-linear-gradient(90deg, var(--accent) 0 26px, transparent 26px 44px);
    opacity: 0.28;
    animation: lookup-road-lines 0.9s linear infinite;
}

.lookup-car {
    position: absolute;
    left: 50%;
    bottom: 20px;
    width: 112px;
    height: 38px;
    transform: translateX(-50%);
    animation: lookup-car-bob 0.7s ease-in-out infinite alternate;
}

.lookup-car-body {
    position: absolute;
    inset: 12px 4px 5px;
    border-radius: 8px 8px 6px 6px;
    background: var(--accent);
    box-shadow: inset 0 -7px 0 rgba(15, 23, 42, 0.14);
}

.lookup-car-window {
    position: absolute;
    left: 31px;
    top: 3px;
    width: 48px;
    height: 20px;
    border-radius: 16px 16px 3px 3px;
    background: #dbeafe;
    border: 5px solid var(--accent);
}

.lookup-wheel {
    position: absolute;
    bottom: 0;
    width: 17px;
    height: 17px;
    border-radius: 999px;
    background: #0f172a;
    box-shadow: inset 0 0 0 4px #94a3b8;
    animation: lookup-wheel-spin 0.42s linear infinite;
}

.lookup-wheel.one {
    left: 21px;
}

.lookup-wheel.two {
    right: 21px;
}

@keyframes lookup-road-lines {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(44px);
    }
}

@keyframes lookup-car-bob {
    from {
        transform: translate(-50%, 0);
    }

    to {
        transform: translate(-50%, -4px);
    }
}

@keyframes lookup-wheel-spin {
    to {
        transform: rotate(360deg);
    }
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.detail-card {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.detail-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.vehicle-lookup-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
    gap: 24px;
    align-items: start;
}

.vehicle-lookup-image {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.vehicle-lookup-image img {
    display: block;
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 8px;
    background: #ffffff;
}

.vehicle-lookup-image figcaption {
    font-size: 13px;
    font-weight: 900;
}

@media (max-width: 900px) {
    .vehicle-lookup-result {
        grid-template-columns: 1fr;
    }
}

.detail-card strong {
    color: var(--ink);
    font-size: 16px;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.muted-copy {
    margin: 0 0 16px;
    color: var(--muted);
    font-weight: 750;
    line-height: 1.45;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.table-wrap th,
.table-wrap td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.table-wrap th {
    color: var(--muted);
    background: var(--surface-2);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.table-wrap tr:last-child td {
    border-bottom: 0;
}

.recall-warning {
    display: grid;
    gap: 4px;
    margin-bottom: 18px;
    padding: 16px 18px;
    border: 1px solid #f59e0b;
    border-left: 7px solid #f97316;
    border-radius: 8px;
    color: #7c2d12;
    background: #fff7ed;
    box-shadow: var(--shadow);
}

.recall-warning strong {
    color: #9a3412;
    font-size: 20px;
}

.recall-warning-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.recall-warning-actions form {
    margin: 0;
}

.recall-warning-actions button {
    border: 0;
    cursor: pointer;
}

.recall-warning-actions .secondary-action {
    color: #7c2d12;
    background: #fed7aa;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 900;
}

.status-pill.warning {
    color: #7c2d12;
    background: #ffedd5;
}

.status-pill.success {
    color: #064e3b;
    background: #d1fae5;
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    border-radius: 8px;
    color: #ffffff;
    background: var(--accent);
    font-weight: 900;
    text-decoration: none;
}

.button-link.small {
    padding: 7px 10px;
    font-size: 12px;
}

.recall-action-open {
    border: 0;
    cursor: pointer;
}

.recall-action-dialog {
    width: min(430px, calc(100vw - 32px));
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0;
    color: var(--ink);
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
}

.recall-action-dialog::backdrop {
    background: rgba(15, 23, 42, 0.46);
}

.recall-action-form {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.recall-action-dialog-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.recall-action-dialog-heading div {
    display: grid;
    gap: 3px;
}

.recall-action-dialog-heading strong {
    color: var(--ink);
    font-size: 18px;
    font-weight: 900;
}

.recall-action-dialog-heading span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.recall-action-dialog-heading button {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: var(--surface-2);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.recall-close-hint {
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--surface-2);
}

.recall-action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.recall-action-buttons button,
.secondary-button {
    width: fit-content;
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    color: #ffffff;
    background: var(--accent);
    font-weight: 900;
    cursor: pointer;
}

.recall-action-buttons .secondary-button {
    color: var(--ink);
    background: var(--surface-2);
    border: 1px solid var(--line);
}

.recall-action-list {
    display: grid;
    gap: 10px;
}

.recall-action-event {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.recall-action-event div {
    display: grid;
    gap: 3px;
}

.recall-action-event strong {
    color: var(--ink);
    font-size: 14px;
    font-weight: 900;
}

.recall-action-event span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.recall-action-event p {
    margin: 4px 0 0;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.recall-vehicle-list {
    display: grid;
    gap: 12px;
}

.recall-vehicle-card {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(260px, 340px) minmax(145px, auto);
    align-items: center;
    gap: 24px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    background: var(--surface);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.recall-vehicle-card:hover {
    border-color: rgba(249, 115, 22, 0.45);
    transform: translateY(-1px);
}

.recall-vehicle-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.recall-vehicle-main > div {
    min-width: 0;
}

.recall-vehicle-main .reg-plate {
    flex: 0 0 auto;
    width: 128px;
    max-width: 100%;
    padding: 7px 9px 6px;
    border: 2px solid #111827;
    border-radius: 4px;
    color: #111827;
    background: #ffd53d;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.45),
        0 3px 7px rgba(15, 23, 42, 0.12);
    font-family: "CleaningBayPlate", "Mandatory", "UKNumberPlate", Impact, "Arial Narrow", Arial, sans-serif;
    font-size: 16px;
    font-stretch: condensed;
    font-weight: 700;
    letter-spacing: 0.35px;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
}

.recall-vehicle-main > div,
.recall-vehicle-action,
.recall-vehicle-meta {
    display: grid;
    gap: 4px;
}

.recall-vehicle-main strong {
    color: var(--ink);
    font-size: 18px;
}

.recall-vehicle-main span:not(.reg-plate),
.recall-vehicle-action span,
.recall-vehicle-action small,
.recall-vehicle-meta span:not(.status-pill),
.recall-pdf-name {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.recall-vehicle-action {
    min-width: 0;
    padding-left: 18px;
    border-left: 1px solid var(--line);
}

.recall-vehicle-action span {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.04em;
}

.recall-vehicle-action strong {
    color: var(--ink);
    font-size: 15px;
    font-weight: 900;
}

.recall-vehicle-action small {
    display: block;
}

.recall-vehicle-action .recall-booked-date {
    width: fit-content;
    margin-top: 2px;
    border-radius: 999px;
    padding: 4px 8px;
    color: #064e3b;
    background: #d1fae5;
}

.recall-vehicle-meta {
    justify-items: end;
    min-width: 0;
    text-align: right;
}

.recall-summary-table td {
    vertical-align: middle;
}

.recall-summary-table tbody tr:nth-child(odd) {
    background: #ffffff;
}

.recall-summary-table tbody tr:nth-child(even) {
    background: #f6fafc;
}

.recall-summary-table tbody tr:hover {
    background: #eef7f4;
}

.recall-summary-table td strong,
.recall-summary-table td span {
    display: block;
}

.recall-summary-table td span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.recall-summary-vehicle-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.recall-summary-vehicle-link strong {
    color: var(--primary);
}

.recall-summary-vehicle-link:hover strong {
    text-decoration: underline;
}

.recall-history-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 18px;
    padding: 16px 18px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    color: #064e3b;
    background: #ecfdf5;
}

.recall-history-banner strong,
.recall-history-banner span {
    display: block;
}

.recall-history-banner span {
    color: #166534;
    font-weight: 800;
}

.mot-history-list {
    display: grid;
    gap: 14px;
}

.mot-test-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.mot-test-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mot-test-heading strong {
    font-size: 20px;
}

.mot-test-heading span {
    border-radius: 8px;
    padding: 6px 10px;
    color: #0b5b37;
    background: #e7f7ef;
    font-weight: 900;
}

.defect-list {
    display: grid;
    gap: 8px;
}

.defect-list h3 {
    margin: 0;
    font-size: 16px;
}

.defect-item {
    display: grid;
    gap: 3px;
    padding: 10px;
    border-left: 3px solid var(--warning);
    border-radius: 8px;
    background: #fff8e7;
}

.defect-item strong {
    color: #5b3a04;
}

.stack {
    display: grid;
    gap: 18px;
}

.panel,
.form-shell,
.login-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.panel {
    padding: 16px;
}

.panel.narrow,
.login-card,
.form-shell {
    max-width: 900px;
    margin: 0 auto;
}

.panel h2,
.form-shell h2,
.login-card h2 {
    margin: 0 0 14px;
    color: var(--ink);
    font-size: 19px;
    font-weight: 850;
}

.panel h2::after,
.form-shell h2::after,
.login-card h2::after {
    display: block;
    width: 42px;
    height: 3px;
    margin-top: 8px;
    border-radius: 8px;
    background: var(--brand-2);
    content: "";
}

.day-heading {
    display: inline-flex;
    align-items: center;
    margin: 8px 0 8px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--brand);
    background: #edf7f3;
    font-size: 13px;
    font-weight: 800;
}

.vehicle-table {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
}

.vehicle-row {
    display: grid;
    grid-template-columns: 110px minmax(96px, 0.9fr) minmax(150px, 1.5fr) minmax(64px, 0.5fr) minmax(60px, 0.4fr) auto auto auto;
    align-items: center;
    gap: 9px;
    min-width: 0;
    min-height: 50px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    font-size: 14px;
    font-weight: 750;
}

.vehicle-row > span {
    min-width: 0;
    line-height: 1.25;
    overflow-wrap: normal;
    word-break: normal;
}

.vehicle-row.done {
    opacity: 0.58;
}

.vehicle-row a {
    color: var(--accent);
    font-weight: 850;
    text-decoration: none;
}

.vehicle-row a:hover {
    color: var(--accent-2);
}

.list-recall-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
    width: fit-content;
    border-radius: 999px;
    padding: 5px 8px;
    color: #ffffff !important;
    background: #dc2626;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.list-recall-button:hover {
    color: #ffffff !important;
    background: #b91c1c;
}

.vehicle-row .reg-plate {
    justify-self: start;
    width: 104px;
    max-width: 100%;
    padding: 5px 7px 4px 19px;
    border: 2px solid #111827;
    border-radius: 4px;
    color: #111827;
    background:
        linear-gradient(90deg, #1d4ed8 0 13px, transparent 13px),
        #ffd53d;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.45),
        0 3px 7px rgba(15, 23, 42, 0.12);
    font-family: "CleaningBayPlate", "Mandatory", "UKNumberPlate", Impact, "Arial Narrow", Arial, sans-serif;
    font-size: 14px;
    font-stretch: condensed;
    font-weight: 700;
    letter-spacing: 0.35px;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
}

.vehicle-row .reg-plate:hover {
    color: #111827;
    border-color: #000000;
    background:
        linear-gradient(90deg, #1e40af 0 13px, transparent 13px),
        #ffe166;
}

.vehicle-row .reg-plate.vin-plate {
    padding-left: 7px;
}

.vehicle-row .reg-plate.vin-plate:hover {
    background: #f3f4f6;
}

.vehicle-row form {
    margin: 0;
}

.vehicle-row button,
.record-form button,
.login-card button {
    border: 0;
    border-radius: 8px;
    padding: 8px 12px;
    color: #ffffff;
    background: var(--accent);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.vehicle-row button:hover,
.record-form button:hover,
.login-card button:hover {
    background: var(--accent-2);
    transform: translateY(-1px);
}

.recall-check-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
    width: fit-content;
    max-width: 100%;
    border-radius: 999px;
    padding: 5px 8px;
    color: #164e63;
    background: #cffafe;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.vehicle-edit-warning {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 16px;
    padding: 12px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #7f1d1d;
    background: #fef2f2;
}

.vehicle-edit-warning strong {
    margin-right: auto;
    font-size: 15px;
    font-weight: 900;
}

.vehicle-model-details {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: -4px 0 16px;
    padding: 12px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e3a8a;
}

.vehicle-model-details span {
    flex: 0 0 auto;
    color: #475569;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.vehicle-model-details strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
}

.vehicle-edit-recall-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 8px 12px;
    color: #ffffff;
    background: #dc2626;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.vehicle-edit-recall-button:hover {
    color: #ffffff;
    background: #b91c1c;
}

.completed-panel {
    margin-top: 18px;
}

.completed-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.completed-heading h2 {
    margin: 0;
}

.completed-heading span {
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--brand);
    background: #edf7f3;
    font-size: 13px;
    font-weight: 850;
}

.completed-list {
    display: grid;
    gap: 6px;
}

.completed-tools {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.completed-tools label {
    display: grid;
    gap: 5px;
    width: min(360px, 100%);
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.completed-tools input {
    min-height: 38px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 8px 10px;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
}

.completed-tools span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.completed-row {
    display: grid;
    grid-template-columns: 98px minmax(90px, 0.9fr) minmax(150px, 1.4fr) minmax(64px, 0.5fr) minmax(122px, 0.75fr) auto auto auto;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    font-weight: 750;
}

.completed-row > span,
.completed-row time {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.completed-row time {
    color: var(--muted);
}

.completed-row form {
    margin: 0;
}

.completed-row button {
    border: 0;
    border-radius: 8px;
    padding: 6px 9px;
    color: #ffffff;
    background: #64748b;
    font: inherit;
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
}

.completed-row button:hover {
    background: var(--accent);
}

.completed-more-button {
    margin-top: 10px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 9px 12px;
    color: var(--brand);
    background: #ffffff;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.completed-more-button:hover {
    color: #ffffff;
    background: var(--brand);
}

.vehicle-search-results {
    display: grid;
    gap: 8px;
}

.vehicle-search-result {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: inherit;
    background: var(--surface);
    text-decoration: none;
}

.vehicle-search-result .reg-plate {
    justify-self: start;
    width: 104px;
    max-width: 100%;
    padding: 5px 7px 4px;
    border: 2px solid #111827;
    border-radius: 4px;
    color: #111827;
    background: #ffd53d;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.45),
        0 2px 5px rgba(15, 23, 42, 0.1);
    font-family: "CleaningBayPlate", "Mandatory", "UKNumberPlate", Impact, "Arial Narrow", Arial, sans-serif;
    font-size: 14px;
    font-stretch: condensed;
    font-weight: 700;
    letter-spacing: 0.25px;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
}

.vehicle-search-result .reg-plate.vin-plate {
    color: #334155;
    background: #e2e8f0;
    font-family: var(--font);
    font-size: 11px;
    letter-spacing: 0;
}

.vehicle-search-result:hover {
    border-color: rgba(37, 99, 235, 0.4);
}

.vehicle-search-result > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.vehicle-search-result strong {
    color: var(--ink);
    font-size: 15px;
}

.vehicle-search-result span:not(.reg-plate):not(.recall-check-badge):not(.list-recall-button) {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.completed-row .reg-plate {
    justify-self: start;
    width: 92px;
    max-width: 100%;
    padding: 4px 6px;
    border: 2px solid #111827;
    border-radius: 4px;
    color: #111827;
    background: #ffd53d;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.45),
        0 2px 5px rgba(15, 23, 42, 0.1);
    font-family: "CleaningBayPlate", "Mandatory", "UKNumberPlate", Impact, "Arial Narrow", Arial, sans-serif;
    font-size: 12px;
    font-stretch: condensed;
    font-weight: 700;
    letter-spacing: 0.25px;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
}

.completed-row .reg-plate.vin-plate {
    color: #334155;
    background: #e2e8f0;
    font-family: var(--font);
    font-size: 10px;
    letter-spacing: 0;
}

.demo-clean-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: -2px 0 8px;
    padding: 0 2px;
}

.demo-clean-meta span {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px 10px;
    color: var(--muted);
    background: var(--surface-2);
    font-size: 13px;
    font-weight: 750;
}

.demo-clean-meta strong {
    color: var(--ink);
}

.panel-title-row,
.demo-diary-heading,
.modal-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.panel-title-row h2,
.demo-diary-heading h2,
.modal-title-row h2 {
    margin-bottom: 0;
}

.panel-title-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.quick-add-vehicle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 42px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 8px;
    color: #ffffff;
    background: #ef233c;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(239, 35, 60, 0.18);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.quick-add-vehicle:hover {
    color: #ffffff;
    background: #d90429;
    box-shadow: 0 14px 24px rgba(239, 35, 60, 0.24);
    transform: translateY(-1px);
}

.quick-add-vehicle .nav-icon {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
}

.quick-add-vehicle .nav-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 3;
}

.secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--ink);
    background: #ffffff;
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}

.secondary-action:hover {
    border-color: var(--line-strong);
    color: var(--brand);
    background: var(--surface-2);
}

.demo-diary-panel {
    overflow: hidden;
}

.demo-diary-heading {
    margin-bottom: 14px;
}

.demo-diary-heading p {
    margin: 6px 0 0;
    color: var(--muted);
    font-weight: 750;
}

.demo-diary-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.demo-diary-scroll {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.demo-diary-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: separate;
    border-spacing: 0;
}

.demo-diary-table th,
.demo-diary-table td {
    width: 12.5%;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 10px;
    vertical-align: top;
}

.demo-diary-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    color: var(--ink);
    background: #eef7f3;
    text-align: left;
}

.demo-diary-table thead th:first-child,
.demo-diary-car {
    position: sticky;
    left: 0;
    z-index: 3;
}

.demo-diary-table thead th:first-child,
.demo-diary-car {
    width: 210px;
    min-width: 210px;
    background: #ffffff;
}

.demo-diary-table thead th span,
.demo-diary-table thead th strong,
.demo-diary-table thead th small,
.demo-diary-car span,
.demo-diary-car small {
    display: block;
}

.demo-diary-table thead th strong {
    margin-top: 2px;
    font-size: 18px;
}

.demo-diary-table thead th small,
.demo-diary-car small {
    color: var(--muted);
    font-size: 12px;
}

.demo-diary-car {
    text-align: left;
}

.demo-diary-car .reg-plate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 118px;
    margin-bottom: 8px;
    padding: 6px 8px;
    border: 2px solid #111827;
    border-radius: 4px;
    color: #111827;
    background: #ffd53d;
    box-shadow: 0 3px 7px rgba(15, 23, 42, 0.16);
    font-family: "CleaningBayPlate", "Mandatory", "UKNumberPlate", Impact, "Arial Narrow", Arial, sans-serif;
    font-size: 16px;
    letter-spacing: 0.25px;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
}

.demo-diary-car .reg-plate.vin-plate {
    color: #334155;
    background: #e2e8f0;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: 12px;
    letter-spacing: 0;
}

.demo-diary-table td {
    min-height: 118px;
    background: #fbfdff;
}

.demo-diary-table td.closed {
    background: #f1f5f9;
}

.demo-diary-closed {
    display: inline-flex;
    border-radius: 8px;
    padding: 6px 8px;
    color: var(--muted);
    background: #e2e8f0;
    font-size: 12px;
    font-weight: 850;
}

.demo-diary-add {
    width: 100%;
    margin-bottom: 8px;
    border: 1px dashed var(--line-strong);
    border-radius: 8px;
    padding: 8px;
    color: var(--brand);
    background: #edf7f3;
    font-weight: 850;
    cursor: pointer;
}

.demo-booking-block {
    display: grid;
    gap: 3px;
    margin-top: 7px;
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    padding: 8px;
    color: #14365f;
    background: #eaf3ff;
    font-size: 12px;
    font-weight: 750;
}

.demo-booking-block.full-day {
    border-left-color: var(--warning);
    color: #5b3a04;
    background: #fff4d8;
}

.demo-booking-block form {
    margin-top: 4px;
}

.demo-booking-block button {
    border: 0;
    border-radius: 8px;
    padding: 5px 8px;
    color: #ffffff;
    background: var(--danger);
    font-size: 11px;
    font-weight: 850;
    cursor: pointer;
}

.admin-modal {
    width: min(560px, calc(100vw - 32px));
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.admin-modal::backdrop {
    background: rgba(15, 23, 42, 0.48);
}

.demo-booking-summary {
    margin: 0;
    color: var(--muted);
    font-weight: 750;
}

.two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.notes {
    margin: -2px 0 8px;
    padding: 10px 12px;
    border-left: 3px solid var(--warning);
    border-radius: 8px;
    color: #5b3a04;
    background: #fff8e7;
    font-weight: 700;
}

.map-note {
    border-left-color: var(--accent);
    color: #14365f;
    background: #eaf3ff;
}

.map-note a,
.map-link {
    color: var(--accent);
    font-weight: 900;
    text-decoration: none;
}

.map-link {
    align-self: end;
    width: fit-content;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 8px;
    padding: 10px 12px;
    background: #eaf3ff;
}

.travel-panel {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.travel-panel span {
    color: var(--muted);
    font-weight: 850;
}

.empty {
    margin: 0;
    padding: 18px;
    border: 1px dashed var(--line-strong);
    border-radius: 8px;
    color: var(--muted);
    background: var(--surface-2);
}

.form-shell {
    padding: 22px;
}

.vehicle-form-actions {
    display: flex;
    justify-content: flex-end;
    margin: -6px 0 18px;
}

.record-form,
.login-card form {
    display: grid;
    gap: 18px;
}

.record-form.compact,
.login-card form {
    gap: 14px;
}

fieldset {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.dvla-details {
    background: #f2f7fb;
}

.dvla-details legend {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dvla-details input {
    color: #334155;
    background: #ffffff;
}

.dvla-info-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: var(--brand);
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.dvla-info-dialog {
    width: min(680px, calc(100vw - 32px));
}

.dvla-info-grid {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.dvla-info-row {
    display: grid;
    grid-template-columns: minmax(170px, 0.45fr) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.dvla-info-row span {
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.dvla-info-row strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.25;
}

legend {
    padding: 0 8px;
    color: var(--brand);
    font-size: 15px;
    font-weight: 850;
}

label {
    display: grid;
    gap: 7px;
    color: #273449;
    font-size: 14px;
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 11px 12px;
    color: var(--ink);
    background: #ffffff;
    font: inherit;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(37, 99, 235, 0.75);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.13);
}

input:disabled,
select:disabled,
textarea:disabled {
    color: var(--muted);
    background: #edf1f5;
}

.checksheet-hero {
    align-items: center;
}

.checksheet-hero .reg-plate {
    transform: scale(1.08);
    transform-origin: right center;
}

.checksheet-shell {
    display: grid;
    grid-template-columns: minmax(190px, 250px) minmax(0, 1fr);
    align-items: start;
    gap: 14px;
}

.checksheet-tabs {
    position: sticky;
    top: 12px;
    display: grid;
    gap: 7px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
}

.checksheet-tabs button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 7px 10px;
    color: var(--ink);
    background: #ffffff;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    text-align: left;
    cursor: pointer;
}

.checksheet-tabs button.active {
    border-color: var(--brand);
    color: #ffffff;
    background: var(--brand);
    box-shadow: inset 4px 0 0 var(--brand-2);
}

.checksheet-panel {
    display: grid;
    gap: 9px;
    min-width: 0;
}

.checksheet-panel[hidden] {
    display: none;
}

.checksheet-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.checksheet-panel-heading h2 {
    margin: 0;
    font-size: 18px;
}

.checksheet-panel-heading span {
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--green);
    background: #e7f7ef;
    font-size: 12px;
    font-weight: 950;
}

.checksheet-question-list {
    display: grid;
    gap: 5px;
}

.checksheet-question {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
}

.checksheet-question > strong {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 8px;
    color: #ffffff;
    background: var(--green);
    font-size: 12px;
}

.checksheet-question > div {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.checksheet-question p {
    overflow: hidden;
    margin: 0;
    color: var(--ink);
    font-size: 12px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.checksheet-result-options {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    margin-bottom: 0;
}

.checksheet-result-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    width: auto;
    min-height: 30px;
    padding: 4px 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
}

.checksheet-result-options input {
    width: auto;
}

.checksheet-generate-card {
    display: grid;
    gap: 10px;
}

.checksheet-generate-card h3,
.checksheet-generate-card p {
    margin: 0;
}

.checksheet-generate-card button {
    justify-self: start;
    border: 0;
    border-radius: 8px;
    padding: 12px 18px;
    color: #ffffff;
    background: var(--accent);
    font: inherit;
    font-weight: 950;
    cursor: pointer;
}

.checksheet-history {
    display: grid;
    gap: 12px;
}

.checksheet-template-picker {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: end;
}

.checksheet-template-picker h2,
.checksheet-template-picker p {
    margin: 0;
}

.checksheet-template-picker-form {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: end;
    min-width: min(520px, 100%);
}

.checksheet-template-picker-form button {
    border: 0;
    border-radius: 8px;
    padding: 11px 15px;
    color: #ffffff;
    background: var(--accent);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.checksheet-history-list {
    display: grid;
    gap: 8px;
}

.checksheet-history-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #ffffff;
    text-decoration: none;
}

.checksheet-history-list span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-align: right;
}

.checksheet-template-list {
    display: grid;
    gap: 12px;
}

.checksheet-template-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.checksheet-template-card strong,
.checksheet-template-card span {
    display: block;
}

.checksheet-template-card strong {
    color: var(--text);
    font-size: 1.05rem;
}

.checksheet-template-card span {
    color: var(--muted);
}

.checksheet-template-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.checksheet-template-stats span,
.checksheet-template-stats a {
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--green-dark);
    font-weight: 800;
    background: #e9f8f1;
    text-decoration: none;
}

.checksheet-template-stats a {
    color: #ffffff;
    background: var(--accent);
}

.checksheet-import-panel {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}

.checksheet-import-panel form {
    flex: 0 0 auto;
}

.checksheet-editor-list {
    display: grid;
    gap: 18px;
}

.checksheet-editor-settings {
    gap: 12px;
    margin-bottom: 12px;
}

.checksheet-editor-settings .panel {
    padding: 12px;
}

.checksheet-editor-settings .panel h2 {
    margin-bottom: 8px;
    font-size: 16px;
}

.checksheet-editor-settings .panel h2::after,
.checksheet-editor-compact .panel h2::after {
    width: 30px;
    height: 2px;
    margin-top: 5px;
}

.checksheet-editor-settings .record-form,
.checksheet-editor-settings .record-form.compact {
    gap: 8px;
}

.checksheet-editor-settings label,
.checksheet-editor-compact label {
    font-size: 11px;
}

.checksheet-editor-settings input,
.checksheet-editor-settings select,
.checksheet-editor-settings textarea,
.checksheet-editor-compact input,
.checksheet-editor-compact select,
.checksheet-editor-compact textarea {
    min-height: 34px;
    padding: 5px 7px;
    border-radius: 6px;
    font-size: 12px;
}

.checksheet-editor-settings textarea,
.checksheet-editor-compact textarea {
    min-height: 38px;
}

.checksheet-editor-settings button,
.checksheet-editor-compact button {
    min-height: 32px;
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 11px;
    font-weight: 850;
}

.checksheet-editor-compact {
    gap: 10px;
}

.checksheet-editor-compact .panel {
    padding: 10px;
}

.checksheet-editor-section {
    gap: 8px;
}

.checksheet-editor-section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
}

.checksheet-section-form,
.checksheet-question-editor,
.checksheet-add-question {
    display: grid;
    gap: 8px;
}

.checksheet-section-form {
    grid-template-columns: 70px minmax(0, 1fr) auto;
    align-items: end;
}

.checksheet-question-editor {
    grid-template-columns: 44px minmax(240px, 1fr) 44px 44px;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.checksheet-question-editor-list {
    display: grid;
    gap: 4px;
}

.checksheet-question-editor-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 5px;
    align-items: center;
    padding: 4px 5px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
}

.compact-field {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px;
    align-items: center;
    min-width: 0;
}

.compact-field span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.compact-field input {
    min-width: 0;
}

.compact-order-field {
    grid-template-columns: 1fr;
}

.compact-order-field span {
    display: none;
}

.compact-order-field input {
    padding-inline: 4px;
    text-align: center;
}

.checksheet-add-question {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    padding: 8px;
    border: 1px dashed var(--line-strong);
    border-radius: 6px;
    background: var(--surface-2);
}

.checksheet-delete-form {
    display: block;
    margin: 0;
}

.inline-check {
    display: flex;
    gap: 4px;
    align-items: center;
    min-height: 28px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.inline-check input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
}

.field-label {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.checksheet-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 6px;
}

.checksheet-category-grid label {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.checksheet-category-grid input {
    width: 15px;
    height: 15px;
    margin: 0;
}

.checksheet-label-fieldset {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    background: #ffffff;
}

.checksheet-label-fieldset legend {
    font-size: 12px;
}

.danger-button {
    border: 0;
    border-radius: 6px;
    padding: 5px 7px;
    color: #ffffff;
    background: #dc2626;
    font: inherit;
    font-size: 11px;
    font-weight: 850;
    cursor: pointer;
}

.danger-button:hover {
    background: #b91c1c;
}

.lookup-field {
    display: flex;
    gap: 8px;
}

.lookup-field input {
    min-width: 0;
}

.autocomplete-label {
    position: relative;
}

.autocomplete-panel {
    position: absolute;
    z-index: 40;
    right: 0;
    left: 0;
    top: calc(100% + 6px);
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid rgba(198, 209, 223, 0.95);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}

.autocomplete-option {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 0;
    padding: 11px 14px;
    color: var(--ink);
    background: #ffffff;
    box-shadow: none;
    font-size: 15px;
    font-weight: 850;
    text-align: left;
    cursor: pointer;
}

.autocomplete-option:last-child {
    border-bottom: 0;
}

.autocomplete-option:hover,
.autocomplete-option:focus {
    color: var(--brand);
    background: #f1f7f5;
}

.autocomplete-option small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-align: right;
}

.lookup-field button {
    flex: 0 0 auto;
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    color: #ffffff;
    background: var(--brand);
    font: inherit;
    font-weight: 850;
    cursor: pointer;
}

.lookup-field button:disabled {
    opacity: 0.58;
    cursor: wait;
}

.lookup-status {
    min-height: 20px;
    color: var(--muted);
    font-weight: 750;
}

.lookup-status[data-type="success"] {
    color: #0b5b37;
}

.lookup-status[data-type="error"] {
    color: var(--danger);
}

textarea {
    resize: vertical;
}

.list {
    display: grid;
    gap: 10px;
}

.list a {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    background: var(--surface);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.garage-list-item {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.garage-control-item {
    grid-template-columns: minmax(220px, 1fr) auto auto auto minmax(260px, 420px);
    align-items: center;
    gap: 12px;
}

.garage-control-item label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    color: var(--ink);
    background: #ffffff;
    font-size: 13px;
    font-weight: 850;
    white-space: nowrap;
}

.garage-control-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

.garage-control-item button {
    border: 0;
    border-radius: 8px;
    padding: 10px 13px;
    color: #ffffff;
    background: var(--accent);
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.garage-control-item button:hover {
    background: var(--accent-2);
}

.garage-reset-controls {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto;
    gap: 8px;
    align-items: end;
    padding: 10px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff7f7;
}

.garage-reset-controls label {
    display: grid;
    gap: 5px;
    min-height: 0;
    border: 0;
    padding: 0;
    background: transparent;
    font-size: 11px;
    white-space: normal;
}

.garage-reset-controls input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 7px 8px;
    font: inherit;
    font-size: 12px;
}

.garage-reset-controls .danger-button {
    align-self: end;
    padding: 8px 10px;
}

.garage-reset-controls span {
    grid-column: 1 / -1;
    color: #991b1b;
    font-size: 11px;
    font-weight: 800;
}

.list a:hover {
    border-color: rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.list span,
.muted {
    color: var(--muted);
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.permission-grid label {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    font-weight: 700;
}

.permission-grid input {
    width: auto;
}

.monitor-settings-fieldset {
    grid-template-columns: 1fr;
}

.monitor-option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.checkbox-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #ffffff;
    font-size: 15px;
    font-weight: 850;
}

.checkbox-card input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
}

.settings-save-button {
    min-height: 46px;
    justify-self: start;
    padding-inline: 22px !important;
}

.pin-setting-row {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.pin-setting-row label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    color: var(--ink);
    font-size: 15px;
    font-weight: 850;
}

.pin-setting-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
}

.pin-setting-row span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.logo-preview {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.logo-preview span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.logo-preview img {
    width: auto;
    max-width: 240px;
    max-height: 90px;
    object-fit: contain;
}

.login-card {
    padding: 26px;
}

.login-logo {
    display: block;
    width: 100%;
    max-width: 560px;
    margin: 0 auto 18px;
    object-fit: contain;
}

.login-card p {
    margin: 16px 0 0;
}

@media (max-width: 1260px) {
    .admin-link-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mot-chart {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 1080px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .recall-vehicle-card {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .recall-vehicle-action {
        padding: 10px 0 0;
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .recall-vehicle-meta {
        justify-items: start;
        text-align: left;
    }

    .system-settings-panel,
    .system-settings-form {
        grid-template-columns: 1fr;
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mot-stats-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    body {
        background: var(--page);
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px 16px 16px;
    }

    .topbar h1 {
        font-size: 28px;
    }

    .brand {
        width: 100%;
        justify-content: center;
        font-size: 24px;
        white-space: normal;
    }

    .site-logo,
    .garage-logo {
        max-width: 100%;
        max-height: 86px;
    }

    .mobile-nav-bar {
        display: flex;
        margin: 0 16px 0;
    }

    .main-nav {
        display: none;
        margin: 0 16px 18px;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        overflow: hidden;
    }

    .mot-chart {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-height: 0;
    }

    .mot-chart-month {
        grid-template-rows: minmax(160px, 1fr) auto;
    }

    .mot-chart-bar-wrap {
        min-height: 160px;
    }

    .main-nav.is-open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .main-nav a:last-child {
        margin-left: 0;
    }

    .main-nav a {
        min-width: 0;
        width: 100%;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(10px) rotate(45deg);
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-10px) rotate(-45deg);
    }

    .nav-toggle span {
        transition: transform 0.15s ease, opacity 0.15s ease;
    }

    .admin-hero {
        align-items: stretch;
        flex-direction: column;
        padding: 20px;
    }

    .admin-hero h2 {
        font-size: 24px;
    }

    .hero-action {
        text-align: center;
    }

    .admin-link-grid {
        grid-template-columns: 1fr;
    }

    .settings-link-grid {
        grid-template-columns: 1fr;
    }

    .garage-control-item {
        grid-template-columns: 1fr;
    }

    .garage-control-item label,
    .garage-control-item button {
        width: 100%;
    }

    .checksheet-template-card,
    .checksheet-import-panel,
    .checksheet-template-picker,
    .checksheet-template-picker-form,
    .checksheet-editor-section-head,
    .checksheet-section-form,
    .checksheet-question-editor,
    .checksheet-add-question,
    .checksheet-category-grid {
        grid-template-columns: 1fr;
    }

    .checksheet-import-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .checksheet-template-picker {
        align-items: stretch;
        flex-direction: column;
    }

    .checksheet-shell {
        grid-template-columns: 1fr;
    }

    .checksheet-tabs {
        position: static;
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }

    .checksheet-question > div {
        grid-template-columns: 1fr;
    }

    .checksheet-question p {
        white-space: normal;
    }

    .checksheet-template-stats {
        justify-content: flex-start;
    }

    .audit-event {
        align-items: flex-start;
        flex-direction: column;
    }

    .audit-event time {
        text-align: left;
    }

    .tool-search {
        grid-template-columns: 1fr;
    }

    .context-bar,
    .context-switcher {
        align-items: stretch;
        flex-direction: column;
    }

    .context-switcher label {
        min-width: 0;
    }

    main {
        padding: 0 16px 28px;
    }

    .welcome {
        align-items: flex-start;
        flex-direction: column;
    }

    .welcome span {
        text-align: left;
    }

    .home-vehicle-search,
    .vehicle-search-form,
    .vehicle-search-result,
    .completed-tools {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .completed-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .vehicle-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .completed-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .completed-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .completed-row > span,
    .completed-row time {
        white-space: normal;
    }

    fieldset,
    .permission-grid,
    .monitor-option-grid,
    .dashboard-board,
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .form-shell,
    .login-card {
        padding: 18px;
    }

    .pin-setting-row label {
        align-items: flex-start;
    }
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.nav-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.mobile-nav-current {
    gap: 10px;
}

.main-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

body.menu-style-burger .mobile-nav-bar {
    display: flex;
    margin: 0 16px 0;
}

body.menu-style-burger .main-nav {
    display: none;
    margin: 0 16px 18px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    overflow: hidden;
}

body.menu-style-burger .main-nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

body.menu-style-burger .main-nav a {
    min-width: 0;
    width: 100%;
}

body.menu-style-burger .main-nav a:last-child {
    margin-left: 0;
}

body.menu-style-burger .nav-toggle {
    display: inline-flex;
}

body.menu-style-classic .mobile-nav-bar {
    display: none;
}

body.menu-style-classic .mobile-home-link {
    display: none;
}

body.menu-style-classic .main-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
}

body.menu-style-classic .nav-toggle {
    display: none;
}

body.menu-style-classic .main-nav a {
    min-width: max-content;
    width: auto;
}

body.menu-style-classic .main-nav a:last-child {
    margin-left: auto;
}

body.menu-style-classic .main-nav a:not([data-route="dashboard"]) .nav-icon,
body.menu-style-classic .main-nav a:not([data-route="dashboard"]) .nav-icon + span {
    margin-left: 0;
}

body.menu-style-classic .main-nav a:not([data-route="dashboard"]) .nav-icon {
    display: none;
}
