:root { --ui-bg:#f5f7fa; --ui-surface:#fff; --ui-text:#15253e; --ui-muted:#68778d; --ui-border:#dce4ef; --ui-soft:#eef3fb; --ui-link:#315efb; }
.display-preferences { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.display-preferences form,.display-preferences label { display:flex; align-items:center; gap:5px; margin:0; }
.display-preferences select { font:inherit; font-size:12px; max-width:128px; border:1px solid var(--ui-border); border-radius:7px; padding:7px 5px; background:var(--ui-surface); color:var(--ui-text); }
.preference-label { font-size:12px; color:var(--ui-muted); }
.language-apply { border:1px solid var(--ui-border); background:var(--ui-surface); color:var(--ui-text); border-radius:6px; font-size:12px; }
.login-preferences { position:absolute; right:24px; top:24px; z-index:5; }
[data-theme="dark"] { --ui-bg:#101827; --ui-surface:#192438; --ui-text:#e8effa; --ui-muted:#acbbcf; --ui-border:#35465f; --ui-soft:#23334d; --ui-link:#8caeff; --rd-ink:var(--ui-text); --rd-muted:var(--ui-muted); --rd-line:var(--ui-border); --rd-bg:var(--ui-bg); --a-text:var(--ui-text); --a-muted:var(--ui-muted); --a-line:var(--ui-border); --a-blue:var(--ui-link); }
[data-theme="dark"] body { background:var(--ui-bg)!important; color:var(--ui-text); }
[data-theme="dark"] :is(.az-header,.az-navbar,.az-footer,.az-profile-menu .dropdown-menu,.az-header .dropdown-menu,.modal-content,.card,.auth-panel,.request-card,.success-card,.resource-card,.workflow-empty,#myTab,#myTabContent,.analysis-entry,.document-card,.definition-field-group,.select2-dropdown,.select2-selection) { background:var(--ui-surface)!important; color:var(--ui-text); border-color:var(--ui-border)!important; }
[data-theme="dark"] :is(h1,h2,h3,h4,h5,h6,label,dt,.az-navbar .nav-link,.az-header .nav-link,.resource-card h2,.resource-stats dd,.analysis-entry-heading,.document-card h4) { color:var(--ui-text); }
[data-theme="dark"] :is(.text-muted,.workflow-subtitle,.resource-description,.resource-stats dt,.az-content-breadcrumb,.intro,.account-request small) { color:var(--ui-muted)!important; }
[data-theme="dark"] a:not(.btn):not(.auth-submit):not(.nav-link) { color:var(--ui-link); }
[data-theme="dark"] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),select,textarea,.form-control,.select2-selection) { background:var(--ui-bg)!important; color:var(--ui-text)!important; border-color:var(--ui-border)!important; }
[data-theme="dark"] :is(input,textarea)::placeholder { color:var(--ui-muted); opacity:1; }
[data-theme="dark"] :is(.resource-hero,.workflow-hero,.resource-card--featured) { background:linear-gradient(115deg,#20334f,#193b3c)!important; border-color:var(--ui-border)!important; }
[data-theme="dark"] :is(.resource-hero .resource-kpi,.resource-kpi,.account-request,.analysis-entry-heading:hover,.analysis-entry[open] > .analysis-entry-heading) { background:var(--ui-soft)!important; }
[data-theme="dark"] :is(table,table tbody,table td) { background-color:var(--ui-surface); color:var(--ui-text)!important; border-color:var(--ui-border)!important; }
[data-theme="dark"] :is(table th,table thead,#dataTableBrut th) { background:var(--ui-soft)!important; color:var(--ui-text)!important; border-color:var(--ui-border)!important; }
[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd) td { background-color:var(--ui-soft); }
[data-theme="dark"] #myTab .nav-link { color:var(--ui-muted); }
[data-theme="dark"] #myTab .nav-link.active { background:var(--ui-soft); color:var(--ui-link); }
[data-theme="dark"] .select2-results__option { color:var(--ui-text); }
[data-theme="dark"] .select2-results__option[aria-selected="true"] { background:var(--ui-soft); }
[data-theme="dark"] .close { color:var(--ui-text); text-shadow:none; }
[data-theme="dark"] { --wf-ink:var(--ui-text); --wf-muted:var(--ui-muted); --wf-border:var(--ui-border); --wf-surface:var(--ui-surface); }
[data-theme="dark"] .resource-detail-hero { background:linear-gradient(115deg,#20334f,#193b3c); border-color:var(--ui-border); }
[data-theme="dark"] :is(.resource-detail-kpis>div,.resource-stats,.resource-card--featured .resource-stats) { background:var(--ui-soft); border-color:var(--ui-border); }
[data-theme="dark"] .resource-card--featured .resource-title-wrap h2 { color:var(--ui-text)!important; }
[data-theme="dark"] :is(.resource-status,.resource-detail-kpis .resource-status.is-ready strong) { color:#6fd5a3; }
[data-theme="dark"] .resource-status--updating { color:#f5c572; }
[data-theme="dark"] :is(.az-navbar .nav-sub,.az-navbar .nav-sub-mega,.az-profile-menu .dropdown-item,.az-header-notification .dropdown-menu) { background:var(--ui-surface); color:var(--ui-text); }
[data-theme="dark"] .resource-newsletter { background:rgba(25,36,56,.78)!important; border-color:var(--ui-border)!important; color:var(--ui-text); }
[data-theme="dark"] :is(.analytics-brand,.auth-logo,.mobile-logo) img { background:#fff; border-radius:5px; padding:3px; }
[data-theme="dark"] .auth-story h1 { color:#fff; }
[data-theme="dark"] .auth-submit { background:linear-gradient(100deg,#1769ff,#3157e4); }
[data-theme="dark"] :is(.workflow-eyebrow,.resource-detail-eyebrow,.auth-panel .auth-kicker) { color:#91b2ff; }
[data-theme="dark"] :is(.resource-document-card,.resource-document-empty,.sync-progress,.bg-white,.bg-light) { background:var(--ui-surface)!important; border-color:var(--ui-border)!important; }
[data-theme="dark"] :is(.resource-documents-header h3,.resource-document-title,.resource-newsletter-copy h3) { color:var(--ui-text); }
[data-theme="dark"] :is(.resource-document-description,.resource-document-meta,.resource-newsletter-copy p) { color:var(--ui-muted); }
[data-theme="dark"] { --ink:var(--ui-text); --muted:var(--ui-muted); --line:var(--ui-border); }
[data-theme="dark"] .landing :is(.hero,.workflow) { background:var(--ui-bg); }
[data-theme="dark"] .landing :is(.preview,.steps article,.secondary) { background:var(--ui-surface); border-color:var(--ui-border); }
[data-theme="dark"] .landing :is(.pyramid p,.preview aside) { background:var(--ui-soft); color:var(--ui-text); }
[data-theme="dark"] .landing .proof { color:var(--ui-muted); }
.display-preferences select:focus-visible { outline:2px solid var(--ui-link); outline-offset:2px; }
/* Vendor sorted cells and pagination set their own light backgrounds. */
html[data-theme="dark"] table.dataTable tbody tr > td,
html[data-theme="dark"] table.dataTable tbody tr > th { background:var(--ui-surface)!important; color:var(--ui-text)!important; box-shadow:none!important; }
html[data-theme="dark"] table.dataTable tbody tr:nth-child(odd) > td,
html[data-theme="dark"] table.dataTable tbody tr:nth-child(odd) > th { background:var(--ui-soft)!important; }
html[data-theme="dark"] table.dataTable tbody tr:hover > td { background:var(--ui-border)!important; }
[data-theme="dark"] :is(.dataTables_info,.dataTables_length,.dataTables_filter,.dataTables_paginate,.az-content-label) { color:var(--ui-muted)!important; }
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button { background:var(--ui-surface)!important; color:var(--ui-text)!important; border-color:var(--ui-border)!important; }
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current { background:var(--ui-soft)!important; color:var(--ui-link)!important; }
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled { color:var(--ui-muted)!important; opacity:.65; }
[data-theme="dark"] { --province-ink:var(--ui-text); --province-muted:var(--ui-muted); --province-surface:var(--ui-surface); --province-border:var(--ui-border); }
[data-theme="dark"] .province-hero { background:linear-gradient(115deg,#20334f,#193b3c); border-color:var(--ui-border); }
[data-theme="dark"] :is(.province-eyebrow,.tracking-kicker) { color:#91b2ff; }
[data-theme="dark"] :is(.province-updated,.workflow-meta) { color:var(--ui-muted)!important; }
[data-theme="dark"] :is(.province-card-content,.province-empty-state,.workflow-card-content,.tracking-panel:not(.tracking-hero),.tracking-metric,.field-checkbox-group,.manual-action-box,.manual-progress) { background:var(--ui-surface); color:var(--ui-text); border-color:var(--ui-border); }
[data-theme="dark"] :is(.province-toggle,.workflow-toggle,.workflow-secondary) { background:var(--ui-soft)!important; color:var(--ui-text)!important; border-color:var(--ui-border)!important; }
[data-theme="dark"] .t-container-content ul .content>li { color:var(--ui-muted)!important; border-color:var(--ui-border); }
[data-theme="dark"] .tracking-shell { color:var(--ui-text); }
[data-theme="dark"] :is(.tracking-small,.tracking-empty,.tracking-hint,.tracking-field .helptext,.tracking-table td small) { color:var(--ui-muted); }
[data-theme="dark"] :is(.tracking-history pre,.tracking-tag:not(.danger):not(.warning):not(.ok),.badge-field-count) { background:var(--ui-soft); color:var(--ui-text); }
[data-theme="dark"] .field-checkbox-item { border-color:var(--ui-border); }
[data-theme="dark"] .field-checkbox-item:hover { background:var(--ui-soft); }
[data-theme="dark"] .nav-tabs .nav-link { color:var(--ui-muted); }
[data-theme="dark"] .nav-tabs .nav-link:is(.active,:hover,:focus-visible) { background:var(--ui-soft); color:var(--ui-link); }
[data-theme="dark"] .card .text-primary { color:var(--ui-link)!important; }
[data-theme="dark"] .btn-outline-primary { color:var(--ui-link); border-color:var(--ui-link); }
[data-theme="dark"] .btn-outline-secondary { color:var(--ui-muted); border-color:var(--ui-muted); }
[data-theme="dark"] :is(.btn-outline-primary,.btn-outline-secondary):is(:hover,:focus-visible) { background:var(--ui-soft); color:var(--ui-text); }
@media(max-width:575px) { .az-header>.container-fluid { flex-wrap:wrap; height:auto; min-height:70px; padding-top:8px; padding-bottom:8px; gap:8px; } .az-header { height:auto; } .az-header-right { margin-left:auto; } .az-header-right>.az-header-message,.az-header-right>.az-header-notification { display:none; } }
@media(max-width:767px) { .az-header-right { flex-wrap:wrap; justify-content:flex-end; } .display-preferences .preference-label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); } .login-preferences { right:12px; top:15px; } .az-header .display-preferences { gap:4px; } }
@media print { :root,[data-theme="dark"] { --ui-bg:#fff; --ui-surface:#fff; --ui-text:#111; --ui-muted:#555; --ui-border:#ddd; --ui-soft:#f5f5f5; --ui-link:#111; color-scheme:light!important; } .display-preferences,.resource-newsletter { display:none!important; } [data-theme="dark"] :is(body,.resource-hero,.resource-detail-hero,.workflow-hero,.province-hero,.resource-card--featured) { background:#fff!important; color:#111!important; } }
