@import url('../fonts/noto-sans-georgian.css');

:root {
    --ink-950: #101416;
    --ink-900: #171c1f;
    --ink-800: #242b2f;
    --ink-700: #384247;
    --ink-600: #526067;
    --ink-500: #718087;
    --ink-300: #bdc6ca;
    --ink-200: #d9dfe2;
    --ink-100: #e9edef;
    --ink-50: #f4f6f6;
    --paper: #ffffff;
    --accent: #1464f6;
    --accent-dark: #1649c5;
    --accent-secondary: #d91f79;
    --accent-soft: #eef3ff;
    --accent-on-dark: #9dbdff;
    --success: #1f7150;
    --danger: #a43d3d;
    --sidebar-width: 260px;
    --topbar-height: 74px;
    --font: "Noto Sans Georgian", "Segoe UI", Arial, sans-serif;
    --text-xs: 11px;
    --text-sm: 12px;
    --text-md: 14px;
    --text-lg: 16px;
    --leading-tight: 1.3;
    --leading-body: 1.6;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(16,20,22,.04), 0 5px 18px rgba(16,20,22,.035);
    --shadow-md: 0 12px 34px rgba(16,20,22,.08);
    --focus-ring: 0 0 0 3px rgba(20,100,246,.13);
}

*, *::before, *::after { box-sizing: border-box; }

/* Global thin scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #aeb9c0 transparent;
}
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    border: 1px solid transparent;
    border-radius: 999px;
    background: #aeb9c0;
    background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background-color: var(--accent); }
*::-webkit-scrollbar-corner { background: transparent; }

html { min-height: 100%; max-width: 100%; overflow-x: hidden; }

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink-900);
    background: var(--ink-50);
    font-family: var(--font);
    font-size: var(--text-md);
    line-height: var(--leading-body);
    -webkit-font-smoothing: antialiased;
    max-width: 100%;
    overflow-x: hidden;
}

button, input, select, textarea { font: inherit; }
h1, h2, h3, h4, strong, b { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
:where(a,button,input,select,textarea,summary):focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 3px; }

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.brand-mark {
    display: grid;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.22);
    color: var(--paper);
    background: var(--ink-800);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -.04em;
}

.brand-mark--large {
    width: 58px;
    height: 58px;
    border-color: rgba(255,255,255,.3);
    background: rgba(255,255,255,.08);
    font-size: 18px;
}

.button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 650;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.button:active { transform: translateY(1px); }
.button--primary { color: var(--paper); background: linear-gradient(135deg, var(--accent), var(--accent-secondary)); }
.button--primary:hover { background: linear-gradient(135deg, var(--accent-dark), #b91967); }
.button--secondary { border-color: var(--ink-200); color: var(--ink-800); background: var(--paper); }
.button--secondary:hover { border-color: var(--ink-500); }
.button--ghost { border-color: transparent; color: var(--ink-600); background: transparent; }
.button--ghost:hover { border-color: var(--ink-200); color: var(--danger); background: var(--paper); }
.button--full { width: 100%; }

/* Authentication */
.auth-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 32px;
    background:
        linear-gradient(rgba(16,20,22,.82), rgba(16,20,22,.96)),
        repeating-linear-gradient(115deg, transparent 0 80px, rgba(255,255,255,.025) 80px 81px),
        var(--ink-950);
}

.auth-shell {
    display: grid;
    width: min(920px, 100%);
    min-height: 560px;
    grid-template-columns: 1.04fr .96fr;
    border: 1px solid rgba(255,255,255,.11);
    background: var(--paper);
    box-shadow: 0 28px 80px rgba(0,0,0,.25);
}

.auth-brand {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 18px;
    overflow: hidden;
    padding: 54px;
    color: var(--paper);
    background: var(--ink-900);
}

.auth-brand::before {
    position: absolute;
    top: 0;
    right: 42px;
    width: 1px;
    height: 68%;
    background: linear-gradient(var(--accent), transparent);
    content: "";
}

.auth-brand::after {
    position: absolute;
    top: 54px;
    right: -80px;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(20,100,246,.24);
    transform: rotate(45deg);
    content: "";
}

.auth-brand > * { position: relative; z-index: 1; }
.auth-brand .eyebrow { color: var(--accent-on-dark); }
.auth-brand h1 { margin: 0; font-size: 42px; line-height: 1; letter-spacing: -.045em; }
.auth-brand h1 span { color: var(--accent); font-weight: 400; }
.auth-brand__copy { max-width: 280px; margin: 18px 0 0; color: var(--ink-300); }

.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 54px;
}

.login-panel__header h2 { margin: 0 0 8px; font-size: 25px; letter-spacing: -.03em; }
.login-panel__header > p:last-child { margin: 0 0 30px; color: var(--ink-600); }
.form-stack { display: grid; gap: 20px; }

