/*
 * ============================================================
 *  EZ Queue — Master Design Token System
 *  src/core/theme/tokens.css
 *
 *  Usage:  apply data-theme="pure-bold|techy|friendly|corporate|playful|monochrome"
 *          and   data-mode="light|dark"  on <html>
 *
 *  All components reference ONLY these tokens — zero hardcoded
 *  colours, sizes, or shadows anywhere else in the codebase.
 *
 *  TEXT COLOR SYSTEM (v2):
 *  ─────────────────────────────────────────────────────────
 *  Light modes → cool-toned monochromatic BLACKS
 *    --color-text:        near-black   (#0F1117)
 *    --color-text-muted:  dark cool-gray (#3A3F4A)  — vibrant, readable
 *    --color-text-subtle: mid cool-gray  (#6B7385)  — present, not faded
 *
 *  Dark modes → cool-toned monochromatic WHITES
 *    --color-text:        near-white   (#F0F2F5)
 *    --color-text-muted:  bright cool-gray (#C8CDD8) — luminous, not harsh
 *    --color-text-subtle: mid cool-gray  (#8E95A6)  — clear, not washed
 *
 *  These are THEME-AGNOSTIC — identical across all themes.
 *  Accent/brand color presence lives in --color-accent and
 *  UI elements; text stays neutral and universally legible.
 * ============================================================
 */

/* ── @font-face ───────────────────────────────────────────────────────── */

@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DM_Sans/DMSans-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DM_Sans/DMSans-Italic-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Geist';
  src: url('../fonts/Geist/Geist-VariableFont_wght.ttf') format('truetype'); /* CHANGED: Added Geist variable font */
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-Variable.ttf') format('truetype');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}


/* ====================================================================== */
/*  UNIVERSAL TEXT COLOR PALETTE (cool-toned monochrome)                  */
/*  Applied identically across ALL themes — only varies by light/dark mode */
/* ====================================================================== */

/*
  LIGHT MODE TEXT (cool blacks):
  ┌─────────────────┬──────────┬────────────────────────────────────────┐
  │ Token           │ Value    │ Note                                   │
  ├─────────────────┼──────────┼────────────────────────────────────────┤
  │ --color-text    │ #0F1117  │ Near-black, faint blue-cool cast       │
  │ --color-text-   │ #3A3F4A  │ Dark cool slate — rich, readable       │
  │   muted         │          │                                        │
  │ --color-text-   │ #6B7385  │ Mid cool gray — present, not faded     │
  │   subtle        │          │                                        │
  └─────────────────┴──────────┴────────────────────────────────────────┘

  DARK MODE TEXT (cool whites):
  ┌─────────────────┬──────────┬────────────────────────────────────────┐
  │ Token           │ Value    │ Note                                   │
  ├─────────────────┼──────────┼────────────────────────────────────────┤
  │ --color-text    │ #F0F2F5  │ Near-white, gentle cool tint           │
  │ --color-text-   │ #C8CDD8  │ Bright cool gray — luminous, no glare  │
  │   muted         │          │                                        │
  │ --color-text-   │ #8E95A6  │ Mid cool gray — clear, not washed out  │
  │   subtle        │          │                                        │
  └─────────────────┴──────────┴────────────────────────────────────────┘
*/


/* ====================================================================== */
/*  THEME TOKENS — light mode base                                         */
/*  Sensible defaults (Pure & Bold light) — overridden per theme/mode      */
/* ====================================================================== */

/* ── 1. PURE & BOLD (default / recommended) ───────────────────────────── */
:root,
[data-theme="pure-bold"] {
  /* Background layers */
  --color-bg:          #DCE3EA;
  --color-surface:     #E9EEF5;
  --color-surface-alt: #CCD4DF;
  --color-overlay:     rgba(17, 24, 39, 0.45);

  /* Brand */
  --color-primary:     #111827;
  --color-accent:      #2563EB;
  --color-accent-soft: rgba(37, 99, 235, 0.12);
  --color-accent-ring: rgba(37, 99, 235, 0.28);

  /* Text — light: cool-toned monochromatic blacks */
  --color-text:        #0F1117;   /* near-black, faint cool cast */
  --color-text-muted:  #3A3F4A;   /* dark cool slate — rich, readable */
  --color-text-subtle: #6B7385;   /* mid cool gray — present, not faded */
  --color-text-invert: #FFFFFF;

  /* Borders */
  --color-border:      #BFC8D4;
  --color-border-strong: #A3AEBB;

  /* Sidebar */
  --color-sidebar-bg:    #1E2433;
  --color-sidebar-text:  #E2E8F0;
  --color-sidebar-hover: rgba(255,255,255,0.07);
  --color-sidebar-active: rgba(37, 99, 235, 0.18);
  --color-sidebar-active-text: #60A5FA;

  /* Inputs */
  --color-input-bg:     #F2F5F9;
  --color-input-border: #B8C2CE;
  --color-input-focus:  #2563EB;

  /* Hover tint on surface items */
  --color-hover: rgba(17, 24, 39, 0.06);
  --color-active: rgba(37, 99, 235, 0.08);
}

