:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-2: #eef3f4;
  --line: #d9e1e4;
  --line-strong: #b9c6cb;
  --text: #182125;
  --muted: #66757c;
  --quiet: #87949a;
  --ink-soft: #2f3b40;
  --teal: #17766f;
  --teal-weak: #dff1ee;
  --green: #248347;
  --green-weak: #e3f4e7;
  --amber: #a46611;
  --amber-weak: #fff0d2;
  --red: #b64242;
  --red-weak: #fbe3e1;
  --violet: #6457a6;
  --violet-weak: #ebe7ff;
  --shadow: 0 12px 28px rgba(25, 37, 43, 0.08);
  --radius: 8px;
  --sidebar: 264px;
}

.ruptela-panel { margin-bottom: 18px; }
.ruptela-connection-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 18px; }
.ruptela-sync-card { display: grid; gap: 10px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.ruptela-sync-card > span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.ruptela-sync-card .actions-row { flex-wrap: wrap; gap: 8px; }
.ruptela-sync-card > .action-form-error { color: var(--red); }
.ruptela-cooldown:empty { display: none; }
.ruptela-feedback { padding: 11px 14px; border-radius: 6px; background: var(--teal-weak); color: var(--teal); font-size: 13px; line-height: 1.6; }
.ruptela-objects-heading { display: flex; align-items: start; justify-content: space-between; gap: 24px; padding-top: 22px; margin-top: 18px; border-top: 1px solid var(--line); }
.ruptela-objects-heading h3 { margin: 0 0 8px; font-size: 15px; }
.ruptela-objects-heading > span { flex-shrink: 0; font-size: 12px; color: var(--muted); }
.ruptela-objects-table { min-width: 800px; width: 100%; }
.ruptela-objects-table .action-field { margin: 0; }
.ruptela-objects-table .ruptela-field-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.ruptela-objects-table select { min-width: 160px; }
.ruptela-objects-table .cell-note { margin-top: 5px; }
@media (max-width: 800px) {
  .ruptela-connection-grid { grid-template-columns: minmax(0, 1fr); }
  .ruptela-objects-heading { flex-direction: column; gap: 8px; }
}

/* B4S route forecasts use the same document and circle sources as BES. */
.b4s-screen { display: grid; gap: 18px; }
.b4s-screen .screen-head { margin-bottom: 0; }
.b4s-simple-screen { max-width: 1180px; margin: 0 auto; }
.b4s-simple-form-panel { padding: 24px !important; }
.b4s-simple-form-panel fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.b4s-simple-places { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.b4s-simple-places--three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.b4s-simple-place { min-width: 0; }
.b4s-simple-place .action-field > span { font-size: 12px; text-transform: none; letter-spacing: 0; }
.b4s-simple-place input { width: 100%; font-size: 16px; padding: 14px; min-height: 51px; }
.b4s-simple-resolved { display: block; color: var(--teal); font-size: 11px; line-height: 1.5; margin: 7px 0 0; }
.b4s-simple-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 20px 0 12px; }
.b4s-simple-actions .primary-action { min-width: 190px; min-height: 44px; }
.b4s-simple-advanced { margin-top: 18px; }
.b4s-simple-advanced > summary { color: var(--muted); }
.b4s-simple-advanced .action-form-grid { margin-top: 16px; }
.b4s-simple-advanced .action-field { min-width: 0; }
.b4s-simple-advanced .action-field small { font-size: 11px; color: var(--muted); }
.b4s-simple-advanced .b4s-registration-profile { max-width: 720px; }
.b4s-simple-result { padding: 26px !important; min-width: 0; }
.b4s-simple-result-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.b4s-simple-result-head h2 { margin: 8px 0; font-size: clamp(30px,4vw,43px); letter-spacing: -.04em; color: var(--teal); }
.b4s-simple-result-head p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.b4s-simple-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; margin: 22px 0 15px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.b4s-simple-metrics > div { display: grid; gap: 7px; }
.b4s-simple-metrics span { font-size: 11px; color: var(--muted); }
.b4s-simple-metrics strong { font-size: 23px; }
.b4s-simple-result-body { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24px; align-items: start; margin-top: 22px; }
.b4s-simple-result-body > div { min-width: 0; }
.b4s-simple-result-body .table-wrap { min-width: 0; max-width: 100%; overflow-x: auto; }
.b4s-simple-result-body .table-wrap table { width: 100%; min-width: 0; table-layout: fixed; }
.b4s-simple-result-body table th:last-child, .b4s-simple-result-body table td:last-child { width: 120px; white-space: nowrap; }
.b4s-simple-result-body table td:first-child { white-space: normal; overflow-wrap: anywhere; }
.b4s-simple-result-body .cell-note { margin-top: 3px; font-size: 11px; }
.b4s-simple-map { min-height: 310px; height: 310px; width: 100%; position: relative; z-index: 0; background: var(--surface-2); border: 1px solid var(--line); }
.b4s-simple-stale .b4s-simple-result-head, .b4s-simple-stale .b4s-simple-metrics, .b4s-simple-stale .b4s-simple-result-body { opacity: .5; }
.b4s-simple-save { display: flex; justify-content: space-between; gap: 14px; align-items: center; flex-wrap: wrap; padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line); }
.b4s-simple-save > span { font-size: 12px; color: var(--muted); }
.b4s-simple-history > summary { cursor: pointer; font-size: 13px; font-weight: 700; }
.b4s-simple-history .table-wrap { margin-top: 16px; }
@media (max-width: 800px) {
  .b4s-simple-places--three { grid-template-columns: minmax(0,1fr); }
  .b4s-simple-result-body { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 600px) {
  .b4s-simple-places { grid-template-columns: minmax(0,1fr); }
  .b4s-simple-form-panel, .b4s-simple-result { padding: 18px !important; }
  .b4s-simple-result-head { flex-wrap: wrap; }
  .b4s-simple-metrics { gap: 9px; }
  .b4s-simple-metrics strong { font-size: 20px; }
  .b4s-simple-actions .primary-action { width: 100%; }
  .b4s-simple-map { height: 270px; min-height: 270px; }
}
.b4s-heading-actions, .b4s-form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.b4s-workspace { display: grid; grid-template-columns: minmax(360px, 0.93fr) minmax(420px, 1.2fr); gap: 18px; align-items: start; }
.b4s-form-panel, .b4s-result-panel, .b4s-start-panel, .b4s-comparison, .b4s-history, .b4s-saved { min-width: 0; }
.b4s-result-stack { display: grid; gap: 18px; min-width: 0; }
.b4s-form-panel fieldset { display: grid; gap: 12px; border: 0; padding: 0; margin: 0; min-width: 0; }
.b4s-form-panel fieldset:disabled { opacity: 0.78; }
.b4s-help { margin: 8px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.b4s-form-panel .action-field small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.b4s-form-panel .action-field > span { font-size: 10px; letter-spacing: 0.025em; }
.b4s-form-panel .action-field { align-content: start; }
.b4s-form-panel .action-field input, .b4s-form-panel .action-field select { min-width: 0; }
.b4s-form-heading { margin: 18px 0 10px; font-size: 14px; }
.b4s-form-panel .b4s-form-heading { margin-bottom: 0; }
.b4s-form-panel .b4s-help { margin: 0 0 4px; }
.b4s-form-panel > .b4s-help { margin: 0 0 18px; }
.b4s-form-actions { margin-top: 8px; padding-top: 15px; border-top: 1px solid var(--line); }
.b4s-total-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.b4s-total { display: grid; gap: 7px; padding: 15px; border: 1px solid var(--line); background: var(--surface-2); }
.b4s-total > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.b4s-total > strong { font-size: clamp(20px, 2.2vw, 28px); line-height: 1.1; letter-spacing: -0.035em; overflow-wrap: anywhere; }
.b4s-total > small { font-size: 11px; line-height: 1.5; color: var(--muted); }
.b4s-total--main { grid-column: 1 / -1; background: var(--teal-weak); border-left: 4px solid var(--teal); }
.b4s-total--main > strong { font-size: clamp(28px, 3vw, 40px); }
.b4s-range { display: grid; gap: 6px; padding: 12px 0; margin-bottom: 12px; border-top: 1px solid var(--line); }
.b4s-range > span { color: var(--muted); font-size: 11px; }
.b4s-range > strong { font-size: 18px; }
.b4s-range > small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.b4s-lines { margin-top: 18px; }
.b4s-lines td:first-child { white-space: normal; }
.b4s-lines td:last-child { vertical-align: top; }
.b4s-lines .cell-note { line-height: 1.45; margin-top: 5px; }
.b4s-scenarios { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.b4s-scenario { display: grid; align-content: start; gap: 8px; border: 1px solid var(--line); padding: 14px; background: var(--surface-2); }
.b4s-scenario h4 { margin: 0; font-size: 12px; line-height: 1.4; }
.b4s-scenario > strong { font-size: 21px; }
.b4s-scenario > small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.b4s-scenario > div { font-size: 11px; line-height: 1.5; }
.b4s-details { margin-top: 15px; border-top: 1px solid var(--line); padding-top: 13px; }
.b4s-details summary { cursor: pointer; font-size: 12px; font-weight: 700; line-height: 1.5; }
.b4s-details ul, .b4s-details p, .b4s-notes { margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.b4s-details .table-wrap, .b4s-details form { margin-top: 14px; }
.b4s-details table td { max-width: 320px; }
.b4s-checkbox { display: flex; gap: 9px; align-items: flex-start; font-size: 12px; line-height: 1.5; }
.b4s-checkbox input { margin-top: 3px; }
.b4s-comparison .num { white-space: normal; }
.b4s-comparison > .estimate-preview { margin-bottom: 12px; }
.b4s-explanations > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 12px; border-bottom: 1px solid var(--line); }
.b4s-explanations strong { white-space: nowrap; }
.b4s-start-panel { padding: 28px !important; }
.b4s-start-panel h2 { font-size: clamp(24px, 2.5vw, 33px); line-height: 1.2; letter-spacing: -0.04em; margin: 12px 0; }
.b4s-start-panel > p { font-size: 13px; line-height: 1.7; color: var(--muted); }
.b4s-start-steps { display: grid; gap: 23px; margin: 30px 0; }
.b4s-start-steps > div { display: flex; gap: 15px; align-items: center; }
.b4s-start-steps strong { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; background: var(--teal-weak); color: var(--teal); font-size: 12px; }
.b4s-start-steps span { font-size: 13px; font-weight: 700; line-height: 1.65; }
.b4s-start-steps small { font-weight: 400; color: var(--muted); font-size: 11px; }
.b4s-empty-saved { padding: 18px 0 8px; font-size: 13px; }
.b4s-empty-saved p { margin-bottom: 0; color: var(--muted); line-height: 1.6; }
.b4s-record-button { border: 0; background: none; padding: 0; color: var(--teal); font-weight: 700; text-align: left; }
.b4s-record-button:hover { text-decoration: underline; }
.b4s-selected-row { background: var(--teal-weak); }
.b4s-result-stale .b4s-total-grid, .b4s-result-stale .b4s-scenarios { opacity: 0.6; }
.b4s-screen button:disabled { cursor: default; opacity: 0.5; }
.b4s-map-panel { min-width: 0; }
[data-b4s-route-status][hidden] { display: none; }
.b4s-map-attribution { color: var(--muted); font-size: 10px; line-height: 1.4; }
.b4s-map-workspace { display: grid; grid-template-columns: minmax(310px,.86fr) minmax(370px,1.2fr); gap: 22px; align-items: start; }
.b4s-map-workspace > div { min-width: 0; }
.b4s-route-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; min-width: 0; }
.b4s-route-form .action-field { min-width: 0; align-content: start; }
.b4s-route-form .action-field input { min-width: 0; }
.b4s-registration-profile { margin: 16px 0 20px; padding: 14px; border: 1px solid var(--line-strong); background: var(--surface-2); display: grid; gap: 12px; min-width: 0; }
.b4s-registration-profile > .b4s-help { margin: 0; }
.b4s-registration-heading { display: grid; gap: 4px; }
.b4s-registration-heading > strong { font-size: 13px; }
.b4s-registration-heading > span { font-size: 11px; color: var(--muted); }
.b4s-registration-card { min-width: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.b4s-registration-card dl { margin: 10px 0; }
.b4s-registration-card dl > div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: start; font-size: 11px; line-height: 1.5; }
.b4s-registration-card dt { color: var(--muted); }
.b4s-registration-card dt > span { color: var(--text); font-weight: 700; display: block; }
.b4s-registration-card dd { margin: 0; color: var(--text); font-weight: 700; text-align: right; white-space: nowrap; }
.b4s-registration-source { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.b4s-registration-missing { margin: 0; border-left: 3px solid var(--amber); background: var(--amber-weak); padding: 10px; font-size: 12px; line-height: 1.5; }
.b4s-registration-proposal { border-top: 1px solid var(--line); padding-top: 6px; }
.b4s-registration-applied { margin: 10px 0 0; font-size: 11px; line-height: 1.5; color: var(--teal); }
.b4s-map-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.b4s-map-points { display: grid; gap: 12px; }
.b4s-map-point { display: grid; grid-template-columns: 24px minmax(0,1fr) 24px; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.b4s-point-number { display: grid; place-items: center; width: 24px; height: 24px; background: var(--teal-weak); color: var(--teal); font-size: 11px; font-weight: 800; margin-top: 21px; border-radius: 50%; }
.b4s-point-fields { display: grid; gap: 8px; min-width: 0; }
.b4s-geocode-search { justify-self: start; }
.b4s-geocode-results:empty { display: none; }
.b4s-geocode-results { min-width: 0; }
.b4s-geocode-results .b4s-help { margin: 3px 0 7px; }
.b4s-geocode-error { margin: 3px 0; color: var(--red, #b33b37); font-size: 12px; line-height: 1.5; }
.b4s-geocode-list { display: grid; gap: 5px; list-style: none; margin: 0; padding: 0; max-height: 310px; overflow: auto; }
.b4s-geocode-list button { display: grid; width: 100%; gap: 4px; border: 1px solid var(--line); border-radius: 7px; padding: 10px; text-align: left; background: var(--surface); color: var(--text); cursor: pointer; overflow-wrap: anywhere; }
.b4s-geocode-list button:hover, .b4s-geocode-list button:focus-visible { border-color: var(--teal); background: var(--teal-weak); }
.b4s-geocode-list strong { font-size: 12px; }
.b4s-geocode-list span, .b4s-geocode-list small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.b4s-coordinate-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.b4s-point-remove { border: 0; background: transparent; color: var(--muted); font-size: 22px; margin-top: 17px; padding: 0; }
.b4s-route-map { position: relative; z-index: 0; width: 100%; min-height: 390px; height: 390px; border: 1px solid var(--line-strong); background: #e8ece8; }
.b4s-map-marker { background: transparent; border: 0; }
.b4s-map-marker > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #24628f; border: 2px solid white; color: white; font-size: 12px; font-weight: 800; box-shadow: 0 1px 6px #0006; }
.b4s-map-message { position: absolute; z-index: 500; bottom: 30px; left: 12px; right: 12px; padding: 9px; background: var(--surface); font-size: 12px; }
.b4s-map-legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0; font-size: 11px; color: var(--muted); }
.b4s-map-legend span { display: flex; align-items: center; gap: 6px; }
.b4s-map-legend i { display: inline-block; width: 20px; height: 4px; background: #2867a4; }
.b4s-map-legend .b4s-legend-point { width: 10px; height: 10px; border-radius: 50%; }
.b4s-map-legend .b4s-legend-toll { background: #b77119; }
.b4s-route-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.b4s-route-summary > div { display: grid; gap: 8px; border: 1px solid var(--line); background: var(--surface-2); padding: 12px; }
.b4s-route-summary > div:last-child { grid-column: 1 / -1; }
.b4s-route-summary span { font-size: 11px; color: var(--muted); }
.b4s-route-summary strong { font-size: 21px; }
.b4s-route-summary--stale { opacity: .5; }
.b4s-road-quote-field { border: 1px solid var(--line); padding: 10px; background: var(--teal-weak); }
.b4s-road-quote-field strong { font-size: 17px; }
.b4s-country-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 16px; }
.b4s-country-grid article { border: 1px solid var(--line); background: var(--surface-2); padding: 15px; min-width: 0; }
.b4s-country-code { color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.b4s-country-grid h3 { margin: 5px 0 9px; font-size: 16px; }
.b4s-country-grid strong { font-size: 12px; }
.b4s-country-grid p { margin: 8px 0; font-size: 12px; line-height: 1.55; color: var(--muted); }
.b4s-country-grid article > div { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; }
.b4s-country-grid small { display: block; margin-top: 10px; font-size: 10px; color: var(--muted); }
.b4s-toll-choices { display: grid; gap: 8px; margin-top: 8px; }
.b4s-toll-choices > div { display: grid; gap: 3px; padding: 6px 0; font-size: 11px; border-top: 1px solid var(--line); }
.b4s-toll-choices small { color: var(--muted); }
.b4s-map-legend .b4s-legend-toll-approx { height: 0; background: transparent; border-top: 4px dashed #b77119; }
.b4s-road-budget { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 6px; display: grid; gap: 12px; }
.b4s-road-mode { display: flex; flex-wrap: wrap; gap: 10px; }
.b4s-road-mode label { display: flex; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid var(--line-strong); background: var(--surface-2); font-size: 12px; cursor: pointer; }
.b4s-road-mode input { margin: 0; }
.b4s-road-items { display: grid; gap: 12px; }
.b4s-road-item { padding: 13px; border: 1px solid var(--line); background: var(--surface-2); min-width: 0; }
.b4s-road-item-header { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.25fr) 18px; gap: 8px; margin-bottom: 12px; align-items: start; }
.b4s-road-item .action-field { min-width: 0; }
.b4s-road-item .action-field > span { font-size: 9px; }
.b4s-road-item-header .b4s-point-remove { margin-top: 20px; }
.b4s-road-line-total { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; margin-top: 12px; font-size: 11px; }
.b4s-road-line-total span { color: var(--muted); }
.b4s-road-line-total strong { white-space: nowrap; font-size: 13px; }
.b4s-budget-recheck { margin: 0; padding: 10px; color: var(--amber); background: var(--amber-weak); border-left: 3px solid var(--amber); font-size: 12px; line-height: 1.5; }
.b4s-budget-recheck[hidden] { display: none; }
@media (max-width: 650px) {
  .b4s-road-item { padding: 10px; }
  .b4s-road-item-header { grid-template-columns: minmax(0,1fr) 20px; }
  .b4s-road-item-header .action-field:nth-child(2) { grid-column: 1; }
  .b4s-road-item-header .b4s-point-remove { grid-column: 2; grid-row: 1; }
}
@media (max-width: 1180px) {
  .b4s-map-workspace { grid-template-columns: 1fr; }
  .b4s-country-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 650px) {
  .b4s-country-grid { grid-template-columns: 1fr; }
  .b4s-route-map { height: 300px; min-height: 300px; }
  .b4s-map-point { gap: 5px; grid-template-columns: 21px minmax(0,1fr) 20px; }
}
@media (max-width: 1180px) {
  .b4s-workspace { grid-template-columns: minmax(0, 1fr); }
  .b4s-start-panel { min-height: 0; }
  .b4s-start-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .b4s-total-grid, .b4s-scenarios, .b4s-start-steps { grid-template-columns: minmax(0, 1fr); }
  .b4s-heading-actions { width: 100%; }
  .b4s-form-panel .action-form-grid { grid-template-columns: minmax(0, 1fr); }
  .b4s-start-panel { padding: 18px !important; }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 18px 14px;
  background: #172226;
  color: #f3f7f8;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  color: #0d201e;
  background: #8be0d5;
  font-size: 13px;
  font-weight: 800;
}

.brand-name {
  font-size: 15px;
  font-weight: 800;
}

.brand-subtitle,
.sidebar-footer span {
  display: block;
  color: #9daeb4;
  font-size: 12px;
  line-height: 1.4;
}

.nav {
  display: grid;
  gap: 4px;
  margin-top: 16px;
}

.nav-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--radius);
  color: #d6e1e5;
  background: transparent;
  text-align: left;
}

.nav-button:hover,
.nav-button.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-glyph {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 6px;
  color: #162124;
  background: #e4edef;
  font-size: 12px;
  font-weight: 800;
}

.nav-button.active .nav-glyph {
  background: #8be0d5;
}

.nav-count {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 99px;
  color: #172226;
  background: #dce8eb;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.sidebar-footer {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  margin-top: auto;
  padding: 12px 8px 2px;
  color: #dce8eb;
  font-size: 13px;
}

.sync-dot {
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 99px;
  background: #54d979;
  box-shadow: 0 0 0 4px rgba(84, 217, 121, 0.13);
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 247, 248, 0.94);
  backdrop-filter: blur(12px);
}

.search-wrap {
  position: relative;
  flex: 1;
  max-width: 720px;
}

.search-wrap input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  outline: none;
}

.search-wrap input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(23, 118, 111, 0.13);
}

.search-icon,
.refresh-icon,
.chevron-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
}

.search-icon {
  position: absolute;
  top: 13px;
  left: 14px;
  border-radius: 99px;
  color: var(--quiet);
}

.search-icon::after {
  position: absolute;
  right: -6px;
  bottom: -5px;
  width: 7px;
  height: 2px;
  background: currentColor;
  content: "";
  transform: rotate(45deg);
}

.refresh-icon {
  border-top-color: transparent;
  border-radius: 99px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.primary-action,
.secondary-action,
.ghost-action,
.danger-action {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--ink-soft);
  background: var(--surface);
  border-color: var(--line);
}

.primary-action {
  padding: 0 14px;
  color: #ffffff;
  background: var(--teal);
}

.secondary-action {
  padding: 0 12px;
  color: var(--teal);
  background: var(--teal-weak);
  border-color: #bfe2dd;
}

.ghost-action {
  padding: 0 12px;
  color: var(--ink-soft);
  background: var(--surface);
  border-color: var(--line);
}

.danger-action {
  padding: 0 12px;
  color: var(--red);
  background: var(--red-weak);
  border-color: #f1c0bc;
}

.content {
  padding: 24px;
}

.screen-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.screen-eyebrow {
  margin-bottom: 4px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.screen-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.12;
}

.screen-subtitle {
  max-width: 780px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

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

.toolbar-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 12px;
}

.compact-select {
  display: grid;
  gap: 4px;
  min-width: 160px;
}

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

.compact-select select {
  min-height: 38px;
  padding: 0 32px 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
}

.trip-sort-select {
  min-width: 175px;
}

.registry-sort-controls {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  gap: 7px;
}

.registry-sort-select {
  min-width: 180px;
}

.fleet-sort-toolbar,
.review-sort-toolbar,
.payments-registry-toolbar {
  justify-content: flex-end;
}

.sort-direction-button {
  flex: 0 0 40px;
  font-size: 20px;
  line-height: 1;
}

.filter-summary {
  min-width: 150px;
  padding-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.filter-summary strong {
  color: var(--text);
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.segment {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.segment.active {
  color: #ffffff;
  background: var(--ink-soft);
}

.grid-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 12px;
}

.kpi-card,
.panel,
.table-panel,
.detail-pane,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.kpi-card {
  min-height: 112px;
  padding: 14px;
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

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

.kpi-value {
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
}

.kpi-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.status-pill,
.risk-pill,
.confidence-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.status-pill.ok,
.confidence-pill.high {
  color: var(--green);
  background: var(--green-weak);
}

.status-pill.wait,
.confidence-pill.medium {
  color: var(--amber);
  background: var(--amber-weak);
}

.status-pill.bad,
.confidence-pill.low {
  color: var(--red);
  background: var(--red-weak);
}

.status-pill.info {
  color: var(--violet);
  background: var(--violet-weak);
}

.risk-pill {
  color: var(--ink-soft);
  background: var(--surface-2);
}

.layout-two {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: 14px;
  margin-top: 14px;
}

.layout-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.panel {
  padding: 16px;
}

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

.panel-title h2,
.panel-title h3 {
  margin: 0;
  font-size: 16px;
}

.panel-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.table-panel {
  overflow: hidden;
}

.table-scroll {
  overflow: auto;
  max-height: 620px;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
}

thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #edf3f4;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

tbody tr {
  transition: background 120ms ease;
}

tbody tr:hover {
  background: #f4f8f8;
}

tbody tr.selected {
  background: var(--teal-weak);
}

[data-db-circle-id],
[data-db-job-id] {
  cursor: pointer;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--muted);
}

.strong {
  font-weight: 900;
}

.truncate {
  overflow: hidden;
  max-width: 300px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.list-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.list-row:last-child {
  border-bottom: 0;
}

.row-marker {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 99px;
  background: var(--teal);
}

.row-marker.wait {
  background: var(--amber);
}

.row-marker.bad {
  background: var(--red);
}

.row-marker.info {
  background: var(--violet);
}

.row-title {
  font-weight: 900;
}

.row-copy {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.fleet-menu {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.fleet-menu-button {
  display: flex;
  flex: 1 0 130px;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.fleet-menu-button:hover {
  color: var(--text);
  background: var(--surface-2);
}

.fleet-menu-button.active {
  color: #ffffff;
  background: var(--ink-soft);
}

.fleet-menu-button strong {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 99px;
  color: var(--ink-soft);
  background: var(--surface-2);
  font-size: 11px;
}

.fleet-profile-kpis {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.boomer-ui .fleet-photo-hero {
  --fleet-photo-position: 58% 47%;

  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) clamp(330px, 38vw, 560px);
  min-height: clamp(350px, 25vw, 390px);
  overflow: hidden;
  margin: 0 0 14px;
  padding: 0;
  isolation: isolate;
  border: 1px solid #3d5f8e;
  border-radius: var(--radius);
  color: #ffffff;
  background: #071536;
  box-shadow:
    0 12px 28px rgba(12, 30, 65, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.boomer-ui .fleet-photo-hero__info {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 20px 20px;
  background:
    radial-gradient(circle at 88% 28%, rgba(168, 207, 74, 0.12) 0 2px, transparent 3px) 0 0 / 18px 18px,
    repeating-linear-gradient(0deg, transparent 0 4px, rgba(232, 244, 255, 0.045) 4px 5px),
    linear-gradient(145deg, #06122f 0%, #091b43 58%, #0d2a5d 100%);
  box-shadow: inset -1px 0 0 rgba(225, 238, 255, 0.2);
}

.boomer-ui .fleet-photo-hero__visual {
  position: relative;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
  margin: 0;
  border-left: 1px solid rgba(225, 238, 255, 0.28);
  background: #10265a;
}

.boomer-ui .fleet-photo-hero__visual img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--fleet-photo-position);
  filter: saturate(0.88) contrast(1.03) brightness(0.9);
}

.boomer-ui .fleet-photo-hero--wh5870a {
  --fleet-photo-position: 50% 58%;

  border-color: #4d8f79;
  background: #091f19;
  box-shadow:
    0 14px 32px rgba(13, 54, 43, 0.3),
    0 0 0 1px rgba(151, 238, 199, 0.18),
    inset 0 1px 0 rgba(224, 255, 241, 0.44);
}

.boomer-ui .fleet-photo-hero--wh5870a .fleet-photo-hero__info {
  background:
    radial-gradient(circle at 88% 28%, rgba(168, 232, 127, 0.16) 0 2px, transparent 3px) 0 0 / 18px 18px,
    repeating-linear-gradient(0deg, transparent 0 4px, rgba(203, 255, 231, 0.055) 4px 5px),
    linear-gradient(145deg, #071914 0%, #0b2c24 56%, #13523e 100%);
  box-shadow: inset -1px 0 0 rgba(193, 255, 226, 0.24);
}

.boomer-ui .fleet-photo-hero--wh5870a .fleet-photo-hero__visual {
  border-color: rgba(193, 255, 226, 0.3);
  background: #153d32;
}

.boomer-ui .fleet-photo-hero--wh5870a .fleet-photo-hero__visual img {
  filter: saturate(0.98) contrast(1.05) brightness(0.92);
}

.boomer-ui .fleet-photo-hero--wh5870a .fleet-photo-hero__rail {
  border-bottom-color: rgba(193, 255, 226, 0.32);
  color: rgba(224, 255, 241, 0.88);
}

.boomer-ui .fleet-photo-hero--wh5870a .fleet-photo-hero__status {
  color: #c9f29c;
}

.boomer-ui .fleet-photo-hero__visual::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: repeating-linear-gradient(0deg, transparent 0 4px, rgba(232, 244, 255, 0.045) 4px 5px);
  content: "";
  pointer-events: none;
}

.boomer-ui .fleet-photo-hero__rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 0 12px;
  border-bottom: 1px solid rgba(225, 238, 255, 0.3);
  color: rgba(239, 247, 255, 0.86);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.boomer-ui .fleet-photo-hero__identity {
  min-width: 0;
  max-width: 700px;
}

.boomer-ui .fleet-photo-hero__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: #dceaa9;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.boomer-ui .fleet-photo-hero__status i {
  width: 7px;
  height: 7px;
  border: 1px solid rgba(236, 255, 176, 0.72);
  border-radius: 50%;
  background: var(--boomer-lime);
  box-shadow: 0 0 0 4px rgba(168, 207, 74, 0.14);
}

.boomer-ui .fleet-photo-hero__identity h2 {
  margin: 0;
  font-size: 58px;
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.9;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.boomer-ui .fleet-photo-hero__identity h2 span {
  color: var(--boomer-lime);
}

.boomer-ui .fleet-photo-hero__identity p {
  margin: 12px 0 0;
  color: rgba(237, 245, 255, 0.78);
  font-size: 12px;
  letter-spacing: 0.035em;
}

.boomer-ui .fleet-screen--photo-background .fleet-photo-hero--page-background {
  display: flex;
  min-height: 360px;
  align-items: flex-end;
  padding: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.boomer-ui .fleet-screen--photo-background .fleet-photo-hero--page-background .fleet-photo-hero__info {
  width: min(620px, 62%);
  min-height: 220px;
  padding: 15px 18px 18px;
  border: 1px solid rgba(183, 246, 218, 0.46);
  border-radius: 8px;
  background:
    radial-gradient(circle at 88% 28%, rgba(101, 211, 180, 0.18) 0 2px, transparent 3px) 0 0 / 18px 18px,
    repeating-linear-gradient(0deg, transparent 0 4px, rgba(215, 240, 231, 0.052) 4px 5px),
    linear-gradient(145deg, rgba(8, 27, 22, 0.9), rgba(20, 65, 52, 0.82));
  box-shadow:
    0 14px 34px rgba(3, 25, 18, 0.32),
    inset 0 1px 0 rgba(224, 255, 242, 0.22);
  -webkit-backdrop-filter: blur(10px) saturate(1.06);
  backdrop-filter: blur(10px) saturate(1.06);
}

.fleet-profile-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.32fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.fleet-status-panel {
  display: flex;
  flex-direction: column;
}

.fleet-status-list {
  display: grid;
  gap: 2px;
}

.fleet-status-list > div {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.fleet-status-list .row-marker {
  margin-top: 0;
}

.fleet-trips-action {
  width: 100%;
  margin-top: auto;
}

.fleet-table-title {
  margin: 0;
  padding: 14px 16px 10px;
}

.fleet-trips-preview .table-scroll {
  max-height: 500px;
}

.map-toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
}

.map-toolbar .segmented {
  margin-right: auto;
}

.map-select-wrap {
  display: grid;
  gap: 4px;
  min-width: 190px;
}

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

.map-select-wrap select {
  min-height: 38px;
  padding: 0 34px 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 340px);
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.map-panel {
  position: relative;
  min-width: 0;
  min-height: 620px;
  border-right: 1px solid var(--line);
  background: #dfe8e8;
}

.fleet-map {
  width: 100%;
  height: 100%;
  min-height: 620px;
}

.fleet-map .leaflet-control-container {
  font-family: inherit;
}

.fleet-map .leaflet-popup-content {
  margin: 12px 14px;
  color: var(--text);
  font-family: inherit;
  line-height: 1.45;
}

.map-overlay-note {
  position: absolute;
  z-index: 500;
  top: 12px;
  left: 54px;
  display: grid;
  max-width: min(440px, calc(100% - 70px));
  padding: 9px 11px;
  border: 1px solid rgba(24, 33, 37, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 5px 16px rgba(25, 37, 43, 0.12);
  pointer-events: none;
}

.map-overlay-note strong {
  font-size: 12px;
}

.map-overlay-note span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.map-side-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 16px;
}

.map-vehicle-list {
  display: grid;
  gap: 2px;
}

.map-vehicle-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  width: 100%;
  min-height: 74px;
  padding: 11px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.map-vehicle-row:hover,
.map-vehicle-row.active {
  background: var(--surface-2);
}

.map-vehicle-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border: 2px solid #ffffff;
  border-radius: 99px;
  box-shadow: 0 0 0 1px var(--line-strong);
}

.map-vehicle-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.map-vehicle-copy strong {
  font-size: 14px;
}

.map-vehicle-copy span,
.map-vehicle-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.map-distance {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.map-data-status {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}

.map-data-status-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  color: var(--teal);
  background: var(--teal-weak);
  font-size: 11px;
  font-weight: 900;
}

.map-data-status strong {
  font-size: 12px;
}

.map-data-status p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.map-load-error {
  display: grid;
  height: 100%;
  min-height: 620px;
  place-content: center;
  gap: 6px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.map-load-error strong {
  color: var(--text);
}

.vehicle-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.vehicle-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vehicle-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vehicle-name {
  font-size: 20px;
  font-weight: 900;
}

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

.metric {
  min-height: 70px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f9fbfb;
}

.metric-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.metric-value {
  margin-top: 7px;
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
}

.bar-track {
  height: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-2);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.bar-fill.warn {
  background: var(--amber);
}

.bar-fill.bad {
  background: var(--red);
}

.detail-pane {
  padding: 16px;
}

.trip-route-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.trip-route-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.trip-route-head h3 {
  margin: 3px 0 0;
  font-size: 16px;
}

.trip-route-map {
  width: 100%;
  height: 280px;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #dfe8e8;
}

.trip-route-map .leaflet-control-container,
.trip-route-map .leaflet-popup-content {
  font-family: inherit;
}

.trip-route-summary {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.trip-route-summary > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.trip-route-summary span,
.trip-route-note {
  color: var(--muted);
}

.trip-route-summary strong {
  text-align: right;
}

.trip-route-note {
  margin: 9px 0 0;
  font-size: 11px;
  line-height: 1.45;
}

.trip-route-empty {
  display: grid;
  min-height: 96px;
  place-items: center;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: #f9fbfb;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.trip-map-error {
  min-height: 280px;
}

.trip-route-detail .trip-route-section {
  margin-top: 16px;
  padding-top: 0;
  border-top: 0;
}

.route-tab-empty {
  margin-top: 16px;
}

.route-boundaries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.route-boundaries > div {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 12px 12px 12px 24px;
}

.route-boundaries > div + div {
  border-left: 1px solid var(--line);
}

.route-boundaries span:not(.route-boundary-marker),
.route-boundaries small,
.route-kpis span,
.route-point-count {
  color: var(--muted);
  font-size: 11px;
}

.route-boundaries strong,
.route-boundaries small {
  overflow-wrap: anywhere;
}

.route-boundary-marker {
  position: absolute;
  top: 15px;
  left: 8px;
  width: 8px;
  height: 8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line-strong);
  background: var(--green);
}

.route-boundary-marker--end {
  background: var(--teal);
}

.route-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.route-kpis > div {
  display: grid;
  gap: 3px;
  padding: 11px 0;
}

.route-kpis > div:nth-child(even) {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.route-kpis > div:nth-child(n + 3) {
  border-top: 1px solid var(--line);
}

.route-kpis strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.route-point-count {
  max-width: 160px;
  text-align: right;
}

.trip-route-loading {
  min-height: 280px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.detail-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f9fbfb;
}

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

.detail-value {
  margin-top: 6px;
  font-weight: 900;
  line-height: 1.35;
}

.timeline {
  display: grid;
  gap: 0;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 10px 0 10px 18px;
  border-left: 2px solid var(--line);
}

.timeline-item::before {
  position: absolute;
  top: 17px;
  left: -6px;
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: var(--teal);
  content: "";
}

.timeline-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.timeline-copy {
  font-size: 13px;
  line-height: 1.4;
}

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

.doc-tile {
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.doc-count {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 900;
}

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

.database-toolbar {
  margin-top: 14px;
}

.database-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(390px, 0.75fr);
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}

.database-table-scroll {
  max-height: calc(100vh - 334px);
  min-height: 560px;
}

.database-table {
  min-width: 1210px;
}

.circle-registry {
  margin-top: 14px;
}

.circle-table-scroll {
  max-height: calc(100vh - 342px);
}

.circle-table {
  min-width: 1180px;
}

.circle-table th:nth-child(4),
.circle-table td:nth-child(4) {
  width: 28%;
}

.circle-number {
  color: var(--text);
  font-size: 22px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.circle-number--muted {
  color: var(--muted);
}

.circle-unassigned-row td {
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
}

.circle-overview .panel-title h2 {
  font-size: 25px;
}

.circle-route-points {
  display: grid;
  gap: 7px;
}

.circle-route-points > span {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
}

.circle-route-points > span strong {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 10px;
}

.trips-table {
  min-width: 920px;
}

.cell-note {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.trip-code {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--ink-soft);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.025em;
  white-space: nowrap;
}

.trip-code.trip-code-missing {
  border-style: dashed;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.trip-detail-title {
  display: block;
}

.trip-title-kicker {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel-title .trip-code-title {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 21px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1.12;
  overflow-wrap: anywhere;
  white-space: normal;
}

.panel-title .trip-code-title.trip-code-missing {
  color: var(--muted);
  font-size: 17px;
}

.trip-invoice-reference {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.trip-invoice-reference strong,
.invoice-reference {
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.database-detail {
  max-height: calc(100vh - 334px);
  min-height: 560px;
  overflow: auto;
}

.database-detail-title {
  align-items: flex-start;
}

.database-detail-title h2 {
  margin-top: 4px;
}

.database-detail .detail-grid {
  gap: 0 16px;
  border-top: 1px solid var(--line);
}

.database-detail .detail-item {
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.database-detail-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.database-detail-section h3 {
  margin: 0;
  font-size: 14px;
}

.invoice-chain + .invoice-chain {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.invoice-chain-heading,
.invoice-chain-role,
.invoice-chain-actions {
  display: flex;
  align-items: center;
}

.invoice-chain-heading {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.invoice-chain-heading > strong {
  font-size: 12px;
}

.invoice-chain-timeline {
  border-top: 1px solid var(--line);
}

.invoice-chain-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto 58px;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.invoice-chain-marker {
  position: relative;
  width: 9px;
  height: 9px;
  margin-left: 3px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  background: var(--surface);
}

.invoice-chain-row--replacement .invoice-chain-marker {
  border-color: var(--green);
}

.invoice-chain-row--correction .invoice-chain-marker {
  border-color: var(--amber);
}

.invoice-chain-row--original .invoice-chain-marker {
  border-color: var(--red);
}

.invoice-chain-main {
  min-width: 0;
}

.invoice-chain-main small,
.invoice-chain-main p {
  display: block;
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-chain-role {
  gap: 7px;
  min-width: 0;
}

.invoice-chain-role > strong {
  overflow: hidden;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-chain-amount {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.invoice-chain-actions {
  justify-content: flex-end;
  gap: 5px;
}

.invoice-chain-actions a,
.invoice-chain-actions button {
  display: grid;
  width: 26px;
  height: 26px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.invoice-chain-actions a:hover,
.invoice-chain-actions button:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.invoice-change-list {
  display: grid;
  gap: 7px;
  padding: 10px 0 2px 27px;
}

.invoice-change-list > div {
  display: grid;
  grid-template-columns: minmax(100px, 0.45fr) minmax(0, 1fr);
  gap: 10px;
  font-size: 10px;
  line-height: 1.4;
}

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

.invoice-change-list strong {
  overflow-wrap: anywhere;
}

.invoice-chain-evidence {
  margin: 9px 0 0 27px;
  color: var(--muted);
  font-size: 10px;
}

.invoice-chain-evidence summary {
  width: max-content;
  max-width: 100%;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.invoice-chain-evidence p {
  margin: 7px 0 0;
  line-height: 1.45;
}

.database-note {
  margin: 7px 0 0;
}

.database-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.database-section-head > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.database-report-row {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.database-report-row:last-child {
  border-bottom: 0;
}

.database-report-metrics,
.database-inline-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.database-report-metrics span,
.database-inline-metrics span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.database-report-metrics strong,
.database-inline-metrics strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.inline-document-link {
  display: inline-flex;
  grid-column: 1 / -1;
  justify-self: start;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.inline-document-link:hover {
  text-decoration: underline;
}

.text-ok strong {
  color: var(--green);
}

.text-warn strong {
  color: var(--amber);
}

.database-event,
.database-conflict {
  display: grid;
  gap: 4px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.4;
}

.database-event span,
.database-conflict span,
.muted-line {
  color: var(--muted);
}

.database-conflict-section {
  border-top-color: #e7bd77;
}

.circle-subnav {
  width: max-content;
  max-width: 100%;
  margin-top: 14px;
}

.circle-subnav .segment,
.detail-subnav .segment {
  min-width: 108px;
}

.circle-subnav .segment span {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  place-items: center;
  border-radius: 4px;
  color: inherit;
  background: rgba(91, 109, 119, 0.12);
  font-size: 10px;
}

.circle-subnav .segment.active span {
  background: rgba(255, 255, 255, 0.2);
}

.detail-subnav {
  margin: 12px 0 2px;
}

.expense-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.58fr);
  gap: 24px;
  align-items: end;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.expense-panel-head h2 {
  margin: 3px 0 0;
  font-size: 21px;
}

.expense-panel-head p {
  max-width: 720px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.expense-panel-total {
  display: grid;
  gap: 3px;
  justify-items: end;
  text-align: right;
}

.expense-panel-total span,
.expense-panel-total small {
  color: var(--muted);
  font-size: 11px;
}

.expense-panel-total strong,
.circle-expense-total {
  color: var(--ink-soft);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.circle-expense-panel {
  margin-top: 14px;
  overflow: hidden;
}

.expense-table-scroll {
  max-height: calc(100vh - 430px);
  min-height: 360px;
}

.expense-table {
  min-width: 920px;
}

.expense-table th:nth-child(3),
.expense-table td:nth-child(3) {
  width: 31%;
}

.expense-description {
  min-width: 180px;
  line-height: 1.35;
  white-space: normal;
}

.expense-amount {
  color: var(--ink-soft);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.expense-source-link {
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.expense-source-link:hover {
  text-decoration: underline;
}

.expense-evidence-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
  font-size: 10px;
}

.expense-evidence-links a {
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
}

.expense-evidence-links span {
  color: var(--amber);
  font-weight: 800;
}

.expense-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 14px;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.expense-metrics > div {
  min-width: 0;
  padding: 13px 0;
}

.expense-metrics > div + div {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.expense-metrics span,
.expense-metrics small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.expense-metrics strong {
  display: block;
  margin: 4px 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.expense-rule-note {
  margin: 12px 0 0;
  padding: 10px;
  border-left: 3px solid var(--amber);
  color: var(--muted);
  background: color-mix(in srgb, var(--amber) 8%, transparent);
  font-size: 11px;
  line-height: 1.45;
}

.trip-expense-list {
  display: grid;
}

.trip-expense-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.trip-expense-row:last-child {
  border-bottom: 0;
}

.trip-expense-row__head,
.trip-expense-row__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.trip-expense-row__head span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.trip-expense-row p {
  margin: 7px 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
}

.trip-expense-row__meta {
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  color: var(--muted);
  font-size: 10px;
}

.trip-title-provenance {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.field-provenance {
  --provenance-color: #4f759e;
  --provenance-surface: #e7eef5;
  width: 100%;
  margin-top: 7px;
  color: var(--text);
  font-size: 11px;
}

.trip-title-provenance .field-provenance {
  width: auto;
  margin-top: 0;
}

.field-provenance > summary {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 25px;
  align-items: center;
  gap: 6px;
  padding: 3px 7px 3px 4px;
  border: 1px solid var(--provenance-color);
  border-radius: 999px;
  color: var(--provenance-color);
  background: var(--provenance-surface);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
  user-select: none;
}

.field-provenance > summary::-webkit-details-marker {
  display: none;
}

.field-provenance > summary:hover {
  filter: brightness(0.98);
}

.field-provenance > summary:focus-visible {
  outline: 2px solid var(--provenance-color);
  outline-offset: 2px;
}

.field-provenance[open] {
  overflow: hidden;
  border: 1px solid var(--provenance-color);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(33, 48, 40, 0.09);
}

.trip-title-provenance .field-provenance[open] {
  width: 100%;
}

.field-provenance[open] > summary {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.field-provenance-symbol {
  display: inline-grid;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--provenance-color);
  font-size: 10px;
  line-height: 1;
}

.field-provenance-status {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-provenance-count {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.field-provenance-chevron {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  margin: 0 2px 3px 1px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 140ms ease;
}

.field-provenance[open] .field-provenance-chevron {
  margin-bottom: -2px;
  transform: rotate(225deg);
}

.field-provenance--confirmed {
  --provenance-color: #32704a;
  --provenance-surface: #e2efe4;
}

.field-provenance--single_source {
  --provenance-color: #315f90;
  --provenance-surface: #e2eaf3;
}

.field-provenance--inferred {
  --provenance-color: #6c548e;
  --provenance-surface: #ebe6f1;
}

.field-provenance--manual {
  --provenance-color: #8c611f;
  --provenance-surface: #f4ead7;
}

.field-provenance--conflict {
  --provenance-color: #9c3944;
  --provenance-surface: #f4dfe2;
}

.field-provenance--missing {
  --provenance-color: #68716d;
  --provenance-surface: #e5e9e7;
}

.field-provenance-body {
  padding: 8px;
}

.field-provenance-resolution {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.field-evidence-list {
  display: grid;
  gap: 7px;
}

.field-evidence {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--provenance-color);
  border-radius: 5px;
  background: #f7f9f7;
}

.field-evidence--conflicts {
  border-left-color: #9c3944;
  background: #fbf1f2;
}

.field-evidence-head {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.field-evidence-head > div {
  min-width: 0;
}

.field-evidence-head strong,
.field-evidence-head small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-evidence-head strong {
  color: var(--ink-soft);
  font-size: 11px;
}

.field-evidence-head small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.field-evidence-open {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--boomer-blue-deep, #234f83);
  background: #eef2f0;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
}

.field-evidence-open:hover {
  border-color: currentColor;
  background: #ffffff;
}

.field-evidence-value {
  display: grid;
  gap: 2px;
  margin-top: 7px;
}

.field-evidence-value span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field-evidence-value strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 11px;
  line-height: 1.35;
}

.field-evidence-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 7px;
}

.field-evidence-meta span {
  max-width: 100%;
  overflow: hidden;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  background: #edf1ee;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-evidence-note {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.field-evidence-empty {
  padding: 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.database-document-list {
  display: grid;
}

.database-document-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

.database-document-link:hover strong {
  color: var(--teal);
}

.database-document-link strong,
.database-document-link small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.database-document-link strong {
  font-size: 12px;
}

.database-document-link small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.document-extension {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--teal);
  background: var(--teal-weak);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.document-open {
  color: var(--muted);
  font-weight: 900;
}

.compact-empty {
  min-height: 160px;
  box-shadow: none;
}

.database-document-table-scroll {
  max-height: 680px;
}

.database-documents-table {
  min-width: 980px;
}

.document-path {
  max-width: 520px;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.table-open-link {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--teal);
  text-decoration: none;
  font-size: 15px;
  font-weight: 900;
}

.table-open-link:hover {
  border-color: var(--teal);
  background: var(--teal-weak);
}

.split-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.65fr);
  gap: 14px;
}

.message-preview {
  min-height: 280px;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #fbfcfc;
}

.message-bubble {
  max-width: 720px;
  padding: 12px 14px;
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface-2);
  line-height: 1.55;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.empty-state,
.loading-state {
  display: grid;
  min-height: 280px;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  max-width: min(420px, calc(100vw - 44px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #ffffff;
  background: #172226;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .grid-kpis {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .layout-two,
  .split-preview,
  .fleet-profile-layout,
  .database-layout {
    grid-template-columns: 1fr;
  }

  .database-detail {
    max-height: none;
    min-height: 0;
  }

  .database-table-scroll {
    max-height: 620px;
    min-height: 440px;
  }

  .expense-table-scroll {
    max-height: 620px;
  }

  .map-layout {
    grid-template-columns: 1fr;
  }

  .map-panel {
    min-height: 520px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .fleet-map {
    min-height: 520px;
  }

  .map-side-panel {
    min-height: 360px;
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

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

  .sidebar-footer {
    display: none;
  }

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

  .topbar-actions {
    justify-content: space-between;
  }

  .content {
    padding: 16px;
  }

  .grid-kpis,
  .layout-three,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .invoice-chain-row {
    grid-template-columns: 18px minmax(0, 1fr) 52px;
  }

  .invoice-chain-amount {
    grid-column: 2;
    color: var(--muted);
  }

  .invoice-chain-actions {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .invoice-change-list > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .expense-panel-head,
  .expense-metrics {
    grid-template-columns: 1fr;
  }

  .route-boundaries {
    grid-template-columns: 1fr;
  }

  .route-boundaries > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .expense-panel-total {
    justify-items: start;
    text-align: left;
  }

  .expense-metrics > div + div {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .circle-subnav,
  .detail-subnav {
    width: 100%;
  }

  .circle-subnav .segment,
  .detail-subnav .segment {
    flex: 1 1 120px;
  }

  .screen-head,
  .toolbar,
  .map-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-meta,
  .vehicle-card-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-meta {
    flex-wrap: nowrap;
  }

  .registry-sort-controls {
    width: 100%;
  }

  .registry-sort-select {
    min-width: 0;
    flex: 1 1 auto;
  }

  .sort-direction-button {
    flex-basis: 40px;
    width: 100%;
  }

  .filter-summary {
    padding: 0;
    text-align: left;
  }

  .map-toolbar .segmented {
    margin-right: 0;
  }

  .map-layout,
  .map-panel,
  .fleet-map {
    min-height: 440px;
  }

  .map-overlay-note {
    right: 12px;
    left: 54px;
    max-width: none;
  }
}

/* Boomer Efficiency UI theme --------------------------------------------------------- */

body.boomer-ui {
  --bg: #e5e9e3;
  --surface: #f3f5f1;
  --surface-2: #dbe1df;
  --line: #9da9a6;
  --line-strong: #65736f;
  --text: #121713;
  --muted: #4f5c57;
  --quiet: #65726d;
  --ink-soft: #28312d;
  --teal: #2f67a8;
  --teal-weak: #d8e5f3;
  --green: #235c36;
  --green-weak: #dcebd9;
  --amber: #704600;
  --amber-weak: #f4e5bd;
  --red: #852f40;
  --red-weak: #f2d9df;
  --violet: #584079;
  --violet-weak: #e7dff0;
  --boomer-lime: #a8cf4a;
  --boomer-lime-deep: #6f9e18;
  --boomer-lime-pale: #d8e999;
  --boomer-blue: #3f78bd;
  --boomer-blue-deep: #28578f;
  --boomer-chrome: #d7ddda;
  --boomer-edge-light: rgba(255, 255, 255, 0.88);
  --boomer-edge-dark: rgba(33, 45, 39, 0.28);
  --shadow:
    0 9px 24px rgba(31, 43, 25, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  --radius: 6px;
  --sidebar: 240px;
  min-height: 100vh;
  padding: 12px;
  background:
    radial-gradient(ellipse at 14% 5%, rgba(255, 255, 255, 0.5) 0 8%, transparent 29%),
    linear-gradient(116deg, transparent 0 62%, rgba(255, 255, 255, 0.16) 62% 76%, transparent 76%),
    repeating-linear-gradient(0deg, rgba(44, 78, 19, 0.16) 0 2px, transparent 2px 17px),
    linear-gradient(135deg, #d4ea91 0%, var(--boomer-lime) 48%, var(--boomer-lime-deep) 100%);
  font-family:
    "Helvetica Neue", Helvetica, Arial, Inter, ui-sans-serif, system-ui, sans-serif;
}

.boomer-ui :is(button, input, select, a):focus-visible {
  outline: 3px solid #173657;
  outline-offset: 2px;
}

.boomer-ui .app-shell {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 24px);
  overflow: clip;
  border: 1px solid #52605b;
  border-radius: 9px;
  background: var(--bg);
  box-shadow:
    0 18px 50px rgba(26, 46, 16, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.58) inset;
}

.boomer-ui .sidebar {
  top: 12px;
  height: calc(100vh - 24px);
  overflow: hidden;
  border-right: 1px solid var(--line-strong);
  color: var(--text);
  background:
    radial-gradient(circle at 26px 30px, rgba(255, 255, 255, 0.74), transparent 110px),
    repeating-linear-gradient(0deg, rgba(65, 84, 74, 0.055) 0 1px, transparent 1px 6px),
    linear-gradient(145deg, #f0f3ef 0%, #cbd3d1 50%, #e8ece8 100%);
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.boomer-ui .sidebar::after {
  position: absolute;
  right: -12px;
  bottom: 82px;
  width: 132px;
  height: 90px;
  background-image: radial-gradient(circle, var(--boomer-lime-deep) 0 2px, transparent 3px);
  background-size: 18px 18px;
  content: "";
  opacity: 0.22;
  pointer-events: none;
}

.boomer-ui .brand,
.boomer-ui .nav,
.boomer-ui .sidebar-footer {
  position: relative;
  z-index: 1;
}

.boomer-ui .brand {
  align-items: flex-start;
  padding: 4px 6px 17px;
  border-bottom-color: rgba(54, 71, 63, 0.26);
}

.boomer-ui .brand-mark {
  flex: 0 0 42px;
  border: 1px solid var(--boomer-blue-deep);
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(155deg, #8ab5e6 0%, var(--boomer-blue) 54%, var(--boomer-blue-deep) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 2px 5px rgba(34, 51, 62, 0.2);
  font-weight: 650;
}

.boomer-ui .brand-name {
  margin-top: 2px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.boomer-ui .brand-subtitle,
.boomer-ui .sidebar-footer span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.boomer-ui .nav {
  gap: 5px;
  margin-top: 15px;
}

.boomer-ui .nav-button {
  min-height: 39px;
  border: 1px solid transparent;
  color: var(--text);
  font-weight: 550;
}

.boomer-ui .nav-button:hover {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.52);
}

.boomer-ui .nav-button.active {
  border-color: var(--boomer-blue-deep);
  color: #ffffff;
  background: linear-gradient(180deg, #5e91cd 0%, var(--boomer-blue) 52%, var(--boomer-blue-deep) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 2px 5px rgba(38, 67, 91, 0.18);
}

.boomer-ui .nav-glyph {
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: linear-gradient(145deg, #f7f8f5, #cbd3d2);
  font-weight: 650;
}

.boomer-ui .nav-button.active .nav-glyph {
  border-color: rgba(255, 255, 255, 0.58);
  color: #203510;
  background: linear-gradient(145deg, var(--boomer-lime-pale), var(--boomer-lime));
}

.boomer-ui .nav-count {
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: rgba(247, 249, 246, 0.82);
  font-weight: 650;
}

.boomer-ui .nav-button.active .nav-count {
  border-color: rgba(255, 255, 255, 0.56);
  color: #ffffff;
  background: rgba(24, 49, 77, 0.34);
}

.boomer-ui .sidebar-footer {
  color: var(--text);
  font-size: 12px;
}

.boomer-ui .sidebar-footer strong {
  font-weight: 650;
}

.boomer-ui .sync-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(35, 92, 54, 0.14);
}

.boomer-ui .main {
  background:
    repeating-linear-gradient(0deg, rgba(50, 69, 59, 0.035) 0 1px, transparent 1px 8px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), transparent 36%),
    var(--bg);
}

.boomer-ui .topbar {
  top: 12px;
  min-height: 68px;
  border-bottom: 1px solid var(--line-strong);
  background:
    repeating-linear-gradient(0deg, rgba(53, 75, 64, 0.045) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, rgba(248, 250, 247, 0.97), rgba(210, 218, 216, 0.97));
  box-shadow:
    inset 0 1px 0 var(--boomer-edge-light),
    0 4px 12px rgba(43, 55, 49, 0.08);
  backdrop-filter: blur(8px);
}

.boomer-ui .search-wrap input,
.boomer-ui .compact-select select,
.boomer-ui .map-select-wrap select {
  border-color: var(--line-strong);
  color: var(--text);
  background: linear-gradient(180deg, #f7f9f6 0%, #e2e7e5 100%);
  box-shadow:
    inset 0 1px 2px rgba(39, 54, 46, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.84);
}

.boomer-ui .search-wrap input:focus,
.boomer-ui .compact-select select:focus,
.boomer-ui .map-select-wrap select:focus {
  border-color: var(--boomer-blue-deep);
  box-shadow:
    0 0 0 3px rgba(47, 103, 168, 0.2),
    inset 0 1px 2px rgba(39, 54, 46, 0.1);
}

.boomer-ui .search-icon {
  color: var(--muted);
}

.boomer-ui .icon-button,
.boomer-ui .primary-action,
.boomer-ui .secondary-action,
.boomer-ui .ghost-action,
.boomer-ui .danger-action {
  border-radius: 8px;
  font-weight: 650;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.boomer-ui .icon-button,
.boomer-ui .ghost-action {
  border-color: var(--line-strong);
  color: var(--ink-soft);
  background: linear-gradient(180deg, #f6f8f4 0%, #cfd7d5 100%);
}

.boomer-ui .primary-action {
  border-color: var(--boomer-blue-deep);
  color: #ffffff;
  background: linear-gradient(180deg, #5e91cd 0%, var(--boomer-blue) 52%, var(--boomer-blue-deep) 100%);
}

.boomer-ui .secondary-action {
  border-color: #6f91ba;
  color: #173f70;
  background: linear-gradient(180deg, #edf4fb 0%, var(--teal-weak) 100%);
}

.boomer-ui .danger-action {
  border-color: #a96a76;
  color: var(--red);
  background: linear-gradient(180deg, #faedf0 0%, var(--red-weak) 100%);
}

.boomer-ui .content {
  position: relative;
  isolation: isolate;
}

.boomer-ui .content::before {
  position: absolute;
  z-index: 0;
  top: 16px;
  right: 18px;
  width: 132px;
  height: 58px;
  background-image: radial-gradient(circle, var(--boomer-lime-deep) 0 2px, transparent 3px);
  background-size: 18px 18px;
  content: "";
  opacity: 0.16;
  pointer-events: none;
}

.boomer-ui .content > * {
  position: relative;
  z-index: 1;
}

.boomer-ui .screen-eyebrow,
.boomer-ui .compact-select > span,
.boomer-ui .map-select-wrap span,
.boomer-ui .kpi-label,
.boomer-ui th,
.boomer-ui .metric-label,
.boomer-ui .detail-label,
.boomer-ui .doc-label {
  font-weight: 650;
  letter-spacing: 0.08em;
}

.boomer-ui .screen-eyebrow {
  color: var(--boomer-blue-deep);
}

.boomer-ui .screen-title {
  font-weight: 550;
  letter-spacing: -0.035em;
}

.boomer-ui .screen-subtitle {
  color: var(--muted);
}

.boomer-ui .segmented,
.boomer-ui .fleet-menu {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, #eef1ee 0%, #cfd7d4 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.boomer-ui .segment,
.boomer-ui .fleet-menu-button {
  color: var(--muted);
  font-weight: 650;
}

.boomer-ui .segment.active,
.boomer-ui .fleet-menu-button.active {
  color: #ffffff;
  background: linear-gradient(180deg, #5e91cd 0%, var(--boomer-blue-deep) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.boomer-ui .kpi-card,
.boomer-ui .panel,
.boomer-ui .table-panel,
.boomer-ui .detail-pane,
.boomer-ui .empty-state,
.boomer-ui .vehicle-card,
.boomer-ui .doc-tile,
.boomer-ui .map-layout {
  border-color: var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #f5f7f3 0%, #d9dfdc 54%, #edf0eb 100%);
  box-shadow: var(--shadow);
}

.boomer-ui .kpi-card {
  position: relative;
  min-height: 116px;
}

.boomer-ui .kpi-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  min-height: 32px;
}

.boomer-ui .kpi-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--boomer-blue), var(--boomer-lime));
  content: "";
}

.boomer-ui .kpi-value,
.boomer-ui .metric-value,
.boomer-ui .doc-count,
.boomer-ui .num {
  font-variant-numeric: tabular-nums;
}

.boomer-ui .kpi-value,
.boomer-ui .metric-value,
.boomer-ui .doc-count {
  font-weight: 550;
}

.boomer-ui .kpi-value {
  font-size: 23px;
  white-space: nowrap;
}

.boomer-ui .circle-kpis .kpi-value {
  font-size: 18px;
  line-height: 1.15;
  overflow-wrap: anywhere;
  white-space: normal;
}

.boomer-ui .kpi-note,
.boomer-ui .row-copy,
.boomer-ui .panel-title span,
.boomer-ui .muted,
.boomer-ui .cell-note,
.boomer-ui .database-note,
.boomer-ui .muted-line {
  color: var(--muted);
}

.boomer-ui .status-pill,
.boomer-ui .risk-pill,
.boomer-ui .confidence-pill {
  border: 1px solid currentColor;
  font-weight: 650;
}

.boomer-ui .panel-title h2,
.boomer-ui .panel-title h3,
.boomer-ui .row-title,
.boomer-ui .strong,
.boomer-ui .vehicle-name,
.boomer-ui .detail-value,
.boomer-ui .timeline-time,
.boomer-ui .database-section-head > span,
.boomer-ui .document-open,
.boomer-ui .table-open-link {
  font-weight: 650;
}

.boomer-ui .table-panel {
  background: var(--surface);
  box-shadow:
    0 5px 14px rgba(31, 43, 36, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.boomer-ui .trip-code {
  border-color: #7189a7;
  color: var(--boomer-blue-deep);
  background: linear-gradient(180deg, #f5f8fb 0%, #d7e1ec 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(31, 55, 82, 0.14);
}

.boomer-ui .trip-code.trip-code-missing {
  border-color: var(--line-strong);
  color: var(--muted);
  background: transparent;
  box-shadow: none;
}

.boomer-ui .panel-title .trip-code-title {
  color: var(--boomer-blue-deep);
  font-weight: 700;
  text-shadow: 0 1px 0 #ffffff;
}

.boomer-ui .panel-title .trip-code-title.trip-code-missing {
  color: var(--muted);
}

.boomer-ui thead {
  background: linear-gradient(180deg, #e8ece9 0%, #ccd5d2 100%);
}

.boomer-ui th {
  color: #3f4b47;
}

.boomer-ui tbody tr:hover {
  background: #eef3e5;
}

.boomer-ui tbody tr.selected {
  box-shadow: inset 4px 0 0 var(--boomer-blue-deep);
  background: #e0e9c1;
}

.boomer-ui .list-row,
.boomer-ui .fleet-status-list > div,
.boomer-ui .database-report-row,
.boomer-ui .database-event,
.boomer-ui .database-conflict,
.boomer-ui .database-document-link {
  border-bottom-color: var(--line);
}

.boomer-ui .message-preview {
  border-style: solid;
  border-color: var(--line-strong);
  background:
    repeating-linear-gradient(0deg, rgba(48, 76, 61, 0.035) 0 1px, transparent 1px 6px),
    #edf1ed;
}

.boomer-ui .message-bubble {
  border: 1px solid var(--line);
  background: #dfe6e3;
}

.boomer-ui .metric,
.boomer-ui .detail-item,
.boomer-ui .trip-route-empty {
  border-color: var(--line);
  background: #e9eeea;
}

.boomer-ui .bar-track {
  border: 1px solid var(--line);
  background: #d1d9d5;
}

.boomer-ui .bar-fill {
  background: linear-gradient(90deg, var(--boomer-blue-deep), var(--boomer-blue));
}

.boomer-ui .map-panel,
.boomer-ui .trip-route-map {
  background: #cad6d4;
}

.boomer-ui .map-overlay-note {
  border-color: var(--line-strong);
  background: rgba(245, 247, 243, 0.97);
  box-shadow: 0 5px 16px rgba(25, 37, 31, 0.18);
}

.boomer-ui .map-vehicle-row:hover,
.boomer-ui .map-vehicle-row.active {
  box-shadow: inset 4px 0 0 var(--boomer-blue-deep);
  background: #e0e9c1;
}

.boomer-ui .map-vehicle-dot {
  border-color: #f5f7f3;
  box-shadow: 0 0 0 1px var(--line-strong);
}

.boomer-ui .map-data-status-icon,
.boomer-ui .document-extension {
  border: 1px solid #6f91ba;
  color: #173f70;
  background: var(--teal-weak);
}

.boomer-ui .table-open-link {
  border-color: var(--line-strong);
  color: var(--boomer-blue-deep);
  background: linear-gradient(180deg, #f7f8f5, #d5ddda);
}

.boomer-ui .table-open-link:hover {
  border-color: var(--boomer-blue-deep);
  background: var(--teal-weak);
}

.boomer-ui .database-conflict-section {
  border-top-color: var(--amber);
}

.boomer-ui .toast {
  bottom: 28px;
  border-color: var(--boomer-blue-deep);
  color: #ffffff;
  background: linear-gradient(180deg, #4d82bd, #234f83);
  box-shadow:
    0 10px 26px rgba(27, 49, 70, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* WH5870A inherits its Fleet palette from the green/cyan Volvo photograph. */
.boomer-ui .fleet-screen--wh5870a {
  --surface: #eff5f1;
  --surface-2: #dce9e2;
  --line: #8ca79d;
  --line-strong: #58756b;
  --teal: #2c8068;
  --teal-weak: #d8eee5;
  --boomer-blue: #3d9d7b;
  --boomer-blue-deep: #21644f;
  --boomer-lime: #a6dc72;
  --boomer-lime-deep: #5c9851;
  --boomer-lime-pale: #daf0b8;
  --shadow:
    0 9px 24px rgba(21, 61, 47, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
  position: relative;
  isolation: isolate;
  min-width: 0;
  overflow: hidden;
  margin: -10px;
  padding: 10px;
  border: 1px solid rgba(67, 111, 94, 0.72);
  border-radius: 10px;
  background: #17382d;
  box-shadow:
    0 12px 30px rgba(15, 52, 39, 0.18),
    inset 0 1px 0 rgba(226, 255, 242, 0.36);
}

.boomer-ui .fleet-screen--wh5870a::before,
.boomer-ui .fleet-screen--wh5870a::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
}

.boomer-ui .fleet-screen--wh5870a::before {
  inset: -3px;
  background: url("./assets/wh5870a-volvo.jpg") 56% 50% / auto 88% no-repeat;
  filter: saturate(0.94) contrast(1.06) brightness(0.82);
  transform: scale(1.008);
}

.boomer-ui .fleet-screen--wh5870a::after {
  background:
    linear-gradient(180deg, rgba(207, 245, 228, 0.18) 0%, rgba(8, 37, 28, 0.08) 42%, rgba(3, 23, 17, 0.52) 100%),
    linear-gradient(90deg, rgba(5, 32, 24, 0.3) 0%, rgba(13, 66, 49, 0.08) 54%, rgba(117, 225, 184, 0.14) 100%),
    repeating-linear-gradient(0deg, transparent 0 5px, rgba(218, 255, 239, 0.045) 5px 6px);
}

.boomer-ui .fleet-screen--wh5870a > * {
  position: relative;
  z-index: 1;
}

.boomer-ui .fleet-screen--wh5870a .screen-head {
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid #78978c;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 88% 28%, rgba(126, 214, 177, 0.2) 0 2px, transparent 3px) 0 0 / 18px 18px,
    repeating-linear-gradient(0deg, rgba(39, 95, 74, 0.035) 0 1px, transparent 1px 6px),
    linear-gradient(125deg, rgba(240, 249, 244, 0.9) 0%, rgba(210, 232, 220, 0.85) 58%, rgba(189, 221, 205, 0.82) 100%);
  box-shadow:
    0 7px 18px rgba(26, 74, 56, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(10px) saturate(1.04);
  backdrop-filter: blur(10px) saturate(1.04);
}

.boomer-ui .fleet-screen--wh5870a .screen-eyebrow {
  color: #286e5a;
}

.boomer-ui .fleet-screen--wh5870a .primary-action,
.boomer-ui .fleet-screen--wh5870a .fleet-menu-button.active {
  border-color: #1f604c;
  color: #ffffff;
  background: linear-gradient(180deg, #67ba98 0%, #358b6d 52%, #1f604c 100%);
  box-shadow:
    inset 0 1px 0 rgba(226, 255, 242, 0.62),
    0 2px 6px rgba(22, 69, 52, 0.2);
}

.boomer-ui .fleet-screen--wh5870a .fleet-menu {
  border-color: #718e84;
  background:
    repeating-linear-gradient(0deg, rgba(36, 94, 72, 0.04) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, rgba(239, 247, 242, 0.9) 0%, rgba(194, 216, 205, 0.86) 100%);
  -webkit-backdrop-filter: blur(9px) saturate(1.03);
  backdrop-filter: blur(9px) saturate(1.03);
}

.boomer-ui .fleet-screen--wh5870a .fleet-menu-button:hover {
  color: #173c30;
  background: rgba(236, 248, 241, 0.72);
}

.boomer-ui .fleet-screen--wh5870a .kpi-card,
.boomer-ui .fleet-screen--wh5870a .panel,
.boomer-ui .fleet-screen--wh5870a .table-panel {
  border-color: #78988c;
  background: linear-gradient(145deg, rgba(246, 250, 247, 0.9) 0%, rgba(211, 228, 219, 0.87) 54%, rgba(235, 244, 239, 0.89) 100%);
  box-shadow:
    0 8px 20px rgba(22, 65, 49, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(8px) saturate(1.02);
  backdrop-filter: blur(8px) saturate(1.02);
}

.boomer-ui .fleet-screen--wh5870a .table-panel {
  background: linear-gradient(145deg, rgba(247, 250, 248, 0.95) 0%, rgba(218, 232, 224, 0.94) 54%, rgba(238, 245, 241, 0.95) 100%);
}

@media (min-width: 1181px) {
  .boomer-ui .fleet-screen--wh5870a .fleet-trips-preview {
    background: linear-gradient(
      145deg,
      rgba(246, 250, 247, 0.77) 0%,
      rgba(205, 225, 214, 0.69) 54%,
      rgba(233, 243, 237, 0.75) 100%
    );
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .boomer-ui .fleet-screen--wh5870a .fleet-trips-preview thead {
    background: linear-gradient(180deg, rgba(223, 238, 229, 0.9) 0%, rgba(183, 208, 195, 0.86) 100%);
  }

  .boomer-ui .fleet-screen--wh5870a .fleet-trips-preview td {
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.54);
  }
}

.boomer-ui .fleet-screen--wh5870a .kpi-card::before {
  background: linear-gradient(90deg, #23725a 0%, #61c199 48%, #a7df72 100%);
}

.boomer-ui .fleet-screen--wh5870a .ghost-action {
  border-color: #6c8d80;
  color: #174936;
  background: linear-gradient(180deg, #f4faf6 0%, #cbded4 100%);
}

.boomer-ui .fleet-screen--wh5870a thead {
  background: linear-gradient(180deg, rgba(223, 237, 229, 0.93) 0%, rgba(185, 209, 197, 0.92) 100%);
}

.boomer-ui .fleet-screen--wh5870a th {
  color: #314c42;
}

.boomer-ui .fleet-screen--wh5870a tbody tr:hover {
  background: #e1f1e7;
}

.boomer-ui .fleet-screen--wh5870a .trip-code {
  border-color: #689b87;
  color: #1f644f;
  background: linear-gradient(180deg, #f3faf6 0%, #d2e7dc 100%);
}

/* WH6753A uses the same background-layer treatment in the photo's cobalt/violet range. */
.boomer-ui .fleet-screen--wh6753a {
  --surface: #eef2fb;
  --surface-2: #d7e1f4;
  --line: #8397c3;
  --line-strong: #526b9f;
  --teal: #3a67b7;
  --teal-weak: #dde7f7;
  --boomer-blue: #5284ce;
  --boomer-blue-deep: #213c82;
  --boomer-lime: #8e6acf;
  --boomer-lime-deep: #6548ad;
  --boomer-lime-pale: #e2daf4;
  --shadow:
    0 9px 24px rgba(24, 37, 83, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
  position: relative;
  isolation: isolate;
  min-width: 0;
  overflow: hidden;
  margin: -10px;
  padding: 10px;
  border: 1px solid rgba(82, 107, 159, 0.82);
  border-radius: 10px;
  background: #071139;
  box-shadow:
    0 12px 30px rgba(18, 28, 72, 0.22),
    inset 0 1px 0 rgba(225, 235, 255, 0.34);
}

.boomer-ui .fleet-screen--wh6753a::before,
.boomer-ui .fleet-screen--wh6753a::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
}

.boomer-ui .fleet-screen--wh6753a::before {
  inset: -3px;
  background: url("./assets/wh6753a-volvo.jpg") 50% 0 / 100% auto no-repeat;
  filter: saturate(0.96) contrast(1.06) brightness(0.8);
  transform: scale(1.008);
}

.boomer-ui .fleet-screen--wh6753a::after {
  background:
    linear-gradient(180deg, rgba(218, 229, 255, 0.18) 0%, rgba(21, 34, 78, 0.08) 42%, rgba(8, 15, 47, 0.56) 100%),
    linear-gradient(90deg, rgba(13, 25, 67, 0.32) 0%, rgba(48, 73, 132, 0.08) 54%, rgba(169, 121, 216, 0.16) 100%),
    repeating-linear-gradient(0deg, transparent 0 5px, rgba(226, 234, 255, 0.05) 5px 6px);
}

.boomer-ui .fleet-screen--wh6753a > * {
  position: relative;
  z-index: 1;
}

.boomer-ui .fleet-screen--wh6753a .screen-head {
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid #7f8caf;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 88% 28%, rgba(151, 174, 232, 0.22) 0 2px, transparent 3px) 0 0 / 18px 18px,
    repeating-linear-gradient(0deg, rgba(47, 70, 126, 0.04) 0 1px, transparent 1px 6px),
    linear-gradient(125deg, rgba(243, 246, 255, 0.91) 0%, rgba(213, 222, 244, 0.86) 58%, rgba(194, 204, 235, 0.83) 100%);
  box-shadow:
    0 7px 18px rgba(29, 45, 96, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(10px) saturate(1.04);
  backdrop-filter: blur(10px) saturate(1.04);
}

.boomer-ui .fleet-screen--wh6753a .screen-eyebrow {
  color: #365b98;
}

.boomer-ui .fleet-screen--wh6753a .primary-action,
.boomer-ui .fleet-screen--wh6753a .fleet-menu-button.active {
  border-color: #213c82;
  color: #ffffff;
  background: linear-gradient(180deg, #3a67b7 0%, #2d5298 52%, #213c82 100%);
  box-shadow:
    inset 0 1px 0 rgba(232, 240, 255, 0.64),
    0 2px 6px rgba(21, 36, 82, 0.24);
}

.boomer-ui .fleet-screen--wh6753a .fleet-menu {
  border-color: #7483aa;
  background:
    repeating-linear-gradient(0deg, rgba(50, 70, 126, 0.04) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, rgba(243, 246, 254, 0.91) 0%, rgba(198, 207, 232, 0.87) 100%);
  -webkit-backdrop-filter: blur(9px) saturate(1.03);
  backdrop-filter: blur(9px) saturate(1.03);
}

.boomer-ui .fleet-screen--wh6753a .fleet-menu-button:hover {
  color: #253763;
  background: rgba(239, 243, 255, 0.76);
}

.boomer-ui .fleet-screen--wh6753a .fleet-photo-hero--page-background .fleet-photo-hero__info {
  border-color: rgba(199, 214, 255, 0.48);
  background:
    radial-gradient(circle at 88% 28%, rgba(162, 126, 220, 0.2) 0 2px, transparent 3px) 0 0 / 18px 18px,
    repeating-linear-gradient(0deg, transparent 0 4px, rgba(220, 230, 255, 0.055) 4px 5px),
    linear-gradient(145deg, rgba(10, 18, 54, 0.92), rgba(38, 55, 111, 0.84));
  box-shadow:
    0 14px 34px rgba(8, 15, 46, 0.35),
    inset 0 1px 0 rgba(226, 235, 255, 0.22);
}

.boomer-ui .fleet-screen--wh6753a .fleet-photo-hero__rail {
  border-bottom-color: rgba(206, 220, 255, 0.34);
  color: rgba(231, 238, 255, 0.9);
}

.boomer-ui .fleet-screen--wh6753a .fleet-photo-hero__status {
  color: #cfe7ff;
}

.boomer-ui .fleet-screen--wh6753a .fleet-photo-hero__status i {
  border-color: rgba(226, 218, 244, 0.76);
  box-shadow: 0 0 0 4px rgba(142, 106, 207, 0.18);
}

.boomer-ui .fleet-screen--wh6753a .kpi-card,
.boomer-ui .fleet-screen--wh6753a .panel,
.boomer-ui .fleet-screen--wh6753a .table-panel {
  border-color: #8190b2;
  background: linear-gradient(145deg, rgba(247, 248, 253, 0.92) 0%, rgba(218, 224, 239, 0.9) 54%, rgba(238, 241, 249, 0.92) 100%);
  box-shadow:
    0 8px 20px rgba(24, 37, 84, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(8px) saturate(1.02);
  backdrop-filter: blur(8px) saturate(1.02);
}

.boomer-ui .fleet-screen--wh6753a .table-panel {
  background: linear-gradient(145deg, rgba(248, 249, 253, 0.96) 0%, rgba(222, 227, 241, 0.95) 54%, rgba(240, 243, 250, 0.96) 100%);
}

@media (min-width: 1181px) {
  .boomer-ui .fleet-screen--wh6753a .fleet-trips-preview {
    background: linear-gradient(
      145deg,
      rgba(247, 248, 253, 0.78) 0%,
      rgba(216, 223, 240, 0.7) 54%,
      rgba(238, 241, 249, 0.76) 100%
    );
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .boomer-ui .fleet-screen--wh6753a .fleet-trips-preview thead {
    background: linear-gradient(180deg, rgba(229, 234, 248, 0.9) 0%, rgba(193, 204, 230, 0.86) 100%);
  }

  .boomer-ui .fleet-screen--wh6753a .fleet-trips-preview td {
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.52);
  }
}

.boomer-ui .fleet-screen--wh6753a .kpi-card::before {
  background: linear-gradient(90deg, #213c82 0%, #5284ce 48%, #8e6acf 100%);
}

.boomer-ui .fleet-screen--wh6753a .ghost-action {
  border-color: #7686ad;
  color: #2d497e;
  background: linear-gradient(180deg, #f5f7fd 0%, #cfd8ec 100%);
}

.boomer-ui .fleet-screen--wh6753a thead {
  background: linear-gradient(180deg, rgba(228, 233, 247, 0.95) 0%, rgba(194, 204, 229, 0.94) 100%);
}

.boomer-ui .fleet-screen--wh6753a th {
  color: #394866;
}

.boomer-ui .fleet-screen--wh6753a tbody tr:hover {
  background: #e4e9f5;
}

.boomer-ui .fleet-screen--wh6753a .trip-code {
  border-color: #7a8fbd;
  color: #34558d;
  background: linear-gradient(180deg, #f5f7fd 0%, #d8e0f2 100%);
}

/* WH0685C turns the same photo-background system toward magenta night chrome. */
.boomer-ui .fleet-screen--wh0685c {
  --surface: #f8eef5;
  --surface-2: #ead7e5;
  --line: #b184a7;
  --line-strong: #7a4f76;
  --teal: #a52e6b;
  --teal-weak: #f3dce9;
  --boomer-blue: #bd326f;
  --boomer-blue-deep: #76265e;
  --boomer-lime: #d951a0;
  --boomer-lime-deep: #923079;
  --boomer-lime-pale: #f1c9e1;
  --shadow:
    0 9px 24px rgba(62, 19, 61, 0.17),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
  position: relative;
  isolation: isolate;
  min-width: 0;
  overflow: hidden;
  margin: -10px;
  padding: 10px;
  border: 1px solid rgba(112, 55, 101, 0.82);
  border-radius: 10px;
  background: #18092d;
  box-shadow:
    0 12px 30px rgba(43, 12, 48, 0.24),
    inset 0 1px 0 rgba(255, 222, 241, 0.3);
}

.boomer-ui .fleet-screen--wh0685c::before,
.boomer-ui .fleet-screen--wh0685c::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
}

.boomer-ui .fleet-screen--wh0685c::before {
  inset: -3px;
  background: url("./assets/wh0685c-volvo.jpg") 52% 50% / auto 88% no-repeat;
  filter: saturate(0.96) contrast(1.06) brightness(0.82);
  transform: scale(1.008);
}

.boomer-ui .fleet-screen--wh0685c::after {
  background:
    linear-gradient(180deg, rgba(255, 210, 236, 0.14) 0%, rgba(67, 20, 73, 0.08) 42%, rgba(17, 7, 34, 0.58) 100%),
    linear-gradient(90deg, rgba(47, 8, 54, 0.28) 0%, rgba(180, 27, 102, 0.07) 54%, rgba(25, 45, 112, 0.2) 100%),
    repeating-linear-gradient(0deg, transparent 0 5px, rgba(255, 222, 241, 0.05) 5px 6px);
}

.boomer-ui .fleet-screen--wh0685c > * {
  position: relative;
  z-index: 1;
}

.boomer-ui .fleet-screen--wh0685c .screen-head {
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid #9e7296;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 88% 28%, rgba(221, 85, 158, 0.2) 0 2px, transparent 3px) 0 0 / 18px 18px,
    repeating-linear-gradient(0deg, rgba(110, 43, 91, 0.04) 0 1px, transparent 1px 6px),
    linear-gradient(125deg, rgba(253, 245, 250, 0.91) 0%, rgba(235, 212, 228, 0.86) 58%, rgba(221, 194, 218, 0.83) 100%);
  box-shadow:
    0 7px 18px rgba(76, 28, 72, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(10px) saturate(1.04);
  backdrop-filter: blur(10px) saturate(1.04);
}

.boomer-ui .fleet-screen--wh0685c .screen-eyebrow {
  color: #8d275f;
}

.boomer-ui .fleet-screen--wh0685c .primary-action,
.boomer-ui .fleet-screen--wh0685c .fleet-menu-button.active {
  border-color: #5c2058;
  color: #ffffff;
  background: linear-gradient(180deg, #a52e6b 0%, #81255f 52%, #5c2058 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 225, 242, 0.58),
    0 2px 6px rgba(61, 17, 57, 0.25);
}

.boomer-ui .fleet-screen--wh0685c .fleet-menu {
  border-color: #97708f;
  background:
    repeating-linear-gradient(0deg, rgba(102, 41, 86, 0.04) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, rgba(252, 246, 250, 0.91) 0%, rgba(225, 204, 220, 0.87) 100%);
  -webkit-backdrop-filter: blur(9px) saturate(1.03);
  backdrop-filter: blur(9px) saturate(1.03);
}

.boomer-ui .fleet-screen--wh0685c .fleet-menu-button:hover {
  color: #5d214f;
  background: rgba(255, 242, 250, 0.76);
}

.boomer-ui .fleet-screen--wh0685c .fleet-photo-hero--page-background .fleet-photo-hero__info {
  border-color: rgba(255, 202, 232, 0.46);
  background:
    radial-gradient(circle at 88% 28%, rgba(226, 70, 148, 0.22) 0 2px, transparent 3px) 0 0 / 18px 18px,
    repeating-linear-gradient(0deg, transparent 0 4px, rgba(255, 220, 241, 0.055) 4px 5px),
    linear-gradient(145deg, rgba(25, 8, 42, 0.93), rgba(99, 25, 77, 0.84));
  box-shadow:
    0 14px 34px rgba(35, 8, 41, 0.36),
    inset 0 1px 0 rgba(255, 224, 243, 0.2);
}

.boomer-ui .fleet-screen--wh0685c .fleet-photo-hero__rail {
  border-bottom-color: rgba(255, 211, 236, 0.34);
  color: rgba(255, 232, 245, 0.9);
}

.boomer-ui .fleet-screen--wh0685c .fleet-photo-hero__status {
  color: #ffd0ea;
}

.boomer-ui .fleet-screen--wh0685c .fleet-photo-hero__status i {
  border-color: rgba(245, 202, 226, 0.76);
  box-shadow: 0 0 0 4px rgba(217, 81, 160, 0.2);
}

.boomer-ui .fleet-screen--wh0685c .kpi-card,
.boomer-ui .fleet-screen--wh0685c .panel,
.boomer-ui .fleet-screen--wh0685c .table-panel {
  border-color: #a07a99;
  background: linear-gradient(145deg, rgba(252, 247, 250, 0.92) 0%, rgba(233, 216, 228, 0.9) 54%, rgba(247, 238, 245, 0.92) 100%);
  box-shadow:
    0 8px 20px rgba(67, 22, 62, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(8px) saturate(1.02);
  backdrop-filter: blur(8px) saturate(1.02);
}

.boomer-ui .fleet-screen--wh0685c .table-panel {
  background: linear-gradient(145deg, rgba(253, 249, 252, 0.96) 0%, rgba(236, 223, 232, 0.95) 54%, rgba(248, 241, 246, 0.96) 100%);
}

@media (min-width: 1181px) {
  .boomer-ui .fleet-screen--wh0685c .fleet-trips-preview {
    background: linear-gradient(
      145deg,
      rgba(253, 248, 251, 0.77) 0%,
      rgba(232, 214, 227, 0.69) 54%,
      rgba(247, 237, 244, 0.75) 100%
    );
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .boomer-ui .fleet-screen--wh0685c .fleet-trips-preview thead {
    background: linear-gradient(180deg, rgba(246, 232, 241, 0.9) 0%, rgba(218, 191, 211, 0.86) 100%);
  }

  .boomer-ui .fleet-screen--wh0685c .fleet-trips-preview td {
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.54);
  }
}

.boomer-ui .fleet-screen--wh0685c .kpi-card::before {
  background: linear-gradient(90deg, #6b225b 0%, #d34b8e 48%, #6744a5 100%);
}

.boomer-ui .fleet-screen--wh0685c .ghost-action {
  border-color: #9a7293;
  color: #74275e;
  background: linear-gradient(180deg, #fdf7fb 0%, #ead3e3 100%);
}

.boomer-ui .fleet-screen--wh0685c thead {
  background: linear-gradient(180deg, rgba(246, 234, 242, 0.95) 0%, rgba(218, 195, 212, 0.94) 100%);
}

.boomer-ui .fleet-screen--wh0685c th {
  color: #5b3a52;
}

.boomer-ui .fleet-screen--wh0685c tbody tr:hover {
  background: #f1e2ec;
}

.boomer-ui .fleet-screen--wh0685c .trip-code {
  border-color: #ad79a0;
  color: #812a65;
  background: linear-gradient(180deg, #fdf7fb 0%, #edd8e6 100%);
}

/* WH4713C keeps the landscape mountain photo tall, calm and slightly pulled back. */
.boomer-ui .fleet-screen--wh4713c {
  --surface: #f4f3fa;
  --surface-2: #e0e1ef;
  --line: #9298b5;
  --line-strong: #5c678c;
  --teal: #5d6eae;
  --teal-weak: #e1e5f4;
  --boomer-blue: #6678bd;
  --boomer-blue-deep: #354a83;
  --boomer-lime: #aa8dcd;
  --boomer-lime-deep: #71569d;
  --boomer-lime-pale: #e5dbf0;
  --shadow:
    0 9px 24px rgba(31, 37, 83, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
  position: relative;
  isolation: isolate;
  min-width: 0;
  overflow: hidden;
  margin: -10px;
  padding: 10px;
  border: 1px solid rgba(82, 91, 137, 0.82);
  border-radius: 10px;
  background: #12183b;
  box-shadow:
    0 12px 30px rgba(24, 29, 71, 0.22),
    inset 0 1px 0 rgba(229, 231, 255, 0.32);
}

.boomer-ui .fleet-screen--wh4713c::before,
.boomer-ui .fleet-screen--wh4713c::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
}

.boomer-ui .fleet-screen--wh4713c::before {
  inset: -3px;
  background: url("./assets/wh4713c-volvo.png") 52% 50% / auto 88% no-repeat;
  filter: saturate(0.9) contrast(1.05) brightness(0.82);
  transform: scale(1.008);
}

.boomer-ui .fleet-screen--wh4713c::after {
  background:
    linear-gradient(180deg, rgba(232, 230, 255, 0.14) 0%, rgba(47, 55, 104, 0.08) 42%, rgba(12, 17, 48, 0.57) 100%),
    linear-gradient(90deg, rgba(28, 35, 80, 0.27) 0%, rgba(100, 112, 178, 0.06) 54%, rgba(117, 83, 157, 0.16) 100%),
    repeating-linear-gradient(0deg, transparent 0 5px, rgba(232, 231, 255, 0.05) 5px 6px);
}

.boomer-ui .fleet-screen--wh4713c > * {
  position: relative;
  z-index: 1;
}

.boomer-ui .fleet-screen--wh4713c .screen-head {
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid #858dab;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 88% 28%, rgba(158, 142, 203, 0.21) 0 2px, transparent 3px) 0 0 / 18px 18px,
    repeating-linear-gradient(0deg, rgba(63, 72, 122, 0.04) 0 1px, transparent 1px 6px),
    linear-gradient(125deg, rgba(248, 248, 254, 0.91) 0%, rgba(221, 224, 240, 0.86) 58%, rgba(204, 207, 230, 0.83) 100%);
  box-shadow:
    0 7px 18px rgba(37, 45, 93, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(10px) saturate(1.04);
  backdrop-filter: blur(10px) saturate(1.04);
}

.boomer-ui .fleet-screen--wh4713c .screen-eyebrow {
  color: #4d5f9a;
}

.boomer-ui .fleet-screen--wh4713c .primary-action,
.boomer-ui .fleet-screen--wh4713c .fleet-menu-button.active {
  border-color: #2c3f72;
  color: #ffffff;
  background: linear-gradient(180deg, #526aa8 0%, #40588f 52%, #2c3f72 100%);
  box-shadow:
    inset 0 1px 0 rgba(232, 235, 255, 0.62),
    0 2px 6px rgba(25, 34, 77, 0.24);
}

.boomer-ui .fleet-screen--wh4713c .fleet-menu {
  border-color: #7b84a8;
  background:
    repeating-linear-gradient(0deg, rgba(63, 72, 126, 0.04) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, rgba(248, 248, 253, 0.91) 0%, rgba(207, 211, 230, 0.87) 100%);
  -webkit-backdrop-filter: blur(9px) saturate(1.03);
  backdrop-filter: blur(9px) saturate(1.03);
}

.boomer-ui .fleet-screen--wh4713c .fleet-menu-button:hover {
  color: #34426f;
  background: rgba(245, 245, 255, 0.76);
}

.boomer-ui .fleet-screen--wh4713c .fleet-photo-hero--page-background .fleet-photo-hero__info {
  border-color: rgba(215, 215, 255, 0.46);
  background:
    radial-gradient(circle at 88% 28%, rgba(169, 140, 205, 0.2) 0 2px, transparent 3px) 0 0 / 18px 18px,
    repeating-linear-gradient(0deg, transparent 0 4px, rgba(226, 228, 255, 0.055) 4px 5px),
    linear-gradient(145deg, rgba(15, 21, 55, 0.93), rgba(54, 64, 119, 0.84));
  box-shadow:
    0 14px 34px rgba(13, 18, 49, 0.35),
    inset 0 1px 0 rgba(229, 231, 255, 0.2);
}

.boomer-ui .fleet-screen--wh4713c .fleet-photo-hero__rail {
  border-bottom-color: rgba(221, 222, 255, 0.34);
  color: rgba(238, 238, 255, 0.9);
}

.boomer-ui .fleet-screen--wh4713c .fleet-photo-hero__status {
  color: #e7d8ff;
}

.boomer-ui .fleet-screen--wh4713c .fleet-photo-hero__status i {
  border-color: rgba(229, 216, 246, 0.76);
  box-shadow: 0 0 0 4px rgba(170, 141, 205, 0.19);
}

.boomer-ui .fleet-screen--wh4713c .kpi-card,
.boomer-ui .fleet-screen--wh4713c .panel,
.boomer-ui .fleet-screen--wh4713c .table-panel {
  border-color: #8991ae;
  background: linear-gradient(145deg, rgba(249, 249, 253, 0.92) 0%, rgba(223, 224, 237, 0.9) 54%, rgba(242, 242, 249, 0.92) 100%);
  box-shadow:
    0 8px 20px rgba(30, 37, 82, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(8px) saturate(1.02);
  backdrop-filter: blur(8px) saturate(1.02);
}

.boomer-ui .fleet-screen--wh4713c .table-panel {
  background: linear-gradient(145deg, rgba(249, 249, 253, 0.96) 0%, rgba(225, 227, 240, 0.95) 54%, rgba(243, 244, 250, 0.96) 100%);
}

@media (min-width: 1181px) {
  .boomer-ui .fleet-screen--wh4713c .fleet-trips-preview {
    background: linear-gradient(
      145deg,
      rgba(248, 248, 253, 0.77) 0%,
      rgba(218, 221, 238, 0.69) 54%,
      rgba(241, 241, 249, 0.75) 100%
    );
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .boomer-ui .fleet-screen--wh4713c .fleet-trips-preview thead {
    background: linear-gradient(180deg, rgba(233, 234, 246, 0.9) 0%, rgba(203, 207, 229, 0.86) 100%);
  }

  .boomer-ui .fleet-screen--wh4713c .fleet-trips-preview td {
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.54);
  }
}

.boomer-ui .fleet-screen--wh4713c .kpi-card::before {
  background: linear-gradient(90deg, #354a83 0%, #7187c6 48%, #aa8dcd 100%);
}

.boomer-ui .fleet-screen--wh4713c .ghost-action {
  border-color: #8189aa;
  color: #3f4d82;
  background: linear-gradient(180deg, #fafafe 0%, #d9dced 100%);
}

.boomer-ui .fleet-screen--wh4713c thead {
  background: linear-gradient(180deg, rgba(236, 237, 247, 0.95) 0%, rgba(204, 208, 228, 0.94) 100%);
}

.boomer-ui .fleet-screen--wh4713c th {
  color: #434b67;
}

.boomer-ui .fleet-screen--wh4713c tbody tr:hover {
  background: #e8e9f3;
}

.boomer-ui .fleet-screen--wh4713c .trip-code {
  border-color: #8792b8;
  color: #42588f;
  background: linear-gradient(180deg, #fafafe 0%, #dce0f0 100%);
}

/* WH8315A uses city-night steel, cyan light and a restrained traffic-red accent. */
.boomer-ui .fleet-screen--wh8315a {
  --surface: #eef7f8;
  --surface-2: #d5e7eb;
  --line: #789eaa;
  --line-strong: #456c79;
  --muted: #283d44;
  --ink-soft: #20343c;
  --teal: #187f9b;
  --teal-weak: #d7f0f4;
  --boomer-blue: #247d99;
  --boomer-blue-deep: #104e68;
  --boomer-lime: #62cedd;
  --boomer-lime-deep: #258a9d;
  --boomer-lime-pale: #d3f3f6;
  --shadow:
    0 9px 24px rgba(16, 52, 66, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
  position: relative;
  isolation: isolate;
  min-width: 0;
  overflow: hidden;
  margin: -10px;
  padding: 10px;
  border: 1px solid rgba(54, 91, 104, 0.84);
  border-radius: 10px;
  background: #071c2c;
  box-shadow:
    0 12px 30px rgba(5, 32, 45, 0.24),
    inset 0 1px 0 rgba(219, 249, 255, 0.32);
}

.boomer-ui .fleet-screen--wh8315a::before,
.boomer-ui .fleet-screen--wh8315a::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
}

.boomer-ui .fleet-screen--wh8315a::before {
  inset: -3px;
  background: url("./assets/wh8315a-volvo.jpg") 47% 50% / auto 92% no-repeat;
  filter: saturate(0.92) contrast(1.06) brightness(0.79);
  transform: scale(1.008);
}

.boomer-ui .fleet-screen--wh8315a::after {
  background:
    linear-gradient(180deg, rgba(211, 245, 250, 0.14) 0%, rgba(9, 43, 60, 0.08) 42%, rgba(3, 18, 29, 0.58) 100%),
    linear-gradient(90deg, rgba(3, 24, 38, 0.29) 0%, rgba(18, 103, 128, 0.06) 54%, rgba(65, 200, 221, 0.14) 100%),
    repeating-linear-gradient(0deg, transparent 0 5px, rgba(218, 249, 255, 0.05) 5px 6px);
}

.boomer-ui .fleet-screen--wh8315a > * {
  position: relative;
  z-index: 1;
}

.boomer-ui .fleet-screen--wh8315a .screen-head {
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid #7395a1;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 88% 28%, rgba(72, 190, 207, 0.2) 0 2px, transparent 3px) 0 0 / 18px 18px,
    repeating-linear-gradient(0deg, rgba(29, 93, 111, 0.04) 0 1px, transparent 1px 6px),
    linear-gradient(125deg, rgba(244, 251, 252, 0.91) 0%, rgba(209, 231, 235, 0.86) 58%, rgba(188, 219, 225, 0.83) 100%);
  box-shadow:
    0 7px 18px rgba(19, 66, 82, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(10px) saturate(1.04);
  backdrop-filter: blur(10px) saturate(1.04);
}

.boomer-ui .fleet-screen--wh8315a .screen-eyebrow {
  color: #176d83;
}

.boomer-ui .fleet-screen--wh8315a .primary-action,
.boomer-ui .fleet-screen--wh8315a .fleet-menu-button.active {
  border-color: #104e68;
  color: #ffffff;
  background: linear-gradient(180deg, #247d99 0%, #176682 52%, #104e68 100%);
  box-shadow:
    inset 0 1px 0 rgba(225, 250, 255, 0.62),
    0 2px 6px rgba(7, 47, 63, 0.24);
}

.boomer-ui .fleet-screen--wh8315a .fleet-menu {
  border-color: #6b8f9c;
  background:
    repeating-linear-gradient(0deg, rgba(25, 89, 106, 0.04) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, rgba(243, 250, 251, 0.91) 0%, rgba(196, 220, 225, 0.87) 100%);
  -webkit-backdrop-filter: blur(9px) saturate(1.03);
  backdrop-filter: blur(9px) saturate(1.03);
}

.boomer-ui .fleet-screen--wh8315a .fleet-menu-button:hover {
  color: #194b5a;
  background: rgba(239, 252, 254, 0.76);
}

.boomer-ui .fleet-screen--wh8315a .fleet-photo-hero--page-background .fleet-photo-hero__info {
  border-color: rgba(183, 235, 245, 0.46);
  background:
    radial-gradient(circle at 88% 28%, rgba(74, 198, 215, 0.2) 0 2px, transparent 3px) 0 0 / 18px 18px,
    repeating-linear-gradient(0deg, transparent 0 4px, rgba(219, 249, 255, 0.055) 4px 5px),
    linear-gradient(145deg, rgba(5, 24, 37, 0.93), rgba(13, 76, 99, 0.84));
  box-shadow:
    0 14px 34px rgba(3, 24, 35, 0.36),
    inset 0 1px 0 rgba(218, 248, 255, 0.2);
}

.boomer-ui .fleet-screen--wh8315a .fleet-photo-hero__rail {
  border-bottom-color: rgba(198, 239, 247, 0.34);
  color: rgba(225, 247, 252, 0.9);
}

.boomer-ui .fleet-screen--wh8315a .fleet-photo-hero__status {
  color: #9cebf4;
}

.boomer-ui .fleet-screen--wh8315a .fleet-photo-hero__status i {
  border-color: rgba(204, 244, 249, 0.76);
  box-shadow: 0 0 0 4px rgba(98, 206, 221, 0.19);
}

.boomer-ui .fleet-screen--wh8315a .kpi-card,
.boomer-ui .fleet-screen--wh8315a .panel,
.boomer-ui .fleet-screen--wh8315a .table-panel {
  border-color: #7395a1;
  background: linear-gradient(145deg, rgba(246, 251, 252, 0.92) 0%, rgba(213, 231, 235, 0.9) 54%, rgba(237, 246, 248, 0.92) 100%);
  box-shadow:
    0 8px 20px rgba(15, 58, 72, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(8px) saturate(1.02);
  backdrop-filter: blur(8px) saturate(1.02);
}

.boomer-ui .fleet-screen--wh8315a .table-panel {
  background: linear-gradient(145deg, rgba(247, 251, 252, 0.96) 0%, rgba(218, 233, 237, 0.95) 54%, rgba(239, 247, 249, 0.96) 100%);
}

@media (min-width: 1181px) {
  .boomer-ui .fleet-screen--wh8315a .fleet-trips-preview {
    background: linear-gradient(
      145deg,
      rgba(246, 250, 251, 0.77) 0%,
      rgba(205, 226, 232, 0.69) 54%,
      rgba(234, 244, 247, 0.75) 100%
    );
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .boomer-ui .fleet-screen--wh8315a .fleet-trips-preview thead {
    background: linear-gradient(180deg, rgba(224, 240, 244, 0.9) 0%, rgba(183, 210, 218, 0.86) 100%);
  }

  .boomer-ui .fleet-screen--wh8315a .fleet-trips-preview td {
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.54);
  }
}

.boomer-ui .fleet-screen--wh8315a .kpi-card::before {
  background: linear-gradient(90deg, #104e68 0%, #62cedd 72%, #e46d57 100%);
}

.boomer-ui .fleet-screen--wh8315a .ghost-action {
  border-color: #7194a0;
  color: #18566a;
  background: linear-gradient(180deg, #f6fcfd 0%, #d2e8ec 100%);
}

.boomer-ui .fleet-screen--wh8315a thead {
  background: linear-gradient(180deg, rgba(226, 240, 244, 0.95) 0%, rgba(190, 213, 219, 0.94) 100%);
}

.boomer-ui .fleet-screen--wh8315a th {
  color: #334d56;
}

.boomer-ui .fleet-screen--wh8315a tbody tr:hover {
  background: #e1f0f3;
}

.boomer-ui .fleet-screen--wh8315a .trip-code {
  border-color: #78a2ae;
  color: #17657a;
  background: linear-gradient(180deg, #f6fcfd 0%, #d7ebef 100%);
}

@media (max-width: 1180px) {
  .boomer-ui .grid-kpis {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (min-width: 821px) and (max-width: 1020px) {
  .boomer-ui .fleet-photo-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .boomer-ui .fleet-photo-hero__info {
    grid-row: 2;
    min-height: 250px;
  }

  .boomer-ui .fleet-photo-hero__visual {
    grid-row: 1;
    height: clamp(280px, 42vw, 340px);
    min-height: 0;
    border-bottom: 1px solid rgba(225, 238, 255, 0.28);
    border-left: 0;
  }
}

@media (max-width: 820px) {
  body.boomer-ui {
    padding: 8px;
  }

  .boomer-ui .app-shell {
    min-height: calc(100vh - 16px);
  }

  .boomer-ui .sidebar {
    top: 0;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .boomer-ui .nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .boomer-ui .topbar {
    top: 0;
  }

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

  .boomer-ui .fleet-photo-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .boomer-ui .fleet-photo-hero__info {
    grid-row: 2;
    min-height: 240px;
  }

  .boomer-ui .fleet-photo-hero__visual {
    grid-row: 1;
    height: clamp(270px, 42vw, 340px);
    min-height: 0;
    border-bottom: 1px solid rgba(225, 238, 255, 0.28);
    border-left: 0;
  }

  .boomer-ui .content::before {
    display: none;
  }

  .boomer-ui .fleet-screen--wh5870a::before {
    background:
      linear-gradient(180deg, transparent 0 16%, rgba(23, 56, 45, 0.72) 29%, #17382d 48%),
      url("./assets/wh5870a-volvo.jpg") 58% 0 / auto 520px no-repeat;
  }

  .boomer-ui .fleet-screen--wh6753a::before {
    background:
      linear-gradient(180deg, transparent 0 16%, rgba(7, 17, 57, 0.75) 29%, #071139 50%),
      url("./assets/wh6753a-volvo.jpg") 56% 0 / auto 520px no-repeat;
  }

  .boomer-ui .fleet-screen--wh0685c::before {
    background:
      linear-gradient(180deg, transparent 0 16%, rgba(24, 9, 45, 0.74) 29%, #18092d 50%),
      url("./assets/wh0685c-volvo.jpg") 52% 0 / auto 520px no-repeat;
  }

  .boomer-ui .fleet-screen--wh4713c::before {
    background:
      linear-gradient(180deg, transparent 0 15%, rgba(18, 24, 59, 0.72) 29%, #12183b 50%),
      url("./assets/wh4713c-volvo.png") 57% 0 / auto 520px no-repeat;
  }

  .boomer-ui .fleet-screen--wh8315a::before {
    background:
      linear-gradient(180deg, transparent 0 15%, rgba(7, 28, 44, 0.73) 29%, #071c2c 50%),
      url("./assets/wh8315a-volvo.jpg") 48% 0 / auto 520px no-repeat;
  }

  .boomer-ui .fleet-screen--photo-background .fleet-photo-hero--page-background {
    min-height: 340px;
    padding: 12px;
  }

  .boomer-ui .fleet-screen--photo-background .fleet-photo-hero--page-background .fleet-photo-hero__info {
    width: 100%;
    min-height: 205px;
  }
}

@media (max-width: 540px) {
  .boomer-ui .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .boomer-ui .grid-kpis {
    grid-template-columns: 1fr;
  }

  .boomer-ui .fleet-photo-hero {
    min-height: 0;
  }

  .boomer-ui .fleet-photo-hero__info {
    min-height: 230px;
    padding: 14px;
  }

  .boomer-ui .fleet-photo-hero__visual {
    height: 250px;
  }

  .boomer-ui .fleet-photo-hero__rail {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .boomer-ui .fleet-photo-hero__identity h2 {
    font-size: 48px;
  }

  .boomer-ui .fleet-screen--photo-background {
    margin: -7px;
    padding: 7px;
  }

  .boomer-ui .fleet-screen--photo-background .fleet-photo-hero--page-background {
    min-height: 320px;
    padding: 9px;
  }

  .boomer-ui .fleet-screen--photo-background .fleet-photo-hero--page-background .fleet-photo-hero__info {
    min-height: 196px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .boomer-ui *,
  .boomer-ui *::before,
  .boomer-ui *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.boomer-ui,
.boomer-ui * {
  letter-spacing: 0 !important;
}

/* Expense allocation registry */
.expense-registry-kpis {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 14px;
}

.expense-registry-toolbar {
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.expense-registry-toolbar .segment span {
  display: inline-grid;
  min-width: 22px;
  min-height: 20px;
  margin-left: 4px;
  padding: 1px 6px;
  place-items: center;
  border-radius: 99px;
  color: inherit;
  background: rgba(102, 117, 124, 0.12);
  font-size: 11px;
}

.expense-registry-toolbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.expense-registry-toolbar-meta strong {
  color: var(--text);
}

.expense-registry-banner {
  margin: -2px 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
}

.expense-registry-banner.bad {
  border-color: #f1c0bc;
  color: var(--red);
  background: var(--red-weak);
}

.expense-registry-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.expense-registry-intro h2 {
  margin: 0;
  font-size: 17px;
}

.expense-registry-intro p {
  max-width: 760px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.expense-registry-table-scroll {
  max-height: min(720px, calc(100vh - 270px));
}

.expense-registry-table {
  min-width: 1720px;
  table-layout: fixed;
}

.expense-registry-table th:nth-child(1) {
  width: 205px;
}

.expense-registry-table th:nth-child(2) {
  width: 250px;
}

.expense-registry-table th:nth-child(3) {
  width: 115px;
}

.expense-registry-table th:nth-child(4),
.expense-registry-table th:nth-child(5),
.expense-registry-table th:nth-child(6) {
  width: 220px;
}

.expense-registry-table th:nth-child(7) {
  width: 270px;
}

.receipt-reconciliation-table {
  min-width: 1620px;
}

.receipt-reconciliation-table th:nth-child(1) {
  width: 235px;
}

.receipt-reconciliation-table th:nth-child(2) {
  width: 210px;
}

.receipt-reconciliation-table th:nth-child(3) {
  width: 285px;
}

.receipt-reconciliation-table th:nth-child(4) {
  width: 300px;
}

.receipt-reconciliation-table th:nth-child(5) {
  width: 310px;
}

.receipt-reconciliation-table th:nth-child(6) {
  width: 280px;
}

.receipt-registry-row-editing {
  background: color-mix(in srgb, var(--teal) 5%, var(--surface));
}

.receipt-assignment-control {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.receipt-assignment-help {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.receipt-registry-actions {
  align-items: stretch;
}

.receipt-registry-actions .ghost-action:last-child {
  color: var(--red);
}

.financial-operations-toolbar {
  align-items: center;
}

.financial-operations-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.financial-operations-pagination:last-child {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.financial-operations-pagination label,
.financial-operations-pagination .expense-registry-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.financial-operations-pagination select {
  min-height: 34px;
  padding: 5px 28px 5px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
}

.registry-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.registry-pagination:last-child {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.registry-pagination label,
.registry-pagination .expense-registry-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.registry-pagination select {
  min-height: 34px;
  padding: 5px 28px 5px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
}

.financial-operations-table-scroll {
  max-height: min(760px, calc(100vh - 250px));
}

.financial-operations-table {
  min-width: 1960px;
}

.financial-operations-table th:nth-child(1) { width: 190px; }
.financial-operations-table th:nth-child(2) { width: 285px; }
.financial-operations-table th:nth-child(3) { width: 145px; }
.financial-operations-table th:nth-child(4) { width: 205px; }
.financial-operations-table th:nth-child(5) { width: 220px; }
.financial-operations-table th:nth-child(6) { width: 210px; }
.financial-operations-table th:nth-child(7) { width: 245px; }
.financial-operations-table th:nth-child(8) { width: 280px; }

.financial-operation-row.needs-review {
  box-shadow: inset 3px 0 0 var(--amber);
}

.financial-operation-row.resolved {
  box-shadow: inset 3px 0 0 var(--green);
}

.financial-operation-row.editing {
  background: color-mix(in srgb, var(--teal) 5%, var(--surface));
}

.financial-operation-amount {
  display: block;
  white-space: nowrap;
}

.financial-operation-amount.negative {
  color: var(--red);
}

.financial-operation-amount.positive {
  color: var(--green);
}

.expense-registry-table td {
  padding: 14px 12px;
  vertical-align: top;
}

.expense-registry-row.needs-review {
  box-shadow: inset 3px 0 0 var(--amber);
}

.expense-registry-row.resolved {
  box-shadow: inset 3px 0 0 var(--green);
}

.expense-registry-source,
.expense-registry-description,
.expense-registry-decision,
.expense-registry-status {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.expense-registry-source > span,
.expense-registry-auto-note,
.expense-registry-status-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.expense-registry-source > .expense-registry-management-review {
  display: grid;
  gap: 2px;
  margin-top: 2px;
  padding: 7px 8px;
  border: 1px solid #e6bd5d;
  border-radius: 8px;
  color: #6e4b00;
  background: #fff7dc;
  line-height: 1.3;
}

.expense-registry-management-review strong {
  font-size: 11px;
}

.expense-registry-management-review small {
  color: #805d14;
  font-size: 10px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.expense-registry-description > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.expense-registry-description > strong {
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.expense-registry-warning,
.expense-registry-error {
  color: var(--red);
  font-size: 11px;
  line-height: 1.4;
}

.expense-assignment-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.expense-assignment-field > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.expense-assignment-select,
.expense-assignment-note {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  outline: none;
}

.expense-assignment-select:focus,
.expense-assignment-note:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(23, 118, 111, 0.13);
}

.expense-assignment-select:disabled,
.expense-assignment-note:disabled {
  color: var(--quiet);
  background: var(--surface-2);
  cursor: not-allowed;
}

.expense-assignment-note-field {
  margin-top: 2px;
}

.expense-registry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}

.expense-registry-actions button {
  min-height: 34px;
  padding-inline: 10px;
  font-size: 12px;
}

.expense-registry-actions button:disabled,
.expense-registry-toolbar button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.expense-registry-empty {
  min-height: 220px;
}

@media (max-width: 1180px) {
  .expense-registry-kpis {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }

  .expense-registry-table-scroll {
    max-height: 660px;
  }
}

@media (max-width: 820px) {
  .expense-registry-kpis {
    grid-template-columns: 1fr;
  }

  .expense-registry-toolbar,
  .expense-registry-toolbar-meta,
  .expense-registry-intro {
    align-items: stretch;
    flex-direction: column;
  }

  .expense-registry-toolbar .segmented {
    width: 100%;
  }

  .expense-registry-toolbar .segment {
    flex: 1 1 145px;
  }

  .registry-pagination {
    align-items: stretch;
    justify-content: flex-start;
    flex-direction: column;
  }

  .expense-registry-table-scroll {
    max-height: none;
    overflow: visible;
  }

  .expense-registry-table {
    display: block;
    min-width: 0;
    table-layout: auto;
  }

  .expense-registry-table thead {
    display: none;
  }

  .expense-registry-table tbody {
    display: grid;
  }

  .expense-registry-table tbody,
  .expense-registry-table tr,
  .expense-registry-table td {
    width: 100%;
  }

  .expense-registry-table tr {
    display: grid;
    padding: 12px;
    border-bottom: 1px solid var(--line);
  }

  .expense-registry-table td {
    display: grid;
    grid-template-columns: minmax(92px, 0.32fr) minmax(0, 1fr);
    gap: 12px;
    padding: 9px 3px;
    border: 0;
    text-align: left;
  }

  .expense-registry-table td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .expense-registry-table td[colspan] {
    display: block;
  }

  .expense-registry-table td[colspan]::before {
    display: none;
  }
}

@media (max-width: 520px) {
  .expense-registry-table td {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .expense-registry-actions button {
    flex: 1 1 120px;
  }
}

/* v0.3: local operational screens */
.freshness-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: var(--shadow);
}

.freshness-bar > strong {
  color: var(--text);
  font-size: 12px;
}

.freshness-bar > span:last-child {
  color: var(--muted);
  font-size: 11px;
}

.freshness-bar--bad {
  border-color: color-mix(in srgb, var(--red) 45%, var(--line));
}

.freshness-bar--wait {
  border-color: color-mix(in srgb, var(--amber) 45%, var(--line));
}

.today-map-panel {
  position: relative;
  min-height: 430px;
  margin-top: 14px;
}

.today-map-panel .fleet-map {
  min-height: 430px;
}

.vehicle-card--photo {
  overflow: hidden;
}

.vehicle-card-photo {
  display: block;
  width: calc(100% + 32px);
  height: 156px;
  margin: -16px -16px 14px;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.9) contrast(1.04);
}

.trip-detail-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.trip-detail-kpis .kpi-card {
  min-width: 0;
}

.map-panel {
  position: relative;
}

.map-overlay-empty {
  position: absolute;
  z-index: 500;
  left: 50%;
  top: 50%;
  max-width: 280px;
  transform: translate(-50%, -50%);
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  color: var(--muted);
  text-align: center;
  box-shadow: var(--shadow);
}

.month-close-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .trip-detail-kpis {
    grid-template-columns: 1fr;
  }

  .today-map-panel,
  .today-map-panel .fleet-map {
    min-height: 340px;
  }
}

.action-dialog[hidden] {
  display: none;
}

.action-dialog {
  position: fixed;
  z-index: 3000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
}

.action-dialog-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(11, 18, 15, 0.62);
  cursor: default;
}

.action-dialog-card {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(880px, calc(100vh - 44px));
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(4, 12, 8, 0.38);
}

.action-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.action-dialog-head h2 {
  margin: 3px 0 0;
  font-size: 21px;
}

.action-form,
.inline-action-form {
  display: grid;
  gap: 14px;
}

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

.action-field {
  display: grid;
  gap: 6px;
}

.action-field--wide {
  grid-column: 1 / -1;
}

.action-field > span,
.action-field > label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.action-field input,
.action-field select,
.action-field textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
}

.action-field textarea {
  min-height: 104px;
  resize: vertical;
}

.action-field input:focus,
.action-field select:focus,
.action-field textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--teal) 38%, transparent);
  outline-offset: 1px;
}

.action-form-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.estimate-preview,
.estimate-confirmation {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--teal);
  background: color-mix(in srgb, var(--teal) 7%, var(--surface));
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.estimate-preview.wait,
.estimate-confirmation.wait {
  border-left-color: var(--amber);
  background: color-mix(in srgb, var(--amber) 8%, var(--surface));
}

.estimate-preview.ok,
.estimate-confirmation.ok {
  border-left-color: var(--green);
  background: color-mix(in srgb, var(--green) 8%, var(--surface));
}

.estimate-preview.bad,
.estimate-confirmation.bad {
  border-left-color: var(--red);
  background: color-mix(in srgb, var(--red) 7%, var(--surface));
}

.estimate-confirmation span,
.estimate-confirmation small {
  color: var(--muted);
}

.estimate-confirmation strong {
  font-size: 24px;
  letter-spacing: -0.02em;
}

.action-form-error {
  padding: 9px 10px;
  border: 1px solid var(--red);
  background: var(--red-weak);
  color: var(--red);
  font-size: 12px;
}

.action-form-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
  padding-top: 4px;
}

.financial-operation-workflow {
  gap: 16px;
}

.financial-operation-workflow-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--teal);
  background: color-mix(in srgb, var(--teal) 6%, var(--surface));
}

.financial-operation-workflow-summary > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.financial-operation-workflow-summary span {
  color: var(--muted);
  font-size: 11px;
}

.financial-operation-workflow-summary strong {
  overflow-wrap: anywhere;
}

.financial-operation-workflow-summary .financial-operation-amount {
  white-space: nowrap;
  font-size: 18px;
}

.financial-operation-workflow-section[hidden] {
  display: none;
}

.financial-operation-workflow-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 62%, transparent);
}

.financial-operation-workflow-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.financial-operation-workflow-section-head > div {
  display: grid;
  gap: 3px;
}

.financial-operation-workflow-section-head > div > span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.financial-operation-inline-action {
  align-content: end;
}

.financial-operation-document-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

@media (min-width: 860px) {
  .action-dialog-card:has(.financial-operation-workflow) {
    width: min(940px, 100%);
  }
}

@media (max-width: 640px) {
  .financial-operation-workflow-summary {
    grid-template-columns: 1fr;
  }

  .financial-operation-workflow-summary .num {
    text-align: left;
  }

  .financial-operation-workflow-section-head {
    display: grid;
  }
}

.billing-form-panel,
.month-close-form,
.payments-actions {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 62%, transparent);
}

.billing-form-panel h3,
.month-close-form h3 {
  margin: 0 0 12px;
  font-size: 14px;
}

.check-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.check-choice input {
  width: 18px;
  height: 18px;
}

.json-preview {
  max-height: 420px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  background: #111713;
  color: #d8e999;
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.payment-source {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 680px) {
  .action-dialog {
    align-items: end;
    padding: 0;
  }

  .action-dialog-card {
    max-height: 92vh;
    border-radius: 8px 8px 0 0;
  }

  .action-form-grid {
    grid-template-columns: 1fr;
  }

  .action-field--wide {
    grid-column: auto;
  }
}

/* v0.3 audit fixes: explicit period, source freshness and evidence comparison */
.reporting-period-control { display:grid; gap:5px; min-width:210px; padding:10px 12px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); box-shadow:var(--shadow); }
.reporting-period-control > span { color:var(--muted); font-size:10px; font-weight:900; text-transform:uppercase; }
.reporting-period-control select, .reporting-period-control input { min-height:34px; border:0; color:var(--text); background:transparent; font-weight:850; }
.source-freshness { display:flex; flex-wrap:wrap; align-items:stretch; gap:1px; margin:0 0 14px; overflow:hidden; border:1px solid var(--line); border-radius:var(--radius); background:var(--line); box-shadow:var(--shadow); }
.source-freshness-period,.source-freshness-item { display:grid; grid-template-columns:auto auto; gap:3px 10px; align-items:center; min-width:190px; padding:10px 12px; background:var(--surface); }
.source-freshness-period { min-width:230px; }
.source-freshness span { color:var(--muted); font-size:10px; font-weight:800; text-transform:uppercase; }
.source-freshness strong { font-size:12px; }
.source-age { grid-column:1 / -1; color:var(--muted); font-size:10px; font-style:normal; }
.source-age--wait { color:var(--amber); }
.source-age--bad { color:var(--red); }
.source-age--ok { color:var(--green); }
.stale-badge { align-self:center; white-space:nowrap; }
.trip-status-stack { display:grid; justify-items:start; gap:5px; }
.receipt-evidence-matrix { display:grid; min-width:360px; margin-top:4px; overflow:hidden; border:1px solid var(--line); border-radius:8px; background:var(--surface); }
.receipt-matrix-head,.receipt-matrix-row { display:grid; grid-template-columns:68px repeat(3,minmax(88px,1fr)); align-items:stretch; }
.receipt-matrix-head { color:var(--muted); background:var(--surface-2); font-size:9px; font-weight:900; text-transform:uppercase; }
.receipt-matrix-head > *,.receipt-matrix-row > * { min-width:0; padding:5px 6px; border-right:1px solid var(--line); overflow-wrap:anywhere; }
.receipt-matrix-head > *:last-child,.receipt-matrix-row > *:last-child { border-right:0; }
.receipt-matrix-row { border-top:1px solid var(--line); font-size:9px; line-height:1.3; }
.receipt-matrix-row > strong { color:var(--muted); }
.receipt-matrix-value--match { color:var(--green); background:color-mix(in srgb,var(--green) 7%,transparent); }
.receipt-matrix-value--conflict { color:var(--red); background:color-mix(in srgb,var(--red) 7%,transparent); }
.receipt-matrix-value--unknown { color:var(--muted); }
.receipt-candidate-preview { border-top:1px solid var(--line); padding-top:6px; color:var(--muted); font-size:11px; }
.receipt-candidate-preview summary { color:var(--teal); cursor:pointer; font-weight:800; }
.receipt-candidate-preview > div,.receipt-candidate-preview > div > span { display:grid; gap:2px; }
.receipt-candidate-preview > div { gap:7px; margin-top:7px; }
.receipt-candidate-preview small { color:var(--muted); line-height:1.35; }
.receipt-reconciliation-table th:nth-child(2) { width:430px; }
.receipt-reconciliation-table { min-width:1840px; }
.expense-registry-table thead th { position:sticky; z-index:2; top:0; background:var(--surface-2); }
.review-actions { justify-content:flex-end; min-width:210px; }
#globalSearch:disabled { color:var(--muted); background:var(--surface-2); cursor:not-allowed; }

@media (max-width:820px) {
  .reporting-period-control { width:100%; }
  .source-freshness-period,.source-freshness-item { flex:1 1 180px; }
  .receipt-evidence-matrix { min-width:0; }
  .receipt-matrix-head,.receipt-matrix-row { grid-template-columns:58px repeat(3,minmax(64px,1fr)); }
  .review-actions { min-width:0; justify-content:flex-start; }
}

/* Ruptela history keeps the selected period, import progress, and saved analysis distinct. */
.rh-screen { display:grid; gap:18px; min-width:0; }
.rh-screen .screen-head { margin-bottom:0; }
.rh-screen .panel { min-width:0; }
.rh-screen .panel-title h3 { margin:0; font-size:15px; }
.rh-filter-panel { padding:22px !important; }
.rh-filter-grid { display:grid; grid-template-columns:minmax(160px,1.1fr) minmax(140px,.8fr) minmax(140px,.8fr) auto; gap:16px; align-items:end; }
.rh-filter-grid .action-field { margin:0; min-width:0; }
.rh-filter-grid input,.rh-filter-grid select { width:100%; min-width:0; min-height:42px; }
.rh-presets { display:flex; align-items:center; gap:5px; min-height:42px; }
.rh-presets button { padding:9px 11px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--muted); cursor:pointer; font:inherit; font-size:12px; white-space:nowrap; }
.rh-presets button:hover { color:var(--teal); border-color:var(--teal); background:var(--teal-weak); }
.rh-filter-actions { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; margin:18px 0 8px; }
.rh-filter-actions > div { display:flex; flex-wrap:wrap; gap:10px; }
.rh-filter-panel [data-rh-access-note] { margin-bottom:0; }
.rh-screen button:disabled { opacity:.5; cursor:not-allowed; }
.rh-empty { padding:30px !important; color:var(--muted); line-height:1.6; }
.rh-empty h2 { margin:0 0 10px; font-size:19px; color:var(--text); }
.rh-progress-card { padding:18px 22px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); }
.rh-progress-active { border-color:color-mix(in srgb,var(--teal) 40%,var(--line)); background:color-mix(in srgb,var(--teal-weak) 45%,var(--surface)); }
.rh-progress-complete { border-color:color-mix(in srgb,var(--green) 40%,var(--line)); }
.rh-progress-partial { border-color:color-mix(in srgb,var(--amber) 45%,var(--line)); }
.rh-progress-heading { display:flex; justify-content:space-between; align-items:start; gap:18px; }
.rh-progress-heading > div { display:grid; gap:6px; }
.rh-progress-heading strong { font-size:14px; }
.rh-progress-heading span { color:var(--muted); font-size:12px; line-height:1.5; }
.rh-progress-card progress { display:block; appearance:none; width:100%; height:6px; margin:15px 0 2px; overflow:hidden; border:0; border-radius:20px; background:var(--surface-2); accent-color:var(--teal); }
.rh-progress-card progress::-webkit-progress-bar { background:var(--line); border-radius:20px; }
.rh-progress-card progress::-webkit-progress-value { background:var(--teal); border-radius:20px; }
.rh-progress-card .secondary-action,.rh-progress-card .ghost-action { margin-top:12px; }
[data-rh-progress]:empty { display:none; }
.rh-analysis-heading { display:flex; justify-content:space-between; align-items:start; gap:20px; margin:4px 0 18px; }
.rh-analysis-heading h2 { margin:0 0 7px; font-size:21px; letter-spacing:-.025em; }
.rh-analysis-heading p { margin:0; color:var(--muted); font-size:12px; line-height:1.6; }
[data-rh-analysis-body] { display:grid; gap:18px; transition:opacity .15s; }
.rh-analysis-stale { opacity:.5; }
.rh-stale-warning,.rh-coverage-note { margin:0; padding:12px 15px; border:1px solid color-mix(in srgb,var(--amber) 24%,var(--line)); border-radius:6px; background:var(--amber-weak); color:var(--amber); font-size:12px; line-height:1.6; }
.rh-stale-warning { margin-bottom:15px; }
.rh-stale-warning[hidden] { display:none; }
.rh-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); overflow:hidden; }
.rh-metrics article { display:grid; align-content:start; gap:10px; padding:21px; border-right:1px solid var(--line); }
.rh-metrics article:last-child { border-right:0; }
.rh-metrics article > span { color:var(--muted); font-size:11px; font-weight:750; text-transform:uppercase; letter-spacing:.04em; }
.rh-metrics strong { font-size:27px; line-height:1.15; font-weight:750; letter-spacing:-.035em; }
.rh-metrics small { color:var(--muted); font-size:11px; line-height:1.6; }
.rh-map-layout { display:grid; grid-template-columns:minmax(0,1fr) 250px; gap:18px; align-items:stretch; }
.rh-map-panel { padding:18px !important; }
.rh-map { position:relative; z-index:0; width:100%; min-height:420px; height:420px; border:1px solid var(--line); border-radius:6px; background:var(--surface-2); }
.rh-map-legend { display:flex; flex-wrap:wrap; gap:12px; margin-top:13px; color:var(--muted); font-size:10px; }
.rh-map-legend > span { display:flex; align-items:center; gap:6px; }
.rh-map-legend i { display:inline-block; width:9px; height:9px; border-radius:50%; }
.rh-map-legend .rh-legend-route { height:3px; width:16px; border-radius:1px; background:var(--teal); }
.rh-legend-stop { background:var(--amber); }
.rh-legend-gap { background:var(--surface); border:2px solid var(--red); }
.rh-legend-point { background:#256fa8; }
.rh-timeline { display:grid; gap:9px; margin-top:17px; padding-top:15px; border-top:1px solid var(--line); }
.rh-timeline > span { min-height:18px; color:var(--text); font-size:12px; font-weight:650; }
.rh-timeline input { width:100%; accent-color:#256fa8; cursor:ew-resize; }
.rh-timeline small { color:var(--muted); font-size:10px; }
.rh-events-panel { max-height:645px; overflow-y:auto; }
.rh-event-row { display:grid; gap:6px; width:100%; padding:13px 0; text-align:left; color:var(--text); border:0; border-bottom:1px solid var(--line); background:transparent; cursor:pointer; font:inherit; }
.rh-event-row:hover { color:var(--teal); }
.rh-event-row > span { color:var(--muted); font-size:11px; }
.rh-event-row > strong { font-size:16px; }
.rh-event-row > small { color:var(--muted); font-size:10px; }
.rh-gap-summary { display:grid; gap:8px; margin-top:20px; font-size:12px; }
.rh-gap-summary > span,.rh-gap-summary p { color:var(--muted); font-size:11px; line-height:1.5; margin:0; }
.rh-charts { display:grid; gap:14px; min-width:0; }
.rh-chart-panel { padding:18px !important; overflow:hidden; }
.rh-chart-panel .panel-title { margin-bottom:2px; }
.rh-chart { display:block; width:100%; height:auto; max-height:250px; overflow:visible; }
.rh-chart text { fill:var(--muted); font-size:11px; font-family:inherit; }
.rh-chart-grid { stroke:var(--line); stroke-width:1; }
.rh-chart-cursor { stroke:#256fa8; stroke-width:1; stroke-dasharray:4 4; opacity:.7; }
.rh-chart-empty { display:grid; place-items:center; min-height:100px; color:var(--muted); font-size:12px; }
.rh-daily-table { width:100%; min-width:1030px; }
.rh-daily-table td,.rh-daily-table th { white-space:nowrap; }
.rh-analysis-notes summary { cursor:pointer; font-size:13px; font-weight:700; }
.rh-analysis-notes ul { margin:15px 0 0; padding-left:19px; color:var(--muted); font-size:12px; line-height:1.8; }
@media (max-width:1100px) {
  .rh-filter-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .rh-presets { grid-column:1 / -1; min-height:0; }
  .rh-map-layout { grid-template-columns:minmax(0,1fr); }
  .rh-events-panel { max-height:360px; }
  .rh-metrics article { padding:16px; }
  .rh-metrics strong { font-size:23px; }
}
@media (max-width:650px) {
  .rh-filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .rh-filter-grid > label:first-child { grid-column:1 / -1; }
  .rh-filter-panel { padding:16px !important; }
  .rh-filter-actions > div { width:100%; }
  .rh-filter-actions > div > button { flex:1 1 150px; }
  .rh-analysis-heading,.rh-progress-heading { flex-direction:column; gap:10px; }
  .rh-analysis-heading h2 { font-size:18px; }
  .rh-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .rh-metrics article:nth-child(2) { border-right:0; }
  .rh-metrics article:nth-child(-n+2) { border-bottom:1px solid var(--line); }
  .rh-map { height:330px; min-height:330px; }
  .rh-chart { min-height:140px; }
}

.payroll-panel { max-width: 1000px; }
.payroll-summary { display: flex; gap: 48px; padding: 20px 0; }
.payroll-summary > div { display: grid; gap: 6px; }
.payroll-summary span { color: var(--muted); font-size: 12px; }
.payroll-summary strong { font-size: 28px; font-variant-numeric: tabular-nums; }
.payroll-table { width: 100%; min-width: 420px; }
.payroll-table th:first-child { width: 58%; }
.payroll-table th:last-child { width: 90px; }
.payroll-table input { width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: var(--surface); font: inherit; }
.payroll-table .payroll-amount { text-align: right; font-variant-numeric: tabular-nums; }
.payroll-table tfoot th { padding: 14px 10px; border-top: 2px solid var(--line); }
.payroll-add { margin: 16px 0; }
.payroll-panel .action-field { margin: 16px 0; }
.payroll-panel input:focus, .payroll-panel textarea:focus { outline: 2px solid var(--accent, #e8773e); outline-offset: 2px; }
.payroll-panel .action-form-actions { flex-wrap: wrap; }
@media (max-width: 600px) {
  .payroll-summary { gap: 24px; }
  .payroll-summary strong { font-size: 23px; }
  .payroll-panel .panel-title { flex-wrap: wrap; gap: 8px; }
}
