/* Shared semantic tokens. Classic compatibility declarations keep their original fallback values. */
:root, :root[data-theme="classic"] {
  color-scheme: light;
  --bg-app: #f5f7f9;
  --bg-sidebar: #073a33;
  --bg-topbar: #073a33;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f8fbfa;
  --bg-elevated: #ffffff;
  --bg-input: #ffffff;
  --bg-overlay: rgba(5,25,29,.55);
  --text-primary: #132238;
  --text-secondary: #526773;
  --text-muted: #68788f;
  --text-disabled: #87949c;
  --text-on-brand: #ffffff;
  --text-inverse: #ffffff;
  --border-default: #e4e9ee;
  --border-soft: #edf0f2;
  --border-strong: #b6c8cd;
  --border-focus: #117865;
  --brand-primary: #117865;
  --brand-primary-hover: #0e6555;
  --brand-secondary: #30c2a7;
  --brand-soft: #e8f4f1;
  --brand-contrast: #ffffff;
  --brand-gradient: linear-gradient(135deg,#30c2a7,#117865);
  --brand-warm-gradient: linear-gradient(135deg,#f8d299,#f59e51);
  --button-primary-bg: var(--brand-primary);
  --button-primary-text: var(--text-on-brand);
  --button-primary-hover: var(--brand-primary-hover);
  --button-secondary-bg: var(--bg-surface);
  --button-secondary-text: var(--text-primary);
  --nav-bg: var(--bg-sidebar);
  --nav-text: #d4e4e2;
  --nav-text-muted: #acd8cf;
  --nav-active-bg: #117865;
  --nav-active-text: #ffffff;
  --nav-hover-bg: rgba(255,255,255,.07);
  --table-bg: var(--bg-surface);
  --table-header-bg: #f7faf9;
  --table-row-hover: #f8fbfa;
  --table-border: var(--border-default);
  --table-text: var(--text-primary);
  --table-muted-text: var(--text-muted);
  --card-bg: var(--bg-surface);
  --card-border: var(--border-soft);
  --card-shadow: 0 8px 28px rgba(17,50,62,.06);
  --card-hover: var(--bg-surface-hover);
  --input-bg: var(--bg-input);
  --input-border: var(--border-default);
  --input-text: var(--text-primary);
  --input-placeholder: var(--text-muted);
  --input-focus-border: var(--border-focus);
  --input-focus-ring: 0 0 0 3px rgba(17,120,101,.18);
  --modal-bg: var(--bg-elevated);
  --modal-border: var(--border-default);
  --modal-overlay: var(--bg-overlay);
  --status-success: #18a66b;
  --status-success-text: #176445;
  --status-success-bg: #e6f5ed;
  --status-success-border: #b6ddc7;
  --status-warning: #e7a21d;
  --status-warning-text: #8c5706;
  --status-warning-bg: #fff5e0;
  --status-warning-border: #ead3a7;
  --status-danger: #dc4453;
  --status-danger-text: #9f1239;
  --status-danger-bg: #fff0f1;
  --status-danger-border: #fecdd3;
  --status-info: #2b7fd3;
  --status-info-text: #285c93;
  --status-info-bg: #e5f0fc;
  --status-info-border: #acccea;
  --status-review: #7759d6;
  --status-review-text: #65439d;
  --status-review-bg: #efe8fa;
  --status-review-border: #d7c6f0;
  --chart-accent: var(--brand-primary);
  --chart-secondary: var(--brand-secondary);
  --chart-area: rgba(17,120,101,.08);
  --chart-grid: var(--border-soft);
  --chart-text: var(--text-muted);
  --glass-surface: rgba(255,255,255,.06);
  --glass-border: rgba(255,255,255,.16);
  --hero-start: #073a33;
  --hero-end: #117865;
  --hero-text: #ffffff;
  --shadow-colour: rgba(0,0,0,.25);
}
:root[data-theme="ember-dark"] {
  color-scheme: dark;
  --bg-app: #101112;
  --bg-sidebar: #14181b;
  --bg-topbar: #1c2023;
  --bg-surface: #191c1f;
  --bg-surface-hover: #252a2e;
  --bg-elevated: #222629;
  --bg-input: #121618;
  --bg-overlay: rgba(0,0,0,.72);
  --text-primary: #ffffff;
  --text-secondary: #cfcfcf;
  --text-muted: #b0b0b0;
  --text-disabled: #929292;
  --text-on-brand: #121212;
  --text-inverse: #ffffff;
  --border-default: #3d444a;
  --border-soft: #2d343a;
  --border-strong: #606a73;
  --border-focus: #fca229;
  --brand-primary: #fca229;
  --brand-primary-hover: #ffb653;
  --brand-secondary: #fb9c2d;
  --brand-soft: #30271b;
  --brand-contrast: #121212;
  --brand-gradient: linear-gradient(135deg,#393837,#232323 58%,#4c3118);
  --brand-warm-gradient: linear-gradient(135deg,#ffc67a,#fca229);
  --nav-text: #ededed;
  --nav-text-muted: #b8bdc2;
  --nav-active-bg: #30271b;
  --nav-active-text: #ffc16b;
  --nav-hover-bg: #20262b;
  --table-header-bg: #242a2f;
  --card-shadow: 0 1px 2px rgba(0,0,0,.20), 0 10px 30px rgba(0,0,0,.10);
  --input-focus-ring: 0 0 0 3px rgba(252,162,41,.24);
  --chart-area: rgba(252,162,41,.14);
  --glass-surface: rgba(255,255,255,.06);
  --glass-border: rgba(255,255,255,.10);
  --hero-start: #171b1e;
  --hero-end: #202629;
  --status-success: #83e5b0;
  --status-success-text: #83e5b0;
  --status-success-bg: #16382a;
  --status-success-border: #427858;
  --status-warning: #ffd080;
  --status-warning-text: #ffd080;
  --status-warning-bg: #3b2c17;
  --status-warning-border: #856339;
  --status-danger: #ff9aa6;
  --status-danger-text: #ff9aa6;
  --status-danger-bg: #411c25;
  --status-danger-border: #9b5261;
  --status-info: #95c4ff;
  --status-info-text: #95c4ff;
  --status-info-bg: #1c2e47;
  --status-info-border: #4d729b;
  --status-review: #d3b3ff;
  --status-review-text: #d3b3ff;
  --status-review-bg: #332443;
  --status-review-border: #755893;
  --theme-chart-secondary: var(--chart-secondary);
  --theme-bg-app: var(--bg-app);
  --theme-bg-elevated: var(--bg-elevated);
  --theme-bg-sidebar: var(--bg-sidebar);
  --theme-bg-surface: var(--bg-surface);
  --theme-bg-surface-hover: var(--bg-surface-hover);
  --theme-bg-topbar: var(--bg-topbar);
  --theme-border-default: var(--border-default);
  --theme-border-focus: var(--border-focus);
  --theme-border-soft: var(--border-soft);
  --theme-brand-primary: var(--brand-primary);
  --theme-brand-primary-hover: var(--brand-primary-hover);
  --theme-brand-soft: var(--brand-soft);
  --theme-glass-border: var(--glass-border);
  --theme-glass-surface: var(--glass-surface);
  --theme-hero-end: var(--hero-end);
  --theme-hero-start: var(--hero-start);
  --theme-input-bg: var(--input-bg);
  --theme-modal-overlay: var(--modal-overlay);
  --theme-nav-active-bg: var(--nav-active-bg);
  --theme-nav-hover-bg: var(--nav-hover-bg);
  --theme-shadow-colour: var(--shadow-colour);
  --theme-status-danger: var(--status-danger);
  --theme-status-danger-bg: var(--status-danger-bg);
  --theme-status-danger-border: var(--status-danger-border);
  --theme-status-danger-text: var(--status-danger-text);
  --theme-status-info: var(--status-info);
  --theme-status-info-bg: var(--status-info-bg);
  --theme-status-info-border: var(--status-info-border);
  --theme-status-info-text: var(--status-info-text);
  --theme-status-review: var(--status-review);
  --theme-status-success: var(--status-success);
  --theme-status-success-border: var(--status-success-border);
  --theme-status-success-text: var(--status-success-text);
  --theme-status-warning: var(--status-warning);
  --theme-status-warning-bg: var(--status-warning-bg);
  --theme-status-warning-border: var(--status-warning-border);
  --theme-status-warning-text: var(--status-warning-text);
  --theme-table-header-bg: var(--table-header-bg);
  --theme-text-inverse: var(--text-inverse);
  --theme-text-muted: var(--text-muted);
  --theme-text-on-brand: var(--text-on-brand);
  --theme-text-primary: var(--text-primary);
  --shadow-colour: rgba(0,0,0,.14);
  --bg-work-area: #141719;
  --table-bg: #191c1f;
  --table-row-hover: #252a2e;
  --table-border: #2d343a;
  --card-bg: #222629;
  --card-border: #2d343a;
  --nav-glow: rgba(252,162,41,.055);
  --nav-section-text: #dfba82;
  --nav-active-border: rgba(252,162,41,.30);
  --selection-bg: #2a271f;
  --nav-background: radial-gradient(circle at 110% 35%, var(--nav-glow), transparent 38%), var(--nav-bg);
  --topbar-background: linear-gradient(90deg, rgba(255,255,255,.018), rgba(255,255,255,.035)), var(--bg-topbar);
  --nav-active-shadow: inset 3px 0 0 var(--brand-primary), inset 0 0 0 1px var(--nav-active-border), 0 4px 18px rgba(0,0,0,.12);
  --popover-shadow: 0 4px 12px rgba(0,0,0,.18), 0 18px 48px rgba(0,0,0,.24);
}
:root[data-theme="ember-light"] {
  color-scheme: light;
  --bg-app: #f5f5f2;
  --bg-sidebar: #202326;
  --bg-topbar: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f1f2ef;
  --bg-elevated: #fffefa;
  --bg-input: #ffffff;
  --bg-overlay: rgba(20,23,26,.42);
  --text-primary: #202326;
  --text-secondary: #555d64;
  --text-muted: #626b73;
  --text-disabled: #737b82;
  --text-on-brand: #121212;
  --text-inverse: #ffffff;
  --border-default: #d5d8d8;
  --border-soft: #e3e5e2;
  --border-strong: #8b9297;
  --border-focus: #a85b06;
  --brand-primary: #fca229;
  --brand-primary-hover: #ffb653;
  --brand-secondary: #fb9c2d;
  --brand-soft: #fff0dc;
  --brand-contrast: #121212;
  --brand-gradient: linear-gradient(135deg,#fff0dc,#ffffff 58%,#f5f5f2);
  --brand-warm-gradient: linear-gradient(135deg,#ffc67a,#fca229);
  --nav-text: #ededed;
  --nav-text-muted: #b8bdc2;
  --nav-active-bg: #3b3022;
  --nav-active-text: #ffc16b;
  --nav-hover-bg: #30363c;
  --table-header-bg: #f1f2ee;
  --card-shadow: 0 1px 2px rgba(20,23,26,.04), 0 10px 30px rgba(20,23,26,.04);
  --input-focus-ring: 0 0 0 3px rgba(252,162,41,.22);
  --chart-area: rgba(252,162,41,.12);
  --glass-surface: #f5f5f2;
  --glass-border: #d5d8d8;
  --hero-start: #fff8ee;
  --hero-end: #ffffff;
  --status-success: #176445;
  --status-success-text: #176445;
  --status-success-bg: #e6f5ed;
  --status-success-border: #b6ddc7;
  --status-warning: #8c5706;
  --status-warning-text: #8c5706;
  --status-warning-bg: #fff5e0;
  --status-warning-border: #ead3a7;
  --status-danger: #9f1239;
  --status-danger-text: #9f1239;
  --status-danger-bg: #fff0f1;
  --status-danger-border: #fecdd3;
  --status-info: #285c93;
  --status-info-text: #285c93;
  --status-info-bg: #e5f0fc;
  --status-info-border: #acccea;
  --status-review: #65439d;
  --status-review-text: #65439d;
  --status-review-bg: #efe8fa;
  --status-review-border: #d7c6f0;
  --theme-chart-secondary: var(--chart-secondary);
  --theme-bg-app: var(--bg-app);
  --theme-bg-elevated: var(--bg-elevated);
  --theme-bg-sidebar: var(--bg-sidebar);
  --theme-bg-surface: var(--bg-surface);
  --theme-bg-surface-hover: var(--bg-surface-hover);
  --theme-bg-topbar: var(--bg-topbar);
  --theme-border-default: var(--border-default);
  --theme-border-focus: var(--border-focus);
  --theme-border-soft: var(--border-soft);
  --theme-brand-primary: var(--brand-primary);
  --theme-brand-primary-hover: var(--brand-primary-hover);
  --theme-brand-soft: var(--brand-soft);
  --theme-glass-border: var(--glass-border);
  --theme-glass-surface: var(--glass-surface);
  --theme-hero-end: var(--hero-end);
  --theme-hero-start: var(--hero-start);
  --theme-input-bg: var(--input-bg);
  --theme-modal-overlay: var(--modal-overlay);
  --theme-nav-active-bg: var(--nav-active-bg);
  --theme-nav-hover-bg: var(--nav-hover-bg);
  --theme-shadow-colour: var(--shadow-colour);
  --theme-status-danger: var(--status-danger);
  --theme-status-danger-bg: var(--status-danger-bg);
  --theme-status-danger-border: var(--status-danger-border);
  --theme-status-danger-text: var(--status-danger-text);
  --theme-status-info: var(--status-info);
  --theme-status-info-bg: var(--status-info-bg);
  --theme-status-info-border: var(--status-info-border);
  --theme-status-info-text: var(--status-info-text);
  --theme-status-review: var(--status-review);
  --theme-status-success: var(--status-success);
  --theme-status-success-border: var(--status-success-border);
  --theme-status-success-text: var(--status-success-text);
  --theme-status-warning: var(--status-warning);
  --theme-status-warning-bg: var(--status-warning-bg);
  --theme-status-warning-border: var(--status-warning-border);
  --theme-status-warning-text: var(--status-warning-text);
  --theme-table-header-bg: var(--table-header-bg);
  --theme-text-inverse: var(--text-inverse);
  --theme-text-muted: var(--text-muted);
  --theme-text-on-brand: var(--text-on-brand);
  --theme-text-primary: var(--text-primary);
  --shadow-colour: rgba(20,23,26,.10);
  --bg-work-area: #fafaf8;
  --table-bg: #ffffff;
  --table-row-hover: #faf7f1;
  --table-border: #e3e5e2;
  --card-bg: #ffffff;
  --card-border: #e3e5e2;
  --nav-glow: rgba(252,162,41,.055);
  --nav-section-text: #dfba82;
  --nav-active-border: rgba(252,162,41,.30);
  --selection-bg: #fff0dc;
  --nav-background: radial-gradient(circle at 110% 35%, var(--nav-glow), transparent 38%), var(--nav-bg);
  --topbar-background: var(--bg-topbar);
  --nav-active-shadow: inset 3px 0 0 var(--brand-primary), inset 0 0 0 1px var(--nav-active-border), 0 4px 18px rgba(0,0,0,.12);
  --popover-shadow: 0 4px 12px rgba(20,23,26,.06), 0 18px 48px rgba(20,23,26,.12);
  --chart-secondary: #30363c;
  --hero-text: #202326;
}

/* Native form surfaces and focus need an explicit theme treatment. No layout changes. */
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea) { background-color: var(--input-bg); color: var(--input-text); border-color: var(--input-border); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :where(input,textarea)::placeholder { color: var(--input-placeholder); opacity: 1; }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :where(input,select,textarea):focus-visible { border-color: var(--input-focus-border); box-shadow: var(--input-focus-ring); outline: 2px solid var(--border-focus); outline-offset: 2px; }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :where(button,a,[tabindex]):focus-visible { outline: 2px solid var(--border-focus); outline-offset: 3px; }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :where(input,select,textarea):disabled { color: var(--text-disabled); opacity: .65; }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :where(.nav-button.active,.workspace-nav a.active) { background: var(--nav-active-bg); color: var(--nav-active-text); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :where(.btn-primary,.button.primary,button.primary) { background: var(--button-primary-bg); color: var(--button-primary-text); border-color: var(--button-primary-bg); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :where(.btn-primary,.button.primary,button.primary):hover { background: var(--button-primary-hover); }


/* Surface copy is inherited by existing compatibility declarations. Charcoal navigation
   and semantic filled controls retain their own inverse copy roles. */
:root[data-theme="ember-light"] :is(.content,.modal,.topbar,.workspace-content,.auth-brand-panel) {
  --theme-text-inverse: var(--text-primary);
}
:root[data-theme="ember-light"] :is(.sidebar,.workspace-nav) {
  --theme-text-inverse: var(--nav-text);
}
:root[data-theme="ember-light"] :is(.ai-fab,.ai-dock-msg.user,.dept-badge,#addWorkCheck,#addWorkComment,#uploadWorkEvidence) {
  --theme-text-inverse: var(--text-inverse);
}

/* Visual hierarchy only. Keep geometry and Classic compatibility rules untouched.
   Navigation and large text surfaces must never consume semantic status colours. */
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :is(.sidebar, .workspace-nav) { background: var(--nav-background); color: var(--nav-text); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :is(.topbar, .workspace-topbar) { background: var(--topbar-background); color: var(--text-primary); box-shadow: inset 0 -1px 0 var(--border-soft); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :is(.main-shell, .workspace-main) { background: var(--bg-work-area); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :is(.sidebar .nav-button, .workspace-nav nav a) { color: var(--nav-text); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :is(.sidebar .nav-button, .workspace-nav nav a):hover { background: var(--nav-hover-bg); color: var(--text-primary); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :is(.sidebar .nav-button.active, .workspace-nav nav a.active) { background: var(--nav-active-bg); color: var(--nav-active-text); border-color: var(--nav-active-border); box-shadow: var(--nav-active-shadow); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) .sidebar .nav-group-title { color: var(--nav-section-text); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) .sidebar-footer-copy small { color: var(--nav-text-muted); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :is(.card, .surface, .panel, .premium-table-shell) { background: var(--card-bg); border-color: var(--card-border); box-shadow: var(--card-shadow); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :is(.data-table, .workspace-content table) { background: var(--table-bg); color: var(--table-text); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :is(.data-table th, .workspace-content th) { background: var(--table-header-bg); color: var(--text-secondary); border-color: var(--table-border); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :is(.data-table td, .workspace-content td) { border-color: var(--table-border); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) .data-table tbody tr { background: var(--table-bg); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :is(.data-table tbody tr:hover, .workspace-content tbody tr:hover) { background: var(--table-row-hover); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) .data-table tbody tr.selected { background: var(--selection-bg); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) .premium-data-table tbody tr.row-critical td:first-child { box-shadow: inset 3px 0 var(--status-danger); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) .premium-data-table tbody tr.row-blocked td:first-child { box-shadow: inset 3px 0 var(--status-warning); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :is(.premium-table-toolbar, .premium-pagination, .queue-summary-line) { background: var(--bg-elevated); border-color: var(--border-soft); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) .premium-table-toolbar { box-shadow: inset 0 1px 0 var(--border-soft), inset 0 -1px 0 var(--border-soft); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) .queue-summary-line > div { border-color: var(--border-soft); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) .queue-summary-line > div:nth-child(2) strong { color: var(--status-warning); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) .queue-summary-line > div:nth-child(3) strong { color: var(--status-danger); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :is(.saved-views button.active, .tabs button.selected) { background: var(--nav-active-bg); color: var(--nav-active-text); border-color: var(--nav-active-border); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :is(.filter-popover, .view-popover, .row-actions > div, .notifications-popover, .modal, .appearance-panel) { background: var(--bg-elevated); border-color: var(--border-default); box-shadow: var(--popover-shadow); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :is(.auth-brand-panel, .ops-hero, .custops-hero, .premium-welcome, .exec-hero, .mywork-command, .ai-dock-welcome) { background: radial-gradient(circle at 110% 35%, var(--nav-glow), transparent 38%), var(--hero-start); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :is(.avatar, .boot-mark, .brand-mark) { color: var(--text-on-brand); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) .pill { background: var(--bg-surface-hover); color: var(--text-secondary); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) .pill.gray { background: var(--bg-surface-hover); color: var(--text-muted); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) .pill.green { background: var(--status-success-bg); color: var(--status-success-text); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) .pill.red { background: var(--status-danger-bg); color: var(--status-danger-text); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) .pill.orange { background: var(--status-warning-bg); color: var(--status-warning-text); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) .pill.blue { background: var(--status-info-bg); color: var(--status-info-text); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) .page-number.active { color: var(--text-on-brand); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) .auth-brand-panel:after { background: radial-gradient(circle, var(--nav-glow), transparent 68%); }

:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) :is(.ops-hero, .custops-hero, .premium-welcome, .exec-hero, .mywork-command) { box-shadow: var(--card-shadow); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) .workspace-toggle { background: var(--nav-active-bg); color: var(--nav-active-text); border-color: var(--nav-active-border); }
:root:is([data-theme="ember-dark"], [data-theme="ember-light"]) .auth-brand .brand-mark { background: var(--brand-primary); }

/* Ember Light keeps the same components, with separate light-content foregrounds. */
:root[data-theme="ember-light"] :is(.topbar .appearance-trigger, .workspace-topbar .appearance-trigger, .global-search input, .workspace-topbar, .workspace-topbar > *) { color: var(--text-primary); }
:root[data-theme="ember-light"] :is(.saved-views button.active, .tabs button.selected, .workspace-toggle) { background: var(--brand-soft); color: var(--text-primary); border-color: var(--border-focus); }
:root[data-theme="ember-light"] :is(.auth-brand-panel, .ops-hero, .custops-hero, .premium-welcome, .exec-hero, .mywork-command, .ai-dock-welcome) { background: var(--brand-gradient); color: var(--hero-text); }
:root[data-theme="ember-light"] :is(.auth-brand-panel, .ops-hero, .custops-hero, .premium-welcome, .exec-hero, .mywork-command, .ai-dock-welcome) :is(h1,h2,h3,strong,.brand-name,.premium-welcome-copy) { color: var(--text-primary); }
:root[data-theme="ember-light"] :is(.auth-brand-panel, .ops-hero, .custops-hero, .premium-welcome, .exec-hero, .mywork-command, .ai-dock-welcome) :is(p,small,.muted) { color: var(--text-secondary); }
:root[data-theme="ember-light"] :is(.sidebar, .workspace-nav) :is(.brand-name,.workspace-logo,h2) { color: var(--nav-text); }
:root[data-theme="ember-light"] .side-promo { background: var(--nav-active-bg); color: var(--nav-text); }
:root[data-theme="ember-light"] .side-promo small { color: var(--nav-text-muted); }
:root[data-theme="ember-light"] .appearance-check { color: var(--border-focus); }
:root[data-theme="ember-light"] :is(.review-queue-action,.premium-table-link,.auth-link) { color: var(--border-focus); }
:root[data-theme="ember-light"] :is(#saveWorkTask,#approveWorkTask) { background: var(--brand-primary); color: var(--text-on-brand); border-color: var(--brand-primary); }

:root[data-theme="ember-light"] :is(.sidebar .nav-button, .workspace-nav nav a):hover { color: var(--nav-text); }
:root[data-theme="ember-light"] :is(.auth-brand .brand-name span,.custops-hero .eyebrow,.exec-kicker) { color: var(--text-secondary); }
:root[data-theme="ember-light"] :is(.search-label,.dept-eyebrow,.dept-code,.os-principle strong,.task-link,.btn-complete,.completion-rule strong,.guidance-label,.notice-icon,.command-input-row svg,.command-result-icon,.signal-head>span,.segmented button.active,.filter-chip,.record-id,.sort-head.active,.sort-head.active svg,.empty-icon,.bulk-toolbar .btn,.exec-primary,.bank-metric-icon,.deadline-date,.customer-ops-stats svg,.command-primary,.metric-arrow,.workload-command-card .metric-icon,.ai-fab-copy small,.beginner-brief-icon,.dept-access-chip.primary,.completed-check,.ops-hero-flow svg,.ops-metrics svg,.kpi-explainer>svg,.review-queue-action,.deep-task-modal #completeWorkTask,.custops-metric>span,.custops-rules svg) { color: var(--border-focus); }
:root[data-theme="ember-light"] :is(.topbar .btn,.workspace-topbar button,.workspace-topbar .button) { color: var(--text-primary); }

/* Legacy inverse copy on light panels must use light-mode foreground roles. */
:root[data-theme="ember-light"] :is(.auth-kicker,.auth-feature-grid span,.welcome-stats span,.exec-pulse>div:last-child span) { color: var(--text-secondary); }
:root[data-theme="ember-light"] :is(.video-thumb,.travel-banner,.toast,.bulk-toolbar,.exec-secondary,.command-secondary,.workload-command-card,.command-trigger,.mobile-menu-btn,.top-signout) { color: var(--text-primary); }
:root[data-theme="ember-light"] .notice-count { color: var(--status-danger-text); }
:root[data-theme="ember-light"] .ai-send { color: var(--text-on-brand); }
:root[data-theme="ember-light"] .tabs .selected { background: var(--brand-soft); color: var(--text-primary); border-color: var(--border-focus); }

/* Dark semantic information surfaces keep readable inverse text in light mode. */
:root[data-theme="ember-light"] :is(.ai-fab,.ai-fab-copy small,.ai-dock-msg.user,.dept-badge) { color: var(--text-inverse); }
:root[data-theme="ember-light"] :is(.page-number.active,.ai-send) { color: var(--text-on-brand); }

:root[data-theme="ember-light"] .video-duration { color: var(--text-inverse); background: var(--nav-bg); }
