:root[data-theme="dark"] {
    color-scheme: dark;
    --bg-1: #060b1d;
    --bg-2: #0f1d41;
    --bg-glow-1: rgba(64, 247, 255, 0.16);
    --bg-glow-2: rgba(124, 58, 237, 0.24);
    --surface: rgba(255, 255, 255, 0.08);
    --surface-strong: rgba(255, 255, 255, 0.12);
    --text-main: #eef2ff;
    --text-muted: rgba(238, 242, 255, 0.82);
    --text-muted-strong: #d7e3f8;
    --accent: #40f7ff;
    --accent-2: #3b82f6;
}

:root[data-theme="dark"] body {
    color: var(--text-main);
}

/* Pricing pages (dark theme only) */
:root[data-theme="dark"] .pricing-hero-section {
    background:
        radial-gradient(circle at 12% 14%, rgba(56, 189, 248, 0.1), transparent 44%),
        radial-gradient(circle at 88% 18%, rgba(99, 102, 241, 0.12), transparent 42%),
        linear-gradient(165deg, rgba(8, 15, 34, 0.94), rgba(11, 24, 49, 0.9));
    border-bottom: 1px solid rgba(125, 211, 252, 0.14);
}

:root[data-theme="dark"] .pricing-hero-section .lead {
    color: rgba(226, 232, 240, 0.92) !important;
}

:root[data-theme="dark"] .pricing-hero-section .pricing-intro-card {
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.88), rgba(13, 32, 62, 0.84));
    border: 1px solid rgba(125, 211, 252, 0.22) !important;
    box-shadow: 0 10px 24px rgba(2, 8, 23, 0.34) !important;
}

:root[data-theme="dark"] .pricing-hero-section .pricing-intro-card .card-body h2,
:root[data-theme="dark"] .pricing-hero-section .pricing-intro-card .card-body p,
:root[data-theme="dark"] .pricing-hero-section .pricing-intro-card .card-body .text-muted,
:root[data-theme="dark"] .pricing-hero-section .pricing-intro-card .card-body .text-secondary {
    color: #e2e8f0 !important;
}

:root[data-theme="dark"] .pricing-section-surface {
    background:
        radial-gradient(circle at 10% 10%, rgba(56, 189, 248, 0.06), transparent 42%),
        linear-gradient(170deg, rgba(7, 13, 30, 0.92), rgba(9, 23, 48, 0.88));
}

:root[data-theme="dark"] .pricing-section-surface .section-title-tight,
:root[data-theme="dark"] .pricing-section-surface .pricing-section-title {
    color: #eaf2ff !important;
}

:root[data-theme="dark"] .pricing-section-surface .section-subtitle-wide,
:root[data-theme="dark"] .pricing-section-surface .pricing-page-subtitle,
:root[data-theme="dark"] .pricing-section-surface .text-secondary {
    color: rgba(226, 232, 240, 0.9) !important;
}

:root[data-theme="dark"] .pricing-hero-section .text-white-50 {
    color: rgba(226, 232, 240, 0.82) !important;
}

:root[data-theme="dark"] .pricing-hero-section .pricing-intro-card {
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.9), rgba(10, 20, 41, 0.86));
    border: 1px solid rgba(125, 211, 252, 0.2) !important;
    box-shadow: 0 14px 30px rgba(2, 8, 23, 0.34) !important;
}

:root[data-theme="dark"] .pricing-hero-section .pricing-intro-card .card-body :is(h2, p, .text-muted, .text-secondary) {
    color: #e2e8f0 !important;
}

:root[data-theme="dark"] .pricing-section-surface .plan-type-title {
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(125, 211, 252, 0.2);
    color: #cbd5e1;
}

:root[data-theme="dark"] .pricing-section-surface .plan-type-divider::before {
    background: rgba(148, 163, 184, 0.28);
}

:root[data-theme="dark"] :is(.pricing-section-surface .home-pricing-card, .pricing-section-surface .pricing-card):not(.promo-special):not(.promo-discount):not(.free-plan) {
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.96), rgba(10, 17, 33, 0.92)) !important;
    border-color: rgba(125, 211, 252, 0.16) !important;
    box-shadow: 0 16px 32px rgba(2, 6, 23, 0.42) !important;
    color: #e2e8f0 !important;
}

