/* Visual palette based on stwt.org.pl; activity and diagnostic colors retain their meaning. */
:root {
    color-scheme: dark;
    --bg: #080808;
    --surface: #121212;
    --ink: #f6f3f2;
    --muted: #aaa5a4;
    --line: #2c2828;
    --green: #e5261f;
    font-family: Raleway, "Segoe UI", Arial, sans-serif;
}
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--ink); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
    outline-color: #ff7770;
}
.sidebar, .topbar, .panel, .stat, dialog, .dialog-heading { background: var(--surface); color: var(--ink); }
.brand { color: var(--ink); }
.brand-icon { background: var(--green); border-radius: 6px; }
.brand-dot, .status-dot { color: var(--green); background: var(--green); }
.workspace-label, .sidebar-bottom small, .stat small, .stat-label, .eyebrow, .filename,
.hash-label, .hash-label code, .slot-heading span, .day-totals, .panel-note, .pagination,
.breadcrumb, .nav-item span, th, dt, .muted, .axis, footer { color: var(--muted); }
.nav-item { color: #d0c8c6; }
.nav-item:hover, .nav-item.active { background: #2a1716; color: #ff7770; }
.nav-item.active { box-shadow: inset 3px 0 var(--green); }
.nav-item.active span, .text-button, .pill { color: #ff7770; }
.primary, .print-toolbar button { background: var(--green); color: #fff; }
.primary:hover, .print-toolbar button:hover { background: #b61d18; color: #fff; }
.secondary { background: #1d1b1b; color: var(--ink); border-color: #504747; }
.secondary:hover, .quiet:hover { background: #302525; color: #fff; }
.vehicle-card { background: #1c1919; border: 1px solid #51302e; }
.vehicle-card:after { border-color: #e5261f20; }
.vehicle-card .eyebrow, .vin, .vehicle-meta p, .vehicle-meta p span, .pill.dark { color: #d9c5c2; }
.pill, .pill.dark, .tag, .tag.success { background: #2a1716; border-color: #59302d; color: #ffaaa5; }
.progress, .timeline, .driver-chart-bars { background-color: #252222; }
.progress span { background: var(--green); }
input, select, textarea, pre { background: #1b1919; color: var(--ink); border-color: #504747; }
input::placeholder { color: #a8a09e; }
input[type="date"] { color-scheme: dark; }
th { background: #1c1a1a; border-color: var(--line); }
td, .meta-pair, details, .dialog-heading { border-color: var(--line); }
tbody tr:hover { background: #252020; }
.tag { border: 1px solid #59302d; }
.notice { background: #292319; border-color: #62502b; color: #f1dca8; }
.message { background: #142820; border-color: #39735d; color: #c5f3dc; }
.message.error { background: #351d1b; border-color: #8c4741; color: #ffd2ca; }
.info-note { background: #1b2429; border-color: #415660; color: #d3e1e5; }
.service-caution { background: #292319; border-color: #9c6738; border-left-color: #df963c; color: #f4e6ce; }
.service-table .replacement-row, .service-entry.replacement_review { background: #301b1a; }
.service-table .service-reason, .service-evidence { color: #c9c1be; }
.service-badge.replacement_review { background: #3b211d; color: #ffb5a5; border-color: #a45c50; }
.service-badge.diagnostics { background: #342b19; color: #f5d88d; border-color: #88713e; }
.service-badge.operational { background: #222629; color: #c4d4d8; border-color: #536268; }
.service-badge.unknown { background: #302634; color: #e1caeb; border-color: #74567d; }
.driver-calendar, .driver-summary > div, .driver-places > div,
.driver-range, .activity-document .activity-print-day { background: #181616; border-color: var(--line); }
.driver-calendar-heading button, .driver-day-header button { background: #201d1d; color: var(--ink); }
.driver-calendar-days button { background: #31211f; color: #ffb3ad; }
.driver-calendar-days button.has-signal { border: 2px solid #e5261f; background: #4a1d1b; color: #fff; font-weight: 700; }
.driver-calendar-days button.chosen { background: var(--green); border-color: #ff7770; color: #fff; }
.driver-calendar-days button.has-signal.chosen { box-shadow: inset 0 -4px #ffcc79; }
.driver-calendar-days button:disabled { color: #8e8582; }
.driver-day-signals { border: 1px solid #9c6738; border-left: 4px solid #df963c;
    background: #292319; border-radius: 6px; padding: 14px 18px; color: #f4e6ce; }
.driver-day-signals ul { margin: 10px 0; padding-left: 20px; line-height: 1.6; }
.driver-day-signals li + li { margin-top: 8px; }
.driver-places span { background: #31211f; color: #ffe4e1; }
.driver-places small, .driver-places strong, .driver-range label { color: #bcb0ad; }
.driver-range-error { color: #ffaaa5; }
.driver-day-header, .driver-chart-bars { border-color: #55403d; }
.driver-chart-bars { background-image: repeating-linear-gradient(to right,#4b4141 0,#4b4141 1px,transparent 1px,transparent 16.666%); }
.gnss-filters { margin: 18px 0; }
.gnss-actions { margin: 16px 0; flex-wrap: wrap; }
.gnss-point-picker { display: block; margin: 14px 0; font-size: 12px; color: var(--muted); }
.gnss-point-picker select { display: block; width: min(100%, 530px); margin-top: 6px; }
.gnss-map { position: relative; height: min(62vh, 630px); min-height: 360px; overflow: hidden;
    background: #242b2b; border: 1px solid #55403d; border-radius: 8px;
    touch-action: none; cursor: grab; }
.gnss-map:active { cursor: grabbing; }
.gnss-tiles, .gnss-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.gnss-tiles { pointer-events: none; }
.gnss-tiles img { position: absolute; width: 256px; height: 256px; max-width: none; }
.gnss-overlay { overflow: hidden; }
.gnss-route-line { fill: none; stroke: #ed332b; stroke-width: 2.5; stroke-dasharray: 6 4;
    stroke-linecap: round; pointer-events: none; }
.gnss-point { fill: #ffcf73; stroke: #252222; stroke-width: 1.5; cursor: pointer; }
.gnss-point.selected { fill: #e5261f; stroke: #fff; stroke-width: 2; }
.gnss-attribution { font-size: 11px; color: var(--muted); margin: 10px 0; }
.gnss-selected { padding: 14px; background: #201d1d; border-radius: 6px; overflow-wrap: anywhere; }
@media (max-width: 800px) {
    .top-actions { flex-wrap: wrap; }
}
dialog::backdrop { background: #000b; }

/* Report pages use the same visual identity on screen but print on white paper. */
.service-document { background: var(--surface); color: var(--ink); }
.service-document header { border-bottom: 2px solid var(--green); padding-bottom: 16px; }
.service-document h1 { color: var(--ink); }
.service-document h2 { color: #ff7770; }
.service-document th { color: #e0d2ce; }
.service-document td, .activity-document th, .activity-document td { border-color: var(--line); }
.service-document .compliance-signals, .service-document .compliance-tariff {
    width: 100%; border-collapse: collapse; table-layout: fixed;
}
.service-document .compliance-signals th, .service-document .compliance-signals td,
.service-document .compliance-tariff th, .service-document .compliance-tariff td {
    padding: 7px; border-bottom: 1px solid var(--line); text-align: left;
    vertical-align: top; overflow-wrap: anywhere;
}
.service-document .compliance-signals th:nth-child(5) { width: 39%; }
.service-document .compliance-tariff th:nth-child(1) { width: 17%; }
.service-document .compliance-tariff th:nth-child(2) { width: 23%; }
.service-document .compliance-tariff th:nth-child(3) { width: 38%; }
.service-document .compliance-tariff th:nth-child(4) { width: 22%; }
.start-state {
    min-height: min(640px, calc(100vh - 250px));
    padding: clamp(32px, 7vw, 100px);
    border: 1px solid var(--line);
    border-radius: 12px;
    background: radial-gradient(circle at 83% 23%, #e5261f18, transparent 33%), var(--surface);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.start-state::after {
    content: "";
    position: absolute;
    width: min(48vw, 520px);
    aspect-ratio: 1;
    right: -9%;
    top: 50%;
    transform: translateY(-50%);
    border: 1px solid #e5261f30;
    border-radius: 50%;
    box-shadow: 0 0 0 55px #e5261f08, 0 0 0 110px #e5261f05;
    pointer-events: none;
}
.start-mark {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 48px;
    border-radius: 12px;
    background: #e5261f;
    color: #fff;
    font-size: 39px;
    font-weight: 800;
    letter-spacing: -5px;
    line-height: 1;
}
.start-mark span { color: #151010; }
.start-state h2 { font-size: clamp(30px, 4vw, 52px); line-height: 1.1; letter-spacing: -.04em; margin: 12px 0 14px; }
.start-state p { max-width: 490px; color: var(--muted); font-size: 15px; line-height: 1.7; margin: 0 0 30px; }
.start-state .button { min-height: 48px; padding: 12px 24px; }
.start-state small { color: var(--muted); margin-top: 16px; font-size: 11px; }
@media (max-width: 600px) {
    .start-state { min-height: 500px; }
    .start-state::after { right: -55%; opacity: .45; }
}
.activity-print-timeline { background: #292727; }
.activity-print-axis { color: var(--muted); }
.activity-document .activity-print-day { background: #181616; }
.service-document .service-caution { background: #292319; border-color: #8c6544; border-left-color: #df963c; }
.service-document .service-entry.replacement_review { background: #301b1a; }

@media print {
    :root { color-scheme: light; }
    body, .service-document { background: #fff; color: #171313; }
    .service-document header { border-bottom-color: #e5261f; }
    .service-document h1 { color: #171313; }
    .service-document h2 { color: #b61d18; }
    .service-document th { background: #f5f2f1; color: #332827; }
    .service-document td, .activity-document th, .activity-document td { border-color: #d8cecc; }
    .service-document .compliance-signals th, .service-document .compliance-signals td,
    .service-document .compliance-tariff th, .service-document .compliance-tariff td {
        border-color: #d8cecc; font-size: 8px;
    }
    .service-document .compliance-signals thead, .service-document .compliance-tariff thead {
        display: table-header-group;
    }
    .service-document .compliance-signals tr, .service-document .compliance-tariff tr {
        break-inside: avoid;
    }
    .service-document .service-caution { background: #fff8ec; border-color: #b19470; border-left-color: #ba792e; color: #332827; }
    .service-document .service-entry.replacement_review { background: #fff8f5; }
    .activity-document .activity-print-day { background: #fff; border-color: #d8cecc; }
    .activity-print-timeline { background: #f2eeee; }
    .activity-print-axis { color: #514645; }
}