[data-theme="pure-bold"][data-mode="dark"] {
  --color-bg:          #111827;
  --color-surface:     #1F2937;
  --color-surface-alt: #273347;
  --color-overlay:     rgba(0, 0, 0, 0.6);

  --color-primary:     #F9FAFB;
  --color-accent:      #3B82F6;
  --color-accent-soft: rgba(59, 130, 246, 0.15);
  --color-accent-ring: rgba(59, 130, 246, 0.30);

  /* Text — dark: cool-toned monochromatic whites */
  --color-text:        #F0F2F5;   /* near-white, gentle cool tint */
  --color-text-muted:  #C8CDD8;   /* bright cool gray — luminous, not harsh */
  --color-text-subtle: #8E95A6;   /* mid cool gray — clear, not washed out */
  --color-text-invert: #111827;

  --color-border:      #374151;
  --color-border-strong: #4B5563;

  --color-sidebar-bg:    #0F172A;
  --color-sidebar-text:  #B8C4D4;
  --color-sidebar-hover: rgba(255,255,255,0.06);
  --color-sidebar-active: rgba(59, 130, 246, 0.20);
  --color-sidebar-active-text: #93C5FD;

  --color-input-bg:     #1F2937;
  --color-input-border: #374151;
  --color-input-focus:  #3B82F6;

  --color-hover: rgba(255, 255, 255, 0.05);
  --color-active: rgba(59, 130, 246, 0.10);
}


/* ── 2. TECHY ─────────────────────────────────────────────────────────── */
/*  Default mode: DARK                                                     */
[data-theme="techy"] {
  --color-bg:          #0D0F1A;
  --color-surface:     #1A1D2E;
  --color-surface-alt: #22263A;
  --color-overlay:     rgba(0, 0, 0, 0.65);

  --color-primary:     #CDD6F4;
  --color-accent:      #4D7FFF;
  --color-accent-soft: rgba(77, 127, 255, 0.15);
  --color-accent-ring: rgba(0, 229, 192, 0.30);

  /* Text — dark: cool-toned monochromatic whites */
  --color-text:        #F0F2F5;
  --color-text-muted:  #C8CDD8;
  --color-text-subtle: #8E95A6;
  --color-text-invert: #0D0F1A;

  --color-border:      #2A2E45;
  --color-border-strong: #3A3F5C;

  --color-sidebar-bg:    #080A14;
  --color-sidebar-text:  #A4B0CC;
  --color-sidebar-hover: rgba(77, 127, 255, 0.08);
  --color-sidebar-active: rgba(77, 127, 255, 0.18);
  --color-sidebar-active-text: #00E5C0;

  --color-input-bg:     #1A1D2E;
  --color-input-border: #2A2E45;
  --color-input-focus:  #00E5C0;

  --color-hover: rgba(77, 127, 255, 0.06);
  --color-active: rgba(0, 229, 192, 0.08);
}

[data-theme="techy"][data-mode="light"] {
  --color-bg:          #D0DAE6;
  --color-surface:     #DEE7F1;
  --color-surface-alt: #BFC8D6;
  --color-overlay:     rgba(13, 15, 26, 0.40);

  --color-primary:     #0D0F1A;
  --color-accent:      #4D7FFF;
  --color-accent-soft: rgba(77, 127, 255, 0.12);
  --color-accent-ring: rgba(0, 229, 192, 0.25);

  /* Text — light: cool-toned monochromatic blacks */
  --color-text:        #0F1117;
  --color-text-muted:  #3A3F4A;
  --color-text-subtle: #6B7385;
  --color-text-invert: #FFFFFF;

  --color-border:      #A8B4C8;
  --color-border-strong: #8C9AB2;

  --color-sidebar-bg:    #1A1D2E;
  --color-sidebar-text:  #A4B0CC;
  --color-sidebar-hover: rgba(77, 127, 255, 0.08);
  --color-sidebar-active: rgba(77, 127, 255, 0.18);
  --color-sidebar-active-text: #00E5C0;

  --color-input-bg:     #EDF1F7;
  --color-input-border: #A2AEC0;
  --color-input-focus:  #4D7FFF;

  --color-hover: rgba(13, 15, 26, 0.06);
  --color-active: rgba(77, 127, 255, 0.08);
}


