:root {
    color-scheme: light;
    --bg: #f7faf8;
    --surface: rgba(255, 255, 255, 0.94);
    --surface-strong: #ffffff;
    --text: #17201c;
    --muted: #66736d;
    --line: #dfe8e3;
    --brand: #187a5a;
    --brand-dark: #105e46;
    --brand-soft: #eaf6f0;
    --success: #16845b;
    --success-soft: #e6f7f0;
    --danger: #c9384f;
    --danger-soft: #fff0f2;
    --shadow: 0 20px 60px rgba(27, 62, 48, 0.10);
    --radius: 22px;
    --radius-small: 14px;
    --font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-family: var(--font-family);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 8% 0%, rgba(24, 122, 90, 0.09), transparent 30rem),
        radial-gradient(circle at 100% 28%, rgba(104, 184, 145, 0.08), transparent 28rem),
        var(--bg);
    font-family: var(--font-family);
}

button, input, select, textarea { font: inherit; }

a { color: inherit; }

:where(a, button, input, select, textarea, summary):focus-visible {
    outline: 3px solid rgba(24, 122, 90, 0.28);
    outline-offset: 2px;
}

.page-shell, .installer-page { padding: 20px; }

.centered-panel {
    min-height: calc(100vh - 40px);
    display: grid;
    place-items: center;
}

.installer-layout {
    width: min(100%, 980px);
    margin: 0 auto;
    padding: 24px 0 64px;
}

.installer-hero {
    display: grid;
    gap: 40px;
    margin-bottom: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    width: max-content;
    text-decoration: none;
    font-weight: 780;
    letter-spacing: -0.02em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: white;
    background: linear-gradient(145deg, var(--brand), var(--brand-dark));
    box-shadow: 0 9px 22px rgba(24, 122, 90, 0.22);
}

.brand-logo { display: block; width: auto; height: 42px; max-width: 168px; object-fit: contain; }

h1, h2, p { margin-top: 0; }

h1 {
    margin-bottom: 14px;
    font-size: clamp(1.9rem, 5vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
    max-width: 18ch;
}

h2 {
    margin-bottom: 8px;
    font-size: clamp(1.35rem, 4vw, 2rem);
    letter-spacing: -0.035em;
}

.lead {
    color: var(--muted);
    font-size: clamp(1rem, 2.5vw, 1.18rem);
    line-height: 1.65;
    max-width: 62ch;
}

.eyebrow {
    margin-bottom: 10px;
    color: var(--brand);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.surface {
    margin-top: 18px;
    padding: clamp(22px, 5vw, 38px);
    border: 1px solid rgba(213, 221, 235, 0.85);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.section-heading {
    display: grid;
    gap: 8px;
    margin-bottom: 22px;
}

.section-heading > p { color: var(--muted); line-height: 1.5; }

.check-grid { display: grid; gap: 10px; }

.check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--surface-strong);
}

.check-item strong, .check-item small { display: block; }
.check-item small { margin-top: 3px; color: var(--muted); overflow-wrap: anywhere; }

.check-dot, .status-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-weight: 800;
}

.check-dot { width: 30px; height: 30px; }
.check-item--pass .check-dot { color: var(--success); background: var(--success-soft); }
.check-item--fail .check-dot { color: var(--danger); background: var(--danger-soft); }

.alert {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: var(--radius-small);
    line-height: 1.5;
}