.field { display: grid; gap: 8px; }
.field > span { color: var(--ink-700); font-size: 12px; font-weight: 650; }
.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 0 13px;
    border: 1px solid var(--ink-200);
    border-radius: 2px;
    outline: none;
    color: var(--ink-900);
    background: var(--paper);
    transition: border-color .16s, box-shadow .16s;
}
.field input, .field select { height: 45px; }
.field textarea { min-height: 96px; padding-top: 11px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink-600); box-shadow: 0 0 0 3px rgba(56,66,71,.08); }
.field > span b { color: var(--danger); font-weight: 700; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #c77a7a; }
.field > small { color: var(--danger); font-size: 10px; }
.alert { margin-bottom: 22px; padding: 11px 13px; border-left: 3px solid; font-size: 13px; }
.alert--error { border-color: var(--danger); color: #7e2d2d; background: #fbf2f2; }
.alert--success { border-color: var(--success); color: #185c41; background: #f1f7f4; }
.alert--warning { display: grid; gap: 3px; border-color: var(--accent-dark); color: #5f4b2c; background: #fbf8f1; }
.alert--warning a { font-weight: 700; text-decoration: underline; }
.login-panel__support { margin: 25px 0 0; color: var(--ink-500); font-size: 11px; text-align: center; }

/* Application shell */
.app-shell { min-height: 100vh; }
.sidebar {
    position: fixed;
    z-index: 40;
    inset: 0 auto 0 0;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    color: var(--ink-300);
    background: var(--ink-950);
    border-right: 1px solid #2b3033;
}

.sidebar__brand {
    display: flex;
    height: var(--topbar-height);
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar__logo {
    display: block;
    width: 100%;
    max-width: 180px;
    max-height: 58px;
    object-fit: contain;
    object-position: left center;
}
.sidebar__brand strong { display: block; color: var(--paper); font-size: 16px; letter-spacing: -.02em; }
.sidebar__brand span { color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.sidebar__nav { flex: 1; padding: 28px 14px; }
.sidebar__label { margin: 0 10px 12px; color: #687178; font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.nav-link {
    position: relative;
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 13px;
    margin-bottom: 3px;
    padding: 0 12px;
    border-radius: 2px;
    color: #aeb7bb;
    font-size: 13px;
    transition: color .15s, background .15s;
}
.nav-link svg, .logout-button svg, .icon-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.nav-link:hover { color: var(--paper); background: rgba(255,255,255,.045); }
.nav-link.is-active { color: var(--paper); background: rgba(255,255,255,.075); }
.nav-link.is-active::before { position: absolute; inset: 9px auto 9px -14px; width: 2px; background: linear-gradient(var(--accent), var(--accent-secondary)); content: ""; }
.sidebar__footer { padding: 20px 24px 24px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar__footer small { color: #697278; font-size: 9px; }
.environment-chip { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; color: #9ca7ac; font-size: 10px; }
.environment-chip span { width: 6px; height: 6px; border-radius: 50%; background: #4f9679; box-shadow: 0 0 0 3px rgba(79,150,121,.12); }

.workspace { min-width: 0; min-height: 100vh; margin-left: var(--sidebar-width); overflow-x: hidden; }
.topbar {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    height: var(--topbar-height);
    align-items: center;
    justify-content: space-between;
    padding: 0 34px;
    border-bottom: 1px solid var(--ink-200);
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(8px);
}
.topbar__left { display: flex; align-items: center; gap: 14px; }
.shell-search { position: relative; width: min(430px, 34vw); margin: 0 24px; }
.shell-search svg { position: absolute; top: 12px; left: 13px; width: 16px; height: 16px; fill: none; stroke: var(--ink-500); stroke-width: 1.8; }
.shell-search input { width: 100%; height: 40px; padding: 0 13px 0 39px; border: 1px solid var(--ink-200); border-radius: 2px; outline: none; background: var(--ink-50); font-size: 11px; }
.shell-search input:focus { border-color: var(--ink-600); background: var(--paper); box-shadow: 0 0 0 3px rgba(56,66,71,.07); }
.topbar-quick { padding: 7px 10px; border: 1px solid var(--ink-200); color: var(--ink-700); font-size: 10px; font-weight: 700; white-space: nowrap; }
.topbar-quick:hover { border-color: var(--ink-500); }
.breadcrumb { margin: 0 0 2px; color: var(--ink-500); font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.topbar h1 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.user-menu { display: flex; align-items: center; gap: 11px; }
.user-avatar { display: grid; width: 34px; height: 34px; place-items: center; color: var(--paper); background: var(--ink-800); font-size: 12px; font-weight: 700; }
.user-menu__identity { min-width: 120px; padding-right: 16px; border-right: 1px solid var(--ink-200); }
.user-menu__identity strong { display: block; overflow: hidden; max-width: 170px; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.user-menu__identity span { color: var(--ink-500); font-size: 10px; }
.logout-button, .icon-button { display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer; color: var(--ink-600); background: transparent; }
.logout-button { gap: 7px; padding: 8px; font-size: 11px; }
.logout-button:hover { color: var(--danger); }
.menu-button { display: none; width: 36px; height: 36px; }
.content { width: min(1420px, 100%); min-width: 0; margin: 0 auto; padding: 34px; overflow-x: hidden; }

.page-intro { display: flex; align-items: center; justify-content: flex-end; gap: 24px; margin-bottom: 16px; }
.page-intro h2 { margin: 0 0 5px; font-size: 24px; letter-spacing: -.035em; }
.page-intro > div > p:last-child { margin: 0; color: var(--ink-600); }
.page-intro > div:first-child { display: none; }
.page-intro:has(> div:only-child) { display: none; }
.status-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid; border-radius: 2px; font-size: 10px; font-weight: 650; white-space: nowrap; }
.status-badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-badge--ready { border-color: #bfd8cc; color: var(--success); background: #f1f7f4; }
.status-badge.deposit-badge { border-color: #c6a34c; color: #684b08; background: #fff3cc; margin-top: 6px; }
.deposit-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.deposit-toggle input { width: 18px; height: 18px; accent-color: #8a6614; }

.foundation-panel {
    position: relative;
    display: flex;
    min-height: 230px;
    align-items: center;
    overflow: hidden;
    margin-bottom: 34px;
    color: var(--paper);
    background: var(--ink-900);
}
.foundation-panel__accent { align-self: stretch; width: 4px; background: linear-gradient(var(--accent), var(--accent-secondary)); }
.foundation-panel__content { position: relative; z-index: 1; max-width: 720px; padding: 38px 42px; }
.foundation-panel .eyebrow { color: var(--accent-on-dark); }
.foundation-panel h3 { margin: 0 0 9px; font-size: 25px; letter-spacing: -.035em; }
.foundation-panel p:not(.eyebrow) { margin: 0; color: var(--ink-300); }
.foundation-list { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 27px; }
.foundation-list span { padding: 6px 9px; border: 1px solid rgba(255,255,255,.15); color: #d7dcde; font-size: 10px; }
.foundation-monogram { position: absolute; right: 5%; color: rgba(255,255,255,.035); font-size: 150px; font-weight: 900; letter-spacing: -.12em; transform: skew(-5deg); }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-heading h3 { margin: 0 0 3px; font-size: 16px; }
.section-heading p { margin: 0; color: var(--ink-500); font-size: 12px; }
.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.module-card { position: relative; min-height: 170px; padding: 24px; border: 1px solid var(--ink-200); background: var(--paper); }
.module-card__index { position: absolute; top: 20px; right: 22px; color: var(--ink-300); font-size: 10px; font-weight: 700; }
.module-card h3 { margin: 20px 0 7px; font-size: 15px; }
.module-card p { margin: 0; color: var(--ink-600); font-size: 12px; }
.module-card__state { display: inline-block; margin-top: 22px; padding-top: 9px; border-top: 1px solid var(--ink-100); color: var(--ink-500); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.placeholder-panel { display: grid; min-height: calc(100vh - var(--topbar-height) - 68px); place-content: center; justify-items: center; padding: 40px; text-align: center; }
.placeholder-icon { display: grid; width: 58px; height: 58px; place-items: center; margin-bottom: 24px; border: 1px solid var(--ink-200); color: var(--ink-700); background: var(--paper); font-weight: 800; }
.placeholder-panel h2 { margin: 0 0 8px; font-size: 25px; }
.placeholder-panel > p:not(.eyebrow) { max-width: 480px; margin: 0 0 25px; color: var(--ink-600); }

/* Clients and vehicle requests */
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.page-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 24px; margin-bottom: 16px; }
.page-toolbar h2 { margin: 0 0 5px; font-size: 24px; letter-spacing: -.035em; }
.page-toolbar > div > p:last-child { margin: 0; color: var(--ink-600); }
.page-toolbar > div:first-child { display: none; }
.page-toolbar:has(> div:only-child) { display: none; }

.filter-bar { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; padding: 12px; border: 1px solid var(--ink-200); background: var(--paper); }
.filter-bar select { height: 40px; min-width: 145px; padding: 0 30px 0 11px; border: 1px solid var(--ink-200); border-radius: 2px; color: var(--ink-700); background: var(--paper); }
.filter-bar .button { min-height: 40px; }
.search-field { position: relative; flex: 1; min-width: 220px; }
.search-field svg { position: absolute; top: 11px; left: 12px; width: 17px; height: 17px; fill: none; stroke: var(--ink-500); stroke-width: 1.7; }
.search-field input { width: 100%; height: 40px; padding: 0 12px 0 39px; border: 1px solid var(--ink-200); border-radius: 2px; outline: none; }
.search-field input:focus, .filter-bar select:focus { border-color: var(--ink-600); }
.filter-reset { padding: 8px; color: var(--ink-500); font-size: 11px; }
.filter-reset:hover { color: var(--danger); }

.filter-shell { margin-bottom: 16px; overflow: hidden; border: 1px solid var(--ink-200); border-radius: 5px; background: var(--paper); box-shadow: 0 3px 14px rgba(16,20,22,.025); }
.filter-shell__bar { display: flex; min-height: 62px; align-items: center; gap: 9px; padding: 10px 12px; }
.filter-search { min-width: 240px; }
.filter-search input { height: 42px; background: var(--ink-50); }
.filter-search input:focus { border-color: var(--accent); background: var(--paper); box-shadow: 0 0 0 3px rgba(20,100,246,.08); }
.filter-search-button { min-height: 42px; }
.filter-toggle { display: inline-flex; min-height: 42px; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid var(--ink-200); border-radius: 3px; color: var(--ink-700); background: var(--paper); cursor: pointer; font-size: 12px; font-weight: 650; white-space: nowrap; }
.filter-toggle:hover, .filter-toggle[aria-expanded="true"] { border-color: #b9caef; color: var(--accent-dark); background: var(--accent-soft); }
.filter-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.filter-toggle b { display: grid; min-width: 19px; height: 19px; place-items: center; padding: 0 5px; border-radius: 20px; color: var(--paper); background: linear-gradient(135deg, var(--accent), var(--accent-secondary)); font-size: 9px; }
.filter-toggle i { width: 7px; height: 7px; margin: -3px 1px 0 3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .2s ease, margin .2s ease; }
.filter-toggle[aria-expanded="true"] i { margin-top: 3px; transform: rotate(225deg); }
.filter-clear { padding: 8px 5px; color: var(--ink-500); font-size: 11px; font-weight: 600; white-space: nowrap; }
.filter-clear:hover { color: var(--danger); }
.filter-panel { border-top: 1px solid var(--ink-100); }
.filter-panel__inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 12px; align-items: end; padding: 16px; background: #fafbfc; }
.filter-panel__inner > label { display: grid; min-width: 0; gap: 6px; color: var(--ink-600); font-size: 11px; font-weight: 600; }
.filter-panel__inner input, .filter-panel__inner select { width: 100%; min-width: 0; height: 40px; padding: 0 10px; border: 1px solid var(--ink-200); border-radius: 2px; outline: none; color: var(--ink-800); background: var(--paper); }
.filter-panel__inner input:focus, .filter-panel__inner select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(20,100,246,.07); }
.filter-panel__actions { display: flex; align-items: flex-end; }
.filter-panel__actions .button { width: 100%; min-height: 40px; }
.filter-shell--enhanced .filter-panel { display: grid; grid-template-rows: 0fr; opacity: 0; border-top-color: transparent; transition: grid-template-rows .22s ease, opacity .16s ease, border-color .16s ease; }
.filter-shell--enhanced .filter-panel__inner { min-height: 0; overflow: hidden; padding-top: 0; padding-bottom: 0; transition: padding .22s ease; }
.filter-shell--enhanced.is-open .filter-panel { grid-template-rows: 1fr; opacity: 1; border-top-color: var(--ink-100); }
.filter-shell--enhanced.is-open .filter-panel__inner { padding-top: 16px; padding-bottom: 16px; }

.data-panel { border: 1px solid var(--ink-200); background: var(--paper); }
.data-panel__header { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 17px; border-bottom: 1px solid var(--ink-100); color: var(--ink-500); font-size: 11px; }
.data-panel__header strong { color: var(--ink-800); }
.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; }
.data-table { width: 100%; min-width: 860px; border-collapse: collapse; }
.data-table th { padding: 12px 15px; border-bottom: 1px solid var(--ink-200); color: var(--ink-500); background: #fafbfb; font-size: 9px; font-weight: 750; letter-spacing: .07em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 15px; border-bottom: 1px solid var(--ink-100); color: var(--ink-600); font-size: 12px; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfcfc; }
.data-table tbody .clickable-row { cursor: pointer; transition: background-color .16s ease; }
.data-table tbody .clickable-row:hover,
.data-table tbody .clickable-row:focus-within { background: #f4f7fb; }
.data-table .align-right { text-align: right; }
.table-card { overflow: hidden; border: 1px solid var(--ink-200); border-radius: 5px; background: var(--paper); box-shadow: 0 3px 14px rgba(16,20,22,.03); }
.table-card .data-table { min-width: 980px; }
.table-card .data-table th { height: 46px; padding: 0 17px; color: var(--ink-600); background: #f8fafb; white-space: nowrap; }
.table-card .data-table td { height: 68px; padding: 12px 17px; }
.table-card .data-table tbody tr { transition: background .14s ease, box-shadow .14s ease; }
.table-card .data-table tbody tr:hover { background: #f8faff; box-shadow: inset 3px 0 0 var(--accent); }
.table-card .data-table td:first-child > strong { color: var(--ink-900); font-size: 13px; }
.table-card .data-table td:last-child { text-align: right; }
.table-primary-link { color: var(--ink-900); font-weight: 700; }
.table-primary-link:hover { color: var(--accent-dark); }
.table-card .table-action { display: inline-flex; min-height: 30px; align-items: center; padding: 0 9px; border: 1px solid var(--ink-200); border-radius: 3px; color: var(--ink-700); background: var(--paper); }
.table-card .table-action:hover { border-color: #b9caef; color: var(--accent-dark); background: var(--accent-soft); }
.table-empty { height: 180px !important; color: var(--ink-500) !important; text-align: center !important; }
.table-subline, .cell-stack small { margin-top: 3px; color: var(--ink-500); line-height: 1.45; }
.cell-stack { display: grid; gap: 2px; }
.cell-stack b { color: var(--ink-800); font-size: 11px; }
.table-amount strong { color: var(--ink-950); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-metric { color: var(--ink-900) !important; font-size: 15px !important; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.role-badge, .entity-chip { display: inline-flex; width: max-content; padding: 5px 8px; border-radius: 20px; color: var(--ink-700); background: var(--ink-100); font-size: 9px; font-weight: 650; white-space: nowrap; }
.data-table--vehicles { min-width: 1120px !important; }
.table-card .data-table--payments { width: 100%; min-width: 0; table-layout: fixed; }
.table-card .data-table--payments th { padding: 12px 10px; white-space: normal; overflow-wrap: anywhere; }
.table-card .data-table--payments td { padding-inline: 10px; overflow-wrap: anywhere; }
.data-table--payments th:nth-child(3) { width: 23%; }
.data-table--payments .table-amount strong { white-space: normal; overflow-wrap: anywhere; }
.data-table--payments .payment-status { max-width: 100%; white-space: normal; }
.data-table--payments .payment-disclosure-column { width: 58px; padding-inline: 12px; }
.data-table--payments .payment-disclosure-cell { width: 58px; padding-inline: 12px; }
.payment-vehicle-row { cursor: pointer; }
.payment-vehicle-row.is-expanded { background: #f4f7ff !important; box-shadow: inset 3px 0 0 var(--accent) !important; }
.payment-disclosure { display: inline-flex; min-width: 34px; height: 30px; align-items: center; justify-content: center; gap: 6px; padding: 0 7px; border: 1px solid var(--ink-200); border-radius: 7px; color: var(--ink-600); background: var(--paper); cursor: pointer; font-size: 9px; font-weight: 750; }
.payment-disclosure:hover, .payment-disclosure[aria-expanded="true"] { border-color: #b9caef; color: var(--accent-dark); background: var(--accent-soft); }
.payment-disclosure i { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .16s ease; }
.payment-disclosure[aria-expanded="true"] i { transform: rotate(45deg); }
.payment-vehicle-name { display: block; max-width: 260px; color: var(--ink-900); font-weight: 700; }
.payment-vehicle-name a:hover { color: var(--accent-dark); text-decoration: underline; text-decoration-color: rgba(20,100,246,.32); text-underline-offset: 3px; }
.payment-group-total { min-width: 0; }
.payment-group-total strong { display: block; }
.payment-group-total span { color: var(--ink-300); }
.data-table--payments .payment-group-details,
.data-table--payments .payment-group-details:hover { background: #f6f8fb; box-shadow: none; }
.table-card .data-table--payments .payment-group-details > td { height: auto; padding: 0 16px 18px 58px; border-bottom: 1px solid var(--ink-200); text-align: left; white-space: normal; }
.payment-transactions { overflow: hidden; border: 1px solid #dce3ec; border-radius: 9px; background: var(--paper); box-shadow: 0 8px 22px rgba(16,20,22,.04); }
.payment-transactions__heading { display: flex; min-height: 46px; align-items: center; justify-content: space-between; padding: 0 15px; border-bottom: 1px solid var(--ink-100); background: #fbfcfd; }
.payment-transactions__heading strong { color: var(--ink-800); font-size: 11px; }
.payment-transactions__heading span { color: var(--ink-500); font-size: 9px; }
.payment-transaction-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; padding: 14px; }
.payment-transaction-card { display: grid; min-width: 0; gap: 7px; padding: 10px 11px; border: 1px solid var(--ink-100); border-radius: 7px; color: inherit; background: #fcfdfd; transition: border-color .16s ease, background-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.payment-transaction-card:hover { border-color: #cbd8ee; background: var(--paper); box-shadow: 0 5px 13px rgba(22,73,197,.06); transform: translateY(-1px); }
.payment-transaction-card:active { transform: translateY(0); }
.payment-transaction-card__top { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; }
.payment-transaction-card__top strong { overflow: hidden; color: var(--ink-800); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.payment-transaction-card__top .payment-status { flex: 0 0 auto; padding: 3px 6px; font-size: 7px; }
.payment-transaction-card__amount { display: flex; align-items: baseline; gap: 5px; }
.payment-transaction-card__amount strong { color: var(--ink-950); font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: -.025em; white-space: nowrap; }
.payment-transaction-card__amount small { color: var(--ink-500); font-size: 7px; font-weight: 700; }
.payment-transaction-card__breakdown { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 6px 0; border-top: 1px solid var(--ink-100); border-bottom: 1px solid var(--ink-100); }
.payment-transaction-card__breakdown > div { display: grid; min-width: 0; gap: 1px; }
.payment-transaction-card__breakdown > div + div { padding-left: 8px; border-left: 1px solid var(--ink-100); }
.payment-transaction-card__breakdown dt { overflow: hidden; color: var(--ink-500); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.payment-transaction-card__breakdown dd { margin: 0; color: var(--ink-800); font-size: 9px; font-weight: 700; font-variant-numeric: tabular-nums; }
.payment-transaction-card__meta { display: grid; grid-template-columns: 1.15fr .8fr .9fr; gap: 7px; min-width: 0; }
.payment-transaction-card__meta > span { display: grid; min-width: 0; gap: 2px; }
.payment-transaction-card__meta small { color: var(--ink-500); font-size: 7px; font-weight: 650; }
.payment-transaction-card__meta time,
.payment-transaction-card__meta b { overflow: hidden; color: var(--ink-700); font-size: 8px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.payment-transaction-card { align-content: start; gap: 12px; padding: 16px; text-align: left; }
.payment-transaction-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.payment-transaction-card__top { flex-wrap: wrap; }
.payment-transaction-card__top strong { font-size: 12px; line-height: 1.6; white-space: normal; overflow-wrap: anywhere; }
.payment-transaction-card__top .payment-status { padding: 4px 7px; font-size: 9px; }
.payment-transaction-card__amount { flex-wrap: wrap; }
.payment-transaction-card__amount strong { font-size: 21px; white-space: normal; overflow-wrap: anywhere; }
.payment-transaction-card__amount small { font-size: 9px; }
.payment-transaction-card__breakdown { gap: 12px; padding-block: 12px; }
.payment-transaction-card__breakdown dt { font-size: 10px; line-height: 1.5; white-space: normal; }
.payment-transaction-card__breakdown dd { font-size: 12px; }
.payment-transaction-card__meta { grid-template-columns: repeat(auto-fit, minmax(min(100%, 100px), 1fr)); gap: 12px; }
.payment-transaction-card__meta small { font-size: 10px; }
.payment-transaction-card__meta time,
.payment-transaction-card__meta b { font-size: 11px; line-height: 1.6; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 900px) {
    .data-table--payments thead { display: none; }
    .data-table--payments tbody { display: block; }
    .data-table--payments .payment-vehicle-row { display: grid; grid-template-columns: 44px repeat(2, minmax(0, 1fr)); padding: 12px; border-bottom: 1px solid var(--ink-200); }
    .table-card .data-table--payments .payment-vehicle-row > td { width: auto; height: auto; min-width: 0; padding: 8px; border: 0; text-align: left; white-space: normal; }
    .data-table--payments .payment-disclosure-cell { grid-row: span 4; }
    .data-table--payments .payment-vehicle-row > td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 5px; color: var(--ink-500); font-size: 10px; }
    .data-table--payments .payment-group-details:not([hidden]) { display: block; }
    .table-card .data-table--payments .payment-group-details > td { display: block; padding: 0 12px 12px; }
}
@media (max-width: 480px) {
    .payment-transaction-grid { padding: 10px; }
    .payment-transaction-card { padding: 12px; }
    .payment-transactions__heading { gap: 10px; padding: 12px; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
    .payment-transaction-card { transition: none; }
    .payment-transaction-card:hover { transform: none; }
}
.data-table--team { min-width: 1180px !important; }
.data-table--activity { min-width: 980px !important; }
.data-table--vehicles td:nth-child(2) { font-variant-numeric: tabular-nums; }
.data-table--vehicles td:nth-last-child(2),
.data-table--payments td:first-child,
.data-table--team td:nth-last-child(2),
.data-table--activity td:first-child { color: var(--ink-500); white-space: nowrap; }
.data-table--activity th:nth-child(5) { width: 36%; }
.activity-description { min-width: 260px; color: var(--ink-700) !important; line-height: 1.6 !important; }
.client-name, .vehicle-name { display: block; color: var(--ink-900); font-weight: 700; }
.client-name:hover, .table-action:hover { color: var(--accent-dark); }
.phone-link { font-variant-numeric: tabular-nums; }
.subtle-label { display: inline-block; margin-top: 3px; color: var(--danger); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.table-action { color: var(--ink-700); font-size: 11px; font-weight: 700; white-space: nowrap; }
.empty-cell { height: 150px; color: var(--ink-500) !important; text-align: center; }
.empty-state { display: grid; min-height: 190px; place-content: center; justify-items: center; gap: 9px; padding: 28px; border: 1px solid var(--ink-200); color: var(--ink-500); background: var(--paper); text-align: center; }
.empty-state strong { color: var(--ink-800); font-size: 14px; }
.empty-state p { max-width: 560px; margin: 0; font-size: 11px; }
.empty-state--table { min-height: 125px; border: 0; }
.empty-state--table .button { margin-top: 5px; }

.status-badge.status--new { border-color: #cfd6da; color: #506068; background: #f5f7f8; }
.status-badge.status--contacted { border-color: #bfd1db; color: #35657b; background: #f1f7f9; }
.status-badge.status--searching { border-color: #d8c89d; color: #78602d; background: #fbf8ef; }
.status-badge.status--options_offered { border-color: #c8c2df; color: #5b5082; background: #f6f4fa; }
.status-badge.status--waiting_for_auction { border-color: #d8c1a9; color: #855c37; background: #faf5f0; }
.status-badge.status--purchased { border-color: #b8d5c8; color: var(--success); background: #f0f7f4; }
.status-badge.status--not_interested { border-color: #ddc0c0; color: #914242; background: #fbf3f3; }

.pagination { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 0 17px; border-top: 1px solid var(--ink-100); font-size: 11px; }
.pagination > div { display: flex; gap: 4px; }
.pagination a, .pagination span { display: inline-flex; min-width: 30px; min-height: 30px; align-items: center; justify-content: center; padding: 0 8px; border: 1px solid transparent; }
.pagination a:hover { border-color: var(--ink-200); }
.pagination .is-current { color: var(--paper); background: var(--ink-800); }
.pagination .is-disabled { color: var(--ink-300); }

.entity-form { display: grid; gap: 16px; }
.form-section { padding: 26px; border: 1px solid var(--ink-200); background: var(--paper); }
.form-section__heading { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 25px; padding-bottom: 18px; border-bottom: 1px solid var(--ink-100); }
.form-section__heading > span { display: grid; width: 30px; height: 30px; place-items: center; color: var(--accent-dark); background: var(--accent-soft); font-size: 9px; font-weight: 800; }
.form-section__heading h3 { margin: 0 0 3px; font-size: 15px; }
.form-section__heading p { margin: 0; color: var(--ink-500); font-size: 11px; }
.form-grid { display: grid; gap: 18px; }
.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field--full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 0 30px; }

/* Compact two-column client creation */
.create-client-form { gap: 14px; }
body:has(.create-client-form) .workspace, body:has(.create-client-form) .content { overflow-x: clip; }
.create-client-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); gap: 16px; align-items: start; }
.create-client-card { min-width: 0; padding: 21px; border-radius: 5px; box-shadow: 0 3px 14px rgba(16,20,22,.025); }
.create-client-card .form-section__heading { margin-bottom: 18px; padding-bottom: 14px; }
.create-client-card .form-section__heading > span { flex: 0 0 30px; }
.create-core-grid, .create-extras__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.create-client-info-card .create-core-grid,
.create-client-info-card .create-extras__grid { grid-template-columns: minmax(0, 1fr); }
.create-client-card .field { gap: 6px; }
.create-client-card .field input, .create-client-card .field select { height: 42px; }
.create-client-card .field textarea { min-height: 82px; }
.create-request-heading { align-items: center; }
.create-request-heading > div { min-width: 0; }
.apple-switch { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; margin-left: auto; cursor: pointer; }
.apple-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.apple-switch > span { position: relative; width: 42px; height: 24px; flex: 0 0 42px; border-radius: 24px; background: var(--ink-300); box-shadow: inset 0 0 0 1px rgba(16,20,22,.06); transition: background .2s ease, box-shadow .2s ease; }
.apple-switch > span i { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--paper); box-shadow: 0 2px 5px rgba(16,20,22,.25); transition: transform .2s ease; }
.apple-switch input:checked + span { background: linear-gradient(135deg, var(--accent), var(--accent-secondary)); }
.apple-switch input:checked + span i { transform: translateX(18px); }
.apple-switch input:focus-visible + span { outline: 2px solid var(--accent-dark); outline-offset: 3px; }
.apple-switch > b { color: var(--ink-700); font-size: 10px; font-weight: 650; white-space: nowrap; }
.create-request-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.create-request-card.is-disabled { background: linear-gradient(145deg, var(--paper), #fafbfc); }
.create-request-empty { display: grid; min-height: 178px; place-content: center; justify-items: center; gap: 7px; padding: 26px; color: var(--ink-500); text-align: center; }
.create-request-empty[hidden] { display: none; }
.create-request-empty::before { display: grid; width: 42px; height: 42px; place-items: center; margin-bottom: 4px; border-radius: 50%; color: var(--accent-dark); background: var(--accent-soft); content: '+'; font-size: 22px; font-weight: 400; }
.create-request-empty strong { color: var(--ink-800); font-size: 12px; }
.create-request-empty p { max-width: 390px; margin: 0; font-size: 10px; line-height: 1.6; }
.create-extras { margin-top: 18px; overflow: hidden; border: 1px solid var(--ink-200); border-radius: 4px; background: #fafbfc; }
.create-extras summary { position: relative; display: grid; gap: 2px; padding: 13px 42px 13px 14px; cursor: pointer; list-style: none; user-select: none; }
.create-extras summary::-webkit-details-marker { display: none; }
.create-extras summary::after { position: absolute; top: 17px; right: 17px; width: 8px; height: 8px; border-right: 1.5px solid var(--ink-500); border-bottom: 1.5px solid var(--ink-500); content: ''; transform: rotate(45deg); transition: top .18s ease, transform .18s ease; }
.create-extras[open] summary::after { top: 21px; transform: rotate(225deg); }
.create-extras summary:hover { background: var(--accent-soft); }
.create-extras summary > span { color: var(--ink-800); font-size: 11px; font-weight: 700; }
.create-extras summary > small { color: var(--ink-500); font-size: 9px; line-height: 1.45; }
.create-extras[open] summary { border-bottom: 1px solid var(--ink-100); background: var(--paper); }
.create-extras__grid { padding: 15px; }
.create-client-actions { position: sticky; z-index: 20; bottom: 12px; min-height: 66px; align-items: center; justify-content: space-between; margin-top: 0; padding: 11px 13px; border: 1px solid var(--ink-200); border-radius: 5px; background: rgba(255,255,255,.95); box-shadow: 0 -8px 28px rgba(16,20,22,.08); backdrop-filter: blur(10px); }
.create-client-actions > span { color: var(--ink-500); font-size: 10px; }
.create-client-actions > div { display: flex; gap: 9px; }
.standalone-request-form { width: min(780px, 100%); margin: 0 auto; }
.standalone-request-card { width: 100%; }

.profile-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.profile-heading__identity { display: flex; align-items: center; gap: 16px; }
.profile-initial { display: grid; width: 54px; height: 54px; place-items: center; color: var(--paper); background: var(--ink-800); font-size: 18px; font-weight: 800; }
.profile-client-id { width: auto; min-width: 54px; padding-inline: 10px; flex-shrink: 0; font-size: 16px; font-variant-numeric: tabular-nums; }
.client-info-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.client-info-edit { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; height: 32px; border: 1px solid #cdcdcd; border-radius: 7px; color: #555; background: transparent; }
.client-info-edit svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.client-info-edit:hover { color: #222; border-color: #aaa; background: rgba(0,0,0,.04); }
.client-info-edit:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.profile-kicker { display: flex; align-items: center; gap: 9px; margin-bottom: 3px; color: var(--ink-500); font-size: 9px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.profile-kicker b { padding: 2px 5px; color: var(--danger); background: #f8eaea; font-size: 8px; }
.profile-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.035em; }
.profile-heading__identity a { color: var(--ink-600); font-size: 12px; }
.profile-actions { display: flex; align-items: center; gap: 7px; }
.profile-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.profile-sidebar, .profile-main { display: grid; gap: 16px; }
/* Put the requested vehicle directly after client information when stacked. */
@media (max-width: 900px) {
    .client-profile-page .profile-sidebar,
    .client-profile-page .profile-main { display: contents; }
    .client-profile-page .client-info-card { order: -2; }
    .client-profile-page .profile-main > .request-summary,
    .client-profile-page .profile-main > .empty-workspace { order: -1; }
}
.detail-section, .status-control, .history-panel, .empty-workspace { border: 1px solid var(--ink-200); background: var(--paper); }
.detail-section__heading { padding: 17px 19px; border-bottom: 1px solid var(--ink-100); }
.detail-section__heading h3 { margin: 0; font-size: 13px; }
.detail-section__heading p { margin: 3px 0 0; color: var(--ink-500); font-size: 10px; }
.detail-list { margin: 0; padding: 8px 19px; }
.detail-list div { display: grid; gap: 2px; padding: 11px 0; border-bottom: 1px solid var(--ink-100); }
.detail-list div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--ink-500); font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.detail-list dd { margin: 0; overflow-wrap: anywhere; color: var(--ink-800); font-size: 12px; }
.notes-copy { margin: 0; padding: 17px 19px; color: var(--ink-600); font-size: 12px; white-space: normal; }

.request-hero { border-left: 3px solid var(--accent); color: var(--paper); background: var(--ink-900); }
.request-hero__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 25px 27px 20px; }
.request-hero .eyebrow { color: var(--accent-on-dark); }
.request-hero h3 { margin: 0; font-size: 25px; letter-spacing: -.035em; }
.request-hero .status-badge { background: rgba(255,255,255,.06); }
.request-specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid rgba(255,255,255,.1); border-bottom: 1px solid rgba(255,255,255,.1); }
.request-specs div { min-height: 76px; padding: 17px 19px; border-right: 1px solid rgba(255,255,255,.1); }
.request-specs div:nth-child(4n) { border-right: 0; }
.request-specs span { display: block; margin-bottom: 4px; color: #818b90; font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.request-specs strong { color: #e1e5e6; font-size: 11px; font-weight: 650; }
.request-notes { margin: 0; padding: 18px 27px 0; color: var(--ink-300); font-size: 11px; }
.request-hero__actions { padding: 19px 27px; text-align: right; }
.request-hero__actions .table-action { color: var(--accent-on-dark); }

.status-control form { display: grid; grid-template-columns: 210px minmax(180px, 1fr) auto; gap: 9px; padding: 17px 19px; }
.status-control select, .status-control input { width: 100%; height: 40px; padding: 0 11px; border: 1px solid var(--ink-200); border-radius: 2px; outline: none; background: var(--paper); }
.status-control .button { min-height: 40px; }
.timeline { padding: 5px 19px 14px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 135px 1fr; gap: 2px 16px; margin-left: 5px; padding: 15px 0 15px 21px; border-left: 1px solid var(--ink-200); }
.timeline-item__dot { position: absolute; top: 20px; left: -4px; width: 7px; height: 7px; border: 2px solid var(--paper); border-radius: 50%; background: var(--accent-dark); box-shadow: 0 0 0 1px var(--accent-dark); }
.timeline-item time { grid-row: span 2; color: var(--ink-500); font-size: 9px; font-weight: 650; }
.timeline-item strong { color: var(--ink-800); font-size: 11px; }
.timeline-item p { margin: 0; color: var(--ink-500); font-size: 10px; }
.empty-workspace { display: grid; min-height: 260px; place-content: center; text-align: center; }
.empty-workspace h3 { margin: 0 0 5px; }
.empty-workspace p { margin: 0; color: var(--ink-500); }

/* Communications and operational dashboard */
.profile-follow-up { min-width: 178px; padding: 8px 12px; border-left: 2px solid var(--ink-300); background: var(--ink-100); }
.profile-follow-up span { display: block; margin-bottom: 2px; color: var(--ink-500); font-size: 8px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.profile-follow-up strong { display: block; color: var(--ink-700); font-size: 10px; }
.profile-follow-up--today { border-color: var(--accent-dark); background: var(--accent-soft); }
.profile-follow-up--overdue { border-color: var(--danger); background: #fbf1f1; }
.profile-follow-up--future { border-color: var(--success); background: #f1f7f4; }
.follow-up-text { color: var(--ink-500); font-size: 10px; white-space: nowrap; }
.follow-up-text--today { color: var(--accent-dark); font-weight: 700; }
.follow-up-text--overdue { color: var(--danger); font-weight: 700; }
.follow-up-text--future { color: var(--success); }

.communication-panel { border: 1px solid var(--ink-200); background: var(--paper); }
.communication-panel__heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--ink-100); }
.communication-panel__heading .eyebrow { margin-bottom: 3px; }
.communication-panel__heading h3 { margin: 0; font-size: 16px; }
.communication-panel__heading h3 span { margin-left: 6px; color: var(--ink-500); font-size: 9px; font-weight: 600; }
.communication-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.communication-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 16px; }
.communication-form-actions > span { color: var(--ink-500); font-size: 9px; }
.inline-form-error { margin: 16px 22px 0; padding: 9px 11px; border-left: 2px solid var(--danger); color: var(--danger); background: #fbf1f1; font-size: 10px; }
.communication-timeline { padding: 0 22px; }
.communication-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 22px; padding: 21px 0; border-bottom: 1px solid var(--ink-100); }
.communication-row:last-child { border-bottom: 0; }
.communication-row__date time, .communication-row__date span { display: block; }
.communication-row__date time { color: var(--ink-700); font-size: 10px; font-weight: 700; }
.communication-row__date span { margin-top: 4px; color: var(--ink-500); font-size: 9px; }
.communication-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--ink-500); font-size: 9px; }
.communication-row__meta strong { color: var(--ink-800); font-size: 10px; }
.communication-row__meta b { padding: 3px 6px; color: var(--ink-600); background: var(--ink-100); font-size: 8px; }
.communication-row__body p { margin: 8px 0 0; color: var(--ink-700); font-size: 12px; line-height: 1.65; }
.communication-follow-up { display: inline-flex; margin-top: 11px; padding: 5px 8px; border-left: 2px solid var(--ink-300); color: var(--ink-600); background: var(--ink-100); font-size: 9px; }
.communication-follow-up--today { border-color: var(--accent-dark); background: var(--accent-soft); }
.communication-follow-up--overdue { border-color: var(--danger); color: var(--danger); background: #fbf1f1; }
.communication-follow-up--future { border-color: var(--success); }
.communication-empty, .queue-empty { padding: 35px 22px; color: var(--ink-500); font-size: 11px; text-align: center; }
.communication-pagination { display: flex; align-items: center; justify-content: space-between; min-height: 50px; padding: 0 22px; border-top: 1px solid var(--ink-100); color: var(--ink-500); font-size: 10px; }
.communication-pagination a { color: var(--ink-700); font-weight: 700; }

.dashboard-date { padding: 8px 11px; border: 1px solid var(--ink-200); color: var(--ink-600); background: var(--paper); font-size: 10px; }
.ops-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.ops-counts--admin { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ops-count { position: relative; min-height: 125px; padding: 20px; border: 1px solid var(--ink-200); color: var(--ink-800); background: var(--paper); }
.ops-count::before { position: absolute; top: -1px; left: -1px; width: 3px; height: calc(100% + 2px); content: ''; background: var(--ink-400); }
.ops-count--today::before { background: var(--accent-dark); }
.ops-count--overdue::before { background: var(--danger); }
.ops-count span, .ops-count small { display: block; }
.ops-count span { color: var(--ink-600); font-size: 10px; font-weight: 700; }
.ops-count strong { display: inline-block; margin: 13px 8px 0 0; font-size: 29px; letter-spacing: -.04em; }
.ops-count small { display: inline; color: var(--ink-400); font-size: 9px; }
.ops-count:hover { border-color: var(--ink-400); }
.dashboard-queues { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.queue-panel, .recent-panel { border: 1px solid var(--ink-200); background: var(--paper); }
.queue-panel--overdue { border-top-color: #d8baba; }
.queue-panel__heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 66px; padding: 14px 18px; border-bottom: 1px solid var(--ink-100); }
.queue-panel__heading h3 { margin: 0 0 3px; font-size: 13px; }
.queue-panel__heading p { margin: 0; color: var(--ink-500); font-size: 9px; }
.queue-panel__heading > a { color: var(--ink-600); font-size: 9px; font-weight: 700; }
.queue-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; min-height: 66px; padding: 11px 18px; border-bottom: 1px solid var(--ink-100); color: var(--ink-700); }
.queue-row:last-child { border-bottom: 0; }
.queue-row:hover, .recent-row:hover { background: #fafbfb; }
.queue-row time { color: var(--ink-500); font-size: 9px; font-weight: 650; }
.queue-row div strong, .queue-row div span { display: block; }
.queue-row div strong { color: var(--ink-800); font-size: 11px; }
.queue-row div span { margin-top: 3px; color: var(--ink-500); font-size: 9px; }
.queue-row small { color: var(--ink-500); font-size: 8px; }
.queue-row b { color: var(--ink-400); font-size: 11px; }
.mini-status { padding: 4px 6px; color: var(--ink-600); background: var(--ink-100); font-size: 8px; white-space: nowrap; }
.recent-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 125px; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--ink-100); color: inherit; }
.recent-row:last-child { border-bottom: 0; }
.recent-row__type { display: grid; width: 30px; height: 30px; place-items: center; color: var(--paper); background: var(--ink-800); font-size: 10px; font-weight: 800; }
.recent-row__content > div { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.recent-row__content strong { color: var(--ink-800); font-size: 11px; }
.recent-row__content span, .recent-row__content small { color: var(--ink-500); font-size: 8px; }
.recent-row__content p { overflow: hidden; margin: 4px 0 0; color: var(--ink-600); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.recent-row time { color: var(--ink-500); font-size: 9px; text-align: right; }

/* Reference-led dashboard */
.dashboard-header { margin-bottom: 20px; }
.dashboard-header h2 { margin: 0 0 5px; color: var(--ink-950); font-size: 29px; letter-spacing: -.045em; }
.dashboard-header p { margin: 0; color: var(--ink-500); font-size: 11px; }
.dashboard-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.dashboard-kpi { display: flex; min-width: 0; min-height: 116px; align-items: center; gap: 15px; padding: 18px; border: 1px solid var(--ink-200); border-radius: 5px; background: var(--paper); box-shadow: 0 3px 14px rgba(16,20,22,.035); transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.dashboard-kpi:hover { border-color: #c7d6f7; box-shadow: 0 7px 20px rgba(22,73,197,.08); transform: translateY(-1px); }
.dashboard-kpi__icon { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 50%; color: var(--accent-dark); background: var(--accent-soft); }
.dashboard-kpi--alert .dashboard-kpi__icon { color: var(--accent-secondary); background: #fff0f7; }
.dashboard-kpi__icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-kpi__content { display: block; min-width: 0; }
.dashboard-kpi__content > span { display: block; overflow: hidden; color: var(--ink-700); font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-kpi__content strong { display: block; margin: 2px 0 1px; color: var(--ink-950); font-size: 26px; line-height: 1.15; letter-spacing: -.04em; }
.dashboard-kpi__content small { display: block; overflow: hidden; color: var(--ink-500); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-kpi:nth-child(1) .dashboard-kpi__content small,
.dashboard-kpi:nth-child(2) .dashboard-kpi__content small { color: var(--success); }
.dashboard-kpi--alert .dashboard-kpi__content small { color: var(--danger); }

.dashboard-grid { display: grid; grid-template-columns: minmax(340px, .85fr) minmax(0, 1.35fr); gap: 16px; align-items: start; }
.dashboard-card { min-width: 0; overflow: hidden; border: 1px solid var(--ink-200); border-radius: 5px; background: var(--paper); box-shadow: 0 3px 14px rgba(16,20,22,.025); }
.dashboard-card__header { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 16px; padding: 0 17px; border-bottom: 1px solid var(--ink-100); }
.dashboard-card__header > div { display: flex; min-width: 0; align-items: center; gap: 10px; }
.dashboard-card__header svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: var(--ink-800); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-card__header h3 { overflow: hidden; margin: 0; color: var(--ink-900); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-card__header > a { flex: 0 0 auto; color: var(--ink-600); font-size: 9px; font-weight: 650; }
.dashboard-card__header > a:hover { color: var(--accent-dark); }
.dashboard-card__header > a span { margin-left: 4px; font-size: 16px; vertical-align: -1px; }
.dashboard-table__head { display: grid; min-height: 35px; align-items: center; padding: 0 17px; border-bottom: 1px solid var(--ink-100); color: var(--ink-500); background: #fafbfc; font-size: 8px; font-weight: 650; }
.dashboard-followups .dashboard-table__head,
.dashboard-followup-row { grid-template-columns: 105px minmax(120px, 1fr) minmax(120px, 1fr) 95px; gap: 12px; }
.dashboard-followup-row { display: grid; min-height: 62px; align-items: center; padding: 9px 17px; border-bottom: 1px solid var(--ink-100); }
.dashboard-followup-row:last-child { border-bottom: 0; }
.dashboard-followup-row:hover,
.dashboard-payment-row:hover,
.dashboard-communications > a:hover,
.dashboard-stages > a:hover { background: #fafcff; }
.dashboard-followup-row time { color: var(--ink-500); font-size: 9px; }
.dashboard-followup-row > span:not(.dashboard-followup-state) { display: grid; min-width: 0; gap: 2px; }
.dashboard-followup-row strong { overflow: hidden; color: var(--ink-800); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-followup-row small { overflow: hidden; color: var(--ink-500); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-followup-state { width: max-content; padding: 4px 7px; border-radius: 20px; font-size: 8px; font-weight: 700; white-space: nowrap; }
.dashboard-followup-state--today { color: var(--accent-dark); background: var(--accent-soft); }
.dashboard-followup-state--overdue { color: var(--danger); background: #fbefef; }
.dashboard-empty { display: grid; min-height: 230px; place-content: center; justify-items: center; gap: 7px; padding: 28px; color: var(--ink-400); text-align: center; }
.dashboard-empty svg { width: 30px; height: 30px; margin-bottom: 5px; fill: none; stroke: var(--ink-300); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-empty strong { color: var(--ink-500); font-size: 10px; }
.dashboard-empty span { color: var(--ink-400); font-size: 9px; }
.dashboard-empty--compact { min-height: 120px; }

.dashboard-stages { padding: 3px 17px; }
.dashboard-stages > a { position: relative; display: grid; min-height: 61px; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 8px 4px; border-bottom: 1px solid var(--ink-100); }
.dashboard-stages > a:last-child { border-bottom: 0; }
.dashboard-stages > a:not(:last-child)::after { position: absolute; z-index: 0; top: 37px; bottom: -25px; left: 10px; width: 1px; background: var(--ink-200); content: ''; }
.dashboard-stage-dot { position: relative; z-index: 1; width: 9px; height: 9px; margin-left: 2px; border: 2px solid var(--paper); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px #dfe8ff; }
.dashboard-stage-dot--1 { background: #f1a73d; box-shadow: 0 0 0 2px #fae9cd; }
.dashboard-stage-dot--2 { background: #87919a; box-shadow: 0 0 0 2px #e5e8ea; }
.dashboard-stage-dot--3 { background: var(--accent); }
.dashboard-stage-dot--4 { background: #8849e8; box-shadow: 0 0 0 2px #ece1fc; }
.dashboard-stage-dot--5 { background: #1cad91; box-shadow: 0 0 0 2px #d6f1eb; }
.dashboard-stages span { display: grid; min-width: 0; gap: 2px; }
.dashboard-stages strong { color: var(--ink-800); font-size: 10px; }
.dashboard-stages small { color: var(--ink-500); font-size: 8px; }
.dashboard-stages b { color: var(--ink-900); font-size: 11px; }

.dashboard-payments .dashboard-table__head,
.dashboard-payment-row { grid-template-columns: 78px minmax(100px, 1fr) minmax(115px, 1fr) 82px 76px; gap: 10px; }
.dashboard-payment-row { display: grid; min-height: 58px; align-items: center; padding: 9px 17px; border-bottom: 1px solid var(--ink-100); color: var(--ink-600); font-size: 9px; }
.dashboard-payment-row:last-child { border-bottom: 0; }
.dashboard-payment-row time { color: var(--ink-500); font-size: 8px; }
.dashboard-payment-row strong { color: var(--ink-800); font-size: 10px; }
.dashboard-payment-row > b { color: var(--ink-900); font-size: 9px; text-align: right; }

.dashboard-communications { padding: 0 17px; }
.dashboard-communications > a { display: grid; min-height: 67px; grid-template-columns: 36px minmax(0, 1fr) 105px; align-items: center; gap: 11px; padding: 9px 4px; border-bottom: 1px solid var(--ink-100); }
.dashboard-communications > a:last-child { border-bottom: 0; }
.dashboard-communication-avatar { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; color: var(--paper); background: linear-gradient(135deg, var(--ink-800), var(--accent-dark)); font-size: 9px; font-weight: 800; }
.dashboard-communications > a > span:nth-child(2),
.dashboard-communications > a > span:last-child { display: grid; min-width: 0; gap: 3px; }
.dashboard-communications strong,
.dashboard-communications small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-communications strong { color: var(--ink-800); font-size: 10px; }
.dashboard-communications small { color: var(--ink-500); font-size: 8px; }
.dashboard-communications > a > span:last-child { text-align: right; }
.dashboard-communications time { color: var(--ink-500); font-size: 8px; }

/* Purchased vehicles and manual logistics */
.entity-form .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.initial-status-note { margin: -8px 0 20px; padding: 10px 12px; border-left: 2px solid var(--accent-dark); color: var(--ink-600); background: var(--accent-soft); font-size: 10px; }
.vehicle-filters { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(5, minmax(120px, 1fr)) auto auto; gap: 10px; align-items: end; margin-bottom: 14px; padding: 16px; border: 1px solid var(--ink-200); background: var(--paper); }
.vehicle-filters label { display: grid; gap: 6px; color: var(--ink-500); font-size: 8px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.vehicle-filters input, .vehicle-filters select { width: 100%; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--ink-200); background: var(--paper); color: var(--ink-800); }
.result-count { color: var(--ink-500); font-size: 10px; }
.result-count small { display: block; margin-top: 2px; color: var(--ink-500); font-size: 8px; text-align: right; }
.cell-stack { display: grid; gap: 3px; }
.cell-stack b { color: var(--ink-700); font-size: 10px; }
.cell-stack small { color: var(--ink-500); font-size: 8px; }
.status-badge--large { min-height: 38px; padding: 0 13px; }
.vehicle-heading { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 22px; }
.vehicle-heading h2 { margin: 3px 0 5px; font-size: 27px; letter-spacing: -.04em; }
.vehicle-heading p:last-child { margin: 0; color: var(--ink-500); font-size: 10px; }
.logistics-stepper { max-width: 100%; margin: 0 0 16px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--ink-200) transparent; }
.logistics-stepper:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; border-radius: 8px; }
.logistics-progress { display: grid; grid-template-columns: repeat(6, minmax(110px, 1fr)); min-width: 660px; margin: 0; padding: 6px 0 4px; list-style: none; }
.logistics-progress li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 0 8px; text-align: center; }
.logistics-progress li:not(:last-child)::after { position: absolute; top: 13px; left: calc(50% + 23px); width: calc(100% - 46px); height: 2px; border-radius: 2px; content: ''; background: var(--ink-200); }
.logistics-progress__indicator { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border: 1px solid var(--ink-300); border-radius: 50%; color: var(--ink-500); background: var(--paper); font-size: 10px; font-weight: 650; }
.logistics-progress__indicator svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.logistics-progress__label { max-width: 150px; color: var(--ink-500); font-size: 11px; font-weight: 500; line-height: 1.45; }
.logistics-progress li.is-complete:not(:last-child)::after { background: var(--accent-dark); }
.logistics-progress .is-complete .logistics-progress__indicator { border-color: var(--accent-dark); color: var(--paper); background: var(--accent-dark); }
.logistics-progress .is-complete .logistics-progress__label { color: var(--ink-700); }
.logistics-progress .is-current .logistics-progress__indicator { border: 2px solid var(--accent-dark); color: var(--accent-dark); background: var(--paper); box-shadow: 0 0 0 4px var(--accent-soft); font-weight: 800; }
.logistics-progress .is-current .logistics-progress__label { color: var(--accent-dark); font-weight: 750; }
.cancelled-state { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; padding: 16px 18px; border-left: 3px solid var(--danger); background: #fbf1f1; }
.cancelled-state strong { color: var(--danger); font-size: 12px; }
.cancelled-state span { color: var(--ink-500); font-size: 10px; }
.vehicle-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.vehicle-detail-main, .vehicle-detail-side { display: grid; gap: 16px; }
.vehicle-overview-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 16px; align-items: stretch; }
.vehicle-overview-grid > .detail-section { min-width: 0; }
@media (max-width: 1100px) {
    .vehicle-overview-grid { grid-template-columns: minmax(0, 1fr); }
}
.detail-list--grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 22px; }
.external-link { display: inline-flex; margin: 0 19px 18px; }
.linked-entity { display: grid; gap: 3px; margin: 15px 19px; padding: 12px; border-left: 2px solid var(--accent-dark); background: var(--ink-100); }
.linked-entity strong { color: var(--ink-800); font-size: 12px; }
.linked-entity span, .linked-request span { color: var(--ink-500); font-size: 9px; }
.linked-request { display: grid; gap: 3px; padding: 0 19px 18px; }
.linked-request strong { color: var(--ink-700); font-size: 10px; }
.status-control .status-form { display: grid; grid-template-columns: 1fr; }
.status-control .status-form textarea { width: 100%; padding: 10px 11px; border: 1px solid var(--ink-200); resize: vertical; }
.timeline-item small { color: var(--ink-400); font-size: 9px; }
.timeline-location { color: var(--ink-700) !important; font-weight: 700; }
.client-vehicles { margin-top: 0; }
.client-vehicle-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 80px 14px; gap: 14px; align-items: center; padding: 14px 19px; border-bottom: 1px solid var(--ink-100); color: inherit; }
.client-vehicle-row:last-child { border-bottom: 0; }
.profile-sidebar .client-vehicle-row { grid-template-columns: minmax(0, 1fr) 14px; gap: 8px; }
.profile-sidebar .client-vehicle-row > div { overflow-wrap: anywhere; }
.profile-sidebar .client-vehicle-row > .status-badge, .profile-sidebar .client-vehicle-row > time { grid-column: 1; justify-self: start; }
.profile-sidebar .client-vehicle-row > b { grid-column: 2; grid-row: 1; }
.client-vehicle-row:hover { background: #fafbfb; }
.client-vehicle-row div { display: grid; gap: 3px; }
.client-vehicle-row strong { font-size: 11px; }
.client-vehicle-row div span, .client-vehicle-row time { color: var(--ink-500); font-size: 9px; }
.vehicle-ops { margin-bottom: 16px; border: 1px solid var(--ink-200); background: var(--paper); }
.vehicle-stage-counts { display: grid; grid-template-columns: repeat(6, 1fr); }
.vehicle-stage-counts a { display: grid; gap: 4px; min-height: 74px; place-content: center; border-right: 1px solid var(--ink-100); color: var(--ink-800); text-align: center; }
.vehicle-stage-counts a:last-child { border-right: 0; }
.vehicle-stage-counts a:hover { background: #fafbfb; }
.vehicle-stage-counts strong { font-size: 20px; }
.vehicle-stage-counts span { color: var(--ink-500); font-size: 8px; }
.data-table .status-badge { padding: 6px 9px; border: 0; border-radius: 20px; }
.vehicle-status--purchased { color: var(--accent-dark); background: var(--accent-soft); }
.vehicle-status--us_transport { color: #6741b3; background: #f1ecfb; }
.vehicle-status--warehouse { color: #976019; background: #fbf3e5; }
.vehicle-status--sea_transport { color: #a9296b; background: #fcecf5; }
.vehicle-status--poti { color: #147864; background: #eaf6f3; }
.vehicle-status--cancelled { color: var(--danger); background: #fbefef; }
.vehicle-status--completed { color: var(--success); background: #edf6f2; }

/* Payment history and currency-aware summaries */
.payment-panel { margin-top: 16px; border: 1px solid var(--ink-200); background: var(--paper); }
.payment-panel__heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--ink-100); }
.payment-panel__heading h3 { margin: 0; font-size: 16px; }
.payment-panel__heading h3 span { margin-left: 5px; color: var(--ink-500); font-size: 9px; font-weight: 600; }
.payment-summary { display: flex; gap: 10px; padding: 15px 22px; border-bottom: 1px solid var(--ink-100); background: #fafbfb; }
.payment-summary > p { margin: 0; color: var(--ink-500); font-size: 10px; }
.payment-summary article { min-width: 205px; padding: 12px 14px; border: 1px solid var(--ink-200); background: var(--paper); }
.payment-summary article > strong { display: block; margin-bottom: 7px; color: var(--ink-800); font-size: 10px; letter-spacing: .08em; }
.payment-summary dl { display: grid; gap: 5px; margin: 0; }
.payment-summary dl div { display: flex; justify-content: space-between; gap: 15px; color: var(--ink-500); font-size: 9px; }
.payment-summary dd { margin: 0; color: var(--ink-700); font-weight: 700; }
.payment-summary .payment-net { margin-top: 3px; padding-top: 6px; border-top: 1px solid var(--ink-100); color: var(--ink-700); }
.payment-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.payment-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 16px; }
.payment-form-actions span { color: var(--ink-500); font-size: 9px; }
.payment-row { display: grid; grid-template-columns: 125px minmax(0, 1fr) 115px auto 120px; gap: 15px; align-items: center; padding: 15px 22px; border-bottom: 1px solid var(--ink-100); color: inherit; }
.payment-row:last-child { border-bottom: 0; }
.payment-row:hover { background: #fafbfb; }
.payment-row time, .payment-row > small { color: var(--ink-500); font-size: 9px; }
.payment-row div { display: grid; gap: 3px; }
.payment-row div strong { font-size: 11px; }
.payment-row div span, .payment-row div small { color: var(--ink-500); font-size: 9px; }
.payment-row div p { margin: 2px 0 0; color: var(--ink-600); font-size: 9px; }
.payment-row > b { color: var(--ink-900); font-size: 11px; text-align: right; }
.payment-status { display: inline-flex; align-items: center; width: max-content; padding: 5px 8px; border-radius: 20px; color: var(--ink-600); background: var(--ink-100); font-size: 8px; font-weight: 750; white-space: nowrap; }
.payment-status--received { color: #2f6150; background: #edf5f1; }
.payment-status--pending { color: #725a27; background: #f8f3e9; }
.payment-status--cancelled { color: var(--ink-500); text-decoration: line-through; }
.payment-status--refunded { color: #765050; background: #f8eeee; }
.payment-filters { display: grid; grid-template-columns: minmax(210px, 2fr) repeat(7, minmax(105px, 1fr)) auto auto; gap: 9px; align-items: end; margin-bottom: 14px; padding: 16px; border: 1px solid var(--ink-200); background: var(--paper); }
.payment-filters label { display: grid; gap: 6px; color: var(--ink-500); font-size: 8px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.payment-filters input, .payment-filters select { width: 100%; min-width: 0; height: 38px; padding: 0 9px; border: 1px solid var(--ink-200); background: var(--paper); }
.table-subline { display: block; margin-top: 3px; color: var(--ink-500); font-size: 8px; }
.payment-detail-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
.payment-detail-heading__actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; flex-wrap: wrap; }
.payment-detail-heading__actions .button { white-space: normal; text-align: center; }
@media (max-width: 640px) {
    .payment-detail-heading { align-items: flex-start; flex-direction: column; }
    .payment-detail-heading__actions { width: 100%; justify-content: space-between; }
}
.payment-detail-heading h2 { margin: 4px 0; font-size: 28px; }
.payment-detail-heading p:last-child { margin: 0; color: var(--ink-500); font-size: 10px; }
.payment-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.payment-correction p { margin: 0; padding: 16px 18px; color: var(--ink-500); font-size: 10px; line-height: 1.5; }
.payment-correction form { padding: 0 18px 18px; }
.payment-dashboard-panel { margin-bottom: 16px; }
.recent-payment-row { display: grid; grid-template-columns: 125px minmax(0, 1fr) 110px auto; gap: 14px; align-items: center; min-height: 58px; padding: 10px 18px; border-bottom: 1px solid var(--ink-100); color: inherit; }
.recent-payment-row:last-child { border-bottom: 0; }
.recent-payment-row:hover { background: #fafbfb; }
.recent-payment-row time { color: var(--ink-500); font-size: 9px; }
.recent-payment-row div { display: grid; gap: 2px; }
.recent-payment-row div strong { font-size: 10px; }
.recent-payment-row div span { color: var(--ink-500); font-size: 8px; }
.recent-payment-row > b { font-size: 10px; text-align: right; }

/* Step 6 administration, audit history, and reassignment */
.team-status, .activity-badge { display: inline-flex; width: max-content; padding: 5px 8px; border-radius: 20px; color: var(--ink-600); background: var(--ink-100); font-size: 8px; font-weight: 750; white-space: nowrap; }
.team-status--active { color: #2f6150; background: #edf5f1; }
.team-status--inactive { color: #765050; background: #f8eeee; }
.activity-badge--auth\.login { color: var(--accent-dark); background: var(--accent-soft); }
[class*="activity-badge--client"] { color: #6741b3; background: #f1ecfb; }
[class*="activity-badge--vehicle"] { color: #147864; background: #eaf6f3; }
[class*="activity-badge--payment"] { color: #a9296b; background: #fcecf5; }
[class*="activity-badge--user"] { color: #976019; background: #fbf3e5; }
.table-actions { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.table-actions form { margin: 0; }
.link-button { padding: 0; border: 0; color: var(--danger); background: none; cursor: pointer; font: inherit; font-size: 9px; font-weight: 700; }
.admin-form-grid, .reassign-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.activity-filters { display: grid; grid-template-columns: minmax(210px, 2fr) repeat(5, minmax(110px, 1fr)) auto auto; gap: 9px; align-items: end; margin-bottom: 14px; padding: 16px; border: 1px solid var(--ink-200); background: var(--paper); }
.activity-filters label { display: grid; gap: 6px; color: var(--ink-500); font-size: 8px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.activity-filters input, .activity-filters select { width: 100%; min-width: 0; height: 38px; padding: 0 9px; border: 1px solid var(--ink-200); background: var(--paper); }
.audit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.audit-values { margin: 0; padding: 16px; overflow: auto; border: 1px solid var(--ink-200); background: #fafbfb; color: var(--ink-700); font: 11px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.audit-empty { margin: 0; padding: 18px; color: var(--ink-500); background: #fafbfb; font-size: 10px; }
.reassign-warning { margin: 0 0 16px; padding: 14px 16px; border-left: 3px solid var(--accent); color: var(--ink-600); background: var(--accent-soft); font-size: 10px; line-height: 1.55; }
.reassign-confirm { margin-top: 0; }
.settings-form { max-width: 920px; }
.table-card,.data-panel,.profile-grid,.profile-main,.vehicle-detail-grid,.vehicle-detail-main,.payment-detail-grid,.admin-form-grid,.reassign-grid { min-width: 0; max-width: 100%; }
.table-scroll { width: 100%; max-width: 100%; overflow-x: auto; }

/* Global operational search */
.global-search-page { display: flex; gap: 10px; margin-bottom: 20px; padding: 14px; border: 1px solid var(--ink-200); background: var(--paper); }
.global-search-page label { position: relative; flex: 1; }
.global-search-page svg { position: absolute; top: 12px; left: 13px; width: 18px; height: 18px; fill: none; stroke: var(--ink-500); stroke-width: 1.8; }
.global-search-page input { width: 100%; height: 42px; padding: 0 14px 0 42px; border: 1px solid var(--ink-200); outline: none; }
.global-search-page input:focus { border-color: var(--ink-600); box-shadow: 0 0 0 3px rgba(56,66,71,.07); }
.search-groups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-items: start; }
.search-group { border: 1px solid var(--ink-200); background: var(--paper); }
.search-group__heading { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 18px; border-bottom: 1px solid var(--ink-100); }
.search-group__heading h3 { margin: 0; font-size: 14px; }
.search-group__heading span { color: var(--ink-500); font-size: 10px; }
.search-result { display: grid; grid-template-columns: minmax(0,1fr) minmax(130px,.65fr) auto; gap: 14px; align-items: center; min-height: 70px; padding: 12px 18px; border-bottom: 1px solid var(--ink-100); }
.search-result:last-child { border-bottom: 0; }
.search-result:hover { background: #fafbfb; }
.search-result>div { display: grid; gap: 3px; min-width: 0; }
.search-result strong,.search-result b { overflow: hidden; color: var(--ink-800); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.search-result span { overflow: hidden; color: var(--ink-500); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.search-result i { color: var(--ink-500); font-style: normal; }
.compact-empty { padding: 28px 18px; color: var(--ink-500); font-size: 10px; text-align: center; }
.dashboard-actions { display: flex; align-items: center; gap: 14px; }

/* Typography system — tuned for dense Georgian business interfaces */
body {
    font-kerning: normal;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

:where(h1,h2,h3,h4,strong,b) {
    line-height: var(--leading-tight);
}

:where(input,select,textarea,button) {
    font-size: var(--text-md);
    line-height: 1.45;
}

::placeholder {
    color: var(--ink-500);
    opacity: .82;
}

.eyebrow,
.sidebar__label,
.breadcrumb,
.module-card__state,
.profile-kicker,
.detail-list dt,
.request-specs span,
.profile-follow-up span,
.vehicle-filters label,
.payment-filters label,
.activity-filters label {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: .025em;
    line-height: 1.45;
}

.sidebar__brand strong { font-size: 17px; font-weight: 700; }
.sidebar__brand span { font-size: var(--text-xs); letter-spacing: .12em; }
.nav-link { font-size: 14px; font-weight: 500; line-height: 1.45; }
.nav-link.is-active { font-weight: 600; }
.sidebar__footer small,
.environment-chip { font-size: var(--text-xs); line-height: 1.45; }

.shell-search input { font-size: 13px; }
.topbar-quick { font-size: var(--text-xs); font-weight: 600; }
.topbar h1 { font-size: 19px; font-weight: 700; line-height: 1.3; letter-spacing: -.015em; }
.user-menu__identity strong { font-size: 13px; font-weight: 600; }
.user-menu__identity span,
.logout-button,

.button { font-size: 13px; font-weight: 600; letter-spacing: .005em; }
.field > span { font-size: 13px; font-weight: 600; }
.field > small { font-size: var(--text-xs); line-height: 1.5; }
.alert { font-size: 13px; line-height: 1.6; }
.login-panel__header h2 { font-size: 27px; line-height: 1.35; }
.login-panel__header p,
.login-panel__support { font-size: 12px; line-height: 1.6; }

.section-heading h3,
.communication-panel__heading h3 { font-size: 17px; }
.section-heading p,
.module-card p { font-size: 13px; line-height: 1.65; }
.module-card h3,
.form-section__heading h3 { font-size: 16px; }
.module-card__index,
.form-section__heading p,
.data-panel__header,
.filter-reset,
.result-count { font-size: var(--text-xs); }

.data-table th {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: .025em;
    line-height: 1.4;
}
.data-table td { font-size: 13px; line-height: 1.55; }
.client-name,
.table-action { font-size: 12px; font-weight: 600; }
.subtle-label { font-size: var(--text-xs); font-weight: 600; letter-spacing: .02em; }
.empty-state strong { font-size: 15px; }
.empty-state p,
.pagination { font-size: var(--text-xs); line-height: 1.6; }

.profile-heading h2,
.request-hero h3,
.vehicle-heading h2 { font-size: clamp(24px, 2.2vw, 29px); line-height: 1.3; letter-spacing: -.025em; }
.profile-heading__identity a,
.detail-list dd,
.notes-copy,
.request-specs strong,
.request-notes,
.linked-entity strong { font-size: 13px; line-height: 1.6; }
.detail-section__heading h3 { font-size: 14px; }
.detail-section__heading p,
.timeline-item p,
.follow-up-text,
.linked-entity span,
.linked-request span,
.timeline-item small { font-size: var(--text-xs); line-height: 1.55; }
.timeline-item time,
.timeline-item strong { font-size: 12px; }

.communication-row__body p,
.communication-empty,
.queue-empty { font-size: 12px; }
.communication-row__date time,
.communication-row__meta strong,
.communication-pagination { font-size: var(--text-xs); }
.communication-row__date span,
.communication-row__meta,
.communication-row__meta b,
.communication-follow-up,
.communication-form-actions > span,
.inline-form-error { font-size: var(--text-xs); line-height: 1.55; }

.ops-count span,
.queue-panel__heading p,
.queue-panel__heading > a,
.queue-row time,
.queue-row div span,
.queue-row small,
.mini-status,
.recent-row__content span,
.recent-row__content small,
.recent-row__content p,
.recent-row time { font-size: var(--text-xs); line-height: 1.5; }
.queue-row div strong,
.recent-row__content strong { font-size: 12px; }
.ops-count strong { font-size: 31px; }

.cell-stack b,
.cell-stack small,
.vehicle-heading p:last-child,
.linked-request strong,
.client-vehicle-row div span,
.client-vehicle-row time,
.payment-row small,
.payment-row span,
.payment-status,
.team-status,
.activity-badge,
.link-button,
.audit-empty,
.reassign-warning,
.search-group__heading span,
.search-result span,
.compact-empty { font-size: var(--text-xs); line-height: 1.5; }
.client-vehicle-row strong,
.search-result strong,
.search-result b { font-size: 12px; }

@media (max-width: 700px) {
    body { font-size: 14px; }
    .topbar h1 { font-size: 17px; }
    .data-table td { font-size: 12px; }
    .button { font-size: 13px; }
}

/* Error */
.error-page { display: grid; place-items: center; padding: 30px; background: var(--ink-950); }
.error-shell { max-width: 520px; color: var(--paper); text-align: center; }
.error-shell .brand-mark { margin: 0 auto 30px; border-color: var(--ink-700); }
.error-code { margin: 0; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .2em; }
.error-shell h1 { margin: 10px 0; font-size: 28px; }
.error-shell > p:not(.error-code) { margin: 0 0 28px; color: var(--ink-300); }
.error-shell .button--primary { border-color: var(--ink-700); background: var(--ink-800); }
.sidebar-overlay { display: none; }

@media (max-width: 1400px) {
    .filter-bar { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
    .filter-bar .search-field { grid-column: 1 / -1; min-width: 0; }
    .filter-bar label,.filter-bar select { width: 100%; min-width: 0; }
    .payment-filters,.activity-filters { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .payment-filters .search-field,.activity-filters .search-field { grid-column: 1 / -1; }
    .vehicle-filters { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .vehicle-filters .search-field { grid-column: 1 / -1; }
}

@media (max-width: 1200px) {
    .dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
    .create-client-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
    .sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-overlay { position: fixed; z-index: 35; inset: 0; background: rgba(16,20,22,.55); }
    .sidebar-open .sidebar-overlay { display: block; }
    .shell-search { width: min(360px,42vw); margin: 0 14px; }
    .topbar-quick { display: none; }
    .search-groups { grid-template-columns: 1fr; }
    .workspace { margin-left: 0; }
    .menu-button { display: inline-flex; }
    .module-grid { grid-template-columns: 1fr 1fr; }
    .filter-bar { flex-wrap: wrap; }
    .search-field { flex-basis: 100%; }
    .profile-grid { grid-template-columns: 1fr; }
    .profile-sidebar { grid-template-columns: 1fr 1fr; }
    .request-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .request-specs div:nth-child(2n) { border-right: 0; }
    .ops-counts--admin { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-queues { grid-template-columns: 1fr; }
    .vehicle-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .vehicle-filters .search-field { grid-column: 1 / -1; }
    .vehicle-detail-grid { grid-template-columns: 1fr; }
    .vehicle-stage-counts { grid-template-columns: repeat(3, 1fr); }
    .payment-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .payment-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .payment-filters .search-field { grid-column: 1 / -1; }
    .activity-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .activity-filters .search-field { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
    .auth-page { padding: 0; }
    .auth-shell { min-height: 100vh; grid-template-columns: 1fr; }
    .auth-brand { min-height: 210px; align-items: flex-end; padding: 30px; }
    .auth-brand h1 { font-size: 32px; }
    .auth-brand__copy { display: none; }
    .login-panel { padding: 36px 30px; }
    .topbar { padding: 0 18px; }
    .topbar__left > div { display: none; }
    .user-avatar { display: none; }
    .user-menu { gap: 0; }
    .shell-search { flex: 1; width: auto; margin: 0 10px; }
    .shell-search input { padding-right: 8px; font-size: 0; }
    .shell-search input:focus { position: fixed; z-index: 60; top: 12px; right: 18px; left: 18px; width: auto; padding-right: 13px; font-size: 12px; }
    .shell-search:focus-within svg { position: fixed; z-index: 61; top: 24px; left: 31px; }
    .user-menu__identity { display: none; }
    .logout-button span { display: none; }
    .content { padding: 24px 18px; }
    .create-client-card { padding: 18px; }
    .create-core-grid, .create-extras__grid { grid-template-columns: 1fr; }
    .create-request-heading { align-items: flex-start; flex-wrap: wrap; }
    .create-request-heading .apple-switch { margin-left: 45px; }
    .create-client-actions > span { display: none; }
    .create-client-actions > div { width: 100%; justify-content: flex-end; }
    .filter-shell__bar { flex-wrap: wrap; }
    .filter-search { flex: 1 1 100%; min-width: 0; }
    .filter-search-button { flex: 1; }
    .filter-toggle { flex: 1; justify-content: center; }
    .filter-clear { margin-left: auto; }
    .dashboard-header h2 { font-size: 25px; }
    .dashboard-kpi { min-height: 104px; padding: 14px; }
    .dashboard-followups .dashboard-table__head,
    .dashboard-followup-row { grid-template-columns: 78px minmax(0, 1fr) 86px; }
    .dashboard-followups .dashboard-table__head > span:nth-child(3),
    .dashboard-followup-row > span:nth-child(3) { display: none; }
    .dashboard-payments .dashboard-table__head,
    .dashboard-payment-row { grid-template-columns: 70px minmax(0, 1fr) 76px; }
    .dashboard-payments .dashboard-table__head > span:nth-child(3),
    .dashboard-payments .dashboard-table__head > span:nth-child(5),
    .dashboard-payment-row > span:nth-child(3),
    .dashboard-payment-row > span:nth-child(5) { display: none; }
    .dashboard-communications > a { grid-template-columns: 36px minmax(0, 1fr); }
    .dashboard-communications > a > span:last-child { display: none; }
    .page-intro { flex-direction: column; }
    .foundation-panel__content { padding: 30px 26px; }
    .foundation-monogram { right: -15%; }
    .module-grid { grid-template-columns: 1fr; }
    .page-toolbar, .profile-heading { flex-direction: column; align-items: stretch; }
    .profile-actions { flex-wrap: wrap; }
    .filter-bar > label:not(.search-field) { flex: 1 1 calc(50% - 9px); }
    .filter-bar select { width: 100%; min-width: 0; }
    .form-section { padding: 20px 17px; }
    .form-grid--2, .form-grid--3 { grid-template-columns: 1fr; }
    .profile-sidebar { grid-template-columns: 1fr; }
    .request-hero__top { flex-direction: column; padding: 22px 20px 17px; }
    .request-specs { grid-template-columns: 1fr 1fr; }
    .request-specs div { padding: 14px; }
    .request-hero__actions { padding: 17px 20px; }
    .status-control form { grid-template-columns: 1fr; }
    .timeline-item { grid-template-columns: 1fr; }
    .timeline-item time { grid-row: auto; }
    .pagination { gap: 8px; }
    .profile-actions { align-items: stretch; }
    .profile-follow-up { flex-basis: 100%; }
    .communication-panel__heading, .communication-form-actions { align-items: stretch; flex-direction: column; }
    .communication-form-grid { grid-template-columns: 1fr; }
    .communication-row { grid-template-columns: 1fr; gap: 8px; }
    .ops-counts, .ops-counts--admin { grid-template-columns: 1fr 1fr; }
    .queue-row { grid-template-columns: 62px minmax(0, 1fr) auto; }
    .queue-row .mini-status, .queue-row small { display: none; }
    .recent-row { grid-template-columns: 34px minmax(0, 1fr); }
    .recent-row time { display: none; }
    .entity-form .form-grid { grid-template-columns: 1fr; }
    .vehicle-heading { align-items: stretch; flex-direction: column; }
    .vehicle-filters { grid-template-columns: 1fr 1fr; }
    .vehicle-filters .search-field { grid-column: 1 / -1; }
    .detail-list--grid { grid-template-columns: 1fr 1fr; }
    .client-vehicle-row { grid-template-columns: 1fr auto; }
    .client-vehicle-row time, .client-vehicle-row > b { display: none; }
    .payment-panel__heading, .payment-form-actions { align-items: stretch; flex-direction: column; }
    .payment-summary { overflow-x: auto; }
    .payment-row { grid-template-columns: 100px minmax(0, 1fr) auto; }
    .payment-row .payment-status, .payment-row > small { display: none; }
    .payment-detail-grid { grid-template-columns: 1fr; }
    .recent-payment-row { grid-template-columns: 90px minmax(0, 1fr) auto; }
    .recent-payment-row .payment-status { display: none; }
    .global-search-page { align-items: stretch; flex-direction: column; }
    .search-result { grid-template-columns: 1fr auto; }
    .search-result>div:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
    .dashboard-actions { align-items: stretch; flex-direction: column-reverse; }
    .admin-form-grid, .reassign-grid, .audit-grid { grid-template-columns: 1fr; }
    .activity-filters { grid-template-columns: 1fr 1fr; }
    .activity-filters .search-field { grid-column: 1 / -1; }
}

@media (max-width: 460px) {
    .create-client-card { padding: 15px 13px; }
    .create-client-card .form-section__heading { gap: 10px; }
    .create-request-heading .apple-switch { margin-left: 40px; }
    .create-extras__grid { padding: 12px; }
    .create-client-actions { bottom: 8px; }
    .create-client-actions > div { display: grid; grid-template-columns: 1fr 1.25fr; }
    .create-client-actions .button { padding: 0 11px; }
    .filter-shell__bar { padding: 9px; }
    .filter-panel__inner { grid-template-columns: 1fr; padding-right: 12px; padding-left: 12px; }
    .filter-shell--enhanced.is-open .filter-panel__inner { padding-top: 12px; padding-bottom: 12px; }
    .dashboard-kpis { grid-template-columns: 1fr; }
    .dashboard-card__header { padding: 0 13px; }
    .dashboard-card__header h3 { font-size: 11px; }
    .dashboard-followups .dashboard-table__head,
    .dashboard-followup-row { grid-template-columns: 65px minmax(0, 1fr); }
    .dashboard-followups .dashboard-table__head > span:last-child,
    .dashboard-followup-row > span:last-child { display: none; }
    .ops-counts, .ops-counts--admin { grid-template-columns: 1fr; }
    .vehicle-filters, .detail-list--grid { grid-template-columns: 1fr; }
    .vehicle-stage-counts { grid-template-columns: 1fr 1fr; }
    .payment-form-grid, .payment-filters, .activity-filters { grid-template-columns: 1fr; }
    .payment-row { grid-template-columns: 1fr auto; }
    .payment-row time { grid-column: 1 / -1; }
    .recent-payment-row { grid-template-columns: 1fr auto; }
    .recent-payment-row time { grid-column: 1 / -1; }
}

/* Shared UI/UX refinement */
.skip-link {
    position: fixed;
    z-index: 100;
    top: 12px;
    left: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--paper);
    background: var(--ink-950);
    box-shadow: var(--shadow-md);
    font-size: 12px;
    font-weight: 700;
    transform: translateY(-160%);
    transition: transform .18s ease;
}
.skip-link:focus { outline-color: var(--accent-on-dark); transform: translateY(0); }

body {
    background:
        radial-gradient(circle at 78% -10%, rgba(20,100,246,.055), transparent 27rem),
        #f5f7f9;
}

.sidebar { width: 260px; border-right-color: rgba(255,255,255,.065); box-shadow: 8px 0 30px rgba(10,14,16,.08); }
.workspace { margin-left: 260px; }
.sidebar__brand { padding-inline: 22px; }
.sidebar__nav { padding: 22px 12px; }
.sidebar__label { margin-bottom: 10px; }
.nav-link {
    min-height: 46px;
    margin-bottom: 4px;
    padding-inline: 14px;
    border-radius: 8px;
    transition: color .16s ease, background .16s ease, transform .16s ease;
}
.nav-link:hover { background: rgba(255,255,255,.06); transform: translateX(2px); }
.nav-link.is-active { background: linear-gradient(100deg, rgba(20,100,246,.22), rgba(217,31,121,.10)); box-shadow: inset 0 0 0 1px rgba(157,189,255,.08); }
.nav-link.is-active::before { inset: 10px auto 10px -12px; width: 3px; border-radius: 0 5px 5px 0; }
.nav-link svg { transition: transform .16s ease; }
.nav-link:hover svg { transform: scale(1.06); }

.topbar {
    height: 74px;
    padding-inline: clamp(20px, 2.5vw, 38px);
    border-bottom-color: rgba(189,198,202,.75);
    background: rgba(255,255,255,.9);
    box-shadow: 0 1px 0 rgba(255,255,255,.8), 0 6px 22px rgba(16,20,22,.035);
    backdrop-filter: blur(16px) saturate(150%);
}
.shell-search { width: min(500px, 38vw); }
.shell-search input {
    height: 42px;
    border-color: #dfe4e7;
    border-radius: 9px;
    background: #f4f6f8;
    transition: width .18s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.shell-search input:hover { border-color: var(--ink-300); background: var(--paper); }
.shell-search input:focus { border-color: rgba(20,100,246,.55); box-shadow: var(--focus-ring); }
.user-avatar { border-radius: 10px; background: linear-gradient(145deg, var(--ink-800), var(--accent-dark)); box-shadow: 0 5px 14px rgba(22,73,197,.16); }
.logout-button { border-radius: var(--radius-sm); transition: color .16s ease, background .16s ease; }
.logout-button:hover { background: #fbefef; }
.content { width: min(1480px, 100%); padding: clamp(22px, 2.6vw, 38px); }

.button {
    min-height: 42px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(16,20,22,.04);
    transition: color .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { box-shadow: none; transform: translateY(0); }
.button--primary { box-shadow: 0 6px 16px rgba(22,73,197,.16); }
.button--primary:hover { box-shadow: 0 8px 22px rgba(22,73,197,.22); }
.button--secondary:hover { border-color: #b7c8ec; color: var(--accent-dark); background: var(--accent-soft); }

.field input,
.field select,
.field textarea,
.global-search-page input,
.filter-panel__inner input,
.filter-panel__inner select {
    border-radius: 8px;
    border-color: #dce2e5;
    background-color: #fcfdfd;
}
.field input:hover,
.field select:hover,
.field textarea:hover,
.filter-panel__inner input:hover,
.filter-panel__inner select:hover { border-color: var(--ink-300); }
.field input:focus,
.field select:focus,
.field textarea:focus,
.global-search-page input:focus,
.filter-panel__inner input:focus,
.filter-panel__inner select:focus { border-color: rgba(20,100,246,.62); box-shadow: var(--focus-ring); background: var(--paper); }
.field > span { color: var(--ink-700); }
.field.has-error input,
.field.has-error select,
.field.has-error textarea { background: #fffafa; box-shadow: 0 0 0 3px rgba(164,61,61,.07); }

.alert { border: 1px solid; border-left-width: 4px; border-radius: 8px; box-shadow: 0 3px 14px rgba(16,20,22,.025); }
.alert--success { border-color: #bcdaca; border-left-color: var(--success); }
.alert--error { border-color: #e8c5c5; border-left-color: var(--danger); }
.alert--warning { border-color: #d9dff1; border-left-color: var(--accent-dark); }

.filter-shell,
.table-card,
.data-panel,
.dashboard-card,
.dashboard-kpi,
.form-section,
.detail-section,
.status-control,
.history-panel,
.empty-workspace,
.search-group,
.global-search-page,
.payment-panel,
.communication-panel,
.queue-panel,
.ops-count,
.vehicle-stage-counts,
.request-hero {
    border-radius: var(--radius-md);
    border-color: #dfe4e7;
    box-shadow: var(--shadow-sm);
}
.filter-shell { margin-bottom: 18px; overflow: clip; }
.filter-shell__bar { min-height: 66px; padding: 11px 13px; }
.filter-search input { background: #f6f8f9; }
.filter-toggle { min-height: 42px; border-radius: 8px; }
.filter-clear { border-radius: 6px; }
.filter-clear:hover { background: #fbefef; }
.filter-panel__inner { padding: 17px; background: linear-gradient(180deg, #fbfcfd, #f7f9fa); }

.table-card { overflow: clip; }
.table-scroll { overscroll-behavior-inline: contain; scrollbar-gutter: stable; }
.table-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: inherit; }
.data-table { font-variant-numeric: tabular-nums; }
.data-table thead { position: sticky; z-index: 3; top: 0; }
.table-card .data-table th { height: 48px; background: rgba(247,249,250,.96); backdrop-filter: blur(8px); }
.table-card .data-table td { height: 66px; }
.table-card .data-table tbody tr:nth-child(even) { background: rgba(248,250,251,.45); }
.table-card .data-table tbody tr:hover { background: #f4f7ff; box-shadow: inset 3px 0 0 var(--accent); }
.table-primary-link,
.data-table td > a:not(.table-action) { color: var(--ink-900); font-weight: 650; text-decoration-color: transparent; text-underline-offset: 3px; }
.table-primary-link:hover,
.data-table td > a:not(.table-action):hover { color: var(--accent-dark); text-decoration: underline; text-decoration-color: rgba(20,100,246,.32); }
.table-card .table-action { border-radius: 7px; }
.table-empty { min-height: 140px; padding-block: 48px !important; color: var(--ink-500) !important; text-align: center !important; }

.pagination { min-height: 62px; background: #fbfcfd; }
.pagination a,
.pagination span { border-radius: 7px; }
.pagination a:hover { border-color: #b9caef; color: var(--accent-dark); background: var(--accent-soft); }
.pagination .is-current { background: linear-gradient(135deg, var(--accent-dark), var(--accent)); box-shadow: 0 4px 10px rgba(22,73,197,.16); }

.dashboard-kpis { gap: 16px; margin-bottom: 18px; }
.dashboard-kpi { border-radius: 12px; }
.dashboard-kpi__icon { border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(20,100,246,.07); }
.dashboard-grid { gap: 18px; }
.dashboard-card__header { min-height: 62px; padding-inline: 19px; }
.dashboard-card__header > a { padding: 6px 8px; border-radius: 6px; }
.dashboard-card__header > a:hover { background: var(--accent-soft); }
.dashboard-followup-row,
.dashboard-payment-row,
.dashboard-communications > a,
.dashboard-stages > a { transition: color .14s ease, background .14s ease, box-shadow .14s ease; }
.dashboard-followup-row:hover,
.dashboard-payment-row:hover,
.dashboard-communications > a:hover,
.dashboard-stages > a:hover { background: #f5f8ff; box-shadow: inset 3px 0 0 rgba(20,100,246,.7); }

.form-section { overflow: clip; }
.form-section__heading > span { border-radius: 8px; }
.create-client-card { border-radius: 12px; }
.create-extras { border-radius: 9px; }
.create-extras summary { min-height: 58px; align-content: center; }
.create-client-actions { border-radius: 11px; box-shadow: 0 -10px 32px rgba(16,20,22,.09); }
.apple-switch > span { box-shadow: inset 0 0 0 1px rgba(16,20,22,.06); }

.profile-initial { border-radius: 13px; background: linear-gradient(145deg, var(--ink-800), var(--accent-dark)); box-shadow: 0 8px 20px rgba(22,73,197,.16); }
.detail-section,
.status-control,
.history-panel,
.empty-workspace { overflow: clip; }
.detail-section__heading { background: linear-gradient(180deg, #fff, #fbfcfd); }
.status-badge,
.role-badge,
.team-status,
.payment-status,
.activity-badge,
.entity-chip,
.mini-status { border-radius: 999px; }
.empty-state,
.empty-workspace { border-radius: var(--radius-md); }

.auth-shell { overflow: hidden; border-radius: var(--radius-lg); box-shadow: 0 30px 90px rgba(0,0,0,.3); }
.auth-brand { background: radial-gradient(circle at 82% 18%, rgba(20,100,246,.22), transparent 42%), var(--ink-900); }

@media (max-width: 900px) {
    .workspace { margin-left: 0; }
    .sidebar { width: min(290px, 86vw); box-shadow: 18px 0 50px rgba(0,0,0,.2); }
    .sidebar-overlay { width: auto; height: auto; padding: 0; border: 0; cursor: default; }
    .sidebar-open { overflow: hidden; }
}

@media (max-width: 700px) {
    .topbar { height: 68px; padding-inline: 14px; }
    .content { padding: 20px 14px 28px; }
    .filter-shell__bar { gap: 8px; }
    .dashboard-kpis { gap: 12px; }
    .dashboard-kpi { min-height: 96px; }
    .profile-heading { gap: 16px; margin-bottom: 18px; }
    .profile-actions .button { flex: 1 1 auto; }
    .form-section { padding: 18px 15px; }
    .pagination { align-items: flex-start; flex-direction: column; padding-block: 12px; }
    .pagination > div { width: 100%; flex-wrap: wrap; }
    .pagination > div > * { flex: 1; }
    .auth-shell { border-radius: 0; }
}

@media (hover: none) {
    .button:hover,
    .nav-link:hover,
    .dashboard-kpi:hover { transform: none; }
}

/* Client activity and payment entry modals */
.modal-open { overflow: hidden; }
.entry-dialog {
    width: min(720px, calc(100vw - 32px));
    max-width: none;
    max-height: min(88vh, 820px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(189,198,202,.9);
    border-radius: 16px;
    color: var(--ink-900);
    background: var(--paper);
    box-shadow: 0 28px 90px rgba(10,14,16,.28);
}
.entry-dialog--payment { width: min(880px, calc(100vw - 32px)); }
.entry-dialog[open] {
    display: flex;
    flex-direction: column;
    animation: entry-dialog-in .2s cubic-bezier(.2,.75,.2,1);
}
.entry-dialog::backdrop {
    background: rgba(11,15,18,.58);
    backdrop-filter: blur(5px);
    animation: entry-backdrop-in .18s ease-out;
}
.entry-dialog.is-fallback-open {
    position: fixed;
    z-index: 90;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
}
.entry-dialog__header {
    display: flex;
    min-height: 88px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--ink-100);
    background: linear-gradient(135deg, #fff 60%, rgba(238,243,255,.8));
}
.entry-dialog__header .eyebrow { margin-bottom: 3px; }
.entry-dialog__header h2 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.entry-dialog__header p:last-child { margin: 4px 0 0; color: var(--ink-500); font-size: 11px; }
.entry-dialog__close {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--ink-200);
    border-radius: 10px;
    color: var(--ink-600);
    background: rgba(255,255,255,.8);
    cursor: pointer;
    transition: color .16s ease, border-color .16s ease, background .16s ease, transform .16s ease;
}
.entry-dialog__close:hover { border-color: #e1bebe; color: var(--danger); background: #fff5f5; transform: rotate(3deg); }
.entry-dialog__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.entry-dialog > .inline-form-error { margin: 14px 22px 0; border-radius: 7px; }
.entry-dialog__form { display: grid; min-height: 0; flex: 1 1 auto; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; }
.entry-dialog__body { min-height: 0; padding: 22px; overflow-y: auto; overscroll-behavior: contain; background: #fcfdfd; }
.entry-dialog .communication-form-grid,
.entry-dialog .payment-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.entry-dialog .field--full { grid-column: 1 / -1; }
.entry-dialog .field textarea { min-height: 112px; }
.entry-dialog__footer {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 13px 18px 13px 22px;
    border-top: 1px solid var(--ink-100);
    background: rgba(255,255,255,.96);
    box-shadow: 0 -8px 24px rgba(16,20,22,.035);
    backdrop-filter: blur(12px);
}
.entry-dialog__footer > span { max-width: 420px; color: var(--ink-500); font-size: 10px; line-height: 1.55; }
.entry-dialog__footer > div { display: flex; flex: 0 0 auto; gap: 9px; }
.entry-modal-trigger { white-space: nowrap; }
.entry-noscript-form { padding: 20px 22px; border-bottom: 1px solid var(--ink-200); background: #fafbfc; }
.entry-noscript-form h4 { margin: 0 0 16px; font-size: 16px; }
.entry-noscript-form .entry-dialog__form { display: block; overflow: visible; }
.entry-noscript-form .entry-dialog__body { padding: 0; overflow: visible; background: transparent; }
.entry-noscript-form .entry-dialog__footer { margin: 18px -22px -20px; }
.entry-noscript-form [data-modal-close] { display: none; }

@keyframes entry-dialog-in {
    from { opacity: 0; transform: translateY(12px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes entry-backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 700px) {
    .entry-dialog,
    .entry-dialog--payment {
        width: 100vw;
        height: 100dvh;
        max-height: none;
        border: 0;
        border-radius: 0;
    }
    .entry-dialog__header { min-height: 76px; padding: 14px 16px; }
    .entry-dialog__header h2 { font-size: 19px; }
    .entry-dialog > .inline-form-error { margin: 10px 14px 0; }
    .entry-dialog__body { padding: 18px 14px 24px; }
    .entry-dialog .communication-form-grid,
    .entry-dialog .payment-form-grid { grid-template-columns: 1fr; gap: 14px; }
    .entry-dialog .field--full { grid-column: auto; }
    .entry-dialog__footer { align-items: stretch; flex-direction: column; gap: 10px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
    .entry-dialog__footer > span { display: none; }
    .entry-dialog__footer > div { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
    .entry-dialog__footer .button { width: 100%; padding-inline: 10px; }
}

.vehicle-preference-trigger { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 0; border: 0; border-bottom: 1px dotted var(--ink-300); color: var(--ink-800); background: transparent; font: inherit; font-weight: 650; text-align: left; cursor: help; }
.vehicle-preference-trigger:hover, .vehicle-preference-trigger[aria-expanded="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.vehicle-preference-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 3px; }
.vehicle-preference-trigger__year { flex-shrink: 0; color: var(--ink-600); font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vehicle-preference-trigger__name { min-width: 0; overflow-wrap: anywhere; }
.vehicle-preference-trigger__icon { display: block; flex: 0 0 16px; width: 16px; height: 16px; color: var(--ink-600); }
.vehicle-preference-card { position: fixed; z-index: 80; box-sizing: border-box; width: 350px; max-width: calc(100vw - 24px); max-height: min(520px, calc(100vh - 24px)); overflow: auto; overscroll-behavior: contain; margin: 0; padding: 16px; border: 1px solid var(--ink-200); border-radius: 14px; color: var(--ink-800); background: var(--paper); box-shadow: 0 12px 40px rgba(20,35,55,.16), 0 2px 6px rgba(20,35,55,.05); font-size: 12px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
.vehicle-preference-card[hidden] { display: none; }
.vehicle-preference-card:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.vehicle-preference-card__header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--ink-100); }
.vehicle-preference-card__header > div { display: grid; align-content: start; gap: 3px; min-width: 0; }
.vehicle-preference-card__header > div > span { color: var(--ink-500); font-size: 10px; }
.vehicle-preference-card__header > div > strong { font-size: 16px; font-weight: 700; }
.vehicle-preference-card__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 18px; margin: 12px 0 0; }
.vehicle-preference-card__fields > div { min-width: 0; }
.vehicle-preference-card__fields dt, .vehicle-preference-card__notes > span { margin: 0 0 3px; color: var(--ink-500); font-size: 10px; }
.vehicle-preference-card__fields dd { margin: 0; font-size: 12px; font-weight: 600; }
.vehicle-preference-card__wide { grid-column: 1 / -1; }
.vehicle-preference-card__colors { display: flex; flex-wrap: wrap; gap: 5px; }
.vehicle-preference-card__color { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 3px 7px; border: 1px solid var(--ink-100); border-radius: 6px; background: #fafbfc; font-size: 10px; font-weight: 500; }
.vehicle-preference-card__color i { flex: 0 0 12px; height: 12px; border: 1px solid rgba(20,35,55,.15); border-radius: 50%; background: var(--vehicle-swatch); }
.vehicle-preference-card__notes { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--ink-100); }
.vehicle-preference-card__notes p { margin: 4px 0 0; font-size: 11px; font-weight: 400; white-space: pre-wrap; }

.vehicle-color-picker {
    grid-column: 1 / -1;
    min-width: 0;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--ink-200);
    border-radius: 12px;
    background: var(--paper);
}
.vehicle-color-picker legend { padding: 0 5px; color: var(--ink-700); font-size: 12px; font-weight: 650; }
.vehicle-color-picker__hint { margin: -2px 0 10px; color: var(--ink-500); font-size: 10px; }
.vehicle-color-picker__swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.vehicle-color-option { position: relative; flex: 0 1 auto; min-width: 0; max-width: 100%; cursor: pointer; }
.vehicle-color-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.vehicle-color-option__body { display: flex; align-items: center; gap: 7px; height: 100%; min-height: 36px; padding: 6px 8px; border: 1px solid var(--ink-100); border-radius: 8px; color: var(--ink-700); font-size: 10px; background: #fafbfc; transition: background .16s, border-color .16s, box-shadow .16s; }
.vehicle-color-option__body > span:nth-child(2) { overflow-wrap: anywhere; }
.vehicle-color-option__swatch { flex: 0 0 28px; height: 28px; border: 1px solid rgba(20,35,55,.16); border-radius: 50%; background: var(--vehicle-swatch); box-shadow: inset 0 0 0 2px rgba(255,255,255,.18); }
.vehicle-color-option__swatch--white { --vehicle-swatch: #ffffff; }
.vehicle-color-option__swatch--black { --vehicle-swatch: #252830; }
.vehicle-color-option__swatch--gray { --vehicle-swatch: #858b94; }
.vehicle-color-option__swatch--silver { --vehicle-swatch: linear-gradient(135deg, #b2bac4, #eef1f5 48%, #a3adb9); }
.vehicle-color-option__swatch--blue { --vehicle-swatch: #3268b1; }
.vehicle-color-option__swatch--red { --vehicle-swatch: #c64747; }
.vehicle-color-option__swatch--green { --vehicle-swatch: #43836a; }
.vehicle-color-option__swatch--brown { --vehicle-swatch: #865e49; }
.vehicle-color-option__swatch--beige { --vehicle-swatch: #d8c4a4; }
.vehicle-color-option__swatch--gold { --vehicle-swatch: linear-gradient(135deg, #b48b35, #efdaa0 48%, #bd9849); }
.vehicle-color-option__swatch--orange { --vehicle-swatch: #e98b3b; }
.vehicle-color-option__swatch--yellow { --vehicle-swatch: #edcc4b; }
.vehicle-color-option__swatch--other { --vehicle-swatch: conic-gradient(#9faae5, #e4a6b5, #efd491, #96cbb6, #9faae5); }
.vehicle-color-option__check { flex: 0 0 12px; color: var(--accent); font-size: 12px; font-weight: 800; visibility: hidden; }
.vehicle-color-option:hover .vehicle-color-option__body { border-color: var(--ink-300); background: var(--paper); }
.vehicle-color-option input:checked + .vehicle-color-option__body { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.vehicle-color-option input:checked + .vehicle-color-option__body .vehicle-color-option__check { visibility: visible; }
.vehicle-color-option input:focus-visible + .vehicle-color-option__body { outline: 2px solid var(--accent); outline-offset: 3px; }
.vehicle-color-option input:disabled + .vehicle-color-option__body { opacity: .5; cursor: default; }
.vehicle-color-option--any { display: inline-block; margin-top: 8px; }
.vehicle-color-option--any .vehicle-color-option__body { padding-right: 12px; }
.vehicle-color-option__any-icon { display: grid; flex: 0 0 19px; height: 19px; place-items: center; font-size: 20px; color: var(--ink-500); }
.vehicle-color-picker__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--ink-100); }
.vehicle-color-picker__chips[hidden] { display: none; }
.vehicle-color-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 8px; border: 1px solid #d8e4f7; border-radius: 6px; color: var(--accent); background: var(--accent-soft); font: inherit; font-size: 10px; cursor: pointer; }
.vehicle-color-chip > span:first-child { overflow-wrap: anywhere; }
.vehicle-color-chip > span:last-child { font-size: 16px; line-height: 1; }
.vehicle-color-chip:hover { border-color: var(--accent); }
.vehicle-color-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vehicle-color-picker.has-error { border-color: var(--danger); }
.vehicle-color-picker__error { display: block; margin-top: 8px; color: var(--danger); font-size: 10px; }
@media (max-width: 420px) {
    .vehicle-color-picker { padding: 10px; }
    .vehicle-color-option__body { gap: 5px; padding-inline: 6px; font-size: 9px; }
    .vehicle-color-option__swatch { flex-basis: 26px; height: 26px; }
}

.field select.engine-volume-select {
    appearance: none;
    padding: 0 42px 0 14px;
    border: 1px solid var(--ink-200);
    border-radius: 12px;
    background-color: var(--paper);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23556372' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    box-shadow: 0 2px 5px rgba(20, 35, 55, .04);
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.field select.engine-volume-select:hover { border-color: var(--ink-400); }
.field select.engine-volume-select:focus {
    border-color: var(--accent);
    box-shadow: var(--focus-ring);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23556372' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Shared, restrained feedback for navigable table rows. */
.data-table tbody tr.clickable-row:hover,
.data-table tbody tr.clickable-row:focus-within { background: #f4f7fb; box-shadow: none; }
/* Independent car and transportation payment entry. */
.payment-entry-hint { margin: 0 0 12px; color: var(--ink-500); font-size: 11px; }
.payment-category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.payment-category { min-width: 0; padding: 16px; border: 1px solid var(--ink-200); border-radius: 12px; background: var(--paper); }
.payment-category h3 { margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--ink-100); color: var(--ink-800); font-size: 14px; }
.payment-category__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.payment-category__fields .field { min-width: 0; gap: 5px; }
.entry-dialog .payment-category__fields .field--full { grid-column: 1 / -1; }
.payment-category__fields .field > span { font-size: 11px; }
.payment-category__fields .field input, .payment-category__fields .field select { min-width: 0; height: 40px; padding-inline: 10px; font-size: 12px; }
.payment-category__total { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--ink-100); }
.payment-category__total > span { color: var(--ink-500); font-size: 11px; }
.payment-category__total output { color: var(--accent); font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.payment-associations { margin-top: 12px; color: var(--ink-600); font-size: 11px; }
.payment-associations summary { cursor: pointer; }
.payment-associations > div { margin-top: 12px; }
@media (max-width: 700px) {
    .payment-category-grid { grid-template-columns: 1fr; gap: 12px; }
    .payment-category { padding: 14px; }
}
/* Scannable vehicle preferences on the client profile. */
.request-summary { overflow: hidden; padding: 22px; border: 1px solid var(--ink-200); border-radius: 14px; color: var(--ink-800); background: var(--paper); box-shadow: var(--shadow-sm); }
.request-summary__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #d6d6d6; }
.request-summary__bar .eyebrow { margin: 0; color: var(--accent); font-size: 11px; }
.request-summary__bar { flex-wrap: wrap; }
.request-summary__top-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.request-summary__top-actions .button { min-height: 36px; font-size: 11px; }
.request-summary__heading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 20px; margin-bottom: 20px; }
.request-summary__heading h3 { min-width: 0; margin: 0; color: var(--ink-900); font-size: clamp(22px, 2.5vw, 30px); font-weight: 750; line-height: 1.2; letter-spacing: -.025em; overflow-wrap: anywhere; }
.request-summary__heading > div { display: grid; gap: 4px; padding-right: 20px; border-right: 1px solid var(--ink-200); }
.request-summary__heading > div > span, .request-summary dt, .request-summary__label { color: var(--ink-500); font-size: 11px; font-weight: 500; }
.request-summary__heading strong { color: var(--ink-900); font-size: 20px; font-variant-numeric: tabular-nums; }
.request-summary__heading > .status-badge { justify-self: end; max-width: 140px; white-space: normal; }
.request-summary__priorities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.request-summary__priorities > div { min-width: 0; padding: 13px 15px; border: 1px solid #e1e8f3; border-radius: 10px; background: #f6f9ff; }
.request-summary dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.request-summary__priorities dd { color: var(--ink-900); font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.request-summary__priorities > div:first-child dd { color: var(--accent); }
.request-summary__colors { display: grid; gap: 8px; margin-bottom: 18px; }
.request-summary__colors > div { display: flex; flex-wrap: wrap; gap: 7px; }
.request-summary__color { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 6px 9px; border: 1px solid var(--ink-200); border-radius: 8px; background: #fafbfc; font-size: 12px; overflow-wrap: anywhere; }
.request-summary__color i { flex: 0 0 20px; height: 20px; border: 1px solid rgba(20,35,55,.18); border-radius: 50%; background: var(--vehicle-swatch); }
.request-summary__specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 24px; margin: 0; padding-top: 16px; border-top: 1px solid var(--ink-100); }
.request-summary__specs dd { font-size: 14px; font-weight: 650; }
.request-summary .request-summary__empty { color: var(--ink-400); font-size: 12px; font-weight: 400; }
.request-summary__notes { margin-top: 18px; padding: 12px 14px; border-left: 3px solid #c6d7f3; border-radius: 0 8px 8px 0; background: #f8fafc; }
.request-summary__notes p { margin: 5px 0 0; color: var(--ink-800); font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.request-summary__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--ink-100); }
.request-summary__actions .button { min-height: 38px; font-size: 11px; }
.request-summary__actions .table-action { font-size: 11px; }
@media (max-width: 600px) {
    .request-summary { padding: 16px; }
    .request-summary__specs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .request-summary__bar { align-items: flex-start; gap: 10px; }
    .request-summary__top-actions { width: 100%; margin-left: 0; }
    .request-summary__top-actions .button { width: 100%; white-space: normal; text-align: center; }
    .request-summary__heading { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 16px; }
    .request-summary__heading h3 { grid-row: 1; font-size: 24px; line-height: 1.3; }
    .request-summary__heading > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; padding-right: 0; border-right: 0; }
    .request-summary__heading > .status-badge { justify-self: start; max-width: 100%; min-width: 0; line-height: 1.5; overflow-wrap: anywhere; }
    .request-summary__heading > .status-badge i { flex: 0 0 6px; }
    .request-summary__heading strong { font-size: 16px; }
    .request-summary__priorities > div { padding: 10px; }
    .request-summary__priorities dd { font-size: 16px; }
    .request-summary__actions { align-items: flex-start; flex-direction: column; }
    .request-summary__actions .table-action { white-space: normal; overflow-wrap: anywhere; }
}
/* Neutral, low-glare surfaces for the client profile. */
.client-profile-page, .client-profile-page .workspace { background: #e6e6e6; }
.client-profile-page .topbar { background: #ededed; border-bottom-color: #d2d2d2; box-shadow: none; }
.client-profile-page .detail-section,
.client-profile-page .status-control,
.client-profile-page .history-panel,
.client-profile-page .empty-workspace,
.client-profile-page .communication-panel,
.client-profile-page .payment-panel { background: #f1f1f1; border-color: #d4d4d4; box-shadow: 0 2px 7px rgba(0,0,0,.035); }
.client-profile-page .detail-section__heading,
.client-profile-page .communication-panel__heading,
.client-profile-page .payment-panel__heading { background: #eaeaea; border-bottom-color: #d8d8d8; }
.client-profile-page .request-summary { background: #f2f2f2; border-color: #d0d0d0; box-shadow: 0 3px 12px rgba(0,0,0,.05); }
.client-profile-page .request-summary__priorities > div { background: #e8e8e8; border-color: #d5d5d5; }
.client-profile-page .request-summary__priorities > div:first-child dd,
.client-profile-page .request-summary__bar .eyebrow { color: #343434; }
.client-profile-page .request-summary__color { background: #f3f3f3; border-color: #d3d3d3; }
.client-profile-page .request-summary__notes { background: #e9e9e9; border-left-color: #ababab; }
.client-profile-page .request-summary__heading > div > span,
.client-profile-page .request-summary dt,
.client-profile-page .request-summary__label { color: #606060; }
.client-profile-page .request-summary__specs,
.client-profile-page .request-summary__actions { border-top-color: #d6d6d6; }
.client-profile-page .payment-summary { background: #e8e8e8; }
.client-profile-page .payment-summary article { background: #f1f1f1; border-color: #d4d4d4; }
.client-profile-page .payment-row:hover,
.client-profile-page .client-vehicle-row:hover { background: #e4e4e4; }
.client-profile-page .button--secondary,
.client-profile-page .status-control input,
.client-profile-page .status-control select { background: #f3f3f3; border-color: #cdcdcd; }
.client-profile-page .entry-dialog { background: #f1f1f1; }
.client-profile-page .entry-dialog__header,
.client-profile-page .entry-dialog__footer { background: #eaeaea; }
.client-profile-page .entry-dialog__body { background: #e7e7e7; }
.client-profile-page .payment-category { background: #f1f1f1; border-color: #d2d2d2; }
.client-profile-page .entry-dialog .field input,
.client-profile-page .entry-dialog .field select,
.client-profile-page .entry-dialog .field textarea { background: #f5f5f5; }

/* Quiet, compact customer identity to match the profile cards. */
.client-profile-page .profile-heading__identity { min-width: 0; gap: 12px; }
.client-profile-page .profile-client-id {
    min-width: 56px;
    height: 36px;
    padding: 0 11px;
    border: 1px solid #c9c9c9;
    border-radius: 8px;
    color: #616161;
    background: #efefef;
    box-shadow: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .02em;
}
.client-profile-page .profile-heading__identity > div:last-child { min-width: 0; }
.client-profile-page .profile-heading__identity h2 {
    margin: 0;
    color: #292929;
    font-size: clamp(23px, 2vw, 28px);
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: -.02em;
    overflow-wrap: anywhere;
}
/* Unified client profile header. */
.client-profile-page .profile-heading {
    width: 100%;
    padding: 18px 22px;
    border: 1px solid #bfbfbf;
    border-radius: 12px;
    background: #ededed;
    gap: 20px;
    flex-wrap: wrap;
}
.client-profile-page .profile-heading__identity {
    align-items: center;
    justify-content: center;
    min-width: 0;
    max-width: 100%;
    gap: 16px;
    padding: 0;
    border: 0;
    text-align: center;
}
.client-profile-page .profile-client-id {
    min-width: 0;
    height: 44px;
    padding: 0 16px 0 0;
    border: 0;
    border-right: 1px solid #ccc;
    border-radius: 0;
    background: transparent;
    font-size: 18px;
}
.client-profile-page .profile-heading__identity h2 { font-size: clamp(28px, 2.6vw, 34px); }
.client-profile-page .profile-heading__identity .profile-kicker { justify-content: center; }
.client-profile-page .profile-heading .profile-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 100%;
    margin-left: auto;
    gap: 12px;
}
.profile-name-line { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 12px; min-width: 0; }
.profile-name-line h2 { min-width: 0; }
.profile-deposit-badge { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; margin: 0; padding: 4px 8px; border: 1px solid #c9c9c9; border-radius: 6px; color: #555; background: #e5e5e5; font-size: 11px; font-weight: 600; line-height: 1.4; }
.profile-deposit-badge svg { flex: 0 0 14px; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.client-follow-up { display: flex; align-items: center; gap: 12px; min-width: 0; max-width: 100%; padding: 10px 12px; border: 1px solid #d0d0d0; border-radius: 9px; color: #616161; background: #f3f3f3; text-align: left; }
.client-follow-up__icon { flex: 0 0 32px; width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.client-follow-up__content { display: grid; gap: 4px; min-width: 0; }
.client-follow-up__label { color: #707070; font-size: 10px; font-weight: 500; line-height: 1.5; }
.client-follow-up__date { color: #383838; font-size: 12px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.client-follow-up__status { display: inline-flex; align-items: center; gap: 5px; color: #944646; font-size: 10px; font-weight: 500; line-height: 1.5; }
.client-follow-up__status::before { content: ''; flex: 0 0 4px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.client-follow-up--none .client-follow-up__date { color: #707070; font-weight: 400; }
@media (max-width: 700px) {
    .client-profile-page .profile-heading { padding: 16px; }
    .client-profile-page .profile-heading .profile-actions { width: 100%; flex-wrap: nowrap; align-items: center; margin-left: 0; }
    .client-profile-page .profile-heading .client-follow-up { flex: 1 1 auto; }
}
/* Infrequent customer actions, kept behind a neutral overflow button. */
.client-actions-menu { position: relative; flex-shrink: 0; }
.client-profile-page .profile-sidebar { min-width: 0; grid-template-columns: minmax(0, 1fr); align-content: start; }
.profile-sidebar .payment-panel { min-width: 0; margin-top: 0; }
.profile-sidebar .payment-panel__heading { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px 19px; }
.profile-sidebar .payment-summary { flex-direction: column; padding: 14px 19px; }
.profile-sidebar .payment-summary article { min-width: 0; }
.profile-sidebar .payment-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 14px 19px; }
.profile-sidebar .payment-row time { grid-column: 1 / -1; }
.profile-sidebar .payment-row > div { min-width: 0; overflow-wrap: anywhere; }
.profile-sidebar .payment-row .payment-status { display: inline-flex; grid-column: 1 / -1; }
.profile-sidebar .payment-row > small { display: block; grid-column: 1 / -1; }
.client-actions-menu > summary { display: grid; width: 40px; height: 40px; place-items: center; padding: 0; border: 1px solid #c9c9c9; border-radius: 9px; color: #535353; background: transparent; cursor: pointer; list-style: none; }
.client-actions-menu > summary::-webkit-details-marker { display: none; }
.client-actions-menu > summary svg { width: 22px; height: 22px; fill: currentColor; }
.client-actions-menu > summary:hover, .client-actions-menu[open] > summary { background: #dedede; color: #252525; border-color: #ababab; }
.client-actions-menu__panel { position: absolute; z-index: 70; right: 0; top: calc(100% + 8px); width: 238px; max-width: calc(100vw - 24px); padding: 6px; border: 1px solid #ccc; border-radius: 12px; background: #f3f3f3; box-shadow: 0 8px 26px rgba(0,0,0,.12); }
.client-actions-menu__panel.opens-above { top: auto; bottom: calc(100% + 8px); }
.client-actions-menu__panel form { margin: 0; }
.client-actions-menu__panel a, .client-actions-menu__panel button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 10px; border: 0; border-radius: 7px; color: #3b3b3b; background: transparent; font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.client-actions-menu__panel a:hover, .client-actions-menu__panel button:hover { background: #e4e4e4; color: #171717; }
.client-actions-menu__panel svg { flex: 0 0 17px; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.client-actions-menu summary:focus-visible, .client-actions-menu__panel a:focus-visible, .client-actions-menu__panel button:focus-visible { outline: 2px solid #777; outline-offset: 2px; }

/* Compact client financial history. */
.client-profile-page .payment-panel--compact { border-radius: 12px; }
.profile-sidebar .payment-panel--compact .payment-panel__heading { flex-direction: row; align-items: center; gap: 8px; padding: 16px 18px; border-radius: 12px 12px 0 0; }
.payment-panel--compact .payment-panel__heading h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 14px; }
.payment-panel--compact .payment-panel__heading h3 span { margin: 0; font-size: 10px; font-weight: 500; }
.payment-panel--compact .payment-add { flex-shrink: 0; min-height: 32px; padding: 6px 9px; border: 1px solid #c9c9c9; border-radius: 7px; background: transparent; color: #444; font-size: 10px; box-shadow: none; }
.payment-panel--compact .payment-add:hover { background: #dedede; border-color: #aaa; }
.payment-overview { padding: 18px; border-bottom: 1px solid #d8d8d8; }
.payment-overview > p { margin: 0; color: #777; font-size: 11px; }
.payment-overview__currency + .payment-overview__currency { margin-top: 16px; padding-top: 16px; border-top: 1px solid #d8d8d8; }
.payment-overview__label { display: flex; justify-content: space-between; gap: 12px; color: #727272; font-size: 10px; }
.payment-overview__label > span:last-child { font-size: 10px; letter-spacing: .06em; }
.payment-overview__currency > strong { display: block; margin-top: 6px; color: #292929; font-size: clamp(24px, 2vw, 29px); font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.payment-overview dl { display: grid; gap: 7px; margin: 12px 0 0; }
.payment-overview dl > div { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; color: #737373; }
.payment-overview dd { margin: 0; color: #454545; font-variant-numeric: tabular-nums; }
.payment-item { display: grid; gap: 6px; padding: 15px 18px; border-bottom: 1px solid #dcdcdc; color: #333; transition: background .15s ease; }
.payment-item:last-child { border-bottom: 0; border-radius: 0 0 12px 12px; }
.payment-item:hover { background: #e5e5e5; }
.payment-item:focus-visible { outline: 2px solid #777; outline-offset: -3px; }
.payment-item__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 5px 10px; }
.payment-item__top strong { font-size: 11px; font-weight: 600; }
.payment-item__top b { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.payment-item__vehicle, .payment-item__reference { color: #717171; font-size: 10px; overflow-wrap: anywhere; }
.payment-item__meta { display: flex; align-items: center; gap: 8px; margin-top: 3px; color: #858585; font-size: 10px; }
.payment-item__meta > span:last-child { margin-left: auto; color: #777; }
.payment-item__status { display: inline-flex; align-items: center; gap: 5px; color: #707070; font-size: 9px; }
.payment-item__status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.payment-item__status--received { color: #527260; }
.payment-item__status--pending { color: #967842; }
.payment-item__status--refunded { color: #916161; }
.payment-item__status--cancelled { text-decoration: line-through; }

/* Client priorities: scoped to the client list. */
.clients-page-heading { margin-bottom: 12px; }
.client-priority--deposit { --priority-color: #5b21b6; --priority-bg: #f3e8ff; --priority-border: #d8b4fe; --priority-accent: #7c3aed; }
.client-priority--overdue { --priority-color: #9f1239; --priority-bg: #ffe4e6; --priority-border: #fda4af; --priority-accent: #e11d48; }
.client-priority--active { --priority-color: #1e40af; --priority-bg: #dbeafe; --priority-border: #93c5fd; --priority-accent: #2563eb; }
.client-priority--purchased { --priority-color: #166534; --priority-bg: #dcfce7; --priority-border: #86efac; --priority-accent: #16a34a; }
.client-priority-heading svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.clients-filter-toolbar { margin-bottom: 10px; border-radius: 10px; box-shadow: none; }
.clients-filter-toolbar .filter-shell__bar { flex-wrap: nowrap; min-height: 54px; gap: 8px; padding: 8px 10px; overflow-x: auto; }
.clients-filter-toolbar .filter-search { flex: 1 1 auto; min-width: 140px; }
.clients-filter-toolbar .filter-search input { height: 36px; border-color: transparent; background: transparent; font-size: 12px; }
.clients-filter-toolbar .filter-search input:focus { border-color: #bdcce0; background: #fff; box-shadow: none; }
.clients-filter-toolbar .filter-search-button, .clients-filter-toolbar .filter-toggle { flex: 0 0 auto; min-height: 36px; padding: 0 12px; font-size: 11px; }
.clients-filter-toolbar .filter-clear { flex-shrink: 0; white-space: nowrap; font-size: 10px; }
.client-priority-table { overflow: hidden; border-radius: 12px; }
.client-priority-table .data-panel__header { min-height: 34px; padding: 0 15px; font-size: 10px; }
.client-priority-table .data-table thead th { height: 42px; padding: 10px 15px; color: var(--ink-700); background: #f5f7f8; border-bottom: 1px solid #dce2e6; font-size: 11px; font-weight: 600; letter-spacing: normal; white-space: nowrap; }
.client-priority-table .data-table .client-priority-heading th { height: 46px; padding: 10px 15px; color: var(--priority-color); background: var(--priority-bg); border-bottom: 1px solid var(--priority-border); box-shadow: inset 2px 0 0 var(--priority-accent); font-size: 12px; font-weight: 700; line-height: 1.5; text-transform: none; letter-spacing: normal; }
.client-priority-heading__inner { display: flex; align-items: center; gap: 9px; }
.client-priority-heading__inner svg { width: 17px; height: 17px; flex-shrink: 0; stroke-width: 2; }
.client-priority-heading__inner b { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-width: 25px; height: 25px; margin-left: 3px; padding: 0 7px; border: 1px solid var(--priority-border); border-radius: 999px; color: var(--priority-color); background: #fff; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.client-priority-table .client-priority-row td { height: 58px; padding: 10px 15px; color: var(--ink-600); font-size: 12px; line-height: 1.5; }
.client-priority-table .client-priority-row .client-name { color: var(--ink-900); font-size: 13px; font-weight: 650; }
.client-priority-table .client-priority-row .phone-link { color: var(--ink-700); font-size: 12px; font-weight: 500; }
.client-priority-table .client-priority-row .responsive-secondary { color: var(--ink-500); font-size: 11px; }
.client-priority-table .client-priority-row .status-badge { gap: 5px; padding: 4px 7px; border-radius: 6px; font-size: 9px; line-height: 1.4; }
.client-priority-table .status-badge i { width: 5px; height: 5px; }
.client-priority-table .follow-up-text { font-size: 11px; }
.client-priority-table .follow-up-text--overdue { color: #ad3545; font-weight: 600; }
.client-priority-table .client-priority--purchased .client-priority-row { background: #fcfdfc; }
.client-priority-table .client-priority--purchased .client-priority-row td,
.client-priority-table .client-priority--purchased .client-name,
.client-priority-table .client-priority--purchased .phone-link,
.client-priority-table .client-priority--purchased .vehicle-preference-trigger { color: #687582; }
.client-priority-table .client-priority--purchased .status-badge { color: #65746d; border-color: #e1e7e3; background: #f5f7f5; }
.client-priority-table .data-table .client-priority-row:hover,
.client-priority-table .data-table .client-priority-row:focus-within { background: #f5f8fb; box-shadow: none; }

/* Activity detail: readable, field-aligned audit comparison. */
.activity-detail { display: grid; gap: 18px; }
.activity-detail__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.activity-detail__toolbar svg, .activity-event__icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.activity-detail__reference { color: var(--ink-500); font-size: 11px; white-space: nowrap; }
.activity-event, .activity-comparison { min-width: 0; overflow: hidden; border: 1px solid var(--ink-200); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow-sm); }
.activity-event__title { display: flex; align-items: flex-start; gap: 13px; padding: 22px; }
.activity-event__title > div { min-width: 0; overflow-wrap: anywhere; }
.activity-event__icon { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border: 1px solid var(--ink-200); border-radius: 10px; color: var(--ink-600); background: var(--ink-50); }
.activity-event__icon svg { width: 22px; height: 22px; }
.activity-event__title h2 { margin: 0; color: var(--ink-900); font-size: 20px; font-weight: 700; line-height: 1.5; }
.activity-event__title p { margin: 5px 0 0; color: var(--ink-600); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.activity-event__meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 16px 22px; border-top: 1px solid var(--ink-100); background: #fafbfc; }
.activity-event__meta > div { min-width: 0; }
.activity-event__meta dt { margin-bottom: 5px; color: var(--ink-500); font-size: 11px; }
.activity-event__meta dd { margin: 0; color: var(--ink-800); font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.activity-event__meta dd span { color: var(--ink-600); font-weight: 400; }
.activity-comparison__heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--ink-100); }
.activity-comparison__heading h3 { margin: 0; font-size: 14px; }
.activity-comparison__heading p { margin: 5px 0 0; color: var(--ink-500); font-size: 11px; }
.activity-change-count { padding: 5px 10px; border: 1px solid #b9dfd0; border-radius: 20px; color: #24634c; background: #eff9f4; font-size: 11px; font-weight: 600; }
.activity-diff-table { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: left; }
.activity-diff-table thead th { padding: 12px 22px; border-bottom: 1px solid var(--ink-100); color: var(--ink-600); background: #f7f9fa; font-size: 11px; font-weight: 600; }
.activity-diff-table thead th:first-child { width: 30%; }
.activity-diff-table tbody th, .activity-diff-table td { padding: 16px 22px; border-bottom: 1px solid var(--ink-100); vertical-align: top; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.activity-diff-table tbody th { color: var(--ink-700); font-weight: 600; }
.activity-diff-table tbody tr:last-child > * { border-bottom: 0; }
.activity-diff-table__changed > th { box-shadow: inset 2px 0 #459c78; }
.activity-diff-table__before { color: var(--ink-600); }
.activity-diff-table__changed .activity-diff-table__after { color: #225d47; background: #f1faf5; font-weight: 600; }
.activity-diff-table__value { white-space: pre-wrap; }
.activity-diff-table__value.is-empty { color: var(--ink-500); font-size: 11px; font-weight: 400; }
.activity-diff-table__mobile-label { display: none; }
.activity-unchanged { border-top: 1px solid var(--ink-100); }
.activity-unchanged summary { padding: 15px 22px; color: var(--ink-600); background: #fafbfc; cursor: pointer; font-size: 12px; font-weight: 600; }
.activity-unchanged summary span { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 12px; background: var(--ink-100); font-size: 11px; }
.activity-unchanged summary:hover { color: var(--ink-900); background: #f3f6f8; }
.activity-unchanged summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.activity-comparison__empty { margin: 0; padding: 28px 22px; color: var(--ink-500); font-size: 12px; line-height: 1.7; }
@media (max-width: 640px) {
    .activity-detail { gap: 14px; }
    .activity-detail__toolbar { flex-wrap: wrap; }
    .activity-event__title { padding: 18px 16px; gap: 10px; }
    .activity-event__title h2 { font-size: 17px; }
    .activity-event__meta { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
    .activity-comparison__heading { padding: 16px; }
    .activity-diff-table, .activity-diff-table tbody { display: block; }
    .activity-diff-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .activity-diff-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--ink-100); }
    .activity-diff-table tbody tr:last-child { border-bottom: 0; }
    .activity-diff-table tbody th { grid-column: 1 / -1; padding: 12px 16px 6px; border: 0; }
    .activity-diff-table td { display: block; min-width: 0; padding: 10px 16px 16px; border: 0; }
    .activity-diff-table__mobile-label { display: block; margin-bottom: 6px; color: var(--ink-500); font-size: 10px; font-weight: 500; }
    .activity-unchanged summary { padding: 15px 16px; }
}
