/* Lighten Up CRM — design tokens
   Light is the default (matches lightenupaz.com). Dark via [data-theme="dark"] or system preference. */

:root {
  color-scheme: light;

  /* Surfaces */
  --bg: #f2f0eb;            /* Daylight: warm off-white ground, a shade deeper so white cards read as cards */
  --surface: #ffffff;
  --surface-2: #f1efea;     /* subtle inset / hover */
  --surface-3: #e8e5de;     /* pressed / selected */
  --line: #e6e2d9;          /* hairline dividers */
  --line-strong: #cfcbc1;
  --overlay: rgba(20, 18, 14, 0.45);

  /* Text */
  --text: #1b1a17;
  --text-2: #5a574f;
  --text-3: #8a867c;
  --text-inverse: #ffffff;

  /* Daylight (approved Oct 8 2026): filled controls (search, segmented), grouped-list radius, tap size */
  --fill: #e8e5de;
  --r-group: 16px;
  --tap: 44px;

  /* Brand accent: warm amber "light" */
  --accent: #e9a80b;         /* buttons, highlights */
  --accent-hover: #d3960a;
  --accent-soft: #fff4d6;    /* tinted backgrounds */
  --accent-ink: #9a6600;     /* accent used as text on light surfaces (AA) */
  --accent-glow: 0 0 0 4px rgba(233, 168, 11, 0.22);

  /* Semantic */
  --good: #1f9d55;  --good-soft: #e3f5ea;  --good-ink: #17703d;
  --warn: #d97706;  --warn-soft: #fdf0dc;  --warn-ink: #9a4f00;
  --bad:  #d3403c;  --bad-soft:  #fbe6e5;  --bad-ink:  #a12f2c;
  --info: #2f6fdb;  --info-soft: #e6eefb;  --info-ink: #234f9e;
  --violet: #7c5cd6; --violet-soft: #eee9fb; --violet-ink: #5a3fb0;
  --teal: #0f9f9a;  --teal-soft: #e0f5f4; --teal-ink: #0b6f6b;

  /* Stage palette (pipeline columns / pills) */
  --stage-new: var(--info);
  --stage-contacted: var(--violet);
  --stage-engaged: var(--teal);
  --stage-quoted: var(--accent);
  --stage-won: var(--good);
  --stage-lost: var(--text-3);

  /* Type */
  --font-ui: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --fs-xs: 11.5px; --fs-sm: 12.5px; --fs-md: 14px; --fs-lg: 16px; --fs-xl: 20px; --fs-2xl: 26px; --fs-3xl: 32px;
  --lh: 1.45;

  /* Shape & depth */
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(20, 18, 14, 0.06), 0 1px 1px rgba(20, 18, 14, 0.04);
  --shadow-2: 0 4px 14px rgba(20, 18, 14, 0.08), 0 1px 3px rgba(20, 18, 14, 0.06);
  --shadow-3: 0 18px 50px rgba(20, 18, 14, 0.18), 0 4px 12px rgba(20, 18, 14, 0.08);

  /* Layout */
  --sidebar-w: 232px;
  --topbar-h: 56px;
  --content-max: 1440px;
  --gutter: 24px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-1: 120ms; --dur-2: 220ms; --dur-3: 340ms;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1013; --surface: #17181c; --surface-2: #1f2026; --surface-3: #282a31;
    --line: #262830; --line-strong: #363943; --overlay: rgba(0,0,0,0.6); --fill: #24262c;
    --text: #ecebe6; --text-2: #a9a7a0; --text-3: #737269; --text-inverse: #16150f;
    --accent: #f2c14e; --accent-hover: #f7cd6a; --accent-soft: #2c2412; --accent-ink: #f2c14e;
    --accent-glow: 0 0 0 4px rgba(242, 193, 78, 0.22);
    --good: #3ccf7a; --good-soft: #10281b; --good-ink: #5fdc93;
    --warn: #f0a33a; --warn-soft: #2b1f0f; --warn-ink: #f3b45c;
    --bad: #f0645f; --bad-soft: #2d1514; --bad-ink: #f58a86;
    --info: #6b9cf5; --info-soft: #131d31; --info-ink: #8db1f7;
    --violet: #a48cf0; --violet-soft: #1d1830; --violet-ink: #b7a4f4;
    --teal: #2fc3bd; --teal-soft: #0f2624; --teal-ink: #5ad2cd;
    --shadow-1: 0 1px 2px rgba(0,0,0,0.5); --shadow-2: 0 6px 18px rgba(0,0,0,0.45); --shadow-3: 0 24px 60px rgba(0,0,0,0.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1013; --surface: #17181c; --surface-2: #1f2026; --surface-3: #282a31;
  --line: #262830; --line-strong: #363943; --overlay: rgba(0,0,0,0.6); --fill: #24262c;
  --text: #ecebe6; --text-2: #a9a7a0; --text-3: #737269; --text-inverse: #16150f;
  --accent: #f2c14e; --accent-hover: #f7cd6a; --accent-soft: #2c2412; --accent-ink: #f2c14e;
  --accent-glow: 0 0 0 4px rgba(242, 193, 78, 0.22);
  --good: #3ccf7a; --good-soft: #10281b; --good-ink: #5fdc93;
  --warn: #f0a33a; --warn-soft: #2b1f0f; --warn-ink: #f3b45c;
  --bad: #f0645f; --bad-soft: #2d1514; --bad-ink: #f58a86;
  --info: #6b9cf5; --info-soft: #131d31; --info-ink: #8db1f7;
  --violet: #a48cf0; --violet-soft: #1d1830; --violet-ink: #b7a4f4;
  --teal: #2fc3bd; --teal-soft: #0f2624; --teal-ink: #5ad2cd;
  --shadow-1: 0 1px 2px rgba(0,0,0,0.5); --shadow-2: 0 6px 18px rgba(0,0,0,0.45); --shadow-3: 0 24px 60px rgba(0,0,0,0.6);
}
