* { box-sizing: border-box; }

:root {
    --bg: #e9edf2;
    --panel-bg: #ffffff;
    --text-main: #333333;
    --text-heading: #1f2937;
    --text-muted: #667085;
    --table-header-bg: #f3f4f6;
    --table-header-text: #374151;
    --border-main: #d9dee7;
    --border-light: #edf0f4;
    --progress-bg: #d1d5db;
    --shadow-main: rgba(0, 0, 0, 0.08);
    --button-bg: #2563eb;
    --button-hover: #1d4ed8;
}

body.dark-mode {
    --bg: #111827;
    --panel-bg: #1f2937;
    --text-main: #e5e7eb;
    --text-heading: #f9fafb;
    --text-muted: #cbd5e1;
    --table-header-bg: #374151;
    --table-header-text: #f3f4f6;
    --border-main: #4b5563;
    --border-light: #374151;
    --progress-bg: #4b5563;
    --shadow-main: rgba(0, 0, 0, 0.35);
    --button-bg: #3b82f6;
    --button-hover: #2563eb;
}

body {
    max-width: 1780px;
    margin: 0 auto;
    padding: 14px;
    background: var(--bg);
    color: var(--text-main);
    font-family: Arial, sans-serif;
    transition: background 0.2s ease, color 0.2s ease;
}

.site-header {
    display: grid;
    grid-template-columns: auto minmax(230px, 1fr) auto auto;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
    padding: 12px 16px;
    border-radius: 10px;
    background: var(--panel-bg);
    box-shadow: 0 4px 12px var(--shadow-main);
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 9px;
    background: #ffffff;
}

.brand-logo img { display: block; width: min(160px, 22vw); max-height: 48px; object-fit: contain; }
.header-copy h1 { margin: 0; color: var(--text-heading); font-size: clamp(21px, 2.3vw, 28px); }
.header-copy p { margin: 5px 0 0; color: var(--text-muted); font-size: 14px; }

