/* ============================================================
   ClearBridgeCRM Design Tokens
   ============================================================
   Single source of truth for colors, typography, radius,
   shadows, and transitions. Per-page CSS files should
   reference these variables instead of hardcoding values.
   ============================================================ */

:root {
  /* ── Entity Colors ─────────────────────────────────────── */
  --color-deal: #3b82f6;
  --color-deal-light: #dbeafe;
  --color-deal-dark: #1e40af;
  --color-deal-bg: #eff6ff;

  --color-contact: #22c55e;
  --color-contact-light: #dcfce7;
  --color-contact-dark: #166534;
  --color-contact-bg: #f0fdf4;

  --color-company: #a855f7;
  --color-company-light: #f3e8ff;
  --color-company-dark: #6b21a8;
  --color-company-bg: #faf5ff;

  --color-lead: #f59e0b;
  --color-lead-light: #fef3c7;
  --color-lead-dark: #92400e;
  --color-lead-bg: #fffbeb;

  --color-ai: #6366f1;
  --color-ai-light: rgba(99, 102, 241, 0.08);
  --color-ai-dark: #4f46e5;

  /* ── Semantic Colors ───────────────────────────────────── */
  --color-success: #16a34a;
  --color-success-light: #dcfce7;
  --color-danger: #dc2626;
  --color-danger-light: #fef2f2;
  --color-warning: #f59e0b;
  --color-warning-light: #fef3c7;
  --color-info: #0ea5e9;
  --color-info-light: #e0f2fe;
  --color-muted: #64748b;

  /* ── Neutrals ──────────────────────────────────────────── */
  --color-text: #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted: #94a3b8;
  --color-border: #e2e8f0;
  --color-border-light: #f1f5f9;
  --color-surface: #f8fafc;
  --color-background: #ffffff;

  /* ── Typography Scale ──────────────────────────────────── */
  --text-2xs: 0.6875rem;   /* 11px — micro badges, pills */
  --text-xs: 0.75rem;      /* 12px — small labels, captions */
  --text-sm: 0.8125rem;    /* 13px — secondary text, metadata */
  --text-base: 0.875rem;   /* 14px — body text, form inputs */
  --text-md: 1rem;         /* 16px — subheadings, emphasis */
  --text-lg: 1.125rem;     /* 18px — section headings */
  --text-xl: 1.25rem;      /* 20px — page headings */

  /* ── Font Weights ──────────────────────────────────────── */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* ── Line Heights ──────────────────────────────────────── */
  --leading-tight: 1.25;
  --leading-normal: 1.4;
  --leading-relaxed: 1.6;

  /* ── Border Radius ─────────────────────────────────────── */
  --radius-sm: 0.25rem;    /* 4px  — small inputs, tags */
  --radius-md: 0.375rem;   /* 6px  — cards, dropdowns */
  --radius-lg: 0.5rem;     /* 8px  — modals, large containers */
  --radius-xl: 0.75rem;    /* 12px — hero cards */
  --radius-full: 9999px;   /* pills, badges, avatars */

  /* ── Shadows / Elevation ───────────────────────────────── */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.06), 0 4px 6px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.08), 0 8px 10px rgba(0, 0, 0, 0.04);

  /* ── Transitions ───────────────────────────────────────── */
  --duration-fast: 100ms;
  --duration-normal: 150ms;
  --duration-slow: 250ms;
  --ease-default: ease;
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Dark Mode Overrides ─────────────────────────────────── */
.dark {
  --color-text: #f1f5f9;
  --color-text-secondary: #cbd5e1;
  --color-text-muted: #64748b;
  --color-border: #334155;
  --color-border-light: #1e293b;
  --color-surface: #1e293b;
  --color-background: #111827;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.25), 0 4px 6px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.3), 0 8px 10px rgba(0, 0, 0, 0.2);
}
