/* Semantic states must survive the neutral dark control palette. */
html[data-theme=dark]{--state-success-bg:#17392f;--state-success-ink:#96edcd;--state-success-line:#397d65;--state-pending-bg:#352e1c;--state-pending-ink:#f0d58d;--state-pending-line:#806c37;--state-error-bg:#38232d;--state-error-ink:#f0adbd;--state-error-line:#855063;--state-info-bg:#202e40;--state-info-ink:#b0cef4;--state-info-line:#4d6e98}
html[data-theme=dark] body #profile-panel #dashboardOverview .uid-status:not(:empty){display:inline-flex;align-items:center;justify-self:start;max-width:100%;padding:7px 11px;border-radius:9px;border:1px solid var(--desk-line);box-shadow:none!important;line-height:1.45;opacity:1}
html[data-theme=dark] body #profile-panel #dashboardOverview .uid-status.uid-status--approved:not(:empty),
html[data-theme=dark] body #profile-panel #dashboardOverview .access-active :is(.access-state,.access-remaining){background:var(--state-success-bg)!important;color:var(--state-success-ink)!important;border-color:var(--state-success-line)!important}
html[data-theme=dark] body #profile-panel #dashboardOverview .uid-status.uid-status--pending:not(:empty),
html[data-theme=dark] body #profile-panel #dashboardOverview .access-upcoming .access-state{background:var(--state-pending-bg)!important;color:var(--state-pending-ink)!important;border-color:var(--state-pending-line)!important}
html[data-theme=dark] body #profile-panel #dashboardOverview .uid-status.uid-status--rejected:not(:empty),
html[data-theme=dark] body #profile-panel #dashboardOverview .access-expired .access-state{background:var(--state-error-bg)!important;color:var(--state-error-ink)!important;border-color:var(--state-error-line)!important}
html[data-theme=dark] body #profile-panel #dashboardOverview .uid-status.uid-status--unsaved:not(:empty){background:var(--state-info-bg)!important;color:var(--state-info-ink)!important;border-color:var(--state-info-line)!important}
html[data-theme=dark] body #profile-panel #uid-form button.primary:not(:disabled){background:#3ff5c4!important;color:#09271d!important;border-color:#3ff5c4!important;box-shadow:none!important}
html[data-theme=dark] body #profile-panel #uid-form button.primary:hover:not(:disabled){background:#71f7d3!important;color:#09271d!important;border-color:#71f7d3!important}
html[data-theme=dark] body :is(#auth-panel,#recovery-panel) button.primary:not(:disabled){background:#3ff5c4!important;color:#09271d!important;border-color:#3ff5c4!important}
html[data-theme=dark] body :is(#auth-panel,#recovery-panel) button.primary:hover:not(:disabled){background:#71f7d3!important;color:#09271d!important}
html[data-theme=dark] body #auth-panel button.link-button:not(:disabled){background:transparent!important;color:#96edcd!important;border-color:transparent!important;text-decoration:underline;text-underline-offset:3px}
html[data-theme=dark] body #profile-panel :is(#journalWorkspace,#courseWorkspace) button.primary:disabled,
html[data-theme=dark] body #profile-panel #uid-form button.primary:disabled,
html[data-theme=dark] body :is(#auth-panel,#recovery-panel) button.primary:disabled{background:#252b34!important;color:#9faab8!important;border-color:#485362!important;box-shadow:none!important;cursor:not-allowed}
html[data-theme=dark] body #profile-panel :is(#journalWorkspace,#courseWorkspace) :is(input[type=checkbox],input[type=radio],progress){accent-color:#3ff5c4}
html[data-theme=dark] body #admin-tools #manual-access-list .request[data-access-state=active]{border-top-color:var(--state-success-line)!important;border-left-color:var(--state-success-line)!important}
html[data-theme=dark] body #admin-tools #manual-access-list .request[data-access-state=inactive]{border-top-color:var(--state-pending-line)!important;border-left-color:var(--state-pending-line)!important}
html[data-theme=dark] body #journalWorkspace dialog input::file-selector-button{background:#284b40;color:#b7f4df;border-color:#397d65}
html[data-theme=dark] body .courseImageViewerBar button{background:#1d222a;color:#edf0f4;border-color:#485362}
html[data-theme=dark] body :is(#profile-panel,#auth-panel,#recovery-panel) :is(button,a,input,select,textarea,summary):focus-visible{outline:2px solid #96edcd;outline-offset:3px}
/* Rolling 24h spot change: sign and label remain readable without colour. */
html[data-theme] body #dashboardOverview .market-tile .market-change{display:inline-flex;align-items:center;max-width:100%;gap:4px;margin-top:8px;padding:4px 8px;border-radius:6px;background:#e7ece9;color:#52655e;font-size:12px;font-weight:600;line-height:1.45;letter-spacing:0;font-variant-numeric:tabular-nums;white-space:nowrap}
html[data-theme] body #dashboardOverview .market-tile .market-change.is-up{background:#e0f3e9;color:#146346}
html[data-theme] body #dashboardOverview .market-tile .market-change.is-down{background:#fbe8ed;color:#a52f49}
html[data-theme=dark] body #dashboardOverview .market-tile .market-change{background:#252b34;color:#b1bbc8}
html[data-theme=dark] body #dashboardOverview .market-tile .market-change.is-up{background:#17392f;color:#96edcd}
html[data-theme=dark] body #dashboardOverview .market-tile .market-change.is-down{background:#38232d;color:#f0adbd}
@media(max-width:600px){html[data-theme] body #dashboardOverview .market-tile .market-change{font-size:11px;padding:3px 6px;margin-top:6px}}
/* Compact reviewed UID badges in both themes and on every screen. */
html[data-theme] body #profile-panel #dashboardOverview .uid-status:not(:empty){display:inline-flex;align-items:center;justify-self:start;align-self:start;width:fit-content;max-width:100%;min-height:0;height:auto;padding:3px 7px;border-radius:6px;font-size:10px;font-weight:600;line-height:1.35;letter-spacing:0;box-sizing:border-box;margin-top:4px}
