/* Module-specific light theme. Shared layout and Bootstrap tokens live in theme.css. */
html[data-theme="light"] .main-dashboard {
    --main-ink: var(--text);
    --main-ink-strong: var(--text);
    --main-muted: var(--muted);
    --main-line: var(--line);
    --main-panel-bg: var(--surface);
    --main-panel-deep: var(--surface-strong);
    --main-hover: #eef7f6;
    --main-accent: #087b91;
    --main-accent-soft: #e5f3f6;
    --main-success-bg: #e3f5ee;
    --main-success-text: var(--success-text);
    --main-danger-bg: #fcebed;
    --main-danger-text: var(--danger-text);
}
html[data-theme="light"] .org-dashboard { --org-row-bg: var(--surface); }
html[data-theme="light"] :is(.operator-card, .queue-card, .empty-panel, .notifications-grid, .org-stat-card, .org-panel) {
    box-shadow: 0 8px 24px rgba(30, 55, 74, .06);
}
html[data-theme="light"] :is(.org-dashboard-title, .org-date-main, .org-client-main, .org-stat-row span) { color: var(--text); }
html[data-theme="light"] :is(.org-stat-card small, .operator-detail .bi) { color: var(--muted); }
html[data-theme="light"] :is(.org-stat-icon, .org-pill) { color: #087b91; }
html[data-theme="light"] .org-pill--inbound { color: var(--success-text); }
html[data-theme="light"] .org-panel .table-hover > tbody > tr:hover > * { color: var(--text); }
html[data-theme="light"] .org-stat-bar { background: var(--bg-soft); }
html[data-theme="light"] :is(.operator-extension, .notification-filters, .notification-kind, .notification-icon, .queue-icon) {
    background: var(--surface-strong);
    border-color: var(--line);
    color: var(--text);
}
html[data-theme="light"] :is(.operator-detail + .operator-detail, .notification-row) { border-color: var(--line); }
html[data-theme="light"] .operator-card.status-live { background: #fff5f5; }
html[data-theme="light"] :is(.badge-account-on, .operator-primary-status.status-free) { color: var(--success-text); background: #e3f5ee; }
html[data-theme="light"] :is(.badge-account-off, .operator-primary-status.status-offline) { color: var(--muted); background: var(--bg-soft); }
html[data-theme="light"] :is(.badge-call-live, .operator-primary-status.status-live, .queue-pill-danger) { color: var(--danger-text); background: #fcebed; }
html[data-theme="light"] .badge-call-free { color: #245ea0; background: #eaf2fd; }
html[data-theme="light"] .queue-pill-wait { color: #845600; background: #fff3d6; }
html[data-theme="light"] .notification-filter:is(:hover, .is-active) { color: #087b91; background: #e5f3f6; }
html[data-theme="light"] .notification-detail-backdrop { background: rgba(24, 42, 57, .35); }
html[data-theme="light"] .notification-detail-dialog { background: var(--surface); box-shadow: 0 24px 70px rgba(30, 55, 74, .2); }
html[data-theme="light"] :is(.notification-detail-summary-item, .notification-detail-item) { background: var(--surface-strong); }
html[data-theme="light"] :is(.main-dashboard, .org-dashboard) :is(.btn-outline-light, .btn-outline-info):hover { color: #087b91 !important; }

/* Calls and operator session reports. */
html[data-theme="light"] :is(.calls-hero-card, .calls-mini-card, .calls-panel, .sessions-hero, .sessions-panel, .productivity-summary-item, .productivity-section) {
    background: var(--surface);
    border-color: var(--line);
    box-shadow: 0 8px 24px rgba(30, 55, 74, .06);
}
html[data-theme="light"] :is(.calls-highlight-box, .sessions-metric, .sessions-alert) { background: var(--surface-strong); border-color: var(--line); }
html[data-theme="light"] :is(.calls-hero-subtitle, .calls-highlight-box span, .calls-mini-card span, .calls-stat-row span, .calls-panel-link, .calls-quality-note, .sessions-metric span, .sessions-filter-grid .form-label) { color: var(--muted); }
html[data-theme="light"] :is(.calls-risk-row strong, .calls-panel-link:hover) { color: var(--text); }
html[data-theme="light"] :is(.calls-stat-row, .productivity-section-header) { border-color: var(--line); }
html[data-theme="light"] .sessions-alert-danger { border-color: #e7a8b0; }
html[data-theme="light"] .sessions-alert-warning { border-color: #e6c57d; }
html[data-theme="light"] .superadmin-organization-card { background: var(--surface) !important; border-color: var(--line) !important; box-shadow: 0 8px 24px rgba(30, 55, 74, .06); }
html[data-theme="light"] .superadmin-organization-card:hover { box-shadow: 0 12px 30px rgba(30, 55, 74, .1); }
html[data-theme="light"] .superadmin-organization-card .superadmin-status { color: var(--muted) !important; background: var(--bg-soft) !important; }
html[data-theme="light"] .superadmin-organization-card .superadmin-status--active { color: var(--success-text) !important; background: #e3f5ee !important; }
html[data-theme="light"] .superadmin-organization-card .superadmin-status--paused { color: #845600 !important; background: #fff3d6 !important; }
html[data-theme="light"] .superadmin-organization-card .superadmin-status--archived { color: #69528b !important; background: #f0eaf8 !important; }

/* Recordings: list, preview, migration states and standalone details. */
html[data-theme="light"] .recordings-page {
    --rec-ink: var(--text);
    --rec-muted: var(--muted);
    --rec-line: var(--line);
    --rec-panel: var(--surface);
    --rec-panel-deep: var(--surface-strong);
    --rec-accent: var(--accent);
    --rec-cyan: #087b91;
}
html[data-theme="light"] .unassigned-recordings-page {
    --unassigned-ink: var(--text);
    --unassigned-ink-strong: var(--text);
    --unassigned-muted: var(--muted);
    --unassigned-line: var(--line);
    --unassigned-head-bg: var(--surface-strong);
    --unassigned-row-bg: var(--surface);
    --unassigned-row-hover: #eef7f6;
    --unassigned-panel-bg: var(--surface);
}
html[data-theme="light"] :is(.recordings-head h1, .recording-id, .recording-number, .recording-detail-head h2, .recording-detail-item strong, .recording-preview-time, .download-period-label__text strong) { color: var(--text); }
html[data-theme="light"] .live-status { color: var(--success-text); }
html[data-theme="light"] .recordings-page :is(.form-control, .form-select),
html[data-theme="light"] .unassigned-recordings-page .form-select { background-color: var(--surface-strong); color: var(--text); border-color: var(--line); }
html[data-theme="light"] .recordings-page .form-control::placeholder { color: var(--muted); }
html[data-theme="light"] .recordings-page :is(input[type="date"], input[type="time"], input[type="datetime-local"]) { color-scheme: light; }
html[data-theme="light"] .recordings-page input::-webkit-calendar-picker-indicator { filter: none; }
html[data-theme="light"] :is(.recordings-disclosure > summary, .recordings-scope-switch, .recording-close, .recording-preview-player) { background: var(--surface-strong); border-color: var(--line); }
html[data-theme="light"] :is(.advanced-filters, .actions-menu) { background: var(--surface); box-shadow: 0 16px 40px rgba(30, 55, 74, .16); }
html[data-theme="light"] :is(.advanced-filter-grid label, .download-panel label, .recordings-list-head) { color: var(--text); }
html[data-theme="light"] :is(.recordings-disclosure[open] > summary, .recordings-scope-switch a.is-active) { color: #087b91; }
html[data-theme="light"] .recording-pill { color: #087b91; }
html[data-theme="light"] .recordings-scope-switch a:hover { color: var(--text); background: var(--bg-soft); }
html[data-theme="light"] :is(.recording-row, .recording-detail-item, .recording-detail-item:nth-child(odd)) { border-color: var(--line); }
html[data-theme="light"] .recordings-page .recording-pill:is(.inbound, .answered) { color: var(--success-text); }
html[data-theme="light"] .recordings-page .recording-pill.outbound { color: #245ea0; }
html[data-theme="light"] .recordings-page .recording-pill:is(.missing, .missed) { color: var(--danger-text); }
html[data-theme="light"] :is(.recordings-scope-count, .recording-pill.archive, .recording-archive-note, .migration-archive-banner, .migration-archive-pill) { color: #845600; background: #fff3d6; }
html[data-theme="light"] .migration-archive-banner :is(strong, .bi) { color: #845600; }
html[data-theme="light"] :is(.recording-corruption-banner, .recording-corruption-note) { color: var(--danger-text); background: #fcebed; }
html[data-theme="light"] .recording-corruption-banner strong { color: var(--danger-text); }
html[data-theme="light"] .recording-preview { box-shadow: 0 8px 24px rgba(30, 55, 74, .08); }

/* Organizations, readiness and cabinet modal. */
html[data-theme="light"] .organizations-page { --org-line: var(--line); --org-panel: var(--surface); --org-row-hover: #eef7f6; }
html[data-theme="light"] .organizations-page .organization-tile:hover { background: #f3faf8; }
html[data-theme="light"] .organizations-page .organization-card-modal .modal-content { background: var(--surface); }
html[data-theme="light"] .organizations-page :is(.provisioning-diagnostics dt, .organization-card-code, .organization-card-facts dt, .organization-card-side p, .org-summary-item span, .org-form-section p, .form-text, .org-inline-note, .org-status-badge, .org-readiness-counter, .org-step-indicator, .org-step-copy span, .org-setup-empty, details.org-diagnostics > summary small) { color: var(--muted); }
html[data-theme="light"] .organizations-page :is(.organization-current-label, .organization-card-eyebrow, .org-eyebrow, code) { color: var(--success-text); }
html[data-theme="light"] .organizations-page details.org-diagnostics > summary::after { color: var(--success-text); }
html[data-theme="light"] .organizations-page .org-required { color: var(--danger-text); }
html[data-theme="light"] .organizations-page :is(.organization-card-side, .org-summary-item, .org-setup-step) { background: var(--surface-strong); }
html[data-theme="light"] .organizations-page :is(.organization-card-status, .org-progress-track) { background: var(--bg-soft); }
html[data-theme="light"] .organizations-page :is(.organization-card-status.is-active, .org-status-active, .org-step-ready .org-step-indicator) { background: #e3f5ee; color: var(--success-text); }
html[data-theme="light"] .organizations-page :is(.organization-status--paused, .org-step-attention .org-step-indicator, .organization-card-unavailable) { background: #fff3d6; color: #845600; }
html[data-theme="light"] .organizations-page .organization-status--archived { background: #f0eaf8; color: #69528b; }
html[data-theme="light"] .organization-health--danger .organization-health-label { color: var(--danger-text); }
html[data-theme="light"] .organization-health--warning .organization-health-label { color: #845600; }
html[data-theme="light"] .organization-health--success .organization-health-label { color: var(--success-text); }
html[data-theme="light"] .organization-health--info .organization-health-label { color: #245ea0; }
html[data-theme="light"] :is(.organization-health-reason, .organization-health-count, .organization-card-issue p) { color: var(--muted); }
html[data-theme="light"] .organization-card-issue { background: #fff8e9; }
html[data-theme="light"] .organization-card-issue strong { color: #845600; }

/* Telephony inventory, builder, bulk selection and softphone instructions. */
html[data-theme="light"] .inventory-page {
    --inventory-ink: var(--text);
    --inventory-ink-strong: var(--text);
    --inventory-muted: var(--muted);
    --inventory-line: var(--line);
    --inventory-head-bg: var(--surface-strong);
    --inventory-row-bg: var(--surface);
    --inventory-row-hover: #eef7f6;
    --inventory-panel-bg: var(--surface);
    --inventory-accent: #087b91;
    --inventory-accent-soft: #e5f3f6;
}
html[data-theme="light"] .inventory-page :is(.inventory-table td:last-child, .greeting-library-table td:last-child) { background: var(--surface) !important; }
html[data-theme="light"] .inventory-page :is(.inventory-table, .greeting-library-table) :is(th:last-child, td:last-child) { box-shadow: -8px 0 18px rgba(30, 55, 74, .05); }
html[data-theme="light"] .inventory-page .btn-outline-light:hover { color: #087b91 !important; }
html[data-theme="light"] .inventory-page .field-help-bubble { background: var(--surface) !important; box-shadow: 0 14px 36px rgba(30, 55, 74, .18); }
html[data-theme="light"] .inventory-page :is(.queue-builder-preview > div, .inventory-advanced-details, pre) { background: var(--surface-strong); }
html[data-theme="light"] .inventory-page .inventory-advanced-details > summary { background: #eef7f6; }
html[data-theme="light"] .inventory-page .inventory-bulk-option { background: var(--surface-strong); }
html[data-theme="light"] .inventory-page .inventory-bulk-option:has(input:checked) { background: #e3f5ee; }
html[data-theme="light"] .inventory-page .inventory-bulk-option:has(input:checked) .inventory-bulk-option-label { color: var(--text); }
html[data-theme="light"] .inventory-page .inventory-bulk-state--idle { background: var(--bg-soft); }
html[data-theme="light"] .softphone-app-settings { color: var(--text); }
html[data-theme="light"] .softphone-app-setting { background: var(--surface-strong); }
html[data-theme="light"] .softphone-app-setting__number { background: #e5f3f6; color: #087b91; }
html[data-theme="light"] :is(.softphone-app-setting__label, .softphone-app-setting__hint) { color: var(--muted) !important; }
html[data-theme="light"] :is(.softphone-app-setting__value, .softphone-secret-placeholder) { color: var(--text) !important; }
html[data-theme="light"] .ivr-field-hint { color: var(--muted); }
html[data-theme="light"] .ivr-action-hint { color: #087b91; }

/* Users, settings, logs and diagnostics. */
html[data-theme="light"] .users-page { --users-line: var(--line); --users-panel: var(--surface); --users-row-hover: #eef7f6; }
html[data-theme="light"] .users-page .user-summary-item { background: var(--surface-strong); }
html[data-theme="light"] .users-page :is(.user-summary-item span, .user-form-section p, .form-text, .user-inline-note) { color: var(--muted); }
html[data-theme="light"] .system-page { --system-line: var(--line); --system-panel: var(--surface); --system-row-hover: #eef7f6; }
html[data-theme="light"] :is(.settings-status-item, .logs-summary-item) { background: var(--surface); }
html[data-theme="light"] :is(.asterisk-diagnostics-grid pre, .asterisk-raw-grid pre, .logs-row-details dl, .health-inventory-grid div) { background: var(--surface-strong); }
html[data-theme="light"] .health-meter { background: var(--bg-soft); }
html[data-theme="light"] .logs-table th:last-child { background: var(--surface-strong) !important; }
html[data-theme="light"] .logs-table td:last-child { background: var(--surface) !important; }
html[data-theme="light"] .logs-table :is(th:last-child, td:last-child) { box-shadow: -8px 0 18px rgba(30, 55, 74, .05); }
html[data-theme="light"] .logs-level--normal { color: var(--muted); background: var(--bg-soft); }
html[data-theme="light"] .logs-level--important { color: #087b91; background: #e5f3f6; }
html[data-theme="light"] .logs-level--critical { color: #845600; background: #fff3d6; }
html[data-theme="light"] .logs-row-details summary { color: #087b91; }

/* Keep file availability and archive counters readable inside all row states. */
html[data-theme="light"] .recordings-page .recordings-scope-count {
    color: #845600 !important;
    background: #fff3d6;
}
html[data-theme="light"] .recordings-page .recording-pill.missing,
html[data-theme="light"] .recordings-page .recording-pill.missed {
    color: var(--danger-text) !important;
    background: #fcebed;
    border-color: #e7a8b0;
}
html[data-theme="light"] .recordings-page .recording-pill.archive {
    color: #845600 !important;
    background: #fff3d6;
    border-color: #e6c57d;
}
html[data-theme="light"] .recording-row.is-migration-archive { background: #fffdf7; }
html[data-theme="light"] .recording-row.is-migration-archive:is(:hover, .is-selected) { background: #fff6df; }
html[data-theme="light"] .recording-row.is-corrupted { background: #fff8f8; }
html[data-theme="light"] .recording-row.is-corrupted:is(:hover, .is-selected) { background: #fdebec; }
html[data-theme="light"] .notification-detail-dialog {
    color: var(--text);
    border-color: var(--line);
}
html[data-theme="light"] .notification-detail-dialog :is(h3, .notification-detail-summary-item strong, .notification-detail-item-title, .notification-detail-value, .notification-detail-close) { color: var(--text); }
html[data-theme="light"] .notification-detail-dialog :is(.notification-detail-message, .notification-detail-label, .notification-detail-item-subtitle, .notification-detail-state) { color: var(--muted); }
html[data-theme="light"] .notification-detail-body > .notification-guidance { border-color: var(--line); }
html[data-theme="light"] .notification-detail-item-title[href]:hover { color: var(--accent); }
