/* Shared content colours are independent from text on bright brand buttons. */
:root{--content-ink:var(--text);--control-ink:var(--brand-lime-ink);--status-success-bg:#e7f3eb;--status-success-ink:#245d3a;--status-pending-bg:#fff0ce;--status-pending-ink:#765008;--status-error-bg:#fbe8e8;--status-error-ink:#902e2e}
:root[data-theme=night][data-palette]{--bg:#151719;--surface:#202427;--raised:#2a3033;--text:#f3f5f2;--ink:#f3f5f2;--muted:#b8c0b8;--line:#56605b;--border:#56605b;--panel:#202427;--paper:#202427;--white:#f3f5f2;--button-disabled:#343b3b;--button-disabled-ink:#bac2bd;--status-success-bg:#233e30;--status-success-ink:#bce7cb;--status-pending-bg:#453818;--status-pending-ink:#f8dc9b;--status-error-bg:#462a2b;--status-error-ink:#ffcbcb}
:root body :is(.map-head,.map-instruction,.map-home,.map-actions button,.visual,.delivery-price,.trip-summary,.search-panel,.place-result,.search-more,.fleet-panel,.fleet-coordinates,.fleet-selection,.fleet-source,.fleet-mobile-filter select,.delivery-field input,.delivery-field select,#when){color:var(--content-ink)}
:root body :is(.map-home,.search-panel,.search-more,.fleet-panel,.fleet-source select,.fleet-mobile-filter select,.delivery-field input,.delivery-field select,#when){background-color:var(--surface)}
:root body #map .leaflet-control-zoom a{color:var(--text);background:var(--surface);border-color:var(--line)}
:root body :is(#map,#driver-live-map,#console-live-map,#shared-map) .leaflet-popup-content-wrapper{background:var(--surface);color:var(--text)}
:root body :is(#map,#driver-live-map,#console-live-map,#shared-map) .leaflet-popup-content{color:var(--text)}
:root body :is(#map,#driver-live-map,#console-live-map,#shared-map) .leaflet-popup-tip{background:var(--surface)}
:root body #map .leaflet-tooltip.pin-label{background:var(--raised);color:var(--text);border-color:var(--line)}
:root body #map .leaflet-tooltip-top.pin-label:before{border-top-color:var(--line)}
:root body :is(.fleet-choose,#toast){background:var(--brand-lime);color:var(--control-ink)}
:root[data-theme=night] body :is(#map,#driver-live-map,#console-live-map,#shared-map) .leaflet-tile-pane{filter:saturate(.85) brightness(.98) contrast(1.05)!important}
:root[data-theme=night] body :is(input,textarea)::placeholder{color:var(--muted);opacity:1}
:root[data-theme=night] body :is(.driver-pin-help,.driver-fare-label,.reg-foot,.driver-auth p,.profile-rating,.pd-help,.pd-notice){color:var(--muted)}
:root[data-theme=night] body :is(input:not([type=checkbox]):not([type=radio]):not([type=file]),textarea,select){background-color:var(--surface);color:var(--text);border-color:var(--line);color-scheme:dark}
:root[data-theme=night] body input.ui-check:not(:checked){background-color:var(--surface);border-color:var(--muted)}
:root body .payment-dashboard .pd-stats>.pd-pending{background:var(--status-pending-bg);color:var(--status-pending-ink);border-color:var(--status-pending-ink)}
:root body .payment-dashboard .pd-stats>.pd-pending :is(strong,small,span){color:inherit}
:root body :is(.pd-error:not(:empty),.pd-badge.rejected,.oc-application-badge[data-status=rejected],.oc-application-badge[data-status=changes_requested]){background:var(--status-error-bg);color:var(--status-error-ink);border-color:var(--status-error-ink)}
:root body :is(.pd-badge.pending,.oc-application-badge[data-status=pending],.directory-status.state-payment_pending,.directory-status.state-application_pending,.directory-status.state-awaiting_payment,.directory-status.state-changes_requested){background:var(--status-pending-bg);color:var(--status-pending-ink)}
:root body :is(.pd-badge.approved,.oc-application-badge[data-status=approved],.directory-status.state-active){background:var(--status-success-bg);color:var(--status-success-ink)}
:root[data-theme=night] body :is(.admin-driver-phone,.admin-driver-counts button,.admin-driver-row,.admin-driver-table-head){background:var(--surface)!important;color:var(--text)!important;border-color:var(--line)!important}
:root[data-theme=night] body :is(.admin-driver-phone>strong,.admin-driver-identity strong,.admin-driver-vehicle small,.admin-driver-counts span,.admin-driver-counts strong){color:var(--text)!important}
:root[data-theme=night] body .admin-phone-actions button{background:var(--surface)!important;color:var(--text)!important;border-color:var(--line)!important}
:root[data-theme=night] body :is(.admin-phone-actions a,.admin-driver-view.primary){background:var(--brand-lime)!important;color:var(--control-ink)!important;border-color:var(--brand-lime)!important}
:root[data-theme=night] body :is(.admin-driver-view:not(.primary),.admin-driver-search input){background:var(--surface)!important;color:var(--text)!important;border-color:var(--line)!important}
:root[data-theme=night] body .admin-driver-counts button[aria-pressed=true]{box-shadow:inset 0 0 0 2px var(--brand-lime)}
:root[data-theme=night] body .status-approved{background:var(--status-success-bg)!important;color:var(--status-success-ink)!important}
:root[data-theme=night] body .status-pending{background:var(--status-pending-bg)!important;color:var(--status-pending-ink)!important}

:root body #expand-map{color:var(--text);background:var(--surface);border-color:var(--line)}

/* Secondary map navigation uses content ink, never text-on-accent ink. */
:root body #collapse-map{color:var(--text);background:var(--surface);border:1px solid var(--line)}
:root body .map-expanded-bar{color:var(--text);background:var(--raised)}