/* ── 3. FRIENDLY ─────────────────────────────────────────────────────── */
/*  Default mode: LIGHT                                                    */
[data-theme="friendly"] {
  --color-bg:          #E5DCD3;
  --color-surface:     #F0E8E0;
  --color-surface-alt: #D4C9BC;
  --color-overlay:     rgba(100, 50, 20, 0.40);

  --color-primary:     #2C1810;
  --color-accent:      #FF6B35;
  --color-accent-soft: rgba(255, 107, 53, 0.12);
  --color-accent-ring: rgba(255, 107, 53, 0.28);

  /* Text — light: cool-toned monochromatic blacks */
  --color-text:        #0F1117;
  --color-text-muted:  #3A3F4A;
  --color-text-subtle: #6B7385;
  --color-text-invert: #FFFFFF;

  --color-border:      #C4B09C;
  --color-border-strong: #A89078;

  --color-sidebar-bg:    #2C1810;
  --color-sidebar-text:  #F0D9CC;
  --color-sidebar-hover: rgba(255, 107, 53, 0.10);
  --color-sidebar-active: rgba(255, 107, 53, 0.20);
  --color-sidebar-active-text: #FFAA80;

  --color-input-bg:     #F7F3EE;
  --color-input-border: #C4B09C;
  --color-input-focus:  #FF6B35;

  --color-hover: rgba(44, 24, 16, 0.06);
  --color-active: rgba(255, 107, 53, 0.08);
}

[data-theme="friendly"][data-mode="dark"] {
  --color-bg:          #1A0E08;
  --color-surface:     #2C1810;
  --color-surface-alt: #3A2218;
  --color-overlay:     rgba(0, 0, 0, 0.60);

  --color-primary:     #FFF0E8;
  --color-accent:      #FF8C5A;
  --color-accent-soft: rgba(255, 140, 90, 0.15);
  --color-accent-ring: rgba(255, 209, 102, 0.28);

  /* Text — dark: cool-toned monochromatic whites */
  --color-text:        #F0F2F5;
  --color-text-muted:  #C8CDD8;
  --color-text-subtle: #8E95A6;
  --color-text-invert: #1A0E08;

  --color-border:      #3A2218;
  --color-border-strong: #5A3828;

  --color-sidebar-bg:    #110A05;
  --color-sidebar-text:  #D4AE9E;
  --color-sidebar-hover: rgba(255, 107, 53, 0.08);
  --color-sidebar-active: rgba(255, 107, 53, 0.18);
  --color-sidebar-active-text: #FFAA80;

  --color-input-bg:     #2C1810;
  --color-input-border: #3A2218;
  --color-input-focus:  #FF8C5A;

  --color-hover: rgba(255, 240, 232, 0.04);
  --color-active: rgba(255, 107, 53, 0.10);
}


/* ── 4. CORPORATE ────────────────────────────────────────────────────── */
/*  Default mode: LIGHT                                                    */
[data-theme="corporate"] {
  --color-bg:          #D9D9E4;
  --color-surface:     #E7E7F1;
  --color-surface-alt: #C9C9D7;
  --color-overlay:     rgba(30, 30, 46, 0.40);

  --color-primary:     #1E1E2E;
  --color-accent:      #6C63FF;
  --color-accent-soft: rgba(108, 99, 255, 0.12);
  --color-accent-ring: rgba(108, 99, 255, 0.28);

  /* Text — light: cool-toned monochromatic blacks */
  --color-text:        #0F1117;
  --color-text-muted:  #3A3F4A;
  --color-text-subtle: #6B7385;
  --color-text-invert: #FFFFFF;

  --color-border:      #B5B3CC;
  --color-border-strong: #9C99B8;

  --color-sidebar-bg:    #1E1E2E;
  --color-sidebar-text:  #BDB9D6;
  --color-sidebar-hover: rgba(108, 99, 255, 0.08);
  --color-sidebar-active: rgba(108, 99, 255, 0.18);
  --color-sidebar-active-text: #A098FF;

  --color-input-bg:     #F1F1F6;
  --color-input-border: #ABA8C4;
  --color-input-focus:  #6C63FF;

  --color-hover: rgba(30, 30, 46, 0.06);
  --color-active: rgba(108, 99, 255, 0.08);
}

[data-theme="corporate"][data-mode="dark"] {
  --color-bg:          #12121C;
  --color-surface:     #1E1E2E;
  --color-surface-alt: #26263A;
  --color-overlay:     rgba(0, 0, 0, 0.65);

  --color-primary:     #E8E7F5;
  --color-accent:      #7C74FF;
  --color-accent-soft: rgba(124, 116, 255, 0.15);
  --color-accent-ring: rgba(124, 116, 255, 0.30);

  /* Text — dark: cool-toned monochromatic whites */
  --color-text:        #F0F2F5;
  --color-text-muted:  #C8CDD8;
  --color-text-subtle: #8E95A6;
  --color-text-invert: #12121C;

  --color-border:      #2E2E44;
  --color-border-strong: #3E3E58;

  --color-sidebar-bg:    #0E0E1A;
  --color-sidebar-text:  #9D9BC0;
  --color-sidebar-hover: rgba(108, 99, 255, 0.08);
  --color-sidebar-active: rgba(108, 99, 255, 0.20);
  --color-sidebar-active-text: #B0A8FF;

  --color-input-bg:     #1E1E2E;
  --color-input-border: #2E2E44;
  --color-input-focus:  #7C74FF;

  --color-hover: rgba(232, 231, 245, 0.04);
  --color-active: rgba(108, 99, 255, 0.10);
}


