/* ============================================
   KVATASK THEMES
   Все темы + их компонентные переопределения
   Подключается в index.html ПЕРЕД style.css.
   ============================================ */

/* --- 2. VARIABLES (Light Default / Dark Theme) --- */
:root {
    /* Fonts */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', Menlo, Monaco, monospace;

    /* Colors - Light Theme (Default) */
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --primary-hover: #4338ca;
    --primary-muted: rgba(79, 70, 229, 0.1);

    --secondary: #6b7280;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Backgrounds - Light Mode Palette */
    --bg-page: #f4f4f5;
    --bg: #f4f4f6;
    --bg-primary: #ffffff;
    --bg-secondary: #f4f4f5;
    --bg-tertiary: #e4e4e7;
    --bg-hover: #d4d4d8;
    --bg-active: #a1a1aa;

    /* Cards */
    --card: #ffffff;
    --card-hover: #f9fafb;

    /* Text */
    --text: #18181b;
    --text-primary: #18181b;
    --text-secondary: #52525b;
    --text-muted: #a1a1aa;

    /* Borders & Shadows */
    --border: rgba(0, 0, 0, 0.08);
    --border-light: rgba(0, 0, 0, 0.05);
    --border-hover: rgba(0, 0, 0, 0.15);
    --border-color: #e5e7eb;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);

    /* Radius & Spacing */
    --radius-sm: 4px;
    --radius: 6px;
    --radius-lg: 8px;
    --radius-md: 8px;         /* алиас для radius-lg, используется в sprint/report */
    --radius-pill: 9999px;    /* используется в header-badge */

    /* Spacing Scale */
    --sp-0: 0px;
    --sp-px: 1px;
    --sp-05: 2px;
    --sp-1: 4px;
    --sp-15: 6px;
    --sp-2: 8px;
    --sp-25: 10px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 20px;
    --sp-6: 24px;
    --sp-8: 32px;
    --sp-10: 40px;
    --sp-12: 48px;

    /* Misc */
    --link-color: #3b82f6;

    /* Status Colors */
    --status-success: #10b981;
    --status-success-light: #d1fae5;
    --status-success-dark: #047857;
    --status-warning: #f59e0b;
    --status-warning-light: #fef3c7;
    --status-warning-dark: #d97706;
    --status-danger: #ef4444;
    --status-danger-light: #fecaca;
    --status-danger-dark: #dc2626;
    --status-info: #3b82f6;
    --status-info-light: #dbeafe;

    /* Priority Colors */
    --priority-critical: #ef4444;
    --priority-high: #f97316;
    --priority-medium: #f59e0b;
    --priority-low: #22c55e;
    --priority-none: #9ca3af;

    /* Misc Semantic */
    --color-purple: #7c3aed;
    --color-purple-light: #ede9fe;
    --color-gold: #d97706;
    --color-gold-light: #fef3c7;
    --color-white: #ffffff;
    --color-accent-gradient: linear-gradient(90deg, #10b981, #34d399);

    /* Focus Ring */
    --focus-ring: rgba(79, 70, 229, 0.3);
    --focus-ring-offset: rgba(79, 70, 229, 0.1);

    /* Billing Colors */
    --billing-trial-bg: #1e3a5f;
    --billing-trial-text: #93c5fd;
    --billing-warning-bg: #78350f;
    --billing-warning-text: #fcd34d;
    --billing-error-bg: #7f1d1d;
    --billing-error-text: #fca5a5;
    --billing-success-bg: #d1fae5;
    --billing-success-text: #065f46;
    --billing-refund-bg: #e0e7ff;
    --billing-refund-text: #3730a3;
    --billing-pending-text: #92400e;
    --billing-gradient: linear-gradient(135deg, #ede9fe, #dbeafe);
    --billing-expiry-bg: #78350f;
    --billing-expiry-border: #b45309;

    /* Typography Scale */
    --fs-xxs: 0.5625rem;   /* 9px - tiny counters, toolbar labels */
    --fs-xs: 0.625rem;     /* 10px - badges, meta, counters */
    --fs-sm: 0.6875rem;    /* 11px - labels, help-text, small UI */
    --fs-base: 0.75rem;    /* 12px - buttons, inputs, nav, controls */
    --fs-md: 0.8125rem;    /* 13px - body text, paragraphs */
    --fs-lg: 0.875rem;     /* 14px - card titles, section subheaders */
    --fs-xl: 1rem;         /* 16px - modal headers, section titles */
    --fs-2xl: 1.25rem;     /* 20px - page titles, wiki h2 */
    --fs-3xl: 1.5rem;      /* 24px - large numbers, wiki h1 */
    --fs-4xl: 2rem;        /* 32px - hero numbers, attention */

    /* Font Weights */
    --fw-normal: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;

    /* Line Heights */
    --lh-none: 1;
    --lh-tight: 1.25;
    --lh-normal: 1.5;
    --lh-relaxed: 1.6;

    /* Component Sizes */
    --size-sm: 28px;
    --size-md: 32px;
    --size-lg: 40px;

    /* Form control sizes */
    --checkbox-size: 15px;

    /* Gantt Colors */
    --gantt-bar-todo: #94a3b8;
    --gantt-bar-in-progress: #3b82f6;
    --gantt-bar-review: #f59e0b;
    --gantt-bar-done: #10b981;
    --gantt-bar-critical: #dc2626;
    --gantt-bar-label: #ffffff;
    --gantt-today: #6366f1;
    --gantt-link: #6b7280;

    /* Timer Colors */
    --timer-running-bg: #fee2e2;
    --timer-running-border: #fca5a5;
    --timer-running-text: #b91c1c;

    /* Semantic color aliases */
    --color-danger: var(--danger);

    /* Locked field tokens (disabled / readonly / plan-locked) */
    --locked-bg: #f3f4f6;
    --locked-text: #6b7280;
    --locked-border: #d1d5db;
    --locked-opacity: 0.75;
}

/* Dark Theme */
[data-theme="dark"] {
    --primary: #818cf8;
    --primary-dark: #6366f1;
    --primary-hover: #a5b4fc;
    --primary-light: #c7d2fe;
    --primary-muted: rgba(129, 140, 248, 0.12);

    --secondary: #9ca3af;
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #fb7185;

    /* Фоны — мягче, ближе друг к другу */
    --bg-page: #0f1117;
    --bg: #161822;
    --bg-primary: #161822;
    --bg-secondary: #1c1e2d;
    --bg-tertiary: #252836;
    --bg-hover: #2a2d3d;
    --bg-active: #353849;

    --card: #1c1e2d;
    --card-hover: #252836;

    /* Текст — мягче */
    --text: #e4e4e7;
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    /* Бордеры — тоньше */
    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.04);
    --border-hover: rgba(255, 255, 255, 0.12);
    --border-color: #2a2d3d;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);

    --link-color: #93c5fd;

    /* Status Colors */
    --status-success: #34d399;
    --status-success-light: rgba(34, 197, 94, 0.15);
    --status-success-dark: #10b981;
    --status-warning: #fbbf24;
    --status-warning-light: rgba(245, 158, 11, 0.15);
    --status-warning-dark: #f59e0b;
    --status-danger: #fb7185;
    --status-danger-light: rgba(239, 68, 68, 0.15);
    --status-danger-dark: #ef4444;
    --status-info: #60a5fa;
    --status-info-light: rgba(59, 130, 246, 0.15);

    /* Priority Colors */
    --priority-critical: #fb7185;
    --priority-high: #fb923c;
    --priority-medium: #fbbf24;
    --priority-low: #34d399;
    --priority-none: #6b7280;

    /* Misc Semantic */
    --color-purple: #a78bfa;
    --color-purple-light: rgba(124, 58, 237, 0.15);
    --color-gold: #fbbf24;
    --color-gold-light: rgba(217, 119, 6, 0.15);
    --color-white: #e4e4e7;
    --color-accent-gradient: linear-gradient(90deg, #34d399, #6ee7b7);

    /* Focus Ring */
    --focus-ring: rgba(129, 140, 248, 0.4);
    --focus-ring-offset: rgba(129, 140, 248, 0.15);

    /* Billing Colors */
    --billing-trial-bg: #1e3a5f;
    --billing-trial-text: #93c5fd;
    --billing-warning-bg: #78350f;
    --billing-warning-text: #fcd34d;
    --billing-error-bg: #7f1d1d;
    --billing-error-text: #fca5a5;
    --billing-success-bg: rgba(34, 197, 94, 0.15);
    --billing-success-text: #34d399;
    --billing-refund-bg: rgba(99, 102, 241, 0.15);
    --billing-refund-text: #a5b4fc;
    --billing-pending-text: #fbbf24;
    --billing-gradient: linear-gradient(135deg, #312e81, #1e3a5f);
    --billing-expiry-bg: #78350f;
    --billing-expiry-border: #b45309;

    /* Gantt Colors */
    --gantt-bar-todo: #64748b;
    --gantt-bar-in-progress: #60a5fa;
    --gantt-bar-review: #fbbf24;
    --gantt-bar-done: #34d399;
    --gantt-bar-critical: #fb7185;
    --gantt-bar-label: #1e293b;
    --gantt-today: #818cf8;
    --gantt-link: #9ca3af;

    /* Timer Colors */
    --timer-running-bg: rgba(239, 68, 68, 0.15);
    --timer-running-border: rgba(239, 68, 68, 0.3);
    --timer-running-text: #fb7185;

    /* Locked field tokens (disabled / readonly / plan-locked) */
    --locked-bg: #1f2230;
    --locked-text: #71717a;
    --locked-border: rgba(255, 255, 255, 0.08);
    --locked-opacity: 0.7;
}

/* ==========================================
   CLASSIC THEME (Windows 2000/XP Classic)
   ========================================== */
[data-theme="classic"] {
    --primary: #0055ea;
    --primary-dark: #003399;
    --primary-light: #4488ff;
    --primary-hover: #003399;
    --primary-muted: rgba(0, 85, 234, 0.12);

    --secondary: #808080;
    --success: #008000;
    --warning: #cc8800;
    --danger: #cc0000;

    --bg-page: #d4d0c8;
    --bg: #d4d0c8;
    --bg-primary: #ece9d8;
    --bg-secondary: #d4d0c8;
    --bg-tertiary: #c0c0c8;
    --bg-hover: #b8b4a8;
    --bg-active: #0a246a;

    --card: #ffffff;
    --card-hover: #f0f0f0;

    --text: #000000;
    --text-primary: #000000;
    --text-secondary: #404040;
    --text-muted: #808080;

    --border: #808080;
    --border-light: #a0a0a0;
    --border-hover: #404040;
    --border-color: #808080;

    --shadow-sm: none;
    --shadow: none;
    --shadow-lg: none;

    --radius-sm: 0px;
    --radius: 0px;
    --radius-lg: 0px;
    --radius-md: 0px;
    --radius-pill: 0px;

    --link-color: #0000ff;
    --focus-ring: rgba(0, 85, 234, 0.4);
    --focus-ring-offset: rgba(0, 85, 234, 0.15);

    --status-success: #008000;
    --status-success-light: #c8e6c8;
    --status-success-dark: #006000;
    --status-warning: #cc8800;
    --status-warning-light: #f5e6c0;
    --status-warning-dark: #996600;
    --status-danger: #cc0000;
    --status-danger-light: #f5c0c0;
    --status-danger-dark: #990000;
    --status-info: #0055ea;
    --status-info-light: #c0d8f5;

    --priority-critical: #cc0000;
    --priority-high: #cc6600;
    --priority-medium: #cc8800;
    --priority-low: #008000;
    --priority-none: #808080;

    --color-purple: #7c3aed;
    --color-purple-light: #e0d0f5;
    --color-gold: #996600;
    --color-gold-light: #f5e6c0;
    --color-white: #ffffff;
    --color-accent-gradient: linear-gradient(90deg, #008000, #00a000);

    --billing-trial-bg: #c0d8f5;
    --billing-trial-text: #003399;
    --billing-warning-bg: #f5e6c0;
    --billing-warning-text: #663300;
    --billing-error-bg: #f5c0c0;
    --billing-error-text: #990000;
    --billing-success-bg: #c8e6c8;
    --billing-success-text: #006000;
    --billing-refund-bg: #e0d0f5;
    --billing-refund-text: #4400aa;
    --billing-pending-text: #996600;
    --billing-gradient: linear-gradient(135deg, #d4d0c8, #ece9d8);
    --billing-expiry-bg: #f5e6c0;
    --billing-expiry-border: #996600;

    /* Locked field tokens (disabled / readonly / plan-locked) */
    --locked-bg: #d4d0c8;
    --locked-text: #606060;
    --locked-border: #808080;
    --locked-opacity: 1;
}

/* Classic theme overrides — 3D borders */
[data-theme="classic"] .btn-primary {
    border: 2px outset #e0dcd4;
}
[data-theme="classic"] .btn-primary:active {
    border-style: inset;
}
[data-theme="classic"] .btn-secondary,
[data-theme="classic"] .btn-ghost {
    border: 2px outset #e0dcd4;
    background: #d4d0c8;
    color: #000000;
}
[data-theme="classic"] .btn-secondary:active,
[data-theme="classic"] .btn-ghost:active {
    border-style: inset;
}
[data-theme="classic"] input,
[data-theme="classic"] select,
[data-theme="classic"] textarea {
    border: 2px inset #c0c0c0;
    background: #ffffff;
    border-radius: 0;
}
[data-theme="classic"] .header {
    background: linear-gradient(180deg, #0058ee, #003399);
    border-bottom: 2px outset #d4d0c8;
}
[data-theme="classic"] .header {
    color: #ffffff;
}
[data-theme="classic"] .header > *,
[data-theme="classic"] .header .header-logo,
[data-theme="classic"] .header .header-logo *,
[data-theme="classic"] .header .main-nav,
[data-theme="classic"] .header .main-nav *,
[data-theme="classic"] .header .header-actions > .btn-primary,
[data-theme="classic"] .header .header-user-trigger,
[data-theme="classic"] .header .header-user-trigger *,
[data-theme="classic"] .header .header-chevron,
[data-theme="classic"] .header .nav-btn,
[data-theme="classic"] .header > button,
[data-theme="classic"] .header .header-icon-btn {
    color: #ffffff;
}
[data-theme="classic"] .header-dropdown-menu,
[data-theme="classic"] .header-dropdown-menu *,
[data-theme="classic"] .header-submenu-list,
[data-theme="classic"] .header-submenu-list * {
    color: var(--text);
}
[data-theme="classic"] .nav-btn.active {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}
[data-theme="classic"] .nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}
[data-theme="classic"] .header-dropdown-menu,
[data-theme="classic"] .header-submenu-list {
    border: 2px outset #d4d0c8;
}
[data-theme="classic"] .card,
[data-theme="classic"] .stat-card,
[data-theme="classic"] .project-card,
[data-theme="classic"] .kanban-column,
[data-theme="classic"] .modal-content,
[data-theme="classic"] .kanban-card,
[data-theme="classic"] .task-card {
    border: 2px outset #e0dcd4;
}
[data-theme="classic"] .modal {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(0, 0, 0, 0.5);
}
/* Classic scrollbars */
[data-theme="classic"] ::-webkit-scrollbar { width: 16px; height: 16px; }
[data-theme="classic"] ::-webkit-scrollbar-track { background: #d4d0c8; }
[data-theme="classic"] ::-webkit-scrollbar-thumb { background: #c0c0c8; border: 2px outset #d4d0c8; }
[data-theme="classic"] ::-webkit-scrollbar-corner { background: #d4d0c8; }

/* ==========================================
   HIGH CONTRAST THEME (Accessibility)
   ========================================== */
[data-theme="high-contrast"] {
    --primary: #00aaff;
    --primary-dark: #0088cc;
    --primary-light: #55ccff;
    --primary-hover: #0088cc;
    --primary-muted: rgba(0, 170, 255, 0.15);

    --secondary: #aaaaaa;
    --success: #00dd00;
    --warning: #ffdd00;
    --danger: #ff3333;

    --bg-page: #000000;
    --bg: #000000;
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-tertiary: #1e1e1e;
    --bg-hover: #282828;
    --bg-active: #003366;

    --card: #0a0a0a;
    --card-hover: #141414;

    --text: #ffffff;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;

    --border: #555555;
    --border-light: #333333;
    --border-hover: #888888;
    --border-color: #555555;

    --shadow-sm: none;
    --shadow: none;
    --shadow-lg: none;

    --radius-sm: 2px;
    --radius: 3px;
    --radius-lg: 4px;
    --radius-md: 4px;
    --radius-pill: 9999px;

    --link-color: #55ccff;
    --focus-ring: rgba(0, 170, 255, 0.5);
    --focus-ring-offset: rgba(0, 170, 255, 0.2);

    --status-success: #00dd00;
    --status-success-light: rgba(0, 221, 0, 0.15);
    --status-success-dark: #00aa00;
    --status-warning: #ffdd00;
    --status-warning-light: rgba(255, 221, 0, 0.15);
    --status-warning-dark: #ccaa00;
    --status-danger: #ff3333;
    --status-danger-light: rgba(255, 51, 51, 0.15);
    --status-danger-dark: #cc0000;
    --status-info: #00aaff;
    --status-info-light: rgba(0, 170, 255, 0.15);

    --priority-critical: #ff3333;
    --priority-high: #ff8800;
    --priority-medium: #ffdd00;
    --priority-low: #00dd00;
    --priority-none: #666666;

    --color-purple: #bb88ff;
    --color-purple-light: rgba(187, 136, 255, 0.15);
    --color-gold: #ffdd00;
    --color-gold-light: rgba(255, 221, 0, 0.15);
    --color-white: #ffffff;
    --color-accent-gradient: linear-gradient(90deg, #00dd00, #55ff55);

    --billing-trial-bg: #002244;
    --billing-trial-text: #55ccff;
    --billing-warning-bg: #332200;
    --billing-warning-text: #ffdd00;
    --billing-error-bg: #330000;
    --billing-error-text: #ff6666;
    --billing-success-bg: rgba(0, 221, 0, 0.15);
    --billing-success-text: #00dd00;
    --billing-refund-bg: rgba(187, 136, 255, 0.15);
    --billing-refund-text: #bb88ff;
    --billing-pending-text: #ffdd00;
    --billing-gradient: linear-gradient(135deg, #1a1a2e, #002244);
    --billing-expiry-bg: #332200;
    --billing-expiry-border: #664400;

    /* Locked field tokens (disabled / readonly / plan-locked) */
    --locked-bg: #1e1e1e;
    --locked-text: #aaaaaa;
    --locked-border: #888888;
    --locked-opacity: 1;
}

[data-theme="high-contrast"] .modal {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(0, 0, 0, 0.85);
}

/* ==========================================
   LIQUID GLASS THEME (Apple-inspired)
   ========================================== */
[data-theme="liquid-glass"] {
    /* Base palette - cool blue-gray */
    --primary: #0071e3;
    --primary-dark: #0058b0;
    --primary-light: #5ac8fa;
    --primary-hover: #0058b0;
    --primary-muted: rgba(0, 113, 227, 0.1);

    --secondary: #86868b;
    --success: #30d158;
    --warning: #ff9f0a;
    --danger: #ff3b30;

    /* Glass Backgrounds */
    --bg-page: #f2f2f7;
    --bg: #f2f2f7;
    --bg-primary: rgba(255, 255, 255, 0.72);
    --bg-secondary: rgba(255, 255, 255, 0.55);
    --bg-tertiary: rgba(255, 255, 255, 0.4);
    --bg-hover: rgba(255, 255, 255, 0.85);
    --bg-active: rgba(0, 0, 0, 0.06);

    /* Glass Cards */
    --card: rgba(255, 255, 255, 0.72);
    --card-hover: rgba(255, 255, 255, 0.85);

    /* Text - Apple system */
    --text: #1d1d1f;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-muted: #aeaeb2;

    /* Glass Borders */
    --border: rgba(0, 0, 0, 0.06);
    --border-light: rgba(0, 0, 0, 0.04);
    --border-hover: rgba(0, 0, 0, 0.12);
    --border-color: rgba(0, 0, 0, 0.08);

    /* Elevated Glass Shadows */
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.04), 0 0 1px rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 0 1px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08), 0 0 1px rgba(0, 0, 0, 0.1);

    /* Radius - more rounded for glass */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;

    --link-color: #0071e3;

    /* Status Colors - Apple palette */
    --status-success: #30d158;
    --status-success-light: rgba(48, 209, 88, 0.12);
    --status-success-dark: #248a3d;
    --status-warning: #ff9f0a;
    --status-warning-light: rgba(255, 159, 10, 0.12);
    --status-warning-dark: #c77c00;
    --status-danger: #ff3b30;
    --status-danger-light: rgba(255, 59, 48, 0.12);
    --status-danger-dark: #d70015;
    --status-info: #0071e3;
    --status-info-light: rgba(0, 113, 227, 0.1);

    /* Priority Colors */
    --priority-critical: #ff3b30;
    --priority-high: #ff9500;
    --priority-medium: #ffcc00;
    --priority-low: #30d158;
    --priority-none: #aeaeb2;

    /* Misc */
    --color-purple: #af52de;
    --color-purple-light: rgba(175, 82, 222, 0.12);
    --color-gold: #c77c00;
    --color-gold-light: rgba(255, 159, 10, 0.12);
    --color-white: #ffffff;
    --color-accent-gradient: linear-gradient(135deg, #30d158, #5ac8fa);

    --focus-ring: rgba(0, 113, 227, 0.4);
    --focus-ring-offset: rgba(0, 113, 227, 0.12);

    /* Billing - same as light, Apple-adjusted */
    --billing-trial-bg: rgba(0, 113, 227, 0.08);
    --billing-trial-text: #0071e3;
    --billing-warning-bg: rgba(255, 159, 10, 0.1);
    --billing-warning-text: #c77c00;
    --billing-error-bg: rgba(255, 59, 48, 0.1);
    --billing-error-text: #d70015;
    --billing-success-bg: rgba(48, 209, 88, 0.1);
    --billing-success-text: #248a3d;
    --billing-refund-bg: rgba(175, 82, 222, 0.1);
    --billing-refund-text: #8944ab;
    --billing-pending-text: #c77c00;
    --billing-gradient: linear-gradient(135deg, rgba(175, 82, 222, 0.08), rgba(0, 113, 227, 0.08));
    --billing-expiry-bg: rgba(255, 159, 10, 0.1);
    --billing-expiry-border: rgba(255, 159, 10, 0.3);

    /* Glass-specific custom properties */
    --glass-blur: 20px;
    --glass-border: 1px solid rgba(255, 255, 255, 0.2);
    --glass-shine: inset 0 1px 0 rgba(255, 255, 255, 0.4);

    /* Locked field tokens (disabled / readonly / plan-locked) */
    --locked-bg: rgba(0, 0, 0, 0.05);
    --locked-text: #86868b;
    --locked-border: rgba(0, 0, 0, 0.1);
    --locked-opacity: 0.75;
}

/* Glass backdrop-filter for key surfaces */
[data-theme="liquid-glass"] .sidebar,
[data-theme="liquid-glass"] .modal-content,
[data-theme="liquid-glass"] .card,
[data-theme="liquid-glass"] .stat-card,
[data-theme="liquid-glass"] .project-card,
[data-theme="liquid-glass"] .task-card,
[data-theme="liquid-glass"] .kanban-card,
[data-theme="liquid-glass"] .kanban-column,
[data-theme="liquid-glass"] .member-card,
[data-theme="liquid-glass"] .invite-card,
[data-theme="liquid-glass"] .dict-item,
[data-theme="liquid-glass"] .attention-card,
[data-theme="liquid-glass"] .project-progress-card,
[data-theme="liquid-glass"] .comment-item,
[data-theme="liquid-glass"] .toast,
[data-theme="liquid-glass"] .notification,
[data-theme="liquid-glass"] .dropdown-menu,
[data-theme="liquid-glass"] .multi-select-dropdown,
[data-theme="liquid-glass"] .confirm-dialog {
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    border: var(--glass-border);
    box-shadow: var(--shadow), var(--glass-shine);
}

/* Glass inputs */
[data-theme="liquid-glass"] input,
[data-theme="liquid-glass"] select,
[data-theme="liquid-glass"] textarea,
[data-theme="liquid-glass"] .multi-select-trigger {
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="liquid-glass"] input:focus,
[data-theme="liquid-glass"] select:focus,
[data-theme="liquid-glass"] textarea:focus {
    background: rgba(255, 255, 255, 0.72);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

/* Modal glass overlay */
[data-theme="liquid-glass"] .modal {
    background: rgba(0, 0, 0, 0.2);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

/* Glass buttons - subtle */
[data-theme="liquid-glass"] .btn-secondary {
    background: rgba(255, 255, 255, 0.5);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="liquid-glass"] .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.72);
}

/* ==========================================
   DARK GLASS THEME
   ========================================== */
[data-theme="dark-glass"] {
    /* Base palette - deep dark with blue tint */
    --primary: #6cb4ee;
    --primary-dark: #4a9de0;
    --primary-light: #a3d4ff;
    --primary-hover: #4a9de0;
    --primary-muted: rgba(108, 180, 238, 0.12);

    --secondary: #8e8e93;
    --success: #30d158;
    --warning: #ff9f0a;
    --danger: #ff453a;

    /* Dark Glass Backgrounds */
    --bg-page: #0a0a0f;
    --bg: #0a0a0f;
    --bg-primary: rgba(30, 30, 40, 0.72);
    --bg-secondary: rgba(30, 30, 40, 0.55);
    --bg-tertiary: rgba(50, 50, 65, 0.5);
    --bg-hover: rgba(60, 60, 80, 0.6);
    --bg-active: rgba(80, 80, 100, 0.4);

    /* Dark Glass Cards */
    --card: rgba(30, 30, 40, 0.72);
    --card-hover: rgba(40, 40, 55, 0.8);

    /* Text */
    --text: #f0f0f5;
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0ab;
    --text-muted: #636370;

    /* Dark Glass Borders */
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.04);
    --border-hover: rgba(255, 255, 255, 0.15);
    --border-color: rgba(255, 255, 255, 0.08);

    /* Dark Elevated Shadows */
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.2), 0 0 1px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.25), 0 0 1px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 1px rgba(0, 0, 0, 0.4);

    /* Radius - rounded like liquid-glass */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;

    --link-color: #6cb4ee;

    /* Status Colors */
    --status-success: #30d158;
    --status-success-light: rgba(48, 209, 88, 0.15);
    --status-success-dark: #248a3d;
    --status-warning: #ff9f0a;
    --status-warning-light: rgba(255, 159, 10, 0.15);
    --status-warning-dark: #c77c00;
    --status-danger: #ff453a;
    --status-danger-light: rgba(255, 69, 58, 0.15);
    --status-danger-dark: #d70015;
    --status-info: #6cb4ee;
    --status-info-light: rgba(108, 180, 238, 0.12);

    /* Priority Colors */
    --priority-critical: #ff453a;
    --priority-high: #ff9f0a;
    --priority-medium: #ffd60a;
    --priority-low: #30d158;
    --priority-none: #636370;

    /* Misc */
    --color-purple: #bf5af2;
    --color-purple-light: rgba(191, 90, 242, 0.15);
    --color-gold: #ffd60a;
    --color-gold-light: rgba(255, 214, 10, 0.12);
    --color-white: #f0f0f5;
    --color-accent-gradient: linear-gradient(135deg, #30d158, #6cb4ee);

    --focus-ring: rgba(108, 180, 238, 0.4);
    --focus-ring-offset: rgba(108, 180, 238, 0.15);

    /* Billing */
    --billing-trial-bg: rgba(108, 180, 238, 0.1);
    --billing-trial-text: #6cb4ee;
    --billing-warning-bg: rgba(255, 159, 10, 0.1);
    --billing-warning-text: #ff9f0a;
    --billing-error-bg: rgba(255, 69, 58, 0.1);
    --billing-error-text: #ff453a;
    --billing-success-bg: rgba(48, 209, 88, 0.12);
    --billing-success-text: #30d158;
    --billing-refund-bg: rgba(191, 90, 242, 0.12);
    --billing-refund-text: #bf5af2;
    --billing-pending-text: #ff9f0a;
    --billing-gradient: linear-gradient(135deg, rgba(191, 90, 242, 0.08), rgba(108, 180, 238, 0.08));
    --billing-expiry-bg: rgba(255, 159, 10, 0.1);
    --billing-expiry-border: rgba(255, 159, 10, 0.3);

    /* Glass-specific */
    --glass-blur: 24px;
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-shine: inset 0 1px 0 rgba(255, 255, 255, 0.06);

    /* Locked field tokens (disabled / readonly / plan-locked) */
    --locked-bg: rgba(50, 50, 65, 0.6);
    --locked-text: #8e8e93;
    --locked-border: rgba(255, 255, 255, 0.08);
    --locked-opacity: 0.7;
}

/* Dark Glass backdrop-filter for key surfaces */
[data-theme="dark-glass"] .sidebar,
[data-theme="dark-glass"] .modal-content,
[data-theme="dark-glass"] .card,
[data-theme="dark-glass"] .stat-card,
[data-theme="dark-glass"] .project-card,
[data-theme="dark-glass"] .task-card,
[data-theme="dark-glass"] .kanban-card,
[data-theme="dark-glass"] .kanban-column,
[data-theme="dark-glass"] .member-card,
[data-theme="dark-glass"] .invite-card,
[data-theme="dark-glass"] .dict-item,
[data-theme="dark-glass"] .attention-card,
[data-theme="dark-glass"] .project-progress-card,
[data-theme="dark-glass"] .comment-item,
[data-theme="dark-glass"] .toast,
[data-theme="dark-glass"] .notification,
[data-theme="dark-glass"] .dropdown-menu,
[data-theme="dark-glass"] .multi-select-dropdown,
[data-theme="dark-glass"] .confirm-dialog {
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    border: var(--glass-border);
    box-shadow: var(--shadow), var(--glass-shine);
}

/* Dark Glass inputs */
[data-theme="dark-glass"] input,
[data-theme="dark-glass"] select,
[data-theme="dark-glass"] textarea,
[data-theme="dark-glass"] .multi-select-trigger {
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    background: rgba(30, 30, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark-glass"] input:focus,
[data-theme="dark-glass"] select:focus,
[data-theme="dark-glass"] textarea:focus {
    background: rgba(40, 40, 55, 0.8);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

/* Dark Glass modal overlay */
[data-theme="dark-glass"] .modal {
    background: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

/* Dark Glass secondary button */
[data-theme="dark-glass"] .btn-secondary {
    background: rgba(50, 50, 65, 0.5);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark-glass"] .btn-secondary:hover {
    background: rgba(60, 60, 80, 0.6);
}

/* ==========================================
   PINK GLASS THEME
   ========================================== */
[data-theme="pink-glass"] {
    /* Base palette - pink/rose */
    --primary: #ec4899;
    --primary-dark: #be185d;
    --primary-light: #f472b6;
    --primary-hover: #be185d;
    --primary-muted: rgba(236, 72, 153, 0.1);

    --secondary: #86868b;
    --success: #30d158;
    --warning: #ff9f0a;
    --danger: #ff3b30;

    /* Glass Backgrounds */
    --bg-page: #fdf2f8;
    --bg: #fdf2f8;
    --bg-primary: rgba(255, 255, 255, 0.72);
    --bg-secondary: rgba(255, 255, 255, 0.55);
    --bg-tertiary: rgba(255, 255, 255, 0.4);
    --bg-hover: rgba(255, 255, 255, 0.85);
    --bg-active: rgba(236, 72, 153, 0.06);

    /* Glass Cards */
    --card: rgba(255, 255, 255, 0.72);
    --card-hover: rgba(255, 255, 255, 0.85);

    /* Text */
    --text: #1d1d1f;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-muted: #aeaeb2;

    /* Glass Borders */
    --border: rgba(236, 72, 153, 0.08);
    --border-light: rgba(236, 72, 153, 0.04);
    --border-hover: rgba(236, 72, 153, 0.15);
    --border-color: rgba(236, 72, 153, 0.1);

    /* Glass Shadows */
    --shadow-sm: 0 1px 4px rgba(236, 72, 153, 0.06), 0 0 1px rgba(236, 72, 153, 0.08);
    --shadow: 0 4px 16px rgba(236, 72, 153, 0.08), 0 0 1px rgba(236, 72, 153, 0.1);
    --shadow-lg: 0 12px 40px rgba(236, 72, 153, 0.1), 0 0 1px rgba(236, 72, 153, 0.12);

    /* Radius */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;

    --link-color: #ec4899;

    /* Status Colors */
    --status-success: #30d158;
    --status-success-light: rgba(48, 209, 88, 0.12);
    --status-success-dark: #248a3d;
    --status-warning: #ff9f0a;
    --status-warning-light: rgba(255, 159, 10, 0.12);
    --status-warning-dark: #c77c00;
    --status-danger: #ff3b30;
    --status-danger-light: rgba(255, 59, 48, 0.12);
    --status-danger-dark: #d70015;
    --status-info: #ec4899;
    --status-info-light: rgba(236, 72, 153, 0.1);

    /* Priority Colors */
    --priority-critical: #ff3b30;
    --priority-high: #ff9500;
    --priority-medium: #ffcc00;
    --priority-low: #30d158;
    --priority-none: #aeaeb2;

    /* Misc */
    --color-purple: #af52de;
    --color-purple-light: rgba(175, 82, 222, 0.12);
    --color-gold: #c77c00;
    --color-gold-light: rgba(255, 159, 10, 0.12);
    --color-white: #ffffff;
    --color-accent-gradient: linear-gradient(135deg, #ec4899, #f472b6);

    --focus-ring: rgba(236, 72, 153, 0.4);
    --focus-ring-offset: rgba(236, 72, 153, 0.12);

    /* Billing */
    --billing-trial-bg: rgba(236, 72, 153, 0.08);
    --billing-trial-text: #be185d;
    --billing-warning-bg: rgba(255, 159, 10, 0.1);
    --billing-warning-text: #c77c00;
    --billing-error-bg: rgba(255, 59, 48, 0.1);
    --billing-error-text: #d70015;
    --billing-success-bg: rgba(48, 209, 88, 0.1);
    --billing-success-text: #248a3d;
    --billing-refund-bg: rgba(175, 82, 222, 0.1);
    --billing-refund-text: #8944ab;
    --billing-pending-text: #c77c00;
    --billing-gradient: linear-gradient(135deg, rgba(236, 72, 153, 0.08), rgba(175, 82, 222, 0.08));
    --billing-expiry-bg: rgba(255, 159, 10, 0.1);
    --billing-expiry-border: rgba(255, 159, 10, 0.3);

    /* Glass-specific */
    --glass-blur: 20px;
    --glass-border: 1px solid rgba(255, 255, 255, 0.2);
    --glass-shine: inset 0 1px 0 rgba(255, 255, 255, 0.4);

    /* Locked field tokens (disabled / readonly / plan-locked) */
    --locked-bg: rgba(236, 72, 153, 0.06);
    --locked-text: #86868b;
    --locked-border: rgba(236, 72, 153, 0.15);
    --locked-opacity: 0.75;
}

/* Pink Glass backdrop-filter for key surfaces */
[data-theme="pink-glass"] .sidebar,
[data-theme="pink-glass"] .modal-content,
[data-theme="pink-glass"] .card,
[data-theme="pink-glass"] .stat-card,
[data-theme="pink-glass"] .project-card,
[data-theme="pink-glass"] .task-card,
[data-theme="pink-glass"] .kanban-card,
[data-theme="pink-glass"] .kanban-column,
[data-theme="pink-glass"] .member-card,
[data-theme="pink-glass"] .invite-card,
[data-theme="pink-glass"] .dict-item,
[data-theme="pink-glass"] .attention-card,
[data-theme="pink-glass"] .project-progress-card,
[data-theme="pink-glass"] .comment-item,
[data-theme="pink-glass"] .toast,
[data-theme="pink-glass"] .notification,
[data-theme="pink-glass"] .dropdown-menu,
[data-theme="pink-glass"] .multi-select-dropdown,
[data-theme="pink-glass"] .confirm-dialog {
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    border: var(--glass-border);
    box-shadow: var(--shadow), var(--glass-shine);
}

/* Pink Glass inputs */
[data-theme="pink-glass"] input,
[data-theme="pink-glass"] select,
[data-theme="pink-glass"] textarea,
[data-theme="pink-glass"] .multi-select-trigger {
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(236, 72, 153, 0.06);
}

[data-theme="pink-glass"] input:focus,
[data-theme="pink-glass"] select:focus,
[data-theme="pink-glass"] textarea:focus {
    background: rgba(255, 255, 255, 0.72);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

/* Pink Glass modal overlay */
[data-theme="pink-glass"] .modal {
    background: rgba(236, 72, 153, 0.1);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

/* Pink Glass secondary button */
[data-theme="pink-glass"] .btn-secondary {
    background: rgba(255, 255, 255, 0.5);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(236, 72, 153, 0.06);
}

[data-theme="pink-glass"] .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.72);
}

/* ==========================================
   ULTRALIGHT THEME (Linear-inspired — cool, plotный, signature purple)
   ========================================== */
[data-theme="ultralight"] {
    /* Base palette — Linear signature purple */
    --primary: #5e6ad2;
    --primary-dark: #4f59c2;
    --primary-light: #8b94e8;
    --primary-hover: #4f59c2;
    --primary-muted: rgba(94, 106, 210, 0.1);

    --secondary: #6f7177;
    --success: #1aaf6c;
    --warning: #f2994a;
    --danger: #eb5757;

    /* Backgrounds — холодные, с лёгкой синевой; сайдбар заметно темнее */
    --bg-page: #fafbfc;
    --bg: #fafbfc;
    --bg-primary: #ffffff;
    --bg-secondary: #f3f4f8;
    --bg-tertiary: #ebecf0;
    --bg-hover: #ebecf0;
    --bg-active: #dfe1e6;

    /* Cards */
    --card: #ffffff;
    --card-hover: #f7f8fa;

    /* Text — холодный near-black, как у Linear */
    --text: #1f2023;
    --text-primary: #1f2023;
    --text-secondary: #6f7177;
    --text-muted: #9ea0a5;

    /* Borders — холодные hairline'ы, чуть видимее чем airy-вариант */
    --border: rgba(15, 17, 22, 0.07);
    --border-light: rgba(15, 17, 22, 0.04);
    --border-hover: rgba(15, 17, 22, 0.14);
    --border-color: rgba(15, 17, 22, 0.08);

    /* Shadows — едва заметные, чуть холодные */
    --shadow-sm: 0 1px 0 rgba(15, 17, 22, 0.04);
    --shadow: 0 2px 8px rgba(15, 17, 22, 0.06);
    --shadow-lg: 0 8px 24px rgba(15, 17, 22, 0.08);

    /* Radius — Linear использует плотный 6px */
    --radius-sm: 4px;
    --radius: 6px;
    --radius-lg: 8px;
    --radius-md: 8px;
    --radius-pill: 9999px;

    /* Link — фирменный фиолетовый */
    --link-color: #5e6ad2;

    /* Status — Linear-палитра, чуть desaturated */
    --status-success: #1aaf6c;
    --status-success-light: rgba(26, 175, 108, 0.12);
    --status-success-dark: #0e8a52;
    --status-warning: #f2994a;
    --status-warning-light: rgba(242, 153, 74, 0.14);
    --status-warning-dark: #c97a2e;
    --status-danger: #eb5757;
    --status-danger-light: rgba(235, 87, 87, 0.12);
    --status-danger-dark: #c0392b;
    --status-info: #5e6ad2;
    --status-info-light: rgba(94, 106, 210, 0.1);

    /* Priority */
    --priority-critical: #eb5757;
    --priority-high: #f2994a;
    --priority-medium: #f2c94c;
    --priority-low: #1aaf6c;
    --priority-none: #9ea0a5;

    /* Misc semantic — фиолетовая семья доминирует */
    --color-purple: #6f5be8;
    --color-purple-light: rgba(111, 91, 232, 0.12);
    --color-gold: #c97a2e;
    --color-gold-light: rgba(242, 153, 74, 0.14);
    --color-white: #ffffff;
    --color-accent-gradient: linear-gradient(135deg, #5e6ad2, #8b94e8);

    /* Focus ring — Linear-purple */
    --focus-ring: rgba(94, 106, 210, 0.4);
    --focus-ring-offset: rgba(94, 106, 210, 0.12);

    /* Billing */
    --billing-trial-bg: rgba(94, 106, 210, 0.08);
    --billing-trial-text: #4f59c2;
    --billing-warning-bg: rgba(242, 153, 74, 0.1);
    --billing-warning-text: #c97a2e;
    --billing-error-bg: rgba(235, 87, 87, 0.1);
    --billing-error-text: #c0392b;
    --billing-success-bg: rgba(26, 175, 108, 0.1);
    --billing-success-text: #0e8a52;
    --billing-refund-bg: rgba(111, 91, 232, 0.1);
    --billing-refund-text: #5340c2;
    --billing-pending-text: #c97a2e;
    --billing-gradient: linear-gradient(135deg, rgba(94, 106, 210, 0.08), rgba(111, 91, 232, 0.06));
    --billing-expiry-bg: rgba(242, 153, 74, 0.1);
    --billing-expiry-border: rgba(242, 153, 74, 0.3);

    /* Gantt */
    --gantt-bar-todo: #c4c6cc;
    --gantt-bar-in-progress: #5e6ad2;
    --gantt-bar-review: #f2994a;
    --gantt-bar-done: #1aaf6c;
    --gantt-bar-critical: #eb5757;
    --gantt-bar-label: #ffffff;
    --gantt-today: #5e6ad2;
    --gantt-link: #9ea0a5;

    /* Timer */
    --timer-running-bg: rgba(235, 87, 87, 0.1);
    --timer-running-border: rgba(235, 87, 87, 0.28);
    --timer-running-text: #c0392b;

    /* Locked field tokens */
    --locked-bg: #f3f4f8;
    --locked-text: #9ea0a5;
    --locked-border: rgba(15, 17, 22, 0.08);
    --locked-opacity: 0.7;

    /* Компактность — ключевая черта Linear: маленькие контролы, плотные отступы */
    --size-sm: 22px;
    --size-md: 26px;
    --size-lg: 30px;
    --checkbox-size: 14px;

    /* Tight line-heights */
    --lh-normal: 1.4;
    --lh-relaxed: 1.5;

    /* Уменьшенный body-text (--fs-md): 13px → 12px */
    --fs-md: 0.75rem;

    /* Spacing — уменьшены ключевые шаги для плотных padding/gap */
    --sp-2: 6px;
    --sp-3: 10px;
    --sp-4: 12px;
    --sp-5: 16px;
    --sp-6: 20px;
    --sp-8: 28px;
}

/* Sidebar заметно холоднее основного фона — характерный приём Linear */
[data-theme="ultralight"] .sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
}

/* Kanban-колонки тоже на холодном фоне, чтобы карточки внутри читались */
[data-theme="ultralight"] .kanban-column {
    background: var(--bg-secondary);
}

/* Компактные кнопки и инпуты */
[data-theme="ultralight"] .btn,
[data-theme="ultralight"] button.btn-primary,
[data-theme="ultralight"] button.btn-secondary,
[data-theme="ultralight"] button.btn-ghost {
    padding: 4px 10px;
    min-height: var(--size-md);
    font-size: var(--fs-base);
}

[data-theme="ultralight"] input,
[data-theme="ultralight"] select,
[data-theme="ultralight"] textarea {
    padding: 4px 8px;
    min-height: var(--size-md);
    font-size: var(--fs-base);
}

[data-theme="ultralight"] textarea {
    min-height: auto;
}

/* Карточки задач — плотнее */
[data-theme="ultralight"] .task-card,
[data-theme="ultralight"] .kanban-card {
    padding: var(--sp-3);
}

/* Модалки — узкий заголовок */
[data-theme="ultralight"] .modal-header {
    padding: var(--sp-3) var(--sp-4);
}
[data-theme="ultralight"] .modal-body {
    padding: var(--sp-4);
}

/* ==========================================
   TERMINAL THEME (инженерный/терминал)
   Графит + оранж, единый язык с маркетинг-сайтом.
   Плоский: hairline-границы, острые углы, без blur.
   Работает через переменные (как штатная dark),
   плюс подписные scoped-правила ниже.
   ========================================== */
[data-theme="terminal"] {
    /* Fonts: Unbounded (заголовки) / IBM Plex Sans (плотный текст) / JetBrains Mono (ID, код) */
    --font-display: 'Unbounded', 'Arial Black', sans-serif;
    --font-sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, Menlo, Monaco, monospace;

    /* Единственный тёплый акцент — оранж */
    --primary: #ff5c35;
    --primary-dark: #e0431f;
    --primary-light: #ff7a5c;
    --primary-hover: #ff7a5c;
    --primary-muted: rgba(255, 92, 53, 0.14);

    --secondary: #8b909b;
    --success: #28c840;
    --warning: #febc2e;
    --danger: #ff5f57;

    /* Поверхности — графит */
    --bg-page: #0a0b0d;
    --bg: #0d0f12;
    --bg-primary: #0d0f12;
    --bg-secondary: #101216;
    --bg-tertiary: #16191f;
    --bg-hover: #1e2127;
    --bg-active: #2a2e36;

    --card: #101216;
    --card-hover: #16191f;

    --text: #eceef2;
    --text-primary: #eceef2;
    --text-secondary: #8b909b;
    --text-muted: #5b606b;

    /* Hairline-границы */
    --border: #1e2127;
    --border-light: #16191f;
    --border-hover: #3a3f49;
    --border-color: #2a2e36;

    /* Минимум теней */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.6);

    /* Острые углы */
    --radius-sm: 0px;
    --radius: 2px;
    --radius-lg: 3px;
    --radius-md: 3px;
    --radius-pill: 9999px;

    --link-color: #ff7a5c;

    /* Координатная сетка фона */
    --grid-line: rgba(255, 255, 255, 0.022);

    /* Status Colors */
    --status-success: #28c840;
    --status-success-light: rgba(40, 200, 64, 0.16);
    --status-success-dark: #1f9e32;
    --status-warning: #febc2e;
    --status-warning-light: rgba(254, 188, 46, 0.16);
    --status-warning-dark: #d99a16;
    --status-danger: #ff5f57;
    --status-danger-light: rgba(255, 95, 87, 0.16);
    --status-danger-dark: #e0463e;
    --status-info: #4a9eff;
    --status-info-light: rgba(74, 158, 255, 0.16);

    /* Priority Colors */
    --priority-critical: #ff5f57;
    --priority-high: #ff8a3c;
    --priority-medium: #febc2e;
    --priority-low: #28c840;
    --priority-none: #5b606b;

    /* Misc Semantic */
    --color-purple: #b39dff;
    --color-purple-light: rgba(124, 58, 237, 0.16);
    --color-gold: #febc2e;
    --color-gold-light: rgba(254, 188, 46, 0.16);
    --color-white: #eceef2;
    --color-accent-gradient: linear-gradient(90deg, #ff5c35, #ff7a5c);

    /* Focus Ring */
    --focus-ring: rgba(255, 92, 53, 0.4);
    --focus-ring-offset: rgba(255, 92, 53, 0.15);

    /* Billing Colors */
    --billing-trial-bg: #11233a;
    --billing-trial-text: #7cc4ff;
    --billing-warning-bg: #3a2a10;
    --billing-warning-text: #febc2e;
    --billing-error-bg: #3a1614;
    --billing-error-text: #ff8d86;
    --billing-success-bg: rgba(40, 200, 64, 0.16);
    --billing-success-text: #28c840;
    --billing-refund-bg: rgba(255, 92, 53, 0.14);
    --billing-refund-text: #ff7a5c;
    --billing-pending-text: #febc2e;
    --billing-gradient: linear-gradient(135deg, #16191f, #101216);
    --billing-expiry-bg: #3a2a10;
    --billing-expiry-border: #6b4d12;

    /* Gantt Colors */
    --gantt-bar-todo: #5b606b;
    --gantt-bar-in-progress: #4a9eff;
    --gantt-bar-review: #febc2e;
    --gantt-bar-done: #28c840;
    --gantt-bar-critical: #ff5f57;
    --gantt-bar-label: #eceef2;
    --gantt-today: #ff5c35;
    --gantt-link: #5b606b;

    /* Timer Colors */
    --timer-running-bg: rgba(255, 95, 87, 0.16);
    --timer-running-border: rgba(255, 95, 87, 0.3);
    --timer-running-text: #ff8d86;

    /* Locked field tokens */
    --locked-bg: #16191f;
    --locked-text: #5b606b;
    --locked-border: #1e2127;
    --locked-opacity: 0.7;
}

/* Подпись: координатная сетка фона + читаемый sans для плотного текста */
[data-theme="terminal"] body {
    background-color: var(--bg-page);
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 64px 64px;
    background-position: center top;
    font-family: var(--font-sans);
}

/* Крупные заголовки — Unbounded; мелкие (h3/h4, тайтлы карточек) оставляем
   в читаемом sans ради плотности списков */
[data-theme="terminal"] h1,
[data-theme="terminal"] h2,
[data-theme="terminal"] .page-title,
[data-theme="terminal"] .modal-title,
[data-theme="terminal"] .section-title,
[data-theme="terminal"] .wiki-content h1,
[data-theme="terminal"] .wiki-content h2 {
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}

/* Моноширинный для ID задач, кода, клавиш — терминальный акцент */
[data-theme="terminal"] [class*="task-id"],
[data-theme="terminal"] .kanban-card-id,
[data-theme="terminal"] code,
[data-theme="terminal"] kbd,
[data-theme="terminal"] pre,
[data-theme="terminal"] samp {
    font-family: var(--font-mono);
}
