/* Shared visual tokens. Dark overrides are screen-only; PDF generation never uses them.
   Existing layouts and light declarations are retained. Groups cover legacy fixed colors. */
.appearance-settings label{display:block;font-size:13px;font-weight:600;margin-bottom:7px}
.appearance-settings select{width:100%;min-height:42px;padding:8px 11px;border:1px solid var(--ob-line);border-radius:7px;font:inherit;background:var(--ob-white);color:var(--ob-ink)}
.appearance-settings #interface-theme-help{font-size:12px;margin:12px 0 0}
.appearance-settings [data-theme-status]{font-size:12px;margin:10px 0 0;min-height:1.5em}
@media screen {
html[data-theme="dark"]{
 color-scheme:dark;
 --theme-canvas:#0c1c28;--theme-surface:#152c3b;--theme-raised:#1d3748;--theme-nav:#0b2230;
 --theme-control-line:#78929f;--theme-text:#edf3f7;--theme-muted:#bbcbd6;--theme-line:#496271;--theme-link:#9bd6e5;--theme-gold:#e7c58c;
 --theme-success:#80dfb4;--theme-success-bg:#163e35;--theme-danger:#ffadb5;--theme-danger-bg:#462835;--theme-danger-solid:#903548;--theme-warning-bg:#403724;
 --ob-canvas:var(--theme-canvas);--ob-white:var(--theme-surface);--ob-surface-soft:var(--theme-raised);--ob-line:var(--theme-line);
 --ob-ink:var(--theme-text);--ob-muted:var(--theme-muted);--ob-text-secondary:var(--theme-muted);--ob-subtle:#78929f;
 --ob-positive:var(--theme-success);--ob-negative:var(--theme-danger);--ob-attention:var(--theme-gold);--ob-bronze:var(--theme-gold);--ob-gold-soft:var(--theme-warning-bg);
 --ob-shadow:0 5px 22px #00000030;
 --admin-bg:var(--theme-canvas);--admin-card:var(--theme-surface);--admin-text:var(--theme-text);--admin-muted:var(--theme-muted);--admin-line:var(--theme-line);--admin-danger:var(--theme-danger);--admin-success:var(--theme-success);
 background:var(--theme-canvas);color:var(--theme-text);
}
html[data-theme="dark"] body{background:var(--theme-canvas);color:var(--theme-text)}
html[data-theme="dark"] body.presentation-mode{--ink:var(--theme-text);--muted:var(--theme-muted)}

html[data-theme="dark"] a,
html[data-theme="dark"] button.link,
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .work-symbol,
html[data-theme="dark"] .tabs button.active,
html[data-theme="dark"] .report-choice svg,
html[data-theme="dark"] .upload-field>svg,
html[data-theme="dark"] .progress-content>.lucide,
html[data-theme="dark"] .analytic-details>summary,
html[data-theme="dark"] .attention.readings svg,
html[data-theme="dark"] .filter-chip,
html[data-theme="dark"] .technical-details>summary,
html[data-theme="dark"] .report-advanced>summary,
html[data-theme="dark"] .tabs:after,
html[data-theme="dark"] .chart-reset,
html[data-theme="dark"] .section-reset,
html[data-theme="dark"] .advanced-filters>summary,
html[data-theme="dark"] .section-kicker,
html[data-theme="dark"] .contract-percent,
html[data-theme="dark"] .presentation-brand,
html[data-theme="dark"] .presentation-period-label span,
html[data-theme="dark"] .presentation-filter-details,
html[data-theme="dark"] .presentation-center-table tr.selected td,
html[data-theme="dark"] .presentation-center-option,
html[data-theme="dark"] .presentation-contract-progress strong,
html[data-theme="dark"] #tab-content .kpi-label svg,
html[data-theme="dark"] #tab-content .planning-open,
html[data-theme="dark"] #tab-content .cost-rank,
html[data-theme="dark"] #tab-content .cost-top-name,
html[data-theme="dark"] #tab-content .cost-group-name,
html[data-theme="dark"] #tab-content .contract-progress strong,
html[data-theme="dark"] #tab-content .contract-metric svg,
html[data-theme="dark"] #tab-content .report-featured>div>svg,
html[data-theme="dark"] body:not(.presentation-mode) .topbar-tag svg,
html[data-theme="dark"] body:not(.presentation-mode) .work-header .eyebrow,
html[data-theme="dark"] body:not(.presentation-mode) .tabs button.active,
html[data-theme="dark"] body:not(.presentation-mode) .filter-top>span,
html[data-theme="dark"] body:not(.presentation-mode) .advanced-filters>summary,
html[data-theme="dark"] #tab-content .quality-grid .information-coverage p:first-of-type,
html[data-theme="dark"] body:not(.presentation-mode) .header-side .advanced-filters[open]>summary,
html[data-theme="dark"] body:not(.presentation-mode) .header-side .filter-clear,
html[data-theme="dark"] #tab-content .executive-kpis .kpi-label svg,
html[data-theme="dark"] #tab-content .executive-kpis .kpi.negative .kpi-label svg,
html[data-theme="dark"] #tab-content .overview-primary-grid .chart-section h3,
html[data-theme="dark"] #tab-content .overview-primary-grid .chart-section h3 svg,
html[data-theme="dark"] #tab-content .mock-panel-heading>svg,
html[data-theme="dark"] #tab-content .mock-panel-heading h2,
html[data-theme="dark"] #tab-content .donut-legend .legend-total dt,
html[data-theme="dark"] #tab-content .donut-legend .legend-total dd,
html[data-theme="dark"] #tab-content .cost-kpis .kpi:nth-child(5) .kpi-label svg,
html[data-theme="dark"] #tab-content .cost-summary-grid h2,
html[data-theme="dark"] #tab-content .cost-summary-grid h3,
html[data-theme="dark"] #tab-content .cost-summary-grid h3 svg,
html[data-theme="dark"] #tab-content>.financial-flow .section-heading h2,
html[data-theme="dark"] #tab-content>.financial-flow .section-heading h2 svg,
html[data-theme="dark"] #tab-content>.financial-flow .flow-step svg,
html[data-theme="dark"] #tab-content>.financial-flow .flow-step span,
html[data-theme="dark"] #tab-content>.financial-flow .flow-step strong,
html[data-theme="dark"] #tab-content>.financial-flow .flow-operator,
html[data-theme="dark"] #tab-content .revenue-charts .chart-section h3,
html[data-theme="dark"] .dashboard-revenue #tab-content .section-title h2,
html[data-theme="dark"] #tab-content .contract-identity strong,
html[data-theme="dark"] #tab-content .contract-progress-copy>strong,
html[data-theme="dark"] #tab-content .contract-chart-grid .chart-section h3,
html[data-theme="dark"] #tab-content .planning-dashboard-title,
html[data-theme="dark"] #tab-content .planning-metric .section-heading>svg,
html[data-theme="dark"] #tab-content .planning-metric h2,
html[data-theme="dark"] #tab-content .planning-chart-grid h3,
html[data-theme="dark"] #tab-content .planning-chart-grid h3 svg,
html[data-theme="dark"] #tab-content .entries-panel .entry-total strong,
html[data-theme="dark"] #tab-content .report-feature-content h2,
html[data-theme="dark"] #tab-content .report-feature-meta svg,
html[data-theme="dark"] #tab-content .report-feature-meta strong,
html[data-theme="dark"] #tab-content .report-category-heading>svg,
html[data-theme="dark"] #tab-content .report-category h3,
html[data-theme="dark"] #tab-content .report-category .report-choice,
html[data-theme="dark"] #tab-content .report-category .report-choice>svg:first-child,
html[data-theme="dark"] #tab-content .report-category .report-choice>svg:last-child,
html[data-theme="dark"] #tab-content .quality-import .quality-row .kpi:nth-child(4) .kpi-label svg,
html[data-theme="dark"] #tab-content .quality-coverage-ring strong,
html[data-theme="dark"] #tab-content .quality-meter>strong,
html[data-theme="dark"] body.presentation-mode .presentation-period-label span,
html[data-theme="dark"] body.presentation-mode .presentation-filter-details,
html[data-theme="dark"] body.presentation-mode .presentation-result-sector .kpi-label svg,
html[data-theme="dark"] body.presentation-mode .presentation-flow-sector .flow-operator,
html[data-theme="dark"] body.presentation-mode .presentation-contract-progress strong,
html[data-theme="dark"] body.presentation-mode #modal.modal-presentation-center .presentation-center-option,
html[data-theme="dark"] body button.link,
html[data-theme="dark"] body:not(.presentation-mode) .work-header [data-action="presentation"],
html[data-theme="dark"] .attention-level,
html[data-theme="dark"] .back-link{color:var(--theme-link) !important}
html[data-theme="dark"] button,
html[data-theme="dark"] .skip,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .work-card,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .filter-band,
html[data-theme="dark"] .kpi,
html[data-theme="dark"] .kpi-row.secondary,
html[data-theme="dark"] .chart-section,
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .report-choice,
html[data-theme="dark"] .upload-field input::file-selector-button,
html[data-theme="dark"] .presentation-decision.negative,
html[data-theme="dark"] #tab-content .kpi.negative,
html[data-theme="dark"] #tab-content .executive-kpis .kpi.negative,
html[data-theme="dark"] #tab-content .contract-ring>div,
html[data-theme="dark"] body.presentation-mode .presentation-result-sector .kpi.negative,
html[data-theme="dark"] body.presentation-mode .presentation-decision.negative,
html[data-theme="dark"] body.presentation-mode .presentation-finance-trend,
html[data-theme="dark"] body:not(.presentation-mode) .header-side .filter-clear,
html[data-theme="dark"] body .modal-head,
html[data-theme="dark"] body:not(.presentation-mode) .header-side .filter-popup,
html[data-theme="dark"] .portfolio-session,
html[data-theme="dark"] .portfolio-company select,
html[data-theme="dark"] .settings-card,
html[data-theme="dark"] #modal.modal-pdf .modal-body,
html[data-theme="dark"] .pdf-native-action,
html[data-theme="dark"] .executive-attention,
html[data-theme="dark"] .executive-ranking,
html[data-theme="dark"] .layout-editor li,
html[data-theme="dark"] #tab-content .modular-grid>:is(.chart-section,.overview-composition,.planning-highlights,.contract-position,.cost-top,.cost-groups,.information-coverage,.overview-planning,.quality-import,.quality-coverage,.quality-issues,.quality-origin,.quality-history,.planning-quality),
html[data-theme="dark"] #tab-content .modular-table-section.layout-widget,
html[data-theme="dark"] #tab-content .modular-grid>.layout-chart-section,
html[data-theme="dark"] #tab-content .modular-grid>.quality-classification,
html[data-theme="dark"] #tab-content .modular-grid>.contract-registration,
html[data-theme="dark"] .executive-extra,
html[data-theme="dark"] .executive-extra.presentation-sector,
html[data-theme="dark"] .executive-ranking.presentation-sector,
html[data-theme="dark"] .admin-topbar,
html[data-theme="dark"] .admin-button.ghost,
html[data-theme="dark"] .toolbar input,
html[data-theme="dark"] .toolbar select,
html[data-theme="dark"] .admin-form input,
html[data-theme="dark"] .admin-form select,
html[data-theme="dark"] .row-actions button,
html[data-theme="dark"] .project-card,
html[data-theme="dark"] .recovery-item button,
html[data-theme="dark"] .admin-form textarea,
html[data-theme="dark"] .recovery-item select,
html[data-theme="dark"] .play-icon,
html[data-theme="dark"] .login-page{background:var(--theme-surface) !important}
html[data-theme="dark"] button.danger,
html[data-theme="dark"] .toast.error,
html[data-theme="dark"] body button.danger:hover{background:var(--theme-danger-solid) !important}
html[data-theme="dark"] button.danger,
html[data-theme="dark"] .executive-kpis .kpi.negative,
html[data-theme="dark"] #tab-content .kpi.negative,
html[data-theme="dark"] #tab-content .executive-kpis .kpi.negative,
html[data-theme="dark"] #tab-content>.financial-flow .flow-step:nth-child(7),
html[data-theme="dark"] #tab-content .quality-import .quality-row .kpi:nth-child(3),
html[data-theme="dark"] body.presentation-mode .presentation-result-sector .kpi.negative,
html[data-theme="dark"] body.presentation-mode .presentation-flow-sector .flow-step:last-child,
html[data-theme="dark"] body.presentation-mode #modal.modal-presentation-center .presentation-measurement-flow .flow-step:last-child,
html[data-theme="dark"] body button.primary:hover,
html[data-theme="dark"] body:not(.presentation-mode) .work-header .actions button.primary:hover,
html[data-theme="dark"] body:not(.presentation-mode) .sidebar-bottom,
html[data-theme="dark"] body .filter-chip,
html[data-theme="dark"] body.presentation-mode .presentation-exit,
html[data-theme="dark"] body:not(.presentation-mode) .work-header [data-action="presentation"],
html[data-theme="dark"] .customize-button:hover,
html[data-theme="dark"] .layout-editor .layout-drop-target,
html[data-theme="dark"] .presentation-header .customize-button,
html[data-theme="dark"] .layout-size-choices button[aria-pressed="true"],
html[data-theme="dark"] .admin-button.danger,
html[data-theme="dark"] .row-actions button.danger,
html[data-theme="dark"] .notice.error,
html[data-theme="dark"] .auth-status[data-tone="error"],
html[data-theme="dark"] .auth-status[data-tone="success"]{border-color:var(--theme-line) !important}
html[data-theme="dark"] button.danger,
html[data-theme="dark"] .brand,
html[data-theme="dark"] .side-item:hover,
html[data-theme="dark"] .side-item.active,
html[data-theme="dark"] .toast,
html[data-theme="dark"] .toast button,
html[data-theme="dark"] .presentation-sector-number,
html[data-theme="dark"] .presentation-sector-heading h2,
html[data-theme="dark"] body:not(.presentation-mode) .side-item.active,
html[data-theme="dark"] body:not(.presentation-mode) .side-work.active,
html[data-theme="dark"] body:not(.presentation-mode) .topbar-tag,
html[data-theme="dark"] #tab-content .donut-center strong,
html[data-theme="dark"] #tab-content .cost-kpis .kpi-label svg,
html[data-theme="dark"] #tab-content .cost-rank,
html[data-theme="dark"] #tab-content>.financial-flow .flow-step:last-child span,
html[data-theme="dark"] #tab-content>.financial-flow .flow-step:last-child strong,
html[data-theme="dark"] #tab-content>.financial-flow .flow-step:last-child svg,
html[data-theme="dark"] #tab-content .contract-ring strong,
html[data-theme="dark"] #tab-content .entries-panel .entry-total:before,
html[data-theme="dark"] #tab-content .quality-import .quality-row .kpi-label svg,
html[data-theme="dark"] body.presentation-mode .presentation-header,
html[data-theme="dark"] body.presentation-mode .presentation-header h1,
html[data-theme="dark"] body.presentation-mode .presentation-exit,
html[data-theme="dark"] body button.danger,
html[data-theme="dark"] body:not(.presentation-mode) .sidebar .brand strong,
html[data-theme="dark"] body:not(.presentation-mode) .sidebar .side-item,
html[data-theme="dark"] body:not(.presentation-mode) .sidebar .side-item:hover,
html[data-theme="dark"] #sidebar-modules .side-item,
html[data-theme="dark"] body:not(.presentation-mode) .sidebar .side-item.active,
html[data-theme="dark"] #sidebar-modules .side-item.active,
html[data-theme="dark"] .side-context strong,
html[data-theme="dark"] .sidebar-signature,
html[data-theme="dark"] .portfolio-person strong,
html[data-theme="dark"] .portfolio-company label,
html[data-theme="dark"] .portfolio-company select,
html[data-theme="dark"] .settings-card h2,
html[data-theme="dark"] .settings-link,
html[data-theme="dark"] .pdf-native-action,
html[data-theme="dark"] .customize-button:hover,
html[data-theme="dark"] .executive-attention h2,
html[data-theme="dark"] .executive-ranking h2,
html[data-theme="dark"] .executive-attention li strong,
html[data-theme="dark"] .executive-ranking li button,
html[data-theme="dark"] .layout-editor,
html[data-theme="dark"] .drill-total,
html[data-theme="dark"] .entry-column-editor summary,
html[data-theme="dark"] .presentation-header .customize-button,
html[data-theme="dark"] .layout-library summary,
html[data-theme="dark"] .layout-widget-controls,
html[data-theme="dark"] .layout-widget-controls .layout-order,
html[data-theme="dark"] .layout-size-choices button[aria-pressed="true"],
html[data-theme="dark"] .drill-summary strong,
html[data-theme="dark"] .executive-extra h2,
html[data-theme="dark"] .extra-metric strong,
html[data-theme="dark"] .extra-period-list button,
html[data-theme="dark"] .admin-sidebar,
html[data-theme="dark"] .admin-nav button,
html[data-theme="dark"] .admin-sidebar-footer strong,
html[data-theme="dark"] .admin-sidebar-actions a,
html[data-theme="dark"] .admin-sidebar-actions button,
html[data-theme="dark"] .admin-button,
html[data-theme="dark"] .role-pill,
html[data-theme="dark"] .row-actions button,
html[data-theme="dark"] .admin-form legend,
html[data-theme="dark"] .mobile-menu,
html[data-theme="dark"] .support-banner,
html[data-theme="dark"] .skip-link,
html[data-theme="dark"] .button-outline,
html[data-theme="dark"] .entry-shell,
html[data-theme="dark"] .header-nav a,
html[data-theme="dark"] .hero-support,
html[data-theme="dark"] .play-icon,
html[data-theme="dark"] .hero-benefits>span,
html[data-theme="dark"] .login-story,
html[data-theme="dark"] .login-story-copy p,
html[data-theme="dark"] .field label{color:var(--theme-text) !important}
html[data-theme="dark"] .local-status>span{background:var(--theme-success-bg) !important}
html[data-theme="dark"] .badge,
html[data-theme="dark"] .badge.amber,
html[data-theme="dark"] .notice,
html[data-theme="dark"] .notice.error,
html[data-theme="dark"] .kpi-status,
html[data-theme="dark"] .coverage-band.complete,
html[data-theme="dark"] .coverage-band.warning,
html[data-theme="dark"] .executive-kpis .kpi.negative,
html[data-theme="dark"] .executive-kpis .kpi.positive,
html[data-theme="dark"] .reconciliation-state.complete,
html[data-theme="dark"] .reconciliation-state.partial,
html[data-theme="dark"] .presentation-decision.positive,
html[data-theme="dark"] body:not(.presentation-mode) .topbar-tag,
html[data-theme="dark"] #tab-content .kpi.negative .kpi-label svg,
html[data-theme="dark"] #tab-content .cost-kpis .kpi:nth-child(4) .kpi-label svg,
html[data-theme="dark"] #tab-content>.financial-flow .flow-step:nth-child(7),
html[data-theme="dark"] #tab-content .contract-metric svg,
html[data-theme="dark"] #tab-content .quality-import .quality-row .kpi:nth-child(3),
html[data-theme="dark"] #tab-content .quality-clear,
html[data-theme="dark"] body.presentation-mode .presentation-result-sector .kpi.negative .kpi-label svg,
html[data-theme="dark"] body.presentation-mode .presentation-flow-sector .flow-step:last-child,
html[data-theme="dark"] body.presentation-mode .presentation-decision.positive,
html[data-theme="dark"] body.presentation-mode #modal.modal-presentation-center .presentation-measurement-flow .flow-step:last-child,
html[data-theme="dark"] body .card-actions,
html[data-theme="dark"] body tbody tr:hover,
html[data-theme="dark"] #tab-content .executive-kpis .kpi.negative .kpi-label svg,
html[data-theme="dark"] #tab-content .report-category .report-choice:hover,
html[data-theme="dark"] body .modal-foot,
html[data-theme="dark"] body:not(.presentation-mode) .work-header [data-action="presentation"],
html[data-theme="dark"] #tab-content tfoot :is(th,td),
html[data-theme="dark"] #tab-content tbody tr:hover,
html[data-theme="dark"] .portfolio-company select:disabled,
html[data-theme="dark"] #modal.modal-pdf .pdf-preview-help,
html[data-theme="dark"] #modal.modal-pdf .pdf-preview-unavailable,
html[data-theme="dark"] .pdf-native-action:hover,
html[data-theme="dark"] .customize-button:hover,
html[data-theme="dark"] .executive-attention li button:hover,
html[data-theme="dark"] .layout-editor,
html[data-theme="dark"] .layout-editor .layout-drop-target,
html[data-theme="dark"] .entry-column-editor>div,
html[data-theme="dark"] .layout-widget-controls,
html[data-theme="dark"] .layout-direct-handle,
html[data-theme="dark"] .layout-drop-zone,
html[data-theme="dark"] .drill-summary,
html[data-theme="dark"] .drill-share-cell i,
html[data-theme="dark"] .admin-badge,
html[data-theme="dark"] .admin-button.danger,
html[data-theme="dark"] th,
html[data-theme="dark"] .status-pill.active,
html[data-theme="dark"] .status-pill.blocked,
html[data-theme="dark"] .status-pill.inactive,
html[data-theme="dark"] .status-pill.pending,
html[data-theme="dark"] .role-pill,
html[data-theme="dark"] .row-actions button.danger,
html[data-theme="dark"] .secret-result,
html[data-theme="dark"] .status-pill.success,
html[data-theme="dark"] .status-pill.denied,
html[data-theme="dark"] .status-pill.failure,
html[data-theme="dark"] .status-pill.archived,
html[data-theme="dark"] .recovery-note,
html[data-theme="dark"] .detail-summary,
html[data-theme="dark"] .support-banner,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .auth-status,
html[data-theme="dark"] .auth-status[data-tone="error"],
html[data-theme="dark"] .auth-status[data-tone="success"]{background:var(--theme-raised) !important}
html[data-theme="dark"] .notice,
html[data-theme="dark"] .drill-summary,
html[data-theme="dark"] .auth-status{border-left:3px solid var(--theme-line) !important}
html[data-theme="dark"] .kpi-status.warning,
html[data-theme="dark"] .layout-drop-zone.layout-drop-target,
html[data-theme="dark"] .button-login:disabled,
html[data-theme="dark"] .recovery-note:target{background:var(--theme-warning-bg) !important}
html[data-theme="dark"] .kpi-status.warning,
html[data-theme="dark"] .attention-warning .attention-level,
html[data-theme="dark"] .attention-link,
html[data-theme="dark"] .layout-editor .layout-handle,
html[data-theme="dark"] .layout-library li>span,
html[data-theme="dark"] .layout-direct-handle,
html[data-theme="dark"] .layout-drop-zone,
html[data-theme="dark"] .chart-drill-hint,
html[data-theme="dark"] .admin-nav button:hover,
html[data-theme="dark"] .admin-nav button[aria-current="page"],
html[data-theme="dark"] .status-pill.pending,
html[data-theme="dark"] .recovery-note,
html[data-theme="dark"] .panel-eyebrow,
html[data-theme="dark"] .field-heading a,
html[data-theme="dark"] .field-heading a:hover,
html[data-theme="dark"] .auth-status>span{color:var(--theme-gold) !important}
html[data-theme="dark"] .presentation-decision.negative strong,
html[data-theme="dark"] #tab-content .kpi.negative .kpi-label svg,
html[data-theme="dark"] #tab-content>.financial-flow .flow-step:nth-child(7) strong,
html[data-theme="dark"] #company-switch-status,
html[data-theme="dark"] .attention-critical .attention-level,
html[data-theme="dark"] .status-pill.blocked,
html[data-theme="dark"] .status-pill.inactive,
html[data-theme="dark"] .status-pill.denied,
html[data-theme="dark"] .status-pill.failure,
html[data-theme="dark"] .auth-status[data-tone="error"]>span{color:var(--theme-danger) !important}
html[data-theme="dark"] .presentation-decision.positive strong,
html[data-theme="dark"] #tab-content .quality-clear svg,
html[data-theme="dark"] #tab-content .quality-clear strong,
html[data-theme="dark"] .status-pill.active,
html[data-theme="dark"] .status-pill.success,
html[data-theme="dark"] .auth-status[data-tone="success"]>span{color:var(--theme-success) !important}
html[data-theme="dark"] #tab-content .quality-import .quality-row .kpi:nth-child(3) .kpi-label svg,
html[data-theme="dark"] body button.primary:hover,
html[data-theme="dark"] body:not(.presentation-mode) .work-header .actions button.primary:hover,
html[data-theme="dark"] #tab-content .legend-dot.withheld,
html[data-theme="dark"] #tab-content .legend-dot.planned,
html[data-theme="dark"] body.presentation-mode .presentation-plot-legend i.planned,
html[data-theme="dark"] .drill-share-cell b{background:var(--theme-gold) !important}
html[data-theme="dark"] #tab-content .quality-clear,
html[data-theme="dark"] #modal.modal-pdf .pdf-preview-unavailable,
html[data-theme="dark"] .customize-button,
html[data-theme="dark"] .executive-attention,
html[data-theme="dark"] .executive-ranking,
html[data-theme="dark"] .layout-editor,
html[data-theme="dark"] .layout-editor li,
html[data-theme="dark"] #tab-content .modular-grid>:is(.chart-section,.overview-composition,.planning-highlights,.contract-position,.cost-top,.cost-groups,.information-coverage,.overview-planning,.quality-import,.quality-coverage,.quality-issues,.quality-origin,.quality-history,.planning-quality),
html[data-theme="dark"] #tab-content .modular-table-section.layout-widget,
html[data-theme="dark"] #tab-content .modular-grid>.layout-chart-section,
html[data-theme="dark"] #tab-content .modular-grid>.quality-classification,
html[data-theme="dark"] #tab-content .modular-grid>.contract-registration,
html[data-theme="dark"] .layout-widget-controls,
html[data-theme="dark"] .layout-direct-handle,
html[data-theme="dark"] .drill-summary,
html[data-theme="dark"] .executive-extra,
html[data-theme="dark"] .notice,
html[data-theme="dark"] .secret-result,
html[data-theme="dark"] .recovery-note,
html[data-theme="dark"] .support-banner,
html[data-theme="dark"] .scope-grid,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .auth-status{border:1px solid var(--theme-line) !important}
html[data-theme="dark"] #tab-content .quality-clear span,
html[data-theme="dark"] body:not(.presentation-mode) .sidebar .brand-signature,
html[data-theme="dark"] body:not(.presentation-mode) .sidebar-label,
html[data-theme="dark"] body:not(.presentation-mode) .local-status,
html[data-theme="dark"] body:not(.presentation-mode) .local-status small,
html[data-theme="dark"] body.presentation-mode .presentation-brand span,
html[data-theme="dark"] body.presentation-mode .presentation-meta,
html[data-theme="dark"] body:not(.presentation-mode) .sidebar .side-item svg,
html[data-theme="dark"] .side-context>svg,
html[data-theme="dark"] .side-context span,
html[data-theme="dark"] body:not(.presentation-mode) .sidebar .local-status,
html[data-theme="dark"] .portfolio-company select:disabled,
html[data-theme="dark"] #modal.modal-pdf .pdf-preview-help,
html[data-theme="dark"] .executive-attention p,
html[data-theme="dark"] .executive-ranking p,
html[data-theme="dark"] .executive-attention li button,
html[data-theme="dark"] .executive-ranking li small,
html[data-theme="dark"] .layout-editor p,
html[data-theme="dark"] .layout-editor li label small,
html[data-theme="dark"] .layout-editor-foot span,
html[data-theme="dark"] #tab-content .modular-grid .planning-status,
html[data-theme="dark"] .layout-position-label,
html[data-theme="dark"] .drill-summary span,
html[data-theme="dark"] .drill-summary small,
html[data-theme="dark"] .executive-extra>p,
html[data-theme="dark"] .extra-metric span,
html[data-theme="dark"] .extra-metric small,
html[data-theme="dark"] .admin-brand small,
html[data-theme="dark"] .admin-sidebar-footer,
html[data-theme="dark"] th,
html[data-theme="dark"] .dialog-close,
html[data-theme="dark"] .status-pill.archived,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field input::placeholder,
html[data-theme="dark"] .auth-status p,
html[data-theme="dark"] .recovery-note,
html[data-theme="dark"] .login-bottom{color:var(--theme-muted) !important}
html[data-theme="dark"] body:not(.presentation-mode) .sidebar{border-right:1px solid var(--theme-line) !important}
html[data-theme="dark"] body:not(.presentation-mode) .sidebar .side-item:hover,
html[data-theme="dark"] body:not(.presentation-mode) .sidebar .side-item.active,
html[data-theme="dark"] body.presentation-mode .presentation-exit:hover,
html[data-theme="dark"] #sidebar-modules .side-item.active,
html[data-theme="dark"] .side-context,
html[data-theme="dark"] .layout-widget-controls .layout-order,
html[data-theme="dark"] .layout-size-choices button[aria-pressed="true"]{background:var(--theme-nav) !important}
html[data-theme="dark"] body .empty-state{border:1px dashed var(--theme-line) !important}
html[data-theme="dark"] #tab-content .executive-kpis .kpi,
html[data-theme="dark"] body.presentation-mode .presentation-result-sector .kpi,
html[data-theme="dark"] .layout-editor{border-top:3px solid var(--theme-line) !important}
html[data-theme="dark"] #sidebar-modules,
html[data-theme="dark"] body:not(.presentation-mode) .sidebar .sidebar-works,
html[data-theme="dark"] body:not(.presentation-mode) .sidebar .sidebar-bottom,
html[data-theme="dark"] #tab-content tfoot :is(th,td),
html[data-theme="dark"] .executive-attention li,
html[data-theme="dark"] .layout-library,
html[data-theme="dark"] .extra-metric small,
html[data-theme="dark"] .project-users{border-top:1px solid var(--theme-line) !important}
html[data-theme="dark"] .session-avatar{background:var(--ob-champagne,var(--theme-gold)) !important}
html[data-theme="dark"] .customize-button{color:var(--muted,var(--theme-muted)) !important}
html[data-theme="dark"] .executive-ranking li,
html[data-theme="dark"] .drill-breadcrumb,
html[data-theme="dark"] .extra-period-list li,
html[data-theme="dark"] th,
html[data-theme="dark"] td,
html[data-theme="dark"] .activity-item{border-bottom:1px solid var(--theme-line) !important}
html[data-theme="dark"] .layout-drop-zone{border:2px dashed var(--theme-line) !important}
html[data-theme="dark"] .admin-sidebar{background:linear-gradient(180deg,var(--admin-navy),var(--theme-nav)) !important}
html[data-theme="dark"] .admin-button.gold{background:linear-gradient(135deg,var(--theme-gold),var(--theme-gold)) !important}
html[data-theme="dark"] .notice,
html[data-theme="dark"] .support-banner[data-level="ADMINISTRATION"],
html[data-theme="dark"] #support-context{border-left:4px solid var(--theme-line) !important}
html[data-theme="dark"] .scope-grid fieldset{border:1px solid var(--line,var(--theme-line)) !important}
html[data-theme="dark"] .button-gold{background:linear-gradient(130deg,var(--theme-gold),var(--theme-gold)) !important}
html[data-theme="dark"] .button-gold:hover:not(:disabled){background:linear-gradient(130deg,var(--theme-warning-bg),var(--theme-gold)) !important}

html[data-theme="dark"] :is(input,select,textarea,option){background-color:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--theme-control-line)!important;accent-color:var(--theme-gold)}
html[data-theme="dark"] :is(dialog,.admin-dialog){background:var(--theme-surface);color:var(--theme-text)}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:var(--theme-muted);opacity:1}
html[data-theme="dark"] :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid var(--theme-gold)!important;outline-offset:3px}
html[data-theme="dark"] :is(input,select,textarea,button):disabled{opacity:.7}
html[data-theme="dark"] :is(th,td,.activity-item,.project-users){border-color:var(--theme-line)!important}
html[data-theme="dark"] :is(.admin-form legend,.portfolio-person strong,.portfolio-company label,.settings-card h2,.settings-link){color:var(--theme-text)!important}
html[data-theme="dark"] body button.primary,html[data-theme="dark"] body:not(.presentation-mode) .work-header .actions button.primary{background:var(--theme-gold)!important;color:#0c2330!important;border-color:var(--theme-gold)!important}
html[data-theme="dark"] .admin-button.gold,html[data-theme="dark"] .button-gold{color:#0c2330!important;background:var(--theme-gold)!important}
html[data-theme="dark"] .quality-coverage-ring{--ob-petrol:var(--theme-link)}
html[data-theme="dark"] :is(.legend-dot.actual,.presentation-plot-legend i.actual,.presentation-cost-track span){background:var(--theme-link)!important}
html[data-theme="dark"] body .session-avatar{background:var(--theme-gold)!important;color:#0c2330!important}
html[data-theme="dark"] :is(.pdf-preview-help,.pdf-preview-unavailable){color:var(--theme-text)!important}
html[data-theme="dark"] .pdf-frame{color-scheme:light;background:#fff}
html[data-theme="dark"] .login-panel{background:var(--theme-surface);color:var(--theme-text)}
html[data-theme="dark"] .login-panel :is(h1,h2){color:var(--theme-text)}
html[data-theme="dark"] .login-panel .button-login{color:#0c2330}
}
