:root {
  --navy: #0b1930;
  --navy-2: #12233e;
  --blue: #246bfd;
  --blue-soft: #eaf1ff;
  --green: #16a673;
  --orange: #f59e45;
  --purple: #7357db;
  --red: #e65b65;
  --ink: #172033;
  --muted: #748198;
  --line: #e7ebf1;
  --canvas: #edf4ff;
  --white: #fff;
  --shadow: 0 10px 30px rgba(20, 39, 70, .06);
}

/* Professional report center controls */
.quick-report-filters { margin: 0 0 24px; padding: 22px 24px; border: 1px solid #dce5f2; border-radius: 16px; background: #fff; box-shadow: 0 12px 30px rgba(31, 66, 128, .06); }
.quick-filter-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.quick-filter-heading h3 { margin: 3px 0 0; color: #101b33; font-size: 20px; }
.quick-filter-heading > strong { padding: 9px 13px; border-radius: 999px; color: #1453c4; background: #edf4ff; font-size: 13px; }
.quick-filter-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-filter-buttons button { padding: 10px 15px; border: 1px solid #d6e0ef; border-radius: 10px; color: #31425f; background: #f8faff; font: inherit; font-weight: 700; cursor: pointer; }
.quick-filter-buttons button:hover, .quick-filter-buttons button.active { border-color: #2b6df6; color: #fff; background: #2b6df6; box-shadow: 0 7px 18px rgba(43, 109, 246, .2); }
.custom-report-range { display: grid; grid-template-columns: repeat(2, minmax(180px, 260px)); gap: 14px; margin-top: 16px; }
.custom-report-range[hidden] { display: none; }
.custom-report-range label { display: grid; gap: 7px; color: #52627d; font-size: 13px; font-weight: 700; }
.custom-report-range input { min-height: 45px; padding: 0 13px; border: 1px solid #d6e0ef; border-radius: 10px; color: #172033; background: #fbfcff; font: inherit; }
.statement-readonly-form input[readonly] { color: #253653; background: #f4f7fb; cursor: default; }
.report-preview-modal { position: fixed; z-index: 3000; inset: 0; display: none; align-items: center; justify-content: center; padding: 26px; background: rgba(8, 20, 40, .72); }
.report-preview-modal.open { display: flex; }
.report-preview-dialog { display: flex; flex-direction: column; width: min(1180px, 96vw); max-height: 92vh; overflow: hidden; border-radius: 18px; background: #f4f7fc; box-shadow: 0 28px 80px rgba(0, 0, 0, .28); }
.report-preview-header, .report-preview-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; background: #fff; }
.report-preview-header { border-bottom: 1px solid #dce5f2; }
.report-preview-header h2 { margin: 3px 0 0; }
.report-preview-actions { justify-content: flex-end; border-top: 1px solid #dce5f2; }
.report-preview-content { overflow: auto; padding: 24px; }
.report-preview-sheet { width: 100%; min-height: 560px; padding: 28px; border: 1px solid #d7dfeb; border-radius: 12px; background: #fff; box-shadow: 0 8px 22px rgba(35, 60, 105, .08); }
.report-preview-company { padding-bottom: 18px; border-bottom: 2px solid #17345f; text-align: center; }
.report-preview-company h2, .report-preview-company h3 { margin: 5px 0; }
.report-preview-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0; padding: 12px; border-radius: 9px; color: #344258; background: #f4f7fc; font-size: 12px; }
.report-preview-sheet table { width: 100%; margin-top: 18px; border-collapse: collapse; }
.report-preview-sheet th, .report-preview-sheet td { padding: 9px 10px; border: 1px solid #cbd5e1; }
.report-preview-sheet th { background: #eaf0fb; }
#invoice-report-print-root { display: none; }
.invoice-report,
.invoice-report * {
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 12px !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  font-weight: 400 !important;
  opacity: 1 !important;
}
.invoice-report .invoice-print-title h1 {
  font-size: 24px !important;
  font-weight: 700 !important;
}
.invoice-report .invoice-print-title h2 {
  font-size: 18px !important;
  font-weight: 700 !important;
}
.invoice-report .invoice-print-table th {
  font-size: 12px !important;
  font-weight: 700 !important;
}
.invoice-report .invoice-print-table td {
  font-size: 12px !important;
  font-weight: 400 !important;
}
.invoice-report .invoice-print-table tfoot td,
.invoice-report .invoice-print-table tfoot strong {
  font-size: 12px !important;
  font-weight: 700 !important;
}
.report-preview-content .invoice-report-export-sheet { min-height: 560px; padding: 28px; }
.report-preview-content .invoice-print-document { width: 100%; max-width: none; margin: 0 auto; padding: 28px 32px; color: #111; background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; box-shadow: none; font-family: "Courier New", monospace; }
.report-preview-content .invoice-print-header { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 16px; align-items: start; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 2px solid #17345f; font-family: "Courier New", monospace; }
.report-preview-content .invoice-print-title { text-align: center; font-family: "Courier New", monospace; }
.report-preview-content .invoice-print-title h1,
.report-preview-content .invoice-print-title h2 { margin: 0; text-align: center; color: #111827; }
.report-preview-content .invoice-print-title h1 { font-size: 24px; font-weight: 800; letter-spacing: .03em; line-height: 1.2; }
.report-preview-content .invoice-print-title h2 { margin-top: 7px; font-size: 17px; font-weight: 800; line-height: 1.2; }
.report-preview-content .invoice-print-title p { min-height: 54px; display: flex; align-items: center; justify-content: center; margin: 7px 0 0; color: #111827; font: 12px/1.5 "Courier New", monospace; text-align: center; }
.report-preview-content .invoice-print-page { color: #111827; font: 12px "Courier New", monospace; text-align: right; }
.report-preview-content .invoice-print-document .table-wrap { overflow: visible; }
.report-preview-content .invoice-print-table { width: 100%; min-width: 0; margin: 0 auto; table-layout: fixed; border-collapse: collapse; color: #111827; background: #fff; font-family: Arial, sans-serif; font-size: 13px; }
.report-preview-content .invoice-print-table th,
.report-preview-content .invoice-print-table td { padding: 9px 10px; border: 1px solid #cbd5e1; vertical-align: top; }
.report-preview-content .invoice-print-table th { padding: 9px 10px; border: 1px solid #cbd5e1; background: #eaf0fb; color: #111; font-weight: 800; letter-spacing: .03em; text-align: center; vertical-align: top; }
.report-preview-content .invoice-print-table td { color: #111; background: #fff; }
.report-preview-content .invoice-print-table tbody tr:nth-child(even) td { background: #f1f1f1; }
.report-preview-content .invoice-print-table tbody tr:nth-child(odd) td { background: #fff; }
.report-preview-content .invoice-print-table th:nth-child(1),
.report-preview-content .invoice-print-table td:nth-child(1) { width: 13%; }
.report-preview-content .invoice-print-table th:nth-child(2),
.report-preview-content .invoice-print-table td:nth-child(2) { width: 72%; }
.report-preview-content .invoice-print-table th:nth-child(3),
.report-preview-content .invoice-print-table td:nth-child(3) { width: 15%; font-variant-numeric: tabular-nums; }
.report-preview-content .invoice-print-table td:nth-child(3) { text-align: right; }
.report-preview-content .invoice-print-table tbody td:nth-child(2) { text-align: left; }
.report-preview-content .invoice-print-table .invoice-report-description,
.invoice-report-description {
  color: #111;
  font-size: 13px;
  font-weight: 400;
  line-height: normal;
  vertical-align: top;
  word-break: normal;
  overflow-wrap: normal;
}
.report-arrow-separator {
  white-space: nowrap;
}
.fuel-report-description {
  max-width: 0;
  overflow: hidden;
  color: #111;
  font-size: 13px;
  font-weight: 400;
  line-height: normal;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.report-preview-content .invoice-print-table tbody td:nth-child(3) { font-weight: 800; }
.report-preview-content .invoice-print-table tfoot td { padding-top: 11px; padding-bottom: 11px; border: 1px solid #cbd5e1; border-top: 2px solid #8793a6; background: #eaf0fb; color: #111; font-weight: 800; }
.report-preview-content .invoice-print-table tfoot td:nth-child(2) { text-align: center; }
.report-preview-content .invoice-print-table tfoot td:nth-child(3) { text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.driver-statement-export-sheet { min-height: 0; padding: 28px; }
.driver-statement-export { margin: 0; padding: 0; border: 0; box-shadow: none; }
.driver-statement-export .driver-ledger-head { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 16px; align-items: start; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 2px solid #17345f; }
.driver-statement-export .driver-ledger-head h2,
.driver-statement-export .driver-ledger-head h3 { margin: 0; text-align: center; color: #111827; }
.driver-statement-export .driver-ledger-head h2 { font-size: 24px; letter-spacing: .03em; }
.driver-statement-export .driver-ledger-head h3 { margin-top: 7px; font-size: 17px; }
.driver-statement-export .driver-ledger-meta { color: #111827; text-align: center; font: 12px/1.5 "Courier New", monospace; }
.driver-statement-export .driver-ledger-center-meta { margin-top: 7px; text-align: center; }
.driver-statement-export .driver-ledger-page { text-align: right; font: 12px "Courier New", monospace; }
.driver-statement-export .table-wrap { overflow: visible; }
.driver-statement-export .ledger-table { width: 100%; min-width: 0; table-layout: fixed; }
.driver-statement-export .ledger-table th { text-align: center; }
.driver-statement-export .ledger-table th:nth-child(1) { width: 13%; }
.driver-statement-export .ledger-table th:nth-child(2) { width: 57%; }
.driver-statement-export .ledger-table th:nth-child(3) { width: 10%; }
.driver-statement-export .ledger-table th:nth-child(4),
.driver-statement-export .ledger-table th:nth-child(5) { width: 10%; text-align: center; }
.driver-statement-export .invoice-ledger-table th:nth-child(1) { width: 14%; text-align: center; }
.driver-statement-export .invoice-ledger-table th:nth-child(2) { width: 56%; text-align: center; }
.driver-statement-export .invoice-ledger-table th:nth-child(3) { width: 15%; text-align: center; }
.driver-statement-export .invoice-ledger-table th:nth-child(4) { width: 15%; text-align: center; }
.driver-statement-export .invoice-ledger-table td:nth-child(1),
.driver-statement-export .invoice-ledger-table td:nth-child(2) { text-align: left; }
.driver-statement-export .invoice-ledger-table td:nth-child(3) { text-align: right; font-variant-numeric: tabular-nums; }
.driver-statement-export .invoice-ledger-table td:nth-child(4) { text-align: center; }
.driver-statement-export .fuel-ledger-table th:nth-child(1),
.driver-statement-export .fuel-ledger-table td:nth-child(1) { width: 12%; }
.driver-statement-export .fuel-ledger-table th:nth-child(2),
.driver-statement-export .fuel-ledger-table td:nth-child(2) { width: 44%; }
.driver-statement-export .fuel-ledger-table th:nth-child(3),
.driver-statement-export .fuel-ledger-table th:nth-child(4),
.driver-statement-export .fuel-ledger-table th:nth-child(5),
.driver-statement-export .fuel-ledger-table th:nth-child(6),
.driver-statement-export .fuel-ledger-table td:nth-child(3),
.driver-statement-export .fuel-ledger-table td:nth-child(4),
.driver-statement-export .fuel-ledger-table td:nth-child(5),
.driver-statement-export .fuel-ledger-table td:nth-child(6) { width: 11%; text-align: right; font-variant-numeric: tabular-nums; }
.driver-statement-export .fuel-ledger-table th:nth-child(3),
.driver-statement-export .fuel-ledger-table th:nth-child(4),
.driver-statement-export .fuel-ledger-table th:nth-child(5),
.driver-statement-export .fuel-ledger-table th:nth-child(6) { text-align: center; }
.driver-statement-export .fuel-ledger-table tfoot td:nth-child(2) { text-align: center; }
.driver-statement-export .fuel-ledger-table tfoot td:nth-child(6) { text-align: right; }
.driver-statement-export .fuel-report-description{max-width:0;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}
.fuel-report-export .fuel-ledger-table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; color: #111827; font-family: Arial, sans-serif; font-size: 13px; }
.fuel-report-export .fuel-ledger-table th,
.fuel-report-export .fuel-ledger-table td { padding: 9px 10px; border: 1px solid #cbd5e1; vertical-align: middle; }
.fuel-report-export .fuel-ledger-table th { color: #111; background: #eaf0fb; text-align: center; font-weight: 800; letter-spacing: .03em; }
.fuel-report-export .fuel-ledger-table td { color: #111; background: #fff; }
.fuel-report-export .fuel-ledger-table tbody tr:nth-child(even) td { background: #f1f1f1; }
.fuel-report-export .fuel-ledger-table tbody tr:nth-child(odd) td { background: #fff; }
.fuel-report-export .fuel-ledger-table th:nth-child(1),
.fuel-report-export .fuel-ledger-table td:nth-child(1) { width: 12%; }
.fuel-report-export .fuel-ledger-table th:nth-child(2),
.fuel-report-export .fuel-ledger-table td:nth-child(2) { width: 44%; }
.fuel-report-export .fuel-ledger-table th:nth-child(3),
.fuel-report-export .fuel-ledger-table th:nth-child(4),
.fuel-report-export .fuel-ledger-table th:nth-child(5),
.fuel-report-export .fuel-ledger-table th:nth-child(6),
.fuel-report-export .fuel-ledger-table td:nth-child(3),
.fuel-report-export .fuel-ledger-table td:nth-child(4),
.fuel-report-export .fuel-ledger-table td:nth-child(5),
.fuel-report-export .fuel-ledger-table td:nth-child(6) { width: 11%; text-align: right; font-variant-numeric: tabular-nums; }
.fuel-report-export .fuel-ledger-table th:nth-child(3),
.fuel-report-export .fuel-ledger-table th:nth-child(4),
.fuel-report-export .fuel-ledger-table th:nth-child(5),
.fuel-report-export .fuel-ledger-table th:nth-child(6) { text-align: center; }
.fuel-report-export .fuel-ledger-table tfoot td { padding-top: 11px; padding-bottom: 11px; border-top: 2px solid #8793a6; background: #eaf0fb !important; color: #111; font-weight: 800; }
.fuel-report-export .fuel-ledger-table tfoot td:nth-child(2) { text-align: center; }
.fuel-report-export .fuel-ledger-table tfoot td:nth-child(n+3) { text-align: right; font-variant-numeric: tabular-nums; }
.fuel-report-export .report-arrow-separator { white-space: nowrap; }
.fuel-report-export .fuel-report-description { max-width: 0; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.accounting-report-meta { min-height: 54px; display: grid !important; gap: 2px; align-content: center; margin: 7px 0 0; color: #111827; font: 12px/1.5 "Courier New", monospace; text-align: center; }
.accounting-report-meta span,
.accounting-report-meta strong { color: #111827; font: 12px/1.5 "Courier New", monospace !important; }
.accounting-report-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px; }
.accounting-report-summary-card { min-height: 58px; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; background: #f8fafc; }
.accounting-report-summary-card span { display: block; color: #111827; font: 700 11px Arial, Helvetica, sans-serif; text-transform: uppercase; letter-spacing: .03em; }
.accounting-report-summary-card strong { display: block; margin-top: 6px; color: #111827; font: 700 16px Arial, Helvetica, sans-serif; }
.dispatch-fee-print-table th:nth-child(1),
.dispatch-fee-print-table td:nth-child(1) { width: 13%; }
.dispatch-fee-print-table th:nth-child(2),
.dispatch-fee-print-table td:nth-child(2) { width: 72%; }
.dispatch-fee-print-table th:nth-child(3),
.dispatch-fee-print-table td:nth-child(3) { width: 15%; text-align: right; font-variant-numeric: tabular-nums; }
.dispatch-fee-print-table th:nth-child(3) { text-align: center; }
.driver-statement-export .ledger-table tfoot td { background: #eaf0fb; font-weight: 800; }
.driver-statement-export .ledger-table tfoot td:nth-child(2),
.driver-statement-export .ledger-table tfoot td:nth-child(3) { text-align: center; }
@media (max-width: 800px) {
  .quick-filter-heading { align-items: flex-start; flex-direction: column; }
  .custom-report-range { grid-template-columns: 1fr; }
  .report-preview-modal { padding: 8px; }
  .report-preview-content { padding: 10px; }
  .report-preview-meta { grid-template-columns: 1fr 1fr; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: "DM Sans", sans-serif; font-size: 14px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.login-screen { height: 100vh; position: relative; display: grid; place-items: center; overflow: hidden; padding: 24px 20px 48px; background: #102542 url("assets/login-truck-bg.png") center/cover no-repeat; }
.login-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,22,38,.10), rgba(255,255,255,.03) 52%, rgba(8,22,38,.08)), linear-gradient(0deg, rgba(8,20,35,.14), transparent 45%); }
.login-card { width: min(385px, 100%); position: relative; z-index: 1; padding: 25px 28px 21px; border: 1px solid rgba(255,255,255,.7); border-radius: 11px; background: rgba(255,255,255,.97); box-shadow: 0 25px 70px rgba(4,18,36,.3); backdrop-filter: blur(8px); animation: login-in .55s ease both; }
@keyframes login-in { from { opacity: 0; transform: translateY(16px); } }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 18px; color: var(--navy); }
.login-logo { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(145deg, #3479ff, #1656d5); box-shadow: 0 8px 18px rgba(36,107,253,.25); }
.login-logo svg { width: 29px; fill: white; }
.login-brand strong, .login-brand small { display: block; font-family: Manrope, sans-serif; }
.login-brand strong { font-size: 16px; letter-spacing: 2px; }
.login-brand small { margin-top: 1px; color: #7d8b9f; font-size: 9px; letter-spacing: 4.7px; }
.login-card h1 { margin: 0 0 5px; text-align: center; font: 800 23px Manrope, sans-serif; letter-spacing: -.7px; }
.login-subtitle { margin: 0 0 20px; color: var(--muted); text-align: center; font-size: 11px; }
.login-card form > label { margin-bottom: 12px; color: #445167; font-size: 9px; letter-spacing: .1px; }
.login-input { height: 40px; display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 0 11px; border: 1px solid #dce2ea; border-radius: 6px; background: #f9fafc; transition: .2s; }
.login-input:focus-within { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px #eaf1ff; }
.login-input i { width: 18px; color: #9aa6b7; font-style: normal; text-align: center; }
.login-input input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.login-input button { padding: 3px; border: 0; color: var(--blue); background: transparent; font-size: 9px; font-weight: 700; }
.login-options { display: flex; align-items: center; justify-content: space-between; margin: 1px 0 12px; }
.remember { display: flex; align-items: center; gap: 7px; color: #69768a; font-size: 9px; font-weight: 500; }
.remember input { width: 14px; height: 14px; margin: 0; accent-color: var(--blue); }
.forgot-link { border: 0; color: var(--blue); background: transparent; font-size: 9px; font-weight: 600; }
.login-error { min-height: 14px; margin: -7px 0 7px; color: var(--red); font-size: 9px; text-align: center; }
.login-button { width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 16px; border: 0; border-radius: 6px; color: #fff; background: var(--blue); box-shadow: 0 8px 18px rgba(36,107,253,.24); font-size: 10px; font-weight: 700; transition: .2s; }
.login-button:hover { background: #1459e8; transform: translateY(-1px); }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--line); color: #9aa5b4; font-size: 8px; }
.secure-note span { width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: #e7f7f1; font-size: 8px; font-weight: 700; }
.login-footer { position: absolute; z-index: 1; bottom: 22px; color: rgba(255,255,255,.86); font-size: 9px; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 248px; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: 27px 18px 20px; color: #fff; background: var(--navy); z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; padding: 0 10px 28px; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 10px; background: var(--blue); }
.brand-mark svg { width: 25px; fill: #fff; }
.brand strong, .brand small { display: block; letter-spacing: 1.7px; font-family: Manrope, sans-serif; }
.brand strong { font-size: 14px; }
.brand small { margin-top: 2px; color: #8d9bb1; font-size: 8px; letter-spacing: 3.8px; }
.nav { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.nav-label { margin: 18px 13px 9px; color: #637189; font-size: 9px; font-weight: 700; letter-spacing: 1.7px; }
.nav-item { width: 100%; position: relative; display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 13px; border: 0; border-radius: 8px; color: #a9b4c5; background: transparent; text-align: left; font-weight: 500; transition: .2s; }
.nav-item span { width: 20px; font-size: 18px; text-align: center; }
.nav-item b { margin-left: auto; padding: 2px 7px; border-radius: 10px; color: #95a5bd; background: #1d304b; font-size: 10px; }
.nav-item:hover, .nav-item.active { color: #fff; background: var(--blue); }
.nav-item.active b { color: #fff; background: rgba(255,255,255,.2); }
.sidebar-help { display: flex; align-items: center; gap: 10px; margin: 15px 0 17px; padding: 13px; border: 1px solid #263852; border-radius: 9px; }
.sidebar-help > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #203451; color: #a8b7ca; }
.sidebar-help div, .sidebar-user div:nth-child(2) { min-width: 0; flex: 1; }
.sidebar-help strong, .sidebar-help small, .sidebar-user strong, .sidebar-user small { display: block; }
.sidebar-help strong, .sidebar-user strong { font-size: 11px; }
.sidebar-help small, .sidebar-user small { margin-top: 3px; color: #728198; font-size: 9px; }
.sidebar-help button, .sidebar-user button { border: 0; color: #718099; background: none; font-size: 18px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 17px 5px 0; border-top: 1px solid #23344c; }
.logout-button { transition: .2s; }
.logout-button:hover { color: #fff; }
.avatar { width: 34px; height: 34px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(145deg, #5276a5, #18314e); font-size: 10px; font-weight: 700; }

.main { width: calc(100% - 248px); min-height: 100vh; margin-left: 248px; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 33px; border-bottom: 1px solid var(--line); background: #fff; }
.search { width: min(500px, 48vw); position: relative; display: flex; align-items: center; gap: 11px; color: #9aa5b6; }
.search span { font-size: 22px; }
.search input { flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search input::placeholder { color: #aab3c1; }
kbd { padding: 4px 8px; border: 1px solid #dfe3e9; border-radius: 5px; color: #8f99a8; background: #fafbfc; font: 10px "DM Sans"; }
.search-results { width: 100%; max-height: 390px; position: absolute; z-index: 80; top: 48px; left: 0; display: none; overflow-y: auto; padding: 7px; border: 1px solid #dfe5ed; border-radius: 9px; background: #fff; box-shadow: 0 18px 45px rgba(15,31,55,.18); }
.search-results.open { display: block; }
.search-result { width: 100%; display: flex; align-items: center; gap: 11px; padding: 10px 11px; border: 0; border-radius: 7px; color: #172033; background: transparent; text-align: left; }
.search-result:hover, .search-result.active { background: #edf4ff; }
.search-result-icon { width: 31px; height: 31px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 7px; color: #246bfd; background: #eaf1ff; font-size: 12px; font-weight: 700; }
.search-result div { min-width: 0; flex: 1; }
.search-result strong, .search-result small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result strong { color: #172033; font: 600 11px "Open Sans", Arial, sans-serif; }
.search-result small { margin-top: 3px; color: #7c889a; font-size: 9px; }
.search-result-type { color: #8b97a8; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.search-empty { padding: 18px; color: #7c889a; font-size: 10px; text-align: center; }
.top-actions, .top-user { display: flex; align-items: center; }
.top-actions { gap: 19px; }
.icon-button { position: relative; border: 0; color: #69758a; background: none; font-size: 20px; }
.icon-button i { width: 6px; height: 6px; position: absolute; top: 2px; right: 4px; border: 1px solid white; border-radius: 50%; background: #ff515e; }
.top-user { gap: 9px; padding-left: 19px; border-left: 1px solid var(--line); }
.top-user strong, .top-user small { display: block; }
.top-user strong { font-size: 11px; }
.top-user small { margin-top: 2px; color: #939dac; font-size: 9px; }
.top-logout { margin-left: 7px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; color: #748096; background: #fff; font-size: 8px; font-weight: 600; }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 22px; }

.content { padding: 29px 34px 45px; }
.page { display: none; animation: fade .25s ease; }
.page.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(3px); } }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-heading h1 { margin: 4px 0 6px; font: 800 25px Manrope, sans-serif; letter-spacing: -.8px; }
.page-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.page-heading .eyebrow, .eyebrow { color: #98a3b2; font-size: 8px; font-weight: 700; letter-spacing: 1.4px; }
.primary-button, .secondary-button { padding: 11px 17px; border-radius: 7px; font-size: 11px; font-weight: 600; box-shadow: 0 5px 12px rgba(36,107,253,.15); }
.primary-button { border: 1px solid var(--blue); color: #fff; background: var(--blue); }
.secondary-button { border: 1px solid var(--line); color: var(--ink); background: white; box-shadow: none; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 17px; margin-bottom: 18px; }
.metric-card, .panel { border: 1px solid #e8ecf2; border-radius: 9px; background: #fff; box-shadow: var(--shadow); }
.metric-card { min-width: 0; padding: 17px 18px; }
.metric-top { display: flex; align-items: center; justify-content: space-between; }
.metric-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 7px; font-size: 16px; }
.metric-icon.blue { color: var(--blue); background: #edf3ff; }
.metric-icon.green { color: var(--green); background: #e8f7f2; }
.metric-icon.orange { color: #ef8b2d; background: #fff3e7; }
.metric-icon.purple { color: var(--purple); background: #f1edff; }
.trend { padding: 3px 6px; border-radius: 9px; font-size: 8px; font-weight: 700; }
.trend.up { color: var(--green); background: #e9f8f2; }
.trend.down { color: var(--red); background: #ffedef; }
.metric-card > p { margin: 16px 0 4px; color: #738096; font-size: 10px; font-weight: 500; }
.metric-card h2 { margin: 0 0 4px; font: 800 22px Manrope, sans-serif; letter-spacing: -.6px; }
.metric-card small { color: #9ba5b3; font-size: 8px; }
.dashboard-grid { display: grid; grid-template-columns: 1.65fr 1fr; gap: 18px; margin-bottom: 18px; }
.panel { padding: 19px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.panel-heading h3 { margin: 0 0 4px; font: 700 13px Manrope, sans-serif; }
.panel-heading p { margin: 0; color: #929cab; font-size: 9px; }
.panel-heading select { padding: 6px 25px 6px 9px; border: 1px solid var(--line); border-radius: 5px; color: #6f7a8c; background: white; font-size: 9px; }
.panel-heading > button:not(.text-button) { border: 0; color: #8995a6; background: none; }
.chart-legend { display: flex; justify-content: flex-end; gap: 16px; margin: 10px 4px 1px; color: #838ea0; font-size: 8px; }
.legend-dot, .status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; }
.legend-dot.revenue { background: var(--blue); }
.legend-dot.expenses { background: #cdd9f8; }
.bar-chart { height: 175px; display: flex; align-items: flex-end; justify-content: space-around; gap: 13px; padding: 20px 9px 21px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 41px, #f0f2f6 42px); }
.bar-group { height: 100%; flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 4px; position: relative; }
.bar { width: 13px; max-width: 28%; border-radius: 3px 3px 0 0; transition: height .6s ease; }
.bar.revenue { background: var(--blue); }
.bar.expenses { background: #cedafb; }
.bar-group label { position: absolute; bottom: -18px; color: #929cac; font-size: 8px; }
.donut-wrap { display: flex; align-items: center; justify-content: space-around; gap: 20px; min-height: 200px; }
.donut { width: 125px; height: 125px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; background: conic-gradient(var(--blue) 0 33%, var(--green) 33% 75%, var(--orange) 75% 92%, var(--red) 92%); }
.donut::before { content: ""; width: 79px; height: 79px; position: absolute; border-radius: 50%; background: white; }
.donut > div { z-index: 1; text-align: center; }
.donut strong, .donut small { display: block; }
.donut strong { font: 800 21px Manrope; }
.donut small { margin-top: 2px; color: #95a0af; font-size: 7px; }
.status-list { min-width: 115px; }
.status-list > div { display: flex; justify-content: space-between; gap: 20px; margin: 12px 0; color: #738096; font-size: 9px; }
.status-list strong { color: var(--ink); }
.status-dot.transit { background: var(--blue); }.status-dot.delivered { background: var(--green); }.status-dot.pending { background: var(--orange); }.status-dot.cancelled { background: var(--red); }

.table-panel { padding: 0; overflow: hidden; }
.table-panel .panel-heading { padding: 18px 19px 13px; }
.text-button { border: 0; color: var(--blue); background: none; font-size: 9px; font-weight: 600; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { padding: 15px 18px; border-top: 1px solid #dfe3e8; border-bottom: 1px solid #dfe3e8; color: #111; background: #edf0f4; font: 700 12px "Open Sans", Arial, sans-serif; letter-spacing: 0; text-align: left; }
td { padding: 17px 18px; border-bottom: 1px solid #e1e4e8; color: #111; font: 400 14px "Open Sans", Arial, sans-serif; }
tbody tr:nth-child(odd) td { background: #fff; }
tbody tr:nth-child(even) td { background: #f1f1f1; }
tbody tr { transition: background-color .18s ease; }
tbody tr:hover td { background: #e7effc; }
tbody tr:last-child td { border-bottom: 0; }
td strong { color: #000; font-weight: 600; }
.route { display: flex; align-items: center; gap: 8px; }
.route i { width: 5px; height: 5px; display: block; border-radius: 50%; background: var(--blue); box-shadow: 0 12px 0 var(--green); }
.route span { color: #9ba5b3; font-size: 8px; }
.route span b { display: block; margin-bottom: 5px; color: #536075; font-weight: 500; }
.driver-cell { display: flex; align-items: center; gap: 7px; }
.driver-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #406b91; font-size: 9px; font-weight: 700; }
.badge { display: inline-block; padding: 7px 12px; border-radius: 16px; font: 600 12px "Open Sans", Arial, sans-serif; }
.badge.transit, .badge.unpaid { color: #1767ff; background: #eaf1ff; }
.badge.delivered, .badge.paid { color: #008b62; background: #e5f7f1; }
.badge.pending { color: #e67600; background: #fff0e1; }
.badge.cancelled, .badge.overdue { color: #ef3f4c; background: #ffe8eb; }
.badge.invoiced { color: #6843e5; background: #efe9ff; }
.status-select { min-width: 112px; padding: 8px 28px 8px 12px; border: 1px solid transparent; border-radius: 18px; outline: 0; font: 600 12px "Open Sans", Arial, sans-serif; cursor: pointer; }
.status-select.pending { color: #e67600; background: #fff0e1; }
.status-select.assigned { color: #997000; background: #fff5bf; }
.status-select.intransit { color: #1767ff; background: #eaf1ff; }
.status-select.delivered { color: #008b62; background: #e5f7f1; }
.status-select.cancelled { color: #ef3f4c; background: #ffe8eb; }
.status-select.invoiced { color: #6843e5; background: #efe9ff; }
.status-select.paid { color: #00875f; background: #dff7ec; }
.status-select option.status-action-edit { color: #1767ff; font-weight: 700; }
.status-select option.status-action-delete { color: #e33c4b; font-weight: 700; }
.status-select:focus { border-color: currentColor; }
.driver-status-select { min-width: 112px; padding: 8px 28px 8px 12px; border: 1px solid transparent; border-radius: 18px; outline: 0; font: 600 12px "Open Sans", Arial, sans-serif; cursor: pointer; }
.driver-status-select.active { color: #008b62; background: #e5f7f1; }
.driver-status-select.inactive { color: #ef3f4c; background: #ffe8eb; }
.driver-status-select option.status-action-edit { color: #1767ff; font-weight: 700; }
.driver-status-select option.status-action-delete { color: #e33c4b; font-weight: 700; }
.driver-status-select:focus { border-color: currentColor; }
.broker-status-select { min-width: 112px; padding: 8px 28px 8px 12px; border: 1px solid transparent; border-radius: 18px; outline: 0; font: 600 12px "Open Sans", Arial, sans-serif; cursor: pointer; }
.broker-status-select.active { color: #008b62; background: #e5f7f1; }
.broker-status-select.inactive { color: #ef3f4c; background: #ffe8eb; }
.broker-status-select option.status-action-edit { color: #1767ff; font-weight: 700; }
.broker-status-select option.status-action-delete { color: #e33c4b; font-weight: 700; }
.broker-status-select:focus { border-color: currentColor; }
.invoice-status-select { min-width: 104px; padding: 8px 28px 8px 12px; border: 1px solid transparent; border-radius: 18px; outline: 0; font: 600 12px "Open Sans", Arial, sans-serif; cursor: pointer; }
.invoice-status-select.paid { color: #008b62; background: #e5f7f1; }
.invoice-status-select.unpaid { color: #e67600; background: #fff0e1; }
.invoice-status-select.overdue { color: #ef3f4c; background: #ffe8eb; }
.invoice-status-select option.status-action-edit { color: #1769ff; font-weight: 700; }
.invoice-status-select option.status-action-delete { color: #ef3f4c; font-weight: 700; }
.invoice-status-select:focus { border-color: currentColor; }
.payment-method-select { min-width: 116px; padding: 8px 28px 8px 12px; border: 1px solid transparent; border-radius: 18px; outline: 0; font: 600 12px "Open Sans", Arial, sans-serif; cursor: pointer; }
.payment-method-select.ach { color: #008b62; background: #e5f7f1; }
.payment-method-select.wiretransfer { color: #e67600; background: #fff0e1; }
.payment-method-select.check { color: #ef3f4c; background: #ffe8eb; }
.payment-method-select.cash { color: #1767ff; background: #eaf1ff; }
.payment-method-select:focus { border-color: currentColor; }
.row-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.row-action { border: 1px solid #d8e0ec; border-radius: 7px; background: #fff; padding: 7px 10px; color: #1a2b45; font: 700 11px "Open Sans", Arial, sans-serif; cursor: pointer; }
.row-action:hover { border-color: #2c6df7; color: #1767ff; background: #f3f7ff; }
.row-action.edit-record { color: #1767ff; }
.row-action.delete-record { color: #e33c4b; }
.row-action.delete-record:hover { border-color: #ef5b67; background: #fff1f2; }
.row-action:disabled { color: #a5afbf; border-color: #e1e7f0; background: #f7f9fc; cursor: not-allowed; }
.load-action-group { flex-wrap: wrap; gap: 5px; }
.load-action-group .row-action { padding: 6px 8px; font-size: 9px; }
.record-action-cell { text-align: center; }
.discount-value { color: #d74450; font-weight: 600; }
.cash-in { color: #008b69; font-weight: 700; }
.cash-out { color: #d74450; font-weight: 700; }
#accounting-page table { min-width: 1050px; }
.more-button { border: 0; color: #9ba5b3; background: none; font-size: 16px; }
.full-table { min-height: 430px; }
.table-search { min-width: 190px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; outline: none; font-size: 10px; }

/* Keep the full Loads register visible at normal browser zoom. */
#loads-page .table-wrap { overflow-x: visible; }
#loads-page table { width: 100%; table-layout: fixed; white-space: normal; }
#loads-page th { padding: 13px 8px; font-size: 10px; }
#loads-page td { padding: 14px 8px; font-size: 12px; overflow-wrap: anywhere; }
#loads-page th:nth-child(1) { width: 10%; }
#loads-page th:nth-child(2) { width: 12%; }
#loads-page th:nth-child(3) { width: 11%; }
#loads-page th:nth-child(4) { width: 10%; }
#loads-page th:nth-child(5) { width: 8%; }
#loads-page th:nth-child(6) { width: 10%; }
#loads-page th:nth-child(7) { width: 8%; }
#loads-page th:nth-child(8) { width: 7%; }
#loads-page th:nth-child(9) { width: 10%; }
#loads-page th:nth-child(10) { width: 14%; }
#loads-page .driver-cell { gap: 6px; }
#loads-page .driver-avatar { width: 28px; height: 28px; font-size: 8px; }
#loads-page .status-select { width: 100%; min-width: 0; padding: 7px 20px 7px 8px; font-size: 11px; }
#loads-page .row-actions { gap: 4px; }
#loads-page .row-action { padding: 6px 7px; font-size: 10px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; margin-bottom: 18px; }
#loads-page .loads-heading { display: grid; grid-template-columns: minmax(290px, 1fr) minmax(260px, 320px) minmax(290px, 1fr); }
#loads-page .loads-heading > .primary-button { justify-self: end; }
#load-stats { display: block; width: 100%; margin: 0; }
#load-stats .mini-stat { width: 100%; }
.mini-stat { padding: 18px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.mini-stat span, .mini-stat small { display: block; color: var(--muted); }
.mini-stat span { font-size: 10px; }.mini-stat strong { display: block; margin: 7px 0 3px; font: 800 20px Manrope; }.mini-stat small { font-size: 8px; }
.documents-heading { align-items: flex-end; }
.document-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 17px; margin-bottom: 18px; }
.document-stat { padding: 18px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: var(--shadow); }
.document-stat span, .document-stat small { display: block; color: var(--muted); }
.document-stat span { font-size: 10px; }
.document-stat strong { display: block; margin: 7px 0 3px; color: var(--ink); font: 800 20px Manrope; }
.document-stat small { font-size: 8px; }
.document-stat.active { border-top: 3px solid var(--green); }
.document-stat.expiring { border-top: 3px solid #e2ae19; }
.document-stat.expired { border-top: 3px solid var(--red); }
.document-groups { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
.document-group { min-height: 92px; display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 10px; padding: 14px; border: 1px solid #dfe5ed; border-radius: 9px; color: var(--ink); background: #fff; box-shadow: var(--shadow); text-align: left; }
.document-group > span { grid-row: 1 / 3; font-size: 25px; }
.document-group strong { align-self: end; font-size: 11px; }
.document-group small { align-self: start; color: var(--muted); font-size: 8px; }
.document-group:hover, .document-group.active { border-color: var(--blue); background: var(--blue-soft); }
.document-table-tools { display: flex; align-items: center; gap: 9px; }
.document-table-tools select { min-width: 140px; padding: 8px 28px 8px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #fff; font-size: 10px; }
.documents-table { min-width: 1150px; }
.document-file-name, .document-current-file { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; font-weight: 500; }
.document-status { display: inline-block; min-width: 104px; padding: 7px 11px; border-radius: 16px; font: 700 10px "Open Sans", Arial, sans-serif; text-align: center; }
.document-status.active { color: #008b62; background: #e5f7f1; }
.document-status.expiring { color: #9a7000; background: #fff5bf; }
.document-status.expired { color: #ef3f4c; background: #ffe8eb; }
.days-remaining { font-weight: 700; }
.days-remaining.active { color: #008b62; }
.days-remaining.expiring { color: #9a7000; }
.days-remaining.expired { color: #ef3f4c; }
.documents-empty { padding: 45px 20px; color: var(--muted); text-align: center; }
.document-modal-backdrop { position: fixed; inset: 0; z-index: 160; display: grid; place-items: center; padding: 20px; background: rgba(6,18,36,.58); opacity: 0; transition: opacity .18s ease; }
.document-modal-backdrop.open { opacity: 1; }
.document-modal { width: min(580px, 100%); max-height: 90vh; overflow-y: auto; padding: 25px; border-radius: 12px; background: #fff; box-shadow: 0 24px 70px rgba(0,0,0,.25); }
.document-modal form > label { margin-bottom: 14px; }
.document-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.document-form-row label { margin: 0; }
.document-modal input[type="file"] { padding: 9px; background: #fff; }
.fuel-heading { align-items: flex-end; }
.fuel-filters { display: flex; align-items: flex-end; gap: 9px; }
.fuel-filters label { font-size: 9px; }
.fuel-filters input { width: 135px; margin-top: 4px; padding: 7px 9px; background: #fff; }
.fuel-filters .secondary-button { padding: 8px 12px; }
.fuel-range-summary { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 0; padding: 0; border-top: 1px solid #aeb5bf; border-bottom: 1px solid #aeb5bf; background: #fff; font: 500 12px "Open Sans", Arial, sans-serif; }
.fuel-range-summary > * { min-height: 37px; display: flex; align-items: center; padding: 8px 12px; border-right: 1px solid #aeb5bf; }
.fuel-range-summary > *:last-child { border-right: 0; }
.fuel-report-date { min-width: 190px; justify-content: center; color: #111; font-size: 12px !important; font-weight: 500 !important; }
.fuel-range-summary span { color: #000; font-size: 14px; font-weight: 700; }
.report-metrics { margin-bottom: 18px; }
.export-menu { position: relative; }
.export-toggle { min-width: 150px; }
.export-options { display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; width: 210px; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 16px 38px rgba(16, 34, 62, .18); }
.export-options.open { display: block; }
.export-options button { width: 100%; display: flex; align-items: center; gap: 13px; padding: 12px; border: 0; border-radius: 7px; color: #202735; background: #fff; font-size: 14px; text-align: left; }
.export-options button:hover { color: var(--blue); background: #f1f5ff; }
.export-icon { width: 29px; height: 29px; display: grid; place-items: center; border: 2px solid #78818e; border-radius: 3px; color: #606a77; font-size: 8px; font-weight: 800; }
.export-icon.grid-icon { font-size: 25px; line-height: 1; }
.report-menu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.final-report-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.final-report-title strong { font: 800 16px Manrope, sans-serif; }
.final-report-title span { color: var(--muted); font-size: 9px; }
.report-menu-item { padding: 14px 15px; border: 1px solid #dfe5ed; border-radius: 8px; color: #344258; background: #fff; box-shadow: var(--shadow); font-size: 11px; font-weight: 700; text-align: left; transition: .2s; }
.report-menu-item:hover, .report-menu-item.active { border-color: var(--blue); color: #fff; background: var(--blue); }
.report-view { display: none; }
.report-view.active { display: block; animation: fade .2s ease; }
.report-summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 18px; }
.report-summary-card { padding: 18px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: var(--shadow); }
.report-summary-card span { color: var(--muted); font-size: 9px; }
.report-summary-card strong { display: block; margin-top: 7px; font: 800 20px Manrope, sans-serif; }
.report-detail-panel { padding: 0; overflow: hidden; }
.report-detail-panel .panel-heading { padding: 18px; }
.report-chart { height: 260px; }
.report-toolbar { gap: 20px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.report-toolbar > div:first-child { display: grid; gap: 5px; }
.report-toolbar > div:first-child span { font-size: 11px; }
.report-toolbar-controls { display: flex; align-items: center; gap: 10px; }
.report-export-actions { display: flex; align-items: center; gap: 10px; }
.report-export-actions button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.export-excel-button { background: #fff; border: 1px solid #cfd9ea; color: #14213d; }
.export-button-icon { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 25px; padding: 0 6px; border-radius: 6px; background: rgba(255,255,255,.18); font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.export-button-icon.excel { background: #e4f7ef; color: #008a61; }
.report-toolbar-controls .table-search { min-width: 190px; }
.final-report-menu { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 18px 0 22px; }
.final-report-menu .report-menu-item { min-height: 84px; display: flex; align-items: flex-start; gap: 12px; padding: 16px; border-radius: 12px; }
.final-report-menu .report-menu-item > span:last-child { display: grid; gap: 5px; }
.final-report-menu .report-menu-item strong { font: 800 12px Manrope, sans-serif; }
.final-report-menu .report-menu-item small { color: var(--muted); font-size: 9px; font-weight: 500; line-height: 1.45; }
.final-report-menu .report-menu-item:hover small,
.final-report-menu .report-menu-item.active small { color: #dce8ff; }
.report-menu-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 9px; color: var(--blue); background: #eaf1ff; font: 800 10px Manrope, sans-serif; }
.final-report-menu .report-menu-item:hover .report-menu-icon,
.final-report-menu .report-menu-item.active .report-menu-icon { color: #fff; background: rgba(255, 255, 255, .18); }
.report-summary-grid { grid-template-columns: repeat(4, 1fr); }
.report-detail-panel { margin-bottom: 18px; }
.report-detail-panel table { min-width: 820px; }
.report-detail-panel table tfoot td { padding: 16px 18px; border-top: 2px solid #c1ccdc; background: #eaf0fb; font-weight: 800; }
.report-detail-panel table tfoot td:nth-child(3) { text-align: left; font-variant-numeric: tabular-nums; }
.dispatch-fee-table-panel table th:nth-child(1),
.dispatch-fee-table-panel table td:nth-child(1) { width: 13%; }
.dispatch-fee-table-panel table th:nth-child(2),
.dispatch-fee-table-panel table td:nth-child(2) { width: 72%; }
.dispatch-fee-table-panel table th:nth-child(3),
.dispatch-fee-table-panel table td:nth-child(3) { width: 15%; text-align: right; font-variant-numeric: tabular-nums; }
.dispatch-fee-table-panel table th:nth-child(3) { text-align: center; }
.dispatch-fee-table-panel table tfoot td:nth-child(2) { text-align: center; }
.dispatch-fee-table-panel table tfoot td:nth-child(3) { text-align: right; }
.broker-report-filter-panel { margin-bottom: 18px; }
.broker-report-controls { flex-wrap: wrap; justify-content: flex-end; }
.broker-report-controls .table-search { min-width: 160px; }
.report-preview-content .broker-report-export-sheet {
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}
.report-preview-content .broker-report-export {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 22px 24px !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}
.report-preview-content .broker-report-export .table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}
.report-preview-content .broker-report-export .invoice-print-header {
  margin-bottom: 18px !important;
}
.report-preview-content .broker-report-export .broker-print-period {
  min-height: 42px !important;
  display: grid !important;
  gap: 3px !important;
  align-content: center !important;
  margin: 8px 0 0 !important;
}
.report-preview-content .broker-report-export .broker-print-period span,
.report-preview-content .broker-report-export .broker-print-period strong {
  display: block !important;
  color: #111827 !important;
  font: 12px/1.35 "Courier New", monospace !important;
}
.report-preview-content .broker-pdf-table,
.broker-pdf-table {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
  box-sizing: border-box !important;
}
.report-preview-content .broker-pdf-table th,
.report-preview-content .broker-pdf-table td,
.broker-pdf-table th,
.broker-pdf-table td {
  height: 34px;
  padding: 9px 12px !important;
  border: 1px solid #cbd5e1 !important;
  color: #111827;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  vertical-align: middle;
  box-sizing: border-box !important;
}
.report-preview-content .broker-pdf-table th,
.broker-pdf-table th {
  height: 42px;
  background: #e9edf3 !important;
  font-weight: 800 !important;
  letter-spacing: .02em;
  text-align: center;
  vertical-align: middle;
}
.report-preview-content .broker-pdf-table tbody tr:nth-child(odd) td,
.broker-pdf-table tbody tr:nth-child(odd) td {
  background: #fff !important;
}
.report-preview-content .broker-pdf-table tbody tr:nth-child(even) td,
.broker-pdf-table tbody tr:nth-child(even) td {
  background: #fafafa !important;
}
.report-preview-content .broker-pdf-table .broker-pdf-col-1,
.broker-pdf-table .broker-pdf-col-1 {
  width: 34% !important;
  text-align: left;
}
.report-preview-content .broker-pdf-table .broker-pdf-col-2,
.broker-pdf-table .broker-pdf-col-2 {
  width: 10% !important;
  text-align: center;
}
.report-preview-content .broker-pdf-table .broker-pdf-col-3,
.broker-pdf-table .broker-pdf-col-3 {
  width: 18% !important;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.report-preview-content .broker-pdf-table .broker-pdf-col-4,
.broker-pdf-table .broker-pdf-col-4 {
  width: 18% !important;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.report-preview-content .broker-pdf-table .broker-pdf-col-5,
.broker-pdf-table .broker-pdf-col-5 {
  width: 20% !important;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.report-preview-content .broker-pdf-table tfoot td,
.broker-pdf-table tfoot td {
  background: #f3f4f6 !important;
  border-top: 2px solid #9ca3af !important;
  font-weight: 800 !important;
}
.broker-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.broker-chart-panel { padding: 0; overflow: hidden; }
.broker-chart-panel .panel-heading { padding: 18px; }
.broker-report-bars { padding: 18px 20px 4px; }
.broker-pie-list { display: grid; gap: 12px; padding: 18px 20px; }
.broker-pie-row { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); color: #1f2937; font-size: 11px; font-weight: 700; }
.broker-pie-row:last-child { border-bottom: 0; }
.broker-pie-row span { display: inline-flex; align-items: center; gap: 8px; }
.broker-pie-row i { width: 10px; height: 10px; display: inline-block; border-radius: 999px; }
.status-pill { display: inline-block; min-width: 72px; padding: 7px 12px; border-radius: 999px; text-align: center; font: 700 11px "Open Sans", Arial, sans-serif; }
.status-pill.paid { color: #008b62; background: #e5f7f1; }
.status-pill.unpaid { color: #e67600; background: #fff0e1; }
.status-pill.partial { color: #1767ff; background: #eaf1ff; }
.status-pill.overdue { color: #ef3f4c; background: #ffe8eb; }
.broker-drilldown-panel { padding-bottom: 18px; }
.broker-drilldown-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 0 18px 18px; }
.broker-drilldown-grid > div { padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.broker-drilldown-grid span { display: block; color: var(--muted); font-size: 9px; }
.broker-drilldown-grid strong { display: block; margin-top: 7px; color: #111827; font: 800 16px Manrope, sans-serif; }
.broker-drilldown-grid small { display: block; margin-top: 5px; color: #7a8798; font-size: 10px; }
.broker-nested-panel { margin: 0 18px 18px; border-radius: 9px; box-shadow: none; }
.broker-nested-panel .panel-heading { padding: 14px 16px; }
.report-empty-state { padding: 18px 20px; color: var(--muted); font-size: 11px; }
.invoice-settings-panel { margin-bottom: 18px; }
.invoice-date-source-options { display: flex; flex-wrap: wrap; gap: 14px; color: #344258; font-size: 12px; font-weight: 700; }
.invoice-date-source-options label { display: inline-flex; align-items: center; gap: 7px; }
.fuel-report-table-panel table th:nth-child(1),
.fuel-report-table-panel table th:nth-child(2) { text-align: left; }
.fuel-report-table-panel table th:nth-child(n+3) { text-align: center; }
.fuel-report-table-panel table td { vertical-align: middle; }
.fuel-report-table-panel table td:nth-child(n+3) { text-align: right; font-variant-numeric: tabular-nums; }
.report-empty-state { padding: 32px !important; color: var(--muted) !important; text-align: center !important; }
.broker-list { padding: 19px 0 4px; }
.broker-row { margin-bottom: 18px; }
.broker-row > div:first-child { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 10px; }
.broker-row small { color: var(--muted); }
.progress { height: 6px; overflow: hidden; border-radius: 6px; background: #eef1f5; }
.progress i { height: 100%; display: block; border-radius: 6px; background: var(--blue); }
.statement-panel { margin-top: 18px; }
.statement-filter-card { margin-top: 18px; padding: 18px; border: 1px solid #cfdcf0; border-radius: 14px; background: linear-gradient(135deg, #f7faff 0%, #edf4ff 100%); }
.broker-report-filter-card { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 12px; margin: 0 0 18px; padding: 18px; border: 1px solid #cfdcf0; border-radius: 14px; background: linear-gradient(135deg, #f7faff 0%, #edf4ff 100%); }
.broker-report-filter-card label { display: grid; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 700; }
.broker-report-filter-card input,
.broker-report-filter-card select { min-height: 42px; border: 1px solid #d7e0ee; border-radius: 12px; padding: 0 13px; color: var(--ink); background: #fff; font: 600 12px "Open Sans", Arial, sans-serif; }
@media (max-width: 1000px) {
  .broker-report-filter-card { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
}
@media (max-width: 640px) {
  .broker-report-filter-card { grid-template-columns: 1fr; }
}
.statement-filter-title { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.statement-filter-title > div { display: grid; gap: 3px; }
.statement-filter-title strong { color: var(--ink); font-size: 14px; }
.statement-filter-title small { color: var(--muted); font-size: 10px; }
.statement-filter-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; color: #fff; background: var(--blue); font-weight: 800; }
.statement-filter-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; gap: 12px; align-items: end; }
.statement-filter-grid label { display: grid; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 700; }
.statement-filter-grid select, .statement-filter-grid input { min-height: 44px; border: 1px solid #d7e0ee; border-radius: 9px; padding: 0 13px; color: var(--ink); background: #fff; font: 600 12px "Open Sans", Arial, sans-serif; }
.statement-generate-button { min-height: 44px; white-space: nowrap; }
.statement-calculation-data { display: none !important; }
.statement-form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 20px; }
.statement-advance-editor { grid-column: 1 / -1; padding: 16px; border: 1px solid #d8e1ef; border-radius: 12px; background: #f8faff; }
.statement-advance-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.statement-advance-heading > div { display: grid; gap: 3px; }
.statement-advance-heading strong { color: var(--ink); font-size: 13px; }
.statement-advance-heading span { color: var(--muted); font-size: 10px; }
.statement-advance-fields { display: grid; grid-template-columns: 1fr 1.4fr 1fr auto; gap: 10px; align-items: end; }
.statement-advance-fields .secondary-button { min-height: 42px; white-space: nowrap; }
.statement-advance-list { display: grid; gap: 8px; margin-top: 12px; }
.statement-advance-row { display: grid; grid-template-columns: 140px 1fr 140px auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid #dce4f1; border-radius: 9px; background: #fff; }
.statement-advance-row span { color: var(--muted); font-size: 11px; }
.statement-advance-row strong { color: var(--ink); }
.statement-advance-remove { border: 1px solid #ffc9ce; border-radius: 7px; background: #fff; color: #e83b49; padding: 7px 10px; cursor: pointer; font-weight: 700; }
.statement-advance-empty { color: var(--muted); font-size: 11px; padding: 8px 0; }
.statement-form label input, .statement-form label select { min-height: 42px; }
.statement-form .primary-button { align-self: end; min-height: 42px; }
.statement-result { display: grid; grid-template-columns: repeat(14, minmax(120px, 1fr)); margin-top: 22px; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.statement-result > div { padding: 14px; border-right: 1px solid var(--line); background: #f8fafc; }
.statement-result > div:last-child { border-right: 0; }
.statement-result span, .statement-result strong { display: block; }
.statement-result span { margin-bottom: 6px; color: var(--muted); font-size: 9px; }
.statement-result strong { color: #1e2c43; font: 700 13px "Open Sans", Arial, sans-serif; }
.statement-result .statement-net { background: #122b50; }
.statement-result .statement-net span { color: #9fb0c7; }
.statement-result .statement-net strong { color: #fff; font-size: 16px; }
.statement-net.negative { background: #8c2932; }
.statement-history { margin-top: 18px; }
.statement-history-row { cursor: pointer; }
.statement-history-row:hover td { background: #eaf1ff; }
.negative-money { color: #d74450 !important; }
.ledger-report { width: 100%; margin-top: 18px; padding: 28px 32px; color: #111; background: #fff; font-family: "Courier New", monospace; }
.ledger-header { display: grid; grid-template-columns: 1fr 2fr 1fr; align-items: start; margin-bottom: 28px; }
.ledger-header > div:first-child strong { display: block; font-size: 11px; font-weight: 500; }
.ledger-header > div:nth-child(2) { text-align: center; }
.ledger-header h2 { margin: 0 0 14px; font: 700 22px "Open Sans", Arial, sans-serif; }
.ledger-header h3 { margin: 0 0 3px; font: 600 16px "Open Sans", Arial, sans-serif; }
.ledger-header p { margin: 0; font-size: 12px; }
.ledger-header > strong { text-align: right; font-size: 11px; font-weight: 500; }
.ledger-summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0 0 18px; border: 1px solid #c8d0dc; border-bottom: 0; background: #fff; }
.ledger-summary-grid > div { min-height: 52px; padding: 9px 10px; border-right: 1px solid #c8d0dc; border-bottom: 1px solid #c8d0dc; background: #f8fafc; }
.ledger-summary-grid > div:nth-child(5n) { border-right: 0; }
.ledger-summary-grid span, .ledger-summary-grid strong { display: block; }
.ledger-summary-grid span { margin-bottom: 5px; color: #64748b; font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.ledger-summary-grid strong { color: #111827; font: 700 13px "Open Sans", Arial, sans-serif; }
.ledger-summary-grid .ledger-summary-net { background: #122b50; }
.ledger-summary-grid .ledger-summary-net span { color: #9fb0c7; }
.ledger-summary-grid .ledger-summary-net strong { color: #fff; font-size: 15px; }
.ledger-report .table-wrap { overflow-x: visible; }
.ledger-table { width: 100%; min-width: 0; table-layout: fixed; font-size: 13px; }
.ledger-table th { padding: 9px 10px; border-bottom: 2px solid #222; color: #111; background: #fff; text-align: left; }
.ledger-table td { padding: 8px 10px; border-bottom: 0; color: #111; line-height: 1.45; }
.ledger-table td:nth-child(2) { white-space: nowrap; }
.ledger-table td:nth-child(4), .ledger-table td:nth-child(5), .ledger-table td:nth-child(6),
.ledger-table th:nth-child(4), .ledger-table th:nth-child(5), .ledger-table th:nth-child(6) { text-align: right; }
.ledger-table .ledger-beginning td { padding-top: 10px; }
.ledger-table tfoot td { padding-top: 10px; border-top: 2px solid #222; font-weight: 700; }
.ledger-table tfoot tr:last-child td { border-top: 0; padding-top: 14px; }

.calculator-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; align-items: stretch; }
.calculator-form { padding: 24px; }
.calculator-form form { margin-top: 20px; }
label { display: block; color: #5f6b7e; font-size: 10px; font-weight: 600; }
label input, label select { width: 100%; margin-top: 7px; padding: 11px 12px; border: 1px solid #dfe4eb; border-radius: 7px; outline: 0; color: var(--ink); background: #fbfcfd; }
label input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #eaf1ff; }
input[type="date"] { color-scheme: light; cursor: pointer; }
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .75; }
.combo-input { position: relative; display: block; margin-top: 7px; }
.combo-input input { margin-top: 0; padding-right: 42px; }
.combo-button { width: 38px; position: absolute; top: 1px; right: 1px; bottom: 1px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 0 6px 6px 0; color: #4f5d72; background: transparent; font-size: 10px; line-height: 1; }
.combo-button:hover { color: var(--blue); background: #eef4ff; }
.smart-combo { position: relative; width: 100%; margin-top: 7px; }
.smart-combo-search { width: 100%; min-height: 40px; margin: 0; padding: 11px 42px 11px 12px; border: 1px solid #dfe4eb; border-radius: 7px; outline: 0; color: var(--ink); background: #fbfcfd; font: inherit; line-height: 1.35; }
.smart-combo-search::placeholder { color: #18243a; opacity: 1; }
.smart-combo-search:focus, .smart-combo.open .smart-combo-search { border-color: var(--blue); box-shadow: 0 0 0 3px #eaf1ff; background: #fff; }
.smart-combo-toggle { width: 38px; position: absolute; top: 1px; right: 1px; bottom: 1px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 0 6px 6px 0; color: #233044; background: transparent; font-size: 17px; line-height: 1; }
.smart-combo-toggle:hover { color: var(--blue); background: #eef4ff; }
.smart-combo-menu { position: absolute; z-index: 140; top: calc(100% + 5px); right: 0; left: 0; box-sizing: border-box; display: none; width: 100%; max-height: 296px; overflow-y: auto; padding: 6px; border: 1px solid #cfd8e6; border-radius: 8px; background: #fff; box-shadow: 0 16px 34px rgba(15, 35, 70, .16); }
.smart-combo.open .smart-combo-menu { display: block; }
.smart-combo-option { width: 100%; min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border: 0; border-radius: 6px; color: var(--ink); background: transparent; font-size: 11px; font-weight: 700; text-align: left; cursor: pointer; }
.smart-combo-option span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smart-combo-option small { flex: 0 0 auto; margin-left: auto; color: #7b8799; font-size: 9px; font-weight: 600; text-align: right; white-space: nowrap; }
.smart-combo-option:hover, .smart-combo-option.is-active, .smart-combo-option[aria-selected="true"] { color: #0c4fd8; background: #eef4ff; }
.smart-combo-new { justify-content: flex-start; color: var(--blue); border-top: 1px solid #edf1f7; margin-top: 4px; }
.smart-combo-empty { padding: 10px; color: #7b8799; font-size: 10px; font-weight: 700; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 15px 0; }
.profit-result { padding: 30px; border-radius: 10px; color: #fff; background: linear-gradient(145deg, #122b50, #0b1930); box-shadow: 0 18px 35px rgba(10, 27, 52, .16); }
.profit-result > p { margin: 0 0 8px; color: #8ca0bc; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.profit-result > h2 { margin: 0 0 5px; font: 800 36px Manrope; }
.profit-result > span { color: #52d6a7; font-size: 10px; }
.profit-breakdown { margin: 28px 0 22px; padding: 18px 0; border-top: 1px solid #29405f; border-bottom: 1px solid #29405f; }
.profit-breakdown div { display: flex; justify-content: space-between; margin: 12px 0; color: #9bacc2; font-size: 10px; }
.profit-breakdown strong { color: #fff; }
.per-mile { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.per-mile div { padding: 13px; border-radius: 7px; background: rgba(255,255,255,.06); }
.per-mile small, .per-mile strong { display: block; }.per-mile small { margin-bottom: 5px; color: #8fa1b9; font-size: 8px; }.per-mile strong { font: 700 15px Manrope; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(6, 18, 36, .55); opacity: 0; pointer-events: none; transition: .2s; }
.modal-backdrop:not(.open) { display: none; }
.modal-backdrop.open { display: grid; opacity: 1; pointer-events: auto; }
#payment-date-backdrop.open { z-index: 170; }
#invoice-date-backdrop.open { z-index: 180; }
.modal { width: min(540px, 100%); max-height: 90vh; overflow-y: auto; padding: 25px; border-radius: 12px; background: white; box-shadow: 0 24px 70px rgba(0,0,0,.25); transform: translateY(10px); transition: .2s; }
.modal.payment-modal { max-height: none; overflow-y: visible; }
.modal-backdrop.open .modal { transform: none; }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.modal-heading h2 { margin: 3px 0 0; font: 800 20px Manrope; }
.modal-heading p { margin: 0; }
.modal-heading button { border: 0; color: #8994a4; background: none; font-size: 25px; }
.modal form label { margin-bottom: 14px; }
.payment-load-message { min-height: 13px; margin-top: 5px; color: var(--red); font-size: 9px; font-weight: 700; }
.rate-upload-card { margin: 0 0 18px; padding: 12px; border: 1px solid #d9e5f4; border-radius: 10px; background: linear-gradient(135deg, #f8fbff, #eef5ff); }
.rate-upload-drop { min-height: 118px; display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 14px; padding: 15px; border: 1px dashed #a9bce0; border-radius: 9px; background: #fff; transition: .2s; cursor: pointer; }
.rate-upload-drop:hover, .rate-upload-drop.is-dragging { border-color: var(--blue); background: #f4f8ff; box-shadow: 0 0 0 3px #eaf1ff; }
.rate-upload-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .6px; }
.rate-upload-drop h3 { margin: 0 0 5px; font: 800 15px Manrope, sans-serif; color: var(--ink); }
.rate-upload-drop p { margin: 0 0 8px; color: #69778d; font-size: 11px; }
.rate-upload-file span, .rate-upload-file small { display: block; }
.rate-upload-file span { color: #1f3150; font-size: 11px; font-weight: 800; overflow-wrap: anywhere; }
.rate-upload-file small { margin-top: 2px; color: #8c98aa; font-size: 9px; }
.rate-upload-progress { height: 6px; overflow: hidden; margin-top: 10px; border-radius: 999px; background: #dbe7f7; }
.rate-upload-progress i { width: 0; height: 100%; display: block; border-radius: inherit; background: var(--blue); transition: width .25s ease; }
.rate-upload-status { margin-top: 9px; color: #68768b; font-size: 10px; font-weight: 700; }
.rate-upload-card.is-success .rate-upload-status { color: #008b62; }
.rate-upload-card.is-error .rate-upload-status { color: #e33c4b; }
.rate-upload-card.is-processing .rate-upload-status { color: #1767ff; }
.pdf-extracted-field, .pdf-extracted-field .smart-combo-search { border-color: #76c7a8 !important; background: #f7fffb !important; }
.invoice-date-modal { width: min(420px, 100%); }
.invoice-date-load { margin: -8px 0 20px; color: var(--muted); font-size: 11px; }
.modal-actions { position: relative; z-index: 170; display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); pointer-events: auto; }
.modal-actions button { pointer-events: auto; }
.toast { position: fixed; right: 25px; bottom: 25px; z-index: 120; padding: 12px 18px; border-radius: 7px; color: white; background: var(--green); box-shadow: 0 10px 25px rgba(0,0,0,.15); font-size: 11px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: none; }

@media (max-width: 1050px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .document-stats { grid-template-columns: repeat(2, 1fr); }
  .document-groups { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); transition: .25s; }
  .sidebar.open { transform: none; box-shadow: 15px 0 50px rgba(0,0,0,.2); }
  .main { width: 100%; margin-left: 0; }
  .mobile-menu { display: block; }
  .topbar { padding: 0 18px; }
  .top-user div:not(.avatar), .top-user > span, kbd { display: none; }
  .content { padding: 22px 17px 35px; }
  .page-heading { align-items: flex-start; }
  #loads-page .loads-heading { grid-template-columns: 1fr 1fr; }
  #loads-page .loads-heading > .primary-button { grid-column: 2; grid-row: 1; }
  #load-stats { grid-column: 1 / -1; }
  .metric-grid, .mini-stats { grid-template-columns: 1fr 1fr; }
  .calculator-layout { grid-template-columns: 1fr; }
  .report-menu { grid-template-columns: 1fr 1fr; }
  .report-summary-grid { grid-template-columns: 1fr; }
  .final-report-menu { grid-template-columns: 1fr 1fr; }
  .report-toolbar { align-items: stretch; flex-direction: column; }
  .report-toolbar-controls { width: 100%; }
  .report-toolbar-controls .table-search { width: 100%; min-width: 0; }
  .broker-chart-grid { grid-template-columns: 1fr; }
  .broker-drilldown-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fuel-heading { align-items: flex-start; flex-direction: column; }
  .fuel-filters { width: 100%; flex-wrap: wrap; }
  .fuel-range-summary { grid-template-columns: 1fr; }
  .fuel-range-summary > * { border-right: 0; border-bottom: 1px solid #aeb5bf; }
  .statement-form { grid-template-columns: 1fr 1fr; }
  .statement-filter-grid { grid-template-columns: 1fr 1fr; }
  .statement-advance-fields { grid-template-columns: 1fr 1fr; }
  .statement-advance-row { grid-template-columns: 1fr 1fr; }
  .statement-result { grid-template-columns: 1fr 1fr; }
  .final-report-menu { grid-template-columns: 1fr; }
  .report-toolbar-controls { flex-direction: column; }
  .broker-drilldown-grid { grid-template-columns: 1fr; }
  .report-export-actions { width: 100%; }
  .report-export-actions button { flex: 1; }
  .document-groups { grid-template-columns: 1fr 1fr; }
  .document-table-tools { align-items: stretch; flex-direction: column; }
}
@media (max-width: 500px) {
  .login-card { padding: 31px 24px 26px; }
  .login-screen { background-position: 63% center; }
  .metric-grid, .mini-stats, .form-row { grid-template-columns: 1fr; }
  .statement-advance-fields, .statement-advance-row { grid-template-columns: 1fr; }
  .statement-filter-grid { grid-template-columns: 1fr; }
  .page-heading { flex-direction: column; }
  #loads-page .loads-heading { display: flex; }
  #load-stats { order: 2; }
  #loads-page .loads-heading > .primary-button { order: 3; }
  .page-heading .primary-button { width: 100%; }
  .search { width: 60%; }
  .top-actions { gap: 5px; }
  .donut-wrap { flex-direction: column; padding-top: 25px; }
  .document-stats, .document-groups, .document-form-row { grid-template-columns: 1fr; }
  .rate-upload-drop { grid-template-columns: 1fr; }
  .rate-upload-drop .secondary-button { width: 100%; }
}
@media print {
  @page { size: landscape; margin: 8mm; }
  .sidebar, .topbar, button { display: none !important; }
  .main { width: 100%; margin: 0; }
  .page { display: none !important; }
  #reports-page { display: block !important; }
  body.print-active-report,
  body.print-active-report .app-shell,
  body.print-active-report .main,
  body.print-active-report .content {
    min-height: 0 !important;
    overflow: visible !important;
    background: #fff !important;
  }
  body.print-active-report #reports-page > .page-heading,
  body.print-active-report #reports-page > .report-metrics,
  body.print-active-report #reports-page > .report-toolbar,
  body.print-active-report #reports-page > .report-menu {
    display: none !important;
  }
  body.print-active-report #reports-page > .report-view {
    display: none !important;
  }
  body.print-active-report #reports-page > .report-view.active {
    display: block !important;
  }
  body.print-active-report .main,
  body.print-active-report .content {
    margin: 0 !important;
    padding: 0 !important;
  }
  body.print-active-report .report-summary-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
  }
  body.print-active-report .report-summary-card,
  body.print-active-report .report-detail-panel {
    break-inside: avoid;
    box-shadow: none !important;
  }
  body.print-active-report .table-wrap {
    overflow: visible !important;
  }
  body.print-active-report table {
    min-width: 0 !important;
    width: 100% !important;
    font-size: 9px !important;
  }
  body.print-driver-statement,
  body.print-driver-statement .app-shell,
  body.print-driver-statement .main,
  body.print-driver-statement .content {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }
  body.print-driver-statement #reports-page > * { display: none !important; }
  body.print-driver-statement #driver-report {
    display: block !important;
    margin: 0 !important;
  }
  body.print-driver-statement #driver-report > * { display: none !important; }
  body.print-driver-statement #ledger-report {
    display: block !important;
    margin: 0 !important;
    padding: 12mm !important;
    border: 0 !important;
    box-shadow: none !important;
    width: 100% !important;
  }
  body.print-driver-statement #ledger-report .table-wrap {
    overflow: visible !important;
  }
  body.print-driver-statement #ledger-report table {
    width: 100% !important;
    min-width: 0 !important;
  }
  body.print-driver-statement #ledger-report th,
  body.print-driver-statement #ledger-report td {
    padding: 8px 10px !important;
    font-size: 13px !important;
    white-space: normal !important;
  }
  body.print-driver-statement .ledger-header {
    margin-bottom: 20px !important;
  }
  body.print-invoice-report-only * {
    visibility: hidden !important;
  }
  body.print-invoice-report-only,
  body.print-invoice-report-only .app-shell,
  body.print-invoice-report-only .main,
  body.print-invoice-report-only .content {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    overflow: visible !important;
    background: #fff !important;
  }
  body.print-invoice-report-only #invoice-report-print-root,
  body.print-invoice-report-only #invoice-report-print-root * {
    visibility: visible !important;
  }
  body.print-invoice-report-only #invoice-report-print-root {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background: #fff !important;
  }
  body.print-invoice-report-only .invoice-print-document {
    width: 100% !important;
    max-width: none !important;
    margin: 0 auto !important;
    padding: 28px 32px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    color: #111 !important;
    background: #fff !important;
    box-shadow: none !important;
    font-family: "Courier New", monospace !important;
  }
  body.print-invoice-report-only .invoice-print-header {
    display: grid !important;
    grid-template-columns: 1fr 2fr 1fr !important;
    gap: 16px !important;
    align-items: flex-start !important;
    margin-bottom: 20px !important;
    padding-bottom: 16px !important;
    border-bottom: 2px solid #17345f !important;
    font-family: "Courier New", monospace !important;
  }
  body.print-invoice-report-only .invoice-print-title {
    text-align: center !important;
    font-family: "Courier New", monospace !important;
  }
  body.print-invoice-report-only .invoice-print-title h1,
  body.print-invoice-report-only .invoice-print-title h2 {
    margin: 0 !important;
    color: #111827 !important;
    text-align: center !important;
  }
  body.print-invoice-report-only .invoice-print-title h1 {
    font-size: 24px !important;
    font-weight: 800 !important;
    letter-spacing: .03em !important;
    line-height: 1.2 !important;
  }
  body.print-invoice-report-only .invoice-print-title h2 {
    margin-top: 7px !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
  }
  body.print-invoice-report-only .invoice-print-title p {
    min-height: 54px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 7px 0 0 !important;
    color: #111827 !important;
    font: 12px/1.5 "Courier New", monospace !important;
    text-align: center !important;
  }
  body.print-invoice-report-only .invoice-print-page {
    text-align: right !important;
    color: #111827 !important;
    font: 12px "Courier New", monospace !important;
  }
  body.print-invoice-report-only .invoice-print-table {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    color: #111827 !important;
    background: #fff !important;
    font-family: Arial, sans-serif !important;
    font-size: 13px !important;
  }
  body.print-invoice-report-only .invoice-print-table thead { display: table-header-group !important; }
  body.print-invoice-report-only .invoice-print-table tfoot { display: table-footer-group !important; }
  body.print-invoice-report-only .invoice-print-table tr {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
  body.print-invoice-report-only .invoice-print-table th,
  body.print-invoice-report-only .invoice-print-table td {
    padding: 9px 10px !important;
    border: 1px solid #cbd5e1 !important;
    vertical-align: top !important;
    white-space: normal !important;
  }
  body.print-invoice-report-only .invoice-print-table th {
    background: #eaf0fb !important;
    color: #111 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    letter-spacing: .03em !important;
    text-align: center !important;
  }
  body.print-invoice-report-only .invoice-print-table td {
    color: #111 !important;
    background: #fff !important;
  }
  body.print-invoice-report-only .invoice-print-table tbody tr:nth-child(even) td { background: #f1f1f1 !important; }
  body.print-invoice-report-only .invoice-print-table tbody tr:nth-child(odd) td { background: #fff !important; }
  body.print-invoice-report-only .invoice-print-table th:nth-child(1),
  body.print-invoice-report-only .invoice-print-table td:nth-child(1) { width: 13% !important; }
  body.print-invoice-report-only .invoice-print-table th:nth-child(2),
  body.print-invoice-report-only .invoice-print-table td:nth-child(2) { width: 72% !important; }
  body.print-invoice-report-only .invoice-print-table th:nth-child(3),
  body.print-invoice-report-only .invoice-print-table td:nth-child(3) {
    width: 15% !important;
    font-variant-numeric: tabular-nums !important;
  }
  body.print-invoice-report-only .invoice-print-table td:nth-child(3) { text-align: right !important; }
  body.print-invoice-report-only .invoice-print-table tbody td:nth-child(2) { text-align: left !important; }
  body.print-invoice-report-only .invoice-print-table .invoice-report-description {
    color: #111 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: normal !important;
    vertical-align: top !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }
  body.print-invoice-report-only .invoice-print-table .report-arrow-separator {
    white-space: nowrap !important;
  }
  body.print-invoice-report-only .invoice-print-table tbody td:nth-child(3) {
    font-weight: 800 !important;
  }
  body.print-invoice-report-only .invoice-print-table tfoot td {
    padding-top: 11px !important;
    padding-bottom: 11px !important;
    border: 1px solid #cbd5e1 !important;
    border-top: 2px solid #8793a6 !important;
    background: #eaf0fb !important;
    color: #111 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
  }
  body.print-invoice-report-only .invoice-print-table tfoot td:nth-child(2) { text-align: center !important; }
  body.print-invoice-report-only .invoice-print-table tfoot td:nth-child(3) {
    text-align: right !important;
    font-size: 13px !important;
    font-variant-numeric: tabular-nums !important;
  }
  body.print-invoice-report-only .invoice-report,
  body.print-invoice-report-only .invoice-report * {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 12px !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    font-weight: 400 !important;
    opacity: 1 !important;
  }
  body.print-invoice-report-only .invoice-report .invoice-print-title h1 {
    font-size: 24px !important;
    font-weight: 700 !important;
  }
  body.print-invoice-report-only .invoice-report .invoice-print-title h2 {
    font-size: 18px !important;
    font-weight: 700 !important;
  }
  body.print-invoice-report-only .invoice-report .invoice-print-table th {
    font-size: 12px !important;
    font-weight: 700 !important;
  }
  body.print-invoice-report-only .invoice-report .invoice-print-table td {
    font-size: 12px !important;
    font-weight: 400 !important;
  }
  body.print-invoice-report-only .invoice-report .invoice-print-table tfoot td,
  body.print-invoice-report-only .invoice-report .invoice-print-table tfoot strong {
    font-size: 12px !important;
    font-weight: 700 !important;
  }
}
