:root {
  /* Neutral platform default theme.
   * Brand color is PER-TENANT: at boot the app injects a company's tokens from
   * the Configuration store onto document.documentElement (see app/theme/).
   * These values are only the fallback for tenants with no theme configured
   * (and the first paint before injection). Do NOT hardcode a brand identity
   * here — that is the anti-pattern theme platformization corrects.
   *
   * MUST be :root, NOT `*` — declaring these on the universal selector sets them
   * on every element directly, which OVERRIDES inheritance, so the per-tenant
   * values injected on documentElement never reach descendants (they'd each
   * reset to these defaults). :root keeps them as inheritable defaults. */
  --ncrm-theme-primary: #394d57;
  --ncrm-theme-primary-light: #6b8a99;
  --ncrm-theme-surface: #ffffff;
  --ncrm-theme-background: #ffffff;
  --ncrm-theme-on-primary: #ffffff;
  --ncrm-theme-on-surface: #14141a;

  /* Extended theme tokens (previously inline var() fallbacks only) — declared
   * here as neutral defaults so tenants can optionally override them too. */
  --ncrm-theme-on-surface-variant: #666666;
  --ncrm-theme-divider: rgba(0, 0, 0, 0.12);
  --ncrm-theme-text-primary: rgba(0, 0, 0, 0.87);
  --ncrm-theme-text-secondary: rgba(0, 0, 0, 0.6);
  --ncrm-theme-info: #158cba;
  /* Hairline surface/card border — the first-class elevation lever for dark
   * themes (box-shadows tuned for light surfaces vanish on a dark canvas).
   * Neutral default is a near-invisible light hairline, so adding this token
   * changes nothing for existing (light) tenants; dark tenants override it. */
  --ncrm-theme-surface-border: rgba(0, 0, 0, 0.08);

  /* Surface variant (table header/zebra rows, pagination bar, chip/well fills),
   * row hover, and component outline. These drive the four Material MD3 vars
   * mapped below. Neutral LIGHT defaults so existing (light) tenants are
   * unchanged; dark tenants override them via the `theme.*` config store. */
  --ncrm-theme-surface-variant: #f5f5f5;
  --ncrm-theme-hover: rgba(0, 0, 0, 0.04);
  --ncrm-theme-outline: rgba(0, 0, 0, 0.24);

  /* Modern shape / space / elevation tokens (components read these with fallbacks) */
  --ncrm-radius-sm: 10px;
  --ncrm-radius-md: 14px;
  --ncrm-radius-lg: 20px;
  --ncrm-spacing-sm: 10px;
  --ncrm-spacing-md: 16px;
  --ncrm-spacing-lg: 20px;
  --ncrm-shadow-sm: 0 1px 2px rgba(14, 14, 18, 0.05), 0 1px 3px rgba(14, 14, 18, 0.04);
  --ncrm-shadow-md: 0 6px 20px rgba(20, 14, 45, 0.12);

  /* Material Setup */
  --mdc-snackbar-action-color: var(--ncrm-theme-primary-light);
  /* Material 1 to 1 Mapping */
  --mdc-theme-primary: var(--ncrm-theme-primary);
  --mdc-theme-surface: var(--ncrm-theme-surface);
  --mdc-theme-background: var(--ncrm-theme-background);
  --mdc-theme-on-primary: var(--ncrm-theme-on-primary);
  --mdc-theme-on-surface: var(--ncrm-theme-on-surface);
  /* Material Web (MD3) token mapping */
  --md-sys-color-primary: var(--ncrm-theme-primary);
  --md-sys-color-on-primary: var(--ncrm-theme-on-primary);
  --md-sys-color-surface: var(--ncrm-theme-surface);
  --md-sys-color-on-surface: var(--ncrm-theme-on-surface);
  --md-sys-color-surface-container: var(--ncrm-theme-surface);
  --md-sys-color-surface-container-high: var(--ncrm-theme-surface);
  --md-sys-color-surface-container-highest: var(--ncrm-theme-surface);
  --md-sys-color-surface-container-low: var(--ncrm-theme-surface);
  --md-sys-color-surface-container-lowest: var(--ncrm-theme-surface);
  /* Previously unmapped → fell back to Material's LIGHT defaults on every
   * tenant (grey table headers/outlines even on a dark canvas). Map them to the
   * theme tokens so surfaces/muted-text/borders track the tenant theme. This
   * supersedes the microburst bundle's runtime `applyTenantTheme` md-sys bridge. */
  --md-sys-color-surface-variant: var(--ncrm-theme-surface-variant);
  --md-sys-color-on-surface-variant: var(--ncrm-theme-on-surface-variant);
  --md-sys-color-outline: var(--ncrm-theme-outline);
  --md-sys-color-outline-variant: var(--ncrm-theme-divider);
  /* MD3 Switch — restore MD2 size and label spacing */
  --md-switch-track-width: 36px;
  --md-switch-track-height: 20px;
  --md-switch-handle-width: 12px;
  --md-switch-handle-height: 12px;
  --md-switch-selected-handle-width: 16px;
  --md-switch-selected-handle-height: 16px;
  --md-switch-pressed-handle-width: 18px;
  --md-switch-pressed-handle-height: 18px;
  --md-switch-state-layer-size: 32px;
}
