:root {
    --fleet-red: #c80000;
    --fleet-red-dark: #a90000;
    --fleet-border: #d7d7d7;
    --fleet-surface: #ffffff;
    --fleet-muted: #f3f4f6;
    --fleet-text: #111827;
    --fleet-soft-text: #6b7280;
    --fleet-green: #22c55e;
    --fleet-orange: #f59e0b;
    --fleet-blue: #2563eb;
    --fleet-danger: #ef4444;
}

.view-settings-panel {
    position: fixed;
    top: calc(var(--toolbar-height, 42px) + 6px);
    right: 10px;
    z-index: 60;
    display: grid;
    gap: 8px;
    width: min(280px, calc(100vw - 20px));
    padding: 10px;
    color: #111827;
    border: 1px solid rgba(17, 24, 39, .18);
    border-radius: 5px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 10px 28px rgba(17, 24, 39, .22);
}

.view-settings-panel header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 26px;
    border-bottom: 1px solid var(--fleet-border);
}

.view-settings-panel header button,
.view-settings-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 2px 8px;
    border: 1px solid var(--fleet-border);
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
}

.view-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 30px;
    padding: 4px 0;
    border-bottom: 1px dotted #d1d5db;
    font-weight: 600;
}

.view-setting-row input {
    width: 17px;
    height: 17px;
    accent-color: var(--fleet-red);
}

.view-settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.fleet-shell.view-wide-panel {
    --module-panel-width: 336px;
}

.fleet-shell.view-compact .vehicle-row {
    padding-top: 6px;
    padding-bottom: 6px;
}

.fleet-shell.view-compact .vehicle-telemetry-grid span,
.fleet-shell.view-compact .dense-grid th,
.fleet-shell.view-compact .dense-grid td {
    height: 22px;
    min-height: 20px;
    padding-top: 1px;
    padding-bottom: 1px;
}

.fleet-shell.view-compact .report-summary-strip {
    padding: 5px 6px;
    gap: 5px;
}

.fleet-shell.view-compact .export-toolbar {
    min-height: 30px;
    padding-top: 1px;
    padding-bottom: 1px;
}

.fleet-shell.view-map-focus .report-summary-strip.map-overlay-panel.map-status-strip {
    right: 98px;
    max-height: 42px;
    overflow: auto;
}

.fleet-shell.view-map-focus .route-day-panel,
.fleet-shell.view-map-focus .timeline-tabs-strip,
.fleet-shell.view-map-focus .route-playback-panel,
.fleet-shell.view-map-focus .selected-vehicle-panel {
    right: 98px;
}

.dense-grid-group-bar {
    min-width: 0;
}

.dense-grid-columns-button {
    color: var(--fleet-red) !important;
    border-color: rgba(215, 25, 32, .35) !important;
}

.confirm-action-dialog {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 8px 2px 12px;
}

.confirm-action-dialog .mud-icon-root {
    color: var(--fleet-orange);
}

.confirm-action-dialog.danger .mud-icon-root {
    color: var(--fleet-danger);
}

.confirm-action-dialog.success .mud-icon-root {
    color: var(--fleet-green);
}

.confirm-action-dialog p {
    margin: 5px 0 0;
    color: var(--fleet-soft-text);
    line-height: 1.45;
}

.confirm-action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid var(--fleet-border);
}

.panel-command.danger {
    color: #fff;
    border-color: var(--fleet-danger);
    background: var(--fleet-danger);
}

html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 13px;
    color: var(--fleet-text);
    background: #f6f6f6;
    letter-spacing: 0;
}

button,
input,
select {
    font: inherit;
}

.fleet-shell {
    min-height: 100vh;
    display: grid;
    grid-template-rows: 42px minmax(0, 1fr);
    background: #f6f6f6;
}

.top-toolbar {
    display: grid;
    grid-template-columns: 280px minmax(320px, 1fr) auto;
    align-items: center;
    gap: 12px;
    height: 42px;
    padding: 0 8px 0 12px;
    color: #fff;
    background: var(--fleet-red);
}

.toolbar-title,
.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toolbar-title span {
    font-size: 20px;
    line-height: 1;
}

.toolbar-search {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.toolbar-search .mud-input-control {
    width: min(420px, 100%);
    background: #fff;
    border-radius: 4px;
}

.toolbar-icon,
.toolbar-actions .mud-icon-button {
    color: #fff;
}

.user-badge {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid #fff;
    border-radius: 50%;
    font-size: 12px;
}

.toolbar-user {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.toolbar-logout {
    min-height: 26px;
    padding: 2px 8px;
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 4px;
    cursor: pointer;
}

.toolbar-logout:hover {
    background: rgba(255,255,255,.14);
}

.fleet-main {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 0;
}

.left-rail {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--fleet-red);
    padding-top: 6px;
}

.rail-link {
    display: grid;
    place-items: center;
    width: 38px;
    height: 28px;
    color: #fff;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.rail-link.active,
.rail-link:hover {
    background: #fff;
    color: var(--fleet-red);
    border-left-color: var(--fleet-red-dark);
}

.fleet-content {
    min-width: 0;
    min-height: 0;
}

.loading-screen,
.offline-banner {
    display: grid;
    align-items: center;
    min-height: 34px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--fleet-border);
}

.loading-screen {
    min-height: calc(100vh - 42px);
    justify-content: center;
    color: var(--fleet-soft-text);
    background: #fff;
}

.offline-banner {
    color: #7c2d12;
    background: #fffbeb;
}

.settings-load-error {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0;
    padding: 10px 14px;
    border-radius: 8px;
    color: #7c2d12;
    background: #fffbeb;
    border: 1px solid #fde68a;
    font-size: 13px;
}

.settings-load-error button {
    flex: 0 0 auto;
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid #d97706;
    background: #fff;
    color: #7c2d12;
    cursor: pointer;
    font-weight: 600;
}

.settings-load-error button:hover {
    background: #fef3c7;
}

.access-denied {
    display: grid;
    align-content: center;
    justify-items: center;
    min-height: calc(100vh - 42px);
    gap: 6px;
    background: #fff;
}

.access-denied h1,
.access-denied p {
    margin: 0;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255,255,255,.35) 1px, transparent 1px),
        #deddd9;
    background-size: 90px 90px;
}

.login-panel {
    width: min(420px, 100%);
    padding: 22px;
    border: 1px solid var(--fleet-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(17, 24, 39, .18);
}

.login-brand {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
}

.login-brand > span {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: #fff;
    background: var(--fleet-red);
    border-radius: 8px;
    font-size: 25px;
    font-weight: 600;
}

.login-brand h1,
.login-brand p {
    margin: 0;
}

.login-brand h1 {
    font-size: 20px;
}

.login-brand p,
.login-hint {
    color: var(--fleet-soft-text);
}

.login-form {
    display: grid;
    gap: 10px;
}

.login-button {
    min-height: 34px;
    color: #fff;
    border: 1px solid var(--fleet-red);
    border-radius: 4px;
    background: var(--fleet-red);
    cursor: pointer;
}

.login-button:disabled {
    opacity: .7;
    cursor: progress;
}

.login-error {
    padding: 8px;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 4px;
    background: #fef2f2;
}

.login-hint {
    margin-top: 14px;
    font-size: 12px;
}

.module-layout {
    display: grid;
    grid-template-columns: 282px minmax(0, 1fr);
    min-height: calc(100vh - 42px);
}

.module-panel {
    background: var(--fleet-surface);
    border-right: 1px solid var(--fleet-border);
    overflow: auto;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 30px;
    padding: 5px 8px;
    border-bottom: 1px solid var(--fleet-border);
}

.panel-header h2,
.panel-section-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.panel-section-title {
    padding: 8px;
    color: var(--fleet-red);
    background: #ededed;
}

.filter-bar {
    display: grid;
    gap: 6px;
    padding: 8px;
    border-bottom: 1px solid var(--fleet-border);
}

.filter-chip,
.panel-command {
    min-height: 28px;
    border: 1px solid var(--fleet-border);
    background: #fff;
    border-radius: 4px;
    color: var(--fleet-text);
    text-align: left;
    padding: 4px 8px;
}

.panel-command {
    width: calc(100% - 16px);
    margin: 6px 8px 0;
    color: #15803d;
    border-color: #22c55e;
    text-align: center;
}

.panel-command.primary {
    color: #fff;
    background: #54b957;
    border-color: #54b957;
}

.panel-command.selected {
    color: #fff;
    background: var(--fleet-red);
    border-color: var(--fleet-red);
}

.panel-command:disabled {
    color: #9ca3af;
    border-color: var(--fleet-border);
    background: #f3f4f6;
    cursor: not-allowed;
}

.panel-command.compact {
    width: auto;
    min-height: 24px;
    margin: 0;
    padding: 2px 6px;
    font-size: 12px;
}

.segmented-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 8px;
}

.segmented-panel button {
    min-height: 28px;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.segmented-panel button.selected,
.panel-list-item.selected {
    color: #fff;
    background: var(--fleet-red);
    border-color: var(--fleet-red);
}

.panel-list {
    display: grid;
    gap: 4px;
    padding: 8px;
}

.panel-list.compact {
    grid-template-columns: 1fr;
}

.panel-list-item {
    display: grid;
    gap: 2px;
    min-height: 30px;
    padding: 5px 7px;
    text-align: left;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.panel-list-item small {
    color: var(--fleet-soft-text);
}

.panel-list-item.selected small {
    color: rgba(255,255,255,.8);
}

.date-field-grid,
.vehicle-check-list {
    display: grid;
    gap: 6px;
    padding: 8px;
    border-bottom: 1px solid var(--fleet-border);
}

.date-field-grid label {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.date-field-grid label span {
    color: #111827;
    font-size: 12px;
}

.date-field-grid input,
.date-field-grid select {
    width: 100%;
    min-height: 26px;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: #fff;
}

.vehicle-check-list label {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 22px;
}

.link-button {
    padding: 0;
    color: var(--fleet-blue);
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.vehicle-status-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 7px 10px;
    text-align: center;
    border-bottom: 1px solid var(--fleet-border);
}

.status-total {
    color: var(--fleet-red);
}

.status-driving,
.status-badge.status-driving {
    color: var(--fleet-green);
}

.status-stopped,
.status-badge.status-stopped {
    color: #f0a07f;
}

.status-unavailable,
.status-badge.status-unavailable {
    color: var(--fleet-danger);
}

.status-other,
.status-badge.status-other {
    color: #9ca3af;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-width: 70px;
    font-weight: 600;
}

.vehicle-list {
    display: grid;
    gap: 1px;
}

.vehicle-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 4px;
    padding: 9px 8px 7px;
    background: #f7f7f7;
    border-bottom: 1px dotted #9ca3af;
    cursor: pointer;
}

.vehicle-row:nth-child(even) {
    background: #efefef;
}

.vehicle-row.selected {
    background: #fff;
    box-shadow: inset 3px 0 0 var(--fleet-red);
}

.vehicle-row:focus-visible {
    outline: 2px solid var(--fleet-red);
    outline-offset: -2px;
}

.vehicle-row-icon {
    color: var(--fleet-blue);
    padding-top: 6px;
}

.vehicle-row-body {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.vehicle-row-body strong {
    font-size: 14px;
}

.vehicle-row-body small {
    color: var(--fleet-soft-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vehicle-telemetry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 6px;
    padding: 3px 0;
}

.vehicle-telemetry-grid span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
    overflow: hidden;
    color: #374151;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
}

.vehicle-telemetry-grid .mud-icon-root {
    flex: 0 0 auto;
    color: #6b7280;
    font-size: 15px;
}

.vehicle-actions {
    display: flex;
    gap: 2px;
    min-height: 24px;
    cursor: default;
}

.workspace {
    position: relative;
    min-width: 0;
    overflow: auto;
    background: #fff;
}

.map-workspace {
    background: #deddd9;
}

.map-toolbar {
    position: absolute;
    top: 12px;
    left: 235px;
    z-index: 2;
    display: flex;
}

.map-toolbar button {
    min-width: 76px;
    height: 38px;
    background: #fff;
    border: 1px solid var(--fleet-border);
}

.map-surface {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(255,255,255,.28) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255,255,255,.28) 1px, transparent 1px),
        #deddd9;
    background-size: 90px 90px;
}

.google-map-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.google-map-canvas[data-map-mode="fallback"] {
    display: grid;
    place-items: center;
    color: #475569;
    text-align: center;
    background:
        linear-gradient(90deg, rgba(255,255,255,.28) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255,255,255,.28) 1px, transparent 1px),
        #deddd9;
    background-size: 90px 90px;
}

.map-fallback-label {
    padding: 10px 14px;
    border: 1px solid var(--fleet-border);
    border-radius: 6px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 2px 8px rgba(17, 24, 39, .12);
}

.vehicle-marker {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transform: translate(-50%, -50%);
    padding: 2px 5px;
    min-width: 62px;
    min-height: 28px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 7px rgba(17, 24, 39, .2);
    color: var(--fleet-blue);
    font-weight: 600;
    font: inherit;
    border: 0;
    cursor: pointer;
}

.google-map-canvas[data-map-mode="google"] ~ .vehicle-marker {
    display: none;
}

.vehicle-marker-glyph {
    width: 18px;
    height: 24px;
    display: inline-block;
    flex: 0 0 18px;
    padding: 0;
    border-radius: 2px;
    background: var(--fleet-blue);
    clip-path: polygon(50% 0, 86% 26%, 76% 100%, 24% 100%, 14% 26%);
    transform: rotate(var(--vehicle-angle, 0deg));
    transform-origin: 50% 50%;
}

.vehicle-marker-glyph-truck,
.vehicle-marker-glyph-truck-trailer,
.vehicle-marker-glyph-trailer,
.vehicle-marker-glyph-tanker,
.vehicle-marker-glyph-waste-truck,
.vehicle-marker-glyph-crane-truck,
.vehicle-marker-glyph-mixer {
    width: 20px;
    height: 28px;
    clip-path: polygon(32% 0, 68% 0, 74% 38%, 88% 38%, 88% 100%, 12% 100%, 12% 38%, 26% 38%);
}

.vehicle-marker-glyph-bus,
.vehicle-marker-glyph-minibus,
.vehicle-marker-glyph-van,
.vehicle-marker-glyph-camper {
    width: 20px;
    height: 28px;
    clip-path: polygon(28% 0, 72% 0, 84% 18%, 84% 100%, 16% 100%, 16% 18%);
}

.vehicle-marker-glyph-motorcycle,
.vehicle-marker-glyph-scooter,
.vehicle-marker-glyph-bicycle {
    width: 10px;
    height: 28px;
    clip-path: polygon(50% 0, 82% 22%, 62% 100%, 38% 100%, 18% 22%);
}

.vehicle-marker-glyph-boat,
.vehicle-marker-glyph-ship {
    width: 20px;
    height: 30px;
    clip-path: polygon(50% 0, 88% 36%, 72% 100%, 28% 100%, 12% 36%);
    background: #0284c7;
}

.vehicle-marker-glyph-ambulance,
.vehicle-marker-glyph-fire-truck,
.vehicle-marker-glyph-police {
    background: var(--fleet-danger);
}

.vehicle-marker.moving .vehicle-marker-glyph {
    background: var(--fleet-green);
}

.vehicle-marker span {
    color: #111827;
    background: #fff;
    border-radius: 3px;
    padding: 1px 3px;
}

.fleet-map-marker-label {
    padding: 1px 4px;
    border: 1px solid rgba(17, 24, 39, .18);
    border-radius: 3px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 1px 4px rgba(17, 24, 39, .16);
    white-space: nowrap;
}

.fleet-advanced-marker {
    display: grid;
    justify-items: center;
    gap: 1px;
    transform: translateY(-8px);
    cursor: pointer;
    user-select: none;
}

.fleet-advanced-marker img {
    display: block;
    pointer-events: none;
}

.fleet-advanced-marker span {
    max-width: 88px;
    padding: 1px 4px;
    overflow: hidden;
    color: #111827;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid rgba(17, 24, 39, .18);
    border-radius: 3px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 1px 4px rgba(17, 24, 39, .16);
    font-size: 11px;
    font-weight: 600;
}

.fleet-advanced-marker.selected span {
    color: #7f1d1d;
    border-color: rgba(215, 25, 32, .45);
}

.fleet-route-playback-marker {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--fleet-red);
    box-shadow: 0 0 0 5px rgba(215, 25, 32, .18), 0 2px 8px rgba(17, 24, 39, .28);
}

.fleet-route-playback-marker span {
    width: 0;
    height: 0;
    border-right: 5px solid transparent;
    border-bottom: 13px solid #fff;
    border-left: 5px solid transparent;
    transform: rotate(var(--route-angle, 0deg));
    transform-origin: 50% 70%;
}

.fleet-route-endpoint-marker,
.fleet-route-event-marker {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--route-endpoint-color, var(--fleet-red));
    color: #fff;
    box-shadow: 0 2px 8px rgba(17, 24, 39, .32);
    font-size: 11px;
    font-weight: 600;
}

.fleet-route-event-marker {
    width: 18px;
    height: 18px;
    border-color: var(--fleet-red);
    background: #fff;
    color: var(--fleet-red);
    font-size: 10px;
}

.fleet-measure-marker {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #111827;
    box-shadow: 0 2px 8px rgba(17, 24, 39, .32);
    font-size: 11px;
    font-weight: 600;
}

.fleet-location-marker {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 2px solid var(--fleet-red);
    border-radius: 999px;
    background: #fff;
    color: #7f1d1d;
    box-shadow: 0 2px 8px rgba(17, 24, 39, .28);
    font-size: 10px;
    font-weight: 600;
}

.fleet-planner-marker {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    box-shadow: 0 2px 8px rgba(17, 24, 39, .3);
    font-size: 10px;
    font-weight: 600;
}

.fleet-operational-marker {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 2px solid #fff;
    border-radius: 5px;
    background: #475569;
    color: #fff;
    box-shadow: 0 2px 9px rgba(17, 24, 39, .32);
    font-size: 10px;
    font-weight: 600;
}

.fleet-operational-marker.routine {
    background: #2563eb;
}

.fleet-operational-marker.priority,
.fleet-operational-marker.high {
    background: var(--fleet-red);
}

.fleet-operational-marker.roadwork,
.fleet-operational-marker.warning {
    background: #f59e0b;
    color: #111827;
}

.map-layer-panel {
    display: grid;
    gap: 6px;
    padding-top: 2px;
    border-top: 1px solid rgba(203, 213, 225, .85);
}

.map-layer-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.map-layer-options button {
    min-width: 0;
    padding: 0 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
}

.operational-layer-feed {
    display: grid;
    gap: 6px;
}

.operational-layer-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
    min-height: 34px;
    padding: 5px 6px;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: #fff;
    text-align: left;
}

.operational-layer-row.selected {
    border-color: rgba(215, 25, 32, .54);
    box-shadow: inset 3px 0 0 var(--fleet-red);
}

.operational-layer-row strong,
.operational-layer-row small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.operational-layer-row strong {
    color: #111827;
    font-size: 12px;
}

.operational-layer-row small {
    color: #64748b;
    font-size: 11px;
}

.operational-layer-badge {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 5px;
    background: #475569;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
}

.operational-layer-badge.routine,
.operational-layer-badge.info {
    background: #2563eb;
}

.operational-layer-badge.priority,
.operational-layer-badge.high {
    background: var(--fleet-red);
}

.operational-layer-badge.roadwork,
.operational-layer-badge.warning {
    background: #f59e0b;
    color: #111827;
}

.operational-layer-detail {
    display: grid;
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(203, 213, 225, .9);
    border-radius: 4px;
    background: #f8fafc;
}

.operational-layer-detail > strong {
    color: #7f1d1d;
    font-size: 12px;
}

.operational-layer-detail > span {
    color: #475569;
    font-size: 11px;
    line-height: 1.35;
}

.operational-layer-detail dl {
    display: grid;
    gap: 4px;
    margin: 0;
}

.operational-layer-detail dl div {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 6px;
}

.operational-layer-detail dt,
.operational-layer-detail dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 11px;
}

.operational-layer-detail dt {
    color: #64748b;
}

.operational-layer-detail dd {
    color: #111827;
    font-weight: 600;
}

.operational-layer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.map-float-actions {
    position: absolute;
    right: 12px;
    top: 22px;
    display: grid;
    gap: 18px;
    z-index: 3;
}

.map-float-actions .mud-icon-button {
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid var(--fleet-border);
    box-shadow: 0 1px 5px rgba(17, 24, 39, .18);
}

.map-overlay-panel {
    position: relative;
    z-index: 4;
}

.map-point-popup {
    position: absolute;
    z-index: 10003;
    display: grid;
    gap: 8px;
    width: min(330px, calc(100% - 24px));
    max-width: calc(100% - 24px);
    padding: 14px 20px 12px;
    border: 1px solid rgba(203, 213, 225, .96);
    border-radius: 6px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 8px 24px rgba(17, 24, 39, .22);
    transform: translate(-50%, calc(-100% - 18px));
    font-size: 12px;
}

.map-point-popup::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -10px;
    width: 18px;
    height: 18px;
    border-right: 1px solid rgba(203, 213, 225, .96);
    border-bottom: 1px solid rgba(203, 213, 225, .96);
    background: rgba(255, 255, 255, .98);
    transform: translateX(-50%) rotate(45deg);
}

.map-point-popup > strong,
.map-ruler-panel strong,
.map-nearby-panel strong,
.map-area-check-panel strong {
    color: #b91c1c;
    font-size: 13px;
    line-height: 1.35;
}

.map-point-popup > span,
.map-nearby-panel header span,
.map-area-check-panel header span,
.map-panel-empty {
    color: #64748b;
    font-size: 11px;
}

.map-point-close,
.map-ruler-panel button[aria-label],
.map-nearby-panel header button,
.map-area-check-panel header button {
    color: #475569;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}

.map-point-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    width: 24px;
    height: 24px;
}

.map-point-actions,
.map-area-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.map-point-actions {
    justify-content: center;
    padding-top: 6px;
    border-top: 1px solid var(--fleet-border);
}

.map-point-action {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: #fff;
    color: #1f2937;
    cursor: pointer;
}

.map-point-action:hover,
.map-point-action.selected {
    border-color: rgba(215, 25, 32, .24);
    background: #fef2f2;
    color: var(--fleet-red);
}

.map-route-choice {
    position: absolute;
    top: calc(100% - 2px);
    right: -52px;
    z-index: 10004;
    display: grid;
    gap: 2px;
    width: min(280px, calc(100vw - 28px));
    padding: 8px;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(17, 24, 39, .18);
}

.map-route-choice button {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 4px 8px;
    border: 0;
    border-radius: 4px;
    background: #fff;
    color: #111827;
    text-align: left;
    cursor: pointer;
}

.map-route-choice button:hover {
    background: #f3f4f6;
}

.map-ruler-panel,
.map-nearby-panel,
.map-area-check-panel {
    position: absolute;
    top: 90px;
    right: 62px;
    z-index: 10001;
    display: grid;
    gap: 8px;
    width: min(360px, calc(100% - 86px));
    max-height: min(420px, calc(100% - 120px));
    overflow: auto;
    padding: 10px;
    border: 1px solid rgba(203, 213, 225, .9);
    border-radius: 5px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 2px 12px rgba(17, 24, 39, .18);
    font-size: 12px;
}

.map-ruler-panel > div,
.map-nearby-panel header,
.map-area-check-panel header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.map-nearby-panel header div,
.map-area-check-panel header div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.map-nearby-table,
.map-area-results {
    display: grid;
    gap: 4px;
}

.map-table-head,
.map-nearby-row,
.map-area-row {
    display: grid;
    grid-template-columns: minmax(110px, 1fr) 78px 82px 88px;
    gap: 6px;
    align-items: center;
}

.map-table-head {
    color: #64748b;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.map-nearby-row,
.map-area-row {
    min-height: 34px;
    padding: 5px 6px;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: #fff;
    color: #111827;
    text-align: left;
}

.map-nearby-row span,
.map-area-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.map-nearby-row small,
.map-area-row small {
    display: block;
    color: #64748b;
    font-size: 10px;
}

.map-area-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.map-area-form label {
    display: grid;
    gap: 3px;
    color: #64748b;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.map-area-form input {
    min-width: 0;
    height: 30px;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    padding: 0 6px;
    background: #fff;
    color: #111827;
    font-size: 12px;
}

@media (max-width: 640px) {
    .map-point-popup {
        width: min(300px, calc(100% - 24px));
        padding-inline: 16px;
    }

    .map-ruler-panel,
    .map-nearby-panel,
    .map-area-check-panel {
        left: 12px;
        right: 12px;
        width: auto;
        max-height: min(480px, calc(100% - 112px));
    }

    .map-table-head,
    .map-nearby-row,
    .map-area-row {
        grid-template-columns: minmax(0, 1fr) 74px;
    }

    .map-table-head span:nth-child(3),
    .map-table-head span:nth-child(4),
    .map-nearby-row span:nth-child(3),
    .map-nearby-row span:nth-child(4),
    .map-area-row span:nth-child(3),
    .map-area-row span:nth-child(4) {
        display: none;
    }

    .map-area-form {
        grid-template-columns: 1fr;
    }
}

.map-settings-panel {
    position: absolute;
    top: 210px;
    right: 12px;
    z-index: 10001;
    display: grid;
    gap: 8px;
    width: min(220px, calc(100% - 24px));
    padding: 10px;
    border: 1px solid var(--fleet-border);
    border-radius: 5px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 1px 8px rgba(17, 24, 39, .18);
}

.map-settings-panel strong {
    font-size: 13px;
}

.map-settings-panel button {
    min-height: 30px;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: #fff;
}

.map-settings-panel button.selected {
    color: #fff;
    border-color: var(--fleet-red);
    background: var(--fleet-red);
}

.route-day-panel {
    position: absolute;
    top: 142px;
    left: 12px;
    right: 70px;
    z-index: 7;
    display: flex;
    align-items: center;
    align-content: flex-start;
    gap: 6px;
    flex-wrap: wrap;
    min-height: 34px;
    max-height: 84px;
    overflow: auto;
    padding: 4px 6px;
    border: 1px solid rgba(203, 213, 225, .8);
    border-radius: 4px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 1px 5px rgba(17, 24, 39, .14);
    font-size: 12px;
}

.route-day-panel span {
    font-weight: 600;
}

.route-day-panel input {
    height: 28px;
    min-width: 132px;
    border: 1px solid var(--fleet-border);
    border-radius: 3px;
    padding: 0 6px;
    background: #fff;
}

.route-time-field {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 94px;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
}

.route-time-field input {
    min-width: 78px;
}

.selected-vehicle-panel {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(220px, .9fr) minmax(260px, 1.25fr) minmax(260px, 1.2fr);
    gap: 8px;
    max-height: 108px;
    overflow: auto;
    padding: 8px;
    border: 1px solid rgba(203, 213, 225, .9);
    border-radius: 5px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 2px 12px rgba(17, 24, 39, .18);
    font-size: 12px;
}

.selected-vehicle-head {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.selected-vehicle-head strong {
    display: block;
    overflow: hidden;
    color: #7f1d1d;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-vehicle-head span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #475569;
}

.selected-vehicle-actions,
.selected-vehicle-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 0;
}

.selected-vehicle-metrics span {
    max-width: 100%;
    padding: 3px 6px;
    overflow: hidden;
    border: 1px solid var(--fleet-border);
    border-radius: 3px;
    background: #fff;
    color: #1f2937;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-vehicle-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 10px;
    margin: 0;
    min-width: 0;
}

.selected-vehicle-details div {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 5px;
    min-width: 0;
}

.selected-vehicle-details dt,
.selected-vehicle-details dd {
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-vehicle-details dt {
    color: #64748b;
}

.selected-vehicle-details dd {
    color: #111827;
    font-weight: 600;
}

.route-planner-panel {
    position: absolute;
    top: 142px;
    right: 12px;
    z-index: 8;
    display: grid;
    gap: 8px;
    width: min(380px, calc(100% - 24px));
    max-height: calc(100% - 210px);
    overflow: auto;
    padding: 9px;
    border: 1px solid rgba(203, 213, 225, .88);
    border-radius: 5px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 2px 12px rgba(17, 24, 39, .18);
    font-size: 12px;
}

.route-planner-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.route-planner-head strong {
    color: #7f1d1d;
    font-size: 13px;
}

.route-planner-head span {
    color: #475569;
    text-align: right;
}

.route-planner-profile {
    grid-template-columns: repeat(3, 1fr);
}

.route-planner-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.route-planner-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.route-planner-options label:has(input[type="number"]) {
    display: grid;
    grid-template-columns: 44px 1fr;
}

.route-planner-options input[type="number"],
.route-planner-point input {
    min-width: 0;
    height: 26px;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    padding: 0 6px;
    background: #fff;
    font-size: 12px;
}

.route-planner-waypoints {
    display: grid;
    gap: 5px;
}

.route-planner-point {
    display: grid;
    grid-template-columns: 22px minmax(88px, 1fr) 82px 82px auto;
    gap: 4px;
    align-items: center;
}

.route-planner-point > span {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
}

.route-planner-point-actions {
    display: inline-flex;
    gap: 2px;
}

.route-planner-point-actions button {
    min-width: 28px;
    height: 24px;
    border: 1px solid var(--fleet-border);
    border-radius: 3px;
    background: #fff;
    color: #334155;
    font-size: 10px;
}

.route-planner-point-actions button:disabled {
    color: #9ca3af;
    background: #f3f4f6;
}

.route-planner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.timeline-data-panel {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 62px;
    z-index: 3;
    max-height: min(310px, 38vh);
    overflow: auto;
    border: 1px solid rgba(203, 213, 225, .86);
    border-radius: 4px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 1px 6px rgba(17, 24, 39, .16);
}

.map-workspace[data-selected-vehicle]:not([data-selected-vehicle=""]) .timeline-data-panel {
    top: 424px;
    bottom: 132px;
    max-height: none;
}

.map-workspace[data-route-chart-visible="true"] .timeline-data-panel {
    top: 548px;
    max-height: none;
}

.route-empty-panel {
    position: absolute;
    top: 322px;
    left: 12px;
    right: 70px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 7px 9px;
    border: 1px solid rgba(203, 213, 225, .86);
    border-radius: 4px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 1px 6px rgba(17, 24, 39, .16);
    font-size: 12px;
}

.route-empty-panel strong {
    color: #7f1d1d;
}

.route-empty-panel span {
    color: #475569;
}

.route-playback-panel {
    position: absolute;
    top: 322px;
    left: 12px;
    right: 70px;
    z-index: 6;
    display: grid;
    grid-template-columns: minmax(190px, 1.2fr) auto minmax(190px, .9fr) minmax(220px, 1fr) auto;
    gap: 6px;
    align-items: center;
    max-height: 92px;
    overflow: auto;
    padding: 6px;
    border: 1px solid rgba(203, 213, 225, .86);
    border-radius: 4px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 1px 6px rgba(17, 24, 39, .16);
    font-size: 12px;
}

.route-playback-metrics,
.route-playback-point {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 0;
}

.route-playback-metrics span,
.route-playback-point span {
    max-width: 100%;
    padding: 3px 6px;
    overflow: hidden;
    border: 1px solid var(--fleet-border);
    border-radius: 3px;
    background: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-playback-controls {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 190px;
}

.route-playback-controls .mud-icon-button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: #fff;
}

.route-playback-controls strong {
    min-width: 72px;
    color: var(--fleet-red);
    text-align: center;
    white-space: nowrap;
}

.route-playback-scrubber {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) 62px;
    gap: 5px;
    align-items: center;
    min-width: 0;
}

.route-playback-scrubber input[type="range"] {
    width: 100%;
    accent-color: var(--fleet-red);
}

.route-playback-scrubber select {
    height: 28px;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: #fff;
    font-size: 12px;
}

.route-playback-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 116px;
}

.route-chart-panel {
    position: absolute;
    top: 424px;
    left: 12px;
    right: 70px;
    bottom: auto;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(130px, auto) minmax(180px, 1fr);
    gap: 8px;
    align-items: stretch;
    min-height: 86px;
    max-height: 112px;
    padding: 7px;
    border: 1px solid rgba(203, 213, 225, .86);
    border-radius: 4px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 1px 6px rgba(17, 24, 39, .16);
    font-size: 12px;
}

