:root,
.theme-quantdesk-light {
    --bg: #f4f7fb;
    --card-bg: #ffffff;
    --text: #122033;
    --muted: #64748b;
    --primary: #2563eb;
    --success: #0f9f6e;
    --danger: #dc2626;
    --warning: #d98a05;
    --border: #dbe4ef;
    --sidebar-bg: linear-gradient(180deg, #0e2747 0%, #102f56 100%);
    --table-header-bg: #e8f1ff;
    --topbar-bg: rgba(255, 255, 255, 0.94);
    --input-bg: #ffffff;
    --shadow: 0 18px 50px rgba(15, 39, 71, 0.09);
    --gradient: linear-gradient(135deg, #2563eb 0%, #0f9f6e 100%);
    --button-text: #ffffff;
    --soft-primary: #edf5ff;
    --surface-strong: #f0f5fb;
    --sidebar-link-bg: rgba(255, 255, 255, 0.12);
    --sidebar-link-text: rgba(255, 255, 255, 0.78);
    --sidebar-text: #ffffff;
    --sidebar-muted: rgba(255, 255, 255, 0.68);
    --focus-ring: rgba(37, 99, 235, 0.14);
    --hero-surface: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
    --market-up-dark: #006b3c;
    --market-down-dark: #9b111e;
    --market-up-bg: rgba(0, 107, 60, 0.11);
    --market-down-bg: rgba(155, 17, 30, 0.11);
}

.theme-quantdesk-dark {
    --bg: #07111f;
    --card-bg: #101d2e;
    --text: #f3f7fb;
    --muted: #91a4bb;
    --primary: #38bdf8;
    --success: #22c55e;
    --danger: #f87171;
    --warning: #fbbf24;
    --border: #22354d;
    --sidebar-bg: linear-gradient(180deg, #04101f 0%, #071827 55%, #0b1424 100%);
    --table-header-bg: #14263b;
    --topbar-bg: rgba(9, 18, 32, 0.93);
    --input-bg: #0c1726;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
    --gradient: linear-gradient(135deg, #38bdf8 0%, #2563eb 52%, #22c55e 100%);
    --button-text: #06111f;
    --soft-primary: rgba(56, 189, 248, 0.12);
    --surface-strong: #0c1726;
    --sidebar-link-bg: rgba(56, 189, 248, 0.12);
    --sidebar-link-text: rgba(227, 242, 255, 0.76);
    --sidebar-text: #f3f7fb;
    --sidebar-muted: rgba(203, 213, 225, 0.68);
    --focus-ring: rgba(56, 189, 248, 0.18);
    --hero-surface: linear-gradient(180deg, #0d1b2e 0%, #07111f 100%);
    --market-up-dark: #33d08a;
    --market-down-dark: #ff6b7a;
    --market-up-bg: rgba(51, 208, 138, 0.15);
    --market-down-bg: rgba(255, 107, 122, 0.15);
}

.theme-neon-crypto {
    --bg: linear-gradient(135deg, #090b1a 0%, #10132b 45%, #180d2a 100%);
    --card-bg: rgba(18, 24, 48, 0.76);
    --text: #f7f8ff;
    --muted: #aab3d6;
    --primary: #22d3ee;
    --success: #34d399;
    --danger: #fb7185;
    --warning: #fde047;
    --border: rgba(125, 211, 252, 0.24);
    --sidebar-bg: linear-gradient(180deg, rgba(10, 13, 29, 0.96) 0%, rgba(16, 19, 43, 0.94) 58%, rgba(31, 13, 51, 0.96) 100%);
    --table-header-bg: rgba(34, 211, 238, 0.14);
    --topbar-bg: rgba(11, 15, 34, 0.78);
    --input-bg: rgba(15, 23, 42, 0.78);
    --shadow: 0 20px 80px rgba(34, 211, 238, 0.14);
    --gradient: linear-gradient(135deg, #22d3ee 0%, #a855f7 52%, #ec4899 100%);
    --button-text: #06111f;
    --soft-primary: rgba(34, 211, 238, 0.12);
    --surface-strong: rgba(23, 31, 58, 0.82);
    --sidebar-link-bg: rgba(168, 85, 247, 0.18);
    --sidebar-link-text: rgba(241, 245, 249, 0.78);
    --sidebar-text: #ffffff;
    --sidebar-muted: rgba(218, 226, 255, 0.66);
    --focus-ring: rgba(34, 211, 238, 0.2);
    --hero-surface: linear-gradient(135deg, rgba(34, 211, 238, 0.12) 0%, rgba(168, 85, 247, 0.14) 54%, rgba(236, 72, 153, 0.12) 100%);
    --market-up-dark: #36f2a2;
    --market-down-dark: #ff5c8a;
    --market-up-bg: rgba(54, 242, 162, 0.16);
    --market-down-bg: rgba(255, 92, 138, 0.16);
}

.theme-emerald-matrix {
    --bg: linear-gradient(135deg, #02130d 0%, #06251a 48%, #0c1d16 100%);
    --card-bg: rgba(8, 38, 28, 0.86);
    --text: #ecfff6;
    --muted: #91cbb4;
    --primary: #34d399;
    --success: #22c55e;
    --danger: #ff6b6b;
    --warning: #facc15;
    --border: rgba(52, 211, 153, 0.28);
    --sidebar-bg: linear-gradient(180deg, #03120c 0%, #062217 58%, #0c2f20 100%);
    --table-header-bg: rgba(52, 211, 153, 0.16);
    --topbar-bg: rgba(3, 18, 12, 0.86);
    --input-bg: rgba(4, 25, 18, 0.88);
    --shadow: 0 20px 70px rgba(6, 95, 70, 0.24);
    --gradient: linear-gradient(135deg, #34d399 0%, #0f766e 56%, #84cc16 100%);
    --button-text: #04130d;
    --soft-primary: rgba(52, 211, 153, 0.14);
    --surface-strong: rgba(6, 45, 32, 0.9);
    --sidebar-link-bg: rgba(52, 211, 153, 0.14);
    --sidebar-link-text: rgba(236, 255, 246, 0.78);
    --sidebar-text: #f7fff9;
    --sidebar-muted: rgba(188, 231, 213, 0.68);
    --focus-ring: rgba(52, 211, 153, 0.2);
    --hero-surface: linear-gradient(135deg, rgba(52, 211, 153, 0.16) 0%, rgba(6, 95, 70, 0.2) 56%, rgba(132, 204, 22, 0.12) 100%);
    --market-up-dark: #3cffaa;
    --market-down-dark: #ff7676;
    --market-up-bg: rgba(60, 255, 170, 0.16);
    --market-down-bg: rgba(255, 118, 118, 0.16);
}

.theme-royal-gold {
    --bg: linear-gradient(135deg, #080b20 0%, #111944 48%, #2b2110 100%);
    --card-bg: rgba(16, 24, 58, 0.88);
    --text: #fff8e8;
    --muted: #c9c2ae;
    --primary: #f4c430;
    --success: #2dd4bf;
    --danger: #fb7185;
    --warning: #f59e0b;
    --border: rgba(244, 196, 48, 0.3);
    --sidebar-bg: linear-gradient(180deg, #070a1c 0%, #111a46 62%, #281e0d 100%);
    --table-header-bg: rgba(244, 196, 48, 0.18);
    --topbar-bg: rgba(8, 11, 32, 0.88);
    --input-bg: rgba(11, 16, 42, 0.9);
    --shadow: 0 22px 72px rgba(244, 196, 48, 0.16);
    --gradient: linear-gradient(135deg, #f4c430 0%, #6366f1 52%, #2dd4bf 100%);
    --button-text: #101010;
    --soft-primary: rgba(244, 196, 48, 0.14);
    --surface-strong: rgba(23, 31, 73, 0.9);
    --sidebar-link-bg: rgba(244, 196, 48, 0.14);
    --sidebar-link-text: rgba(255, 248, 232, 0.78);
    --sidebar-text: #fff8e8;
    --sidebar-muted: rgba(232, 224, 202, 0.66);
    --focus-ring: rgba(244, 196, 48, 0.2);
    --hero-surface: linear-gradient(135deg, rgba(244, 196, 48, 0.15) 0%, rgba(99, 102, 241, 0.14) 58%, rgba(45, 212, 191, 0.12) 100%);
    --market-up-dark: #36e0c7;
    --market-down-dark: #ff758f;
    --market-up-bg: rgba(54, 224, 199, 0.16);
    --market-down-bg: rgba(255, 117, 143, 0.16);
}

.theme-sunset-terminal {
    --bg: linear-gradient(135deg, #fff7ed 0%, #ffe3d2 50%, #e0f7f4 100%);
    --card-bg: rgba(255, 255, 255, 0.9);
    --text: #2a1d1a;
    --muted: #76635d;
    --primary: #ea580c;
    --success: #0f9f6e;
    --danger: #c0263b;
    --warning: #ca8a04;
    --border: #efc7b1;
    --sidebar-bg: linear-gradient(180deg, #7c2d12 0%, #b45309 52%, #0f766e 100%);
    --table-header-bg: #ffe4d5;
    --topbar-bg: rgba(255, 251, 247, 0.94);
    --input-bg: #fffaf5;
    --shadow: 0 18px 56px rgba(124, 45, 18, 0.14);
    --gradient: linear-gradient(135deg, #ea580c 0%, #f59e0b 50%, #0f766e 100%);
    --button-text: #ffffff;
    --soft-primary: #fff0e5;
    --surface-strong: #fff4ed;
    --sidebar-link-bg: rgba(255, 255, 255, 0.16);
    --sidebar-link-text: rgba(255, 255, 255, 0.82);
    --sidebar-text: #ffffff;
    --sidebar-muted: rgba(255, 255, 255, 0.72);
    --focus-ring: rgba(234, 88, 12, 0.16);
    --hero-surface: linear-gradient(135deg, #fff7ed 0%, #fed7aa 52%, #ccfbf1 100%);
    --market-up-dark: #057a55;
    --market-down-dark: #b91c1c;
    --market-up-bg: rgba(5, 122, 85, 0.12);
    --market-down-bg: rgba(185, 28, 28, 0.12);
}

.theme-aurora-motion {
    --bg: #05121f;
    --card-bg: rgba(7, 23, 42, 0.86);
    --text: #f4fbff;
    --muted: #b3c8dd;
    --primary: #67e8f9;
    --success: #5eead4;
    --danger: #ff7a90;
    --warning: #fde68a;
    --border: rgba(103, 232, 249, 0.28);
    --sidebar-bg: linear-gradient(180deg, rgba(3, 12, 25, 0.96) 0%, rgba(9, 28, 54, 0.94) 56%, rgba(18, 35, 78, 0.96) 100%);
    --table-header-bg: rgba(103, 232, 249, 0.15);
    --topbar-bg: rgba(5, 18, 31, 0.84);
    --input-bg: rgba(6, 18, 34, 0.92);
    --shadow: 0 24px 80px rgba(103, 232, 249, 0.18);
    --gradient: linear-gradient(135deg, #67e8f9 0%, #8b5cf6 50%, #5eead4 100%);
    --button-text: #03111f;
    --soft-primary: rgba(103, 232, 249, 0.13);
    --surface-strong: rgba(10, 30, 56, 0.9);
    --sidebar-link-bg: rgba(103, 232, 249, 0.13);
    --sidebar-link-text: rgba(244, 251, 255, 0.8);
    --sidebar-text: #ffffff;
    --sidebar-muted: rgba(214, 232, 247, 0.68);
    --focus-ring: rgba(103, 232, 249, 0.22);
    --hero-surface: linear-gradient(135deg, rgba(103, 232, 249, 0.16) 0%, rgba(139, 92, 246, 0.16) 50%, rgba(94, 234, 212, 0.14) 100%);
    --market-up-dark: #62ffd7;
    --market-down-dark: #ff849a;
    --market-up-bg: rgba(98, 255, 215, 0.16);
    --market-down-bg: rgba(255, 132, 154, 0.16);
    --theme-glow-band: rgba(103, 232, 249, 0.22);
}

.theme-cinematic-pulse {
    --bg: #100b18;
    --card-bg: rgba(25, 20, 38, 0.88);
    --text: #fff7f0;
    --muted: #d4c4ba;
    --primary: #ffb86b;
    --success: #7dd3fc;
    --danger: #ff6d8a;
    --warning: #fde047;
    --border: rgba(255, 184, 107, 0.3);
    --sidebar-bg: linear-gradient(180deg, rgba(14, 9, 22, 0.98) 0%, rgba(43, 24, 48, 0.96) 55%, rgba(84, 31, 43, 0.96) 100%);
    --table-header-bg: rgba(255, 184, 107, 0.16);
    --topbar-bg: rgba(17, 12, 25, 0.86);
    --input-bg: rgba(20, 14, 30, 0.92);
    --shadow: 0 26px 84px rgba(255, 101, 132, 0.16);
    --gradient: linear-gradient(135deg, #ffb86b 0%, #f43f5e 50%, #7c3aed 100%);
    --button-text: #160b12;
    --soft-primary: rgba(255, 184, 107, 0.14);
    --surface-strong: rgba(38, 28, 52, 0.92);
    --sidebar-link-bg: rgba(255, 184, 107, 0.14);
    --sidebar-link-text: rgba(255, 247, 240, 0.8);
    --sidebar-text: #fff7f0;
    --sidebar-muted: rgba(240, 219, 207, 0.68);
    --focus-ring: rgba(255, 184, 107, 0.22);
    --hero-surface: linear-gradient(135deg, rgba(255, 184, 107, 0.16) 0%, rgba(244, 63, 94, 0.14) 52%, rgba(124, 58, 237, 0.16) 100%);
    --market-up-dark: #8be9fd;
    --market-down-dark: #ff7f99;
    --market-up-bg: rgba(139, 233, 253, 0.16);
    --market-down-bg: rgba(255, 127, 153, 0.16);
    --theme-glow-band: rgba(255, 184, 107, 0.2);
}

.theme-cinematic-light {
    --bg: #f7fbff;
    --card-bg: rgba(255, 255, 255, 0.92);
    --text: #172033;
    --muted: #617087;
    --primary: #3b82f6;
    --success: #059669;
    --danger: #dc2f5a;
    --warning: #b7791f;
    --border: rgba(59, 130, 246, 0.24);
    --sidebar-bg: linear-gradient(180deg, rgba(33, 85, 166, 0.96) 0%, rgba(80, 70, 180, 0.94) 58%, rgba(14, 116, 144, 0.94) 100%);
    --table-header-bg: rgba(59, 130, 246, 0.13);
    --topbar-bg: rgba(255, 255, 255, 0.86);
    --input-bg: rgba(255, 255, 255, 0.96);
    --shadow: 0 24px 76px rgba(59, 130, 246, 0.16);
    --gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #14b8a6 100%);
    --button-text: #ffffff;
    --soft-primary: rgba(59, 130, 246, 0.12);
    --surface-strong: rgba(235, 245, 255, 0.9);
    --sidebar-link-bg: rgba(255, 255, 255, 0.16);
    --sidebar-link-text: rgba(255, 255, 255, 0.84);
    --sidebar-text: #ffffff;
    --sidebar-muted: rgba(255, 255, 255, 0.72);
    --focus-ring: rgba(59, 130, 246, 0.18);
    --hero-surface: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(139, 92, 246, 0.12) 52%, rgba(20, 184, 166, 0.11) 100%);
    --market-up-dark: #047857;
    --market-down-dark: #b91c3c;
    --market-up-bg: rgba(4, 120, 87, 0.12);
    --market-down-bg: rgba(185, 28, 60, 0.12);
    --theme-glow-band: rgba(59, 130, 246, 0.2);
}

.theme-cinematic-dark {
    --bg: #050814;
    --card-bg: rgba(9, 15, 32, 0.9);
    --text: #eef6ff;
    --muted: #9eb0c8;
    --primary: #60a5fa;
    --success: #34d399;
    --danger: #f87171;
    --warning: #fbbf24;
    --border: rgba(96, 165, 250, 0.28);
    --sidebar-bg: linear-gradient(180deg, rgba(3, 7, 18, 0.98) 0%, rgba(10, 22, 48, 0.96) 56%, rgba(18, 12, 48, 0.96) 100%);
    --table-header-bg: rgba(96, 165, 250, 0.15);
    --topbar-bg: rgba(5, 8, 20, 0.86);
    --input-bg: rgba(7, 13, 28, 0.94);
    --shadow: 0 26px 84px rgba(37, 99, 235, 0.18);
    --gradient: linear-gradient(135deg, #60a5fa 0%, #22d3ee 48%, #6366f1 100%);
    --button-text: #061020;
    --soft-primary: rgba(96, 165, 250, 0.14);
    --surface-strong: rgba(13, 24, 48, 0.94);
    --sidebar-link-bg: rgba(96, 165, 250, 0.14);
    --sidebar-link-text: rgba(238, 246, 255, 0.82);
    --sidebar-text: #eef6ff;
    --sidebar-muted: rgba(197, 213, 232, 0.68);
    --focus-ring: rgba(96, 165, 250, 0.22);
    --hero-surface: linear-gradient(135deg, rgba(96, 165, 250, 0.16) 0%, rgba(34, 211, 238, 0.12) 50%, rgba(99, 102, 241, 0.14) 100%);
    --market-up-dark: #48f5b5;
    --market-down-dark: #ff7d7d;
    --market-up-bg: rgba(72, 245, 181, 0.15);
    --market-down-bg: rgba(255, 125, 125, 0.15);
    --theme-glow-band: rgba(96, 165, 250, 0.22);
}

.theme-emerald-matrix,
.theme-royal-gold,
.theme-sunset-terminal {
    --bs-body-color: var(--text);
    --bs-border-color: var(--border);
    --bs-emphasis-color: var(--text);
    --bs-heading-color: var(--text);
    --bs-secondary-color: var(--muted);
    --bs-tertiary-bg: var(--surface-strong);
    --bs-primary: var(--primary);
    --bs-success: var(--success);
    --bs-danger: var(--danger);
    --bs-warning: var(--warning);
}

:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .table {
    --bs-table-bg: transparent;
    --bs-table-accent-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--border);
    --bs-table-striped-bg: color-mix(in srgb, var(--surface-strong) 72%, transparent);
    --bs-table-striped-color: var(--text);
    --bs-table-hover-bg: color-mix(in srgb, var(--primary) 10%, var(--surface-strong));
    --bs-table-hover-color: var(--text);
    border-color: var(--border);
    color: var(--text);
}

:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .table thead th,
:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .table tfoot th,
:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .table tfoot td {
    background: var(--table-header-bg);
    border-color: var(--border);
    color: var(--text);
}

:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .table tbody tr {
    background: color-mix(in srgb, var(--card-bg) 86%, transparent);
}

:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .table tbody tr:hover {
    background: color-mix(in srgb, var(--primary) 10%, var(--card-bg));
}

:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .table td,
:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .table th {
    border-color: var(--border);
}

:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .form-control,
:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .form-select,
:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) textarea.form-control {
    background-color: var(--input-bg);
    border-color: var(--border);
    color: var(--text);
}

:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .form-control:focus,
:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .form-select:focus {
    background-color: var(--input-bg);
    border-color: var(--primary);
    color: var(--text);
    box-shadow: 0 0 0 0.2rem var(--focus-ring);
}

:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .form-control::placeholder {
    color: var(--muted);
    opacity: 0.85;
}

:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .form-control:disabled,
:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .form-control[readonly],
:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .form-select:disabled {
    background-color: var(--surface-strong);
    color: var(--muted);
}

:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .form-select option {
    background-color: var(--surface-strong);
    color: var(--text);
}

:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .form-control::file-selector-button,
:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .input-group-text {
    background-color: var(--surface-strong);
    border-color: var(--border);
    color: var(--text);
}

:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .form-check-input {
    background-color: var(--input-bg);
    border-color: var(--border);
}

:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .bg-light,
:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .text-bg-light {
    background-color: var(--surface-strong) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}

:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .modal-content,
:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .dropdown-menu,
:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .list-group-item,
:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .accordion-item,
:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .offcanvas {
    background-color: var(--card-bg);
    border-color: var(--border);
    color: var(--text);
}

:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .modal-header,
:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .modal-footer,
:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .dropdown-divider {
    border-color: var(--border);
}

:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .dropdown-item,
:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .page-link {
    background-color: var(--card-bg);
    border-color: var(--border);
    color: var(--text);
}

:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .dropdown-item:hover,
:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .dropdown-item:focus,
:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .page-link:hover {
    background-color: var(--soft-primary);
    border-color: var(--primary);
    color: var(--text);
}

:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--button-text);
}

:where(.theme-emerald-matrix, .theme-royal-gold) .btn-close {
    filter: invert(1) grayscale(100%);
}

:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .text-muted,
:where(.theme-emerald-matrix, .theme-royal-gold, .theme-sunset-terminal) .form-text {
    color: var(--muted) !important;
}

.theme-aurora-motion,
.theme-cinematic-pulse,
.theme-cinematic-light,
.theme-cinematic-dark {
    --bs-body-color: var(--text);
    --bs-border-color: var(--border);
    --bs-emphasis-color: var(--text);
    --bs-heading-color: var(--text);
    --bs-secondary-color: var(--muted);
    --bs-tertiary-bg: var(--surface-strong);
    --bs-primary: var(--primary);
    --bs-success: var(--success);
    --bs-danger: var(--danger);
    --bs-warning: var(--warning);
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .app-shell {
    background:
        radial-gradient(circle at 15% 18%, color-mix(in srgb, var(--primary) 26%, transparent), transparent 30%),
        radial-gradient(circle at 82% 14%, color-mix(in srgb, var(--danger) 16%, transparent), transparent 34%),
        radial-gradient(circle at 50% 88%, color-mix(in srgb, var(--success) 18%, transparent), transparent 32%),
        var(--bg);
    background-size: 140% 140%, 160% 160%, 150% 150%, auto;
    animation: theme-motion-pan 24s ease-in-out infinite alternate;
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .app-sidebar,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .app-topbar {
    backdrop-filter: blur(20px);
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .panel,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .metric-card,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dashboard-shortcut-card,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dashboard-limit-card,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dashboard-pnl-card,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dashboard-health-card,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dashboard-activity-row {
    position: relative;
    border-color: color-mix(in srgb, var(--primary) 34%, var(--border));
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: theme-motion-card-breathe 8s ease-in-out infinite;
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .panel::before,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .metric-card::before,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dashboard-shortcut-card::after,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dashboard-limit-card::after,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dashboard-pnl-card::after,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dashboard-health-card::after,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dashboard-activity-row::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(120deg, transparent 0%, var(--theme-glow-band) 45%, transparent 72%);
    opacity: 0.2;
    transform: translateX(-110%);
    animation: theme-motion-light-sweep 9s linear infinite;
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .panel:hover,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .metric-card:hover,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dashboard-hover-card:hover {
    border-color: color-mix(in srgb, var(--primary) 70%, var(--border));
    box-shadow: 0 28px 90px color-mix(in srgb, var(--primary) 22%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .btn-primary,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .btn-trade,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .brand-mark {
    box-shadow: 0 0 24px color-mix(in srgb, var(--primary) 28%, transparent);
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .table {
    --bs-table-bg: transparent;
    --bs-table-accent-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--border);
    --bs-table-striped-bg: color-mix(in srgb, var(--surface-strong) 72%, transparent);
    --bs-table-striped-color: var(--text);
    --bs-table-hover-bg: color-mix(in srgb, var(--primary) 10%, var(--surface-strong));
    --bs-table-hover-color: var(--text);
    border-color: var(--border);
    color: var(--text);
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .table thead th,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .table tfoot th,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .table tfoot td {
    background: var(--table-header-bg);
    border-color: var(--border);
    color: var(--text);
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .table tbody tr {
    background: color-mix(in srgb, var(--card-bg) 88%, transparent);
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .table tbody tr:hover {
    background: color-mix(in srgb, var(--primary) 10%, var(--card-bg));
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .table td,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .table th {
    border-color: var(--border);
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .form-control,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .form-select,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) textarea.form-control {
    background-color: var(--input-bg);
    border-color: var(--border);
    color: var(--text);
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .form-control:focus,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .form-select:focus {
    background-color: var(--input-bg);
    border-color: var(--primary);
    color: var(--text);
    box-shadow: 0 0 0 0.2rem var(--focus-ring);
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .form-control::placeholder {
    color: var(--muted);
    opacity: 0.86;
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .form-control:disabled,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .form-control[readonly],
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .form-select:disabled {
    background-color: var(--surface-strong);
    color: var(--muted);
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .form-select option {
    background-color: var(--surface-strong);
    color: var(--text);
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .form-control::file-selector-button,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .input-group-text {
    background-color: var(--surface-strong);
    border-color: var(--border);
    color: var(--text);
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .form-check-input {
    background-color: var(--input-bg);
    border-color: var(--border);
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .modal-content,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dropdown-menu,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .list-group-item,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .accordion-item,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .offcanvas,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .bg-light,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .text-bg-light {
    background-color: var(--card-bg) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dropdown-item,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .page-link {
    background-color: var(--card-bg);
    border-color: var(--border);
    color: var(--text);
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dropdown-item:hover,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dropdown-item:focus,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .page-link:hover {
    background-color: var(--soft-primary);
    border-color: var(--primary);
    color: var(--text);
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--button-text);
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-dark) .btn-close {
    filter: invert(1) grayscale(100%);
}

:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .text-muted,
:where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .form-text {
    color: var(--muted) !important;
}

@keyframes theme-motion-pan {
    0% {
        background-position: 0% 0%, 100% 0%, 50% 100%, 0 0;
    }
    100% {
        background-position: 100% 28%, 0% 35%, 54% 0%, 0 0;
    }
}

@keyframes theme-motion-card-breathe {
    0%,
    100% {
        filter: saturate(1);
    }
    50% {
        filter: saturate(1.08);
    }
}

@keyframes theme-motion-light-sweep {
    0% {
        transform: translateX(-115%);
    }
    42%,
    100% {
        transform: translateX(115%);
    }
}

@media (prefers-reduced-motion: reduce) {
    :where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .app-shell,
    :where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .panel,
    :where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .metric-card,
    :where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dashboard-shortcut-card,
    :where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dashboard-limit-card,
    :where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dashboard-pnl-card,
    :where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dashboard-health-card,
    :where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dashboard-activity-row,
    :where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .panel::before,
    :where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .metric-card::before,
    :where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dashboard-shortcut-card::after,
    :where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dashboard-limit-card::after,
    :where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dashboard-pnl-card::after,
    :where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dashboard-health-card::after,
    :where(.theme-aurora-motion, .theme-cinematic-pulse, .theme-cinematic-light, .theme-cinematic-dark) .dashboard-activity-row::before {
        animation: none;
    }
}

.theme-quantdesk-dark,
.theme-neon-crypto {
    --bs-body-color: var(--text);
    --bs-border-color: var(--border);
    --bs-emphasis-color: var(--text);
    --bs-heading-color: var(--text);
    --bs-secondary-color: var(--muted);
    --bs-tertiary-bg: var(--surface-strong);
    --bs-primary: var(--primary);
    --bs-success: var(--success);
    --bs-danger: var(--danger);
    --bs-warning: var(--warning);
}

.theme-quantdesk-dark .table,
.theme-neon-crypto .table {
    --bs-table-bg: transparent;
    --bs-table-accent-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--border);
    --bs-table-striped-bg: color-mix(in srgb, var(--surface-strong) 72%, transparent);
    --bs-table-striped-color: var(--text);
    --bs-table-hover-bg: color-mix(in srgb, var(--primary) 10%, var(--surface-strong));
    --bs-table-hover-color: var(--text);
    border-color: var(--border);
    color: var(--text);
}

.theme-quantdesk-dark .table thead th,
.theme-quantdesk-dark .table tfoot th,
.theme-quantdesk-dark .table tfoot td,
.theme-neon-crypto .table thead th,
.theme-neon-crypto .table tfoot th,
.theme-neon-crypto .table tfoot td {
    background: var(--table-header-bg);
    border-color: var(--border);
    color: var(--text);
}

.theme-quantdesk-dark .table tbody tr,
.theme-neon-crypto .table tbody tr {
    background: color-mix(in srgb, var(--card-bg) 86%, transparent);
}

.theme-quantdesk-dark .table tbody tr:hover,
.theme-neon-crypto .table tbody tr:hover {
    background: color-mix(in srgb, var(--primary) 10%, var(--card-bg));
}

.theme-quantdesk-dark .table td,
.theme-quantdesk-dark .table th,
.theme-neon-crypto .table td,
.theme-neon-crypto .table th {
    border-color: var(--border);
}

.theme-quantdesk-dark .form-control,
.theme-quantdesk-dark .form-select,
.theme-quantdesk-dark textarea.form-control,
.theme-neon-crypto .form-control,
.theme-neon-crypto .form-select,
.theme-neon-crypto textarea.form-control {
    background-color: var(--input-bg);
    border-color: var(--border);
    color: var(--text);
}

.theme-quantdesk-dark .form-control:focus,
.theme-quantdesk-dark .form-select:focus,
.theme-neon-crypto .form-control:focus,
.theme-neon-crypto .form-select:focus {
    background-color: var(--input-bg);
    border-color: var(--primary);
    color: var(--text);
    box-shadow: 0 0 0 0.2rem var(--focus-ring);
}

.theme-quantdesk-dark .form-control::placeholder,
.theme-neon-crypto .form-control::placeholder {
    color: var(--muted);
    opacity: 0.85;
}

.theme-quantdesk-dark .form-control:disabled,
.theme-quantdesk-dark .form-control[readonly],
.theme-quantdesk-dark .form-select:disabled,
.theme-neon-crypto .form-control:disabled,
.theme-neon-crypto .form-control[readonly],
.theme-neon-crypto .form-select:disabled {
    background-color: var(--surface-strong);
    color: var(--muted);
}

.theme-quantdesk-dark .form-select option,
.theme-neon-crypto .form-select option {
    background-color: var(--surface-strong);
    color: var(--text);
}

.theme-quantdesk-dark .form-control::file-selector-button,
.theme-neon-crypto .form-control::file-selector-button {
    background-color: var(--surface-strong);
    border-color: var(--border);
    color: var(--text);
}

.theme-quantdesk-dark .input-group-text,
.theme-neon-crypto .input-group-text {
    background-color: var(--surface-strong);
    border-color: var(--border);
    color: var(--text);
}

.theme-quantdesk-dark .form-check-input,
.theme-neon-crypto .form-check-input {
    background-color: var(--input-bg);
    border-color: var(--border);
}

.theme-quantdesk-dark .form-check-input:checked,
.theme-neon-crypto .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.theme-quantdesk-dark .bg-light,
.theme-quantdesk-dark .text-bg-light,
.theme-neon-crypto .bg-light,
.theme-neon-crypto .text-bg-light {
    background-color: var(--surface-strong) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}

.theme-quantdesk-dark .modal-content,
.theme-quantdesk-dark .dropdown-menu,
.theme-quantdesk-dark .list-group-item,
.theme-quantdesk-dark .accordion-item,
.theme-quantdesk-dark .offcanvas,
.theme-neon-crypto .modal-content,
.theme-neon-crypto .dropdown-menu,
.theme-neon-crypto .list-group-item,
.theme-neon-crypto .accordion-item,
.theme-neon-crypto .offcanvas {
    background-color: var(--card-bg);
    border-color: var(--border);
    color: var(--text);
}

.theme-quantdesk-dark .modal-header,
.theme-quantdesk-dark .modal-footer,
.theme-quantdesk-dark .dropdown-divider,
.theme-neon-crypto .modal-header,
.theme-neon-crypto .modal-footer,
.theme-neon-crypto .dropdown-divider {
    border-color: var(--border);
}

.theme-quantdesk-dark .dropdown-item,
.theme-neon-crypto .dropdown-item {
    color: var(--text);
}

.theme-quantdesk-dark .dropdown-item:hover,
.theme-quantdesk-dark .dropdown-item:focus,
.theme-neon-crypto .dropdown-item:hover,
.theme-neon-crypto .dropdown-item:focus {
    background-color: var(--soft-primary);
    color: var(--text);
}

.theme-quantdesk-dark .page-link,
.theme-neon-crypto .page-link {
    background-color: var(--card-bg);
    border-color: var(--border);
    color: var(--text);
}

.theme-quantdesk-dark .page-link:hover,
.theme-neon-crypto .page-link:hover {
    background-color: var(--soft-primary);
    border-color: var(--primary);
    color: var(--text);
}

.theme-quantdesk-dark .page-item.active .page-link,
.theme-neon-crypto .page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--button-text);
}

.theme-quantdesk-dark .btn-close,
.theme-neon-crypto .btn-close {
    filter: invert(1) grayscale(100%);
}

.theme-quantdesk-dark .text-muted,
.theme-quantdesk-dark .form-text,
.theme-neon-crypto .text-muted,
.theme-neon-crypto .form-text {
    color: var(--muted) !important;
}

.theme-quantdesk-dark.user-panel .metric-card,
.theme-quantdesk-dark.user-panel .panel {
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.34);
}

.theme-neon-crypto.user-panel .app-shell {
    background:
        linear-gradient(120deg, rgba(34, 211, 238, 0.08), transparent 34%),
        linear-gradient(240deg, rgba(236, 72, 153, 0.08), transparent 32%),
        var(--bg);
}

.theme-neon-crypto.user-panel .panel,
.theme-neon-crypto.user-panel .metric-card,
.theme-neon-crypto.user-panel .auth-card,
.theme-neon-crypto.user-panel .landing-panel {
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.theme-neon-crypto.user-panel .app-sidebar,
.theme-neon-crypto.user-panel .app-topbar {
    backdrop-filter: blur(20px);
}

.theme-neon-crypto.user-panel .brand-mark,
.theme-neon-crypto.user-panel .btn-primary,
.theme-neon-crypto.user-panel .btn-trade {
    box-shadow: 0 0 22px rgba(34, 211, 238, 0.26);
}