/* ── 5. PLAYFUL ───────────────────────────────────────────────────────── */
/*  Default mode: DARK                                                     */
[data-theme="playful"] {
  --color-bg:          #1A0A2E;
  --color-surface:     #2D1045;
  --color-surface-alt: #3A1558;
  --color-overlay:     rgba(0, 0, 0, 0.65);

  --color-primary:     #F5D0FF;
  --color-accent:      #FF4DAF;
  --color-accent-soft: rgba(255, 77, 175, 0.15);
  --color-accent-ring: rgba(180, 79, 255, 0.30);

  /* Text — dark: cool-toned monochromatic whites */
  --color-text:        #F0F2F5;
  --color-text-muted:  #C8CDD8;
  --color-text-subtle: #8E95A6;
  --color-text-invert: #1A0A2E;

  --color-border:      #3D1860;
  --color-border-strong: #5A2880;

  --color-sidebar-bg:    #110620;
  --color-sidebar-text:  #BA82D4;
  --color-sidebar-hover: rgba(255, 77, 175, 0.08);
  --color-sidebar-active: rgba(255, 77, 175, 0.18);
  --color-sidebar-active-text: #FF8AD0;

  --color-input-bg:     #2D1045;
  --color-input-border: #3D1860;
  --color-input-focus:  #FF4DAF;

  --color-hover: rgba(245, 208, 255, 0.04);
  --color-active: rgba(255, 77, 175, 0.10);
}

[data-theme="playful"][data-mode="light"] {
  --color-bg:          #DED5E6;
  --color-surface:     #EAE3F0;
  --color-surface-alt: #CEC3D6;
  --color-overlay:     rgba(26, 10, 46, 0.40);

  --color-primary:     #1A0A2E;
  --color-accent:      #E0189A;
  --color-accent-soft: rgba(224, 24, 154, 0.12);
  --color-accent-ring: rgba(180, 79, 255, 0.25);

  /* Text — light: cool-toned monochromatic blacks */
  --color-text:        #0F1117;
  --color-text-muted:  #3A3F4A;
  --color-text-subtle: #6B7385;
  --color-text-invert: #FFFFFF;

  --color-border:      #BCA8D0;
  --color-border-strong: #A48EBC;

  --color-sidebar-bg:    #2D1045;
  --color-sidebar-text:  #D0A0E8;
  --color-sidebar-hover: rgba(255, 77, 175, 0.08);
  --color-sidebar-active: rgba(255, 77, 175, 0.16);
  --color-sidebar-active-text: #FF4DAF;

  --color-input-bg:     #F3F0F7;
  --color-input-border: #BCA8D0;
  --color-input-focus:  #E0189A;

  --color-hover: rgba(26, 10, 46, 0.06);
  --color-active: rgba(224, 24, 154, 0.08);
}


/* ── 6. TRAILBLAZER ───────────────────────────────────────────────────── */
/*  Default mode: DARK                                                     */
[data-theme="trailblazer"] {
  --color-bg:          #0F172A;
  --color-surface:     #1E293B;
  --color-surface-alt: #334155;
  --color-overlay:     rgba(0, 0, 0, 0.65);

  --color-primary:     #F8FAFC;
  --color-accent:      #FACC15;
  --color-accent-soft: rgba(250, 204, 21, 0.15);
  --color-accent-ring: rgba(250, 204, 21, 0.30);

  /* Text — dark: cool-toned monochromatic whites */
  --color-text:        #F0F2F5;
  --color-text-muted:  #C8CDD8;
  --color-text-subtle: #8E95A6;
  --color-text-invert: #0F172A;

  --color-border:      #334155;
  --color-border-strong: #475569;

  --color-sidebar-bg:    #020617;
  --color-sidebar-text:  #B8C4D4;
  --color-sidebar-hover: rgba(250, 204, 21, 0.08);
  --color-sidebar-active: rgba(250, 204, 21, 0.18);
  --color-sidebar-active-text: #FDE047;

  --color-input-bg:     #1E293B;
  --color-input-border: #334155;
  --color-input-focus:  #FACC15;

  --color-hover: rgba(248, 250, 252, 0.04);
  --color-active: rgba(250, 204, 21, 0.10);
}

