/* Sabiq night palette: the only literal night UI colors.
 * Feature styles reference these roles; html.light keeps the existing day palette.
 * User-selected canvas/category colors and brand artwork keep their own colors. */
:root {
  color-scheme: dark;
  --night-bg: #16161e;
  --night-recessed: #1b1c24;
  --night-surface: #202129;
  --night-raised: #282932;
  --night-hover: #30313b;
  --night-border: #383943;
  --night-text: #f0f0f3;
  --night-muted: #b0b0bf;
  --night-dim: #9e9eaf;
  --night-primary: #b9a7e5;
  --night-primary-strong: #a08bce;
  --night-primary-soft: #302b40;
  --night-on-accent: #18161f;
  --night-success: #91c4ab;
  --night-success-soft: #24382f;
  --night-warning: #d9bc8b;
  --night-warning-soft: #3a3227;
  --night-danger: #e4a0a7;
  --night-danger-soft: #3c2930;
  --night-info: #a1bedb;
  --night-info-soft: #273340;
  --night-overlay: rgba(8,8,12,.72);
  --night-shadow: rgba(0,0,0,.3);
  --night-highlight: rgba(255,255,255,.06);
  --night-selection: #3a334b;

  /* Shared aliases for older and newer modules. */
  --primary: var(--clr-primary);
  --text: var(--clr-text);
  --bg-surface-2: var(--clr-surface-2);
  --bg-surface-3: var(--clr-surface-3);
  --success: var(--clr-success);
  --error: var(--clr-danger);
  --error-color: var(--clr-danger);
  --text-main: var(--clr-text);
  --text-color: var(--clr-text);
  --text-primary: var(--clr-text);
  --text-secondary: var(--clr-text-muted);
  --text-muted: var(--clr-text-muted);
  --text-tertiary: var(--clr-text-dim);
  --clr-text-secondary: var(--clr-text-muted);
  --bg-primary: var(--clr-bg);
  --bg-secondary: var(--clr-bg-2);
  --bg-tertiary: var(--clr-surface-2);
  --bg-card: var(--clr-surface);
  --clr-bg-card: var(--clr-surface);
  --surface: var(--clr-surface);
  --surface-2: var(--clr-surface-2);
  --surface-3: var(--clr-surface-3);
  --card-bg: var(--clr-surface);
  --clr-border: var(--border-color);
  --primary-color: var(--clr-primary);
  --primary-subtle: var(--clr-primary-subtle);
  --danger-color: var(--clr-danger);
  --success-color: var(--clr-success);
  --warning-color: var(--clr-warning);
  --info-color: var(--clr-info);
}
html.light { color-scheme: light; }
html:not(.light) ::selection { background: var(--night-selection); color: var(--night-text); }
html:not(.light) { scrollbar-color: var(--night-border) var(--night-bg); }
