/* Operational pages. Loaded after their existing styles; no dark-mode rules.
   Explicit component scopes also cover overlays mounted directly under body.
   Important declarations replace legacy inline/important dark colors only. */

/* Driver home: week calendar, completed entries, navigation and mobile panels. */
html[data-theme="light"] .theme-operations-driver :is(.driver-welcome, .driver-day-plan, .stat-card, .entries-section, .driver-plan-card, .entry-row) {
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
  box-shadow: 0 3px 12px rgb(23 43 70 / 6%);
}
html[data-theme="light"] .theme-operations-driver :is(.driver-day-plan-head, .driver-week-overview, .driver-selected-day-head, .driver-week-days, .driver-day-plan-list, .driver-week-plan-list, .entries-header) {
  background: var(--theme-surface-alt) !important;
  border-color: var(--theme-border) !important;
}
html[data-theme="light"] .theme-operations-driver :is(.driver-welcome-text h2, .driver-welcome-date, .driver-day-plan-title h3, .driver-plan-client, .driver-week-day-date, .driver-selected-day-title, .stat-value, .entries-header h3, .entry-row-client) { color: var(--theme-text) !important; }
html[data-theme="light"] .theme-operations-driver :is(.driver-welcome-text p, .driver-day-plan-title p, .driver-plan-meta, .driver-week-label, .driver-week-day-name, .stat-label, .entry-row-meta, .no-entries-msg, .no-entries-msg i, .driver-selected-day-empty, .driver-plan-empty) { color: var(--theme-muted) !important; }
html[data-theme="light"] .theme-operations-driver :is(.driver-welcome-time, .driver-selected-day-kicker, .date-group-header, .driver-plan-meta i, .driver-plan-empty i, .driver-day-plan-title > i, .mobile-panel-toggle span i, .mobile-panel-toggle .toggle-chevron) { color: var(--theme-accent) !important; }
html[data-theme="light"] .theme-operations-driver :is(.driver-week-day-summary, .driver-plan-nav-btn, .driver-plan-action, .quick-btn, .period-pill, .mobile-panel-toggle) {
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
}
html[data-theme="light"] .theme-operations-driver :is(.driver-plan-action i, .quick-btn i) { color: inherit !important; }
html[data-theme="light"] .theme-operations-driver :is(.driver-week-day-summary:hover, .driver-plan-card:hover, .entry-row:hover, .driver-plan-nav-btn:hover, .quick-btn:hover, .driver-plan-action:hover, .period-pill:hover) { background: var(--theme-surface-alt) !important; border-color: var(--theme-accent) !important; }
html[data-theme="light"] .theme-operations-driver :is(.driver-plan-action.primary, .quick-btn.primary) { background: var(--theme-primary) !important; color: #fff !important; border-color: var(--theme-primary) !important; }
html[data-theme="light"] .theme-operations-driver :is(.driver-plan-order, .entry-empty-badge, .stat-icon.today, .entry-row-icon.empty-icon, .period-pill.active) { background: #fff4d9 !important; color: var(--theme-accent) !important; border-color: var(--theme-accent) !important; }
html[data-theme="light"] .theme-operations-driver :is(.driver-day-plan-count, .driver-week-day-total, .driver-plan-today, .driver-week-day-summary.is-selected, .stat-icon.week) { background: #e5f4ec !important; color: var(--theme-success) !important; border-color: var(--theme-success) !important; }
html[data-theme="light"] .theme-operations-driver :is(.driver-plan-time, .driver-selected-day-count, .driver-week-day-summary.is-selected .driver-week-day-name) { color: var(--theme-success) !important; border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations-driver .driver-week-day-summary.is-today { border-color: var(--theme-accent) !important; }
html[data-theme="light"] .theme-operations-driver .driver-week-day-total.is-empty { background: var(--theme-surface-alt) !important; color: var(--theme-muted) !important; }
html[data-theme="light"] .theme-operations-driver :is(.stat-icon.action, .entry-row-icon.loaded-icon) { background: #e5effb !important; color: var(--theme-info) !important; }

/* Scheduler cards, desktop/day/mobile grids and the intake panel. */
html[data-theme="light"] .theme-operations-scheduler :is(#sch-toolbar, #container, #scheduler, .sch-grid, .sch-card, .sch-navigator-card, .sch-email-inbox, .sch-planning-panel, .sch-grid-filter, .sch-intake-card, .sch-mobile-card, .sch-mobile-driver-header, .sch-plan-detail) {
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
  box-shadow: 0 3px 12px rgb(23 43 70 / 6%);
}
html[data-theme="light"] .theme-operations-scheduler #container { background: transparent !important; }
html[data-theme="light"] .theme-operations-scheduler :is(#sch-toolbar, #scheduler) { background: var(--theme-surface-alt) !important; }
html[data-theme="light"] .theme-operations-scheduler :is(.sch-grid th, .sch-grid td, .sch-grid thead th, .sch-grid-period, .sch-grid td.sch-grid-cell, .sch-day-header, .sch-filter-section, .sch-quick-stats, .sch-email-inbox-head, .sch-email-inbox-footer, .sch-planning-panel-head, .sch-grid-filter-actions, .sch-mobile-drivers, .sch-mobile-period-header) {
  background: var(--theme-surface-alt) !important;
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
}
html[data-theme="light"] .theme-operations-scheduler :is(.sch-grid td.sch-grid-cell, #event-list) { background: var(--theme-surface) !important; }
html[data-theme="light"] .theme-operations-scheduler .sch-filter-title { background: var(--theme-surface-alt) !important; border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations-scheduler .sch-loading { background: rgb(243 246 250 / 90%) !important; }
html[data-theme="light"] .theme-operations-scheduler :is(.sch-grid td.sch-grid-cell:hover, .sch-filter-item:hover, .sch-stat-row:hover, #event-list li:hover, .sch-intake-card.can-plan:hover) { background: #f8f3e8 !important; }
html[data-theme="light"] .theme-operations-scheduler :is(.sch-card-client, .sch-intake-client, .sch-mobile-driver-name, .sch-plan-detail, .sch-filter-name, .sch-email-inbox h2, .sch-planning-panel-head h2, .event-item-client, .sch-intake-empty strong, .sch-stat-value) { color: var(--theme-text) !important; }
html[data-theme="light"] .theme-operations-scheduler :is(.sch-filter-plate, .sch-stat-label, .sch-card-billing, .sch-card-time, .sch-card-tap-hint, .sch-cell-empty, .sch-loading, .sch-intake-meta, .sch-intake-empty, .sch-email-inbox-hint, .sch-email-inbox-footer span, .sch-planning-panel-hint, .sch-email-import-copy small, .sch-grid-filter-summary, .sch-mobile-driver-plate, .sch-mobile-driver-total, .sch-mobile-period-time, .sch-mobile-empty, .event-item-billing, .event-item-driver, .event-item-time, #event-list .event-empty, .service-modal-meta, .sch-plan-intro, .sch-plan-detail span) { color: var(--theme-muted) !important; }
html[data-theme="light"] .theme-operations-scheduler :is(.sch-date-label, .sch-filter-title, .sch-search-icon, .sch-card-icon, .sch-email-inbox-kicker, .sch-email-inbox h2 i, .sch-intake-container, .sch-intake-meta i, .sch-planning-panel-kicker, .sch-planning-panel-head h2 i, .sch-planning-panel-hint i, .sch-planning-panel-hint a, .sch-grid-filter summary i, .event-list-title, .sch-email-import-copy strong) { color: var(--theme-accent) !important; }
html[data-theme="light"] .theme-operations-scheduler :is(.sch-view-toggle, .sch-view-btn, .sch-icon-btn, .sch-today-btn, .sch-filter-toggle-btn, .sch-stats-badge, .sch-email-filter, .sch-intake-edit-btn, .sch-grid-filter summary, .left-panel-toggle, .sch-mobile-driver-pill, .sch-intake-plan-btn, .scheduler-nav-btn) {
  background: var(--theme-surface-alt) !important;
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
}
html[data-theme="light"] .theme-operations-scheduler :is(.sch-view-btn.active, .sch-email-filter.is-active, .sch-planning-panel .sch-email-filter.is-active, .sch-mobile-driver-pill.active, .left-panel-toggle--active, .sch-intake-plan-btn:hover, .sch-intake-edit-btn:hover) { background: #fff0cd !important; color: var(--theme-accent) !important; border-color: var(--theme-accent) !important; }
html[data-theme="light"] .theme-operations-scheduler :is(.sch-email-filter span, .sch-email-filter b, .sch-cell-count, .sch-pill-count, #event-count-badge, .nav-badge, .sch-email-inbox-total) { background: #e4ebf3 !important; color: var(--theme-text) !important; }
html[data-theme="light"] .theme-operations-scheduler :is(.sch-email-import, .sch-intake-publish, .service-modal-confirm, .modal_default button[type="submit"]) { background: var(--theme-primary) !important; color: #fff !important; border-color: var(--theme-primary) !important; }
html[data-theme="light"] .theme-operations-scheduler .sch-planning-panel .sch-email-import :is(strong, small) { color: #fff !important; }
html[data-theme="light"] .theme-operations-scheduler :is(.sch-email-extension-status, .sch-intake-state, .sch-intake-assignment) { background: #edf2f7 !important; color: var(--theme-muted) !important; border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations-scheduler :is(.sch-stat-value--green, .sch-email-extension-status.is-ready, .is-published .sch-intake-state) { background: #e5f4ec !important; color: var(--theme-success) !important; border-color: #9bcbb3 !important; }
html[data-theme="light"] .theme-operations-scheduler .is-scheduled .sch-intake-state { background: #e5effb !important; color: var(--theme-info) !important; }
html[data-theme="light"] .theme-operations-scheduler :is(.sch-intake-warning, .sch-email-extension-status.is-error) { background: #fff1e0 !important; color: var(--theme-warning) !important; border-color: #d8bd86 !important; }
html[data-theme="light"] .theme-operations-scheduler .sch-grid-cell.is-drop-target { background: #e5f4ec !important; outline-color: var(--theme-success) !important; }
html[data-theme="light"] .theme-operations-scheduler #event-list li { background: var(--theme-surface) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; }

/* DayPilot widget internals: neutral structural cells, colored service events. */
html[data-theme="light"] .theme-operations-scheduler .calendar_green_main {
  --color-header-background: #eef2f7;
  --color-header-text: #172b46;
  --color-cell-background-business: #fff;
  --color-cell-background-nonbusiness: #f3f6fa;
  --color-shadow: rgb(23 43 70 / 8%);
  background: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
}
html[data-theme="light"] .theme-operations-scheduler .calendar_green_main :is(div, td, tr, table) { background-color: var(--theme-surface); border-color: var(--theme-border); }
html[data-theme="light"] .theme-operations-scheduler :is(.calendar_green_cornerright_inner, .calendar_green_rowheader_inner, .calendar_green_corner_inner, .calendar_green_colheader_inner, .calendar_green_alldayheader_inner) { background: var(--theme-surface-alt) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations-scheduler .calendar_green_cell_inner { border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations-scheduler .calendar_green_cell_business:hover .calendar_green_cell_inner { background: #f8f1e0 !important; }
html[data-theme="light"] .theme-operations-scheduler :is(.calendar_green_event_inner, .calendar_green_alldayevent_inner) { background: #fff0cd !important; color: #604610 !important; }
html[data-theme="light"] .theme-operations-scheduler .calendar_green_event_inner :is(div, i, span, strong, p) { background: transparent !important; color: inherit !important; }
html[data-theme="light"] .theme-operations-scheduler .calendar_green_event.svc-green .calendar_green_event_inner { background: #dff1e6 !important; color: #145337 !important; }
html[data-theme="light"] .theme-operations-scheduler .calendar_green_event.svc-yellow .calendar_green_event_inner { background: #fff0cd !important; color: #604610 !important; }
html[data-theme="light"] .theme-operations-scheduler :is(.calendar_green_message, .calendar_green_loading) { background: var(--theme-surface-alt) !important; color: var(--theme-text) !important; text-shadow: none; }
html[data-theme="light"] .theme-operations-scheduler :is(.calendar_green_scroll_up, .calendar_green_scroll_down) { background-color: var(--theme-surface-alt) !important; }
html[data-theme="light"] .theme-operations-scheduler .calendar_green_now { background: var(--theme-danger) !important; }
html[data-theme="light"] .theme-operations-scheduler .calendar_green_now::before { border-left-color: var(--theme-danger); }
html[data-theme="light"] .theme-operations-scheduler :is(.calendar_green_shadow_top, .calendar_green_shadow_bottom) { background: #e5effb !important; border-color: var(--theme-info) !important; }
html[data-theme="light"] .theme-operations-scheduler :is(#navigator, .navigator_default_main) { background: var(--theme-surface) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations-scheduler #navigator :is(div, table, td, th, tr) { background-color: var(--theme-surface) !important; color: var(--theme-text) !important; }
html[data-theme="light"] .theme-operations-scheduler #navigator :is(.navigator_default_title, .navigator_default_titleleft, .navigator_default_titleright, .navigator_default_dayheader, .navigator_default_weekend) { background: var(--theme-surface-alt) !important; color: var(--theme-text) !important; }
html[data-theme="light"] .theme-operations-scheduler #navigator .navigator_default_dayother { color: var(--theme-muted) !important; }
html[data-theme="light"] .theme-operations-scheduler #navigator :is(.navigator_default_select, .navigator_default_select .navigator_default_day) { background: #fff0cd !important; color: var(--theme-accent) !important; }
html[data-theme="light"] .theme-operations-scheduler #navigator .navigator_default_todaybox { border-color: var(--theme-accent) !important; }
html[data-theme="light"] .theme-operations-scheduler #navigator :is(.navigator_default_day:hover, .navigator_default_cell:hover) { background: #e5effb !important; }

/* Scheduler prediction charts use their existing semantic tokens. */
html[data-theme="light"] .theme-operations-scheduler #view-predictions {
  --theme-prediction-purple: #7252a0; --theme-prediction-orange: #9a4a15;
  --gold: #84611f; --gold-dim: #84611f; --gold-40: #c9ad71; --gold-20: #eddfbd; --gold-12: #f5eddb; --gold-06: #fbf8f1;
  --navy: var(--theme-workspace); --card-bg: var(--theme-surface); --card-bg-2: var(--theme-panel); --card-inner: var(--theme-surface-alt);
  --border: #cdd7e3; --border-hi: #9cacc0; --text: #172b46; --text-dim: #53657c; --text-muted: #53657c;
  --green: #166747; --green-dim: #e5f4ec; --amber: #875b10; --amber-dim: #fff0cd;
  --red: #b42332; --red-dim: #fdecef; --blue: #245fa5; --blue-dim: #e5effb;
  --purple: #7252a0; --purple-dim: #efe9f7; --orange: #9a4a15; --orange-dim: #fff0e5; --slate: #53657c;
}
html[data-theme="light"] .theme-operations-scheduler :is(.pred-hero, .pred-chart-card, .pred-rev-card, .pred-breakdown, .pred-driver-card, .pred-table-wrap, .pred-section--patterns, .pred-accuracy, .dp-card) { background: var(--theme-surface) !important; border-color: var(--theme-border) !important; box-shadow: 0 3px 12px rgb(23 43 70 / 6%); }
html[data-theme="light"] .theme-operations-scheduler :is(.pred-ring-track, .pred-ring-track--lg) { stroke: #dce5ee !important; }
html[data-theme="light"] .theme-operations-scheduler :is(.pred-driver-bar, .dp-progress-track, .pred-acc-conf-bar) { background: #e1e8f0 !important; }
html[data-theme="light"] .theme-operations-scheduler :is(.pred-table td, .pred-detail-row td, .pred-acc-stat, .pred-hkpi, .pred-insight) { border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations-scheduler :is(.pred-table tbody tr:nth-child(4n+3), .pred-detail-row td, .pred-acc-stat, .pred-hkpi, .pred-insight) { background: var(--theme-surface-alt) !important; }
html[data-theme="light"] .theme-operations-scheduler :is(.pred-table tbody tr:hover, .pred-table tbody tr:nth-child(4n+3):hover) { background: #f7f1e2 !important; }
html[data-theme="light"] .theme-operations-scheduler :is(.pred-table-wrap::after, #scheduler::after) { background: linear-gradient(to right, transparent, var(--theme-surface-alt)) !important; }
html[data-theme="light"] .theme-operations-scheduler .pred-acc-bar:hover::after { background: var(--theme-surface) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; }

/* Dispatch: intake cards, review rows, assignment dialogs and planning Gantt. */
html[data-theme="light"] .theme-operations-dispatch {
  --theme-gantt-planned: #875b10;
  --theme-gantt-assigned: #245fa5;
  --theme-gantt-in-progress: #166747;
  --theme-gantt-completed: #53657c;
}
html[data-theme="light"] .theme-operations-dispatch :is(.dispatch-toolbar, .dispatch-form, .dispatch-manual-task-dialog, .dispatch-event-section, .dispatch-email-card, .dispatch-email-day-list, .dispatch-email-other-days, .dispatch-event-card, .suggestion-panel, .suggestion-driver-card, .dispatch-map-container, .planner-controls, .confirmed-transport-review, .confirmed-transport-review-item, .gantt-container, .unassigned-panel, .unassigned-card, .planner-gantt-panel, .dispatch-future-toggle) {
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
  box-shadow: 0 3px 12px rgb(23 43 70 / 6%);
}
html[data-theme="light"] .theme-operations-dispatch :is(.dispatch-date-wrap, .dispatch-view-toggle, .dispatch-time-group, .dispatch-email-route-context, .dispatch-email-route-item, .dispatch-email-source, .dispatch-email-location, .dispatch-location-email-context, .dispatch-location-dialog-intro, .confirmed-transport-review-list, .dispatch-day-workflow, .dispatch-service-bulk-actions, .dispatch-service-history-item, .gantt-row, .planner-section-heading, .dispatch-email-list-columns, .dispatch-email-card-meta, .dispatch-email-row-details, .dispatch-service-management) { background: var(--theme-surface-alt) !important; border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations-dispatch :is(.dispatch-title, .dispatch-email-client, .dispatch-email-container, .dispatch-email-source strong, .dispatch-email-route-item strong, .dispatch-email-location strong, .dispatch-form-title, .dispatch-event-header h3, .dispatch-email-day-list-head h4, .dispatch-email-other-days .dispatch-email-day-list-head h4, .dispatch-email-current-empty strong, .dispatch-email-overview strong, .suggestion-header h3, .suggestion-driver-name, .suggestion-ai-card .ai-driver, .event-article-name, .event-driver-name, .event-detail-row strong, .assign-driver-item .driver-label, .confirmed-transport-review-head h3, .confirmed-transport-review-title, .gantt-driver-name, .gantt-empty h3, .unassigned-panel h3, .unassigned-info, .planner-section-heading h2, .dispatch-map-heading strong, .dispatch-stat-badge strong) { color: var(--theme-text) !important; }
html[data-theme="light"] .theme-operations-dispatch :is(.dispatch-email-source span, .dispatch-email-card-meta, .dispatch-email-route-item span, .dispatch-email-location span, .dispatch-email-card-help, .dispatch-form-subtitle, .dispatch-email-heading-copy, .dispatch-email-day-list-head p, .dispatch-email-current-empty span, .dispatch-email-list-note, .dispatch-email-overview span, .dispatch-email-group-title, .dispatch-location-dialog-copy, .dispatch-location-email-context span, .dispatch-location-email-context > p, .dispatch-location-picker-label small, .dispatch-empty, .suggestion-ai-card .ai-reasoning, .suggestion-ranking-title, .suggestion-driver-vehicle, .suggestion-rank, .score-label, .event-card-info, .event-detail-row, .assign-driver-item .driver-vehicle, .confirmed-transport-review-head p, .confirmed-transport-review-meta, .dispatch-day-workflow small, .dispatch-day-workflow li, .dispatch-service-history-item span, .dispatch-service-history-item small, .confirmed-transport-review-empty, .gantt-driver-vehicle, .gantt-driver-stats, .gantt-hour-label, .gantt-driver-label-header, .gantt-empty, .unassigned-duration, .unassigned-reason, .planner-section-heading p, .dispatch-future-toggle-copy small, .dispatch-map-heading span, .dispatch-loading) { color: var(--theme-muted) !important; }
html[data-theme="light"] .theme-operations-dispatch :is(.dispatch-title i, .dispatch-email-kicker, .dispatch-email-list-kicker, .dispatch-email-other-days .dispatch-email-list-kicker, .dispatch-email-kicker i, .dispatch-email-container i, .dispatch-email-source i, .dispatch-email-route-item i, .dispatch-email-location i, .dispatch-form-title i, .dispatch-field > label i, .dispatch-event-header h3 i, .dispatch-email-list-note i, .dispatch-email-current-empty > i, .dispatch-location-picker-label, .dispatch-location-dialog-intro > i, .dispatch-empty i, .score-total, .confirmed-transport-review-kicker, .confirmed-transport-review-head h3 i, .confirmed-transport-review-meta i, .planner-section-heading span, .planner-section-heading h2 i, .dispatch-future-toggle-copy > i, .dispatch-future-toggle-action, .dispatch-map-heading > i) { color: var(--theme-accent) !important; }
html[data-theme="light"] .theme-operations-dispatch :is(.dispatch-stat-badge, .dispatch-email-state, .dispatch-email-resolve, .dispatch-email-edit-date, .dispatch-email-open-day, .dispatch-email-assistant-link, .dispatch-panel-toggle, .dispatch-map-toggle, .dispatch-modal-close, .suggestion-close, .dispatch-time-option span, .dispatch-view-btn, .dispatch-event-count, .dispatch-email-list-count, .dispatch-email-group-title span, .event-action-btn, .dispatch-map-btn, .planner-action-btn, .confirmed-transport-review-count, .confirmed-transport-review-filter, .confirmed-transport-review-edit, .confirmed-transport-review-action, .dispatch-service-bulk-actions button, .confirmed-transport-review-sort, .confirmed-transport-review-search, .confirmed-transport-review-status, .plan-stat) { background: var(--theme-surface-alt) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations-dispatch :is(.dispatch-view-btn.active, .dispatch-time-option input:checked + span, .dispatch-map-btn.active, .dispatch-map-toggle[aria-expanded="true"], .confirmed-transport-review-filter.is-active, .confirmed-transport-review-item.is-selected, .dispatch-day-workflow li.is-current, .dispatch-day-workflow li.is-current span, .dispatch-email-card:hover, .dispatch-event-card:hover, .suggestion-driver-card:hover, .assign-driver-item:hover, .gantt-row:hover) { background: #fff4db !important; color: var(--theme-accent) !important; border-color: #b89c64 !important; }
html[data-theme="light"] .theme-operations-dispatch :is(.dispatch-quick-create, .dispatch-create-btn, .dispatch-suggest-btn, .suggestion-assign-btn, .dispatch-email-import-ready, .dispatch-email-add-to-plan, .planner-confirm-btn, .planner-publish-btn, .confirmed-transport-review-workflow) { background: var(--theme-primary) !important; color: #fff !important; border-color: var(--theme-primary) !important; }
html[data-theme="light"] .theme-operations-dispatch :is(.dispatch-stat-assigned, .dispatch-email-state.is-suggested, .status-badge.assigned, .status-badge.in_progress, .confirmed-transport-review-status.is-in_progress, .confirmed-transport-review-blocker.is-info, .confirmed-transport-review-action.is-progress, .event-action-btn.btn-progress, .event-action-btn.btn-assign, .plan-stat--planned) { background: #e5effb !important; color: var(--theme-info) !important; border-color: #a7c3e6 !important; }
html[data-theme="light"] .theme-operations-dispatch :is(.dispatch-email-state.is-ready, .dispatch-email-location.is-resolved, .dispatch-email-pending-summary.is-ready, .dispatch-email-overview .is-ready, .status-badge.completed, .event-action-btn.btn-complete, .confirmed-transport-review-count.is-ready, .confirmed-transport-review-count.is-published, .confirmed-transport-review-status.is-completed, .confirmed-transport-review-action.is-complete, .dispatch-day-workflow li.is-done, .dispatch-day-workflow li.is-done span, .suggestion-ai-card, .suggestion-driver-card.ai-pick, .gantt-row--dragover) { background: #e5f4ec !important; color: var(--theme-success) !important; border-color: #9bcbb3 !important; }
html[data-theme="light"] .theme-operations-dispatch :is(.dispatch-email-location.is-resolved i, .dispatch-email-overview .is-ready i, .suggestion-ai-card .ai-label, .dispatch-email-route-item.is-delivery i) { color: var(--theme-success) !important; }
html[data-theme="light"] .theme-operations-dispatch :is(.dispatch-stat-pending, .dispatch-email-pending-summary, .dispatch-email-state.is-action-needed, .dispatch-email-overview .is-review, .dispatch-email-group-title.is-undated, .confirmed-transport-review-blocker, .confirmed-transport-review-missing, .event-driver-unassigned, .status-badge.planned, .plan-stat--unassigned) { background: #fff3df !important; color: var(--theme-warning) !important; border-color: #d8bd86 !important; }
html[data-theme="light"] .theme-operations-dispatch .dispatch-email-card.needs-location { border-color: #d8bd86 !important; }
html[data-theme="light"] .theme-operations-dispatch :is(.dispatch-email-discard, .event-action-btn.btn-cancel, .confirmed-transport-review-action.is-cancel, .confirmed-transport-review-action.is-remove, .dispatch-service-bulk-actions button.is-danger, .dispatch-remove-warning, .confirmed-transport-review-blocker.is-blocking) { background: #fdecef !important; color: var(--theme-danger) !important; border-color: #e8acb4 !important; }
html[data-theme="light"] .theme-operations-dispatch :is(.status-badge.cancelled, .confirmed-transport-review-status.is-cancelled, .confirmed-transport-review-item.is-cancelled) { background: #edf0f4 !important; color: var(--theme-muted) !important; }
html[data-theme="light"] .theme-operations-dispatch .gantt-block--job { color: #fff !important; }
html[data-theme="light"] .theme-operations-dispatch .gantt-block--job .gantt-block-label { color: #fff !important; }
html[data-theme="light"] .theme-operations-dispatch .gantt-block--travel { background: #e1e8f1 !important; border-color: #b7c5d7 !important; }
html[data-theme="light"] .theme-operations-dispatch .gantt-block--travel .gantt-block-label { color: var(--theme-muted) !important; }
html[data-theme="light"] .theme-operations-dispatch .gantt-grid-line { border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations-dispatch .score-bar { background: #dce5ef !important; }
html[data-theme="light"] .theme-operations-dispatch .dispatch-map :is(.leaflet-popup-content-wrapper, .leaflet-popup-tip) { background: var(--theme-surface) !important; color: var(--theme-text) !important; }
html[data-theme="light"] .theme-operations-dispatch .dispatch-email-row-details summary { color: var(--theme-info) !important; }
html[data-theme="light"] .theme-operations-dispatch .dispatch-loading { background: rgb(243 246 250 / 85%) !important; }
html[data-theme="light"] .theme-operations-dispatch .dispatch-email-add-to-plan:disabled { background: #e2e8ef !important; color: var(--theme-muted) !important; border-color: var(--theme-border) !important; }

/* Data entry: tinted work surfaces separate white fields and detection records. */
html[data-theme="light"] .theme-operations-entry :is(.form-container, .email-list, .proximity-service-card, .proximity-card, .sc-shared-fields, .sc-table-wrapper, .transport-scope-group) { background: var(--theme-surface) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; box-shadow: 0 3px 12px rgb(23 43 70 / 6%); }
html[data-theme="light"] .theme-operations-entry :is(.form-container label, .form-container h2, .form-container h3, .email-list h3, .proximity-service-card .service-title, .sc-shared-value, .intake-field-value, .proximity-info strong) { color: var(--theme-text) !important; text-shadow: none !important; }
html[data-theme="light"] .theme-operations-entry :is(.intake-results-header, .intake-history-header, .intake-event-empty, .intake-field-label, .intake-event-time, .intake-event-preview, .sc-shared-field label, .proximity-service-card .service-info, .proximity-info, .service-distance, .proximity-distance, .transport-scope-help) { color: var(--theme-muted) !important; }
html[data-theme="light"] .theme-operations-entry :is(.proximity-service-card .service-info i, .transport-scope-label i, .driver-extra-btn i) { color: var(--theme-accent) !important; }
html[data-theme="light"] .theme-operations-entry :is(.intake-clear-btn, .driver-extra-btn, .sc-quick-btn, .sc-back-btn, .transport-scope-card, .intake-event, #email-list-container li, .sc-table th) { background: var(--theme-surface-alt) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations-entry :is(.intake-extract-btn, .save-btn-primary, .sc-create-btn, .proximity-service-card .btn-create, .proximity-service-card .btn-dispatch) { background: var(--theme-primary) !important; color: #fff !important; border-color: var(--theme-primary) !important; }
html[data-theme="light"] .theme-operations-entry :is(.sc-table td, .intake-header, .intake-history-section, .sc-actions) { border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations-entry :is(.selected-email, .sc-table tr.selected, .transport-scope-option-import input:checked + .transport-scope-card) { background: #e5effb !important; color: var(--theme-info) !important; border-color: #a7c3e6 !important; }
html[data-theme="light"] .theme-operations-entry .transport-scope-option-export input:checked + .transport-scope-card { background: #e5f4ec !important; color: var(--theme-success) !important; border-color: #9bcbb3 !important; }
html[data-theme="light"] .theme-operations-entry :is(.chip-close, .delete-button, #delete-all-emails, .transport-scope-required) { color: var(--theme-danger) !important; }
html[data-theme="light"] .theme-operations-entry .intake-match-badge { color: var(--theme-success) !important; background: #e5f4ec !important; }
html[data-theme="light"] .theme-operations-entry :is(.pf, .intake-event-item, .sc-row, .sc-row:nth-child(even), .sc-table thead) { background: var(--theme-surface-alt) !important; color: var(--theme-text) !important; }
html[data-theme="light"] .theme-operations-entry :is(.pf-value, .ie-title, .ie-text, .ie-container) { color: var(--theme-text) !important; }
html[data-theme="light"] .theme-operations-entry :is(.pf-label, .pf-none, .ie-time, .ie-source, .ie-date, .ie-client, .intake-results-header span:first-child, .intake-history-header span) { color: var(--theme-muted) !important; }
html[data-theme="light"] .theme-operations-entry .ie-delete { color: var(--theme-danger) !important; }
html[data-theme="light"] .theme-operations-entry :is(.pf-container-tag, .sc-quick-btn i) { background: #fff4db !important; color: var(--theme-accent) !important; border-color: #d8bd86 !important; }
html[data-theme="light"] .theme-operations-entry :is(.pf-ok .pf-icon, .sc-status-ok, .sc-status-ok i) { color: var(--theme-success) !important; }
html[data-theme="light"] .theme-operations-entry :is(.pf-err, .pf-error .pf-icon, .field-error-msg, .sc-status-error, .sc-status-error i, .sc-row-remove) { color: var(--theme-danger) !important; }
html[data-theme="light"] .theme-operations-entry :is(.save-button:disabled, .save-button.save-button-disabled, .sc-create-btn:disabled, .sc-create-btn.sc-create-btn-disabled, .intake-extract-btn:disabled) { background: #e2e8ef !important; color: #53657c !important; border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations-entry .content-area { background: var(--theme-workspace) !important; }
html[data-theme="light"] .theme-operations-entry .content-area .container { background: transparent !important; border-color: transparent !important; box-shadow: none !important; }
html[data-theme="light"] .theme-operations-entry .form-container { background: var(--theme-panel) !important; }
html[data-theme="light"] .theme-operations-entry :is(.smart-intake-panel, .smart-intake-panel.intake-expanded, .proximity-panel, .proximity-panel.proximity-expanded) { background: var(--theme-surface-alt) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; box-shadow: var(--theme-shadow) !important; }
html[data-theme="light"] .theme-operations-entry :is(.intake-header, .proximity-panel > h3) { background: var(--theme-header) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; border-radius: 9px; padding: 12px; text-shadow: none !important; }
html[data-theme="light"] .theme-operations-entry .intake-header h3 { color: var(--theme-text) !important; }
html[data-theme="light"] .theme-operations-entry .intake-header-icon { color: var(--theme-accent) !important; }
html[data-theme="light"] .theme-operations-entry :is(.intake-mobile-toggle, .proximity-mobile-toggle) { background: var(--theme-header) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations-entry .intake-history-section { background: var(--theme-panel); border-radius: 8px; padding: 12px; }
html[data-theme="light"] .theme-operations-entry .proximity-card.inactive { opacity: 1; border-left-color: var(--theme-danger) !important; }
html[data-theme="light"] .theme-operations-entry .proximity-card.recent { border-left-color: var(--theme-success) !important; }
html[data-theme="light"] .theme-operations-entry .proximity-card.active { border-left-color: var(--theme-warning) !important; }
html[data-theme="light"] .theme-operations-entry .proximity-card-header { border-color: var(--theme-border); }
html[data-theme="light"] .theme-operations-entry .proximity-info .value { color: var(--theme-text) !important; min-width: 0; overflow-wrap: anywhere; }
html[data-theme="light"] .theme-operations-entry :is(.proximity-info .label, .proximity-info .info-row > i, .proximity-status-indicator) { color: var(--theme-muted) !important; }
html[data-theme="light"] .theme-operations-entry .proximity-card.recent .proximity-status-indicator i { color: var(--theme-success); }
html[data-theme="light"] .theme-operations-entry .proximity-card.active .proximity-status-indicator i { color: var(--theme-warning); }
html[data-theme="light"] .theme-operations-entry .proximity-card.inactive .proximity-status-indicator i { color: var(--theme-danger); }
html[data-theme="light"] .theme-operations-entry .proximity-card .dismiss-btn { background: var(--theme-danger-bg) !important; color: var(--theme-danger) !important; }
html[data-theme="light"] .theme-operations-entry .proximity-card .fill-data-btn[data-dwell-ok="false"] { background: var(--theme-surface-alt) !important; color: var(--theme-muted) !important; }

/* Guides and the driver's new-entry form. Signature canvas stays paper white. */
html[data-theme="light"] .theme-operations-guides :is(.guide-list-panel, .guide-detail-panel, .driver-entries-panel, .driver-form-container, .modal, .sig-card, .pricing-summary) { background: var(--theme-surface) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; box-shadow: 0 3px 12px rgb(23 43 70 / 6%); }
html[data-theme="light"] .theme-operations-guides :is(.panel-header, .goods-table th, .driver-panel-header, .guide-list-search, .driver-entries-search, .driver-edit-banner, .sig-card-title, .driver-form-container .driver-transport-scope-group) { background: var(--theme-surface-alt) !important; border-color: var(--theme-border) !important; color: var(--theme-text) !important; }
html[data-theme="light"] .theme-operations-guides :is(.panel-header h2, .guide-card-number, .section-title, .event-type, .sig-card-title, .modal-header h3, .entry-card-client, .entry-card-price, .driver-panel-header h3, .driver-form-container .form-group label, .form-group label, .driver-transport-scope-label, .driver-transport-scope-copy strong, .driver-transport-scope-card) { color: var(--theme-text) !important; }
html[data-theme="light"] .theme-operations-guides :is(.guide-card-draft, .guide-card-meta, .empty-state, .no-selection, .event-time, .event-notes, .sig-date, .sig-preview span, .pricing-row, .entry-card-date, .entry-card-meta, .driver-entry-count, .driver-transport-scope-help, .driver-transport-scope-copy small, .driver-transport-scope-label small, .driver-form-container .driver-transport-scope-help) { color: var(--theme-muted) !important; }
html[data-theme="light"] .theme-operations-guides :is(.guide-card, .goods-table td, .entry-card, .pricing-row.total) { border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations-guides :is(.guide-card.active, .guide-card:hover, .entry-card-active, .entry-card:hover, .tab-btn.active, .filter-btn.active) { background: #fff4db !important; color: var(--theme-accent) !important; border-color: var(--theme-accent) !important; }
html[data-theme="light"] .theme-operations-guides :is(.tab-btn, .filter-btn, .btn-secondary, .btn-icon, .modal-close, .entry-edit-btn, .save-btn-cancel, .driver-edit-banner-cancel, .driver-extra-btn, .edit-client-button, .empty-toggle-btn, .driver-transport-scope-card, .manual-fallback-btn, .manual-mode-badge, .manual-back-btn, .driver-entries-toggle-btn, .select-change-hint, .driver-form-container .driver-transport-scope-group .driver-transport-scope-card) { background: var(--theme-surface-alt) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations-guides :is(.btn-primary, .save-btn-primary) { background: var(--theme-primary) !important; color: #fff !important; border-color: var(--theme-primary) !important; }
html[data-theme="light"] .theme-operations-guides :is(.btn-danger, .entry-delete-btn, .chip-close, .driver-transport-scope-required, .driver-transport-scope-label small) { color: var(--theme-danger) !important; }
html[data-theme="light"] .theme-operations-guides :is(.btn-danger, .entry-delete-btn, .chip-close) { background: #fdecef !important; border-color: #e8acb4 !important; }
html[data-theme="light"] .theme-operations-guides :is(.status-DRAFT, .event-btn) { background: #edf0f4 !important; color: var(--theme-muted) !important; border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations-guides :is(.status-ISSUED, .event-btn.load, .empty-toggle-btn.active[data-value="loaded"]) { background: #e5effb !important; color: var(--theme-info) !important; border-color: #a7c3e6 !important; }
html[data-theme="light"] .theme-operations-guides :is(.status-COMPLETED, .event-btn.unload, .empty-toggle-btn.active[data-value="empty"]) { background: #e5f4ec !important; color: var(--theme-success) !important; border-color: #9bcbb3 !important; }
html[data-theme="light"] .theme-operations-guides .btn-success { background: var(--theme-success) !important; color: #fff !important; border-color: var(--theme-success) !important; }
html[data-theme="light"] .theme-operations-guides :is(.driver-transport-scope-option-import input:checked + .driver-transport-scope-card, .driver-form-container .driver-transport-scope-option-import > input:checked + .driver-transport-scope-card) { background: #e5effb !important; color: var(--theme-info) !important; border-color: var(--theme-info) !important; }
html[data-theme="light"] .theme-operations-guides :is(.driver-transport-scope-option-export input:checked + .driver-transport-scope-card, .driver-form-container .driver-transport-scope-option-export > input:checked + .driver-transport-scope-card) { background: #e5f4ec !important; color: var(--theme-success) !important; border-color: var(--theme-success) !important; }
html[data-theme="light"] .theme-operations-guides :is(.sig-preview, .sig-canvas-wrap) { background: #fff !important; border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations-guides #toast.success { background: var(--theme-success) !important; color: #fff !important; }
html[data-theme="light"] .theme-operations-guides #toast.error { background: var(--theme-danger) !important; color: #fff !important; }
html[data-theme="light"] .theme-operations-guides :where(.form-group input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), .form-group select, .form-group textarea) { background: var(--theme-input) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; color-scheme: light; }
html[data-theme="light"] .theme-operations-guides :is(.form-group input, .form-group textarea)::placeholder { color: var(--theme-muted) !important; opacity: 1; }
html[data-theme="light"] .theme-operations-guides .form-group select option { background: var(--theme-input) !important; color: var(--theme-text) !important; }

/* Email assistant is already light; standardize panels, contrast and states. */
html[data-theme="light"] .theme-operations-email .email-assistant-page { background: var(--theme-bg) !important; }
html[data-theme="light"] .theme-operations-email :is(.email-assistant-card, .email-assistant-response, .email-transport-panel, .email-transport-card, .email-analysis-overview, .extension-install-dialog) { background: var(--theme-surface) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations-email :is(.email-assistant-hero h1, .email-assistant-card-heading h2, .email-analysis-pending h3, .email-analysis-summary h3, .email-transport-panel h3, .email-transport-card-header strong, .email-analysis-overview h3, .email-assistant-compose label, .extension-install-dialog h2) { color: var(--theme-text) !important; }
html[data-theme="light"] .theme-operations-email :is(.email-assistant-hero p:not(.email-assistant-eyebrow), .email-assistant-card-heading p, .email-transport-panel-heading p, .email-analysis-field span, .email-transport-card .email-analysis-field span, .email-assistant-status, .email-analysis-empty, .email-analysis-summary-text, .email-assistant-steps p, .email-assistant-notice p, .email-period-timezone) { color: var(--theme-muted) !important; }
html[data-theme="light"] .theme-operations-email :is(.email-assistant-summary, .email-assistant-notice, .email-analysis-summary, .email-analysis-table th, .email-analysis-field, .email-analysis-raw-answer, .extension-install-dialog code, .extension-install-note, .email-period-controls, .email-transport-panel-heading) { background: var(--theme-surface-alt) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations-email :is(.email-assistant-eyebrow, .email-analysis-kicker, .email-assistant-icon, .email-assistant-summary i, .email-assistant-notice i, .email-period-timezone i) { color: var(--theme-accent) !important; }
html[data-theme="light"] .theme-operations-email :is(.email-assistant-primary, .email-assistant-response-scheduler, .extension-download) { background: var(--theme-primary) !important; color: #fff !important; }
html[data-theme="light"] .theme-operations-email :is(.email-assistant-secondary, .email-assistant-response-clear, .email-assistant-retry, .extension-install-close) { background: var(--theme-surface-alt) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations-email .email-assistant-extension-state.is-ready { background: #e5f4ec !important; color: var(--theme-success) !important; border-color: #9bcbb3 !important; }
html[data-theme="light"] .theme-operations-email .email-analysis-count.info { background: #e5effb !important; color: var(--theme-info) !important; border-color: #a7c3e6 !important; }
html[data-theme="light"] .theme-operations-email :is(.email-assistant-status.is-error, .email-analysis-count.urgent, .email-analysis-group.urgent h3) { color: var(--theme-danger) !important; }
html[data-theme="light"] .theme-operations-email :is(.email-analysis-count.urgent, .email-assistant-status.is-error) { background: #fdecef !important; }
html[data-theme="light"] .theme-operations-email :is(.email-assistant-extension-state.is-missing, .email-assistant-extension-state.is-outdated, .email-analysis-count.action, .email-analysis-count.waiting) { background: #fff3df !important; color: var(--theme-warning) !important; border-color: #d8bd86 !important; }
html[data-theme="light"] .theme-operations-extract :is(form.shadow-md, .bg-white) { background: var(--theme-surface) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations-extract :is(label, h1, h2) { color: var(--theme-text) !important; }

/* Named operational inputs only: date pickers retain native light controls. */
html[data-theme="light"] .theme-operations :where(.sch-search-input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), .mobile-date-input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), .sch-email-search input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), .sch-plan-fields input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), .sch-plan-fields select, .service-modal-input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), .service-modal-textarea, .modal_default input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), .modal_default select, .dispatch-date-input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), .dispatch-select, .dispatch-input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), .dispatch-textarea, .confirmed-transport-review-search input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), .confirmed-transport-review-sort select, .planner-driver-select select, .form-container input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), .form-container select, .form-container textarea, .intake-textarea, .sc-table input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), .sc-table select, .guide-list-search input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), .driver-entries-search input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), .driver-form-container input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), .driver-form-container select, .driver-form-container textarea, .goods-table input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), .manual-text-input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), .email-period-field input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), .email-period-field select, #chatgpt-prompt, .popup-dd-search) {
  background: var(--theme-input) !important;
  color: var(--theme-text) !important;
  border-color: var(--theme-border) !important;
  color-scheme: light;
  -webkit-text-fill-color: var(--theme-text);
}
html[data-theme="light"] .theme-operations :is(.dispatch-date-input, .mobile-date-input, .form-container input[type="date"], .driver-form-container input[type="date"], .email-period-field input[type="date"])::-webkit-calendar-picker-indicator { filter: none; }
html[data-theme="light"] .theme-operations :is(.sch-search-input, .dispatch-input, .dispatch-textarea, .intake-textarea, .form-container input, .form-container textarea, .driver-form-container input, .driver-form-container textarea, .manual-text-input, .popup-dd-search, #chatgpt-prompt)::placeholder { color: var(--theme-muted) !important; -webkit-text-fill-color: var(--theme-muted); opacity: 1; }
html[data-theme="light"] .theme-operations :is(.dispatch-field > label, .service-modal-label, .sch-plan-fields label, .mobile-date-picker label, .planner-driver-select label, .email-period-field label) { color: var(--theme-text) !important; }
html[data-theme="light"] .theme-operations :is(.dispatch-input, .dispatch-select, .dispatch-textarea, .sch-search-input, .mobile-date-input, .form-container input, .form-container select, .driver-form-container input, .driver-form-container select, .popup-dd-search, #chatgpt-prompt):focus { border-color: var(--theme-info) !important; outline-color: var(--theme-info); box-shadow: 0 0 0 3px rgb(36 95 165 / 14%) !important; }
html[data-theme="light"] .theme-operations :is(.dispatch-select option, .form-container option, .driver-form-container option, .confirmed-transport-review-sort option) { background: var(--theme-input) !important; color: var(--theme-text) !important; }
html[data-theme="light"] .theme-operations :is(.dispatch-input, .dispatch-select, .dispatch-textarea, .form-container input, .form-container select, .driver-form-container input, .driver-form-container select):disabled { background: var(--theme-surface-alt) !important; color: var(--theme-muted) !important; -webkit-text-fill-color: var(--theme-muted); }
html[data-theme="light"] .theme-operations :is(.sch-filter-check, .dispatch-time-option input, .sc-table input[type="checkbox"], .driver-form-container input[type="checkbox"]) { accent-color: var(--theme-accent); }

/* Modal surfaces and dropdowns may live outside the page's main wrapper. */
html[data-theme="light"] .theme-operations :is(.service-modal, .modal_default .modal_inner, .modal_default .modal_header, .modal_default .modal_body, .modal_default .modal_footer, .custom-popup-style, .popup-box, .popup-dd-panel, .swal2-popup) { background: var(--theme-surface) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations :is(.swal2-title, .swal2-html-container, .popup-label, .popup-dd-title) { color: var(--theme-text) !important; }
html[data-theme="light"] .theme-operations :is(.service-modal-cancel, .modal_default button[type="button"], .popup-dd-close, .popup-dd-search-clear) { background: var(--theme-surface-alt) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations :is(.service-modal-delete, .popup-dd-item-clear:hover) { background: #fdecef !important; color: var(--theme-danger) !important; }
html[data-theme="light"] .theme-operations :is(.dispatch-manual-task-overlay, .modal-backdrop, .popup-dd-overlay) { background: rgb(23 43 70 / 35%) !important; }
html[data-theme="light"] .theme-operations :is(.popup-dd-trigger, .form-container .popup-dd-trigger, .driver-form-container .popup-dd-trigger, .popup-dd-item) { background: var(--theme-input) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations :is(.popup-dd-trigger-placeholder, .popup-dd-trigger-icon, .popup-dd-count, .popup-dd-search-icon, .popup-dd-item-empty, .popup-dd-item-clear, .popup-dd-chip-value) { color: var(--theme-muted) !important; }
html[data-theme="light"] .theme-operations :is(.popup-dd-item:hover, .popup-dd-item-focused, .popup-dd-close:hover) { background: var(--theme-surface-alt) !important; }
html[data-theme="light"] .theme-operations :is(.popup-dd-item-selected, .popup-dd-highlight) { background: #fff0cd !important; color: var(--theme-accent) !important; }
html[data-theme="light"] .theme-operations .popup-dd-item-selected::after { color: var(--theme-accent) !important; }
html[data-theme="light"] .theme-operations :is(.select2-dropdown, .driver-select2-dropdown, .select2-container--default .select2-selection--single, .select2-container--default .select2-selection--multiple, .select2-container--default .select2-search__field, .select2-container--default .select2-results__option, .driver-select2-dropdown .select2-results, .driver-select2-dropdown .select2-search) { background: var(--theme-input) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations :is(.select2-container--default .select2-selection__rendered, .select2-container--default .select2-selection__choice, .select2-container--default .select2-selection__choice__remove, .driver-select2-dropdown .select2-search__field) { color: var(--theme-text) !important; }
html[data-theme="light"] .theme-operations :is(.select2-selection__placeholder, .select2-results__message, .select2-results__option--disabled) { color: var(--theme-muted) !important; }
html[data-theme="light"] .theme-operations .select2-container--default .select2-selection__choice { background: var(--theme-surface-alt) !important; border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations .select2-container--default :is(.select2-results__option--highlighted[aria-selected], .select2-results__option[aria-selected="true"]) { background: #e5effb !important; color: var(--theme-info) !important; }
html[data-theme="light"] .theme-operations .select2-container--default .select2-selection__arrow b { border-top-color: var(--theme-muted) !important; }

/* Validation states take priority over neutral input surfaces. */
html[data-theme="light"] .theme-operations-entry :is(.pf-ok, .sc-row-valid, .field-valid) { border-color: var(--theme-success) !important; }
html[data-theme="light"] .theme-operations-entry :is(.pf-error, .sc-row-invalid, .field-invalid, .sc-row-invalid .sc-row-container, .sc-row-invalid .sc-row-date, .sc-row-invalid .sc-row-driver) { border-color: var(--theme-danger) !important; }

html[data-theme="light"] .theme-operations-extract #confirm-button { background: var(--theme-danger) !important; color: #fff !important; }

html[data-theme="light"] .theme-operations-email .email-assistant-summary p { color: var(--theme-muted) !important; }

html[data-theme="light"] .theme-operations-email .extension-install-dialog > p:not(.extension-install-note) { color: var(--theme-muted) !important; }
/* Dispatch map and list headings use the same light section surfaces. */
html[data-theme="light"] .theme-operations-dispatch :is(.dispatch-map-heading, .dispatch-email-list-columns) { background: var(--theme-header) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations-dispatch .dispatch-date-wrap > i { color: var(--theme-accent) !important; }
html[data-theme="light"] .theme-operations-entry .edit-client-button { background: var(--theme-control) !important; color: var(--theme-text) !important; border-color: var(--theme-border) !important; }
html[data-theme="light"] .theme-operations-email .email-analysis-pending p { color: var(--theme-muted) !important; }
