/* ═══════════════════════════════════════════════════════════
   CentoraPOS Cloud CMS — Enterprise Command Center Design System
   Refined Linear-grade dark-tech & light-slate aesthetic
   Typography: Tomato Grotesk + Geist Sans + JetBrains Mono (tabular numerals)
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Inter:wght@400;500;600;700&display=swap');

@font-face {
    font-family: 'Tomato Grotesk';
    src: url('fonts/TomatoGrotesk-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Tomato Grotesk';
    src: url('fonts/TomatoGrotesk-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Tomato Grotesk';
    src: url('fonts/TomatoGrotesk-SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Tomato Grotesk';
    src: url('fonts/TomatoGrotesk-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ─── Global Base Tokens ─── */
:root {
    --font-sans: 'Tomato Grotesk', 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

    --success: #10b981;
    --success-light: #34d399;
    --success-subtle: rgba(16, 185, 129, 0.12);
    --success-border: rgba(16, 185, 129, 0.25);

    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --warning-subtle: rgba(245, 158, 11, 0.12);
    --warning-border: rgba(245, 158, 11, 0.25);

    --danger: #ef4444;
    --danger-light: #f87171;
    --danger-subtle: rgba(239, 68, 68, 0.12);
    --danger-border: rgba(239, 68, 68, 0.25);

    --info: #3b82f6;
    --info-light: #60a5fa;
    --info-subtle: rgba(59, 130, 246, 0.12);
    --info-border: rgba(59, 130, 246, 0.25);

    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 9px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    --radius: 10px;
    --radius-zen-card: 14px;
    --radius-zen-kpi: 12px;
    --radius-zen-table: 12px;

    /* Micro-spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-xxl: 24px;

    /* Transitions & Motion */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.15s var(--ease-out-expo);
    --transition-normal: 0.22s var(--ease-out-expo);
    --transition-slow: 0.35s var(--ease-out-expo);

    /* Default Accent (Centora Flagship Crimson) */
    --accent: #B70039;
    --accent-light: #E02B66;
    --accent-dark: #7F0027;
    --accent-glow: rgba(183, 0, 57, 0.25);
    --accent-subtle: rgba(183, 0, 57, 0.08);
    --accent-border: rgba(183, 0, 57, 0.25);
    --gradient: linear-gradient(135deg, #B70039, #7F0027);
    --gradient-subtle: linear-gradient(135deg, rgba(183, 0, 57, 0.12), rgba(127, 0, 39, 0.04));
}

/* ═══════════════════════════════════════════
   THEME PALETTES (data-theme)
   ═══════════════════════════════════════════ */
[data-theme="centora"],
[data-theme="zen-purple"] {
    --accent: #B70039;
    --accent-light: #E02B66;
    --accent-dark: #7F0027;
    --accent-glow: rgba(183, 0, 57, 0.25);
    --accent-subtle: rgba(183, 0, 57, 0.08);
    --accent-border: rgba(183, 0, 57, 0.25);
    --gradient: linear-gradient(135deg, #B70039, #7F0027);
    --gradient-subtle: linear-gradient(135deg, rgba(183, 0, 57, 0.12), rgba(127, 0, 39, 0.04));
}

[data-theme="slate-pro"] {
    --accent: #64748b;
    --accent-light: #94a3b8;
    --accent-dark: #475569;
    --accent-glow: rgba(100, 116, 139, 0.25);
    --accent-subtle: rgba(100, 116, 139, 0.08);
    --accent-border: rgba(100, 116, 139, 0.25);
    --gradient: linear-gradient(135deg, #64748b, #334155);
    --gradient-subtle: linear-gradient(135deg, rgba(100,116,139,0.12), rgba(51,65,85,0.04));
}

[data-theme="emerald-ledger"] {
    --accent: #10b981;
    --accent-light: #34d399;
    --accent-dark: #059669;
    --accent-glow: rgba(16, 185, 129, 0.25);
    --accent-subtle: rgba(16, 185, 129, 0.08);
    --accent-border: rgba(16, 185, 129, 0.25);
    --gradient: linear-gradient(135deg, #10b981, #047857);
    --gradient-subtle: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(4,120,87,0.04));
}

[data-theme="midnight-commerce"] {
    --accent: #3b82f6;
    --accent-light: #60a5fa;
    --accent-dark: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.25);
    --accent-subtle: rgba(59, 130, 246, 0.08);
    --accent-border: rgba(59, 130, 246, 0.25);
    --gradient: linear-gradient(135deg, #3b82f6, #1d4ed8);
    --gradient-subtle: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(29,78,216,0.04));
}

[data-theme="obsidian"] {
    --accent: #71717a;
    --accent-light: #a1a1aa;
    --accent-dark: #52525b;
    --accent-glow: rgba(113, 113, 122, 0.25);
    --accent-subtle: rgba(113, 113, 122, 0.08);
    --accent-border: rgba(113, 113, 122, 0.25);
    --gradient: linear-gradient(135deg, #71717a, #3f3f46);
    --gradient-subtle: linear-gradient(135deg, rgba(113,113,122,0.12), rgba(63,63,70,0.04));
}

[data-theme="royal-indigo"] {
    --accent: #4f46e5;
    --accent-light: #6366f1;
    --accent-dark: #3730a3;
    --accent-glow: rgba(79, 70, 229, 0.25);
    --accent-subtle: rgba(79, 70, 229, 0.08);
    --accent-border: rgba(79, 70, 229, 0.25);
    --gradient: linear-gradient(135deg, #4f46e5, #312e81);
    --gradient-subtle: linear-gradient(135deg, rgba(79,70,229,0.12), rgba(49,46,129,0.04));
}

[data-theme="copper-forge"] {
    --accent: #d97706;
    --accent-light: #f59e0b;
    --accent-dark: #b45309;
    --accent-glow: rgba(217, 119, 6, 0.25);
    --accent-subtle: rgba(217, 119, 6, 0.08);
    --accent-border: rgba(217, 119, 6, 0.25);
    --gradient: linear-gradient(135deg, #d97706, #92400e);
    --gradient-subtle: linear-gradient(135deg, rgba(217,119,6,0.12), rgba(146,64,14,0.04));
}

[data-theme="steel-blue"] {
    --accent: #0284c7;
    --accent-light: #38bdf8;
    --accent-dark: #0369a1;
    --accent-glow: rgba(2, 132, 199, 0.25);
    --accent-subtle: rgba(2, 132, 199, 0.08);
    --accent-border: rgba(2, 132, 199, 0.25);
    --gradient: linear-gradient(135deg, #0284c7, #075985);
    --gradient-subtle: linear-gradient(135deg, rgba(2,132,199,0.12), rgba(7,89,133,0.04));
}

[data-theme="charcoal-mist"] {
    --accent: #52525b;
    --accent-light: #71717a;
    --accent-dark: #3f3f46;
    --accent-glow: rgba(82, 82, 91, 0.25);
    --accent-subtle: rgba(82, 82, 91, 0.08);
    --accent-border: rgba(82, 82, 91, 0.25);
    --gradient: linear-gradient(135deg, #52525b, #27272a);
    --gradient-subtle: linear-gradient(135deg, rgba(82,82,91,0.12), rgba(39,39,42,0.04));
}

[data-theme="ocean-teal"] {
    --accent: #0d9488;
    --accent-light: #14b8a6;
    --accent-dark: #0f766e;
    --accent-glow: rgba(13, 148, 136, 0.25);
    --accent-subtle: rgba(13, 148, 136, 0.08);
    --accent-border: rgba(13, 148, 136, 0.25);
    --gradient: linear-gradient(135deg, #0d9488, #115e59);
    --gradient-subtle: linear-gradient(135deg, rgba(13,148,136,0.12), rgba(17,94,89,0.04));
}

[data-theme="burgundy-executive"] {
    --accent: #be123c;
    --accent-light: #fb7185;
    --accent-dark: #9f1239;
    --accent-glow: rgba(190, 18, 60, 0.25);
    --accent-subtle: rgba(190, 18, 60, 0.08);
    --accent-border: rgba(190, 18, 60, 0.25);
    --gradient: linear-gradient(135deg, #be123c, #881337);
    --gradient-subtle: linear-gradient(135deg, rgba(190,18,60,0.12), rgba(136,19,55,0.04));
}

[data-theme="graphite"] {
    --accent: #4b5563;
    --accent-light: #6b7280;
    --accent-dark: #374151;
    --accent-glow: rgba(75, 85, 99, 0.25);
    --accent-subtle: rgba(75, 85, 99, 0.08);
    --accent-border: rgba(75, 85, 99, 0.25);
    --gradient: linear-gradient(135deg, #4b5563, #1f2937);
    --gradient-subtle: linear-gradient(135deg, rgba(75,85,99,0.12), rgba(31,41,55,0.04));
}

[data-theme="nordic-frost"] {
    --accent: #0ea5e9;
    --accent-light: #38bdf8;
    --accent-dark: #0284c7;
    --accent-glow: rgba(14, 165, 233, 0.25);
    --accent-subtle: rgba(14, 165, 233, 0.08);
    --accent-border: rgba(14, 165, 233, 0.25);
    --gradient: linear-gradient(135deg, #0ea5e9, #0369a1);
    --gradient-subtle: linear-gradient(135deg, rgba(14,165,233,0.12), rgba(3,105,161,0.04));
}

[data-theme="olive-timber"] {
    --accent: #84cc16;
    --accent-light: #a3e635;
    --accent-dark: #65a30d;
    --accent-glow: rgba(132, 204, 22, 0.25);
    --accent-subtle: rgba(132, 204, 22, 0.08);
    --accent-border: rgba(132, 204, 22, 0.25);
    --gradient: linear-gradient(135deg, #84cc16, #4d7c0f);
    --gradient-subtle: linear-gradient(135deg, rgba(132,204,22,0.12), rgba(77,124,15,0.04));
}

[data-theme="sapphire-night"] {
    --accent: #2563eb;
    --accent-light: #3b82f6;
    --accent-dark: #1d4ed8;
    --accent-glow: rgba(37, 99, 235, 0.25);
    --accent-subtle: rgba(37, 99, 235, 0.08);
    --accent-border: rgba(37, 99, 235, 0.25);
    --gradient: linear-gradient(135deg, #2563eb, #1e40af);
    --gradient-subtle: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(30,64,175,0.04));
}

/* ═══════════════════════════════════════════
   SURFACE LAYERS: DARK MODE (Default)
   ═══════════════════════════════════════════ */
:root,
[data-mode="dark"] {
    --bg-primary: #090A0F;
    --bg-secondary: #12131A;
    --bg-card: #12131A;
    --bg-card-hover: #1A1C26;
    --bg-input: #171822;
    --bg-table-header: #171822;
    --bg-hover: rgba(183, 0, 57, 0.12);
    --border: #252836;
    --border-hover: #3B3F54;
    --border-active: #E02B66;
    --text-primary: #F9FAFB;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;
    --th-text: #FFFFFF;
    --card-header-text: #FFFFFF;
    --label-text: #FFFFFF;
    --label-icon: #FFFFFF;
    --search-bg: #171822;
    --search-text: #F9FAFB;
    --search-placeholder: #6B7280;
    --search-border: #252836;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.50);
    --shadow-lg: 0 14px 36px -4px rgba(0, 0, 0, 0.65), 0 4px 12px rgba(0, 0, 0, 0.40);
    --shadow-zen-card: 0 4px 20px rgba(0, 0, 0, 0.40);
    --shadow-zen-kpi: 0 2px 6px rgba(0, 0, 0, 0.40);
    --shadow-zen-kpi-hover: 0 6px 20px rgba(0, 0, 0, 0.55);
    --shadow-zen-table: 0 2px 6px rgba(0, 0, 0, 0.40);
    --shadow-sidebar: 3px 0 16px rgba(0, 0, 0, 0.45);
    --elevation-1: 0 4px 20px rgba(0, 0, 0, 0.40);
    --elevation-2: 0 8px 24px rgba(0, 0, 0, 0.50);
    --elevation-3: 0 12px 32px rgba(0, 0, 0, 0.60);
    --elevation-4: 0 20px 48px rgba(0, 0, 0, 0.70);
    --toggle-bg: #1E202C;
    --scrollbar-bg: #090A0F;
    --scrollbar-thumb: #252836;
}

[data-theme="centora"][data-mode="dark"],
[data-theme="centora"]:not([data-mode]),
[data-theme="zen-purple"][data-mode="dark"],
[data-theme="zen-purple"]:not([data-mode]) {
    --bg-primary: #090A0F;
    --bg-secondary: #12131A;
    --bg-card: #12131A;
    --bg-card-hover: #1A1C26;
    --bg-input: #171822;
    --border: #252836;
    --text-primary: #F9FAFB;
    --text-secondary: #9CA3AF;
}

[data-theme="obsidian"][data-mode="dark"],
[data-theme="obsidian"]:not([data-mode]) {
    --bg-primary: #111114;
    --bg-secondary: #1A1A1E;
    --bg-card: #1A1A1E;
    --bg-card-hover: #26262C;
    --bg-input: #1E1E24;
    --border: #2D2D35;
    --text-primary: #E4E5EA;
    --text-secondary: #9496A5;
}

[data-theme="royal-indigo"][data-mode="dark"],
[data-theme="royal-indigo"]:not([data-mode]) {
    --bg-primary: #0E0C18;
    --bg-secondary: #18162A;
    --bg-card: #18162A;
    --bg-card-hover: #262444;
    --bg-input: #1E1C34;
    --border: #302C55;
    --text-primary: #E4E2F0;
    --text-secondary: #9A96C0;
}

[data-theme="copper-forge"][data-mode="dark"],
[data-theme="copper-forge"]:not([data-mode]) {
    --bg-primary: #141008;
    --bg-secondary: #1E1810;
    --bg-card: #1E1810;
    --bg-card-hover: #2E2518;
    --bg-input: #221C14;
    --border: #3D3025;
    --text-primary: #F0E6D5;
    --text-secondary: #B8A488;
}

[data-theme="steel-blue"][data-mode="dark"],
[data-theme="steel-blue"]:not([data-mode]) {
    --bg-primary: #0B1120;
    --bg-secondary: #152035;
    --bg-card: #152035;
    --bg-card-hover: #1E2E48;
    --bg-input: #1A2540;
    --border: #283F60;
    --text-primary: #DDE6F2;
    --text-secondary: #88A5C8;
}

[data-theme="charcoal-mist"][data-mode="dark"],
[data-theme="charcoal-mist"]:not([data-mode]) {
    --bg-primary: #111114;
    --bg-secondary: #19191E;
    --bg-card: #19191E;
    --bg-card-hover: #26262C;
    --bg-input: #1E1E25;
    --border: #2C2C35;
    --text-primary: #E2E2E6;
    --text-secondary: #9494A0;
}

[data-theme="ocean-teal"][data-mode="dark"],
[data-theme="ocean-teal"]:not([data-mode]) {
    --bg-primary: #0C1514;
    --bg-secondary: #152422;
    --bg-card: #152422;
    --bg-card-hover: #1F3835;
    --bg-input: #192D2B;
    --border: #264A45;
    --text-primary: #DCF0EC;
    --text-secondary: #7EBAB2;
}

[data-theme="burgundy-executive"][data-mode="dark"],
[data-theme="burgundy-executive"]:not([data-mode]) {
    --bg-primary: #140810;
    --bg-secondary: #1E1018;
    --bg-card: #1E1018;
    --bg-card-hover: #2E1825;
    --bg-input: #221320;
    --border: #3D2030;
    --text-primary: #F2DDE4;
    --text-secondary: #C096AA;
}

[data-theme="graphite"][data-mode="dark"],
[data-theme="graphite"]:not([data-mode]) {
    --bg-primary: #111115;
    --bg-secondary: #1C1C22;
    --bg-card: #1C1C22;
    --bg-card-hover: #2A2A34;
    --bg-input: #202028;
    --border: #333340;
    --text-primary: #EFF0F4;
    --text-secondary: #9498A8;
}

[data-theme="nordic-frost"][data-mode="dark"],
[data-theme="nordic-frost"]:not([data-mode]) {
    --bg-primary: #0C1520;
    --bg-secondary: #152030;
    --bg-card: #152030;
    --bg-card-hover: #213548;
    --bg-input: #1A2838;
    --border: #264060;
    --text-primary: #DEE8F2;
    --text-secondary: #80B0D0;
}

[data-theme="olive-timber"][data-mode="dark"],
[data-theme="olive-timber"]:not([data-mode]) {
    --bg-primary: #101208;
    --bg-secondary: #1A1E12;
    --bg-card: #1A1E12;
    --bg-card-hover: #282F1C;
    --bg-input: #1E2315;
    --border: #353D25;
    --text-primary: #E6EED8;
    --text-secondary: #9EB488;
}

[data-theme="sapphire-night"][data-mode="dark"],
[data-theme="sapphire-night"]:not([data-mode]) {
    --bg-primary: #080E1A;
    --bg-secondary: #101822;
    --bg-card: #101822;
    --bg-card-hover: #1A2840;
    --bg-input: #141E30;
    --border: #1E3050;
    --text-primary: #D8E2F0;
    --text-secondary: #88A5C5;
}

/* ═══════════════════════════════════════════
   LIGHT MODE SURFACES
   ═══════════════════════════════════════════ */
[data-mode="light"] {
    --bg-primary: #F8F9FA;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-card-hover: #FAF2F5;
    --bg-input: #FFFFFF;
    --bg-table-header: #F9FAFB;
    --bg-hover: rgba(183, 0, 57, 0.05);
    --border: #E5E7EB;
    --border-hover: #D1D5DB;
    --border-active: #B70039;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --th-text: #111827;
    --card-header-text: #111827;
    --label-text: #111827;
    --label-icon: #111827;
    --search-bg: #FFFFFF;
    --search-text: #111827;
    --search-placeholder: #9CA3AF;
    --search-border: #E5E7EB;
    --accent-light: #E02B66;
    --shadow: 0 1px 3px 0 rgba(26, 26, 46, 0.06), 0 1px 2px -1px rgba(26, 26, 46, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 6px 16px -2px rgba(26, 26, 46, 0.08), 0 2px 6px -1px rgba(26, 26, 46, 0.04);
    --shadow-lg: 0 14px 32px -4px rgba(26, 26, 46, 0.10), 0 4px 12px -2px rgba(26, 26, 46, 0.05);
    --shadow-zen-card: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
    --shadow-zen-kpi: 0 2px 8px rgba(26, 26, 46, 0.06), 0 1px 3px rgba(26, 26, 46, 0.04);
    --shadow-zen-kpi-hover: 0 8px 24px rgba(26, 26, 46, 0.10);
    --shadow-zen-table: 0 2px 8px rgba(26, 26, 46, 0.05);
    --shadow-sidebar: 3px 0 14px rgba(26, 26, 46, 0.06);
    --elevation-1: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
    --elevation-2: 0 6px 16px -2px rgba(26, 26, 46, 0.08), 0 2px 6px -1px rgba(26, 26, 46, 0.04);
    --elevation-3: 0 10px 25px -3px rgba(26, 26, 46, 0.08);
    --elevation-4: 0 14px 32px -4px rgba(26, 26, 46, 0.10);
    --toggle-bg: #F3F4F6;
    --scrollbar-bg: #F8F9FA;
    --scrollbar-thumb: #D1D5DB;
}

[data-theme="centora"][data-mode="light"],
[data-theme="zen-purple"][data-mode="light"] {
    --bg-primary: #F8F9FA;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-card-hover: #FAF2F5;
    --bg-input: #FFFFFF;
    --border: #E5E7EB;
    --text-primary: #111827;
    --text-secondary: #6B7280;
}

[data-theme="slate-pro"][data-mode="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
}

[data-theme="emerald-ledger"][data-mode="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
}

[data-theme="midnight-commerce"][data-mode="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
}

[data-theme="obsidian"][data-mode="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
}

[data-theme="royal-indigo"][data-mode="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
}

[data-theme="copper-forge"][data-mode="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
}

[data-theme="steel-blue"][data-mode="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
}

[data-theme="charcoal-mist"][data-mode="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
}

[data-theme="ocean-teal"][data-mode="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
}

[data-theme="burgundy-executive"][data-mode="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
}

[data-theme="graphite"][data-mode="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
}

[data-theme="nordic-frost"][data-mode="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
}

[data-theme="olive-timber"][data-mode="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
}

[data-theme="sapphire-night"][data-mode="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
}

/* Computed dependent tokens */
:root,
[data-mode="dark"] {
    --th-bg: #171822;
    --bg-row-alt: #15161F;
    --card-header-bg: var(--bg-card);
}

[data-mode="light"] {
    --th-bg: #F9FAFB;
    --bg-row-alt: #FAFAFC;
    --card-header-bg: var(--bg-card);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11', 'tnum';
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    line-height: 1.55;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

code, pre, .monospace {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-feature-settings: 'tnum', 'zero';
    font-variant-numeric: tabular-nums;
}

/* ─── Scrollbar (Fully Hidden: Nav Bar & Page Scroll Invisible) ─── */
html,
body,
.layout,
.sidebar,
.main-content,
* {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
    background: transparent !important;
}

::-webkit-scrollbar-track,
::-webkit-scrollbar-thumb,
::-webkit-scrollbar-corner {
    display: none !important;
    background: transparent !important;
    border: none !important;
}

/* ─── Layout ─── */
.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 270px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-sidebar);
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.sidebar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.sidebar-brand {
    padding: 18px 18px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    background: transparent;
}

.sidebar-brand .brand-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.sidebar-brand .brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px var(--accent-glow);
    flex-shrink: 0;
}

.sidebar-brand .brand-icon .material-symbols-outlined {
    font-size: 22px;
    color: #ffffff;
}

.sidebar-brand .brand-icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

.sidebar-brand .brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sidebar-brand .brand-name {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.1;
    margin: 0;
}

.sidebar-brand .brand-sub {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    line-height: 1;
    margin-top: 3px;
    text-transform: uppercase;
}

.sidebar-nav {
    padding: 16px 14px;
    flex: 1;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all var(--transition-fast);
    margin-bottom: 2px;
    position: relative;
    border: 1px solid transparent;
}

.sidebar-nav a:hover {
    background: var(--accent-subtle);
    color: var(--text-primary);
}

.sidebar-nav a.active {
    background: var(--accent-subtle);
    color: var(--accent);
    border-color: var(--accent-border);
    font-weight: 600;
}

[data-mode="dark"] .sidebar-nav a.active {
    color: var(--accent-light);
}

.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

.sidebar-nav a .material-symbols-outlined {
    font-size: 20px;
    width: 24px;
    text-align: center;
    opacity: 0.65;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.sidebar-nav a:hover .material-symbols-outlined {
    opacity: 0.9;
    transform: scale(1.05);
}

.sidebar-nav a.active .material-symbols-outlined {
    opacity: 1;
}

/* Nav Badge */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    margin-left: auto;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 2px 16px rgba(239, 68, 68, 0.6); }
}

.nav-badge:empty {
    display: none;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
    transition: border-color var(--transition-normal);
    background: linear-gradient(0deg, var(--accent-subtle), transparent);
}

.main-content {
    flex: 1;
    margin-left: 270px;
    padding: 36px 40px;
    min-height: 100vh;
    transition: background-color var(--transition-normal);
    max-width: calc(100vw - 270px);
    overflow-x: hidden;
    animation: pageEntrance 0.5s var(--ease-out-expo) both;
}

@keyframes pageEntrance {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Premium Mobile Responsiveness ─── */
@media (max-width: 1024px) {
    .main-content {
        margin-left: 0;
        max-width: 100vw;
        padding: 20px;
    }
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
        box-shadow: 4px 0 32px rgba(0,0,0,0.5);
    }
}

/* ─── Theme Toggle ─── */
.theme-toggle {
    position: absolute;
    top: 24px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--toggle-bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
    padding: 0;
}

.theme-toggle:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.theme-toggle .material-symbols-outlined {
    font-size: 18px;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.theme-toggle:hover .material-symbols-outlined {
    color: var(--accent-light);
}

/* ─── Page Header (ZenPOS Desktop Style) ─── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
    position: relative;
    gap: 16px;
    flex-wrap: wrap;
}

.header-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* ZenIconBadgeStyle: matching ZenPOS Desktop app icon badge (Screenshot 2 parity) */
.header-icon-badge,
.header-title-group .header-icon-badge,
span.header-icon-badge,
span.material-symbols-outlined.header-icon-badge,
.page-header h2 .material-symbols-outlined {
    font-size: 22px !important;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 12px !important;
    background: var(--accent-subtle, rgba(183, 0, 57, 0.08)) !important;
    border: 1px solid var(--accent-border, rgba(183, 0, 57, 0.20)) !important;
    color: var(--accent) !important;
    flex-shrink: 0 !important;
    box-shadow: 0 1px 3px rgba(183, 0, 57, 0.08);
    transition: all var(--transition-fast);
    overflow: hidden;
    user-select: none;
}

[data-mode="dark"] .header-icon-badge,
[data-mode="dark"] .header-title-group .header-icon-badge,
[data-mode="dark"] span.header-icon-badge,
[data-mode="dark"] span.material-symbols-outlined.header-icon-badge,
[data-mode="dark"] .page-header h2 .material-symbols-outlined {
    background: var(--accent-subtle, rgba(183, 0, 57, 0.16)) !important;
    border-color: var(--accent-border, rgba(224, 43, 102, 0.35)) !important;
    color: var(--accent-light) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header-text h2 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    line-height: 1.2;
    margin: 0;
}

.header-text p {
    color: var(--text-secondary);
    font-size: 13.5px;
    margin: 4px 0 0 0;
    line-height: 1.4;
    font-weight: 400;
}

/* Fallback for legacy markup */
.page-header h2 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.025em;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--text-primary);
    line-height: 1.2;
    margin: 0;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 13.5px;
    margin-top: 6px;
    line-height: 1.4;
    font-weight: 400;
}

/* ─── Cards ─── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-zen-card);
    padding: 0;
    box-shadow: var(--shadow-zen-card);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    overflow: hidden;
    position: relative;
}

.card:hover {
    border-color: var(--border-hover);
}

.card > :not(.card-header):not(.table-responsive):not(.table-container) {
    padding: 20px 24px;
}

.card > .table-responsive,
.card > .table-container {
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
    margin-bottom: 0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    position: relative;
    gap: 12px;
    flex-wrap: wrap;
}

.card-header h3 {
    font-size: 13.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--label-text, #FFFFFF);
    margin: 0;
    letter-spacing: -0.01em;
}

.card-header h3 .material-symbols-outlined {
    font-size: 18px;
    color: var(--label-icon, #FFFFFF);
    opacity: 1;
}

[data-mode="dark"] .card-header h3,
[data-mode="dark"] .card-header h3 .material-symbols-outlined {
    color: #FFFFFF;
}

[data-mode="light"] .card-header h3,
[data-mode="light"] .card-header h3 .material-symbols-outlined {
    color: #111827;
}

.card-header .form-control {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 12.5px;
    transition: all var(--transition-fast);
}

.card-header .form-control::placeholder {
    color: var(--text-muted);
}

.card-header .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
    background: var(--bg-card);
}

.card-header .btn-outline {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.card-header .btn-outline:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    color: var(--accent-light);
}

.card-header a {
    color: var(--text-secondary);
    text-decoration: none;
}

/* ─── Stat Cards ─── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-zen-kpi);
    padding: 20px 22px;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-zen-kpi);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-zen-kpi-hover);
}

.stat-card .label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    color: var(--label-text, #FFFFFF);
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-card .label .material-symbols-outlined {
    font-size: 16px;
    opacity: 1;
    color: var(--label-icon, #FFFFFF);
}

[data-mode="dark"] .stat-card .label,
[data-mode="dark"] .stat-card .label .material-symbols-outlined {
    color: #FFFFFF;
}

[data-mode="light"] .stat-card .label,
[data-mode="light"] .stat-card .label .material-symbols-outlined {
    color: #111827;
}

.stat-card .value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-variant-numeric: tabular-nums;
}

.stat-card .change {
    font-size: 12px;
    margin-top: 6px;
    font-weight: 500;
    color: var(--text-secondary);
}

.stat-card .change.up {
    color: var(--success);
}

.stat-card .change.down {
    color: var(--danger);
}

/* ─── Modern High-Contrast Tables ─── */
.table-responsive,
.table-container {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-zen-table);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-zen-table);
    background: var(--bg-card);
    margin-bottom: 24px;
}

table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    min-width: 720px;
    text-align: left;
}

thead {
    background: var(--th-bg);
    border-bottom: 1px solid var(--border);
}

thead th,
table th {
    text-align: left;
    padding: 12px 18px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--label-text, #FFFFFF);
    font-weight: 700;
    background: var(--th-bg);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

thead th .material-symbols-outlined,
table th .material-symbols-outlined {
    color: var(--label-icon, #FFFFFF);
    vertical-align: middle;
}

[data-mode="dark"] thead th,
[data-mode="dark"] table th,
[data-mode="dark"] thead th .material-symbols-outlined,
[data-mode="dark"] table th .material-symbols-outlined {
    color: #FFFFFF;
}

[data-mode="light"] thead th,
[data-mode="light"] table th,
[data-mode="light"] thead th .material-symbols-outlined,
[data-mode="light"] table th .material-symbols-outlined {
    color: #111827;
}

/* Rounded corners for the header row in standalone tables */
.table-responsive:not(.card > *) thead tr:first-child th:first-child,
.table-container:not(.card > *) thead tr:first-child th:first-child {
    border-top-left-radius: var(--radius-zen-table);
}

.table-responsive:not(.card > *) thead tr:first-child th:last-child,
.table-container:not(.card > *) thead tr:first-child th:last-child {
    border-top-right-radius: var(--radius-zen-table);
}

tbody tr {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    transition: background-color var(--transition-fast);
}

tbody tr:nth-child(even) {
    background: var(--bg-row-alt);
}

tbody tr:hover {
    background: var(--bg-card-hover) !important;
}

tbody tr:last-child {
    border-bottom: none;
}

tbody td {
    padding: 13px 18px;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 340px;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody td strong,
tbody td strong a {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
}

tbody td small.text-muted {
    color: var(--text-muted);
    font-size: 11.5px;
    margin-top: 2px;
    display: inline-block;
}

.monospace {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

/* ─── Expandable Row ─── */
.expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
}

.expand-btn:hover {
    background: var(--accent-glow);
    color: var(--accent-light);
}

.expand-btn .material-symbols-outlined {
    font-size: 20px;
    transition: transform 0.2s ease;
}

.expand-btn.expanded .material-symbols-outlined {
    transform: rotate(180deg);
}

.expanded-row {
    display: none;
}

.expanded-row.visible {
    display: table-row;
}

.expanded-row td {
    padding: 0 16px 16px 48px;
    border-bottom: 1px solid var(--border);
}

.user-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
}

.user-card {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    min-width: 220px;
    transition: all 0.2s ease;
}

.user-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.user-card .user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-card .user-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ─── Badges (ZenPOS Desktop Style) ─── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    line-height: 1.4;
    border: 1px solid transparent;
}

.badge .material-symbols-outlined {
    font-size: 13px;
}

.badge-success {
    background: rgba(34, 197, 94, 0.12);
    color: #15803D;
    border-color: rgba(34, 197, 94, 0.25);
}

[data-mode="dark"] .badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ADE80;
    border-color: rgba(34, 197, 94, 0.30);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #92400E;
    border-color: rgba(245, 158, 11, 0.25);
}

[data-mode="dark"] .badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
    border-color: rgba(245, 158, 11, 0.30);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #B91C1C;
    border-color: rgba(239, 68, 68, 0.25);
}

[data-mode="dark"] .badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #F87171;
    border-color: rgba(239, 68, 68, 0.30);
}

.badge-info {
    background: rgba(59, 130, 246, 0.12);
    color: #1D4ED8;
    border-color: rgba(59, 130, 246, 0.25);
}

[data-mode="dark"] .badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
    border-color: rgba(59, 130, 246, 0.30);
}

.badge-accent {
    background: var(--accent-subtle);
    color: var(--accent);
    border-color: var(--accent-border);
}

[data-mode="dark"] .badge-accent {
    color: var(--accent-light);
    border-color: var(--accent-border);
}

.badge-muted,
.badge-neutral {
    background: #F3F4F6;
    color: #4B5563;
    border-color: #E5E7EB;
}

[data-mode="dark"] .badge-muted,
[data-mode="dark"] .badge-neutral {
    background: #171822;
    color: #9CA3AF;
    border-color: #252836;
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}

.btn .material-symbols-outlined {
    font-size: 18px;
}

.btn-primary {
    background: linear-gradient(135deg, #B70039 0%, #7F0027 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(183, 0, 57, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #C9003F 0%, #8E002C 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(183, 0, 57, 0.35);
}

.btn-primary:active {
    transform: scale(0.98) translateY(0);
    box-shadow: 0 2px 6px rgba(183, 0, 57, 0.20);
}

.btn-success {
    background: #16a34a;
    color: #ffffff;
    border: 1px solid #16a34a;
    box-shadow: 0 1px 2px rgba(22, 163, 74, 0.2);
}

.btn-success:hover {
    background: #15803d;
    border-color: #15803d;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(22, 163, 74, 0.3);
}

.btn-danger {
    background: #dc2626;
    color: #ffffff;
    border: 1px solid #dc2626;
    box-shadow: 0 1px 2px rgba(220, 38, 38, 0.2);
}

.btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(220, 38, 38, 0.3);
}

.btn-outline {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 8px;
    font-weight: 600;
}

/* ─── Forms (Pickers & Inputs - ZenPOS Desktop Parity) ─── */
.form-group {
    margin-bottom: 20px;
}

.form-group label,
.form-label,
label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--label-text, #FFFFFF);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.form-group label .material-symbols-outlined,
.form-label .material-symbols-outlined,
label .material-symbols-outlined {
    color: var(--label-icon, #FFFFFF);
    vertical-align: middle;
}

[data-mode="dark"] .form-group label,
[data-mode="dark"] .form-label,
[data-mode="dark"] label,
[data-mode="dark"] .form-group label .material-symbols-outlined,
[data-mode="dark"] .form-label .material-symbols-outlined,
[data-mode="dark"] label .material-symbols-outlined {
    color: #FFFFFF;
}

[data-mode="light"] .form-group label,
[data-mode="light"] .form-label,
[data-mode="light"] label,
[data-mode="light"] .form-group label .material-symbols-outlined,
[data-mode="light"] .form-label .material-symbols-outlined,
[data-mode="light"] label .material-symbols-outlined {
    color: #111827;
}

.form-control {
    width: 100%;
    padding: 9px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
    background: var(--bg-card);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    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.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 36px;
}

[data-mode="dark"] select.form-control {
    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='%239CA3AF' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ─── Alerts/Messages (ZenPOS Desktop Style) ─── */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 13.5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.alert-success {
    background: #F0FDF4;
    color: #15803D;
    border: 1px solid #BBF7D0;
    box-shadow: 0 1px 3px rgba(34, 197, 94, 0.1);
}

[data-mode="dark"] .alert-success {
    background: #142318;
    color: #86EFAC;
    border-color: rgba(34, 197, 94, 0.3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.alert-danger {
    background: #FEF2F2;
    color: #B91C1C;
    border: 1px solid #FECACA;
    box-shadow: 0 1px 3px rgba(239, 68, 68, 0.1);
}

[data-mode="dark"] .alert-danger {
    background: #2D1416;
    color: #FCA5A5;
    border-color: rgba(248, 113, 113, 0.3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.alert-warning {
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.1);
}

[data-mode="dark"] .alert-warning {
    background: #2D2012;
    color: #FDE68A;
    border-color: rgba(251, 191, 36, 0.3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.alert-info {
    background: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.1);
}

[data-mode="dark"] .alert-info {
    background: #141F36;
    color: #93C5FD;
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ─── Login Page ─── */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg at 50% 50%, var(--accent-subtle) 0deg, transparent 60deg, var(--accent-subtle) 180deg, transparent 240deg);
    animation: loginBgRotate 20s linear infinite;
    opacity: 0.3;
}

@keyframes loginBgRotate {
    to { transform: rotate(360deg); }
}

.login-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, var(--bg-primary) 70%);
}

.login-box {
    width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 44px;
    box-shadow: var(--elevation-4);
    transition: all var(--transition-normal);
    position: relative;
    z-index: 1;
}

.login-box::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--gradient);
    border-radius: 2px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 32px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.login-box .subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 36px;
    letter-spacing: 0.5px;
}

.login-box .btn-primary {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 15px;
    margin-top: 8px;
}

/* ─── Modal ─── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.25), 0 0 0 1px var(--border);
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
    animation: modalIn 0.25s var(--ease-out-expo);
    overflow: hidden;
    position: relative;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.modal-header h3,
.modal h3 {
    margin: 0;
    padding: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--label-text, #FFFFFF);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 .material-symbols-outlined,
.modal h3 .material-symbols-outlined {
    color: var(--label-icon, #FFFFFF);
}

[data-mode="dark"] .modal-header h3,
[data-mode="dark"] .modal h3,
[data-mode="dark"] .modal-header h3 .material-symbols-outlined,
[data-mode="dark"] .modal h3 .material-symbols-outlined {
    color: #FFFFFF;
}

[data-mode="light"] .modal-header h3,
[data-mode="light"] .modal h3,
[data-mode="light"] .modal-header h3 .material-symbols-outlined,
[data-mode="light"] .modal h3 .material-symbols-outlined {
    color: #111827;
}

.modal-header .close-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    background: transparent;
    border: none;
}

.modal-header .close-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.modal form,
.modal > div:not(:first-child) {
    padding: 20px 24px 24px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* ─── Pagination ─── */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 24px;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.pagination a {
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.pagination a:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    color: var(--accent-light);
    transform: translateY(-1px);
}

.pagination .current {
    background: var(--gradient);
    color: #fff;
    box-shadow: var(--shadow-zen-table);
}

/* ─── Toast Animation ─── */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast-enter {
    animation: slideIn 0.3s ease;
}

.toast-exit {
    animation: slideOut 0.3s ease forwards;
}

/* ─── Utility ─── */
.text-success {
    color: var(--success) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-accent {
    color: var(--accent-light) !important;
}

.text-right {
    text-align: right !important;
}

.text-center {
    text-align: center !important;
}

.mt-4 {
    margin-top: 16px;
}

.mb-4 {
    margin-bottom: 16px;
}

.gap-2 {
    gap: 8px;
}

.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 56px 24px;
    color: var(--text-muted);
}

.empty-state .material-symbols-outlined {
    font-size: 52px;
    margin-bottom: 16px;
    opacity: 0.35;
    color: var(--accent-light);
}

.empty-state p {
    font-size: 14px;
    max-width: 300px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ─── Theme Picker ─── */
.theme-picker-wrapper {
    position: relative;
    padding: 0 12px;
    margin-bottom: 8px;
}

.theme-picker-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.theme-picker-toggle:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
    color: var(--text-primary);
}

.theme-picker-toggle .swatch-preview {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    box-shadow: 0 0 0 2px var(--bg-input), 0 0 0 3px var(--accent);
}

.theme-picker-toggle .material-symbols-outlined {
    font-size: 14px;
    margin-left: auto;
    transition: transform 0.2s ease;
}

.theme-picker-toggle.open .material-symbols-outlined {
    transform: rotate(180deg);
}

.theme-picker-dropdown {
    display: none;
    position: absolute;
    left: 12px;
    right: 12px;
    top: 100%;
    margin-top: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    z-index: 150;
    box-shadow: var(--shadow-lg);
    animation: pickerIn 0.2s ease;
}

.theme-picker-dropdown.open {
    display: block;
}

@keyframes pickerIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.theme-picker-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.theme-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 2px;
    border-radius: 8px;
    border: 2px solid transparent;
    background: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.theme-swatch:hover {
    background: var(--bg-card-hover);
    transform: scale(1.05);
}

.theme-swatch.active {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.theme-swatch .swatch-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease;
}

.theme-swatch:hover .swatch-dot {
    transform: scale(1.15);
}

.theme-swatch .swatch-name {
    font-size: 9px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.1;
    max-width: 44px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theme-swatch.active .swatch-name {
    color: var(--accent-light);
    font-weight: 600;
}

/* ─── Sidebar Section Labels ─── */
.nav-section-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--label-text, #FFFFFF);
    font-weight: 700;
    padding: 16px 16px 6px;
    margin-top: 4px;
    opacity: 0.95;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-section-label .material-symbols-outlined {
    font-size: 14px;
    color: var(--label-icon, #FFFFFF);
}

[data-mode="dark"] .nav-section-label,
[data-mode="dark"] .nav-section-label .material-symbols-outlined {
    color: #FFFFFF;
}

[data-mode="light"] .nav-section-label,
[data-mode="light"] .nav-section-label .material-symbols-outlined {
    color: #111827;
}

.nav-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
    opacity: 0.5;
}

.nav-section-label:first-child {
    margin-top: 0;
    padding-top: 4px;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        overflow: hidden;
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
        max-width: 100vw;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .settings-tabs {
        flex-direction: column;
    }

    .settings-row {
        grid-template-columns: 1fr;
    }

    .theme-grid-settings {
        grid-template-columns: repeat(3, 1fr);
    }

    .sysinfo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ─── Stagger Entrance Animations ─── */
.stats-grid .stat-card {
    animation: cardEntrance 0.5s var(--ease-out-expo) both;
}
.stats-grid .stat-card:nth-child(1) { animation-delay: 0.05s; }
.stats-grid .stat-card:nth-child(2) { animation-delay: 0.1s; }
.stats-grid .stat-card:nth-child(3) { animation-delay: 0.15s; }
.stats-grid .stat-card:nth-child(4) { animation-delay: 0.2s; }
.stats-grid .stat-card:nth-child(5) { animation-delay: 0.25s; }
.stats-grid .stat-card:nth-child(6) { animation-delay: 0.3s; }

.grid-2 > .card {
    animation: cardEntrance 0.6s var(--ease-out-expo) both;
}
.grid-2 > .card:nth-child(1) { animation-delay: 0.15s; }
.grid-2 > .card:nth-child(2) { animation-delay: 0.25s; }

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ─── Selection Color ─── */
::selection {
    background: var(--accent-glow);
    color: var(--text-primary);
}

/* ─── Focus Visible ─── */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ─── Code Pill & Copy Button ─── */
.code-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--accent-light);
    user-select: all;
    transition: all var(--transition-fast);
}

.code-pill:hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    border-radius: 4px;
    padding: 2px 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.copy-btn:hover {
    color: var(--accent);
    background: var(--accent-subtle);
    border-color: var(--accent-border);
}

.copy-btn .material-symbols-outlined {
    font-size: 15px;
}

/* ─── Live Status Dot Indicator ─── */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    flex-shrink: 0;
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
    animation: statusPulse 2s infinite ease-in-out;
}

.status-dot.idle, .status-dot.away {
    background: var(--warning);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.status-dot.offline {
    background: var(--danger);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.status-dot.locked {
    background: #9333ea;
    box-shadow: 0 0 0 2px rgba(147, 51, 234, 0.2);
}

@keyframes statusPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.75; }
}

/* ─── Quick Actions Bar & Chips ─── */
.quick-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.action-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--label-text, #FFFFFF);
    font-size: 12.5px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.action-chip:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.action-chip.active {
    box-shadow: 0 2px 8px var(--accent-glow);
}

.action-chip .material-symbols-outlined {
    font-size: 16px;
    color: var(--label-icon, #FFFFFF);
}

[data-mode="dark"] .action-chip:not(.active),
[data-mode="dark"] .action-chip:not(.active) .material-symbols-outlined {
    color: #FFFFFF;
}

[data-mode="light"] .action-chip {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
}

[data-mode="light"] .action-chip:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-mode="light"] .action-chip.active {
    background: #FFFFFF;
    border-color: var(--accent);
    color: var(--accent) !important;
    box-shadow: 0 2px 8px rgba(183, 0, 57, 0.18);
}

[data-mode="light"] .action-chip:not(.active),
[data-mode="light"] .action-chip:not(.active) .material-symbols-outlined {
    color: #111827;
}

/* ─── Skeleton Loading State ─── */
.skeleton {
    background: linear-gradient(90deg, var(--bg-input) 25%, var(--bg-card-hover) 50%, var(--bg-input) 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeletonLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── Subtle Glass Panel ─── */
.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-zen-card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--shadow-zen-card);
}

/* ═══════════════════════════════════════════
   Settings Page Component Styles
   ═══════════════════════════════════════════ */
.settings-tab-content {
    display: none;
}
.settings-tab-content.active {
    display: block;
    animation: fadeIn 0.25s ease;
}

.settings-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-zen-card);
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: var(--elevation-1);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.settings-section:hover {
    border-color: var(--border-hover);
    box-shadow: var(--elevation-2);
}

[data-mode="dark"] .settings-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.40);
}

[data-mode="dark"] .settings-section:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

[data-mode="light"] .settings-section {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
}

[data-mode="light"] .settings-section:hover {
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.settings-section-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--label-text, #FFFFFF);
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.settings-section-title .material-symbols-outlined {
    font-size: 20px;
    color: var(--label-icon, #FFFFFF);
}

[data-mode="dark"] .settings-section-title,
[data-mode="dark"] .settings-section-title .material-symbols-outlined {
    color: #FFFFFF;
}

[data-mode="light"] .settings-section-title,
[data-mode="light"] .settings-section-title .material-symbols-outlined {
    color: #111827;
}

.settings-row {
    display: grid;
    grid-template-columns: 240px minmax(260px, 540px);
    gap: 20px;
    align-items: start;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-row .form-control {
    box-shadow: var(--shadow-sm);
}

[data-mode="light"] .settings-row .form-control {
    background: #FFFFFF;
    border: 1px solid #D1D5DB;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

[data-mode="light"] .settings-row .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.settings-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--label-text, #FFFFFF);
    padding-top: 8px;
}

[data-mode="dark"] .settings-label {
    color: #FFFFFF;
}

[data-mode="light"] .settings-label {
    color: #111827;
}

.settings-label small {
    display: block;
    font-weight: 400;
    color: var(--text-muted);
    font-size: 11.5px;
    margin-top: 4px;
    line-height: 1.4;
}

.settings-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.theme-grid-settings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.theme-grid-settings .theme-swatch {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-input);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
    width: 100%;
}

.theme-grid-settings .theme-swatch:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.theme-grid-settings .theme-swatch.active {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    box-shadow: 0 2px 10px var(--accent-glow), 0 0 0 1px var(--accent);
}

.theme-grid-settings .theme-swatch .swatch-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.theme-grid-settings .theme-swatch .swatch-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    max-width: none;
    overflow: visible;
    text-align: left;
    white-space: nowrap;
}

[data-mode="light"] .theme-grid-settings .theme-swatch {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
}

[data-mode="light"] .theme-grid-settings .theme-swatch:hover {
    border-color: var(--accent);
    background: #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-mode="light"] .theme-grid-settings .theme-swatch.active {
    border-color: var(--accent);
    background: #FAF2F5;
    box-shadow: 0 2px 8px rgba(183, 0, 57, 0.18), 0 0 0 1px var(--accent);
}

[data-mode="light"] .theme-grid-settings .theme-swatch .swatch-name {
    color: #111827;
}

[data-mode="light"] .theme-grid-settings .theme-swatch.active .swatch-name {
    color: var(--accent);
    font-weight: 600;
}

.mode-toggle-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mode-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.mode-toggle-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.mode-toggle-btn.active {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    color: var(--accent-light);
    font-weight: 600;
    box-shadow: 0 2px 8px var(--accent-glow), 0 0 0 2px var(--accent-glow);
}

.mode-toggle-btn .material-symbols-outlined {
    font-size: 18px;
}

[data-mode="light"] .mode-toggle-btn {
    background: #FFFFFF;
    border: 1.5px solid #E5E7EB;
    color: #4B5563;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
}

[data-mode="light"] .mode-toggle-btn:hover {
    border-color: var(--accent);
    color: #111827;
    background: #FAF2F5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-mode="light"] .mode-toggle-btn.active {
    background: #FFFFFF;
    border-color: var(--accent);
    color: var(--accent) !important;
    box-shadow: 0 2px 8px rgba(183, 0, 57, 0.18), 0 0 0 2px rgba(183, 0, 57, 0.20);
}

.sysinfo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.sysinfo-item {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.sysinfo-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--elevation-2);
}

[data-mode="light"] .sysinfo-item {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
}

[data-mode="light"] .sysinfo-item:hover {
    border-color: var(--accent);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.sysinfo-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.sysinfo-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--label-text, #FFFFFF);
    font-weight: 700;
}

[data-mode="dark"] .sysinfo-label {
    color: #FFFFFF;
}

[data-mode="light"] .sysinfo-label {
    color: #111827;
}

.settings-section .btn-outline {
    box-shadow: var(--shadow-sm);
}

.settings-section .btn-outline:hover {
    box-shadow: var(--shadow-md);
}

[data-mode="light"] .settings-section .btn-outline {
    background: #FFFFFF;
    border-color: #D1D5DB;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

[data-mode="light"] .settings-section .btn-outline:hover {
    background: #F9FAFB;
    border-color: #9CA3AF;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.smtp-test-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.smtp-test-group input {
    flex: 1;
    max-width: 320px;
    box-shadow: var(--shadow-sm);
}

[data-mode="light"] .smtp-test-group input {
    background: #FFFFFF;
    border: 1px solid #D1D5DB;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .settings-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* ═══════════════════════════════════════════
   UNIVERSAL LABELS & COMPANION ICONS
   - Dark Mode: White (#FFFFFF)
   - Light Mode: Black (#111827)
   - Only Page Heading Icon & Badge matches theme accent (Desktop parity)
   ═══════════════════════════════════════════ */
:root,
[data-mode="dark"] {
    --label-color: #FFFFFF;
    --label-icon-color: #FFFFFF;
}

[data-mode="light"] {
    --label-color: #111827;
    --label-icon-color: #111827;
}

label,
.label,
.form-label,
.field-label,
.control-label,
.stat-card .label,
.nav-section-label,
.settings-section-title,
.settings-label,
.sysinfo-label,
.dash-bento-label,
.dash-kpi-label,
.dash-card-title,
.dash-section-eyebrow,
.dash-tile-title,
.plan-card-label,
.plan-spec-label,
.plan-quota-label,
.plan-category-title,
.category-header,
.feature-name,
.plan-tier-name,
.plan-matrix-toolbar-label,
.backup-tile-label,
.update-tile-label,
.changelog-card-title,
.upload-dropzone-title,
.md-tab,
.ticket-field-label,
.ticket-section-title,
.telemetry-tile-label,
.telemetry-card-title,
.telemetry-detail-label,
.telemetry-tab,
.audit-tile-label,
.audit-card-title,
.audit-detail-label,
.audit-tab,
.migration-tile-label,
.modal-header h3,
.modal h3,
.card-header h3,
thead th,
table th {
    color: var(--label-color) !important;
}

label .material-symbols-outlined,
.label .material-symbols-outlined,
.form-label .material-symbols-outlined,
.field-label .material-symbols-outlined,
.control-label .material-symbols-outlined,
.stat-card .label .material-symbols-outlined,
.nav-section-label .material-symbols-outlined,
.settings-section-title .material-symbols-outlined,
.dash-bento-label .material-symbols-outlined,
.dash-kpi-label .material-symbols-outlined,
.dash-card-title .material-symbols-outlined,
.dash-section-eyebrow .material-symbols-outlined,
.dash-tile-title .material-symbols-outlined,
.plan-card-label .material-symbols-outlined,
.plan-spec-label .material-symbols-outlined,
.plan-quota-label .material-symbols-outlined,
.plan-category-title .material-symbols-outlined,
.category-header .material-symbols-outlined,
.plan-tier-name .material-symbols-outlined,
.plan-matrix-toolbar-label .material-symbols-outlined,
.backup-tile-label .material-symbols-outlined,
.update-tile-label .material-symbols-outlined,
.changelog-card-title .material-symbols-outlined,
.upload-dropzone-title .material-symbols-outlined,
.md-tab .material-symbols-outlined,
.ticket-field-label .material-symbols-outlined,
.ticket-section-title .material-symbols-outlined,
.telemetry-tile-label .material-symbols-outlined,
.telemetry-card-title .material-symbols-outlined,
.telemetry-detail-label .material-symbols-outlined,
.telemetry-tab .material-symbols-outlined,
.audit-tile-label .material-symbols-outlined,
.audit-card-title .material-symbols-outlined,
.audit-detail-label .material-symbols-outlined,
.audit-tab .material-symbols-outlined,
.migration-tile-label .material-symbols-outlined,
.modal-header h3 .material-symbols-outlined,
.modal h3 .material-symbols-outlined,
.card-header h3 .material-symbols-outlined,
thead th .material-symbols-outlined,
table th .material-symbols-outlined {
    color: var(--label-icon-color) !important;
    opacity: 1 !important;
}

[data-mode="dark"] label,
[data-mode="dark"] .label,
[data-mode="dark"] .form-label,
[data-mode="dark"] .field-label,
[data-mode="dark"] .control-label,
[data-mode="dark"] .stat-card .label,
[data-mode="dark"] .nav-section-label,
[data-mode="dark"] .settings-section-title,
[data-mode="dark"] .settings-label,
[data-mode="dark"] .sysinfo-label,
[data-mode="dark"] .dash-bento-label,
[data-mode="dark"] .dash-kpi-label,
[data-mode="dark"] .dash-card-title,
[data-mode="dark"] .dash-section-eyebrow,
[data-mode="dark"] .dash-tile-title,
[data-mode="dark"] .plan-card-label,
[data-mode="dark"] .plan-spec-label,
[data-mode="dark"] .plan-quota-label,
[data-mode="dark"] .plan-category-title,
[data-mode="dark"] .category-header,
[data-mode="dark"] .feature-name,
[data-mode="dark"] .plan-tier-name,
[data-mode="dark"] .plan-matrix-toolbar-label,
[data-mode="dark"] .backup-tile-label,
[data-mode="dark"] .update-tile-label,
[data-mode="dark"] .changelog-card-title,
[data-mode="dark"] .upload-dropzone-title,
[data-mode="dark"] .md-tab,
[data-mode="dark"] .ticket-field-label,
[data-mode="dark"] .ticket-section-title,
[data-mode="dark"] .telemetry-tile-label,
[data-mode="dark"] .telemetry-card-title,
[data-mode="dark"] .telemetry-detail-label,
[data-mode="dark"] .telemetry-tab,
[data-mode="dark"] .audit-tile-label,
[data-mode="dark"] .audit-card-title,
[data-mode="dark"] .audit-detail-label,
[data-mode="dark"] .audit-tab,
[data-mode="dark"] .migration-tile-label,
[data-mode="dark"] .modal-header h3,
[data-mode="dark"] .modal h3,
[data-mode="dark"] .card-header h3,
[data-mode="dark"] thead th,
[data-mode="dark"] table th {
    color: #FFFFFF !important;
}

[data-mode="dark"] label .material-symbols-outlined,
[data-mode="dark"] .label .material-symbols-outlined,
[data-mode="dark"] .form-label .material-symbols-outlined,
[data-mode="dark"] .field-label .material-symbols-outlined,
[data-mode="dark"] .control-label .material-symbols-outlined,
[data-mode="dark"] .stat-card .label .material-symbols-outlined,
[data-mode="dark"] .nav-section-label .material-symbols-outlined,
[data-mode="dark"] .settings-section-title .material-symbols-outlined,
[data-mode="dark"] .dash-bento-label .material-symbols-outlined,
[data-mode="dark"] .dash-kpi-label .material-symbols-outlined,
[data-mode="dark"] .dash-card-title .material-symbols-outlined,
[data-mode="dark"] .dash-section-eyebrow .material-symbols-outlined,
[data-mode="dark"] .dash-tile-title .material-symbols-outlined,
[data-mode="dark"] .plan-card-label .material-symbols-outlined,
[data-mode="dark"] .plan-spec-label .material-symbols-outlined,
[data-mode="dark"] .plan-quota-label .material-symbols-outlined,
[data-mode="dark"] .plan-category-title .material-symbols-outlined,
[data-mode="dark"] .category-header .material-symbols-outlined,
[data-mode="dark"] .plan-tier-name .material-symbols-outlined,
[data-mode="dark"] .plan-matrix-toolbar-label .material-symbols-outlined,
[data-mode="dark"] .backup-tile-label .material-symbols-outlined,
[data-mode="dark"] .update-tile-label .material-symbols-outlined,
[data-mode="dark"] .changelog-card-title .material-symbols-outlined,
[data-mode="dark"] .upload-dropzone-title .material-symbols-outlined,
[data-mode="dark"] .md-tab .material-symbols-outlined,
[data-mode="dark"] .ticket-field-label .material-symbols-outlined,
[data-mode="dark"] .ticket-section-title .material-symbols-outlined,
[data-mode="dark"] .telemetry-tile-label .material-symbols-outlined,
[data-mode="dark"] .telemetry-card-title .material-symbols-outlined,
[data-mode="dark"] .telemetry-detail-label .material-symbols-outlined,
[data-mode="dark"] .telemetry-tab .material-symbols-outlined,
[data-mode="dark"] .audit-tile-label .material-symbols-outlined,
[data-mode="dark"] .audit-card-title .material-symbols-outlined,
[data-mode="dark"] .audit-detail-label .material-symbols-outlined,
[data-mode="dark"] .audit-tab .material-symbols-outlined,
[data-mode="dark"] .migration-tile-label .material-symbols-outlined,
[data-mode="dark"] .modal-header h3 .material-symbols-outlined,
[data-mode="dark"] .modal h3 .material-symbols-outlined,
[data-mode="dark"] .card-header h3 .material-symbols-outlined,
[data-mode="dark"] thead th .material-symbols-outlined,
[data-mode="dark"] table th .material-symbols-outlined {
    color: #FFFFFF !important;
    opacity: 1 !important;
}

[data-mode="light"] label,
[data-mode="light"] .label,
[data-mode="light"] .form-label,
[data-mode="light"] .field-label,
[data-mode="light"] .control-label,
[data-mode="light"] .stat-card .label,
[data-mode="light"] .nav-section-label,
[data-mode="light"] .settings-section-title,
[data-mode="light"] .settings-label,
[data-mode="light"] .sysinfo-label,
[data-mode="light"] .dash-bento-label,
[data-mode="light"] .dash-kpi-label,
[data-mode="light"] .dash-card-title,
[data-mode="light"] .dash-section-eyebrow,
[data-mode="light"] .dash-tile-title,
[data-mode="light"] .plan-card-label,
[data-mode="light"] .plan-spec-label,
[data-mode="light"] .plan-quota-label,
[data-mode="light"] .plan-category-title,
[data-mode="light"] .category-header,
[data-mode="light"] .feature-name,
[data-mode="light"] .plan-tier-name,
[data-mode="light"] .plan-matrix-toolbar-label,
[data-mode="light"] .backup-tile-label,
[data-mode="light"] .update-tile-label,
[data-mode="light"] .changelog-card-title,
[data-mode="light"] .upload-dropzone-title,
[data-mode="light"] .md-tab,
[data-mode="light"] .ticket-field-label,
[data-mode="light"] .ticket-section-title,
[data-mode="light"] .telemetry-tile-label,
[data-mode="light"] .telemetry-card-title,
[data-mode="light"] .telemetry-detail-label,
[data-mode="light"] .telemetry-tab,
[data-mode="light"] .audit-tile-label,
[data-mode="light"] .audit-card-title,
[data-mode="light"] .audit-detail-label,
[data-mode="light"] .audit-tab,
[data-mode="light"] .migration-tile-label,
[data-mode="light"] .modal-header h3,
[data-mode="light"] .modal h3,
[data-mode="light"] .card-header h3,
[data-mode="light"] thead th,
[data-mode="light"] table th {
    color: #111827 !important;
}

[data-mode="light"] label .material-symbols-outlined,
[data-mode="light"] .label .material-symbols-outlined,
[data-mode="light"] .form-label .material-symbols-outlined,
[data-mode="light"] .field-label .material-symbols-outlined,
[data-mode="light"] .control-label .material-symbols-outlined,
[data-mode="light"] .stat-card .label .material-symbols-outlined,
[data-mode="light"] .nav-section-label .material-symbols-outlined,
[data-mode="light"] .settings-section-title .material-symbols-outlined,
[data-mode="light"] .dash-bento-label .material-symbols-outlined,
[data-mode="light"] .dash-kpi-label .material-symbols-outlined,
[data-mode="light"] .dash-card-title .material-symbols-outlined,
[data-mode="light"] .dash-section-eyebrow .material-symbols-outlined,
[data-mode="light"] .dash-tile-title .material-symbols-outlined,
[data-mode="light"] .plan-card-label .material-symbols-outlined,
[data-mode="light"] .plan-spec-label .material-symbols-outlined,
[data-mode="light"] .plan-quota-label .material-symbols-outlined,
[data-mode="light"] .plan-category-title .material-symbols-outlined,
[data-mode="light"] .category-header .material-symbols-outlined,
[data-mode="light"] .plan-tier-name .material-symbols-outlined,
[data-mode="light"] .plan-matrix-toolbar-label .material-symbols-outlined,
[data-mode="light"] .backup-tile-label .material-symbols-outlined,
[data-mode="light"] .update-tile-label .material-symbols-outlined,
[data-mode="light"] .changelog-card-title .material-symbols-outlined,
[data-mode="light"] .upload-dropzone-title .material-symbols-outlined,
[data-mode="light"] .md-tab .material-symbols-outlined,
[data-mode="light"] .ticket-field-label .material-symbols-outlined,
[data-mode="light"] .ticket-section-title .material-symbols-outlined,
[data-mode="light"] .telemetry-tile-label .material-symbols-outlined,
[data-mode="light"] .telemetry-card-title .material-symbols-outlined,
[data-mode="light"] .telemetry-detail-label .material-symbols-outlined,
[data-mode="light"] .telemetry-tab .material-symbols-outlined,
[data-mode="light"] .audit-tile-label .material-symbols-outlined,
[data-mode="light"] .audit-card-title .material-symbols-outlined,
[data-mode="light"] .audit-detail-label .material-symbols-outlined,
[data-mode="light"] .audit-tab .material-symbols-outlined,
[data-mode="light"] .migration-tile-label .material-symbols-outlined,
[data-mode="light"] .modal-header h3 .material-symbols-outlined,
[data-mode="light"] .modal h3 .material-symbols-outlined,
[data-mode="light"] .card-header h3 .material-symbols-outlined,
[data-mode="light"] thead th .material-symbols-outlined,
[data-mode="light"] table th .material-symbols-outlined {
    color: #111827 !important;
    opacity: 1 !important;
}
[data-mode="light"] thead th,
[data-mode="light"] table th {
    color: #111827 !important;
}

[data-mode="light"] label .material-symbols-outlined,
[data-mode="light"] .label .material-symbols-outlined,
[data-mode="light"] .form-label .material-symbols-outlined,
[data-mode="light"] .field-label .material-symbols-outlined,
[data-mode="light"] .control-label .material-symbols-outlined,
[data-mode="light"] .stat-card .label .material-symbols-outlined,
[data-mode="light"] .nav-section-label .material-symbols-outlined,
[data-mode="light"] .settings-section-title .material-symbols-outlined,
[data-mode="light"] .dash-bento-label .material-symbols-outlined,
[data-mode="light"] .dash-kpi-label .material-symbols-outlined,
[data-mode="light"] .dash-card-title .material-symbols-outlined,
[data-mode="light"] .dash-section-eyebrow .material-symbols-outlined,
[data-mode="light"] .dash-tile-title .material-symbols-outlined,
[data-mode="light"] .modal-header h3 .material-symbols-outlined,
[data-mode="light"] .modal h3 .material-symbols-outlined,
[data-mode="light"] .card-header h3 .material-symbols-outlined,
[data-mode="light"] thead th .material-symbols-outlined,
[data-mode="light"] table th .material-symbols-outlined {
    color: #111827 !important;
    opacity: 1 !important;
}

/* Page heading icon & badge: EXCLUSIVELY matches theme accent (Desktop Parity) */
.header-icon-badge,
.header-title-group .header-icon-badge,
span.header-icon-badge,
span.material-symbols-outlined.header-icon-badge,
.page-header h2 .material-symbols-outlined {
    color: var(--accent) !important;
}

[data-mode="dark"] .header-icon-badge,
[data-mode="dark"] .header-title-group .header-icon-badge,
[data-mode="dark"] span.header-icon-badge,
[data-mode="dark"] span.material-symbols-outlined.header-icon-badge,
[data-mode="dark"] .page-header h2 .material-symbols-outlined {
    color: var(--accent-light) !important;
}

/* ═══════════════════════════════════════════════════════════
   BENTO COMMAND CENTER DASHBOARD (Linear / Apple Tier)
   ═══════════════════════════════════════════════════════════ */

/* ─── Top Bento Hero Grid ─── */
.dash-bento-hero {
    display: grid;
    grid-template-columns: 1.3fr 1fr 0.85fr;
    gap: 16px;
    margin-bottom: 20px;
}

.dash-bento-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: transform 0.22s var(--ease-out-expo), border-color 0.22s var(--ease-out-expo), box-shadow 0.22s var(--ease-out-expo);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.dash-bento-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

[data-mode="dark"] .dash-bento-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
}

[data-mode="light"] .dash-bento-card:hover {
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.dash-bento-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dash-bento-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dash-bento-label .material-symbols-outlined {
    font-size: 16px;
}

/* ─── Bento 1: Radial Connectivity Meter ─── */
.dash-radar-content {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: 1;
}

.dash-radial-wrap {
    position: relative;
    width: 110px;
    height: 110px;
    flex-shrink: 0;
}

.dash-radial-svg {
    width: 110px;
    height: 110px;
    transform: rotate(-90deg);
}

.dash-radial-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.07);
    stroke-width: 8;
}

[data-mode="light"] .dash-radial-track {
    stroke: rgba(0, 0, 0, 0.06);
}

.dash-radial-meter {
    fill: none;
    stroke: var(--accent);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 264;
    transition: stroke-dashoffset 1s var(--ease-out-expo);
}

[data-mode="dark"] .dash-radial-meter {
    stroke: var(--accent-light);
    filter: drop-shadow(0 0 6px var(--accent-glow));
}

.dash-radial-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

.dash-radial-pct {
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
    font-family: var(--font-sans);
}

.dash-radial-tag {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 2px;
}

.dash-radar-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.dash-radar-metric {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.dash-radar-sub {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.dash-radar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 11.5px;
}

.dash-radar-footer a {
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s;
}

.dash-radar-footer a:hover {
    text-decoration: underline;
}

/* ─── Bento 2: Tier & Subscription Breakdown ─── */
.dash-tier-track {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    overflow: hidden;
    gap: 2px;
    margin: 12px 0 16px;
}

[data-mode="light"] .dash-tier-track {
    background: rgba(0, 0, 0, 0.06);
}

.dash-tier-seg {
    height: 100%;
    transition: width 0.6s var(--ease-out-expo);
}

.dash-tier-ent {
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

.dash-tier-pro {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.dash-tier-trial {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.dash-tier-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-tier-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

[data-mode="light"] .dash-tier-item {
    background: rgba(0, 0, 0, 0.02);
}

.dash-tier-id {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-tier-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dash-tier-val {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.dash-tier-pct {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ─── Bento 3: Quick Action Launchpad ─── */
.dash-action-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.dash-action-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.18s var(--ease-out-expo);
}

[data-mode="light"] .dash-action-item {
    background: rgba(0, 0, 0, 0.02);
}

.dash-action-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(3px);
}

[data-mode="light"] .dash-action-item:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.15);
}

.dash-action-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-action-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 17px;
    flex-shrink: 0;
}

[data-mode="light"] .dash-action-icon {
    background: rgba(0, 0, 0, 0.05);
}

.dash-action-text {
    display: flex;
    flex-direction: column;
}

.dash-action-title {
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.2;
}

.dash-action-sub {
    font-size: 10.5px;
    color: var(--text-muted);
}

/* ─── Metric KPI Strip (4 Columns) ─── */
.dash-kpi-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.dash-kpi-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s var(--ease-out-expo), border-color 0.2s var(--ease-out-expo);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.dash-kpi-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.16);
}

[data-mode="light"] .dash-kpi-card:hover {
    border-color: rgba(0, 0, 0, 0.14);
}

.dash-kpi-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.dash-kpi-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    font-family: var(--font-sans);
    color: var(--text-primary);
    margin-bottom: 8px;
}

.dash-kpi-footer {
    font-size: 11.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ─── Deep Dive Bento Split (Table + Activity) ─── */
.dash-detail-split {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Avatar Badge */
.dash-avatar {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #FFFFFF;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* 7-Day Activity Velocity Histogram */
.dash-sparkline-box {
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin: 14px 18px 0;
}

[data-mode="light"] .dash-sparkline-box {
    background: rgba(0, 0, 0, 0.02);
}

.dash-sparkline-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 11px;
}

.dash-sparkline-bars {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    align-items: end;
    height: 54px;
    padding-bottom: 2px;
}

.dash-sparkline-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    gap: 6px;
}

.dash-sparkline-bar {
    width: 100%;
    max-width: 22px;
    background: linear-gradient(180deg, var(--accent-light), var(--accent));
    border-radius: 4px 4px 1px 1px;
    transition: height 0.4s var(--ease-out-expo), opacity 0.2s;
    cursor: pointer;
    min-height: 4px;
}

.dash-sparkline-bar:hover {
    opacity: 0.85;
    filter: brightness(1.15);
}

.dash-sparkline-day {
    font-size: 9.5px;
    color: var(--text-muted);
    font-weight: 600;
    font-family: var(--font-mono);
    text-transform: uppercase;
}

/* Timeline Feed */
.dash-timeline-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 12px 18px;
    scrollbar-width: none !important;
}

.dash-timeline-list::-webkit-scrollbar {
    display: none !important;
}

.dash-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.dash-timeline-item:last-child {
    border-bottom: none;
}

.dash-timeline-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 2px;
}

.dash-timeline-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dash-timeline-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
}