.route-chart-header {
    display: grid;
    gap: 4px;
    align-content: center;
    min-width: 0;
}

.route-chart-header strong {
    color: #7f1d1d;
}

.route-chart-header span {
    color: #475569;
    white-space: nowrap;
}

.route-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    min-width: 0;
    min-height: 68px;
    padding: 5px 4px 3px;
    overflow-x: auto;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.route-chart-bar {
    position: relative;
    width: 10px;
    min-width: 10px;
    height: var(--route-speed-height, 12%);
    min-height: 8px;
    border: 0;
    border-radius: 3px 3px 1px 1px;
    background: #64748b;
    cursor: pointer;
}

.route-chart-bar.ignition-on {
    background: #16a34a;
}

.route-chart-bar.selected {
    outline: 2px solid var(--fleet-red);
    outline-offset: 1px;
}

.route-chart-bar span {
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    display: none;
    transform: translateX(-50%);
    color: #111827;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.route-chart-bar:hover span,
.route-chart-bar.selected span {
    display: block;
}

.route-event-strip {
    position: absolute;
    top: 274px;
    left: 12px;
    right: 70px;
    z-index: 4;
    display: flex;
    gap: 5px;
    min-height: 38px;
    overflow-x: auto;
    padding: 4px 6px;
    border: 1px solid rgba(203, 213, 225, .86);
    border-radius: 4px;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 1px 6px rgba(17, 24, 39, .14);
}

.route-event-chip {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 5px;
    align-items: center;
    min-width: max-content;
    min-height: 28px;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: #fff;
    color: var(--fleet-text);
    font-size: 11px;
}

.route-event-chip span {
    color: var(--fleet-red);
    font-weight: 600;
}

.route-event-chip strong,
.route-event-chip small {
    font-weight: 600;
}

.route-event-chip.alert {
    border-color: rgba(215, 25, 32, .42);
    background: rgba(254, 242, 242, .98);
}

.route-event-chip.stop {
    border-color: rgba(22, 163, 74, .34);
}

.route-event-chip.avl {
    border-color: rgba(37, 99, 235, .32);
}

.route-analysis-panel {
    display: grid;
    gap: 8px;
}

.route-analysis-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 6px;
}

.route-analysis-summary span {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.route-analysis-summary strong {
    color: #7f1d1d;
    font-size: 14px;
    line-height: 1.15;
}

.route-analysis-summary small {
    overflow: hidden;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.teltonika-route-panel {
    display: grid;
    gap: 8px;
}

.raw-packet-detail {
    display: grid;
    gap: 6px;
    padding: 7px;
    border-top: 1px solid var(--fleet-border);
    background: #fff;
}

.raw-packet-summary,
.raw-io-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.raw-packet-summary span,
.raw-io-list span {
    display: inline-grid;
    gap: 2px;
    max-width: 360px;
    padding: 4px 6px;
    overflow: hidden;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: #f8fafc;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.raw-io-list strong {
    color: var(--fleet-red);
}

.raw-io-list em {
    font-style: normal;
    font-weight: 600;
}

.settings-import-panel {
    display: grid;
    grid-template-columns: minmax(240px, 420px) minmax(260px, 1fr);
    gap: 8px;
    align-items: end;
    padding: 8px;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: #fff;
}

.settings-import-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.odometer-workhours-panel {
    display: grid;
    gap: 8px;
}

.import-status {
    min-height: 30px;
    padding: 7px 8px;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
}

@media (max-width: 900px) {
    .route-planner-panel {
        top: 136px;
        left: 12px;
        right: 12px;
        width: auto;
        max-height: 260px;
    }

    .route-planner-point {
        grid-template-columns: 22px minmax(96px, 1fr) 1fr 1fr;
    }

    .route-planner-point-actions {
        grid-column: 2 / -1;
    }

    .route-day-panel {
        right: 12px;
        max-height: 108px;
    }

    .selected-vehicle-panel {
        grid-template-columns: 1fr;
        right: 12px;
        max-height: 176px;
    }

    .selected-vehicle-details {
        grid-template-columns: 1fr;
    }

    .map-workspace[data-selected-vehicle]:not([data-selected-vehicle=""]) .timeline-data-panel {
        top: 526px;
        bottom: 196px;
        max-height: none;
    }

    .report-summary-strip.map-overlay-panel.timeline-tabs-strip {
        top: 260px;
        right: 12px;
    }

    .route-empty-panel {
        top: 356px;
        right: 12px;
        flex-wrap: wrap;
    }

    .route-playback-panel {
        top: 356px;
        right: 12px;
        grid-template-columns: 1fr;
        max-height: 160px;
    }

    .route-event-strip {
        top: 306px;
        right: 12px;
    }

    .route-chart-panel {
        top: 526px;
        right: 12px;
        grid-template-columns: 1fr;
    }

    .route-playback-controls {
        justify-content: flex-start;
    }

    .route-playback-actions {
        justify-content: flex-start;
    }

    .route-analysis-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-import-panel {
        grid-template-columns: 1fr;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.export-toolbar {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 32px;
    padding: 3px 7px;
    border-bottom: 1px solid var(--fleet-border);
    background: #fff;
    overflow-x: auto;
    scrollbar-width: thin;
}

.export-toolbar-actions {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 1px;
}

.export-toolbar .mud-icon-button,
.export-toolbar-button {
    width: 28px;
    height: 28px;
    padding: 2px;
    border-radius: 4px;
}

.export-toolbar .mud-icon-button:hover {
    background: #f3f4f6;
}

.export-toolbar .mud-icon-button:focus-visible,
.export-toolbar select:focus-visible {
    outline: 2px solid rgba(37, 99, 235, .45);
    outline-offset: 1px;
}

.export-toolbar select {
    flex: 0 0 auto;
    height: 28px;
    min-width: 128px;
    max-width: 150px;
    padding: 2px 26px 2px 7px;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    color: var(--fleet-text);
    background: #fff;
}

.export-toolbar .mud-input-control,
.export-toolbar-search {
    flex: 0 0 clamp(150px, 20vw, 220px);
    width: clamp(150px, 20vw, 220px);
    margin: 0;
}

.export-toolbar .mud-input-control .mud-input-root {
    min-height: 28px;
    font-size: 12px;
}

.dense-grid-wrap {
    width: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
}

.dense-grid-scroll {
    width: 100%;
    min-height: 0;
    overflow: auto;
    scrollbar-width: thin;
}

.dense-grid {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 13px;
}

.dense-grid th,
.dense-grid td {
    height: 27px;
    padding: 3px 8px;
    border-right: 1px solid var(--fleet-border);
    border-bottom: 1px solid var(--fleet-border);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dense-grid th {
    background: #f8fafc;
    font-weight: 600;
    color: #1f2937;
}

.dense-grid-group-row td {
    height: 25px;
    color: #64748b;
    background: #f1f5f9;
    font-size: 12px;
}

.dense-grid-group-bar,
.dense-grid-active-filter-row td,
.dense-grid-column-chooser td {
    color: #64748b;
    background: #f8fafc;
}

.dense-grid-group-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dense-grid-group-bar span {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dense-grid-group-select {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 210px;
    color: #475569;
    font-weight: 600;
}

.dense-grid-group-select span {
    flex: 0 0 auto;
}

.dense-grid-group-bar button {
    min-height: 21px;
    padding: 1px 7px;
    color: #1f2937;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: #fff;
}

.dense-grid-group-bar select,
.dense-grid-group-bar input {
    min-height: 22px;
    max-width: 150px;
    padding: 1px 6px;
    color: #1f2937;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: #fff;
    font-size: 12px;
}

.dense-grid-group-header-cell {
    position: sticky;
    left: 0;
    z-index: 2;
    height: 26px;
    padding: 3px 8px !important;
    color: #7f1d1d;
    border-top: 1px solid #fecaca;
    border-bottom: 1px solid #fecaca;
    background: #fff7f7 !important;
    font-weight: 600;
    letter-spacing: 0;
}

.dense-grid-group-header-cell span {
    margin-right: 8px;
}

.dense-grid-group-header-cell small {
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}

.dense-grid-column-chooser td {
    height: auto;
    padding: 7px 8px;
    white-space: normal;
}

.dense-grid-column-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 5px;
}

.dense-grid-column-item,
.dense-grid-column-chooser label {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.dense-grid-column-item {
    justify-content: space-between;
    padding: 4px 6px;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: #fff;
}

.dense-grid-column-item label {
    flex: 1 1 auto;
}

.dense-grid-column-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dense-grid-column-item button {
    width: 24px;
    min-height: 22px;
    padding: 0;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: #f8fafc;
}

.dense-grid-column-item button:disabled {
    opacity: .45;
}

.dense-grid-active-filter-row td {
    height: auto;
    padding: 4px 8px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.dense-grid-active-filter-summary {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-right: 10px;
}

.dense-grid-active-filter-summary span {
    display: inline-flex;
}

.dense-grid-filter-chips {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 0;
}

.dense-grid-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 220px;
    min-height: 20px;
    padding: 1px 3px 1px 7px;
    color: #7f1d1d;
    border: 1px solid #fecdd3;
    border-radius: 4px;
    background: #fff1f2;
    font-size: 12px;
}

.dense-grid-filter-chip span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dense-grid-filter-chip button {
    width: 18px;
    min-width: 18px;
    height: 18px;
    padding: 0;
    color: #991b1b;
    border: 0;
    border-radius: 3px;
    background: transparent;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.dense-grid-filter-chip button:hover {
    background: #fecdd3;
}

.dense-grid-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18px;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.dense-grid-header-cell {
    position: relative;
}

.dense-grid-heading-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24px;
    align-items: center;
    gap: 3px;
    min-width: 0;
}

.dense-grid-sort {
    width: 100%;
    padding: 0;
    color: inherit;
    text-align: left;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.dense-grid-sort:hover {
    color: var(--fleet-red);
}

.dense-grid-heading > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.dense-grid-filter-icon,
.grid-filter-icon {
    color: #64748b;
}

.dense-grid-filter-icon {
    justify-self: end;
}

.dense-grid-header-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    color: #64748b;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
}

.dense-grid-header-filter:hover,
.dense-grid-header-filter.active {
    color: var(--fleet-red);
    border-color: #fecdd3;
    background: #fff1f2;
}

.dense-grid-header-filter .mud-icon-root {
    font-size: 16px;
}

.dense-grid-header-filter-menu {
    position: absolute;
    top: calc(100% - 1px);
    left: 4px;
    z-index: 8;
    display: grid;
    gap: 7px;
    width: min(280px, 80vw);
    padding: 8px;
    color: #0f172a;
    border: 1px solid var(--fleet-border);
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
}

.dense-grid-header-filter-menu label {
    display: grid;
    gap: 4px;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
}

.dense-grid-header-filter-menu input {
    width: 100%;
    height: 28px;
    padding: 3px 7px;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    font: inherit;
    font-weight: 400;
}

.dense-grid-header-filter-options {
    display: grid;
    gap: 3px;
    max-height: 180px;
    overflow: auto;
}

.dense-grid-header-filter-options button {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 24px;
    padding: 3px 6px;
    color: #1f2937;
    text-align: left;
    border: 1px solid transparent;
    border-radius: 4px;
    background: #f8fafc;
    cursor: pointer;
}

.dense-grid-header-filter-options button:hover,
.dense-grid-header-filter-options button.selected {
    color: #7f1d1d;
    border-color: #fecdd3;
    background: #fff1f2;
}

.dense-grid-header-filter-options span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dense-grid-header-filter-options small {
    color: #64748b;
}

.dense-grid-header-filter-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.dense-grid-header-filter-actions button {
    min-height: 24px;
    padding: 2px 7px;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.dense-grid-header-filter-actions button:hover:not(:disabled) {
    color: var(--fleet-red);
    background: #fff7f8;
}

.dense-grid-header-filter-actions button:disabled {
    color: #9ca3af;
    background: #f3f4f6;
    cursor: not-allowed;
}

.dense-grid tbody tr:nth-child(even) {
    background: #f4f4f4;
}

.dense-grid tbody tr.selected-row {
    background: #fff1f2;
}

.select-column {
    width: 34px;
}

.dense-grid .select-column,
.dense-grid .select-cell {
    padding: 0;
    text-align: center;
}

.dense-grid input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    vertical-align: middle;
    accent-color: var(--fleet-red);
}

.filter-row td {
    height: 25px;
    padding: 2px 6px;
    color: #0f172a;
    background: #fff;
}

.grid-filter-placeholder {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    align-items: center;
    gap: 4px;
    width: 100%;
    min-height: 21px;
    padding: 1px 6px;
    color: #64748b;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: #fbfbfb;
    box-sizing: border-box;
}

.grid-filter-input {
    min-width: 0;
    width: 100%;
    padding: 0;
    color: #0f172a;
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 12px;
}

.grid-filter-input::placeholder,
.grid-filter-placeholder span {
    overflow: hidden;
    text-overflow: ellipsis;
    color: #64748b;
    font-size: 12px;
}

.grid-actions-column {
    position: sticky;
    right: 0;
    z-index: 2;
    width: 250px;
    min-width: 250px;
    border-left: 1px solid var(--fleet-border);
    background: #f8fafc;
}

.grid-row-actions {
    position: sticky;
    right: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px;
    width: 250px;
    min-width: 250px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    border-left: 1px solid var(--fleet-border);
    background: #fff;
}

.dense-grid tbody tr:nth-child(even) .grid-row-actions {
    background: #f4f4f4;
}

.dense-grid tbody tr:hover .grid-row-actions {
    background: #fff7f8;
}

.grid-link {
    min-height: 22px;
    padding: 1px 5px;
    color: var(--fleet-blue);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
}

.grid-link:hover {
    border-color: var(--fleet-border);
    background: #fff;
}

.grid-link.danger {
    color: var(--fleet-danger);
}

.grid-icon-link {
    width: 24px;
    min-width: 24px;
    height: 22px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.grid-icon-link .mud-icon-root {
    font-size: 16px;
}

.empty-cell {
    height: 220px;
    text-align: center;
    color: var(--fleet-soft-text);
}

.dense-grid-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 26px;
    padding: 3px 8px;
    color: var(--fleet-soft-text);
    border-bottom: 1px solid var(--fleet-border);
    background: #fafafa;
    font-size: 12px;
}

.dense-grid-footer strong {
    color: var(--fleet-text);
}

.dense-grid-page-size,
.dense-grid-pager {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.dense-grid-page-size select,
.dense-grid-pager button {
    height: 22px;
    min-width: 28px;
    color: #1f2937;
    background: #fff;
    border: 1px solid var(--fleet-border);
    border-radius: 3px;
}

.dense-grid-pager button:disabled {
    color: #9ca3af;
    background: #f3f4f6;
}

.dashboard-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--fleet-border);
}

.dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--fleet-border);
    background: #fafafa;
}

.dashboard-kpis span {
    display: grid;
    align-items: center;
    min-height: 34px;
    padding: 6px 8px;
    border: 1px solid var(--fleet-border);
    border-radius: 6px;
    background: #fff;
    font-weight: 600;
}

.dashboard-refresh-controls {
    display: grid;
    gap: 6px;
    padding: 0 8px 10px;
}

.dashboard-refresh-controls .dialog-field {
    margin: 0;
}

.dashboard-refresh-controls small {
    color: var(--fleet-muted);
    font-size: 11px;
    line-height: 1.35;
}

.date-range-picker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 0 10px;
}

.widget-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    grid-auto-flow: dense;
    gap: 12px;
    padding: 14px;
}

.widget-tile {
    display: grid;
    gap: 8px;
    min-height: 110px;
    padding: 14px;
    border: 1px solid var(--fleet-border);
    border-radius: 6px;
    background: #fff;
}

.widget-size-2-1 {
    grid-column: span 2;
}

.widget-size-2-2 {
    grid-column: span 2;
    grid-row: span 2;
    min-height: 232px;
}

.widget-size-4-1 {
    grid-column: 1 / -1;
}

.widget-tile.selected {
    border-color: var(--fleet-red);
    box-shadow: 0 0 0 1px var(--fleet-red);
}

.widget-tile strong {
    font-size: 24px;
    color: var(--fleet-red);
}

.widget-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
}

.report-summary-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    border-bottom: 1px solid var(--fleet-border);
    background: #fafafa;
}

.report-summary-strip span {
    min-height: 24px;
    padding: 3px 7px;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: #fff;
}

.report-admin-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 6px 8px 8px;
    border-bottom: 1px solid var(--fleet-border);
}

.report-admin-actions .panel-command {
    width: 100%;
    margin: 0;
}

.report-picker-field {
    padding: 0 8px 8px;
    border-bottom: 1px solid var(--fleet-border);
}

.report-summary-strip .panel-command {
    width: auto;
    margin: 0;
}

.legacy-report-result-context {
    border-bottom: 1px solid #d2d2d2;
    background: #fff;
}

.legacy-report-result-context .report-summary-strip {
    padding: 6px 8px;
    background: #fff;
}

.legacy-report-result {
    display: grid;
    gap: 0;
    border-bottom: 1px solid #cfcfcf;
    background: #fff;
}

.legacy-report-result-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 6px 8px;
    border-bottom: 1px solid #d6d6d6;
    background: #fff;
}

.legacy-report-result-head .panel-section-title {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.legacy-report-result-head p {
    margin: 2px 0 0;
    color: #374151;
    font-size: 12px;
}

.report-result-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
    min-width: 0;
}

.legacy-report-result .report-summary-strip.result-meta {
    border-bottom: 1px solid #e2e2e2;
    background: #fafafa;
}

.legacy-report-result .dense-grid-wrap {
    max-height: 280px;
    overflow: auto;
}

.report-tree {
    display: grid;
    gap: 6px;
    padding: 7px;
    background: #fff;
}

.report-tree-group {
    border: 1px solid #d9d9d9;
    background: #fff;
}

.report-tree-group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 30px;
    padding: 5px 8px;
    border-bottom: 1px solid #e5e7eb;
    background: #f3f6f8;
    color: #111827;
    font-weight: 600;
    cursor: pointer;
}

.report-tree-group summary small {
    color: #64748b;
    font-weight: 600;
}

.report-tree-group .dense-grid-wrap {
    max-height: 240px;
    border: 0;
}

.report-tree-empty {
    padding: 12px;
    color: var(--fleet-soft-text);
    text-align: center;
}

.automatic-reports-shell {
    min-height: calc(100vh - 42px);
    background: #fff;
}

.automatic-reports-workspace {
    min-height: calc(100vh - 42px);
}

.automatic-reports-toolbar {
    position: sticky;
    top: 0;
    z-index: 6;
    display: flex;
    align-items: flex-start;
    gap: 5px;
    min-height: 34px;
    padding: 3px 7px 3px 0;
    border-bottom: 1px solid var(--fleet-border);
    background: #fff;
}

.automatic-type-filter {
    position: relative;
    flex: 0 0 238px;
    min-width: 190px;
}

.automatic-type-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    width: 100%;
    height: 28px;
    padding: 0 7px;
    border: 1px solid var(--fleet-border);
    border-left: 0;
    border-radius: 0;
    background: #fff;
    color: #111827;
    font-weight: 600;
    cursor: pointer;
}

.automatic-type-trigger .mud-icon-root {
    color: #6b7280;
    font-size: 17px;
}

.automatic-type-menu {
    position: absolute;
    top: 31px;
    left: 8px;
    z-index: 8;
    min-width: 170px;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .16);
}

.automatic-type-menu button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 30px;
    padding: 5px 9px;
    border: 0;
    border-bottom: 1px solid #f2f2f2;
    background: #fff;
    color: #111827;
    text-align: left;
    cursor: pointer;
}

.automatic-type-menu button:last-child {
    border-bottom: 0;
}

.automatic-type-menu button:hover,
.automatic-type-menu button.selected {
    color: var(--fleet-red);
    background: #f8f8f8;
}

.automatic-type-menu button.selected {
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--fleet-red);
}

.automatic-type-menu small {
    color: #6b7280;
    font-size: 11px;
    white-space: nowrap;
}

.automatic-create-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 0 0 auto;
    height: 28px;
    min-width: 194px;
    padding: 2px 11px;
    border: 1px solid #22c55e;
    border-radius: 4px;
    background: #fff;
    color: #15803d;
    font-weight: 600;
    cursor: pointer;
}

.automatic-create-button:hover {
    background: #f0fdf4;
}

.automatic-reports-toolbar > .export-toolbar {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 28px;
    padding: 0;
    border-bottom: 0;
}

.automatic-reports-workspace > .report-summary-strip {
    padding: 6px 7px;
    background: #fff;
}

.automatic-reports-workspace > .report-summary-strip span {
    min-height: 23px;
    padding: 2px 7px;
    border-radius: 3px;
}

.automatic-vehicle-picker {
    display: grid;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--fleet-border);
    background: #f8fafc;
}

.automatic-vehicle-picker-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.automatic-vehicle-picker-head span {
    display: block;
    color: #111827;
    font-weight: 600;
}

.automatic-vehicle-picker-head small,
.automatic-vehicle-row small {
    color: #64748b;
}

.automatic-vehicle-picker-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
}

.automatic-vehicle-picker-actions button {
    min-height: 25px;
    padding: 2px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    color: #0f172a;
    cursor: pointer;
}

.automatic-vehicle-search {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    min-height: 28px;
    padding: 0 7px;
    border: 1px solid #d6dce4;
    border-radius: 4px;
    background: #fff;
}

.automatic-vehicle-search input {
    min-width: 0;
    height: 24px;
    border: 0;
    outline: 0;
    background: transparent;
}

.automatic-vehicle-list {
    display: grid;
    max-height: 220px;
    overflow: auto;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.automatic-vehicle-row {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    min-height: 29px;
    padding: 4px 8px;
    border-bottom: 1px solid #edf2f7;
}

.automatic-vehicle-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.automatic-vehicle-row input {
    accent-color: var(--fleet-red);
}

.automatic-vehicle-empty {
    padding: 12px;
    color: var(--fleet-soft-text);
    text-align: center;
}

.module-layout:has(.legacy-report-panel) {
    grid-template-columns: 282px minmax(0, 1fr);
}

.module-layout:has(.legacy-report-panel) .module-panel {
    overflow: visible;
}

.module-layout:has(.legacy-report-panel) .panel-command.primary {
    color: #fff;
    background: #54b957;
    border-color: #54b957;
}

.workspace:has(.legacy-report-grid) {
    overflow: auto;
    background: #fff;
}

.legacy-report-panel {
    background: #f7f7f7;
}

.legacy-field {
    display: grid;
    gap: 3px;
    padding: 7px 4px 0;
    color: #111827;
    font-size: 12px;
}

.legacy-field > span {
    line-height: 16px;
}

.legacy-field select,
.legacy-field input,
.legacy-date-picker {
    width: 100%;
    min-width: 0;
    height: 27px;
    padding: 3px 7px;
    color: #111827;
    border: 1px solid #d5d5d5;
    border-radius: 4px;
    background: #fff;
    outline: none;
}

.legacy-field select:focus,
.legacy-field input:focus,
.legacy-date-picker:focus,
.legacy-report-picker:focus,
.legacy-report-popup input:focus {
    border-color: var(--fleet-red);
    box-shadow: 0 0 0 1px rgba(200, 0, 0, .12);
}

.legacy-date-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px;
    gap: 4px;
}

.legacy-field-icon-button,
.legacy-icon-button {
    display: inline-grid;
    place-items: center;
    width: 27px;
    height: 27px;
    color: var(--fleet-red);
    border: 1px solid #d5d5d5;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.legacy-date-custom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.legacy-date-custom label {
    display: grid;
    gap: 2px;
    font-size: 11px;
}

.legacy-report-picker-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 27px 27px;
    gap: 4px;
    padding: 6px 4px 8px;
    border-bottom: 1px solid #d4d4d4;
    background: #f7f7f7;
}

.legacy-report-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    height: 27px;
    padding: 3px 7px;
    color: #111827;
    border: 1px solid #d5d5d5;
    border-radius: 4px;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.legacy-report-picker span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.legacy-report-popup {
    position: fixed;
    top: calc(var(--toolbar-height, 42px) + 190px);
    left: calc(var(--rail-width, 38px) + 8px);
    z-index: 80;
    width: min(760px, calc(100vw - var(--rail-width, 38px) - 28px));
    max-height: min(582px, calc(100vh - var(--toolbar-height, 42px) - 230px));
    overflow: auto;
    border: 1px solid #d5d5d5;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(17, 24, 39, .25);
}

.legacy-report-popup-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    color: #1f2937;
    font-size: 12px;
}

.legacy-report-popup-table th,
.legacy-report-popup-table td {
    height: 27px;
    padding: 3px 7px;
    border-right: 1px solid #d6d6d6;
    border-bottom: 1px solid #d6d6d6;
    vertical-align: middle;
}

.legacy-report-popup-table th {
    color: #5f6670;
    background: #fff;
    font-weight: 600;
    text-align: center;
}

.legacy-report-popup-table th:first-child,
.legacy-report-popup-table td:first-child {
    width: 42%;
    text-align: left;
}

.legacy-popup-filter-row input,
.legacy-popup-filter-row select {
    width: 100%;
    height: 24px;
    min-width: 0;
    border: 0;
    border-bottom: 1px solid #d5d5d5;
    background: #fff;
    outline: none;
}

.legacy-popup-filter-row th:first-child input {
    border: 1px solid var(--fleet-red);
    border-radius: 0;
}

.legacy-popup-group td {
    height: 27px;
    color: #111827;
    background: #d8d8d8;
    font-weight: 600;
}

.legacy-popup-report-name,
.legacy-popup-icon {
    border: 0;
    background: transparent;
    color: #111827;
    cursor: pointer;
}

.legacy-popup-report-name {
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    text-align: left !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.legacy-report-popup-table tr.selected td {
    background: #fff2f2;
}

.legacy-report-popup-table tbody tr:not(.legacy-popup-group):hover td {
    background: #f6f6f6;
}

.legacy-popup-icon {
    display: inline-grid;
    place-items: center;
    width: 100%;
    min-height: 20px;
    font-weight: 600;
}

.legacy-popup-empty,
.legacy-grid-empty {
    color: var(--fleet-soft-text);
    text-align: center;
}

.legacy-report-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 4px 8px 0;
}

.legacy-report-actions .panel-command {
    color: var(--fleet-red);
    border-color: var(--fleet-red);
    background: #fff;
}

.legacy-report-data-preview {
    min-height: 326px;
    border: 1px dotted #c7c7c7;
    background: #fff;
}

.legacy-report-grid {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) 34px;
    min-height: calc(100vh - var(--toolbar-height, 42px));
    background: #fff;
}

.legacy-grid-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 4px 8px 3px 4px;
    border-bottom: 1px solid #d2d2d2;
    background: #fff;
}

.legacy-sector-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-self: start;
    height: 28px;
    padding: 0 4px;
    border: 1px solid #d5d5d5;
    background: #fff;
}

.legacy-sector-filter button {
    border: 0;
    background: transparent;
    color: #374151;
    cursor: pointer;
}

.legacy-sector-filter span {
    color: #9ca3af;
    font-size: 14px;
}

.legacy-grid-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    min-width: 0;
}

.legacy-clear-selected,
.legacy-icon-outline {
    display: inline-grid;
    place-items: center;
    height: 27px;
    color: var(--fleet-red);
    border: 1px solid var(--fleet-red);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.legacy-clear-selected {
    padding: 0 10px;
}

.legacy-icon-outline {
    width: 27px;
    font-weight: 600;
}

.legacy-icon-outline.selected {
    color: #fff;
    background: var(--fleet-red);
}

.legacy-grid-search {
    display: grid;
    grid-template-columns: 20px minmax(120px, 160px);
    align-items: center;
    height: 27px;
    padding: 0 7px;
    border: 1px solid #d8d8d8;
    border-radius: 4px;
    background: #fff;
    color: #7a7f87;
}

.legacy-grid-search input {
    min-width: 0;
    height: 22px;
    border: 0;
    outline: 0;
}

.legacy-vehicle-grid-wrap {
    min-height: 0;
    overflow: auto;
}

.legacy-vehicle-grid {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    color: #111827;
    font-size: 12px;
}

.legacy-vehicle-grid th,
.legacy-vehicle-grid td {
    height: 27px;
    padding: 3px 8px;
    overflow: hidden;
    border-right: 1px solid #d2d2d2;
    border-bottom: 1px solid #d2d2d2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.legacy-vehicle-grid th {
    position: sticky;
    top: 0;
    z-index: 3;
    color: #4b5563;
    background: #fff;
    font-weight: 600;
    text-align: left;
}

.legacy-vehicle-filter-row th {
    top: 27px;
    height: 27px;
    padding: 0 8px;
    background: #fff;
}

.legacy-vehicle-filter-row input {
    width: 100%;
    height: 24px;
    border: 0;
    outline: 0;
    background: transparent;
}

.legacy-vehicle-filter-row th:not(:first-child)::before {
    content: "\2315";
    display: inline-block;
    margin-right: 8px;
    color: #001f3f;
    font-weight: 600;
}

.legacy-check-cell {
    width: 34px;
    text-align: center;
}

.legacy-check-cell input {
    width: 15px;
    height: 15px;
    accent-color: var(--fleet-red);
}

.legacy-sort-indicator {
    float: right;
    color: #6b7280;
    font-weight: 500;
}

.legacy-grid-group-row td {
    color: #6b7280;
    background: #d8d8d8;
    font-weight: 600;
}

.legacy-vehicle-grid tbody tr:not(.legacy-grid-group-row):nth-child(even) td {
    background: #f3f3f3;
}

.legacy-vehicle-grid tbody tr.selected td {
    background: #fff7ed;
}

.legacy-vehicle-grid tbody tr:not(.legacy-grid-group-row):hover td {
    background: #f8f8f8;
}

.legacy-grid-footer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 28px;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    padding: 3px 8px 4px 4px;
    border-top: 1px solid #d2d2d2;
    background: #fff;
    color: #6b7280;
    font-size: 12px;
}

.legacy-grid-footer > span {
    text-align: right;
}

.legacy-page-sizes {
    display: flex;
    align-items: center;
    gap: 4px;
}

.legacy-page-sizes button,
.legacy-page-current {
    min-width: 27px;
    height: 27px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: #fff;
    color: #374151;
}

.legacy-page-sizes button.selected,
.legacy-page-current {
    border-color: #d5d5d5;
    background: #d8d8d8;
}

.legacy-report-grid.expanded .legacy-vehicle-grid-wrap {
    border: 2px solid rgba(200, 0, 0, .18);
}

@media (max-width: 760px) {
    .module-layout:has(.legacy-report-panel) {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(520px, 1fr);
        overflow: auto;
    }

    .module-layout:has(.legacy-report-panel) .module-panel {
        overflow: visible;
        border-right: 0;
        border-bottom: 1px solid #b8b8b8;
    }

    .module-layout:has(.legacy-report-panel) .workspace {
        overflow: visible;
    }

    .legacy-report-data-preview {
        min-height: 120px;
    }

    .legacy-report-grid {
        min-height: 560px;
    }

    .legacy-grid-toolbar {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }

    .legacy-grid-actions {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .legacy-grid-search {
        grid-template-columns: 20px minmax(96px, 1fr);
        min-width: 138px;
    }

    .legacy-report-result-head {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }

    .report-result-actions {
        justify-content: flex-start;
    }

    .legacy-report-popup {
        left: calc(var(--rail-width, 38px) + 4px);
        top: calc(var(--toolbar-height, 42px) + 184px);
        width: calc(100vw - var(--rail-width, 38px) - 8px);
        max-height: 60vh;
    }
}

.report-popular-box {
    display: grid;
    gap: 0;
    margin: 0 8px 8px;
    border: 1px dotted #cbd5e1;
    border-radius: 4px;
    background: #fff;
}

.report-popular-box strong {
    padding: 7px 8px 4px;
    color: #111827;
    font-size: 12px;
}

.report-popular-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 28px;
    padding: 4px 8px;
    color: #111827;
    border: 0;
    border-top: 1px dotted #d8dee8;
    background: transparent;
    text-align: left;
}

.report-popular-item:hover {
    background: #fff5f5;
}

.report-popular-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-popular-item small {
    color: var(--fleet-soft-text);
    font-size: 11px;
}