:root[data-theme="dark"] .pricing-section-surface .pricing-compare-card {
    background:
        radial-gradient(circle at 12% 12%, rgba(56, 189, 248, 0.06), transparent 44%),
        linear-gradient(165deg, rgba(10, 18, 42, 0.94), rgba(9, 23, 50, 0.9));
    border-color: rgba(125, 211, 252, 0.22) !important;
}

:root[data-theme="dark"] .pricing-section-surface .pricing-compare-card .pricing-compare-title {
    color: #f8fbff !important;
}

:root[data-theme="dark"] .pricing-section-surface .pricing-compare-card .table {
    --bs-table-color: #e5eeff;
    --bs-table-bg: transparent;
    --bs-table-striped-color: #e5eeff;
    --bs-table-striped-bg: rgba(15, 23, 42, 0.58);
    --bs-table-hover-color: #f8fbff;
    --bs-table-hover-bg: rgba(30, 64, 175, 0.28);
    --bs-table-border-color: rgba(148, 163, 184, 0.2);
}

:root[data-theme="dark"] .pricing-section-surface .pricing-compare-card :is(th, td, .text-muted, .text-secondary) {
    color: #e5eeff !important;
}

:root[data-theme="dark"] :is(.pricing-section-surface .home-pricing-card, .pricing-section-surface .pricing-card) :is(.text-dark, .text-secondary, .text-muted, .fw-medium, .pricing-plan-head .small) {
    color: #000 !important;
    opacity: 1 !important;
}

:root[data-theme="dark"] :is(.pricing-section-surface .home-pricing-card, .pricing-section-surface .pricing-card) .original-price-strike {
    color: #94a3b8 !important;
}

:root[data-theme="dark"] :is(.pricing-section-surface .home-pricing-card, .pricing-section-surface .pricing-card) .pricing-badge {
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

:root[data-theme="dark"] :is(.pricing-section-surface .home-pricing-card, .pricing-section-surface .pricing-card) .plan-feature-icon {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.14);
}

:root[data-theme="dark"] :is(.pricing-section-surface .home-pricing-card, .pricing-section-surface .pricing-card) .plan-feature-icon i {
    color: #7dd3fc;
}

