/* Operational UI layer. Brand/marketing tokens remain generated and unchanged.
   Loaded after page styles so the shared dashboard has one surface hierarchy. */
[data-theme="uo-dark"] {
    --color-primary: #b5a6ee;
    --p: 76.42% .1027 293.38;
    --pc: 23.65% .0511 294.08;
    --color-text: #edf2fa;
    --bg-input: #111b2b;
    --bg-input-focus: #1b2940;
    --accent-primary-bg: rgba(181, 166, 238, .10);
    --accent-primary-border: rgba(181, 166, 238, .28);
    --text-on-accent: #201934;
    --color-page: #0e1522;
    --color-surface: #172131;
    --color-surface-2: #202d40;
    --bg-page: var(--color-page);
    --bg-sidebar: #111a29;
    --bg-card: var(--color-surface);
    --bg-card-hover: var(--color-surface-2);
    --color-text-muted: #9daec4;
    --text-muted: var(--color-text-muted);
    --text-secondary: #c2cddd;
    --border-default: rgba(210, 220, 240, .11);
    --border-strong: rgba(210, 220, 240, .2);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .12);
    --shadow-card-hover: var(--shadow-card);
    --b1: 20% .025 260;
    --b2: 25% .033 260;
    --b3: 30% .04 260;
}
[data-theme="uo-light"] {
    --color-primary: #6750a4;
    --p: 49.55% .1305 293.71;
    --pc: 100% 0 0;
    --color-text: #1e2b40;
    --color-surface: #ffffff;
    --bg-input: #f4f7fb;
    --bg-input-focus: #edf1f8;
    --accent-primary-bg: rgba(103, 80, 164, .08);
    --accent-primary-border: rgba(103, 80, 164, .24);
    --text-on-accent: #ffffff;
    --color-page: #f2f5fa;
    --color-surface-2: #e9eef6;
    --bg-page: var(--color-page);
    --bg-sidebar: #f8faff;
    --bg-card-hover: var(--color-surface-2);
    --color-text-muted: #5d6c82;
    --text-muted: var(--color-text-muted);
    --text-secondary: #46566e;
    --border-default: rgba(30, 45, 65, .12);
    --border-strong: rgba(30, 45, 65, .22);
    --shadow-card: 0 1px 2px rgba(25, 35, 55, .035);
    --shadow-card-hover: var(--shadow-card);
    --b1: 97% .003 265;
    --b2: 100% 0 265;
    --b3: 95% .006 265;
}
[data-theme="uo-dark"], [data-theme="uo-light"] {
    --accent-primary: var(--color-primary);
    --accent-teal: var(--color-primary);
    --accent-teal-bg: var(--accent-primary-bg);
    --border-accent: var(--accent-primary-border);
    --text-primary: var(--color-text);
    --bg-card: var(--color-surface);
    --chart-text: var(--text-secondary);
    --font-display: var(--font-body);
    --font-size-sm: .875rem;
    --rounded-box: .75rem;
    --radius-lg: 12px;
    --glow-primary: transparent;
    --glow-success: transparent;
}
.uo-btn-primary, .sidebar-logo {
    background: var(--accent-primary);
    box-shadow: none;
}
.uo-btn-primary:hover, .sidebar-logo:hover {
    box-shadow: none;
    transform: none;
}
.sidebar-brand {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--text-primary);
}
.menu li > a.active, .menu li > a:focus { box-shadow: none; }
.menu .nav-row > a { min-height: 38px; font-size: .875rem; }
.uo-btn-primary, .uo-btn-secondary, .form-input { font-size: .875rem; }
.border-beam.signature::before, .card-interactive.signature::before { display: none; }
.glow-hover:hover { transform: none; }
.swal2-popup .swal2-confirm {
    background: var(--accent-primary) !important;
    box-shadow: none !important;
}
.swal2-popup .swal2-confirm:hover { box-shadow: none !important; transform: none; }

