/* AppInnova · sistema compartido de color. Conserva estructura y comportamiento. */
html[data-app-theme]{
 --ai-bg:#f3f6fb;--ai-surface:#fff;--ai-raised:#f7f9fc;--ai-text:#203047;--ai-muted:#53657c;--ai-line:#dce5f0;
 --ai-primary:#274acc;--ai-primary-hover:#203dab;--ai-accent:#168a9a;--ai-soft:#eaf0ff;
 --ai-success:#245c42;--ai-success-bg:#eaf4ee;--ai-warning:#884526;--ai-warning-bg:#fbefe8;--ai-danger:#a52e39;--ai-danger-bg:#faebed;
 --bs-primary:#274acc;--bs-primary-rgb:39,74,204;--vz-primary:#274acc;--vz-primary-rgb:39,74,204;
}
html[data-app-theme="dark"]{
 --ai-bg:#101827;--ai-surface:#192436;--ai-raised:#202e43;--ai-text:#e5edf8;--ai-muted:#b0bfd3;--ai-line:#35465f;
 --ai-primary:#96b5ff;--ai-primary-hover:#b3c9ff;--ai-accent:#71d1db;--ai-soft:#283d62;
 --ai-success:#abd6bc;--ai-success-bg:#223e34;--ai-warning:#efc3a0;--ai-warning-bg:#453326;--ai-danger:#f1b0b9;--ai-danger-bg:#452c37;
 --bs-body-bg:#101827;--bs-body-color:#e5edf8;--bs-border-color:#35465f;--bs-secondary-color:#b0bfd3;--bs-tertiary-bg:#202e43;
 --vz-body-bg:#101827;--vz-body-color:#e5edf8;--vz-border-color:#35465f;--vz-secondary-color:#b0bfd3;--vz-card-bg:#192436;--vz-input-bg:#202e43;
}
html[data-app-theme] body{background:var(--ai-bg)!important;color:var(--ai-text)}
html[data-app-theme] body :is(.card,.cp-card,.gr-card,.fc-card,.nt-card,.drv-card,.gzp-card,.settings-card,.conn-card,.tp-card,.usr-delete-card,.modal-content,.dropdown-menu,.select2-dropdown,.list-group-item){background:var(--ai-surface)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important;box-shadow:0 6px 22px rgba(25,42,70,.06)}
html[data-app-theme] body :is(.card-body,.cp-card-body,.gr-card-body,.fc-card-body,.nt-card-body,.drv-card-body,.gzp-card-body,.settings-card-body,.tp-details,.usr-form-body){background:var(--ai-surface)!important;color:var(--ai-text)!important}
html[data-app-theme] body :is(.card-header,.cp-card-header,.gr-card-head,.fc-card-head,.nt-card-head,.drv-card-head,.gzp-card-head,.settings-card-head,.modal-header,.modal-footer,.panel-heading){background:var(--ai-raised)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important}
html[data-app-theme] body :is(.card-header,.card-body,.modal-header,.tp-card-heading) :is(h1,h2,h3,h4,h5,h6,.card-title){color:var(--ai-text)!important}
html[data-app-theme] body :is(.dv-hero,.gr-command,.fc-command,.cp-hero,.drv-hero,.gzp-hero,.notif-hero,.settings-command,.usr-hero,.usr-form-head,.conn-head){background:linear-gradient(115deg,#203aa4,#187f9e)!important;color:#fff!important;border-color:#3157aa!important}
html[data-app-theme] body :is(.dv-hero,.gr-command,.fc-command,.cp-hero,.drv-hero,.gzp-hero,.notif-hero,.settings-command,.usr-hero,.usr-form-head,.conn-head) :is(h1,h2,h3,p){color:#fff!important}
html[data-app-theme] body :is(.gr-kpi,.fc-kpi,.nt-kpi,.cp-kpi,.usr-kpi,.info-card){background:var(--ai-surface)!important;border-color:var(--ai-line)!important;color:var(--ai-text)!important}
html[data-app-theme] body :is(.form-control,.form-select,.tp-input,.tp-select-button,.select2-container .select2-selection,.choices__inner){background:var(--ai-surface)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important}
html[data-app-theme] body :is(.form-control,.tp-input)::placeholder{color:var(--ai-muted)!important;opacity:1}
html[data-app-theme] body :is(.form-control,.form-select,.tp-input):focus{border-color:var(--ai-accent)!important;box-shadow:0 0 0 3px rgba(37,189,206,.15)!important}
html[data-app-theme] body :is(.form-label,.control-label,.tp-label,label,.text-muted,.help-block,.hint-block,.tp-hint,.tp-nav-note,.tp-breadcrumb){color:var(--ai-muted)}
html[data-app-theme] body .table{--bs-table-bg:var(--ai-surface);--bs-table-color:var(--ai-text);--bs-table-border-color:var(--ai-line);--bs-table-striped-bg:var(--ai-raised);--bs-table-hover-bg:var(--ai-soft);--bs-table-hover-color:var(--ai-text);color:var(--ai-text)!important}
html[data-app-theme] body :is(.table,.gr-table,.fc-table,.nt-table,.cp-table,.grid-view table) :is(th,td){background:var(--ai-surface)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important}
html[data-app-theme] body :is(.table,.gr-table,.fc-table,.nt-table,.cp-table,.grid-view table) th{background:var(--ai-raised)!important;font-weight:650}
html[data-app-theme] body :is(.table,.gr-table,.fc-table,.nt-table,.cp-table,.grid-view table) tbody tr:hover td{background:var(--ai-raised)!important}
html[data-app-theme] body .btn-primary{--bs-btn-bg:#274acc;--bs-btn-border-color:#274acc;--bs-btn-hover-bg:#203dab;--bs-btn-hover-border-color:#203dab;--bs-btn-color:#fff;background:#274acc!important;color:#fff!important;border-color:#274acc!important}
html[data-app-theme] body :is(.tp-button.primary,.nt-btn-primary,.nt-btn-blue,.cp-btn-primary,.usr-btn-primary){background:#274acc!important;color:#fff!important;border-color:#274acc!important}
html[data-app-theme] body :is(.btn-light,.btn-secondary,.btn-outline-secondary,.tp-button.outline,.nt-btn-light,.nt-btn-secondary,.usr-btn-secondary,.page-link){background:var(--ai-raised)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important}
html[data-app-theme] body :is(.btn-soft-primary,.badge.bg-primary-subtle,.text-bg-primary-subtle){background:var(--ai-soft)!important;color:var(--ai-primary)!important}
html[data-app-theme] body :is(.alert-success,.bg-success-subtle){background:var(--ai-success-bg)!important;color:var(--ai-success)!important}
html[data-app-theme] body :is(.alert-warning,.bg-warning-subtle){background:var(--ai-warning-bg)!important;color:var(--ai-warning)!important}
html[data-app-theme] body :is(.alert-danger,.bg-danger-subtle){background:var(--ai-danger-bg)!important;color:var(--ai-danger)!important}
html[data-app-theme] body :is(.dropdown-item,.select2-selection__rendered,.select2-results__option){color:var(--ai-text)!important}
html[data-app-theme] body :is(.dropdown-item:hover,.dropdown-item.active,.select2-results__option--highlighted){background:var(--ai-soft)!important;color:var(--ai-primary)!important}
html[data-app-theme] body :is(.tp-workspace,.traccar-account){--tp-accent:var(--ai-accent);--tp-ink:var(--ai-text);--tp-muted:var(--ai-muted);--tp-border:var(--ai-line)}
html[data-app-theme] body :is(.tp-options,.tp-option,.tp-select,.tp-settings-nav,.tp-settings-nav nav a,.tp-outline,.tp-attribute-row,.tp-account-dialog,.tp-key-dialog,.tp-dialog){background:var(--ai-surface)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important}
html[data-app-theme] body :is(.tp-option:hover,.tp-settings-nav nav a[aria-current]){background:var(--ai-soft)!important;color:var(--ai-primary)!important}
html[data-app-theme] body :is(.tp-notice,.tp-section-icon){background:var(--ai-soft)!important;color:var(--ai-primary)!important;border-color:var(--ai-line)!important}
html[data-app-theme] body :is(input,button,a,select,textarea):focus-visible{outline:2px solid var(--ai-accent);outline-offset:2px}
/* Oscuro: estructura, navegación y capas de monitoreo. */
html[data-app-theme="dark"] body :is(.neo-main-content,.neo-page-content,.neo-content-shell,.dispositivos-form,.dispositivos-view,.dispositivos-create,.dispositivos-update,.dv-premium-page,.usr-edit-page,.usr-index,.conn-shell,.usr-form,.tp-workspace){background:var(--ai-bg)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important}
html[data-app-theme="dark"] body #layout-wrapper #page-topbar.neo-topbar,
html[data-app-theme="dark"] body #neo-sidebar.neo-sidebar{background:var(--ai-surface)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important}
html[data-app-theme="dark"] body #page-topbar :is(.neo-page-heading h1,.neo-user-meta strong){color:var(--ai-text)!important}
html[data-app-theme="dark"] body #page-topbar :is(.eyebrow,.neo-user-meta small){color:var(--ai-muted)!important}
html[data-app-theme="dark"] body #page-topbar :is(.neo-icon-btn,.neo-menu-trigger,.neo-user-btn,.neo-user-menu-head){background:var(--ai-raised)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important}
html[data-app-theme="dark"] body #page-topbar :is(.neo-avatar,.neo-status-chip){background:var(--ai-soft)!important;color:var(--ai-primary)!important}
html[data-app-theme="dark"] body #neo-sidebar :is(.neo-menu-link,.neo-menu-link i:first-child,.neo-chevron){color:var(--ai-muted)!important}
html[data-app-theme="dark"] body #neo-sidebar :is(.neo-menu-item.active>.neo-menu-link,.neo-menu-link:hover){background:var(--ai-soft)!important;color:var(--ai-primary)!important;border-color:var(--ai-line)!important}
html[data-app-theme="dark"] body #neo-sidebar .neo-nav-arrow{background:var(--ai-raised)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important}
html[data-app-theme="dark"] body #page-topbar :is(.gps-alert-dropdown,.support-notify-dropdown,.gps-alert-toolbar,.gps-alert-footer-actions,.support-notify-foot){background:var(--ai-surface)!important;border-color:var(--ai-line)!important;color:var(--ai-text)!important}
html[data-app-theme="dark"] body #page-topbar :is(.support-notify-copy strong,.gps-alert-empty strong){color:var(--ai-text)!important}
html[data-app-theme="dark"] body #page-topbar :is(.support-notify-copy span,.support-notify-copy time,.gps-alert-empty,.gps-alert-empty span){color:var(--ai-muted)!important}
html[data-app-theme="dark"] body #devicePanel.col-dispositivos,
html[data-app-theme="dark"] body #devicePanel :is(.panel-header,.panel-body,.search-bar,.vehicle-list,.vehicle-item){background:var(--ai-surface)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important;box-shadow:none!important}
html[data-app-theme="dark"] body #devicePanel :is(.vehicle-name,.panel-title-text,.owner-group-text strong){color:var(--ai-text)!important}
html[data-app-theme="dark"] body #devicePanel :is(.vehicle-time,.panel-subtitle,.owner-group-text small,.account-status-counts){color:var(--ai-muted)!important}
html[data-app-theme="dark"] body #devicePanel :is(.search-input,.header,.account-status-header,.owner-group-header,.collapse-toggle,.menu-trigger,.icon-button){background:var(--ai-raised)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important}
html[data-app-theme="dark"] body #devicePanel .vehicle-item.selected{background:var(--ai-soft)!important;border-color:#688bc8!important}
html[data-app-theme="dark"] body #devicePanel :is(.connection-indicator.online,.chip-online){background:var(--ai-success-bg)!important;color:var(--ai-success)!important;border-color:#3d6551!important}
html[data-app-theme="dark"] body #devicePanel :is(.connection-indicator.offline,.chip-offline){background:var(--ai-warning-bg)!important;color:var(--ai-warning)!important;border-color:#6b503b!important}
html[data-app-theme="dark"] body #devicePanel :is(.connection-indicator.unknown,.chip-unknown){background:#3d3928!important;color:#ddd0a0!important;border-color:#686047!important}
html[data-app-theme="dark"] body #devicePanel :is(.pulse-dot,.status-online,.status-offline,.status-unknown){box-shadow:none!important;text-shadow:none!important}
html[data-app-theme="dark"] body :is(.realtime-panel-restore,.realtime-group-filter-toggle,.realtime-group-filter-menu,.mcp-panel,.mcp-layers-panel,.filter-content){background:var(--ai-surface)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important}
html[data-app-theme="dark"] body :is(.mcp-btn,.mcp-layer-item,.filter-title,.filter-section-title,.filter-option,.realtime-group-filter-copy strong,.realtime-group-filter-head strong){color:var(--ai-text)!important}
html[data-app-theme="dark"] body :is(.mcp-btn.mcp-active,.mcp-btn:hover,.mcp-layer-item.mcp-active){background:var(--ai-soft)!important;color:var(--ai-primary)!important}
html[data-app-theme="dark"] body :is(.usr-delete-summary,.usr-delete-warning,.usr-action-dialog,.usr-action-header,.usr-action-loading){background:var(--ai-raised)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important}
html[data-app-theme="dark"] body :is(.text-dark,.text-body,.text-black){color:var(--ai-text)!important}
html[data-app-theme="dark"] body :is(.bg-white,.bg-light){background:var(--ai-surface)!important}
html[data-app-theme="dark"] body .btn-close{filter:invert(1) grayscale(1) brightness(2)}
@media(max-width:575.98px){html[data-app-theme] body #page-topbar .neo-topbar-logo{max-width:110px}html[data-app-theme] body #page-topbar .neo-topbar-inner{padding:0 8px}}

html[data-app-theme]{--cp-bg:var(--ai-bg)!important;--cp-border:var(--ai-line)!important;--cp-cyan:var(--ai-accent)!important;--cp-danger:var(--ai-danger)!important;--cp-ink:var(--ai-text)!important;--cp-ink-2:var(--ai-muted)!important;--cp-ink-3:var(--ai-muted)!important;--cp-line:var(--ai-line)!important;--cp-line-2:var(--ai-line)!important;--cp-primary:var(--ai-primary)!important;--cp-success:var(--ai-success)!important;--cp-surface:var(--ai-surface)!important;--cp-surface-2:var(--ai-raised)!important;--cp-text-muted:var(--ai-muted)!important;--cp-warning:var(--ai-warning)!important;--drv-amber:var(--ai-warning)!important;--drv-bg:var(--ai-bg)!important;--drv-green:var(--ai-success)!important;--drv-ink:var(--ai-text)!important;--drv-ink-2:var(--ai-muted)!important;--drv-line:var(--ai-line)!important;--drv-line-strong:var(--ai-line)!important;--drv-muted:var(--ai-muted)!important;--drv-paper:var(--ai-surface)!important;--drv-paper-2:var(--ai-raised)!important;--drv-red:var(--ai-danger)!important;--dv-bg:var(--ai-bg)!important;--dv-card:var(--ai-surface)!important;--dv-cyan:var(--ai-accent)!important;--dv-danger:var(--ai-danger)!important;--dv-line:var(--ai-line)!important;--dv-line2:var(--ai-line)!important;--dv-muted:var(--ai-muted)!important;--dv-primary:var(--ai-primary)!important;--dv-soft:var(--ai-raised)!important;--dv-success:var(--ai-success)!important;--dv-text:var(--ai-text)!important;--dv-warning:var(--ai-warning)!important;--fc-amber:var(--ai-warning)!important;--fc-bg:var(--ai-bg)!important;--fc-blue:var(--ai-primary)!important;--fc-blue2:var(--ai-accent)!important;--fc-border:var(--ai-line)!important;--fc-card:var(--ai-surface)!important;--fc-cyan:var(--ai-accent)!important;--fc-danger:var(--ai-danger)!important;--fc-green:var(--ai-success)!important;--fc-ink:var(--ai-text)!important;--fc-line:var(--ai-line)!important;--fc-muted:var(--ai-muted)!important;--fc-red:var(--ai-danger)!important;--fc-surface:var(--ai-surface)!important;--fc-teal:var(--ai-accent)!important;--fc-text:var(--ai-text)!important;--fc-white:var(--ai-surface)!important;--gr-bg:var(--ai-bg)!important;--gr-blue:var(--ai-primary)!important;--gr-blue2:var(--ai-accent)!important;--gr-card:var(--ai-surface)!important;--gr-danger:var(--ai-danger)!important;--gr-ink:var(--ai-text)!important;--gr-line:var(--ai-line)!important;--gr-muted:var(--ai-muted)!important;--gr-success:var(--ai-success)!important;--gr-warning:var(--ai-warning)!important;--gzp-amber:var(--ai-warning)!important;--gzp-bg:var(--ai-bg)!important;--gzp-blue:var(--ai-primary)!important;--gzp-card:var(--ai-surface)!important;--gzp-ink:var(--ai-text)!important;--gzp-line:var(--ai-line)!important;--gzp-muted:var(--ai-muted)!important;--gzp-red:var(--ai-danger)!important;--gzp-soft:var(--ai-raised)!important;--gzp-teal:var(--ai-accent)!important;--neo-bg:var(--ai-bg)!important;--neo-cyan:var(--ai-accent)!important;--neo-line:var(--ai-line)!important;--neo-muted:var(--ai-muted)!important;--neo-panel:var(--ai-surface)!important;--neo-text:var(--ai-text)!important;--nt-bg:var(--ai-bg)!important;--nt-blue:var(--ai-primary)!important;--nt-cyan:var(--ai-accent)!important;--nt-danger:var(--ai-danger)!important;--nt-line:var(--ai-line)!important;--nt-muted:var(--ai-muted)!important;--nt-soft:var(--ai-raised)!important;--nt-success:var(--ai-success)!important;--nt-surface:var(--ai-surface)!important;--nt-text:var(--ai-text)!important;--nt-warning:var(--ai-warning)!important;--usr-amber:var(--ai-warning)!important;--usr-bg:var(--ai-bg)!important;--usr-blue:var(--ai-primary)!important;--usr-blue2:var(--ai-accent)!important;--usr-green:var(--ai-success)!important;--usr-ink:var(--ai-text)!important;--usr-line:var(--ai-line)!important;--usr-muted:var(--ai-muted)!important;--usr-red:var(--ai-danger)!important;}
html[data-app-theme] body .tp-workspace :is(.tp-card-heading,.tp-card-heading h2,.tp-heading h1){background:var(--ai-surface)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important}
html[data-app-theme] body .tp-workspace .tp-heading h1{background:transparent!important}
html[data-app-theme] body .tp-workspace :is(.tp-heading p,.tp-card-heading p,.tp-nav-caption,.tp-nav-note){color:var(--ai-muted)!important}
html[data-app-theme] body .tp-workspace :is(.tp-selected,.tp-custom input,.tp-custom button,.tp-link,.tp-collapse-toggle,.tp-section-toggle,.tp-button.outline){background:var(--ai-surface)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important}
html[data-app-theme="dark"] body :is(h1,h2,h3,h4,h5,h6){color:var(--ai-text)}
html[data-app-theme="dark"] body :is(.usr-action-modal,.usr-action-modal>header,.usr-action-modal>p,.usr-table-wrap,.usr-toolbar,.conn-tabs,.conn-pane,.settings-advanced-row,.select2-search__field){background:var(--ai-surface)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important}
html[data-app-theme="dark"] body :is(.usr-link,.usr-search,.usr-field input,.usr-field select,.usr-field textarea,.conn-search,.conn-input){background:var(--ai-raised)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important}
html[data-app-theme="dark"] body :is(.usr-pill.ok,.badge.bg-success-subtle){background:var(--ai-success-bg)!important;color:var(--ai-success)!important}
html[data-app-theme="dark"] body :is(.usr-pill.off,.usr-link.usr-delete){background:var(--ai-danger-bg)!important;color:var(--ai-danger)!important}
html[data-app-theme="dark"] body :is(.usr-pill.neutral,.usr-owner-chip){background:var(--ai-raised)!important;color:var(--ai-muted)!important}

html[data-app-theme="dark"] body :is(.appinnova-history-loading-card,.change-card,.chart-card,.company-card,.company-card-body,.company-card-head,.conn-card,.cp-card,.cp-card-body,.cp-card-header,.cp-kpi,.cp-surface,.cp-table-wrap,.device-card,.device-card-body,.device-card-header,.device-connection-card,.device-select-card,.drv-card,.drv-card-body,.drv-card-head,.dt-card,.dt-card-body,.dt-card-head,.dv9-gallery-panel,.dv9-panel,.fc-card,.fc-card-body,.fc-card-head,.fc-kpi,.fc-rail-card,.fc-table-wrap,.fc-toolbar,.gp-chart-card,.gp-detail-tab-panel,.gp-history-panel,.gp-history-toolbar,.gp-table-wrap,.gps-alert-toolbar,.gps-history-playback-popup-card,.gps-history-popup-card,.gr-card,.gr-card-body,.gr-card-head,.gr-computed-card,.gr-kpi,.gr-table-wrap,.gr-toolbar,.gz-toolbar,.gzp-card,.gzp-card-body,.gzp-card-head,.horizontal-panel,.info-card,.layer-card,.location-picker-panel,.main-panel,.map-card,.mt-card,.nn-card,.nn-card-body,.nn-card-head,.nn-loading-card,.nt-card,.nt-card-body,.nt-card-head,.nt-kpi,.nt-table-wrap,.rb-card,.rb-user-table-wrap,.recovery-card,.rp-card,.rp-card-head,.rp-kpi,.rp-table-wrap,.rp-toolbar,.rr-card,.rt-card,.settings-card,.settings-card-body,.settings-card-head,.stat-card,.table-card,.traccar-form-card,.traccar-panel,.traccar-preview-card,.traccar-soft-card,.traccar-stat-card,.traccar-status-card,.traccar-table-card,.up-toolbar,.usr-card,.usr-card-head,.usr-form-body,.usr-form-card,.usr-kpi,.usr-table-wrap,.usr-toolbar,.uv-card){background:var(--ai-surface)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important}

html[data-app-theme="dark"] body :is(.appinnova-history-loading-title,.card-title,.change-title,.conn-title,.control-label,.controls-title,.cp-surface-title,.cp-title,.cp-tl-title,.cp-widget-title,.datetime-label,.device-connection-label,.device-connection-title,.device-name,.device-select-label,.device-title,.driver-compact-label,.driver-name,.dt-card-title,.dt-driver-name,.dt-title,.dt-traccar-name,.dt-traccar-value,.dv9-attr-name,.dv9-attr-value,.dv9-panel-title,.dv9-rel-name,.dv9-spec-label,.dv9-spec-value,.dv9-summary-label,.dv9-summary-value,.dv9-temp-value,.dv9-title,.fc-analytics-title,.fc-card-title,.fc-kpi-label,.fc-kpi-value,.fc-mini-label,.fc-section-label,.fc-title,.field-label,.field-value,.form-label,.geozone-name,.gp-chart-title,.gp-history-metric-label,.gp-history-metric-value,.gp-location-value,.gp-sel-name,.gps-history-field-label,.gps-history-field-value,.gps-history-label,.gps-history-playback-popup-name,.gps-history-popup-label,.gps-history-popup-value,.gps-history-title,.gr-attribute-value,.gr-card-title,.gr-device-name,.gr-name,.gr-picker-label,.gr-section-title,.gr-title,.gz-dialog-title,.gz-label,.gz-modal-title,.gzp-stat-label,.gzp-stat-value,.header-title,.history-range-title,.info-label,.info-value,.layer-label,.layer-name,.legend-title,.maintenance-label,.maintenance-value,.map-title,.metric-label,.metric-value,.modal-title,.mt-name,.mt-title,.neo-brand-name,.neo-dropdown-label,.nn-card-title,.nn-loading-title,.nn-stat-label,.nn-stat-value,.nn-title,.no-results-title,.nt-card-title,.nt-field-label,.nt-field-value,.nt-kpi-label,.nt-kpi-value,.nt-name,.nt-section-title,.nt-title,.panel-title,.popup-title,.rb-title,.rb-user-name,.recovery-title,.report-label,.rp-rank-name,.rp-section-title,.rp-title,.rt-name,.rt-title,.section-title,.sensor-editor-title,.settings-title,.sidebar-title,.slider-value,.stat-label,.stat-value,.status-label,.status-value,.time-value,.traccar-section-title,.up-section-title,.up-user-name,.usr-card-title,.usr-title,.vehicle-name){color:var(--ai-text)!important}

html[data-app-theme="dark"] body :is(.cp-hint,.cp-muted,.cp-tl-sub,.dt-subtitle,.dv9-subtitle,.fc-analytics-sub,.fc-muted,.fc-subtitle,.gr-picker-hint,.gr-subtitle,.map-subtitle,.nn-loading-sub,.nn-subtitle,.nt-card-sub,.nt-section-sub,.panel-subtitle,.sidebar-subtitle,.text-muted,.usr-subtitle){color:var(--ai-muted)!important}
html[data-app-theme] body :is(.dv-hero,.gr-command,.fc-command,.cp-hero,.drv-hero,.gzp-hero,.notif-hero,.settings-command,.usr-hero,.usr-form-head,.conn-head) :is(h1,h2,h3,p,[class$="-title"],[class$="-subtitle"]){color:#fff!important}
html[data-app-theme] body .usr-command{background:linear-gradient(115deg,#203aa4,#187f9e)!important;color:#fff}
html[data-app-theme] body .usr-command :is(.usr-title,.usr-subtitle){color:#fff!important}
html[data-app-theme="dark"] body .usr-shell{background:var(--ai-bg)!important;border-color:var(--ai-line)!important;color:var(--ai-text)!important}
html[data-app-theme="dark"] body table :is(th,td){background:var(--ai-surface)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important}
html[data-app-theme="dark"] body table th{background:var(--ai-raised)!important}
html[data-app-theme="dark"] body table strong{color:var(--ai-text)!important}
html[data-app-theme="dark"] body :is(.usr-search input,.usr-filter){background:var(--ai-raised)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important}
html[data-app-theme="dark"] body :is(.usr-kpi,.gr-kpi,.fc-kpi,.nt-kpi,.cp-kpi) :is(strong,span,small){color:var(--ai-text)!important}
html[data-app-theme="dark"] body :is(.usr-count,.usr-kpi-icon,.gr-kpi-icon,.nt-kpi-icon){background:var(--ai-soft)!important;color:var(--ai-primary)!important;border-color:var(--ai-line)!important}

html[data-app-theme] body :is(.usr-shell,.cp-shell,.nt-shell,.drv-shell,.gzp-shell,.gr-shell,.fc-shell,.settings-shell,.conn-shell){--cp-bg:var(--ai-bg)!important;--cp-border:var(--ai-line)!important;--cp-cyan:var(--ai-accent)!important;--cp-danger:var(--ai-danger)!important;--cp-ink:var(--ai-text)!important;--cp-ink-2:var(--ai-muted)!important;--cp-ink-3:var(--ai-muted)!important;--cp-line:var(--ai-line)!important;--cp-line-2:var(--ai-line)!important;--cp-primary:var(--ai-primary)!important;--cp-success:var(--ai-success)!important;--cp-surface:var(--ai-surface)!important;--cp-surface-2:var(--ai-raised)!important;--cp-text-muted:var(--ai-muted)!important;--cp-warning:var(--ai-warning)!important;--drv-amber:var(--ai-warning)!important;--drv-bg:var(--ai-bg)!important;--drv-green:var(--ai-success)!important;--drv-ink:var(--ai-text)!important;--drv-ink-2:var(--ai-muted)!important;--drv-line:var(--ai-line)!important;--drv-line-strong:var(--ai-line)!important;--drv-muted:var(--ai-muted)!important;--drv-paper:var(--ai-surface)!important;--drv-paper-2:var(--ai-raised)!important;--drv-red:var(--ai-danger)!important;--dv-bg:var(--ai-bg)!important;--dv-card:var(--ai-surface)!important;--dv-cyan:var(--ai-accent)!important;--dv-danger:var(--ai-danger)!important;--dv-line:var(--ai-line)!important;--dv-line2:var(--ai-line)!important;--dv-muted:var(--ai-muted)!important;--dv-primary:var(--ai-primary)!important;--dv-soft:var(--ai-raised)!important;--dv-success:var(--ai-success)!important;--dv-text:var(--ai-text)!important;--dv-warning:var(--ai-warning)!important;--fc-amber:var(--ai-warning)!important;--fc-bg:var(--ai-bg)!important;--fc-blue:var(--ai-primary)!important;--fc-blue2:var(--ai-accent)!important;--fc-border:var(--ai-line)!important;--fc-card:var(--ai-surface)!important;--fc-cyan:var(--ai-accent)!important;--fc-danger:var(--ai-danger)!important;--fc-green:var(--ai-success)!important;--fc-ink:var(--ai-text)!important;--fc-line:var(--ai-line)!important;--fc-muted:var(--ai-muted)!important;--fc-red:var(--ai-danger)!important;--fc-surface:var(--ai-surface)!important;--fc-teal:var(--ai-accent)!important;--fc-text:var(--ai-text)!important;--fc-white:var(--ai-surface)!important;--gr-bg:var(--ai-bg)!important;--gr-blue:var(--ai-primary)!important;--gr-blue2:var(--ai-accent)!important;--gr-card:var(--ai-surface)!important;--gr-danger:var(--ai-danger)!important;--gr-ink:var(--ai-text)!important;--gr-line:var(--ai-line)!important;--gr-muted:var(--ai-muted)!important;--gr-success:var(--ai-success)!important;--gr-warning:var(--ai-warning)!important;--gzp-amber:var(--ai-warning)!important;--gzp-bg:var(--ai-bg)!important;--gzp-blue:var(--ai-primary)!important;--gzp-card:var(--ai-surface)!important;--gzp-ink:var(--ai-text)!important;--gzp-line:var(--ai-line)!important;--gzp-muted:var(--ai-muted)!important;--gzp-red:var(--ai-danger)!important;--gzp-soft:var(--ai-raised)!important;--gzp-teal:var(--ai-accent)!important;--neo-bg:var(--ai-bg)!important;--neo-cyan:var(--ai-accent)!important;--neo-line:var(--ai-line)!important;--neo-muted:var(--ai-muted)!important;--neo-panel:var(--ai-surface)!important;--neo-text:var(--ai-text)!important;--nt-bg:var(--ai-bg)!important;--nt-blue:var(--ai-primary)!important;--nt-cyan:var(--ai-accent)!important;--nt-danger:var(--ai-danger)!important;--nt-line:var(--ai-line)!important;--nt-muted:var(--ai-muted)!important;--nt-soft:var(--ai-raised)!important;--nt-success:var(--ai-success)!important;--nt-surface:var(--ai-surface)!important;--nt-text:var(--ai-text)!important;--nt-warning:var(--ai-warning)!important;--usr-amber:var(--ai-warning)!important;--usr-bg:var(--ai-bg)!important;--usr-blue:var(--ai-primary)!important;--usr-blue2:var(--ai-accent)!important;--usr-green:var(--ai-success)!important;--usr-ink:var(--ai-text)!important;--usr-line:var(--ai-line)!important;--usr-muted:var(--ai-muted)!important;--usr-red:var(--ai-danger)!important;}
html[data-app-theme="dark"] body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),select,textarea){background-color:var(--ai-raised)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important}
html[data-app-theme="dark"] body :is(label,.control-label,.help-block,.hint-block){color:var(--ai-muted)!important}
html[data-app-theme="dark"] body .tp-workspace .tp-nav-note :is(strong,span){color:var(--ai-muted)!important}
html[data-app-theme="dark"] body #devicePanel :is(.status-online,.ignition-on){color:#abd6bc!important;text-shadow:none!important}
html[data-app-theme="dark"] body #devicePanel .status-offline{color:#efc3a0!important;text-shadow:none!important}
html[data-app-theme="dark"] body #devicePanel .status-unknown{color:#ddd0a0!important;text-shadow:none!important}
html[data-app-theme="dark"] body #devicePanel .vehicle-speed{color:#a9d7cf!important}
html[data-app-theme="dark"] body #devicePanel .vehicle-icon{background:#223e34!important;color:#abd6bc!important}
html[data-app-theme="dark"] body #devicePanel .vehicle-icon-offline{background:#453326!important;color:#efc3a0!important}
html[data-app-theme="dark"] body #devicePanel .vehicle-icon-unknown{background:#3d3928!important;color:#ddd0a0!important}
html[data-app-theme="dark"] body #gps-monitor-health{color:var(--ai-muted)!important}
html[data-app-theme="dark"] body .usr-kpi.green .usr-kpi-icon{background:var(--ai-success-bg)!important;color:var(--ai-success)!important}
html[data-app-theme="dark"] body .usr-kpi.red .usr-kpi-icon{background:var(--ai-danger-bg)!important;color:var(--ai-danger)!important}
html[data-app-theme="dark"] body .usr-kpi.amber .usr-kpi-icon{background:var(--ai-warning-bg)!important;color:var(--ai-warning)!important}

html[data-app-theme="dark"] body :is(.change-shell,.conn-shell,.content-wrapper,.device-detail-panel-page,.drv-page,.dt-shell,.dv-premium-page,.dv9-page,.fc-toolbar,.fleet-shell,.gp-chart-head,.gp-global-loader__card,.gp-history-chart-shell,.gp-history-toolbar,.gps-alert-toolbar,.gr-shell,.gr-toolbar,.gz-toolbar,.gzp-page,.kv-grid-wrapper,.layout-wrapper,.leaflet-popup-content-wrapper,.mt-shell,.neo-content-shell,.neo-horizontal-shell,.nn-shell,.notif-shell,.nt-shell,.page-wrapper,.rbac-scroll-page,.recovery-shell,.rp-page,.rp-report-page,.rp-toolbar,.rt-shell,.settings-shell,.traccar-page,.up-toolbar,.usr-edit-page,.usr-shell,.usr-toolbar,.uv-page){background:var(--ai-bg)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important}
html[data-app-theme="dark"] body :is(.gp-global-loader__title,.gp-global-loader__text){color:var(--ai-text)!important}
html[data-app-theme="dark"] body .gp-global-loader__card{background:var(--ai-surface)!important}
html[data-app-theme]{background:var(--ai-bg)!important}
html[data-app-theme="dark"] body :is(.conn-summary,.conn-body,.conn-list,.conn-mini,.conn-note,.conn-count,.usr-action-modal iframe,.usr-action-modal header button,.usr-delete-counts>div){background:var(--ai-raised)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important}
html[data-app-theme="dark"] body :is(.conn-note strong,.conn-note i,.conn-item span,.conn-selected,.conn-loading,.conn-empty,.usr-delete-counts span){color:var(--ai-muted)!important}
html[data-app-theme="dark"] body .conn-icon{background:var(--ai-soft)!important;color:var(--ai-primary)!important}
html[data-app-theme] body .conn-save{background:#274acc!important;color:#fff!important}
html[data-app-theme="dark"] body .conn-item:hover{background:var(--ai-soft)!important}
html[data-app-theme="dark"] body :is(.gr-icon-btn,.nt-icon-btn,.gzp-icon-btn,.gr-kpi-icon,.fc-kpi-icon,.cp-kpi-icon,.gr-count,.nt-count,.fc-count,.gr-id,.gr-icon,.gr-badge,.fc-badge){background:var(--ai-soft)!important;color:var(--ai-primary)!important;border-color:var(--ai-line)!important}
html[data-app-theme="dark"] body :is(.btn-outline-primary,.btn-outline-info){color:var(--ai-primary)!important;border-color:#688bc8!important}
html[data-app-theme="dark"] body :is(.card,.tp-card,.conn-card,.usr-card,.gr-card,.fc-card,.nt-card){box-shadow:0 8px 24px rgba(0,0,0,.12)!important}
/* Legacy report tokens and inline helper text share the application palette. */
html[data-app-theme="dark"][data-bs-theme="dark"] body [class$="-hero-icon"],
html[data-app-theme="dark"][data-bs-theme="dark"] body [class$="-hero-icon"] i {color:#e5edf8!important;}
html[data-app-theme="dark"][data-bs-theme="dark"] body .tp-workspace .tp-card-heading h2,
html[data-app-theme="dark"][data-bs-theme="dark"] body .tp-workspace .tp-heading h1 {background:transparent!important;}
html[data-app-theme="dark"][data-bs-theme="dark"] body .tp-workspace .tp-checks input[type="checkbox"]:checked {background:#168a9a!important;border-color:#71d1db!important;}
html[data-app-theme="dark"][data-bs-theme="dark"] body .tp-workspace .tp-checks input[type="checkbox"]::before {background:#e5edf8!important;}
html[data-app-theme="dark"][data-bs-theme="dark"] body :is(.map-control-container,.map-control-button,.mapboxgl-ctrl-group,.mapboxgl-ctrl-group button,.leaflet-control-zoom a) {background:var(--ai-surface)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important;}
html[data-app-theme="dark"][data-bs-theme="dark"] body .mapboxgl-ctrl-icon {filter:invert(1);}
html[data-app-theme="dark"][data-bs-theme="dark"] {
  --rp-text:var(--ai-text)!important;
  --rp-muted:var(--ai-muted)!important;
  --rp-border:var(--ai-line)!important;
  --rp-bg:var(--ai-bg)!important;
  --rp-card:var(--ai-surface)!important;
}
html[data-app-theme="dark"][data-bs-theme="dark"] body .report-command-center .rp-section > div[style] {color:var(--ai-muted)!important;}
html[data-app-theme="dark"][data-bs-theme="dark"] body .report-command-center .rp-head p {color:#e5edf8!important;opacity:1!important;}
html[data-app-theme="dark"][data-bs-theme="dark"] body .fc-live-dot {background:#71d1db!important;box-shadow:0 0 0 4px rgba(113,209,219,.12)!important;}
/* Widget inputs and SVG controls use the same palette in pages and modals. */
html[data-app-theme="dark"][data-bs-theme="dark"] body .fc-btn:not(.primary):not(.danger) {color:var(--ai-text)!important;}
html[data-app-theme="dark"][data-bs-theme="dark"] body .fc-kpi :is(b,strong) {color:var(--ai-text)!important;}
html[data-app-theme] body .taller-brand img {width:128px;height:44px;object-fit:contain;}
html[data-app-theme][data-bs-theme] body .rp-hero h1,
html[data-app-theme][data-bs-theme] body .report-command-center .rp-head :is(h1,p) {color:#e5edf8!important;opacity:1!important;}
html[data-app-theme="dark"][data-bs-theme="dark"] body .drawing-controls,
html[data-app-theme="dark"][data-bs-theme="dark"] body .drawing-controls button {background:var(--ai-surface)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important;}
html[data-app-theme="dark"][data-bs-theme="dark"] {--surface-elevated:var(--ai-raised)!important;--surface-glass:var(--ai-surface)!important;--surface-hover:var(--ai-raised)!important;}
html[data-app-theme="dark"][data-bs-theme="dark"] {--fc-good:var(--ai-success)!important;--fc-warn:var(--ai-warning)!important;}
html[data-app-theme="dark"][data-bs-theme="dark"] body :is(.dropdownmap-content,.layer-options,.layer-option,.layer-popover-foot) {background:var(--ai-surface)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important;}
html[data-app-theme="dark"][data-bs-theme="dark"] body :is(.layer-option strong,.layer-option-title) {color:var(--ai-text)!important;}
html[data-app-theme="dark"][data-bs-theme="dark"] body :is(.layer-option small,.layer-option-desc,.layer-popover-foot) {color:var(--ai-muted)!important;}
html[data-app-theme] body .map-control-button .geo-control-icon {display:block;width:22px;height:22px;flex:0 0 22px;color:var(--ai-text);opacity:1;visibility:visible;}
html[data-app-theme] body .map-control-button {color:var(--ai-text)!important;}
html[data-app-theme="dark"][data-bs-theme="dark"] body input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]):not([type="color"]),
html[data-app-theme="dark"][data-bs-theme="dark"] body textarea,
html[data-app-theme="dark"][data-bs-theme="dark"] body select {background-color:var(--ai-raised)!important;color:var(--ai-text)!important;border-color:var(--ai-line)!important;}
html[data-app-theme="dark"] body input::placeholder,
html[data-app-theme="dark"] body textarea::placeholder {color:var(--ai-muted)!important;opacity:1;}