.report-data-box {
    display: grid;
    gap: 6px;
    margin: 8px;
    padding: 8px;
    min-height: 118px;
    border: 1px dotted #cbd5e1;
    border-radius: 4px;
    background: #fff;
}

.report-data-box strong {
    color: #111827;
}

.report-data-box p {
    margin: 0;
    font-size: 12px;
    line-height: 1.35;
}

.report-vehicle-selector {
    display: grid;
    gap: 0;
    border-bottom: 1px solid var(--fleet-line-strong);
    background: #fff;
}

.report-vehicle-selector-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-bottom: 1px solid var(--fleet-border);
    background: #fbfbfb;
}

.report-vehicle-selector-header h3 {
    margin: 0;
    color: #111827;
    font-size: 14px;
}

.report-vehicle-selector-header p {
    margin: 2px 0 0;
    color: var(--fleet-soft-text);
    font-size: 12px;
}

.report-vehicle-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.report-vehicle-table-wrap {
    max-height: 260px;
    overflow: auto;
}

.report-vehicle-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.report-vehicle-table th,
.report-vehicle-table td {
    height: 28px;
    padding: 3px 8px;
    border-right: 1px solid #d2d2d2;
    border-bottom: 1px solid #d2d2d2;
    white-space: nowrap;
}

.report-vehicle-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    color: #111827;
    background: #f7f7f7;
    text-align: left;
}

.report-vehicle-table tr:nth-child(even) td {
    background: var(--fleet-row-alt);
}

.report-vehicle-table tr.selected td {
    background: #fff7ed;
}

.report-vehicle-table tr:hover td {
    background: var(--fleet-row-hover);
}

.report-vehicle-table .select-column {
    width: 32px;
    text-align: center;
}

.report-vehicle-table input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--fleet-red);
}

.raw-packet-preview {
    margin: 0;
    padding: 8px 10px;
    max-height: 96px;
    overflow: auto;
    color: #0f172a;
    background: #f8fafc;
    border-bottom: 1px solid var(--fleet-border);
    font-family: Consolas, "Courier New", monospace;
    font-size: 11px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.score-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--fleet-border);
    background: #fafafa;
}

.score-strip article {
    display: grid;
    gap: 3px;
    min-height: 50px;
    padding: 8px;
    border: 1px solid var(--fleet-border);
    border-radius: 6px;
    background: #fff;
}

.score-strip span {
    color: var(--fleet-soft-text);
}

.score-strip strong {
    color: var(--fleet-red);
    font-size: 20px;
}

.eco-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.eco-detail-grid article {
    min-width: 0;
    padding: 10px;
    border: 1px solid #e3e7ef;
    border-radius: 4px;
    background: #f8fafc;
}

.eco-detail-grid span {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #5f6b7a;
    text-transform: uppercase;
}

.eco-detail-grid strong {
    display: block;
    margin-top: 4px;
    color: #111827;
    font-size: 17px;
}

@media (max-width: 900px) {
    .eco-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .help-drawer-grid {
        grid-template-columns: 1fr;
    }
}

.report-list,
.settings-tree {
    margin: 0;
    padding: 8px 8px 8px 24px;
}

.report-list li,
.settings-tree li {
    margin: 5px 0;
}

.entity-dialog-preview {
    margin: 14px 8px;
    border: 1px solid var(--fleet-red);
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(17, 24, 39, .12);
    scroll-margin-top: 56px;
}

.dialog-title,
.dialog-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    border-bottom: 1px solid var(--fleet-border);
}

.dialog-title h3 {
    margin: 0;
    font-size: 16px;
}

.dialog-title button,
.dialog-actions button {
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: #fff;
    min-height: 26px;
}

.dialog-actions {
    justify-content: flex-end;
    border-bottom: 0;
    border-top: 1px solid var(--fleet-border);
}

.dialog-actions button {
    color: #15803d;
    border-color: #22c55e;
}

.dialog-content {
    display: grid;
    gap: 8px;
    padding: 8px;
}

.dialog-field {
    display: grid;
    gap: 3px;
}

.dialog-field input,
.dialog-field select {
    min-height: 26px;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
}

.role-module-field {
    grid-column: 1 / -1;
}

.role-module-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    max-height: 220px;
    overflow: auto;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: #fff;
    padding: 6px;
}

.role-module-option {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    font-size: 12px;
}

.role-module-option input {
    width: 14px;
    height: 14px;
    min-height: 14px;
}

.visibility-grid {
    display: grid;
    grid-template-columns: minmax(150px, .8fr) minmax(0, 1.2fr);
    gap: 8px;
    max-height: 360px;
    overflow: auto;
}

.visibility-section {
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: #fff;
}

.visibility-section h4 {
    margin: 0;
    padding: 7px 8px;
    border-bottom: 1px solid var(--fleet-border);
    color: var(--fleet-red);
    font-size: 13px;
}

.visibility-list {
    display: grid;
}

.dialog-check-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    margin: 0;
    padding: 5px 8px;
    border-bottom: 1px solid var(--fleet-border);
}

.dialog-check-row:last-child {
    border-bottom: 0;
}

.dialog-check-row input {
    width: 15px;
    height: 15px;
}

.dialog-check-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dialog-check-row small {
    color: var(--fleet-soft-text);
    font-size: 11px;
}

.report-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.report-settings-grid .wide,
.export-settings-preview {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    .visibility-grid,
    .report-settings-grid {
        grid-template-columns: 1fr;
    }
}

.import-preview {
    display: grid;
    gap: 6px;
    max-height: 260px;
    overflow: auto;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: #fff;
}

.import-preview strong {
    padding: 7px 8px 0;
    color: #111827;
}

.import-preview table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.import-preview th,
.import-preview td {
    padding: 6px 8px;
    border-top: 1px solid var(--fleet-border);
    text-align: left;
    white-space: nowrap;
}

.import-preview th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
}

.import-preview tr.invalid td {
    background: #fef2f2;
    color: #991b1b;
}

#blazor-error-ui {
    background: #fff3cd;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
    display: none;
    left: 0;
    padding: .6rem 1.25rem .7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: .75rem;
    top: .5rem;
}

@media (max-width: 900px) {
    .top-toolbar {
        grid-template-columns: auto 1fr auto;
    }

    .toolbar-title span {
        display: none;
    }

    .toolbar-actions {
        gap: 2px;
    }

    .module-layout {
        grid-template-columns: minmax(220px, 42vw) minmax(0, 1fr);
    }

    .widget-grid {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }

    .widget-size-4-1,
    .widget-size-2-1,
    .widget-size-2-2 {
        grid-column: span 2;
    }

    .dashboard-kpis {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }

    .score-strip {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }
}

@media print {
    .top-toolbar,
    .left-rail,
    .module-panel,
    .export-toolbar,
    .map-float-actions {
        display: none !important;
    }

    .fleet-shell,
    .fleet-main,
    .module-layout {
        display: block;
    }

    .workspace {
        overflow: visible;
    }
}

/* ICT Marketplace inspired operational shell */
:root {
    --fleet-red: #d10019;
    --fleet-red-dark: #a90014;
    --fleet-red-soft: #fff1f3;
    --fleet-border: #cfcfcf;
    --fleet-border-soft: #e7e7e7;
    --fleet-surface: #ffffff;
    --fleet-muted: #f2f2f2;
    --fleet-panel: #eeeeee;
    --fleet-text: #1f2933;
    --fleet-soft-text: #667085;
    --fleet-green: #49aa57;
    --fleet-orange: #e59671;
    --fleet-blue: #0b69b7;
    --fleet-danger: #d10019;
    --toolbar-height: 42px;
    --rail-width: 38px;
    --rail-expanded-width: 265px;
    --module-panel-width: 284px;
}

html,
body {
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 12px;
    background: #e9e9e9;
}

button,
input,
select,
textarea {
    letter-spacing: 0;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 2px solid rgba(11, 105, 183, .45);
    outline-offset: 1px;
}

.fleet-shell {
    grid-template-rows: var(--toolbar-height) minmax(0, 1fr);
    background: #efefef;
}

.top-toolbar {
    position: relative;
    z-index: 30;
    grid-template-columns: minmax(180px, 280px) minmax(280px, 1fr) auto;
    height: var(--toolbar-height);
    padding: 0 8px;
    gap: 10px;
    background: var(--fleet-red);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .2);
}

.toolbar-title {
    gap: 10px;
    min-width: 0;
}

.toolbar-title span {
    overflow: hidden;
    font-size: 20px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.toolbar-menu-button {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    color: #fff;
    border: 0;
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
}

.toolbar-menu-button:hover {
    background: rgba(255, 255, 255, .16);
}

.toolbar-search {
    gap: 6px;
}

.global-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px;
    align-items: center;
    width: min(460px, 100%);
    height: 30px;
    overflow: hidden;
    border-radius: 3px;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .16);
}

.global-search input {
    min-width: 0;
    height: 30px;
    padding: 0 10px;
    color: #374151;
    border: 0;
    background: transparent;
}

.global-search input::placeholder {
    color: #7b8494;
}

.global-search .mud-icon-root {
    color: #4b5563;
}

.toolbar-actions {
    gap: 5px;
    min-width: 0;
}

.toolbar-icon,
.toolbar-actions .mud-icon-button {
    width: 28px;
    height: 28px;
    color: #fff;
}

.toolbar-actions .mud-icon-button:hover {
    background: rgba(255, 255, 255, .16);
}

.quick-action-host {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.quick-action-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 80;
    display: grid;
    min-width: 220px;
    max-height: min(70vh, 390px);
    overflow-y: auto;
    padding: 6px;
    color: #1f2937;
    border: 1px solid #d9dee8;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
}

.quick-action-menu button {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 6px 8px;
    color: #1f2937;
    text-align: left;
    border: 0;
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
}

.quick-action-menu button:hover,
.quick-action-menu button:focus-visible {
    color: #7f1018;
    background: #f5f6f8;
    outline: none;
}

.quick-action-menu .mud-icon-root {
    color: #7f1018;
}

.help-drawer {
    position: fixed;
    top: calc(var(--toolbar-height) + 10px);
    right: 14px;
    z-index: 78;
    width: min(560px, calc(100vw - 28px));
    padding: 10px;
    color: #1f2937;
    border: 1px solid #d9dee8;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .24);
}

.help-drawer header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #edf0f5;
}

.help-drawer header button {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 4px;
    color: #7f1018;
    background: #f5f6f8;
    cursor: pointer;
}

.help-drawer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 0;
}

.help-drawer-grid article {
    min-width: 0;
    padding: 10px;
    border: 1px solid #e3e7ef;
    border-radius: 4px;
    background: #f8fafc;
}

.help-drawer-grid span {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: #7f1018;
    text-transform: uppercase;
}

.help-drawer-grid strong {
    display: block;
    margin-top: 4px;
}

.help-drawer-grid p {
    margin: 6px 0 0;
    color: #4b5563;
    font-size: 12px;
    line-height: 1.35;
}

.help-drawer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.help-drawer-actions button {
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid #d9dee8;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.help-drawer-actions button:first-child {
    color: #fff;
    border-color: #7f1018;
    background: #7f1018;
}

@media (max-width: 900px) {
    .help-drawer-grid {
        grid-template-columns: 1fr;
    }
}

.toolbar-user {
    max-width: 132px;
    font-size: 12px;
}

.toolbar-logout {
    min-height: 30px;
    border-color: rgba(255, 255, 255, .78);
    border-radius: 4px;
}

.user-badge {
    width: 32px;
    height: 32px;
    font-size: 12px;
    border-color: rgba(255, 255, 255, .85);
}

.fleet-main {
    grid-template-columns: var(--rail-width) minmax(0, 1fr);
}

.fleet-shell.rail-pinned .fleet-main {
    grid-template-columns: var(--rail-expanded-width) minmax(0, 1fr);
}

.left-rail {
    position: relative;
    z-index: 20;
    width: var(--rail-width);
    min-width: var(--rail-width);
    overflow: hidden;
    padding-top: 3px;
    background: var(--fleet-red);
    transition: width .16s ease;
    box-shadow: 1px 0 0 rgba(0, 0, 0, .18);
}

.left-rail:hover,
.left-rail:focus-within,
.fleet-shell.rail-pinned .left-rail {
    width: var(--rail-expanded-width);
}

.rail-link {
    grid-template-columns: var(--rail-width) minmax(0, 1fr);
    place-items: center start;
    width: var(--rail-expanded-width);
    height: 30px;
    padding: 0;
    color: #fff;
    border-left: 0;
}

.rail-link .mud-icon-root {
    justify-self: center;
}

.rail-link span {
    min-width: 0;
    overflow: hidden;
    opacity: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    transition: opacity .12s ease;
}

.left-rail:hover .rail-link span,
.left-rail:focus-within .rail-link span,
.fleet-shell.rail-pinned .rail-link span {
    opacity: 1;
}

.rail-link.active,
.rail-link:hover {
    color: var(--fleet-red);
    background: #fff;
    border-left-color: transparent;
}

.module-layout {
    grid-template-columns: var(--module-panel-width) minmax(0, 1fr);
    min-height: calc(100vh - var(--toolbar-height));
}

.module-panel {
    background: #f3f3f3;
    border-right: 1px solid #b8b8b8;
}

.panel-header {
    min-height: 30px;
    padding: 5px 8px;
    color: #111827;
    background: #f8f8f8;
    border-bottom: 1px solid #b8b8b8;
}

.panel-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.panel-section-title {
    padding: 6px 8px;
    color: var(--fleet-red);
    background: #dcdcdc;
    border-top: 1px solid #c8c8c8;
    border-bottom: 1px solid #c8c8c8;
    font-size: 13px;
}

.filter-bar {
    gap: 6px;
    padding: 7px 8px;
    background: #efefef;
}

.filter-chip,
.panel-command,
.segmented-panel button,
.panel-list-item {
    border-color: #c8c8c8;
    border-radius: 4px;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65);
}

.filter-chip {
    min-height: 28px;
    text-align: center;
}

.panel-command {
    min-height: 29px;
    color: #1c7d33;
    border-color: #42a65a;
}

.panel-command:hover {
    background: #f7fff8;
}

.panel-command.primary,
.panel-command.selected,
.segmented-panel button.selected,
.panel-list-item.selected {
    color: #fff;
    background: var(--fleet-red);
    border-color: var(--fleet-red);
}

.panel-command.compact {
    min-height: 24px;
    font-size: 12px;
}

.panel-command:disabled {
    color: #9ca3af;
    border-color: var(--fleet-border);
    background: #f3f4f6;
    cursor: not-allowed;
}

.segmented-panel {
    padding: 6px 8px 0;
}

.segmented-panel + .segmented-panel {
    padding-top: 4px;
}

.segmented-panel button {
    min-height: 28px;
}

.vehicle-status-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    padding: 6px 4px;
    background: #fff;
}

.vehicle-status-strip span {
    display: grid;
    justify-items: center;
    gap: 2px;
    min-width: 0;
    font-size: 12px;
}

.vehicle-status-strip span::before {
    content: "";
    width: 18px;
    height: 14px;
    border-radius: 3px;
    background: currentColor;
    opacity: .9;
    clip-path: polygon(12% 35%, 58% 35%, 72% 50%, 92% 50%, 92% 82%, 8% 82%, 8% 50%);
}

.vehicle-status-strip .status-driving::before {
    border-radius: 50%;
    clip-path: none;
}

.vehicle-status-strip .status-unavailable::before {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    clip-path: none;
}

.vehicle-status-strip .status-other::before {
    width: 20px;
    clip-path: none;
}

.status-total {
    color: var(--fleet-red);
}

.status-driving,
.status-badge.status-driving {
    color: var(--fleet-green);
}

.status-stopped,
.status-badge.status-stopped {
    color: var(--fleet-orange);
}

.status-unavailable,
.status-badge.status-unavailable {
    color: #e77777;
}

.vehicle-list {
    gap: 0;
}

.vehicle-row {
    position: relative;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 4px;
    padding: 10px 8px 9px;
    background: #f8f8f8;
    border-bottom: 1px dotted #9b9b9b;
}

.vehicle-row:nth-child(even) {
    background: #eeeeee;
}

.vehicle-row:hover {
    background: #fff;
}

.vehicle-row.selected,
.vehicle-row.selected:nth-child(even),
.vehicle-row.selected:hover {
    background: #fff;
    box-shadow: inset 3px 0 0 var(--fleet-red);
}

.vehicle-row-icon {
    color: #0b57b7;
}

.vehicle-row-body strong {
    display: block;
    color: #111827;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.vehicle-row-body > span:nth-of-type(1) {
    display: block;
    text-align: center;
    font-weight: 600;
}

.vehicle-row-body small {
    color: #4b5563;
}

.vehicle-telemetry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 8px;
    padding-top: 5px;
}

.vehicle-telemetry-grid span {
    min-height: 20px;
    color: #374151;
    border-bottom: 1px dotted #b9b9b9;
    font-size: 11px;
}

.vehicle-telemetry-grid .mud-icon-root,
.vehicle-actions .mud-icon-root {
    color: var(--fleet-red);
}

.vehicle-actions {
    gap: 1px;
    padding-top: 2px;
}

.vehicle-actions .mud-icon-button {
    width: 24px;
    height: 24px;
}

.map-module-layout.map-panel-dock-right {
    grid-template-columns: minmax(0, 1fr) var(--module-panel-width);
}

.map-module-layout.map-panel-dock-right .module-panel {
    grid-column: 2;
    grid-row: 1;
    border-right: 0;
    border-left: 1px solid #b8b8b8;
}

.map-module-layout.map-panel-dock-right .workspace {
    grid-column: 1;
    grid-row: 1;
}

.map-module-layout.map-panel-collapsed {
    grid-template-columns: 0 minmax(0, 1fr);
}

.map-module-layout.map-panel-collapsed.map-panel-dock-right {
    grid-template-columns: minmax(0, 1fr) 0;
}

.map-module-layout.map-panel-collapsed .module-panel {
    overflow: hidden;
    visibility: hidden;
    border: 0;
}

.map-panel-header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.map-panel-header-actions .mud-icon-button {
    width: 24px;
    height: 24px;
}

.workspace {
    background: #fff;
}

.map-workspace {
    overflow: hidden;
    background: #dbe8d7;
}

.map-toolbar {
    top: 12px;
    left: 12px;
    z-index: 10000;
    overflow: hidden;
    border-radius: 3px;
    box-shadow: 0 1px 5px rgba(17, 24, 39, .24);
    pointer-events: auto;
}

.map-toolbar button {
    position: relative;
    z-index: 1;
    min-width: 76px;
    height: 40px;
    color: #374151;
    background: #fff;
    border-color: #d4d4d4;
    font-size: 14px;
}

.map-toolbar button.selected {
    color: #111827;
    font-weight: 600;
}

.map-float-actions {
    top: 64px;
    right: 12px;
    gap: 18px;
}

.map-float-actions .mud-icon-button {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 5px;
}

.map-panel-reopen {
    position: absolute;
    top: 64px;
    left: 12px;
    z-index: 10002;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 34px;
    padding: 0 10px;
    color: #111827;
    border: 1px solid #d4d4d4;
    border-radius: 4px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 1px 5px rgba(17, 24, 39, .22);
    font-size: 12px;
    font-weight: 600;
}

.map-panel-dock-right .map-panel-reopen {
    right: 64px;
    left: auto;
}

.vehicle-marker.geofence-marker {
    border: 2px solid var(--fleet-red);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 0 0 18px rgba(215, 25, 32, .14), 0 2px 8px rgba(17, 24, 39, .2);
}

.vehicle-marker.selected-location {
    border-color: var(--fleet-red);
    box-shadow: 0 0 0 4px rgba(215, 25, 32, .18), 0 2px 8px rgba(17, 24, 39, .24);
}

.location-geofence-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.location-geofence-shape {
    fill: rgba(215, 25, 32, .10);
    stroke: rgba(127, 29, 29, .72);
    stroke-width: .65;
    vector-effect: non-scaling-stroke;
}

.location-geofence-shape.polygon {
    fill: rgba(37, 99, 235, .12);
    stroke: rgba(30, 64, 175, .78);
    stroke-dasharray: 2 1.5;
}

.location-geofence-shape.selected {
    fill: rgba(215, 25, 32, .16);
    stroke: var(--fleet-red);
    stroke-width: 1.1;
    stroke-dasharray: none;
}

.location-polygon-field {
    grid-column: 1 / -1;
}

.location-polygon-field textarea {
    min-height: 88px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
}

.location-map-detail {
    position: absolute;
    right: 12px;
    bottom: 14px;
    z-index: 5;
    display: grid;
    gap: 8px;
    width: min(360px, calc(100% - 24px));
    padding: 10px 12px;
    border: 1px solid rgba(17, 24, 39, .16);
    border-radius: 4px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 3px 12px rgba(17, 24, 39, .18);
}

.location-map-detail strong {
    display: block;
    color: #111827;
    font-size: 13px;
}

.location-map-detail span {
    color: #64748b;
    font-size: 12px;
}

.location-map-detail dl {
    display: grid;
    gap: 5px;
    margin: 0;
}

.location-map-detail dl div {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 8px;
}

.location-map-detail dt,
.location-map-detail dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 12px;
}

.location-map-detail dt {
    color: #64748b;
}

.location-map-detail dd {
    color: #111827;
    font-weight: 600;
}

.location-nearby-vehicles {
    display: grid;
    gap: 5px;
    padding-top: 6px;
    border-top: 1px solid rgba(203, 213, 225, .86);
}

.location-nearby-vehicles > strong {
    color: #7f1d1d;
}

.nearby-vehicle-row {
    display: grid;
    grid-template-columns: minmax(70px, .7fr) minmax(0, 1.3fr);
    gap: 6px;
    align-items: center;
    min-height: 28px;
    padding: 4px 6px;
    border: 1px solid var(--fleet-border);
    border-radius: 4px;
    background: #fff;
    text-align: left;
}

.nearby-vehicle-row span {
    color: #111827;
    font-size: 12px;
    font-weight: 600;
}

.nearby-vehicle-row small {
    min-width: 0;
    overflow: hidden;
    color: #64748b;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.location-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.report-summary-strip.map-overlay-panel {
    position: absolute;
    top: 58px;
    left: 12px;
    right: 70px;
    z-index: 4;
    max-height: 78px;
    overflow: auto;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 1px 5px rgba(17, 24, 39, .16);
}

.report-summary-strip.map-overlay-panel.timeline-tabs-strip {
    top: 232px;
    z-index: 5;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    max-height: none;
    overflow: visible;
    background: rgba(255, 255, 255, .95);
}

.map-workspace > .report-summary-strip:not(.map-overlay-panel) {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 4;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 1px 6px rgba(17, 24, 39, .18);
}

html,
body {
    overflow: hidden;
}

.fleet-shell {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

.fleet-main,
.fleet-content {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.module-layout {
    height: calc(100vh - var(--toolbar-height));
    min-height: 0;
    overflow: hidden;
}

.module-panel,
.workspace {
    min-height: 0;
}

.module-panel {
    overflow: auto;
}

.map-sidebar-section {
    padding: 7px;
    border-bottom: 1px solid #c8c8c8;
    background: #f3f3f3;
}

.module-panel .map-toolbar.map-sidebar-controls {
    position: static;
    z-index: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    overflow: visible;
    border-radius: 0;
    box-shadow: none;
}

.module-panel .map-toolbar.map-sidebar-controls button {
    min-width: 0;
    width: 100%;
    height: 32px;
    padding: 0 4px;
    overflow: hidden;
    border: 1px solid #cfcfcf;
    border-radius: 3px;
    background: #fff;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.module-panel .map-toolbar.map-sidebar-controls button.selected {
    color: #fff;
    border-color: var(--fleet-red);
    background: var(--fleet-red);
}

.map-status-sidebar {
    display: grid;
    gap: 4px;
    max-height: 196px;
    overflow: auto;
    padding: 7px;
    border-bottom: 1px solid #c8c8c8;
    background: #f7f7f7;
    scrollbar-width: thin;
}

.map-status-sidebar span {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 6px;
    align-items: center;
    min-height: 24px;
    padding: 4px 6px;
    overflow: hidden;
    border: 1px solid #dddddd;
    border-radius: 3px;
    background: #fff;
    color: #111827;
    text-overflow: ellipsis;
}

.map-status-sidebar strong {
    color: #7f1d1d;
    font-size: 11px;
}

.google-map-canvas[data-map-mode="fallback"],
.map-surface {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .30) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, .30) 1px, transparent 1px),
        #deddd9;
    background-size: 90px 90px;
}

.vehicle-marker {
    border: 1px solid rgba(17, 24, 39, .20);
    border-radius: 3px;
}

.export-toolbar {
    min-height: 34px;
    padding: 3px 6px;
    background: #f8f8f8;
}

.export-toolbar .mud-icon-button,
.export-toolbar-button {
    border-radius: 3px;
}

.dense-grid {
    font-size: 12px;
}

.dense-grid th,
.dense-grid td {
    height: 26px;
    border-color: #d0d0d0;
}

.dense-grid th {
    color: #1f2937;
    background: #f1f1f1;
}

.dense-grid-group-row td {
    color: #6b7280;
    background: #eeeeee;
}

.filter-row td {
    background: #fbfbfb;
}

.grid-filter-placeholder {
    min-height: 22px;
    border-color: #d7d7d7;
    background: #fff;
}

.dense-grid tbody tr:nth-child(even) {
    background: #f5f5f5;
}

.dense-grid tbody tr:hover {
    background: #fff7f8;
}

.dense-grid tbody tr.selected-row {
    background: #ffe8ec;
}

.dense-grid-footer {
    background: #f3f3f3;
}

.dashboard-toolbar {
    min-height: 36px;
    background: #f8f8f8;
}

.dashboard-kpis,
.score-strip {
    gap: 8px;
    padding: 9px 10px;
    background: #f5f5f5;
}

.dashboard-kpis span,
.score-strip article,
.widget-tile {
    border-color: #d4d4d4;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(17, 24, 39, .05);
}

.widget-grid {
    gap: 8px;
    padding: 10px;
}

.widget-tile {
    min-height: 96px;
    padding: 10px;
}

.widget-tile.selected {
    border-color: var(--fleet-red);
    box-shadow: inset 0 0 0 1px var(--fleet-red);
}

.widget-tile strong,
.score-strip strong {
    color: var(--fleet-red);
}

.dialog-field input,
.dialog-field select {
    min-height: 28px;
    padding: 2px 6px;
    border-color: #c8c8c8;
}

.entity-dialog-preview {
    border-color: var(--fleet-red);
    border-radius: 4px;
}

.login-page {
    min-height: 100vh;
    place-items: center;
    padding: 28px;
    background: #fff;
}

.login-panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(320px, 490px);
    align-items: center;
    gap: 28px;
    width: min(1080px, 100%);
    min-height: 620px;
    padding: 0 24px 36px;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.login-visual {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 22px;
}

.login-speech-mark {
    position: relative;
    display: grid;
    place-items: center;
    width: min(290px, 74vw);
    aspect-ratio: 2.1;
    color: #fff;
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .16), transparent 28%),
        linear-gradient(45deg, #d10019, #9c1545 58%, #e1001d);
    overflow: visible;
}

.login-speech-mark::after {
    position: absolute;
    left: 22%;
    bottom: -34px;
    width: 82px;
    height: 54px;
    content: "";
    background: #d10019;
    clip-path: polygon(22% 0, 100% 0, 0 100%);
}

.login-speech-mark span {
    position: relative;
    z-index: 1;
    font-size: 48px;
    font-weight: 600;
    letter-spacing: 0;
}

.login-visual p {
    margin: 0;
    color: #555;
    font-size: 44px;
    font-weight: 300;
}

.login-card {
    display: grid;
    gap: 18px;
    width: min(490px, 100%);
}

.login-brand {
    display: block;
    margin: 0 0 4px;
}

.login-brand h1 {
    margin: 0;
    color: #3f4752;
    font-size: 20px;
    font-weight: 600;
}

.login-form {
    gap: 12px;
}

.login-form .dialog-field {
    gap: 7px;
}

.login-form .dialog-field span {
    color: #111;
    font-size: 14px;
}

.login-form .dialog-field input {
    min-height: 38px;
    border-radius: 2px;
    background: #fff;
}

.login-button {
    justify-self: center;
    width: 150px;
    min-height: 38px;
    border-color: var(--fleet-red);
    border-radius: 5px;
    background: var(--fleet-red);
    font-weight: 600;
}

.login-button:hover {
    background: var(--fleet-red-dark);
}

.login-hint {
    margin: 0;
    color: #6b7280;
    text-align: center;
}

.login-panel footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4px;
    color: #555;
    text-align: center;
    font-size: 12px;
}

@media (max-width: 900px) {
    .top-toolbar {
        grid-template-columns: minmax(80px, 1fr) minmax(120px, 1.2fr) auto;
        gap: 6px;
    }

    .toolbar-title span {
        font-size: 17px;
    }

    .toolbar-actions .toolbar-user {
        display: none;
    }

    .module-layout {
        grid-template-columns: minmax(238px, 44vw) minmax(0, 1fr);
    }

    .map-module-layout.map-panel-dock-right {
        grid-template-columns: minmax(0, 1fr) minmax(238px, 44vw);
    }

    .report-summary-strip.map-overlay-panel {
        right: 12px;
        max-height: 70px;
    }

    .login-panel {
        grid-template-columns: 1fr;
        min-height: 0;
        gap: 32px;
        padding: 28px 0 42px;
    }

    .login-visual p {
        font-size: 34px;
    }
}

@media (max-width: 640px) {
    .fleet-main,
    .fleet-shell.rail-pinned .fleet-main {
        grid-template-columns: var(--rail-width) minmax(0, 1fr);
    }

    .left-rail:hover,
    .left-rail:focus-within,
    .fleet-shell.rail-pinned .left-rail {
        width: var(--rail-width);
    }

    .rail-link span {
        display: none;
    }

    .toolbar-search {
        display: none;
    }

    .top-toolbar {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .toolbar-actions .mud-icon-button:nth-of-type(n + 3),
    .toolbar-logout {
        display: none;
    }

    .module-layout {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 42vh) minmax(360px, 1fr);
        min-height: calc(100vh - var(--toolbar-height));
    }

    .map-module-layout.map-panel-dock-right {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(360px, 1fr) minmax(0, 42vh);
    }

    .map-module-layout.map-panel-dock-right .workspace {
        grid-column: 1;
        grid-row: 1;
    }

    .map-module-layout.map-panel-dock-right .module-panel {
        grid-column: 1;
        grid-row: 2;
        border-left: 0;
        border-top: 1px solid var(--fleet-border);
    }

    .map-module-layout.map-panel-collapsed,
    .map-module-layout.map-panel-collapsed.map-panel-dock-right {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(420px, 1fr);
    }

    .module-panel {
        height: 42vh;
        max-height: none;
        min-height: 0;
        overflow: auto;
        border-right: 0;
        border-bottom: 1px solid var(--fleet-border);
    }

    .map-module-layout.map-panel-collapsed .module-panel {
        height: 0;
        min-height: 0;
        border: 0;
    }

    .workspace {
        min-height: 58vh;
    }

    .map-toolbar {
        top: 8px;
        left: 8px;
    }

    .report-summary-strip.map-overlay-panel {
        display: none;
    }

    .map-workspace > .report-summary-strip:not(.map-overlay-panel) {
        left: 8px;
        right: 8px;
        bottom: 8px;
        max-height: 168px;
        overflow: auto;
    }

    .login-visual p {
        font-size: 28px;
    }
}

/* Operational layout pass inspired by the existing production fleet UI. */
:root {
    --fleet-line-strong: #c8c8c8;
    --fleet-panel-bg: #f4f4f4;
    --fleet-panel-header-bg: #f9f9f9;
    --fleet-row-alt: #f1f1f1;
    --fleet-row-hover: #fff7f8;
}

.top-toolbar {
    grid-template-columns: minmax(210px, 360px) minmax(240px, 1fr) auto;
}

.global-search {
    width: min(360px, 100%);
}

.toolbar-title span {
    font-weight: 600;
}

.left-rail {
    padding-top: 0;
}

.rail-link {
    height: 30px;
    border-left: 3px solid transparent;
}