[data-theme="trailblazer"][data-mode="light"] {
  --color-bg:          #E0DDD7;
  --color-surface:     #ECEAE4;
  --color-surface-alt: #D0CDC5;
  --color-overlay:     rgba(15, 23, 42, 0.40);

  --color-primary:     #0F172A;
  --color-accent:      #EAB308;
  --color-accent-soft: rgba(234, 179, 8, 0.12);
  --color-accent-ring: rgba(234, 179, 8, 0.25);

  /* Text — light: cool-toned monochromatic blacks */
  --color-text:        #0F1117;
  --color-text-muted:  #3A3F4A;
  --color-text-subtle: #6B7385;
  --color-text-invert: #FFFFFF;

  --color-border:      #B8B4AA;
  --color-border-strong: #9C9890;

  --color-sidebar-bg:    #0F172A;
  --color-sidebar-text:  #B8C4D4;
  --color-sidebar-hover: rgba(250, 204, 21, 0.08);
  --color-sidebar-active: rgba(250, 204, 21, 0.16);
  --color-sidebar-active-text: #FDE047;

  --color-input-bg:     #F4F3F0;
  --color-input-border: #B8B4AA;
  --color-input-focus:  #EAB308;

  --color-hover: rgba(15, 23, 42, 0.06);
  --color-active: rgba(234, 179, 8, 0.08);
}


/* ── 7. MONOCHROME ────────────────────────────────────────────────────── */
/*  Default mode: DARK (cool-toned, crisp, not dim)                       */
[data-theme="monochrome"] {
  --color-bg:          #0A0C11;
  --color-surface:     #0F1117;
  --color-surface-alt: #161A22;
  --color-overlay:     rgba(0, 0, 0, 0.70);

  --color-primary:     #D4D8E2;
  --color-accent:      #B8BFD0;
  --color-accent-soft: rgba(184, 191, 208, 0.12);
  --color-accent-ring: rgba(184, 191, 208, 0.28);

  /* Text — dark: cool blue-white tones, bright but not harsh */
  --color-text:        #F2F4F8;
  --color-text-muted:  #C2C8D8;
  --color-text-subtle: #7E8799;
  --color-text-invert: #0F1117;

  --color-border:        #1E2330;
  --color-border-strong: #2B3040;

  --color-sidebar-bg:          #0A0C11;
  --color-sidebar-text:        #8E95A6;
  --color-sidebar-hover:       rgba(242, 244, 248, 0.06);
  --color-sidebar-active:      rgba(242, 244, 248, 0.12);
  --color-sidebar-active-text: #E8EBF2;

  --color-input-bg:     #0F1117;
  --color-input-border: #1E2330;
  --color-input-focus:  #B8BFD0;

  --color-hover:  rgba(242, 244, 248, 0.05);
  --color-active: rgba(242, 244, 248, 0.08);
}

[data-theme="monochrome"][data-mode="light"] {
  --color-bg:          #EFF0F4;
  --color-surface:     #F8F9FB;
  --color-surface-alt: #E2E4EA;
  --color-overlay:     rgba(15, 17, 23, 0.40);

  --color-primary:     #1A1D26;
  --color-accent:      #2E3340;
  --color-accent-soft: rgba(46, 51, 64, 0.10);
  --color-accent-ring: rgba(46, 51, 64, 0.25);

  /* Text — light: cool blue-ink tones, rich but not harsh */
  --color-text:        #0F1117;
  --color-text-muted:  #353B4A;
  --color-text-subtle: #62697A;
  --color-text-invert: #F8F9FB;

  --color-border:        #C4C8D4;
  --color-border-strong: #9BA1B2;

  --color-sidebar-bg:          #0A0C11;
  --color-sidebar-text:        #8E95A6;
  --color-sidebar-hover:       rgba(242, 244, 248, 0.06);
  --color-sidebar-active:      rgba(242, 244, 248, 0.12);
  --color-sidebar-active-text: #E8EBF2;

  --color-input-bg:     #F8F9FB;
  --color-input-border: #C4C8D4;
  --color-input-focus:  #2E3340;

  --color-hover:  rgba(15, 17, 23, 0.05);
  --color-active: rgba(15, 17, 23, 0.08);
}

/* ── 8. CI4 DEFAULT ─────────────────────────────────────────────────── */
/* CHANGED: Added CI4 Default theme with solid defined borders and zero offset shadows */
[data-theme="ci4-default"] {
  --color-bg:            #ffffff;
  --color-surface:       #f7f7f5;
  --color-surface-alt:   #f0f0ec;
  --color-overlay:       rgba(17, 17, 16, 0.45);

  --color-primary:       #111110;
  --color-accent:        #111110;
  --color-accent-soft:   rgba(17, 17, 16, 0.08);
  --color-accent-ring:   rgba(17, 17, 16, 0.25);

  /* Text — QueueSys monochrome palette */
  --color-text:          #111110;
  --color-text-muted:    #555550;
  --color-text-subtle:   #8a8a84;
  --color-text-invert:   #ffffff;

  /* CHANGED: Solid, clearly visible border and area separation lines */
  --color-border:        #b8b8b0;
  --color-border-strong: #111110;

  --color-sidebar-bg:          #f7f7f5;
  --color-sidebar-text:        #111110;
  --color-sidebar-hover:       rgba(17, 17, 16, 0.06);
  --color-sidebar-active:      #f0f0ec;
  --color-sidebar-active-text: #111110;

  --color-input-bg:     #ffffff;
  --color-input-border: #b8b8b0;
  --color-input-focus:  #111110;

  --color-hover:  rgba(17, 17, 16, 0.05);
  --color-active: rgba(17, 17, 16, 0.08);

  /* CHANGED: Zero offset shadows with crisp solid component borders */
  --shadow-offset-x:    0px;
  --shadow-offset-y:    0px;
  --shadow-color:       #111110;
  --shadow-color-hover: #444440;
  --shadow-border-width: 1.5px;
  --shadow-xs:          none;
  --shadow-sm:          none;
  --shadow-md:          none;
  --shadow-lg:          none;
  --shadow-xl:          none;
}

