html.theme-dark,
body.theme-dark {
    --trading-bg: #0b1220;
    --trading-bg-soft: #0f172a;
    --trading-surface: #111827;
    --trading-surface-elevated: #172033;
    --trading-text: #e5edf7;
    --trading-text-soft: #9db0c8;
    --trading-border: #25324a;
    --trading-border-strong: #334155;
    --trading-primary: #3b82f6;
    --trading-primary-strong: #2563eb;
    --trading-primary-soft: rgba(59, 130, 246, 0.18);
    --trading-success: #10b981;
    --trading-danger: #f87171;
    --trading-warning: #f59e0b;
    --trading-sidebar-bg: linear-gradient(180deg, #08111f 0%, #0d1728 100%);
    --trading-sidebar-text: rgba(203, 213, 225, 0.72);
    --trading-sidebar-text-strong: #f8fafc;
    --trading-navbar-bg: rgba(11, 18, 32, 0.88);
    --trading-shadow-sm: 0 8px 20px rgba(2, 6, 23, 0.3);
    --trading-shadow-md: 0 18px 40px rgba(2, 6, 23, 0.34);
}

html.theme-dark,
body.theme-dark,
body.theme-dark .content-page,
body.theme-dark main[role="main"] {
    background: var(--trading-bg);
    color: var(--trading-text);
}

body.theme-dark .navbar,
body.theme-dark .card,
body.theme-dark .modal-content,
body.theme-dark .dropdown-menu,
body.theme-dark .list-group-item,
body.theme-dark .alert,
body.theme-dark .table-responsive,
body.theme-dark .auth .card,
body.theme-dark .swal-modal,
body.theme-dark .input-group-text,
body.theme-dark .pagination .page-link,
body.theme-dark .custom-select,
body.theme-dark .form-control {
    background: var(--trading-surface);
    color: var(--trading-text);
}

body.theme-dark .navbar {
    border-bottom-color: rgba(51, 65, 85, 0.85);
}

body.theme-dark .navbar .nav-link,
body.theme-dark .navbar .dropdown-item,
body.theme-dark .navbar .btn,
body.theme-dark .page-header,
body.theme-dark .card-title,
body.theme-dark .modal-title,
body.theme-dark .table,
body.theme-dark .table thead th,
body.theme-dark .close,
body.theme-dark label,
body.theme-dark .custom-control-label,
body.theme-dark .dropdown-header,
body.theme-dark .list-group-item,
body.theme-dark .breadcrumb-item.active,
body.theme-dark .text-dark {
    color: var(--trading-text) !important;
}

body.theme-dark .navbar .dropdown-item:hover,
body.theme-dark .navbar .dropdown-item:focus,
body.theme-dark .table-hover tbody tr:hover,
body.theme-dark .nav-tabs .nav-link:hover,
body.theme-dark .nav-pills .nav-link:hover {
    background: rgba(59, 130, 246, 0.12);
}

body.theme-dark .trading-theme-toggle {
    background: rgba(17, 24, 39, 0.9);
    border-color: var(--trading-border);
    color: var(--trading-text);
}

body.theme-dark .trading-theme-toggle .theme-icon-light {
    display: none;
}

body.theme-dark .trading-theme-toggle .theme-icon-dark {
    display: inline-block;
}

body.theme-dark .sidebar {
    border-right-color: rgba(51, 65, 85, 0.4);
}

body.theme-dark .sidebar .nav-link:hover,
body.theme-dark .sidebar .nav-link:focus {
    background: rgba(59, 130, 246, 0.14);
}

body.theme-dark .sidebar .nav-link.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.26) 0%, rgba(37, 99, 235, 0.3) 100%);
}

body.theme-dark .table thead th {
    background: rgba(148, 163, 184, 0.08);
}

body.theme-dark .table td,
body.theme-dark .table th,
body.theme-dark .card,
body.theme-dark .modal-header,
body.theme-dark .modal-footer,
body.theme-dark .dropdown-divider,
body.theme-dark hr,
body.theme-dark .pagination .page-link,
body.theme-dark .list-group-item,
body.theme-dark .custom-select,
body.theme-dark .form-control,
body.theme-dark .input-group-text,
body.theme-dark .nav-tabs,
body.theme-dark .nav-tabs .nav-link,
body.theme-dark .nav-pills .nav-link,
body.theme-dark .alert {
    border-color: var(--trading-border) !important;
}

body.theme-dark .form-control::placeholder,
body.theme-dark input::placeholder {
    color: #7d90aa;
}

body.theme-dark .form-control:focus,
body.theme-dark .custom-select:focus {
    background: #111827;
}

body.theme-dark .auth {
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.16), transparent 26%),
        linear-gradient(180deg, #08111f 0%, #0b1220 100%);
}

body.theme-dark .auth .forgot,
body.theme-dark .text-muted,
body.theme-dark .breadcrumb-item a,
body.theme-dark .breadcrumb-item + .breadcrumb-item::before {
    color: var(--trading-text-soft) !important;
}

body.theme-dark .modal-backdrop.show {
    opacity: 0.7;
}
