/* ── Reset & base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

:root {
    --header-h:     56px;
    --status-bar-h: 76px;
    --card-radius:  12px;
    --muted:        #6c757d;
    --border:       #dee2e6;
    --surface:      #fff;
    --bg:           #f4f5f7;
    --primary:      #0d6efd;

    /* Status colour palette — matches original MDO driver app */
    --status-not-collected: #B71114;
    --status-waiting:       #CE1DC7;
    --status-picked:        #FF9900;
    --status-dropped:       #4A990A;
    --status-noshow:        #000000;

    /* Work-status colours — match the legacy driver app's button-menu exactly */
    --work-driving: #4A990A;
    --work-poa:     #C67E00;
    --work-rest:    #BEB71B;
    --work-other:   #27639F;
    --work-stop:    #B71114;

    /* Legacy driver app's "A.C" (Acces Controleurs) quick-access button colour */
    --action-ac: #27639F;

    /* Legacy driver app's compliance-document row tints — Driving/Rest/other-incl-POA */
    --docs-driving-bg: rgba(183, 17, 20, 0.30);
    --docs-rest-bg:     rgba(74, 153, 10, 0.30);
    --docs-other-bg:    rgba(198, 126, 0, 0.30);
}

html, body {
    height: 100%;
    margin: 0;
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    color: #212529;
    -webkit-tap-highlight-color: transparent;
}

a { color: inherit; }

/* ── App shell ──────────────────────────────────────────────── */
.driver-app {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-width: 540px;
    margin: 0 auto;
    background: var(--bg);
}

/* ── Top header ─────────────────────────────────────────────── */
.driver-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #1a1a2e;
    color: #fff;
    height: var(--header-h);
    flex-shrink: 0;
}

.driver-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 1rem;
}

.driver-header-brand {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.01em;
}