[data-theme="ci4-default"][data-mode="dark"] {
  --color-bg:            #111110;
  --color-surface:       #1a1a19;
  --color-surface-alt:   #242422;
  --color-overlay:       rgba(0, 0, 0, 0.65);

  --color-primary:       #ffffff;
  --color-accent:        #ffffff;
  --color-accent-soft:   rgba(255, 255, 255, 0.12);
  --color-accent-ring:   rgba(255, 255, 255, 0.30);

  /* Text — dark mode inverse */
  --color-text:          #ffffff;
  --color-text-muted:    #a8a8a0;
  --color-text-subtle:   #787870;
  --color-text-invert:   #111110;

  /* CHANGED: Solid, clearly visible border and area separation lines */
  --color-border:        #444440;
  --color-border-strong: #787870;

  --color-sidebar-bg:          #111110;
  --color-sidebar-text:        #a8a8a0;
  --color-sidebar-hover:       rgba(255, 255, 255, 0.06);
  --color-sidebar-active:      #1a1a19;
  --color-sidebar-active-text: #ffffff;

  --color-input-bg:     #1a1a19;
  --color-input-border: #444440;
  --color-input-focus:  #ffffff;

  --color-hover:  rgba(255, 255, 255, 0.05);
  --color-active: rgba(255, 255, 255, 0.08);

  /* CHANGED: Zero offset shadows with crisp solid component borders */
  --shadow-offset-x:    0px;
  --shadow-offset-y:    0px;
  --shadow-color:       #555550;
  --shadow-color-hover: #888880;
  --shadow-border-width: 1.5px;
  --shadow-xs:          none;
  --shadow-sm:          none;
  --shadow-md:          none;
  --shadow-lg:          none;
  --shadow-xl:          none;
}



/* ====================================================================== */
/*  SEMANTIC / STATUS COLORS — identical across all themes                 */
/* ====================================================================== */

:root {
  --color-success:      #10B981;
  --color-success-soft: rgba(16, 185, 129, 0.12);
  --color-success-text: #065F46;

  --color-warning:      #F59E0B;
  --color-warning-soft: rgba(245, 158, 11, 0.12);
  --color-warning-text: #92400E;

  --color-error:        #EF4444;
  --color-error-soft:   rgba(239, 68, 68, 0.12);
  --color-error-text:   #7F1D1D;

  --color-info:         #3B82F6;
  --color-info-soft:    rgba(59, 130, 246, 0.12);
  --color-info-text:    #1E3A8A;

  /* Queue status semantic colors */
  --color-queued:       #8B5CF6;
  --color-queued-soft:  rgba(139, 92, 246, 0.12);
  --color-serving:      #10B981;
  --color-serving-soft: rgba(16, 185, 129, 0.12);
  --color-no-show:      #F59E0B;
  --color-cancelled:    #EF4444;
  --color-completed:    #6B7280;
  --color-completed-soft: rgba(107, 114, 128, 0.12);
}

/* Dark mode semantic adjustments — soften text on dark surfaces */
[data-mode="dark"] {
  --color-success-text: #6EE7B7;
  --color-warning-text: #FCD34D;
  --color-error-text:   #FCA5A5;
  --color-info-text:    #93C5FD;
}

/* Techy, Playful, Trailblazer & Monochrome are always dark — treat as dark mode for semantics */
[data-theme="techy"],
[data-theme="playful"],
[data-theme="trailblazer"],
[data-theme="monochrome"] {
  --color-success-text: #6EE7B7;
  --color-warning-text: #FCD34D;
  --color-error-text:   #FCA5A5;
  --color-info-text:    #93C5FD;
}


/* ====================================================================== */
/*  TYPOGRAPHY                                                             */
/* ====================================================================== */

