/* =========================================================================
   DARK MODE — VS Code-style theme.
   Everything is scoped to body.theme-dark and this file loads last, so the
   light defaults are untouched until dark mode is enabled. Palette mirrors the
   VS Code Dark+ theme (editor #1e1e1e, panels #252526, text #d4d4d4). The blue
   buttons/accents are preserved; blue text is brightened slightly so it stays
   readable on the dark surfaces (no dark-on-dark text).
   ========================================================================= */
body.theme-dark {
    --bg: #1e1e1e;
    --surface-light: #1e1e1e;
    --surface: #252526;
    --surface-alt: #252526;
    --surface-strong: #e6e6e6;
    --text: #d4d4d4;
    --text-muted: #b5b5b5;
    --text-soft: #9d9d9d;
    --accent: #2563eb;
    --accent2: #1d4ed8;
    --accent-soft: rgba(37, 99, 235, 0.18);
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.18);
    --glass: rgba(37, 37, 38, 0.92);
    --glass-border: rgba(255, 255, 255, 0.10);
    --shadow: rgba(0, 0, 0, 0.5);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-card: 0 10px 28px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
    color: #d4d4d4;
}

/* ── Page background ── */
body.theme-dark,
body.theme-dark.az-dashboard-page {
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 26%), #1e1e1e !important;
    color: #d4d4d4;
}
body.theme-dark.wallpaper-disabled { background: #1e1e1e !important; }

/* ── Header + sidebar + nav ── */
body.theme-dark .az-header.app-header {
    background: #252526 !important;
    border-bottom: 1px solid #3c3c3c !important;
}
body.theme-dark .app-header-copy strong,
body.theme-dark .nav-user-btn,
body.theme-dark #navUsernameShort,
body.theme-dark .nav-user-caret { color: #d4d4d4 !important; }

/* Tab nav (Overview / Insurance / …). The base theme paints the menu wrapper
   white below 992px (it doubles as the azia off-canvas panel) and gives the
   active/hover tab a white pill — both read as a glaring white block on the dark
   header (the wrapped second row on mobile, and the active button on desktop).
   Keep the wrapper transparent so the dark header shows through, and give the
   tabs an on-theme highlight. */
body.theme-dark .app-header-menu { background-color: transparent !important; }
body.theme-dark .nav-tab { color: #b0b0b0; }
body.theme-dark .nav-tab:hover,
body.theme-dark .nav-tab.active {
    background: #2d2d30 !important;
    color: #6ea8fe !important;
    border-color: rgba(110, 168, 254, 0.30) !important;
    box-shadow: none !important;
}
body.theme-dark .dashboard-sidebar,
body.theme-dark #sidebarNav,
body.theme-dark .sidebar-account-card,
body.theme-dark #sectionAnchorNav {
    background: #252526 !important;
    border-color: #3c3c3c !important;
    color: #d4d4d4 !important;
}

/* ── Cards / surfaces (both plain and #pageContent-scoped, to win specificity) ── */
body.theme-dark .card,
body.theme-dark #pageContent .card,
body.theme-dark .subpanel-card,
body.theme-dark #pageContent .subpanel-card,
body.theme-dark .info-panel,
body.theme-dark .dashboard-section-header,
body.theme-dark #pageContent .dashboard-section-header,
body.theme-dark .basics-chart-container,
body.theme-dark #pageContent .basics-chart-container,
body.theme-dark .map-shell,
body.theme-dark #pageContent .map-shell,
body.theme-dark .violation-card,
body.theme-dark #pageContent .violation-card,
body.theme-dark .tool-intro-card,
body.theme-dark .app-state-card,
body.theme-dark .ov-card,
body.theme-dark .ov-card.basics-table-container,
body.theme-dark .ov-risk-section,
body.theme-dark .report-history-item,
body.theme-dark .predictive-basic-card,
body.theme-dark .predictive-score-header.predictive-score-header-scrolled,
body.theme-dark .analytics-tool-card,
body.theme-dark .auth-page-card,
body.theme-dark .fixed-scroll-card {
    background: #252526 !important;
    border-color: #3c3c3c !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
body.theme-dark .card:hover,
body.theme-dark #pageContent .card:hover,
body.theme-dark .subpanel-card:hover,
body.theme-dark .dashboard-section-header:hover,
body.theme-dark #pageContent .dashboard-section-header:hover {
    border-color: rgba(37, 99, 235, 0.45) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55) !important;
}

/* Predictive restyle (2026-07): quick-start strip, group labels, collapsible reference.
   (Standalone block — NEVER insert rules mid-selector-list above.) */
body.theme-dark .pred-howto-num { background: #2563eb !important; color: #ffffff !important; }
body.theme-dark .pred-legend-current { background: #94a3b8 !important; }
body.theme-dark .pred-legend-sim { background: #2563eb !important; }
body.theme-dark .pred-howto-text,
body.theme-dark .pred-howto-legend,
body.theme-dark .pred-group-text { color: #b0b0b0 !important; }
body.theme-dark .pred-howto-text strong { color: #e6e6e6 !important; }
body.theme-dark .pred-details-chevron { color: #b0b0b0 !important; }
body.theme-dark .pred-details-hint { color: #cbd5e1 !important; background: rgba(148, 163, 184, 0.18) !important; }
body.theme-dark .pred-details-hint-admin { color: #fbbf24 !important; background: rgba(180, 83, 9, 0.22) !important; }
body.theme-dark .pred-details-summary:hover { background: rgba(255, 255, 255, 0.04) !important; }
body.theme-dark .pred-group-tag { color: #93c5fd !important; background: rgba(37, 99, 235, 0.22) !important; }
body.theme-dark .pred-group-tag-result { color: #86efac !important; background: rgba(22, 163, 74, 0.22) !important; }

/* Slightly elevated inner blocks. */
body.theme-dark .ov-side-item,
body.theme-dark .report-stat-card,
body.theme-dark .pred-viol-item,
body.theme-dark .pred-insp-viols,
body.theme-dark .ov-side-stack .ov-side-item,
body.theme-dark .analytics-funnel-stat,
body.theme-dark .ov-trend-item,
body.theme-dark .basics-table-snapshot {
    background: #2d2d30 !important;
    border-color: #3c3c3c !important;
}

/* ── Text → light by default ── */
body.theme-dark h1, body.theme-dark h2, body.theme-dark h3, body.theme-dark h4, body.theme-dark h5,
body.theme-dark p, body.theme-dark li, body.theme-dark dt, body.theme-dark dd, body.theme-dark strong, body.theme-dark small,
body.theme-dark .az-dashboard-title, body.theme-dark .az-dashboard-text,
body.theme-dark .ov-company-name, body.theme-dark .ov-detail-title, body.theme-dark .ov-detail p,
body.theme-dark .ov-detail p span, body.theme-dark .ov-card-val, body.theme-dark .ov-side-value,
body.theme-dark .ov-side-sub, body.theme-dark .ov-trend-val,
body.theme-dark .report-stat-value, body.theme-dark .report-history-company, body.theme-dark .report-history-dot,
body.theme-dark .report-active-status, body.theme-dark .report-docket-number,
body.theme-dark .subpanel-title, body.theme-dark .section-title, body.theme-dark .incident-section-title,
body.theme-dark .analytics-tool-title, body.theme-dark .pred-viol-score, body.theme-dark .pred-viol-measure-value,
body.theme-dark .settings-label, body.theme-dark .settings-value,
body.theme-dark .oa-value, body.theme-dark .oa-label, body.theme-dark .ov-card-label {
    /* .oa-label (left column of Operating Authority + Active Insurance) was the
       base dark slate #475569 — unreadable on dark. Match the .oa-value (right
       column) light grey so both columns read the same. */
    color: #d4d4d4 !important;
}

/* Preserve the ISS stat tile's status colour. The rule above lists
   .report-stat-value, so its !important grey would otherwise clobber the
   green/amber/red the tile uses to signal ISS severity — the value would read
   plain grey in dark mode. Re-assert each status colour (brightened for the
   dark surface) with higher specificity so the meaning survives, matching how
   the tile looks in light mode. */
body.theme-dark .report-stat-iss.iss-good .report-stat-value { color: #4ade80 !important; }
body.theme-dark .report-stat-iss.iss-warn .report-stat-value { color: #fbbf24 !important; }
body.theme-dark .report-stat-iss.iss-poor .report-stat-value { color: #f87171 !important; }

/* Muted / secondary text. */
body.theme-dark .ov-side-label, body.theme-dark .text-muted, body.theme-dark .settings-desc,
body.theme-dark .analytics-tool-desc, body.theme-dark .ov-detail p strong, body.theme-dark .pred-viol-item-meta,
body.theme-dark .report-stat-title, body.theme-dark .ov-side-sub-label, body.theme-dark .pred-viol-measure-label,
body.theme-dark .pred-insp-viol-desc, body.theme-dark .analytics-funnel-stat-label, body.theme-dark .ov-trend-label,
body.theme-dark .nav-user-greeting, body.theme-dark .ov-detail-title,
body.theme-dark .chameleon-section-title {
    color: #b0b0b0 !important;
}

/* Change Password form inputs. */
body.theme-dark .change-pw-field input {
    background: #1f2937 !important;
    border-color: #3a3a3a !important;
    color: #e5e7eb !important;
}
body.theme-dark .change-pw-field input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.25) !important;
}
body.theme-dark .change-pw-field label { color: #b0b0b0 !important; }

/* Tables. */
body.theme-dark table, body.theme-dark .violations-table, body.theme-dark .insurance-table { color: #d4d4d4 !important; }
body.theme-dark th, body.theme-dark td { border-color: #3a3a3a !important; }
body.theme-dark thead th,
body.theme-dark .violations-table thead th,
body.theme-dark .insurance-table thead th { background: #2d2d30 !important; color: #cfcfcf !important; }
/* Zebra striping: subtle DARK overlay (was a white tint that read as a "slight
   white background" on every other row of the insurance/authority and analytics
   top-violation tables). */
body.theme-dark tbody tr:nth-child(even) td { background: rgba(0, 0, 0, 0.16) !important; }
body.theme-dark tbody tr:hover td { background: rgba(37, 99, 235, 0.10) !important; }

/* ── Blue accents preserved (brightened for contrast on dark). ── */
body.theme-dark a,
body.theme-dark .section-label,
body.theme-dark .ov-side-value-accent,
body.theme-dark .pred-insp-viol-code,
body.theme-dark .pred-insp-report-link,
body.theme-dark .report-docket-value,
body.theme-dark .logo-sight,
body.theme-dark .ov-side-value.ov-side-value-accent {
    color: #4d90f0 !important;
}

/* ── Inputs / selects / textareas ── */
/* :not([type="range"]) — a range input's "background" is its whole 24px track area,
   so #3c3c3c painted a thick grey block over the year-range slider that hid the fill
   line and the left thumb (looked like "one thick slider"). Range inputs are styled
   in their own standalone block below. */
body.theme-dark input:not([type="range"]),
body.theme-dark select,
body.theme-dark textarea,
body.theme-dark .app-header-search input,
body.theme-dark #dotNumberPersistent {
    background: #3c3c3c !important;
    color: #e6e6e6 !important;
    border-color: #555555 !important;
}
/* Year-range dual-thumb slider (Analytics → Historical Trends): keep the input body
   transparent so only the thin track + round thumbs show; darken the base track. */
body.theme-dark .ch-year-input { background: none !important; border: none !important; }
body.theme-dark .ch-year-track { background: #3a3a3c !important; }
body.theme-dark .ch-year-track-fill { background: #2563eb !important; }
body.theme-dark .ch-year-input::-webkit-slider-thumb { background: #e6e6e6 !important; border-color: #2563eb !important; }
body.theme-dark .ch-year-input::-moz-range-thumb { background: #e6e6e6 !important; border-color: #2563eb !important; }
body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder { color: #9d9d9d !important; }

/* ── Modals / dropdowns / search results / notices ── */
body.theme-dark .modal,
body.theme-dark .modal-content,
body.theme-dark .export-pdf-modal-card,
body.theme-dark .font-onboard-card,
body.theme-dark .nav-user-dropdown,
body.theme-dark .carrier-search-results,
body.theme-dark .score-info-bubble,
body.theme-dark .transient-notice,
body.theme-dark .pred-suggestions-content {
    background: #252526 !important;
    color: #d4d4d4 !important;
    border-color: #3c3c3c !important;
}

/* Detailed Inspection/Crash report modal (opened from the Incidents tab). The
   .report-section panels + the close button kept their LIGHT backgrounds in dark
   mode, so the whole detailed report read as a white sheet. Standalone block. */
body.theme-dark .report-card .report-section {
    background: #2d2d30 !important;
    border-color: #3c3c3c !important;
}
body.theme-dark .report-card .report-section h3 { color: #e6e6e6 !important; }
body.theme-dark .close {
    background: #3a3a3c !important;
    color: #e6e6e6 !important;
}
body.theme-dark .incident-history-table thead th { background: #2d2d30 !important; }
/* User dropdown — ID-scoped so it beats the #navUserDropdown rules in report-detail.css. */
body.theme-dark #navUserDropdown,
body.theme-dark .nav-user-dropdown {
    background: #252526 !important;
    border: 1px solid #3c3c3c !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6) !important;
    color: #d4d4d4 !important;
}
body.theme-dark #navUserDropdown .nav-user-item,
body.theme-dark .nav-user-item { color: #d4d4d4 !important; background: transparent !important; }
body.theme-dark #navUserDropdown .nav-user-item:hover,
body.theme-dark .nav-user-item:hover,
body.theme-dark .carrier-search-result:hover,
body.theme-dark .export-pdf-check:hover { background: #2d2d30 !important; color: #ffffff !important; }
body.theme-dark .nav-user-greeting { color: #b0b0b0 !important; }
body.theme-dark .nav-user-greeting strong,
body.theme-dark #navUsername,
body.theme-dark .nav-user-btn,
body.theme-dark #navUsernameShort { color: #e6e6e6 !important; }
body.theme-dark .nav-user-sep { background: #3c3c3c !important; border-color: #3c3c3c !important; }
body.theme-dark .carrier-search-result { background: #3c3c3c !important; border-color: #3366ff !important; color: #d4d4d4 !important; }
body.theme-dark .carrier-search-name { color: #f8fafc !important; }

/* ── Buttons: blue primaries stay; white-bg secondaries become dark with blue text ── */
body.theme-dark .btn-secondary,
body.theme-dark .report-export-pdf-btn,
body.theme-dark .report-reload-btn,
body.theme-dark .text-size-btn,
body.theme-dark .text-size-preview-btn,
body.theme-dark .predictive-reset-btn,
body.theme-dark .pred-viol-add-btn {
    background: #2d2d30 !important;
    color: #4d90f0 !important;
    border-color: #3c3c3c !important;
}
body.theme-dark .report-export-pdf-btn:hover,
body.theme-dark .report-reload-btn:hover,
body.theme-dark .text-size-btn:hover:not(:disabled),
body.theme-dark .text-size-preview-btn:hover,
body.theme-dark .pred-viol-add-btn:hover {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

/* Keep alert / status colours legible on dark. */
body.theme-dark .ov-alerts-count,
body.theme-dark .alerts-count,
body.theme-dark .pred-viol-score-alert,
body.theme-dark .pred-diff-up { color: #f87171 !important; }
body.theme-dark .pred-diff-down { color: #4ade80 !important; }

/* Misc surfaces that default to white. */
body.theme-dark .avatar-preview-wrap,
body.theme-dark .font-onboard-preview-frame { background: #2d2d30 !important; }
body.theme-dark hr,
body.theme-dark .nav-user-sep { border-color: #3c3c3c !important; background: #3c3c3c !important; }

/* =========================================================================
   ADDITIONAL DARK COVERAGE — overlays, loading/progress modals, the overview
   BASIC table, and a safety net for any remaining literal-#fff surfaces in the
   base CSS that CSS variables can't reach. Scoped to body.theme-dark with
   !important so they beat hardcoded light backgrounds (and JS inline
   non-important styles) without touching light mode.
   ========================================================================= */

/* ── Full-screen initial loader ── */
body.theme-dark .initial-loading { background: #1e1e1e !important; }
body.theme-dark .initial-loading-inner {
    background: #2d2d30 !important;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55) !important;
}

/* ── "Loading carrier report" progress modal ── */
body.theme-dark .carrier-load-progress-dialog {
    background: #252526 !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6) !important;
}
body.theme-dark .carrier-load-progress-dot { color: #e6e6e6 !important; }
body.theme-dark .carrier-load-progress-status { color: #b0b0b0 !important; }

/* ── FMCSA outage modal ── */
body.theme-dark .fmcsa-outage-dialog {
    background: #252526 !important;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.6) !important;
}

/* ── Predictive "Add Violation" modal ── */
body.theme-dark .pred-add-modal-content { background: #252526 !important; }
body.theme-dark .pred-add-modal-header { border-bottom-color: #3c3c3c !important; }
body.theme-dark .pred-add-search-results {
    background: #252526 !important;
    border-color: #3c3c3c !important;
}
body.theme-dark .pred-search-item:hover { background: #2d2d30 !important; }

/* ── User dropdown (also forced dark inline in the JS fallback path) ── */
body.theme-dark .nav-user-dropdown { background: #252526 !important; border-color: #3c3c3c !important; }

/* ── Overview BASIC table: force every row/cell to the dark card colour so no
   white rows show through (the table cells use literal light backgrounds). ── */
body.theme-dark #basicsSummaryTable,
body.theme-dark #basicsSummaryTable table,
body.theme-dark #basicsSummaryTable thead,
body.theme-dark #basicsSummaryTable tbody,
body.theme-dark #basicsSummaryTable tr,
body.theme-dark #basicsSummaryTable td {
    background: transparent !important;
    /* No `color` override here: cells inherit the light grey from the
       table-level dark rules, while alert cells (Score/Alert/Months above
       threshold) keep the inline red they get in light mode. An !important
       color here would clobber that inline red and the alerts would read grey
       in dark mode. */
    border-color: #3a3a3a !important;
}
body.theme-dark #basicsSummaryTable thead th {
    background: #2d2d30 !important;
    color: #cfcfcf !important;
}

/* ── Safety net ── Structural surfaces (containers — not accent buttons/badges)
   that still resolve to a literal light background in the base CSS.
   `background-image: none` also flattens any light gradient. ── */
body.theme-dark [class*="modal-content"],
body.theme-dark [class*="-dialog"],
body.theme-dark [class*="-panel"],
body.theme-dark [class*="-snapshot"],
body.theme-dark [class*="-results"],
body.theme-dark [class*="-table-container"],
body.theme-dark [class*="-dropdown"],
body.theme-dark [class*="-popover"],
body.theme-dark [class*="-tooltip"],
body.theme-dark [class*="-card"]:not([class*="btn"]):not([class*="is-selected"]) {
    background-color: #252526 !important;
    background-image: none !important;
}

/* ── Header user-menu pill (the button with the name + caret was a white pill) ── */
body.theme-dark .nav-user {
    background: #2d2d30 !important;
    border-color: #3c3c3c !important;
}
body.theme-dark .nav-user-btn:hover { background: rgba(255, 255, 255, 0.06) !important; }

/* =========================================================================
   DEEP DARK COVERAGE v2 — inner surfaces the base CSS paints with literal white
   or a translucent-white "glass" tint (rgba(255,255,255,X) / white gradients).
   These sit INSIDE already-dark cards, so they showed as pale patches. Plus a
   global table pass so no table renders white rows/cells in dark mode.
   ========================================================================= */

/* Glass-tinted cards, list items, and named surfaces across the tabs. */
body.theme-dark .violations-grid .violation-card,
body.theme-dark .violation-library-item,
body.theme-dark .tool-intro-point,
body.theme-dark .report-history-item,
body.theme-dark .chameleon-vin-card,
body.theme-dark .chameleon-vin-card[open],
body.theme-dark .chameleon-vin-list,
body.theme-dark .chameleon-column,
body.theme-dark .chameleon-vin-header,
body.theme-dark .chameleon-vin-meta {
    background-color: #252526 !important;
    background-image: none !important;
    border-color: #3c3c3c !important;
}

/* Translucent-white form controls (chart range select, library search input). */
body.theme-dark .chart-range-select,
body.theme-dark .violation-library-controls input {
    background-color: #3c3c3c !important;
    background-image: none !important;
    color: #e6e6e6 !important;
    border-color: #555555 !important;
}

/* ── Tables everywhere ── kill any base white fill / zebra, apply a subtle dark
   zebra, dark headers and borders. Covers Carrier Status & Metrics, the
   Operating Authority / BIPD / Active Insurance tables, Authority History,
   the overview BASIC table, etc. */
body.theme-dark table { background: transparent !important; color: #d4d4d4 !important; }
body.theme-dark table tbody tr,
body.theme-dark table tbody tr:nth-child(odd),
body.theme-dark table tbody tr:nth-child(even),
body.theme-dark table tbody td,
body.theme-dark table tbody th { background-color: transparent !important; }
body.theme-dark table thead th,
body.theme-dark table thead td {
    background-color: #2d2d30 !important;
    color: #cfcfcf !important;
}
body.theme-dark table tbody tr:nth-child(even) td,
body.theme-dark table tbody tr:nth-child(even) th { background-color: rgba(0, 0, 0, 0.16) !important; }
body.theme-dark table th,
body.theme-dark table td { border-color: #3a3a3a !important; }

/* =========================================================================
   DARK-BLUE TEXT → readable light blue. The base CSS paints value / label /
   code / link text with dark navy or mid-blue (#0f172a / #1e293b / #1c273c /
   #1e3a5f / #1d4ed8 / #3b82f6) on elements the generic text rules above don't
   reach (SAFER lists, chameleon VINs, predictive detail text, dialog titles,
   admin role). These read as near-invisible dark blue on the dark surface, so
   lighten them. Status colours (red/green) are NOT in this list, so they keep
   their meaning.
   ========================================================================= */
body.theme-dark code,
body.theme-dark kbd,
body.theme-dark samp,
body.theme-dark .chameleon-vin-value code,
body.theme-dark .chameleon-carrier-name,
body.theme-dark [class*="safer-option-"],
body.theme-dark .admin-role-fixed,
body.theme-dark .carrier-timeline-bar-value,
body.theme-dark .export-pdf-modal-title,
body.theme-dark .export-pdf-selectall,
body.theme-dark .export-pdf-group-toggle,
body.theme-dark .font-onboard-title,
body.theme-dark .confirm-dialog-title,
body.theme-dark .pred-insp-date,
body.theme-dark .pred-viol-item-desc,
body.theme-dark .pred-search-item-desc,
body.theme-dark .pred-search-item strong,
body.theme-dark .pred-add-selected-info strong,
body.theme-dark .pred-add-selected-info span,
body.theme-dark .pred-sug-impact-code,
body.theme-dark .pred-insp-viol-code,
body.theme-dark .pred-insp-report-link,
body.theme-dark .pred-path-text strong,
body.theme-dark .pred-fleet-ratios strong,
body.theme-dark .pred-explainer-table td,
body.theme-dark .pred-add-input {
    color: #8fbcf0 !important;
}

/* =========================================================================
   DEEP DARK COVERAGE v3 — the app uses light slate / blue-white tints
   (rgba(248,250,255,X), #f8fafc, #eff6ff, #f1f5f9, #f0f9ff, #e2e8f0) as subtle
   backgrounds on MANY predictive, analytics, authority and chameleon inner
   blocks (gap rows, top-violation categories, BASIC history items, OA rows,
   predictive simulator items, etc.). They aren't pure white, so the earlier
   passes missed them. Force the whole family to the dark elevated surface.
   Coloured progress-bar fills, status badges and severity pills are EXCLUDED
   so they keep their meaning; inline text colours are untouched.
   ========================================================================= */
body.theme-dark [class*="analytics-"]:not([class*="fill"]):not([class*="badge"]):not([class*="status"]),
body.theme-dark [class*="pred"]:not([class*="fill"]):not([class*="badge"]):not([class*="status"]):not([class*="diff"]),
body.theme-dark [class*="oa-"]:not([class*="status"]):not([class*="badge"]),
body.theme-dark .chameleon-vin-header,
body.theme-dark .chameleon-vin-meta,
body.theme-dark .chameleon-carrier-row {
    /* Flatten to TRANSPARENT (was a solid #2d2d30): these selectors blanket every
       inner wrapper — analytics-tool-body, predictive-basics-grid, pred-explainer,
       chameleon vin-header/meta/carrier-row, OA rows, etc. A solid fill painted
       each wrapper a *lighter* shade than its #252526 card, so every card showed a
       nested "wrapper card" behind its content. Transparent lets them inherit the
       card surface (kills the light base tints via background-image:none too). The
       real card containers keep #252526 from the `#pageContent .card` rule above. */
    background-color: transparent !important;
    background-image: none !important;
}
/* Keep the coloured gap progress-bar track subtly dark (not light grey). */
body.theme-dark .analytics-gap-bar-track { background-color: #3c3c3c !important; }

/* Prospect / advanced search (admin) — standalone dark block (never insert mid-list above). */
body.theme-dark .prospect-select,
body.theme-dark .prospect-extra-states {
    background: #1f2937 !important; border-color: #3a3a3a !important; color: #e5e7eb !important;
}
body.theme-dark .prospect-select:focus,
body.theme-dark .prospect-extra-states:focus { border-color: #3b82f6 !important; box-shadow: 0 0 0 3px rgba(59,130,246,0.25) !important; }
body.theme-dark .prospect-chip { border-color: #3a3a3a !important; color: #d4d4d4 !important; }
body.theme-dark .prospect-field > label,
body.theme-dark .prospect-status,
body.theme-dark .prospect-hint,
body.theme-dark .prospect-dot,
body.theme-dark .prospect-city,
body.theme-dark .prospect-muted,
body.theme-dark .prospect-empty,
body.theme-dark .prospect-insurer,
body.theme-dark .prospect-table thead th { color: #b0b0b0 !important; }
body.theme-dark .prospect-table td { border-bottom-color: #3a3a3a !important; }
body.theme-dark .prospect-table thead th { border-bottom-color: #3a3a3a !important; background: #252526 !important; }
body.theme-dark .prospect-table-wrap { border-color: #3a3a3a !important; }
body.theme-dark .prospect-row:hover { background: rgba(59,130,246,0.12) !important; }
body.theme-dark .prospect-mini-panel { background: #252526 !important; box-shadow: 0 24px 60px rgba(0,0,0,0.6) !important; }
body.theme-dark .prospect-mini-table td { border-bottom-color: #3a3a3a !important; color: #e5e7eb !important; }
body.theme-dark .prospect-mini-table th,
body.theme-dark .prospect-mini-loading,
body.theme-dark .prospect-mini-close { color: #b0b0b0 !important; }
body.theme-dark .prospect-mini-note { color: #fbbf24 !important; background: rgba(180,83,9,0.22) !important; }

/* Prospect map state picker (standalone dark block). */
body.theme-dark .prospect-map svg path { fill: #3a3a3c !important; stroke: #252526 !important; }
/* Hover only where hovering exists — sticky touch :hover made deselected states keep color. */
@media (hover: hover) {
    body.theme-dark .prospect-map svg path:hover:not(.is-selected) { fill: #4b5563 !important; }
}
body.theme-dark .prospect-map svg path.is-selected { fill: #2563eb !important; }
body.theme-dark .prospect-map-btn { background: #1f2937 !important; border-color: #3a3a3a !important; color: #e5e7eb !important; }
body.theme-dark .prospect-map-btn:hover { background: #2d2d30 !important; }
body.theme-dark .prospect-sel-chip { background: rgba(37,99,235,0.28) !important; color: #93c5fd !important; }
body.theme-dark .prospect-map-hint { color: #b0b0b0 !important; }
body.theme-dark .prospect-actions .btn { background: #2563eb !important; border-color: #2563eb !important; color: #ffffff !important; }
body.theme-dark .prospect-actions .btn:hover:not(:disabled) { background: #1d4ed8 !important; border-color: #1d4ed8 !important; }

/* --- FMCSA availability pill --- */
body.theme-dark .fmcsa-status { background: #3c3c3c !important; border-color: #4b5563 !important; color: #cbd5e1 !important; }
body.theme-dark .fmcsa-status-dot { background: #94a3b8 !important; }
body.theme-dark .fmcsa-status.is-up { background: rgba(34,197,94,0.12) !important; border-color: rgba(34,197,94,0.35) !important; color: #4ade80 !important; }
body.theme-dark .fmcsa-status.is-up .fmcsa-status-dot { background: #22c55e !important; }
body.theme-dark .fmcsa-status.is-down { background: rgba(239,68,68,0.12) !important; border-color: rgba(239,68,68,0.40) !important; color: #f87171 !important; }
body.theme-dark .fmcsa-status.is-down .fmcsa-status-dot { background: #ef4444 !important; }

/* --- ACORD 25: description editor + holder history --- */
body.theme-dark .acord25-desc-ta { background: #1f2937 !important; color: #e5e7eb !important; border-color: #4b5563 !important; }
body.theme-dark .acord25-chh-item { background: #1f2937 !important; border-color: #4b5563 !important; }
body.theme-dark .acord25-chh-item:hover { border-color: #3366ff !important; background: rgba(51, 102, 255, 0.12) !important; }
body.theme-dark .acord25-chh-name { color: #f8fafc !important; }
body.theme-dark .acord25-chh-meta { color: #b0b0b0 !important; }
body.theme-dark .acord25-chh-when { color: #8a8a8a !important; }
body.theme-dark .acord25-chh-empty { color: #9ca3af !important; }

/* --- Prospect search: custom fleet-size range --- */
body.theme-dark .prospect-pu-input { background: #1f2937 !important; color: #e5e7eb !important; border-color: #4b5563 !important; }
body.theme-dark .prospect-pu-dash { color: #9ca3af !important; }

/* --- ACORD 25: quick-policy chips + description template creator --- */
body.theme-dark .acord25-quickpolicies-label { color: #b0b0b0 !important; }
body.theme-dark .acord25-chip-btn { background: #2d2d30 !important; border-color: #4b5563 !important; color: #d4d4d4 !important; }
body.theme-dark .acord25-chip-btn:hover { border-color: #3b82f6 !important; background: rgba(59,130,246,0.14) !important; }
body.theme-dark .acord25-chip-btn.is-active { background: #2563eb !important; border-color: #2563eb !important; color: #fff !important; }
body.theme-dark .acord25-tpl-panel { border-right-color: #3c3c3c !important; }
body.theme-dark .acord25-tpl-hint, body.theme-dark .acord25-tpl-empty { color: #9ca3af !important; }
body.theme-dark .acord25-tpl-load { background: #1f2937 !important; border-color: #4b5563 !important; color: #e5e7eb !important; }
body.theme-dark .acord25-tpl-load:hover { border-color: #3b82f6 !important; background: rgba(59,130,246,0.12) !important; }
body.theme-dark .acord25-tpl-del { background: #2d2d30 !important; border-color: #4b5563 !important; color: #f87171 !important; }
