:root {
  --crm-bg: #f4f8fb;
  --crm-bg-deep: #eaf1f7;
  --crm-surface: #ffffff;
  --crm-surface-2: #f6fafd;
  --crm-surface-muted: #f6fafd;
  --crm-border: #d7e4ee;
  --crm-border-strong: #c0d3e2;
  --crm-text: #101a22;
  --crm-text-muted: #5b6b76;
  --crm-accent: #2f8fd6;
  --crm-accent-strong: #1d6fb0;
  --crm-success: #16834a;
  --crm-warning: #9a6500;
  --crm-danger: #b54038;
  --crm-danger-border: #fecaca;
  --crm-warning-border: #fde68a;
  --crm-primary-border: #afd4ef;
  /* Modal/offcanvas/drawer/popover surfaces - light defaults (themes override per-theme) */
  --crm-modal-bg-top: rgba(255, 255, 255, 0.98);
  --crm-modal-bg-bottom: rgba(250, 252, 251, 0.96);
  --crm-modal-accent: rgba(47, 143, 214, 0.1);
  --crm-modal-border: rgba(16, 26, 34, 0.1);
  --crm-popover-bg: rgba(255, 255, 255, 0.96);
  --crm-popover-border: rgba(16, 26, 34, 0.1);
  --crm-info: #166b78;
  /* Deep task-tree nesting accents (levels 3+; decorative hierarchy tints) */
  --crm-tree-level-3: #c4b5fd;
  --crm-tree-level-deep: #f0abfc;
  --crm-focus: rgba(47, 143, 214, 0.18);
  --crm-focus-ring: #2f8fd6;
  --crm-control-bg: #ffffff;
  --crm-control-bg-muted: #f2f8fc;
  --crm-control-height: 44px;

  /* Universal ink (shadows, hairline tints) - dark in every theme */
  --crm-ink: #0f172a;
  /* Text on accent-colored surfaces - white in every theme */
  --crm-on-accent: #ffffff;
  /* High priority badge - orange with white text in every theme */
  --crm-priority-high: #ea580c;

  /* Code blocks (knowledge articles, markdown) - fixed dark in every theme */
  --crm-code-bg: #1e293b;
  --crm-code-text: #e2e8f0;
  /* Debug / AI-log terminal - fixed dark in every theme */
  --crm-terminal-bg: #1e1e1e;
  --crm-terminal-text: #d4d4d4;
  /* Login cover gradient - fixed dark brand gradient in every theme */
  --crm-login-cover-glow: rgba(100, 181, 246, 0.32);
  --crm-login-cover-a: #0b1a2a;
  --crm-login-cover-b: #123a5c;
  --crm-login-sidebar-bg: #0e2236;
  /* Gantt blocked-task stripe - warning amber, same in every theme */
  --crm-stripe-a: #ffc107;
  --crm-stripe-b: #ffecb3;
  /* Inline bulk-progress track - fixed slate in every theme */
  --crm-progress-track: #334155;
  /* Sticky-note editor dashed border - fixed mid-gray in every theme */
  --crm-sticky-dash: #666666;
  /* Gantt dependency obstacle stroke - warning amber in every theme */
  --crm-gantt-obstacle: #f59e0b;
  /* Loading/status overlay toast - light defaults (brand green / deep red).
     Theme blocks override these with their own accent colors: dark keeps a
     readable mid-green (theme-relative mint would break AA with white text),
     contrast uses its dark brand green, sepia uses its warm brown. */
  --crm-status-bg: #2f8fd6;
  --crm-error-bg: #b54038;
  /* Ideas page AI pipeline step accents - fixed purple (clarify) / pink (gap) */
  --crm-idea-clarify: #6f42c1;
  --crm-idea-gap: #d63384;

  /* Legacy semantic aliases used across pages (kept for backward compat) */
  --crm-muted: #5b6b76;
  --crm-bg-hover: #e8f1f9;
  --crm-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --crm-accent-bg: rgba(47, 143, 214, 0.08);
  --crm-bg-inverse: #1e293b;
  --crm-text-inverse: #ffffff;
  --crm-bg-secondary: #f1f5f9;
  --crm-bg-subtle: #f9fafb;
  --crm-border-light: rgba(0, 0, 0, 0.04);
  --crm-green: #2f8fd6;
  --crm-text-secondary: #475569;

  --color-primary-200: #a9d3ee;
  --color-primary-300: #7fbce4;

  --color-primary-50: #eaf4fb;
  --color-primary-100: #d3e8f6;
  --color-primary-500: #2f8fd6;
  --color-primary-600: #1d6fb0;
  --color-primary-700: #165890;

  --color-neutral-0: #ffffff;
  --color-neutral-50: #f4f8fb;
  --color-neutral-100: #eaf0f5;
  --color-neutral-200: #d7e4ee;
  --color-neutral-300: #c0d3e2;
  --color-neutral-500: #5b6b76;
  --color-neutral-700: #2a3740;
  --color-neutral-900: #101a22;

  --color-danger-50: #fdf2f0;
  --color-danger-100: #fde8e6;
  --color-danger-500: #b54038;
  --color-danger-600: #9a3630;

  --color-warning-50: #fef9ee;
  --color-warning-100: #fef3d7;
  --color-warning-500: #9a6500;
  --color-warning-600: #7d5200;

  --color-info-50: #eaf5f7;
  --color-info-100: #d5ebef;
  --color-info-500: #166b78;
  --color-info-600: #11545f;

  --color-success-50: #e8f4ee;
  --color-success-100: #d0e9dd;
  --color-success-600: #16834a;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 1.75rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  --text-xs: 0.6875rem;
  --text-sm: 0.8125rem;
  --text-md: 0.9375rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-xxl: 1.75rem;

  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --shadow-sm: 0 1px 2px rgba(17, 26, 25, 0.04);
  --shadow-md: 0 1px 3px rgba(17, 26, 25, 0.06), 0 4px 12px rgba(17, 26, 25, 0.04);
  --shadow-lg: 0 1px 3px rgba(17, 26, 25, 0.08), 0 8px 24px rgba(17, 26, 25, 0.06);

  --z-sidebar: 1030;
  --z-topbar: 1040;
  --z-drawer: 1060;
  --z-modal: 1080;
  --z-toast: 1100;

  --motion-fast: 140ms;
  --motion-normal: 220ms;
  --motion-soft: 320ms;

  --bs-primary: #2f8fd6;
  --bs-primary-rgb: 47, 143, 214;
  --bs-primary-bg-subtle: #d3e8f6;
  --bs-primary-border-subtle: #afd4ef;
  --bs-primary-text-emphasis: #1d6fb0;

  --bs-info: #2f8fd6;
  --bs-info-rgb: 47, 143, 214;
  --bs-info-bg-subtle: #d3e8f6;
  --bs-info-border-subtle: #afd4ef;
  --bs-info-text-emphasis: #1d6fb0;

  --bs-link-color: #2f8fd6;
  --bs-link-hover-color: #1d6fb0;
}