.dash-timeline-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

/* ─── Bottom Runtime Architecture Bar ─── */
.dash-runtime-strip {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 18px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 10px;
}

.dash-runtime-col {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-runtime-col strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .dash-bento-hero {
        grid-template-columns: 1fr 1fr;
    }
    .dash-bento-hero > .dash-bento-card:nth-child(3) {
        grid-column: span 2;
    }
    .dash-kpi-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .dash-bento-hero {
        grid-template-columns: 1fr;
    }
    .dash-bento-hero > .dash-bento-card:nth-child(3) {
        grid-column: span 1;
    }
    .dash-detail-split {
        grid-template-columns: 1fr;
    }
    .dash-runtime-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .dash-kpi-strip {
        grid-template-columns: 1fr;
    }
    .dash-runtime-strip {
        grid-template-columns: 1fr;
    }
    .dash-radar-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ═══════════════════════════════════════════════════════════
   SUBSCRIPTION PLANS & CAPABILITY MATRIX (Linear Tier)
   ═══════════════════════════════════════════════════════════ */

/* ─── Top 3 Tier Cards Grid ─── */
.plan-spec-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.plan-spec-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: transform 0.22s var(--ease-out-expo), border-color 0.22s, box-shadow 0.22s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.plan-spec-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.24);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-mode="light"] .plan-spec-card:hover {
    border-color: rgba(0, 0, 0, 0.16);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
}