/* Dense working surfaces retain their structure and existing density controls. */
.sub-filter-bar select, .sub-filter-bar input { font-size: .875rem; min-height: 36px; }
.sub-filter-bar { gap: 12px; }
.sub-filter-date { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: .75rem; }
.sub-filter-date input { width: 145px; }
.sub-filter-bar :is(input, select):focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 2px; }
.ws-pill-label { font-size: .75rem; opacity: 1; color: var(--text-secondary); }
.ws-pill { gap: .4rem; }
.ws-save-status { font-size: .75rem; }
.ws-sidebar-btn { opacity: .8; }
.uo-tabs:has(.ws-tab) { max-width: calc(100% - 2rem); }
.template-card:hover { transform: none; }
#logins-results table { min-width: 48rem; }

/* Home: role-specific work first; reports are available without a wall of charts. */
.portal-home .po-work { padding: 20px 24px; gap: 16px; }
.portal-home .po-work__title { font-size: 1.375rem; font-weight: 650; line-height: 1.3; }
.portal-home .po-work__what { font-size: .875rem; line-height: 1.6; }
.portal-home .po-work__body { min-width: 0; flex-basis: 240px; }
.portal-home .po-work__icon { width: 40px; height: 40px; }
.portal-home .po-deck-wrap::before, .portal-home .po-eyebrow::before { display: none; }
.portal-home .po-eyebrow { font-size: .75rem; letter-spacing: .08em; }
.portal-home .po-tile { border-left: 0; padding: 20px 24px; gap: 8px; }
.portal-home .po-tile + .po-tile { border-left: 1px solid var(--border-default); }
.portal-home .po-tile__label { font-size: .75rem; letter-spacing: .04em; }
.portal-home .po-tile__num { font-family: var(--font-numeric); line-height: 1.2; }
.portal-home .po-tile--accent .po-tile__num { color: var(--text-primary); }
.portal-home .po-livedot { box-shadow: none; animation: none; }
.portal-home .po-area:hover { transform: none; }
.portal-home .po-area__icon { background: var(--bg-input); border-color: var(--border-default); color: var(--text-secondary); }
.portal-home .po-area__title { font-family: var(--font-body); }
.portal-home .po-areas--compact .po-area__desc { font-size: .875rem; line-height: 1.5; }
.portal-home .po-rise { opacity: 1; animation: none; transform: none; }
.portal-home .ceo-table { font-size: .875rem; }
.portal-home .ceo-table th, .portal-home .ceo-table td { padding: 10px 12px; }
.portal-home .ceo-table thead th { font-size: .75rem; text-transform: none; letter-spacing: 0; }
.portal-home .ceo-card__title, .portal-home .ceo-bar-name { font-size: .875rem; }
.portal-home .ceo-card__sub, .portal-home .ceo-legend { font-size: .75rem; }
.portal-home .ceo-bar-row { grid-template-columns: minmax(120px, 1fr) 2fr 40px; }
.po-report-group { border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--bg-card); }
.po-report-group > summary { cursor: pointer; padding: 16px 20px; font-size: .875rem; font-weight: 600; color: var(--text-primary); }
.po-report-group > summary:hover { background: var(--bg-card-hover); border-radius: inherit; }
.po-report-group > summary:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 3px; border-radius: inherit; }
.po-report-group[open] > summary { border-bottom: 1px solid var(--border-default); }
.po-report-group .po-widgets { padding: 16px; }
@media (max-width: 720px) {
    .portal-home .po-tile { padding: 16px; }
    .portal-home .po-tile:nth-child(3) { border-left: 0; }
    .portal-home .po-work { padding: 16px; }
    .portal-home .po-areas, .portal-home .po-areas--compact { grid-template-columns: minmax(0, 1fr); }
    .portal-home .po-work__cta { white-space: normal; }
    .po-report-group .po-widgets { padding: 8px; }
}
