.theme-toggle-btn,
html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .bg-light,
html[data-theme="dark"] .bg-body,
html[data-theme="dark"] .bg-body-secondary,
html[data-theme="dark"] .bg-body-tertiary,
html[data-theme="dark"] .card,
html[data-theme="dark"] .card-body,
html[data-theme="dark"] .list-group-item,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .offcanvas,
html[data-theme="dark"] .toast,
html[data-theme="dark"] .popover,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .navbar,
html[data-theme="dark"] .navbar-light {
    color: #eef2ff;
}

html[data-theme="dark"] {
    --bs-body-bg: #090f1a;
    --bs-body-bg-rgb: 9, 15, 26;
    --bs-body-color: #eef2ff;
    --bs-body-color-rgb: 238, 242, 255;
    --bs-secondary-bg: #111a2d;
    --bs-secondary-bg-rgb: 17, 26, 45;
    --bs-tertiary-bg: #10192b;
    --bs-tertiary-bg-rgb: 16, 25, 43;
    --bs-border-color: #2f3e5f;
    --bs-border-color-translucent: rgba(47, 62, 95, 0.6);
    --bs-light-rgb: 17, 26, 45;
    --bs-dark: #0f1625;
    --bs-dark-rgb: 15, 22, 37;
    --bs-emphasis-color: #f8fafe;
    --bs-emphasis-color-rgb: 248, 250, 254;
    --bs-link-color: #b5ccff;
    --bs-link-hover-color: #d5e2ff;
    --bs-heading-color: #f3f6ff;
    --bs-card-bg: #131c35;
    --bs-card-cap-bg: #131c35;
    --bs-list-group-bg: #151d33;
    --bs-list-group-action-hover-bg: #223153;
    --bs-modal-bg: #161e33;
    --bs-nav-tabs-link-active-bg: #1f2946;
    --bs-pagination-bg: #1a223b;
    --bs-pagination-color: #dbe3ff;
    --bs-pagination-hover-bg: #2a3655;
    --bs-pagination-hover-color: #f0f4ff;
    --bs-pagination-active-bg: #2f3d5c;
    --bs-pagination-active-color: #ffffff;
}

.theme-toggle-btn {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-purple);
    background: #fff;
    box-shadow: 0 8px 18px rgba(90, 63, 143, 0.08);
    transition: transform 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
    border: 2px solid #f0e3ff;
}

.theme-toggle-btn:hover {
    transform: translateY(-2px);
    background: #fff1f8;
}

.theme-toggle-btn .theme-icon-light {
    display: none;
}

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

html[data-theme="dark"] .theme-toggle-btn {
    color: #dbe3ff;
    background: #171d2b;
    border-color: #3c4b6b;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .theme-toggle-btn .theme-icon-light {
    display: inline-block;
}

html[data-theme="dark"] .theme-toggle-btn .theme-icon-dark {
    display: none;
}

html[data-theme="dark"] body {
    color: #eef2ff;
    background:
        radial-gradient(circle at 14px 16px, rgba(255, 127, 189, 0.13) 0 4px, transparent 5px),
        radial-gradient(circle at 44px 42px, rgba(130, 230, 196, 0.11) 0 4px, transparent 5px),
        linear-gradient(90deg, rgba(255, 224, 138, 0.1) 1px, transparent 1px),
        linear-gradient(0deg, rgba(121, 215, 255, 0.1) 1px, transparent 1px),
        linear-gradient(135deg, #0e1220 0%, #10162a 45%, #161c2d 100%);
}

html[data-theme="dark"] .page-backdrop {
    background:
        radial-gradient(circle at 16% 12%, rgba(255, 224, 138, 0.18), transparent 28%),
        radial-gradient(circle at 84% 18%, rgba(255, 127, 189, 0.18), transparent 28%),
        radial-gradient(circle at 50% 92%, rgba(130, 230, 196, 0.18), transparent 32%);
}

html[data-theme="dark"] .btn-group .btn,
html[data-theme="dark"] .btn.btn-light,
html[data-theme="dark"] .btn-light {
    color: #dce3ff !important;
    background-color: #1d273f !important;
    border-color: #39486d !important;
}

html[data-theme="dark"] .btn-group .btn:hover,
html[data-theme="dark"] .btn.btn-light:hover,
html[data-theme="dark"] .btn-light:hover {
    background-color: #253355 !important;
}

html[data-theme="dark"] .text-bg-light,
html[data-theme="dark"] .bg-light,
html[data-theme="dark"] .bg-body-tertiary,
html[data-theme="dark"] .bg-body-secondary,
html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .table {
    background: #121a2d !important;
}

html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .offcanvas,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .list-group-item,
html[data-theme="dark"] .card,
html[data-theme="dark"] .toast,
html[data-theme="dark"] .popover,
html[data-theme="dark"] .accordion-item,
html[data-theme="dark"] .nav-tabs {
    background-color: #131c35 !important;
    border-color: #33405f !important;
}

html[data-theme="dark"] .dropdown-item,
html[data-theme="dark"] .list-group-item-action,
html[data-theme="dark"] .nav-link {
    color: #dce3ff !important;
}

html[data-theme="dark"] .dropdown-item:hover,
html[data-theme="dark"] .dropdown-item:focus,
html[data-theme="dark"] .list-group-item-action:hover,
html[data-theme="dark"] .list-group-item-action:focus {
    background-color: #21304f !important;
}

html[data-theme="dark"] .input-group-text {
    color: #dce3ff;
    background-color: #1d2740;
    border-color: #33405f;
}

html[data-theme="dark"] .badge.bg-light {
    background-color: #2e3b5a !important;
    color: #dce3ff !important;
}

html[data-theme="dark"] .glass-panel,
html[data-theme="dark"] .glass-card,
html[data-theme="dark"] .glass-nav {
    background: rgba(21, 27, 44, 0.92) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45) !important;
}