/* Flagship Enterprise Card Accent */
.plan-spec-card.is-enterprise {
    border-color: var(--accent-border);
    background: linear-gradient(180deg, var(--accent-subtle) 0%, var(--card-bg) 45%);
}

[data-mode="dark"] .plan-spec-card.is-enterprise {
    box-shadow: 0 4px 24px rgba(183, 0, 57, 0.14);
}

.plan-spec-card.is-enterprise:hover {
    border-color: var(--accent-light);
    box-shadow: 0 12px 40px var(--accent-glow);
}

.plan-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.plan-icon-frame {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-primary);
    flex-shrink: 0;
}

[data-mode="light"] .plan-icon-frame {
    background: rgba(0, 0, 0, 0.04);
}

.is-enterprise .plan-icon-frame {
    background: var(--accent-subtle);
    border-color: var(--accent-border);
    color: var(--accent-light);
}

.plan-tier-name {
    font-size: 21px;
    font-weight: 800;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.plan-tier-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.45;
    min-height: 36px;
    margin-bottom: 16px;
}

/* 3-Column Quota Matrix */
.plan-quota-matrix {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.plan-quota-col {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.plan-quota-label {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.plan-quota-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Feature Capacity Meter */
.plan-cap-box {
    margin-bottom: 16px;
}

.plan-cap-track {
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    margin-bottom: 8px;
}

[data-mode="light"] .plan-cap-track {
    background: rgba(0, 0, 0, 0.06);
}

.plan-cap-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s var(--ease-out-expo);
}

.plan-cap-fill.trial {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.plan-cap-fill.pro {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.plan-cap-fill.enterprise {
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

.plan-cap-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--text-muted);
}

.plan-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

/* ─── Capability Matrix Toolbar ─── */
.plan-matrix-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.plan-search-wrap {
    position: relative;
    flex: 1;
    min-width: 240px;
    max-width: 380px;
}

.plan-search-wrap .material-symbols-outlined {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.plan-search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text-primary);
    font-size: 12.5px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

[data-mode="light"] .plan-search-input {
    background: rgba(0, 0, 0, 0.02);
}

.plan-search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

.plan-filter-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.plan-tab-btn {
    padding: 5px 11px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

[data-mode="light"] .plan-tab-btn {
    background: rgba(0, 0, 0, 0.02);
}

.plan-tab-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
}

.plan-tab-btn.active {
    background: var(--accent-subtle);
    border-color: var(--accent-border);
    color: var(--accent-light);
    font-weight: 600;
}

.plan-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ─── Capability Matrix Table ─── */
.plan-matrix-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.matrix-grid-head {
    display: grid;
    grid-template-columns: 1fr 140px 140px 140px;
    padding: 16px 22px;
    border-bottom: 2px solid var(--border);
    background: var(--card-bg);
    position: sticky;
    top: 0;
    z-index: 5;
    align-items: center;
}

.matrix-col-head {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.matrix-category-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 22px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

[data-mode="light"] .matrix-category-bar {
    background: rgba(0, 0, 0, 0.02);
}

.matrix-category-bar:hover {
    background: rgba(255, 255, 255, 0.04);
}

.matrix-category-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.matrix-feature-row {
    display: grid;
    grid-template-columns: 1fr 140px 140px 140px;
    padding: 12px 22px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    transition: background 0.15s;
}

.matrix-feature-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

[data-mode="light"] .matrix-feature-row:hover {
    background: rgba(0, 0, 0, 0.02);
}

.matrix-feature-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-right: 16px;
}

.matrix-feature-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.matrix-feature-desc {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.4;
}

.matrix-feature-code {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    display: inline-block;
    padding: 1px 5px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    width: fit-content;
}

/* Linear-grade Toggle Switch */
.plan-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    display: inline-block;
}

.plan-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.plan-toggle .slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.25s var(--ease-out-expo);
}

[data-mode="light"] .plan-toggle .slider {
    background: rgba(0, 0, 0, 0.08);
}

.plan-toggle .slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 2px;
    top: 2px;
    background: #FFFFFF;
    border-radius: 50%;
    transition: all 0.25s var(--ease-out-expo);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.plan-toggle input:checked + .slider {
    background: var(--success);
    border-color: var(--success);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.plan-toggle input:checked + .slider::before {
    transform: translateX(20px);
}

.plan-toggle.saving .slider {
    opacity: 0.4;
    cursor: wait;
}

/* Responsive */
@media (max-width: 1050px) {
    .plan-spec-grid {
        grid-template-columns: 1fr;
    }
    .matrix-grid-head,
    .matrix-feature-row {
        grid-template-columns: 1fr 110px 110px 110px;
        padding: 12px 14px;
    }
}

@media (max-width: 768px) {
    .plan-matrix-card {
        overflow-x: auto;
    }
    .matrix-grid-head,
    .matrix-feature-row {
        min-width: 620px;
    }
}

/* ═══════════════════════════════════════════════════════════
   CLOUD BACKUPS & SNAPSHOT VAULT (Linear Tier)
   ═══════════════════════════════════════════════════════════ */

.backup-tiles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.backup-tile-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: transform 0.22s var(--ease-out-expo), border-color 0.22s, box-shadow 0.22s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.backup-tile-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    border-color: rgba(255, 255, 255, 0.18);
}

[data-mode="light"] .backup-tile-card:hover {
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.backup-tile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.backup-tile-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.backup-tile-label .material-symbols-outlined {
    font-size: 16px;
}

.backup-tile-val {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
    font-family: var(--font-sans);
    margin-bottom: 8px;
}

.backup-cadence-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.backup-storage-meter {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    margin-bottom: 8px;
}

[data-mode="light"] .backup-storage-meter {
    background: rgba(0, 0, 0, 0.06);
}

.backup-storage-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.backup-tile-footer {
    font-size: 11.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

@media (max-width: 1200px) {
    .backup-tiles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .backup-tiles-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   App Updates & Release Intelligence Architecture
   ========================================================================== */

.update-tiles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.update-tile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.update-tile-card:hover {
    border-color: rgba(220, 38, 38, 0.25);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.update-tile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.update-tile-label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}

.update-tile-value {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.02em;
}

.update-tile-footer {
    font-size: 11.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

/* Drag & Drop Upload Dropzone */
.upload-dropzone {
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 24px 20px;
    text-align: center;
    background: var(--bg-input);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--accent);
    background: rgba(220, 38, 38, 0.04);
}

.upload-dropzone-icon {
    font-size: 36px;
    color: var(--text-muted);
    transition: transform 0.2s, color 0.2s;
}

.upload-dropzone:hover .upload-dropzone-icon {
    transform: translateY(-2px);
    color: var(--accent);
}

.upload-dropzone-title {
    font-size: 13.5px;
    font-weight: 600;
}

.upload-dropzone-sub {
    font-size: 11.5px;
    color: var(--text-muted);
}

.upload-file-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12.5px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
    margin-top: 6px;
}

/* Markdown Editor Component */
.md-editor-wrap {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-card);
    transition: border-color 0.2s;
}

.md-editor-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.md-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-input);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 8px;
}

