/*
 * Single source of design tokens (blueprint 30.1 rule 1). Components use only these variables via Tailwind.
 * Tenant branding overrides --primary / --accent / --radius / --font-sans at runtime (shared/lib/branding.ts).
 */
:root {
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --background: #f6f7fb;
  --surface: #ffffff;
  --surface-muted: #f1f3f9;
  --surface-raised: #ffffff;
  --border: #e4e7ef;
  --border-strong: #cdd2e0;
  --foreground: #121826;
  --foreground-muted: #5b6477;
  --foreground-subtle: #8a93a6;

  --primary: #4f46e5;
  --primary-foreground: #ffffff;
  --primary-soft: color-mix(in srgb, var(--primary) 10%, transparent);
  --primary-ring: color-mix(in srgb, var(--primary) 35%, transparent);
  --accent: #0ea5e9;
  --accent-foreground: #ffffff;
  --secondary: #64748b;
  /* categorical chart series (colour-blind safe); series 1 is the tenant primary */
  --chart-2: #e69f00;
  --chart-3: #009e73;
  --chart-4: #cc79a7;
  --chart-5: #56b4e9;
  --chart-6: #d55e00;
  --chart-7: #f0e442;
  --chart-8: #7c7c7c;

  --success: #16a34a;
  --success-soft: color-mix(in srgb, var(--success) 12%, transparent);
  --warning: #d97706;
  --warning-soft: color-mix(in srgb, var(--warning) 14%, transparent);
  --danger: #dc2626;
  --danger-soft: color-mix(in srgb, var(--danger) 11%, transparent);
  --info: #2563eb;
  --info-soft: color-mix(in srgb, var(--info) 11%, transparent);

  --sidebar: #0f1424;
  --sidebar-foreground: #c8cde0;
  --sidebar-muted: #7d86a0;
  --sidebar-active: color-mix(in srgb, var(--primary) 22%, transparent);
  --sidebar-border: #1d2440;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgb(16 24 40 / 6%);
  --shadow-md: 0 6px 20px -6px rgb(16 24 40 / 14%), 0 2px 6px rgb(16 24 40 / 6%);
  --shadow-lg: 0 24px 60px -16px rgb(16 24 40 / 28%);
  --header-height: 60px;
  --sidebar-width: 248px;
}

:root[data-theme='dark'] {
  --background: #0b0f1a;
  --surface: #121829;
  --surface-muted: #181f33;
  --surface-raised: #1a2238;
  --border: #232c45;
  --border-strong: #33405f;
  --foreground: #eef1fb;
  --foreground-muted: #a2abc4;
  --foreground-subtle: #727c97;
  --sidebar: #0a0e1a;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
  --shadow-md: 0 8px 24px -8px rgb(0 0 0 / 55%);
  --shadow-lg: 0 28px 70px -16px rgb(0 0 0 / 70%);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
