:root {
  color-scheme: light;
  --bg: #f3f6fb;
  --paper: #fff;
  --ink: #14213a;
  --muted: #65748b;
  --border: #e3eaf3;
  --line: #edf1f6;
  --blue: #2f64ec;
  --nav: #111d31;
  --nav-width: 230px;
  --head-height: 65px;
  --radius: 15px;
  --shadow: 0 2px 6px #172a4a06;
  font-family: 'Inter Variable', Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid #6c93ff; outline-offset: 3px; }
[hidden] { display: none !important; }
.icon { width: 18px; height: 18px; display: inline-block; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.dot { --dot: #72849e; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--dot); }
.muted { color: var(--muted); }
h1, h2, h3, p { margin: 0; }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: var(--nav-width); color: #e8effc; background: var(--nav); display: flex; flex-direction: column; padding: 25px 16px 16px; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 6px; margin-bottom: 48px; min-height: 42px; }
.brand-icon { display: grid; flex: 0 0 auto; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #3267ee; box-shadow: 0 5px 16px #2b63fb42; }
.brand-icon > svg { width: 36px; height: 36px; }
.brand strong { display: block; font-family: 'Manrope Variable', sans-serif; font-size: 18px; font-weight: 810; line-height: 1.2; letter-spacing: -.025em; color: white; }
.brand small { margin-top: 5px; display: block; color: #a4b1c8; font-size: 12px; line-height: 1; }
.nav-caption { padding-left: 12px; margin-bottom: 11px; color: #9cacc6; font-size: 10px; font-weight: 740; letter-spacing: .11em; }
#nav { display: grid; gap: 5px; }
.nav-link { position: relative; min-height: 45px; display: flex; gap: 12px; padding: 0 12px; align-items: center; border-radius: 8px; color: #adbad0; font-size: 14px; font-weight: 565; transition: background .16s ease, color .16s ease; }
.nav-link .icon { width: 18px; height: 18px; }
.nav-link:hover { background: #ffffff10; color: #f4f7ff; }
.nav-link.current { color: #eef4ff; background: #20365e; font-weight: 680; }
.nav-link.current .icon { color: #8eb0ff; }
.nav-link.current::before { content: ''; position: absolute; inset: 11px auto 11px 0; width: 3px; border-radius: 0 4px 4px 0; background: #5b85fa; }
.sidebar-bottom { margin-top: auto; padding: 15px 3px 4px; }
.sidebar-org { display: flex; align-items: center; gap: 10px; padding-top: 15px; border-top: 1px solid #ffffff15; }
.sidebar-org-icon { flex: 0 0 auto; display: grid; place-items: center; width: 33px; height: 33px; border-radius: 8px; color: #9ab0d4; background: #20304c; }
.sidebar-org strong { display: block; font-size: 12px; color: #e2ebfc; font-weight: 640; }
.sidebar-org small { display: block; margin-top: 4px; color: #a4b1c8; font-size: 11px; }
.workspace { margin-left: var(--nav-width); min-height: 100dvh; }
.topbar { height: var(--head-height); background: var(--paper); display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 0 30px; border-bottom: 1px solid var(--border); }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 13px; font-size: 13px; white-space: nowrap; }
.topbar-left strong { font-weight: 690; }
.crumb-root, .top-date { color: #596a84; }
.crumb-separator { color: #91a1b5; width: 13px; height: 13px; }
.top-date { display: inline-flex; gap: 8px; align-items: center; }
.top-date .icon { width: 16px; height: 16px; }
.demo-badge { display: inline-flex; gap: 7px; align-items: center; border: 1px solid #f5dfb9; border-radius: 7px; background: #fff6e6; padding: 6px 9px; color: #8e5519; font-size: 12px; font-weight: 680; }
.demo-badge .dot { width: 6px; height: 6px; }
.mobile-menu, .mobile-scrim { display: none !important; }

.content { width: 100%; max-width: 1750px; margin: auto; padding: 29px 30px 32px; }
.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.page-header h1 { font-family: 'Manrope Variable', sans-serif; font-size: clamp(29px, 3vw, 39px); font-weight: 810; letter-spacing: -.045em; line-height: 1.12; }
.page-header p { color: #596a84; font-size: 14px; line-height: 1.48; margin-top: 8px; }
.page-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 9px; }
.button, .period-control { min-height: 39px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; justify-content: center; white-space: nowrap; border: 1px solid #dfe7f1; background: #fff; border-radius: 8px; color: #283a57; font-size: 13px; font-weight: 670; box-shadow: 0 1px 2px #142c4a06; transition: border-color .16s, background .16s; }
.button:hover, .period-control:hover { background: #f6f9ff; border-color: #bfcff3; }
.button .icon, .period-control .icon { width: 16px; height: 16px; }
.button.primary { color: #fff; background: #2f64ec; border-color: #2f64ec; }
.button.primary:hover { background: #2655d0; border-color: #2655d0; }
.button:disabled { opacity: .48; cursor: default; }
.period-control { position: relative; padding-right: 11px; }
.period-control .icon { color: #627696; pointer-events: none; }
.period-control select { appearance: none; z-index: 1; border: 0; background: transparent; color: #253955; cursor: pointer; font-weight: 660; padding: 10px 24px 10px 36px; margin: -1px -11px -1px -34px; min-height: 39px; }
.period-control .select-chevron { position: absolute; right: 9px; width: 14px; height: 14px; }
.icon-button { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; flex: 0 0 auto; color: #5d7090; background: transparent; border: 1px solid transparent; border-radius: 8px; }
.icon-button.frame { background: #fff; border-color: #e1e9f4; }
.icon-button:hover { background: #f2f6ff; color: var(--blue); }

.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 21px; }
.metric { --metric-ink: #285de0; --metric-tint: #eaf0ff; position: relative; display: flex; min-width: 0; min-height: 137px; flex-direction: column; align-items: flex-start; text-align: left; padding: 15px 16px 14px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--border); color: var(--ink); box-shadow: var(--shadow); transition: border-color .16s ease, box-shadow .16s ease; }
.metric:hover { border-color: #aec5f7; box-shadow: 0 4px 14px #1f367811; }
.metric-green, .stat-green { --metric-ink: #0a8675; --metric-tint: #e4f6f1; }
.metric-purple, .stat-purple { --metric-ink: #734cc7; --metric-tint: #f0ebfb; }
.metric-amber, .stat-amber { --metric-ink: #b26720; --metric-tint: #fff1dd; }
.metric-blue, .stat-blue { --metric-ink: #285de0; --metric-tint: #eaf0ff; }
.metric-top { display: flex; gap: 10px; align-items: center; color: #425572; font-size: 13px; font-weight: 660; white-space: nowrap; }
.metric-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; color: var(--metric-ink); background: var(--metric-tint); }
.metric-icon .icon { width: 17px; height: 17px; stroke-width: 1.85; }
.metric-main { display: flex; gap: 7px; align-items: baseline; margin-top: 8px; white-space: nowrap; }
.metric-main strong { font-family: 'Manrope Variable', sans-serif; font-weight: 820; font-size: clamp(25px, 2.45vw, 35px); letter-spacing: -.055em; line-height: 1; }
.metric-main > span { color: #60728f; font-size: 13px; }
.metric-foot { display: flex; gap: 6px; align-items: center; color: #60718b; font-size: 12px; margin-top: 10px; }
.metric-foot .icon { color: var(--metric-ink); width: 14px; height: 14px; }

.panel { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.panel-head { min-height: 71px; display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 17px; }
.panel-heading { min-width: 0; }
.panel-head h2, .upload-card h2 { font-family: 'Manrope Variable', sans-serif; font-weight: 810; font-size: 19px; line-height: 1.2; letter-spacing: -.028em; }
.panel-head p, .upload-card > p { font-size: 13px; color: #65748b; line-height: 1.4; margin-top: 4px; }
.map-grid { display: grid; grid-template-columns: minmax(0, 1.83fr) minmax(305px, 1fr); align-items: stretch; gap: 17px; margin-bottom: 20px; }
.map-panel { min-width: 0; overflow: hidden; }
.map-head-actions { display: flex; align-items: center; gap: 8px; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; color: #087762; background: #e7f8f2; font-size: 12px; font-weight: 725; border: 1px solid #cfede3; border-radius: 20px; padding: 6px 9px; white-space: nowrap; }
.live-pill-muted { color: #596a84; background: #f3f6fa; border-color: #e1e8f1; }
.map-gps-action { display: flex; justify-content: center; padding: 0 12px 16px; }
.live-dot { box-shadow: 0 0 0 2px #0f9e9025; }
.map-container { position: relative; isolation: isolate; height: 335px; margin: 0 13px; border: 1px solid #dce5e9; border-radius: 10px; overflow: hidden; background: #e9f1eb; }
.map-surface, .map-engine { position: absolute; inset: 0; background: #e8efeb; }
.map-surface .leaflet-container { font-family: inherit; }
.map-surface .leaflet-tile-pane { filter: saturate(.68) contrast(.96) brightness(1.02); }
.map-surface .leaflet-control-attribution { color: #32465e; background: #ffffffe8; font-size: 10px; border-radius: 4px 0 0 0; }
.map-note { position: absolute; z-index: 900; top: 10px; left: 50%; transform: translateX(-50%); font-size: 12px; padding: 6px 10px; background: #fff8e6; color: #795221; border-radius: 6px; white-space: nowrap; }
.map-controls { display: grid; gap: 7px; position: absolute; z-index: 950; top: 11px; right: 10px; }
.map-button { display: grid; place-items: center; width: 33px; height: 33px; padding: 0; border: 1px solid #dce5ef; background: #fff; box-shadow: 0 1px 5px #152b5b13; color: #405673; border-radius: 7px; }
.map-button:hover { color: var(--blue); background: #f1f6ff; }
.map-button .icon { width: 17px; height: 17px; }
.map-zoom { display: grid; border-radius: 7px; overflow: hidden; border: 1px solid #dce5ef; box-shadow: 0 1px 5px #152b5b13; }
.map-zoom .map-button { border: none; border-radius: 0; box-shadow: none; width: 31px; height: 31px; }
.map-zoom .map-button + .map-button { border-top: 1px solid #e5ecf2; }
.map-layers { position: absolute; top: 0; right: 42px; display: grid; gap: 10px; width: max-content; min-width: 154px; padding: 12px; background: #fff; border: 1px solid #dce5ef; border-radius: 8px; box-shadow: 0 3px 14px #1639662c; }
.map-layers label { display: flex; align-items: center; gap: 7px; font-size: 12px; cursor: pointer; }
input[type=checkbox] { accent-color: var(--blue); }
.map-location { position: absolute; z-index: 900; left: 10px; bottom: 31px; display: flex; align-items: center; gap: 6px; color: #435674; background: #fffffff1; border: 1px solid #e2e8ee; border-radius: 6px; padding: 6px 8px; font-size: 11px; font-weight: 650; box-shadow: 0 1px 5px #173a5d19; pointer-events: none; }
.map-location .icon { width: 13px; height: 13px; color: #2463df; }
button.map-location { pointer-events: auto; }
button.map-location:hover { color: #2459cc; border-color: #aac3f5; }
.map-leaf-dot { border: 0; background: transparent; }
.map-pin { width: 32px; height: 32px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; background: var(--pin); color: #fff; box-shadow: 0 2px 6px #1336455e; }
.map-pin .icon { width: 16px; height: 16px; stroke-width: 2.15; }
.map-vehicle-pin { border-radius: 9px; }
.map-vehicle-pin .icon { width: 20px; height: 20px; }
.map-pin.is-selected { box-shadow: 0 0 0 4px #2660e14a, 0 2px 8px #13264760; }
.yandex-engine .map-pin { position: absolute; left: -16px; top: -16px; }
.map-pin.map-depot { --pin: #33486b; border-radius: 9px; }
.map-legend { min-height: 43px; padding: 9px 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 17px; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #536884; white-space: nowrap; }
.map-legend > span:empty { display: none; }
.legend-line { display: inline-block; width: 17px; border-top: 2px solid #8356d8; }
.track-line { border-color: #087e74; border-top-width: 3px; }
.full-grid .map-container { height: max(410px, calc(100dvh - 297px)); }

.fleet-panel { display: flex; flex-direction: column; min-width: 0; }
.fleet-panel .panel-head { border-bottom: 1px solid var(--line); }
.fleet-list { min-height: 0; }
.fleet-panel-full .fleet-list { max-height: max(380px, calc(100dvh - 285px)); overflow: auto; }
.fleet-row { display: grid; grid-template-columns: 35px minmax(0,1fr) max-content; gap: 9px; align-items: center; width: 100%; min-height: 61px; padding: 9px 14px; border: 0; border-bottom: 1px solid var(--line); text-align: left; color: var(--ink); background: #fff; }
.fleet-row:hover, .fleet-row.selected { background: #f5f8ff; }
.fleet-row:focus-visible { outline-offset: -3px; }
.row-icon { width: 34px; height: 34px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 8px; color: #2a62de; background: #edf3ff; }
.row-icon .icon { width: 17px; height: 17px; }
.vehicle-icon.status-working { color: #07866d; background: #e7f6f0; }
.vehicle-icon.status-idle { color: #ab681f; background: #fff2df; }
.vehicle-icon.status-offline, .vehicle-icon.status-reserve, .vehicle-icon.status-depot, .vehicle-icon.status-untracked, .vehicle-icon.status-retired { color: #657894; background: #eff3f8; }
.vehicle-icon.status-repair { color: #a43d55; background: #fcebf0; }
.fleet-name { min-width: 0; }
.fleet-name strong, .fleet-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fleet-name strong { font-size: 12px; line-height: 1.3; font-weight: 735; }
.fleet-name strong > span { color: #8290a4; }
.fleet-name small, .fleet-status > small { color: #65748b; font-size: 11px; line-height: 1.25; display: block; margin-top: 4px; }
.fleet-status { text-align: right; }
.status { display: inline-flex; align-items: center; gap: 5px; border-radius: 5px; padding: 4px 6px; color: #536884; background: #edf2f8; font-size: 11px; font-weight: 700; line-height: 1; white-space: nowrap; }
.status .dot { width: 5px; height: 5px; }
.status.status-working { color: #0b765e; background: #e4f7ee; }
.status.status-transit, .status.status-moving { color: #275bd2; background: #eaf1ff; }
.status.status-idle { color: #90561a; background: #fff2df; }
.status.status-repair { color: #9f3550; background: #fbeaf0; }
.status.status-stopped, .vehicle-icon.status-stopped { color: #90561a; background: #fff2df; }
.status.status-stop_violation, .vehicle-icon.status-stop_violation { color: #a92440; background: #fcebf0; }
.status.status-retired { color: #6b5361; background: #f3edf0; }
.fleet-foot { margin-top: auto; min-height: 50px; display: flex; align-items: center; justify-content: center; padding: 7px 12px; }
.fleet-foot a { display: block; width: 100%; padding: 8px; text-align: center; color: #285bd5; font-size: 13px; font-weight: 700; border-radius: 7px; }
.fleet-foot a:hover { background: #edf3ff; }
.vehicle-filter { display: grid; gap: 8px; padding: 11px 12px; border-bottom: 1px solid var(--line); }
.map-selection { display: flex; align-items: center; gap: 7px; background: #f7faff; padding: 9px 13px; border-bottom: 1px solid var(--line); }
.map-selection > span { flex: 1; min-width: 0; }
.map-selection strong, .map-selection small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-selection strong { font-size: 12px; }
.map-selection small { font-size: 11px; margin-top: 4px; color: var(--muted); }

.table-wrap { width: 100%; overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; font-size: 13px; }
.data-table th { padding: 11px 16px; background: #f6f8fc; border-block: 1px solid #e9eef6; color: #687994; font-weight: 680; font-size: 12px; }
.data-table td { min-height: 54px; padding: 10px 16px; border-bottom: 1px solid var(--line); color: #314563; font-variant-numeric: tabular-nums; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: #fafcff; }
.data-table td:first-child, .data-table th:first-child { padding-left: 17px; }
.data-table .active-period { color: #275bd2; font-weight: 740; }
.garage-table th[aria-sort] { color: #275bd2; }
.data-table.garage-table .plate-column { width: 1%; padding-inline: 9px; white-space: nowrap; }
.plate-value { display:block; width:max-content; max-width:14ch; white-space:normal; overflow-wrap:anywhere; }
.sort-heading { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; white-space: nowrap; }
.sort-heading:hover { color: #275bd2; }
.sort-heading .icon { width: 12px; height: 12px; stroke-width: 2; }
.sort-up { transform: rotate(180deg); }
.sort-neutral { color: #8797af; font-size: 13px; line-height: 1; }
.row-title { display: flex; align-items: center; gap: 9px; text-align: left; padding: 0; background: transparent; border: 0; color: var(--ink); }
.row-title:hover strong { color: var(--blue); }
.row-title strong { display: block; font-size: 13px; font-weight: 740; }
.row-title small { display: block; margin-top: 4px; font-size: 11px; color: #667892; }
.route-icon { color: var(--route); background: color-mix(in srgb,var(--route) 11%,white); }
.coverage { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; font-size: 12px; white-space: nowrap; }
.coverage > i { display: inline-flex; width: 60px; height: 5px; border-radius: 8px; background: #e8eef6; overflow: hidden; }
.coverage i b { height: 100%; border-radius: inherit; }
.coverage strong { min-width: 33px; font-weight: 710; }
.score-pill { display: inline-flex; gap: 3px; align-items: baseline; justify-content: center; min-width: 52px; border-radius: 6px; padding: 5px 7px; font-size: 13px; font-weight: 790; line-height: 1; }
.score-pill > span { font-size: 10px; font-weight: 640; opacity: .78; }
.score-good { color: #086c57; background: #e3f6ee; }
.score-mid { color: #875211; background: #fff1d9; }
.score-low { color: #a03651; background: #fcebf0; }
.table-controls { display: flex; flex-wrap: wrap; gap: 8px 10px; padding: 0 17px 15px; }
.search-box { min-height: 38px; min-width: min(250px,100%); display: inline-flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #dfe7f1; border-radius: 8px; color: #637695; background: #fff; }
.search-box .icon { width: 16px; height: 16px; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; padding: 8px 0; }
.search-box:focus-within { outline: 2px solid #9db8fa; outline-offset: 1px; }
select:not(#period), .edit-form input, .edit-form textarea { border: 1px solid #dfe7f1; border-radius: 8px; padding: 8px 9px; min-height: 36px; color: #293d5d; background-color: #fff; font-size: 13px; }
select:not(#period) { appearance: none; padding-right: 29px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23636478' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 14px; }
.garage-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 15px; margin-bottom: 19px; }
.garage-stat { display: flex; align-items: center; gap: 10px; padding: 14px; min-height: 73px; color: #596a84; font-size: 13px; }
.garage-stat strong { display: block; color: var(--ink); font-family: 'Manrope Variable',sans-serif; font-size: 24px; font-weight: 810; }
.garage-archive-link { width: 100%; text-align: left; }
.garage-archive-link:hover { border-color: #9db8fa; }
.garage-archive { margin-top: 16px; scroll-margin-top: 65px; }
.garage-archive > summary { display: flex; align-items: center; gap: 10px; padding: 15px 17px; list-style: none; cursor: pointer; }
.garage-archive > summary::-webkit-details-marker { display: none; }
.garage-archive > summary span:first-child { display: flex; flex: 1; align-items: center; gap: 9px; font-weight: 740; }
.garage-archive > summary .icon { width: 16px; height: 16px; color: var(--muted); }
#garage-archive-count { color: var(--muted); font-size: 13px; }
.garage-archive[open] .garage-archive-chevron { transform: rotate(180deg); }

.analytics-grid { display: grid; grid-template-columns: minmax(0,1.66fr) minmax(0,1fr); gap: 17px; margin-bottom: 19px; }
.analytics-lower { margin-block: 19px; }
.chart { display: grid; grid-template-columns: 31px minmax(0,1fr); gap: 8px; padding: 15px 19px 0 14px; height: 230px; }
.chart-labels { display: flex; flex-direction: column; justify-content: space-between; text-align: right; color: var(--muted); font-size: 11px; height: calc(100% - 23px); }
.chart-content { position: relative; min-width: 0; padding-bottom: 23px; }
.chart-grid-lines { position: absolute; inset: 5px 0 23px; display: flex; flex-direction: column; justify-content: space-between; }
.chart-grid-lines i { display: block; border-top: 1px solid #edf1f7; }
.chart-bars { position: absolute; inset: 5px 0 23px; display: flex; gap: 3px; justify-content: space-around; align-items: flex-end; }
.chart-group { height: 100%; width: min(7%,32px); position: relative; display: grid; justify-items: center; align-items: flex-end; cursor: help; }
.chart-group > b, .chart-group > i { position: absolute; bottom: 0; border-radius: 4px 4px 0 0; width: 100%; background: #d9e5ff; }
.chart-group > i { width: 56%; background: #386bf1; }
.chart-group > span { position: absolute; top: calc(100% + 6px); color: #62758d; font-size: 10px; white-space: nowrap; }
.chart-legend { display: flex; gap: 15px; align-items: center; padding: 9px 18px 17px; color: #4a6080; font-size: 12px; }
.chart-legend > span { display: inline-flex; gap: 6px; align-items: center; }
.chart-legend > small { margin-left: auto; }
.time-list { margin: 0; padding: 0 17px 13px; }
.time-list > div { display: flex; align-items: center; gap: 9px; justify-content: space-between; border-top: 1px solid var(--line); min-height: 43px; padding-block: 5px; }
.time-list dt { display: flex; gap: 8px; align-items: center; font-size: 13px; color: #435778; }
.time-list dd { margin: 0; font-size: 13px; font-weight: 750; white-space: nowrap; }
.time-list .metric-icon { width: 27px; height: 27px; border-radius: 7px; }
.time-list .icon { width: 14px; height: 14px; }
.recommendations { padding: 0 15px 14px; display: grid; gap: 8px; }
.recommendation { display: flex; align-items: flex-start; gap: 10px; text-align: left; color: var(--ink); border: 1px solid #e6ecf5; background: #f9fbfe; border-radius: 9px; padding: 10px; width: 100%; }
.recommendation:hover { border-color: #b8cdf9; }
.recommendation .row-icon { background: #fff2df; color: #a96520; }
.recommendation strong { display: block; font-size: 13px; line-height: 1.3; }
.recommendation small { display: block; color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 4px; }
.recommendation em { display: inline-block; margin-top: 6px; color: #96591c; font-size: 11px; font-style: normal; font-weight: 690; }
.rank-list { padding: 0 16px 12px; }
.rank-row { min-height: 39px; display: flex; gap: 9px; align-items: center; justify-content: space-between; width: 100%; text-align: left; padding: 6px 2px; color: #354c6d; font-weight: 620; font-size: 13px; background: #fff; border: 0; border-top: 1px solid var(--line); }
.rank-row:hover { color: var(--blue); }
.methodology { padding: 13px 15px; }
.methodology summary { color: #354c6d; font-weight: 680; cursor: pointer; font-size: 14px; }
.methodology summary .icon { width: 15px; height: 15px; color: var(--blue); margin-inline: 5px; }
.methodology > div { padding: 4px 10px 8px; }
.methodology p { margin-top: 10px; color: #536681; font-size: 13px; line-height: 1.65; }

.import-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 17px; margin-bottom: 19px; }
.upload-card { padding: 16px; display: flex; flex-direction: column; }
.upload-icon { display: grid; place-items: center; width: 40px; height: 40px; background: #eaf0ff; color: #285de0; border-radius: 10px; margin-bottom: 11px; }
.upload-vehicles { background: #e4f6f1; color: #0a8675; }
.upload-telemetry { background: #f0ebfb; color: #734cc7; }
.upload-card > p { margin-top: 6px; min-height: 63px; }
.upload-drop { display: grid; position: relative; place-items: center; align-content: center; gap: 5px; min-height: 113px; padding: 9px; margin-top: auto; border: 1.5px dashed #cbd9ee; border-radius: 9px; color: #3159a0; background: #f7faff; text-align: center; cursor: pointer; }
.upload-drop:hover,.upload-drop.drag-on { border-color: #7599ef; background: #ecf3ff; }
.upload-drop:focus-within { outline: 2px solid #9db8fa; }
.upload-drop > .icon { width: 22px; height: 22px; }
.upload-drop > strong { font-size: 12px; }
.upload-drop > small { color: #677b98; font-size: 11px; }
.upload-drop > input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.upload-foot { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-top: 12px; font-size: 12px; color: #285bd5; font-weight: 690; }
.upload-foot > a { display: inline-flex; align-items: center; gap: 5px; }
.upload-foot > a:hover { text-decoration: underline; }
.upload-foot > a .icon { width: 15px; height: 15px; }
.upload-foot > span { color: #4c627f; font-size: 11px; }
.integration { margin-bottom: 19px; }
.integration-body { padding: 0 17px 15px; color: #536681; font-size: 13px; line-height: 1.6; }
.integration-body code,.integration-body pre { background: #edf3ff; color: #315996; padding: 2px 4px; border-radius: 4px; }
.integration-body details { margin-top: 10px; }
.rnis-error { margin-top: 10px; }
.integration-body summary { cursor: pointer; color: #295fc5; font-weight: 680; }
.integration-body pre { padding: 9px; overflow: auto; font-size: 12px; }
.empty { padding: 24px 14px; display: grid; gap: 7px; justify-items: center; text-align: center; color: #324866; }
.empty-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; background: #edf3ff; color: #416dd2; }
.empty strong { font-size: 14px; }
.empty p { color: var(--muted); font-size: 13px; line-height: 1.45; }
.loading, .retry { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 20px; color: #5d7190; }
.loading { min-height: 185px; }
.spinner { width: 18px; height: 18px; border: 2px solid #c5d6f4; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.detail-dialog { padding: 0; border: 1px solid #dfe7f1; border-radius: 16px; box-shadow: 0 16px 65px #12244640; color: var(--ink); width: min(590px,calc(100% - 24px)); max-height: calc(100% - 24px); }
.detail-dialog::backdrop { background: #08152d68; }
#vehicle-terminal { margin-top: 16px; }
.vehicle-signal-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-block: 12px; }
.vehicle-signal-controls p { flex: 1 1 250px; font-size: 13px; color: var(--muted); }
.vehicle-raw .table-wrap { max-height: 340px; overflow: auto; }
.vehicle-raw th { position: sticky; top: 0; z-index: 1; }
.vehicle-raw td small { display: block; color: var(--muted); }
.vehicle-raw-value { white-space: normal; overflow-wrap: anywhere; min-width: 100px; }
.vehicle-signal-form { display: grid; gap: 11px; }
.vehicle-signal-form > p { font-size: 13px; color: var(--muted); }
.vehicle-signal-form fieldset { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: 9px; padding: 9px; }
.vehicle-signal-form legend { font-weight: 720; font-size: 13px; }
.vehicle-signal-form label { display: grid; gap: 4px; min-width: 0; color: var(--muted); font-size: 12px; }
.vehicle-signal-channel { grid-column: 1/-1; }
.vehicle-signal-form select, .vehicle-signal-form input { width: 100%; min-width: 0; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 17px; border-bottom: 1px solid var(--line); }
.detail-head h2 { font-family: 'Manrope Variable',sans-serif; font-size: 22px; letter-spacing: -.025em; }
.detail-head p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.detail-body { padding: 16px 17px; }
.detail-body h3 { margin: 15px 0 3px; font-size: 15px; }
.detail-badges { display: flex; align-items: center; gap: 11px; }
.detail-stats { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px 15px; margin: 7px 0 0; }
.detail-stats > div { padding: 7px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.detail-stats dt { font-size: 12px; color: var(--muted); }
.detail-stats dd { margin: 4px 0 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 675; }
.detail-note { display: flex; align-items: center; gap: 8px; color: #516788; font-size: 13px; line-height: 1.5; margin-top: 11px; }
.detail-section { margin-top: 15px; }
.detail-section > summary { cursor: pointer; margin-bottom: 8px; font-size: 13px; font-weight: 690; color: #324c79; }
.compact td, .compact th, .compact td:first-child, .compact th:first-child { padding: 7px; font-size: 11px; }
.detail-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 13px 17px; border-top: 1px solid var(--line); }
.edit-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px 12px; }
.edit-form label { display: grid; gap: 5px; min-width: 0; font-size: 12px; font-weight: 660; color: #4a6181; }
.edit-form input,.edit-form select,.edit-form textarea { width: 100%; min-width: 0; font-weight: 480; }
.edit-form input[type=color] { padding: 3px 5px; }
.edit-form .wide { grid-column: 1/-1; }
.form-error { padding: 8px; color: #a03651; background: #fcebf0; border-radius: 6px; font-size: 13px; }
.toast { z-index: 1000; position: fixed; right: 17px; bottom: 17px; width: max-content; max-width: min(460px,calc(100% - 34px)); min-height: 47px; display: flex; align-items: center; gap: 9px; padding: 7px 9px 7px 12px; border-radius: 10px; background: #f2fcf8; border: 1px solid #c4e8d9; color: #0a725c; box-shadow: 0 5px 24px #172d4a19; font-size: 13px; font-weight: 650; }
.toast-error { background: #fff4f6; border-color: #efcdd5; color: #983a53; }

@media (min-width: 1500px) {
  .content { padding-inline: 34px; }
  .map-container { height: 370px; }
  .fleet-row { min-height: 65px; }
}
@media (max-width: 1150px) {
  :root { --nav-width: 199px; }
  .sidebar { padding-inline: 11px; }
  .content, .topbar { padding-inline: 20px; }
  .metrics-grid { gap: 10px; }
  .metric { padding-inline: 10px; }
  .metric-top { gap: 6px; font-size: 12px; }
  .metric-foot { font-size: 11px; }
  .map-grid { gap: 11px; grid-template-columns: minmax(0,1.55fr) minmax(280px,1fr); }
  .data-table td, .data-table th { padding-inline: 10px; }
}
@media (max-width: 950px) {
  :root { --nav-width: 65px; }
  .sidebar { padding: 17px 8px 11px; }
  .brand { margin: 0 auto 28px; padding: 0; }
  .brand > span:nth-child(2), .nav-caption, .nav-link > span, .sidebar-org > span:nth-child(2) { display: none; }
  .nav-link { justify-content: center; padding: 0; }
  .sidebar-org { justify-content: center; }
}
@media (max-width: 730px) {
  :root { --nav-width: 0px; --head-height: 56px; }
  .sidebar { transform: translateX(-100%); transition: transform .18s ease; width: 218px; padding: 18px 12px; }
  .mobile-nav-open .sidebar { transform: translateX(0); }
  .mobile-nav-open .mobile-scrim { display: block !important; border: 0; background: #101e3464; position: fixed; inset: 0; z-index: 19; }
  .mobile-menu { display: inline-grid !important; }
  .brand { margin: 0 0 29px; padding: 0 6px; }
  .brand > span:nth-child(2), .nav-caption, .nav-link > span, .sidebar-org > span:nth-child(2) { display: block; }
  .nav-link { padding: 0 12px; justify-content: flex-start; }
  .sidebar-org { justify-content: flex-start; }
  .topbar { padding-inline: 12px; }
  .topbar-left, .topbar-right { gap: 8px; }
  .crumb-root, .crumb-separator { display: none; }
  .content { padding: 19px 12px 24px; }
  .page-header { flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
  .page-header h1 { font-size: 30px; }
  .page-header p { font-size: 13px; margin-top: 5px; }
  .metrics-grid, .garage-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric { min-height: 114px; }
  .metric-main strong { font-size: 27px; }
  .map-grid, .analytics-grid { grid-template-columns: 1fr; gap: 13px; }
  .map-container { height: 310px; }
  .full-grid .map-container { height: 410px; }
  .fleet-panel-full .fleet-list { max-height: 500px; }
  .map-legend { gap: 8px 12px; }
  .import-grid { grid-template-columns: 1fr; gap: 12px; }
  .upload-card > p { min-height: 0; margin-bottom: 10px; }
}
@media (max-width: 380px) {
  .top-date .icon { display: none; }
  .top-date { font-size: 11px; }
  .map-head-actions { gap: 5px; }
  .metrics-grid { gap: 7px; }
  .metric-top { gap: 5px; font-size: 11px; }
  .metric-icon { width: 29px; height: 29px; }
  .chart-group .alternate-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; }
}

/* Working shift, telemetry and route comparison */
#nav { gap: 4px; }
.nav-link { min-height: 42px; }
.sidebar { overflow-y: auto; }
.ops-quick { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:18px; padding:13px 15px; }
.ops-quick-title, .ops-quick-links, .ops-quick-data { display:flex; align-items:center; gap:9px; }
.ops-quick-title > .icon { width:20px; height:20px; color:#2f64ec; }
.ops-quick-title h2 { font:800 16px/1.18 'Manrope Variable',sans-serif; white-space:nowrap; }
.ops-quick-title p, .ops-quick-data small { color:var(--muted); font-size:12px; margin-top:3px; }
.ops-quick-data { flex-wrap:wrap; gap:6px 15px; font-size:12px; color:#566780; }
.ops-quick-data b { color:#233955; font-variant-numeric:tabular-nums; }
.ops-quick-data .ops-text-danger b { color:#a4354e; }
.ops-quick-links { flex-shrink:0; }
.ops-stat-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin-bottom:17px; }
.ops-stat { display:grid; gap:5px; align-content:center; min-height:79px; padding:12px 17px; }
.ops-stat + .ops-stat { border-left:1px solid var(--line); }
.ops-stat > span { color:#5f6e86; font-size:13px; font-weight:630; }
.ops-stat > strong { font:820 27px/1.1 'Manrope Variable',sans-serif; color:var(--ink); letter-spacing:-.04em; font-variant-numeric:tabular-nums; }
.ops-text-live { color:#0a7863 !important; }
.ops-text-danger { color:#a4354e !important; }
.ops-text-blue { color:#2b5dd8 !important; }
.ops-date { display:grid; gap:4px; font-size:11px; color:var(--muted); }
.ops-date input, .ops-field select { min-height:38px; width:100%; border:1px solid var(--border); background:#fff; color:var(--ink); border-radius:8px; padding:7px 10px; font-size:13px; }
.ops-notice { display:flex; align-items:center; gap:13px; margin-bottom:16px; padding:12px 15px; border:1px solid #dfe8fb; border-radius:11px; background:#edf3ff; color:#254a8b; }
.ops-notice > .icon { flex:0 0 auto; width:21px; height:21px; }
.ops-notice > div { flex:1; }
.ops-notice strong { font-size:14px; }
.ops-notice p { margin-top:3px; color:#526988; font-size:13px; line-height:1.45; }
.ops-board { display:grid; grid-template-columns:minmax(290px,.92fr) minmax(0,1.35fr); gap:16px; align-items:start; }
.ops-board .map-container { height:clamp(335px,48vh,540px); }
.ops-assignment-panel { overflow:hidden; }
.ops-task-list { display:grid; gap:6px; padding:0 12px 12px; max-height:430px; overflow:auto; }
.ops-task { width:100%; display:grid; grid-template-columns:minmax(0,1fr) max-content; column-gap:9px; row-gap:4px; text-align:left; padding:10px; border-radius:10px; border:1px solid #e6ecf5; background:#fff; color:var(--ink); }
.ops-task:hover,.ops-task.selected,.ops-scenario:hover,.ops-scenario.selected { border-color:#a9c2f9; background:#f3f7ff; }
.ops-task > strong, .ops-task > small { grid-column:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ops-task > strong { font-size:14px; }
.ops-task > small { color:var(--muted); font-size:12px; }
.ops-task-time { grid-column:1; color:#496389; font-size:12px; font-variant-numeric:tabular-nums; font-weight:670; margin-bottom:1px; }
.ops-task-time > span { color:#8290a5; }
.ops-task-state { grid-column:2; grid-row:1 / span 3; display:flex; flex-direction:column; align-items:flex-end; gap:4px; }
.ops-task-state em { font-size:11px; font-style:normal; color:#875211; }
.ops-task-progress { grid-column:1 / -1; display:flex; align-items:center; gap:7px; color:#456180; font-size:11px; }
.ops-task-progress > i { flex:1; height:4px; background:#e4edf9; border-radius:5px; overflow:hidden; }
.ops-task-progress b { display:block; height:100%; background:#26a28d; border-radius:5px; }
.ops-status { display:inline-flex; align-items:center; gap:5px; padding:4px 7px; border-radius:6px; font-size:11px; font-weight:710; white-space:nowrap; background:#eef2f8; color:#536884; }
.ops-status i { width:5px; height:5px; border-radius:50%; background:currentColor; }
.ops-status.ops-live { background:#e5f7ef; color:#08755d; }
.ops-status.ops-warning { background:#fff3dd; color:#8e5c1e; }
.ops-status.ops-danger { background:#fcebf0; color:#a4354e; }
.ops-task-detail { display:grid; gap:7px; padding:13px 15px; border-top:1px solid var(--line); }
.ops-task-detail h3 { font:810 16px/1.3 'Manrope Variable',sans-serif; }
.ops-task-detail > div > span, .ops-task-detail > p { font-size:12px; color:var(--muted); }
.ops-task-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:4px; }
.ops-gps-source { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin-bottom:16px; }
.ops-gps-source > div { display:grid; gap:5px; padding:13px 16px; }
.ops-gps-source > div + div { border-left:1px solid var(--line); }
.ops-gps-source span { display:flex; align-items:center; gap:7px; color:#526685; font-size:12px; }
.ops-gps-source span .icon { color:#396ed9; width:14px; height:14px; }
.ops-gps-source strong { color:#2a3e59; font-size:13px; }
.ops-gps-source small { color:var(--muted); font-size:11px; }
.ops-form { display:grid; gap:10px; padding:0 15px 15px; }
.ops-form .button { justify-self:start; }
.ops-field { min-width:0; display:grid; gap:5px; font-size:12px; font-weight:660; color:#4a6181; }
.ops-compare, .ops-road-message { display:grid; gap:7px; border-top:1px solid var(--line); padding:12px 15px; }
.ops-road-message { display:flex; align-items:center; color:#915821; background:#fff8ec; border-radius:0 0 14px 14px; }
.ops-road-message p,.ops-compare p,.ops-score p { color:#586d88; font-size:12px; line-height:1.5; }
.ops-map-source { color:#496799; font-size:11px; text-decoration:underline; text-underline-offset:2px; }
.ops-scenario { display:grid; gap:4px; text-align:left; width:100%; padding:10px; border:1px solid var(--border); border-radius:9px; color:var(--ink); background:#fff; }
.ops-scenario span { color:#435976; font-size:12px; font-weight:650; }
.ops-scenario strong { font-size:17px; font-variant-numeric:tabular-nums; }
.ops-scenario small { color:var(--muted); }
.ops-scenario .ops-road-best { margin-left:5px; padding:2px 5px; border-radius:4px; background:#e4f6ed; color:#08755d; }
.ops-scenario.unavailable strong { font-size:13px; color:var(--muted); }
.ops-score-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin-block:8px; }
.ops-score-grid > div { display:grid; gap:4px; padding:8px 9px; border:1px solid var(--line); border-radius:8px; background:#f7faff; }
.ops-score-grid span { color:#405778; font-size:12px; font-weight:650; }
.ops-score-grid b { font-size:15px; }
.ops-score-grid small { color:#61748d; font-size:11px; }

@media (max-width: 1130px) {
  .nav-link { gap:9px; font-size:13px; }
  .ops-quick { flex-wrap:wrap; }
  .ops-board { grid-template-columns:minmax(260px,1fr) minmax(0,1.2fr); gap:12px; }
  .page-header:has(.page-actions > :nth-child(3)) { flex-wrap:wrap; }
}
@media (max-width: 810px) {
  .ops-board { grid-template-columns:1fr; }
  .ops-quick { flex-wrap:wrap; gap:8px 11px; }
  .ops-quick-links { margin-left:auto; }
}
@media (max-width: 540px) {
  .page-actions { flex-wrap:wrap; }
  .ops-quick-links { margin-left:0; }
  .ops-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ops-stat:nth-child(3) { border-left:0; }
  .ops-stat:nth-child(n+3) { border-top:1px solid var(--line); }
  .ops-gps-source { grid-template-columns:1fr; }
  .ops-gps-source > div + div { border-left:0; border-top:1px solid var(--line); }
  .ops-notice { flex-wrap:wrap; }
  .ops-notice .button { margin-left:34px; }
}
.ops-turnout-mini { display:grid; gap:3px; align-self:center; min-width:125px; padding:7px 10px; border:1px solid currentColor; border-radius:9px; }
.ops-turnout-mini:hover { box-shadow:0 2px 6px #144d7420; }
.ops-turnout-mini div { display:flex; align-items:center; justify-content:space-between; gap:6px; }
.ops-turnout-mini small,.ops-turnout-mini > span { font-size:11px; font-weight:650; white-space:nowrap; }
.ops-turnout-mini strong { font:830 18px/1.05 'Manrope Variable',sans-serif; white-space:nowrap; }
.ops-turnout-panel { margin-bottom:16px; }
.ops-turnout-panel:empty { display:none; }
.ops-turnout-main { display:grid; grid-template-columns:160px minmax(0,1fr); gap:17px; padding:14px 16px; }
.ops-turnout-value { display:grid; align-content:center; justify-items:start; gap:5px; padding:12px; border-radius:9px; }
.ops-turnout-value > span { font-weight:720; font-size:13px; }
.ops-turnout-value strong { font:850 31px/1 'Manrope Variable',sans-serif; letter-spacing:-.04em; }
.ops-turnout-value small { font-size:11px; }
.ops-turnout-method h2 { font:800 16px/1.2 'Manrope Variable',sans-serif; }
.ops-turnout-method p { margin-top:5px; color:#536884; font-size:12px; line-height:1.55; }
.ops-turnout-scale { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.ops-turnout-scale span { padding:3px 7px; border-radius:5px; font-size:11px; font-weight:720; }
.rate-green { color:#08765e; background:#e8f7ef; }
.rate-yellow { color:#855a13; background:#fff3dc; }
.rate-red { color:#a4354e; background:#fcebf0; }
.rate-unknown { color:#516780; background:#edf2f8; }
.ops-turnout-details { border-top:1px solid var(--line); padding:11px 16px; }
.ops-turnout-details summary { font-size:13px; font-weight:700; color:#324c79; cursor:pointer; padding-bottom:6px; }
.pass-plan-share { display:block; font-size:11px; color:var(--muted); margin-top:3px; }
.edit-form label.ops-uniform { display:flex; align-items:center; justify-content:flex-start; gap:7px; }
.edit-form .ops-uniform input { width:auto; min-height:0; }
@media (max-width: 470px) {
  .ops-turnout-main { grid-template-columns:1fr; gap:10px; }
  .ops-turnout-value { grid-template-columns:1fr max-content; align-items:center; }
  .ops-turnout-value small { grid-column:1 / -1; }
  .ops-quick-data { order:4; flex-basis:100%; }
}

/* Live standstills and the shift incident log */
.stat-red { --metric-ink: #a92440; --metric-tint: #fcebf0; }
.stops-banner { display: flex; align-items: center; gap: 12px; margin-bottom: 17px; padding: 11px 15px; }
.stops-banner:hover { border-color: #b6c8ec; }
.stops-banner.has-violations { border-color: #efb6c2; }
.stops-banner strong { display: block; font-size: 13px; }
.stops-banner small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.stops-banner-end { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: 12px; text-align: right; }
.stops-banner-end b { padding-left: 4px; font-size: 15px; }
.has-violations .stops-banner-end b { color: #a92440; }
.stop-icon { display: grid; flex: 0 0 auto; place-items: center; width: 35px; height: 35px; border-radius: 9px; color: #90561a; background: #fff2df; }
.stop-icon .icon { width: 18px; height: 18px; }
.stop-icon.is-violation, .has-violations .stop-icon { color: #a92440; background: #fcebf0; }
.stops-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 17px; }
.stops-layout { display: grid; grid-template-columns: minmax(390px,1fr) minmax(0,1.05fr); align-items: start; gap: 17px; }
.stops-lists { min-width: 0; display: grid; gap: 17px; }
.stops-lists .panel { overflow: hidden; }
.stops-layout .map-panel { position: sticky; top: 16px; }
.stops-layout .map-container { height: clamp(350px,58dvh,780px); }
.stops-history-head { flex-wrap: wrap; }
.stops-history-head input { max-width: 100%; padding: 7px 8px; border: 1px solid var(--border); border-radius: 7px; color: var(--ink); background: #fff; font-size: 13px; }
.stops-rows { max-height: 390px; overflow: auto; }
.stop-row { display: grid; grid-template-columns: 35px minmax(0,1fr) max-content 16px; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 10px 13px; color: var(--ink); background: #fff; border: 0; border-top: 1px solid var(--line); }
.stop-row:hover, .stop-row.selected { background: #f1f5ff; }
.stop-row:focus-visible { outline-offset: -3px; }
.stop-row-name strong, .stop-row-time strong { display: block; font-size: 13px; }
.stop-row-name strong span { color: #475b78; font-weight: 570; }
.stop-row small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.stop-row-time { text-align: right; }
.stop-row-time strong { margin-top: 4px; }
.stop-row-pin { width: 15px; height: 15px; color: #4368ad; }
@media (max-width: 1050px) {
  .stops-layout { grid-template-columns: minmax(0,1fr); gap: 13px; }
  .stops-layout .map-panel { position: static; }
}
@media (max-width: 520px) {
  .stops-summary { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .stops-summary > :last-child { grid-column: 1 / -1; }
  .stops-banner-end { gap: 4px; }
  .stop-row { grid-template-columns: 29px minmax(0,1fr) max-content; padding-inline: 8px; gap: 7px; }
  .stop-row .stop-icon { width: 29px; height: 29px; }
  .stop-row-pin { display: none; }
}

.coverage-date { display:flex; align-items:center; gap:7px; padding:6px 10px; background:var(--paper); border:1px solid var(--border); border-radius:8px; color:#405673; }
.coverage-date .icon { width:17px; height:17px; }
.coverage-date input { min-width:125px; color:var(--ink); background:transparent; border:0; font-size:13px; }
.coverage-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:15px; margin-bottom:17px; }
.coverage-kpi { min-width:0; padding:14px; }
.coverage-kpi > div { display:flex; align-items:center; gap:9px; font-size:13px; font-weight:650; color:#435571; }
.coverage-kpi .metric-icon { width:33px; height:33px; flex:none; }
.coverage-kpi > strong { display:block; font-size:clamp(21px,2.1vw,36px); font-family:'Manrope Variable',sans-serif; letter-spacing:-.04em; margin:9px 0 3px; white-space:nowrap; }
.coverage-kpi > small { display:block; color:var(--muted); font-size:11px; line-height:1.35; }
.coverage-layout { display:grid; grid-template-columns:minmax(0,2.15fr) minmax(270px,1fr); align-items:start; gap:17px; margin-bottom:17px; }
.coverage-layout .map-container { height:clamp(450px,63vh,830px); }
.coverage-sidebar { display:grid; gap:12px; min-width:0; }
.coverage-panel-body { padding:0 15px 14px; font-size:13px; }
.coverage-panel-body p, .coverage-panel-body > small { color:var(--muted); line-height:1.5; margin-top:8px; display:block; }
.coverage-panel-body .form-error { color:#b02747; }
.coverage-meter { height:8px; background:#e9effb; border-radius:999px; overflow:hidden; }
.coverage-meter span { display:block; height:100%; background:#d52244; transition:width .25s ease; }
.coverage-method { font-size:12px; margin-top:10px; color:#345789; }
.coverage-method summary { cursor:pointer; font-weight:650; }
.coverage-forecast { display:grid; gap:5px; background:#edf3ff; border:1px solid #dfe8ff; color:#234980; border-radius:9px; padding:9px; margin-top:12px; }
.coverage-forecast small { color:#41618e; }
.coverage-track-info dl { margin-bottom:0; }
.coverage-track-info dl div { display:flex; align-items:start; justify-content:space-between; gap:8px; padding:5px 0; border-top:1px solid var(--line); }
.coverage-track-info dd { margin:0; font-weight:650; text-align:right; }
#coverage-vehicle { width:100%; }
#coverage-ai .coverage-ai-text { white-space:pre-wrap; color:var(--ink); max-height:350px; overflow:auto; overflow-wrap:anywhere; }
.coverage-map-focus { display:flex; gap:10px; align-items:center; justify-content:space-between; margin:9px 14px 0; padding:7px 8px; background:#edf3ff; border-radius:7px; font-size:13px; font-weight:650; }
.coverage-map-focus .button { min-height:30px; white-space:nowrap; }
.coverage-track-line { display:inline-block; width:17px; border-top:2px dashed #334155; }
.coverage-register { overflow:hidden; }
.coverage-table td:first-child { width:45%; min-width:245px; }
.coverage-table tr.selected { background:#f0f5ff; }
.coverage-result { border-radius:5px; padding:4px 7px; background:#edf1f8; font-weight:700; color:#536884; white-space:nowrap; }
.coverage-result.partial { color:#a16c1b; background:#fff3dc; }
.coverage-result.complete { color:#ac2040; background:#fcebf0; }
.coverage-pages { display:flex; align-items:center; justify-content:center; gap:14px; padding:12px; font-size:12px; color:var(--muted); }
@media (max-width:1075px) {
  .coverage-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .coverage-layout { grid-template-columns:minmax(0,1fr); }
  .coverage-sidebar { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .coverage-sidebar > :last-child { grid-column:1 / -1; }
  .coverage-layout .map-container { height:clamp(350px,57vh,620px); }
}
@media (max-width:540px) {
  .coverage-sidebar { grid-template-columns:minmax(0,1fr); }
  .coverage-kpi { padding:9px; }
  .coverage-kpi > div { line-height:1.2; }
  .coverage-kpi .metric-icon { width:29px; height:29px; }
}

.map-road-card { position:absolute; z-index:920; bottom:20px; left:12px; width:min(340px,calc(100% - 65px)); max-height:calc(100% - 30px); overflow:auto; background:#fff; border:1px solid #dfe7f3; border-radius:12px; box-shadow:0 6px 24px #172a4a30; padding:12px 13px; font-size:12px; }
.map-container:has(.map-road-card:not([hidden])) .map-location { display:none; }
.map-road-card-head { display:flex; gap:9px; justify-content:space-between; align-items:start; }
.map-road-card-head strong { display:block; font-size:14px; line-height:1.3; }
.map-road-card .icon-button { flex:0 0 auto; width:27px; height:27px; margin:-4px -4px 0 0; }
.map-road-card small { display:block; color:var(--muted); font-size:11px; line-height:1.3; margin-top:3px; }
.map-road-card dl { margin:9px 0 0; }
.map-road-card dl > div { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.15fr); gap:8px; padding:6px 0; border-top:1px solid var(--line); }
.map-road-card dt { color:#435571; }
.map-road-card dd { margin:0; text-align:right; font-weight:650; }
.coverage-overdue-tag { display:inline-block; padding:3px 6px; border-radius:5px; background:#fff0d7; color:#914901; font-size:11px; font-weight:700; }
.coverage-table td:last-child { white-space:nowrap; }
.route-empty-actions { display:flex; justify-content:center; flex-wrap:wrap; gap:8px; padding:0 13px 15px; }

.dispatch-controls { display:flex; flex-wrap:wrap; gap:9px; align-items:center; margin-bottom:16px; }
#dispatch-weather { color:var(--muted); font-size:12px; }
.dispatch-layout { display:grid; grid-template-columns:minmax(0,1.8fr) minmax(270px,1fr); align-items:start; gap:16px; margin-bottom:16px; }
.dispatch-events { overflow:hidden; }
.dispatch-events .panel-head { flex-wrap:wrap; }
.dispatch-event-list { max-height:430px; overflow:auto; }
.dispatch-event { display:grid; grid-template-columns:35px minmax(0,1fr) max-content; gap:10px; align-items:start; padding:12px 14px; border-top:1px solid var(--line); font-size:13px; }
.dispatch-event small,.dispatch-table small { display:block; font-size:11px; color:var(--muted); margin-top:3px; }
.dispatch-event p { margin:5px 0 0; color:#435571; font-size:12px; }
.dispatch-event-actions { display:grid; gap:5px; justify-items:end; }
.dispatch-event-actions .button { min-height:29px; }
.dispatch-pill { border-radius:5px; padding:3px 6px; background:#fff0d7; color:#914901; font-size:11px; font-weight:700; white-space:nowrap; }
.dispatch-pill.acknowledged { background:#e9f1ff; color:#234da6; }
.dispatch-pill.resolved { background:#e4f6ed; color:#1e6e4a; }
.dispatch-quality-list { margin:0; }
.dispatch-quality-list div { display:grid; grid-template-columns:minmax(0,1fr) max-content; gap:10px; align-items:baseline; padding:8px 0; border-top:1px solid var(--line); }
.dispatch-quality-list dd { margin:0; font-weight:730; }
.dispatch-quality-list dd small { margin-left:3px; color:var(--muted); }
.dispatch-insights .button { margin-top:8px; }
.dispatch-task-link { color:#234da6; font-weight:700; }
.dispatch-task-link:hover { text-decoration:underline; }
.dispatch-table .button { white-space:nowrap; }
.dispatch-batch-choices { max-height:280px; overflow:auto; padding:9px; border:1px solid var(--line); border-radius:8px; }
.dispatch-batch-choices label { display:grid; grid-template-columns:20px minmax(0,1fr); gap:8px; align-items:start; border-bottom:1px solid var(--line); padding:7px 0; }
.dispatch-batch-choices small { display:block; color:var(--muted); font-size:11px; }
.dispatch-batch-choices input[type=checkbox],.dispatch-batch-choices input[type=radio] { min-height:0; width:auto; }
@media (max-width:980px) { .dispatch-layout { grid-template-columns:1fr; } }