:root[data-theme="dark"] :is(.pricing-section-surface .home-pricing-card, .pricing-section-surface .pricing-card) .home-pricing-btn {
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

/* Admin dashboard light panels need dark text even in dark theme */
:root[data-theme="dark"] .admin-dashboard-page :is(.bg-body-tertiary, .bg-light, .bg-white, .card.bg-body-tertiary, .card.bg-light, .card.bg-white) {
    color: #0f172a !important;
}

:root[data-theme="dark"] .admin-dashboard-page :is(.bg-body-tertiary, .bg-light, .bg-white, .card.bg-body-tertiary, .card.bg-light, .card.bg-white) :is(h1, h2, h3, h4, h5, h6) {
    color: #0f172a !important;
}

:root[data-theme="dark"] .admin-dashboard-page :is(.bg-body-tertiary, .bg-light, .bg-white, .card.bg-body-tertiary, .card.bg-light, .card.bg-white) :is(label, .form-label, .col-form-label, .form-check-label, .text-secondary, .text-light-emphasis, .text-muted, .form-text, .small, small) {
    color: #334155 !important;
    opacity: 1 !important;
}

:root[data-theme="dark"] .support-page :is(.text-secondary, .text-muted, .text-body-secondary),
:root[data-theme="dark"] .admin-support-page :is(.text-secondary, .text-muted, .text-body-secondary) {
    color: rgba(226, 232, 240, 0.9) !important;
}

:root[data-theme="dark"] .support-page :is(.alert-info, .alert-warning, .alert-success, .alert-danger),
:root[data-theme="dark"] .admin-support-page :is(.alert-info, .alert-warning, .alert-success, .alert-danger) {
    box-shadow: 0 14px 30px rgba(2, 8, 23, 0.24);
}

:root[data-theme="dark"] .panel-topbar :is(.text-muted, .text-secondary, .text-body-secondary, .text-white-50, .lead),
:root[data-theme="dark"] .content-card :is(.text-muted, .text-secondary, .text-body-secondary),
:root[data-theme="dark"] .blog-content :is(p, li, .text-muted, .text-secondary, .text-body-secondary) {
    /*color: rgba(226, 232, 240, 0.9) !important;*/
}

:root[data-theme="dark"] .public-page-content .card.border-0.shadow-sm {
    background: linear-gradient(165deg, rgba(10, 18, 42, 0.94), rgba(9, 23, 50, 0.9));
    border-color: rgba(125, 211, 252, 0.18) !important;
    color: #e5eeff !important;
    box-shadow: 0 14px 30px rgba(2, 8, 23, 0.24) !important;
}

:root[data-theme="dark"] .public-page-content .card.border-0.shadow-sm :is(h1, h2, h3, h4, h5, h6, p, li, .text-muted, .text-secondary, .text-white-50, .lead) {
    color: #e5eeff !important;
}

:root[data-theme="dark"] .content-card :is(.small, small) {
    color: rgba(226, 232, 240, 0.82) !important;
}

:root[data-theme="dark"] .support-page .support-card,
:root[data-theme="dark"] .admin-support-page .support-card {
    background: linear-gradient(165deg, rgba(10, 18, 42, 0.94), rgba(9, 23, 50, 0.9));
    border-color: rgba(125, 211, 252, 0.18);
    color: #e5eeff;
}

:root[data-theme="dark"] .support-page .support-card :is(.text-muted, .text-secondary, .small),
:root[data-theme="dark"] .admin-support-page .support-card :is(.text-muted, .text-secondary, .small) {
    color: rgba(226, 232, 240, 0.9) !important;
}

:root[data-theme="dark"] .admin-dashboard-page :is(.bg-body-tertiary, .bg-light, .bg-white, .card.bg-body-tertiary, .card.bg-light, .card.bg-white) .form-control::placeholder,
:root[data-theme="dark"] .admin-dashboard-page :is(.bg-body-tertiary, .bg-light, .bg-white, .card.bg-body-tertiary, .card.bg-light, .card.bg-white) .form-select::placeholder,
:root[data-theme="dark"] .admin-dashboard-page :is(.bg-body-tertiary, .bg-light, .bg-white, .card.bg-body-tertiary, .card.bg-light, .card.bg-white) textarea::placeholder,
:root[data-theme="dark"] .admin-dashboard-page :is(.bg-body-tertiary, .bg-light, .bg-white, .card.bg-body-tertiary, .card.bg-light, .card.bg-white) input::placeholder {
    color: rgba(71, 85, 105, 0.82) !important;
    opacity: 1 !important;
}

:root[data-theme="dark"] .pricing-compare-card {
    border: 1px solid rgba(125, 211, 252, 0.24) !important;
    background:
        radial-gradient(circle at 12% 12%, rgba(56, 189, 248, 0.08), transparent 44%),
        linear-gradient(165deg, rgba(10, 18, 42, 0.9), rgba(9, 23, 50, 0.86));
}

:root[data-theme="dark"] .pricing-compare-title {
    color: #e2e8f0;
}

:root[data-theme="dark"] .pricing-compare-table thead th {
    background: rgba(8, 16, 36, 0.96);
    color: #67e8f9 !important;
    border-bottom: 1px solid rgba(125, 211, 252, 0.28);
    font-weight: 800;
}

:root[data-theme="dark"] .pricing-compare-table tbody td {
    color: #e5e7eb !important;
    border-color: rgba(148, 163, 184, 0.2);
}

:root[data-theme="dark"] .pricing-compare-table tbody tr:nth-child(odd) td {
    background: rgba(15, 23, 42, 0.58);
}

:root[data-theme="dark"] .pricing-compare-table tbody tr:nth-child(even) td {
    background: rgba(9, 18, 38, 0.5);
}

:root[data-theme="dark"] .pricing-compare-table tbody tr:hover td {
    background: rgba(30, 64, 175, 0.28);
}

:root[data-theme="dark"] .pricing-compare-table tbody td.fw-bold {
    color: #f8fafc !important;
}

:root[data-theme="dark"] .pricing-section-surface .form-select,
:root[data-theme="dark"] .pricing-section-surface .form-control,
:root[data-theme="dark"] .pricing-compare-card .form-select,
:root[data-theme="dark"] .pricing-compare-card .form-control {
    color: #e2e8f0 !important;
    background: rgba(15, 27, 54, 0.92) !important;
    border-color: rgba(125, 211, 252, 0.32) !important;
}

:root[data-theme="dark"] .pricing-section-surface .form-select:focus,
:root[data-theme="dark"] .pricing-section-surface .form-control:focus,
:root[data-theme="dark"] .pricing-compare-card .form-select:focus,
:root[data-theme="dark"] .pricing-compare-card .form-control:focus {
    color: #f8fafc !important;
    background: rgba(18, 34, 66, 0.96) !important;
    border-color: rgba(56, 189, 248, 0.6) !important;
    box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.16) !important;
}
