    /* ========================================
       DESIGN TOKENS - Edit these to theme everything
       ======================================== */
    :root {
      /* ─────────────────────────────────────
         COLORS: Slate (Blue-gray)
         ───────────────────────────────────── */
      --slate-50:  #f8fafc;
      --slate-100: #f1f5f9;
      --slate-200: #e2e8f0;
      --slate-300: #cbd5e1;
      --slate-400: #94a3b8;
      --slate-500: #64748b;
      --slate-600: #475569;
      --slate-700: #334155;
      --slate-800: #1e293b;
      --slate-900: #0f172a;
      --slate-950: #020617;

      /* ─────────────────────────────────────
         COLORS: Gray
         ───────────────────────────────────── */
      --gray-50:  #f9fafb;
      --gray-100: #f3f4f6;
      --gray-200: #e5e7eb;
      --gray-300: #d1d5db;
      --gray-400: #9ca3af;
      --gray-500: #6b7280;
      --gray-600: #4b5563;
      --gray-700: #374151;
      --gray-800: #1f2937;
      --gray-900: #111827;
      --gray-950: #030712;

      /* ─────────────────────────────────────
         COLORS: Zinc
         ───────────────────────────────────── */
      --zinc-50:  #fafafa;
      --zinc-100: #f4f4f5;
      --zinc-200: #e4e4e7;
      --zinc-300: #d4d4d8;
      --zinc-400: #a1a1aa;
      --zinc-500: #71717a;
      --zinc-600: #52525b;
      --zinc-700: #3f3f46;
      --zinc-800: #27272a;
      --zinc-900: #18181b;
      --zinc-950: #09090b;

      /* ─────────────────────────────────────
         COLORS: Neutral
         ───────────────────────────────────── */
      --neutral-50:  #fafafa;
      --neutral-100: #f5f5f5;
      --neutral-200: #e5e5e5;
      --neutral-300: #d4d4d4;
      --neutral-400: #a3a3a3;
      --neutral-500: #737373;
      --neutral-600: #525252;
      --neutral-700: #404040;
      --neutral-800: #262626;
      --neutral-900: #171717;
      --neutral-950: #0a0a0a;

      /* ─────────────────────────────────────
         COLORS: Stone
         ───────────────────────────────────── */
      --stone-50:  #fafaf9;
      --stone-100: #f5f5f4;
      --stone-200: #e7e5e4;
      --stone-300: #d6d3d1;
      --stone-400: #a8a29e;
      --stone-500: #78716c;
      --stone-600: #57534e;
      --stone-700: #44403c;
      --stone-800: #292524;
      --stone-900: #1c1917;
      --stone-950: #0c0a09;

      /* ─────────────────────────────────────
         COLORS: Red
         ───────────────────────────────────── */
      --red-50:  #fef2f2;
      --red-100: #fee2e2;
      --red-200: #fecaca;
      --red-300: #fca5a5;
      --red-400: #f87171;
      --red-500: #ef4444;
      --red-600: #dc2626;
      --red-700: #b91c1c;
      --red-800: #991b1b;
      --red-900: #7f1d1d;
      --red-950: #450a0a;

      /* ─────────────────────────────────────
         COLORS: Orange
         ───────────────────────────────────── */
      --orange-50:  #fff7ed;
      --orange-100: #ffedd5;
      --orange-200: #fed7aa;
      --orange-300: #fdba74;
      --orange-400: #fb923c;
      --orange-500: #f97316;
      --orange-600: #ea580c;
      --orange-700: #c2410c;
      --orange-800: #9a3412;
      --orange-900: #7c2d12;
      --orange-950: #431407;

      /* ─────────────────────────────────────
         COLORS: Amber
         ───────────────────────────────────── */
      --amber-50:  #fffbeb;
      --amber-100: #fef3c7;
      --amber-200: #fde68a;
      --amber-300: #fcd34d;
      --amber-400: #fbbf24;
      --amber-500: #f59e0b;
      --amber-600: #d97706;
      --amber-700: #b45309;
      --amber-800: #92400e;
      --amber-900: #78350f;
      --amber-950: #451a03;

      /* ─────────────────────────────────────
         COLORS: Yellow
         ───────────────────────────────────── */
      --yellow-50:  #fefce8;
      --yellow-100: #fef9c3;
      --yellow-200: #fef08a;
      --yellow-300: #fde047;
      --yellow-400: #facc15;
      --yellow-500: #eab308;
      --yellow-600: #ca8a04;
      --yellow-700: #a16207;
      --yellow-800: #854d0e;
      --yellow-900: #713f12;
      --yellow-950: #422006;

      /* ─────────────────────────────────────
         COLORS: Lime
         ───────────────────────────────────── */
      --lime-50:  #f7fee7;
      --lime-100: #ecfccb;
      --lime-200: #d9f99d;
      --lime-300: #bef264;
      --lime-400: #a3e635;
      --lime-500: #84cc16;
      --lime-600: #65a30d;
      --lime-700: #4d7c0f;
      --lime-800: #3f6212;
      --lime-900: #365314;
      --lime-950: #1a2e05;

      /* ─────────────────────────────────────
         COLORS: Green
         ───────────────────────────────────── */
      --green-50:  #f0fdf4;
      --green-100: #dcfce7;
      --green-200: #bbf7d0;
      --green-300: #86efac;
      --green-400: #4ade80;
      --green-500: #22c55e;
      --green-600: #16a34a;
      --green-700: #15803d;
      --green-800: #166534;
      --green-900: #14532d;
      --green-950: #052e16;

      /* ─────────────────────────────────────
         COLORS: Emerald
         ───────────────────────────────────── */
      --emerald-50:  #ecfdf5;
      --emerald-100: #d1fae5;
      --emerald-200: #a7f3d0;
      --emerald-300: #6ee7b7;
      --emerald-400: #34d399;
      --emerald-500: #10b981;
      --emerald-600: #059669;
      --emerald-700: #047857;
      --emerald-800: #065f46;
      --emerald-900: #064e3b;
      --emerald-950: #022c22;

      /* ─────────────────────────────────────
         COLORS: Teal
         ───────────────────────────────────── */
      --teal-50:  #f0fdfa;
      --teal-100: #ccfbf1;
      --teal-200: #99f6e4;
      --teal-300: #5eead4;
      --teal-400: #2dd4bf;
      --teal-500: #14b8a6;
      --teal-600: #0d9488;
      --teal-700: #0f766e;
      --teal-800: #115e59;
      --teal-900: #134e4a;
      --teal-950: #042f2e;

      /* ─────────────────────────────────────
         COLORS: Cyan
         ───────────────────────────────────── */
      --cyan-50:  #ecfeff;
      --cyan-100: #cffafe;
      --cyan-200: #a5f3fc;
      --cyan-300: #67e8f9;
      --cyan-400: #22d3ee;
      --cyan-500: #06b6d4;
      --cyan-600: #0891b2;
      --cyan-700: #0e7490;
      --cyan-800: #155e75;
      --cyan-900: #164e63;
      --cyan-950: #083344;

      /* ─────────────────────────────────────
         COLORS: Sky
         ───────────────────────────────────── */
      --sky-50:  #f0f9ff;
      --sky-100: #e0f2fe;
      --sky-200: #bae6fd;
      --sky-300: #7dd3fc;
      --sky-400: #38bdf8;
      --sky-500: #0ea5e9;
      --sky-600: #0284c7;
      --sky-700: #0369a1;
      --sky-800: #075985;
      --sky-900: #0c4a6e;
      --sky-950: #082f49;

      /* ─────────────────────────────────────
         COLORS: Blue
         ───────────────────────────────────── */
      --blue-50:  #eff6ff;
      --blue-100: #dbeafe;
      --blue-200: #bfdbfe;
      --blue-300: #93c5fd;
      --blue-400: #60a5fa;
      --blue-500: #3b82f6;
      --blue-600: #2563eb;
      --blue-700: #1d4ed8;
      --blue-800: #1e40af;
      --blue-900: #1e3a8a;
      --blue-950: #172554;

      /* ─────────────────────────────────────
         COLORS: Indigo
         ───────────────────────────────────── */
      --indigo-50:  #eef2ff;
      --indigo-100: #e0e7ff;
      --indigo-200: #c7d2fe;
      --indigo-300: #a5b4fc;
      --indigo-400: #818cf8;
      --indigo-500: #6366f1;
      --indigo-600: #4f46e5;
      --indigo-700: #4338ca;
      --indigo-800: #3730a3;
      --indigo-900: #312e81;
      --indigo-950: #1e1b4b;

      /* ─────────────────────────────────────
         COLORS: Violet
         ───────────────────────────────────── */
      --violet-50:  #f5f3ff;
      --violet-100: #ede9fe;
      --violet-200: #ddd6fe;
      --violet-300: #c4b5fd;
      --violet-400: #a78bfa;
      --violet-500: #8b5cf6;
      --violet-600: #7c3aed;
      --violet-700: #6d28d9;
      --violet-800: #5b21b6;
      --violet-900: #4c1d95;
      --violet-950: #2e1065;

      /* ─────────────────────────────────────
         COLORS: Purple
         ───────────────────────────────────── */
      --purple-50:  #faf5ff;
      --purple-100: #f3e8ff;
      --purple-200: #e9d5ff;
      --purple-300: #d8b4fe;
      --purple-400: #c084fc;
      --purple-500: #a855f7;
      --purple-600: #9333ea;
      --purple-700: #7e22ce;
      --purple-800: #6b21a8;
      --purple-900: #581c87;
      --purple-950: #3b0764;

      /* ─────────────────────────────────────
         COLORS: Fuchsia
         ───────────────────────────────────── */
      --fuchsia-50:  #fdf4ff;
      --fuchsia-100: #fae8ff;
      --fuchsia-200: #f5d0fe;
      --fuchsia-300: #f0abfc;
      --fuchsia-400: #e879f9;
      --fuchsia-500: #d946ef;
      --fuchsia-600: #c026d3;
      --fuchsia-700: #a21caf;
      --fuchsia-800: #86198f;
      --fuchsia-900: #701a75;
      --fuchsia-950: #4a044e;

      /* ─────────────────────────────────────
         COLORS: Pink
         ───────────────────────────────────── */
      --pink-50:  #fdf2f8;
      --pink-100: #fce7f3;
      --pink-200: #fbcfe8;
      --pink-300: #f9a8d4;
      --pink-400: #f472b6;
      --pink-500: #ec4899;
      --pink-600: #db2777;
      --pink-700: #be185d;
      --pink-800: #9d174d;
      --pink-900: #831843;
      --pink-950: #500724;

      /* ─────────────────────────────────────
         COLORS: Rose
         ───────────────────────────────────── */
      --rose-50:  #fff1f2;
      --rose-100: #ffe4e6;
      --rose-200: #fecdd3;
      --rose-300: #fda4af;
      --rose-400: #fb7185;
      --rose-500: #f43f5e;
      --rose-600: #e11d48;
      --rose-700: #be123c;
      --rose-800: #9f1239;
      --rose-900: #881337;
      --rose-950: #4c0519;

      /* ─────────────────────────────────────
         COLORS: Primary (alias to blue)
         ───────────────────────────────────── */
      --primary-50:  var(--blue-50);
      --primary-100: var(--blue-100);
      --primary-200: var(--blue-200);
      --primary-300: var(--blue-300);
      --primary-400: var(--blue-400);
      --primary-500: var(--blue-500);
      --primary-600: var(--blue-600);
      --primary-700: var(--blue-700);
      --primary-800: var(--blue-800);
      --primary-900: var(--blue-900);
      --primary-950: var(--blue-950);

      /* ─────────────────────────────────────
         COLORS: Semantic (aliases)
         ───────────────────────────────────── */
      --success-50:  var(--green-50);
      --success-100: var(--green-100);
      --success-500: var(--green-500);
      --success-600: var(--green-600);
      --success-700: var(--green-700);

      --warning-50:  var(--amber-50);
      --warning-100: var(--amber-100);
      --warning-500: var(--amber-500);
      --warning-600: var(--amber-600);
      --warning-700: var(--amber-700);

      --error-50:  var(--red-50);
      --error-100: var(--red-100);
      --error-500: var(--red-500);
      --error-600: var(--red-600);
      --error-700: var(--red-700);

      --info-50:  var(--sky-50);
      --info-100: var(--sky-100);
      --info-500: var(--sky-500);
      --info-600: var(--sky-600);
      --info-700: var(--sky-700);

      /* ─────────────────────────────────────
         SPACING (4px base unit)
         ───────────────────────────────────── */
      --space-px: 1px;
      --space-0:  0;
      --space-0-5: 2px;
      /* Spacing Scale - Named Sizes */
      --space-1:  4px;   /* --space-xs */
      --space-xs: 4px;
      
      --space-1-5: 6px;
      
      --space-2:  8px;   /* --space-sm */
      --space-sm: 8px;
      
      --space-2-5: 10px;
      
      --space-3:  12px;  /* --space-md */
      --space-md: 12px;
      
      --space-3-5: 14px;
      
      --space-4:  16px;  /* --space-base */
      --space-base: 16px;
      
      --space-5:  20px;  /* --space-lg */
      --space-lg: 20px;
      
      --space-6:  24px;  /* --space-xl */
      --space-xl: 24px;
      
      --space-7:  28px;  /* --space-2xl */
      --space-2xl: 28px;
      
      --space-8:  32px;  /* --space-3xl */
      --space-3xl: 32px;
      
      --space-9:  36px;  /* --space-4xl */
      --space-4xl: 36px;
      
      --space-10: 40px;  /* --space-5xl */
      --space-5xl: 40px;
      
      --space-11: 44px;  /* --space-6xl */
      --space-6xl: 44px;
      
      --space-12: 48px;  /* --space-7xl */
      --space-7xl: 48px;
      
      --space-14: 56px;  /* --space-8xl */
      --space-8xl: 56px;
      
      --space-16: 64px;  /* --space-9xl */
      --space-9xl: 64px;
      
      --space-20: 80px;  /* --space-10xl */
      --space-10xl: 80px;
      
      --space-24: 96px;  /* --space-11xl */
      --space-11xl: 96px;
      
      --space-28: 112px; /* --space-12xl */
      --space-12xl: 112px;
      
      --space-32: 128px; /* --space-13xl */
      --space-13xl: 128px;
      
      --space-36: 144px; /* --space-14xl */
      --space-14xl: 144px;
      
      --space-40: 160px; /* --space-15xl */
      --space-15xl: 160px;
      
      --space-44: 176px; /* --space-16xl */
      --space-16xl: 176px;
      
      --space-48: 192px; /* --space-17xl */
      --space-17xl: 192px;
      
      --space-52: 208px; /* --space-18xl */
      --space-18xl: 208px;
      
      --space-56: 224px; /* --space-19xl */
      --space-19xl: 224px;
      
      --space-60: 240px; /* --space-20xl */
      --space-20xl: 240px;
      
      --space-64: 256px; /* --space-21xl */
      --space-21xl: 256px;
      
      --space-72: 288px; /* --space-22xl */
      --space-22xl: 288px;
      
      --space-80: 320px; /* --space-23xl */
      --space-23xl: 320px;
      
      --space-96: 384px; /* --space-24xl */
      --space-24xl: 384px;

      /* Negative spacing (for margins, positioning) */
      --space-n-px: -1px;
      --space-n-0-5: -2px;
      --space-n-1:  -4px;
      --space-n-1-5: -6px;
      --space-n-2:  -8px;
      --space-n-2-5: -10px;
      --space-n-3:  -12px;
      --space-n-3-5: -14px;
      --space-n-4:  -16px;
      --space-n-5:  -20px;
      --space-n-6:  -24px;
      --space-n-7:  -28px;
      --space-n-8:  -32px;
      --space-n-9:  -36px;
      --space-n-10: -40px;
      --space-n-11: -44px;
      --space-n-12: -48px;
      --space-n-14: -56px;
      --space-n-16: -64px;
      --space-n-20: -80px;
      --space-n-24: -96px;

      /* ─────────────────────────────────────
         TYPOGRAPHY: Font Family
         ───────────────────────────────────── */
      --font-primary: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
      --font-secondary: Georgia, Cambria, 'Times New Roman', Times, serif;
      --font-alt: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
      
      /* Legacy aliases */
      --font-sans: var(--font-primary);
      --font-serif: var(--font-secondary);
      --font-mono: var(--font-alt);

      /* ─────────────────────────────────────
         TYPOGRAPHY: Font Size
         ───────────────────────────────────── */
      --text-4xs:  8px;
      --text-3xs:  9px;
      --text-2xs:  10px;
      --text-xs:   12px;
      --text-sm:   14px;
      --text-base: 16px;
      --text-lg:   18px;
      --text-xl:   20px;
      --text-2xl:  24px;
      --text-3xl:  30px;
      --text-4xl:  36px;
      --text-5xl:  48px;
      --text-6xl:  60px;
      --text-7xl:  72px;
      --text-8xl:  100px;
      --text-9xl:  128px;

      /* ─────────────────────────────────────
         TYPOGRAPHY: Font Weight
         ───────────────────────────────────── */
      --font-thin:       100;
      --font-extralight: 200;
      --font-light:      300;
      --font-normal:     400;
      --font-medium:     500;
      --font-semibold:   600;
      --font-bold:       700;
      --font-extrabold:  800;
      --font-black:      900;

      /* ─────────────────────────────────────
         TYPOGRAPHY: Line Height
         ───────────────────────────────────── */
      --leading-none:    1;
      --leading-tight:   1.25;
      --leading-snug:    1.375;
      --leading-normal:  1.5;
      --leading-relaxed: 1.625;
      --leading-loose:   2;

      /* ─────────────────────────────────────
         TYPOGRAPHY: Letter Spacing
         ───────────────────────────────────── */
      --tracking-tighter: -0.05em;
      --tracking-tight:   -0.025em;
      --tracking-normal:  0;
      --tracking-wide:    0.025em;
      --tracking-wider:   0.05em;
      --tracking-widest:  0.1em;

      /* ─────────────────────────────────────
         BORDER RADIUS
         ───────────────────────────────────── */
      --radius-none: 0;
      --radius-sm:   2px;
      --radius-default: 4px;
      --radius-md:   6px;
      --radius-lg:   8px;
      --radius-xl:   12px;
      --radius-2xl:  16px;
      --radius-3xl:  24px;
      --radius-full: 9999px;

      /* ─────────────────────────────────────
         SHADOWS
         ───────────────────────────────────── */
      --shadow-sm:    0 1px 2px 0 rgb(0 0 0 / 0.05);
      --shadow-default: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
      --shadow-md:    0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
      --shadow-lg:    0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
      --shadow-xl:    0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
      --shadow-2xl:   0 25px 50px -12px rgb(0 0 0 / 0.25);
      --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
      --shadow-none:  0 0 #0000;

      /* ─────────────────────────────────────
         BORDERS
         ───────────────────────────────────── */
      --border-width-0: 0px;
      --border-width-1: 1px;
      --border-width-2: 2px;
      --border-width-4: 4px;
      --border-width-8: 8px;

      /* ─────────────────────────────────────
         OPACITY
         ───────────────────────────────────── */
      --opacity-0:   0;
      --opacity-5:   0.05;
      --opacity-10:  0.1;
      --opacity-20:  0.2;
      --opacity-25:  0.25;
      --opacity-30:  0.3;
      --opacity-40:  0.4;
      --opacity-50:  0.5;
      --opacity-60:  0.6;
      --opacity-70:  0.7;
      --opacity-75:  0.75;
      --opacity-80:  0.8;
      --opacity-90:  0.9;
      --opacity-95:  0.95;
      --opacity-100: 1;

      /* ─────────────────────────────────────
         Z-INDEX REGISTRY
         See header documentation for full layer list.
         ALWAYS use these semantic names, never raw numbers.
         ───────────────────────────────────── */
      --z-base:        0;
      --z-dropdown:    10;
      --z-sticky:      20;
      --z-overlay:     30;
      --z-popover:     50;
      --z-toast:       60;
      --z-ds-panel:    70;
      --z-ds-trigger:  80;
      --z-modal:       90;
      --z-auto:        auto;

      /* ─────────────────────────────────────
         TRANSITIONS
         ───────────────────────────────────── */
      --duration-75:   75ms;
      --duration-100:  100ms;
      --duration-150:  150ms;
      --duration-200:  200ms;
      --duration-300:  300ms;
      --duration-500:  500ms;
      --duration-700:  700ms;
      --duration-1000: 1000ms;

      --ease-linear:      linear;
      --ease-in:          cubic-bezier(0.4, 0, 1, 1);
      --ease-out:         cubic-bezier(0, 0, 0.2, 1);
      --ease-in-out:      cubic-bezier(0.4, 0, 0.2, 1);

      /* ─────────────────────────────────────
         SEMANTIC ALIASES (for quick theming)
         ───────────────────────────────────── */
      --color-bg:          var(--gray-50);
      --color-bg-alt:      var(--gray-100);
      --color-surface:     #ffffff;
      --color-text:        var(--gray-900);
      --color-text-muted:  var(--gray-500);
      --color-text-subtle: var(--gray-400);
      --color-border:      var(--gray-200);
      --color-border-strong: var(--gray-300);
      --color-focus-ring:  var(--primary-500);

      /* ─────────────────────────────────────
         GRID SYSTEM
         12-column fluid grid with responsive breakpoints
         ───────────────────────────────────── */
      --grid-columns: 12;
      --grid-gutter: var(--space-6);
      --container-padding: var(--space-4);
      
      /* Breakpoints */
      --breakpoint-sm: 640px;
      --breakpoint-md: 768px;
      --breakpoint-lg: 1024px;
      --breakpoint-xl: 1280px;
      --breakpoint-2xl: 1536px;
      
      /* Container max-widths */
      --container-sm: 640px;
      --container-md: 768px;
      --container-lg: 1024px;
      --container-xl: 1400px;
      --container-2xl: 1536px;
    }

    /* ========================================
       BASE RESET & DEFAULTS
       ======================================== */
    *, *::before, *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html {
      font-size: var(--text-base);
      line-height: var(--leading-normal);
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      scroll-behavior: smooth;
      height: 100%;
      overflow: hidden;
    }

    body {
      font-family: var(--font-primary);
      color: var(--color-text);
      background-color: var(--color-bg);
      height: 100%;
      overflow-y: auto;
      margin: 0;
      padding: 0;
    }

    /* DS: Hidden native scrollbar + custom fake scrollbar overlay */
    .scrollbar-thin {
      scrollbar-width: none;
      -ms-overflow-style: none;
      position: relative;
    }
    .scrollbar-thin::-webkit-scrollbar {
      display: none;
    }
    .custom-scrollbar-thumb {
      position: absolute;
      right: 2px;
      width: 6px;
      min-height: 20px;
      background: rgba(0, 0, 0, 0.35);
      border-radius: 3px;
      opacity: 0;
      transition: opacity 0.3s ease;
      pointer-events: none;
      z-index: 3;
    }
    .custom-scrollbar-thumb.visible {
      opacity: 1;
    }
    .custom-scrollbar-thumb:hover,
    .custom-scrollbar-thumb.dragging {
      background: rgba(0, 0, 0, 0.5);
      width: 8px;
      pointer-events: auto;
    }

    /* ========================================
       GRID SYSTEM
       ======================================== */
    .container {
      width: 100%;
      max-width: var(--container-xl);
      margin-left: auto;
      margin-right: auto;
      padding-left: var(--container-padding);
      padding-right: var(--container-padding);
    }

    .container-sm { max-width: var(--container-sm); }
    .container-md { max-width: var(--container-md); }
    .container-lg { max-width: var(--container-lg); }
    .container-xl { max-width: var(--container-xl); }
    .container-2xl { max-width: var(--container-2xl); }
    .container-fluid { max-width: 100%; }

    .row {
      display: flex;
      flex-wrap: wrap;
      margin-left: calc(var(--grid-gutter) / -2);
      margin-right: calc(var(--grid-gutter) / -2);
    }

    .col {
      flex: 1 0 0%;
      padding-left: calc(var(--grid-gutter) / 2);
      padding-right: calc(var(--grid-gutter) / 2);
    }

    /* Column spans */
    .col-1  { flex: 0 0 calc(100% / 12 * 1);  max-width: calc(100% / 12 * 1);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
    .col-2  { flex: 0 0 calc(100% / 12 * 2);  max-width: calc(100% / 12 * 2);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
    .col-3  { flex: 0 0 calc(100% / 12 * 3);  max-width: calc(100% / 12 * 3);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
    .col-4  { flex: 0 0 calc(100% / 12 * 4);  max-width: calc(100% / 12 * 4);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
    .col-5  { flex: 0 0 calc(100% / 12 * 5);  max-width: calc(100% / 12 * 5);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
    .col-6  { flex: 0 0 calc(100% / 12 * 6);  max-width: calc(100% / 12 * 6);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
    .col-7  { flex: 0 0 calc(100% / 12 * 7);  max-width: calc(100% / 12 * 7);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
    .col-8  { flex: 0 0 calc(100% / 12 * 8);  max-width: calc(100% / 12 * 8);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
    .col-9  { flex: 0 0 calc(100% / 12 * 9);  max-width: calc(100% / 12 * 9);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
    .col-10 { flex: 0 0 calc(100% / 12 * 10); max-width: calc(100% / 12 * 10); padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
    .col-11 { flex: 0 0 calc(100% / 12 * 11); max-width: calc(100% / 12 * 11); padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
    .col-12 { flex: 0 0 100%; max-width: 100%; padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
    .col-auto { flex: 0 0 auto; max-width: 100%; padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }

    /* Responsive columns - sm (640px+) */
    @media (min-width: 640px) {
      .col-sm-1  { flex: 0 0 calc(100% / 12 * 1);  max-width: calc(100% / 12 * 1);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-sm-2  { flex: 0 0 calc(100% / 12 * 2);  max-width: calc(100% / 12 * 2);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-sm-3  { flex: 0 0 calc(100% / 12 * 3);  max-width: calc(100% / 12 * 3);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-sm-4  { flex: 0 0 calc(100% / 12 * 4);  max-width: calc(100% / 12 * 4);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-sm-5  { flex: 0 0 calc(100% / 12 * 5);  max-width: calc(100% / 12 * 5);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-sm-6  { flex: 0 0 calc(100% / 12 * 6);  max-width: calc(100% / 12 * 6);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-sm-7  { flex: 0 0 calc(100% / 12 * 7);  max-width: calc(100% / 12 * 7);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-sm-8  { flex: 0 0 calc(100% / 12 * 8);  max-width: calc(100% / 12 * 8);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-sm-9  { flex: 0 0 calc(100% / 12 * 9);  max-width: calc(100% / 12 * 9);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-sm-10 { flex: 0 0 calc(100% / 12 * 10); max-width: calc(100% / 12 * 10); padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-sm-11 { flex: 0 0 calc(100% / 12 * 11); max-width: calc(100% / 12 * 11); padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-sm-12 { flex: 0 0 100%; max-width: 100%; padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
    }

    /* Responsive columns - md (768px+) */
    @media (min-width: 768px) {
      .col-md-1  { flex: 0 0 calc(100% / 12 * 1);  max-width: calc(100% / 12 * 1);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-md-2  { flex: 0 0 calc(100% / 12 * 2);  max-width: calc(100% / 12 * 2);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-md-3  { flex: 0 0 calc(100% / 12 * 3);  max-width: calc(100% / 12 * 3);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-md-4  { flex: 0 0 calc(100% / 12 * 4);  max-width: calc(100% / 12 * 4);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-md-5  { flex: 0 0 calc(100% / 12 * 5);  max-width: calc(100% / 12 * 5);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-md-6  { flex: 0 0 calc(100% / 12 * 6);  max-width: calc(100% / 12 * 6);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-md-7  { flex: 0 0 calc(100% / 12 * 7);  max-width: calc(100% / 12 * 7);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-md-8  { flex: 0 0 calc(100% / 12 * 8);  max-width: calc(100% / 12 * 8);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-md-9  { flex: 0 0 calc(100% / 12 * 9);  max-width: calc(100% / 12 * 9);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-md-10 { flex: 0 0 calc(100% / 12 * 10); max-width: calc(100% / 12 * 10); padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-md-11 { flex: 0 0 calc(100% / 12 * 11); max-width: calc(100% / 12 * 11); padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-md-12 { flex: 0 0 100%; max-width: 100%; padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
    }

    /* Responsive columns - lg (1024px+) */
    @media (min-width: 1024px) {
      .col-lg-1  { flex: 0 0 calc(100% / 12 * 1);  max-width: calc(100% / 12 * 1);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-lg-2  { flex: 0 0 calc(100% / 12 * 2);  max-width: calc(100% / 12 * 2);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-lg-3  { flex: 0 0 calc(100% / 12 * 3);  max-width: calc(100% / 12 * 3);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-lg-4  { flex: 0 0 calc(100% / 12 * 4);  max-width: calc(100% / 12 * 4);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-lg-5  { flex: 0 0 calc(100% / 12 * 5);  max-width: calc(100% / 12 * 5);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-lg-6  { flex: 0 0 calc(100% / 12 * 6);  max-width: calc(100% / 12 * 6);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-lg-7  { flex: 0 0 calc(100% / 12 * 7);  max-width: calc(100% / 12 * 7);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-lg-8  { flex: 0 0 calc(100% / 12 * 8);  max-width: calc(100% / 12 * 8);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-lg-9  { flex: 0 0 calc(100% / 12 * 9);  max-width: calc(100% / 12 * 9);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-lg-10 { flex: 0 0 calc(100% / 12 * 10); max-width: calc(100% / 12 * 10); padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-lg-11 { flex: 0 0 calc(100% / 12 * 11); max-width: calc(100% / 12 * 11); padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-lg-12 { flex: 0 0 100%; max-width: 100%; padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
    }

    /* Responsive columns - xl (1280px+) */
    @media (min-width: 1280px) {
      .col-xl-1  { flex: 0 0 calc(100% / 12 * 1);  max-width: calc(100% / 12 * 1);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-xl-2  { flex: 0 0 calc(100% / 12 * 2);  max-width: calc(100% / 12 * 2);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-xl-3  { flex: 0 0 calc(100% / 12 * 3);  max-width: calc(100% / 12 * 3);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-xl-4  { flex: 0 0 calc(100% / 12 * 4);  max-width: calc(100% / 12 * 4);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-xl-5  { flex: 0 0 calc(100% / 12 * 5);  max-width: calc(100% / 12 * 5);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-xl-6  { flex: 0 0 calc(100% / 12 * 6);  max-width: calc(100% / 12 * 6);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-xl-7  { flex: 0 0 calc(100% / 12 * 7);  max-width: calc(100% / 12 * 7);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-xl-8  { flex: 0 0 calc(100% / 12 * 8);  max-width: calc(100% / 12 * 8);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-xl-9  { flex: 0 0 calc(100% / 12 * 9);  max-width: calc(100% / 12 * 9);  padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-xl-10 { flex: 0 0 calc(100% / 12 * 10); max-width: calc(100% / 12 * 10); padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-xl-11 { flex: 0 0 calc(100% / 12 * 11); max-width: calc(100% / 12 * 11); padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
      .col-xl-12 { flex: 0 0 100%; max-width: 100%; padding-left: calc(var(--grid-gutter) / 2); padding-right: calc(var(--grid-gutter) / 2); }
    }

    /* Row gap utilities */
    .row-gap-0 { row-gap: 0; }
    .row-gap-1 { row-gap: var(--space-1); }
    .row-gap-2 { row-gap: var(--space-2); }
    .row-gap-3 { row-gap: var(--space-3); }
    .row-gap-4 { row-gap: var(--space-4); }
    .row-gap-6 { row-gap: var(--space-6); }
    .row-gap-8 { row-gap: var(--space-8); }

    /* ========================================
       DESIGN SYSTEM BUTTON (Bottom-left trigger)
       ======================================== */
    .ds-trigger {
      position: fixed;
      bottom: var(--space-4);
      left: var(--space-4);
      z-index: var(--z-ds-trigger);
      padding: var(--space-2) var(--space-3);
      font-size: var(--text-xs);
      font-weight: var(--font-medium);
      color: var(--gray-400);
      background: var(--color-surface);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-md);
      cursor: pointer;
      transition: all var(--duration-150) var(--ease-out);
      text-decoration: none;
    }

    .ds-trigger:hover {
      color: var(--gray-600);
      border-color: var(--color-border-strong);
      box-shadow: var(--shadow-sm);
    }

    /* ========================================
       STYLE GUIDE LAYOUT
       ======================================== */
    .ds-guide {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: var(--z-ds-panel);
      background: var(--color-bg);
    }

    .ds-guide.is-open {
      display: flex;
    }

    .ds-sidebar {
      position: fixed;
      top: 0;
      left: 0;
      width: 240px;
      height: 100vh;
      overflow-y: auto;
      padding: var(--space-6);
      background: var(--color-surface);
      border-right: 1px solid var(--color-border);
    }

    .ds-sidebar-title {
      font-size: var(--text-sm);
      font-weight: var(--font-semibold);
      color: var(--color-text);
      letter-spacing: var(--tracking-wide);
      text-transform: uppercase;
    }

    .ds-sidebar-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: var(--space-4);
    }

    .ds-close-btn {
      padding: var(--space-1) var(--space-2);
      font-size: var(--text-xs);
      color: var(--color-text-muted);
      background: transparent;
      border: 1px solid var(--color-border);
      border-radius: var(--radius-md);
      cursor: pointer;
      transition: all var(--duration-150) var(--ease-out);
    }

    .ds-close-btn:hover {
      color: var(--color-text);
      border-color: var(--color-border-strong);
    }

    .ds-nav {
      display: flex;
      flex-direction: column;
      gap: var(--space-1);
    }

    .ds-nav-link {
      display: block;
      width: 100%;
      padding: var(--space-2) var(--space-3);
      font-family: var(--font-sans);
      font-size: var(--text-sm);
      color: var(--color-text-muted);
      text-align: left;
      text-decoration: none;
      background: transparent;
      border: none;
      border-radius: var(--radius-md);
      cursor: pointer;
      transition: all var(--duration-150) var(--ease-out);
    }

    .ds-nav-link:hover {
      color: var(--color-text);
      background: var(--color-bg);
    }

    .ds-nav-group {
      margin-top: var(--space-4);
      padding-top: var(--space-4);
      border-top: 1px solid var(--color-border);
    }

    .ds-nav-group-title {
      font-size: var(--text-xs);
      font-weight: var(--font-semibold);
      color: var(--color-text-subtle);
      letter-spacing: var(--tracking-wider);
      text-transform: uppercase;
      margin-bottom: var(--space-2);
      padding-left: var(--space-3);
    }

    .ds-content {
      flex: 1;
      margin-left: 240px;
      padding: var(--space-12) var(--space-9xl);
      max-width: 1200px;
      height: 100vh;
      overflow-y: auto;
    }

    /* ========================================
       STYLE GUIDE SECTIONS
       ======================================== */
    .ds-section {
      margin-bottom: var(--space-9xl);
      scroll-margin-top: var(--space-8);
    }

    .ds-section-title {
      font-size: var(--text-2xl);
      font-weight: var(--font-medium);
      color: var(--color-text);
      margin-bottom: var(--space-2);
    }

    .ds-section-desc {
      font-size: var(--text-base);
      color: var(--color-text-muted);
      margin-bottom: var(--space-8);
    }

    .ds-subsection {
      margin-bottom: var(--space-5xl);
    }

    .ds-subsection-title {
      font-size: var(--text-lg);
      font-weight: var(--font-semibold);
      color: var(--color-text);
      margin-bottom: var(--space-4);
    }

    /* ========================================
       COLOR SWATCHES
       ======================================== */
    .ds-color-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
      gap: var(--space-3);
    }

    .ds-color-swatch {
      display: flex;
      flex-direction: column;
      border-radius: var(--radius-lg);
      overflow: hidden;
      background: var(--color-surface);
      border: 1px solid var(--color-border);
    }

    .ds-color-preview {
      height: 64px;
      width: 100%;
    }

    .ds-color-info {
      padding: var(--space-2) var(--space-3);
    }

    .ds-color-name {
      font-size: var(--text-xs);
      font-weight: var(--font-medium);
      color: var(--color-text);
    }

    .ds-color-value {
      font-size: var(--text-xs);
      font-family: var(--font-mono);
      color: var(--color-text-muted);
    }

    .ds-color-row {
      display: flex;
      gap: var(--space-1);
      margin-bottom: var(--space-4);
    }

    .ds-color-row-swatch {
      flex: 1;
      height: 48px;
      border-radius: var(--radius-md);
      display: flex;
      align-items: flex-end;
      justify-content: center;
      padding-bottom: var(--space-1);
    }

    .ds-color-row-label {
      font-size: 10px;
      font-weight: var(--font-medium);
      opacity: 0.8;
    }

    /* ========================================
       SPACING BLOCKS
       ======================================== */
    .ds-spacing-grid {
      display: flex;
      flex-wrap: wrap;
      gap: var(--space-4);
    }

    .ds-spacing-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: var(--space-2);
    }

    .ds-spacing-block {
      background: var(--primary-500);
      border-radius: var(--radius-sm);
    }

    .ds-spacing-label {
      font-size: var(--text-xs);
      font-family: var(--font-mono);
      color: var(--color-text-muted);
    }

    /* ========================================
       TYPOGRAPHY SAMPLES
       ======================================== */
    .ds-type-sample {
      margin-bottom: var(--space-4);
      padding: var(--space-4);
      background: var(--color-surface);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-lg);
    }

    .ds-type-label {
      font-size: var(--text-xs);
      font-family: var(--font-mono);
      color: var(--color-text-muted);
      margin-bottom: var(--space-2);
    }

    /* ========================================
       BUTTONS
       ======================================== */
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: var(--space-2);
      font-family: var(--font-sans);
      font-weight: var(--font-medium);
      text-decoration: none;
      border: 1px solid transparent;
      border-radius: var(--radius-md);
      cursor: pointer;
      transition: all var(--duration-150) var(--ease-out);
    }

    .btn:focus-visible {
      outline: 2px solid var(--color-focus-ring);
      outline-offset: 2px;
    }

    .btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    /* Button Sizes */
    .btn-sm {
      height: 32px;
      padding: 0 var(--space-3);
      font-size: var(--text-sm);
    }

    .btn-md {
      height: 40px;
      padding: 0 var(--space-4);
      font-size: var(--text-sm);
    }

    .btn-lg {
      height: 48px;
      padding: 0 var(--space-6);
      font-size: var(--text-base);
    }

    /* Wide button variants - use --space-16 for horizontal padding */
    .btn-wide {
      padding-left: var(--space-9xl);
      padding-right: var(--space-9xl);
    }

    .btn-sm.btn-wide {
      padding-left: var(--space-9xl);
      padding-right: var(--space-9xl);
    }

    .btn-md.btn-wide {
      padding-left: var(--space-9xl);
      padding-right: var(--space-9xl);
    }

    .btn-lg.btn-wide {
      padding-left: var(--space-9xl);
      padding-right: var(--space-9xl);
    }

    /* Button Variants */
    .btn-primary {
      background: var(--primary-600);
      color: white;
    }

    .btn-primary:hover:not(:disabled) {
      background: var(--primary-700);
    }

    .btn-secondary {
      background: var(--gray-100);
      color: var(--gray-700);
    }

    .btn-secondary:hover:not(:disabled) {
      background: var(--gray-200);
    }

    .btn-outline {
      background: transparent;
      border-color: var(--color-border-strong);
      color: var(--color-text);
    }

    .btn-outline:hover:not(:disabled) {
      background: var(--color-bg);
      border-color: var(--gray-400);
    }

    .btn-ghost {
      background: transparent;
      color: var(--color-text-muted);
    }

    .btn-ghost:hover:not(:disabled) {
      background: var(--color-bg);
      color: var(--color-text);
    }

    /* Icon-only button (for meatball menus, etc.) - Updated Tables v1.7.0 */
    .btn-icon {
      width: 32px;
      height: 32px;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: var(--radius-full);
    }

    .btn-icon.btn-sm {
      width: 28px;
      height: 28px;
    }

    .btn-icon.btn-lg {
      width: 40px;
      height: 40px;
    }

    /* Icon button hover state - circular background */
    .btn-icon.btn-ghost:hover:not(:disabled) {
      background: var(--gray-200);
      color: var(--color-text);
    }

    .btn-danger {
      background: var(--red-700);
      color: white;
    }

    .btn-danger:hover:not(:disabled) {
      background: var(--red-800);
    }

    .ds-button-group {
      display: flex;
      flex-wrap: wrap;
      gap: var(--space-3);
      margin-bottom: var(--space-4);
    }

    /* ========================================
       LINKS
       ======================================== */
    /* Base link reset for styled links */
    a {
      color: var(--primary-600);
      text-decoration: underline;
      text-underline-offset: 2px;
      transition: color var(--duration-150) var(--ease-out);
    }

    a:hover {
      color: var(--primary-700);
    }

    a:active {
      color: var(--primary-800);
    }

    /* Link variants */
    .link {
      font-weight: var(--font-medium);
      text-decoration: none;
      text-underline-offset: 2px;
      transition: color var(--duration-150) var(--ease-out);
      cursor: pointer;
    }

    .link:hover {
      text-decoration: underline;
    }

    /* Underlined variant - shows underline in upstate */
    .link-underlined {
      text-decoration: underline;
    }

    .link-primary {
      color: var(--primary-600);
    }

    .link-primary:hover {
      color: var(--primary-700);
    }

    .link-primary:active {
      color: var(--primary-800);
    }

    .link-secondary {
      color: var(--gray-600);
    }

    .link-secondary:hover {
      color: var(--gray-800);
    }

    .link-secondary:active {
      color: var(--gray-900);
    }

    .link-ghost {
      color: var(--color-text-muted);
    }

    .link-ghost:hover {
      color: var(--color-text);
    }

    .link-ghost:active {
      color: var(--gray-900);
    }

    .link-danger {
      color: var(--error-600);
    }

    .link-danger:hover {
      color: var(--error-700);
    }

    .link-danger:active {
      color: var(--error-800);
    }

    .ds-link-row {
      display: flex;
      flex-wrap: wrap;
      gap: var(--space-6);
      margin-bottom: var(--space-4);
    }

    /* ========================================
       FORM INPUTS
       ======================================== */
    .input {
      display: block;
      width: 100%;
      height: 50px;
      padding: 22px var(--space-3) 4px var(--space-3);
      font-family: var(--font-sans);
      font-size: var(--text-sm);
      color: var(--color-text);
      background: var(--color-surface);
      border: 1px solid var(--color-border-strong);
      border-radius: var(--radius-md);
      transition: border-color var(--duration-150) var(--ease-out), box-shadow var(--duration-150) var(--ease-out);
    }

    .input::placeholder {
      color: var(--color-text-subtle);
    }

    .input:focus {
      outline: none;
      border-color: var(--primary-500);
      box-shadow: 0 0 0 1px var(--primary-500);
    }

    .input:disabled {
      background: var(--gray-100);
      color: var(--color-text-muted);
      cursor: not-allowed;
    }

    /* Remove number input spinners */
    input[type="number"]::-webkit-inner-spin-button,
    input[type="number"]::-webkit-outer-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }

    input[type="number"] {
      -moz-appearance: textfield;
    }

    .input-error {
      border-color: var(--error-500);
    }

    .input-error:focus {
      box-shadow: 0 0 0 3px var(--error-100);
    }

    /* Labelless Input - no top padding, centered text */
    .input-labelless {
      padding: var(--space-3);
      height: 40px;
    }

    /* Select elements need explicit line-height to prevent text clipping */
    select.input,
    select.input-labelless {
      line-height: normal;
      padding-top: var(--space-2);
      padding-bottom: var(--space-2);
    }

    .input-group select.input {
      padding-top: 22px;
      padding-bottom: 4px;
    }

    /* Gray Background Input */
    .input-gray-bg {
      background: var(--gray-100);
      border: none;
    }

    .input-gray-bg:focus {
      background: white;
      border: 1px solid var(--primary-500);
      box-shadow: 0 0 0 1px var(--primary-500);
    }

    /* Ghost input: looks like plain text, click to edit */
    .input-ghost {
      background-color: transparent;
      border: 1px solid transparent;
      border-radius: var(--radius-md);
      padding-left: 0;
      padding-right: 0;
      height: auto;
      min-height: 0;
      transition: background-color 0.15s ease, border-color 0.15s ease, padding 0.15s ease;
    }

    .input-ghost:hover {
      cursor: text;
    }

    .input-ghost:focus {
      background-color: white;
      border-color: var(--primary-500);
      box-shadow: 0 0 0 1px var(--primary-500);
      padding-left: var(--space-2);
      font-weight: normal;
    }

    /* Ghost select: plain text, arrow appears on hover, no field chrome */
    select.input-ghost {
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
      background-image: none;
      background-repeat: no-repeat;
      background-position: right 0 center;
      background-size: 16px;
      padding-right: 20px;
      width: auto !important;
      max-width: 100%;
    }

    select.input-ghost:hover {
      cursor: pointer;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    }

    select.input-ghost:focus {
      background-color: transparent;
      border-color: transparent;
      box-shadow: none;
      padding-left: 0;
      background-image: none;
    }

    /* Ghost overrides labelless padding when combined */
    .input-labelless.input-ghost {
      padding: var(--space-2) 0;
      height: 36px;
    }

    .input-labelless.input-ghost:focus {
      padding: var(--space-2) 0 var(--space-2) var(--space-2);
      height: 36px;
    }

    select.input-labelless.input-ghost {
      padding: var(--space-2) 20px var(--space-2) 0;
      height: 36px;
    }

    select.input-labelless.input-ghost:focus {
      padding: var(--space-2) 20px var(--space-2) 0;
      height: 36px;
    }

    /* Width input with suffix */
    .width-input-wrapper {
      position: relative;
      display: flex;
      align-items: center;
    }

    .width-input-suffix {
      position: absolute;
      right: var(--space-3);
      color: var(--gray-500);
      font-size: var(--text-sm);
      pointer-events: none;
      display: none;
    }

    .width-input:not(:placeholder-shown) + .width-input-suffix {
      display: block;
    }

    /* Infield Top-Aligned Labels (IFTA) */
    .input-group {
      position: relative;
    }

    .input-label {
      position: absolute;
      left: var(--space-3);
      top: 6px;
      font-size: var(--text-xs);
      font-weight: var(--font-medium);
      color: var(--color-text-muted);
      transition: color var(--duration-150) var(--ease-out);
      pointer-events: none;
    }

    .input-group .textarea {
      padding-top: 28px;
      padding-bottom: var(--space-3);
    }

    .input-group .textarea + .input-label {
      top: 12px;
    }

    /* Textarea */
    .textarea {
      min-height: 100px;
      padding: var(--space-3);
      resize: vertical;
    }

    /* Select */
    .select {
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right var(--space-sm) center;
      padding-right: var(--space-6xl);
    }

    /* Dynamic font sizing for select based on longest option */
    .select.has-long-options {
      font-size: 11px;
    }
    
    .select.has-medium-options {
      font-size: var(--text-xs);
    }

    /* Checkbox & Radio */
    .checkbox-wrapper,
    .radio-wrapper {
      display: flex;
      align-items: center;
      gap: var(--space-2);
      cursor: pointer;
    }

    .checkbox,
    .radio {
      appearance: none;
      width: 18px;
      height: 18px;
      border: 1px solid var(--color-border-strong);
      background: var(--color-surface);
      cursor: pointer;
      transition: all var(--duration-150) var(--ease-out);
    }

    .checkbox {
      border-radius: var(--radius-default);
    }

    .radio {
      border-radius: var(--radius-full);
    }

    .checkbox:checked,
    .radio:checked {
      background: var(--primary-600);
      border-color: var(--primary-600);
    }

    .checkbox:checked {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: center;
    }

    .radio:checked {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Ccircle cx='4' cy='4' r='4' fill='white'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: center;
    }

    .checkbox:focus,
    .radio:focus {
      outline: none;
      box-shadow: 0 0 0 3px var(--primary-100);
    }

    .checkbox:disabled,
    .radio:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    .checkbox-label,
    .radio-label {
      font-size: var(--text-sm);
      color: var(--color-text);
    }

    .ds-input-group {
      display: flex;
      flex-direction: column;
      gap: var(--space-2);
      max-width: 320px;
      margin-bottom: var(--space-4);
    }

    .ds-input-label {
      display: block;
      font-size: var(--text-sm);
      font-weight: var(--font-medium);
      color: var(--color-text);
      margin-bottom: var(--space-2);
    }

    .ds-input-hint {
      display: block;
      font-size: var(--text-xs);
      color: var(--color-text-muted);
      margin-top: var(--space-1);
    }

    .ds-input-error-text {
      display: block;
      font-size: var(--text-xs);
      color: var(--error-600);
      margin-top: var(--space-1);
    }

    .ds-input-row {
      display: flex;
      flex-wrap: wrap;
      gap: var(--space-6);
      margin-bottom: var(--space-4);
    }

    /* ========================================
       CARDS & SURFACES
       ======================================== */
    .card {
      background: var(--color-surface);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-lg);
      overflow: hidden;
    }

    .card-shadow-sm { box-shadow: var(--shadow-sm); }
    .card-shadow { box-shadow: var(--shadow-default); }
    .card-shadow-md { box-shadow: var(--shadow-md); }
    .card-shadow-lg { box-shadow: var(--shadow-lg); }
    .card-shadow-xl { box-shadow: var(--shadow-xl); }

    .card-body {
      padding: var(--space-6);
    }

    .card-title {
      font-size: var(--text-lg);
      font-weight: var(--font-semibold);
      color: var(--color-text);
      margin-bottom: var(--space-2);
    }

    .card-text {
      font-size: var(--text-sm);
      color: var(--color-text-muted);
      line-height: var(--leading-relaxed);
    }

    .ds-card-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: var(--space-6);
    }

    /* ========================================
       BADGES
       ======================================== */
    .badge {
      display: inline-flex;
      align-items: center;
      padding: var(--space-0-5) var(--space-2);
      font-size: var(--text-xs);
      font-weight: var(--font-medium);
      border-radius: var(--radius-full);
    }

    .badge-gray {
      background: var(--gray-100);
      color: var(--gray-700);
    }

    .badge-primary {
      background: var(--primary-100);
      color: var(--primary-700);
    }

    .badge-success {
      background: var(--success-100);
      color: var(--success-700);
    }

    .badge-warning {
      background: var(--warning-100);
      color: var(--warning-700);
    }

    .badge-purple {
      background: var(--violet-100);
      color: var(--violet-700);
    }

    .badge-neutral {
      background: var(--gray-100);
      color: var(--gray-600);
    }

    .badge-error {
      background: var(--error-100);
      color: var(--error-700);
    }

    .badge-info {
      background: var(--info-100);
      color: var(--info-700);
    }

    /* Badge with dot */
    .badge-dot {
      padding-left: var(--space-1-5);
    }

    .badge-dot::before {
      content: '';
      display: inline-block;
      width: 6px;
      height: 6px;
      border-radius: var(--radius-full);
      margin-right: var(--space-1-5);
      background: currentColor;
    }

    .ds-badge-row {
      display: flex;
      flex-wrap: wrap;
      gap: var(--space-2);
      margin-bottom: var(--space-4);
    }

    /* ========================================
       DIVIDERS
       ======================================== */
    .divider {
      height: 1px;
      background: var(--color-border);
      margin: var(--space-6) 0;
    }

    /* ========================================
       ALERTS
       ======================================== */
    .alert {
      padding: var(--space-4);
      border-radius: var(--radius-lg);
      border: 1px solid;
    }

    .alert-info {
      background: var(--info-50);
      border-color: var(--info-100);
      color: var(--info-700);
    }

    .alert-success {
      background: var(--success-50);
      border-color: var(--success-100);
      color: var(--success-700);
    }

    .alert-warning {
      background: var(--warning-50);
      border-color: var(--warning-100);
      color: var(--warning-700);
    }

    .alert-error {
      background: var(--error-50);
      border-color: var(--error-100);
      color: var(--error-700);
    }

    .alert-title {
      font-weight: var(--font-semibold);
      margin-bottom: var(--space-1);
    }

    .alert-text {
      font-size: var(--text-sm);
    }

    .ds-alert-stack {
      display: flex;
      flex-direction: column;
      gap: var(--space-4);
    }

    /* Toast Notifications */
    .toast-container {
      position: fixed;
      top: var(--space-4);
      right: var(--space-4);
      z-index: var(--z-toast);
      display: flex;
      flex-direction: column;
      gap: var(--space-3);
      pointer-events: none;
    }
    .toast {
      pointer-events: auto;
      padding: var(--space-4) var(--space-5);
      border-radius: var(--radius-lg);
      border: 1px solid;
      font-size: var(--text-sm);
      max-width: 360px;
      box-shadow: var(--shadow-lg, 0 4px 16px rgba(0,0,0,0.12));
      transform: translateY(-20px);
      opacity: 0;
      animation: toastIn 0.3s ease forwards;
    }
    .toast.toast-out {
      animation: toastOut 0.3s ease forwards;
    }
    .toast-info {
      background: var(--info-50);
      border-color: var(--info-200);
      color: var(--info-700);
    }
    .toast-success {
      background: var(--success-50);
      border-color: var(--success-200);
      color: var(--success-700);
    }
    .toast-warning {
      background: var(--warning-50);
      border-color: var(--warning-200);
      color: var(--warning-700);
    }
    .toast-error {
      background: var(--error-50);
      border-color: var(--error-200);
      color: var(--error-700);
    }
    @keyframes toastIn {
      from { transform: translateY(-20px); opacity: 0; }
      to   { transform: translateY(0); opacity: 1; }
    }
    @keyframes toastOut {
      from { transform: translateY(0); opacity: 1; }
      to   { transform: translateY(-20px); opacity: 0; }
    }

    /* ========================================
       AVATAR
       ======================================== */
    .avatar {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: var(--radius-full);
      background: var(--gray-200);
      color: var(--gray-600);
      font-weight: var(--font-medium);
      overflow: hidden;
    }

    .avatar-sm {
      width: 32px;
      height: 32px;
      font-size: var(--text-xs);
    }

    .avatar-md {
      width: 40px;
      height: 40px;
      font-size: var(--text-sm);
    }

    .avatar-lg {
      width: 48px;
      height: 48px;
      font-size: var(--text-base);
    }

    .avatar-xl {
      width: 64px;
      height: 64px;
      font-size: var(--text-lg);
    }

    .avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .ds-avatar-row {
      display: flex;
      align-items: center;
      gap: var(--space-4);
    }

    /* ========================================
       TOGGLE / SWITCH
       ======================================== */
    .toggle {
      position: relative;
      display: inline-flex;
      width: 44px;
      height: 24px;
      cursor: pointer;
    }

    .toggle input {
      position: absolute;
      opacity: 0;
      width: 0;
      height: 0;
    }

    .toggle-track {
      width: 100%;
      height: 100%;
      background: var(--gray-300);
      border-radius: var(--radius-full);
      transition: background var(--duration-200) var(--ease-out);
    }

    .toggle input:checked + .toggle-track {
      background: var(--primary-600);
    }

    .toggle-thumb {
      position: absolute;
      top: 2px;
      left: 2px;
      width: 20px;
      height: 20px;
      background: white;
      border-radius: var(--radius-full);
      box-shadow: var(--shadow-sm);
      transition: transform var(--duration-200) var(--ease-out);
    }

    .toggle input:checked ~ .toggle-thumb {
      transform: translateX(20px);
    }

    .toggle input:focus + .toggle-track {
      box-shadow: 0 0 0 3px var(--primary-100);
    }

    /* ========================================
       PROGRESS BAR
       ======================================== */
    .progress {
      height: 8px;
      background: var(--gray-200);
      border-radius: var(--radius-full);
      overflow: hidden;
    }

    .progress-bar {
      height: 100%;
      background: var(--primary-600);
      border-radius: var(--radius-full);
      transition: width var(--duration-300) var(--ease-out);
    }

    .progress-success .progress-bar { background: var(--success-500); }
    .progress-warning .progress-bar { background: var(--warning-500); }
    .progress-error .progress-bar { background: var(--error-500); }

    .ds-progress-stack {
      display: flex;
      flex-direction: column;
      gap: var(--space-4);
      max-width: 400px;
    }

    /* ========================================
       TOOLTIPS (CSS only)
       ======================================== */
    .tooltip {
      position: relative;
    }

    .tooltip::after {
      content: attr(data-tooltip);
      position: absolute;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%);
      padding: var(--space-1) var(--space-2);
      background: var(--gray-900);
      color: white;
      font-size: var(--text-xs);
      white-space: nowrap;
      border-radius: var(--radius-default);
      opacity: 0;
      visibility: hidden;
      transition: all var(--duration-150) var(--ease-out);
      margin-bottom: var(--space-1);
      z-index: var(--z-popover);
    }

    .tooltip:hover::after {
      opacity: 1;
      visibility: visible;
    }

    /* ========================================
       DROPDOWN MENU (Modern Style) - Updated Tables v1.7.0
       ======================================== */
    .dropdown {
      position: relative;
      display: inline-block;
    }

    .dropdown-menu {
      position: fixed;
      min-width: 160px;
      background: white;
      border: 1px solid var(--color-border);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-lg);
      padding: var(--space-2);
      opacity: 0;
      visibility: hidden;
      transform: translateY(-8px);
      transition: all var(--duration-200) var(--ease-out);
      z-index: var(--z-dropdown);
    }

    .dropdown.open .dropdown-menu {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }

    /* Show above variant - opens upward */
    .dropdown-menu.show-above {
      transform: translateY(8px);
    }

    .dropdown.open .dropdown-menu.show-above {
      transform: translateY(0);
    }

    .dropdown-item {
      display: flex;
      align-items: center;
      gap: var(--space-2);
      padding: var(--space-2) var(--space-3);
      font-size: var(--text-sm);
      color: var(--color-text);
      background: transparent;
      border: none;
      border-radius: var(--radius-md);
      width: 100%;
      text-align: left;
      cursor: pointer;
      transition: background var(--duration-150) var(--ease-out);
    }

    .dropdown-item:hover {
      background: var(--gray-100);
    }

    .dropdown-item:active {
      background: var(--gray-200);
    }

    .dropdown-item.danger {
      color: var(--error-600);
    }

    .dropdown-item.danger:hover {
      background: var(--error-50);
    }

    .dropdown-divider {
      height: 1px;
      background: var(--color-border);
      margin: var(--space-2) 0;
    }

    /* ========================================
       TABLES - Updated Tables v1.7.0
       ======================================== */
    .table-wrapper {
      border: 1px solid var(--color-border);
      border-radius: var(--radius-md);
      overflow: hidden;
      background: white;
    }

    .table-wrapper-scroll {
      max-height: 500px;
      overflow: auto;
    }

    .table-wrapper-scroll thead {
      position: sticky;
      top: 0;
      z-index: 2;
      background: white;
    }

    .table-wrapper-borderless {
      border: none;
    }

    .table {
      width: 100%;
      border-collapse: collapse;
      font-size: var(--text-sm);
    }

    .table th,
    .table td {
      padding: var(--space-2) var(--space-2);
      text-align: left;
      border-bottom: none;
    }

    .table thead {
      border-bottom: none;
      transition: box-shadow 0.15s ease;
    }

    /* DS: Scroll shadow on sticky thead when container is scrolled */
    .table thead.scroll-shadow th {
      box-shadow: inset 0 -1px 0 var(--color-border), 0 4px 8px rgba(0, 0, 0, 0.06);
    }

    /* Add hairline border above tables inside collapsible series/finish/accessory items */
    .series-content .table thead,
    .finish-content .table thead,
    .accessory-content .table thead {
      border-top: 1px solid var(--color-border);
    }

    .table th {
      font-weight: var(--font-medium);
      font-size: var(--text-xs);
      color: var(--gray-800);
      background: var(--gray-100);
      text-transform: uppercase;
      box-shadow: inset 0 -1px 0 var(--color-border);
    }

    /* Headerless table variant - no background on thead */
    .table-headerless th {
      background: transparent;
      text-transform: none;
      font-size: inherit;
      color: inherit;
    }

    .table tbody tr:hover {
      background: transparent;
    }

    /* Table Variants */
    
    /* Striped rows */
    .table-striped tbody tr:nth-child(even) {
      background: var(--gray-50);
    }

    .table-striped tbody tr:hover {
      background: var(--gray-100);
    }

    /* Bordered (all cells) */
    .table-bordered th,
    .table-bordered td {
      border: 1px solid var(--color-border);
    }

    /* Row Dividers - only horizontal lines between rows */
    .table-row-dividers tbody tr {
      border-bottom: 1px solid var(--color-border);
    }

    /* Hide last row border - prevents double line with table-wrapper border */
    /* Use on tables where tfoot contains the final row (Add button) */
    .table-row-dividers.table-borderless-last tfoot tr:last-child {
      border-bottom: none;
    }

    /* Use on tables where tbody contains the final row (no tfoot) */
    .table-row-dividers.table-borderless-lastrow tbody tr:last-child {
      border-bottom: none;
    }
    
    /* Footer top border - separates tfoot from tbody */
    .table-row-dividers tfoot tr:first-child td {
      border-top: 1px solid var(--color-border);
    }

    /* Footer action row separator - border above the last tfoot row (Add button) */
    .table-row-dividers tfoot tr:last-child td {
      border-top: 1px solid var(--color-border);
    }

    /* Prevent double line between tbody last row and tfoot first row */
    .table-row-dividers tbody:has(+ tfoot) tr:last-child {
      border-bottom: none;
    }

    /* Hide footer top border when not needed */
    .table-row-dividers.table-borderless-footer tfoot tr:first-child td {
      border-top: none;
    }

    /* Hide date input calendar icon but keep clickable */
    .date-input-wrapper {
      position: relative;
      width: 100%;
    }
    .date-input-wrapper .date-display {
      cursor: pointer;
      position: relative;
    }
    .date-input-wrapper .date-hidden {
      position: absolute;
      top: 0;
      left: 0;
      width: 0;
      height: 0;
      opacity: 0;
      pointer-events: none;
    }

    .table-row-dividers tbody tr.accessory-grouped td {
      border-top: none;
    }
    .table-row-dividers tbody tr.accessory-grouped + tr:not(.accessory-grouped) {
      /* Keep normal border for the first row of the next group */
    }
    .table-row-dividers tbody tr:has(+ .accessory-grouped) {
      border-bottom: none;
    }

    .accessory-hidden select,
    .accessory-hidden .accessory-lfqty-input,
    .accessory-hidden .accessory-price-input {
      display: none;
    }
    .accessory-hidden .accessory-lfqty-label {
      display: none;
    }

    /* Compact */
    .table-compact th,
    .table-compact td {
      padding: var(--space-2) var(--space-3);
    }

    /* Relaxed */
    .table-relaxed th,
    .table-relaxed td {
      padding: var(--space-4) var(--space-6);
    }

    /* No hover */
    .table-no-hover tbody tr:hover {
      background: transparent;
    }

    /* Fixed layout */
    .table-fixed {
      table-layout: fixed;
    }

    /* Sticky header */
    .table-sticky-header thead {
      position: sticky;
      top: 0;
      z-index: var(--z-sticky);
    }

    .table-sticky-header th {
      background: white;
      box-shadow: 0 1px 0 var(--color-border);
    }

    /* Sortable header indicator */
    .table th[data-sortable] {
      cursor: pointer;
      user-select: none;
    }

    .table th[data-sortable]:hover {
      background: var(--gray-100);
    }

    .table th[data-sortable]::after {
      content: '';
      display: inline-block;
      margin-left: var(--space-2);
      width: 0;
      height: 0;
      border-left: 4px solid transparent;
      border-right: 4px solid transparent;
      border-top: 4px solid var(--color-text-subtle);
      vertical-align: middle;
      opacity: 0.5;
    }

    .table th[data-sort="asc"]::after {
      border-top: none;
      border-bottom: 4px solid var(--primary-600);
      opacity: 1;
    }

    .table th[data-sort="desc"]::after {
      border-top: 4px solid var(--primary-600);
      opacity: 1;
    }

    /* Selectable rows */
    .table-selectable tbody tr {
      cursor: pointer;
    }

    .table-selectable tbody tr.selected {
      background: var(--primary-50);
    }

    .table-selectable tbody tr.selected:hover {
      background: var(--primary-100);
    }

    /* Row actions (always visible) */
    .table .row-actions {
      transition: background var(--duration-150) var(--ease-out);
    }

    /* Actions column width - keep it narrow */
    .table th.actions-col,
    .table td.actions-col {
      width: 48px;
      text-align: center;
    }

    .table td.total-col {
      border: 1px solid var(--gray-200);
    }

    /* First column (Height) - add extra left padding to match doubled spacing */
    .table th:first-child,
    .table td:first-child {
      padding-left: var(--space-3);
    }

    /* Qty column - add extra right padding to match doubled spacing */
    .table th:nth-child(5),
    .table td:nth-child(5) {
      padding-right: var(--space-3);
    }

    /* Project Overview table cells - match Add Room button height of 40px */

    /* Empty state */
    .table-empty {
      padding: var(--space-12);
      text-align: center;
      color: var(--color-text-muted);
    }

    .table-empty-icon {
      margin-bottom: var(--space-3);
      color: var(--color-text-subtle);
    }

    /* Cell alignment */
    .text-left { text-align: left; }
    .text-center { text-align: center; }
    .text-right { text-align: right; }

    /* Cell widths */
    .w-auto { width: auto; }
    .w-min { width: 1%; white-space: nowrap; }
    .w-full { width: 100%; }

    /* Tabbed Tables - Material Design 2 Style - Updated Tables v1.7.0 */
    
    /* Tabbed Table Container - Enclosed */
    .table-tabs-container {
      border: 1px solid var(--color-border);
      border-radius: var(--radius-xl);
      overflow: hidden;
    }

    /* Title for tabbed tables (optional) */
    .table-tabs-title {
      padding: var(--space-4) var(--space-4);
      font-size: var(--text-lg);
      font-weight: var(--font-semibold);
      color: var(--color-text);
      background: var(--color-surface);
      border-bottom: 1px solid var(--color-border);
    }

    /* Tabs row */
    .table-tabs {
      display: flex;
      border-bottom: 1px solid var(--color-border);
      background: var(--color-surface);
      margin-bottom: 0;
      gap: 0;
    }

    .table-tab {
      position: relative;
      padding: var(--space-3) var(--space-4);
      font-size: var(--text-sm);
      font-weight: var(--font-medium);
      color: var(--color-text-muted);
      background: transparent;
      border: none;
      outline: none;
      cursor: pointer;
      transition: all var(--duration-200) var(--ease-out);
      white-space: nowrap;
    }

    .table-tab:hover {
      color: var(--color-text);
      background: var(--gray-50);
    }

    .table-tab.active {
      color: var(--primary-600);
    }

    .table-tab::after {
      content: '';
      position: absolute;
      bottom: -1px;
      left: 0;
      right: 0;
      height: 2px;
      background: var(--primary-600);
      transform: scaleX(0);
      transition: transform var(--duration-200) var(--ease-out);
    }

    .table-tab.active::after {
      transform: scaleX(1);
    }

    .table-tab:focus-visible {
      outline: 2px solid var(--color-focus-ring);
      outline-offset: -2px;
    }

    /* Tab content */
    .table-tab-content {
      display: none;
    }

    .table-tab-content.active {
      display: flex;
      flex: 1;
      flex-direction: column;
    }

    /* Cash projections: card manages its own height, tab shouldn't stretch */
    #cash-projections-tab.table-tab-content.active {
      display: block;
      flex: none;
    }

    /* Table wrapper inside tabbed container - remove borders and radius */
    .table-tabs-container .table-wrapper {
      border: none;
      border-radius: 0;
    }

    /* ===== SUB NAV UI ===== */
    /* Floating sub-navigation for page-level tab switching. No background. */
    .sub-nav {
      display: flex;
      border-bottom: 1px solid var(--color-border);
      margin-bottom: 0;
      gap: 0;
    }

    .sub-nav-tab {
      position: relative;
      padding: var(--space-3) var(--space-4);
      font-size: var(--text-sm);
      font-weight: var(--font-medium);
      color: var(--color-text-muted);
      background: transparent;
      border: none;
      outline: none;
      cursor: pointer;
      transition: all var(--duration-200) var(--ease-out);
      white-space: nowrap;
    }

    .sub-nav-tab:hover {
      color: var(--color-text);
    }

    .sub-nav-tab.active {
      color: var(--primary-600);
    }

    .sub-nav-tab::after {
      content: '';
      position: absolute;
      bottom: -1px;
      left: 0;
      right: 0;
      height: 2px;
      background: var(--primary-600);
      transform: scaleX(0);
      transition: transform var(--duration-200) var(--ease-out);
    }

    .sub-nav-tab.active::after {
      transform: scaleX(1);
    }

    .sub-nav-tab:focus-visible {
      outline: 2px solid var(--color-focus-ring);
      outline-offset: -2px;
    }

    /* ========================================
       SMALL MODAL (Confirmation dialogs)
       ======================================== */
    .modal-overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.5);
      z-index: var(--z-modal);
      align-items: center;
      justify-content: center;
      padding: var(--space-4);
    }

    .modal-overlay.is-open {
      display: flex;
    }

    .modal-small {
      background: var(--color-surface);
      border-radius: var(--radius-lg);
      filter: drop-shadow(0 20px 25px rgb(0 0 0 / 0.15)) drop-shadow(0 8px 10px rgb(0 0 0 / 0.1));
      width: 100%;
      max-width: 480px;
      display: flex;
      flex-direction: column;
    }

    .modal-header {
      padding: var(--space-3) var(--space-4);
      border-bottom: 1px solid var(--color-border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-shrink: 0;
    }

    .modal-title {
      margin: 0;
      font-weight: var(--font-semibold);
      font-size: var(--text-lg);
      color: var(--gray-700);
    }

    .modal-close {
      background: none;
      border: none;
      cursor: pointer;
      color: var(--gray-400);
      font-size: var(--text-2xl);
      line-height: 1;
      padding: var(--space-2);
      margin: calc(var(--space-2) * -1);
      transition: color var(--duration-150) var(--ease-out);
    }

    .modal-close:hover {
      color: var(--gray-600);
    }

    .modal-body {
      padding: var(--space-6);
      overflow-y: auto;
      flex: 1;
    }

    .modal-body p {
      margin: 0;
      font-size: var(--text-base);
      color: var(--color-text);
      line-height: var(--leading-relaxed);
      text-align: center;
    }

    .modal-footer {
      padding: var(--space-3) var(--space-4);
      border-top: 1px solid var(--color-border);
      display: flex;
      gap: var(--space-3);
      flex-shrink: 0;
    }

    .modal-footer-center {
      justify-content: center;
    }

    .modal-footer-split {
      justify-content: space-between;
    }

    .modal-footer-left,
    .modal-footer-right {
      display: flex;
      gap: var(--space-3);
    }

    /* ========================================
       LIST ITEMS
       Interactive list items with optional leading/trailing icons
       and optional inline text editing
       ======================================== */
    .list-item {
      position: relative;
    }

    .list-item-btn {
      width: 100%;
      justify-content: flex-start;
      display: flex;
      align-items: center;
      padding: var(--space-1);
      padding-left: var(--space-2);
      padding-right: calc(var(--space-8) + var(--space-2)); /* Space for trailing icon */
      cursor: pointer;
      gap: var(--space-1);
    }

    /* Leading icon (optional - can be plus, label, number, etc.) */
    .list-item-leading-icon {
      flex-shrink: 0;
      display: flex;
      align-items: center;
    }

    /* Text content */
    .list-item-text {
      flex: 1;
      text-align: left;
      outline: none;
      padding: var(--space-1) var(--space-2);
      margin-left: var(--space-1);
      border-radius: var(--radius-sm);
    }

    /* Trailing icon (optional - can be delete, meatball, arrow, etc.) */
    .list-item-trailing-icon {
      position: absolute;
      right: var(--space-2);
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      cursor: pointer;
      color: var(--gray-300);
      padding: var(--space-1);
      display: none;
      align-items: center;
      transition: color var(--duration-150) var(--ease-out);
    }

    .list-item-trailing-icon:hover {
      color: var(--error-600);
    }

    .list-item:hover .list-item-trailing-icon {
      display: flex;
    }

    /* ========================================
       LOADING SPINNERS
       Three variants: circle, dots, line
       Use data-spinner="circle|dots|line" or classes
       ======================================== */
    .spinner {
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    /* Circle Spinner (default) */
    .spinner-circle,
    .spinner[data-variant="circle"] {
      width: 24px;
      height: 24px;
      border: 3px solid var(--gray-200);
      border-top-color: var(--primary-600);
      border-radius: var(--radius-full);
      animation: spin 0.8s linear infinite;
    }

    .spinner-circle-sm { width: 16px; height: 16px; border-width: 2px; }
    .spinner-circle-lg { width: 32px; height: 32px; border-width: 4px; }
    .spinner-circle-xl { width: 48px; height: 48px; border-width: 4px; }

    @keyframes spin {
      to { transform: rotate(360deg); }
    }

    /* Dots Spinner */
    .spinner-dots,
    .spinner[data-variant="dots"] {
      display: inline-flex;
      gap: var(--space-1);
    }

    .spinner-dots::before,
    .spinner-dots::after,
    .spinner-dots span,
    .spinner[data-variant="dots"]::before,
    .spinner[data-variant="dots"]::after {
      content: '';
      width: 8px;
      height: 8px;
      background: var(--primary-600);
      border-radius: var(--radius-full);
      animation: dots-bounce 1.4s ease-in-out infinite both;
    }

    .spinner-dots::before,
    .spinner[data-variant="dots"]::before {
      animation-delay: -0.32s;
    }

    .spinner-dots span {
      animation-delay: -0.16s;
    }

    .spinner-dots::after,
    .spinner[data-variant="dots"]::after {
      animation-delay: 0s;
    }

    @keyframes dots-bounce {
      0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
      40% { transform: scale(1); opacity: 1; }
    }

    /* Line Spinner */
    .spinner-line,
    .spinner[data-variant="line"] {
      width: 100px;
      height: 4px;
      background: var(--gray-200);
      border-radius: var(--radius-full);
      overflow: hidden;
      position: relative;
    }

    .spinner-line::after,
    .spinner[data-variant="line"]::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 40%;
      height: 100%;
      background: var(--primary-600);
      border-radius: var(--radius-full);
      animation: line-slide 1.2s ease-in-out infinite;
    }

    @keyframes line-slide {
      0% { left: -40%; }
      100% { left: 100%; }
    }

    .spinner-line-sm { width: 60px; height: 3px; }
    .spinner-line-lg { width: 150px; height: 5px; }

    .ds-spinner-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: var(--space-8);
      margin-bottom: var(--space-4);
    }

    .ds-spinner-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: var(--space-2);
    }

    .ds-spinner-label {
      font-size: var(--text-xs);
      color: var(--color-text-muted);
    }

    /* ========================================
       INLINE ALERTS (for modals/forms)
       ======================================== */
    .alert-inline {
      display: flex;
      align-items: flex-start;
      gap: var(--space-2);
      padding: var(--space-3);
      border-radius: var(--radius-md);
      font-size: var(--text-sm);
    }

    .alert-inline-icon {
      flex-shrink: 0;
      width: 16px;
      height: 16px;
      margin-top: 1px;
    }

    .alert-inline-content {
      flex: 1;
      min-width: 0;
    }

    .alert-inline-info {
      background: var(--info-50);
      color: var(--info-700);
    }

    .alert-inline-success {
      background: var(--success-50);
      color: var(--success-700);
    }

    .alert-inline-warning {
      background: var(--warning-50);
      color: var(--warning-700);
    }

    .alert-inline-error {
      background: var(--error-50);
      color: var(--error-700);
    }

    .ds-alert-inline-stack {
      display: flex;
      flex-direction: column;
      gap: var(--space-3);
      max-width: 400px;
    }

    /* ========================================
       ICONS (SVG-based system)
       ======================================== */
    .icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .icon svg {
      width: 100%;
      height: 100%;
    }

    /* Icon sizes */
    .icon-xs  { width: 12px; height: 12px; }
    .icon-sm  { width: 16px; height: 16px; }
    .icon-md  { width: 20px; height: 20px; }
    .icon-lg  { width: 24px; height: 24px; }
    .icon-xl  { width: 32px; height: 32px; }
    .icon-2xl { width: 40px; height: 40px; }
    .icon-3xl { width: 48px; height: 48px; }

    /* Icon colors */
    .icon-current { color: currentColor; }
    .icon-muted   { color: var(--color-text-muted); }
    .icon-subtle  { color: var(--color-text-subtle); }
    .icon-primary { color: var(--primary-600); }
    .icon-success { color: var(--success-600); }
    .icon-warning { color: var(--warning-600); }
    .icon-error   { color: var(--error-600); }
    .icon-info    { color: var(--info-600); }

    /* Icon with background */
    .icon-bg {
      padding: var(--space-2);
      border-radius: var(--radius-md);
      background: var(--gray-100);
    }

    .icon-bg-primary { background: var(--primary-100); color: var(--primary-600); }
    .icon-bg-success { background: var(--success-100); color: var(--success-600); }

    /* Quote Locking */
    .quote-locked .room-pill,
    .quote-locked .overview-room-card,
    .quote-locked input:not(.milestone-paid-toggle):not(.date-hidden),
    .quote-locked textarea,
    .quote-locked select,
    .quote-locked [contenteditable] {
      pointer-events: none;
      opacity: 0.7;
      cursor: not-allowed;
    }
    .quote-locked .date-hidden {
      opacity: 0 !important;
      pointer-events: none !important;
    }
    .quote-locked {
      cursor: not-allowed;
    }
    .quote-locked .btn-add-row,
    .quote-locked .btn-wide:not(.milestone-paid-toggle),
    .quote-locked .lock-hide {
      display: none !important;
    }
    .quote-locked .milestone-paid-toggle {
      pointer-events: auto;
      opacity: 1;
    }
    .icon-bg-warning { background: var(--warning-100); color: var(--warning-600); }
    .icon-bg-error   { background: var(--error-100); color: var(--error-600); }
    .icon-bg-info    { background: var(--info-100); color: var(--info-600); }

    .icon-bg-circle {
      border-radius: var(--radius-full);
    }

    .ds-icon-grid {
      display: flex;
      flex-wrap: wrap;
      gap: var(--space-4);
      margin-bottom: var(--space-4);
    }

    .ds-icon-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: var(--space-2);
      padding: var(--space-3);
      background: var(--color-surface);
      border: 1px solid var(--color-border);
      border-radius: var(--radius-md);
      min-width: 80px;
    }

    .ds-icon-name {
      font-size: var(--text-2xs);
      color: var(--color-text-muted);
      font-family: var(--font-alt);
    }

    /* ========================================
       IMAGES
       ======================================== */
    .img {
      display: block;
      max-width: 100%;
      height: auto;
    }

    /* Object-fit variants */
    .img-cover {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .img-contain {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }

    .img-fill {
      width: 100%;
      height: 100%;
      object-fit: fill;
    }

    /* Shape modifiers */
    .img-rounded {
      border-radius: var(--radius-lg);
    }

    .img-circle {
      border-radius: var(--radius-full);
    }

    /* Aspect ratio containers */
    .aspect-square {
      position: relative;
      width: 100%;
      aspect-ratio: 1 / 1;
      overflow: hidden;
    }

    .aspect-video {
      position: relative;
      width: 100%;
      aspect-ratio: 16 / 9;
      overflow: hidden;
    }

    .aspect-wide {
      position: relative;
      width: 100%;
      aspect-ratio: 21 / 9;
      overflow: hidden;
    }

    .aspect-portrait {
      position: relative;
      width: 100%;
      aspect-ratio: 3 / 4;
      overflow: hidden;
    }

    .aspect-photo {
      position: relative;
      width: 100%;
      aspect-ratio: 4 / 3;
      overflow: hidden;
    }

    /* Image placeholder (when no src or loading) */
    .img-placeholder {
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--gray-100);
      color: var(--color-text-subtle);
      font-size: var(--text-sm);
    }

    .img-placeholder-icon {
      width: 48px;
      height: 48px;
      color: var(--gray-300);
    }

    /* Image caption */
    .img-caption {
      margin-top: var(--space-2);
      font-size: var(--text-sm);
      color: var(--color-text-muted);
      text-align: center;
    }

    /* Image grid for galleries */
    .img-grid {
      display: grid;
      gap: var(--space-4);
    }

    .img-grid-2 { grid-template-columns: repeat(2, 1fr); }
    .img-grid-3 { grid-template-columns: repeat(3, 1fr); }
    .img-grid-4 { grid-template-columns: repeat(4, 1fr); }

    @media (max-width: 640px) {
      .img-grid-3,
      .img-grid-4 { grid-template-columns: repeat(2, 1fr); }
    }

    /* ============================================
       ROOM PILL COMPONENT
       Extensible pill component for room management UIs.
       
       Base:     .room-pill (container)
       
       Modifiers:
         --draggable   Shows drag grip icon (ghost default, darker on hover)
         --add         Shows + prefix, entire pill clickable to add
         --labeled     Shows alphabetical prefix (A –, B –, etc.)
         --editable    Name is an editable text input (click to edit)
         --bordered    Outlined style (vs filled background)
         --deletable   Shows trash icon on hover
       
       Examples:
         Add Room:     .room-pill--draggable.--add.--deletable
         Project Room: .room-pill--draggable.--labeled.--editable.--bordered.--deletable
         Read-only:    .room-pill--labeled (just prefix + name)
       ============================================ */
    
    .room-pill {
      position: relative;
      display: flex;
      align-items: center;
      gap: var(--space-1);
      padding: var(--space-1) var(--space-2);
      height: 40px;
      border-radius: var(--radius-md);
      font-size: var(--text-sm);
      color: var(--color-text);
      background: var(--gray-100);
      transition: all var(--duration-150) var(--ease-out);
      -webkit-user-select: none;
      user-select: none;
      box-sizing: border-box;
    }

    .room-pill--bordered {
      background: transparent;
      border: 1px solid var(--color-border);
    }

    /* Drag handle */
    .room-pill .room-pill-grip {
      display: flex;
      align-items: center;
      flex-shrink: 0;
      cursor: grab;
    }

    .room-pill .room-pill-grip .material-icons {
      font-size: 16px;
      color: var(--gray-200);
      transition: color var(--duration-150) var(--ease-out);
    }

    .room-pill:hover .room-pill-grip .material-icons {
      color: var(--gray-400);
    }

    .room-pill .room-pill-grip:active {
      cursor: grabbing;
    }

    /* Add action (+ sign) */
    .room-pill--add {
      cursor: pointer;
    }

    .room-pill--add:hover {
      background: var(--gray-200);
    }

    .room-pill-add-icon {
      margin-right: 2px;
      font-weight: var(--font-normal);
    }

    .room-pill--add:hover .room-pill-add-icon,
    .room-pill--add:hover .room-pill-name {
      font-weight: var(--font-semibold);
    }

    /* Prefix label (A –, B –) */
    .room-pill-prefix {
      font-weight: var(--font-medium);
      color: var(--gray-500);
      white-space: nowrap;
      pointer-events: none;
    }

    /* Name (static or editable) */
    .room-pill-name {
      flex: 1;
      min-width: 0;
    }

    .room-pill--editable .room-pill-name {
      border: none;
      background: transparent;
      font-size: var(--text-xs);
      color: var(--color-text);
      padding: var(--space-1) var(--space-2);
      padding-left: 0;
      outline: none;
      cursor: text;
      transition: all var(--duration-150) var(--ease-out);
      border-radius: var(--radius-sm);
      font-family: inherit;
      width: 100%;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      pointer-events: auto;
    }

    .room-pill--editable .room-pill-name:hover {
      background: var(--gray-200);
    }

    .room-pill--editable .room-pill-name:focus {
      background: var(--gray-200);
      -webkit-user-select: text;
      user-select: text;
    }

    /* Multiline variant: expands to fit text, grip stays vertically centered */
    .room-pill--multiline {
      height: auto;
      min-height: 40px;
      align-items: center;
    }

    .room-pill--multiline .room-pill-name {
      white-space: normal;
      word-break: break-word;
      overflow: visible;
      text-overflow: unset;
    }

    textarea.room-pill-name {
      resize: none;
      overflow: hidden;
      line-height: 1.4;
      padding-top: var(--space-2);
      padding-bottom: var(--space-2);
      field-sizing: content;
    }

    /* Delete button */
    .room-pill-delete {
      opacity: 0;
      transition: opacity var(--duration-150) var(--ease-out);
      background: none;
      border: none;
      cursor: pointer;
      padding: var(--space-1);
      color: var(--gray-300);
      display: flex;
      align-items: center;
    }

    .room-pill:hover .room-pill-delete {
      opacity: 1;
    }

    .room-pill-delete:hover {
      color: var(--error-600) !important;
    }

    /* Drop pill gripper - show on hover for reordering */
    .drop-pill-grip {
      display: flex;
      align-items: center;
      flex-shrink: 0;
      width: 20px;
      cursor: grab;
    }
    .drop-pill-grip .material-icons {
      font-size: 16px;
      color: var(--gray-200);
      transition: color var(--duration-150) var(--ease-out);
    }
    .series-header:hover .drop-pill-grip .material-icons,
    .finish-header:hover .drop-pill-grip .material-icons,
    .accessory-header:hover .drop-pill-grip .material-icons {
      color: var(--gray-400);
    }
    .drop-pill-grip:active {
      cursor: grabbing;
    }
    .series-header,
    .finish-header,
    .accessory-header {
      -webkit-user-select: none;
      user-select: none;
    }
    .series-header input,
    .finish-header input,
    .accessory-header input {
      -webkit-user-select: text;
      user-select: text;
    }

    /* Demo styles for style guide */
    .ds-image-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: var(--space-4);
      margin-bottom: var(--space-4);
    }

    .ds-image-item {
      display: flex;
      flex-direction: column;
      gap: var(--space-2);
    }

    .ds-image-label {
      font-size: var(--text-xs);
      color: var(--color-text-muted);
      font-family: var(--font-alt);
    }

    /* ========================================
       RESPONSIVE
       ======================================== */
    @media (max-width: 768px) {
      .ds-sidebar {
        position: fixed;
        width: 100%;
        height: auto;
        max-height: 50vh;
        bottom: 0;
        top: auto;
        border-right: none;
        border-top: 1px solid var(--color-border);
        z-index: var(--z-ds-panel);
        transform: translateY(100%);
        transition: transform var(--duration-300) var(--ease-out);
      }

      .ds-sidebar.open {
        transform: translateY(0);
      }

      .ds-content {
        margin-left: 0;
        padding: var(--space-6) var(--space-4);
        padding-bottom: 100px;
      }

      .ds-trigger {
        z-index: var(--z-ds-trigger);
      }

      .ds-color-grid {
        grid-template-columns: repeat(3, 1fr);
      }
    }

    /* ========================================
       LANDING PAGE
       ======================================== */
    .landing {
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: var(--space-8);
      background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    }

    .landing-greeting {
      font-size: var(--text-lg);
      font-weight: var(--font-medium);
      color: var(--color-text-muted);
      margin-bottom: var(--space-2);
      opacity: 0;
      animation: fadeInUp 0.6s ease-out 0.2s forwards;
    }

    .landing-question {
      font-size: clamp(var(--text-2xl), 5vw, var(--text-4xl));
      font-weight: var(--font-medium);
      color: var(--color-text);
      text-align: center;
      margin-bottom: var(--space-12);
      opacity: 0;
      animation: fadeInUp 0.6s ease-out 0.4s forwards;
    }

    .landing-name {
      color: var(--primary-600);
    }

    .landing-quote-container {
      max-width: 600px;
      text-align: center;
      opacity: 0;
      animation: fadeInUp 0.6s ease-out 0.6s forwards;
    }

    .landing-quote {
      font-size: var(--text-xl);
      font-style: italic;
      color: var(--color-text-muted);
      line-height: var(--leading-relaxed);
      margin-bottom: var(--space-4);
    }

    .landing-quote::before {
      content: '"';
      color: var(--primary-300);
      font-size: var(--text-4xl);
      line-height: 0;
      vertical-align: -0.3em;
      margin-right: var(--space-1);
    }

    .landing-quote::after {
      content: '"';
      color: var(--primary-300);
      font-size: var(--text-4xl);
      line-height: 0;
      vertical-align: -0.3em;
      margin-left: var(--space-1);
    }

    .landing-author {
      font-size: var(--text-sm);
      font-weight: var(--font-medium);
      color: var(--color-text-subtle);
    }

    .landing-divider {
      width: 48px;
      height: 2px;
      background: var(--primary-300);
      margin: var(--space-8) auto;
      opacity: 0;
      animation: fadeInUp 0.6s ease-out 0.8s forwards;
    }

    .landing-hint {
      font-size: var(--text-sm);
      color: var(--color-text-subtle);
      opacity: 0;
      animation: fadeInUp 0.6s ease-out 1s forwards;
    }

    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* ========================================
       VIEW SYSTEM
       ======================================== */
    .app-view {
      display: none;
      height: 100%;
      animation: fadeIn 200ms ease-out;
    }
    
    .app-view.active {
      display: block;
    }
    
    #view-quick-add.active {
      display: flex;
      flex-direction: column;
    }
    
    .view-header {
      margin-bottom: var(--space-4);
    }
    
    .view-card {
      background: white;
      border: 1px solid var(--color-border);
      border-radius: var(--radius-lg);
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }
    
    .view-card-header {
      padding: var(--space-4);
      border-bottom: 1px solid var(--color-border);
      flex-shrink: 0;
      transition: box-shadow var(--duration-200) var(--ease-out);
      position: relative;
      z-index: 10;
    }
    
    .view-card-body {
      padding: var(--space-6);
      flex: 1;
      overflow-y: auto;
    }
    
    /* Sortable Drag States */
    .room-type-item,
    .room-item {
      -webkit-user-select: none;
      user-select: none;
    }
    
    .room-item input:focus {
      -webkit-user-select: text;
      user-select: text;
    }
    
    .sortable-ghost {
      opacity: 1 !important;
      background: var(--gray-100);
      color: transparent !important;
    }
    
    .sortable-ghost * {
      color: transparent !important;
      opacity: 0 !important;
    }
    
    .sortable-chosen {
      opacity: 1;
    }
    
    .sortable-drag {
      opacity: 1 !important;
    }
    
    .drag-handle {
      cursor: grab !important;
    }
    
    .drag-handle .material-icons {
      color: var(--red-100);
      transition: color var(--duration-150) var(--ease-out);
    }
    
    .room-type-item:hover .drag-handle .material-icons,
    .room-item:hover .drag-handle .material-icons {
      color: var(--gray-400);
    }
    
    .drag-handle:active {
      cursor: grabbing !important;
    }
    
    .view-card-footer {
      padding: var(--space-4);
      border-top: 1px solid var(--color-border);
      flex-shrink: 0;
      transition: box-shadow var(--duration-200) var(--ease-out);
      position: relative;
      z-index: 1;
    }
    
    /* Prevent double hairline: when table is direct sibling before footer */
    .table-row-dividers + .view-card-footer,
    .table-wrapper + .view-card-footer {
      border-top: none;
    }
    
    /* When tab content contains a table followed by footer outside it */
    .table-tab-content:last-of-type + .view-card-footer {
      border-top: none;
    }
    
    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    /* ========================================
       PROJECT OVERVIEW VIEW
       ======================================== */
    .overview-grid {
      display: grid;
      grid-template-columns: 1fr minmax(0, 10fr) 1fr;
      gap: 0;
      max-width: 1400px;
      margin: 0 auto;
    }

    .overview-content {
      grid-column: 2;
      padding: var(--space-6);
    }

    .overview-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: var(--space-8);
      padding-bottom: var(--space-4);
      
    }

    .overview-job-details {
      text-align: right;
      font-size: var(--text-sm);
      color: var(--gray-600);
    }

    .overview-job-details div {
      margin-bottom: var(--space-1);
    }

    .overview-job-details strong {
      color: var(--gray-900);
    }

    .overview-section {
      margin-bottom: var(--space-8);
    }

    .overview-section h2 {
      font-size: var(--text-xl);
      font-weight: 600;
      color: var(--gray-900);
      margin-bottom: var(--space-4);
    }

    .profit-hidden {
      display: none;
    }

    .profit-hidden.visible {
      display: table-cell;
    }

    .overview-sticky-bar {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      background: white;
      border-top: 2px solid var(--gray-200);
      padding: var(--space-4) var(--space-6);
      display: none;
      z-index: 35;
    }

    .overview-sticky-bar.active {
      display: block;
    }

    .sticky-bar-content {
      max-width: 1200px;
      margin: 0 auto;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .sticky-totals {
      display: flex;
      gap: var(--space-6);
      align-items: baseline;
    }

    .sticky-profit {
      display: flex;
      gap: var(--space-2);
      align-items: baseline;
      font-size: var(--text-base);
      color: var(--gray-600);
    }

    .sticky-profit-amount {
      font-weight: 500;
    }

    .sticky-profit-percent {
      color: var(--gray-500);
    }

    .sticky-subtotal {
      font-size: var(--text-base);
      color: var(--gray-400);
    }

    .sticky-total {
      font-size: var(--text-2xl);
      font-weight: 600;
      color: var(--gray-900);
    }

    /* ========================================
       UTILITY: Hidden (for removing style guide)
       ======================================== */
    .hidden { display: none !important; }
    /* Toggle Switch */
    .settings-toggle input:checked + span {
      background: var(--primary-600) !important;
    }
    .settings-toggle input:checked + span + span {
      transform: translateX(20px) !important;
    }