:root {
  --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-heading: 'Geist', sans-serif; /* CHANGED: Replaced Syne with Geist */
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Scale (sp → rem: 1sp ≈ 1px on web) */
  --text-display:   2rem;       /* 32px — hero titles      */
  --text-h1:        1.75rem;    /* 28px — page titles      */
  --text-h2:        1.5rem;     /* 24px — card headers     */
  --text-title:     1.25rem;    /* 20px — section headers  */
  --text-body-lg:   1rem;       /* 16px — primary body     */
  --text-body:      0.875rem;   /* 14px — secondary text   */
  --text-caption:   0.75rem;    /* 12px — labels, hints    */
  --text-overline:  0.625rem;   /* 10px — tags, chips      */

  /* Queue-specific (JetBrains Mono) */
  --text-queue-num: 3rem;       /* 48px — queue display    */
  --text-ticket:    1.25rem;    /* 20px — ticket codes     */

  /* Weights */
  --weight-regular:   400;
  --weight-medium:    500;
  --weight-semibold:  600;
  --weight-bold:      700;

  /* Line heights */
  --leading-tight:  1.25;
  --leading-snug:   1.375;
  --leading-normal: 1.5;
  --leading-relaxed:1.625;
}


/* ====================================================================== */
/*  SPACING — 8pt grid                                                     */
/* ====================================================================== */

:root {
  --space-1:   2px;
  --space-2:   4px;
  --space-3:   8px;
  --space-4:  12px;
  --space-5:  16px;
  --space-6:  24px;
  --space-7:  32px;
  --space-8:  48px;
  --space-9:  64px;

  /* Semantic aliases */
  --spacing-xs:  var(--space-2);
  --spacing-sm:  var(--space-3);
  --spacing-md:  var(--space-5);
  --spacing-lg:  var(--space-6);
  --spacing-xl:  var(--space-7);
  --spacing-2xl: var(--space-8);
}


/* ====================================================================== */
/*  BORDER RADIUS                                                          */
/* ====================================================================== */

:root {
  --radius-xs:   4px;
  --radius-sm:   6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-full:999px;
}


/* ====================================================================== */
/*  HARD OFFSET SHADOWS — zero blur, matching border, bottom-right dir    */
/* ====================================================================== */

:root {
  /* Shadow offset — controls the "lift" depth (70% density) */
  --shadow-offset-x: 3px;
  --shadow-offset-y: 3px;

  /* Shadow / border color — always match for visual unity */
  --shadow-color: #111827;
  --shadow-border-width: 1.5px;

  /* Monochromatic hover highlight — a lighter shade of the shadow color */
  --shadow-color-hover: color-mix(in srgb, var(--shadow-color) 55%, transparent);

  /* Composed hard-offset shadow scale (blur is ALWAYS 0px) */
  --shadow-xs: 1px 1px 0px var(--shadow-color);
  --shadow-sm: calc(var(--shadow-offset-x) * 0.5)
               calc(var(--shadow-offset-y) * 0.5)
               0px var(--shadow-color);
  --shadow-md: var(--shadow-offset-x)
               var(--shadow-offset-y)
               0px var(--shadow-color);
  --shadow-lg: calc(var(--shadow-offset-x) * 1.75)
               calc(var(--shadow-offset-y) * 1.75)
               0px var(--shadow-color);
  --shadow-xl: calc(var(--shadow-offset-x) * 2.5)
               calc(var(--shadow-offset-y) * 2.5)
               0px var(--shadow-color);
}

/* ── Per-theme shadow color overrides ─────────────────────────────────── */
/* Shadow color already set in :root for pure-bold light (default)        */

[data-theme="pure-bold"][data-mode="dark"] {
  --shadow-color: rgba(249, 250, 251, 0.75);
}

[data-theme="techy"] {
  --shadow-color: rgba(205, 214, 244, 0.70);
}
[data-theme="techy"][data-mode="light"] {
  --shadow-color: #0D0F1A;
}

[data-theme="friendly"] {
  --shadow-color: #2C1810;
}
[data-theme="friendly"][data-mode="dark"] {
  --shadow-color: rgba(255, 240, 232, 0.70);
}

[data-theme="corporate"] {
  --shadow-color: #1E1E2E;
}
[data-theme="corporate"][data-mode="dark"] {
  --shadow-color: rgba(232, 231, 245, 0.70);
}

[data-theme="playful"] {
  --shadow-color: rgba(245, 208, 255, 0.70);
}
[data-theme="playful"][data-mode="light"] {
  --shadow-color: #1A0A2E;
}

[data-theme="trailblazer"] {
  --shadow-color: #000000;
}
[data-theme="trailblazer"][data-mode="light"] {
  --shadow-color: #0F172A;
}

[data-theme="monochrome"] {
  --shadow-color: rgba(255, 255, 255, 0.70);
}
[data-theme="monochrome"][data-mode="light"] {
  --shadow-color: #000000;
}