.rail-link.active,
.rail-link:hover {
    border-left-color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.module-panel {
    background: var(--fleet-panel-bg);
    border-right-color: var(--fleet-line-strong);
    scrollbar-width: thin;
}

.panel-header {
    position: sticky;
    top: 0;
    z-index: 12;
    min-height: 32px;
    padding: 5px 8px;
    background: var(--fleet-panel-header-bg);
    border-bottom-color: var(--fleet-line-strong);
}

.panel-header h2 {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
}

.map-module-layout .panel-header {
    color: #fff;
    background: var(--fleet-red);
    border-bottom-color: var(--fleet-red-dark);
}

.map-module-layout .panel-header .mud-icon-root,
.map-module-layout .panel-header-actions .mud-icon-button,
.map-module-layout .map-panel-header-actions .mud-icon-button {
    color: #fff;
}

.panel-section-title {
    display: flex;
    align-items: center;
    min-height: 29px;
    margin: 0;
    padding: 6px 8px;
    color: var(--fleet-red);
    background: #dedede;
    border-top-color: var(--fleet-line-strong);
    border-bottom-color: var(--fleet-line-strong);
    font-size: 13px;
    font-weight: 600;
}

.filter-bar {
    gap: 6px;
    padding: 7px;
    background: #f2f2f2;
    border-bottom-color: var(--fleet-line-strong);
}

.filter-chip,
.panel-command,
.segmented-panel button,
.panel-list-item {
    border-color: var(--fleet-line-strong);
    border-radius: 3px;
    box-shadow: none;
}

.filter-chip {
    display: grid;
    place-items: center;
    min-height: 29px;
    padding: 4px 8px;
    background: #fff;
}

.panel-command {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 30px;
    font-weight: 600;
}

.panel-command.compact {
    min-height: 25px;
}

.segmented-panel {
    gap: 5px;
    padding: 6px 7px 4px;
}

.segmented-panel button {
    min-width: 0;
    padding: 0 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.panel-list {
    gap: 4px;
    padding: 7px;
}

.panel-list.compact {
    gap: 3px;
}

.panel-list-item {
    min-height: 36px;
    padding: 6px 8px;
    background: #fff;
}

.panel-list-item:hover {
    border-color: #b8b8b8;
    background: #fff;
}

.panel-list-item small {
    line-height: 1.2;
}

.vehicle-status-strip {
    border-bottom-color: var(--fleet-line-strong);
}

.vehicle-row {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 8px 8px 7px;
}

.vehicle-row-body strong {
    line-height: 1.15;
}

.vehicle-telemetry-grid span {
    min-height: 19px;
}

.export-toolbar {
    position: sticky;
    top: 0;
    z-index: 15;
    min-height: 38px;
    padding: 4px 7px;
    background: #fff;
    border-bottom-color: var(--fleet-line-strong);
}

.dashboard-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 38px;
    background: #fff;
}

.dashboard-toolbar > .export-toolbar {
    position: static;
    min-width: 0;
    border-bottom: 0;
}

.date-range-picker {
    border-right: 1px solid var(--fleet-line-strong);
    background: #fbfbfb;
}

.dashboard-refresh-controls .dialog-field:has(input[type="checkbox"]) {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.dashboard-refresh-controls .dialog-field input[type="checkbox"] {
    justify-self: end;
    width: 16px;
    height: 16px;
    min-height: 16px;
    accent-color: var(--fleet-red);
}

.dashboard-kpis,
.score-strip {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0;
    padding: 0;
    background: #fff;
    border-bottom-color: var(--fleet-line-strong);
}

.dashboard-kpis span,
.score-strip article {
    min-height: 34px;
    border-width: 0 1px 1px 0;
    border-color: #dddddd;
    border-radius: 0;
    box-shadow: none;
}

.score-strip article {
    padding: 6px 8px;
}

.score-strip strong {
    font-size: 18px;
    line-height: 1.1;
}

.report-summary-strip {
    gap: 5px;
    padding: 6px 7px;
    background: #fbfbfb;
    border-bottom-color: var(--fleet-line-strong);
}

.report-summary-strip span,
.report-summary-strip button.grid-link {
    min-height: 25px;
    border-radius: 3px;
}

.dense-grid {
    font-size: 12px;
}

.dense-grid th,
.dense-grid td {
    height: 26px;
    padding: 2px 7px;
    border-color: #d2d2d2;
}

.dense-grid th {
    background: #f7f7f7;
}

.dense-grid tbody tr:nth-child(even) {
    background: var(--fleet-row-alt);
}

.dense-grid tbody tr:hover,
.dense-grid tbody tr:hover .grid-row-actions {
    background: var(--fleet-row-hover);
}

.dense-grid-footer {
    border-bottom: 0;
    border-top: 1px solid var(--fleet-line-strong);
    background: #fbfbfb;
}

.widget-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
    padding: 8px;
}

.widget-tile {
    min-height: 92px;
    border-radius: 4px;
}

.settings-panel-search {
    padding: 7px;
    border-bottom: 1px solid var(--fleet-line-strong);
    background: #f6f6f6;
}

.settings-panel-search .mud-input-control {
    width: 100%;
    margin: 0;
}

.settings-nav {
    display: grid;
    gap: 0;
    padding: 3px 0 8px;
    background: #fff;
}

.settings-nav-group {
    margin: 0;
}

.settings-nav-heading {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 29px;
    margin: 0;
    padding: 5px 10px 4px;
    color: #111827;
    background: #fff;
    border-top: 1px solid #e5e5e5;
    font-size: 13px;
    font-weight: 600;
}

.settings-nav-heading::before {
    content: "\25BE";
    color: #111827;
    font-size: 10px;
}

.settings-nav-group:first-child .settings-nav-heading {
    border-top: 0;
}

.settings-nav-heading .mud-icon-root {
    color: var(--fleet-red);
    font-size: 18px;
}

.settings-nav-items {
    display: grid;
    padding: 1px 0 7px;
    background:
        linear-gradient(#e5e5e5, #e5e5e5) 34px 0 / 1px 100% no-repeat,
        #fff;
}

.settings-nav-items .panel-list-item {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    justify-items: stretch;
    min-height: 24px;
    padding: 3px 8px 3px 46px;
    color: #111827;
    border: 0;
    border-radius: 0;
    background: transparent;
    text-align: left;
    box-shadow: none;
}

.settings-nav-items .panel-list-item::before {
    content: "";
    position: absolute;
    left: 34px;
    width: 8px;
    height: 1px;
    background: #d8d8d8;
}

.settings-nav-items .panel-list-item span {
    justify-self: start;
    min-width: 0;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-nav-items .panel-list-item small {
    display: none;
}

.settings-nav-items .panel-list-item.alias {
    min-height: 22px;
    color: #222;
    font-size: 12px;
}

.settings-nav-items .panel-list-item:hover {
    color: #7f1018;
    background: #fff;
}

.settings-nav-items .panel-list-item.selected,
.settings-nav-items .panel-list-item.selected:hover {
    color: var(--fleet-red);
    background: #fff;
    box-shadow: inset 3px 0 0 var(--fleet-red);
    font-weight: 600;
}

.settings-nav + .panel-command {
    position: sticky;
    bottom: 7px;
    z-index: 6;
    width: calc(100% - 14px);
    margin: 4px 7px 7px;
    box-shadow: 0 2px 8px rgba(17, 24, 39, .12);
}

@media (max-width: 900px) {
    .top-toolbar {
        grid-template-columns: minmax(0, 1fr) minmax(160px, .9fr) auto;
    }

    .dashboard-toolbar {
        grid-template-columns: 1fr;
    }

    .date-range-picker {
        border-right: 0;
        border-bottom: 1px solid var(--fleet-line-strong);
    }

    .automatic-reports-toolbar {
        flex-wrap: wrap;
        padding-left: 7px;
    }

    .automatic-type-filter {
        flex: 1 1 210px;
    }

    .automatic-type-trigger {
        border-left: 1px solid var(--fleet-border);
    }

    .automatic-type-menu {
        left: 0;
    }
}

@media (max-width: 640px) {
    .export-toolbar {
        position: static;
        flex-wrap: wrap;
        overflow-x: visible;
    }

    .export-toolbar .mud-input-control,
    .export-toolbar-search {
        flex: 1 1 100%;
        width: 100%;
    }

    .settings-nav-items .panel-list-item {
        padding-left: 24px;
    }

    .automatic-reports-toolbar {
        position: static;
        display: grid;
        grid-template-columns: 1fr;
    }

    .automatic-type-menu {
        position: static;
        margin-top: 4px;
        box-shadow: none;
    }

    .automatic-create-button {
        width: 100%;
    }

    .dense-grid-scroll {
        overflow-x: auto;
    }

    .dense-grid {
        min-width: 720px;
        table-layout: auto;
    }

    .dense-grid th,
    .dense-grid td {
        min-width: 96px;
    }

    .dense-grid .select-column,
    .dense-grid .select-cell {
        width: 42px;
        min-width: 42px;
    }

    .dense-grid tr > th:first-child,
    .dense-grid tr > td:first-child {
        width: 42px;
        min-width: 42px;
        max-width: 42px;
    }

    .grid-actions-column,
    .grid-row-actions {
        position: static;
        width: auto;
        min-width: 118px;
    }

    .module-layout:has(.settings-nav) {
        grid-template-rows: minmax(0, 45vh) minmax(0, 1fr);
    }

    .module-layout:has(.settings-nav) .module-panel {
        display: flex;
        flex-direction: column;
        height: 45vh;
        overflow: hidden;
    }

    .module-layout:has(.settings-nav) .settings-nav {
        min-height: 0;
        overflow: auto;
    }

    .module-layout:has(.settings-nav) .settings-nav + .panel-command {
        position: static;
        flex: 0 0 auto;
        width: auto;
        margin: 6px 7px 7px;
        box-shadow: none;
    }

    .module-layout:has(.settings-nav) .workspace {
        min-height: 55vh;
        overflow: hidden;
    }
}

/* ColorAdmin shell port for Zetra Fleet. Loaded last on purpose. */
:root {
    --bs-primary: #348fe2;
    --bs-primary-rgb: 52, 143, 226;
    --bs-info: #49b6d6;
    --bs-info-rgb: 73, 182, 214;
    --bs-success: #00acac;
    --bs-success-rgb: 0, 172, 172;
    --bs-warning: #f59c1a;
    --bs-warning-rgb: 245, 156, 26;
    --bs-danger: #ff5b57;
    --bs-danger-rgb: 255, 91, 87;
    --fleet-red: var(--bs-primary);
    --fleet-red-dark: #1f6fb8;
    --fleet-red-soft: rgba(var(--bs-primary-rgb), .10);
    --fleet-blue: #348fe2;
    --fleet-green: #00acac;
    --fleet-orange: #f59c1a;
    --fleet-danger: #ff5b57;
    --fleet-border: #dce4ec;
    --fleet-border-soft: #edf2f7;
    --fleet-surface: #ffffff;
    --fleet-muted: #f6f8fb;
    --fleet-panel: #eef3f7;
    --fleet-text: #20252a;
    --fleet-soft-text: #667085;
    --fleet-line-strong: #d5e0ea;
    --fleet-panel-bg: #f6f8fb;
    --fleet-panel-header-bg: #ffffff;
    --fleet-row-alt: #f8fbfd;
    --fleet-row-hover: rgba(var(--bs-primary-rgb), .10);
    --toolbar-height: 52px;
    --rail-width: 68px;
    --rail-expanded-width: 220px;
    --module-panel-width: 302px;
    --fleet-app-bg: #eef3f7;
    --fleet-header-bg: rgba(255, 255, 255, .95);
    --fleet-header-surface: #f6f9fc;
    --fleet-header-surface-hover: #eef5fc;
    --fleet-header-border: #dce5ee;
    --fleet-header-text: #243447;
    --fleet-header-muted: #627082;
    --fleet-header-shadow: 0 10px 30px rgba(27, 39, 51, .08);
    --fleet-sidebar-bg: #ffffff;
    --fleet-sidebar-bg-soft: #f6f8fb;
    --fleet-sidebar-border: #dce3ea;
    --fleet-sidebar-text: #334155;
    --fleet-sidebar-muted: #778393;
    --fleet-sidebar-hover-bg: #f1f6fb;
    --fleet-sidebar-active-bg: rgba(var(--bs-primary-rgb), .12);
    --fleet-sidebar-active-border: rgba(var(--bs-primary-rgb), .22);
    --fleet-sidebar-active-text: #1f6fb8;
    --fleet-sidebar-shadow: 12px 0 34px rgba(27, 39, 51, .08);
    --fleet-radius: 8px;
    --fleet-radius-sm: 6px;
    --fleet-control-h: 38px;
}

html.dark-mode,
[data-bs-theme="dark"] {
    color-scheme: dark;
    --fleet-border: rgba(255, 255, 255, .10);
    --fleet-border-soft: rgba(255, 255, 255, .07);
    --fleet-surface: #1e2835;
    --fleet-muted: #243040;
    --fleet-panel: #141a22;
    --fleet-text: #e8edf3;
    --fleet-soft-text: #a4afbd;
    --fleet-line-strong: rgba(255, 255, 255, .12);
    --fleet-panel-bg: #1b2531;
    --fleet-panel-header-bg: #202b39;
    --fleet-row-alt: rgba(255, 255, 255, .025);
    --fleet-row-hover: rgba(var(--bs-primary-rgb), .14);
    --fleet-app-bg: #141a22;
    --fleet-header-bg: rgba(32, 37, 42, .96);
    --fleet-header-surface: rgba(255, 255, 255, .055);
    --fleet-header-surface-hover: rgba(255, 255, 255, .09);
    --fleet-header-border: rgba(255, 255, 255, .09);
    --fleet-header-text: #edf3f8;
    --fleet-header-muted: #a5b0ba;
    --fleet-header-shadow: 0 12px 34px rgba(0, 0, 0, .24);
    --fleet-sidebar-bg: #20252a;
    --fleet-sidebar-bg-soft: #262d34;
    --fleet-sidebar-border: rgba(255, 255, 255, .08);
    --fleet-sidebar-text: #dce4ec;
    --fleet-sidebar-muted: #9da8b4;
    --fleet-sidebar-hover-bg: rgba(255, 255, 255, .055);
    --fleet-sidebar-active-bg: rgba(var(--bs-primary-rgb), .18);
    --fleet-sidebar-active-border: rgba(var(--bs-primary-rgb), .32);
    --fleet-sidebar-active-text: #8fc5f7;
    --fleet-sidebar-shadow: 12px 0 36px rgba(0, 0, 0, .24);
}

html,
body {
    color: var(--fleet-text);
    background: var(--fleet-app-bg);
    font-family: "Open Sans", "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 13px;
}

body.dark-mode {
    color: var(--fleet-text);
    background: var(--fleet-app-bg);
}

button,
input,
select,
textarea {
    color: inherit;
}

.fleet-shell {
    grid-template-rows: var(--toolbar-height) minmax(0, 1fr);
    background: var(--fleet-app-bg);
}

.top-toolbar {
    position: relative;
    z-index: 1045;
    grid-template-columns: minmax(360px, auto) minmax(240px, 1fr) auto;
    gap: 10px;
    height: var(--toolbar-height);
    padding: 0 12px 0 4px;
    color: var(--fleet-header-text);
    background: var(--fleet-header-bg);
    border-bottom: 1px solid var(--fleet-header-border);
    box-shadow: var(--fleet-header-shadow);
    backdrop-filter: saturate(150%) blur(12px);
}

.toolbar-title {
    min-width: 0;
    height: 100%;
    gap: 8px;
}

.toolbar-menu-button {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    margin: 0;
    color: var(--fleet-header-text);
    border: 1px solid var(--fleet-header-border);
    border-radius: 10px;
    background: var(--fleet-header-surface);
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.toolbar-menu-button:hover,
.toolbar-menu-button:focus-visible {
    color: var(--bs-primary);
    border-color: rgba(var(--bs-primary-rgb), .30);
    background: var(--fleet-header-surface-hover);
    outline: none;
}

.toolbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    max-width: 178px;
    padding: 0 12px;
    color: var(--fleet-header-text);
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(var(--bs-success-rgb), .12), rgba(var(--bs-primary-rgb), .10));
    transition: background .16s ease, border-color .16s ease;
}

.toolbar-brand:hover,
.toolbar-brand:focus-visible {
    color: var(--fleet-header-text);
    border-color: rgba(var(--bs-primary-rgb), .22);
    background: var(--fleet-header-surface-hover);
    outline: none;
}

.toolbar-logo {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border-radius: 5px;
    background: linear-gradient(135deg, #00acac 0%, #348fe2 100%);
    box-shadow: 0 8px 18px rgba(0, 172, 172, .20);
}

.toolbar-brand-text {
    min-width: 0;
    overflow: hidden;
    color: inherit;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 500;
}

.toolbar-brand-text b {
    font-weight: 600;
}

.toolbar-brand-text span {
    margin-left: 2px;
    font-weight: 500;
}

.toolbar-module-title {
    min-width: 0;
    max-width: 170px;
    overflow: hidden;
    padding-left: 10px;
    color: var(--fleet-header-muted);
    border-left: 1px solid var(--fleet-header-border);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.toolbar-search {
    justify-content: flex-start;
    gap: 7px;
    min-width: 0;
}

.global-search {
    grid-template-columns: minmax(0, 1fr) 36px;
    width: min(430px, 100%);
    height: 38px;
    border: 1px solid var(--fleet-header-border);
    border-radius: 10px;
    background: var(--fleet-header-surface);
    box-shadow: none;
}

.global-search input {
    height: 36px;
    padding: 0 12px;
    color: var(--fleet-header-text);
    font-size: 13px;
}

.global-search input::placeholder {
    color: var(--fleet-header-muted);
}

.global-search .mud-icon-root {
    color: var(--fleet-header-muted);
}

.toolbar-icon,
.toolbar-actions .mud-icon-button {
    width: 38px;
    min-width: 38px;
    height: 38px;
    color: var(--fleet-header-muted) !important;
    border: 1px solid var(--fleet-header-border);
    border-radius: 10px;
    background: var(--fleet-header-surface) !important;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.toolbar-icon:hover,
.toolbar-icon:focus-visible,
.toolbar-actions .mud-icon-button:hover,
.toolbar-actions .mud-icon-button:focus-visible {
    color: var(--bs-primary) !important;
    border-color: rgba(var(--bs-primary-rgb), .30);
    background: var(--fleet-header-surface-hover) !important;
    transform: translateY(-1px);
}

.toolbar-theme-button {
    color: var(--fleet-header-text) !important;
}

.toolbar-actions {
    gap: 6px;
    min-width: 0;
}

.toolbar-user {
    max-width: 148px;
    overflow: hidden;
    color: var(--fleet-header-text);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
}

.toolbar-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 12px;
    color: var(--fleet-header-text);
    border: 1px solid var(--fleet-header-border);
    border-radius: 10px;
    background: var(--fleet-header-surface);
    font-weight: 600;
}

.toolbar-logout:hover {
    color: var(--bs-primary);
    border-color: rgba(var(--bs-primary-rgb), .30);
    background: var(--fleet-header-surface-hover);
}

.user-badge {
    width: 38px;
    height: 38px;
    color: #fff;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff5b57 0%, #f59c1a 100%);
    box-shadow: 0 10px 22px rgba(255, 91, 87, .22);
    font-weight: 600;
}

.fleet-main,
.fleet-shell.rail-pinned .fleet-main {
    grid-template-columns: var(--rail-expanded-width) minmax(0, 1fr);
}

.fleet-shell:not(.rail-pinned) .fleet-main {
    grid-template-columns: var(--rail-width) minmax(0, 1fr);
}

.left-rail {
    position: relative;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: var(--rail-expanded-width);
    min-width: var(--rail-expanded-width);
    padding: 10px 8px 12px;
    overflow-x: hidden;
    overflow-y: auto;
    color: var(--fleet-sidebar-text);
    background: var(--fleet-sidebar-bg);
    border-right: 1px solid var(--fleet-sidebar-border);
    box-shadow: var(--fleet-sidebar-shadow);
    scrollbar-width: thin;
    transition: width .16s ease, min-width .16s ease, padding .16s ease;
}

.left-rail:hover,
.left-rail:focus-within,
.fleet-shell.rail-pinned .left-rail {
    width: var(--rail-expanded-width);
}

.fleet-shell:not(.rail-pinned) .left-rail {
    width: var(--rail-width);
    min-width: var(--rail-width);
    padding: 8px 6px 12px;
}

.rail-profile {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 76px;
    margin: 8px 0 13px;
    padding: 12px;
    overflow: hidden;
    border: 1px solid var(--fleet-sidebar-border);
    border-radius: 8px;
    background: linear-gradient(180deg, var(--fleet-sidebar-bg) 0%, var(--fleet-sidebar-bg-soft) 100%);
}

.rail-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #fff;
    border-radius: 8px;
    background: linear-gradient(135deg, #ff5b57 0%, #dc3545 100%);
    box-shadow: 0 10px 22px rgba(255, 91, 87, .24);
    font-size: 13px;
    font-weight: 600;
}

.rail-profile-info {
    display: grid;
    min-width: 0;
}

.rail-profile-info strong,
.rail-profile-info small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rail-profile-info strong {
    color: var(--fleet-sidebar-text);
    font-size: 13px;
    font-weight: 600;
}

.rail-profile-info small {
    color: var(--fleet-sidebar-muted);
    font-size: 11px;
    line-height: 1.35;
}

.rail-menu-header {
    margin: 14px 10px 7px;
    color: var(--fleet-sidebar-muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
}

.rail-menu {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.rail-link {
    position: relative;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) 16px;
    place-items: center start;
    gap: 8px;
    width: 100%;
    min-height: 38px;
    height: 38px;
    padding: 0 10px;
    color: var(--fleet-sidebar-text);
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.rail-link .mud-icon-root:first-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    min-width: 26px;
    height: 26px;
    color: var(--fleet-sidebar-muted);
    border-radius: 6px;
    font-size: 16px;
}

.rail-link span {
    min-width: 0;
    overflow: hidden;
    opacity: 1;
    color: inherit;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.rail-link-caret {
    color: var(--fleet-sidebar-muted);
    font-size: 16px !important;
    opacity: .72;
}

.rail-link:hover,
.rail-link:focus-visible {
    color: var(--fleet-sidebar-active-text);
    border-color: transparent;
    background: var(--fleet-sidebar-hover-bg);
    outline: none;
}

.rail-link.active {
    color: var(--fleet-sidebar-active-text);
    border-color: var(--fleet-sidebar-active-border);
    background: var(--fleet-sidebar-active-bg);
    box-shadow: inset 3px 0 0 var(--bs-primary);
}

.rail-link:hover .mud-icon-root:first-child,
.rail-link:focus-visible .mud-icon-root:first-child,
.rail-link.active .mud-icon-root:first-child {
    color: var(--fleet-sidebar-active-text);
    background: rgba(var(--bs-primary-rgb), .12);
}

.fleet-shell:not(.rail-pinned) .rail-profile {
    display: flex;
    justify-content: center;
    min-height: 52px;
    margin: 4px 0 10px;
    padding: 6px;
    border-color: transparent;
    background: transparent;
}

.fleet-shell:not(.rail-pinned) .rail-profile-info,
.fleet-shell:not(.rail-pinned) .rail-menu-header,
.fleet-shell:not(.rail-pinned) .rail-link span,
.fleet-shell:not(.rail-pinned) .rail-link-caret {
    display: none;
}

.fleet-shell:not(.rail-pinned) .rail-link {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
}

.module-layout,
.map-module-layout {
    grid-template-columns: var(--module-panel-width) minmax(0, 1fr);
    background: var(--fleet-app-bg);
}

.module-panel {
    color: var(--fleet-sidebar-text);
    background: var(--fleet-panel-bg);
    border-right: 1px solid var(--fleet-line-strong);
    scrollbar-width: thin;
}

.panel-header {
    min-height: 42px;
    padding: 8px 10px;
    color: var(--fleet-text);
    background: var(--fleet-panel-header-bg);
    border-bottom: 1px solid var(--fleet-line-strong);
    box-shadow: 0 1px 0 rgba(32, 37, 42, .03);
}

.panel-header h2 {
    color: var(--fleet-text);
    font-size: 15px;
    font-weight: 600;
}

.panel-section-title {
    min-height: 34px;
    padding: 8px 10px;
    color: var(--fleet-sidebar-active-text);
    background: var(--fleet-sidebar-bg-soft);
    border-color: var(--fleet-line-strong);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.filter-bar,
.settings-panel-search,
.date-field-grid,
.vehicle-check-list {
    background: var(--fleet-sidebar-bg-soft);
    border-color: var(--fleet-line-strong);
}

.filter-chip,
.panel-command,
.segmented-panel button,
.panel-list-item,
.date-field-grid input,
.date-field-grid select,
.dialog-field input,
.dialog-field select,
.dialog-field textarea,
.grid-filter-placeholder {
    color: var(--fleet-text);
    border-color: var(--fleet-border);
    border-radius: var(--fleet-radius-sm);
    background: var(--fleet-surface);
    box-shadow: none;
}

.filter-chip {
    min-height: 34px;
}

.panel-command {
    min-height: 34px;
    color: var(--bs-success);
    border-color: rgba(var(--bs-success-rgb), .34);
    font-weight: 600;
}

.panel-command:hover {
    color: var(--bs-success);
    background: rgba(var(--bs-success-rgb), .08);
}

.panel-command.primary,
.panel-command.selected,
.segmented-panel button.selected,
.panel-list-item.selected {
    color: #fff;
    border-color: var(--bs-primary);
    background: var(--bs-primary);
}

.panel-command.danger {
    border-color: var(--bs-danger);
    background: var(--bs-danger);
}

.panel-list {
    gap: 5px;
}

.panel-list-item {
    min-height: 38px;
    padding: 7px 9px;
}

.panel-list-item:hover {
    color: var(--fleet-sidebar-active-text);
    border-color: rgba(var(--bs-primary-rgb), .28);
    background: var(--fleet-sidebar-hover-bg);
}

.panel-list-item small,
.vehicle-row-body small,
.vehicle-telemetry-grid span,
.dialog-field span,
.confirm-action-dialog p {
    color: var(--fleet-soft-text);
}

.workspace {
    color: var(--fleet-text);
    background: var(--fleet-app-bg);
}

.workspace:not(.map-workspace) {
    padding: 0;
}

.map-workspace,
.map-surface,
.google-map-canvas[data-map-mode="fallback"] {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .32) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, .32) 1px, transparent 1px),
        #dde7ee;
    background-size: 88px 88px;
}

html.dark-mode .map-workspace,
html.dark-mode .map-surface,
html.dark-mode .google-map-canvas[data-map-mode="fallback"],
[data-bs-theme="dark"] .map-workspace,
[data-bs-theme="dark"] .map-surface,
[data-bs-theme="dark"] .google-map-canvas[data-map-mode="fallback"] {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, .055) 1px, transparent 1px),
        #162131;
    background-size: 88px 88px;
}

.export-toolbar,
.dashboard-toolbar,
.report-summary-strip,
.dense-grid-footer {
    color: var(--fleet-text);
    background: var(--fleet-surface);
    border-color: var(--fleet-line-strong);
}

.date-range-picker {
    background: var(--fleet-sidebar-bg-soft);
    border-color: var(--fleet-line-strong);
}

.dashboard-kpis,
.score-strip,
.widget-grid {
    background: var(--fleet-app-bg);
}

.dashboard-kpis span,
.score-strip article,
.widget-tile,
.entity-dialog-preview,
.view-settings-panel,
.help-drawer,
.quick-action-menu,
.legacy-report-popup,
.map-fallback-label,
.vehicle-marker,
.fleet-map-marker-label,
.fleet-advanced-marker span {
    color: var(--fleet-text);
    border-color: var(--fleet-border);
    border-radius: var(--fleet-radius);
    background: var(--fleet-surface);
    box-shadow: 0 3px 10px rgba(32, 37, 42, .06);
}

html.dark-mode .dashboard-kpis span,
html.dark-mode .score-strip article,
html.dark-mode .widget-tile,
html.dark-mode .entity-dialog-preview,
html.dark-mode .view-settings-panel,
html.dark-mode .help-drawer,
html.dark-mode .quick-action-menu,
html.dark-mode .legacy-report-popup,
html.dark-mode .map-fallback-label,
html.dark-mode .vehicle-marker,
html.dark-mode .fleet-map-marker-label,
html.dark-mode .fleet-advanced-marker span,
[data-bs-theme="dark"] .dashboard-kpis span,
[data-bs-theme="dark"] .score-strip article,
[data-bs-theme="dark"] .widget-tile,
[data-bs-theme="dark"] .entity-dialog-preview,
[data-bs-theme="dark"] .view-settings-panel,
[data-bs-theme="dark"] .help-drawer,
[data-bs-theme="dark"] .quick-action-menu,
[data-bs-theme="dark"] .legacy-report-popup,
[data-bs-theme="dark"] .map-fallback-label,
[data-bs-theme="dark"] .vehicle-marker,
[data-bs-theme="dark"] .fleet-map-marker-label,
[data-bs-theme="dark"] .fleet-advanced-marker span {
    box-shadow: 0 10px 28px rgba(0, 0, 0, .26);
}

.widget-tile.selected {
    border-color: var(--bs-primary);
    box-shadow: inset 0 0 0 1px var(--bs-primary);
}

.widget-tile strong,
.score-strip strong,
.dashboard-kpis strong {
    color: var(--bs-primary);
}

.vehicle-status-strip {
    background: var(--fleet-surface);
    border-color: var(--fleet-line-strong);
}

.vehicle-row {
    grid-template-columns: 36px minmax(0, 1fr);
    color: var(--fleet-text);
    background: var(--fleet-surface);
    border-color: var(--fleet-line-strong);
}

.vehicle-row:nth-child(even) {
    background: var(--fleet-row-alt);
}

.vehicle-row:hover {
    background: var(--fleet-row-hover);
}

.vehicle-row.selected {
    background: var(--fleet-surface);
    box-shadow: inset 3px 0 0 var(--bs-primary);
}

.vehicle-row-icon,
.vehicle-telemetry-grid .mud-icon-root,
.status-total,
.link-button,
.dense-grid-columns-button {
    color: var(--bs-primary) !important;
}

.status-driving,
.status-badge.status-driving {
    color: var(--bs-success);
}

.status-stopped,
.status-badge.status-stopped {
    color: var(--bs-warning);
}

.status-unavailable,
.status-badge.status-unavailable {
    color: var(--bs-danger);
}

.dense-grid-wrap {
    background: var(--fleet-surface);
    border-color: var(--fleet-border);
    border-radius: var(--fleet-radius);
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(32, 37, 42, .05);
}

.dense-grid {
    color: var(--fleet-text);
    background: var(--fleet-surface);
    font-size: 12px;
}

.dense-grid th,
.dense-grid td {
    height: 34px;
    padding: 4px 9px;
    color: var(--fleet-text);
    border-color: var(--fleet-border);
}

.dense-grid th {
    color: var(--fleet-text);
    background: var(--fleet-sidebar-bg-soft);
    font-weight: 600;
}

.dense-grid-group-row td,
.dense-grid-group-bar,
.dense-grid-active-filter-row td,
.dense-grid-column-chooser td,
.filter-row td {
    color: var(--fleet-soft-text);
    background: var(--fleet-muted);
}

.dense-grid tbody tr {
    background: var(--fleet-surface);
}

.dense-grid tbody tr:nth-child(even) {
    background: var(--fleet-row-alt);
}

.dense-grid tbody tr:hover,
.dense-grid tbody tr:hover .grid-row-actions {
    background: var(--fleet-row-hover);
}

.dense-grid tbody tr.selected-row {
    background: rgba(var(--bs-primary-rgb), .16);
}

.grid-row-actions,
.dense-grid tbody tr:nth-child(even) .grid-row-actions {
    background: inherit;
}

.dense-grid-pager button,
.dense-grid-page-size select,
.dense-grid-group-bar button,
.dense-grid-group-bar select,
.dense-grid-group-bar input,
.dense-grid-header-filter,
.dense-grid-header-filter-menu,
.dense-grid-header-filter-menu input,
.dense-grid-header-filter-options button,
.dense-grid-header-filter-actions button,
.dense-grid-column-item,
.dense-grid-column-chooser label,
.dense-grid-column-item button {
    color: var(--fleet-text);
    border-color: var(--fleet-border);
    background: var(--fleet-surface);
}

.dense-grid-filter-chip,
.report-summary-strip span,
.report-summary-strip button.grid-link,
.activation-chip,
.automatic-type-trigger {
    color: var(--fleet-text);
    border-color: var(--fleet-border);
    background: var(--fleet-muted);
}

.dense-grid-header-filter:hover,
.dense-grid-header-filter.active,
.dense-grid-header-filter-options button:hover,
.dense-grid-header-filter-options button.selected,
.dense-grid-column-item button:hover:not(:disabled),
.dense-grid-group-bar button:hover:not(:disabled),
.dense-grid-pager button:hover:not(:disabled),
.report-summary-strip button.grid-link:hover {
    color: var(--bs-primary);
    border-color: rgba(var(--bs-primary-rgb), .32);
    background: rgba(var(--bs-primary-rgb), .10);
}

.settings-nav,
.settings-nav-heading,
.settings-nav-items {
    color: var(--fleet-sidebar-text);
    background-color: var(--fleet-sidebar-bg);
}

.settings-nav-heading {
    border-color: var(--fleet-sidebar-border);
}

.settings-nav-heading::before,
.settings-nav-heading .mud-icon-root {
    color: var(--bs-primary);
}

.settings-nav-items {
    background:
        linear-gradient(var(--fleet-sidebar-border), var(--fleet-sidebar-border)) 34px 0 / 1px 100% no-repeat,
        var(--fleet-sidebar-bg);
}

.settings-nav-items .panel-list-item {
    color: var(--fleet-sidebar-text);
    background: transparent;
}

.settings-nav-items .panel-list-item::before {
    background: var(--fleet-sidebar-border);
}

.settings-nav-items .panel-list-item:hover,
.settings-nav-items .panel-list-item.selected,
.settings-nav-items .panel-list-item.selected:hover {
    color: var(--fleet-sidebar-active-text);
    background: var(--fleet-sidebar-hover-bg);
    box-shadow: inset 3px 0 0 var(--bs-primary);
}

.view-settings-panel {
    top: calc(var(--toolbar-height) + 8px);
    right: 12px;
    padding: 10px;
}

.view-settings-panel header,
.view-setting-row,
.confirm-action-buttons,
.help-drawer header {
    border-color: var(--fleet-border);
}

.view-settings-panel header button,
.view-settings-actions button,
.help-drawer header button,
.help-drawer-actions button,
.quick-action-menu button {
    color: var(--fleet-text);
    border-color: var(--fleet-border);
    background: var(--fleet-surface);
}

.view-setting-row input,
.dashboard-refresh-controls .dialog-field input[type="checkbox"],
.dense-grid input[type="checkbox"] {
    accent-color: var(--bs-primary);
}

.quick-action-menu {
    top: calc(100% + 10px);
    min-width: 240px;
    padding: 8px;
}

.quick-action-menu button {
    grid-template-columns: 26px minmax(0, 1fr);
    min-height: 38px;
    border-radius: var(--fleet-radius-sm);
}

.quick-action-menu button:hover,
.quick-action-menu button:focus-visible {
    color: var(--fleet-sidebar-active-text);
    background: var(--fleet-sidebar-hover-bg);
}

.quick-action-menu .mud-icon-root {
    color: var(--bs-primary);
}

.help-drawer {
    top: calc(var(--toolbar-height) + 12px);
    right: 14px;
    width: min(620px, calc(100vw - 28px));
    padding: 12px;
}

.help-drawer-grid article {
    border-color: var(--fleet-border);
    border-radius: var(--fleet-radius);
    background: var(--fleet-muted);
}

.help-drawer-grid span,
.help-drawer-grid strong {
    color: var(--fleet-text);
}

.help-drawer-grid span {
    color: var(--bs-primary);
}

.help-drawer-grid p {
    color: var(--fleet-soft-text);
}

.help-drawer-actions button:first-child {
    color: #fff;
    border-color: var(--bs-primary);
    background: var(--bs-primary);
}

.loading-screen,
.access-denied,
.offline-banner {
    color: var(--fleet-text);
    background: var(--fleet-surface);
    border-color: var(--fleet-border);
}

.offline-banner {
    color: #87510b;
    background: rgba(var(--bs-warning-rgb), .14);
}

html.dark-mode .offline-banner,
[data-bs-theme="dark"] .offline-banner {
    color: #ffdca3;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 50% 42%, rgba(52, 143, 226, .18), transparent 28%),
        linear-gradient(135deg, #2d353c 0%, #24435d 100%);
}

.login-panel {
    display: grid;
    grid-template-columns: 1fr;
    width: min(448px, 100%);
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .68);
    border-radius: 8px;
    background: var(--fleet-surface);
    box-shadow: 0 28px 70px rgba(9, 18, 28, .30);
}

.login-visual {
    display: none;
}

.login-card {
    display: grid;
    gap: 0;
    width: 100%;
}

.login-brand {
    margin: 0;
    padding: 22px 24px 18px;
    color: #fff;
    background: #2d353c;
    border-bottom: 3px solid var(--bs-primary);
}

.login-brand h1 {
    position: relative;
    margin: 0;
    padding-left: 38px;
    color: #fff;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.2;
}

.login-brand h1::before {
    content: "";
    position: absolute;
    left: 0;
    top: -2px;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: linear-gradient(135deg, #00acac 0%, #348fe2 100%);
}

.login-form {
    display: grid;
    gap: 14px;
    padding: 26px 24px 8px;
}

.login-form .dialog-field {
    gap: 7px;
}

.login-form .dialog-field span {
    color: var(--fleet-text);
    font-size: 12px;
    font-weight: 600;
}

.login-form .dialog-field input {
    min-height: 46px;
    padding: 0 12px;
    border-color: #cfd9e4;
    border-radius: 6px;
    background: var(--fleet-surface);
}

.login-form .dialog-field input:focus {
    border-color: rgba(var(--bs-primary-rgb), .65);
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .16);
    outline: none;
}

.login-button {
    justify-self: stretch;
    width: 100%;
    min-height: 46px;
    margin-top: 2px;
    color: #fff;
    border-color: var(--bs-primary);
    border-radius: 6px;
    background: var(--bs-primary);
    font-size: 15px;
    font-weight: 600;
}

.login-button:hover {
    background: #1f7fd1;
}

.login-error {
    color: var(--bs-danger);
    border-color: rgba(var(--bs-danger-rgb), .26);
    background: rgba(var(--bs-danger-rgb), .10);
}

.login-hint {
    margin: 0;
    padding: 12px 24px 24px;
    color: var(--fleet-soft-text);
    text-align: center;
}

.login-panel footer {
    position: static;
    padding: 14px 24px 18px;
    color: var(--fleet-soft-text);
    border-top: 1px solid var(--fleet-border);
    text-align: center;
}

.auth-page {
    --auth-primary: var(--bs-primary, #348fe2);
    --auth-primary-rgb: var(--bs-primary-rgb, 52, 143, 226);
    --auth-accent: #00acac;
    --auth-card: #ffffff;
    --auth-header: #2d353c;
    --auth-text: #20252a;
    --auth-muted: #667085;
    --auth-border: rgba(15, 23, 42, .12);
    --auth-line: #e3ebf3;
    --auth-input: #ffffff;
    --auth-input-border: #ccd7e2;

    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 16px;
    color: var(--auth-text);
    background: linear-gradient(135deg, #26313a 0%, #33414c 58%, #2f5f86 100%);
}

.auth-panel {
    width: min(448px, calc(100vw - 32px));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .62);
    border-radius: 8px;
    background: var(--auth-card);
    box-shadow: 0 26px 64px rgba(9, 18, 28, .32);
}

.auth-header {
    min-height: 94px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px;
    color: #ffffff;
    background: var(--auth-header);
    border-bottom: 3px solid var(--auth-primary);
}

.auth-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-logo {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 7px;
    background: linear-gradient(135deg, var(--auth-accent), var(--auth-primary));
    box-shadow: 0 8px 18px rgba(0, 172, 172, .24);
}

.auth-brand h1 {
    margin: 0;
    color: #ffffff;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: 0;
}

.auth-brand p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, .74);
    font-size: 12px;
    line-height: 1.35;
}

.auth-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.auth-icon-button {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: rgba(255, 255, 255, .86);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 6px;
    background: rgba(255, 255, 255, .08);
    cursor: pointer;
}

.auth-icon-button:hover,
.auth-icon-button:focus-visible {
    color: #ffffff;
    border-color: rgba(255, 255, 255, .32);
    background: rgba(255, 255, 255, .14);
    outline: 0;
}

.auth-state-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .48);
}