.driver-header-date {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ── Main content ───────────────────────────────────────────── */
.driver-main {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

/* ── Page content wrapper ───────────────────────────────────── */
.page-content {
    padding: 1rem;
    padding-bottom: calc(var(--status-bar-h) + 1rem);
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.page-back {
    margin-bottom: 0.75rem;
}

/* ── Header hamburger button ───────────────────────────────── */
.driver-header-menu-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.35rem;
    padding: 0;
    line-height: 1;
}

/* ── Status readout — persistent current-work-status strip ──── */
.status-readout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
    font-weight: 500;
}

.status-readout-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-readout-label { color: #333; }

/* Continuous location-tracking indicator — grey when inactive, matching the old app's dot. */
.location-dot {
    margin-left: auto;
    color: #adb5bd;
    font-size: 0.9rem;
}
.location-dot.active { color: var(--primary); }

.consent-banner {
    background: #fff8e6;
    border-bottom: 1px solid #f0dca0;
    padding: 0.75rem 1rem;
}

/* ── Work-status bar — one-tap status switching, always visible ─
   Matches the legacy driver app's #button-menu: fixed height,
   5-column grid of permanently colour-coded circular buttons. ── */
.work-status-bar {
    flex-shrink: 0;
    height: var(--status-bar-h);
    background: #666;
    padding: 10px 0.5rem;
}

/* Shown instead of the status grid until today's vehicle check is open — matches the legacy
   driver app's WORK_ID==0 state exactly: a single circular "Start Work" button (#actions
   #button2 in the old app — 70x70px, --status_green background, white uppercase bold label,
   centred in the bottom bar), plus A.C, which stays reachable regardless of work state. */
.work-status-start {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 100%;
    padding: 0 0.25rem;
}

.work-status-start-btn {
    width: 70px;
    height: 70px;
    border: none;
    border-radius: 50%;
    background: var(--work-driving);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    line-height: 1.15;
}

.work-status-start-btn:active { background-color: #333; }

.work-status-start .ws-ac {
    position: absolute;
    right: 0.5rem;
}

.work-status-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    justify-items: center;
    align-items: center;
    height: 100%;
}

.work-status-grid.busy { pointer-events: none; opacity: 0.7; }

.work-status-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.1;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.work-status-btn:active { background-color: #333 !important; }

.work-status-btn.current {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
}

.work-status-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.ws-driving { background-color: var(--work-driving); }
.ws-poa     { background-color: var(--work-poa); }
.ws-rest    { background-color: var(--work-rest); color: #333; }
.ws-other   { background-color: var(--work-other); }
.ws-stop    { background-color: var(--work-stop); }
.ws-ac      { background-color: var(--action-ac); }

/* ── Nav drawer — hamburger-triggered slide-out ──────────────── */
.nav-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.nav-drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 260px;
    max-width: 80vw;
    background: var(--surface);
    z-index: 201;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
    transform: translateX(100%);
    transition: transform 0.22s ease;
}

.nav-drawer.open { transform: translateX(0); }

.nav-drawer-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.25rem;
    color: #212529;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-drawer-item:active { background: #f0f0f0; }

.nav-drawer-item.text-danger { color: #dc3545 !important; }

/* ── Empty state ────────────────────────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--muted);
}

/* ── Info card ──────────────────────────────────────────────── */
.info-card {
    background: var(--surface);
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
    padding: 0.875rem 1rem;
    margin-bottom: 0.75rem;
}

.info-card.border-warning { border-color: #ffc107; }

.info-card-title {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.625rem;
    color: #495057;
}

.info-card-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0;
    border-top: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.info-row:first-of-type,
.info-card-summary + .info-row { border-top: none; }
.info-row.align-items-start { align-items: flex-start; }

.info-label {
    min-width: 90px;
    color: var(--muted);
    font-size: 0.82rem;
    flex-shrink: 0;
}

.info-value { flex: 1; word-break: break-word; }

/* ── Driving-hours compliance document ("Acces Controleurs") ──
   A real horizontally-scrollable table, matching the old system's exact tabular structure —
   not restyled into cards, since the row/column shape itself is part of the legal document. ── */
.docs-table-wrap {
    overflow-x: auto;
    background: var(--surface);
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    white-space: nowrap;
}

.docs-table th, .docs-table td {
    padding: 0.5rem 0.6rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.docs-table thead th {
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
    background: var(--bg);
}

.docs-table tbody tr.resting td:nth-child(2) { color: var(--muted); font-style: italic; }

.docs-total-row td {
    font-weight: 700;
    background: var(--bg);
    border-bottom: none;
}

.docs-ac-section {
    margin-bottom: 0.75rem;
}

.docs-ac-list {
    list-style: none;
    margin: 0 0 0.5rem;
    padding: 0;
}

.docs-ac-list li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85rem;
}

.docs-ac-list li:last-child { border-bottom: none; }
.docs-ac-list .label { color: var(--muted); }
.docs-ac-list .value { font-weight: 600; text-align: right; }

/* Legacy compliance-document row tints, so a segment's type reads at a glance */
.docs-ac-list li.docs-segment { padding-left: 0.5rem; border-radius: 4px; margin-bottom: 2px; }
.docs-ac-list li.docs-segment.wt-driving { background: var(--docs-driving-bg); }
.docs-ac-list li.docs-segment.wt-rest    { background: var(--docs-rest-bg); }
.docs-ac-list li.docs-segment.wt-other   { background: var(--docs-other-bg); }

.info-card-subtitle { color: var(--muted); font-size: 0.75rem; font-weight: 400; }

/* Prev/next day navigation on the compliance-document detail page */
.docs-day-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.docs-day-nav .btn { flex-shrink: 0; }
.docs-day-nav h5 { margin: 0; text-align: center; flex: 1; }

/* ── Section label ──────────────────────────────────────────── */
.section-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

/* ── Trip route map ─────────────────────────────────────────── */
.journey-map {
    height: 220px;
    border-radius: var(--card-radius);
    overflow: hidden;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
}

/* ── Journey card ───────────────────────────────────────────── */
.journey-card {
    background: var(--surface);
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    margin-bottom: 0.625rem;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    user-select: none;
    -webkit-user-select: none;
    transition: background 0.1s;
}

.journey-card:active { background: #f8f9fa; }

.journey-card-locked { cursor: not-allowed; opacity: 0.7; }
.journey-card-locked:active { background: var(--surface); }

.journey-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.journey-time {
    font-weight: 700;
    font-size: 0.95rem;
}

.journey-direction {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
}

.direction-to   { background: #d1e7fd; color: #084298; }
.direction-from { background: #d1fae5; color: #065f46; }

.journey-status { font-size: 0.7rem; margin-left: auto; }

.journey-card-body { font-size: 0.85rem; }

.journey-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--muted);
}

.journey-stops { display: flex; flex-direction: column; gap: 0.25rem; }

.journey-stop {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.85rem;
}

.stop-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-pending  { background: var(--status-not-collected); }
.dot-waiting  { background: var(--status-waiting); }
.dot-picked   { background: var(--status-picked); }
.dot-dropped  { background: var(--status-dropped); }
.dot-noshow   { background: var(--status-noshow); }

.stop-name { flex: 1; }

.journey-chevron {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    font-size: 0.85rem;
}

/* ── Schedule view ──────────────────────────────────────────── */
.schedule-day { margin-bottom: 1rem; }

.schedule-day-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
    padding: 0 0.125rem;
}

.schedule-day-today .schedule-day-label { color: var(--primary); }

.schedule-trip-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0.5rem 0 0.3rem 0.625rem;
}

.schedule-journey-label {
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 0.2rem 1.125rem;
}

.journey-trip-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
    padding: 0 0.125rem;
}

/* ── Booking card ───────────────────────────────────────────── */
.booking-card {
    background: var(--surface);
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
    padding: 0.75rem 0.875rem;
    margin-bottom: 0.625rem;
    cursor: pointer;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    transition: background 0.1s;
}

.booking-card-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.booking-card:active { background: #f8f9fa; }

.booking-alerts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.4rem;
}

.alert-chip {
    font-size: 0.72rem;
    padding: 0.15rem 0.45rem;
    border-radius: 20px;
    background: #fff3cd;
    color: #664d03;
    font-weight: 500;
}

.alert-chip.cash { background: #d1e7dd; color: #0a3622; }
.alert-chip.note { background: #e2e3e5; color: #41464b; }

.booking-card-body { font-size: 0.875rem; flex: 1; min-width: 0; }

.booking-passenger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.booking-name { font-weight: 600; }

.booking-pax {
    font-size: 0.78rem;
    color: var(--muted);
    white-space: nowrap;
}

.booking-route {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

.booking-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.booking-time { margin-left: auto; font-weight: 500; }

.booking-card-chosen {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    transform: scale(1.02);
    z-index: 2;
}

.booking-card-ghost {
    opacity: 0.4;
    background: #f0f0f0;
}

/* ── Status bar (booking detail) ────────────────────────────── */
.status-bar {
    display: flex;
    gap: 0.375rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.status-btn {
    flex: 1;
    min-width: 80px;
    padding: 0.6rem 0.25rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    font-size: 0.75rem;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
}

.status-btn.active {
    border-color: var(--primary);
    background: #e8f0fe;
    color: var(--primary);
}

.status-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Status colour classes (shared across all circle sizes) ── */
.s-pending { background: var(--status-not-collected); }
.s-waiting { background: var(--status-waiting); }
.s-picked  { background: var(--status-picked); }
.s-dropped { background: var(--status-dropped); }
.s-noshow  { background: var(--status-noshow); }

/* 44px tappable circle — status control on each row of the trip view's booking list */
.status-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    cursor: pointer;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.1s, opacity 0.1s;
}

/* 64px tappable circle — main status control on booking detail */
.status-circle-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    flex-shrink: 0;
    cursor: pointer;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.1s, opacity 0.1s;
}

.status-circle:active,
.status-circle-large:active { transform: scale(0.92); opacity: 0.85; }

.status-circle.saving,
.status-circle-large.saving { opacity: 0.5; pointer-events: none; }

/* Non-interactive until the pre-trip check is complete — view/reorder-only state */
.status-circle.locked { opacity: 0.35; cursor: default; }

/* Visual feedback while the hold-to-advance / hold-to-report-No-Show timer is running, so the
   driver can see the press is registering before the action actually fires. */
.status-circle.holding,
.status-circle-large.holding {
    transform: scale(0.92);
    box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn.holding {
    background-color: var(--bs-danger, #dc3545);
    color: #fff;
}

/* 28px circles inside the long-press menu */
.status-menu-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Long-press status menu ──────────────────────────────── */
.status-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.35);
}

.status-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 220px;
    background: var(--surface);
    z-index: 201;
    box-shadow: -4px 0 24px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0.875rem;
    gap: 0.25rem;
    transform: translateX(100%);
    transition: transform 0.22s ease;
}

.status-menu.open { transform: translateX(0); }

.status-menu-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
}

.status-menu-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.1s;
}

.status-menu-item:active { background: #f0f0f0; }
.status-menu-item.selected { background: #f0f0f0; }

/* ── Contact & map links ────────────────────────────────────── */
.contact-link {
    color: var(--primary);
    text-decoration: none;
}

.maps-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    color: #198754;
    text-decoration: none;
    white-space: nowrap;
}

/* ── Special requirements ───────────────────────────────────── */
.req-row {
    display: flex;
    align-items: center;
    padding: 0.35rem 0;
    font-size: 0.875rem;
    border-top: 1px solid #f0f0f0;
}

.req-row:first-of-type { border-top: none; }

/* ── Van checklist ──────────────────────────────────────────── */
.vehicle-option {
    padding: 0.75rem 0;
    border-top: 1px solid #f0f0f0;
    cursor: pointer;
}

.vehicle-option:first-of-type { border-top: none; }
.vehicle-option:active { background: #f8f9fa; }

.vehicle-reg {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.05em;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0;
    cursor: pointer;
    font-size: 0.9rem;
    border-top: 1px solid #f0f0f0;
    user-select: none;
}

.checklist-item:first-of-type { border-top: none; }
.checklist-icon { font-size: 1.1rem; }

.issue-row {
    padding: 0.5rem 0;
    border-top: 1px solid #f0f0f0;
    font-size: 0.875rem;
}

.issue-row:first-of-type { border-top: none; }
.issue-desc { font-weight: 500; }

/* ── Sign in entries ────────────────────────────────────────── */
.signin-entry {
    background: var(--surface);
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
    padding: 0.75rem 0.875rem;
    margin-bottom: 0.5rem;
}

/* Soft, advisory-only flag for a continuous block over 8 hours — never blocks saving. */
.signin-entry.border-danger,
.info-card.border-danger { border-color: #dc3545; }

.signin-entry-header {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.signin-entry-times {
    font-size: 0.82rem;
    color: var(--muted);
}

.signin-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0.875rem;
    border-top: 2px solid var(--border);
    margin-top: 0.25rem;
}

/* ── Profile avatar ─────────────────────────────────────────── */
.profile-avatar {
    display: flex;
    justify-content: center;
    padding: 0.75rem 0 0.5rem;
    font-size: 4rem;
    color: #adb5bd;
}

/* ── Login page (standalone, not inside driver-app) ─────────── */
.login-page {
    min-height: 100dvh;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.login-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-logo-icon {
    font-size: 2.5rem;
    color: var(--primary);
}

.login-logo h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0.5rem 0 0.25rem;
}

.login-logo p {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0;
}

/* ── Legacy-style day-list / day-overview ("Overview") table ──
   Scoped under .legacy-overview only — does not touch body/global font or colours, so it can't
   bleed into any page outside the Home/Schedule/DayOverview screens. Values copied from the old
   PHP driver app's css.php (grid-template-columns, colours, spacing) so these two screens match
   the legacy look pixel-for-pixel; status-dot colour is deliberately NOT hardcoded here — it
   stays driven by DriverStatusType.ColourHex via DriverStatusRules.StyleBackground, matching the
   admin Gantt board (see JourneyCard/JourneyDetail). ── */
.legacy-overview {
    font-family: 'Roboto', sans-serif;
    color: #333;
    font-size: 0.85rem;
}

.lo-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    height: 50px;
    margin-bottom: 0.5rem;
}

.lo-date { font-size: 1.1rem; font-weight: 600; margin: 0; text-align: center; }

.lo-nav-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #4A990A;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none;
}

.lo-table {
    display: flex;
    flex-direction: column;
    border: 1px solid #333;
    border-radius: 6px;
    overflow: hidden;
}

.lo-row { display: grid; align-items: center; }

.lo-row-daylist { grid-template-columns: 1fr 1fr; gap: 0.5em; }

.lo-row-daylist > div { padding: 0.6em 0.5em; }

a.lo-row-day {
    color: inherit;
    text-decoration: none;
    border-top: 1px solid #ddd;
}

.lo-row-daylist:nth-of-type(odd) { background: #ddd; }
a.lo-row-day.lo-today { background: rgba(74, 153, 10, 0.5) !important; }

.lo-row-head {
    background: #333;
    color: #fff;
    font-weight: 600;
    text-align: center;
}

.lo-row-booking {
    grid-template-columns: 7% 19% 6% 20% 20% 11% 17%;
    font-size: 0.9em;
    text-align: center;
    padding: 0.45em 0.2em;
    border-top: 1px solid #ddd;
    cursor: pointer;
}

.lo-row-booking.lo-alt { background: #ddd; }

.lo-row-trip {
    background: #555;
    color: #fff;
    font-weight: 600;
    text-align: center;
    padding: 0.4em 0.5em;
}

.lo-row-note {
    background: #fff;
    color: #333;
    font-weight: 600;
    padding: 0.5em;
    border-top: 1px solid #666;
    border-bottom: 1px solid #666;
}

.lo-status-dot { display: inline-block; width: 34px; height: 34px; border-radius: 50%; }

.lo-alert-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #B71114;
    color: #fff;
    width: 18px;
    height: 18px;
    font-size: 0.75em;
    font-weight: 600;
}

.lo-highlight {
    display: inline-block;
    border-radius: 20%;
    background: #B71114;
    color: #fff;
    padding: 0 0.3em;
}

.lo-detail {
    grid-column: 1 / -1;
    background: #eee;
    width: 100%;
    text-align: left;
    padding: 0.75rem;
    cursor: default;
}

.lo-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.lo-detail ul { list-style: none; margin: 0; padding: 0; font-size: 1.05em; }
.lo-detail ul li { margin: 0.4em 0; }
.lo-detail ul li a { color: #27639F; text-decoration: none; }

.lo-detail .lo-break { border-top: 1px dashed #999; padding-top: 0.6em; }
.lo-detail .lo-break-top { border-bottom: 1px dashed #999; padding: 0.6em 0; }
.lo-detail .lo-address-head { padding-bottom: 5px; border-bottom: 1px solid #999; font-weight: 600; }

.lo-whatsapp { display: inline-block; color: #25D366 !important; font-weight: 600; }

/* ── Blazor error UI ────────────────────────────────────────── */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }
