/* Zaytuna Factory OS — design tokens
   Brand colours sampled from references/05.png (pixel-clustered, see DECISIONS.md).
   Neutrals carry a slight cool (blue) tint. */
:root {
  /* Brand — sampled from 05.png */
  --teal: #489DA4;          /* primary: "Total Leads" icon, "Prospecting" stage, gauge */
  --teal-600: #3B868C;
  --teal-700: #2F6E73;
  --teal-50: #EAF5F6;
  --teal-100: #D3EBED;
  --navy: #162E5B;          /* deep navy: "Open Deals" icon, "Proposal" stage */
  --navy-600: #1F3D72;
  --navy-50: #E9EDF5;
  --coral: #E96653;         /* accent: "Revenue" icon, "Negotiation" stage */
  --coral-600: #D2533F;
  --coral-50: #FDEEEB;
  --blue: #4376B2;          /* "Qualification" stage, donut segment */
  --blue-600: #375F92;
  --blue-50: #ECF2F9;

  /* Status — green sampled from 05.png trend text; amber/red derived to sit with it */
  --green: #3F9A6E;
  --green-50: #E8F5EE;
  --amber: #D9952B;
  --amber-50: #FCF3E3;
  --red: #D9483B;
  --red-50: #FCEBE9;

  /* Cool neutrals */
  --n-0: #FFFFFF;
  --n-25: #FAFBFD;
  --n-50: #F4F6F9;
  --n-100: #ECEFF4;
  --n-200: #E1E6EE;
  --n-300: #CBD2DE;
  --n-400: #A2ABBB;
  --n-500: #7C8698;
  --n-600: #5B6577;
  --n-700: #3E4757;
  --n-800: #252D3B;
  --n-900: #151B27;

  /* Semantic surface tokens (light) */
  --bg: #F2F4F8;
  --bg-grad-1: #F7F9FB;
  --bg-grad-2: #EDF1F6;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #FFFFFF;
  --surface-2: rgba(244, 246, 250, 0.9);
  --surface-sunk: #F1F4F8;
  --glass-border: rgba(255, 255, 255, 0.9);
  --border: #E3E8EF;
  --border-strong: #CFD6E1;
  --divider: #EDF0F5;
  --text: #172033;
  --text-2: #4B5568;
  --text-3: #7C8698;
  --text-inv: #FFFFFF;
  --focus: rgba(72, 157, 164, 0.35);
  --overlay: rgba(21, 27, 39, 0.32);

  /* Chart palette, in the order the references use them */
  --chart-1: var(--teal);
  --chart-2: var(--navy);
  --chart-3: var(--coral);
  --chart-4: var(--blue);
  --chart-5: #9DCDD1;
  --chart-6: #F2B1A6;
  --chart-grid: #EEF1F5;
  --chart-text: #7C8698;

  /* Typography */
  --font: "Inter", "IBM Plex Sans Arabic", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-xs: 11px;
  --fs-sm: 12.5px;
  --fs-base: 14px;
  --fs-md: 16px;
  --fs-lg: 20px;
  --fs-xl: 24px;
  --fs-2xl: 30px;
  --fs-3xl: 36px;
  --lh-tight: 1.2;
  --lh: 1.5;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Spacing (4px base) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;

  /* Radius */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 22px;
  --r-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(22, 46, 91, 0.04), 0 1px 3px rgba(22, 46, 91, 0.04);
  --shadow: 0 1px 2px rgba(22, 46, 91, 0.04), 0 6px 20px -6px rgba(22, 46, 91, 0.08);
  --shadow-lg: 0 10px 40px -10px rgba(22, 46, 91, 0.22), 0 2px 6px rgba(22, 46, 91, 0.06);
  --blur: saturate(160%) blur(14px);

  /* Layout */
  --sidebar-w: 256px;
  --topbar-h: 64px;
  --content-max: 1480px;
  --touch: 44px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* Dark theme — same structure, cool deep neutrals (reference 02) */
:root[data-theme="dark"] {
  --bg: #0D121C;
  --bg-grad-1: #111724;
  --bg-grad-2: #0B0F18;
  --surface: rgba(24, 31, 46, 0.78);
  --surface-solid: #182031;
  --surface-2: rgba(30, 38, 56, 0.9);
  --surface-sunk: #121927;
  --glass-border: rgba(255, 255, 255, 0.05);
  --border: #263049;
  --border-strong: #34405C;
  --divider: #212A40;
  --text: #E8ECF4;
  --text-2: #AEB7C9;
  --text-3: #7D889E;
  --teal-50: rgba(72, 157, 164, 0.16);
  --teal-100: rgba(72, 157, 164, 0.26);
  --navy-50: rgba(120, 150, 210, 0.16);
  --coral-50: rgba(233, 102, 83, 0.16);
  --blue-50: rgba(67, 118, 178, 0.2);
  --green-50: rgba(63, 154, 110, 0.18);
  --amber-50: rgba(217, 149, 43, 0.18);
  --red-50: rgba(217, 72, 59, 0.18);
  --navy: #7C9AD6; /* navy is lifted so it stays visible on dark surfaces */
  --navy-600: #9DB3E0;
  --chart-grid: #222B40;
  --chart-text: #7D889E;
  --overlay: rgba(0, 0, 0, 0.55);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 48px -12px rgba(0, 0, 0, 0.7);
}