.primary-nav { display: flex; align-items: center; gap: 5px; }
.primary-nav a {
    padding: 9px 11px;
    border-radius: 8px;
    color: var(--text-heading);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.primary-nav a:hover, .primary-nav a[aria-current="page"] { background: var(--table-header-bg); color: var(--button-bg); }
.header-account { display: flex; align-items: center; justify-content: flex-end; min-width: 46px; }

.owner-incident-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 14px; padding: 13px 16px; border: 1px solid #f59e0b; border-left: 5px solid #dc2626; border-radius: 9px; background: #fffbeb; color: #78350f; box-shadow: 0 3px 10px var(--shadow-main); }
.owner-incident-banner h2 { margin: 2px 0 4px; color: #991b1b; font-size: 17px; }
.owner-incident-banner p { margin: 3px 0; font-size: 12px; }
.owner-incident-banner .eyebrow { margin: 0; color: #92400e; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.owner-incident-banner code { font-weight: 700; }
.owner-incident-banner button { flex: 0 0 auto; }

.pkc-auth-user-menu {
    --pkc-auth-accent: var(--button-bg);
    --pkc-auth-focus: var(--button-hover);
    --pkc-auth-panel-bg: var(--panel-bg);
    --pkc-auth-text: var(--text-heading);
    --pkc-auth-muted: var(--text-muted);
    --pkc-auth-border: var(--border-main);
    position: relative;
    inset: auto;
    z-index: 1100;
}
.pkc-auth-user-menu .pkc-auth-profile-trigger { min-height: 44px; padding: 4px 10px 4px 4px; border-radius: 999px; gap: 0.55rem; }
.pkc-auth-permission-hierarchy { display: grid; grid-template-columns: minmax(0, 1fr) !important; gap: 10px; }
.pkc-auth-permission-category { overflow: hidden; border: 1px solid var(--border-main); border-radius: 8px; background: var(--panel-bg); }
.pkc-auth-permission-category-heading { padding: 8px 10px; border-bottom: 1px solid var(--border-main); background: var(--table-header-bg); }
.pkc-auth-permission-category-heading h3 { margin: 0; font-size: 15px; }
.pkc-auth-permission-table-wrap { overflow-x: auto; }
.pkc-auth-permission-table { width: 100%; min-width: 620px; border-collapse: collapse; table-layout: fixed; }
.pkc-auth-permission-name-column { width: 54%; }
.pkc-auth-permission-view-column { width: 9%; }
.pkc-auth-permission-manage-column { width: 17%; }
.pkc-auth-permission-key-column { width: 20%; }
.pkc-auth-permission-table th, .pkc-auth-permission-table td { padding: 6px 9px; border-bottom: 1px solid var(--border-light); vertical-align: middle; text-align: left; }
.pkc-auth-permission-table thead th { color: var(--text-muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.pkc-auth-permission-table tbody tr:last-child > * { border-bottom: 0; }
.pkc-auth-permission-table-row.is-parent > th { font-weight: 800; }
.pkc-auth-permission-table-row.is-child > th { padding-left: 27px; }
.pkc-auth-permission-table-row.is-child > th::before { content: "↳"; float: left; margin-left: -17px; color: var(--text-muted); }
.pkc-auth-permission-table-row.is-child:has(input:disabled) { opacity: .48; }
.pkc-auth-permission-label { display: block; color: var(--text-heading); font-size: 12px; }
.pkc-auth-permission-description { display: block; color: var(--text-muted); font-size: 10px; font-weight: 400; line-height: 1.25; }
.pkc-auth-permission-check-column { width: 76px; text-align: center !important; white-space: nowrap; }
.pkc-auth-permission-form { display: inline-block; margin: 0; }
.pkc-auth-permission-checkbox { display: grid; place-items: center; min-height: 22px; cursor: pointer; }
.pkc-auth-permission-checkbox input { margin: 0; }
.pkc-auth-permission-table code { display: block; overflow: hidden; color: var(--text-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.pkc-auth-permission-table .pkc-auth-save-feedback { display: block; min-height: 12px; font-size: 9px; }
.pkc-auth-user-menu .pkc-auth-profile-panel { right: 0; width: min(20rem, calc(100vw - 3rem)); }
body.dark-mode .pkc-auth-user-menu .pkc-auth-profile-panel { background: #172133; border-color: rgba(148, 163, 184, 0.22); }
body.dark-mode .pkc-auth-user-menu .pkc-auth-profile-heading { color: #aebdd2; }
body.dark-mode .pkc-auth-user-menu .pkc-auth-profile-heading strong,
body.dark-mode .pkc-auth-user-menu .pkc-auth-profile-links a { color: #f3f7ff; }
body.dark-mode .pkc-auth-user-menu .pkc-auth-profile-links a:hover { background: rgba(113, 164, 255, 0.16); }
body.dark-mode .pkc-auth-user-menu .pkc-auth-profile-logout button { background: #202c43; color: #eef4ff; }

.page-content { min-height: 320px; }
.section-box { margin-bottom: 12px; padding: 14px; border-radius: 10px; background: var(--panel-bg); box-shadow: 0 3px 10px var(--shadow-main); }
.dashboard-heading, .page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.dashboard-actions { display: flex; align-items: center; gap: 10px; }
.vehicle-hits-heading-primary { position: relative; display: flex; flex: 1 1 auto; align-items: center; min-width: 0; gap: 10px; padding-top: 13px; }
.vehicle-hits-heading-primary .eyebrow { display: block; position: absolute; top: 0; left: 0; margin: 0; }
.vehicle-hits-heading-primary h2 { margin-right: 4px; }
.vehicle-hits-quick-filters { display: inline-flex; align-items: center; gap: 6px; margin-left: 2px; }
.vehicle-hits-quick-filters label { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 5px 7px; border: 1px solid var(--border-main); border-radius: 6px; color: var(--text-muted); font-size: 11px; cursor: pointer; white-space: nowrap; }
.vehicle-hits-quick-filters input { accent-color: var(--button-bg); margin: 0; }
.vehicle-hits-filters { display: flex; align-items: flex-end; justify-content: flex-end; flex-wrap: wrap; gap: 5px; min-width: 0; }
.vehicle-hits-header-form { display: block; width: 100%; min-width: 0; }
.vehicle-hits-heading-primary { grid-column: 1; grid-row: 1; }
.vehicle-hits-header-form > .vehicle-hits-filters { grid-column: 2; grid-row: 1; }
.vehicle-hits-search-panel { flex: 0 1 320px; width: auto; min-width: 160px; }
.vehicle-hits-search-panel input[type="search"] { width: 100%; min-height: 32px; box-sizing: border-box; }
.vehicle-hits-filters input[type="search"], .vehicle-hits-filters input[type="date"] { min-width: 0; height: 32px; padding: 5px 7px; border: 1px solid var(--border-main); border-radius: 6px; background: var(--panel-bg); color: var(--text-main); font: inherit; font-size: 12px; }
.vehicle-hits-filters input[type="search"] { width: 172px; }
.vehicle-hits-filters input[type="date"] { width: 124px; }
.vehicle-hits-vehicle-filter { display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; align-self: flex-end; margin: 10px 0 0; }
.vehicle-hits-vehicle-filter label { margin: 0 0 1px; color: var(--text-muted); font-size: 9px; font-weight: 800; line-height: 11px; white-space: nowrap; }
.vehicle-hits-vehicle-filter select { width: auto; min-width: 112px; max-width: 150px; height: 32px; padding: 5px 24px 5px 7px; border: 1px solid var(--border-main); border-radius: 6px; background-color: var(--panel-bg); color: var(--text-main); font: inherit; font-size: 12px; }
.vehicle-hits-search-wrap { position: relative; min-width: 0; }
.range-control-stack { display: inline-flex; flex-direction: column; align-items: center; justify-content: flex-end; align-self: flex-end; }
.date-range-filter-group { display: inline-flex; position: relative; align-items: flex-end; margin: 10px 0 0; padding: 0; border: 0; }
.date-range-filter-group legend { position: absolute; bottom: calc(100% + 1px); left: 0; margin: 0; padding: 0; color: var(--text-muted); font-size: 10px; font-weight: 400; line-height: 11px; white-space: nowrap; }
.date-range-selector { position: relative; display: inline-flex; align-items: stretch; border: 1px solid var(--border-main); border-radius: 7px; background: var(--panel-bg); }
.range-shift, .range-current { min-height: 32px; border: 0; background: transparent; color: var(--text-main); font: inherit; font-size: 12px; cursor: pointer; }
.range-shift { width: 28px; font-size: 20px; line-height: 1; color: var(--text-muted); }
.date-range-selector .range-shift { min-height: 20px; }
.range-shift:hover, .range-current:hover { background: var(--table-header-bg); }
.range-shift:disabled { color: var(--border-main); cursor: default; }
.range-secondary { display: block; color: var(--text-muted); font-size: 10px; font-weight: 400; line-height: 11px; white-space: nowrap; text-align: center; }
.range-current-wrap { display: inline-flex; min-width: 132px; align-items: center; justify-content: center; padding: 0 6px; }
.range-current { min-height: 22px; padding: 1px 4px; font-weight: 600; }
.range-label { line-height: 1.1; }
.range-menu { position: fixed; z-index: 1500; width: 190px; padding: 5px; border: 1px solid var(--border-main); border-radius: 8px; background: var(--panel-bg); box-shadow: 0 7px 20px var(--shadow-main); }
.range-menu button { display: block; width: 100%; padding: 6px 8px; border: 0; border-radius: 5px; background: transparent; color: var(--text-main); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.range-menu button:hover, .range-menu button[aria-current="true"] { background: var(--table-header-bg); color: var(--text-heading); }
.range-menu hr { margin: 4px 2px; border: 0; border-top: 1px solid var(--border-main); }
.date-range-custom-picker { width: min(560px, calc(100vw - 28px)); border: 1px solid var(--border-main); border-radius: 10px; background: var(--panel-bg); color: var(--text-main); box-shadow: 0 12px 35px var(--shadow-main); }
.date-range-custom-picker::backdrop { background: rgba(15,23,42,.45); }
.date-range-custom-picker form { display: grid; gap: 14px; padding: 18px; }
.date-range-custom-picker h2 { margin: 0; font-size: 18px; }
.custom-mode { display: inline-flex; width: fit-content; border: 1px solid var(--border-main); border-radius: 6px; overflow: hidden; }
.custom-mode button, .custom-actions button { padding: 7px 10px; border: 0; background: var(--panel-bg); color: var(--text-main); font: inherit; cursor: pointer; }
.custom-mode button.is-active, .custom-actions button:last-child { background: var(--button-bg); color: #fff; }
.custom-calendars { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.custom-calendar { min-width: 0; }
.custom-calendar header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.custom-calendar header button { border: 0; background: transparent; color: var(--text-main); font-size: 18px; cursor: pointer; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.calendar-weekdays { color: var(--text-muted); font-size: 10px; }
.calendar-grid button, .calendar-grid span { min-height: 27px; border: 0; border-radius: 4px; background: transparent; color: var(--text-main); font: inherit; font-size: 11px; }
.calendar-grid button { cursor: pointer; }
.calendar-grid button:hover, .calendar-grid button.is-start, .calendar-grid button.is-end { background: var(--button-bg); color: #fff; }
.calendar-date-field { display: grid; gap: 4px; color: var(--text-muted); font-size: 11px; }
.custom-calendars label { display: grid; gap: 5px; color: var(--text-muted); font-size: 12px; }
.custom-calendars input { height: 34px; padding: 5px; border: 1px solid var(--border-main); border-radius: 6px; background: var(--panel-bg); color: var(--text-main); font: inherit; }
.custom-actions { display: flex; justify-content: flex-end; gap: 6px; }
@media (max-width: 620px) { .date-range-selector { flex: 0 1 auto; max-width: 100%; min-width: 0; } .range-current-wrap { min-width: 0; } .range-current { flex: 1; min-width: 0; } .range-menu { width: min(190px, calc(100vw - 16px)); } .custom-calendars { grid-template-columns: 1fr; } .vehicle-hits-date-header .date-range-selector { min-width: 120px; } }
.compact-control { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 5px 9px; border: 0; border-radius: 6px; background: var(--button-bg); color: #fff; font: inherit; font-size: 12px; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; }
.compact-control:hover { background: var(--button-hover); }
.compact-control--muted { background: var(--table-header-bg); color: var(--text-heading); }
.compact-control--muted:hover { background: var(--border-main); }
.compact-control--reset { background: #15803d; }
.compact-control--reset:hover { background: #166534; }
.compact-control--manual-vrm { background: #7c3aed; box-shadow: 0 2px 6px rgba(109, 40, 217, .28); }
.compact-control--manual-vrm:hover { background: #6d28d9; }
.compact-control--disabled { background: var(--table-header-bg); color: var(--text-muted); cursor: default; }
#manual-vehicle-record-modal .manual-vehicle-record-modal-content { width: min(calc(100vw - 24px), 1500px); height: calc(100vh - 32px); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
#manual-vehicle-record-modal { padding: 12px; }
body.manual-vehicle-record-open { overflow: hidden; }
#manual-vehicle-record-modal.manual-vehicle-record-modal--creating #manual-reporter-save,
#manual-vehicle-record-modal.manual-vehicle-record-modal--creating #manual-reporter-edit,
#manual-vehicle-record-modal.manual-vehicle-record-modal--creating #manual-image-save,
#manual-vehicle-record-modal.manual-vehicle-record-modal--creating #manual-vehicle-record-change-location,
#manual-vehicle-record-modal.manual-vehicle-record-modal--creating #manual-vehicle-record-edit-images { display: none !important; }
.source-badge { color: var(--text-muted); font-size: 12px; }
.manual-vehicle-record-form { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; }
.manual-vehicle-record-modal-content .hit-location-layout { flex: 1 1 auto; min-height: 0; grid-template-columns: minmax(0, .75fr) minmax(0, 1fr); }
.manual-vehicle-record-form input { min-width: 0; height: 34px; padding: 6px 8px; border: 1px solid var(--border-main); border-radius: 6px; background: var(--panel-bg); color: var(--text-main); font: inherit; }
.manual-vehicle-record-form input[readonly] { background: var(--table-header-bg); }
.manual-vrm-check { display: grid; gap: 6px; }
.manual-vrm-check label { color: var(--text-muted); font-size: 12px; font-weight: 700; }
.manual-vrm-check .vehicle-lookup-controls { margin: 0; }
.manual-vehicle-record-details { grid-template-columns: minmax(0, .96fr) minmax(0, 1.04fr); gap: 12px; }
.manual-vrm-check { grid-column: 1; grid-row: 1; min-height: 413px; padding: 12px; border: 1px solid var(--border-main); border-radius: 8px; background: var(--table-header-bg); }
.manual-check-details { grid-column: 2; grid-row: 1; min-width: 0; margin-top: 0; align-content: start; }
.manual-vehicle-record-status, .manual-vehicle-record-actions { grid-column: 1 / -1; }
.manual-enrichment-section { grid-column: 1 / -1; padding: 8px 10px; border: 1px solid var(--border-main); border-radius: 7px; background: var(--table-header-bg); }
.manual-enrichment-section summary { color: var(--text-heading); cursor: pointer; font-size: 12px; font-weight: 700; }
.manual-enrichment-section p { margin: 7px 0 0; }
.manual-reporter-section { width: 100%; box-sizing: border-box; align-self: stretch; padding: 8px 10px; border: 1px solid var(--border-main); border-radius: 7px; background: var(--table-header-bg); }
.manual-vehicle-record-details .manual-reporter-section { grid-column: 1 / -1; }
.manual-reporter-section summary { color: var(--text-heading); cursor: pointer; font-size: 12px; font-weight: 700; }
.manual-reporter-fields { display: grid; grid-template-columns: minmax(155px, .27fr) minmax(0, 1fr); gap: 7px 10px; margin-top: 8px; }
.manual-reporter-fields input, .manual-reporter-fields select, .manual-reporter-fields textarea { width: 100%; box-sizing: border-box; min-width: 0; resize: vertical; padding: 6px 8px; border: 1px solid var(--border-main); border-radius: 6px; background: var(--panel-bg); color: var(--text-main); font: inherit; }
.manual-vrm-status--success::before, .manual-vrm-status--info::before { display: inline-grid; width: 18px; height: 18px; margin-right: 7px; place-items: center; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 800; vertical-align: -2px; }
.manual-vrm-status--success::before { content: "✓"; background: #16803a; }
.manual-vrm-status--info::before { content: "i"; background: #2563eb; }
.manual-reporter-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.manual-location-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 10px; padding: 12px; border: 1px solid var(--border-main); border-radius: 8px; background: var(--panel-bg); }
.manual-location-inputs { display: grid; gap: 7px; align-content: start; }
.manual-location-inputs h3 { margin: 0 0 2px; font-size: 15px; }
.manual-location-inline { display: flex; gap: 6px; }
.manual-location-inline input { flex: 1 1 0; min-width: 0; }
.manual-location-inline .compact-control { flex: 0 0 auto; min-width: 68px; }
.manual-location-coordinates { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; }
.manual-location-coordinates .compact-control { min-width: 68px; width: auto; }
.manual-location-coordinates button { flex: 0 0 auto; }
.manual-location-address-wrap { position: relative; }
.manual-location-address-wrap input { width: 100%; }
.manual-location-address-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.manual-location-address-row .compact-control { min-width: 68px; }
.manual-location-suggestions { position: fixed; z-index: 2100; max-height: 180px; overflow: auto; border: 1px solid var(--border-main); border-radius: 6px; background: var(--panel-bg); box-shadow: 0 8px 18px rgba(0,0,0,.18); }
.manual-location-suggestion { display: block; width: 100%; padding: 8px; border: 0; background: transparent; color: var(--text-main); text-align: left; cursor: pointer; font: inherit; font-size: 12px; }
.manual-location-suggestion:hover, .manual-location-suggestion:focus { background: var(--table-header-bg); }
.manual-location-preview { width: 100%; min-width: 0; overflow: hidden; }
.manual-vehicle-record-map { width: 100%; min-height: 375px; height: 375px; border-radius: 8px; background: var(--table-header-bg); }
.manual-location-summary { display: grid; gap: 4px; margin-top: 8px; font-size: 12px; }
.manual-location-summary a { color: var(--link-color); }
.manual-image-workspace { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr; gap: 10px; align-items: start; padding: 10px; border: 1px solid var(--border-main); border-radius: 8px; background: var(--panel-bg); }
.manual-image-primary { display: grid; height: 185px; min-height: 185px; place-items: center; overflow: hidden; border-radius: 8px; background: var(--table-header-bg); color: var(--text-muted); font-size: 12px; }
.manual-image-primary img { display: block; width: 100%; height: 100%; max-height: 320px; object-fit: contain; }
.manual-image-primary p { margin: 0; }
.manual-image-secondary { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; min-height: 0; }
.manual-image-thumbnail, .manual-image-preview { display: grid; gap: 3px; margin: 0; justify-items: start; }
.manual-image-thumbnail button:first-child { width: 76px; height: 62px; padding: 2px; border: 1px solid var(--border-main); border-radius: 5px; background: var(--panel-bg); }
.manual-image-thumbnail img, .manual-image-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.manual-image-thumbnail .compact-link, .manual-image-preview .compact-link { background: transparent; color: var(--link-color); padding: 1px 0; font-size: 10px; }
.manual-image-edit-controls { display: grid; gap: 6px; order: 2; }
.manual-image-status--busy::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 7px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: manual-image-spin .7s linear infinite; }
@keyframes manual-image-spin { to { transform: rotate(360deg); } }
.manual-image-edit-controls h3 { margin: 0; font-size: 15px; }
.manual-image-edit-controls input[type="file"] { width: 100%; min-height: 34px; box-sizing: border-box; }
.manual-image-secondary { order: 3; }
.manual-image-previews { display: flex; flex-wrap: wrap; gap: 8px; }
.manual-image-preview { width: 86px; height: 86px; }
.manual-image-preview img { min-height: 58px; border-radius: 5px; }
.manual-vehicle-record-actions { display: flex; justify-content: flex-end; gap: 8px; }
#manual-vehicle-record-cancel { padding: 7px 11px; border-radius: 6px; background: #b91c1c; color: #fff; text-decoration: none; }
#manual-vehicle-record-cancel:hover { background: #991b1b; }
#manual-vehicle-record-save { background: #15803d; }
#manual-vehicle-record-save:hover { background: #166534; }
.manual-vehicle-record-actions #manual-vehicle-record-save { min-width: 80px; min-height: 44px; }
#manual-vehicle-record-modal .modal-heading .compact-link { min-width: 64px; min-height: 32px; }
.vehicle-hits-suggestions { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; width: min(260px, 72vw); max-height: 320px; overflow-y: auto; padding: 4px; border: 1px solid var(--border-main); border-radius: 7px; background: var(--panel-bg); box-shadow: 0 5px 14px var(--shadow-main); }
.vehicle-hits-suggestion { display: block; width: 100%; padding: 7px 8px; border: 0; border-radius: 5px; background: transparent; color: var(--text-main); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.vehicle-hits-suggestion:hover, .vehicle-hits-suggestion[aria-selected="true"] { background: var(--table-header-bg); color: var(--text-heading); }
.vehicle-hits-result-switch { display: inline-flex; align-items: stretch; border: 1px solid var(--border-main); border-radius: 6px; overflow: hidden; }
.vehicle-hits-result-switch input { position: absolute; opacity: 0; pointer-events: none; }
.vehicle-hits-result-switch label { display: inline-flex; align-items: center; min-height: 30px; padding: 5px 8px; color: var(--text-muted); font-size: 12px; cursor: pointer; white-space: nowrap; }
.vehicle-hits-result-switch input:checked + label { background: var(--button-bg); color: #fff; }
.vehicle-hits-result-switch input:focus-visible + label { outline: 2px solid var(--button-bg); outline-offset: -2px; }
.vehicle-hits-result-filter, .vehicle-hits-ops-filters { display: inline-flex; position: relative; align-items: flex-end; min-width: 0; margin: 10px 0 0; padding: 0; border: 0; }
.vehicle-hits-result-filter legend, .vehicle-hits-ops-filters legend { position: absolute; bottom: calc(100% + 1px); left: 0; color: var(--text-muted); font-size: 9px; font-weight: 800; }
.vehicle-hits-ops-filters { gap: 4px; margin-left: 14px; }
.vehicle-hits-ops-filters input { position: absolute; opacity: 0; pointer-events: none; }
.ops-filter { display: inline-flex; min-height: 30px; align-items: center; padding: 4px 7px; border: 1px solid currentColor; border-radius: 6px; background: transparent; font-size: 11px; cursor: pointer; white-space: nowrap; }
.ops-filter--follow-up { --ops-filter-text: #c26100; --ops-filter-fill: #d97706; color: var(--ops-filter-text); }
.ops-filter--clamped { --ops-filter-text: #2563eb; --ops-filter-fill: #2563eb; color: var(--ops-filter-text); }
.ops-filter--declamped { --ops-filter-text: #64748b; --ops-filter-fill: #64748b; color: var(--ops-filter-text); }
.ops-filter--self-declamped { --ops-filter-text: #1d4ed8; --ops-filter-fill: #1d4ed8; color: var(--ops-filter-text); }
.ops-filter--collection { --ops-filter-text: #b91c1c; --ops-filter-fill: #b91c1c; color: var(--ops-filter-text); }
.ops-filter--collected { --ops-filter-text: #9333ea; --ops-filter-fill: #9333ea; color: var(--ops-filter-text); }
.ops-filter--released { --ops-filter-text: #6b7280; --ops-filter-fill: #6b7280; color: var(--ops-filter-text); }
.ops-filter--disposed { --ops-filter-text: #111827; --ops-filter-fill: #111827; color: var(--ops-filter-text); }
.ops-filter--nfa { --ops-filter-text: #475569; --ops-filter-fill: #475569; color: var(--ops-filter-text); }
.ops-filter--none { --ops-filter-text: #374151; --ops-filter-fill: #374151; color: var(--ops-filter-text); }
.vehicle-hits-ops-filters input:checked + .ops-filter,
.recent-hit-ops-filters input:checked + .ops-filter,
.vehicle-hits-filter-menu .ops-filter[aria-pressed="true"] { background: var(--ops-filter-fill); color: #fff; }
.vehicle-hits-ops-filters input:focus-visible + label { outline: 2px solid currentColor; outline-offset: 2px; }
.vehicle-hits-pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -2px 0 14px; padding: 0 2px; color: var(--text-muted); font-size: 12px; }
.vehicle-hits-pagination-links { display: inline-flex; align-items: center; gap: 5px; }
.vehicle-hits-current-page { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; min-height: 32px; padding: 5px 8px; border: 1px solid var(--border-main); border-radius: 6px; color: var(--text-heading); font-weight: 700; }
.vehicle-hits-map-control { margin-left: 10px; }
.vehicle-hits-filter-header { position: relative; overflow: visible; }
.vehicle-hits-filter-toggle { min-height: 32px; height: 32px; box-sizing: border-box; padding: 5px 24px 5px 8px; border: 1px solid var(--border-main); border-radius: 6px; background: var(--panel-bg); color: var(--text-heading); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; position: relative; }
.vehicle-hits-filter-toggle::after { content: "▾"; position: absolute; right: 8px; color: var(--text-muted); font-size: 11px; }
.vehicle-hits-filter-toggle:hover, .vehicle-hits-filter-toggle[aria-expanded="true"] { border-color: var(--border-main); background: var(--table-header-bg); }
.vehicle-hits-filter-menu { position: fixed; z-index: 1500; min-width: 170px; max-width: min(280px, calc(100vw - 28px)); max-height: min(360px, 60vh); overflow-y: auto; padding: 5px; border: 1px solid var(--border-main); border-radius: 8px; background: var(--panel-bg); box-shadow: 0 8px 22px var(--shadow-main); }
.vehicle-hits-filter-menu > button { display: block; width: 100%; min-height: 30px; padding: 5px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--text-main); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.vehicle-hits-filter-menu > button:hover, .vehicle-hits-filter-menu > button[aria-pressed="true"] { background: var(--table-header-bg); color: var(--text-heading); }
.vehicle-hits-filter-menu .result-filter-option[aria-pressed="true"] { background: var(--button-bg); color: #fff; }
.vehicle-hits-filter-menu[data-filter-menu="source"] > button[data-filter-key="vehicle"] { background: var(--panel-bg); color: var(--text-main); }
.vehicle-hits-filter-menu[data-filter-menu="source"] > button[data-filter-key="vehicle"][aria-pressed="true"] { background: #1d4ed8; color: #fff; }
.vehicle-hits-filter-menu .ops-filter { justify-content: flex-start; min-height: 30px; }
.vehicle-hits-filter-menu .ops-filter { border-color: transparent; background: transparent; color: var(--ops-filter-text); }
.vehicle-hits-filter-menu .ops-filter[aria-pressed="true"] { color: #fff; }
.vehicle-hits-date-header { min-width: 0; padding-top: 13px; }
.vehicle-hits-date-header .date-range-filter-group { position: relative; margin: 0; }
.vehicle-hits-date-header .date-range-filter-group legend { top: -13px; bottom: auto; }
.vehicle-hits-date-header .date-range-selector { max-width: 100%; min-height: 32px; border-color: var(--border-main); background: var(--panel-bg); box-shadow: none; }
.vehicle-hits-date-header .range-shift, .vehicle-hits-date-header .range-current { min-height: 30px; font-size: 11px; }
.vehicle-hits-date-header .range-current-wrap { min-width: 112px; padding: 0 4px; }
.vehicle-hits-table { min-width: 1180px; table-layout: fixed; }
.vehicle-hits-col-vehicle { width: 8%; }
.vehicle-hits-col-vrm { width: 10%; }
.vehicle-hit-make-model { display: block; overflow: hidden; margin-top: 2px; color: var(--text-muted); font-size: 11px; line-height: 1.2; white-space: nowrap; text-overflow: ellipsis; }
.vehicle-hit-source { display: grid; gap: 2px; }
.vehicle-hit-source small { color: var(--text-muted); font-size: 11px; line-height: 1.2; }
.vehicle-hit-vrm--misread, .hit-location-vrm--misread { color: #dc2626; text-decoration: line-through; text-decoration-thickness: 2px; }
.vehicle-hit-row--misread td { background: rgba(220, 38, 38, .035); }
.hit-misread-toggle { margin-left: auto; padding: 5px 8px; border: 2px solid #dc2626; border-radius: 6px; background: transparent; color: #dc2626; font-size: 11px; font-weight: 800; }
.hit-misread-toggle.is-selected { background: #dc2626; color: #fff; }
.vehicle-hits-col-captured { width: 12%; }
.vehicle-hits-col-location { width: 19%; }
.vehicle-hits-col-result { width: 11%; }
.vehicle-hits-col-tax { width: 10%; }
.vehicle-hits-col-mot { width: 11%; }
.vehicle-hits-col-ops { width: 13%; }
.vehicle-hits-col-image { width: 6%; }
.vehicle-hit-relative { display: inline-block; margin: 3px 0 0 5px; color: var(--text-muted); font-size: 10px; line-height: 1.15; white-space: normal; vertical-align: middle; }
.vehicle-hit-compliance .status-pill { padding: 3px 7px; white-space: nowrap; }
.vehicle-hit-mot-text { display: inline; color: var(--text-main); font-size: 12px; font-weight: 700; line-height: 1.2; }
.vehicle-hit-ops-cell { min-width: 0; vertical-align: top; }
.vehicle-hit-ops-cell > .ops-action-badges:not(.ops-action-badges--reasons) { flex-wrap: nowrap; }
.ops-action-badges { display: flex; flex-wrap: wrap; gap: 3px; }
.ops-action-badges--reasons { margin-top: 3px; }
.ops-action-badge { display: inline-flex; padding: 3px 6px; border-radius: 999px; color: #fff; font-size: 10px; font-weight: 800; line-height: 1.15; white-space: nowrap; }
.ops-action-badge--follow-up { background: #d97706; }
.ops-action-badge--follow-up-reason { background: #b45309; }
.ops-action-badge--follow-up-reason-abn { background: #9333ea; }
.ops-action-badge--follow-up-reason-fvr { background: #dc2626; }
.ops-action-badge--follow-up-reason-pl { background: #2563eb; }
.ops-action-badge--follow-up-reason-vda { background: #64748b; }
.ops-action-badge--clamped { background: #2563eb; }
.ops-action-badge--collection, .ops-action-badge--collection-collection { background: #b91c1c; }
.ops-action-badge--collection-collected { background: #9333ea; }
.ops-action-badge--collection-disposed { background: #111827; }
.ops-action-badge--vim { background: #166534; }
.ops-action-badge--nfa { background: #475569; }
.ops-action-none { color: var(--text-muted); }
.hit-modal-ops-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.hit-modal-ops-actions strong { grid-column: 1 / -1; color: var(--text-heading); font-size: 12px; }
.hit-modal-ops-action { min-height: 38px; padding: 6px 8px; border: 2px solid currentColor; background: transparent; font-size: 12px; font-weight: 800; }
.hit-modal-ops-action--follow-up { color: #c26100; }
.hit-modal-ops-action--clamped { color: #2563eb; }
.hit-modal-ops-action--collection { color: #9333ea; }
.hit-modal-ops-action--vim { color: #166534; }
.hit-modal-ops-action--follow-up[aria-pressed="true"] { background: #d97706; color: #fff; }
.hit-modal-ops-action--clamped[aria-pressed="true"] { background: #2563eb; color: #fff; }
.hit-modal-ops-action--collection[aria-pressed="true"] { background: #9333ea; color: #fff; }
.hit-modal-ops-action--vim[aria-pressed="true"] { background: #166534; color: #fff; }
.hit-modal-ops-action:disabled { opacity: .38; cursor: not-allowed; }
.hit-modal-clamp-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; grid-column: 1 / -1; }
.hit-modal-clamp-choice { min-height: 34px; border: 2px solid #64748b; background: transparent; color: #475569; font-size: 11px; font-weight: 800; }
.hit-modal-clamp-choice--clamped { border-color: #2563eb; color: #2563eb; }
.hit-modal-clamp-choice--declamped, .hit-modal-clamp-choice--self-declamped { border-color: #64748b; color: #475569; }
.hit-modal-clamp-choice[aria-pressed="true"] { background: #2563eb; border-color: #2563eb; color: #fff; }
.hit-modal-clamp-choice--off[aria-pressed="true"] { background: #64748b; border-color: #64748b; color: #fff; }
.hit-location-nfa-button { min-height: 28px; padding: 4px 8px; border: 1px solid #334155; background: transparent; color: #334155; font-size: 10px; font-weight: 800; }
.hit-location-nfa-button[aria-pressed="true"] { border-color: #334155; background: #334155; color: #fff; }
.hit-modal-workflow-editor { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; padding: 14px 16px 16px; border-top: 1px solid var(--border-main); }
.hit-modal-workflow-editor h4 { margin: 0; color: var(--text-heading); font-size: 12px; }
.workflow-secondary-modal-content .hit-modal-workflow-editor h4,
.workflow-secondary-modal-content .hit-modal-workflow-current,
.workflow-secondary-modal-content .hit-modal-workflow-reasons,
.workflow-secondary-modal-content .hit-modal-collection-popup { grid-column: 1 / -1; }
.hit-modal-workflow-reasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.hit-modal-workflow-reason { min-height: 32px; padding: 5px 7px; border: 2px solid #b45309; border-radius: 7px; background: transparent; color: #92400e; font-size: 11px; font-weight: 800; line-height: 1.15; }
.hit-modal-workflow-reason[aria-pressed="true"] { background: #b45309; color: #fff; }
.hit-modal-workflow-reason--abn { border-color: #9333ea; color: #7e22ce; }
.hit-modal-workflow-reason--fvr { border-color: #dc2626; color: #b91c1c; }
.hit-modal-workflow-reason--pl { border-color: #2563eb; color: #1d4ed8; }
.hit-modal-workflow-reason--vda { border-color: #64748b; color: #475569; }
.hit-modal-workflow-reason--abn[aria-pressed="true"] { background: #9333ea; color: #fff; }
.hit-modal-workflow-reason--fvr[aria-pressed="true"] { background: #dc2626; color: #fff; }
.hit-modal-workflow-reason--pl[aria-pressed="true"] { background: #2563eb; color: #fff; }
.hit-modal-workflow-reason--vda[aria-pressed="true"] { background: #64748b; color: #fff; }
.hit-modal-workflow-editor textarea, .hit-modal-workflow-editor input { width: 100%; box-sizing: border-box; }
.hit-modal-workflow-save { grid-column: 1; justify-self: start; border: 1px solid #15803d; background: #15803d; color: #fff; }
.hit-modal-workflow-save:hover, .hit-modal-workflow-save:focus-visible { background: #166534; color: #fff; }
.hit-modal-workflow-cancel { grid-column: 2; justify-self: end; }
.hit-modal-workflow-clear { justify-self: start; min-height: 27px; padding: 4px 8px; border-radius: 5px; font-size: 11px; }
.hit-modal-workflow-clear { border: 1px solid #b91c1c; background: #b91c1c; color: #fff; }
.hit-modal-workflow-clear:hover, .hit-modal-workflow-clear:focus-visible { background: #991b1b; color: #fff; }
.hit-modal-collection-stage { display: flex; flex-wrap: wrap; gap: 5px; align-items: stretch; }
.hit-modal-collection-stage button { min-height: 32px; padding: 5px 8px; font-size: 11px; }
.hit-modal-collection-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; width: 100%; }
.hit-modal-collection-choices > .compact-control:not(.hit-modal-collection-clear) { background: transparent; }
.hit-modal-collection-choice--collection { border: 2px solid #9333ea; color: #9333ea; }
.hit-modal-collection-choices > .hit-modal-collection-choice--collection[aria-pressed="true"] { background: #9333ea; color: #fff; }
.hit-modal-collection-choice--collected { border: 2px solid #15803d; color: #15803d; }
.hit-modal-collection-choices > .hit-modal-collection-choice--collected[aria-pressed="true"] { background: #15803d; color: #fff; }
.hit-modal-collection-choice--disposed { border: 2px solid #111827; color: #111827; }
.hit-modal-collection-choices > .hit-modal-collection-choice--disposed[aria-pressed="true"] { background: #111827; color: #fff; }
.hit-modal-collection-choices .hit-modal-collection-clear { grid-column: 1 / -1; justify-self: start; }
.hit-modal-collection-trigger { font-weight: 800; }
.hit-modal-collection-stage .hit-modal-collection-trigger { width: 100%; min-height: 38px; }
.hit-modal-collection-popup { display: grid; gap: 8px; margin-top: 0; padding: 10px; border: 1px solid var(--border-main); border-radius: 7px; background: var(--table-header-bg); }
.hit-modal-follow-up-popup { margin-top: 5px; border: 1px solid var(--border-main); border-radius: 7px; background: var(--surface-main); }
.hit-modal-follow-up-popup[hidden], .hit-modal-collection-popup[hidden] { display: none !important; }
.workflow-secondary-modal { z-index: 2200; }
.workflow-secondary-modal[hidden] { display: none !important; }
.workflow-secondary-modal-content { width: min(430px, calc(100vw - 32px)); max-height: min(78vh, 680px); padding: 0; overflow: auto; border-radius: 11px; }
.workflow-secondary-modal-content .modal-heading { padding: 13px 16px; border-bottom: 1px solid var(--border-main); }
.workflow-secondary-modal-content .modal-heading h2 { font-size: 17px; }
.workflow-secondary-modal-content .modal-heading .compact-link { min-height: 28px; padding: 4px 8px; border: 1px solid var(--button-bg); background: var(--button-bg); color: #fff; font-size: 11px; }
.workflow-secondary-modal-content .modal-heading .compact-link:hover, .workflow-secondary-modal-content .modal-heading .compact-link:focus-visible { background: var(--button-hover); color: #fff; }
.workflow-secondary-modal-content .hit-modal-workflow-editor { border-top: 0; }
.hit-modal-workflow-current { margin: 0; padding: 7px 9px; border-radius: 6px; background: var(--table-header-bg); color: var(--text-heading); font-size: 12px; font-weight: 700; }
.hit-modal-collection-popup input, .hit-modal-collection-popup textarea { background: var(--surface-main); }
.hit-modal-collection-clear { border: 1px solid #b91c1c; background: #b91c1c; color: #fff; }
.hit-modal-collection-clear:hover, .hit-modal-collection-clear:focus-visible { background: #991b1b; color: #fff; }
.hit-modal-workflow-cancel { border: 1px solid var(--button-bg); background: var(--button-bg); color: #fff; }
.hit-modal-workflow-cancel:hover, .hit-modal-workflow-cancel:focus-visible { background: var(--button-hover); color: #fff; }
.hit-modal-ops-status { grid-column: 1 / -1; min-height: 1em; color: var(--text-muted); font-size: 10px; }
.section-box h2 { margin: 0; color: var(--text-heading); }
.eyebrow { margin: 0 0 5px; color: var(--button-bg); font-size: 12px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
.section-intro { margin: 7px 0 0; color: var(--text-muted); }
.button-link, button { display: inline-block; border: 0; border-radius: 8px; background: var(--button-bg); color: #fff; padding: 11px 17px; font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; }
.button-link:hover, button:hover { background: var(--button-hover); }

.table-section { padding: 10px 18px 18px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 8px 9px; background: var(--table-header-bg); color: var(--table-header-text); text-align: left; white-space: nowrap; }
td { padding: 8px 9px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.status-ok { color: #15803d; font-weight: 700; }
.status-old { color: #ea580c; font-weight: 700; }
.status-missing, .status-error { color: #dc2626; font-weight: 700; }
.status-downloading { color: #2563eb; font-weight: 700; }
.status-interrupted { color: #9333ea; font-weight: 700; }
.status-offline, .status-unknown { color: #6b7280; font-weight: 700; }
.status-online { color: #15803d; font-weight: 700; }
.status-stale { color: #ea580c; font-weight: 700; }
.compact-link { padding: 6px 9px; font-size: 12px; white-space: nowrap; }
.progress-outer, .progress-container { min-width: 110px; height: 22px; overflow: hidden; border-radius: 8px; background: var(--progress-bg); }
.progress-inner, .progress-bar { height: 100%; background: #22c55e; color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; }
.last-seen-button { padding: 0; background: none; color: var(--button-bg); text-decoration: underline; }
.last-seen-button:hover { background: none; color: var(--button-hover); }

.file-management { padding: 8px 22px; }
.managed-file { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr); gap: 28px; padding: 22px 0; border-bottom: 1px solid var(--border-main); }
.managed-file:last-child { border-bottom: 0; }
.managed-file-title { display: flex; align-items: center; gap: 12px; }
.managed-file-title h3 { margin: 0; color: var(--text-heading); }
.managed-file-details > p { color: var(--text-muted); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid currentColor; border-radius: 999px; font-size: 12px; }
.status-symbol { width: 7px; height: 7px; border: 2px solid currentColor; border-radius: 50%; background: currentColor; }
.status-stale .status-symbol { border-radius: 1px; background: transparent; transform: rotate(45deg); }
.status-offline .status-symbol { background: transparent; }
.health-label { font-weight: 700; }
.health-healthy { color: #15803d; }
.health-warning { color: #b45309; }
.health-fault { color: #dc2626; }
.health-unknown { color: var(--text-muted); }
.file-facts { display: flex; flex-wrap: wrap; gap: 12px 30px; margin: 16px 0 0; }
.file-facts div { min-width: 150px; }
.file-facts dt { color: var(--text-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.file-facts dd { margin: 4px 0 0; }
.age-notice { padding: 10px 12px; border-left: 4px solid #ea580c; background: color-mix(in srgb, #ea580c 9%, transparent); color: var(--text-main) !important; }
.hit-list-processing { margin-top: 16px; padding: 12px; border: 1px solid var(--border-main); border-radius: 9px; background: var(--panel-bg); }
.processing-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-heading); }
.processing-message { margin: 8px 0; color: var(--text-muted); font-size: 13px; }
.processing-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 8px 0 0; }
.processing-facts div { min-width: 130px; }
.processing-facts dt { color: var(--text-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.processing-facts dd { margin: 2px 0 0; overflow-wrap: anywhere; font-size: 12px; }
.status-processing-waiting, .status-processing-debouncing, .status-processing-queued { color: #b45309; }
.status-processing-snapshot, .status-processing-building, .status-processing-validating { color: #2563eb; }
.status-processing-ready { color: #15803d; }
.status-processing-failed { color: #dc2626; }
.processing-progress { height: 10px; overflow: hidden; margin-top: 10px; border-radius: 999px; background: var(--progress-bg); }
.processing-progress-bar { width: 0; height: 100%; background: #2563eb; transition: width .2s ease; }
.upload-section { align-self: center; padding: 16px; border: 1px solid var(--border-main); border-radius: 10px; background: var(--table-header-bg); }
.upload-section label { display: block; margin-bottom: 9px; color: var(--text-heading); font-weight: 700; }
.upload-section input[type="file"] { display: block; width: 100%; margin-bottom: 12px; color: var(--text-main); }
.progress-container { display: none; width: 100%; margin-top: 12px; }
.progress-bar { width: 0; }
.upload-progress-facts { display: flex; flex-wrap: wrap; gap: 5px 10px; margin-top: 8px; color: var(--text-muted); font-size: 12px; }
.message { margin-top: 9px; font-weight: 700; }
.view-only-note { align-self: center; margin: 0; padding: 14px; border: 1px solid var(--border-main); border-radius: 9px; color: var(--text-muted); }
.hit-list-source-sections { display: grid; gap: 16px; }
.hit-list-source-section { display: grid; gap: 16px; }
.hit-list-source-header, .hit-list-history-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.hit-list-live-files { display: grid; gap: 10px; }
.hit-list-live-file { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 14px; border: 1px solid var(--border-main); border-radius: 10px; background: var(--table-header-bg); }
.hit-list-file-summary > div:first-child { display: flex; align-items: center; gap: 9px; }
.hit-list-file-summary h3 { margin: 0; overflow-wrap: anywhere; color: var(--text-heading); font-size: 16px; }
.hit-list-file-summary .file-facts { margin-top: 10px; }
.hit-list-file-actions { display: flex; align-items: flex-start; justify-content: flex-end; gap: 6px; }
.lifecycle-action { position: relative; }
.lifecycle-action > summary { display: inline-block; padding: 6px 9px; border-radius: 8px; background: var(--button-bg); color: #fff; font-size: 12px; font-weight: 700; list-style: none; cursor: pointer; white-space: nowrap; }
.lifecycle-action > summary::-webkit-details-marker { display: none; }
.lifecycle-action > summary:hover, .lifecycle-action[open] > summary { background: var(--button-hover); }
.lifecycle-action > form { z-index: 30; display: grid; gap: 10px; min-width: min(390px, calc(100vw - 44px)); margin-top: 7px; padding: 14px; border: 1px solid var(--border-main); border-radius: 10px; background: var(--panel-bg); box-shadow: 0 12px 28px rgba(15, 23, 42, .2); }
.hit-list-file-actions .lifecycle-action > form { position: absolute; right: 0; }
.lifecycle-action p { margin: 0; color: var(--text-muted); font-size: 12px; line-height: 1.45; }
.lifecycle-action label { display: grid; gap: 5px; color: var(--text-heading); font-size: 12px; font-weight: 700; }
.lifecycle-action input[type="date"], .lifecycle-action input[type="file"] { width: 100%; min-width: 0; padding: 8px; border: 1px solid var(--border-main); border-radius: 7px; background: var(--panel-bg); color: var(--text-main); font: inherit; }
.lifecycle-action button { justify-self: start; padding: 8px 11px; font-size: 12px; }
.lifecycle-action-danger > summary, .lifecycle-action-danger button { background: #b91c1c; }
.lifecycle-action-danger > summary:hover, .lifecycle-action-danger[open] > summary, .lifecycle-action-danger button:hover { background: #991b1b; }
.lifecycle-action .retire-confirm { grid-template-columns: auto 1fr; align-items: start; color: #b91c1c; }
.hit-list-add-file { justify-self: start; }
.hit-list-add-file > summary { padding: 9px 13px; font-size: 13px; }
.hit-list-add-file > form { width: min(520px, calc(100vw - 44px)); }
.hit-list-empty { margin: 0; padding: 15px; border: 1px dashed var(--border-main); border-radius: 9px; color: var(--text-muted); }
.hit-list-history-table { min-width: 900px; font-size: 12px; }
.history-error { display: block; max-width: 260px; margin-top: 4px; color: #b91c1c; white-space: normal; }

@media (max-width: 720px) {
    .hit-list-source-header, .hit-list-history-heading { align-items: stretch; flex-direction: column; }
    .hit-list-live-file { grid-template-columns: minmax(0, 1fr); }
    .hit-list-file-actions { justify-content: flex-start; flex-wrap: wrap; }
    .hit-list-file-actions .lifecycle-action[open] { flex: 1 0 100%; }
    .hit-list-file-actions .lifecycle-action > form { position: static; width: 100%; min-width: 0; box-shadow: none; }
}

.session-modal, .auth-modal { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(0, 0, 0, 0.6); }
.auth-modal { z-index: 2100; }
.session-modal.open, .auth-modal.open { display: flex; }
.session-modal-content { width: min(760px, 100%); max-height: 85vh; overflow: auto; padding: 24px; border-radius: 14px; background: var(--panel-bg); }
.modal-heading, .auth-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-heading h2, .auth-modal-header h2 { margin: 0; color: var(--text-heading); }
.hit-location-viewed { margin-left: auto; color: var(--text-muted); font-size: 11px; font-weight: 400; white-space: nowrap; }
.hit-location-report { position: relative; flex: 0 0 auto; font-size: 12px; }
.hit-location-report > summary { display: block; border: 0; border-radius: 8px; background: #b91c1c; color: #fff; font: inherit; line-height: normal; list-style: none; cursor: pointer; }
.hit-location-report > summary::-webkit-details-marker { display: none; }
.hit-location-report > summary::after { content: " ▾"; font-size: 9px; }
.hit-location-report > summary:hover, .hit-location-report > summary:focus-visible, .hit-location-report[open] > summary { border-color: #991b1b; background: #991b1b; color: #fff; }
.hit-location-report[aria-busy="true"] > summary { cursor: wait; pointer-events: none; }
.hit-location-report[aria-busy="true"] > summary::after { content: ""; display: inline-block; width: 9px; height: 9px; margin-left: 6px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; vertical-align: -2px; animation: hit-report-spin .7s linear infinite; }
.hit-location-report-menu { position: absolute; z-index: 1200; top: calc(100% + 5px); right: 0; min-width: 116px; overflow: hidden; border: 1px solid var(--border-main); border-radius: 8px; background: var(--panel-bg); box-shadow: 0 8px 22px rgba(15, 23, 42, .2); }
.hit-location-report-menu a { display: block; padding: 7px 10px; color: var(--text-heading); font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.hit-location-report-menu a:hover, .hit-location-report-menu a:focus-visible { background: color-mix(in srgb, #b91c1c 12%, var(--panel-bg)); color: #b91c1c; }
.hit-location-report-menu a[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.hit-location-report-menu a[aria-busy="true"] { opacity: .7; cursor: wait; }
@keyframes hit-report-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hit-location-report[aria-busy="true"] > summary::after { animation: none; } }
.hit-location-context { max-width: min(620px, 54vw); padding: 5px 9px; border-radius: 7px; background: var(--table-header-bg); color: var(--text-heading); font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vehicle-lookup-content { width: min(1040px, 100%); }
.session-modal-content.vehicle-lookup-content { padding: 14px; }
.vehicle-lookup-content form { margin-top: 10px; }
.vehicle-lookup-content label { display: block; margin-bottom: 4px; color: var(--text-heading); font-size: 13px; font-weight: 700; }
.vehicle-lookup-controls { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.vehicle-lookup-controls input { min-width: 0; border: 1px solid var(--border-main); border-radius: 7px; padding: 8px 9px; background: var(--panel-bg); color: var(--text-main); font: inherit; text-transform: uppercase; }
.vehicle-lookup-controls button { padding: 8px 13px; }
.vehicle-lookup-content .message { margin: 6px 0 0; font-size: 13px; }
.vehicle-lookup-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 9px 0 0; }
.vehicle-lookup-results div { padding: 7px 8px; border: 1px solid var(--border-main); border-radius: 7px; background: var(--table-header-bg); }
.vehicle-lookup-results dt { color: var(--text-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.vehicle-lookup-results dd { margin: 2px 0 0; color: var(--text-heading); font-weight: 700; }
.vehicle-summary-card { grid-column: 1 / -1; }
.vehicle-summary-card dd { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.vehicle-summary-card dd span { min-width: 0; }
.vehicle-summary-card dd small { display: block; color: var(--text-muted); font-size: 9px; font-weight: 400; text-transform: uppercase; }
.vehicle-summary-card dd strong { display: block; overflow: hidden; text-overflow: ellipsis; }
.vehicle-compliance-card { min-height: 86px; border-width: 2px !important; }
.vehicle-compliance-card--valid { border-color: #16a34a !important; }
.vehicle-compliance-card--expired { border-color: #dc2626 !important; }
.vehicle-compliance-card--caution { border-color: #d97706 !important; }
.vehicle-compliance-card dt { font-size: 13px; }
.vehicle-compliance-status { display: flex; align-items: center; gap: 6px; }
.vehicle-compliance-status > strong { font-size: 17px; }
.vehicle-compliance-summary { display: block; margin-top: 4px; font-size: 13px; }
.vehicle-compliance-card dd small { display: block; margin-top: 2px; color: var(--text-muted); font-size: 10px; font-weight: 400; line-height: 1.15; }
.vehicle-status-help { position: relative; }
.vehicle-compliance-card:has(.vehicle-status-help[open]) { position: relative; z-index: 3000; }
.vehicle-status-help summary { display: inline-grid; width: 18px; height: 18px; place-items: center; border: 1px solid var(--text-muted); border-radius: 50%; color: var(--text-muted); font-size: 11px; line-height: 1; cursor: pointer; list-style: none; }
.vehicle-status-help summary::-webkit-details-marker { display: none; }
.vehicle-status-help[open] { z-index: 5000; }
.vehicle-status-help[open] > span { position: absolute; z-index: 5001; top: 23px; left: -18px; width: min(290px, 70vw); padding: 7px 9px; border: 1px solid var(--border-main); border-radius: 7px; background: var(--panel-bg); box-shadow: 0 6px 18px var(--shadow-main); color: var(--text-main); font-size: 11px; font-weight: 400; line-height: 1.35; white-space: normal; }
.vehicle-provider-request-id { grid-column: 1 / -1; color: var(--text-muted); font-size: 8px; font-weight: 400; line-height: 1.15; opacity: 0.72; overflow-wrap: anywhere; }
.vehicle-lookup-history { margin-top: 12px; padding-top: 9px; border-top: 1px solid var(--border-main); }
.vehicle-lookup-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.vehicle-lookup-history-heading h3 { margin: 0; color: var(--text-heading); font-size: 15px; }
#vehicle-lookup-history-search { display: flex; align-items: center; gap: 4px; margin: 0; font-size: 12px; }
#vehicle-lookup-history-search label { margin: 0; color: var(--text-muted); }
#vehicle-lookup-history-search input { width: 7rem; min-width: 0; padding: 4px 6px; border: 1px solid var(--border-main); border-radius: 5px; background: var(--panel-bg); color: var(--text-main); text-transform: uppercase; }
#vehicle-lookup-history-search button { padding: 4px 7px; }
.vehicle-lookup-history-scroll { max-height: 19rem; overflow: auto; border: 1px solid var(--border-main); border-radius: 6px; }
.vehicle-lookup-history-table { width: 100%; border-collapse: collapse; font-size: 12px; white-space: nowrap; }
.vehicle-lookup-history-table th, .vehicle-lookup-history-table td { padding: 5px 7px; border-bottom: 1px solid var(--border-main); text-align: left; }
.vehicle-lookup-history-table thead { position: sticky; z-index: 1; top: 0; background: var(--table-header-bg); }
.vehicle-lookup-history-row { cursor: pointer; border-left: 4px solid #8a929c; }
.vehicle-lookup-history-row--valid { border-left-color: #18864b; background: rgba(24, 134, 75, 0.08); }
.vehicle-lookup-history-row--invalid { border-left-color: #c83232; background: rgba(200, 50, 50, 0.09); }
.vehicle-lookup-history-row--unknown { border-left-color: #8a929c; background: rgba(128, 128, 128, 0.08); }
.vehicle-lookup-history-row:hover, .vehicle-lookup-history-row:focus-visible { outline: 2px solid var(--button-bg); outline-offset: -2px; }
.vehicle-lookup-history-pages { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.vehicle-lookup-history-pages button, .vehicle-lookup-history-pages strong { min-width: 28px; padding: 3px 6px; border: 1px solid var(--border-main); border-radius: 5px; text-align: center; }
.vehicle-lookup-history-dialog { width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; padding: 14px; border: 1px solid var(--border-main); border-radius: 10px; background: var(--panel-bg); color: var(--text-main); }
.vehicle-lookup-history-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.vehicle-lookup-history-dialog h2 { margin: 0 32px 6px 0; color: var(--text-heading); }
.vehicle-lookup-history-close { position: absolute; top: 8px; right: 8px; }
.auth-modal-content { display: flex; flex-direction: column; width: min(1120px, 100%); max-height: min(90vh, 860px); overflow: auto; border-radius: 20px; background: var(--panel-bg); }
.auth-modal-content--compact { width: min(580px, 100%); max-height: min(70vh, 520px); }
.auth-modal-content--form { width: min(720px, 100%); max-height: min(80vh, 680px); }
.auth-modal-content--wide { width: min(1120px, 100%); max-height: min(90vh, 860px); }
.auth-modal-content--admin {
    width: min(1720px, calc(100vw - 48px));
    height: calc(100vh - 48px);
    max-height: none;
    overflow: hidden;
}
.auth-modal-header { padding: 18px 22px; border-bottom: 1px solid var(--border-main); }
.auth-modal-content--admin .auth-modal-header {
    position: sticky;
    top: 0;
    z-index: 2;
    flex: 0 0 auto;
    background: var(--panel-bg);
}
.auth-modal-content--admin .auth-modal-header { width: 100%; min-width: 0; }
.auth-modal-content--admin .auth-modal-close { flex: 0 0 auto; margin-left: auto; }
.auth-modal-content--admin .auth-modal-frame { flex: 1 1 auto; min-width: 0; height: 100% !important; }
.auth-modal-frame { display: block; width: 100%; min-height: 0; border: 0; background: var(--bg); }
.site-footer { margin-top: 18px; color: var(--text-muted); font-size: 12px; line-height: 1.45; text-align: center; }
.fleet-route-ranges { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; }
.fleet-route-ranges a { padding: 8px 12px; border-radius: 8px; color: var(--text-heading); font-weight: 700; text-decoration: none; }
.fleet-route-ranges a:hover, .fleet-route-ranges a[aria-current="page"] { background: var(--button-bg); color: #fff; }
.fleet-custom-range { padding: 12px 16px; }
.fleet-custom-range summary { color: var(--text-heading); font-weight: 700; cursor: pointer; }
.fleet-custom-range-form { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)) auto; align-items: end; gap: 10px; margin-top: 12px; }
.fleet-custom-range-form label { color: var(--text-muted); font-size: 12px; font-weight: 700; }
.fleet-custom-range-form input { display: block; width: 100%; margin-top: 4px; padding: 9px; border: 1px solid var(--border-main); border-radius: 7px; background: var(--panel-bg); color: var(--text-main); font: inherit; }
.fleet-custom-range-help { margin: 8px 0 0; color: var(--text-muted); font-size: 12px; }
.fleet-route-panel { padding: 16px; }
.fleet-route-controls { display: flex; justify-content: flex-end; margin-bottom: 8px; color: var(--text-muted); font-size: 12px; }
.fleet-route-controls select { margin-left: 4px; padding: 3px 20px 3px 5px; border: 1px solid var(--border-main); border-radius: 5px; background: var(--panel-bg); color: var(--text-main); font: inherit; }
.fleet-current-position-icon { border: 0; background: transparent; }
.fleet-current-position-icon span { display: block; width: 32px; height: 32px; transform-origin: center; }
.fleet-current-position-icon svg { display: block; width: 32px; height: 32px; filter: drop-shadow(0 1px 2px rgba(15, 23, 42, .45)); }
#fleet-route-map { width: 100%; height: min(68vh, 720px); min-height: 420px; border: 1px solid var(--border-main); border-radius: 10px; background: var(--table-header-bg); }
.fleet-route-status { margin: 10px 2px 0; color: var(--text-muted); }
.fleet-route-empty { padding: 12px; border-left: 4px solid #ea580c; background: color-mix(in srgb, #ea580c 9%, transparent); color: var(--text-main); }
.fleet-heading { margin-bottom: 10px; }
.fleet-workspace { display: grid; grid-template-columns: minmax(250px, .62fr) minmax(520px, 1.7fr); gap: 12px; align-items: start; }
.fleet-vehicle-column { min-width: 0; padding: 10px; }
.fleet-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.fleet-list-heading h3 { margin: 0; color: var(--text-heading); font-size: 16px; }
.fleet-list-heading small { display: block; margin-top: 1px; color: var(--text-muted); font-size: 8px; }
.fleet-list-heading > span { display: flex; gap: 3px; }
.fleet-list-heading button { border: 1px solid var(--border-main); background: var(--table-header-bg); color: var(--button-bg); }
.fleet-compact-list { display: grid; gap: 3px; max-height: min(62vh, 620px); overflow: auto; }
.fleet-compact-vehicle { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 6px; padding: 4px 6px; border: 1px solid var(--border-main); border-left: 4px solid var(--fleet-vehicle-colour, var(--border-main)); border-radius: 5px; background: var(--panel-bg); font-size: 10px; }
.fleet-compact-vehicle.is-map-hidden { border-left-color: var(--border-main); opacity: .62; }
.fleet-compact-vehicle > label { display: flex; align-items: center; min-width: 0; gap: 6px; cursor: pointer; }
.fleet-compact-vehicle > label input { width: 12px; height: 12px; margin: 0; }
.fleet-colour-swatch { flex: 0 0 auto; width: 7px; height: 18px; border-radius: 2px; background: var(--fleet-vehicle-colour, var(--border-main)); }
.fleet-compact-vehicle > label span { display: grid; min-width: 0; }
.fleet-compact-vehicle > label strong { overflow: hidden; color: var(--text-heading); font-size: 11px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.fleet-compact-vehicle > label small { color: var(--text-muted); font-size: 8px; line-height: 1.05; }
.fleet-compact-vehicle .status-pill { align-self: center; padding: 2px 5px; font-size: 8px; }
.fleet-compact-vehicle .status-symbol { width: 5px; height: 5px; border-width: 1px; }
.fleet-compact-meta { display: flex; min-width: 0; align-items: center; gap: 6px; overflow: hidden; color: var(--text-muted); font-size: 8px; white-space: nowrap; }
.fleet-compact-meta > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fleet-compact-vehicle .health-label { flex: 0 0 auto; font-size: 8px; }
.fleet-card-links { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.fleet-card-links a { color: var(--button-bg); font-size: 8px; font-weight: 700; }
.fleet-map-column { display: grid; min-width: 0; gap: 8px; }
.fleet-overview-controls, .fleet-overview-map-panel { margin-bottom: 0; padding: 10px; }
.fleet-overview-ranges { display: flex; flex-wrap: wrap; gap: 5px; }
.fleet-overview-ranges button { padding: 5px 9px; border: 1px solid var(--border-main); background: var(--table-header-bg); color: var(--text-heading); font-size: 11px; font-weight: 700; }
.fleet-overview-ranges button[aria-pressed="true"] { border-color: var(--button-bg); background: var(--button-bg); color: #fff; }
.fleet-overview-custom { display: grid; grid-template-columns: repeat(2, minmax(190px, 1fr)) auto; align-items: end; gap: 6px; margin-top: 7px; }
.fleet-overview-custom label { display: grid; gap: 2px; color: var(--text-muted); font-size: 10px; font-weight: 700; }
.fleet-overview-custom label span { display: grid; grid-template-columns: minmax(125px, 1fr) minmax(85px, .6fr); gap: 4px; }
.fleet-overview-custom input { min-width: 0; padding: 5px 6px; border: 1px solid var(--border-main); border-radius: 5px; background: var(--panel-bg); color: var(--text-main); font: inherit; }
.fleet-overview-custom button { padding: 6px 10px; }
.fleet-overview-custom small { grid-column: 1 / -1; color: var(--text-muted); font-size: 9px; }
#fleet-overview-map { width: 100%; height: min(68vh, 720px); min-height: 470px; border: 1px solid var(--border-main); border-radius: 8px; background: var(--table-header-bg); }
.fleet-vrm-label { border: 0; background: transparent; box-shadow: none; }
.fleet-vrm-label::before { display: none; }
.fleet-vrm-label-content { display: block; padding: 2px 5px; border: 2px solid var(--fleet-vehicle-colour); border-radius: 4px; background: var(--panel-bg); color: var(--text-heading); box-shadow: 0 1px 4px #0005; font-size: 10px; font-weight: 800; line-height: 1; white-space: nowrap; }
.dashboard-title { display: flex; align-items: end; justify-content: space-between; margin: 0 2px 8px; }
.dashboard-title h2, .panel-heading h3 { margin: 0; color: var(--text-heading); }
.dashboard-title p:last-child { margin: 4px 0 0; color: var(--text-muted); }
.dashboard-summary { display: grid; grid-template-columns: repeat(6, minmax(105px, 1fr)); gap: 6px; margin-bottom: 8px; }
.summary-card { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 7px; padding: 6px 9px; border: 1px solid var(--border-main); border-left: 3px solid var(--button-bg); border-radius: 7px; background: var(--panel-bg); box-shadow: 0 1px 5px var(--shadow-main); color: var(--text-main); text-decoration: none; }
.summary-card span { display: block; color: var(--text-muted); font-size: 10px; font-weight: 700; }
.summary-card strong { display: block; margin: 0; color: var(--text-heading); font-size: 17px; overflow: hidden; text-overflow: ellipsis; }
.summary-online, .summary-current { border-left-color: #15803d; }
.summary-stale, .summary-warning, .summary-old, .summary-updating { border-left-color: #b45309; }
.summary-offline, .summary-error { border-left-color: #dc2626; }
.dashboard-main-grid { display: grid; grid-template-columns: minmax(620px, 2.35fr) minmax(280px, .85fr); gap: 10px; align-items: stretch; }
.dashboard-map-panel, .dashboard-side-panel { min-width: 0; margin-bottom: 10px; padding: 12px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.panel-heading a { font-size: 13px; font-weight: 700; }
#dashboard-fleet-map { width: 100%; height: 480px; border: 1px solid var(--border-main); border-radius: 9px; background: var(--table-header-bg); }
.dashboard-warning-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.dashboard-warning-list li { padding: 9px 10px; border-left: 4px solid var(--text-muted); border-radius: 5px; background: var(--table-header-bg); font-size: 13px; line-height: 1.35; }
.dashboard-warning-list a { color: var(--text-heading); font-weight: 700; text-decoration: none; }
.dashboard-warning-list .warning-stale, .dashboard-warning-list .warning-warning, .dashboard-warning-list .warning-old, .dashboard-warning-list .warning-unknown { border-left-color: #b45309; }
.dashboard-warning-list .warning-offline, .dashboard-warning-list .warning-fault, .dashboard-warning-list .warning-error { border-left-color: #dc2626; }
.dashboard-empty { color: var(--text-muted); }
.dashboard-vehicle-panel { margin-bottom: 14px; padding: 14px 16px; }
.dashboard-vehicle-table { font-size: 13px; }
.dashboard-vehicle-table th, .dashboard-vehicle-table td { padding: 9px 10px; }
.status-current { color: #15803d; font-weight: 700; }
.status-updating { color: #b45309; font-weight: 700; }
.map-location-link { padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--button-bg); font: inherit; text-decoration: underline; cursor: pointer; }
.map-location-link:hover { background: transparent; color: var(--button-hover); }
.hit-location-label { display: inline-block; text-align: left; line-height: 1.25; }
.hit-location-label small { color: var(--text-muted); text-decoration: none; }
.position-map-link { display: block; margin-top: 3px; font-size: 10px; }
.vehicle-hit-row--not_actionable td { background: rgba(21, 128, 61, 0.045); }
.vehicle-hit-row--not_actionable td:first-child { border-left: 4px solid #15803d; }
.vehicle-hit-row--actionable td { background: rgba(220, 38, 38, 0.045); }
.vehicle-hit-row--actionable td:first-child { border-left: 4px solid #dc2626; }
.vehicle-hit-row--unknown td:first-child { border-left: 4px solid #6b7280; }
.vehicle-hit-row[data-hit-location-row] { cursor: pointer; }
.vehicle-hit-row[data-hit-location-row]:hover td { filter: brightness(0.97); }
.vehicle-hit-row[data-hit-location-row]:focus-visible { outline: 2px solid var(--button-bg); outline-offset: -2px; }
.hit-modal-section-heading { grid-column: 1 / -1; margin: 14px 0 2px; color: var(--text-heading); font-size: 13px; }
.hit-modal-more { grid-column: 1 / -1; border: 1px solid var(--border-main); border-radius: 7px; background: var(--panel-bg); }
.hit-modal-more > summary { padding: 9px 11px; color: var(--text-heading); font-weight: 700; cursor: pointer; }
.hit-modal-more-content { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 11px 11px; margin: 0; }
.hit-location-visuals { display: grid; min-width: 0; gap: 10px; align-content: start; }
.hit-location-evidence { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, .42fr); gap: 10px; align-items: end; }
.hit-location-evidence[hidden] { display: none; }
.hit-location-evidence figure { min-width: 0; margin: 0; }
.hit-location-evidence-open { display: block; width: 100%; padding: 0; border: 0; border-radius: 9px; background: transparent; cursor: zoom-in; }
.hit-location-evidence-open:focus-visible { outline: 3px solid var(--button-bg); outline-offset: 2px; }
.hit-location-evidence img { display: block; width: 100%; max-height: 230px; object-fit: contain; border: 1px solid var(--border-main); border-radius: 9px; background: #111827; }
.hit-location-evidence--plate img { max-height: 120px; }
.hit-location-evidence figcaption { margin-top: 3px; color: var(--text-muted); font-size: 10px; }
.hit-location-evidence--manual { grid-template-columns: minmax(0, 1fr); align-items: start; }
.hit-location-evidence--manual-primary img { height: 300px; max-height: 300px; }
.hit-location-evidence-thumbnails { display: flex; min-width: 0; gap: 8px; overflow-x: auto; padding: 2px 1px 5px; }
.hit-location-evidence-thumbnail { flex: 0 0 88px; padding: 2px; border: 2px solid transparent; border-radius: 7px; background: transparent; cursor: pointer; }
.hit-location-evidence-thumbnail[aria-pressed="true"] { border-color: var(--button-bg); }
.hit-location-evidence-thumbnail img { width: 80px; height: 60px; border: 0; border-radius: 5px; object-fit: cover; }
.hit-evidence-viewer { position: fixed; z-index: 2200; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(15, 23, 42, .92); }
.hit-evidence-viewer[hidden] { display: none; }
.hit-evidence-viewer-content { display: grid; max-width: calc(100vw - 32px); min-width: 0; max-height: calc(100vh - 32px); min-height: 0; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 8px; overflow: hidden; padding: 12px; border: 1px solid var(--border-main); border-radius: 10px; background: var(--panel-bg); box-shadow: 0 18px 48px rgba(0, 0, 0, .45); }
.hit-evidence-viewer-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--text-heading); }
.hit-evidence-viewer-stage { display: grid; width: min(80vw, 1200px); min-width: 0; height: min(75vh, 800px); min-height: 0; overflow: hidden; place-items: center; background: #111827; }
.hit-evidence-viewer-image { display: block; width: 100%; min-width: 0; height: 100%; min-height: 0; object-fit: contain; }
.hit-modal-decision { border-width: 2px !important; }
.hit-modal-decision dd { font-weight: 800; }
.hit-modal-decision-reasons { display: block; margin-top: 4px; color: var(--text-muted); font-weight: 500; }
.hit-modal-decision--actionable { border-color: #dc2626 !important; background: rgba(220, 38, 38, .06) !important; }
.hit-modal-decision--actionable dd { color: #b91c1c; }
.hit-modal-decision--not-actionable { border-color: #15803d !important; background: rgba(21, 128, 61, .06) !important; }
.hit-modal-decision--not-actionable dd { color: #15803d; }
.mileage-consistency-warning { grid-column: 1 / -1; margin: 4px 0 0; color: #b45309; font-weight: 700; }
.dvsa-mot-test { margin: 8px 0; padding: 8px; border: 1px solid var(--border-main); border-radius: 6px; background: var(--table-header-bg); }
.dvsa-mot-test p { margin: 4px 0; }
.dvsa-mot-test ul, .hit-location-details dd ul { margin: 5px 0 0; padding-left: 18px; }
.dvsa-raw { max-width: 100%; max-height: 260px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; }
.hit-location-modal-content { width: min(1180px, calc(100vw - 32px)); max-height: 90vh; }
.hit-location-layout { display: grid; grid-template-columns: minmax(300px, .85fr) minmax(460px, 1.5fr); gap: 14px; align-items: stretch; margin-top: 14px; }
.hit-location-details { align-content: start; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.hit-modal-loading, .hit-modal-load-error { grid-column: 1 / -1; padding: 14px; border: 1px solid var(--border-main); border-radius: 8px; background: var(--table-header-bg); color: var(--text-muted); }
.hit-modal-load-error p { margin: 0 0 10px; color: var(--text-main); }
.enforcement-policy-panel { width: 100%; max-width: none; margin: 0; }
.pkc-auth-admin-page.pkc-auth-embedded .enforcement-policy-panel { overflow-y: auto; padding-bottom: 1.25rem; scrollbar-gutter: stable; }
.enforcement-policy-form { display: grid; gap: 12px; }
.enforcement-policy-field { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) 150px; align-items: center; gap: 16px; padding: 14px; border: 1px solid var(--border-main); border-radius: 8px; background: var(--panel-bg); }
.enforcement-policy-field span { display: grid; gap: 4px; }
.enforcement-policy-field small { color: var(--text-muted); font-weight: 400; }
.enforcement-policy-field input[type="number"] { width: 100%; min-height: 38px; }
.enforcement-policy-toggle input { justify-self: end; width: 22px; height: 22px; }
.enforcement-policy-effective { display: grid; gap: 4px; padding: 12px 14px; border-radius: 8px; background: var(--table-header-bg); }
.hit-location-details .hit-location-vrm-card { grid-column: 1 / -1; display: grid; gap: 3px; padding: 12px; border: 2px solid var(--button-bg); border-radius: 8px; background: var(--table-header-bg); }
.hit-location-details .hit-location-address-card { grid-column: 1 / -1; }
.hit-location-save-edit { border-color: #15803d; background: #15803d; color: #fff; }
.compact-control--danger { border-color: #b91c1c; background: #b91c1c; color: #fff; }
.workflow-secondary-modal-content .hit-modal-workflow-cancel { border-color: var(--button-bg); background: var(--button-bg); color: #fff; }
.workflow-secondary-modal-content .hit-modal-workflow-cancel:hover, .workflow-secondary-modal-content .hit-modal-workflow-cancel:focus-visible { background: var(--button-hover); color: #fff; }
#hit-location-edit[hidden], #hit-location-save-edit[hidden],
#hit-location-cancel-edit[hidden], #hit-location-close[hidden],
#hit-location-report[hidden] { display: none !important; }
.hit-location-modal--manual-editing .hit-modal-ops-actions { opacity: .55; pointer-events: none; }
.manual-detail-edit-reporter { border-color: var(--button-bg); }
.manual-detail-edit-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 12px; padding: 0 11px 12px; }
.manual-detail-edit-fields label { display: grid; gap: 4px; color: var(--text-muted); font-size: 11px; font-weight: 700; }
.manual-detail-edit-fields label:last-child { grid-column: 1 / -1; }
.manual-detail-edit-fields input, .manual-detail-edit-fields select, .manual-detail-edit-fields textarea,
.manual-detail-location-editor input { width: 100%; min-width: 0; padding: 7px 8px; border: 1px solid var(--border-main); border-radius: 6px; background: var(--panel-bg); color: var(--text-main); font: inherit; box-sizing: border-box; }
.manual-detail-location-editor { display: grid; gap: 8px; padding: 10px; border: 2px solid var(--button-bg); border-radius: 9px; background: var(--table-header-bg); }
.manual-detail-location-editor > label { display: grid; gap: 3px; color: var(--text-muted); font-size: 11px; font-weight: 700; }
.manual-detail-inline, .manual-detail-coordinate { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.manual-detail-coordinate { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
.manual-detail-inline button, .manual-detail-coordinate button { padding: 6px 9px; border: 1px solid var(--button-bg); border-radius: 6px; background: var(--button-bg); color: #fff; font-weight: 700; }
.manual-detail-location-editor small { color: var(--text-muted); }
.manual-detail-image-editor { display: grid; gap: 7px; padding: 9px; border: 1px solid var(--border-main); border-radius: 9px; background: var(--table-header-bg); }
.manual-detail-image-edit-list { display: flex; gap: 7px; overflow-x: auto; }
.manual-detail-image-edit-list label { position: relative; display: grid; flex: 0 0 110px; gap: 3px; padding: 4px; border: 1px solid var(--border-main); border-radius: 7px; background: var(--panel-bg); font-size: 10px; }
.manual-detail-image-edit-list img { width: 100%; height: 72px; border-radius: 5px; object-fit: cover; }
.manual-detail-image-edit-list button { padding: 3px 5px; border: 1px solid #b91c1c; border-radius: 4px; background: transparent; color: #b91c1c; font-size: 10px; }
@media (max-width: 700px) {
    .manual-detail-edit-fields { grid-template-columns: 1fr; }
    .manual-detail-edit-fields label:last-child { grid-column: auto; }
    .manual-detail-coordinate { grid-template-columns: 1fr 1fr; }
    .manual-detail-coordinate button { grid-column: 1 / -1; }
}
@media (min-width: 901px) {
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .manual-vehicle-record-modal-content { height: calc(100vh - 40px); max-height: calc(100vh - 40px); padding-top: 17px; }
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .hit-location-layout { grid-template-columns: minmax(0, .744fr) minmax(0, 1fr); margin-top: 16px; }
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .manual-vehicle-record-details { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 455px auto minmax(0, 1fr); column-gap: 16px; row-gap: 8px; align-content: stretch; }
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .manual-vrm-check { min-height: 0; align-content: start; }
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .manual-check-details { gap: 10px; margin: 0; padding: 7px 5px; }
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .vehicle-compliance-card { min-height: 100px; }
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .manual-vehicle-identity-card { grid-column: 1 / -1; min-height: 78px; margin: -8px -6px 2px; }
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .manual-vehicle-identity-card dd small { display: block; margin-top: 5px; color: var(--text-heading); font-size: 14px; font-weight: 700; }
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .manual-reporter-section { height: 385px; overflow: hidden; }
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .manual-reporter-fields textarea { height: 130px; min-height: 130px; }
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .manual-reporter-actions { min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .manual-image-workspace { padding: 0; gap: 0; overflow: hidden; }
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .manual-image-primary { border-radius: 7px 7px 0 0; }
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .manual-image-edit-controls { padding: 10px; }
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .manual-image-preview { width: 124px; height: 112px; }
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .manual-image-preview img { height: 94px; min-height: 94px; }
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .manual-location-workspace { position: relative; margin-top: -14px; align-items: start; }
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .manual-location-inputs,
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .manual-location-address-wrap { min-width: 0; }
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .manual-location-address-row,
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .manual-location-address-wrap,
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .manual-location-address-wrap input { width: 100%; max-width: 100%; box-sizing: border-box; }
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .manual-location-workspace.manual-location-suggestions-open .manual-location-address-wrap { margin-bottom: 124px; }
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .manual-vehicle-record-map { height: 280px; min-height: 280px; margin-top: 0; }
    #manual-vehicle-record-modal.manual-vehicle-record-modal--creating .manual-location-summary { position: static; width: 100%; margin-top: 8px; overflow-wrap: anywhere; }
}
.hit-list-version { display: block; margin-top: 5px; color: var(--text-muted); font-size: 10px; overflow-wrap: anywhere; }
.leaflet-control-attribution { padding: 1px 4px !important; font-size: 9px; line-height: 1.2; }
.hit-location-vrm-card small { color: var(--text-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.hit-location-vrm-card strong { color: var(--text-heading); font-size: 26px; letter-spacing: .08em; }
.hit-location-vrm-vehicle { color: var(--text-heading); font-size: 13px; font-weight: 700; }
.hit-location-map { width: 100%; min-height: 320px; height: min(60vh, 520px); border: 1px solid var(--border-main); border-radius: 9px; background: var(--table-header-bg); }
.vehicle-actionable-map-modal-content { width: min(1000px, calc(100vw - 32px)); }
.vehicle-actionable-map { width: 100%; min-height: 420px; height: min(70vh, 680px); border: 1px solid var(--border-main); border-radius: 9px; background: var(--table-header-bg); }
.vehicle-actionable-marker { display: grid; width: 24px !important; height: 24px !important; place-items: center; color: #b91c1c; font-size: 25px; line-height: 24px; text-shadow: 0 1px 2px #fff, 0 0 2px #fff; }
.vehicle-actionable-marker span { display: grid; width: 20px; height: 20px; place-items: center; border: 2px solid #fff; border-radius: 50%; color: #fff; font-size: 14px; box-shadow: 0 1px 4px #333; }
.vehicle-map-filters { position: relative; z-index: 1600; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 11px; }
.vehicle-map-date-selector { position: relative; z-index: 1601; }
.ops-action-badge--declamped { background: #64748b; }
.ops-action-badge--self-declamped { background: #1d4ed8; }
.ops-action-badge--collection-released { background: #6b7280; }
.vehicle-actionable-tooltip { display: grid; gap: 2px; min-width: 180px; font-size: 11px; line-height: 1.25; }
.vehicle-actionable-tooltip strong { font-size: 13px; }
.dashboard-recent-panel { padding: 14px 16px; }
.dashboard-hit-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 8px; }
.dashboard-hit-grid article, .dashboard-hit-card { display: grid; gap: 3px; padding: 9px 10px; border: 1px solid var(--border-main); border-left: 3px solid var(--border-main); border-radius: 7px; background: var(--table-header-bg); color: inherit; text-decoration: none; animation: recent-hit-in .22s ease-out both; }
.dashboard-hit-card--follow-up { border-left-color: #d97706; }
.dashboard-hit-card--clamped { border-left-color: #2563eb; }
.dashboard-hit-card--collection { border-left-color: #9333ea; }
.dashboard-hit-card--none { border-left-color: #6b7280; }
.dashboard-hit-card:hover, .dashboard-hit-card:focus-visible { border-color: var(--button-bg); box-shadow: 0 0 0 2px color-mix(in srgb, var(--button-bg) 18%, transparent); }
.dashboard-hit-grid span, .dashboard-hit-grid time { color: var(--text-muted); font-size: 12px; }
.dashboard-hit-status { font-weight: 700; }
.dashboard-hit-action { font-weight: 800; }
.dashboard-hit-action--follow-up { color: #c26100; }
.dashboard-hit-action--clamped { color: #2563eb; }
.dashboard-hit-action--collection { color: #9333ea; }
.dashboard-hit-action--none { color: #6b7280; }
.panel-description { margin: 3px 0 0; color: var(--text-muted); font-size: 12px; font-weight: 400; }
.dashboard-recent-heading { margin-bottom: 0; }
.dashboard-recent-actions { display: inline-flex; align-items: center; gap: 8px; }
.dashboard-recent-settings { padding: 4px 7px; font-size: 14px; line-height: 1; }
.recent-hit-filter-content { width: min(560px, 100%); }
.recent-hit-filter-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.recent-hit-filter-form label { display: grid; gap: 4px; color: var(--text-muted); font-size: 12px; font-weight: 700; }
.recent-hit-filter-form select { width: 100%; }
.recent-hit-ops-filters { display: flex; flex-wrap: wrap; grid-column: 1 / -1; gap: 5px; margin: 0; padding: 0; border: 0; }
.recent-hit-ops-filters legend { width: 100%; margin-bottom: 1px; color: var(--text-muted); font-size: 12px; font-weight: 700; }
.recent-hit-ops-filters input { position: absolute; opacity: 0; pointer-events: none; }
.recent-hit-ops-filters .ops-filter { cursor: pointer; }
.recent-hit-ops-filters .ops-filter--all { color: #6b7280; }
.recent-hit-ops-filters input:checked + .ops-filter--all { background: #6b7280; color: #fff; }
.recent-hit-ops-filters input:checked + .ops-filter--follow-up { background: #d97706; color: #fff; }
.recent-hit-ops-filters input:checked + .ops-filter--clamped { background: #2563eb; color: #fff; }
.recent-hit-ops-filters input:checked + .ops-filter--collection { background: #9333ea; color: #fff; }
.recent-hit-ops-filters input:checked + .ops-filter--none { background: #6b7280; color: #fff; }
.recent-hit-ops-filters input:focus-visible + .ops-filter { outline: 2px solid currentColor; outline-offset: 2px; }
@keyframes recent-hit-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .dashboard-hit-card { animation: none; } }
.recent-hit-filter-actions { display: flex; align-items: center; justify-content: space-between; grid-column: 1 / -1; margin-top: 4px; }
.dashboard-vehicle-icon-wrap { background: transparent; border: 0; }
.dashboard-vehicle-icon { display: block; width: 18px; height: 18px; border: 3px solid #fff; box-shadow: 0 1px 5px #0008; background: #6b7280; }
.dashboard-vehicle-icon--online { border-radius: 50%; background: #15803d; }
.dashboard-vehicle-icon--stale { background: #b45309; transform: rotate(45deg); }
.dashboard-vehicle-icon--offline { border-radius: 50%; border-color: #6b7280; background: #fff; }
.dashboard-map-popup { display: grid; gap: 5px; min-width: 190px; }
.dashboard-map-popup > span { display: block; }
.dashboard-vrm-label { padding: 2px 4px; border: 1px solid var(--border-main); border-radius: 4px; background: var(--panel-bg); color: var(--text-heading); box-shadow: 0 1px 3px #0004; font-size: 9px; font-weight: 800; line-height: 1; }
.dashboard-vrm-label::before { display: none; }
.vehicle-detail-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .7fr); gap: 12px; align-items: start; }
.vehicle-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.vehicle-detail-grid .section-box { margin-bottom: 0; }
.vehicle-detail-grid h3 { margin-top: 0; color: var(--text-heading); }
.detail-facts { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(0, 1fr); gap: 8px 12px; }
.detail-facts dt { color: var(--text-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.detail-facts dd { margin: 0; }
.vehicle-health-panel { grid-column: 1 / -1; margin-bottom: 0; }
.vehicle-health-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 18px; }
.vehicle-health-group h4 { margin: 0 0 3px; color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.vehicle-health-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 18px; }
.vehicle-health-item { min-width: 0; padding: 5px 0; border-bottom: 1px solid var(--border-light); }
.vehicle-health-item-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.vehicle-health-item small { display: block; margin-top: 3px; color: var(--text-muted); line-height: 1.3; }
.vehicle-health-normal { margin: 10px 0 0; color: #15803d; font-size: 12px; font-weight: 700; }
.vehicle-detail-map-panel { min-width: 0; padding: 12px; }
#vehicle-detail-map { width: 100%; aspect-ratio: 1; max-height: 52vh; min-height: 290px; border: 1px solid var(--border-main); border-radius: 8px; background: var(--table-header-bg); }
.admin-workspace { display: grid; grid-template-columns: minmax(270px, 1fr) minmax(0, 2fr); gap: 12px; align-items: start; }
.manual-record-admin { max-width: 1500px; margin: 0 auto; }
.manual-record-admin-table { min-width: 900px; }
.manual-record-admin-metadata { display: grid; gap: 2px; min-width: 240px; }
.manual-record-admin-audit { margin: 8px 0 0; padding-left: 18px; min-width: 240px; }
.manual-record-admin-audit li { margin: 4px 0; }
.admin-workspace .section-box { margin: 0; padding: 12px; }
.admin-workspace-nav { position: sticky; top: 12px; display: grid; gap: 10px; }
.admin-workspace-heading h2, .admin-panel-heading h3 { margin: 0; color: var(--text-heading); }
.admin-workspace-heading p:last-child { margin: 4px 0 0; color: var(--text-muted); font-size: 12px; line-height: 1.35; }
.admin-option-list { display: grid; gap: 5px; }
.admin-option-list a, .admin-option-list button { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; width: 100%; padding: 9px 10px; border: 1px solid var(--border-main); border-radius: 7px; background: var(--table-header-bg); color: var(--text-main); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.admin-option-list a:hover, .admin-option-list a:focus-visible, .admin-option-list button:hover, .admin-option-list button:focus-visible, .admin-option-list .is-active { border-color: var(--button-bg); box-shadow: inset 3px 0 0 var(--button-bg); }
.admin-option-list strong { color: var(--text-heading); font-size: 14px; }
.admin-option-list span { grid-column: 1; color: var(--text-muted); font-size: 11px; line-height: 1.25; }
.admin-option-list b { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--button-bg); font-size: 11px; white-space: nowrap; }
.admin-role-note { display: grid; gap: 2px; padding: 8px 9px; border-left: 3px solid var(--button-bg); background: var(--table-header-bg); }
.admin-role-note strong { color: var(--text-heading); font-size: 12px; }
.admin-role-note span { color: var(--text-muted); font-size: 10px; line-height: 1.3; }
.admin-workspace-detail { display: grid; gap: 10px; min-width: 0; }
.admin-detail-host { min-width: 0; min-height: min(74vh, 760px); max-height: min(74vh, 760px); overflow: auto; background: var(--panel-bg); }
.admin-detail-host[hidden], .admin-workspace-detail[hidden] { display: none; }
.admin-detail-loading { color: var(--text-muted); }
.admin-detail-error { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border: 1px solid var(--danger, #b42335); border-radius: 7px; color: var(--danger, #b42335); background: var(--panel-bg); }
.admin-detail-error[hidden] { display: none; }
.admin-overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.admin-overview-card { min-width: 0; padding: 10px 11px; border: 1px solid var(--border-main); border-radius: 8px; background: var(--panel-bg); box-shadow: 0 2px 7px var(--shadow-main); }
.admin-overview-card span, .admin-overview-card small { display: block; color: var(--text-muted); font-size: 11px; }
.admin-overview-card strong { display: block; margin: 2px 0; color: var(--text-heading); font-size: 18px; }
.admin-detail-panel { min-width: 0; }
.admin-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.admin-panel-heading a, .admin-inline-actions a { font-size: 11px; font-weight: 700; }
.admin-inline-actions { display: flex; gap: 6px; }
.admin-inline-actions a { padding: 6px 8px; border-radius: 6px; background: var(--button-bg); color: #fff; text-decoration: none; }
.admin-quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.admin-quick-grid a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 8px 9px; border: 1px solid var(--border-main); border-radius: 7px; background: var(--table-header-bg); color: var(--text-main); text-decoration: none; }
.admin-quick-grid span, .admin-quick-grid small { color: var(--text-muted); font-size: 11px; }
.admin-quick-grid strong { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--text-heading); font-size: 20px; }
.admin-quick-grid small { grid-column: 1; }
.admin-audit-list { display: grid; border: 1px solid var(--border-main); border-radius: 7px; overflow: hidden; }
.admin-audit-list a { display: grid; grid-template-columns: 125px minmax(140px, .7fr) minmax(160px, 1fr); gap: 8px; padding: 6px 8px; border-top: 1px solid var(--border-main); color: var(--text-main); font-size: 11px; text-decoration: none; }
.admin-audit-list a:first-child { border-top: 0; }
.admin-audit-list a:hover, .admin-audit-list a:focus-visible { background: var(--table-header-bg); }
.vehicle-identity-admin { width: 100%; max-width: none; }
.vehicle-identity-admin > .admin-panel-heading { margin-bottom: 12px; }
.vehicle-identity-admin .section-box { margin-bottom: 10px; }
.vehicle-identity-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.vehicle-identity-list-heading h2 { margin: 0; }
.identity-retired-toggle { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 8px; border: 1px solid var(--border-main); border-radius: 5px; color: var(--text-heading); font-size: 11px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.identity-retired-toggle:hover, .identity-retired-toggle:focus-visible { background: var(--table-header-bg); }
.vehicle-identity-provision form { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(180px, 1fr) auto; align-items: end; gap: 8px; }
.vehicle-identity-provision label, .identity-action label { display: grid; gap: 3px; color: var(--text-muted); font-size: 11px; font-weight: 700; }
.vehicle-identity-provision input, .identity-action input { width: 100%; min-width: 0; padding: 7px 8px; border: 1px solid var(--border-main); border-radius: 6px; background: var(--panel-bg); color: var(--text-main); font: inherit; }
.vehicle-identity-table { min-width: 880px; }
.vehicle-identity-table th, .vehicle-identity-table td { padding: 6px 7px; font-size: 11px; }
.vehicle-identity-table td { vertical-align: top; }
.vehicle-identity-actions { min-width: 330px; }
.vehicle-update-cell { min-width: 190px; }
.vehicle-update-cell details summary { cursor: pointer; color: var(--text-link); font-weight: 700; }
.vehicle-update-controls { display: grid; gap: 5px; margin-top: 6px; padding: 6px; border: 1px solid var(--border-main); border-radius: 6px; background: var(--panel-bg); }
.vehicle-update-controls p { margin: 0; }
.vehicle-update-controls form { display: flex; align-items: end; flex-wrap: wrap; gap: 5px; }
.vehicle-update-controls label { display: grid; gap: 2px; color: var(--text-muted); font-size: 10px; font-weight: 700; }
.vehicle-update-controls select { max-width: 150px; padding: 4px; }
.registry-admin { width: 100%; max-width: none; }
.registry-admin .registry-build-panel { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.registry-table { min-width: 760px; }
.registry-table th, .registry-table td { padding: 6px 7px; font-size: 11px; vertical-align: top; }
.registry-table code { font-size: 10px; word-break: break-all; }
@media (max-width: 700px) { .registry-admin .registry-build-panel { align-items: flex-start; flex-direction: column; } .registry-table { min-width: 0; } }
.identity-action { margin: 0 0 6px; }
.identity-action:last-child { margin-bottom: 0; }
.identity-action fieldset { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(110px, 1fr) auto; align-items: end; gap: 5px; margin: 0; padding: 6px; border: 1px solid var(--border-main); border-radius: 6px; }
.identity-action legend { padding: 0 4px; color: var(--text-heading); font-size: 11px; font-weight: 800; }
.identity-action p { grid-column: 1 / -1; margin: 0; color: var(--text-muted); font-size: 10px; line-height: 1.2; }
.identity-action button { padding: 7px 9px; font-size: 11px; white-space: nowrap; }
.identity-action-suspend button { background: #b45309; }
.identity-action-suspend button:hover { background: #92400e; }
.identity-action-resume button { background: #15803d; }
.identity-action-resume button:hover { background: #166534; }
.identity-action-revoke fieldset { border-color: #dc2626; background: color-mix(in srgb, #dc2626 5%, transparent); }
.identity-action-revoke legend, .identity-action-revoke p { color: #b91c1c; }
.identity-action-revoke button { background: #b91c1c; }
.identity-action-revoke button:hover { background: #991b1b; }
.identity-action-delete fieldset { border: 2px solid #7f1d1d; background: color-mix(in srgb, #7f1d1d 8%, transparent); }
.identity-action-delete legend, .identity-action-delete p { color: #7f1d1d; }
.identity-action-delete button { background: #7f1d1d; }
.identity-action-delete button:hover { background: #450a0a; }
.identity-action-rotate button { background: #6d28d9; }
.identity-action-rotate button:hover { background: #5b21b6; }
.vehicle-identity-admin > aside p { margin: 5px 0; }
@media (max-width: 1000px) {
    .vehicle-identity-table { min-width: 0; }
    .vehicle-identity-table thead { display: none; }
    .vehicle-identity-table, .vehicle-identity-table tbody, .vehicle-identity-table tr, .vehicle-identity-table td { display: block; width: 100%; }
    .vehicle-identity-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; padding: 8px 0; }
    .vehicle-identity-table td { border-bottom: 0; padding: 4px 6px; }
    .vehicle-identity-table td:last-child { grid-column: 1 / -1; }
    .vehicle-identity-actions { min-width: 0; }
}
@media (max-width: 640px) {
    .enforcement-policy-field { grid-template-columns: 1fr; }
    .enforcement-policy-toggle input { justify-self: start; }
    .vehicle-identity-provision form, .identity-action fieldset { grid-template-columns: 1fr; }
    .identity-action p { grid-column: auto; }
    .identity-action button { width: 100%; }
}
.admin-audit-list time, .admin-audit-list span { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-audit-list strong { color: var(--text-heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-empty { margin: 0; color: var(--text-muted); font-size: 12px; }
.hit-list-admin { display: grid; min-width: 0; gap: 10px; }
.hit-list-admin > * { min-width: 0; }
.hit-list-admin-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--border-main); border-radius: 7px; }
.hit-list-admin table { min-width: 760px; }
.hit-list-admin code { font-size: 10px; overflow-wrap: anywhere; }
.hit-list-admin small { color: var(--text-muted); }
.hit-list-admin-error { color: #b91c1c; overflow-wrap: anywhere; }
.hit-list-admin-tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--border-main); border-radius: 9px; background: var(--table-header-bg); }
.hit-list-admin-tabs a { padding: 7px 12px; border-radius: 6px; color: var(--text-muted); font-size: 12px; font-weight: 700; text-decoration: none; }
.hit-list-admin-tabs a:hover { color: var(--text-heading); background: var(--panel-bg); }
.hit-list-admin-tabs a.is-active { color: #fff; background: var(--button-bg); }
.hit-list-current-build { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border-light); font-size: 12px; }
.hit-list-current-build span { color: var(--text-muted); }
.hit-list-history-source h3, .hit-list-admin > .pkc-auth-card > h3 { margin: 14px 0 7px; color: var(--text-heading); font-size: 13px; }
.hit-list-management-history { min-width: 900px !important; }
.hit-list-history-operations { min-width: 740px !important; }
.status-rejected { color: #92400e; background: #fef3c7; }
.history-assurance, .history-validation-reason { display: block; max-width: 320px; margin-top: 5px; white-space: normal; }
.history-assurance { color: var(--text-heading); font-size: 11px; }
.history-validation-reason { color: var(--text-muted) !important; }
.hit-list-source-form { display: grid; gap: 10px; margin: 0 0 14px; padding: 12px; border: 1px solid var(--border-light); border-radius: 10px; background: var(--table-header-bg); }
.hit-list-source-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hit-list-source-heading > div { display: grid; gap: 2px; }
.hit-list-source-fields { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.4fr) auto auto auto; align-items: end; gap: 10px; }
.hit-list-source-fields > label:not(.hit-list-source-toggle) { display: grid; gap: 4px; font-size: 12px; font-weight: 700; }
.hit-list-source-fields input[type="text"] { width: 100%; min-width: 0; }
.hit-list-source-fields button { align-self: center; justify-self: start; padding: 8px 11px; font-size: 12px; }
.hit-list-source-parser { display: grid; min-height: 36px; align-content: center; padding: 5px 8px; border: 1px solid var(--border-main); border-radius: 4px; background: var(--panel-bg); }
.hit-list-source-parser small { overflow-wrap: anywhere; }
.hit-list-source-toggle { display: flex; align-items: center; gap: 6px; min-height: 36px; font-size: 12px; font-weight: 700; white-space: nowrap; }
@media (max-width: 980px) { .hit-list-source-fields { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
    .hit-list-admin-tabs { display: grid; grid-template-columns: 1fr 1fr; }
    .hit-list-admin-tabs a { text-align: center; }
}
.hit-list-manifest-facts { display: grid; grid-template-columns: minmax(130px, .35fr) minmax(0, 1fr); gap: 6px 12px; margin: 0; }
.hit-list-manifest-facts dt { color: var(--text-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.hit-list-manifest-facts dd { margin: 0; overflow-wrap: anywhere; }
.progress-bar.progress-indeterminate { position: relative; overflow: hidden; background: var(--button-bg); color: #fff; }
.progress-bar.progress-indeterminate::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, #ffffff33 0 10px, transparent 10px 20px); animation: progress-stripes 1s linear infinite; }
.progress-bar.progress-complete { background: #15803d; }
.progress-bar.progress-failed { background: #b91c1c; }
@keyframes progress-stripes { to { transform: translateX(20px); } }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
    .site-header { grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; }
    .primary-nav { grid-column: 1 / -1; grid-row: 2; border-top: 1px solid var(--border-main); padding-top: 10px; }
    .header-account { grid-column: 3; grid-row: 1; }
    .managed-file { grid-template-columns: 1fr; gap: 14px; }
    .dashboard-summary { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
    .dashboard-main-grid { grid-template-columns: 1fr; }
    .dashboard-hit-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
    .vehicle-detail-layout { grid-template-columns: 1fr; }
    .vehicle-detail-map-panel { max-width: 620px; width: 100%; }
    .fleet-workspace { grid-template-columns: 1fr; }
    .fleet-compact-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 310px; }
    .admin-workspace { grid-template-columns: 1fr; }
    .admin-workspace-nav { position: static; }
}

@media (max-width: 620px) {
    body { padding: 12px; }
    .vehicle-health-list { grid-template-columns: 1fr; }
    .vehicle-health-groups, .recent-hit-filter-form { grid-template-columns: 1fr; }
    .recent-hit-filter-actions { grid-column: auto; }
    .site-header { grid-template-columns: auto 1fr; padding: 14px; }
    .brand-logo img { width: 118px; }
    .header-copy p { display: none; }
    .header-account { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
    .primary-nav { grid-column: 1 / -1; grid-row: 3; flex-wrap: wrap; }
    .dashboard-heading, .page-heading { align-items: flex-start; flex-direction: column; }
    .vehicle-hits-header-form { grid-template-columns: 1fr; width: 100%; align-items: stretch; }
    .vehicle-hits-heading-primary, .vehicle-hits-header-form > .vehicle-hits-filters { grid-column: 1; grid-row: auto; }
    .vehicle-hits-heading-primary { flex-wrap: wrap; }
    .vehicle-hits-search-panel { flex-basis: 100%; }
    .vehicle-hits-quick-filters { flex-basis: 100%; margin-left: 0; flex-wrap: wrap; }
    .vehicle-hits-heading-primary { width: 100%; justify-content: start; }
    .vehicle-hits-filters { justify-content: flex-start; width: 100%; }
    .vehicle-hits-filters input[type="search"] { flex: 1 1 160px; }
    .vehicle-hits-ops-filters, .vehicle-hits-map-control { margin-left: 0; }
    .vehicle-hits-pagination { align-items: flex-start; flex-direction: column; }
    .manual-vrm-check { grid-column: 1 / -1; grid-row: auto; min-height: 0; }
    .manual-check-details { grid-column: 1 / -1; grid-row: auto; }
    .manual-location-workspace { grid-template-columns: 1fr; }
    .manual-image-workspace { grid-template-columns: 1fr; }
    .manual-reporter-fields { grid-template-columns: 1fr; }
    .manual-reporter-actions { grid-column: auto; }
    .manual-vehicle-record-map { min-height: 220px; height: 220px; }
    #manual-vehicle-record-modal { padding: 12px; }
    #manual-vehicle-record-modal .manual-vehicle-record-modal-content { height: auto; max-height: calc(100vh - 24px); }
    .fleet-custom-range-form { grid-template-columns: 1fr; }
    .dashboard-actions { align-items: stretch; flex-direction: column; width: 100%; }
    .vehicle-lookup-controls, .vehicle-lookup-results { grid-template-columns: 1fr; }
    .vehicle-lookup-history-heading { align-items: flex-start; flex-direction: column; }
    .vehicle-lookup-history-scroll { overflow: auto; }
    .hit-location-layout { grid-template-columns: 1fr; }
    .hit-location-evidence { grid-template-columns: minmax(0, 1fr) minmax(120px, .42fr); }
    .hit-evidence-viewer { padding: 10px; }
    .hit-location-details { grid-template-columns: 1fr; }
    .hit-location-details .hit-location-vrm-card { grid-column: auto; }
    #hit-location-modal .modal-heading { gap: 6px; }
    #hit-location-modal .modal-heading h2 { flex: 0 1 auto; font-size: 20px; white-space: nowrap; }
    #hit-location-modal .hit-location-context { display: none; }
    #hit-location-modal .hit-location-viewed { display: none; }
    .vehicle-summary-card dd { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .section-box { padding: 16px; }
    .table-section { padding: 8px; }
    .managed-file { padding: 18px 0; }
    #fleet-route-map { height: 62vh; min-height: 340px; }
    .fleet-compact-list { grid-template-columns: 1fr; }
    .fleet-overview-custom { grid-template-columns: 1fr; }
    .fleet-overview-custom small { grid-column: 1; }
    #fleet-overview-map { height: 58vh; min-height: 340px; }
    .auth-modal { padding: 8px; }
    .auth-modal-content { width: 100%; max-height: 94vh; }
    .auth-modal-content--admin { width: 100%; height: calc(100vh - 16px); max-height: none; }
}

@media print {
    body > *:not(.page-content) { display: none !important; }
    .page-content > *:not(#hit-location-modal) { display: none !important; }
    #hit-location-modal { position: static; display: block !important; padding: 0; background: transparent; }
    #hit-location-modal .hit-location-modal-content { width: 100%; max-height: none; overflow: visible; padding: 0; box-shadow: none; }
    #hit-location-modal .modal-heading { color: #000; }
    #hit-location-modal .modal-heading button, #hit-location-modal .hit-location-report, #hit-location-modal .hit-location-map { display: none; }
    #hit-location-modal .position-map-link { display: none; }
    #hit-location-modal .hit-location-layout { display: block; margin-top: 10px; }
    #hit-location-modal .hit-location-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #hit-location-modal .hit-location-viewed, #hit-location-modal .hit-list-version { color: #000; }
}
/* Portal-proxied, read-only vehicle operator view */
.live-view-modal { position:fixed; inset:0; z-index:2100; display:flex; align-items:center; justify-content:center; padding:clamp(10px,3vw,32px); }
.live-view-modal[hidden] { display:none; }
.live-view-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.68); }
.live-view-panel { position:relative; z-index:1; width:min(1500px,100%); height:min(94vh,1100px); overflow:hidden; padding:clamp(12px,2vw,24px); border-radius:14px; background:var(--panel-bg); box-shadow:0 24px 80px rgba(0,0,0,.35); }
.live-view-panel iframe { display:block; width:100%; height:calc(100% - 112px); min-height:420px; border:1px solid var(--border-color, #d6dbe1); border-radius:10px; background:#fff; }
.live-view-modal + .vehicle-detail-layout { position:relative; }
.live-view-open { overflow:hidden; }
.live-view-actions { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-top:.75rem; }
.settings-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:1rem; margin:1rem 0; }
.settings-grid label, .settings-form > label { display:flex; flex-direction:column; gap:.35rem; }
.settings-grid input, .settings-grid select { padding:.45rem; }
.live-view-vehicle-form { border-top:1px solid var(--border-color, #d6dbe1); padding-top:1rem; margin-top:1rem; }
@media (max-width:700px) { .live-view-panel { height:96vh; padding:10px; } .live-view-panel iframe { height:calc(100% - 145px); min-height:320px; } .live-view-actions { align-items:flex-start; flex-direction:column; } }