.md-tabs {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.1);
    padding: 3px;
    border-radius: 8px;
}

[data-mode="light"] .md-tabs {
    background: rgba(0, 0, 0, 0.05);
}

.md-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    border: none;
    color: var(--text-muted);
    transition: all 0.15s ease;
}

.md-tab:hover {
    color: var(--text-primary);
}

.md-tab.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.md-tools {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}

.md-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 5px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s;
}

.md-tool-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.md-tool-btn .material-symbols-outlined {
    font-size: 16px;
}

.md-editor-panes {
    display: flex;
    min-height: 200px;
    position: relative;
}

.md-pane-write,
.md-pane-preview {
    flex: 1;
    min-height: 200px;
}

.md-pane-write textarea {
    width: 100%;
    min-height: 200px;
    height: 100%;
    padding: 14px 16px;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.65;
    resize: vertical;
    box-sizing: border-box;
}

.md-pane-preview {
    padding: 14px 18px;
    overflow-y: auto;
    border-left: 1px solid var(--border);
    max-height: 420px;
    background: var(--bg-card);
    box-sizing: border-box;
}

/* Editor View Modes */
.md-view-write .md-pane-write { display: block; width: 100%; }
.md-view-write .md-pane-preview { display: none; }
.md-view-preview .md-pane-write { display: none; }
.md-view-preview .md-pane-preview { display: block; width: 100%; border-left: none; }
.md-view-split .md-pane-write { display: block; flex: 1; border-right: 1px solid var(--border); }
.md-view-split .md-pane-preview { display: block; flex: 1; border-left: none; }

