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

:root { font-family: 'DM Sans', 'Segoe UI', sans-serif; font-size: 16px; color: #263d4b; background: #f1f4f6; --ink: #142e3e; --muted: #657985; --line: #dde5e9; --accent: #087f83; --detail-width: 300px; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, select, summary, a { cursor: pointer; }
button { color: inherit; }
button:disabled { cursor: wait; opacity: .55; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #3aa6aa; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.1rem; font-weight: 700; letter-spacing: -.025em; }
h2 { font-size: 1.25rem; font-weight: 600; letter-spacing: -.025em; }
h3 { font-size: .9rem; font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.topbar { min-height: 66px; display: flex; align-items: center; gap: 23px; padding: 12px 26px; background: var(--ink); color: #fff; }
.brand { font-size: 1.65rem; font-weight: 700; letter-spacing: -.065em; color: #fff; text-decoration: none; }
.brand span { color: #6bdbce; }
.topbar-divider { width: 1px; height: 25px; background: #ffffff26; }
.product-title { font-size: .9rem; font-weight: 500; }
.product-title span { margin-left: 12px; color: #a8bdc9; font-size: .78rem; font-weight: 400; }
.connection { display: flex; align-items: center; gap: 7px; margin-left: auto; color: #c1d2da; font-size: .78rem; }
.connection::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #7ce2bd; }
.connection.error::before { background: #ffb782; }
.topbar-link { font-size: .82rem; text-underline-offset: 4px; }
main { max-width: 2200px; margin: auto; padding: 18px 22px 8px; }
.simulation-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 13px 24px; padding-bottom: 15px; }
.eyebrow { display: block; margin-bottom: 4px; color: var(--muted); font-size: .76rem; }
.clock-block { min-width: 225px; }
.clock-block strong { font-size: 1.08rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.playback { display: flex; flex-wrap: wrap; align-items: end; gap: 7px; }
.speed-label { display: grid; gap: 3px; }
.speed-label > span { font-size: .75rem; color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 7px 11px; border: 1px solid #d2dfe4; border-radius: 6px; background: #fff; font-size: .875rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.button:hover { border-color: #97b7bf; background: #f1f7f7; }
.button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.button.primary:hover { background: #08696f; }
.button.quiet { margin-left: auto; border-color: transparent; background: transparent; color: var(--muted); }
.button.small { min-height: 31px; padding: 5px 9px; font-size: .81rem; }
.button.full { width: 100%; }
select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23667984' stroke-width='1.5'/%3E%3C/svg%3E") right 10px center / 10px no-repeat; padding-right: 28px !important; }
select, input:not([type='checkbox']), textarea { min-width: 0; width: 100%; min-height: 36px; padding: 7px 9px; border: 1px solid #d2dfe4; border-radius: 6px; background-color: #fff; color: var(--ink); font-size: .875rem; }
textarea { resize: vertical; line-height: 1.5; }
input[type='checkbox'] { flex: 0 0 15px; width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }
.check-label { display: flex; align-items: center; gap: 7px; font-size: .81rem; }
.workspace-nav { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 13px; border-bottom: 1px solid #d9e2e7; }
.view-tab { position: relative; padding: 11px 17px; border: 0; background: transparent; color: #617682; font-size: .9rem; font-weight: 500; }
.view-tab.active { color: #08767b; font-weight: 700; }
.view-tab.active::after { content: ''; position: absolute; right: 15px; bottom: -1px; left: 15px; height: 2px; background: var(--accent); }

.workspace, .drivers-view, .zones-view { display: grid; grid-template-columns: minmax(0, 1fr) var(--detail-width); align-items: start; gap: 15px; }
.fleet-main, .drivers-main, .zones-main { display: grid; min-width: 0; gap: 15px; }
.records-panel, .map-pane, .driver-activity-section, .detail-panel { min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.records-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 17px 18px 15px; }
.records-heading h1 { display: flex; align-items: center; gap: 9px; }
.records-heading p { margin-top: 4px; font-size: .81rem; color: var(--muted); }
.count { padding: 2px 7px; border-radius: 4px; background: #edf2f4; color: #566f7c; font-size: .75rem; font-weight: 600; letter-spacing: 0; }
.records-scroll { min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: thin; border-radius: 0 0 9px 9px; }
.records-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; line-height: 1.4; }
.fleet-records { min-width: 760px; }
.driver-records { min-width: 900px; }
.records-table th { padding: 10px 11px; border-top: 1px solid #e6ecef; border-bottom: 1px solid var(--line); background: #f8fafb; color: #5c7380; font-size: .875rem; line-height: 1.4; font-weight: 500; vertical-align: middle; }
.records-table td { padding: 10px 11px; border-bottom: 1px solid #e9eff2; vertical-align: middle; }
.records-table tbody tr:last-child td { border-bottom: 0; }
.records-table .numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.records-table .identity-cell { min-width: 133px; }
.driver-records .identity-cell { min-width: 170px; }
.record-row { cursor: pointer; }
.record-row:hover td { background: #f5f9fa; }
.record-row[aria-selected='true'] td { background: #ecf6f5; }
.record-row[aria-selected='true'] td:first-child { box-shadow: inset 3px 0 var(--accent); }
.record-open { max-width: 100%; padding: 0; border: 0; background: transparent; color: #234959; font-size: .875rem; font-weight: 700; text-align: left; }
.record-open:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.cell-meta { display: block; margin-top: 3px; color: var(--muted); font-size: .76rem; line-height: 1.4; }
.cell-value { font-variant-numeric: tabular-nums; }
.cell-route { display: block; max-width: 205px; font-size: .84rem; }
.cell-date { display: block; max-width: 120px; font-variant-numeric: tabular-nums; font-size: .875rem; }
.row-status { display: inline-block; max-width: 135px; border-radius: 4px; padding: 3px 6px; background: #edf3f5; color: #506e7d; font-size: .8125rem; line-height: 1.4; }
.row-status.driving { background: #e5f3ef; color: #23725d; }
.row-status.rest { background: #fff2e3; color: #976124; }
.row-status.weekly { background: #f0edf7; color: #70558a; }
.budget-warning { color: #a46a1d; }
.mobile-record-summary, .mobile-details-toggle { display: none; }

.detail-panel { position: sticky; top: 15px; max-height: calc(100dvh - 30px); padding: 17px; overflow-y: auto; scrollbar-width: thin; }
.vehicle-heading { display: flex; align-items: start; flex-wrap: wrap; justify-content: space-between; gap: 9px; }
.vehicle-heading .eyebrow { font-family: 'IBM Plex Mono', monospace; font-size: .7rem; }
.vehicle-heading p, .driver-heading p { margin-top: 4px; color: var(--muted); font-size: .82rem; }
.status { padding: 3px 6px; border-radius: 4px; background: #e7f3ee; color: #337256; font-size: .73rem; }
.status.rest { background: #fff1e2; color: #99601f; }
.trip-summary { display: grid; gap: 4px; margin-top: 15px; padding: 11px 12px; border-radius: 6px; background: #f0f6f7; }
.trip-summary > span:first-child { color: #58717e; font-size: .81rem; }
.trip-summary > strong { font-size: 1.1rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.summary-detail { color: var(--muted); font-size: .76rem; }
.driver-time { margin: 15px 0 9px; }
.driver-time > div:first-child { display: flex; justify-content: space-between; gap: 8px; font-size: .81rem; }
.driver-time strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.meter { height: 4px; margin: 8px 0; overflow: hidden; border-radius: 2px; background: #e8eff1; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.driver-totals { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px; font-size: .73rem; color: var(--muted); }
#phase-remaining { margin-top: 8px; color: #92601e; font-size: .78rem; }
.tablist, .inspector-tabs { display: flex; gap: 15px; }
.inspector-tabs { border-bottom: 1px solid var(--line); }
.tab { position: relative; padding: 11px 0; border: 0; background: transparent; color: var(--muted); font-size: .84rem; white-space: nowrap; }
.tab.active { color: var(--accent); font-weight: 700; }
.tab.active::after { content: ''; position: absolute; right: 0; bottom: 0; left: 0; height: 2px; background: var(--accent); }
.inspector-panel { padding-top: 14px; }
form { margin: 0; }
.field { display: grid; gap: 5px; margin-bottom: 11px; color: #4e6774; font-size: .875rem; }
.two-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px; }
.hint, .coordinate-display { margin: 7px 0 11px; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.coordinate-display { color: var(--accent); font-variant-numeric: tabular-nums; }
.section-heading { margin: 19px 0 9px; }
.injection-list { display: grid; gap: 10px; }
.injection { display: grid; gap: 4px; padding-left: 10px; border-left: 2px solid #aec0c7; }
.injection.active { border-color: #cb862a; }
.injection p { font-size: .81rem; }
.injection span { font-size: .73rem; color: var(--muted); }
.injection button { width: fit-content; padding: 3px 0; border: 0; background: transparent; color: #a25f20; font-size: .76rem; }
details { margin-top: 17px; padding-top: 13px; border-top: 1px solid var(--line); }
summary { font-size: .84rem; font-weight: 600; }
details form, details > .field:first-of-type { margin-top: 12px; }
.rules .check-label { margin: 12px 0; }
.stop-list { margin: 0 0 19px; padding: 0; list-style: none; }
.stop-list li { position: relative; padding: 0 0 14px 16px; border-left: 1px solid #cedee2; }
.stop-list li::before { content: ''; position: absolute; top: 5px; left: -4px; width: 7px; height: 7px; border-radius: 100%; background: #168688; }
.stop-list li.completed { opacity: .5; }
.stop-list strong { display: block; font-size: .86rem; font-weight: 600; }
.stop-list span { display: block; margin-top: 3px; color: var(--muted); font-size: .76rem; }
#stop-form { margin-top: 13px; }
.data-links { display: grid; gap: 8px; margin-bottom: 17px; }
pre { max-height: 380px; padding: 12px; overflow: auto; border-radius: 6px; background: #f3f6f8; font: 400 .74rem/1.6 'IBM Plex Mono', monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

.map-pane { overflow: hidden; }
.map-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; min-height: 63px; padding: 12px 17px; }
.map-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 13px; }
.map-toolbar strong { font-size: .9rem; font-weight: 600; }
.map-wrap { position: relative; }
#map { position: relative; z-index: 0; width: 100%; height: 330px; background: #dbe4e6; }
.map-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-height: 33px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: #f8fafb; color: #59717e; font-size: .75rem; }
.map-legend > span { display: flex; align-items: center; gap: 5px; }
.map-legend > span:last-child { margin-left: auto; }
.legend-line { width: 17px; height: 3px; border-radius: 2px; background: #16899b; }
.legend-line.detour { background: #d17a21; }
.legend-line.fleet { background: #839ba5; }
.map-instruction { position: absolute; z-index: 1000; top: 12px; right: 12px; left: 55px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 13px; border-radius: 6px; background: #123747; color: #fff; font-size: .85rem; box-shadow: 0 4px 18px #142e3e2b; }
.map-instruction button { border: 0; background: transparent; color: #fff; font-size: 1.4rem; line-height: 1; }
.map-instruction #zone-finish-draw { flex-shrink: 0; padding: 7px; background: #087f83; font-size: .76rem; line-height: 1.25; white-space: normal; }
.zone-editor form > .check-label { margin-bottom: 12px; }
.map-wrap.picking .leaflet-container { cursor: crosshair; }
.truck-marker { border: 0; background: transparent; }
.truck-marker span { display: flex; align-items: center; justify-content: center; width: 29px; height: 29px; border: 2px solid #629a9d; border-radius: 9px; background: #fff; color: #275f66; font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 700; box-shadow: 0 2px 7px #1b364d30; }
.truck-marker.selected span { border-color: #fff; background: var(--accent); color: #fff; box-shadow: 0 0 0 3px #087f8340, 0 2px 7px #1b364d30; }
.truck-marker.rest span { border-color: #c7955d; color: #a56324; }
.truck-marker.rest.selected span { border-color: #fff; background: #a56324; color: #fff; }
.leaflet-control-attribution { font-size: 10px !important; }
.journal { padding: 0 17px 13px; }
.journal-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px; padding: 5px 0 8px; border-bottom: 1px solid var(--line); }
.event-list { min-height: 115px; max-height: 190px; overflow: auto; scrollbar-width: thin; }
.event { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid #edf1f3; }
.event time { color: var(--muted); font: 400 .74rem/1.6 'IBM Plex Mono', monospace; }
.event p { font-size: .84rem; }
.event .event-meta { margin-top: 3px; color: var(--muted); font-size: .73rem; }
.event.notification p { color: #08746d; }
.event.alert p { color: #a75916; }
.empty { padding: 17px 0; color: var(--muted); font-size: .82rem; }

.driver-heading { display: grid; gap: 12px; }
.driver-heading h2 { font-size: 1.25rem; }
.driver-heading .button { width: 100%; }
.current-driver-activity { display: grid; gap: 6px; margin: 14px 0; padding: 10px 11px; border-radius: 6px; background: #f1f6f7; font-size: .83rem; }
.current-driver-activity > span:first-child { color: #17696e; font-weight: 600; }
.current-driver-activity > span:nth-child(2) { color: var(--muted); font-size: .76rem; }
.current-driver-activity > strong { font-size: .78rem; font-weight: 500; }
.tachograph-budgets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.tacho-budget { min-width: 0; padding: 9px 0; border-bottom: 1px solid var(--line); }
.tacho-budget > span { display: block; color: #607784; font-size: .76rem; }
.tacho-budget > strong { display: block; margin: 4px 0; font-size: 1.15rem; font-weight: 600; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.tacho-budget > small { display: block; color: var(--muted); font-size: .74rem; line-height: 1.5; }
#driver-details[aria-busy='true'] > :not(.driver-heading) { visibility: hidden; }
.tacho-budget .meter { margin-top: 9px; margin-bottom: 0; }
.tacho-budget.warning > strong { color: #a3641e; }
.work-budget { display: grid; gap: 7px; margin: 13px 0 20px; color: #5d7480; font-size: .76rem; }
.work-budget strong { color: #294b59; font-weight: 600; white-space: nowrap; }
.driver-section-heading { display: grid; gap: 6px; margin-bottom: 10px; }
.driver-section-heading > span { color: var(--muted); font-size: .74rem; line-height: 1.5; }
.upcoming-rests { display: grid; gap: 10px; }
.rest-deadline { min-width: 0; padding: 0 0 11px; border-bottom: 1px solid var(--line); }
.rest-deadline > span { display: block; color: #5c7180; font-size: .77rem; }
.rest-deadline strong { display: block; margin: 5px 0; font-size: .92rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.rest-deadline p { color: #617581; font-size: .74rem; line-height: 1.5; }
.rest-deadline.weekly strong { color: #715889; }
.rest-counts { display: grid; gap: 8px; margin-top: 13px; color: #526b77; font-size: .77rem; line-height: 1.5; }
.rest-counts strong { color: #243f4d; font-weight: 700; }
.rest-counts .partial-history { color: #8a6326; font-size: .74rem; }
.driver-activity-section { padding: 17px 18px; }
.activity-selection { padding-bottom: 5px; }
.activity-selection h3 { font-size: 1rem; }
.driver-activity-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 10px; }
.history-range-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .8rem; }
.history-range-label select { width: auto; min-height: 32px; font-size: .81rem; }
.driver-history-note { margin-bottom: 13px; color: #607883; font-size: .78rem; line-height: 1.6; }
.activity-timeline { position: relative; height: 27px; overflow: hidden; border-radius: 4px; background: #edf1f3; }
.activity-timeline > span { position: absolute; top: 0; display: flex; align-items: center; justify-content: center; height: 100%; overflow: hidden; color: #fff; font-size: .72rem; white-space: nowrap; }
.activity-driving { background: #087f83; }
.activity-service, .activity-waiting { background: #b57828; }
.activity-break { background: #507fab; }
.activity-daily_rest { background: #8a71a3; }
.activity-weekly_rest { background: #665180; }
.activity-idle { background: #71828e; }
.timeline-ends { display: flex; justify-content: space-between; gap: 12px; margin-top: 5px; color: var(--muted); font-size: .73rem; }
.activity-legend { display: flex; flex-wrap: wrap; gap: 7px 15px; margin-top: 12px; }
.activity-legend > span { display: flex; align-items: center; gap: 5px; color: #59707d; font-size: .75rem; }
.activity-legend i { width: 9px; height: 9px; border-radius: 2px; }
.activity-totals { display: flex; flex-wrap: wrap; gap: 7px 20px; padding: 14px 0; color: #536e7a; font-size: .81rem; }
.activity-totals strong { color: #28434e; font-weight: 600; }
.driver-table-wrap { max-width: 100%; overflow-x: auto; }
.driver-history-table { width: 100%; min-width: 640px; border-collapse: collapse; text-align: left; font-size: .84rem; }
.driver-history-table th { padding: 9px 8px; border-bottom: 1px solid var(--line); color: #617b87; font-size: .8rem; font-weight: 500; }
.driver-history-table td { padding: 11px 8px; border-bottom: 1px solid #e9eff2; vertical-align: top; }
.driver-history-table td:first-child { min-width: 135px; font-weight: 500; }
.driver-history-table td:nth-child(4) { font-variant-numeric: tabular-nums; white-space: nowrap; }
.driver-history-table td:last-child { color: #617581; }
.driver-history-table time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.activity-cell { display: flex; align-items: center; gap: 7px; }
.activity-cell i { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 2px; }

.autonomy-settings { padding: 0 18px 16px; }
.autonomy-settings summary { color: #326974; font-size: .82rem; line-height: 1.5; }
.autonomy-settings form { padding-top: 16px; }
.autonomy-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.autonomy-types { display: flex; flex-wrap: wrap; gap: 12px 22px; margin: 4px 0 16px; }
.autonomy-switch { padding: 8px 10px; border-radius: 5px; background: #edf7f3; color: #216959; }
.autonomy-panel .hint { margin-bottom: 0; }
.zones-view h2 { font-size: 1rem; }
.zones-table { min-width: 590px; }
.geo-rules-table { min-width: 720px; }
.visits-table { min-width: 700px; }
.zones-table td:first-child, .geo-rules-table td:first-child { min-width: 155px; }
.visits-table td, .zones-table td, .geo-rules-table td { font-size: .81rem; }
.visits-table td:not(:first-child) { font-variant-numeric: tabular-nums; white-space: nowrap; }
.visit-filter { width: 175px; margin-bottom: 0 !important; }
.zone-add-rule { margin-top: 12px; white-space: normal; }
.zone-editor .hint { overflow-wrap: anywhere; }
.zone-editor .button { white-space: normal; }
.zone-map-marker { display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; background: #a86e2c; box-shadow: 0 1px 5px #2a3d4d66; }
.zone-map-marker span { width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.page-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 18px; padding: 12px 1px; color: #627986; font-size: .74rem; }
.text-button { padding: 0; border: 0; background: transparent; color: #406c78; font-size: .76rem; text-decoration: underline; text-underline-offset: 3px; }
.toast { position: fixed; z-index: 2000; bottom: 24px; left: 50%; max-width: min(90vw, 600px); padding: 13px 20px; border-radius: 7px; background: #163946; color: #fff; font-size: .86rem; box-shadow: 0 6px 24px #102b3b30; transform: translateX(-50%); }
.toast.error { background: #86441e; }
dialog { width: min(580px, 92vw); padding: 25px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
dialog::backdrop { background: #102b3b66; }
dialog p { margin: 14px 0; font-size: .9rem; line-height: 1.6; }
.dialog-close { float: right; border: 0; background: transparent; font-size: 1.5rem; }
.detail-dialog { position: fixed; inset: 0 0 0 auto; width: min(420px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; border: 0; border-radius: 0; box-shadow: -8px 0 36px #122e3c30; }
.detail-dialog-header { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 17px; border-bottom: 1px solid var(--line); background: #fff; }
.detail-dialog-header h2 { font-size: .95rem; }
.detail-dialog .detail-panel { position: static; max-height: none; overflow: visible; border: 0; border-radius: 0; }
.detail-dialog .hint, .detail-dialog .rest-deadline p { margin-top: 5px; margin-bottom: 9px; }
body:has(.detail-dialog[open]) { overflow: hidden; }

@media(max-width:1500px) {
  .driver-records .column-fortnight { display: none; }
  .driver-records { min-width: 800px; }
}
@media(max-width:1350px) {
  .fleet-records .column-driver { display: none; }
  .driver-records .column-rest-count { display: none; }
  .driver-records { min-width: 710px; }
  .fleet-records { min-width: 700px; }
  .product-title span { display: none; }
}
@media(max-width:1200px) {
  main { padding-inline: 15px; }
  .workspace, .drivers-view, .zones-view { gap: 12px; }
  .autonomy-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fleet-records .column-speed, .fleet-records .column-break { display: none; }
  .fleet-records { min-width: 570px; }
  .driver-records .column-continuous { display: none; }
  .driver-records { min-width: 620px; }
  .clock-block { min-width: 200px; }
  .button.quiet { margin-left: 0; }
}
@media(max-width:1050px) {
  .workspace, .drivers-view, .zones-view { grid-template-columns: minmax(0, 1fr); }
  .workspace > .detail-panel, .drivers-view > .detail-panel, .zones-view > .detail-panel { display: none; }
  .mobile-details-toggle { display: inline-flex; }
  .detail-dialog .detail-panel { display: block; }
  .driver-records .column-continuous, .fleet-records .column-break { display: table-cell; }
  .driver-records { min-width: 710px; }
  .fleet-records { min-width: 680px; }
}
@media(max-width:760px) {
  .topbar { flex-wrap: wrap; gap: 8px 15px; padding-inline: 16px; }
  .connection { font-size: .73rem; }
  .topbar-link { display: none; }
  .topbar-divider { display: none; }
  main { padding: 13px 11px 6px; }
  .simulation-bar { gap: 10px; }
  .clock-block { width: 100%; }
  .speed-label > span { display: none; }
  .records-heading { padding: 14px 13px; }
  .records-table td, .records-table th { padding: 10px; }
  .fleet-records, .driver-records { min-width: 0; }
  .fleet-records .column-route, .fleet-records .column-distance, .fleet-records .column-break { display: none; }
  .driver-records .column-weekly, .driver-records .column-weekly-rest, .driver-records .column-continuous { display: none; }
  .driver-records .identity-cell { min-width: 155px; }
  .mobile-record-summary { display: block; max-width: 200px; }
  .map-toolbar { padding-inline: 13px; }
  .autonomy-settings { padding-inline: 13px; }
  .autonomy-types { display: grid; gap: 10px; }
  #map { height: 310px; }
  .driver-activity-section { padding: 14px 13px; }
}
@media(max-width:480px) {
  .brand { font-size: 1.45rem; }
  .product-title { font-size: .8rem; }
  .connection { width: 100%; margin-left: 0; }
  .playback { gap: 6px; }
  .simulation-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
  .clock-block { min-width: 0; width: auto; }
  .simulation-bar > .button.quiet { grid-column: 2; grid-row: 1; align-self: end; font-size: .76rem; }
  .playback { grid-column: 1 / -1; min-width: 0; }
  .button { font-size: .81rem; padding-inline: 9px; }
  .view-tab { padding-inline: 12px; font-size: .84rem; }
  .autonomy-fields { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .records-heading h1 { font-size: 1rem; }
  .records-heading p { font-size: .76rem; }
  .records-heading > div { flex: 1 1 170px; min-width: 0; }
  #view-drivers .records-heading p { display: none; }
  .fleet-records .column-eta, .driver-records .column-daily, .driver-records .column-activity { display: none; }
  .records-table th, .records-table td { padding-inline: 10px; }
  .records-table .identity-cell { min-width: 0; width: 64%; }
  .driver-records .column-available { width: 36%; }
  .records-table .row-status { font-size: .73rem; }
  .cell-meta, .mobile-record-summary { font-size: .74rem; }
  .driver-activity-toolbar .tablist { flex-wrap: wrap; gap: 13px; }
  .activity-legend { gap: 7px 11px; }
  .page-footer { line-height: 1.5; }
}
@media(pointer:coarse) {
  .button, .tab, .view-tab, select, input:not([type='checkbox']) { min-height: 44px; }
  select, input:not([type='checkbox']), textarea { font-size: 16px; }
  .record-open { min-height: 28px; }
  .check-label { min-height: 36px; }
}
@media(prefers-reduced-motion:reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
