/* ==========================================================================
   PeopleWith Web — Design tokens
   Every colour, type size, space and radius used in the app lives here.
   Components reference these variables only; never hard-code values.
   ========================================================================== */

:root {
  /* ---- PeopleWith brand (Brand Guidelines Nov 2025 / Feb 2026) ------
     Raw palette — components use the semantic tokens below, not these. */
  --pw-navy: #1A5384;          /* "people" wordmark; primary interactive  */
  --pw-deep: #143541;          /* deep teal-navy; headings, dark surfaces */
  --pw-mint: #CCE5E6;          /* mint; soft fills                         */
  --pw-lavender: #8374A7;      /* logo ring; secondary accent              */
  --pw-sky: #00AEEF;           /* dark-background "with"                   */
  --pw-gradient: linear-gradient(135deg, #004767 0%, #053138 100%);
  --pw-gradient-bright: linear-gradient(90deg, #0089CE 0%, #00AEEF 100%);

  /* ---- Type: Poppins (brand), JetBrains Mono for IDs/codes ---------- */
  --font-display: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --text-xs: 0.75rem;    /* 12 */
  --text-sm: 0.8125rem;  /* 13 */
  --text-md: 0.875rem;   /* 14 */
  --text-base: 0.9375rem;/* 15 */
  --text-lg: 1rem;       /* 16 */
  --text-xl: 1.25rem;    /* 20 */
  --text-2xl: 1.375rem;  /* 22 */
  --text-3xl: 2rem;      /* 32 */
  --text-4xl: 2.375rem;  /* 38 */
  --text-stat: 2.5rem;   /* 40 */

  /* ---- Space (4px grid) --------------------------------------------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;

  /* ---- Radius -------------------------------------------------------- */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 999px;

  /* ---- Sizing -------------------------------------------------------- */
  --sidebar-w: 264px;
  --topbar-h: 72px;
  --control-h: 44px;
  --control-h-sm: 36px;

  /* ---- Motion -------------------------------------------------------- */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur-fast: 120ms;
  --dur: 200ms;

  /* ---- Study accent (white-label). Overridden inline from the tenant -- */
  --accent: #1A5384;
  --accent-ink: #FFFFFF;

  /* ---- Light theme (default) ---------------------------------------- */
  color-scheme: light;
  --bg: #F2F6F7;
  --surface: #FFFFFF;
  --surface-2: #EAF1F2;
  --line: #DAE5E7;
  --line-2: #C3D3D6;
  --ink: #143541;
  --ink-2: #3D5660;
  --ink-3: #5A6F78;

  --brand: #1A5384;
  --brand-hover: #144269;
  --brand-ink: #FFFFFF;
  --brand-soft: #DDEDEF;
  --brand-text: #1A5384;

  --warn: #8A4400;
  --warn-soft: #FBEBD6;
  --crit: #B42318;
  --crit-soft: #FCE4E1;
  --crit-ink: #FFFFFF;
  --ok: #17694A;
  --ok-soft: #DCF1E7;
  --info: #5B4A91;
  --info-soft: #ECE8F6;

  /* Charts and multi-part bars, in order */
  --chart-1: #1A5384;
  --chart-2: #0089CE;
  --chart-3: #8374A7;
  --chart-4: #7FC3C6;

  /* Sign-in hero / brand panels (always dark, brand gradient) */
  --hero-bg: var(--pw-gradient);
  --hero-ink: #FFFFFF;
  --hero-soft: rgba(255, 255, 255, .80);
  --hero-line: rgba(204, 229, 230, .24);
  --hero-tint: rgba(204, 229, 230, .12);

  --paper: #FFFFFF;          /* always white: signatures, scanned documents */
  --overlay: rgba(10, 30, 38, .45);
  --shadow: 0 1px 2px rgba(20, 53, 65, .05), 0 6px 20px rgba(20, 53, 65, .06);
  --shadow-lg: 0 12px 40px rgba(20, 53, 65, .20);
}

/* ---- Dark theme --------------------------------------------------- */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0A1A20;
  --surface: #0F242C;
  --surface-2: #153039;
  --line: #1E3A44;
  --line-2: #2B4B56;
  --ink: #EAF3F4;
  --ink-2: #B2C6CB;
  --ink-3: #8DA4AA;

  --brand: #4DBDF2;
  --brand-hover: #7FD0F6;
  --brand-ink: #04222E;
  --brand-soft: #0E3348;
  --brand-text: #7FD0F6;

  --warn: #F3AE63;
  --warn-soft: #3A2813;
  --crit: #FF8F85;
  --crit-soft: #3E1816;
  --crit-ink: #2A0B09;
  --ok: #6FD3A4;
  --ok-soft: #10301F;
  --info: #B9ACE3;
  --info-soft: #2A2348;

  --chart-1: #4DBDF2;
  --chart-2: #CCE5E6;
  --chart-3: #B9ACE3;
  --chart-4: #2E7FA8;

  --hero-bg: linear-gradient(135deg, #053E58 0%, #04232A 100%);

  --overlay: rgba(0, 0, 0, .6);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .55);
}
