/* Norella V11.19 — unified theme foundation: no mixed fixed dark/light panels. */
:root{
 --bg:var(--theme-bg);--panel:var(--theme-surface);--panel-2:var(--theme-surface2);
 --card:var(--theme-tile);--stroke:var(--theme-border);--text:var(--theme-text);--muted:var(--theme-muted);
 --surface:var(--theme-surface);--surface-2:var(--theme-surface2);--border:var(--theme-border);
}
/* The CEO and buyer dashboards should never inherit a hard-coded theme from V8.6. */
.norella-ceo-overview,
.norella-ceo-metrics>div,
.norella-ceo-overview .norella-ceo-metrics>div,
.norella-dashboard-panel{
 background:var(--theme-surface)!important;
 border-color:var(--theme-border)!important;
 color:var(--theme-text)!important;
}
.norella-ceo-metrics>div{background:var(--theme-surface2)!important}
.norella-ceo-overview h2,.norella-ceo-overview h3,.norella-ceo-overview b,
.norella-ceo-metrics strong,.norella-ceo-metrics b{color:var(--theme-text)!important}
.norella-ceo-overview p,.norella-ceo-overview small,.norella-ceo-overview .muted{color:var(--theme-muted)!important;opacity:1!important}
.norella-ceo-overview .btn,.norella-ceo-overview button:not(.btn){color:var(--theme-text);border-color:var(--theme-border);background:var(--theme-surface2)}
.norella-ceo-overview button:hover{border-color:var(--theme-accent)!important}
/* Preserve distinct contrast between cards, tables, filters, and controls in every theme. */
.dashboard .panel,.dashboard .metric-card,.dashboard .month-bar,
.dashboard .table-wrap,.dashboard .w-drawer-panel,.dashboard .w-section,
.dashboard .w-card,.dashboard .w-listrow{
 color:var(--theme-text);
 border-color:var(--theme-border)!important;
}
.dashboard .panel,.dashboard .metric-card,.dashboard .table-wrap{background:var(--theme-surface)!important}
.dashboard .w-card,.dashboard .w-section{background:var(--theme-surface2)!important}
.dashboard .table-wrap th,.dashboard .table-wrap thead th{background:var(--theme-surface2)!important;color:var(--theme-muted)!important}
.dashboard .table-wrap td{color:var(--theme-text)!important}
.dashboard input:not([type=checkbox]):not([type=radio]),
.dashboard select:not(.inline-status),.dashboard textarea,
.dashboard .inline-date{
 background:var(--theme-input)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important;
}
.dashboard input::placeholder,.dashboard textarea::placeholder{color:var(--theme-muted)!important;opacity:.83}
.dashboard .w-nav:not(.active),.dashboard .tab-btn:not(.active),
.dashboard .month-button,.dashboard .year-pill{color:var(--theme-text);border-color:var(--theme-border)}
.dashboard .w-nav.active,.dashboard .tab-btn.active{background:var(--theme-active)!important;color:var(--theme-text)!important}
.dashboard .btn.secondary{background:var(--theme-surface2)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
.dashboard .btn.primary{background:var(--theme-primary)!important;color:#fff!important}
/* Workspace navigation uses the theme surface, not a permanent navy strip. */
.norella-team-toolbar{background:var(--theme-surface2)!important;border-color:var(--theme-border)!important;color:var(--theme-text)!important}
.norella-team-toolbar #norellaCurrentWorkspace{color:var(--theme-muted)!important;opacity:1!important}
.norella-team-toolbar .norella-workspace-tab{background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
.norella-team-toolbar .norella-workspace-tab.is-active{background:var(--theme-active)!important;color:var(--theme-text)!important;border-color:var(--theme-accent)!important}
.norella-team-toolbar .btn{background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
/* Opt-in explicit dark overlay design, independent from the page's theme. */
.norella-overlay,.norella-overlay .norella-sheet{color:#eaf3fa}
.norella-overlay .norella-sheet input,.norella-overlay .norella-sheet select,
.norella-overlay .norella-sheet textarea{color:#eaf3fa!important;background:#101b2c!important;border-color:#344a63!important}
.norella-overlay .norella-sheet input::placeholder,.norella-overlay .norella-sheet textarea::placeholder{color:#9eb1c4!important}
/* Date widgets obey the active theme; page-level styles do not leak into the modal. */
:root[data-theme="office"],:root[data-theme="light"]{color-scheme:light}
:root:not([data-theme="office"]):not([data-theme="light"]){color-scheme:dark}
/* Buyer UI: strict role guard independent from theme classes and inline state. */
html:not([data-norella-role="ceo"]) #norellaWorkspaceTabs,
html:not([data-norella-role="ceo"]) #norellaWorkspaceSelectorWrap,
html:not([data-norella-role="ceo"]) #norellaCEOOverview{display:none!important}