/* Markdown Body Rendered Typography */
.markdown-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--text-secondary);
    word-wrap: break-word;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    margin-top: 18px;
    margin-bottom: 10px;
    font-weight: 700;
    line-height: 1.35;
}

.markdown-body h1:first-child,
.markdown-body h2:first-child,
.markdown-body h3:first-child {
    margin-top: 0;
}

[data-mode="dark"] .markdown-body h1,
[data-mode="dark"] .markdown-body h2,
[data-mode="dark"] .markdown-body h3,
[data-mode="dark"] .markdown-body h4,
[data-mode="dark"] .markdown-body h5,
[data-mode="dark"] .markdown-body h6 {
    color: #FFFFFF !important;
}

[data-mode="light"] .markdown-body h1,
[data-mode="light"] .markdown-body h2,
[data-mode="light"] .markdown-body h3,
[data-mode="light"] .markdown-body h4,
[data-mode="light"] .markdown-body h5,
[data-mode="light"] .markdown-body h6 {
    color: #111827 !important;
}

.markdown-body h1 {
    font-size: 18px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.markdown-body h2 {
    font-size: 15.5px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.markdown-body h3 {
    font-size: 14px;
}

.markdown-body p {
    margin-top: 0;
    margin-bottom: 12px;
}

.markdown-body strong {
    font-weight: 600;
}

[data-mode="dark"] .markdown-body strong {
    color: #FFFFFF !important;
}

[data-mode="light"] .markdown-body strong {
    color: #111827 !important;
}

.markdown-body ul,
.markdown-body ol {
    margin-top: 0;
    margin-bottom: 12px;
    padding-left: 22px;
}

.markdown-body li {
    margin-bottom: 4px;
}

.markdown-body li::marker {
    color: var(--accent);
}

.markdown-body hr {
    height: 1px;
    padding: 0;
    margin: 16px 0;
    background-color: var(--border);
    border: 0;
}

.markdown-body blockquote {
    margin: 12px 0;
    padding: 8px 16px;
    color: var(--text-muted);
    border-left: 3px solid var(--accent);
    background: rgba(220, 38, 38, 0.04);
    border-radius: 0 6px 6px 0;
}

.markdown-body code {
    padding: 2px 6px;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--accent-light);
}

.markdown-body pre {
    margin: 12px 0;
    padding: 14px 16px;
    overflow: auto;
    font-size: 12.5px;
    line-height: 1.5;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.markdown-body pre code {
    padding: 0;
    background: transparent;
    border: 0;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.markdown-body a {
    color: var(--accent-light);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Changelog Accordion Card in Table */
.changelog-drawer-cell {
    padding: 0 !important;
    background: var(--bg-input) !important;
    border-top: 1px solid var(--border) !important;
}

.changelog-card {
    padding: 20px 24px;
    border-left: 3px solid var(--accent);
    background: var(--bg-card);
    margin: 12px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.changelog-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 8px;
}

.changelog-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
}

.changelog-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 1200px) {
    .update-tiles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .update-tiles-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Telemetry Events & Runtime Intelligence Architecture
   ========================================================================== */

.telemetry-tiles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.telemetry-tile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.telemetry-tile-card:hover {
    border-color: rgba(220, 38, 38, 0.25);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.telemetry-tile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.telemetry-tile-label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}

.telemetry-tile-value {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.02em;
}

.telemetry-tile-footer {
    font-size: 11.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

/* Filter Toolbar */
.telemetry-filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* Stack Trace Container */
.code-trace-box {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-primary);
    max-height: 380px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    scrollbar-width: none !important;
}

.code-trace-box::-webkit-scrollbar {
    display: none !important;
}

/* Detail Inspection Modal */
.telemetry-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
    background: var(--bg-input);
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.telemetry-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.telemetry-detail-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 4px;
}

.telemetry-detail-val {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.telemetry-tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
    padding-bottom: 8px;
}

.telemetry-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    border: none;
    color: var(--text-muted);
    transition: all 0.15s;
}

.telemetry-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.telemetry-tab.active {
    background: var(--bg-input);
    color: var(--text-primary);
}

.context-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.context-table th,
.context-table td {
    padding: 8px 12px;
    border: 1px solid var(--border);
    text-align: left;
}

.context-table th {
    background: var(--bg-input);
    font-weight: 600;
    width: 25%;
}

@media (max-width: 1200px) {
    .telemetry-tiles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .telemetry-tiles-grid {
        grid-template-columns: 1fr;
    }
    .telemetry-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Security Audit Stream & Forensic Intelligence Architecture
   ========================================================================== */

.audit-tiles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.audit-tile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.audit-tile-card:hover {
    border-color: rgba(183, 0, 57, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.audit-tile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.audit-tile-label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}

.audit-tile-value {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.02em;
}

.audit-tile-footer {
    font-size: 11.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

/* Filter Toolbar */
.audit-filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* Detail Inspection Modal */
.audit-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
    background: var(--bg-input);
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.audit-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.audit-detail-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 4px;
}

.audit-detail-val {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.audit-tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
    padding-bottom: 8px;
}

.audit-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    border: none;
    color: var(--text-muted);
    transition: all 0.15s;
}

.audit-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.audit-tab.active {
    background: var(--bg-input);
    color: var(--text-primary);
}

/* Payload Inspection Table */
.audit-payload-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.audit-payload-table th,
.audit-payload-table td {
    padding: 8px 12px;
    border: 1px solid var(--border);
    text-align: left;
}

.audit-payload-table th {
    background: var(--bg-input);
    font-weight: 600;
    width: 30%;
}

.audit-raw-json-box {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-primary);
    max-height: 380px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    scrollbar-width: none !important;
}

.audit-raw-json-box::-webkit-scrollbar {
    display: none !important;
}

@media (max-width: 1200px) {
    .audit-tiles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .audit-tiles-grid {
        grid-template-columns: 1fr;
    }
    .audit-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Database Schema Migrations Architecture
   ========================================================================== */

.migration-tiles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.migration-tile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.migration-tile-card:hover {
    border-color: rgba(183, 0, 57, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.migration-tile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.migration-tile-label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}

.migration-tile-value {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.02em;
}

.migration-tile-footer {
    font-size: 11.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

@media (max-width: 1200px) {
    .migration-tiles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .migration-tiles-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Email Delivery Log & SMTP Architecture
   ========================================================================== */

.email-tiles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.email-tile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.email-tile-card:hover {
    border-color: rgba(183, 0, 57, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.email-tile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.email-tile-label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #FFFFFF !important;
}

[data-mode="light"] .email-tile-label {
    color: #111827 !important;
}

.email-tile-label .material-symbols-outlined {
    font-size: 16px;
    color: #FFFFFF !important;
}

[data-mode="light"] .email-tile-label .material-symbols-outlined {
    color: #111827 !important;
}

.email-tile-value {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.email-tile-footer {
    font-size: 11.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.email-filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* Detail Inspection Modal for Email */
.email-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
    background: var(--bg-input);
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.email-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.email-detail-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #FFFFFF;
}

[data-mode="light"] .email-detail-label {
    color: #111827;
}

.email-detail-label .material-symbols-outlined {
    color: #FFFFFF;
}

[data-mode="light"] .email-detail-label .material-symbols-outlined {
    color: #111827;
}

.email-detail-val {
    color: var(--text-primary);
    font-size: 12.5px;
    word-break: break-all;
}

@media (max-width: 1200px) {
    .email-tiles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .email-tiles-grid {
        grid-template-columns: 1fr;
    }
    .email-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Terminal Fleet Telemetry & Management Architecture
   ========================================================================== */

.terminal-tiles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.terminal-tile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.terminal-tile-card:hover {
    border-color: rgba(183, 0, 57, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.terminal-tile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.terminal-tile-label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #FFFFFF !important;
}

[data-mode="light"] .terminal-tile-label {
    color: #111827 !important;
}

.terminal-tile-label .material-symbols-outlined {
    font-size: 16px;
    color: #FFFFFF !important;
}

[data-mode="light"] .terminal-tile-label .material-symbols-outlined {
    color: #111827 !important;
}

.terminal-tile-value {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.terminal-tile-footer {
    font-size: 11.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.terminal-filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* Detail Inspection Modal for Terminals */
.terminal-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
    background: var(--bg-input);
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.terminal-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.terminal-detail-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #FFFFFF;
}

[data-mode="light"] .terminal-detail-label {
    color: #111827;
}

.terminal-detail-label .material-symbols-outlined {
    color: #FFFFFF;
}

[data-mode="light"] .terminal-detail-label .material-symbols-outlined {
    color: #111827;
}

.terminal-detail-val {
    color: var(--text-primary);
    font-size: 12.5px;
    word-break: break-all;
}

@media (max-width: 1200px) {
    .terminal-tiles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .terminal-tiles-grid {
        grid-template-columns: 1fr;
    }
    .terminal-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Customer & Merchant Management Architecture
   ========================================================================== */

.customer-tiles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.customer-tile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.customer-tile-card:hover {
    border-color: rgba(183, 0, 57, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

[data-mode="light"] .customer-tile-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
}

[data-mode="light"] .customer-tile-card:hover {
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.customer-tile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.customer-tile-label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #FFFFFF !important;
}

[data-mode="light"] .customer-tile-label {
    color: #111827 !important;
}

.customer-tile-label .material-symbols-outlined {
    font-size: 16px;
    color: #FFFFFF !important;
}

[data-mode="light"] .customer-tile-label .material-symbols-outlined {
    color: #111827 !important;
}

.customer-tile-value {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.customer-tile-footer {
    font-size: 11.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.customer-filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.customer-store-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.customer-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--accent-subtle, rgba(183, 0, 57, 0.08));
    border: 1px solid var(--accent-border, rgba(183, 0, 57, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent, #B70039);
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

[data-mode="light"] .customer-avatar {
    background: #FFF1F2;
    border-color: #FECDD3;
    color: #BE123C;
}

.customer-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
    background: var(--bg-input);
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

[data-mode="light"] .customer-detail-grid {
    background: #F9FAFB;
    border-color: #E5E7EB;
}

.customer-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.customer-detail-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #FFFFFF;
}

[data-mode="light"] .customer-detail-label {
    color: #111827;
}

.customer-detail-label .material-symbols-outlined {
    color: #FFFFFF;
    font-size: 14px;
}

[data-mode="light"] .customer-detail-label .material-symbols-outlined {
    color: #111827;
}

.customer-detail-val {
    color: var(--text-primary);
    font-size: 12.5px;
    word-break: break-all;
}

.customer-staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.customer-staff-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all var(--transition-fast);
}

.customer-staff-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

[data-mode="light"] .customer-staff-card {
    background: #FFFFFF;
    border-color: #E5E7EB;
}

@media (max-width: 1200px) {
    .customer-tiles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .customer-tiles-grid {
        grid-template-columns: 1fr;
    }
    .customer-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   License Requests & Approval Queue Architecture
   ========================================================================== */

.request-tiles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.request-tile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.request-tile-card:hover {
    border-color: rgba(183, 0, 57, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

[data-mode="light"] .request-tile-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
}

[data-mode="light"] .request-tile-card:hover {
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.request-tile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.request-tile-label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #FFFFFF !important;
}

[data-mode="light"] .request-tile-label {
    color: #111827 !important;
}

.request-tile-label .material-symbols-outlined {
    font-size: 16px;
    color: #FFFFFF !important;
}

[data-mode="light"] .request-tile-label .material-symbols-outlined {
    color: #111827 !important;
}

.request-tile-value {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.request-tile-footer {
    font-size: 11.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.request-filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.request-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
    background: var(--bg-input);
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

[data-mode="light"] .request-detail-grid {
    background: #F9FAFB;
    border-color: #E5E7EB;
}

.request-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.request-detail-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #FFFFFF;
}

[data-mode="light"] .request-detail-label {
    color: #111827;
}

.request-detail-label .material-symbols-outlined {
    color: #FFFFFF;
    font-size: 14px;
}

[data-mode="light"] .request-detail-label .material-symbols-outlined {
    color: #111827;
}

.request-detail-val {
    color: var(--text-primary);
    font-size: 12.5px;
    word-break: break-all;
}

@media (max-width: 1200px) {
    .request-tiles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .request-tiles-grid {
        grid-template-columns: 1fr;
    }
    .request-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════
   API Debug Console Styles
   ═══════════════════════════════════════════ */
.debug-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.debug-kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-zen-card);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.debug-kpi-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

[data-mode="light"] .debug-kpi-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
}

[data-mode="light"] .debug-kpi-card:hover {
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.debug-kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.debug-kpi-label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--label-text, #FFFFFF);
}

.debug-kpi-label .material-symbols-outlined {
    font-size: 16px;
    color: var(--label-icon, #FFFFFF);
}

[data-mode="dark"] .debug-kpi-label,
[data-mode="dark"] .debug-kpi-label .material-symbols-outlined {
    color: #FFFFFF;
}

[data-mode="light"] .debug-kpi-label,
[data-mode="light"] .debug-kpi-label .material-symbols-outlined {
    color: #111827;
}

.debug-kpi-value {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 8px;
    font-family: var(--font-mono);
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.debug-kpi-footer {
    font-size: 11.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

/* Quick Filter Bar */
.quick-filter-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-input);
    border: 1px solid var(--border);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.filter-pill:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.filter-pill.active {
    background: var(--accent-subtle);
    border-color: var(--accent);
    color: var(--accent-light);
    font-weight: 600;
}

[data-mode="light"] .filter-pill {
    background: #FFFFFF;
    border-color: #E5E7EB;
    color: #4B5563;
}

[data-mode="light"] .filter-pill:hover {
    background: #FAF2F5;
    border-color: var(--accent);
    color: #111827;
}

[data-mode="light"] .filter-pill.active {
    background: #FAF2F5;
    border-color: var(--accent);
    color: var(--accent);
}

/* Log Stream Entries */
.log-stream-container {
    background: var(--bg-input);
    border-top: 1px solid var(--border);
    padding: 12px 16px;
    max-height: 68vh;
    overflow-y: auto;
    overflow-x: hidden;
    font-size: 12px;
}

[data-mode="light"] .log-stream-container {
    background: #F9FAFB;
}

.log-entry-row {
    padding: 10px 14px;
    margin-bottom: 6px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3.5px solid transparent;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

[data-mode="light"] .log-entry-row {
    background: #FFFFFF;
    border-color: #E5E7EB;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.log-entry-row:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

[data-mode="light"] .log-entry-row:hover {
    background: #F8F9FA;
    border-color: #D1D5DB;
}

.log-entry-row.entry-error {
    border-left-color: var(--danger);
    background: rgba(239, 68, 68, 0.04);
}

.log-entry-row.entry-warn {
    border-left-color: var(--warning);
    background: rgba(245, 158, 11, 0.04);
}

.log-entry-row.entry-request {
    border-left-color: var(--accent);
}

.log-entry-row.entry-response {
    border-left-color: var(--success);
}

.log-entry-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 11.5px;
    line-height: 1.4;
}

.log-time-tag {
    color: var(--text-muted);
    font-size: 11px;
    min-width: 82px;
}

.log-level-badge {
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.log-level-badge.level-info {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

[data-mode="light"] .log-level-badge.level-info {
    color: #2563eb;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.log-level-badge.level-warn {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

[data-mode="light"] .log-level-badge.level-warn {
    color: #d97706;
    background: #fffbeb;
    border-color: #fde68a;
}

.log-level-badge.level-error {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

[data-mode="light"] .log-level-badge.level-error {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
}

.log-level-badge.level-debug {
    background: rgba(107, 114, 128, 0.12);
    color: #9ca3af;
    border: 1px solid rgba(107, 114, 128, 0.25);
}

.log-req-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--accent-light);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    font-family: var(--font-mono);
    transition: all var(--transition-fast);
}

.log-req-chip:hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
    transform: scale(1.02);
}

[data-mode="light"] .log-req-chip {
    background: #F3F4F6;
    border-color: #E5E7EB;
    color: var(--accent);
}

.log-dir-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
}

.log-dir-badge.dir-request {
    background: var(--accent-subtle);
    color: var(--accent-light);
    border: 1px solid var(--accent-border);
}

[data-mode="light"] .log-dir-badge.dir-request {
    color: var(--accent);
}

.log-dir-badge.dir-response {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

[data-mode="light"] .log-dir-badge.dir-response {
    color: #059669;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.log-method-badge {
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 700;
}

.log-method-badge.method-post {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

[data-mode="light"] .log-method-badge.method-post {
    background: #f5f3ff;
    color: #7c3aed;
}

.log-method-badge.method-get {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

[data-mode="light"] .log-method-badge.method-get {
    background: #ecfdf5;
    color: #059669;
}

.log-endpoint {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 12px;
}

.log-status-badge {
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 700;
}

.log-status-badge.status-2xx {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

[data-mode="light"] .log-status-badge.status-2xx {
    background: #ecfdf5;
    color: #059669;
}

.log-status-badge.status-4xx {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

[data-mode="light"] .log-status-badge.status-4xx {
    background: #fffbeb;
    color: #d97706;
}

.log-status-badge.status-5xx {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

[data-mode="light"] .log-status-badge.status-5xx {
    background: #fef2f2;
    color: #dc2626;
}

.log-latency-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 600;
    font-family: var(--font-mono);
}

.log-latency-badge.latency-fast {
    background: rgba(16, 185, 129, 0.10);
    color: #34d399;
}

[data-mode="light"] .log-latency-badge.latency-fast {
    background: #ecfdf5;
    color: #059669;
}

.log-latency-badge.latency-mid {
    background: rgba(245, 158, 11, 0.10);
    color: #fbbf24;
}

[data-mode="light"] .log-latency-badge.latency-mid {
    background: #fffbeb;
    color: #d97706;
}

.log-latency-badge.latency-slow {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

[data-mode="light"] .log-latency-badge.latency-slow {
    background: #fef2f2;
    color: #dc2626;
}

.log-meta-group {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.log-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.log-meta-chip:hover {
    color: var(--text-primary);
    border-color: var(--accent);
}

[data-mode="light"] .log-meta-chip {
    background: #F3F4F6;
    border-color: #E5E7EB;
    color: #6B7280;
}

/* Payload details & collapsible */
.log-payload-wrapper {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
}

.log-payload-details {
    width: 100%;
}

.log-payload-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 11.5px;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    list-style: none;
    user-select: none;
}

.log-payload-summary::-webkit-details-marker {
    display: none;
}

.log-payload-summary:hover {
    color: var(--text-primary);
}

.log-payload-preview {
    color: var(--text-muted);
    font-size: 11px;
    background: var(--bg-input);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--border);
    max-width: 540px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[data-mode="light"] .log-payload-preview {
    background: #F3F4F6;
    border-color: #E5E7EB;
    color: #4B5563;
}

.log-payload-body {
    margin-top: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 14px;
    overflow-x: auto;
}

[data-mode="light"] .log-payload-body {
    background: #F9FAFB;
    border-color: #E5E7EB;
}

.log-payload-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.log-payload-code {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
    color: var(--text-primary);
    max-height: 240px;
    overflow-y: auto;
}

.log-response-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11.5px;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.live-indicator.active {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
}

[data-mode="light"] .live-indicator.active {
    color: #059669;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.live-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.live-indicator.active .live-pulse-dot {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

@media (max-width: 1200px) {
    .debug-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .debug-kpi-grid {
        grid-template-columns: 1fr;
    }
    .log-meta-group {
        margin-left: 0;
        width: 100%;
    }
}

/* ═══════════════════════════════════════════
   Licenses Console Styles
   ═══════════════════════════════════════════ */
.license-tiles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.license-tile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.license-tile-card:hover {
    border-color: rgba(183, 0, 57, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

[data-mode="light"] .license-tile-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
}

[data-mode="light"] .license-tile-card:hover {
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.license-tile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.license-tile-label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #FFFFFF !important;
}

[data-mode="light"] .license-tile-label {
    color: #111827 !important;
}

.license-tile-label .material-symbols-outlined {
    font-size: 16px;
    color: #FFFFFF !important;
}

[data-mode="light"] .license-tile-label .material-symbols-outlined {
    color: #111827 !important;
}

.license-tile-value {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.license-tile-footer {
    font-size: 11.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.license-filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.license-store-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.license-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--accent-subtle, rgba(183, 0, 57, 0.08));
    border: 1px solid var(--accent-border, rgba(183, 0, 57, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent, #B70039);
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

[data-mode="light"] .license-avatar {
    background: #FFF1F2;
    border-color: #FECDD3;
    color: #BE123C;
}

.license-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
    background: var(--bg-input);
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

[data-mode="light"] .license-detail-grid {
    background: #F9FAFB;
    border-color: #E5E7EB;
}

.license-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.license-detail-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #FFFFFF;
}

[data-mode="light"] .license-detail-label {
    color: #111827;
}

.license-detail-label .material-symbols-outlined {
    color: #FFFFFF;
    font-size: 14px;
}

[data-mode="light"] .license-detail-label .material-symbols-outlined {
    color: #111827;
}

.license-detail-val {
    color: var(--text-primary);
    font-size: 12.5px;
    word-break: break-all;
}

.license-cap-track {
    width: 100%;
    height: 6px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 5px;
}

.license-cap-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.3s ease;
}

.license-cap-fill.low { background: var(--success); }
.license-cap-fill.med { background: var(--warning); }
.license-cap-fill.high { background: var(--danger); }

.preset-chip {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.preset-chip:hover, .preset-chip.active {
    border-color: var(--accent);
    color: var(--accent-light);
    background: var(--accent-subtle);
}

@media (max-width: 1200px) {
    .license-tiles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .license-tiles-grid {
        grid-template-columns: 1fr;
    }
    .license-detail-grid {
        grid-template-columns: 1fr;
    }
}







