@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --navy: #18325a;
  --blue: #3274ba;
  --blue-bright: #3984d6;
  --pale: #ebf5fa;
  --ice: #eff3f6;
  --ink: #172b45;
  --muted: #6d7d90;
  --line: #e3eaf0;
  --canvas: #f5f8fb;
  --white: #fff;
  --red: #ed4f4b;
  --orange: #f28b35;
  --yellow: #f4c84b;
  --green: #42a77a;
  --low-blue: #397dc0;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { min-width: 360px; margin: 0; color: var(--ink); background: var(--canvas); }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.login-screen { position: relative; display: grid; min-height: 100vh; place-items: center; overflow: hidden; padding: 36px 24px; background: linear-gradient(122deg, #132b4c 0%, #1b3c6a 50%, #3274ba 100%); }
.login-screen::before, .login-screen::after { position: absolute; content: ""; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; pointer-events: none; }
.login-screen::before { width: 720px; height: 720px; right: -120px; top: -310px; }
.login-screen::after { width: 510px; height: 510px; right: -20px; top: -205px; }
.login-orbit { position: absolute; border-radius: 50%; filter: blur(1px); animation: float 12s ease-in-out infinite alternate; }
.login-orbit-one { width: 420px; height: 420px; left: -150px; bottom: -195px; background: radial-gradient(circle, rgba(78,157,222,.4), rgba(78,157,222,0) 70%); }
.login-orbit-two { width: 300px; height: 300px; right: 12%; bottom: -200px; background: radial-gradient(circle, rgba(145,201,235,.25), rgba(145,201,235,0) 70%); animation-delay: -5s; }
.login-card { z-index: 1; width: min(100%, 448px); padding: 42px 44px 27px; border: 1px solid rgba(255,255,255,.72); border-radius: 20px; background: rgba(255,255,255,.97); box-shadow: 0 28px 80px rgba(8,25,47,.28); }
.login-logo { display: block; width: 175px; height: 46px; object-fit: contain; object-position: left center; margin-bottom: 35px; }
.eyebrow { margin: 0; color: var(--blue); font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.login-card h1 { margin: 9px 0 7px; color: var(--navy); font: 700 25px/1.22 Manrope, sans-serif; letter-spacing: -.04em; }
.login-copy { margin: 0 0 27px; color: var(--muted); font-size: 13px; }
.login-form { display: grid; gap: 9px; }
.login-form label { margin-top: 5px; color: #30465f; font-size: 12px; font-weight: 600; }
.login-form input { width: 100%; height: 45px; padding: 0 13px; border: 1px solid #dce5ed; border-radius: 8px; outline: 0; color: var(--ink); background: #fbfcfd; font-size: 13px; transition: border-color .2s, box-shadow .2s; }
.login-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(50,116,186,.12); }
.login-form input::placeholder { color: #a1acb8; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 56px; }
.password-toggle { position: absolute; inset: 0 12px 0 auto; border: 0; color: var(--blue); background: transparent; font-size: 11px; font-weight: 700; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 13px; border: 0; border-radius: 7px; font-size: 11px; font-weight: 700; transition: background .2s, transform .2s, box-shadow .2s; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--navy); box-shadow: 0 7px 16px rgba(24,50,90,.17); }
.button-primary:hover { background: #234779; box-shadow: 0 9px 20px rgba(24,50,90,.23); }
.login-submit { width: 100%; min-height: 47px; margin-top: 12px; font-size: 13px; }
.login-submit span { margin-left: auto; font-size: 18px; font-weight: 400; }
.login-submit:disabled { cursor: wait; opacity: .7; }
.login-error { margin: 16px 0 0; color: #b42318; font-size: 12px; line-height: 1.5; }
.login-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 27px; color: #91a0b0; font-size: 9px; }
.login-message { position: absolute; left: max(5vw, 44px); bottom: 42px; display: flex; align-items: center; gap: 18px; color: rgba(255,255,255,.88); font: 500 17px/1.45 Manrope, sans-serif; }
.login-message img { width: 130px; height: 34px; object-fit: contain; }
@keyframes float { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(32px, -25px, 0); } }

.app-shell { min-height: 100vh; }
.topbar { position: sticky; z-index: 500; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: 70px; padding: 0 32px; border-bottom: 1px solid #e8edf2; background: rgba(255,255,255,.95); backdrop-filter: blur(12px); }
.brand-lockup, .topbar-actions, .brand-lockup > div { display: flex; align-items: center; }
.brand-lockup { gap: 19px; }
.brand-lockup img { width: 126px; height: 35px; object-fit: contain; }
.brand-divider { width: 1px; height: 31px; background: var(--line); }
.brand-lockup > div { align-items: flex-start; flex-direction: column; gap: 2px; }
.topbar-kicker { color: #8493a3; font-size: 8px; font-weight: 700; letter-spacing: .1em; }
.brand-lockup strong { color: var(--navy); font: 700 14px Manrope, sans-serif; }
.topbar-actions { gap: 18px; }
.connection-indicator { display: inline-block; width: 11px; height: 11px; border: 1px solid rgba(27,48,66,.18); border-radius: 50%; }
.status-connected { background: #23a566; box-shadow: 0 0 0 4px rgba(35,165,102,.12); }
.status-disconnected { background: #dc4e4e; box-shadow: 0 0 0 4px rgba(220,78,78,.12); }
.status-unknown { background: #d5a23b; box-shadow: 0 0 0 4px rgba(213,162,59,.12); }
.signed-in-user { max-width: 200px; overflow: hidden; color: #52657a; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; color: #66788a; background: #fff; font-size: 11px; }
.icon-button:hover { border-color: #c6d8e9; color: var(--navy); }
.theme-toggle { min-width: 62px; }
.report-heading { display: flex; align-items: flex-end; justify-content: space-between; max-width: 1840px; margin: 0 auto; padding: 25px 32px 17px; }
.report-heading h1 { margin: 6px 0 5px; color: var(--navy); font: 700 23px/1.25 Manrope, sans-serif; letter-spacing: -.04em; }
.report-subtitle { margin: 0; color: var(--muted); font-size: 12px; }
.report-meta { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1px solid #e6ecf1; border-radius: 8px; color: #7b8b9b; background: #fff; font-size: 9px; line-height: 1.55; }
.report-meta strong { color: #364d68; font-size: 10px; }
.meta-icon { color: var(--blue); font-size: 19px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; max-width: 1840px; margin: 0 auto; padding: 0 32px 17px; }
.summary-card { display: flex; align-items: center; min-height: 68px; gap: 11px; padding: 11px 14px; border: 1px solid #e8edf2; border-radius: 9px; background: #fff; box-shadow: 0 2px 8px rgba(29,57,84,.025); }
.summary-icon { display: grid; flex: 0 0 auto; width: 35px; height: 35px; place-items: center; border-radius: 9px; font-size: 19px; }
.icon-blue { color: #3274ba; background: #eaf2fb; }
.icon-cyan { color: #287992; background: #e9f6f7; }
.icon-orange { color: #da8337; background: #fff3e6; }
.icon-pale { color: #547a9d; background: #edf4f8; }
.summary-card > div { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 3px; }
.summary-card > div > span { overflow: hidden; color: #78889a; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.summary-card strong { color: var(--navy); font: 700 17px Manrope, sans-serif; }
.summary-card strong small { font-size: 10px; }
.summary-card > small { align-self: flex-end; padding-bottom: 4px; color: #9aa6b1; font-size: 8px; white-space: nowrap; }

.workspace { display: grid; grid-template-columns: 236px minmax(0,1fr); gap: 14px; max-width: 1840px; margin: 0 auto; padding: 0 32px; align-items: start; }
.filters-panel { position: relative; z-index: 10; overflow: visible; border: 1px solid #e5ebf0; border-radius: 10px; background: #fff; box-shadow: 0 3px 12px rgba(29,57,84,.025); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 17px 16px 13px; }
.panel-heading .eyebrow { font-size: 8px; }
.panel-heading h2 { margin: 3px 0 0; color: var(--navy); font: 700 17px Manrope, sans-serif; }
.text-button { padding: 5px 0; border: 0; color: var(--blue); background: transparent; font-size: 10px; font-weight: 700; }
.text-button:hover { color: var(--navy); text-decoration: underline; }
.button-reset-filters { min-height: 32px; padding: 0 11px; color: #fff; background: #d94c4c; box-shadow: 0 3px 8px rgba(217,76,76,.2); font-size: 9px; }
.button-reset-filters:hover { background: #bd3c3c; }
.filter-section { padding: 13px 16px 15px; border-top: 1px solid #edf1f4; }
.filter-title { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.filter-title h3 { flex: 1; margin: 0; color: #314760; font-size: 11px; font-weight: 700; }
.filter-icon { color: var(--blue); font-size: 14px; }
.selection-count { color: #8d9aaa; font-size: 9px; }
.day-picker { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; align-items: end; gap: 8px; }
.date-picker { position: relative; min-width: 0; }
.date-trigger { display: flex; width: 100%; height: 36px; min-width: 0; flex-direction: column; justify-content: center; gap: 2px; padding: 0 8px; border: 1px solid #e2e9ef; border-radius: 6px; color: #42566d; background: #fcfdfe; text-align: left; }
.date-trigger span { color: #7d8b9a; font-size: 8px; }
.date-trigger strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.date-trigger:focus-visible { border-color: var(--blue); outline: 0; box-shadow: 0 0 0 3px rgba(50,116,186,.12); }
.calendar-popover { position: absolute; z-index: 900; top: calc(100% + 7px); left: 50%; width: 268px; padding: 11px; transform: translateX(-50%); border: 1px solid #dce5ed; border-radius: 9px; background: #fff; box-shadow: 0 12px 30px rgba(24,50,90,.18); }
.calendar-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; color: #314861; font-size: 11px; text-transform: capitalize; }
.calendar-nav, .calendar-day { display: grid; place-items: center; border: 0; border-radius: 5px; color: #326ba3; background: transparent; }
.calendar-nav { width: 27px; height: 27px; font-size: 18px; }
.calendar-nav:hover:not(:disabled), .calendar-day:not(:disabled):hover { background: #edf5fb; }
.calendar-nav:disabled { color: #c2cbd3; cursor: not-allowed; }
.calendar-weekdays, .calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; text-align: center; }
.calendar-weekdays { margin-bottom: 4px; color: #8b98a5; font-size: 8px; }
.calendar-days { grid-auto-rows: 29px; }
.calendar-blank { display: block; }
.calendar-day { width: 100%; height: 29px; color: #41566b; font-size: 9px; }
.calendar-day:disabled { color: #c7cfd6; background: transparent; cursor: not-allowed; }
.calendar-day.selected { color: #fff; background: var(--blue); font-weight: 700; }
.calendar-day.today:not(.selected) { box-shadow: inset 0 0 0 1px var(--blue); }
.day-nav-button { height: 36px; border: 1px solid #e2e9ef; border-radius: 6px; color: #326ba3; background: #edf5fb; font-size: 22px; line-height: 1; cursor: pointer; }
.day-nav-button:hover:not(:disabled) { background: #e0eef8; }
.day-nav-button:disabled { color: #a6b1ba; background: #f2f4f6; cursor: not-allowed; }
.date-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.date-field { display: flex; min-width: 0; flex-direction: column; gap: 3px; color: #7d8b9a; font-size: 9px; }
.date-field input { width: 100%; height: 34px; min-width: 0; padding: 0 6px; border: 1px solid #e2e9ef; border-radius: 6px; color: #42566d; background: #fcfdfe; font: inherit; font-size: 11px; }
.date-field input:focus-visible { border-color: var(--blue); outline: 0; box-shadow: 0 0 0 3px rgba(50,116,186,.12); }
.theme-dark .date-field input { border-color: #364652; color: #d9e3eb; background: #1b2732; color-scheme: dark; }
.loaded-range { display: flex; flex-direction: column; gap: 2px; margin: 10px 0 0; padding: 8px 10px; border-left: 3px solid var(--blue); border-radius: 6px; color: #42566d; background: #edf5fb; font-size: 9px; }
.loaded-range strong { color: var(--navy); font-size: 11px; }
.loaded-range small { color: #7d8b9a; font-size: 9px; }
.theme-dark .loaded-range { color: #d0dbe4; background: #1f3242; }
.theme-dark .loaded-range strong { color: #e6eef5; }
.theme-dark .loaded-range small { color: #91a1af; }
.day-picker-note { margin: 8px 0 12px; color: #8d9aaa; font-size: 9px; }
.button-soft { color: #326ba3; background: #edf5fb; }
.button-soft:hover { background: #e0eef8; }
.full-width { width: 100%; }
.option-list { display: grid; gap: 7px; }
.option-row { display: flex; align-items: center; gap: 8px; color: #52657a; font-size: 10px; }
.option-row input { width: 13px; height: 13px; margin: 0; accent-color: var(--blue); }
.option-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.filter-actions .button { min-height: 30px; padding: 0 10px; font-size: 9px; }
.filter-actions .text-button { font-size: 9px; }
.filter-footnote { display: flex; gap: 8px; margin: 0 13px 14px; padding: 10px; border-radius: 6px; color: #708399; background: #f5f8fb; }
.filter-footnote > span { display: grid; flex: 0 0 auto; width: 14px; height: 14px; place-items: center; border: 1px solid #91aac2; border-radius: 50%; color: #69839d; font-size: 9px; }
.filter-footnote p { margin: 0; font-size: 9px; line-height: 1.5; }
.search-box { display: flex; align-items: center; gap: 7px; height: 31px; margin-bottom: 8px; padding: 0 8px; border: 1px solid #e2e9ef; border-radius: 6px; color: #8292a2; background: #fcfdfe; }
.search-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(50,116,186,.1); }
.search-box > span { font-size: 15px; line-height: 1; }
.search-box input { width: 100%; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; color: #42566d; background: transparent; font-size: 9px; }
.search-box input::placeholder { color: #a1acb8; }
.sidebar-footer { display: flex; align-items: center; gap: 7px; padding: 12px 15px; border-top: 1px solid #edf1f4; color: #8391a0; font-size: 9px; }
.sidebar-footer strong { color: #41546b; font-weight: 600; }
.sidebar-footer .status-dot { width: 6px; height: 6px; }
.scroll-options { max-height: 150px; overflow: auto; padding: 2px 5px 2px 1px; overscroll-behavior: contain; scrollbar-color: #c4d3df #f3f6f8; scrollbar-width: thin; }
.scroll-options::-webkit-scrollbar { width: 6px; }
.scroll-options::-webkit-scrollbar-track { border-radius: 6px; background: #f3f6f8; }
.scroll-options::-webkit-scrollbar-thumb { border-radius: 6px; background: #c4d3df; }
.vehicle-dropdowns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 11px 13px; border-top: 1px solid #edf1f4; }
.filter-dropdown { position: relative; min-width: 0; }
.dropdown-trigger { display: flex; align-items: center; gap: 4px; min-height: 38px; padding: 0 9px; overflow: hidden; border: 1px solid #dce5ed; border-radius: 8px; color: #314760; background: #f7f9fb; cursor: pointer; font-size: 9px; list-style: none; white-space: nowrap; }
.dropdown-trigger::-webkit-details-marker { display: none; }
.dropdown-trigger::marker { content: ""; }
.dropdown-trigger strong { overflow: hidden; font-size: 9px; font-weight: 600; text-overflow: ellipsis; }
.dropdown-trigger > span { margin-left: auto; color: #7a8b9c; }
.filter-dropdown[open] .dropdown-trigger { border-color: #9abbd9; background: #eef5fa; }
.dropdown-menu { position: absolute; z-index: 800; top: calc(100% + 6px); left: 0; width: min(270px, calc(100vw - 40px)); padding: 9px; border: 1px solid #dce5ed; border-radius: 10px; background: #fff; box-shadow: 0 12px 30px rgba(24,50,90,.18); }
.filter-dropdown:nth-child(2) .dropdown-menu { right: 0; left: auto; }
.dropdown-menu .search-box { height: 35px; margin-bottom: 8px; border-radius: 8px; }
.dropdown-menu .search-box input { font-size: 11px; }
.dropdown-menu .scroll-options { max-height: 190px; padding: 3px 4px; }
.dropdown-menu .option-list { gap: 0; }
.dropdown-menu .option-row { min-height: 27px; gap: 9px; padding: 3px 5px; border-radius: 5px; color: #34485d; font-size: 11px; }
.dropdown-menu .option-row:hover { background: #f0f4f7; }
.dropdown-actions { display: flex; gap: 7px; margin-top: 9px; }
.dropdown-actions .button { min-height: 32px; padding: 0 9px; font-size: 9px; }
.button-apply { flex: 1; color: #fff; background: #198754; }
.button-apply:hover { background: #157347; }
.button-clear { color: #29435e; background: #edf2f6; }
.button-clear:hover { background: #e0e8ef; }

.map-workspace { min-width: 0; overflow: hidden; border: 1px solid #e5ebf0; border-radius: 10px; background: #fff; box-shadow: 0 3px 12px rgba(29,57,84,.025); }
.map-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 57px; padding: 9px 15px; }
.map-title { display: flex; align-items: center; gap: 10px; }
.live-indicator { width: 9px; height: 9px; border-radius: 50%; background: #3274ba; box-shadow: 0 0 0 4px #eaf2fb; }
.map-title > div { display: flex; flex-direction: column; gap: 2px; }
.map-title strong { color: #2c425b; font-size: 11px; }
.map-title span:not(.live-indicator) { color: #8997a6; font-size: 9px; }
.map-controls { display: flex; align-items: center; gap: 9px; }
.base-toggle { display: flex; flex-wrap: wrap; padding: 3px; border: 1px solid #e7edf2; border-radius: 7px; background: #f7f9fb; }
.base-button { padding: 6px 8px; border: 0; border-radius: 5px; color: #78889a; background: transparent; font-size: 9px; white-space: nowrap; }
.base-button.active { color: var(--navy); background: #fff; box-shadow: 0 1px 4px rgba(30,55,79,.12); font-weight: 700; }
.map-icon-button { width: 29px; height: 29px; border: 1px solid #e5ebf0; border-radius: 6px; color: #60778e; background: #fff; font-size: 17px; }
.layer-toolbar { display: flex; align-items: center; gap: 17px; min-height: 43px; padding: 8px 15px; border-top: 1px solid #edf1f4; border-bottom: 1px solid #edf1f4; }
.layer-switch { display: inline-flex; align-items: center; gap: 7px; color: #627489; font-size: 9px; white-space: nowrap; cursor: pointer; }
.layer-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-ui { position: relative; width: 26px; height: 15px; border-radius: 15px; background: #cbd5df; transition: background .2s; }
.switch-ui::after { position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #8493a2; content: ""; transition: transform .2s; }
.layer-switch input:checked + .switch-ui { background: var(--blue); }
.layer-switch input:checked + .switch-ui::after { transform: translateX(11px); }
.layer-switch input:focus-visible + .switch-ui { outline: 2px solid #80b6e5; outline-offset: 2px; }
.opacity-control { display: flex; align-items: center; gap: 8px; color: #748498; font-size: 9px; white-space: nowrap; }
.opacity-control input { width: 83px; height: 3px; accent-color: var(--blue); }
.opacity-control strong { min-width: 25px; color: #4c6279; font-size: 9px; }
.map-container { position: relative; height: clamp(480px, calc(100vh - 150px), 920px); background: #e7eff2; }
#map { z-index: 1; width: 100%; height: 100%; }
.leaflet-container { font-family: "DM Sans", "Segoe UI", sans-serif; }
.leaflet-control-attribution { font-size: 8px !important; }
.map-legend { position: absolute; z-index: 400; top: 13px; right: 13px; width: 148px; padding: 12px; border: 1px solid rgba(219,228,235,.88); border-radius: 8px; background: rgba(255,255,255,.96); box-shadow: 0 3px 14px rgba(35,57,79,.13); pointer-events: none; }
.map-legend > strong { display: block; margin-bottom: 9px; color: #314861; font-size: 9px; }
.legend-scale { display: grid; gap: 7px; }
.legend-scale span { display: flex; align-items: center; gap: 7px; color: #67798b; font-size: 8px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.very-high { background: var(--red); }.high { background: var(--orange); }.medium { background: var(--yellow); }.low { background: var(--green); }.very-low { background: var(--low-blue); }
.map-message { position: absolute; z-index: 450; inset: 0; display: grid; place-items: center; padding: 20px; color: #435a71; background: rgba(244,248,251,.92); text-align: center; font-size: 12px; }
.map-caption { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; border-bottom: 1px solid #edf1f4; color: #8896a5; font-size: 8px; }
.map-caption > span:first-child { display: flex; align-items: center; gap: 6px; }
.endpoint-legend { display: inline-flex; align-items: center; gap: 7px; color: #65788c; font-size: 9px; white-space: nowrap; }
.endpoint-legend strong { font-weight: 600; }
.endpoint-dot { display: inline-block; flex: 0 0 auto; width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(29,51,73,.4); }
.endpoint-start { background: #23895e; }
.endpoint-end { background: #d94c4c; }
.endpoint-note { margin-left: auto; color: #8b98a5; font-size: 8px; }
.fuel-price-control { display: flex; align-items: center; gap: 7px; margin-left: auto; color: #65788c; font-size: 9px; white-space: nowrap; }
.fuel-price-inputs { display: flex; align-items: center; gap: 6px; }
.fuel-price-inputs input[type="range"] { width: 92px; height: 3px; accent-color: var(--blue); }
.currency-input-wrap { display: flex; align-items: center; gap: 2px; height: 26px; padding: 0 6px; border: 1px solid #dfe7ed; border-radius: 5px; color: #627489; background: #fff; font-size: 9px; }
.currency-input-wrap input { width: 44px; padding: 0; border: 0; outline: 0; color: #334b64; background: transparent; font-size: 9px; }
.currency-input-wrap input::-webkit-inner-spin-button { margin: 0; }
.units-section { padding: 14px; }
.page-units-section { max-width: 1840px; margin: 15px auto 0; padding: 14px 32px; border: 1px solid #e5ebf0; border-radius: 10px; background: #fff; box-shadow: 0 3px 12px rgba(29,57,84,.025); }
.units-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.units-heading h2 { margin: 0 0 3px; color: var(--navy); font: 700 13px Manrope, sans-serif; }
.units-heading p { margin: 0; color: #8896a5; font-size: 9px; }
.units-total { padding: 5px 8px; border-radius: 12px; color: #54718d; background: #eff5f9; font-size: 9px; }
.units-controls { display: flex; align-items: center; gap: 7px; }
.carousel-button { width: 29px; height: 29px; border: 1px solid #dfe7ed; border-radius: 6px; color: #356b9b; background: #fff; font-size: 19px; line-height: 1; }
.carousel-button:hover:not(:disabled) { background: #edf5fb; }
.carousel-button:disabled { color: #b5c0c9; background: #f4f6f8; cursor: not-allowed; }
.unit-cards { display: grid; grid-auto-columns: calc((100% - 24px) / 3); grid-auto-flow: column; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-behavior: smooth; scroll-snap-type: x mandatory; scrollbar-width: none; }
.unit-cards::-webkit-scrollbar { display: none; }
.unit-card { width: 100%; min-width: 0; padding: 18px; border: 1px solid #e7edf2; border-radius: 8px; background: #fff; scroll-snap-align: start; transition: border-color .2s, box-shadow .2s; }
.unit-card:hover { border-color: #c6d9eb; box-shadow: 0 4px 12px rgba(38,81,122,.08); }
.unit-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.unit-identity { display: flex; min-width: 0; align-items: center; gap: 8px; }
.vehicle-avatar { display: grid; flex: 0 0 auto; width: 29px; height: 29px; place-items: center; border-radius: 7px; color: #3473ae; background: #edf5fb; font-size: 14px; }
.unit-identity > div { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.unit-identity strong { overflow: hidden; color: #304760; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.unit-identity span { overflow: hidden; color: #8997a6; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.unit-status { display: flex; align-items: center; gap: 4px; color: #4d9c7b; font-size: 8px; white-space: nowrap; }
.unit-status::before { width: 5px; height: 5px; border-radius: 50%; background: #4ab183; content: ""; }
.unit-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 7px; }
.unit-metric { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.unit-metric span { overflow: hidden; color: #91a0af; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.unit-metric strong { overflow: hidden; color: #4a5e74; font-size: 9px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.unit-footer { display: flex; justify-content: space-between; gap: 6px; margin-top: 9px; padding-top: 8px; border-top: 1px solid #f0f3f6; }
.street-link { color: var(--blue); font-size: 8px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.street-link:hover { text-decoration: underline; }
.unit-last-seen { overflow: hidden; color: #8a98a7; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.empty-state { display: grid; justify-items: center; gap: 5px; padding: 34px 16px; border: 1px dashed #dce5ec; border-radius: 8px; color: #6c8095; text-align: center; }
.empty-state > span { color: #83a4c0; font-size: 25px; }
.empty-state strong { color: #3d536b; font-size: 12px; }
.empty-state p { margin: 0; font-size: 10px; }
.page-footer { display: flex; justify-content: space-between; max-width: 1840px; gap: 12px; margin: 0 auto; padding: 15px 32px 20px; color: #99a5b1; font-size: 8px; }
.page-footer i { display: inline-block; width: 3px; height: 3px; margin: 0 4px 2px; border-radius: 50%; background: #a2b4c5; }
.endpoint-marker { display: block; width: 18px; height: 18px; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 1px 7px rgba(20,45,68,.55); }
.endpoint-marker.endpoint-start { background: #23895e; }
.endpoint-marker.endpoint-end { background: #d94c4c; }
.popup-title { margin-bottom: 3px; color: #18325a; font: 700 12px Manrope, sans-serif; }
.popup-subtitle { margin-bottom: 8px; color: #7d8d9d; font-size: 9px; }
.popup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; color: #697a8c; font-size: 9px; }
.popup-grid strong { display: block; margin-top: 2px; color: #314861; font-size: 10px; }
.popup-street { display: inline-block; margin-top: 9px; color: #3274ba; font-size: 9px; font-weight: 700; }

.theme-dark { color-scheme: dark; --canvas: #101820; --ink: #e5edf5; --muted: #a1afbd; --line: #344250; --white: #1b2732; }
.theme-dark .app-shell { color: var(--ink); }
.theme-dark .topbar { border-color: #2a3845; background: rgba(21,31,41,.96); }
.theme-dark .dashboard-logo { content: url("/assets/numaris-logo-white.png"); }
.theme-dark .brand-lockup strong,
.theme-dark .report-heading h1,
.theme-dark .panel-heading h2,
.theme-dark .summary-card strong,
.theme-dark .units-heading h2 { color: #e4edf6; }
.theme-dark .brand-divider,
.theme-dark .filter-section,
.theme-dark .sidebar-footer,
.theme-dark .map-caption,
.theme-dark .unit-footer { border-color: #2d3a46; }
.theme-dark .filters-panel,
.theme-dark .map-workspace,
.theme-dark .summary-card,
.theme-dark .report-meta,
.theme-dark .page-units-section,
.theme-dark .unit-card,
.theme-dark .icon-button { border-color: #2d3b47; color: #d6e0e9; background: #1b2732; }
.theme-dark .summary-icon { filter: brightness(.78) saturate(.8); }
.theme-dark .report-subtitle,
.theme-dark .summary-card > div > span,
.theme-dark .report-meta,
.theme-dark .filter-title h3,
.theme-dark .unit-identity strong,
.theme-dark .unit-metric strong,
.theme-dark .sidebar-footer strong,
.theme-dark .map-title strong { color: #c3d0dc; }
.theme-dark .report-meta strong,
.theme-dark .map-title span:not(.live-indicator),
.theme-dark .filter-section .selection-count,
.theme-dark .unit-identity span,
.theme-dark .unit-metric span,
.theme-dark .unit-last-seen,
.theme-dark .map-caption,
.theme-dark .units-heading p { color: #91a1af; }
.theme-dark .search-box,
.theme-dark .date-trigger,
.theme-dark .day-nav-button,
.theme-dark .base-toggle,
.theme-dark .dropdown-trigger { border-color: #364652; color: #c1ccd5; background: #15212b; }
.theme-dark .dropdown-menu,
.theme-dark .calendar-popover { border-color: #364652; background: #1b2732; }
.theme-dark .calendar-heading,
.theme-dark .calendar-day { color: #d0dbe4; }
.theme-dark .calendar-day:disabled { color: #697a87; }
.theme-dark .calendar-day:not(:disabled):hover,
.theme-dark .calendar-nav:hover:not(:disabled) { background: #293a49; }
.theme-dark .calendar-weekdays { color: #91a1af; }
.theme-dark .calendar-nav { color: #9dc5e5; }
.theme-dark .dropdown-menu .option-row { color: #d0dbe4; }
.theme-dark .dropdown-menu .option-row:hover { background: #293a49; }
.theme-dark .filter-dropdown[open] .dropdown-trigger { border-color: #52718a; background: #233647; }
.theme-dark .button-clear { color: #d1deea; background: #304150; }
.theme-dark .button-clear:hover { background: #3b5061; }
.theme-dark .search-box input,
.theme-dark .date-trigger,
.theme-dark .date-trigger strong,
.theme-dark .currency-input-wrap input,
.theme-dark .day-nav-button { color: #d9e3eb; }
.theme-dark .date-trigger span { color: #91a1af; }
.theme-dark .currency-input-wrap { border-color: #364652; color: #c1ccd5; background: #15212b; }
.theme-dark .search-box input::placeholder { color: #80909e; }
.theme-dark .button-soft,
.theme-dark .units-total,
.theme-dark .filter-footnote { color: #b4d1e9; background: #233647; }
.theme-dark .filter-footnote { color: #b6c6d4; }
.theme-dark .filter-footnote > span { color: #abc2d5; }
.theme-dark .filter-footnote p,
.theme-dark .option-row,
.theme-dark .filter-title h3 { color: #bfccd6; }
.theme-dark .base-button { color: #a8b7c4; }
.theme-dark .base-button.active { color: #ecf4fb; background: #304353; box-shadow: none; }
.theme-dark .layer-switch { color: #bdcbd7; }
.theme-dark .fuel-price-control { color: #bdcbd7; }
.theme-dark .carousel-button { border-color: #364652; color: #bfd8eb; background: #15212b; }
.theme-dark .carousel-button:hover:not(:disabled) { background: #293a49; }
.theme-dark .carousel-button:disabled { color: #657584; background: #1b2732; }
.theme-dark .signed-in-user { color: #c3d0dc; }
.theme-dark .opacity-control { color: #b1c0cd; }
.theme-dark .opacity-control strong { color: #d3e0eb; }
.theme-dark .map-legend { border-color: rgba(76,94,109,.9); background: rgba(27,39,50,.96); }
.theme-dark .map-legend > strong { color: #e0e9f1; }
.theme-dark .legend-scale span { color: #bdcbd7; }
.theme-dark .endpoint-legend { color: #bdcbd7; }
.theme-dark .endpoint-note { color: #91a1af; }
.theme-dark .icon-button:hover { border-color: #52718a; color: #f2f7fb; }
.theme-dark .empty-state { border-color: #405261; color: #afbdc9; }
.theme-dark .empty-state strong { color: #e0e9f1; }
.theme-dark .page-footer { color: #8293a2; }
.theme-dark .scroll-options { scrollbar-color: #536879 #263540; }
.theme-dark .scroll-options::-webkit-scrollbar-track { background: #263540; }
.theme-dark .scroll-options::-webkit-scrollbar-thumb { background: #536879; }

@media (min-width: 1450px) { .workspace { grid-template-columns: 250px minmax(0,1fr); } }
@media (max-width: 1100px) { .workspace { grid-template-columns: 245px minmax(0,1fr); padding: 0 20px; } .report-heading, .summary-grid { padding-right: 20px; padding-left: 20px; } .topbar { padding: 0 20px; } .layer-toolbar { gap: 11px; } .unit-card { padding: 14px; } .page-units-section { padding-right: 20px; padding-left: 20px; } }
@media (max-width: 760px) { .unit-cards { grid-auto-columns: calc((100% - 12px) / 2); } .topbar { min-height: 60px; padding: 0 14px; } .brand-lockup { gap: 10px; } .brand-lockup img { width: 105px; } .topbar-kicker { font-size: 7px; } .brand-lockup strong { font-size: 12px; } .topbar-actions { gap: 8px; } .signed-in-user { max-width: 100px; font-size: 9px; } .report-heading { align-items: flex-start; gap: 10px; padding: 20px 14px 13px; } .report-heading h1 { font-size: 19px; } .report-subtitle { max-width: 340px; font-size: 10px; line-height: 1.5; } .report-meta { display: none; } .summary-grid { grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 14px 12px; } .summary-card { min-height: 61px; padding: 8px; gap: 8px; } .summary-icon { width: 30px; height: 30px; } .summary-card > small { display: none; } .summary-card strong { font-size: 15px; } .workspace { grid-template-columns: 1fr; gap: 10px; padding: 0 14px; } .filters-panel { display: grid; grid-template-columns: 1fr 1fr; } .panel-heading, .filter-section, .vehicle-dropdowns, .filter-footnote, .sidebar-footer { grid-column: 1 / -1; } .filter-section { border-right: 0; } .filter-footnote { margin-bottom: 10px; } .map-toolbar { min-height: 51px; padding: 8px 10px; } .map-controls { gap: 5px; } .layer-toolbar { flex-wrap: wrap; gap: 8px 14px; padding: 9px 10px; } .fuel-price-control { flex-basis: 100%; margin-left: 0; } .fuel-price-inputs input[type="range"] { width: min(120px, 28vw); } .map-container { height: 460px; } .map-caption { flex-direction: column; gap: 4px; } .units-section { padding: 11px; } .page-units-section { margin-top: 10px; padding: 11px 14px; } .unit-card { padding: 13px; } .page-footer { flex-direction: column; padding: 13px 14px 18px; } .login-message { display: none; } }
@media (max-width: 460px) { .unit-cards { grid-auto-columns: 100%; } .brand-divider, .brand-lockup > div { display: none; } .brand-lockup img { width: 118px; } .report-heading h1 { max-width: 250px; } .filters-panel { grid-template-columns: 1fr; } .panel-heading, .filter-section, .vehicle-dropdowns, .filter-footnote, .sidebar-footer { grid-column: 1; } .vehicle-dropdowns { gap: 7px; padding-right: 9px; padding-left: 9px; } .dropdown-trigger { gap: 2px; padding: 0 6px; font-size: 8px; } .dropdown-trigger strong { font-size: 8px; } .dropdown-menu { width: min(270px, calc(100vw - 42px)); } .filter-dropdown:nth-child(2) .dropdown-menu { right: 0; left: auto; } .map-container { height: 400px; } .map-toolbar { flex-wrap: wrap; gap: 6px; } .map-controls { width: 100%; justify-content: space-between; } .map-title strong { font-size: 10px; } .map-title span:not(.live-indicator) { font-size: 8px; } .base-button { padding: 6px 7px; font-size: 8px; } .signed-in-user { max-width: 82px; } .connection-indicator { width: 9px; height: 9px; } .units-heading { align-items: flex-start; gap: 8px; } .units-controls { gap: 4px; } .calendar-popover { left: 0; transform: none; width: min(268px, calc(100vw - 70px)); } .unit-footer { flex-wrap: wrap; } .unit-last-seen { flex-basis: 100%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* Costo estimado resaltado en las tarjetas */
.unit-metric.metric-cost { margin: -3px -5px; padding: 3px 5px; border-radius: 5px; background: #fff4e8; }
.unit-metric.metric-cost span { color: #a2602a; }
.unit-metric.metric-cost strong { color: #9a4c12; font-weight: 700; }
.theme-dark .unit-metric.metric-cost { background: #3a2a1c; }
.theme-dark .unit-metric.metric-cost span { color: #e0aa79; }
.theme-dark .unit-metric.metric-cost strong { color: #ffc48f; }

/* Comparativo por día */
.compare-button { min-height: 28px; padding: 0 10px; color: #fff; background: var(--blue); font-size: 9px; }
.compare-button:hover { background: var(--navy); }
.comparison-dialog { width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 20px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff; box-shadow: 0 24px 60px rgba(24,50,90,.25); }
.comparison-dialog::backdrop { background: rgba(16,28,44,.45); }
.comparison-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.comparison-header h2 { margin: 4px 0 2px; color: var(--navy); font: 700 17px Manrope, sans-serif; }
.comparison-header p { margin: 0; color: var(--muted); font-size: 10px; }
.comparison-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.comparison-unit { display: flex; flex-direction: column; gap: 3px; color: var(--muted); font-size: 9px; }
.comparison-units-dropdown { width: 230px; }
.comparison-units-dropdown .dropdown-trigger { min-height: 32px; font-size: 11px; }
.comparison-units-dropdown .dropdown-trigger strong { font-size: 11px; }
.comparison-dialog .comparison-units-dropdown .dropdown-menu { right: auto; left: 0; width: min(270px, calc(100vw - 72px)); }
.comparison-unit-note { margin: 7px 2px 0; color: var(--muted); font-size: 9px; }
.series-swatch { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--series-color, #c7d0d8); }
.series-empty { border: 1px dashed #b8c4ce; background: transparent; }
.series-1 { --series-color: #2a78d6; } .series-2 { --series-color: #eb6834; } .series-3 { --series-color: #1baf7a; } .series-4 { --series-color: #eda100; }
.series-5 { --series-color: #e87ba4; } .series-6 { --series-color: #008300; } .series-7 { --series-color: #6250d6; } .series-8 { --series-color: #e34948; }
.theme-dark .series-1 { --series-color: #3987e5; } .theme-dark .series-2 { --series-color: #d95926; } .theme-dark .series-3 { --series-color: #199e70; } .theme-dark .series-4 { --series-color: #c98500; }
.theme-dark .series-5 { --series-color: #d55181; } .theme-dark .series-6 { --series-color: #008300; } .theme-dark .series-7 { --series-color: #9085e9; } .theme-dark .series-8 { --series-color: #e66767; }
.comparison-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 6px; color: #42566d; font-size: 10px; }
.comparison-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tooltip-row { display: flex; align-items: center; gap: 6px; }
.tooltip-row b { margin-left: auto; padding-left: 12px; }
.chart-empty-state { margin: 0; padding: 70px 0; color: var(--muted); font-size: 11px; text-align: center; }
.comparison-table thead .series-swatch { margin-right: 5px; vertical-align: -1px; }
.comparison-table tfoot th, .comparison-table tfoot td { border-top: 1px solid #c9d4de; border-bottom: 0; color: var(--navy); font-weight: 700; }
.theme-dark .comparison-legend { color: #c3d0db; }
.theme-dark .series-empty { border-color: #536879; }
.theme-dark .comparison-table tfoot th, .theme-dark .comparison-table tfoot td { border-color: #4a5a68; color: #e6eef5; }
.comparison-metrics { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 8px; background: var(--ice); }
.metric-tab { padding: 6px 10px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 600; cursor: pointer; }
.metric-tab:hover { color: var(--navy); }
.metric-tab.active { color: var(--navy); background: #fff; box-shadow: 0 1px 4px rgba(30,55,79,.12); font-weight: 700; }
.comparison-chart { position: relative; margin: 0 0 14px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.comparison-chart figcaption { margin-bottom: 6px; color: var(--navy); font-size: 11px; font-weight: 700; }
.comparison-chart-area { width: 100%; overflow: hidden; }
.comparison-chart-area svg { display: block; max-width: 100%; height: auto; }
.chart-grid { stroke: #edf1f5; stroke-width: 1; }
.chart-baseline { stroke: #c9d4de; }
.chart-axis-label { fill: #7d8b9a; font-size: 10px; }
.chart-value-label { fill: var(--ink); font-size: 10px; font-weight: 700; }
.chart-empty-label { fill: #b3bec8; font-size: 11px; }
.chart-bar { fill: var(--series-color, var(--blue)); pointer-events: none; }
.chart-hit { fill: transparent; cursor: pointer; }
.chart-hit.hover { fill: rgba(50,116,186,.07); }
.chart-tooltip { position: absolute; z-index: 2; display: flex; min-width: 150px; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid #dce5ed; border-radius: 7px; color: #42566d; background: #fff; box-shadow: 0 8px 22px rgba(24,50,90,.16); font-size: 10px; pointer-events: none; }
.chart-tooltip strong { color: var(--navy); font-size: 11px; }
.chart-tooltip b { color: var(--ink); }
.comparison-table-wrap { overflow-x: auto; }
.comparison-table { width: 100%; border-collapse: collapse; font-size: 10px; font-variant-numeric: tabular-nums; }
.comparison-table th, .comparison-table td { padding: 6px 8px; border-bottom: 1px solid #eef2f5; text-align: right; white-space: nowrap; }
.comparison-table th:first-child { text-align: left; }
.comparison-table thead th { color: var(--muted); font-size: 9px; font-weight: 700; }
.comparison-table tbody th { color: var(--navy); font-weight: 600; }
.comparison-table td { color: #42566d; }
.theme-dark .comparison-dialog { border-color: #364652; background: #16212b; }
.theme-dark .comparison-header h2, .theme-dark .comparison-chart figcaption, .theme-dark .chart-tooltip strong, .theme-dark .comparison-table tbody th { color: #e6eef5; }
.theme-dark .comparison-metrics { background: #1f2c38; }
.theme-dark .metric-tab.active { color: #e6eef5; background: #2b3b4a; }
.theme-dark .comparison-chart { border-color: #2d3a46; }
.theme-dark .chart-grid { stroke: #24313d; }
.theme-dark .chart-baseline { stroke: #4a5a68; }
.theme-dark .chart-axis-label { fill: #91a1af; }
.theme-dark .chart-value-label, .theme-dark .chart-tooltip b { fill: #e6eef5; color: #e6eef5; }
.theme-dark .chart-hit.hover { fill: rgba(91,154,216,.1); }
.theme-dark .chart-tooltip { border-color: #364652; color: #c3d0db; background: #1b2732; }
.theme-dark .comparison-table th, .theme-dark .comparison-table td { border-color: #24313d; }
.theme-dark .comparison-table td { color: #c3d0db; }
