:root {
  --bg: #080b10;
  --surface: #11161e;
  --surface-2: #171d27;
  --surface-3: #202735;
  --line: #2a3342;
  --text: #f4f6f8;
  --muted: #9aa6b6;
  --blue: #3a8cff;
  --blue-soft: #142b4b;
  --green: #2fd073;
  --green-soft: #102d20;
  --orange: #ff9d35;
  --orange-soft: #362613;
  --red: #ff5d68;
  --red-soft: #35171d;
  --shadow: 0 20px 60px rgb(0 0 0 / 35%);
  --radius: 20px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); overscroll-behavior-y: none; }
body { margin: 0; min-width: 320px; min-height: 100vh; overscroll-behavior-y: none; color: var(--text); background: radial-gradient(circle at 90% -20%, #162a45 0, transparent 35%), var(--bg); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.danger-text { color: var(--red); }
.success-text { color: var(--green); }
.warning-text { color: var(--orange); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.boot-screen, .auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.boot-screen { align-content: center; color: var(--muted); }
.brand-mark { width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; font-weight: 900; letter-spacing: -1px; color: #f4bd35; background: linear-gradient(145deg, #14100a, #050608); box-shadow: 0 12px 40px rgb(218 156 18 / 24%); }
.brand-emblem { display: block; object-fit: cover; overflow: hidden; }
.boot-screen .brand-mark { margin: 0 auto 14px; }

.auth-shell { grid-template-columns: minmax(0, 940px); }
.auth-panel { display: grid; grid-template-columns: 1.15fr .85fr; min-height: 610px; border: 1px solid var(--line); border-radius: 30px; overflow: hidden; box-shadow: var(--shadow); background: var(--surface); }
.auth-hero { padding: 58px; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(circle at 20% 5%, rgb(58 140 255 / 30%), transparent 42%), linear-gradient(150deg, #111d2d, #0c1118); }
.auth-hero h1 { margin: 28px 0 14px; max-width: 560px; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1; letter-spacing: -3px; }
.auth-hero p { max-width: 520px; color: #bac5d4; font-size: 1.08rem; line-height: 1.65; }
.auth-value { display: grid; gap: 12px; margin-top: 40px; }
.auth-value span { display: flex; gap: 12px; align-items: center; color: #d7deea; }
.auth-value i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; color: var(--green); background: var(--green-soft); }
.auth-form-wrap { padding: 54px 46px; display: flex; flex-direction: column; justify-content: center; }
.auth-form-wrap h2 { margin: 0 0 8px; font-size: 1.8rem; }
.auth-form-wrap > p { color: var(--muted); line-height: 1.5; margin: 0 0 28px; }

.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field > span { color: #cbd3df; font-size: .88rem; font-weight: 700; }
.field input, .field select, .field textarea, .inline-edit input { width: 100%; min-height: 46px; padding: 11px 13px; color: var(--text); border: 1px solid var(--line); border-radius: 12px; outline: none; background: #0c1118; transition: border-color .18s, box-shadow .18s; }
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .inline-edit input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgb(58 140 255 / 14%); }
.us-date-control { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 8px; width: 100%; }
.field .us-date-control > input[data-us-date-input] { min-width: 0; }
.us-date-picker-button { width: 48px; min-height: 46px; display: grid; place-items: center; padding: 0; color: #dce7f5; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface-3); }
.us-date-picker-button:hover { border-color: var(--blue); background: var(--blue-soft); }
.us-date-picker-button:focus-visible { outline: 3px solid rgb(58 140 255 / 28%); outline-offset: 1px; }
.us-date-picker-button:disabled { opacity: .45; cursor: not-allowed; }
.us-date-picker-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.field .us-date-native-picker, .us-date-native-picker { position: absolute; z-index: 2; top: 0; right: 0; width: 48px; min-height: 46px; margin: 0; padding: 0; opacity: 0; pointer-events: none; }
.us-date-native-picker:disabled { cursor: not-allowed; }
.us-date-control:has(.us-date-native-picker:focus-visible) .us-date-picker-button { outline: 3px solid rgb(58 140 255 / 28%); outline-offset: 1px; }
.sensitive-field-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.sensitive-field-row .btn { min-height: 46px; }
.sensitive-disclosure { text-align: center; }
.sensitive-disclosure strong { display: block; margin-bottom: 8px; font-size: clamp(1.5rem, 5vw, 2.25rem); letter-spacing: .08em; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.field-grid .full { grid-column: 1 / -1; }
.owner-expense-opening-grid { gap: 14px; margin-top: 16px; }
.owner-expense-opening-field { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgb(0 0 0 / 12%); }
.owner-expense-opening-field > strong { display: block; margin-bottom: 12px; color: #eef3fa; font-size: .96rem; }
.owner-expense-opening-field .field { margin-bottom: 11px; }
.owner-expense-opening-facts { display: grid; gap: 7px; padding-top: 10px; border-top: 1px solid var(--line); }
.owner-expense-opening-facts span { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .78rem; line-height: 1.35; }
.owner-expense-opening-facts strong { flex: 0 0 auto; color: #e6edf7; }
.form-help { color: var(--muted); font-size: .82rem; line-height: 1.45; }
.form-details { grid-column: 1 / -1; margin: 3px 0 15px; padding: 13px 14px 0; border: 1px solid var(--line); border-radius: 13px; background: rgb(0 0 0 / 10%); }
.form-details summary { padding-bottom: 13px; cursor: pointer; color: #dce3ec; font-weight: 800; }
.form-details[open] summary { margin-bottom: 15px; border-bottom: 1px solid var(--line); }
.form-error { min-height: 22px; margin: 4px 0 10px; color: var(--red); font-size: .9rem; }
.form-success { margin: 0 0 18px; padding: 12px 14px; color: #ccebd9; border: 1px solid rgb(47 208 115 / 35%); border-radius: 12px; background: var(--green-soft); line-height: 1.45; }
.delivery-editor { gap: 11px; }
.delivery-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.delivery-editor-head > span { color: #cbd3df; font-size: .88rem; font-weight: 700; }
.delivery-list { display: grid; gap: 9px; }
.delivery-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: end; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: rgb(0 0 0 / 12%); }
.delivery-row label { display: grid; gap: 7px; }
.delivery-row label > span { color: var(--muted); font-size: .76rem; font-weight: 800; }
.delivery-row input { width: 100%; min-height: 42px; padding: 9px 11px; color: var(--text); border: 1px solid var(--line); border-radius: 10px; background: #0c1118; }
.btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border: 1px solid transparent; border-radius: 12px; cursor: pointer; font-weight: 800; text-decoration: none; background: var(--surface-3); transition: transform .16s, opacity .16s, background .16s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { color: white; background: var(--blue); }
.btn-success { color: #07150d; background: var(--green); }
.btn-warning { color: #1e1305; background: var(--orange); }
.btn-danger { color: white; background: #c43b47; }
.btn-ghost { border-color: var(--line); background: transparent; }
.btn-block { width: 100%; }
.btn-small { min-height: 34px; padding: 6px 11px; border-radius: 9px; font-size: .84rem; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 16px; border-right: 1px solid var(--line); background: rgb(11 15 21 / 94%); backdrop-filter: blur(20px); z-index: 30; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 26px; }
.sidebar-brand strong { display: block; letter-spacing: -.4px; }
.sidebar-brand small { display: block; margin-top: 2px; color: var(--muted); }
.nav-list { display: grid; gap: 5px; }
.nav-btn { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 0; border-radius: 12px; cursor: pointer; color: #aeb8c6; text-align: left; font-weight: 750; background: transparent; }
.nav-btn:hover { color: white; background: var(--surface-2); }
.nav-btn.active { color: white; background: var(--blue-soft); }
.nav-icon { width: 24px; text-align: center; font-size: 1.06rem; }
.sidebar-account { margin-top: auto; padding: 15px 10px 0; border-top: 1px solid var(--line); }
.sidebar-account strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .9rem; }
.sidebar-account small { color: var(--muted); }
.sidebar-account .btn { width: 100%; margin-top: 12px; }

.workspace { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 30px; border-bottom: 1px solid var(--line); background: rgb(8 11 16 / 86%); backdrop-filter: blur(20px); }
.topbar h1 { margin: 0; font-size: 1.45rem; letter-spacing: -.7px; }
.topbar p { margin: 3px 0 0; color: var(--muted); font-size: .86rem; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.week-control { display: flex; align-items: center; gap: 8px; }
.week-shortcuts { display: flex; align-items: center; gap: 6px; }
.week-control-copy { display: grid; min-width: 235px; line-height: 1.2; }
.week-control-copy strong { font-size: .75rem; }
.week-control-copy small { margin-top: 3px; color: var(--muted); font-size: .7rem; }
.week-control input, .week-control select { min-height: 40px; max-width: 310px; padding: 7px 10px; color: var(--text); border: 1px solid var(--line); border-radius: 10px; color-scheme: dark; background: var(--surface); }
.mobile-menu { display: none; }
.content { padding: 28px 30px 50px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.section-head h2 { margin: 0; font-size: 1.6rem; letter-spacing: -.7px; }
.section-head p { margin: 6px 0 0; color: var(--muted); }
.section-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.loads-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; }
.stat-card, .card { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgb(24 30 40 / 94%), rgb(15 20 28 / 94%)); box-shadow: 0 8px 28px rgb(0 0 0 / 16%); }
.stat-card { padding: 20px; }
.stat-card .label { color: var(--muted); font-weight: 700; font-size: .86rem; }
.stat-card .value { margin-top: 11px; font-size: clamp(1.55rem, 2.8vw, 2.25rem); font-weight: 900; letter-spacing: -1.3px; }
.stat-card .detail { margin-top: 8px; color: #b7c1cf; font-size: .83rem; }
.stat-card.good .value { color: var(--green); }
.stat-card.warn .value { color: var(--orange); }
.card { padding: 20px; }
.card + .card { margin-top: 16px; }
.card-title { margin: 0 0 15px; font-size: 1.03rem; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 18px; margin-top: 18px; }
.status-list { display: grid; gap: 11px; }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.status-row:last-child { border-bottom: 0; }
.status-row strong { display: block; }
.status-row small { display: block; margin-top: 4px; color: var(--muted); }
.compliance-panel { margin-top: 18px; }
.section-head + .compliance-panel { margin-top: 0; margin-bottom: 16px; }
.compliance-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.compliance-panel-head .card-title { margin-bottom: 5px; }
.compliance-panel-head p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.compliance-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0 4px; }
.compliance-count { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: rgb(0 0 0 / 12%); }
.compliance-count span { color: var(--muted); font-size: .78rem; font-weight: 800; }
.compliance-count strong { font-size: 1.2rem; }
.compliance-count-red strong { color: var(--red); }
.compliance-count-orange strong { color: var(--orange); }
.compliance-count-blue strong { color: #62a6ff; }
.compliance-alert-list { margin-top: 8px; }
.compliance-alert-row { width: 100%; border-right: 0; border-left: 0; border-top: 0; color: inherit; text-align: left; background: transparent; }
.compliance-alert-row:hover { background: rgb(255 255 255 / 2.2%); }
.compliance-alert-open { min-width: 0; flex: 1; display: flex; align-items: center; gap: 12px; padding: 0; color: inherit; text-align: left; border: 0; cursor: pointer; background: transparent; }
.compliance-alert-icon { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; color: #f4f6f8; border-radius: 10px; background: var(--surface-3); font-weight: 950; }
.compliance-alert-copy { min-width: 0; flex: 1; }
.compliance-alert-copy small { line-height: 1.35; }
.compliance-clear { display: grid; gap: 4px; margin-top: 16px; padding: 15px; color: #ccebd9; border: 1px solid rgb(47 208 115 / 35%); border-radius: 13px; background: var(--green-soft); }
.compliance-clear span { color: #abd0bb; font-size: .84rem; }
.empty-state { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; margin-bottom: 7px; color: #dbe2eb; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.search { position: relative; flex: 1 1 240px; }
.search input { width: 100%; min-height: 42px; padding: 9px 13px 9px 38px; color: var(--text); border: 1px solid var(--line); border-radius: 12px; outline: 0; background: var(--surface); }
.search::before { content: "⌕"; position: absolute; left: 13px; top: 9px; color: var(--muted); font-size: 1.1rem; }
.filter-select { min-height: 42px; padding: 8px 11px; color: var(--text); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.table-card { overflow-x: auto; overflow-y: hidden; padding: 0; scrollbar-gutter: stable; scrollbar-color: #52647c #111720; }
.table-card::-webkit-scrollbar { height: 12px; }
.table-card::-webkit-scrollbar-track { background: #111720; }
.table-card::-webkit-scrollbar-thumb { border: 3px solid #111720; border-radius: 999px; background: #52647c; }
.table-card::-webkit-scrollbar-thumb:hover { background: #6d82a0; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 13px 15px; color: var(--muted); text-align: left; font-size: .76rem; letter-spacing: .4px; text-transform: uppercase; background: #111720; }
.data-table td { padding: 14px 15px; border-top: 1px solid var(--line); vertical-align: middle; }
.data-table tbody tr:hover { background: rgb(255 255 255 / 2.2%); }
.data-table .right { text-align: right; }
.amount-cell strong, .amount-cell small { display: block; }
.amount-cell small { margin-top: 4px; color: var(--muted); font-size: .74rem; line-height: 1.35; white-space: nowrap; }
.primary-cell strong { display: block; }
.primary-cell small { display: block; max-width: 380px; margin-top: 4px; overflow: hidden; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.loads-table .primary-cell { min-width: 390px; vertical-align: top; }
.loads-table .primary-cell .load-route-full { max-width: none; overflow: visible; color: var(--muted); white-space: normal; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.45; }
.row-actions { display: flex; justify-content: flex-end; gap: 7px; }
.mileage-table { min-width: 1120px; }
.mileage-table td { vertical-align: top; }
.mileage-table th:nth-child(1) { width: 19%; }
.mileage-table th:nth-child(2) { width: 16%; }
.mileage-table th:nth-child(3) { width: 34%; }
.mileage-table th:nth-child(4) { width: 18%; }
.fuel-card-summary strong, .mileage-total strong, .mileage-payment-cell strong { display: block; }
.fuel-card-summary small, .mileage-total small, .mileage-payment-cell small, .mileage-state-note { display: block; margin-top: 5px; color: var(--muted); line-height: 1.35; }
.mileage-load-list { display: grid; gap: 8px; margin-top: 11px; }
.mileage-load-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.mileage-load-row strong { display: block; font-size: .82rem; }
.mileage-load-row small { display: -webkit-box; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: .75rem; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.mileage-load-row .btn { flex: 0 0 auto; }
.mileage-action { margin-top: 10px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; font-size: .75rem; font-weight: 800; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-green { color: var(--green); background: var(--green-soft); }
.badge-orange { color: var(--orange); background: var(--orange-soft); }
.badge-red { color: var(--red); background: var(--red-soft); }
.badge-blue { color: #62a6ff; background: var(--blue-soft); }
.badge-muted { color: #a3adba; background: #252c36; }

.payment-layout { display: grid; grid-template-columns: 285px minmax(0, 1fr); gap: 18px; align-items: start; }
.driver-rail { position: sticky; top: 98px; max-height: calc(100vh - 126px); overflow: auto; padding: 10px; }
.driver-option { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border: 0; border-radius: 12px; color: var(--text); cursor: pointer; text-align: left; background: transparent; }
.driver-option:hover { background: var(--surface-3); }
.driver-option.active { background: var(--blue-soft); outline: 1px solid rgb(58 140 255 / 35%); }
.driver-option strong { display: block; font-size: .9rem; }
.driver-option small { color: var(--muted); }
.payment-rail-divider { margin: 10px 4px 4px; padding: 10px 8px 4px; border-top: 1px solid var(--border); color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.payment-main { min-width: 0; }
.payroll-period-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-bottom: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--line); }
.payroll-period-card > div { display: grid; gap: 5px; padding: 14px 17px; background: var(--surface); }
.payroll-period-card span { color: var(--muted); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .45px; }
.payroll-period-card strong { font-size: 1rem; }
.payroll-period-card small { color: var(--muted); }
.payment-banner { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.payment-banner.good { border-color: rgb(47 208 115 / 35%); background: var(--green-soft); }
.payment-banner.warn { border-color: rgb(255 157 53 / 35%); background: var(--orange-soft); }
.payment-banner strong { display: block; }
.payment-banner p { margin: 5px 0 0; color: #c6cfdb; font-size: .86rem; line-height: 1.45; }
.payment-actions { display: flex; gap: 8px; flex-shrink: 0; }
.payment-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.payment-summary > div { padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.payment-summary span { display: block; color: var(--muted); font-size: .76rem; }
.payment-summary strong { display: block; margin-top: 7px; font-size: 1.22rem; }
.payment-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; align-items: start; }
.payment-form-grid .field { min-width: 0; margin: 0; align-self: start; }
.payment-form-grid > .field.full { grid-column: 1 / -1; }
.payment-debt-editor { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgb(0 0 0 / 10%); }
.payment-debt-editor .field small { color: var(--muted); font-size: .75rem; line-height: 1.35; }
.debt-balance-strip { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.debt-balance-strip .status-row { min-width: 0; display: grid; align-content: start; gap: 6px; padding: 11px 13px; border: 0; background: #0c1118; }
.debt-balance-strip .status-row span { color: var(--muted); font-size: .74rem; line-height: 1.3; }
.debt-balance-strip .status-row strong { font-size: 1rem; }
.debt-balance-note { grid-column: 1 / -1; margin: 0; padding: 10px 13px; color: var(--muted); background: var(--surface); font-size: .76rem; line-height: 1.4; }
.weekly-payment-editors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.weekly-payment-editor { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgb(0 0 0 / 10%); }
.weekly-payment-editor .delivery-editor-head { align-items: flex-start; margin-bottom: 12px; }
.weekly-payment-editor .delivery-editor-head strong, .weekly-payment-editor .delivery-editor-head small { display: block; }
.weekly-payment-editor .delivery-editor-head small { margin-top: 4px; color: var(--muted); font-size: .75rem; line-height: 1.4; }
.weekly-payment-item-list { display: grid; gap: 10px; }
.weekly-payment-item { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgb(0 0 0 / 14%); }
.weekly-payment-item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.weekly-payment-item-head strong { font-size: .82rem; }
.weekly-payment-empty { padding: 16px; border: 1px dashed #4b596d; border-radius: 12px; color: var(--muted); text-align: center; font-size: .82rem; }
.payment-form-actions { display: flex; justify-content: flex-end; margin-top: 17px; }
.load-price-list { display: grid; gap: 9px; }
.load-price-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(130px, .65fr) minmax(160px, .7fr) auto; gap: 11px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.load-price-row:first-child { border-top: 0; }
.load-price-row .route { overflow: hidden; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; font-size: .82rem; }
.inline-edit { display: flex; align-items: center; gap: 7px; }
.inline-edit input { min-height: 38px; padding: 7px 9px; }

.list-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.entity-card { display: flex; flex-direction: column; min-height: 185px; }
.entity-card h3 { margin: 0; font-size: 1.02rem; }
.entity-card p { margin: 7px 0 0; color: var(--muted); line-height: 1.4; }
.entity-meta { display: grid; gap: 6px; margin: 15px 0; font-size: .84rem; }
.entity-meta span { display: flex; justify-content: space-between; gap: 8px; }
.entity-meta b { color: var(--muted); font-weight: 600; }
.entity-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.vehicle-detail-view { display: grid; gap: 16px; }
.vehicle-detail-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(230px, .6fr); gap: 18px; align-items: center; padding: 20px; border: 1px solid rgb(58 140 255 / 32%); border-radius: 18px; background: linear-gradient(145deg, rgb(21 48 82 / 88%), rgb(16 25 37 / 94%)); }
.vehicle-detail-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.vehicle-detail-eyebrow { color: #8cbcff; font-size: .68rem; font-weight: 900; letter-spacing: 1px; }
.vehicle-detail-hero h3 { margin: 5px 0 0; font-size: 1.45rem; }
.vehicle-detail-hero p { margin: 7px 0 0; color: #b9c9dc; }
.vehicle-detail-assignment { padding: 14px; border: 1px solid rgb(255 255 255 / 9%); border-radius: 13px; background: rgb(0 0 0 / 14%); }
.vehicle-detail-assignment span, .vehicle-detail-assignment strong, .vehicle-detail-assignment small { display: block; }
.vehicle-detail-assignment span { color: #91a6c0; font-size: .69rem; font-weight: 850; text-transform: uppercase; }
.vehicle-detail-assignment strong { margin-top: 6px; }
.vehicle-detail-assignment small { margin-top: 6px; color: #f0b470; line-height: 1.4; }
.vehicle-detail-section { padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: rgb(0 0 0 / 10%); }
.vehicle-detail-section > h3 { margin: 0 0 13px; font-size: .94rem; }
.vehicle-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.vehicle-detail-fact { min-width: 0; padding: 11px 12px; border-radius: 11px; background: var(--surface-2); }
.vehicle-detail-fact-full { grid-column: 1 / -1; }
.vehicle-detail-fact span, .vehicle-detail-fact strong { display: block; }
.vehicle-detail-fact span { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .25px; text-transform: uppercase; }
.vehicle-detail-fact strong { margin-top: 5px; overflow-wrap: anywhere; font-size: .86rem; line-height: 1.4; }
.vehicle-detail-documents { display: grid; gap: 9px; }
.vehicle-detail-documents > div { padding: 11px 12px; border-radius: 11px; background: var(--surface-2); }
.vehicle-detail-documents span, .vehicle-detail-documents strong, .vehicle-detail-documents small { display: block; }
.vehicle-detail-documents span { color: #8cbcff; font-size: .67rem; font-weight: 850; text-transform: uppercase; }
.vehicle-detail-documents strong { margin-top: 4px; }
.vehicle-detail-documents small { margin-top: 4px; color: var(--muted); }
.vehicle-detail-empty { margin: 0; color: var(--muted); font-size: .84rem; }
.vehicle-detail-actions { padding: 0; }
.vehicle-driver-document-group { display: grid; gap: 10px; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: rgb(0 0 0 / 10%); }
.vehicle-driver-document-group + .vehicle-driver-document-group { margin-top: 12px; }
.vehicle-driver-document-group .section-head { margin-bottom: 2px; }
.doc-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.doc-icon { width: 42px; height: 48px; display: grid; place-items: center; color: #ff8790; border-radius: 9px; background: var(--red-soft); font-weight: 900; }
.doc-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.access-summary-card, .version-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.access-summary-card h3, .version-card h3, .help-contact-card h3, .ownership-notice-card h3 { margin: 6px 0; }
.access-summary-card p, .version-card p, .access-policy-card p, .help-contact-card p, .ownership-notice-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.ownership-notice-card { margin-top: 16px; }
.access-table-heading { padding: 3px 2px 14px; }
.access-table-heading p { max-width: 880px; margin: 6px 0 0; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.access-policy-card { margin-top: 16px; }
.help-contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.help-contact-card { min-width: 0; }
.help-contact-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.help-contact-actions span { color: var(--muted); font-size: .86rem; }
.dispatcher-payment-section { margin-bottom: 20px; }
.dispatcher-payment-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.dispatcher-payment-card { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: rgba(255, 255, 255, .03); }
.dispatcher-payment-card h4, .dispatcher-payment-card p { margin: 0; }
.dispatcher-payment-card textarea { min-height: 76px; resize: vertical; }
.dispatcher-import-card { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .9fr); grid-template-areas: "copy slots" "status status" "actions actions"; align-items: start; gap: 20px; margin-bottom: 16px; border-color: rgb(47 208 115 / 34%); background: linear-gradient(145deg, rgb(16 45 32 / 96%), rgb(15 25 30 / 96%)); }
.dispatcher-import-copy { grid-area: copy; min-width: 0; }
.dispatcher-import-copy h2 { margin: 5px 0 7px; font-size: 1.18rem; }
.dispatcher-import-copy p { max-width: 760px; margin: 0; color: #c7d9d0; font-size: .88rem; line-height: 1.5; }
.dispatcher-slot-list { display: grid; grid-area: slots; min-width: 0; gap: 8px; }
.dispatcher-import-card > .confirm-box { grid-area: status; min-width: 0; }
.dispatcher-import-card > .section-actions { grid-area: actions; min-width: 0; }
.dispatcher-slot { min-width: 0; padding: 11px 13px; border: 1px solid rgb(255 255 255 / 9%); border-radius: 12px; background: rgb(0 0 0 / 13%); }
.dispatcher-slot span, .dispatcher-slot strong, .dispatcher-slot small { display: block; }
.dispatcher-slot span { color: #8de6b3; font-size: .7rem; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; }
.dispatcher-slot strong { margin-top: 4px; }
.dispatcher-slot small { margin-top: 4px; overflow: hidden; color: #abc2b7; white-space: nowrap; text-overflow: ellipsis; }
.fuel-import-card { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, .8fr) auto; align-items: center; gap: 20px; margin-bottom: 16px; border-color: rgb(58 140 255 / 38%); background: linear-gradient(145deg, rgb(20 43 75 / 96%), rgb(15 24 37 / 96%)); }
.fuel-import-card h2 { margin: 5px 0 7px; font-size: 1.18rem; }
.fuel-import-card p { max-width: 760px; margin: 0; color: #c4d2e3; font-size: .88rem; line-height: 1.5; }
.fuel-import-status { display: grid; gap: 5px; padding: 12px 14px; border: 1px solid rgb(255 255 255 / 9%); border-radius: 12px; background: rgb(0 0 0 / 12%); }
.fuel-import-status small { color: #aebdd0; line-height: 1.35; }
.report-card { padding: 24px; }
.report-card h3 { margin: 0 0 9px; }
.report-card p { min-height: 48px; margin: 0 0 20px; color: var(--muted); line-height: 1.5; }
.report-preview { margin-top: 20px; padding: 22px; color: #161c25; border-radius: 12px; background: white; }
.report-preview h3 { color: #0e2945; }
.report-preview table { width: 100%; border-collapse: collapse; font-size: .75rem; }
.report-preview th, .report-preview td { padding: 7px; border: 1px solid #dbe1e8; text-align: left; }
.report-preview th { background: #eaf1f8; }
.report-preview .staff-pay td { background: #fff7dc; }
.report-preview .grand-total td { color: white; background: #0e2945; }
.landscape-report { width: 100%; }
.landscape-report table { font-size: .64rem; table-layout: fixed; }
.professional-report { max-width: 920px; margin: 0 auto; color: #152031; }
.statement-letterhead { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px; border-bottom: 4px solid #0c385e; border-radius: 14px 14px 0 0; color: white; background: #071e33; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.statement-brand { display: flex; align-items: flex-start; gap: 16px; min-width: 0; }
.statement-logo { width: 62px; height: 62px; display: grid; place-items: center; flex: 0 0 auto; color: #071e33; border-radius: 14px; background: #c9922e; font-size: 1.3rem; font-weight: 950; }
.statement-company strong, .statement-company small, .statement-document span, .statement-document small { display: block; }
.statement-company strong { font-size: 1.12rem; letter-spacing: .35px; }
.statement-company small { margin-top: 4px; color: #d6e2ec; font-size: .72rem; line-height: 1.25; }
.statement-company .statement-ein { color: #ffd27a; font-weight: 900; }
.statement-document { min-width: 250px; text-align: right; }
.statement-document span { color: white; font-size: 1.05rem; font-weight: 900; letter-spacing: .7px; }
.statement-document small { margin-top: 7px; color: #b8cce0; font-size: .72rem; font-weight: 800; letter-spacing: .45px; }
.statement-status { margin: 16px 0; padding: 10px 14px; color: #9a5b00; border: 1px solid #f0c675; border-radius: 10px; background: #fff7e5; text-align: center; font-size: .78rem; font-weight: 900; letter-spacing: .55px; }
.statement-status.official { color: #137144; border-color: #91dbb4; background: #edf9f2; }
.statement-identity { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 22px; margin: 18px 0; padding: 20px; border: 1px solid #d9e1ea; border-radius: 14px; background: #f8fafc; }
.statement-identity h2 { margin: 5px 0; color: #102b48; font-size: 1.35rem; }
.statement-identity p { margin: 0; color: #65758a; }
.statement-identity .statement-beneficiary-detail { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 8px; margin-top: 7px; font-size: .76rem; line-height: 1.35; }
.statement-beneficiary-detail b { color: #738196; font-size: .65rem; text-transform: uppercase; }
.statement-identity .statement-beneficiary-type { margin-top: 9px; font-size: .78rem; font-weight: 800; }
.report-eyebrow { color: #0f5d9b; font-size: .68rem; font-weight: 900; letter-spacing: 1px; }
.identity-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.identity-facts span, .identity-facts b { display: block; }
.identity-facts span { color: #28384c; font-size: .76rem; }
.identity-facts b { margin-bottom: 3px; color: #738196; font-size: .65rem; text-transform: uppercase; }
.statement-section, .operating-driver-card { margin-top: 16px; padding: 18px; border: 1px solid #d9e1ea; border-radius: 14px; background: white; break-inside: avoid; }
.statement-section-title, .operating-driver-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; color: #102b48; font-weight: 900; }
.statement-table th { color: #516176; background: #eef4f9; }
.statement-table th small { display: block; margin-top: 4px; color: #718096; font-size: .72rem; font-weight: 600; }
.statement-table td:last-child { text-align: right; }
.statement-notes p { margin: 0; color: #334155; line-height: 1.55; white-space: pre-wrap; }
.statement-table .statement-total th, .statement-table .statement-total td { border-top: 2px solid #9fb4c8; font-weight: 900; }
.statement-table .statement-net th, .statement-table .statement-net td { color: white; background: #0e4f87; font-size: .9rem; font-weight: 950; }
.report-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.report-metrics > div { padding: 12px; border-radius: 10px; background: #eef4f9; }
.report-metrics span, .report-metrics strong { display: block; }
.report-metrics span { color: #68788c; font-size: .67rem; font-weight: 800; text-transform: uppercase; }
.report-metrics strong { margin-top: 5px; color: #102b48; font-size: .95rem; }
.report-note, .report-footnote { color: #65758a; font-size: .7rem; line-height: 1.45; }
.report-note.warning { color: #9a5b00; }
.report-footnote { margin: 16px 3px 0; text-align: center; }
.ytd-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #edf5fc; }
.ytd-card p { margin: 5px 0 0; color: #65758a; font-size: .72rem; }
.ytd-card > strong { color: #0e4f87; font-size: 1.25rem; }
.owner-ytd-card { display: grid; grid-template-columns: minmax(190px, .72fr) minmax(0, 1.28fr); align-items: center; }
.owner-ytd-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.owner-ytd-values > div { min-width: 0; padding: 10px; border: 1px solid #d5e1ed; border-radius: 9px; background: white; }
.owner-ytd-values span, .owner-ytd-values strong, .owner-ytd-values small { display: block; }
.owner-ytd-values span { color: #65758a; font-size: .68rem; font-weight: 800; }
.owner-ytd-values strong { margin-top: 4px; color: #0e4f87; font-size: 1rem; }
.owner-ytd-values small { margin-top: 3px; color: #718096; font-size: .58rem; line-height: 1.25; }
.operating-driver-card { margin-top: 18px; }
.operating-driver-head h2 { margin: 4px 0 0; font-size: 1.18rem; }
.operating-profit { text-align: right; }
.operating-profit span, .operating-profit strong { display: block; }
.operating-profit span { color: #64758a; font-size: .68rem; text-transform: uppercase; }
.operating-profit strong { margin-top: 4px; color: #137144; font-size: 1.15rem; }
.operating-profit.negative strong { color: #b42d3a; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; background: rgb(0 0 0 / 72%); backdrop-filter: blur(5px); }
.modal { width: min(680px, 100%); max-height: calc(100vh - 36px); overflow: auto; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); background: var(--surface); }
.modal.modal-wide { width: min(1080px, 100%); }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 20px; border-bottom: 1px solid var(--line); background: rgb(17 22 30 / 95%); backdrop-filter: blur(12px); }
.modal-head h2 { margin: 0; font-size: 1.15rem; }
.modal-close { width: 36px; height: 36px; border: 0; border-radius: 10px; cursor: pointer; color: var(--muted); background: var(--surface-3); }
.modal-body { padding: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 20px 20px; }
.modal-footer .load-delete-button { margin-right: auto; }
.confirm-box { padding: 15px; border: 1px solid rgb(255 157 53 / 35%); border-radius: 13px; color: #ffd3a2; background: var(--orange-soft); line-height: 1.5; }
.import-privacy-note { display: grid; gap: 5px; margin: 2px 0 15px; padding: 14px; border: 1px solid rgb(58 140 255 / 35%); border-radius: 13px; background: var(--blue-soft); }
.import-privacy-note span { color: #c8d8ed; font-size: .86rem; line-height: 1.45; }
.import-review-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 15px; padding: 15px; border: 1px solid rgb(255 157 53 / 35%); border-radius: 13px; background: var(--orange-soft); }
.import-review-banner strong, .import-review-banner span { display: block; }
.import-review-banner > div > span { margin-top: 4px; color: #ffd3a2; font-size: .84rem; }
.import-document-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 11px; margin-bottom: 15px; }
.import-document-grid article { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: rgb(0 0 0 / 14%); }
.import-document-grid article > strong, .import-document-grid article > span, .import-document-grid article > small { display: block; }
.import-document-grid article > span { margin-top: 5px; overflow: hidden; color: #dce3ed; white-space: nowrap; text-overflow: ellipsis; }
.import-document-grid article > small { margin-top: 5px; color: var(--muted); }
.import-document-grid article > p { margin: 10px 0 0; color: #b9c4d2; font-size: .78rem; line-height: 1.45; }
.import-document-classification-grid { margin-top: 15px; }
.import-document-kind { display: grid; gap: 5px; margin-top: 12px; }
.import-document-kind > span { color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.import-document-kind select { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--surface-2); }
.import-document-kind-badge { width: fit-content; margin-top: 11px; padding: 5px 8px; border: 1px solid rgb(58 140 255 / 34%); border-radius: 999px; color: #bcd7ff; background: var(--blue-soft); font-size: .7rem; font-weight: 800; }
.import-bol-review { display: grid; gap: 7px; margin-top: 12px; padding: 10px; border: 1px solid rgb(47 208 115 / 32%); border-radius: 10px; color: #cbe9d8; background: var(--green-soft); font-size: .76rem; line-height: 1.4; }
.import-bol-review select { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid rgb(47 208 115 / 38%); border-radius: 8px; color: var(--text); background: var(--surface-2); }
.import-reclassify-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -3px 0 15px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: rgb(0 0 0 / 10%); font-size: .8rem; }
.import-comparison { margin-bottom: 18px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: rgb(0 0 0 / 12%); }
.import-comparison h3 { margin: 0 0 12px; font-size: .95rem; }
.comparison-table { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--line); }
.comparison-head, .comparison-row { display: grid; grid-template-columns: 100px minmax(0, 1fr) minmax(0, 1fr) 95px; gap: 1px; background: var(--line); }
.comparison-head > *, .comparison-row > * { min-width: 0; padding: 10px; background: var(--surface); }
.comparison-head > * { color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.comparison-row > span { overflow-wrap: anywhere; color: #cbd4e0; font-size: .78rem; line-height: 1.4; }
.comparison-empty { padding: 12px; color: #ffd3a2; border-radius: 10px; background: var(--orange-soft); font-size: .84rem; line-height: 1.45; }
.review-confirmation { display: flex; align-items: flex-start; gap: 12px; margin: 8px 0 0; padding: 15px; border: 1px solid rgb(47 208 115 / 38%); border-radius: 13px; cursor: pointer; background: var(--green-soft); }
.review-confirmation input { width: 19px; height: 19px; flex: 0 0 auto; accent-color: var(--green); }
.review-confirmation span { color: #cbe9d8; font-size: .86rem; line-height: 1.45; }
.review-confirmation strong { display: block; margin-bottom: 3px; color: white; }
.fuel-period-grid { margin-top: 16px; }
.fuel-source-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; }
.fuel-source-grid .field { min-width: 0; }
.fuel-source-grid .field small { margin-top: 6px; color: var(--muted); font-size: .75rem; line-height: 1.35; }
.fuel-period-status, .fuel-reconciliation, .fuel-grand-reconciliation { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: rgb(0 0 0 / 12%); }
.fuel-period-status { margin: -5px 0 18px; }
.fuel-grand-reconciliation { margin-top: 15px; }
.fuel-period-status strong, .fuel-period-status span, .fuel-reconciliation strong, .fuel-reconciliation span, .fuel-grand-reconciliation strong, .fuel-grand-reconciliation span { display: block; }
.fuel-period-status span, .fuel-reconciliation span, .fuel-grand-reconciliation span { color: var(--muted); font-size: .78rem; line-height: 1.4; text-align: right; }
.fuel-period-status.good, .fuel-reconciliation.good, .fuel-grand-reconciliation.good { border-color: rgb(47 208 115 / 34%); background: var(--green-soft); }
.fuel-period-status.warning, .fuel-reconciliation.warning, .fuel-grand-reconciliation.warning { border-color: rgb(255 157 53 / 38%); background: var(--orange-soft); }
.fuel-period-status.warning strong, .fuel-reconciliation.warning strong, .fuel-grand-reconciliation.warning strong { color: #ffc071; }
.discrepancy-confirmation { border-color: rgb(255 157 53 / 45%); background: var(--orange-soft); }
.discrepancy-confirmation span { color: #ffd3a2; }
.fuel-review-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 4px 0 12px; }
.fuel-review-toolbar strong, .fuel-review-toolbar small { display: block; }
.fuel-review-toolbar small { margin-top: 3px; color: var(--muted); }
.fuel-review-empty { display: grid; gap: 5px; padding: 20px; border: 1px dashed #4b596d; border-radius: 13px; color: #dce4ed; text-align: center; background: rgb(0 0 0 / 10%); }
.fuel-review-empty span { color: var(--muted); font-size: .84rem; }
.fuel-review-rows { display: grid; gap: 14px; }
.fuel-review-row { padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: rgb(0 0 0 / 13%); }
.fuel-review-row.fuel-row-warning { border-color: rgb(255 157 53 / 38%); }
.fuel-review-row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.fuel-review-row-head strong, .fuel-review-row-head small { display: block; }
.fuel-review-row-head small { margin-top: 4px; color: var(--muted); font-size: .78rem; }
.fuel-review-row-head small[data-kind="good"] { color: #7ee3a7; }
.fuel-review-row-head small[data-kind="manual"] { color: #80b7ff; }
.fuel-review-row-head small[data-kind="warning"] { color: #ffc071; }
.fuel-review-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 10px; }
.fuel-review-grid .field { min-width: 0; margin-bottom: 12px; }
.fuel-review-grid .field:first-child { grid-column: span 2; }
.fuel-review-grid input, .fuel-review-grid select { min-width: 0; }
.fuel-reconciliation { margin-top: 1px; }
.dispatcher-output-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.dispatcher-print-container { display: none; }
.dispatcher-week-banner { display: grid; gap: 4px; margin-bottom: 15px; padding: 13px 15px; border: 1px solid rgb(58 140 255 / 35%); border-radius: 13px; background: var(--blue-soft); }
.dispatcher-week-banner span { color: #80b7ff; font-size: .7rem; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; }
.dispatcher-week-banner small { color: #b8cce5; }
.dispatcher-warning-list, .dispatcher-missing { margin: 15px 0; padding: 15px; border: 1px solid rgb(255 157 53 / 35%); border-radius: 13px; background: var(--orange-soft); }
.dispatcher-warning-list h3, .dispatcher-missing h3 { margin: 0 0 9px; font-size: .92rem; }
.dispatcher-warning-list p { margin: 6px 0 0; color: #ffd3a2; font-size: .8rem; line-height: 1.4; }
.dispatcher-missing > div { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-top: 1px solid rgb(255 255 255 / 9%); }
.dispatcher-missing span { color: #ffd3a2; font-size: .8rem; }
.dispatcher-review-section { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: rgb(0 0 0 / 10%); }
.dispatcher-review-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.dispatcher-review-toolbar h3 { margin: 0; font-size: 1rem; }
.dispatcher-review-toolbar small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.4; }
.dispatcher-review-rows { display: grid; gap: 12px; }
.dispatcher-difference-group + .dispatcher-difference-group { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.dispatcher-difference-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.dispatcher-difference-heading h4 { margin: 0; font-size: .92rem; }
.dispatcher-difference-heading small { display: block; margin-top: 4px; color: var(--muted); }
.dispatcher-review-row { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgb(0 0 0 / 16%); }
.dispatcher-review-row.dispatcher-row-warning { border-color: rgb(255 157 53 / 38%); }
.dispatcher-review-row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.dispatcher-review-row-head strong, .dispatcher-review-row-head small { display: block; }
.dispatcher-review-row-head small { margin-top: 4px; color: var(--muted); font-size: .78rem; line-height: 1.35; }
.dispatcher-review-row-head small[data-kind="good"] { color: #7ee3a7; }
.dispatcher-review-row-head small[data-kind="warning"] { color: #ffc071; }
.dispatcher-apply { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--surface-2); font-size: .78rem; font-weight: 800; }
.dispatcher-apply input { width: 17px; height: 17px; accent-color: var(--green); }
.dispatcher-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; }
.dispatcher-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 10px; }
.dispatcher-detail-grid .field, .dispatcher-summary-grid .field { min-width: 0; margin-bottom: 11px; }
.dispatcher-row-comparison { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: #c8d1dd; background: rgb(0 0 0 / 14%); font-size: .78rem; }
.dispatcher-row-comparison span { display: block; }
.dispatcher-row-comparison b { margin-right: 7px; color: var(--muted); font-size: .68rem; text-transform: uppercase; }
.dispatcher-load-difference-grid { display: grid; grid-template-columns: minmax(150px, .7fr) repeat(2, minmax(210px, 1fr)); gap: 10px; }
.dispatcher-load-difference-grid span { min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: #d4dce8; background: rgb(0 0 0 / 14%); line-height: 1.4; }
.dispatcher-load-difference-grid span:nth-child(4) { grid-column: 1 / -1; }
.dispatcher-load-difference-grid b { display: block; margin-bottom: 4px; color: var(--muted); font-size: .68rem; text-transform: uppercase; }
.dispatcher-load-difference-grid strong { color: white; }
.dispatcher-resolution-editor { display: grid; grid-template-columns: minmax(230px, .8fr) minmax(260px, 1fr); gap: 12px; margin-top: 12px; padding: 13px; border: 1px dashed rgb(58 140 255 / 38%); border-radius: 12px; background: rgb(58 140 255 / 7%); }
.dispatcher-resolution-editor .dispatcher-apply { align-self: end; margin-bottom: 11px; }
.dispatcher-resolution-editor .field.full { grid-column: 1 / -1; }
.dispatcher-resolution-selected { border-color: rgb(47 208 115 / 55%) !important; box-shadow: inset 0 0 0 1px rgb(47 208 115 / 12%); }
.dispatcher-resolution-accepted { border-color: rgb(47 208 115 / 42%); background: rgb(47 208 115 / 7%); }
.dispatcher-accepted-group { border-color: rgb(47 208 115 / 35%); }
.inline-audit-note { display: block; margin-top: 6px; border: 0; padding: 0; color: #7ee3a7; background: transparent; cursor: pointer; font: inherit; font-size: .72rem; font-weight: 800; text-align: left; text-decoration: underline; text-underline-offset: 2px; }

.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: grid; gap: 10px; width: min(390px, calc(100vw - 32px)); }
.toast { padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); color: #e9edf3; background: #1a222e; animation: toast-in .22s ease-out; }
.toast.error { border-color: rgb(255 93 104 / 45%); background: #361820; }
.toast.success { border-color: rgb(47 208 115 / 45%); background: #123020; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

@media (max-width: 1100px) {
  .topbar { align-items: flex-start; flex-wrap: wrap; }
  .top-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .week-control { flex-wrap: wrap; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-layout { grid-template-columns: 1fr; }
  .driver-rail { position: static; max-height: 270px; }
  .payment-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-debt-editor { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-debt-editor .field:last-of-type { grid-column: 1 / -1; }
  .fuel-import-card { grid-template-columns: minmax(0, 1fr) auto; }
  .dispatcher-import-card { grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr); }
  .fuel-import-status { grid-column: 1 / -1; grid-row: 2; }
  .fuel-review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fuel-source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; transform: translateX(-105%); transition: transform .2s; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: inline-flex; }
  .topbar { padding: 14px 18px; }
  .topbar-title { flex: 1; }
  .content { padding: 22px 18px 42px; }
  .auth-panel { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-form-wrap { padding: 42px 28px; }
  .dashboard-grid, .report-grid, .help-contact-grid { grid-template-columns: 1fr; }
  .weekly-payment-editors { grid-template-columns: 1fr; }
  .payment-debt-editor { grid-template-columns: 1fr; }
  .payment-debt-editor .field:last-of-type { grid-column: auto; }
  .debt-balance-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fuel-import-card { grid-template-columns: 1fr; align-items: stretch; }
  .dispatcher-import-card { grid-template-columns: 1fr; grid-template-areas: "copy" "slots" "status" "actions"; align-items: stretch; }
  .fuel-import-status { grid-column: auto; grid-row: auto; }
  .data-table { min-width: 760px; }
}

@media (max-width: 600px) {
  .stats-grid, .list-grid, .payment-summary, .payment-form-grid, .field-grid, .payroll-period-card, .statement-identity, .identity-facts, .report-metrics, .compliance-counts { grid-template-columns: 1fr; }
  .field-grid .full { grid-column: auto; }
  .section-head, .payment-banner { align-items: stretch; flex-direction: column; }
  .access-summary-card, .version-card { align-items: flex-start; flex-direction: column; }
  .top-actions .week-control label { display: none; }
  .week-control-copy { display: none; }
  .top-actions .btn span { display: none; }
  .load-price-row { grid-template-columns: 1fr; }
  .payment-actions { width: 100%; }
  .payment-actions .btn { flex: 1; }
  .import-document-grid { grid-template-columns: 1fr; }
  .comparison-table { overflow-x: auto; }
  .comparison-head, .comparison-row { min-width: 720px; }
  .compliance-alert-row { align-items: flex-start; flex-wrap: wrap; }
  .compliance-alert-open { align-items: flex-start; flex-wrap: wrap; }
  .compliance-alert-open .badge { margin-left: 48px; }
  .compliance-alert-row > .btn { width: 100%; margin-left: 48px; }
  .doc-row { grid-template-columns: auto minmax(0, 1fr); }
  .doc-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .fuel-review-grid { grid-template-columns: 1fr; }
  .fuel-review-grid .field:first-child { grid-column: auto; }
  .fuel-review-toolbar, .fuel-period-status, .fuel-reconciliation, .fuel-grand-reconciliation { align-items: stretch; flex-direction: column; }
  .fuel-period-status span, .fuel-reconciliation span, .fuel-grand-reconciliation span { text-align: left; }
  .dispatcher-detail-grid, .dispatcher-summary-grid { grid-template-columns: 1fr; }
  .dispatcher-review-toolbar, .dispatcher-review-row-head, .dispatcher-row-comparison, .dispatcher-missing > div, .dispatcher-difference-heading { align-items: stretch; flex-direction: column; }
  .statement-letterhead { align-items: stretch; flex-direction: column; }
  .statement-document { min-width: 0; text-align: left; }
  .dispatcher-load-difference-grid { grid-template-columns: 1fr; }
  .dispatcher-resolution-editor { grid-template-columns: 1fr; }
  .dispatcher-resolution-editor .field.full { grid-column: auto; }
  .dispatcher-load-difference-grid span:nth-child(4) { grid-column: auto; }
  .vehicle-detail-hero, .vehicle-detail-grid { grid-template-columns: 1fr; }
  .vehicle-detail-fact-full { grid-column: auto; }
  .vehicle-detail-actions .btn { flex: 1; }
}

@page portrait-report { size: portrait; margin: 10mm; }
@page landscape-report { size: landscape; margin: 8mm; }
@page statement-report { size: letter landscape; margin: 5mm; }

@media print {
  @page { size: portrait; margin: 10mm; }
  html, body { min-height: 0; height: auto; background: white; }
  body { color: #111; }
  .sidebar, .topbar, .section-head, .toolbar, .report-actions, .no-print, #modal-root { display: none !important; }
  .app-shell, .workspace, .content { min-height: 0; height: auto; display: block; padding: 0; }
  body.printing-report .content > :not([data-print-container]) { display: none !important; }
  body.printing-report [data-print-container] { display: block !important; margin: 0; padding: 0; }
  .card, .stat-card { border: 0; box-shadow: none; background: white; }
  .report-preview { padding: 0; }
  .report-preview[data-print-layout="portrait"] { page: portrait-report; }
  .report-preview[data-print-layout="landscape"] { page: landscape-report; }
  .report-preview[data-print-layout="statement"] { page: statement-report; }
  .landscape-report { break-inside: avoid; }
  .landscape-report table { font-size: 7.5pt; }
  .professional-report { max-width: none; }
  .report-preview[data-print-layout="statement"] .professional-statement { color: #152031; font-size: 7pt; break-inside: avoid; }
  .report-preview[data-print-layout="statement"] .statement-letterhead { gap: 4mm; padding: 4mm; border-bottom-width: 2px; border-radius: 2.5mm 2.5mm 0 0; }
  .report-preview[data-print-layout="statement"] .statement-brand { gap: 3mm; }
  .report-preview[data-print-layout="statement"] .statement-logo { width: 12mm; height: 12mm; border-radius: 2.5mm; font-size: 10pt; }
  .report-preview[data-print-layout="statement"] .statement-company strong { font-size: 9.5pt; }
  .report-preview[data-print-layout="statement"] .statement-company small { margin-top: .5mm; font-size: 5.6pt; }
  .report-preview[data-print-layout="statement"] .statement-document { min-width: 48mm; }
  .report-preview[data-print-layout="statement"] .statement-document span { font-size: 9pt; }
  .report-preview[data-print-layout="statement"] .statement-document small { margin-top: 1mm; font-size: 5.8pt; }
  .report-preview[data-print-layout="statement"] .statement-status { margin: 2mm 0; padding: 1.4mm 2mm; border-radius: 2mm; font-size: 7pt; }
  .report-preview[data-print-layout="statement"] .statement-identity { grid-template-columns: 1.2fr .8fr; gap: 4mm; margin: 2mm 0; padding: 3mm; border-radius: 2.5mm; }
  .report-preview[data-print-layout="statement"] .statement-identity h2 { margin: 1mm 0; font-size: 12pt; }
  .report-preview[data-print-layout="statement"] .statement-identity p { font-size: 8pt; }
  .report-preview[data-print-layout="statement"] .statement-identity .statement-beneficiary-detail { grid-template-columns: 16mm minmax(0, 1fr); gap: 1mm; margin-top: .8mm; font-size: 6.6pt; }
  .report-preview[data-print-layout="statement"] .statement-beneficiary-detail b { font-size: 5.8pt; }
  .report-preview[data-print-layout="statement"] .statement-identity .statement-beneficiary-type { margin-top: 1mm; font-size: 6.8pt; }
  .report-preview[data-print-layout="statement"] .identity-facts { gap: 1.5mm 3mm; }
  .report-preview[data-print-layout="statement"] .identity-facts span { font-size: 7pt; }
  .report-preview[data-print-layout="statement"] .identity-facts b { margin-bottom: .4mm; font-size: 6pt; }
  .report-preview[data-print-layout="statement"] .statement-section { margin-top: 2mm; padding: 2.5mm; border-radius: 2.5mm; }
  .report-preview[data-print-layout="statement"] .statement-section-title { gap: 3mm; margin-bottom: 1.5mm; font-size: 8pt; }
  .report-preview[data-print-layout="statement"] .statement-table { table-layout: fixed; font-size: 6.6pt; line-height: 1.15; }
  .report-preview[data-print-layout="statement"] .statement-table th,
  .report-preview[data-print-layout="statement"] .statement-table td { padding: 1.2mm 1.5mm; }
  .report-preview[data-print-layout="statement"] .statement-table th:nth-child(1),
  .report-preview[data-print-layout="statement"] .statement-table td:nth-child(1) { width: 12%; }
  .report-preview[data-print-layout="statement"] .statement-table th:nth-child(2),
  .report-preview[data-print-layout="statement"] .statement-table td:nth-child(2) { width: 58%; overflow-wrap: anywhere; }
  .report-preview[data-print-layout="statement"] .statement-table th:nth-child(3),
  .report-preview[data-print-layout="statement"] .statement-table td:nth-child(3) { width: 12%; }
  .report-preview[data-print-layout="statement"] .statement-table th:nth-child(4),
  .report-preview[data-print-layout="statement"] .statement-table td:nth-child(4) { width: 18%; }
  .report-preview[data-print-layout="statement"] .statement-load-table th:nth-child(2),
  .report-preview[data-print-layout="statement"] .statement-load-table td:nth-child(2) { width: 70%; }
  .report-preview[data-print-layout="statement"] .statement-load-table th:nth-child(3),
  .report-preview[data-print-layout="statement"] .statement-load-table td:nth-child(3) { width: 18%; }
  .report-preview[data-print-layout="statement"] .statement-table .statement-net th,
  .report-preview[data-print-layout="statement"] .statement-table .statement-net td { font-size: 7.5pt; }
  .report-preview[data-print-layout="statement"] .statement-notes p { font-size: 6.8pt; line-height: 1.25; }
  .report-preview[data-print-layout="statement"] .report-note,
  .report-preview[data-print-layout="statement"] .report-footnote { font-size: 6pt; line-height: 1.25; }
  .report-preview[data-print-layout="statement"] .report-footnote { margin: 2mm 1mm 0; }
  .report-preview[data-print-layout="statement"] .ytd-card { gap: 4mm; }
  .report-preview[data-print-layout="statement"] .ytd-card p { margin-top: .8mm; font-size: 6.2pt; }
  .report-preview[data-print-layout="statement"] .ytd-card > strong { font-size: 11pt; }
  .report-preview[data-print-layout="statement"] .owner-ytd-card { grid-template-columns: 34% 66%; gap: 2mm; }
  .report-preview[data-print-layout="statement"] .owner-ytd-values { gap: 1.2mm; }
  .report-preview[data-print-layout="statement"] .owner-ytd-values > div { padding: 1.4mm; border-radius: 1.5mm; }
  .report-preview[data-print-layout="statement"] .owner-ytd-values span { font-size: 6.2pt; }
  .report-preview[data-print-layout="statement"] .owner-ytd-values strong { margin-top: .6mm; font-size: 8.5pt; }
  .report-preview[data-print-layout="statement"] .owner-ytd-values small { margin-top: .4mm; font-size: 5.2pt; }
  .dispatcher-print-container { display: block !important; }
  .dispatcher-print-report { color: #111; font-size: 9pt; }
  .dispatcher-print-report > header { margin-bottom: 5mm; border-bottom: 2px solid #a96905; padding-bottom: 3mm; }
  .dispatcher-print-report > header span { color: #8b5700; font-size: 9pt; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
  .dispatcher-print-report > header h1 { margin: 1mm 0; font-size: 20pt; }
  .dispatcher-print-report > header p { margin: 0; color: #555; font-size: 11pt; }
  .dispatcher-print-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3mm; margin-bottom: 4mm; }
  .dispatcher-print-meta > div { border: 1px solid #bbb; border-radius: 2mm; padding: 2.5mm; }
  .dispatcher-print-meta b, .dispatcher-print-meta span { display: block; }
  .dispatcher-print-meta b { color: #666; font-size: 7.5pt; text-transform: uppercase; }
  .dispatcher-print-note { margin-bottom: 4mm; border-left: 3px solid #a96905; padding: 2mm 3mm; background: #fff8e8; }
  .dispatcher-print-report .dispatcher-review-toolbar { margin-bottom: 3mm; }
  .dispatcher-print-report .dispatcher-review-toolbar small { display: block; color: #555; }
  .dispatcher-print-report .dispatcher-review-row { break-inside: avoid; margin-bottom: 3mm; border: 1px solid #bc7a16; border-radius: 2mm; padding: 3mm; background: white; box-shadow: none; }
  .dispatcher-print-report .dispatcher-review-row-head { display: flex; align-items: flex-start; justify-content: space-between; flex-direction: row; }
  .dispatcher-print-report .dispatcher-review-row-head strong { color: #111; font-size: 11pt; }
  .dispatcher-print-report .dispatcher-review-row-head small { color: #7a4b00; }
  .dispatcher-print-report .badge { color: #7a4b00; border: 1px solid #bc7a16; background: #fff8e8; }
  .dispatcher-print-report .dispatcher-row-comparison { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3mm; margin-top: 2mm; border: 1px solid #ccc; border-radius: 2mm; padding: 2.5mm; background: white; }
  .dispatcher-print-report .dispatcher-row-comparison span { color: #222; }
  .dispatcher-print-report .dispatcher-row-comparison b { display: block; color: #666; font-size: 7.5pt; text-transform: uppercase; }
  .dispatcher-print-report .dispatcher-load-difference-grid { display: grid; grid-template-columns: .7fr repeat(2, 1fr); gap: 2.5mm; }
  .dispatcher-print-report .dispatcher-load-difference-grid span { border: 1px solid #ccc; padding: 2.5mm; color: #222; background: white; }
  .dispatcher-print-report .dispatcher-load-difference-grid span:nth-child(4) { grid-column: 1 / -1; }
  .dispatcher-print-report .dispatcher-load-difference-grid b { color: #666; font-size: 7.5pt; }
  .dispatcher-print-report .dispatcher-load-difference-grid strong { color: #111; }
  .dispatcher-print-report footer { margin-top: 5mm; border-top: 1px solid #ccc; padding-top: 2mm; color: #666; font-size: 7.5pt; text-align: center; }
}