.auth-body {
    padding: 26px 24px 24px;
    background: var(--auth-card);
}

.auth-page-intro {
    margin: 0 0 22px;
}

.auth-page-intro h2 {
    margin: 0 0 7px;
    color: var(--auth-text);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.25;
}

.auth-page-intro p,
.auth-note {
    margin: 0;
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 1.55;
}

.auth-note {
    margin-top: 20px;
    text-align: center;
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-field {
    display: grid;
    gap: 7px;
}

.auth-field span {
    color: var(--auth-text);
    font-size: 12px;
    font-weight: 600;
}

.auth-field input {
    width: 100%;
    min-height: 46px;
    padding: 0 12px;
    color: var(--auth-text);
    border: 1px solid var(--auth-input-border);
    border-radius: 6px;
    background: var(--auth-input);
}

.auth-field input:focus {
    border-color: rgba(var(--auth-primary-rgb), .65);
    box-shadow: 0 0 0 3px rgba(var(--auth-primary-rgb), .16);
    outline: none;
}

.auth-inline-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    color: var(--auth-text);
}

.auth-check input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    accent-color: var(--auth-primary);
}

.auth-check span {
    white-space: nowrap;
}

.auth-link,
.auth-back-link {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-link:hover,
.auth-back-link:hover {
    color: #2274c6;
}

.auth-button {
    width: 100%;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 2px;
    color: #ffffff;
    border: 1px solid var(--auth-primary);
    border-radius: 6px;
    background: var(--auth-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(var(--auth-primary-rgb), .20);
}

.auth-button:hover {
    background: #1f7fd1;
}

.auth-button:disabled {
    cursor: progress;
    opacity: .72;
}

.auth-message {
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.45;
}

.auth-message.error {
    color: #842029;
    border-color: #f1aeb5;
    background: #f8d7da;
}

.auth-message.success {
    color: #0f5132;
    border-color: #a3cfbb;
    background: #d1e7dd;
}

.auth-message.info {
    color: #0b4f71;
    border-color: #9bd2ec;
    background: #d9f0fb;
}

.auth-secondary-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 17px;
    border-top: 1px solid var(--auth-line);
}

.auth-back-link {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 10px;
    border-radius: 6px;
}

.auth-back-link:hover {
    background: rgba(var(--auth-primary-rgb), .08);
}

html.dark-mode .login-page,
[data-bs-theme="dark"] .login-page {
    background:
        radial-gradient(circle at 50% 42%, rgba(52, 143, 226, .22), transparent 28%),
        linear-gradient(135deg, #101923 0%, #19304a 100%);
}

html.dark-mode .login-brand,
[data-bs-theme="dark"] .login-brand {
    background: #151d27;
}

html.dark-mode .auth-page,
[data-bs-theme="dark"] .auth-page {
    --auth-card: #20252a;
    --auth-header: #1b2026;
    --auth-text: #e8edf2;
    --auth-muted: #a8b3be;
    --auth-border: rgba(255, 255, 255, .10);
    --auth-line: #343f4a;
    --auth-input: #262d35;
    --auth-input-border: #3b4652;
    background: linear-gradient(140deg, #15191e 0%, #20252a 56%, #2b526f 100%);
}

html.dark-mode .auth-panel,
[data-bs-theme="dark"] .auth-panel {
    border-color: rgba(255, 255, 255, .10);
    box-shadow: 0 24px 64px rgba(0, 0, 0, .34);
}

html.dark-mode .auth-message.info,
[data-bs-theme="dark"] .auth-message.info {
    color: #b6e4ff;
    border-color: rgba(73, 182, 214, .28);
    background: rgba(73, 182, 214, .12);
}

html.dark-mode .auth-message.error,
[data-bs-theme="dark"] .auth-message.error {
    color: #ffb8bc;
    border-color: rgba(255, 91, 87, .28);
    background: rgba(255, 91, 87, .14);
}

html.dark-mode .auth-message.success,
[data-bs-theme="dark"] .auth-message.success {
    color: #a7e8cd;
    border-color: rgba(0, 172, 172, .28);
    background: rgba(0, 172, 172, .12);
}

html.dark-mode .module-panel .map-toolbar.map-sidebar-controls button,
html.dark-mode .map-status-sidebar,
html.dark-mode .map-status-sidebar span,
html.dark-mode .selected-vehicle-panel,
html.dark-mode .selected-vehicle-metrics span,
html.dark-mode .route-day-panel,
html.dark-mode .route-playback-panel,
html.dark-mode .timeline-tabs-strip,
html.dark-mode .timeline-data-panel,
html.dark-mode .timeline-trip-card,
html.dark-mode .route-event-card,
html.dark-mode .operational-layer-row,
html.dark-mode .operational-layer-detail,
html.dark-mode .automatic-type-menu,
html.dark-mode .legacy-report-grid,
html.dark-mode .legacy-report-picker,
[data-bs-theme="dark"] .module-panel .map-toolbar.map-sidebar-controls button,
[data-bs-theme="dark"] .map-status-sidebar,
[data-bs-theme="dark"] .map-status-sidebar span,
[data-bs-theme="dark"] .selected-vehicle-panel,
[data-bs-theme="dark"] .selected-vehicle-metrics span,
[data-bs-theme="dark"] .route-day-panel,
[data-bs-theme="dark"] .route-playback-panel,
[data-bs-theme="dark"] .timeline-tabs-strip,
[data-bs-theme="dark"] .timeline-data-panel,
[data-bs-theme="dark"] .timeline-trip-card,
[data-bs-theme="dark"] .route-event-card,
[data-bs-theme="dark"] .operational-layer-row,
[data-bs-theme="dark"] .operational-layer-detail,
[data-bs-theme="dark"] .automatic-type-menu,
[data-bs-theme="dark"] .legacy-report-grid,
[data-bs-theme="dark"] .legacy-report-picker {
    color: var(--fleet-text);
    border-color: var(--fleet-border);
    background: var(--fleet-surface);
}

html.dark-mode .map-sidebar-section,
html.dark-mode .map-status-sidebar,
html.dark-mode .map-module-layout .panel-header,
html.dark-mode .timeline-panel-header,
html.dark-mode .selected-vehicle-panel header,
[data-bs-theme="dark"] .map-sidebar-section,
[data-bs-theme="dark"] .map-status-sidebar,
[data-bs-theme="dark"] .map-module-layout .panel-header,
[data-bs-theme="dark"] .timeline-panel-header,
[data-bs-theme="dark"] .selected-vehicle-panel header {
    color: var(--fleet-text);
    border-color: var(--fleet-line-strong);
    background: var(--fleet-panel-header-bg);
}

html.dark-mode .map-status-sidebar strong,
html.dark-mode .selected-vehicle-panel strong,
html.dark-mode .selected-vehicle-head strong,
html.dark-mode .route-day-panel strong,
html.dark-mode .route-playback-panel strong,
html.dark-mode .selected-vehicle-details dd,
html.dark-mode .operational-layer-row strong,
[data-bs-theme="dark"] .map-status-sidebar strong,
[data-bs-theme="dark"] .selected-vehicle-panel strong,
[data-bs-theme="dark"] .selected-vehicle-head strong,
[data-bs-theme="dark"] .route-day-panel strong,
[data-bs-theme="dark"] .route-playback-panel strong,
[data-bs-theme="dark"] .selected-vehicle-details dd,
[data-bs-theme="dark"] .operational-layer-row strong {
    color: #8fc5f7;
}

html.dark-mode .selected-vehicle-head span,
html.dark-mode .selected-vehicle-details dt,
html.dark-mode .operational-layer-row small,
[data-bs-theme="dark"] .selected-vehicle-head span,
[data-bs-theme="dark"] .selected-vehicle-details dt,
[data-bs-theme="dark"] .operational-layer-row small {
    color: var(--fleet-soft-text);
}

html.dark-mode .module-panel .map-toolbar.map-sidebar-controls button.selected,
[data-bs-theme="dark"] .module-panel .map-toolbar.map-sidebar-controls button.selected {
    color: #fff;
    border-color: var(--bs-primary);
    background: var(--bs-primary);
}

@media (max-width: 1100px) {
    .top-toolbar {
        grid-template-columns: minmax(290px, auto) minmax(160px, 1fr) auto;
    }

    .toolbar-module-title {
        max-width: 120px;
    }

    .toolbar-user {
        display: none;
    }
}

@media (max-width: 900px) {
    :root {
        --rail-expanded-width: 210px;
        --module-panel-width: 284px;
    }

    .top-toolbar {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .toolbar-search {
        display: none;
    }

    .toolbar-brand {
        max-width: 148px;
    }

    .toolbar-module-title {
        max-width: 160px;
    }

    .toolbar-actions .mud-icon-button:nth-of-type(n + 4),
    .toolbar-logout {
        display: none;
    }
}

@media (max-width: 640px) {
    :root {
        --toolbar-height: 56px;
        --rail-width: 56px;
        --rail-expanded-width: 56px;
        --module-panel-width: minmax(0, 1fr);
    }

    .top-toolbar {
        display: flex;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        padding: 0 8px;
    }

    .top-toolbar::-webkit-scrollbar {
        display: none;
    }

    .toolbar-title,
    .toolbar-actions {
        flex: 0 0 auto;
    }

    .toolbar-module-title {
        display: none;
    }

    .toolbar-brand {
        width: 40px;
        min-width: 40px;
        padding: 0;
        justify-content: center;
    }

    .toolbar-brand-text {
        display: none;
    }

    .toolbar-icon,
    .toolbar-actions .mud-icon-button,
    .toolbar-menu-button,
    .toolbar-logout,
    .user-badge {
        width: 36px;
        min-width: 36px;
        height: 36px;
        border-radius: 9px;
    }

    .fleet-main,
    .fleet-shell.rail-pinned .fleet-main,
    .fleet-shell:not(.rail-pinned) .fleet-main {
        grid-template-columns: var(--rail-width) minmax(0, 1fr);
    }

    .left-rail,
    .left-rail:hover,
    .left-rail:focus-within,
    .fleet-shell.rail-pinned .left-rail,
    .fleet-shell:not(.rail-pinned) .left-rail {
        width: var(--rail-width);
        min-width: var(--rail-width);
        padding: 8px 6px 12px;
    }

    .rail-profile-info,
    .rail-menu-header,
    .rail-link span,
    .rail-link-caret {
        display: none;
    }

    .rail-profile {
        display: flex;
        justify-content: center;
        min-height: 48px;
        margin: 4px 0 10px;
        padding: 4px;
        border-color: transparent;
        background: transparent;
    }

    .rail-avatar {
        width: 34px;
        height: 34px;
        border-radius: 8px;
        font-size: 12px;
    }

    .rail-link {
        grid-template-columns: 1fr;
        justify-items: center;
        min-height: 40px;
        height: 40px;
        padding: 0;
    }

    .module-layout,
    .map-module-layout,
    .map-module-layout.map-panel-dock-right {
        grid-template-columns: 1fr;
    }

    .login-page {
        padding: 16px;
    }

    .login-panel {
        width: min(100%, 448px);
    }

    .login-brand,
    .login-form,
    .login-hint,
    .login-panel footer {
        padding-inline: 18px;
    }

    .auth-page {
        padding: 16px;
    }

    .auth-panel {
        width: min(100%, 448px);
    }

    .auth-header,
    .auth-body {
        padding-inline: 18px;
    }

    .auth-header {
        min-height: 86px;
        gap: 12px;
    }

    .auth-brand {
        gap: 10px;
    }

    .auth-brand h1 {
        font-size: 17px;
    }

    .auth-logo {
        width: 26px;
        height: 26px;
    }

    .auth-state-icon {
        display: none;
    }

    .auth-inline-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
}

/* 2026 operational layout pass: bounded modules, readable grids, planned actions. */
:root {
    --workspace-pad: 12px;
    --workspace-gap: 10px;
    --grid-action-width: 320px;
    --grid-min-block: 280px;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

.fleet-shell {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

.fleet-main,
.fleet-shell.rail-pinned .fleet-main,
.fleet-shell:not(.rail-pinned) .fleet-main {
    height: calc(100dvh - var(--toolbar-height));
    min-height: 0;
    overflow: hidden;
}

.fleet-content {
    display: grid;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.module-layout,
.map-module-layout {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.module-layout {
    grid-template-columns: minmax(292px, var(--module-panel-width)) minmax(0, 1fr);
}

.module-layout:has(.legacy-report-panel) {
    grid-template-columns: minmax(318px, 342px) minmax(0, 1fr);
}

.automatic-reports-shell {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.automatic-reports-shell > .workspace {
    height: 100%;
    max-height: 100%;
}

.module-panel {
    min-width: 0;
    min-height: 0;
    max-height: 100%;
    overflow: auto;
    scrollbar-gutter: stable;
}

.workspace {
    min-width: 0;
    min-height: 0;
    max-width: 100%;
}

.workspace:not(.map-workspace) {
    display: flex;
    flex-direction: column;
    gap: var(--workspace-gap);
    height: 100%;
    max-height: 100%;
    padding: var(--workspace-pad);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.workspace:not(.map-workspace) > * {
    flex: 0 0 auto;
    min-width: 0;
}

.workspace:not(.map-workspace) > .dense-grid-wrap,
.workspace:not(.map-workspace) > div:has(> .dense-grid-wrap) > .dense-grid-wrap,
.legacy-report-result > .dense-grid-wrap {
    min-height: var(--grid-min-block);
    max-height: min(640px, calc(100dvh - var(--toolbar-height) - 172px));
}

.workspace:not(.map-workspace) > .dense-grid-wrap:last-child {
    flex: 1 1 430px;
}

.automatic-reports-workspace > .dense-grid-wrap,
.workspace:not(.map-workspace) > div:has(> .dense-grid-wrap) > .dense-grid-wrap {
    height: clamp(280px, 42vh, 470px);
    max-height: none;
}

.automatic-reports-workspace > .dense-grid-wrap:first-of-type {
    height: clamp(320px, 48vh, 540px);
}

.workspace:not(.map-workspace) > div:has(> .dense-grid-wrap) {
    display: flex;
    flex-direction: column;
    gap: var(--workspace-gap);
    min-width: 0;
    min-height: 0;
}

.dashboard-toolbar,
.automatic-reports-toolbar,
.export-toolbar,
.report-summary-strip,
.dashboard-kpis,
.score-strip {
    flex: 0 0 auto;
    border: 1px solid var(--fleet-line-strong);
    border-radius: var(--fleet-radius);
}

.dashboard-toolbar,
.automatic-reports-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 8px;
    background: var(--fleet-surface);
}

.dashboard-toolbar > .export-toolbar,
.automatic-reports-toolbar > .export-toolbar {
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.export-toolbar {
    flex-wrap: wrap;
    gap: 6px;
    min-height: 42px;
    padding: 6px 8px;
    overflow: visible;
}

.export-toolbar .mud-input-control,
.export-toolbar-search {
    flex: 1 1 220px;
    width: auto;
    min-width: min(220px, 100%);
    max-width: 360px;
}

.export-toolbar select {
    min-width: 150px;
    max-width: 220px;
}

.dashboard-kpis,
.score-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    padding: 8px;
    background: var(--fleet-surface);
}

.dashboard-kpis span,
.score-strip article {
    min-width: 0;
    min-height: 54px;
    align-content: center;
}

.report-summary-strip {
    gap: 6px;
    padding: 7px;
    background: var(--fleet-surface);
}

.report-summary-strip span,
.report-summary-strip button.grid-link {
    max-width: 100%;
    min-height: 28px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.widget-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    padding: 0;
    background: transparent;
}

.widget-tile {
    min-width: 0;
    border-radius: var(--fleet-radius);
}

.widget-actions {
    flex-wrap: wrap;
}

.dense-grid-wrap {
    min-width: 0;
    min-height: var(--grid-min-block);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--fleet-line-strong);
    border-radius: var(--fleet-radius);
    overflow: hidden;
}

.dense-grid-scroll {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
}

.dense-grid {
    width: max(100%, var(--dense-grid-min-width, 980px));
    min-width: var(--dense-grid-min-width, 980px);
    table-layout: fixed;
}

.dense-grid th,
.dense-grid td {
    max-width: 280px;
    height: 36px;
    padding: 5px 9px;
    vertical-align: middle;
}

.dense-grid thead th {
    position: sticky;
    top: 0;
    z-index: 3;
}

.dense-grid-group-row td,
.dense-grid-active-filter-row td,
.dense-grid-column-chooser td,
.filter-row td {
    position: relative;
    z-index: 4;
}

.dense-grid-group-bar {
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
    padding: 2px 0;
}

.dense-grid-group-bar > span {
    flex: 1 1 180px;
}

.dense-grid-group-bar button,
.dense-grid-group-bar select,
.dense-grid-group-bar input {
    min-height: 28px;
}

.dense-grid-group-select {
    min-width: min(220px, 100%);
}

.grid-actions-column,
.grid-row-actions {
    width: var(--grid-action-width);
    min-width: var(--grid-action-width);
}

.grid-row-actions,
.grid-row-actions > span {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.grid-row-actions {
    align-content: center;
    padding: 4px 6px !important;
}

.grid-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    max-width: 100%;
    padding: 2px 7px;
    border: 1px solid transparent;
    border-radius: var(--fleet-radius-sm);
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.grid-row-actions .grid-link:not(.grid-icon-link) {
    background: var(--fleet-muted);
}

.grid-icon-link {
    width: 30px;
    min-width: 30px;
    height: 28px;
    padding: 0;
}

.dense-grid-footer {
    gap: 8px;
    min-height: 40px;
    padding: 6px 8px;
    border-top: 1px solid var(--fleet-line-strong);
    border-bottom: 0;
}

.dense-grid-page-size,
.dense-grid-pager {
    margin-left: auto;
}

.dense-grid-pager + .dense-grid-page-size,
.dense-grid-page-size + .dense-grid-pager {
    margin-left: 0;
}

.legacy-report-grid,
.legacy-report-result,
.report-vehicle-selector {
    border: 1px solid var(--fleet-line-strong);
    border-radius: var(--fleet-radius);
    overflow: hidden;
    background: var(--fleet-surface);
}

.legacy-vehicle-grid-wrap {
    max-height: min(430px, calc(100dvh - var(--toolbar-height) - 250px));
    overflow: auto;
}

.legacy-report-grid.expanded .legacy-vehicle-grid-wrap {
    max-height: min(620px, calc(100dvh - var(--toolbar-height) - 156px));
}

.settings-nav {
    display: grid;
    gap: 8px;
}

.settings-nav-group {
    min-width: 0;
}

.settings-nav-items .panel-list-item {
    min-height: 42px;
}

.loading-screen {
    min-height: min(360px, calc(100dvh - var(--toolbar-height) - 140px));
    border: 1px solid var(--fleet-line-strong);
    border-radius: var(--fleet-radius);
}

.fleet-content > .loading-screen {
    min-height: 100%;
}

@media (max-width: 1180px) {
    :root {
        --grid-action-width: 280px;
        --workspace-pad: 10px;
    }

    .module-layout,
    .module-layout:has(.legacy-report-panel) {
        grid-template-columns: minmax(272px, 292px) minmax(0, 1fr);
    }

    .dashboard-toolbar,
    .automatic-reports-toolbar {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    html,
    body {
        overflow: auto;
    }

    .fleet-shell {
        height: auto;
        min-height: 100dvh;
        overflow: visible;
    }

    .fleet-main,
    .fleet-shell.rail-pinned .fleet-main,
    .fleet-shell:not(.rail-pinned) .fleet-main {
        height: auto;
        min-height: calc(100dvh - var(--toolbar-height));
        overflow: visible;
    }

    .fleet-content {
        overflow: visible;
    }

    .module-layout,
    .module-layout:has(.legacy-report-panel),
    .map-module-layout {
        height: auto;
        min-height: 0;
        overflow: visible;
        grid-template-columns: 1fr;
    }

    .module-panel {
        max-height: 42dvh;
        border-right: 0;
        border-bottom: 1px solid var(--fleet-line-strong);
    }

    .workspace:not(.map-workspace) {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .automatic-reports-shell,
    .automatic-reports-shell > .workspace {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .workspace:not(.map-workspace) > .dense-grid-wrap,
    .workspace:not(.map-workspace) > div:has(> .dense-grid-wrap) > .dense-grid-wrap,
    .legacy-report-result > .dense-grid-wrap {
        min-height: 300px;
        max-height: 62dvh;
    }

    .dense-grid {
        width: max(100%, var(--dense-grid-min-width, 920px));
    }

    .report-summary-strip span {
        white-space: normal;
    }
}

/* Theme compatibility pass: keep operational screens consistent in light/dark mode. */
:root {
    --fleet-action-danger: #a4211f;
    --fleet-action-danger-bg: rgba(164, 33, 31, .07);
    --fleet-action-danger-border: rgba(164, 33, 31, .22);
    --fleet-action-primary-bg: rgba(var(--bs-primary-rgb), .09);
    --fleet-action-primary-border: rgba(var(--bs-primary-rgb), .25);
}

html.dark-mode,
[data-bs-theme="dark"] {
    --fleet-action-danger: #f28f89;
    --fleet-action-danger-bg: rgba(242, 143, 137, .08);
    --fleet-action-danger-border: rgba(242, 143, 137, .18);
}

.export-toolbar .mud-icon-button,
.export-toolbar-button {
    color: var(--bs-primary) !important;
}

.export-toolbar .mud-icon-button:hover:not(:disabled),
.export-toolbar-button:hover:not(:disabled) {
    background: var(--fleet-action-primary-bg) !important;
}

.grid-link.danger {
    color: var(--fleet-action-danger);
}

.grid-row-actions .grid-link.danger:not(.grid-icon-link),
.widget-actions .grid-link.danger,
.report-result-actions .grid-link.danger {
    color: var(--fleet-action-danger);
    border-color: var(--fleet-action-danger-border);
    background: var(--fleet-action-danger-bg);
}

.panel-command.danger {
    color: #fff;
    border-color: var(--fleet-action-danger);
    background: var(--fleet-action-danger);
}

.legacy-icon-button,
.legacy-field-icon-button,
.legacy-clear-selected,
.legacy-icon-outline,
.legacy-report-actions .panel-command {
    color: var(--bs-primary);
    border-color: var(--fleet-action-primary-border);
    background: var(--fleet-surface);
}

.legacy-icon-outline.selected {
    color: #fff;
    border-color: var(--bs-primary);
    background: var(--bs-primary);
}

.export-toolbar select,
.export-toolbar input,
.export-toolbar .mud-input-root,
.export-toolbar .mud-input,
.export-toolbar .mud-input-slot,
.dense-grid-page-size select,
.dense-grid-group-bar select,
.dense-grid-group-bar input,
.dense-grid-header-filter-menu input,
.dense-grid-header-filter-options button,
.dense-grid-header-filter-actions button,
.dense-grid-column-item,
.dense-grid-column-item button,
.legacy-field select,
.legacy-field input,
.legacy-date-picker,
.legacy-date-custom input,
.legacy-report-picker,
.legacy-popup-filter-row input,
.legacy-popup-filter-row select,
.legacy-grid-search,
.legacy-grid-search input,
.legacy-sector-filter,
.legacy-vehicle-filter-row input {
    color: var(--fleet-text);
    border-color: var(--fleet-border);
    background-color: var(--fleet-surface);
}

.export-toolbar input::placeholder,
.legacy-field input::placeholder,
.legacy-popup-filter-row input::placeholder,
.legacy-grid-search input::placeholder,
.legacy-vehicle-filter-row input::placeholder {
    color: var(--fleet-soft-text);
    opacity: .82;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .automatic-reports-shell,
:is(html.dark-mode, [data-bs-theme="dark"]) .automatic-reports-workspace,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-report-panel,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-report-grid,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-report-result,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-report-result-head,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-report-result-context,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-report-result-context .report-summary-strip,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-report-result .report-summary-strip.result-meta,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-report-picker-shell,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-report-data-preview,
:is(html.dark-mode, [data-bs-theme="dark"]) .report-popular-box,
:is(html.dark-mode, [data-bs-theme="dark"]) .report-data-box,
:is(html.dark-mode, [data-bs-theme="dark"]) .report-vehicle-selector,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-grid-toolbar,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-grid-footer,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-sector-filter,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-grid-search,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-vehicle-grid-wrap,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-report-popup,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-field select,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-field input,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-date-picker,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-date-custom input,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-popup-filter-row input,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-popup-filter-row select,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-grid-search input,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-vehicle-filter-row input,
:is(html.dark-mode, [data-bs-theme="dark"]) .report-summary-strip,
:is(html.dark-mode, [data-bs-theme="dark"]) .dashboard-toolbar,
:is(html.dark-mode, [data-bs-theme="dark"]) .automatic-reports-toolbar,
:is(html.dark-mode, [data-bs-theme="dark"]) .export-toolbar,
:is(html.dark-mode, [data-bs-theme="dark"]) .dense-grid-wrap {
    color: var(--fleet-text);
    border-color: var(--fleet-border);
    background-color: var(--fleet-surface);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-report-result-head p,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-sort-indicator,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-grid-footer,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-popup-empty,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-grid-empty {
    color: var(--fleet-soft-text);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-vehicle-grid,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-report-popup-table {
    color: var(--fleet-text);
    background: var(--fleet-surface);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-vehicle-grid th,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-report-popup-table th,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-vehicle-filter-row th,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-popup-filter-row th {
    color: var(--fleet-text);
    border-color: var(--fleet-border);
    background: var(--fleet-sidebar-bg-soft);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-vehicle-grid td,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-report-popup-table td {
    color: var(--fleet-text);
    border-color: var(--fleet-border);
    background: var(--fleet-surface);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-vehicle-grid tbody tr:not(.legacy-grid-group-row):nth-child(even) td,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-report-popup-table tbody tr:not(.legacy-popup-group):nth-child(even) td {
    background: var(--fleet-row-alt);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-vehicle-grid tbody tr.selected td,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-report-popup-table tr.selected td {
    background: rgba(var(--bs-primary-rgb), .18);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-vehicle-grid tbody tr:not(.legacy-grid-group-row):hover td,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-report-popup-table tbody tr:not(.legacy-popup-group):hover td {
    background: var(--fleet-row-hover);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-grid-group-row td,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-popup-group td {
    color: var(--fleet-soft-text);
    background: var(--fleet-muted);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-popup-report-name,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-popup-icon,
:is(html.dark-mode, [data-bs-theme="dark"]) .legacy-sector-filter button {
    color: var(--fleet-text);
}

.settings-nav-items .panel-list-item.alias {
    display: none;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .workspace:not(.map-workspace),
:is(html.dark-mode, [data-bs-theme="dark"]) .workspace:has(.legacy-report-grid),
:is(html.dark-mode, [data-bs-theme="dark"]) .fleet-content,
:is(html.dark-mode, [data-bs-theme="dark"]) .module-layout {
    background-color: var(--fleet-app-bg);
}

.automatic-create-button {
    color: var(--bs-success);
    border-color: rgba(var(--bs-success-rgb), .36);
    background: rgba(var(--bs-success-rgb), .08);
}

.automatic-create-button:hover {
    color: var(--bs-success);
    border-color: rgba(var(--bs-success-rgb), .5);
    background: rgba(var(--bs-success-rgb), .14);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .automatic-create-button {
    color: #8de5ae;
    border-color: rgba(var(--bs-success-rgb), .34);
    background: rgba(var(--bs-success-rgb), .10);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .dense-grid tbody tr,
:is(html.dark-mode, [data-bs-theme="dark"]) .dense-grid tbody tr .grid-row-actions {
    background: var(--fleet-surface) !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .dense-grid tbody tr:nth-child(even),
:is(html.dark-mode, [data-bs-theme="dark"]) .dense-grid tbody tr:nth-child(even) .grid-row-actions {
    background: var(--fleet-row-alt) !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .dense-grid tbody tr:hover,
:is(html.dark-mode, [data-bs-theme="dark"]) .dense-grid tbody tr:hover .grid-row-actions {
    background: var(--fleet-row-hover) !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .dense-grid tbody tr.selected-row,
:is(html.dark-mode, [data-bs-theme="dark"]) .dense-grid tbody tr.selected-row .grid-row-actions {
    background: rgba(var(--bs-primary-rgb), .18) !important;
}

/* ColorAdmin header/sidebar alignment: user account belongs to sidebar, header stays brand + tools. */
.top-toolbar {
    grid-template-columns: minmax(300px, auto) minmax(260px, 1fr) auto;
}

.toolbar-title {
    gap: 0;
}

.toolbar-brand.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    margin: 4px 8px;
    padding: 0 12px;
    color: var(--zetra-brand-text, var(--fleet-header-text));
    border: 1px solid transparent;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 172, 172, .18), rgba(52, 143, 226, .14));
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0;
    text-decoration: none;
}

.toolbar-brand.navbar-brand:hover,
.toolbar-brand.navbar-brand:focus-visible {
    color: var(--zetra-brand-text, var(--fleet-header-text));
    border-color: rgba(var(--bs-primary-rgb), .28);
    background: var(--zetra-chrome-surface-hover, var(--fleet-header-surface-hover));
}

.toolbar-logo.navbar-logo {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin: 0;
    border-radius: 5px;
    background: linear-gradient(135deg, #00acac 0%, #348fe2 100%);
    box-shadow: 0 8px 18px rgba(0, 172, 172, .20);
}

.toolbar-brand-text.navbar-brand-text {
    display: inline-flex;
    align-items: baseline;
    min-width: 0;
    color: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
}

.toolbar-brand-text.navbar-brand-text b {
    font-weight: 600;
}

.toolbar-brand-text .navbar-brand-suffix {
    margin-left: 1px;
    color: var(--zetra-brand-muted, var(--fleet-header-muted));
    font-weight: 500;
}

.toolbar-module-title {
    margin-left: 0;
}

.toolbar-actions {
    justify-content: flex-end;
}

.toolbar-user-chip,
.toolbar-user-copy,
.toolbar-logout,
.user-badge {
    display: none !important;
}

.rail-profile {
    position: relative;
    grid-template-columns: 42px minmax(0, 1fr);
    min-height: 76px;
    margin: 8px 0 7px;
    padding: 12px;
    overflow: hidden;
    border-color: var(--zetra-sidebar-profile-border, var(--zetra-chrome-border));
    background: var(--zetra-sidebar-profile-bg, var(--zetra-profile-bg));
}

.rail-profile-cover {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 28%, rgba(52, 143, 226, .22), transparent 30%),
        linear-gradient(135deg, rgba(255, 255, 255, .06), transparent 62%);
    opacity: .9;
    pointer-events: none;
}

.rail-avatar,
.rail-profile-info {
    position: relative;
    z-index: 1;
}

.rail-avatar {
    width: 42px;
    height: 42px;
    border-radius: 9px;
}

.rail-profile-info {
    gap: 1px;
}

.rail-profile-info strong {
    font-size: 12px;
}

.rail-profile-actions {
    display: grid;
    gap: 3px;
    margin: 0 0 12px;
    padding: 0 2px 9px;
    border-bottom: 1px solid var(--zetra-chrome-border, var(--fleet-sidebar-border));
}

.rail-profile-action {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 8px;
    color: var(--zetra-rail-link, var(--fleet-sidebar-text));
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    text-align: left;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.rail-profile-action .mud-icon-root {
    color: var(--zetra-chrome-muted, var(--fleet-sidebar-muted));
}

.rail-profile-action:hover,
.rail-profile-action:focus-visible {
    color: var(--zetra-active-text, #fff);
    border-color: rgba(var(--bs-primary-rgb), .28);
    background: rgba(var(--bs-primary-rgb), .13);
    outline: none;
}

.rail-profile-action:hover .mud-icon-root,
.rail-profile-action:focus-visible .mud-icon-root {
    color: currentColor;
}

.rail-profile-logout:hover,
.rail-profile-logout:focus-visible {
    border-color: rgba(255, 91, 87, .34);
    background: rgba(255, 91, 87, .13);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-point-popup {
    color: var(--fleet-text);
    border-color: rgba(255, 255, 255, .15);
    background: rgba(30, 40, 53, .97);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-point-popup > strong,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-ruler-panel strong,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-nearby-panel strong,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-area-check-panel strong {
    color: #8fc5f7;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-point-popup > span,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-nearby-panel header span,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-area-check-panel header span,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-panel-empty {
    color: #aeb9c7;
}

/* True final override: ColorAdmin profile card with collapsible submenu. */
.rail-profile,
.fleet-shell:not(.rail-pinned) .rail-profile {
    display: block !important;
    grid-template-columns: none !important;
    min-height: 0 !important;
    margin: 8px 0 7px !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
}

.rail-profile-link,
.fleet-shell:not(.rail-pinned) .rail-profile-link {
    position: relative;
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 16px !important;
    align-items: center;
    justify-content: initial !important;
    gap: 10px;
    width: 100% !important;
    min-height: 76px !important;
    padding: 12px !important;
    overflow: hidden;
    color: var(--fleet-sidebar-text);
    border: 1px solid var(--zetra-sidebar-profile-border, var(--zetra-chrome-border)) !important;
    border-radius: 8px;
    background: var(--zetra-sidebar-profile-bg, var(--zetra-profile-bg)) !important;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.rail-profile-link:hover,
.rail-profile-link:focus-visible,
.rail-profile.is-open .rail-profile-link {
    color: var(--zetra-active-text, var(--fleet-sidebar-active-text));
    border-color: rgba(var(--bs-primary-rgb), .28) !important;
    background:
        linear-gradient(135deg, rgba(var(--bs-primary-rgb), .12), rgba(0, 172, 172, .08)),
        var(--zetra-sidebar-profile-bg, var(--zetra-profile-bg)) !important;
    outline: none;
}

.rail-profile-link .rail-profile-cover {
    position: absolute;
    inset: 0;
}

.rail-profile-link .rail-avatar,
.rail-profile-link .rail-profile-info,
.rail-profile-link .rail-profile-caret {
    position: relative;
    z-index: 1;
}

.rail-profile-info,
.fleet-shell:not(.rail-pinned) .rail-profile-info {
    display: grid !important;
    gap: 1px;
}

.rail-profile-caret,
.fleet-shell:not(.rail-pinned) .rail-profile-caret {
    display: inline-flex !important;
    justify-self: end;
    color: var(--zetra-chrome-muted, var(--fleet-sidebar-muted));
    transition: transform .16s ease, color .16s ease;
}

.rail-profile.is-open .rail-profile-caret {
    color: currentColor;
    transform: rotate(180deg);
}

.rail-profile-actions,
.fleet-shell:not(.rail-pinned) .rail-profile-actions {
    display: none !important;
    gap: 2px;
    margin: 0 0 13px;
    padding: 4px 2px 10px;
    border-bottom: 1px solid var(--zetra-chrome-border, var(--fleet-sidebar-border));
}

.rail-profile-actions.is-open,
.fleet-shell:not(.rail-pinned) .rail-profile-actions.is-open {
    display: grid !important;
}

.rail-profile-action {
    grid-template-columns: 28px minmax(0, 1fr);
    min-height: 36px;
    padding: 0 12px;
}

/* ColorAdmin-style profile submenu: profile card toggles actions beneath it. */
.rail-profile,
.fleet-shell:not(.rail-pinned) .rail-profile {
    display: block;
    min-height: 0;
    margin: 8px 0 7px;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
}

.rail-profile-link {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 76px;
    padding: 12px;
    overflow: hidden;
    color: var(--fleet-sidebar-text);
    border: 1px solid var(--zetra-sidebar-profile-border, var(--zetra-chrome-border));
    border-radius: 8px;
    background: var(--zetra-sidebar-profile-bg, var(--zetra-profile-bg));
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.rail-profile-link:hover,
.rail-profile-link:focus-visible,
.rail-profile.is-open .rail-profile-link {
    color: var(--zetra-active-text, var(--fleet-sidebar-active-text));
    border-color: rgba(var(--bs-primary-rgb), .28);
    background:
        linear-gradient(135deg, rgba(var(--bs-primary-rgb), .12), rgba(0, 172, 172, .08)),
        var(--zetra-sidebar-profile-bg, var(--zetra-profile-bg));
    outline: none;
}

.rail-profile-link .rail-profile-cover {
    position: absolute;
    inset: 0;
}

.rail-profile-link .rail-avatar,
.rail-profile-link .rail-profile-info,
.rail-profile-link .rail-profile-caret {
    position: relative;
    z-index: 1;
}

.rail-profile-caret {
    justify-self: end;
    color: var(--zetra-chrome-muted, var(--fleet-sidebar-muted));
    transition: transform .16s ease, color .16s ease;
}

.rail-profile.is-open .rail-profile-caret {
    color: currentColor;
    transform: rotate(180deg);
}

.rail-profile-actions {
    display: none;
    gap: 2px;
    margin: 0 0 13px;
    padding: 4px 2px 10px;
    border-bottom: 1px solid var(--zetra-chrome-border, var(--fleet-sidebar-border));
}

.rail-profile-actions.is-open {
    display: grid;
}

.rail-profile-action {
    grid-template-columns: 28px minmax(0, 1fr);
    min-height: 36px;
    padding: 0 12px;
    border-radius: 6px;
}

.rail-profile-action span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rail-profile-action .mud-icon-root {
    justify-self: center;
}

.fleet-shell:not(.rail-pinned) .left-rail:not(:hover):not(:focus-within) .rail-profile {
    margin: 4px 0 10px;
}

.fleet-shell:not(.rail-pinned) .left-rail:not(:hover):not(:focus-within) .rail-profile-link {
    grid-template-columns: 42px;
    justify-content: center;
    min-height: 52px;
    padding: 6px;
    border-color: transparent;
    background: transparent;
}

.fleet-shell:not(.rail-pinned) .left-rail:not(:hover):not(:focus-within) .rail-profile-info,
.fleet-shell:not(.rail-pinned) .left-rail:not(:hover):not(:focus-within) .rail-profile-caret,
.fleet-shell:not(.rail-pinned) .left-rail:not(:hover):not(:focus-within) .rail-profile-actions {
    display: none !important;
}

/* Keep the ColorAdmin profile card readable in the fleet sidebar; only the actions collapse. */
.fleet-shell:not(.rail-pinned) .rail-profile-link,
.rail-profile-link {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 16px !important;
    justify-content: initial !important;
    width: 100% !important;
    min-height: 76px !important;
    padding: 12px !important;
    border-color: var(--zetra-sidebar-profile-border, var(--zetra-chrome-border)) !important;
    background: var(--zetra-sidebar-profile-bg, var(--zetra-profile-bg)) !important;
}

.fleet-shell:not(.rail-pinned) .rail-profile-info,
.rail-profile-info {
    display: grid !important;
}

.fleet-shell:not(.rail-pinned) .rail-profile-caret,
.rail-profile-caret {
    display: inline-flex !important;
}

.fleet-shell:not(.rail-pinned) .rail-profile-actions:not(.is-open),
.rail-profile-actions:not(.is-open) {
    display: none !important;
}

.fleet-shell:not(.rail-pinned) .rail-profile-actions.is-open,
.rail-profile-actions.is-open {
    display: grid !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-point-close,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-ruler-panel button[aria-label],
:is(html.dark-mode, [data-bs-theme="dark"]) .map-nearby-panel header button,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-area-check-panel header button {
    color: var(--fleet-text);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-point-actions {
    border-top-color: rgba(255, 255, 255, .12);
}

@media (max-width: 900px) {
    .top-toolbar {
        grid-template-columns: minmax(0, 1fr) auto;
    }
}

/* Profile card guard: keep avatar square and text visible after collapsed rail overrides. */
.rail-profile-link,
.fleet-shell:not(.rail-pinned) .rail-profile-link,
.fleet-shell:not(.rail-pinned) .left-rail:not(:hover):not(:focus-within) .rail-profile-link {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 16px !important;
    align-items: center !important;
    justify-content: initial !important;
    gap: 10px !important;
    width: 100% !important;
    min-height: 76px !important;
    padding: 12px !important;
    border: 1px solid var(--zetra-sidebar-profile-border, var(--zetra-chrome-border)) !important;
    border-radius: 8px !important;
    background: var(--zetra-sidebar-profile-bg, var(--zetra-profile-bg)) !important;
}

.rail-profile-link .rail-avatar,
.fleet-shell:not(.rail-pinned) .rail-profile-link .rail-avatar,
.fleet-shell:not(.rail-pinned) .left-rail:not(:hover):not(:focus-within) .rail-profile-link .rail-avatar {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    justify-self: center !important;
    align-self: center !important;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    aspect-ratio: 1 / 1 !important;
    padding: 0 !important;
    overflow: hidden !important;
    color: #fff !important;
    border-radius: 9px !important;
    line-height: 1 !important;
    text-align: center !important;
}

.rail-profile-link .rail-profile-cover,
.fleet-shell:not(.rail-pinned) .left-rail:not(:hover):not(:focus-within) .rail-profile-link .rail-profile-cover {
    inset: 0 !important;
    border-radius: inherit;
}

.rail-profile-info,
.fleet-shell:not(.rail-pinned) .rail-profile-info,
.fleet-shell:not(.rail-pinned) .left-rail:not(:hover):not(:focus-within) .rail-profile-info {
    display: grid !important;
    min-width: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.rail-profile-caret,
.fleet-shell:not(.rail-pinned) .rail-profile-caret,
.fleet-shell:not(.rail-pinned) .left-rail:not(:hover):not(:focus-within) .rail-profile-caret {
    display: inline-flex !important;
    justify-self: end !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Route workbench: keep route controls out of the map center. */
.map-workspace .route-workbench-panel {
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 7;
    display: grid;
    align-content: start;
    width: min(560px, calc(100% - 24px));
    overflow: auto;
    color: var(--fleet-text);
    border: 1px solid var(--fleet-line-strong);
    border-radius: 8px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 10px 28px rgba(17, 24, 39, .18);
}

.route-workbench-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border-bottom: 1px solid var(--fleet-line-strong);
    background: var(--fleet-panel-header-bg);
}

.route-workbench-head div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.route-workbench-head strong,
.route-workbench-head span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-workbench-head strong {
    color: var(--fleet-text);
    font-size: 15px;
    font-weight: 600;
}

.route-workbench-head span {
    color: var(--fleet-soft-text);
    font-size: 11px;
}

.route-workbench-head button,
.route-workbench-reopen {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--fleet-text);
    border: 1px solid var(--fleet-border);
    border-radius: 5px;
    background: var(--fleet-sidebar-bg-soft);
    cursor: pointer;
}

.route-workbench-head button {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
}

.route-workbench-reopen {
    position: absolute;
    top: 76px;
    left: 12px;
    z-index: 8;
    gap: 7px;
    max-width: min(360px, calc(100% - 24px));
    min-height: 38px;
    padding: 0 10px;
    box-shadow: 0 6px 18px rgba(17, 24, 39, .18);
    text-align: left;
}

.route-workbench-reopen span,
.route-workbench-reopen small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-workbench-reopen span {
    font-weight: 600;
}

.route-workbench-reopen small {
    color: var(--fleet-soft-text);
    font-size: 10px;
}

.route-workbench-panel .route-day-panel,
.route-workbench-panel .timeline-tabs-strip,
.route-workbench-panel .route-event-strip,
.route-workbench-panel .route-playback-panel,
.route-workbench-panel .route-empty-panel,
.route-workbench-panel .route-chart-panel,
.route-workbench-panel .timeline-data-panel {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: auto !important;
    max-width: none !important;
    box-shadow: none !important;
}

.route-workbench-panel .route-day-panel,
.route-workbench-panel .timeline-tabs-strip,
.route-workbench-panel .route-event-strip,
.route-workbench-panel .route-playback-panel,
.route-workbench-panel .route-empty-panel,
.route-workbench-panel .route-chart-panel {
    margin: 0;
    padding: 12px;
    border: 0;
    border-bottom: 1px solid var(--fleet-line-strong);
    border-radius: 0;
    background: transparent;
}

.route-workbench-panel .route-day-panel {
    grid-template-columns: 1fr !important;
    align-items: stretch;
    gap: 10px;
    min-height: 0;
    overflow: visible;
}

.route-workbench-panel .route-day-summary strong,
.route-workbench-panel .route-day-summary span {
    white-space: normal;
}

.route-workbench-panel .route-date-controls,
.route-workbench-panel .route-quick-actions {
    justify-content: flex-start;
}

.route-workbench-panel .route-date-field,
.route-workbench-panel .route-time-field {
    grid-template-columns: 44px minmax(0, 1fr);
    width: 100%;
}

.route-workbench-panel .route-date-field input,
.route-workbench-panel .route-time-field input {
    width: 100%;
}

.route-workbench-panel .timeline-tabs-strip {
    display: flex;
    flex-wrap: nowrap;
    min-height: 0;
    max-height: none;
    overflow-x: auto;
}

.route-workbench-panel .route-event-strip {
    min-height: 0;
}

.route-workbench-panel .route-playback-panel {
    grid-template-columns: 1fr !important;
    grid-template-areas:
        "controls"
        "scrubber"
        "actions"
        "metrics"
        "point" !important;
    max-height: none;
    overflow: visible;
}

.route-workbench-panel .route-playback-controls,
.route-workbench-panel .route-playback-actions,
.route-workbench-panel .route-playback-point {
    justify-content: flex-start;
}

.route-workbench-panel .route-playback-controls {
    flex-wrap: wrap;
}

.route-workbench-panel .route-playback-scrubber {
    grid-template-columns: minmax(0, 1fr) 64px;
}

.route-workbench-panel .route-playback-metrics,
.route-workbench-panel .route-playback-point {
    align-items: stretch;
}

.route-workbench-panel .route-playback-metrics span,
.route-workbench-panel .route-playback-point span {
    max-width: none;
    white-space: normal;
}

.route-workbench-panel .route-chart-panel {
    grid-template-columns: 1fr;
    max-height: none;
}

.route-workbench-panel .timeline-data-panel {
    min-height: 320px;
    max-height: 48vh;
    overflow: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-workspace .route-workbench-panel {
    color: var(--fleet-text);
    border-color: rgba(255, 255, 255, .15);
    background: rgba(30, 40, 53, .97);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .36);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-head {
    border-bottom-color: rgba(255, 255, 255, .12);
    background: var(--fleet-panel-header-bg);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-head button,
:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-reopen {
    color: var(--fleet-text);
    border-color: rgba(255, 255, 255, .13);
    background: #263241;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-panel .route-day-panel,
:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-panel .timeline-tabs-strip,
:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-panel .route-event-strip,
:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-panel .route-playback-panel,
:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-panel .route-empty-panel,
:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-panel .route-chart-panel {
    border-bottom-color: rgba(255, 255, 255, .12);
}

@media (max-width: 900px) {
    .map-workspace .route-workbench-panel {
        top: 12px;
        right: 12px;
        bottom: 12px;
        left: 12px;
        width: auto;
    }

    .route-workbench-panel .timeline-data-panel {
        max-height: 42vh;
    }
}

:is(html.dark-mode, [data-bs-theme="dark"]) .report-popular-box strong,
:is(html.dark-mode, [data-bs-theme="dark"]) .report-popular-item,
:is(html.dark-mode, [data-bs-theme="dark"]) .report-data-box strong,
:is(html.dark-mode, [data-bs-theme="dark"]) .report-data-box p,
:is(html.dark-mode, [data-bs-theme="dark"]) .report-vehicle-selector-header h3,
:is(html.dark-mode, [data-bs-theme="dark"]) .report-vehicle-table {
    color: var(--fleet-text);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .report-popular-item {
    border-color: var(--fleet-border);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .report-popular-item:hover {
    background: var(--fleet-row-hover);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .report-vehicle-selector-header,
:is(html.dark-mode, [data-bs-theme="dark"]) .report-vehicle-table th {
    color: var(--fleet-text);
    border-color: var(--fleet-border);
    background: var(--fleet-sidebar-bg-soft);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .report-vehicle-table td {
    color: var(--fleet-text);
    border-color: var(--fleet-border);
    background: var(--fleet-surface);
}

.grid-actions-column {
    position: static;
    right: auto;
    z-index: auto;
    background: var(--fleet-sidebar-bg-soft);
}

.dense-grid {
    border-collapse: separate;
    border-spacing: 0;
}

.dense-grid-select-col {
    width: 46px;
}

.dense-grid-actions-col {
    width: var(--grid-action-width);
}

.dense-grid-data-col {
    width: 158px;
}

.dense-grid th:not(.grid-actions-column),
.dense-grid td:not(.grid-row-actions) {
    position: relative;
    z-index: 0;
}

.grid-row-actions {
    position: static;
    right: auto;
    z-index: auto !important;
    isolation: auto;
    contain: none;
    overflow: hidden;
    background: var(--fleet-surface) !important;
    background-clip: padding-box;
    box-shadow: inset 1px 0 0 var(--fleet-border);
}

.grid-row-actions::before {
    content: none;
}

.grid-row-actions::after {
    content: none;
}

.grid-row-actions > * {
    position: relative;
    z-index: auto;
}

.dense-grid tbody tr:nth-child(even) .grid-row-actions {
    background: var(--fleet-row-alt) !important;
}

.dense-grid tbody tr:hover .grid-row-actions {
    background: var(--fleet-row-hover) !important;
}

.grid-icon-link {
    flex: 0 0 30px;
    color: var(--bs-primary);
    border-color: var(--fleet-action-primary-border);
    background: var(--fleet-action-primary-bg);
}

.grid-icon-link.danger {
    color: var(--fleet-action-danger);
    border-color: var(--fleet-action-danger-border);
    background: var(--fleet-action-danger-bg);
}

/* Dashboard toolbar polish: keep search/select fields legible and controls touch-friendly. */
.dashboard-toolbar {
    min-height: 58px;
}

.dashboard-toolbar > .export-toolbar,
.automatic-reports-toolbar > .export-toolbar {
    gap: 10px;
    min-height: 46px;
    padding: 7px 10px;
}

.export-toolbar-actions {
    gap: 7px;
}

.export-toolbar .mud-icon-button,
.export-toolbar-button {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
}

.export-toolbar .mud-icon-button .mud-icon-root,
.export-toolbar-button .mud-icon-root,
.export-toolbar .mud-icon-button svg,
.export-toolbar-button svg {
    width: 21px !important;
    height: 21px !important;
    font-size: 21px !important;
}

.export-toolbar .mud-icon-button:hover:not(:disabled),
.export-toolbar-button:hover:not(:disabled),
.export-toolbar .mud-icon-button:focus-visible,
.export-toolbar-button:focus-visible {
    border-color: rgba(var(--bs-primary-rgb), .35) !important;
}

.export-toolbar select {
    min-width: 184px;
    min-height: 42px;
    padding: 0 36px 0 12px;
    font-size: 13px;
    line-height: 42px;
}

.export-toolbar-search,
.export-toolbar .mud-input-control {
    min-width: 220px;
}

.export-toolbar .mud-input-control,
.export-toolbar .mud-input-root,
.export-toolbar .mud-input,
.export-toolbar .mud-input-slot,
.export-toolbar .mud-input-adornment,
.export-toolbar .mud-input-control .mud-input-control-input-container {
    min-height: 42px;
}

.export-toolbar .mud-input-root,
.export-toolbar .mud-input,
.export-toolbar .mud-input-slot {
    align-items: center;
}

.export-toolbar .mud-input-control input,
.export-toolbar .mud-input-root input,
.export-toolbar input {
    min-height: 40px;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    font-size: 13px !important;
    line-height: 40px !important;
}

.export-toolbar .mud-input-outlined-border,
.export-toolbar .mud-input-root.mud-input-outlined .mud-input-outlined-border {
    border-color: var(--fleet-border) !important;
}

.export-toolbar select,
.export-toolbar input,
.export-toolbar .mud-input-control,
.export-toolbar .mud-input-root,
.export-toolbar .mud-input,
.export-toolbar .mud-input-slot {
    color: var(--fleet-text) !important;
    background-color: var(--fleet-surface) !important;
}

.export-toolbar .mud-input-adornment,
.export-toolbar .mud-input-adornment .mud-icon-root {
    color: var(--fleet-soft-text) !important;
}

.export-toolbar input::placeholder {
    color: var(--fleet-soft-text) !important;
    opacity: 1 !important;
}

.dashboard-refresh-controls .dialog-field select,
.dashboard-refresh-controls .dialog-field input:not([type="checkbox"]),
.filter-bar input,
.filter-bar select,
.module-panel .mud-input-control,
.module-panel .mud-input-root,
.module-panel .mud-input,
.module-panel .mud-input-slot {
    color: var(--fleet-text) !important;
    background-color: var(--fleet-surface) !important;
}

.filter-bar input::placeholder,
.module-panel input::placeholder {
    color: var(--fleet-soft-text) !important;
    opacity: 1 !important;
}

.panel-command {
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
}

.panel-command.compact {
    min-height: 32px;
    padding: 0 10px;
}

.segmented-panel button {
    min-height: 36px;
    font-size: 13px;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .export-toolbar select,
:is(html.dark-mode, [data-bs-theme="dark"]) .export-toolbar input,
:is(html.dark-mode, [data-bs-theme="dark"]) .export-toolbar .mud-input-control,
:is(html.dark-mode, [data-bs-theme="dark"]) .export-toolbar .mud-input-root,
:is(html.dark-mode, [data-bs-theme="dark"]) .export-toolbar .mud-input,
:is(html.dark-mode, [data-bs-theme="dark"]) .export-toolbar .mud-input-slot,
:is(html.dark-mode, [data-bs-theme="dark"]) .dashboard-refresh-controls .dialog-field select,
:is(html.dark-mode, [data-bs-theme="dark"]) .dashboard-refresh-controls .dialog-field input:not([type="checkbox"]),
:is(html.dark-mode, [data-bs-theme="dark"]) .filter-bar input,
:is(html.dark-mode, [data-bs-theme="dark"]) .filter-bar select,
:is(html.dark-mode, [data-bs-theme="dark"]) .module-panel .mud-input-control,
:is(html.dark-mode, [data-bs-theme="dark"]) .module-panel .mud-input-root,
:is(html.dark-mode, [data-bs-theme="dark"]) .module-panel .mud-input,
:is(html.dark-mode, [data-bs-theme="dark"]) .module-panel .mud-input-slot {
    color: #f4f8fc !important;
    border-color: var(--fleet-border) !important;
    background-color: #202b39 !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .export-toolbar .mud-input-outlined-border,
:is(html.dark-mode, [data-bs-theme="dark"]) .export-toolbar .mud-input-root.mud-input-outlined .mud-input-outlined-border {
    border-color: #4d5968 !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .export-toolbar input::placeholder,
:is(html.dark-mode, [data-bs-theme="dark"]) .filter-bar input::placeholder,
:is(html.dark-mode, [data-bs-theme="dark"]) .module-panel input::placeholder {
    color: #aeb9c7 !important;
    opacity: 1 !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .export-toolbar .mud-input-adornment,
:is(html.dark-mode, [data-bs-theme="dark"]) .export-toolbar .mud-input-adornment .mud-icon-root {
    color: #aeb9c7 !important;
}

@media (max-width: 900px) {
    .export-toolbar-search,
    .export-toolbar .mud-input-control {
        min-width: 180px;
    }

    .export-toolbar select {
        min-width: 160px;
    }
}

/* Google map dark-mode compatibility. The map tiles are themed from fleetMap.js; these cover Google UI chrome. */
:is(html.dark-mode, [data-bs-theme="dark"]) .google-map-canvas[data-map-mode="google"] {
    color-scheme: dark;
    background: #162131;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .google-map-canvas .gm-style,
:is(html.dark-mode, [data-bs-theme="dark"]) .google-map-canvas .gm-style * {
    color-scheme: dark;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .google-map-canvas .gm-control-active,
:is(html.dark-mode, [data-bs-theme="dark"]) .google-map-canvas .gm-fullscreen-control,
:is(html.dark-mode, [data-bs-theme="dark"]) .google-map-canvas .gmnoprint > div,
:is(html.dark-mode, [data-bs-theme="dark"]) .google-map-canvas .gm-style-mtc button,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-float-actions .mud-icon-button {
    color: var(--fleet-text) !important;
    border: 1px solid rgba(255, 255, 255, .14) !important;
    background-color: rgba(30, 40, 53, .96) !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .28) !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .google-map-canvas .gm-control-active:hover,
:is(html.dark-mode, [data-bs-theme="dark"]) .google-map-canvas .gm-fullscreen-control:hover,
:is(html.dark-mode, [data-bs-theme="dark"]) .google-map-canvas .gm-style-mtc button:hover,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-float-actions .mud-icon-button:hover {
    background-color: rgba(43, 57, 74, .98) !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .google-map-canvas .gm-control-active img,
:is(html.dark-mode, [data-bs-theme="dark"]) .google-map-canvas .gm-fullscreen-control img,
:is(html.dark-mode, [data-bs-theme="dark"]) .google-map-canvas .gm-svpc img,
:is(html.dark-mode, [data-bs-theme="dark"]) .google-map-canvas .gmnoprint img,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-float-actions .mud-icon-root {
    color: var(--fleet-text) !important;
    filter: invert(1) hue-rotate(180deg) brightness(1.08) contrast(.95);
    opacity: .92;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .google-map-canvas .gm-style-iw-c,
:is(html.dark-mode, [data-bs-theme="dark"]) .google-map-canvas .gm-style-iw-tc::after {
    color: var(--fleet-text) !important;
    background: #202b39 !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .38) !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .google-map-canvas .gm-style-iw-d {
    color: var(--fleet-text) !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .google-map-canvas .gm-ui-hover-effect {
    opacity: .85 !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .google-map-canvas .gm-ui-hover-effect span {
    background-color: var(--fleet-text) !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-point-popup::after {
    border-color: rgba(255, 255, 255, .15);
    background: rgba(30, 40, 53, .97);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-point-action,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-route-choice,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-route-choice button,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-settings-panel button,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-area-form input,
:is(html.dark-mode, [data-bs-theme="dark"]) .route-planner-options input[type="number"],
:is(html.dark-mode, [data-bs-theme="dark"]) .route-planner-point input {
    color: var(--fleet-text) !important;
    border-color: rgba(255, 255, 255, .14) !important;
    background: #202b39 !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-route-choice button:hover,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-point-action:hover,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-point-action.selected {
    color: #8fc5f7 !important;
    background: rgba(var(--bs-primary-rgb), .18) !important;
}

.admin-module-layout .module-panel {
    min-width: 300px;
}

.admin-panel-actions {
    display: grid;
    gap: 8px;
    padding: 0 8px 10px;
}

.admin-panel-actions .panel-command,
.admin-context-actions .panel-command {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.admin-partner-list {
    display: grid;
    gap: 8px;
    padding: 0 8px 12px;
}

.admin-partner-button {
    display: grid;
    gap: 3px;
    width: 100%;
    min-height: 72px;
    padding: 10px;
    color: var(--fleet-text);
    text-align: left;
    background: #fff;
    border: 1px solid var(--fleet-border);
    border-radius: 6px;
}

.admin-partner-button strong,
.admin-context-bar strong {
    overflow-wrap: anywhere;
}

.admin-partner-button span,
.admin-partner-button small,
.admin-summary-strip span,
.admin-summary-strip small,
.admin-context-bar span {
    color: var(--fleet-soft-text);
}

.admin-partner-button.selected,
.admin-partner-button:hover {
    border-color: var(--fleet-red);
    background: #fff7f7;
}

.admin-workspace {
    gap: 10px;
}

.admin-summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 8px;
}

.admin-summary-strip article {
    min-width: 0;
    min-height: 76px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--fleet-border);
    border-radius: 6px;
}

.admin-summary-strip strong {
    display: block;
    color: var(--fleet-red);
    font-size: 24px;
    line-height: 1.1;
}

.admin-context-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid var(--fleet-border);
    border-radius: 6px;
}

.admin-context-bar > div:first-child {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.admin-context-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--fleet-border);
    border-radius: 6px;
}

.admin-tabs button {
    min-height: 34px;
    padding: 0 12px;
    color: var(--fleet-text);
    background: #f8fafc;
    border: 1px solid transparent;
    border-radius: 4px;
    font-weight: 600;
}

.admin-tabs button.selected,
.admin-tabs button:hover {
    color: #fff;
    background: var(--fleet-red);
    border-color: var(--fleet-red);
}

@media (max-width: 900px) {
    .admin-summary-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-context-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-context-actions {
        justify-content: stretch;
    }

    .admin-context-actions .panel-command {
        flex: 1 1 120px;
    }
}

/* Map route readability */
.map-workspace {
    --map-route-panel-left: 12px;
    --map-route-panel-right: 70px;
    --map-route-control-top: 142px;
    --map-route-tabs-top: 214px;
    --map-route-events-top: 262px;
    --map-route-playback-top: 314px;
    --map-route-timeline-top: 444px;
    --map-route-bottom-panel-height: 124px;
    --map-selected-vehicle-sidebar-width: 360px;
}

.fleet-shell.view-map-focus .map-workspace {
    --map-route-panel-right: 98px;
}

.map-workspace[data-selected-vehicle]:not([data-selected-vehicle=""]) {
    --map-route-panel-right: calc(var(--map-selected-vehicle-sidebar-width) + 24px);
}

.map-workspace[data-selected-vehicle]:not([data-selected-vehicle=""]) .map-float-actions {
    right: calc(var(--map-selected-vehicle-sidebar-width) + 28px);
}

.map-workspace .map-overlay-panel,
.map-workspace .selected-vehicle-panel {
    color: var(--fleet-text);
    border-color: var(--fleet-line-strong);
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 8px 22px rgba(17, 24, 39, .14);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-workspace .map-overlay-panel,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-workspace .selected-vehicle-panel {
    color: var(--fleet-text);
    border-color: rgba(255, 255, 255, .15);
    background: rgba(30, 40, 53, .97);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .36);
}

.map-workspace .route-day-panel {
    top: var(--map-route-control-top);
    left: var(--map-route-panel-left);
    right: var(--map-route-panel-right);
    display: grid;
    grid-template-columns: minmax(240px, 1.05fr) minmax(330px, auto) minmax(360px, 1.35fr);
    gap: 10px;
    align-items: center;
    min-height: 58px;
    max-height: none;
    overflow: visible;
    padding: 9px 10px;
    border-radius: 6px;
    font-size: 12px;
}

.route-day-summary {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.route-day-summary strong,
.route-day-summary span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-day-summary strong {
    color: var(--fleet-text);
    font-size: 13px;
    font-weight: 600;
}

.route-day-summary span {
    color: var(--fleet-soft-text);
    font-weight: 600;
}

.route-date-controls,
.route-quick-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.route-date-controls {
    justify-content: center;
}

.route-quick-actions {
    justify-content: flex-end;
}

.route-date-field,
.route-time-field {
    display: grid;
    grid-template-columns: auto minmax(84px, auto);
    align-items: center;
    gap: 5px;
    min-width: 0;
    color: var(--fleet-soft-text);
    font-size: 11px;
    font-weight: 600;
}

.map-workspace .route-date-field span,
.map-workspace .route-time-field span {
    color: var(--fleet-soft-text);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
}

.map-workspace .route-day-panel input,
.map-workspace .route-playback-panel select {
    height: 30px;
    min-width: 0;
    color: var(--fleet-text);
    border-color: var(--fleet-border);
    border-radius: 5px;
    background: var(--fleet-sidebar-bg-soft);
    font-weight: 600;
}

.map-workspace .route-date-field input {
    width: 140px;
}

.map-workspace .route-time-field input {
    width: 96px;
}

.map-workspace .route-day-panel .panel-command.compact,
.map-workspace .route-playback-actions .panel-command.compact {
    min-height: 30px;
    padding: 0 10px;
    font-weight: 600;
}

.map-workspace .route-day-panel .panel-command.compact:disabled,
.map-workspace .route-playback-actions .panel-command.compact:disabled {
    opacity: .55;
}

.map-workspace .report-summary-strip.map-overlay-panel.timeline-tabs-strip {
    top: var(--map-route-tabs-top);
    left: var(--map-route-panel-left);
    right: var(--map-route-panel-right);
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    min-height: 42px;
    max-height: 46px;
    padding: 6px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 6px;
}

.timeline-tabs-strip button {
    flex: 0 0 auto;
    min-height: 30px;
    min-width: 76px;
    padding: 0 12px;
    color: var(--fleet-text);
    border: 1px solid var(--fleet-border);
    border-radius: 5px;
    background: var(--fleet-sidebar-bg-soft);
    font-size: 12px;
    font-weight: 600;
}

.timeline-tabs-strip button.selected {
    color: #fff;
    border-color: var(--fleet-red);
    background: var(--fleet-red);
}

.map-workspace .route-event-strip {
    top: var(--map-route-events-top);
    left: var(--map-route-panel-left);
    right: var(--map-route-panel-right);
    min-height: 38px;
    padding: 5px 8px;
    border-radius: 6px;
}

.map-workspace .route-playback-panel {
    top: var(--map-route-playback-top);
    left: var(--map-route-panel-left);
    right: var(--map-route-panel-right);
    display: grid;
    grid-template-columns: minmax(270px, auto) minmax(280px, 1fr) auto;
    grid-template-areas:
        "controls scrubber actions"
        "metrics metrics point";
    gap: 8px 10px;
    align-items: center;
    max-height: 124px;
    padding: 8px 10px;
    overflow: auto;
    border-radius: 6px;
    font-size: 12px;
}

.map-workspace .route-empty-panel,
.map-workspace .route-chart-panel {
    left: var(--map-route-panel-left);
    right: var(--map-route-panel-right);
    border-radius: 6px;
}

.map-workspace .route-playback-controls {
    grid-area: controls;
    justify-content: flex-start;
    min-width: 0;
}

.map-workspace .route-playback-scrubber {
    grid-area: scrubber;
    grid-template-columns: minmax(180px, 1fr) 64px;
}

.map-workspace .route-playback-actions {
    grid-area: actions;
}

.map-workspace .route-playback-metrics {
    grid-area: metrics;
}

.map-workspace .route-playback-point {
    grid-area: point;
    justify-content: flex-end;
}

.map-workspace .route-playback-metrics span,
.map-workspace .route-playback-point span,
.map-workspace .selected-vehicle-metrics span {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    color: var(--fleet-text);
    border-color: var(--fleet-border);
    border-radius: 5px;
    background: var(--fleet-sidebar-bg-soft);
    font-weight: 600;
}

.map-workspace .route-playback-controls .mud-icon-button {
    color: var(--fleet-text);
    border-color: var(--fleet-border);
    background: var(--fleet-sidebar-bg-soft);
}

.map-workspace .route-playback-controls strong {
    color: var(--fleet-text);
    font-weight: 600;
}

.map-workspace .timeline-data-panel {
    top: var(--map-route-timeline-top);
    right: var(--map-route-panel-right);
    bottom: 16px;
    max-height: none;
    border-radius: 6px;
}

.map-workspace[data-selected-vehicle]:not([data-selected-vehicle=""]) .timeline-data-panel {
    top: var(--map-route-timeline-top);
    bottom: 16px;
    max-height: none;
}

.map-workspace[data-route-chart-visible="true"] .timeline-data-panel {
    top: 566px;
}

.map-workspace .selected-vehicle-panel {
    top: 12px;
    right: 12px;
    bottom: 12px;
    left: auto;
    z-index: 8;
    display: grid;
    align-content: start;
    grid-template-columns: 1fr;
    gap: 0;
    width: min(380px, calc(100% - 24px));
    max-height: none;
    padding: 0;
    overflow: auto;
    border-radius: 8px;
    font-size: 12px;
}

.fleet-shell.view-map-focus .map-workspace .selected-vehicle-panel {
    right: 12px;
}

.map-workspace .selected-vehicle-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border-bottom: 1px solid var(--fleet-line-strong);
    background: var(--fleet-panel-header-bg);
}

.map-workspace .selected-vehicle-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.map-workspace .selected-vehicle-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    color: #fff;
    border-radius: 8px;
    background: var(--fleet-red);
    box-shadow: inset 0 -10px 18px rgba(0, 0, 0, .12);
}

.map-workspace .selected-vehicle-title {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.map-workspace .selected-vehicle-head strong {
    color: var(--fleet-text);
    font-size: 17px;
    line-height: 1.15;
}

.map-workspace .selected-vehicle-kicker {
    color: var(--fleet-soft-text);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.map-workspace .selected-vehicle-title span,
.map-workspace .selected-vehicle-title small {
    min-width: 0;
    overflow: hidden;
    color: var(--fleet-soft-text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.map-workspace .selected-vehicle-title small {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
}

.selected-vehicle-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    color: var(--fleet-text);
    border: 1px solid var(--fleet-border);
    border-radius: 5px;
    background: var(--fleet-sidebar-bg-soft);
    cursor: pointer;
}

.selected-vehicle-status-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    color: var(--fleet-soft-text);
    border-bottom: 1px solid var(--fleet-line-strong);
    background: rgba(248, 250, 252, .66);
    font-size: 11px;
}

.selected-vehicle-status-line span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.selected-vehicle-primary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--fleet-line-strong);
}

.selected-vehicle-primary-action {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    grid-template-areas:
        "icon label"
        "icon hint";
    align-items: center;
    gap: 1px 8px;
    min-height: 48px;
    padding: 8px;
    color: var(--fleet-text);
    text-align: left;
    border: 1px solid var(--fleet-border);
    border-radius: 6px;
    background: var(--fleet-surface);
    cursor: pointer;
}

.selected-vehicle-primary-action.primary {
    color: #fff;
    border-color: var(--fleet-red);
    background: var(--fleet-red);
}

.selected-vehicle-primary-action .mud-icon-root {
    grid-area: icon;
}

.selected-vehicle-primary-action span {
    grid-area: label;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.selected-vehicle-primary-action small {
    grid-area: hint;
    min-width: 0;
    overflow: hidden;
    color: var(--fleet-soft-text);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
}

.selected-vehicle-primary-action.primary small {
    color: rgba(255, 255, 255, .84);
}

.selected-vehicle-section {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 12px;
    border-bottom: 1px solid var(--fleet-line-strong);
}

.selected-vehicle-section:last-child {
    border-bottom: 0;
}

.selected-vehicle-section-title {
    color: var(--fleet-soft-text);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.selected-vehicle-action-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
}

.selected-vehicle-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    min-width: 0;
    padding: 5px 7px;
    color: var(--fleet-text);
    text-align: left;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
}

.selected-vehicle-action:hover {
    background: var(--fleet-row-hover);
}

.selected-vehicle-action span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.map-workspace .selected-vehicle-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--fleet-border);
    border-radius: 6px;
}

.map-workspace .selected-vehicle-metrics span {
    display: grid;
    gap: 2px;
    align-content: center;
    min-height: 50px;
    padding: 8px;
    overflow: visible;
    border-right: 1px solid var(--fleet-border);
    border-bottom: 1px solid var(--fleet-border);
    border-radius: 0;
    text-overflow: clip;
    white-space: normal;
}

.map-workspace .selected-vehicle-metrics span:nth-child(even) {
    border-right: 0;
}

.map-workspace .selected-vehicle-metrics span:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.map-workspace .selected-vehicle-metrics span small {
    color: var(--fleet-soft-text);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.map-workspace .selected-vehicle-metrics span strong {
    min-width: 0;
    overflow: hidden;
    color: var(--fleet-text);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
}

.map-workspace .selected-vehicle-details {
    grid-template-columns: 1fr;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--fleet-border);
    border-radius: 6px;
}

.map-workspace .selected-vehicle-details div {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 8px;
    padding: 7px 9px;
    border-bottom: 1px solid rgba(203, 213, 225, .68);
}

.map-workspace .selected-vehicle-details div:last-child {
    border-bottom: 0;
}

.map-workspace .selected-vehicle-details dd {
    color: var(--fleet-text);
    white-space: normal;
    overflow-wrap: anywhere;
}

.map-workspace .selected-vehicle-details dt {
    font-weight: 600;
    white-space: normal;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-workspace .route-day-panel input,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-workspace .route-playback-panel select,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-workspace .route-playback-metrics span,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-workspace .route-playback-point span,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-workspace .selected-vehicle-metrics span,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-workspace .route-playback-controls .mud-icon-button,
:is(html.dark-mode, [data-bs-theme="dark"]) .timeline-tabs-strip button {
    color: var(--fleet-text);
    border-color: rgba(255, 255, 255, .13);
    background: #263241;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .timeline-tabs-strip button.selected {
    color: #fff;
    border-color: var(--fleet-red);
    background: var(--fleet-red);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .selected-vehicle-section,
:is(html.dark-mode, [data-bs-theme="dark"]) .selected-vehicle-action,
:is(html.dark-mode, [data-bs-theme="dark"]) .selected-vehicle-close,
:is(html.dark-mode, [data-bs-theme="dark"]) .selected-vehicle-primary-action {
    color: var(--fleet-text);
    border-color: rgba(255, 255, 255, .13);
    background: #263241;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .selected-vehicle-status-line {
    color: var(--fleet-soft-text);
    border-bottom-color: rgba(255, 255, 255, .12);
    background: #202b39;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .selected-vehicle-action:hover,
:is(html.dark-mode, [data-bs-theme="dark"]) .selected-vehicle-primary-action:hover {
    background: #2d3a49;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .selected-vehicle-primary-action.primary {
    color: #fff;
    border-color: var(--fleet-red);
    background: var(--fleet-red);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-workspace .selected-vehicle-metrics,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-workspace .selected-vehicle-details {
    border-color: rgba(255, 255, 255, .13);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-workspace .selected-vehicle-metrics span {
    border-color: rgba(255, 255, 255, .12);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-workspace .selected-vehicle-details div {
    border-bottom-color: rgba(255, 255, 255, .12);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .vehicle-row,
:is(html.dark-mode, [data-bs-theme="dark"]) .vehicle-row:nth-child(even) {
    color: var(--fleet-text);
    background: var(--fleet-surface);
    border-color: var(--fleet-line-strong);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .vehicle-row:hover {
    background: var(--fleet-row-hover);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .vehicle-row.selected,
:is(html.dark-mode, [data-bs-theme="dark"]) .vehicle-row.selected:nth-child(even),
:is(html.dark-mode, [data-bs-theme="dark"]) .vehicle-row.selected:hover {
    color: var(--fleet-text);
    background: rgba(var(--bs-primary-rgb), .16);
    box-shadow: inset 3px 0 0 var(--bs-primary);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .vehicle-row .vehicle-row-body strong {
    color: var(--fleet-text);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .vehicle-row .vehicle-row-body > span,
:is(html.dark-mode, [data-bs-theme="dark"]) .vehicle-row .vehicle-row-body small,
:is(html.dark-mode, [data-bs-theme="dark"]) .vehicle-row .vehicle-telemetry-grid span {
    color: var(--fleet-soft-text);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .vehicle-row.selected .vehicle-row-body strong,
:is(html.dark-mode, [data-bs-theme="dark"]) .vehicle-row.selected .vehicle-row-body > span {
    color: #f4f8fb;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .vehicle-row.selected .vehicle-row-body small,
:is(html.dark-mode, [data-bs-theme="dark"]) .vehicle-row.selected .vehicle-telemetry-grid span {
    color: #c2ceda;
    border-bottom-color: rgba(255, 255, 255, .18);
}

@media (max-width: 1400px) {
    .map-workspace {
        --map-route-tabs-top: 250px;
        --map-route-events-top: 298px;
        --map-route-playback-top: 350px;
        --map-route-timeline-top: 494px;
    }

    .map-workspace .route-day-panel {
        grid-template-columns: 1fr;
        align-items: stretch;
        max-height: 104px;
        overflow: auto;
    }

    .route-date-controls,
    .route-quick-actions {
        justify-content: flex-start;
    }

    .map-workspace .route-playback-panel {
        grid-template-columns: minmax(230px, auto) minmax(220px, 1fr) auto;
    }

    .map-workspace .selected-vehicle-panel {
        grid-template-columns: 1fr;
        width: min(340px, calc(100% - 24px));
    }
}

@media (max-width: 900px) {
    .map-workspace {
        --map-route-panel-right: 12px;
        --map-route-tabs-top: 304px;
        --map-route-events-top: 352px;
        --map-route-playback-top: 404px;
        --map-route-timeline-top: 574px;
        --map-route-bottom-panel-height: 174px;
    }

    .map-workspace[data-selected-vehicle]:not([data-selected-vehicle=""]) {
        --map-route-panel-right: 12px;
    }

    .map-workspace[data-selected-vehicle]:not([data-selected-vehicle=""]) .map-float-actions {
        right: 12px;
    }

    .map-workspace .route-day-panel {
        right: var(--map-route-panel-right);
        max-height: 154px;
    }

    .map-workspace .report-summary-strip.map-overlay-panel.timeline-tabs-strip,
    .map-workspace .route-event-strip,
    .map-workspace .route-playback-panel {
        right: var(--map-route-panel-right);
    }

    .map-workspace .route-playback-panel {
        grid-template-columns: 1fr;
        grid-template-areas:
            "controls"
            "scrubber"
            "actions"
            "metrics"
            "point";
        max-height: 166px;
    }

    .map-workspace .route-playback-actions,
    .map-workspace .route-playback-point {
        justify-content: flex-start;
    }

    .map-workspace .selected-vehicle-panel {
        top: auto;
        right: 12px;
        bottom: 12px;
        left: 12px;
        width: auto;
        grid-template-columns: 1fr;
        max-height: 232px;
    }

    .map-workspace .selected-vehicle-details {
        grid-template-columns: 1fr;
    }

    .map-workspace[data-selected-vehicle]:not([data-selected-vehicle=""]) .timeline-data-panel {
        bottom: 256px;
    }
}

@media (max-width: 560px) {
    .map-workspace .selected-vehicle-primary-actions,
    .map-workspace .selected-vehicle-action-list,
    .map-workspace .selected-vehicle-metrics {
        grid-template-columns: 1fr;
    }
}

/* ZetraERP-inspired shell polish. */
:root {
    --zetra-chrome-bg: #ffffff;
    --zetra-chrome-bg-strong: #eef3f7;
    --zetra-chrome-surface: #f6f9fc;
    --zetra-chrome-surface-hover: #eef5fc;
    --zetra-chrome-border: #dce5ee;
    --zetra-chrome-text: #243447;
    --zetra-chrome-muted: #657386;
    --zetra-chrome-hover-text: #1f6fb8;
    --zetra-chrome-shadow: 0 2px 10px rgba(27, 39, 51, .08);
    --zetra-brand-bg: #eef6fb;
    --zetra-brand-bg-hover: #e7f1fa;
    --zetra-brand-text: #213244;
    --zetra-brand-muted: #526274;
    --zetra-profile-bg: #f5f8fb;
    --zetra-rail-link: #334155;
    --zetra-active-text: #1f6fb8;
    --zetra-active-bg: rgba(52, 143, 226, .12);
    --zetra-active-border: rgba(52, 143, 226, .30);
    --zetra-shell-blue: #348fe2;
    --zetra-shell-cyan: #00acac;
}

html.dark-mode,
html[data-bs-theme="dark"] {
    --zetra-chrome-bg: #20252a;
    --zetra-chrome-bg-strong: #1b2025;
    --zetra-chrome-surface: #262d34;
    --zetra-chrome-surface-hover: #2d363f;
    --zetra-chrome-border: rgba(255, 255, 255, .09);
    --zetra-chrome-text: #f3f7fb;
    --zetra-chrome-muted: #a8b3bf;
    --zetra-chrome-hover-text: #ffffff;
    --zetra-chrome-shadow: 0 2px 10px rgba(0, 0, 0, .22);
    --zetra-brand-bg: #26313a;
    --zetra-brand-bg-hover: #2a3742;
    --zetra-brand-text: #f8fbff;
    --zetra-brand-muted: #d1dde8;
    --zetra-profile-bg: #242b32;
    --zetra-rail-link: #eef5fb;
    --zetra-active-text: #ffffff;
    --zetra-active-bg: rgba(52, 143, 226, .20);
    --zetra-active-border: rgba(52, 143, 226, .42);
}

.top-toolbar {
    color: var(--zetra-chrome-text);
    background: var(--zetra-chrome-bg);
    border-bottom: 1px solid var(--zetra-chrome-border);
    box-shadow: var(--zetra-chrome-shadow);
    backdrop-filter: none;
}

.toolbar-menu-button,
.toolbar-icon,
.toolbar-actions .mud-icon-button,
.toolbar-logout {
    color: var(--zetra-chrome-muted) !important;
    border-color: var(--zetra-chrome-border);
    border-radius: 7px;
    background: var(--zetra-chrome-surface) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.toolbar-menu-button:hover,
.toolbar-menu-button:focus-visible,
.toolbar-icon:hover,
.toolbar-icon:focus-visible,
.toolbar-actions .mud-icon-button:hover,
.toolbar-actions .mud-icon-button:focus-visible,
.toolbar-logout:hover,
.toolbar-logout:focus-visible {
    color: var(--zetra-chrome-hover-text) !important;
    border-color: rgba(52, 143, 226, .45);
    background: var(--zetra-chrome-surface-hover) !important;
}

.toolbar-brand {
    max-width: none;
    height: 38px;
    padding: 0 12px;
    color: var(--zetra-brand-text);
    border-color: var(--zetra-chrome-border);
    border-radius: 8px;
    background: var(--zetra-brand-bg);
}

.toolbar-brand:hover,
.toolbar-brand:focus-visible {
    color: var(--zetra-brand-text);
    border-color: rgba(52, 143, 226, .44);
    background: var(--zetra-brand-bg-hover);
}

.toolbar-logo {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--zetra-shell-cyan), var(--zetra-shell-blue));
    box-shadow: 0 6px 16px rgba(52, 143, 226, .24);
}

.toolbar-brand-text {
    color: var(--zetra-brand-text);
    font-size: 16px;
    font-weight: 600;
}

.toolbar-brand-text b {
    font-weight: 600;
}

.toolbar-brand-text span {
    color: var(--zetra-brand-muted);
    font-weight: 600;
}

.toolbar-module-title {
    max-width: 220px;
    color: var(--zetra-brand-muted);
    border-left-color: var(--zetra-chrome-border);
    font-size: 16px;
    font-weight: 600;
}

.global-search {
    height: 36px;
    color: var(--zetra-chrome-text);
    border-color: var(--zetra-chrome-border);
    border-radius: 8px;
    background: var(--zetra-chrome-surface);
}

.global-search input {
    height: 34px;
    color: var(--zetra-chrome-text);
}

.global-search input::placeholder,
.global-search .mud-icon-root {
    color: var(--zetra-chrome-muted);
}

.toolbar-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 210px;
    min-height: 38px;
    padding: 0 10px;
    color: var(--zetra-chrome-text);
    border: 1px solid transparent;
    border-radius: 7px;
}

.toolbar-user-chip .mud-icon-root {
    color: var(--zetra-chrome-muted);
    font-size: 18px !important;
}

.toolbar-user-copy {
    display: grid;
    min-width: 0;
    line-height: 1.1;
}

.toolbar-user-copy strong,
.toolbar-user-copy small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.toolbar-user-copy strong {
    color: var(--zetra-chrome-text);
    font-size: 12px;
    font-weight: 600;
}

.toolbar-user-copy small {
    color: var(--zetra-chrome-muted);
    font-size: 10px;
    font-weight: 600;
}

.toolbar-logout {
    min-height: 38px;
    color: var(--zetra-chrome-text) !important;
    font-size: 12px;
}

.user-badge {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: linear-gradient(135deg, #ff5b57 0%, #ff9f43 100%);
    box-shadow: 0 8px 18px rgba(255, 95, 87, .22);
}

.left-rail {
    color: var(--zetra-chrome-text);
    background: var(--zetra-chrome-bg);
    border-right-color: var(--zetra-chrome-border);
    box-shadow: var(--zetra-chrome-shadow);
}

.rail-profile {
    border-color: var(--zetra-chrome-border);
    border-radius: 8px;
    background: var(--zetra-profile-bg);
}

.rail-avatar {
    border-radius: 8px;
    background: linear-gradient(135deg, #ff5b57 0%, #ff9f43 100%);
    box-shadow: 0 8px 18px rgba(255, 95, 87, .22);
}

.rail-profile-info strong {
    color: var(--zetra-chrome-text);
    font-size: 12px;
}

.rail-profile-info small,
.rail-menu-header,
.rail-link-caret {
    color: var(--zetra-chrome-muted);
}

.rail-menu-header {
    margin-top: 10px;
    letter-spacing: 0;
}

.rail-link {
    min-height: 38px;
    height: 38px;
    color: var(--zetra-rail-link);
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
}

.rail-link .mud-icon-root:first-child {
    color: var(--zetra-chrome-muted);
    background: transparent;
}

.rail-link:hover,
.rail-link:focus-visible {
    color: var(--zetra-active-text);
    background: rgba(52, 143, 226, .13);
}

.rail-link.active {
    color: var(--zetra-active-text);
    border-color: var(--zetra-active-border);
    background: var(--zetra-active-bg);
    box-shadow: inset 3px 0 0 var(--zetra-shell-blue);
}

.rail-link:hover .mud-icon-root:first-child,
.rail-link:focus-visible .mud-icon-root:first-child,
.rail-link.active .mud-icon-root:first-child {
    color: var(--zetra-active-text);
    background: rgba(52, 143, 226, .16);
}

@media (min-width: 901px) {
    :root {
        --toolbar-height: 48px;
        --rail-width: 204px;
        --rail-expanded-width: 204px;
        --module-panel-width: 288px;
    }

    .top-toolbar {
        grid-template-columns: minmax(320px, auto) minmax(260px, 1fr) auto;
        padding: 0 12px 0 4px;
    }

    .left-rail,
    .left-rail:hover,
    .left-rail:focus-within,
    .fleet-shell.rail-pinned .left-rail,
    .fleet-shell:not(.rail-pinned) .left-rail {
        width: var(--rail-width);
        min-width: var(--rail-width);
        padding: 7px 8px 10px;
    }

    .fleet-shell:not(.rail-pinned) .rail-profile {
        display: grid;
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 8px;
        justify-content: stretch;
        min-height: 62px;
        margin: 6px 0 10px;
        padding: 10px;
        border-color: var(--zetra-chrome-border);
        background: var(--zetra-profile-bg);
    }

    .rail-avatar {
        width: 36px;
        height: 36px;
    }

    .fleet-shell:not(.rail-pinned) .rail-profile-info {
        display: grid;
    }

    .fleet-shell:not(.rail-pinned) .rail-menu-header {
        display: block;
    }

    .fleet-shell:not(.rail-pinned) .rail-link {
        grid-template-columns: 26px minmax(0, 1fr) 15px;
        justify-items: stretch;
        padding: 0 9px;
    }

    .fleet-shell:not(.rail-pinned) .rail-link span {
        display: block;
    }

    .fleet-shell:not(.rail-pinned) .rail-link-caret {
        display: inline-flex;
    }
}

@media (max-width: 1100px) {
    .toolbar-user-chip {
        max-width: 170px;
    }

    .toolbar-user-copy small {
        display: none;
    }
}

@media (max-width: 900px) {
    .toolbar-user-chip {
        display: none;
    }
}

@media (max-width: 640px) {
    .toolbar-brand {
        width: 40px;
        min-width: 40px;
        padding: 0;
    }
}

/* Final shell parity pass after legacy override blocks. */
.toolbar-user-chip,
.toolbar-user-copy,
.toolbar-logout,
.user-badge {
    display: none !important;
}

.toolbar-brand.navbar-brand {
    height: 40px;
    margin: 4px 8px;
    padding: 0 12px;
    border-radius: 10px;
}

.toolbar-logo.navbar-logo {
    width: 20px;
    height: 20px;
    border-radius: 5px;
}

.rail-profile,
.fleet-shell:not(.rail-pinned) .rail-profile {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    min-height: 76px;
    margin: 8px 0 7px;
    padding: 12px;
    overflow: hidden;
    border-color: var(--zetra-sidebar-profile-border, var(--zetra-chrome-border));
    background: var(--zetra-sidebar-profile-bg, var(--zetra-profile-bg));
}

.rail-profile-cover {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 28%, rgba(52, 143, 226, .22), transparent 30%),
        linear-gradient(135deg, rgba(255, 255, 255, .06), transparent 62%);
    opacity: .9;
    pointer-events: none;
}

.rail-avatar,
.fleet-shell:not(.rail-pinned) .rail-avatar {
    position: relative;
    z-index: 1;
    width: 42px;
    height: 42px;
    border-radius: 9px;
}

.rail-profile-info {
    position: relative;
    z-index: 1;
    gap: 1px;
}

.rail-profile-actions {
    display: grid;
    gap: 3px;
    margin: 0 0 12px;
    padding: 0 2px 9px;
    border-bottom: 1px solid var(--zetra-chrome-border, var(--fleet-sidebar-border));
}

.rail-profile-action {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 8px;
    color: var(--zetra-rail-link, var(--fleet-sidebar-text));
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    text-align: left;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.rail-profile-action .mud-icon-root {
    color: var(--zetra-chrome-muted, var(--fleet-sidebar-muted));
}

.rail-profile-action:hover,
.rail-profile-action:focus-visible {
    color: var(--zetra-active-text, #fff);
    border-color: rgba(var(--bs-primary-rgb), .28);
    background: rgba(var(--bs-primary-rgb), .13);
    outline: none;
}

.rail-profile-logout:hover,
.rail-profile-logout:focus-visible {
    border-color: rgba(255, 91, 87, .34);
    background: rgba(255, 91, 87, .13);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-point-popup > strong,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-ruler-panel strong,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-nearby-panel strong,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-area-check-panel strong {
    color: #8fc5f7;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-point-popup > span,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-nearby-panel header span,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-area-check-panel header span,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-panel-empty {
    color: #aeb9c7;
}
/* True final override: ColorAdmin profile card with collapsible submenu. */
.rail-profile,
.fleet-shell:not(.rail-pinned) .rail-profile {
    display: block !important;
    grid-template-columns: none !important;
    min-height: 0 !important;
    margin: 8px 0 7px !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
}

.rail-profile-link,
.fleet-shell:not(.rail-pinned) .rail-profile-link {
    position: relative;
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 16px !important;
    align-items: center;
    justify-content: initial !important;
    gap: 10px;
    width: 100% !important;
    min-height: 76px !important;
    padding: 12px !important;
    overflow: hidden;
    color: var(--fleet-sidebar-text);
    border: 1px solid var(--zetra-sidebar-profile-border, var(--zetra-chrome-border)) !important;
    border-radius: 8px;
    background: var(--zetra-sidebar-profile-bg, var(--zetra-profile-bg)) !important;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.rail-profile-info,
.fleet-shell:not(.rail-pinned) .rail-profile-info {
    display: grid !important;
    gap: 1px;
}

.rail-profile-caret,
.fleet-shell:not(.rail-pinned) .rail-profile-caret {
    display: inline-flex !important;
    justify-self: end;
    color: var(--zetra-chrome-muted, var(--fleet-sidebar-muted));
    transition: transform .16s ease, color .16s ease;
}

.rail-profile.is-open .rail-profile-caret {
    color: currentColor;
    transform: rotate(180deg);
}

.rail-profile-actions,
.fleet-shell:not(.rail-pinned) .rail-profile-actions {
    display: none !important;
    gap: 2px;
    margin: 0 0 13px;
    padding: 4px 2px 10px;
    border-bottom: 1px solid var(--zetra-chrome-border, var(--fleet-sidebar-border));
}

.rail-profile-actions.is-open,
.fleet-shell:not(.rail-pinned) .rail-profile-actions.is-open {
    display: grid !important;
}

.rail-profile-action {
    grid-template-columns: 28px minmax(0, 1fr);
    min-height: 36px;
    padding: 0 12px;
}

.rail-profile,
.fleet-shell:not(.rail-pinned) .rail-profile {
    min-height: 76px !important;
}

.rail-mobile-backdrop {
    display: none;
}

@media (max-width: 760px) {
    html,
    body {
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    .fleet-shell {
        height: 100dvh !important;
        min-height: 100dvh !important;
        overflow: hidden !important;
    }

    .fleet-main,
    .fleet-shell.rail-pinned .fleet-main,
    .fleet-shell:not(.rail-pinned) .fleet-main {
        display: grid;
        grid-template-columns: minmax(0, 1fr) !important;
        height: calc(100dvh - var(--toolbar-height)) !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .fleet-content {
        grid-column: 1;
        width: 100%;
        min-width: 0;
        overflow: hidden !important;
    }

    .left-rail,
    .left-rail:hover,
    .left-rail:focus-within,
    .fleet-shell.rail-pinned .left-rail,
    .fleet-shell:not(.rail-pinned) .left-rail {
        position: fixed !important;
        top: var(--toolbar-height);
        bottom: 0;
        left: 0;
        z-index: 90;
        width: min(82vw, 260px) !important;
        min-width: min(82vw, 260px) !important;
        max-width: 260px;
        padding: 8px !important;
        overflow-x: hidden;
        overflow-y: auto;
        transform: translateX(calc(-100% - 12px));
        transition: transform .2s ease;
        box-shadow: 12px 0 28px rgba(15, 23, 42, .22);
    }

    .fleet-shell.rail-mobile-open .left-rail {
        transform: translateX(0);
    }

    .rail-mobile-backdrop {
        position: fixed;
        top: var(--toolbar-height);
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 80;
        display: block;
        padding: 0;
        border: 0;
        background: rgba(15, 23, 42, .45);
        cursor: default;
    }

    .rail-profile,
    .fleet-shell:not(.rail-pinned) .rail-profile {
        min-height: 76px !important;
        margin: 8px 0 8px !important;
    }

    .rail-profile-link,
    .fleet-shell:not(.rail-pinned) .rail-profile-link {
        grid-template-columns: 42px minmax(0, 1fr) 16px !important;
        width: 100% !important;
        min-height: 76px !important;
        padding: 12px !important;
    }

    .rail-profile-info,
    .rail-menu-header,
    .rail-link span,
    .rail-link-caret,
    .fleet-shell:not(.rail-pinned) .rail-profile-info,
    .fleet-shell:not(.rail-pinned) .rail-menu-header,
    .fleet-shell:not(.rail-pinned) .rail-link span,
    .fleet-shell:not(.rail-pinned) .rail-link-caret {
        display: block !important;
    }

    .rail-profile-info,
    .fleet-shell:not(.rail-pinned) .rail-profile-info {
        display: grid !important;
    }

    .rail-profile-caret,
    .fleet-shell:not(.rail-pinned) .rail-profile-caret {
        display: inline-flex !important;
    }

    .rail-link,
    .fleet-shell:not(.rail-pinned) .rail-link {
        display: grid;
        grid-template-columns: 26px minmax(0, 1fr) 16px !important;
        justify-items: stretch !important;
        width: 100%;
        min-height: 40px;
        height: 40px;
        padding: 0 10px !important;
    }

    .module-layout,
    .map-module-layout,
    .map-module-layout.map-panel-dock-right {
        width: 100%;
        height: 100% !important;
        min-height: 0 !important;
        overflow: hidden !important;
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .module-layout:not(.map-module-layout) {
        grid-template-rows: minmax(0, 42dvh) minmax(0, 1fr);
        overflow-y: auto !important;
    }

    .map-module-layout {
        grid-template-rows: minmax(0, 42dvh) minmax(0, 1fr);
    }

    .map-module-layout.map-panel-dock-right .workspace,
    .map-module-layout.map-panel-dock-right .module-panel {
        grid-column: 1 !important;
    }

    .map-module-layout.map-panel-dock-right .workspace {
        grid-row: 2 !important;
    }

    .map-module-layout.map-panel-dock-right .module-panel {
        grid-row: 1 !important;
        border-left: 0 !important;
    }

    .map-module-layout.map-panel-collapsed,
    .map-module-layout.map-panel-collapsed.map-panel-dock-right {
        grid-template-rows: minmax(0, 1fr) !important;
    }

    .map-module-layout.map-panel-collapsed .module-panel {
        display: none !important;
    }

    .map-module-layout.map-panel-collapsed .map-workspace,
    .map-module-layout.map-panel-collapsed.map-panel-dock-right .map-workspace {
        grid-column: 1 !important;
        grid-row: 1 !important;
        height: calc(100dvh - var(--toolbar-height)) !important;
        min-height: calc(100dvh - var(--toolbar-height)) !important;
    }

    .map-workspace {
        height: 100% !important;
        min-height: 58dvh !important;
        overflow: hidden !important;
    }

    .map-surface,
    .google-map-canvas {
        width: 100% !important;
        height: 100% !important;
        min-width: 100% !important;
        min-height: 100% !important;
    }

    .map-panel-reopen {
        top: 12px;
        left: 12px;
        max-width: calc(100vw - 104px);
    }

    .map-float-actions {
        top: 12px;
        right: 12px;
        gap: 10px;
    }
}

@media (max-width: 760px) {
    .top-toolbar {
        display: flex !important;
        align-items: center;
        gap: 6px;
        min-width: 0;
        padding: 0 8px !important;
        overflow: hidden !important;
    }

    .toolbar-title,
    .toolbar-search,
    .toolbar-actions {
        display: flex !important;
        flex: 0 0 auto;
        align-items: center;
        gap: 6px;
        min-width: 0;
    }

    .toolbar-title {
        gap: 6px;
    }

    .toolbar-module-title,
    .global-search {
        display: none !important;
    }

    .toolbar-brand.navbar-brand,
    .toolbar-brand {
        width: 42px !important;
        min-width: 42px !important;
        height: 34px !important;
        margin: 0 !important;
        padding: 0 !important;
        justify-content: center;
        border-radius: 8px !important;
    }

    .toolbar-brand-text,
    .toolbar-brand-text.navbar-brand-text {
        display: none !important;
    }

    .toolbar-logo.navbar-logo,
    .toolbar-logo {
        display: block !important;
        width: 20px !important;
        height: 20px !important;
        flex-basis: 20px !important;
    }

    .toolbar-menu-button,
    .toolbar-icon,
    .toolbar-search .mud-icon-button,
    .toolbar-actions .mud-icon-button,
    .quick-action-host .mud-icon-button {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 34px !important;
        min-width: 34px !important;
        height: 34px !important;
        min-height: 34px !important;
        padding: 0 !important;
        border-radius: 8px !important;
    }

    .toolbar-actions .mud-icon-button:nth-of-type(n),
    .toolbar-search .mud-icon-button:nth-of-type(n) {
        display: inline-flex !important;
    }

    .toolbar-icon .mud-icon-root,
    .toolbar-menu-button .mud-icon-root,
    .toolbar-actions .mud-icon-root,
    .toolbar-search .mud-icon-root {
        font-size: 18px !important;
    }

    .quick-action-host {
        flex: 0 0 auto;
    }
}

/* Last-mile guard for sidebar panels after all legacy override blocks. */
.rail-profile-link .rail-avatar,
.fleet-shell:not(.rail-pinned) .rail-profile-link .rail-avatar,
.fleet-shell:not(.rail-pinned) .left-rail:not(:hover):not(:focus-within) .rail-profile-link .rail-avatar {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    justify-self: center !important;
    align-self: center !important;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    aspect-ratio: 1 / 1 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 9px !important;
    line-height: 1 !important;
}

.route-workbench-panel .route-day-panel,
.route-workbench-panel .timeline-tabs-strip,
.route-workbench-panel .route-event-strip,
.route-workbench-panel .route-playback-panel,
.route-workbench-panel .route-empty-panel,
.route-workbench-panel .route-chart-panel,
.route-workbench-panel .timeline-data-panel {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.route-workbench-panel .route-day-panel,
.route-workbench-panel .timeline-tabs-strip,
.route-workbench-panel .route-event-strip,
.route-workbench-panel .route-playback-panel,
.route-workbench-panel .route-empty-panel,
.route-workbench-panel .route-chart-panel {
    padding: 12px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--fleet-line-strong) !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.route-workbench-panel .route-day-panel,
.route-workbench-panel .route-playback-panel,
.route-workbench-panel .route-chart-panel {
    grid-template-columns: 1fr !important;
    max-height: none !important;
    overflow: visible !important;
}

.route-workbench-panel .route-playback-panel {
    grid-template-areas:
        "controls"
        "scrubber"
        "actions"
        "metrics"
        "point" !important;
}

.route-workbench-panel .timeline-data-panel {
    min-height: 320px !important;
    max-height: 48vh !important;
    overflow: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.map-panel-head,
.route-planner-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    min-width: 0 !important;
}

.map-panel-head > strong,
.route-planner-head strong,
.route-planner-head span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.route-planner-head > div {
    display: grid !important;
    gap: 2px !important;
    min-width: 0 !important;
}

.map-panel-close {
    flex: 0 0 30px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    padding: 0 !important;
    color: var(--fleet-text) !important;
    border: 1px solid var(--fleet-border) !important;
    border-radius: 5px !important;
    background: var(--fleet-sidebar-bg-soft) !important;
    cursor: pointer !important;
}

.map-workspace[data-route-workbench="open"] .route-workbench-panel.map-overlay-panel {
    position: absolute !important;
    inset: 12px auto 12px 12px !important;
    z-index: 9 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-rows: min-content !important;
    align-content: start !important;
    width: min(520px, calc(100% - 24px)) !important;
    max-width: calc(100% - 24px) !important;
    min-width: 0 !important;
    padding: 0 !important;
    overflow: auto !important;
    scrollbar-gutter: stable !important;
}

@media (min-width: 1180px) {
    .map-workspace[data-route-workbench="open"][data-selected-vehicle]:not([data-selected-vehicle=""]) .route-workbench-panel.map-overlay-panel {
        width: min(520px, calc(100% - var(--map-selected-vehicle-sidebar-width) - 56px)) !important;
    }
}

.map-workspace[data-route-workbench="open"] .route-workbench-panel .map-overlay-panel {
    color: inherit !important;
}

.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-day-panel.map-overlay-panel,
.map-workspace[data-route-workbench="open"] .route-workbench-panel .report-summary-strip.map-overlay-panel.timeline-tabs-strip,
.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-event-strip.map-overlay-panel,
.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-playback-panel.map-overlay-panel,
.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-empty-panel.map-overlay-panel,
.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-chart-panel.map-overlay-panel,
.map-workspace[data-route-workbench="open"] .route-workbench-panel .timeline-data-panel.map-overlay-panel {
    position: static !important;
    inset: auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 12px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--fleet-line-strong) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-day-panel,
.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-playback-panel,
.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-chart-panel {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    overflow: visible !important;
}

.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-day-summary strong,
.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-day-summary span,
.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-playback-metrics span,
.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-playback-point span {
    max-width: none !important;
    white-space: normal !important;
}

.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-date-controls,
.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-quick-actions {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)) !important;
    justify-content: stretch !important;
    gap: 6px !important;
}

.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-date-field,
.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-time-field {
    grid-template-columns: 34px minmax(0, 1fr) !important;
    width: 100% !important;
}

.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-date-field input,
.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-time-field input,
.map-workspace[data-route-workbench="open"] .route-workbench-panel .panel-command.compact {
    width: 100% !important;
    min-width: 0 !important;
}

.map-workspace[data-route-workbench="open"] .route-workbench-panel .report-summary-strip.map-overlay-panel.timeline-tabs-strip,
.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-event-strip {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
}

.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-playback-panel {
    grid-template-areas:
        "controls"
        "scrubber"
        "actions"
        "metrics"
        "point" !important;
}

.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-playback-controls,
.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-playback-actions,
.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-playback-metrics,
.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-playback-point {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 6px !important;
}

.map-workspace[data-route-workbench="open"] .route-workbench-panel .route-playback-scrubber {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 64px !important;
    gap: 8px !important;
}

.map-workspace[data-route-workbench="open"] .route-workbench-panel .timeline-data-panel.map-overlay-panel {
    min-height: 300px !important;
    max-height: 48vh !important;
    padding: 0 !important;
    overflow: auto !important;
}

.map-workspace[data-route-workbench="open"] .route-workbench-panel .dense-grid-wrap {
    width: 100% !important;
    min-width: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.map-workspace[data-route-workbench="open"] .route-workbench-panel .dense-grid-scroll {
    overflow: auto !important;
}

.map-workspace[data-route-workbench="open"] .route-workbench-panel .dense-grid {
    --dense-grid-min-width: 760px !important;
    width: max(100%, var(--dense-grid-min-width, 760px)) !important;
    min-width: var(--dense-grid-min-width, 760px) !important;
}

@media (max-width: 1179px) {
    .map-workspace[data-route-workbench="open"] .route-workbench-panel.map-overlay-panel {
        inset: 12px !important;
        width: auto !important;
        max-width: none !important;
    }

    .map-workspace[data-route-workbench="open"] .selected-vehicle-panel {
        display: none !important;
    }
}

@media (max-width: 640px) {
    .map-workspace[data-route-workbench="open"] .route-workbench-panel.map-overlay-panel {
        position: fixed !important;
        top: 56px !important;
        right: 8px !important;
        bottom: 8px !important;
        left: 8px !important;
        width: auto !important;
        max-width: none !important;
        z-index: 12 !important;
    }

    .map-workspace[data-route-workbench="open"] .route-workbench-panel .route-date-controls,
    .map-workspace[data-route-workbench="open"] .route-workbench-panel .route-quick-actions {
        grid-template-columns: 1fr !important;
    }

    .map-workspace[data-route-workbench="open"] .route-workbench-panel .timeline-data-panel.map-overlay-panel {
        min-height: 240px !important;
        max-height: 42vh !important;
    }

    .map-workspace[data-route-workbench="open"] .route-workbench-panel .dense-grid {
        --dense-grid-min-width: 680px !important;
    }

    .route-planner-panel {
        right: 8px !important;
        left: 8px !important;
        width: auto !important;
        max-height: calc(100% - 96px) !important;
    }

    .route-planner-point {
        grid-template-columns: 22px minmax(0, 1fr) !important;
    }

    .route-planner-point input[type="number"],
    .route-planner-point-actions {
        grid-column: 2 !important;
    }
}

/* Dark map control polish: keep floating controls and route chips legible. */
.map-workspace[data-route-workbench="open"] .map-panel-reopen {
    display: none !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-panel-reopen {
    color: #f8fafc !important;
    border-color: rgba(125, 211, 252, .38) !important;
    background: rgba(15, 23, 42, .94) !important;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .08) !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-panel-reopen .mud-icon-root {
    color: #bae6fd !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-float-actions .mud-icon-button {
    color: #f8fafc !important;
    border-color: rgba(125, 211, 252, .36) !important;
    background: rgba(15, 23, 42, .9) !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .44), inset 0 1px 0 rgba(255, 255, 255, .08) !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-float-actions .mud-icon-button:hover,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-float-actions .mud-icon-button:focus-visible {
    color: #ffffff !important;
    border-color: rgba(56, 189, 248, .62) !important;
    background: rgba(30, 41, 59, .98) !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-float-actions .mud-icon-button.mud-error-text {
    color: #ffffff !important;
    border-color: rgba(248, 113, 113, .72) !important;
    background: rgba(127, 29, 29, .9) !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-float-actions .mud-icon-root {
    color: currentColor !important;
    filter: none !important;
    opacity: 1 !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-panel .route-event-chip {
    color: #f8fafc !important;
    border-color: rgba(148, 163, 184, .38) !important;
    background: #162333 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05) !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-panel .route-event-chip:hover,
:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-panel .route-event-chip:focus-visible {
    border-color: rgba(125, 211, 252, .62) !important;
    background: #203047 !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-panel .route-event-chip span {
    color: #7dd3fc !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-panel .route-event-chip strong,
:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-panel .route-event-chip small {
    color: #f8fafc !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-panel .route-event-chip.alert {
    border-color: rgba(248, 113, 113, .62) !important;
    background: rgba(127, 29, 29, .58) !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-panel .route-event-chip.stop {
    border-color: rgba(74, 222, 128, .54) !important;
    background: rgba(20, 83, 45, .58) !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-panel .route-event-chip.avl {
    border-color: rgba(96, 165, 250, .58) !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-panel .route-date-field input,
:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-panel .route-time-field input,
:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-panel .route-playback-scrubber select {
    color: #f8fafc !important;
    border-color: rgba(148, 163, 184, .34) !important;
    background: #162333 !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-panel .panel-command.compact:not(.selected),
:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-panel .timeline-tabs-strip button:not(.selected) {
    color: #67e8f9 !important;
    border-color: rgba(34, 211, 238, .48) !important;
    background: rgba(15, 23, 42, .28) !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-panel .panel-command.compact:not(.selected):hover,
:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-panel .timeline-tabs-strip button:not(.selected):hover {
    color: #ecfeff !important;
    border-color: rgba(103, 232, 249, .7) !important;
    background: rgba(8, 145, 178, .18) !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-head button,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-panel-close,
:is(html.dark-mode, [data-bs-theme="dark"]) .selected-vehicle-close {
    color: #f8fafc !important;
    border-color: rgba(148, 163, 184, .34) !important;
    background: #1c2a3a !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .route-workbench-head button:hover,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-panel-close:hover,
:is(html.dark-mode, [data-bs-theme="dark"]) .selected-vehicle-close:hover {
    border-color: rgba(125, 211, 252, .58) !important;
    background: #26384d !important;
}

/* Mobile fluid pass: map stays primary, lists become scrollable sheets. */
@media (max-width: 760px) {
    .fleet-shell {
        height: 100dvh !important;
        overflow: hidden !important;
    }

    .fleet-content {
        position: relative !important;
        overflow: hidden !important;
    }

    .loading-screen {
        height: 100% !important;
        min-height: 0 !important;
        display: grid !important;
        place-items: center !important;
        padding: 20px !important;
        border-radius: 0 !important;
        font-size: 16px !important;
    }

    .map-module-layout,
    .map-module-layout.map-panel-dock-right {
        position: relative !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: minmax(0, 1fr) !important;
        height: 100% !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .map-module-layout .map-workspace,
    .map-module-layout.map-panel-dock-right .map-workspace {
        grid-column: 1 !important;
        grid-row: 1 !important;
        height: 100% !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .map-module-layout .map-surface,
    .map-module-layout .google-map-canvas {
        height: 100% !important;
        min-height: 100% !important;
    }

    .map-module-layout .module-panel,
    .map-module-layout.map-panel-dock-right .module-panel {
        position: absolute !important;
        display: flex !important;
        flex-direction: column !important;
        right: 8px !important;
        bottom: max(8px, env(safe-area-inset-bottom)) !important;
        left: 8px !important;
        top: auto !important;
        z-index: 14 !important;
        width: auto !important;
        max-width: none !important;
        height: min(46dvh, 380px) !important;
        min-height: 172px !important;
        max-height: calc(100% - 72px) !important;
        border: 1px solid rgba(148, 163, 184, .38) !important;
        border-radius: 12px 12px 8px 8px !important;
        background: rgba(248, 250, 252, .96) !important;
        box-shadow: 0 -16px 34px rgba(15, 23, 42, .2) !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-gutter: stable;
    }

    .map-module-layout .module-panel::before {
        content: "";
        position: sticky;
        top: 6px;
        z-index: 6;
        display: block;
        width: 42px;
        height: 4px;
        margin: 6px auto 0;
        border-radius: 999px;
        background: rgba(100, 116, 139, .45);
    }

    .map-module-layout .module-panel .panel-header {
        position: sticky !important;
        top: 0 !important;
        z-index: 5 !important;
        min-height: 44px !important;
        padding: 8px 12px !important;
    }

    .map-module-layout .module-panel .panel-header h2,
    .map-module-layout .module-panel .panel-title,
    .map-module-layout .module-panel h2 {
        font-size: 15px !important;
        line-height: 1.2 !important;
    }

    .map-module-layout .module-panel .panel-body,
    .map-module-layout .module-panel > :not(.panel-header) {
        min-width: 0 !important;
    }

    .map-module-layout .vehicle-status-strip {
        order: 1 !important;
        flex: 0 0 auto !important;
        padding: 6px 10px !important;
    }

    .map-module-layout .filter-bar {
        order: 2 !important;
        flex: 0 0 auto !important;
    }

    .map-module-layout .segmented-panel {
        order: 3 !important;
        flex: 0 0 auto !important;
    }

    .map-module-layout .filter-bar,
    .map-module-layout .segmented-panel,
    .map-module-layout .map-sidebar-section,
    .map-module-layout .map-status-sidebar,
    .map-module-layout .vehicle-list {
        padding-inline: 10px !important;
    }

    .map-module-layout .panel-section-title {
        display: none !important;
    }

    .map-module-layout .vehicle-list {
        order: 4 !important;
        display: grid !important;
        flex: 0 0 auto !important;
        gap: 6px !important;
        padding-block: 8px 12px !important;
    }

    .map-module-layout .module-panel > .panel-command {
        order: 5 !important;
        flex: 0 0 auto !important;
        margin: 0 10px 10px !important;
    }

    .map-module-layout .map-sidebar-section {
        order: 6 !important;
        flex: 0 0 auto !important;
        margin-top: 2px !important;
    }

    .map-module-layout .map-status-sidebar {
        order: 7 !important;
        flex: 0 0 auto !important;
        max-height: 132px !important;
        overflow: auto !important;
    }

    .map-module-layout .operational-layer-feed {
        order: 8 !important;
        flex: 0 0 auto !important;
    }

    .map-module-layout .filter-bar input,
    .map-module-layout .segmented-panel button,
    .map-module-layout .map-toolbar button,
    .map-module-layout .panel-command {
        min-height: 34px !important;
        font-size: 12px !important;
    }

    .map-module-layout .map-toolbar.map-sidebar-controls {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 5px !important;
    }

    .map-module-layout .map-status-sidebar {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 5px !important;
    }

    .map-module-layout .map-status-sidebar span {
        min-height: 30px !important;
        padding: 6px 8px !important;
        font-size: 11px !important;
    }

    .map-module-layout .vehicle-row {
        grid-template-columns: 38px minmax(0, 1fr) !important;
        align-items: center !important;
        min-height: 62px !important;
        padding: 8px 10px !important;
        border: 1px solid rgba(148, 163, 184, .28) !important;
        border-radius: 8px !important;
        background: rgba(255, 255, 255, .88) !important;
        box-shadow: none !important;
    }

    .map-module-layout .vehicle-row:nth-child(even) {
        background: rgba(248, 250, 252, .9) !important;
    }

    .map-module-layout .vehicle-row.selected,
    .map-module-layout .vehicle-row.selected:nth-child(even) {
        background: rgba(37, 99, 235, .12) !important;
        box-shadow: inset 3px 0 0 #2563eb !important;
    }

    .map-module-layout .vehicle-row-icon {
        display: grid !important;
        place-items: center !important;
        width: 32px !important;
        height: 32px !important;
        border-radius: 8px !important;
        color: #0f766e !important;
        background: rgba(20, 184, 166, .12) !important;
    }

    .map-module-layout .vehicle-row-body {
        min-width: 0 !important;
    }

    .map-module-layout .vehicle-row-body strong,
    .map-module-layout .vehicle-row-body > span,
    .map-module-layout .vehicle-row-body small {
        display: block !important;
        min-width: 0 !important;
        overflow: hidden !important;
        text-align: left !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .map-module-layout .vehicle-row-body strong {
        font-size: 13px !important;
    }

    .map-module-layout .vehicle-row-body > span,
    .map-module-layout .vehicle-row-body small {
        font-size: 11px !important;
        line-height: 1.25 !important;
    }

    .map-module-layout .vehicle-telemetry-grid,
    .map-module-layout .vehicle-actions {
        display: none !important;
    }

    .map-module-layout.map-panel-collapsed .module-panel,
    .map-module-layout.map-panel-collapsed.map-panel-dock-right .module-panel {
        display: none !important;
    }

    .map-module-layout .map-panel-reopen {
        top: auto !important;
        right: auto !important;
        bottom: max(12px, env(safe-area-inset-bottom)) !important;
        left: 12px !important;
        z-index: 15 !important;
        min-height: 38px !important;
        border-radius: 999px !important;
        box-shadow: 0 12px 24px rgba(15, 23, 42, .22) !important;
    }

    .map-module-layout .map-float-actions {
        top: 12px !important;
        right: 12px !important;
        z-index: 12 !important;
        gap: 8px !important;
    }

    .map-module-layout .map-float-actions .mud-icon-button {
        width: 38px !important;
        min-width: 38px !important;
        height: 38px !important;
        min-height: 38px !important;
        border-radius: 9px !important;
    }

    .map-workspace[data-route-workbench="open"] .route-workbench-panel.map-overlay-panel,
    .map-workspace .selected-vehicle-panel {
        position: fixed !important;
        top: calc(var(--toolbar-height) + 8px) !important;
        right: 8px !important;
        bottom: max(8px, env(safe-area-inset-bottom)) !important;
        left: 8px !important;
        width: auto !important;
        max-width: none !important;
        height: auto !important;
        z-index: 30 !important;
        border-radius: 10px !important;
    }

    .map-workspace .selected-vehicle-panel {
        bottom: auto !important;
        height: calc(100dvh - var(--toolbar-height) - 16px) !important;
        max-height: calc(100dvh - var(--toolbar-height) - 16px) !important;
        align-content: start !important;
        overflow-y: auto !important;
        overscroll-behavior: contain !important;
        -webkit-overflow-scrolling: touch;
    }

    .map-module-layout:has(.map-workspace[data-route-workbench="open"]) .module-panel,
    .map-module-layout:has(.map-workspace[data-selected-vehicle]:not([data-selected-vehicle=""])) .module-panel {
        display: none !important;
    }

    .map-workspace[data-route-workbench="open"] .selected-vehicle-panel {
        display: none !important;
    }
}

@media (max-width: 420px) {
    .top-toolbar {
        gap: 4px !important;
        padding-inline: 6px !important;
    }

    .toolbar-menu-button,
    .toolbar-icon,
    .toolbar-search .mud-icon-button,
    .toolbar-actions .mud-icon-button,
    .quick-action-host .mud-icon-button {
        width: 32px !important;
        min-width: 32px !important;
        height: 32px !important;
        min-height: 32px !important;
    }

    .toolbar-brand.navbar-brand,
    .toolbar-brand {
        width: 36px !important;
        min-width: 36px !important;
        height: 32px !important;
    }
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-module-layout .module-panel {
    border-color: rgba(148, 163, 184, .24) !important;
    background: rgba(30, 41, 59, .96) !important;
    box-shadow: 0 -18px 36px rgba(0, 0, 0, .38) !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-module-layout .module-panel::before {
    background: rgba(203, 213, 225, .34);
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-module-layout .vehicle-row,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-module-layout .vehicle-row:nth-child(even) {
    color: #e5edf6 !important;
    border-color: rgba(148, 163, 184, .2) !important;
    background: rgba(30, 41, 59, .86) !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-module-layout .vehicle-row:hover {
    background: rgba(51, 65, 85, .9) !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-module-layout .vehicle-row.selected,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-module-layout .vehicle-row.selected:nth-child(even) {
    color: #f8fafc !important;
    background: rgba(14, 116, 144, .34) !important;
    box-shadow: inset 3px 0 0 #22d3ee !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-module-layout .vehicle-row-icon {
    color: #67e8f9 !important;
    background: rgba(8, 145, 178, .22) !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-module-layout .vehicle-row-body strong {
    color: #f8fafc !important;
}

:is(html.dark-mode, [data-bs-theme="dark"]) .map-module-layout .vehicle-row-body > span,
:is(html.dark-mode, [data-bs-theme="dark"]) .map-module-layout .vehicle-row-body small {
    color: #cbd5e1 !important;
}

@media (max-width: 760px) {
    .map-workspace[data-route-workbench="open"] .route-workbench-panel.map-overlay-panel,
    .map-workspace .selected-vehicle-panel {
        background: #1e293b !important;
    }

    :is(html.dark-mode, [data-bs-theme="dark"]) .map-workspace[data-route-workbench="open"] .route-workbench-panel.map-overlay-panel,
    :is(html.dark-mode, [data-bs-theme="dark"]) .map-workspace .selected-vehicle-panel {
        background: #1e293b !important;
    }
}
