:root{--leal-page-bg:#f4f3f0;--leal-surface:#fff;--leal-surface-muted:#f6f5f2;--leal-text:#25313d;--leal-text-muted:#596672;--leal-border:#d6dce2;--leal-input-bg:#fff;--leal-green:#13804b;--leal-orange:#b35a08;--leal-purple:#7c3eb4;--leal-cyan:#097f98;--leal-teal:#0c8075;--leal-rose:#be3454;--leal-focus:#8b5cc4;--leal-whatsapp:var(--leal-green);--leal-whatsapp-text:#11643f;--leal-whatsapp-soft:#e4f5eb;--leal-billing:var(--leal-orange);--leal-billing-text:#8d5106;--leal-billing-soft:#fff0d9;--leal-email:var(--leal-purple);--leal-email-text:#643793;--leal-email-soft:#f1e8fb;--leal-email-border:#cdb7e3;--leal-telegram:var(--leal-cyan);--leal-telegram-text:#0b7189;--leal-telegram-soft:#def6fa;--leal-success:#188354;--leal-danger:#b64343}
.leal-theme-item{align-self:center}.leal-compact-navbar .leal-theme-toggle{display:inline-flex;align-items:center;justify-content:center;min-width:38px;min-height:38px;margin:10px 4px;padding:8px;border:1px solid rgba(255,255,255,.38);border-radius:10px;background:rgba(255,255,255,.12);color:#ffe3a2;font-size:18px;line-height:1;cursor:pointer}.leal-theme-toggle:hover{filter:brightness(1.15)}.leal-theme-toggle:focus-visible{outline:3px solid #f8ca65;outline-offset:2px}#menu-xs .leal-theme-toggle{display:flex;align-items:center;gap:12px;width:100%;padding:14px 20px;border:0;background:transparent;color:inherit;text-align:left;font-size:14px}#menu-xs .leal-theme-toggle>.fa{font-size:21px;color:#bc7412}
/* Icons carry the purpose of each module; status colours and button contrast stay explicit. */
:is(.modal-body,.panel-body,.dropdown-menu,#menu-xs,.client-vehicle-sidebar) :is(.fa-whatsapp,.pe-7s-car,.fa-car){color:var(--leal-green)}
:is(.modal-body,.panel-body,.dropdown-menu,#menu-xs) :is(.fa-envelope,.fa-envelope-o,.fa-video-camera,.fa-camera,.pe-7s-video){color:var(--leal-purple)}
:is(.modal-body,.panel-body,.dropdown-menu,#menu-xs) :is(.fa-file-text-o,.fa-money,.pe-7s-cash,.pe-7s-tools,.fa-wrench,.fa-tint){color:var(--leal-orange)}
:is(.modal-body,.panel-body,.dropdown-menu,#menu-xs) :is(.fa-paper-plane,.fa-paper-plane-o,.pe-7s-user,.pe-7s-users,.fa-user,.fa-users){color:var(--leal-cyan)}
:is(.modal-body,.panel-body,.dropdown-menu,#menu-xs) :is(.pe-7s-map-2,.pe-7s-way,.fa-map-marker,.fa-map-o,.fa-anchor,.fa-road){color:var(--leal-teal)}
:is(.modal-body,.panel-body,.dropdown-menu,#menu-xs) :is(.fa-bell,.fa-bell-o,.pe-7s-bell,.fa-exclamation-triangle,.fa-lock){color:var(--leal-rose)}
:is(.modal-body,.panel-body) .btn:not(.btn-default):not(.btn-link) :is(.fa,[class*="pe-7s-"]),:is(.text-danger,.text-success,.text-warning) .fa{color:inherit}
.modal-body :is(.leal-dashboard-panel,.np-contact-card){box-shadow:0 3px 12px rgba(35,43,54,.055)}
@media screen{
html[data-leal-theme="dark"]{color-scheme:dark;--leal-page-bg:#11161c;--leal-surface:#1c242d;--leal-surface-muted:#242e39;--leal-text:#edf1f5;--leal-text-muted:#b5c1cd;--leal-border:#3b4755;--leal-input-bg:#151d25;--leal-green:#57cf8d;--leal-orange:#ffb05b;--leal-purple:#c69aff;--leal-cyan:#5ad2e8;--leal-teal:#62d3bd;--leal-rose:#ff8ca4;--leal-focus:#c69aff;--leal-whatsapp:var(--leal-green);--leal-whatsapp-text:#87e0ac;--leal-whatsapp-soft:#173e2d;--leal-billing:var(--leal-orange);--leal-billing-text:#ffc083;--leal-billing-soft:#49331f;--leal-email:var(--leal-purple);--leal-email-text:#d3b3ff;--leal-email-soft:#382a49;--leal-email-border:#785a96;--leal-telegram:var(--leal-cyan);--leal-telegram-text:#85e0ef;--leal-telegram-soft:#193d47;--leal-success:#6edc9e;--leal-danger:#ff96a4}
html[data-leal-theme="dark"] body{background:var(--leal-page-bg);color:var(--leal-text)}
html[data-leal-theme="dark"] :is(.modal-content,.modal-body,.modal-footer,.panel,.panel-body,.panel-footer,.well,.np-root,.np-body,.np-footer,.np-contact-card,.leal-dashboard-panel,.leal-central-two-columns,.leal-record-facts,.client-vehicle-sidebar,:where(#client-vehicle-sidebar),.client-vehicle-sidebar-body,.client-vehicle-sidebar-footer,.client-map-panel,.client-map-panel-content,.dropdown-menu,.popover,.popover-content,.leaflet-popup-content-wrapper,.leaflet-popup-tip,.leaflet-control-layers,.leaflet-control-zoom a){background:var(--leal-surface)!important;color:var(--leal-text)!important;border-color:var(--leal-border)!important}
html[data-leal-theme="dark"] :is(.modal-body,.panel-body,.np-root,:where(#client-vehicle-sidebar)) :is(h1,h2,h3,h4,h5,h6,label,dt,dd,strong,.control-label){color:var(--leal-text)}
html[data-leal-theme="dark"] :is(.modal-body,.panel-body,.np-root,:where(#client-vehicle-sidebar)) :is(p,small,.help-block,.text-muted,.np-context,.np-current-contact,.np-save-state,.np-simple-help,.leal-dashboard-note){color:var(--leal-text-muted)}
html[data-leal-theme="dark"] :is(.modal-body,.panel-body,.np-root,:where(#client-vehicle-sidebar)) :is(.form-control,input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="button"]):not([type="submit"]),select,textarea){background:var(--leal-input-bg)!important;color:var(--leal-text)!important;border-color:var(--leal-border)!important;box-shadow:none}
html[data-leal-theme="dark"] :is(input,textarea)::placeholder{color:#91a2b3;opacity:1}
html[data-leal-theme="dark"] :is(.modal-body,.panel-body,.np-root,:where(#client-vehicle-sidebar)) :is(.table,table){color:var(--leal-text)}
html[data-leal-theme="dark"] :is(.modal-body,.panel-body,.np-root,:where(#client-vehicle-sidebar)) :is(th,td){border-color:var(--leal-border)!important;color:var(--leal-text)}
html[data-leal-theme="dark"] :is(.modal-body,.panel-body,.np-root,:where(#client-vehicle-sidebar)) :is(thead th,.table-striped>tbody>tr:nth-of-type(odd),.panel-heading,.np-tabs,.np-subject-tabs,.np-native-channels,.np-bulk-selection,.np-bulk-tools,.np-rule-section,.np-selected-context,.np-events-toggle,.np-event-tools,.np-event-row,.np-notice-table thead th,.np-vehicle-channel-table thead th,.client-map-panel-tabs,.client-vehicle-sidebar-controls,.client-vehicle-sidebar-filters){background:var(--leal-surface-muted)!important;border-color:var(--leal-border)!important;color:var(--leal-text)!important}
html[data-leal-theme="dark"] :is(.np-vehicle-channel-table tbody tr:hover,.table-hover>tbody>tr:hover,.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus){background:#303d4b!important;color:var(--leal-text)!important}
html[data-leal-theme="dark"] :is(.btn-default,.dropdown-menu>li>a,.nav-tabs>li:not(.active)>a,.np-tabs .btn:not(.active),.np-subject-tabs>button:not(.is-active)){background:transparent;color:var(--leal-text);border-color:var(--leal-border)}
html[data-leal-theme="dark"] :is(.modal-body,.panel-body,.np-root,:where(#client-vehicle-sidebar)) a:not(.btn){color:#c69aff}
html[data-leal-theme="dark"] :is(.modal-body,.panel-body,.np-root,:where(#client-vehicle-sidebar)) .text-success{color:#6edc9e!important}
html[data-leal-theme="dark"] :is(.modal-body,.panel-body,.np-root,:where(#client-vehicle-sidebar)) .text-danger{color:#ff96a4!important}
html[data-leal-theme="dark"] :is(.modal-body,.panel-body,.np-root,:where(#client-vehicle-sidebar)) .text-warning{color:#ffc575!important}
html[data-leal-theme="dark"] :is(.alert-info,.alert-warning,.alert-success,.alert-danger){background:#283542;color:#edf1f5;border-color:#526476}
html[data-leal-theme="dark"] :is(.client-standard-modal-header,.leal-central-header,.np-header){background:linear-gradient(115deg,#23283f,#3b3151)!important;border-color:#59446f}
html[data-leal-theme="dark"] :is(.modal-header,.np-header) :is(h2,h3,h4,p,small,.fa,.close){color:#f5f2fa!important}
html[data-leal-theme="dark"] :is(.leal-compact-navbar,#menu-xs){background:#202337!important;border-color:#3e4059}
html[data-leal-theme="dark"] .leaflet-container{background:#18212b}
/* Tile imagery only. Vehicle markers, status colours, photos and video remain unfiltered. */
html[data-leal-theme="dark"] .leaflet-tile-pane{filter:brightness(.58) contrast(1.2) saturate(.75)}
html[data-leal-theme="dark"] :is(.leaflet-control-attribution,.leaflet-control-scale-line){background:rgba(26,33,41,.92)!important;color:#e5eaf1!important;border-color:#8994a3}
html[data-leal-theme="dark"] :is(.modal-backdrop.in,.modal-backdrop.show){opacity:.7}
}
@media print{.leal-theme-item,[data-leal-theme-toggle]{display:none!important}}

/* Use the available space below the two WhatsApp contacts, instead of stretching empty cards. */
.leal-notification-preferences-modal .np-contact-grid{align-items:start}
@media(min-width:1000px){
.leal-notification-preferences-modal .np-contact-grid:has(>.np-contact-operationalWhatsapp):has(>.np-contact-billingWhatsapp):has(>.np-contact-email){grid-template-columns:repeat(3,minmax(0,1fr))}
.leal-notification-preferences-modal .np-contact-grid:has(>.np-contact-operationalWhatsapp):has(>.np-contact-billingWhatsapp)>.np-contact-email{grid-column:3;grid-row:1/span 2}
.leal-notification-preferences-modal .np-contact-grid:has(>.np-contact-operationalWhatsapp):has(>.np-contact-billingWhatsapp):has(>.np-contact-email)>.np-telegram-card{grid-column:1/span 2;grid-row:2}
}
@media screen{
html[data-leal-theme="dark"] :is(.client-maint-body,.client-maint-footer,.client-maint-panel,.client-maint-plan-card,.client-maint-summary,.client-maint-toolbar,.client-overview-content,.client-overview-footer,.client-routing-body,.client-routing-content,.client-routing-footer,.client-routing-form-panel,.client-routing-route-card,.client-routing-summary-card,.client-routing-tab-content,.routing-import-panel,.routing-progress-card,.camera-health-content,.camera-health-summary-card,.camera-cloud-details-content,.camera-event-content,.camera-event-summary,.camera-context-gallery-body,.camera-context-gallery-card,.camera-query-progress-card,.camera-query-summary,.camera-history-footer,.camera-toolbar,.vc-body,.vc-footer,.vc-toolbar,.aa-body,.aa-chart-card,.client-geofence-fleet-body,.financial-modal-body,.financial-modal-footer,.geofence-panel,.geofence-toolbar,.maintenance-history-panel,.maintenance-summary-card,.maintenance-summary-panel,.vehicle-report-card,.vehicle-report-timeline-panel,.leal-notification-cards,.leal-central-tabset>.tab-content){background:var(--leal-surface)!important;color:var(--leal-text)!important;border-color:var(--leal-border)!important}
html[data-leal-theme="dark"] :is(.client-maint-header,.client-overview-header,.client-routing-header,.camera-health-header,.vc-header,.aa-header,.client-alert-center-header,.client-geofence-header,.financial-modal-header,.vehicle-header-premium){background:linear-gradient(115deg,#23283f,#3b3151)!important;color:#f5f2fa!important}
html[data-leal-theme="dark"] :is(.client-maint-tabs,.client-routing-tabs,.camera-central-tabs,.nav-tabs){background:var(--leal-surface-muted)!important;border-color:var(--leal-border)!important}
html[data-leal-theme="dark"] .leal-notification-preferences-modal .np-contact-operationalWhatsapp{border-top-color:var(--leal-whatsapp)!important}
html[data-leal-theme="dark"] .leal-notification-preferences-modal .np-contact-billingWhatsapp{border-top-color:var(--leal-billing)!important}
html[data-leal-theme="dark"] .leal-notification-preferences-modal .np-contact-email{border-top-color:var(--leal-email)!important}
html[data-leal-theme="dark"] .leal-notification-preferences-modal .np-telegram-card{border-top-color:var(--leal-telegram)!important}
html[data-leal-theme="dark"] .leal-notification-preferences-modal .np-contact-operationalWhatsapp h4{color:var(--leal-whatsapp-text)}
html[data-leal-theme="dark"] .leal-notification-preferences-modal .np-contact-billingWhatsapp h4{color:var(--leal-billing-text)}
html[data-leal-theme="dark"] .leal-notification-preferences-modal .np-contact-email h4,html[data-leal-theme="dark"] .np-additional-emails>strong{color:var(--leal-email-text)}
html[data-leal-theme="dark"] .leal-notification-preferences-modal .np-telegram-card h4{color:var(--leal-telegram-text)}
html[data-leal-theme="dark"] .np-additional-emails>.btn{background:var(--leal-email-soft);border-color:var(--leal-email-border);color:var(--leal-email-text)}
}

/* Sidebar controls have their own backgrounds; keep filter labels and vehicle details readable. */
@media screen{
html[data-leal-theme="dark"] #client-vehicle-sidebar :is(.client-vehicle-filters,.client-poi-network-summary,.client-poi-live-summary>div){background:var(--leal-surface-muted)!important;color:var(--leal-text)!important;border-color:var(--leal-border)!important}
html[data-leal-theme="dark"] #client-vehicle-sidebar :is(.client-vehicle-icon-button,.client-map-panel-tab:not(.active),.client-vehicle-status-button:not(.active),.client-vehicle-list-button){background:var(--leal-surface)!important;color:var(--leal-text)!important;border-color:var(--leal-border)!important}
html[data-leal-theme="dark"] #client-vehicle-sidebar .client-vehicle-list-button:is(:hover,:focus-visible){background:var(--leal-surface-muted)!important}
html[data-leal-theme="dark"] #client-vehicle-sidebar .client-vehicle-list-button:focus-visible{outline:2px solid var(--leal-focus);outline-offset:-2px}
html[data-leal-theme="dark"] #client-vehicle-sidebar .client-vehicle-list-name{color:var(--leal-text)!important}
html[data-leal-theme="dark"] #client-vehicle-sidebar :is(.client-vehicle-list-model,.client-vehicle-list-secondary,.client-vehicle-list-meta,.client-vehicle-sidebar-count,.client-vehicle-list-empty,.client-poi-network-counts>span,.client-poi-router-status,.client-vehicle-search-icon){color:var(--leal-text-muted)!important}
html[data-leal-theme="dark"] #client-vehicle-sidebar :is(#client-vehicle-filter-reset,#client-poi-filter-reset,#client-vehicle-search-clear,#client-poi-search-clear){color:var(--leal-cyan)!important}
}

/* Fuel dashboard panels and maintenance summary cards have their own light backgrounds. */
@media screen {
html[data-leal-theme="dark"] .client-fuel-modal :is(.client-fuel-single-vehicle,.client-fuel-periods>article,.client-fuel-panel){background:var(--leal-surface)!important;color:var(--leal-text)!important;border-color:var(--leal-border)!important}
html[data-leal-theme="dark"] .client-fuel-modal .client-fuel-info{background:var(--leal-surface-muted);color:var(--leal-text-muted);border-color:var(--leal-border)}
html[data-leal-theme="dark"] .client-fuel-modal :is(.client-fuel-single-vehicle>strong,.client-fuel-periods strong,.client-fuel-section-title strong,.client-fuel-summary-list dd,.client-fuel-chart-row>strong,.client-fuel-empty-metric strong){color:var(--leal-text)}
html[data-leal-theme="dark"] .client-fuel-modal :is(.client-fuel-single-vehicle>span,.client-fuel-periods span,.client-fuel-summary-list dt,.client-fuel-chart-row>span,.client-fuel-empty-metric,.client-fuel-pagination){color:var(--leal-text-muted)}
html[data-leal-theme="dark"] .client-fuel-modal .client-fuel-summary-list>div{border-color:var(--leal-border)}
html[data-leal-theme="dark"] .client-fuel-modal .client-fuel-chart-row>div{background:var(--leal-surface-muted)}
html[data-leal-theme="dark"] .client-maint-modal .client-maint-summary>article{background:var(--leal-surface);color:var(--leal-text);border-color:var(--leal-border);border-top-color:var(--leal-teal)}
html[data-leal-theme="dark"] .client-maint-modal .client-maint-summary>article.is-danger{border-top-color:var(--leal-rose)}
html[data-leal-theme="dark"] .client-maint-modal .client-maint-summary>article.is-warning{border-top-color:var(--leal-orange)}
html[data-leal-theme="dark"] .client-maint-modal .client-maint-summary strong{color:var(--leal-text)}
html[data-leal-theme="dark"] .client-maint-modal .client-maint-summary :is(span,small){color:var(--leal-text-muted)}
}

/* Source-audited modal surfaces. No media, chart fills, layout or behavior is changed. */
@media screen {
html[data-leal-theme="dark"]{--leal-selection-bg:#39304f;--leal-selection-text:#f1e6ff;--leal-danger-soft:#482831}
html[data-leal-theme="dark"] .modal .leal-camera-player-header{background:var(--leal-surface)!important;color:var(--leal-text)!important;border-color:var(--leal-border)!important}
/* Neutral surfaces are paired with their foreground and border. */
html[data-leal-theme="dark"] .modal :is(
  .aa-filters,
  .vc-shell,
  .vehicle-profile-photo-image,
  .aa-kpis article,
  .client-fuel-entry-form,
  .client-fuel-config,
  .client-support-content,
  .client-alert-center-empty,
  .client-overview-alert-item,
  .vehicle-report-panel,
  .vehicle-report-donut>div,
  .client-subuser-list-item,
  .client-subusers-permissions,
  .client-subusers-vehicles,
  .client-subusers-audit-table,
  .financial-modal-shell,
  .financial-table-wrap,
  .financial-invoice-table,
  .financial-invoice-table>tbody>tr,
  .financial-invoice-table>tbody>tr>td,
  .financial-empty-state,
  .geofence-vehicle-options,
  .leal-camera-panel .camera-history-scroll,
  .leal-camera-panel .camera-events-scroll,
  .camera-event-inbox-item,
  .camera-health-item,
  .camera-context-workspace .camera-context-clip-card,
  .leal-ai-unavailable,
  .leal-ai-loading-state,
  .leal-ai-bubble,
  .leal-ai-composer,
  .client-maint-actionbar,
  .client-maint-form,
  .client-maint-receipt,
  .client-maint-table,
  .client-maint-batch label,
  .client-routing-sidebar,
  .client-routing-operation-item,
  .client-routing-inline-form,
  .client-routing-location-box,
  .client-routing-address-results,
  .client-routing-table,
  .client-routing-map-routes article,
  .client-routing-timeline article,
  .vc-sidebar,
  .vc-tile,
  .leal-driver-report,
  .leal-notification-cards tr,
  .leal-telemetry-stat,
  .leal-history-highlights>article,
  .leal-current-reading,
  .vehicle-report-period-picker,
  .leal-confirmation-details,
  .leal-can-history-detail-group,
  .leal-can-history-table>tbody>tr,
  .eco-kpi,
  .j16-trip-table,
  .j16-trip-empty,
  .leal-privacy-policy .privacy-footer
){background:var(--leal-surface)!important;color:var(--leal-text)!important;border-color:var(--leal-border)!important}
html[data-leal-theme="dark"] .modal :is(
  .input-group-addon,
  .list-group-item,
  .client-fuel-receipt-box,
  .client-fuel-readonly,
  .client-fuel-odometer-box,
  .client-alert-read-state,
  .vehicle-report-idle-config,
  .client-subuser-active,
  .client-subuser-permission,
  .client-subusers-single-vehicle,
  .financial-empty-icon,
  .geofence-vehicle-picker,
  .leal-camera-panel .camera-session-status,
  .leal-camera-panel .camera-event-count,
  .camera-event-center>.btn-group[aria-label="Eventos e avisos"],
  .camera-context-workspace .camera-context-aside,
  .camera-health-summary-card .fa,
  .camera-health-quota,
  .leal-ai-context,
  .client-maint-items,
  .client-maint-plan-card dl div,
  .client-maint-mini-form,
  .client-maint-source,
  .client-routing-operation-empty,
  .client-routing-empty,
  .client-routing-welcome,
  .client-routing-next-step,
  .client-routing-route-card dl>div,
  .client-routing-route-stops span,
  .client-routing-window-check,
  .client-routing-readonly,
  .client-routing-execution-form,
  .leal-driver-banner,
  .leal-current-status,
  .leal-evidence-pill,
  .leal-equipment-card,
  .leal-equipment-details>summary.leal-equipment-toggle,
  .leal-can-history-reading,
  .eco-comparison,
  .eco-empty,
  .eco-view-nav,
  .jmak-view-nav,
  .jmak-trip-summary>div,
  .j16-trip-panel,
  .leal-privacy-policy .privacy-contact,
  .leal-privacy-policy .privacy-sources,
  .np-telegram-confirm,
  .location-share-destination,
  .location-share-active-row,
  .leal-camera-player-message,
  .camera-context-media-message,
  .admin-impersonation-notice,
  .vehicle-profile-photo
){background:var(--leal-surface-muted)!important;color:var(--leal-text)!important;border-color:var(--leal-border)!important}
html[data-leal-theme="dark"] .modal :is(
  .aa-close,
  .aa-shortcuts button,
  .client-alert-center-load-more button,
  .client-overview-alert-actions button,
  .financial-invoice-btn,
  .leal-camera-panel .camera-query-cancel.btn,
  .leal-ai-suggestions button,
  .leal-ai-mic,
  .location-share-duration-grid button,
  .client-routing-address-results button,
  .leal-segmented button:not(.active),
  .leal-command-tiles>button:not(.active),
  .leal-equipment-toggle-action,
  .eco-view-nav button:not(.active),
  .jmak-view-nav button:not(.active),
  .vc-channel-list button:not(.vc-selected)
){background:var(--leal-surface)!important;color:var(--leal-text)!important;border-color:var(--leal-border)!important}
html[data-leal-theme="dark"] body.vehicle-central-dashboard-open .vehicle-central-root-modal .modal-body{background:var(--leal-page-bg)!important}
html[data-leal-theme="dark"] .modal .modal-body :is(.table,.table>tbody>tr>td,.table>thead>tr>th){background:var(--leal-surface)!important;color:var(--leal-text)!important;border-color:var(--leal-border)!important}
html[data-leal-theme="dark"] .modal .modal-body :is(.table>thead>tr>th,.table-striped>tbody>tr:nth-of-type(odd)>td){background:var(--leal-surface-muted)!important}
/* Keep the current vehicle metrics legible without removing their coloured icon/accent. */
html[data-leal-theme="dark"] .vehicle-central-root-modal .leal-current-reading{border-left-color:var(--leal-cyan)}
html[data-leal-theme="dark"] .vehicle-central-root-modal .leal-current-reading>i{color:var(--leal-cyan)!important}
html[data-leal-theme="dark"] .vehicle-central-root-modal .leal-current-reading:nth-child(3n+2){border-left-color:var(--leal-green)}
html[data-leal-theme="dark"] .vehicle-central-root-modal .leal-current-reading:nth-child(3n+2)>i{color:var(--leal-green)!important}
html[data-leal-theme="dark"] .vehicle-central-root-modal .leal-current-reading:nth-child(3n){border-left-color:var(--leal-orange)}
html[data-leal-theme="dark"] .vehicle-central-root-modal .leal-current-reading:nth-child(3n)>i{color:var(--leal-orange)!important}
html[data-leal-theme="dark"] .vehicle-central-root-modal .leal-telemetry-stat.tone-blue{--leal-tone:var(--leal-cyan)}
html[data-leal-theme="dark"] .vehicle-central-root-modal .leal-telemetry-stat.tone-amber{--leal-tone:var(--leal-orange)}
html[data-leal-theme="dark"] .vehicle-central-root-modal .leal-telemetry-stat.tone-green{--leal-tone:var(--leal-green)}
html[data-leal-theme="dark"] .vehicle-central-root-modal .leal-telemetry-stat.tone-purple{--leal-tone:var(--leal-purple)}
html[data-leal-theme="dark"] .vehicle-central-root-modal :is(.leal-current-reading,.leal-telemetry-stat,.leal-history-highlights,.eco-kpi,.aa-kpis,.leal-record-facts,.leal-period-facts) :is(strong,dd,b){color:var(--leal-text)}
html[data-leal-theme="dark"] .vehicle-central-root-modal :is(.leal-current-reading,.leal-telemetry-stat,.leal-history-highlights,.eco-kpi) :is(small,span){color:var(--leal-text-muted)}
html[data-leal-theme="dark"] .vehicle-central-root-modal :is(.leal-dashboard-note,.leal-cell-detail,.leal-chart-reading,.leal-chart-group-title,.leal-record-facts dt,.leal-period-facts dt,.leal-central-tabset>.nav-tabs:before){color:var(--leal-text-muted)}
html[data-leal-theme="dark"] body.vehicle-central-dashboard-open .vehicle-central-root-modal .leal-central-tabset>.nav-tabs>li:not(.active)>a{background:var(--leal-surface-muted);color:var(--leal-text)!important}
html[data-leal-theme="dark"] body.vehicle-central-dashboard-open .vehicle-central-root-modal .leal-central-tabset>.nav-tabs>li.active>a{background:var(--leal-selection-bg);color:var(--leal-selection-text)!important;box-shadow:inset 4px 0 var(--leal-focus)}
html[data-leal-theme="dark"] body.vehicle-central-dashboard-open .vehicle-central-root-modal .vehicle-report-card-grid>.vehicle-report-card{background:var(--leal-tone,#1940a3)!important}
html[data-leal-theme="dark"] body.vehicle-central-dashboard-open .vehicle-central-root-modal .vehicle-report-card :is(strong,small,span,em){color:#fff!important}
html[data-leal-theme="dark"] .modal .modal-body :is(.aa-kpis,.client-maint-ranking,.client-maint-plan-card,.client-routing-summary-card,.client-routing-route-card,.client-routing-timeline,.camera-health-summary-card,.financial-empty-state) :is(strong,b,dd){color:var(--leal-text)}
html[data-leal-theme="dark"] .modal .modal-body :is(.aa-kpis,.camera-health-summary-card,.client-subuser-permission,.client-subuser-active,.client-routing-summary-card,.client-routing-timeline,.client-maint-ranking) :is(span,small){color:var(--leal-text-muted)}
html[data-leal-theme="dark"] .modal :is(.financial-cell-value,.financial-amount,.financial-section-title,.client-subusers-form-title,.leal-ai-message-text){color:var(--leal-text)}
html[data-leal-theme="dark"] .modal :is(.financial-mobile-label,.financial-section-subtitle,.financial-loading-text,.client-subusers-empty,.client-subusers-form-title span,.client-subusers-permission-head span,.client-subusers-vehicle-head span,.client-subuser-permission small,.leal-ai-unavailable span,.leal-ai-thinking,.leal-ai-footnote,.aa-context,.aa-bar-label,.aa-empty,.aa-pagination,.aa-method,.eco-note,.eco-range,.camera-event-state,.camera-event-speed){color:var(--leal-text-muted)}
html[data-leal-theme="dark"] .modal :is(.client-subuser-list-item,.client-routing-operation-item,.location-share-duration-grid button) :is(span,small,em){color:var(--leal-text-muted)}
html[data-leal-theme="dark"] .modal :is(.leal-confirmation-before,.client-subuser-help,.admin-impersonation-notice small){color:var(--leal-text-muted)}
html[data-leal-theme="dark"] .modal .leal-confirmation-details>div{border-color:var(--leal-border)}
html[data-leal-theme="dark"] .modal .modal-body :is([style*="color:#777"],[style*="color:#666"]){color:var(--leal-text-muted)!important}
html[data-leal-theme="dark"] .leal-central-loading-panel{background:var(--leal-surface);color:var(--leal-text);border-color:var(--leal-border)}
/* Choice and eligibility remain distinct; selected items and toggles keep explicit states. */
html[data-leal-theme="dark"] .modal :is(
  .client-subuser-list-item.active,
  .client-subuser-permission.selected,
  .client-subuser-vehicle.selected,
  .client-routing-operation-item.active,
  .location-share-duration-grid button.is-selected,
  .client-routing-tabs button.active,
  .client-maint-tabs button.active,
  .eco-view-nav button.active,
  .jmak-view-nav button.active,
  .leal-segmented button.active,
  .leal-command-tiles>button.active,
  .camera-central-tabs>.btn.active,
  .camera-event-center>.btn-group[aria-label="Eventos e avisos"]>.btn.active,
  .vc-channel-list button.vc-selected
){background:var(--leal-selection-bg)!important;color:var(--leal-selection-text)!important;border-color:var(--leal-focus)!important}
html[data-leal-theme="dark"] .modal :is(.client-routing-tabs,.client-maint-tabs) button:not(.active){color:var(--leal-text-muted)}
html[data-leal-theme="dark"] .modal :is(.leal-command-tiles>button.active,.camera-health-summary-card.active) :is(strong,small,span){color:var(--leal-selection-text)!important}
html[data-leal-theme="dark"] .modal .camera-health-summary-card.active{background:var(--leal-selection-bg)!important;border-color:var(--leal-focus)!important}
html[data-leal-theme="dark"] .modal .client-notification-toggle-button{background:#166b43;color:#fff;border-color:#4cc58b}
html[data-leal-theme="dark"] .modal .client-notification-toggle-button.notification-off{background:var(--leal-surface-muted);color:var(--leal-text-muted);border-color:var(--leal-border)}
html[data-leal-theme="dark"] .modal .client-notification-toggle-button>i{color:inherit!important}
html[data-leal-theme="dark"] .modal :is(button,a,input,select,textarea):focus-visible{outline:2px solid var(--leal-focus);outline-offset:2px}
/* Semantic messages are recoloured as a foreground/background pair. */
html[data-leal-theme="dark"] .modal :is(
  .aa-severity,
  .report-tag,
  .client-maint-status,
  .client-maint-plan-message.muted,
  .camera-event-level,
  .client-geofence-alert-kind
){background:var(--leal-surface-muted)!important;color:var(--leal-text-muted)!important;border-color:var(--leal-border)!important}
html[data-leal-theme="dark"] .modal :is(
  .client-fuel-receipt-result,
  .client-geofence-alert-entry,
  .tag-green,
  .client-fuel-consumption-ok,
  .vehicle-report-idle-empty,
  .client-subuser-permission.mandatory,
  .location-share-privacy-note,
  .location-share-success-icon,
  .client-maint-receipt-analysis,
  .client-maint-status.status-ok,
  .client-routing-selected-address,
  .eco-band-preview,
  .eco-callout
){background:var(--leal-whatsapp-soft)!important;color:var(--leal-success)!important;border-color:var(--leal-whatsapp)!important}
html[data-leal-theme="dark"] .modal :is(
  .aa-notice,
  .aa-severity-warning,
  .vehicle-report-idle-rule,
  .tag-orange,
  .client-maint-status.status-atencao,
  .client-maint-plan-message.warning,
  .client-routing-unassigned-warning,
  .client-routing-stale,
  .vc-notice,
  .camera-event-level-2,
  .client-geofence-alert-exit
){background:var(--leal-billing-soft)!important;color:var(--leal-billing-text)!important;border-color:var(--leal-billing)!important}
html[data-leal-theme="dark"] .modal :is(
  .aa-error,
  .aa-severity-critical,
  .client-fuel-receipt-box.has-error,
  .client-maint-status.status-vencida,
  .client-maint-plan-message:not(.warning):not(.muted),
  .leal-ai-error,
  .leal-ai-mic.recording,
  .vc-list-error,
  .vc-tile-error
){background:var(--leal-danger-soft)!important;color:var(--leal-danger)!important;border-color:var(--leal-danger)!important}
html[data-leal-theme="dark"] .modal :is(.aa-notice,.aa-error,.client-fuel-receipt-result,.client-fuel-consumption-ok,.client-maint-plan-message,.client-maint-receipt-analysis,.client-routing-selected-address,.client-routing-unassigned-warning,.vc-notice,.leal-ai-error,.eco-callout,.eco-band-preview) :is(p,span,small,strong,b){color:inherit!important}
html[data-leal-theme="dark"] .modal .report-tag.tag-blue{background:var(--leal-telegram-soft)!important;color:var(--leal-telegram-text)!important}
html[data-leal-theme="dark"] .modal :is(.report-tag.tag-purple,.report-tag.tag-indigo){background:var(--leal-email-soft)!important;color:var(--leal-email-text)!important}
html[data-leal-theme="dark"] .modal .leal-ai-message-user .leal-ai-bubble{background:var(--leal-selection-bg)!important;border-color:var(--leal-focus)!important;color:var(--leal-selection-text)!important}
html[data-leal-theme="dark"] .modal .leal-ai-message-user .leal-ai-message-text{color:var(--leal-selection-text)}
html[data-leal-theme="dark"] .modal :is(.aa-kpi-critical strong,.eco-above){color:var(--leal-danger)}
html[data-leal-theme="dark"] .modal :is(.eco-extra,.eco-green,.eco-reward){color:var(--leal-success)}
html[data-leal-theme="dark"] .modal .eco-below{color:var(--leal-billing-text)}
html[data-leal-theme="dark"] .modal :is(.client-fuel-field-error,.client-subuser-field-error,.client-routing-field-error,.has-error label,.has-error .control-label,.has-error .help-block,.has-error [ng-message]){color:var(--leal-danger)!important}
html[data-leal-theme="dark"] .modal :is(.has-error .form-control,.client-routing-location-box.has-error){border-color:var(--leal-danger)!important}
html[data-leal-theme="dark"] .modal .form-control:disabled{background:var(--leal-surface-muted)!important;color:var(--leal-text-muted)!important}
/* Current custom text classes found by the browser contrast audit. */
html[data-leal-theme="dark"] .modal :is(.client-overview-alert-message strong,.client-alert-vehicle-line strong,.client-alert-driver-line b,.client-alert-vehicle-line b,.vehicle-profile-photo-content>strong,.routing-progress-heading b,.vc-empty h4,legend){color:var(--leal-text)!important}
html[data-leal-theme="dark"] .modal :is(.client-overview-alert-message span,.client-alert-vehicle-line span,.client-alert-driver-line,.client-fuel-receipt-existing,.client-maint-category,.client-maint-plan-compact b,.np-bulk-tools span,.np-native-heading span,.vehicle-profile-photo-muted,.vehicle-profile-photo-status,.camera-audio-note){color:var(--leal-text-muted)!important}
html[data-leal-theme="dark"] .modal :is(.leal-ai-speak,.location-share-selected){color:var(--leal-cyan)!important}
html[data-leal-theme="dark"] .modal :is(.client-fuel-receipt-warnings,.np-native-partial){color:var(--leal-billing-text)!important}
html[data-leal-theme="dark"] .modal :is(.vehicle-profile-photo-remove,.vehicle-profile-photo-error,[style*="color:#c0392b"]){color:var(--leal-danger)!important}
html[data-leal-theme="dark"] .modal .modal-body :is(summary,.client-support-content li){color:var(--leal-text-muted)!important}
html[data-leal-theme="dark"] .modal a:not(.btn):not([role="tab"]):not(.nav-tabs a){color:var(--leal-cyan)!important}
html[data-leal-theme="dark"] .modal .camera-event-policy-editor label[style*="background:#f4f7fb"]{background:var(--leal-surface-muted)!important;color:var(--leal-text)!important}
html[data-leal-theme="dark"] .modal .location-share-modal-body{--location-share-ink:var(--leal-text);--location-share-muted:var(--leal-text-muted);--location-share-soft:var(--leal-surface-muted);--location-share-surface:var(--leal-surface);--location-share-success:var(--leal-success)}
/* Preserve Bootstrap action meaning with a readable light foreground. Disabled attributes are untouched. */
html[data-leal-theme="dark"] .modal :is(.btn-success,.label-success,.financial-pay-btn){background:#166b43!important;border-color:#32895e!important;color:#fff!important}
html[data-leal-theme="dark"] .modal :is(.btn-info,.label-info){background:#0b6578!important;border-color:#398c9d!important;color:#fff!important}
html[data-leal-theme="dark"] .modal :is(.btn-warning,.label-warning){background:#8a4e0b!important;border-color:#bb7e37!important;color:#fff!important}
html[data-leal-theme="dark"] .modal :is(.btn-danger,.label-danger){background:#922f43!important;border-color:#bf6070!important;color:#fff!important}
html[data-leal-theme="dark"] .modal :is(.btn-success,.btn-info,.btn-warning,.btn-danger,.financial-pay-btn) :is(span,strong,small,.fa){color:inherit!important}
/* Final source-specific text pairs identified in the second real-browser audit. */
html[data-leal-theme="dark"] .vehicle-central-root-modal :is(.eco-export-actions>span,.jmak-trip-summary strong){color:var(--leal-text)!important}
html[data-leal-theme="dark"] .vehicle-central-root-modal :is(.vehicle-report-range span,.jmak-trip-summary small,.j16-trip-note){color:var(--leal-text-muted)!important}
html[data-leal-theme="dark"] .vehicle-central-root-modal .vehicle-report-progressive-address .btn-link{color:var(--leal-cyan)!important}
html[data-leal-theme="dark"] .modal .camera-cloud-pending{color:var(--leal-billing-text)!important}
html[data-leal-theme="dark"] .modal .client-subusers-single-vehicle span{color:var(--leal-text-muted)!important}
html[data-leal-theme="dark"] .modal .client-overview-alerts-empty>span{background:var(--leal-whatsapp-soft)!important;color:var(--leal-success)!important}
/* Empty chart tracks stay distinct; data fills and SVG/canvas/video/image pixels are untouched. */
html[data-leal-theme="dark"] .modal :is(.aa-bar-track,.vehicle-report-progress,.client-maint-bars>div>div,.client-maint-ranking>i,.routing-progress-track,.eco-bar-track){background:var(--leal-surface-muted)!important}
}