.alert ul { margin: 0; padding-left: 20px; }
.alert--danger { color: #8f2134; border: 1px solid #f2bac3; background: var(--danger-soft); }
.alert--warning { color: #74530b; border: 1px solid #efd89b; background: #fff9e8; }
.alert--info { color: #315b4a; border: 1px solid #c7ded3; background: #f1f8f5; }

.form-surface fieldset { margin: 0; padding: 0; border: 0; }
.form-surface fieldset + fieldset { margin-top: 32px; padding-top: 30px; border-top: 1px solid var(--line); }

legend {
    width: 100%;
    margin-bottom: 18px;
    font-size: 1.12rem;
    font-weight: 760;
    letter-spacing: -0.02em;
}

.field-grid { display: grid; gap: 16px; }

.field {
    display: grid;
    gap: 8px;
    min-width: 0;
    color: #34443d;
    font-size: 0.9rem;
    font-weight: 680;
}

.field input {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    color: var(--text);
    border: 1px solid #cbd9d2;
    border-radius: 12px;
    outline: none;
    background: #fff;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.field input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(24, 122, 90, 0.12);
}

.field small { color: var(--muted); font-weight: 450; }

.password-control { position: relative; display: block; }
.password-control input { padding-right: 48px; }
.password-toggle {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 36px;
    height: 36px;
    color: var(--muted);
    border: 0;
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
}
.password-toggle:hover { background: var(--brand-soft); color: var(--brand); }

.form-actions {
    display: grid;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.page-heading-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.import-upload { max-width: 720px; }
.import-requirements { display: grid; gap: 4px; padding: 14px 16px; border-radius: 14px; background: var(--brand-soft); color: var(--text); }
.import-requirements span, .import-file-summary span { color: var(--muted); line-height: 1.45; }
.import-file-summary { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 18px; }
.import-file-summary > div { display: grid; gap: 4px; min-width: 0; }
.import-file-summary strong { overflow-wrap: anywhere; }
.import-mapping { margin-bottom: 22px; }
.import-mapping-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.import-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.import-stat { display: grid; gap: 2px; padding: 16px; }
.import-stat strong { font-size: 1.5rem; line-height: 1; }
.import-stat span { color: var(--muted); }
.import-stat--valid { border-color: #b9dfcf; }
.import-stat--duplicate { border-color: #d6b96f; }
.import-stat--error { border-color: #df9f9f; }
.import-table-wrap { overflow-x: auto; margin-top: 14px; padding: 0; }
.import-table { width: 100%; min-width: 980px; border-collapse: collapse; font-size: .88rem; }
.import-table th, .import-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.import-table th { position: sticky; top: 0; z-index: 1; background: #fff; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
.import-row--duplicate { background: #fffaf0; }
.import-row--error { background: #fff5f5; }
.import-state { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: .75rem; font-weight: 800; white-space: nowrap; }
.import-state--valid { color: var(--brand-dark); background: var(--brand-soft); }
.import-state--duplicate { color: #775b12; background: #fff1c7; }
.import-state--error { color: #912d2d; background: #ffe1e1; }
.import-confirm { display: flex; justify-content: flex-end; margin-top: 16px; }

@media (max-width: 719px) {
    .page-heading-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-heading-actions .button { width: 100%; padding-inline: 12px; }
    .import-mapping-grid { grid-template-columns: 1fr; }
    .import-summary-grid { gap: 8px; }
    .import-stat { padding: 12px 10px; }
    .import-stat strong { font-size: 1.25rem; }
    .import-stat span { font-size: .75rem; }
    .import-file-summary { align-items: flex-start; }
    .import-confirm .button { width: 100%; }
}

.security-note { margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.5; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 12px 19px;
    border: 0;
    border-radius: 13px;
    font-weight: 760;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button--primary { color: #fff; background: linear-gradient(145deg, var(--brand), var(--brand-dark)); box-shadow: 0 11px 24px rgba(24, 122, 90, 0.22); }
.button--secondary { color: var(--brand-dark); border: 1px solid #b9dccc; background: var(--brand-soft); box-shadow: none; }
.button--danger { color: #fff; background: var(--danger); box-shadow: 0 10px 22px rgba(201, 56, 79, 0.17); }
.button.button--compact { min-width: 0; min-height: 42px; padding: 9px 14px; font-size: 0.85rem; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button:disabled { opacity: 0.48; cursor: not-allowed; box-shadow: none; }

.status-surface { width: min(100%, 620px); text-align: center; }
.status-surface h1, .status-surface .lead { margin-left: auto; margin-right: auto; }
.status-icon { width: 58px; height: 58px; margin: 0 auto 20px; font-size: 1.45rem; }
.status-icon--success { color: var(--success); background: var(--success-soft); }
.status-icon--danger { color: var(--danger); background: var(--danger-soft); }
.incident-code { color: var(--muted); font-size: 0.85rem; }

.alert--success { color: var(--brand-dark); border: 1px solid #b9dfcf; background: var(--brand-soft); }

.auth-page { padding: 22px; }
.auth-layout { width: min(100%, 960px); min-height: calc(100vh - 44px); margin: 0 auto; display: grid; align-items: center; gap: 28px; }
.auth-intro { display: grid; gap: clamp(44px, 10vh, 90px); padding: 18px 4px 0; }
.auth-intro h1 { margin-bottom: 12px; }
.auth-card { margin: 0; padding: clamp(24px, 6vw, 38px); }
.auth-card .alert { margin: 0 0 22px; }
.auth-form { display: grid; gap: 18px; }
.button--wide { width: 100%; margin-top: 4px; }
.auth-help { margin: 20px 0 0; color: var(--muted); font-size: 0.84rem; line-height: 1.55; text-align: center; }
.auth-register-link { display: block; margin-top: 12px; color: var(--brand-dark); font-size: 0.88rem; font-weight: 750; text-align: center; }

.registration-page { padding: 18px; }
.registration-layout { width: min(100%, 920px); margin: 0 auto; padding-bottom: 48px; }
.registration-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 4px 0 32px; }
.registration-login { flex: 0 0 auto; margin: 0; font-size: 0.88rem; }
.registration-intro { margin-bottom: 24px; }
.registration-intro h1 { max-width: 20ch; }
.registration-alert { margin-bottom: 18px; }
.registration-form { margin: 0; padding: clamp(20px, 5vw, 36px); }
.registration-form fieldset { margin: 0; padding: 0; border: 0; }
.registration-form fieldset + fieldset { margin-top: 30px; padding-top: 28px; border-top: 1px solid var(--line); }
.registration-form [hidden] { display: none !important; }
.account-type-grid { display: grid; gap: 12px; }
.account-type-option { position: relative; cursor: pointer; }
.account-type-option > input { position: absolute; opacity: 0; pointer-events: none; }
.account-type-card { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; min-height: 100%; padding: 17px; border: 1px solid #cbd9d2; border-radius: 15px; background: #fff; transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.account-type-card > span { grid-row: 1 / span 2; display: grid; place-items: center; align-self: start; width: 34px; height: 34px; color: var(--brand-dark); border-radius: 10px; background: var(--brand-soft); }
.account-type-card strong { font-size: 0.94rem; }
.account-type-card small { color: var(--muted); line-height: 1.4; }
.account-type-option > input:checked + .account-type-card { border-color: var(--brand); background: #fbfefc; box-shadow: 0 0 0 4px rgba(24, 122, 90, 0.10); }
.account-type-option > input:focus-visible + .account-type-card { outline: 3px solid rgba(24, 122, 90, 0.25); outline-offset: 2px; }
.registration-fields { display: grid; gap: 15px; }
.cui-lookup-row { display: grid; gap: 12px; align-items: end; }
.button--lookup { min-width: 0; }
.lookup-status { min-height: 1.4em; margin: 10px 0 0; color: var(--muted); font-size: 0.84rem; line-height: 1.45; }
.company-details { margin-top: 18px; padding-top: 20px; border-top: 1px dashed #bed4c9; }
.registration-actions { margin-top: 30px; }
.status-brand { margin: 0 auto 30px; }
.account-state-card { width: min(100%, 620px); }
.account-state-icon--pending { color: #78570e; background: #fff4d3; }
.account-state-icon--rejected { color: var(--danger); background: var(--danger-soft); }
.account-state-icon--suspended, .account-state-icon--unavailable { color: #8a4d0d; background: #fff0df; }
.account-state-message { margin: 24px 0 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fbfdfc; text-align: left; }
.account-state-message strong { display: block; margin-bottom: 7px; font-size: 0.82rem; }
.account-state-message p { margin: 0; color: var(--muted); line-height: 1.55; overflow-wrap: anywhere; }
.account-state-identity { margin: 24px 0 12px; color: var(--muted); font-size: 0.82rem; overflow-wrap: anywhere; }
.account-state-logout { width: 100%; justify-content: center; }

.admin-page { background: var(--bg); }
.admin-page.menu-open { overflow: hidden; }
.admin-shell { min-height: 100vh; }
.admin-content { min-width: 0; }
.mobile-header {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 68px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(210, 225, 217, 0.88);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
}
.mobile-header .brand { flex: 1 1 auto; min-width: 0; }
.mobile-header .brand > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-header .brand-logo { max-width: 138px; height: 38px; }
.mobile-home-link { flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; color: var(--muted); border: 1px solid var(--line); border-radius: 12px; background: #fff; text-decoration: none; }
.mobile-home-link svg { display: block; width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mobile-home-link--active { color: var(--brand-dark); border-color: #c8e6d8; background: var(--brand-soft); }
.menu-toggle, .menu-close {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    color: var(--text);
    border: 0;
    border-radius: 12px;
    background: var(--brand-soft);
    cursor: pointer;
}
.menu-toggle { align-content: center; gap: 4px; }
.menu-toggle span { display: block; width: 19px; height: 2px; border-radius: 2px; background: var(--brand-dark); }
.menu-close { font-size: 1.65rem; line-height: 1; }
.admin-sidebar {
    position: fixed;
    z-index: 50;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    width: min(86vw, 304px);
    height: 100dvh;
    padding: 18px;
    border-right: 1px solid var(--line);
    background: #fff;
    box-shadow: 22px 0 60px rgba(18, 54, 40, 0.16);
    transform: translateX(-105%);
    transition: transform 220ms ease;
}
.admin-page.menu-open .admin-sidebar { transform: translateX(0); }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 22px; }
.sidebar-top .brand { min-width: 0; }
.sidebar-top .brand > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-top .brand-logo { max-width: 155px; }
.sidebar-nav { display: grid; gap: 6px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sidebar-settings-link { display: flex; align-items: center; gap: 11px; margin-top: auto; padding: 11px 12px; border-radius: 12px; color: var(--muted); font-weight: 750; text-decoration: none; }
.sidebar-settings-link:hover, .sidebar-settings-link--active { background: var(--brand-soft); color: var(--brand-dark); }
.sidebar-settings-link + .sidebar-account { margin-top: 4px; }
.sidebar-link { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 12px; color: var(--muted); border-radius: 13px; font-size: 0.91rem; font-weight: 700; text-decoration: none; }
.sidebar-link:hover { color: var(--brand-dark); background: #f6faf8; }
.sidebar-link--active { color: var(--brand-dark); background: var(--brand-soft); }
.nav-icon { display: grid; place-items: center; width: 28px; height: 28px; font-size: 1.1rem; }
.nav-icon--svg svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-icon--text { font-size: .58rem; font-weight: 850; letter-spacing: -.02em; }
.sidebar-account { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 11px; margin-top: auto; padding: 16px 4px; border-top: 1px solid var(--line); }
.account-avatar { display: grid; place-items: center; width: 38px; height: 38px; color: #fff; border-radius: 12px; background: var(--brand-dark); font-weight: 800; }
.account-copy { min-width: 0; }
.account-copy strong, .account-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy strong { font-size: 0.86rem; }
.account-copy small { margin-top: 3px; color: var(--muted); font-size: 0.73rem; }
.sidebar-logout .button { justify-content: flex-start; gap: 10px; width: 100%; min-width: 0; }
.drawer-backdrop { position: fixed; z-index: 40; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(13, 29, 23, 0.44); backdrop-filter: blur(2px); cursor: pointer; }
.drawer-backdrop[hidden] { display: none; }
.mobile-tabbar {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 5px 4px calc(5px + env(safe-area-inset-bottom));
    border: 1px solid rgba(206, 222, 214, 0.95);
    border-width: 1px 0 0;
    border-radius: 16px 16px 0 0;
    background: #fff;
    box-shadow: 0 -8px 28px rgba(22, 56, 43, 0.12);
}
.mobile-tabbar--single { grid-template-columns: minmax(0, 1fr); }
.mobile-tabbar--portal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mobile-tabbar--portal-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mobile-tabbar--portal-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mobile-tabbar--portal-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tab-link { display: grid; place-items: center; align-content: center; gap: 3px; min-width: 0; min-height: 48px; padding: 4px 2px; color: var(--muted); border-radius: 11px; font-size: 0.64rem; font-weight: 720; text-decoration: none; }
.tab-link > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-link--active { color: var(--brand-dark); background: var(--brand-soft); }
.tab-icon { font-size: 1.22rem; line-height: 1; }
.tab-icon--svg svg { display: block; width: 1.28rem; height: 1.28rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.button--quiet { min-height: 40px; padding: 8px 12px; color: var(--muted); background: transparent; }
.button--quiet:hover { color: var(--brand-dark); background: var(--brand-soft); box-shadow: none; }
.admin-main { width: min(100%, 1180px); margin: 0 auto; padding: 28px 18px calc(88px + env(safe-area-inset-bottom)); }
.admin-main--narrow { width: min(100%, 900px); }
.back-link { display: inline-flex; margin-bottom: 22px; color: var(--brand-dark); font-size: 0.86rem; font-weight: 750; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.page-heading { display: grid; gap: 20px; margin-bottom: 26px; }
.page-heading h1 { max-width: none; margin-bottom: 10px; }
.page-heading .lead { margin-bottom: 0; }
.page-heading__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.page-heading__actions .button { min-width: 0; }
.compact-page-heading { margin-bottom: 18px; }
.compact-page-heading h1 { margin: 0; font-size: clamp(1.45rem, 5vw, 2rem); line-height: 1.15; }
.mobile-vehicle-context { display: grid; gap: 8px; padding: 9px 16px 10px; border-bottom: 1px solid var(--line); background: #fff; }
.mobile-vehicle-context form { display: grid; gap: 3px; }
.mobile-vehicle-context select { width: 100%; min-height: 42px; padding: 8px 36px 8px 11px; color: var(--text); border: 1px solid #cbd9d2; border-radius: 11px; background: #f9fcfa; font-weight: 720; }
.mobile-vehicle-context form small { color: var(--muted); font-size: .72rem; }
.mobile-vehicle-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.mobile-vehicle-actions a { display: grid; place-items: center; min-height: 34px; padding: 6px 9px; color: var(--brand-dark); border-radius: 10px; background: var(--brand-soft); font-size: .74rem; font-weight: 780; text-decoration: none; }
.desktop-vehicle-context { display: none; }
.nav-state-dot { width: 8px; height: 8px; margin-left: auto; border-radius: 999px; }
.nav-state-dot--warning { background: #d49b19; box-shadow: 0 0 0 4px rgba(212, 155, 25, .13); }
.sidebar-subscription-warning { display: grid; gap: 2px; margin: 0 4px 8px; padding: 10px 12px; border-radius: 12px; background: #fff4d7; color: #795208; }
.sidebar-subscription-warning strong { font-size: .76rem; }
.sidebar-subscription-warning span { font-size: .68rem; line-height: 1.35; }
.subscription-plans { margin-bottom: 22px; padding: 0; overflow: hidden; }
.subscription-plans > summary { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; cursor: pointer; }
.subscription-plans > summary span { color: var(--muted); font-size: .84rem; font-weight: 500; }
.subscription-plan-grid { display: grid; gap: 16px; padding: 0 18px 18px; }
.subscription-plan { margin: 0; }
.subscription-plan h2 { margin: 0 0 14px; font-size: 1rem; }
.subscription-list, .subscription-payment-list { display: grid; gap: 14px; }
.subscription-card { display: grid; gap: 16px; padding: 18px; }
.subscription-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.subscription-card__head h2 { margin: 4px 0; font-size: 1.08rem; }
.subscription-card__head p { margin: 0; color: var(--muted); font-size: .84rem; }
.subscription-status { display: inline-flex; align-items: center; width: fit-content; padding: 6px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: .72rem; font-weight: 800; white-space: nowrap; }
.subscription-status--grace, .subscription-status--pending_payment { background: #fff4d7; color: #795208; }
.subscription-status--expired, .subscription-status--suspended { background: #fde9e7; color: #8d3029; }
.subscription-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.subscription-facts div { padding: 11px; border-radius: 12px; background: var(--brand-soft); }
.subscription-facts dt { color: var(--muted); font-size: .7rem; font-weight: 750; }
.subscription-facts dd { margin: 4px 0 0; font-size: .84rem; font-weight: 750; }
.subscription-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.subscription-history-grid { display: grid; gap: 9px; padding-top: 10px; }
.subscription-history-grid article { display: grid; gap: 3px; padding: 11px 12px; border-radius: 11px; background: var(--brand-soft); }
.subscription-history-grid span, .subscription-history-grid small { color: var(--muted); font-size: .75rem; }
.subscription-history-grid p { margin: 4px 0 0; font-size: .82rem; }
.subscription-overview-grid { display: grid; gap: 12px; margin-bottom: 18px; }
.subscription-overview-card { display: grid; gap: 5px; padding: 17px; }
.subscription-overview-card span, .subscription-overview-card small { color: var(--muted); font-size: .76rem; }
.subscription-overview-card strong { font-size: 1.25rem; }
.subscription-payment-help { margin-bottom: 22px; padding: 18px; }
.subscription-payment-help h2 { margin: 0 0 7px; font-size: 1rem; }
.subscription-payment-help p { margin: 0; color: var(--muted); }
.subscription-payment { display: grid; gap: 7px; padding: 16px; }
.subscription-payment > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.subscription-payment p, .subscription-payment small { margin: 0; color: var(--muted); }
.settings-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 22px; padding: 5px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.settings-tabs a { display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px 10px; border-radius: 11px; color: var(--muted); font-size: .82rem; font-weight: 800; text-align: center; text-decoration: none; }
.settings-tabs a:hover, .settings-tabs a.is-active { background: var(--brand-soft); color: var(--brand-dark); }
.billing-plan-list { display: grid; gap: 10px; }
.billing-plan { display: grid; gap: 8px; padding: 15px; }
.billing-plan > div { display: flex; justify-content: space-between; gap: 12px; }
.billing-plan span, .billing-plan p { margin: 0; color: var(--muted); font-size: .8rem; }
.subscription-plan--new { border: 1px dashed var(--brand); background: var(--brand-soft); }
@media (max-width: 520px) { .subscription-facts { grid-template-columns: 1fr; } .subscription-card__head { align-items: flex-start; } }
@media (max-width: 520px) { .settings-tabs { grid-template-columns: 1fr; } .settings-tabs a { justify-content: flex-start; min-height: 38px; } }
.status-pill { display: inline-flex; align-items: center; gap: 8px; width: max-content; padding: 9px 12px; color: var(--brand-dark); border: 1px solid #c8e6d8; border-radius: 999px; background: var(--brand-soft); font-size: 0.82rem; font-weight: 720; }
.status-pill span { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(24, 122, 90, 0.12); }
.dashboard-grid { display: grid; gap: 14px; }
.dashboard-card { display: grid; grid-template-columns: auto 1fr; gap: 16px; margin: 0; padding: 22px; box-shadow: 0 12px 38px rgba(27, 62, 48, 0.07); }
.dashboard-card h2 { margin-bottom: 7px; font-size: 1.08rem; letter-spacing: -0.02em; }
.dashboard-card p { margin-bottom: 0; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.dashboard-card--action { border-color: #c8e6d8; }
.card-icon { display: grid; place-items: center; width: 42px; height: 42px; color: var(--brand-dark); border-radius: 13px; background: var(--brand-soft); font-weight: 800; }
.card-label { margin-bottom: 7px !important; color: var(--brand) !important; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
.text-link { display: inline-flex; gap: 7px; margin-top: 16px; color: var(--brand-dark); font-weight: 760; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.update-banner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; margin: 0 0 18px; padding: 15px 17px; color: #654807; border: 1px solid #ead28f; border-radius: var(--radius-small); background: #fff9e8; text-decoration: none; }
.update-banner > span:first-child { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #fff0bf; font-size: 1.15rem; }
.update-banner strong, .update-banner span span { display: block; }
.update-banner strong { margin-bottom: 3px; }
.update-banner span span { color: #80651f; font-size: 0.84rem; line-height: 1.45; }
.admin-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; margin-top: 28px; padding: 18px 2px; color: var(--muted); font-size: 0.78rem; }

.account-filters { display: grid; gap: 14px; margin: 0 0 18px; padding: 18px; box-shadow: 0 10px 34px rgba(27, 62, 48, 0.06); }
.account-filters .button { align-self: end; }
.account-list { display: grid; gap: 13px; }
.account-card { position: relative; display: grid; gap: 17px; margin: 0; padding: 20px; box-shadow: 0 10px 34px rgba(27, 62, 48, 0.06); }
.account-card__identity { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; min-width: 0; }
.account-card__identity h2 { margin: 0 0 4px; font-size: 1.03rem; }
.account-card__identity a { display: block; color: var(--muted); font-size: 0.86rem; overflow-wrap: anywhere; }
.account-status { justify-self: start; padding: 7px 10px; border-radius: 999px; font-size: 0.74rem; font-weight: 780; }
.account-card__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.account-kind { padding: 7px 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 0.74rem; font-weight: 720; }
.account-status--pending { color: #78570e; background: #fff4d3; }
.account-status--active { color: var(--brand-dark); background: var(--brand-soft); }
.account-status--suspended { color: #8a4d0d; background: #fff0df; }
.account-status--rejected { color: #92283a; background: var(--danger-soft); }
.account-reason { padding: 13px 15px; border-left: 3px solid #e7b5bd; border-radius: 8px; background: #fffafb; }
.account-reason-grid { display: grid; gap: 10px; }
.account-reason--internal { border-left-color: #b9ccc3; background: #f7faf8; }
.account-reason strong { display: block; margin-bottom: 5px; font-size: 0.78rem; }
.account-reason p { margin: 0; color: var(--muted); font-size: 0.87rem; line-height: 1.5; }
.account-profile { display: grid; gap: 9px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #fbfdfc; }
.account-profile div { display: grid; gap: 3px; }
.account-profile dt { color: var(--muted); font-size: 0.74rem; font-weight: 700; }
.account-profile dd { margin: 0; font-size: 0.87rem; line-height: 1.45; overflow-wrap: anywhere; }
.account-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 9px; padding-top: 15px; border-top: 1px solid var(--line); }
.account-action-details { flex: 1 1 240px; }
.account-action-details summary { min-height: 42px; padding: 11px 14px; color: var(--danger); border: 1px solid #efc1c8; border-radius: 12px; background: #fffafb; font-size: 0.85rem; font-weight: 750; cursor: pointer; list-style-position: inside; }
.account-action-details[open] summary { margin-bottom: 12px; }
.account-action-details form { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #fbfdfc; }
.coming-soon-pill { display: inline-flex; margin-top: 16px; padding: 8px 11px; color: var(--brand-dark); border: 1px solid #c8e6d8; border-radius: 999px; background: var(--brand-soft); font-size: 0.76rem; font-weight: 750; }
.security-note--warning { color: #80500f; }

.vehicle-list { display: grid; gap: 12px; }
.vehicle-filters { display: flex; gap: 8px; margin: -6px 0 18px; padding: 5px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.vehicle-filter { display: inline-flex; flex: 1 1 0; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 12px; color: var(--muted); border-radius: 10px; font-size: 0.84rem; font-weight: 740; text-decoration: none; }
.vehicle-filter span { min-width: 24px; padding: 3px 7px; border-radius: 999px; background: #edf2ef; font-size: 0.72rem; text-align: center; }
.vehicle-filter--active { color: var(--brand-dark); background: var(--brand-soft); }
.vehicle-filter--active span { background: #fff; }
.vehicle-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; margin: 0; padding: 17px; color: inherit; text-decoration: none; box-shadow: 0 10px 34px rgba(27, 62, 48, 0.06); transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.vehicle-card:hover { border-color: #b9dccc; box-shadow: 0 15px 40px rgba(27, 62, 48, 0.10); transform: translateY(-1px); }
.vehicle-card__icon { display: grid; place-items: center; width: 43px; height: 43px; color: var(--brand-dark); border-radius: 13px; background: var(--brand-soft); }
.vehicle-card__main { min-width: 0; }
.vehicle-card__main strong, .vehicle-card__main span { display: block; overflow-wrap: anywhere; }
.vehicle-card__main strong { margin-bottom: 4px; font-size: 1rem; }
.vehicle-card__main span { color: var(--muted); font-size: 0.83rem; }
.vehicle-card__main small { display: block; margin-top: 6px; color: var(--brand-dark); font-size: 0.76rem; font-weight: 700; overflow-wrap: anywhere; }
.vehicle-card__meta { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.vehicle-card__meta small { color: var(--muted); font-weight: 650; }
.vehicle-card__arrow { display: none; color: var(--brand); font-size: 1.2rem; }
.account-status--unavailable { color: #8a4d0d; background: #fff0df; }
.account-status--service { color: #315b73; background: #eaf5fa; }
.account-status--sold { color: #5f6670; background: #eef0f2; }
.account-status--archived { color: #5f6670; background: #eef0f2; }
.empty-state-action { margin-top: 20px; }
.vehicle-form { margin-top: 0; }
.vehicle-heading { margin-top: 14px; }
.vehicle-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 10px; }
.vehicle-title-row h1 { margin: 0; }
.vehicle-title-row .account-status { padding: 5px 8px; font-size: .68rem; }
.vehicle-heading__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.vehicle-detail { margin: 0; padding: clamp(20px, 5vw, 32px); }
.vehicle-detail-grid { display: grid; gap: 16px; margin: 0; }
.vehicle-detail-grid div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.vehicle-detail-grid dt { margin-bottom: 5px; color: var(--muted); font-size: 0.76rem; font-weight: 720; }
.vehicle-detail-grid dd { margin: 0; font-weight: 720; overflow-wrap: anywhere; }
.vehicle-notes { margin-top: 22px; padding: 16px; border-radius: 14px; background: #f7faf8; }
.vehicle-notes strong { display: block; margin-bottom: 7px; font-size: 0.82rem; }
.vehicle-notes p { margin: 0; color: var(--muted); line-height: 1.55; overflow-wrap: anywhere; }
.vehicle-driver-summary { display: grid; gap: 17px; margin: 16px 0 0; padding: 20px; border-color: #c8e6d8; }
.vehicle-driver-summary h2 { margin: 0 0 5px; font-size: 1.05rem; }
.vehicle-driver-summary p:not(.eyebrow) { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.vehicle-state-panel { display: grid; gap: 18px; margin: 18px 0 0; padding: 20px; border-color: #ead8db; }
.vehicle-state-panel h2 { margin: 0 0 6px; font-size: 1rem; }
.vehicle-state-panel p { margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.5; }
.vehicle-state-panel form { margin: 0; }
.mileage-current { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; padding: 16px; border: 1px solid #c8e6d8; border-radius: 14px; background: var(--brand-soft); }
.mileage-current span { color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.mileage-current strong { color: var(--brand-dark); font-size: 1.14rem; }
.mileage-fields { margin-bottom: 26px; }
.vehicle-timeline-section { margin-top: 30px; scroll-margin-top: 84px; }
.timeline-heading { display: grid; gap: 14px; margin-bottom: 17px; }
.timeline-heading h2 { margin: 0; font-size: 1.22rem; }
.timeline-filters { display: flex; gap: 6px; width: max-content; max-width: 100%; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.timeline-filters a { padding: 8px 12px; color: var(--muted); border-radius: 9px; font-size: 0.78rem; font-weight: 740; text-decoration: none; }
.timeline-filters a.is-active { color: var(--brand-dark); background: var(--brand-soft); }
.vehicle-timeline { margin: 0; padding: 0; list-style: none; }
.timeline-event { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; padding-bottom: 13px; }
.timeline-event::before { position: absolute; top: 18px; bottom: -5px; left: 8px; width: 2px; content: ''; background: #d8e7df; }
.timeline-event:last-child::before { display: none; }
.timeline-marker { position: relative; z-index: 1; width: 12px; height: 12px; margin: 16px 0 0 3px; border: 3px solid #fff; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px #b9dccc; }
.timeline-event--archived .timeline-marker { background: #6d747b; box-shadow: 0 0 0 2px #d6dadd; }
.timeline-event__content { margin: 0; padding: 16px; box-shadow: 0 8px 26px rgba(27, 62, 48, 0.05); }
.timeline-event__top { display: grid; gap: 5px; }
.timeline-event__top strong { font-size: 0.91rem; }
.timeline-event__top time { color: var(--muted); font-size: 0.74rem; }
.timeline-mileage { margin: 10px 0 0; color: var(--brand-dark); font-size: 1.06rem; font-weight: 800; }
.timeline-note { margin: 9px 0 0; color: var(--text); font-size: 0.86rem; line-height: 1.5; overflow-wrap: anywhere; }
.timeline-related-user { margin: 9px 0 0; color: var(--brand-dark); font-size: 0.84rem; font-weight: 740; overflow-wrap: anywhere; }
.timeline-event__content small { display: block; margin-top: 10px; color: var(--muted); font-size: 0.72rem; }
.timeline-empty { margin: 0; padding: 20px; text-align: center; }
.timeline-empty p { margin: 0; color: var(--muted); }
.organization-users-layout { display: grid; gap: 24px; }
.organization-invite-form { align-self: start; }
.organization-invite-form h2, .section-heading-compact h2 { margin: 0 0 8px; font-size: 1.18rem; }
.organization-invite-form form { display: grid; gap: 20px; }
.section-heading-compact { margin-bottom: 14px; }
.member-list, .invitation-list { display: grid; gap: 12px; }
.member-card { display: grid; gap: 15px; margin: 0; padding: 18px; }
.member-card__identity { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; min-width: 0; }
.member-card__identity strong, .member-card__identity a { display: block; overflow-wrap: anywhere; }
.member-card__identity a { margin-top: 3px; color: var(--muted); font-size: 0.82rem; }
.member-card__badges { display: flex; flex-wrap: wrap; gap: 7px; }
.member-card__actions { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.member-role-form { display: grid; gap: 9px; }
.member-role-form .field { margin: 0; }
.member-owner-note { margin: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.5; }
.pending-invitations { margin-top: 30px; }
.invitation-card { display: grid; gap: 14px; margin: 0; padding: 17px; }
.invitation-card strong, .invitation-card span, .invitation-card small { display: block; overflow-wrap: anywhere; }
.invitation-card span { margin-top: 5px; color: var(--muted); font-size: 0.8rem; }
.invitation-card small { margin-top: 6px; color: var(--muted); font-size: 0.72rem; }
.invitation-link-card { display: grid; gap: 16px; margin: 0 0 22px; padding: 20px; border-color: #b9dfcf; }
.invitation-link-card h2 { margin: 0 0 6px; font-size: 1.08rem; }
.invitation-link-card p:not(.eyebrow) { margin: 0; color: var(--muted); line-height: 1.5; }
.copy-control { display: grid; gap: 9px; }
.copy-control input { width: 100%; min-width: 0; padding: 11px 13px; color: var(--muted); border: 1px solid #cbd9d2; border-radius: 12px; background: #fff; }
.invitation-accept-layout { max-width: 820px; }
.invitation-summary { display: flex; flex-wrap: wrap; gap: 8px 12px; width: max-content; max-width: 100%; margin-top: 18px; padding: 11px 14px; border-radius: 12px; background: var(--brand-soft); }
.invitation-summary strong, .invitation-summary span { overflow-wrap: anywhere; }
.invitation-summary span { color: var(--brand-dark); font-size: 0.82rem; font-weight: 720; }
.driver-current-card { display: grid; gap: 18px; margin: 0 0 18px; padding: 21px; border-color: #c8e6d8; }
.driver-current-card h2 { margin: 0 0 6px; font-size: 1.12rem; }
.driver-current-card p:not(.eyebrow), .driver-current-card small { display: block; margin: 0; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.driver-current-card small { margin-top: 6px; font-size: 0.76rem; }
.driver-assignment-form { margin-bottom: 28px; }
.driver-assignment-form form { display: grid; gap: 17px; }
.assignment-history { scroll-margin-top: 84px; }
.assignment-history-list { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.assignment-history-item { display: grid; gap: 13px; margin: 0; padding: 17px; }
.assignment-history-item strong, .assignment-history-item span { display: block; overflow-wrap: anywhere; }
.assignment-history-item > div:first-child span { margin-top: 4px; color: var(--muted); font-size: 0.8rem; }
.assignment-history-dates { display: grid; gap: 5px; color: var(--muted); font-size: 0.77rem; }
.assignment-history-dates .account-status { width: max-content; margin-top: 2px; }

.document-filters { display: flex; gap: 8px; margin: -4px 0 20px; padding: 4px 0; overflow-x: auto; scrollbar-width: thin; }
.document-filters a { flex: 0 0 auto; padding: 9px 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .82rem; font-weight: 720; text-decoration: none; }
.document-filters a.is-active { color: #fff; border-color: var(--brand); background: var(--brand); }
.cost-filters { display: grid; gap: 14px; margin-bottom: 18px; padding: 16px; }
.cost-filters__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cost-filters label { display: grid; gap: 6px; min-width: 0; color: var(--text); font-size: .78rem; font-weight: 720; }
.cost-filters select, .cost-filters input { width: 100%; min-width: 0; min-height: 43px; padding: 9px 11px; color: var(--text); border: 1px solid var(--line); border-radius: 11px; background: #fff; font: inherit; font-weight: 600; }
.cost-filters__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cost-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.cost-summary__card { display: grid; align-content: start; gap: 5px; min-height: 116px; padding: 17px; }
.cost-summary__card span { color: var(--muted); font-size: .77rem; font-weight: 760; }
.cost-summary__card strong { color: var(--text); font-size: clamp(1.12rem, 2.1vw, 1.45rem); line-height: 1.15; }
.cost-summary__card small { color: var(--muted); font-size: .72rem; }
.cost-summary__card--accent { border-color: #b9ddcc; background: var(--brand-soft); }
.cost-list { display: grid; gap: 12px; }
.cost-card { display: grid; gap: 14px; padding: 18px; }
.cost-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.cost-card__head > div { min-width: 0; }
.cost-card__head h2 { margin: 5px 0 4px; font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }
.cost-card__head p { margin: 0; color: var(--muted); font-size: .78rem; }
.cost-card__head > strong { flex: 0 0 auto; color: var(--brand-dark); font-size: 1rem; white-space: nowrap; }
.cost-card dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.cost-card dl div { min-width: 0; padding: 10px 12px; border-radius: 10px; background: #f7faf8; }
.cost-card dt { color: var(--muted); font-size: .68rem; font-weight: 700; }
.cost-card dd { margin: 3px 0 0; font-size: .8rem; font-weight: 700; overflow-wrap: anywhere; }
.document-list { display: grid; gap: 11px; }
.document-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 13px; align-items: center; padding: 16px; border-left: 4px solid var(--line); }
.document-row--expired, .document-row--missing_file { border-left-color: #c74646; }
.document-row--expiring { border-left-color: #d79225; }
.document-row--valid { border-left-color: var(--brand); }
.document-row__icon { display: grid; place-items: center; width: 40px; height: 40px; color: var(--brand-dark); border-radius: 12px; background: var(--brand-soft); }
.document-row__main { min-width: 0; }
.document-row__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.document-row h2, .document-row h3 { margin: 0; font-size: 1rem; }
.document-row p, .document-row small { display: block; margin: 4px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.document-row > .button { grid-column: 1 / -1; width: 100%; }
.document-status { display: inline-flex; width: max-content; padding: 5px 8px; color: #53645b; border-radius: 999px; background: #edf2ef; font-size: .7rem; font-weight: 760; line-height: 1.2; }
.document-status--valid { color: #0f694b; background: #def2e8; }
.document-status--expiring { color: #8a570c; background: #fff0cf; }
.document-status--expired, .document-status--missing_file { color: #9a3030; background: #fde4e4; }
.document-status--renewal_in_progress { color: #245c7a; background: #e2f1f8; }
.document-status--planned, .document-status--completed { color: #0f694b; background: #def2e8; }
.document-status--due_soon { color: #8a570c; background: #fff0cf; }
.document-status--overdue, .document-status--cancelled { color: #9a3030; background: #fde4e4; }

.operation-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.operation-switch a { padding: 10px; border-radius: 10px; color: var(--muted); font-weight: 760; text-align: center; text-decoration: none; }
.operation-switch a.is-active { color: var(--brand-dark); background: var(--brand-soft); }
.maintenance-list { display: grid; gap: 12px; }
.maintenance-card { display: grid; gap: 12px; padding: 18px; text-decoration: none; }
.maintenance-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.maintenance-card__head h2 { margin: 3px 0; font-size: 1.05rem; }
.maintenance-card__head p { margin: 0; color: var(--muted); }
.maintenance-card dl { display: flex; flex-wrap: wrap; gap: 18px; margin: 0; }
.maintenance-card dt { color: var(--muted); font-size: .75rem; }
.maintenance-card dd { margin: 2px 0 0; font-weight: 750; }
.maintenance-card__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.maintenance-card__actions form { margin: 0; }
.maintenance-list--compact .maintenance-card { padding: 14px 16px; }
.maintenance-list--compact .maintenance-card__head { align-items: center; }
.maintenance-list--compact .maintenance-card__head h2 { margin-bottom: 0; }
.maintenance-form .document-upload { margin-top: 16px; }

.issue-list { display: grid; gap: 12px; }
.issue-card { display: grid; gap: 10px; padding: 17px; color: inherit; border-left: 4px solid var(--line); text-decoration: none; }
.issue-card--medium { border-left-color: #d79225; }
.issue-card--high, .issue-card--critical { border-left-color: #c74646; }
.issue-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.issue-card__head h2 { display: -webkit-box; margin: 3px 0; overflow: hidden; font-size: 1rem; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.issue-card__head p, .issue-card > small, .issue-detail > small { margin: 0; color: var(--muted); font-size: .78rem; }
.issue-card__badges { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.issue-severity { display: inline-flex; width: max-content; padding: 5px 8px; color: #53645b; border-radius: 999px; background: #edf2ef; font-size: .7rem; font-weight: 760; line-height: 1.2; }
.issue-severity--medium { color: #8a570c; background: #fff0cf; }
.issue-severity--high, .issue-severity--critical { color: #9a3030; background: #fde4e4; }
.document-status--new { color: #245c7a; background: #e2f1f8; }
.document-status--in_progress { color: #8a570c; background: #fff0cf; }
.document-status--resolved { color: #0f694b; background: #def2e8; }
.issue-card__actions, .issue-status-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.issue-list--compact .issue-card { padding: 14px 16px; }
.issue-detail { display: grid; gap: 12px; margin-bottom: 14px; padding: 18px; }
.issue-detail p { margin: 0; line-height: 1.6; }
.issue-detail .issue-card__badges { justify-content: flex-start; }
.issue-history { margin-top: 24px; }
.issue-form .document-upload { margin-top: 16px; }

@media (max-width: 719px) {
    .maintenance-card { padding: 14px; }
    .maintenance-card__head { gap: 10px; }
    .maintenance-card__head h2 { font-size: .98rem; }
    .maintenance-card__head .document-status { flex: 0 0 auto; }
    .maintenance-card dl { gap: 10px 18px; }
    .operation-switch a { padding: 9px 6px; font-size: .82rem; }
    .mobile-vehicle-actions a { padding-inline: 3px; font-size: .68rem; }
    .issue-card { padding: 14px; }
    .issue-card__head { display: grid; gap: 8px; }
    .issue-card__badges { justify-content: flex-start; }
}

.driver-profile-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 16px; color: inherit; text-decoration: none; }
.driver-profile-card > span:nth-child(2) { display: grid; min-width: 0; }
.driver-profile-card small { color: var(--muted); overflow-wrap: anywhere; }
.driver-vehicles { margin-top: 24px; }
.driver-vehicle-link { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 16px; color: inherit; text-decoration: none; }
.driver-vehicle-link span, .driver-vehicle-link small { color: var(--muted); }
@media (max-width: 719px) {
    .driver-profile-card { grid-template-columns: auto minmax(0, 1fr); }
    .driver-profile-card .account-status { grid-column: 2; justify-self: start; }
    .driver-vehicle-link { grid-template-columns: 1fr; gap: 3px; }
}
.document-type-grid { display: grid; gap: 13px; margin-bottom: 34px; }
.document-type-card { display: grid; align-content: start; gap: 15px; padding: 18px; }
.document-type-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.document-type-card h2 { margin: 3px 0 0; font-size: 1.08rem; }
.document-requirement { display: block; margin-top: 4px; color: var(--danger); font-size: .7rem; font-weight: 730; }
.document-type-card__empty, .document-file-state { margin: 0; color: var(--muted); line-height: 1.5; }
.document-file-state a { color: var(--brand-dark); font-weight: 700; }
.document-mini-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.document-mini-meta div { padding: 10px; border-radius: 11px; background: #f7faf8; }
.document-mini-meta dt { color: var(--muted); font-size: .72rem; }
.document-mini-meta dd { margin: 4px 0 0; font-weight: 720; }
.document-card-actions { display: grid; gap: 8px; }
.document-card-actions form, .document-card-actions .button { width: 100%; }
.document-responsible { margin: -4px 0 0; color: var(--muted); font-size: .8rem; }
.document-workflow-link { color: var(--brand-dark); font-size: .82rem; font-weight: 750; text-decoration: none; }
.document-workflow-link:hover { text-decoration: underline; }
.document-workflow-form { display: grid; gap: 20px; max-width: 680px; }
.dashboard-alerts { margin: 0 0 24px; }
.dashboard-alerts .timeline-heading { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.dashboard-alerts .timeline-heading p { margin: 5px 0 0; color: var(--muted); font-size: .84rem; }
.document-alert-list { display: grid; gap: 9px; }
.document-alert-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; color: inherit; border-left: 4px solid #d79225; text-decoration: none; }
.document-alert-item--threshold-30 { border-left-color: #8aa99a; }
.document-alert-item--threshold-15 { border-left-color: #d79225; }
.document-alert-item--threshold-7 { border-left-color: #d06d2c; }
.document-alert-item--threshold-1 { border-left-color: #c74646; }
.document-alert-item--expired { border-left-color: #c74646; }
.document-alert-item--renewal_in_progress { border-left-color: #4385a6; }
.document-alert-item div { min-width: 0; }
.document-alert-item strong, .document-alert-item span, .document-alert-item small { display: block; overflow-wrap: anywhere; }
.document-alert-item div > span { margin-top: 4px; color: var(--muted); font-size: .8rem; }
.document-alert-item small { margin-top: 4px; color: var(--brand-dark); font-size: .74rem; }
.document-history { scroll-margin-top: 80px; }
.document-form { display: grid; gap: 18px; }
.document-upload { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.document-upload legend { margin-bottom: 8px; color: #34443d; font-size: .88rem; font-weight: 680; }
.document-upload__or { display: none; justify-self: center; color: var(--muted); font-size: .78rem; font-weight: 700; }
.fueling-form { display: grid; gap: 22px; }
.fueling-form fieldset + fieldset { margin-top: 0; }
.fueling-kind { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--brand-soft); }
.fueling-kind span, .fueling-kind strong { display: block; }
.fueling-kind span { margin-bottom: 4px; color: var(--muted); font-size: .77rem; }
.input-suffix { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border: 1px solid #cbd9d2; border-radius: 12px; background: #fff; overflow: hidden; }
.input-suffix:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(24, 122, 90, 0.12); }
.input-suffix input { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.input-suffix strong { padding: 0 13px; color: var(--brand-dark); }
.form-details { padding: 15px; border: 1px solid var(--line); border-radius: 14px; }
.form-details summary { color: var(--brand-dark); font-weight: 760; cursor: pointer; }
.form-details[open] summary { margin-bottom: 15px; }
.field-help { margin: 0 0 12px; color: var(--muted); line-height: 1.5; }
.check-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding: 15px 0; cursor: pointer; }
.check-row + .check-row { border-top: 1px solid var(--line); }
.check-row input { width: 20px; height: 20px; accent-color: var(--brand); }
.check-row strong, .check-row small { display: block; }
.check-row small { margin-top: 4px; color: var(--muted); line-height: 1.45; }
.fueling-list { display: grid; gap: 12px; }
.fueling-card { display: grid; gap: 15px; padding: 18px; }
.fueling-card h2 { margin: 2px 0 4px; font-size: 1.25rem; }
.fueling-card p { margin: 0; color: var(--muted); }
.fueling-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.fueling-card dl div { padding: 10px; border-radius: 10px; background: #f7faf8; }
.fueling-card dt { color: var(--muted); font-size: .72rem; }
.fueling-card dd { margin: 3px 0 0; font-weight: 720; }
.text-link { color: var(--brand-dark); font-size: .85rem; font-weight: 750; }

@media (max-width: 719px) {
    h1 { font-size: 1.45rem; line-height: 1.15; }
    h2 { font-size: 1.15rem; }
    .portal-page .page-heading h1 { font-size: 1.35rem; line-height: 1.15; letter-spacing: -.025em; }
    .compact-form-page .admin-main, .compact-content-page .admin-main { padding-top: 18px; }
    .compact-operation-form { gap: 17px; padding: 18px; border-radius: 18px; box-shadow: 0 8px 24px rgba(27, 62, 48, 0.05); }
    .compact-operation-form .registration-fields { gap: 13px; }
    .compact-operation-form .field small { margin-top: 2px; }
    .compact-page-heading { margin-bottom: 15px; }
    .portal-page .compact-page-heading h1 { font-size: 1.25rem; }
    .dashboard-alerts .timeline-heading { grid-template-columns: 1fr; gap: 5px; }
    .dashboard-alerts .text-link { margin-top: 0; }
    .document-alert-item { align-items: flex-start; padding: 13px; }
    .cost-filters { padding: 14px; }
    .cost-filters__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .cost-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .cost-summary__card { min-height: 98px; padding: 14px; }
    .cost-summary__card strong { font-size: 1.05rem; overflow-wrap: anywhere; }
    .cost-card { padding: 15px; }
    .cost-card__head { gap: 10px; }
    .cost-card__head > strong { font-size: .9rem; }
    .cost-card dl { grid-template-columns: 1fr; gap: 7px; }
}

.document-settings-layout { display: grid; gap: 18px; }
.settings-jump { display: flex; gap: 8px; margin: 0 0 20px; overflow-x: auto; }
.settings-jump a { flex: 0 0 auto; padding: 9px 13px; color: var(--brand-dark); border: 1px solid #c8e6d8; border-radius: 999px; background: var(--brand-soft); font-size: .8rem; font-weight: 750; text-decoration: none; }
.settings-section { padding-top: 8px; scroll-margin-top: 18px; }
.settings-section + .settings-section { margin-top: 34px; }
.settings-section__heading h2 { margin: 0 0 5px; font-size: 1.2rem; }
.settings-section__heading p { margin: 0; color: var(--muted); line-height: 1.5; }
.settings-stack { display: grid; gap: 14px; }
.settings-stack .surface, .settings-section > .surface { margin-top: 14px; }
.settings-form h3 { margin: 0 0 7px; font-size: 1rem; }
.settings-form > p { color: var(--muted); font-size: .84rem; line-height: 1.5; }
.settings-details { padding: 16px 18px; }
.settings-details summary { color: var(--brand-dark); font-weight: 760; cursor: pointer; }
.settings-details[open] summary { margin-bottom: 16px; }
.settings-details form { display: grid; gap: 14px; }
.document-settings-layout .settings-form h2 { margin-top: 0; font-size: 1.12rem; }
.document-settings-layout .settings-form form { display: grid; gap: 16px; }
.document-type-settings { display: grid; align-content: start; gap: 14px; }
.document-type-rule { display: grid; gap: 15px; padding: 17px; }
.document-type-rule h2 { margin: 0; font-size: 1rem; }
.document-type-rule p { margin: 5px 0 0; color: var(--muted); }
.document-type-rule form { display: grid; gap: 8px; }
.document-type-rule .check-control { margin: 0; }
.field textarea { width: 100%; min-height: 96px; padding: 11px 13px; color: var(--text); border: 1px solid #cbd9d2; border-radius: 12px; outline: none; resize: vertical; background: #fff; }
.field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(24, 122, 90, 0.12); }
.empty-state { margin: 0; text-align: center; }
.empty-state .card-icon { margin: 0 auto 15px; }
.empty-state h2 { font-size: 1.1rem; }
.empty-state p { margin: 0; color: var(--muted); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 20px; color: var(--muted); font-size: 0.86rem; }
.pagination a { padding: 9px 12px; color: var(--brand-dark); border-radius: 10px; background: var(--brand-soft); font-weight: 730; text-decoration: none; }

.update-card { margin-top: 0; text-align: center; }
.update-card > p { color: var(--muted); line-height: 1.55; }
.migration-list { display: grid; gap: 9px; margin: 24px 0; padding: 0; list-style: none; text-align: left; }
.migration-list li { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdfc; }
.migration-list li > span { display: grid; place-items: center; width: 34px; height: 34px; color: var(--brand-dark); border-radius: 10px; background: var(--brand-soft); }
.migration-list strong, .migration-list code { display: block; }
.migration-list code { margin-top: 4px; color: var(--muted); font-size: 0.76rem; }
.update-card .security-note { margin-top: 16px; }

.settings-form { margin-top: 0; padding: clamp(22px, 5vw, 34px); }
.editable-texts-form { display: grid; gap: 12px; }
.editable-text-group { display: grid; gap: 0; margin-top: 14px; padding: clamp(18px, 4vw, 28px); }
.editable-text-item { display: grid; gap: 10px; min-width: 0; }
.editable-text-item + .editable-text-item { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.editable-text-item__heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.editable-text-item__heading label { color: #34443d; font-size: .9rem; font-weight: 750; }
.editable-text-item > input, .editable-text-item > textarea { width: 100%; padding: 12px 13px; color: var(--text); border: 1px solid #cbd9d2; border-radius: 12px; outline: none; background: #fff; font: inherit; line-height: 1.5; }
.editable-text-item > textarea { min-height: 92px; resize: vertical; }
.editable-text-item > input:focus, .editable-text-item > textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(24, 122, 90, .12); }
.editable-text-item > input:disabled, .editable-text-item > textarea:disabled { color: var(--muted); background: #f3f7f5; cursor: not-allowed; }
.editable-text-item > small { color: var(--brand-dark); font-size: .76rem; font-weight: 700; }
.editable-text-preview { padding: 12px 14px; border-left: 3px solid var(--brand); border-radius: 0 10px 10px 0; background: var(--brand-soft); }
.editable-text-preview > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: .7rem; font-weight: 780; letter-spacing: .06em; text-transform: uppercase; }
.editable-text-preview p, .editable-text-default p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.editable-text-reset { margin: 0; }
.editable-text-default summary { color: var(--brand-dark); font-size: .8rem; font-weight: 700; cursor: pointer; }
.editable-text-default p { margin-top: 8px; padding: 11px 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; font-size: .82rem; background: #fbfdfc; }
.sticky-form-actions { position: sticky; z-index: 20; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 10px; margin-top: 20px; padding: 14px; border: 1px solid rgba(202, 220, 211, .95); border-radius: 16px; background: rgba(255, 255, 255, .96); box-shadow: 0 10px 30px rgba(22, 56, 43, .12); backdrop-filter: blur(14px); }
.sticky-form-actions p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.sticky-form-actions .button { width: 100%; }
.settings-form fieldset { margin: 0; padding: 0; border: 0; }
.settings-form fieldset + fieldset { margin-top: 30px; padding-top: 28px; border-top: 1px solid var(--line); }
.fieldset-help { margin: -8px 0 18px; color: var(--muted); line-height: 1.55; }
.colour-grid { display: grid; gap: 12px; }
.colour-field { display: grid; gap: 8px; color: #34443d; font-size: 0.88rem; font-weight: 680; }
.colour-control { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 7px 12px; border: 1px solid #cbd9d2; border-radius: 12px; background: #fff; }
.colour-control input { width: 38px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.colour-control code { color: var(--muted); font-size: 0.85rem; }
.field select { min-height: 48px; padding: 11px 38px 11px 13px; color: var(--text); border: 1px solid #cbd9d2; border-radius: 12px; outline: none; background: #fff; }
.field select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(24, 122, 90, 0.12); }
.file-field { display: grid; gap: 9px; padding: 18px; border: 1px dashed #b8cec2; border-radius: 14px; background: #fbfdfc; color: #34443d; font-size: 0.9rem; font-weight: 700; }
.file-field input { width: 100%; color: var(--muted); font-weight: 500; }
.file-field small { color: var(--muted); font-weight: 450; line-height: 1.5; }
.file-field.file-field--camera { display: none; position: relative; grid-template-columns: auto minmax(0, 1fr); align-items: center; border-style: solid; border-color: #b8dcca; background: var(--brand-soft); cursor: pointer; overflow: hidden; }
.file-field--camera .camera-icon { grid-row: 1 / span 2; display: grid; place-items: center; width: 40px; height: 40px; color: #fff; border-radius: 12px; background: var(--brand); font-size: 1.1rem; }
.file-field--camera strong, .file-field--camera small { min-width: 0; overflow-wrap: anywhere; }
.file-field--camera input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
@media (max-width: 719px) and (pointer: coarse) {
    .file-field.file-field--camera { display: grid; }
    .document-upload__or { display: block; }
}
.logo-preview { display: grid; place-items: center; min-height: 108px; margin-bottom: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.logo-preview img { max-width: min(100%, 260px); max-height: 82px; object-fit: contain; }
.check-control { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; color: var(--muted); font-size: 0.88rem; cursor: pointer; }
.check-control input { width: 18px; height: 18px; accent-color: var(--brand); }

.meta-list { display: grid; gap: 10px; margin: 24px 0 0; text-align: left; }
.meta-list div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-top: 1px solid var(--line); }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }

.reveal { animation: reveal 420ms ease both; }

@keyframes reveal {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 720px) {
    .page-shell, .installer-page { padding: 34px; }
    .installer-layout { padding-top: 28px; }
    .installer-hero { grid-template-columns: 1fr; margin-bottom: 38px; }
    .section-heading { grid-template-columns: minmax(0, 1fr) minmax(250px, 0.7fr); align-items: end; }
    .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .field-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .field--span-2 { grid-column: span 2; }
    .field--wide { max-width: 640px; }
    .form-actions { grid-template-columns: 1fr auto; align-items: center; }
    .button { min-width: 210px; }
    .auth-layout { grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.72fr); gap: clamp(46px, 8vw, 100px); }
    .auth-intro { align-self: stretch; align-content: space-between; padding: 34px 0; }
    .registration-page { padding: 30px; }
    .registration-header { padding-top: 4px; padding-bottom: 42px; }
    .account-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .registration-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .registration-fields .field--full { grid-column: 1 / -1; }
    .cui-lookup-row { grid-template-columns: minmax(220px, 1fr) auto; }
    .page-heading { grid-template-columns: 1fr auto; align-items: end; }
    .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-card--action { grid-column: span 2; }
    .colour-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sticky-form-actions { grid-template-columns: minmax(0, 1fr) auto; align-items: center; bottom: 18px; }
    .sticky-form-actions .button { width: auto; }
    .account-filters { grid-template-columns: minmax(240px, 1fr) minmax(170px, 0.45fr) auto; align-items: end; }
    .account-card { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 22px; }
    .account-profile, .account-reason-grid, .account-actions { grid-column: 1 / -1; }
    .vehicle-card { grid-template-columns: auto minmax(0, 1fr) auto auto; padding: 19px 21px; }
    .vehicle-card__meta { grid-column: auto; justify-content: flex-end; }
    .vehicle-card__arrow { display: block; }
    .vehicle-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vehicle-state-panel { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
    .vehicle-driver-summary, .driver-current-card { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
    .timeline-heading { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
    .timeline-event__top { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
    .member-role-form { grid-template-columns: minmax(190px, 1fr) auto; align-items: end; }
    .invitation-card { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
    .copy-control { grid-template-columns: minmax(0, 1fr) auto; }
    .assignment-history-item { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
    .assignment-history-dates { text-align: right; }
    .document-row { grid-template-columns: auto minmax(0, 1fr) auto; padding: 18px 20px; }
    .document-row > .button { grid-column: auto; width: auto; }
    .document-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .document-card-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .document-type-rule { grid-template-columns: minmax(0, 1fr) minmax(260px, .8fr); align-items: center; }
    .document-type-rule form { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
    .fueling-card { grid-template-columns: minmax(0, 1fr) minmax(260px, .7fr) auto; align-items: center; }
    .subscription-plan-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .subscription-overview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
    .admin-page.menu-open { overflow: auto; }
    .admin-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); }
    .admin-sidebar { position: sticky; top: 0; width: auto; height: 100vh; padding: 22px 18px; box-shadow: none; transform: none; transition: none; }
    .menu-close, .mobile-header, .mobile-tabbar, .drawer-backdrop, .mobile-vehicle-context { display: none !important; }
    .admin-main { padding: 46px 34px 44px; }
    .portal-page .admin-main { padding-top: 94px; }
    .desktop-vehicle-context { position: fixed; z-index: 35; top: 18px; right: 34px; display: block; width: min(310px, calc(100vw - 332px)); }
    .desktop-vehicle-context form { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; min-height: 58px; padding: 8px 10px; border: 1px solid rgba(202, 220, 211, .95); border-radius: 15px; background: rgba(255, 255, 255, .96); box-shadow: 0 9px 28px rgba(22, 56, 43, .1); backdrop-filter: blur(14px); }
    .desktop-vehicle-context__icon { display: grid; place-items: center; width: 38px; height: 38px; color: var(--brand-dark); border-radius: 11px; background: var(--brand-soft); }
    .desktop-vehicle-context__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .desktop-vehicle-context form > div { min-width: 0; }
    .desktop-vehicle-context select { width: 100%; min-height: 32px; padding: 4px 30px 4px 7px; color: var(--text); border: 0; outline: 0; background: transparent; font: inherit; font-size: .88rem; font-weight: 780; cursor: pointer; }
    .desktop-vehicle-context small { display: block; padding: 0 7px 2px; color: var(--muted); font-size: .66rem; }
}

@media (min-width: 1040px) {
    .dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dashboard-card--action { grid-column: auto; }
    .organization-users-layout { grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr); align-items: start; }
    .document-settings-layout { grid-template-columns: minmax(280px, .7fr) minmax(0, 1.3fr); align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
