:root {
  --background: var(--ms-theme-bg, #f4f6f9);
  --bg: var(--ms-theme-bg, #f4f6f9);
  --surface: var(--ms-theme-surface, #ffffff);
  --panel: var(--ms-theme-surface, #ffffff);
  --surface-soft: var(--ms-theme-surface-soft, #eef2f7);
  --text: var(--ms-theme-text, #172337);
  --text-primary: var(--ms-theme-text, #172337);
  --text-secondary: var(--ms-theme-muted, #64748b);
  --muted: var(--ms-theme-muted, #64748b);
  --border: var(--ms-theme-border, #d8dee8);
  --line: var(--ms-theme-border, #d8dee8);
  --sidebar: var(--ms-theme-sidebar, #082743);
  --accent: var(--ms-theme-accent, #f4bd2b);
  --gold: var(--ms-theme-accent, #f4bd2b);
  --navy: var(--ms-c-primary, #0b3a63);
  --theme-background: var(--ms-theme-bg);
  --theme-surface: var(--ms-theme-surface);
  --theme-surface-soft: var(--ms-theme-surface-soft);
  --theme-text: var(--ms-theme-text);
  --theme-muted: var(--ms-theme-muted);
  --theme-border: var(--ms-theme-border);
  --theme-primary: var(--ms-c-primary);
  --theme-accent: var(--ms-theme-accent);
  --company-explorer-surface: var(--ms-theme-surface);
  --company-explorer-surface-soft: var(--ms-theme-surface-soft);
  --company-explorer-text: var(--ms-theme-text);
  --company-explorer-muted: var(--ms-theme-muted);
  --company-explorer-border: var(--ms-theme-border);
  --company-explorer-primary: var(--ms-c-primary);
  --company-explorer-accent: var(--ms-theme-accent);
  --enterprise-action-bar-surface: var(--ms-theme-surface);
  --enterprise-action-bar-text: var(--ms-theme-text);
  --enterprise-action-bar-border: var(--ms-theme-border);
}
html[data-theme-category="light"] { color-scheme: light; --ms-auto-text: #172337; --ms-auto-muted: #64748b; }
html[data-theme-category="dark"] { color-scheme: dark; --ms-auto-text: #f4f7fb; --ms-auto-muted: #aebcd0; }
html[data-ms-global-theme="active"] body,
html[data-ms-global-theme="active"] .workspace,
html[data-ms-global-theme="active"] .main-content,
html[data-ms-global-theme="active"] .content { background: var(--ms-theme-bg); color: var(--ms-theme-text, var(--ms-auto-text)); }
html[data-ms-global-theme="active"] input,
html[data-ms-global-theme="active"] textarea,
html[data-ms-global-theme="active"] select,
html[data-ms-global-theme="active"] option { border-color: var(--ms-theme-border); background: var(--ms-theme-surface); color: var(--ms-theme-text, var(--ms-auto-text)); }
html[data-ms-global-theme="active"] input::placeholder,
html[data-ms-global-theme="active"] textarea::placeholder { color: var(--ms-theme-muted, var(--ms-auto-muted)); }
html[data-ms-global-theme="active"] .card,
html[data-ms-global-theme="active"] .panel,
html[data-ms-global-theme="active"] .widget,
html[data-ms-global-theme="active"] .modal,
html[data-ms-global-theme="active"] [role="dialog"] { border-color: var(--ms-theme-border); background: var(--ms-theme-surface); color: var(--ms-theme-text, var(--ms-auto-text)); }
html[data-ms-global-theme="active"] table,
html[data-ms-global-theme="active"] th,
html[data-ms-global-theme="active"] td { border-color: var(--ms-theme-border); color: var(--ms-theme-text, var(--ms-auto-text)); }
html[data-ms-global-theme="active"] th { background: var(--ms-theme-surface-soft); }
html[data-ms-global-theme="active"] .breadcrumb,
html[data-ms-global-theme="active"] [class*="breadcrumb"] { color: var(--ms-theme-muted, var(--ms-auto-muted)); }
html[data-ms-global-theme="active"] .breadcrumb a,
html[data-ms-global-theme="active"] [class*="breadcrumb"] a,
html[data-ms-global-theme="active"] a { color: var(--ms-c-primary); }
html[data-ms-global-theme="active"] .topbar { border-color: var(--ms-theme-border); background: var(--ms-theme-topbar); color: var(--ms-theme-text, var(--ms-auto-text)); }
html[data-ms-global-theme="active"] .sidebar { background: var(--ms-theme-sidebar); }
