/*
  LeadFlows design tokens.
  This file is the new source for shared visual decisions. Legacy files still
  define overlapping variables during the migration; keep values compatible.
*/
:root,
:root[data-theme-mode="light"] {
  color-scheme: light;

  --lf-color-bg: #f7f9fc;
  --lf-color-bg-flat: #ffffff;
  --lf-color-surface: #ffffff;
  --lf-color-surface-muted: #f8fafc;
  --lf-color-surface-raised: #ffffff;
  --lf-color-text: #0f172a;
  --lf-color-text-soft: #334155;
  --lf-color-muted: #64748b;
  --lf-color-border: rgba(15, 23, 42, 0.08);
  --lf-color-border-strong: rgba(15, 23, 42, 0.14);
  --lf-color-primary: var(--primary-color, #2563eb);
  --lf-color-primary-soft: var(--primary-light, rgba(37, 99, 235, 0.12));
  --lf-color-success: #22c55e;
  --lf-color-warning: #f59e0b;
  --lf-color-danger: #ef4444;
  --lf-color-info: #0ea5e9;
  --lf-focus-ring: 0 0 0 3px var(--lf-color-primary-soft);

  --lf-font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --lf-font-size-xs: 11px;
  --lf-font-size-sm: 12px;
  --lf-font-size-md: 14px;
  --lf-font-size-lg: 16px;
  --lf-font-size-xl: 20px;
  --lf-font-size-display: 34px;
  --lf-line-tight: 1.15;
  --lf-line-normal: 1.45;

  --lf-space-1: 4px;
  --lf-space-2: 8px;
  --lf-space-3: 12px;
  --lf-space-4: 16px;
  --lf-space-5: 20px;
  --lf-space-6: 24px;
  --lf-space-8: 32px;

  --lf-radius-xs: 6px;
  --lf-radius-sm: 8px;
  --lf-radius-md: 12px;
  --lf-radius-lg: 16px;
  --lf-radius-xl: 20px;
  --lf-radius-pill: 999px;

  --lf-shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.08);
  --lf-shadow-lift: 0 18px 44px rgba(15, 23, 42, 0.1);
  --lf-shadow-card-hover: 0 16px 34px rgba(15, 23, 42, 0.09);

  --lf-sidebar-width: 220px;
  --lf-sidebar-width-collapsed: 68px;
  --lf-page-max: 1440px;
  --lf-topbar-height: 64px;
  --lf-transition-fast: 160ms ease;
}

/* Legacy compatibility aliases. Remove only after the old CSS is retired. */
:root,
:root[data-theme-mode="light"] {
  --font-main: var(--lf-font-sans);
  --sidebar-width: var(--lf-sidebar-width);
  --sidebar-width-collapsed: var(--lf-sidebar-width-collapsed);
  --topbar-height: var(--lf-topbar-height);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --primary: var(--primary-color, #2563eb);
  --secondary: var(--accent-depth, #8b5cf6);
  --primary-soft: var(--primary-light, rgba(37, 99, 235, 0.14));
  --bg-main: var(--lf-color-bg-flat);
  --sidebar-color: var(--lf-color-surface);
  --card-color: var(--lf-color-surface);
  --bg: var(--lf-color-bg-flat);
  --bg-2: var(--lf-color-bg-flat);
  --bg-3: var(--lf-color-bg-flat);
  --surface: var(--lf-color-surface);
  --surface-elevated: var(--lf-color-surface-raised);
  --ink: var(--lf-color-text);
  --muted: var(--lf-color-muted);
  --stroke: var(--lf-color-border);
  --stroke-strong: var(--lf-color-border-strong);
  --soft: rgba(15, 23, 42, 0.04);
  --shadow: var(--lf-shadow-lift);
  --shadow-soft: var(--lf-shadow-soft);
  --shadow-soft-main: var(--lf-shadow-soft);
  --radius-card: var(--lf-radius-lg);
  --radius-shell: var(--lf-radius-xl);
  --surface-main: var(--lf-color-surface);
  --surface-soft: var(--lf-color-surface-raised);
  --text-main: var(--lf-color-text);
  --text-muted: var(--lf-color-muted);
  --border-main: var(--lf-color-border);
  --brand-primary: var(--primary, var(--primary-color, #2563eb));
  --brand-primary-soft: var(--primary-soft, var(--primary-light, #e8f0ff));
  --brand-secondary: var(--secondary, var(--accent-depth, #8b5cf6));
}
