/* GTL CRM design tokens. Everything visual reads from these variables.
   Light is the default; [data-theme="dark"] on <html> swaps the palette. */
:root {
  /* Type */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-base: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --fs-2xl: 24px;
  --lh-tight: 1.25;
  --lh-base: 1.45;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;

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

  /* Shape and motion */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-pill: 999px;
  --row-h: 38px;
  --sidebar-w: 232px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur: 160ms;

  /* Neutrals (light) */
  --bg: #ffffff;
  --bg-subtle: #f8f8fa;
  --bg-sunken: #f1f1f5;
  --bg-hover: #f2f2f6;
  --bg-active: #e9e9f0;
  --sidebar-bg: #f5f5f8;
  --surface: #ffffff;
  --overlay: rgba(20, 20, 32, .32);
  --border: #e5e5ec;
  --border-strong: #d4d4de;
  --text: #1c1c26;
  --text-muted: #5d5d70;
  --text-faint: #8d8d9f;
  --shadow-sm: 0 1px 2px rgba(20, 20, 40, .06);
  --shadow-md: 0 2px 6px rgba(20, 20, 40, .08), 0 1px 2px rgba(20, 20, 40, .06);
  --shadow-lg: 0 16px 40px rgba(20, 20, 40, .18), 0 2px 6px rgba(20, 20, 40, .08);

  /* One accent */
  --accent: #5a4ee6;
  --accent-hover: #4b3fd6;
  --accent-subtle: #efedfd;
  --accent-text: #4a3ecf;
  --on-accent: #ffffff;
  --focus: 0 0 0 3px rgba(90, 78, 230, .28);

  /* Semantic status hues: background / foreground pairs */
  --gray-bg: #eeeef2;   --gray-fg: #55556a;
  --blue-bg: #e6f0ff;   --blue-fg: #1f5fc4;
  --teal-bg: #e1f6f3;   --teal-fg: #0d7a6c;
  --amber-bg: #fff3dc;  --amber-fg: #9a5b00;
  --violet-bg: #f1eaff; --violet-fg: #6c3fd1;
  --green-bg: #e3f6e9;  --green-fg: #1b7a3d;
  --red-bg: #fdebec;    --red-fg: #c0302f;
  --dot-gray: #9a9aae; --dot-blue: #3b82f6; --dot-teal: #14b8a6; --dot-amber: #f59e0b;
  --dot-violet: #8b5cf6; --dot-green: #22c55e; --dot-red: #ef4444;

  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #16161c;
  --bg-subtle: #1b1b22;
  --bg-sunken: #121217;
  --bg-hover: #23232c;
  --bg-active: #2b2b36;
  --sidebar-bg: #111116;
  --surface: #1e1e26;
  --overlay: rgba(0, 0, 0, .55);
  --border: #2c2c37;
  --border-strong: #3a3a48;
  --text: #ececf2;
  --text-muted: #a5a5b8;
  --text-faint: #74748a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, .45);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .6);

  --accent: #7b70f5;
  --accent-hover: #8d84f7;
  --accent-subtle: #27243f;
  --accent-text: #aaa3ff;
  --focus: 0 0 0 3px rgba(123, 112, 245, .35);

  --gray-bg: #2a2a34;   --gray-fg: #b4b4c6;
  --blue-bg: #18263d;   --blue-fg: #86b4ff;
  --teal-bg: #11302d;   --teal-fg: #5fd8c5;
  --amber-bg: #33270f;  --amber-fg: #f4bd59;
  --violet-bg: #2a2142; --violet-fg: #bba1ff;
  --green-bg: #13301e;  --green-fg: #6bdc93;
  --red-bg: #3a1a1c;    --red-fg: #ff8a87;

  color-scheme: dark;
}