html[data-theme="dark"] .glass-nav {
    outline-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .glass-card::before {
    background:
        linear-gradient(135deg, rgba(130, 230, 196, 0.12), transparent 34%, rgba(255, 127, 189, 0.11)),
        radial-gradient(circle at 88% 14%, rgba(255, 224, 138, 0.22) 0 18px, transparent 19px);
}

html[data-theme="dark"] .glass-card::after {
    opacity: 0.35;
}

html[data-theme="dark"] .text-dark,
html[data-theme="dark"] .text-body,
html[data-theme="dark"] .fw-black {
    color: #e9edf9 !important;
}

html[data-theme="dark"] .text-secondary,
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .text-secondary-opacity-50 {
    color: #aab2ca !important;
}

html[data-theme="dark"] .bg-light,
html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .table {
    background: #141d30 !important;
}

html[data-theme="dark"] .form-glass {
    color: #e6ebff;
    background: #1c2438;
    border-color: #33405f;
}

html[data-theme="dark"] .form-glass:focus {
    border-color: #6c7eb1;
    box-shadow: 0 0 0 0.25rem rgba(98, 123, 183, 0.16);
}

html[data-theme="dark"] .btn-premium {
    background: linear-gradient(135deg, #8a53d3, #ff7fbd) !important;
    box-shadow: 0 9px 0 rgba(138, 83, 211, 0.28), 0 18px 32px rgba(138, 83, 211, 0.22);
}

html[data-theme="dark"] .btn-glass {
    color: #d8deff !important;
    border-color: #3a4670;
    background: linear-gradient(180deg, #242c46, #1a2138);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.36);
}

html[data-theme="dark"] .btn-light,
html[data-theme="dark"] .btn-outline-dark {
    color: #dbe3ff !important;
    background: #232c43 !important;
    border-color: #44517a !important;
}

html[data-theme="dark"] .btn-light:hover,
html[data-theme="dark"] .btn-outline-dark:hover {
    background: #2a3554 !important;
}

html[data-theme="dark"] .btn-light.text-danger,
html[data-theme="dark"] .btn-outline-dark.text-danger {
    color: #ff9caa !important;
}

html[data-theme="dark"] .pop-badge {
    color: #ffd5a0;
    border-color: #4f4e24;
    background: linear-gradient(135deg, #413b0f, #f8d86a);
}

html[data-theme="dark"] .cute-kicker {
    color: #ff9ccf;
    border-color: rgba(255, 156, 209, 0.42);
    background: #2f1930;
}

html[data-theme="dark"] .icon-box {
    border-color: #2c3656;
    box-shadow: 0 12px 24px rgba(8, 12, 24, 0.4);
}

html[data-theme="dark"] .table {
    --bs-table-bg: #111a2f;
    --bs-table-color: #dbe3ff;
    --bs-table-hover-bg: #19233f;
    --bs-table-border-color: #35405f;
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .form-select {
    color: #e6ebff;
    background-color: #1f2740;
    border-color: #33405f;
}

html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus,
html[data-theme="dark"] textarea:focus {
    color: #f4f7ff;
    background-color: #1a2135;
    border-color: #6a7bb4;
    box-shadow: 0 0 0 0.25rem rgba(98, 123, 183, 0.16);
}

html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .list-group-item {
    background-color: #161e33;
    border-color: #30405f;
    color: #dce3ff;
}

html[data-theme="dark"] .hover-purple:hover {
    color: #ff9ac2 !important;
}

html[data-theme="dark"] .hover-soft-red:hover {
    background-color: #2f2630 !important;
}

html[data-theme="dark"] a {
    color: #bdd0ff;
}

html[data-theme="dark"] hr {
    border-top-color: #2f3752;
}

html[data-theme="dark"] .navbar {
    background: #0f1729 !important;
}

html[data-theme="dark"] .navbar-light .navbar-brand,
html[data-theme="dark"] .navbar-light .navbar-nav .nav-link {
    color: #dce3ff !important;
}

html[data-theme="dark"] .nav-link.active,
html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .navbar-light .navbar-nav .show > .nav-link {
    color: #ff9ac2 !important;
}

html[data-theme="dark"] .pagination .page-link {
    color: var(--bs-pagination-color) !important;
    background-color: var(--bs-pagination-bg) !important;
    border-color: var(--bs-border-color) !important;
}

html[data-theme="dark"] .pagination .page-link:hover {
    color: var(--bs-pagination-hover-color) !important;
    background-color: var(--bs-pagination-hover-bg) !important;
}

html[data-theme="dark"] .pagination .page-item.active .page-link {
    background-color: var(--bs-pagination-active-bg) !important;
    color: var(--bs-pagination-active-color) !important;
    border-color: var(--bs-border-color) !important;
}

html[data-theme="dark"] .breadcrumb,
html[data-theme="dark"] .alert,
html[data-theme="dark"] .dropdown-item.active,
html[data-theme="dark"] .dropdown-item:active {
    background-color: #1f2946 !important;
    color: #eef2ff !important;
}

html[data-theme="dark"] .form-control::placeholder,
html[data-theme="dark"] textarea::placeholder,
html[data-theme="dark"] input::placeholder {
    color: #93a0bf;
}

html[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(190%);
}

html[data-theme="dark"] {
    color-scheme: dark;
}

html[data-theme="light"] {
    color-scheme: light;
}