/* CHANGED: Disable offset shadows with solid borders for ci4-default theme */
[data-theme="ci4-default"] {
  --shadow-color:       #111110;
  --shadow-color-hover: #444440;
  --shadow-border-width: 1.5px;
  --shadow-offset-x:    0px;
  --shadow-offset-y:    0px;
  --shadow-xs:          none;
  --shadow-sm:          none;
  --shadow-md:          none;
  --shadow-lg:          none;
  --shadow-xl:          none;
}
[data-theme="ci4-default"][data-mode="dark"] {
  --shadow-color:       #555550;
  --shadow-color-hover: #888880;
  --shadow-border-width: 1.5px;
  --shadow-offset-x:    0px;
  --shadow-offset-y:    0px;
  --shadow-xs:          none;
  --shadow-sm:          none;
  --shadow-md:          none;
  --shadow-lg:          none;
  --shadow-xl:          none;
}



/* ====================================================================== */
/*  ANIMATION DURATIONS & CURVES (from design guide §9)                   */
/* ====================================================================== */

:root {
  --duration-fast:    200ms;
  --duration-normal:  250ms;
  --duration-shift:   300ms;
  --duration-status:  400ms;
  --duration-queue:   600ms;

  --ease-in:     cubic-bezier(0.4, 0, 1, 1);
  --ease-out:    cubic-bezier(0, 0, 0.2, 1);
  --ease-inout:  cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}


/* ====================================================================== */
/*  Z-INDEX SCALE                                                          */
/* ====================================================================== */

:root {
  --z-base:      0;
  --z-raised:   10;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-sidebar:  300;
  --z-modal:    400;
  --z-toast:    500;
  --z-tooltip:  600;
}


/* ====================================================================== */
/*  POPOVER ELEVATION                                                      */
/* ====================================================================== */

/* CHANGED: Dropdowns and popovers have no outline, and the theme shadows are flat (none), so they need
   their own soft shadow to stand off the same-colored cards they open over. Same in every theme. */
:root {
  --shadow-popover: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
}

[data-mode="dark"] {
  --shadow-popover: 0 8px 24px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.4);
}


/* ====================================================================== */
/*  RESPONSIVE BREAKPOINTS (CSS custom media — used via JS in components) */
/* ====================================================================== */

:root {
  --bp-sm:  600px;   /* phone landscape / small tablet */
  --bp-md:  840px;   /* tablet                         */
  --bp-lg: 1280px;   /* desktop                        */
}


/* ====================================================================== */
/*  SIDEBAR DIMENSIONS (layout constants)                                  */
/* ====================================================================== */

:root {
  /* CHANGED: Adjusted to 220px (90% of the original 244px expanded width) */
  --sidebar-width:         240px;
  --sidebar-width-collapsed: 64px;
  --topbar-height:          60px;
}


/* ====================================================================== */
/*  GLOBAL RESET & BASE STYLES                                             */
/* ====================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden; /* Prevent horizontal overflow from absolute/fixed elements */
}

html[data-mode="dark"],
html[data-theme="techy"]:not([data-mode="light"]),
html[data-theme="playful"]:not([data-mode="light"]),
html[data-theme="trailblazer"]:not([data-mode="light"]),
html[data-theme="monochrome"]:not([data-mode="light"]) {
  color-scheme: dark;
}

html[data-mode="light"] {
  color-scheme: light;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-body-lg);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100dvh;
  overflow-x: hidden; /* Prevent horizontal overflow from absolute/fixed elements */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition:
    background-color var(--duration-normal) var(--ease-inout),
    color            var(--duration-normal) var(--ease-inout);
}

#root {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-text);
}
h1 { font-size: var(--text-h1);    }
h2 { font-size: var(--text-h2);    }
h3 { font-size: var(--text-title); }

/* Links */
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: opacity var(--duration-fast) var(--ease-out);
}
a:hover { opacity: 0.8; }

/* Inputs — base reset (components override) */
input, select, textarea, button {
  font-family: var(--font-sans);
  font-size: inherit;
}

button { cursor: pointer; }

/* Scrollbar (Webkit) */
*::-webkit-scrollbar,
::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track,
::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb,
::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: var(--radius-full);
}
*::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-subtle);
}
/* CHANGED: Hide scrollbar arrow buttons across Webkit/Blink browsers */
*::-webkit-scrollbar-button,
::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* CHANGED: Scope standard scrollbar properties to non-webkit browsers to prevent native arrow steppers in Chromium */
@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--color-border-strong) transparent;
  }
}


/* Selection */
::selection {
  background: var(--color-accent-soft);
  color: var(--color-text);
}

/* Focus ring — accessibility */
:focus-visible {
  outline: 2px solid var(--shadow-color-hover);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* ── Icon status colors — for Lucide SVG status indicators ───────────── */
.icon-status--active  { color: var(--color-success); }
.icon-status--inactive { color: var(--color-error); }
.icon-status--warning { color: var(--color-warning); }

/* Inline Lucide icon alignment helper */
.icon-inline { vertical-align: -0.125em; }