/* ══ Dark Mode: Variable Overrides + Minimal Component Fixes ══ */

/* ── Dark Mode Variables ── */
[data-theme="dark"] {
    --mtv-bg-white: #0f172a;
    --mtv-bg-light: #1e293b;
    --mtv-bg-dark: #020617;
    --mtv-bg-card: #1e293b;
    --mtv-bg-card-hover: #334155;
    --mtv-bg-elevated: #1e293b;
    --mtv-bg-subtle: #1e293b;
    --mtv-text-dark: #f1f5f9;
    --mtv-text-body: #e2e8f0;
    --mtv-text-muted: #94A3B8;
    --mtv-text-white: #f8fafc;
    --mtv-border-light: #334155;
    --mtv-border: rgba(255, 255, 255, 0.1);
    --mtv-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --mtv-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --mtv-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --mtv-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --mtv-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    --mtv-shadow-card: 0 1px 3px rgba(0, 0, 0, 0.2), 0 6px 16px rgba(0, 0, 0, 0.15);
    --mtv-shadow-card-hover: 0 8px 30px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
    --mtv-gradient-subtle: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    --mtv-gradient-section: linear-gradient(180deg, rgba(35, 61, 255, 0.04) 0%, rgba(139, 92, 246, 0.02) 100%);
    color-scheme: dark;
}

/* ── Body ── */
[data-theme="dark"] body { color: var(--mtv-text-body); background: var(--mtv-bg-white); }

/* ── Headings ── */
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 {
    color: var(--mtv-text-dark);
}

/* ── Cards ── */
[data-theme="dark"] .mtv-card,
[data-theme="dark"] .mtv-stat-card,
[data-theme="dark"] .mtv-metric-card,
[data-theme="dark"] .mtv-content-card,
[data-theme="dark"] .card {
    background: var(--mtv-bg-card);
    border-color: #475569;
    color: var(--mtv-text-body);
}
[data-theme="dark"] .card-header,
[data-theme="dark"] .card-footer,
[data-theme="dark"] .mtv-content-card-header {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--mtv-border-light);
}

/* ── Dashboard ── */
[data-theme="dark"] .mtv-dashboard { background: #0f172a; }
[data-theme="dark"] .mtv-topbar {
    background: #1e293b;
    border-bottom-color: var(--mtv-border-light);
}
[data-theme="dark"] .mtv-topbar-toggle,
[data-theme="dark"] .mtv-topbar-breadcrumb,
[data-theme="dark"] .mtv-topbar-breadcrumb span { color: var(--mtv-text-body); }
[data-theme="dark"] .mtv-topbar-icon-btn {
    background: #334155;
    border-color: #475569;
    color: var(--mtv-text-muted);
}
[data-theme="dark"] .mtv-topbar-icon-btn:hover {
    background: var(--mtv-primary);
    border-color: var(--mtv-primary);
    color: #fff;
}
[data-theme="dark"] .mtv-dashboard--admin .mtv-topbar { background: #0f172a; }

/* ── Tables ── */
[data-theme="dark"] .table,
[data-theme="dark"] .mtv-data-table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--mtv-text-body);
    --bs-table-border-color: var(--mtv-border-light);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.04);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.06);
    color: var(--mtv-text-body);
}
[data-theme="dark"] .table th,
[data-theme="dark"] .mtv-data-table th {
    color: var(--mtv-text-muted);
    border-color: var(--mtv-border-light);
}

/* ── Forms ── */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background: #1e293b;
    border-color: #475569;
    color: var(--mtv-text-body);
}
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background: #334155;
    border-color: var(--mtv-primary);
    color: var(--mtv-text-dark);
    box-shadow: 0 0 0 0.2rem rgba(35, 61, 255, 0.25);
}
[data-theme="dark"] .form-control::placeholder { color: #64748b; }
[data-theme="dark"] .form-label,
[data-theme="dark"] label { color: var(--mtv-text-body); }
[data-theme="dark"] .input-group-text {
    background: #334155;
    border-color: #475569;
    color: var(--mtv-text-muted);
}

/* ── Alerts ── */
[data-theme="dark"] .alert-success,
[data-theme="dark"] .mtv-alert-success { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border-left-color: var(--mtv-success); }
[data-theme="dark"] .alert-danger,
[data-theme="dark"] .mtv-alert-danger { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border-left-color: var(--mtv-danger); }
[data-theme="dark"] .alert-warning,
[data-theme="dark"] .mtv-alert-warning { background: rgba(245, 158, 11, 0.15); color: #fcd34d; border-left-color: var(--mtv-warning); }
[data-theme="dark"] .alert-info,
[data-theme="dark"] .mtv-alert-info { background: rgba(14, 165, 233, 0.15); color: #7dd3fc; border-left-color: var(--mtv-info); }

/* ── Modals ── */
[data-theme="dark"] .modal-content {
    background: #1e293b;
    border-color: var(--mtv-border-light);
    color: var(--mtv-text-body);
}
[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer { border-color: var(--mtv-border-light); }
[data-theme="dark"] .btn-close { filter: invert(1) brightness(200%); }

/* ── Dropdowns ── */
[data-theme="dark"] .dropdown-menu {
    background: #1e293b;
    border-color: var(--mtv-border-light);
}
[data-theme="dark"] .dropdown-item { color: var(--mtv-text-body); }
[data-theme="dark"] .dropdown-item:hover { background: #334155; color: var(--mtv-text-dark); }

/* ── Sections ── */
[data-theme="dark"] .mtv-section { background: var(--mtv-bg-white); }
[data-theme="dark"] .mtv-section-gray { background: #1e293b; }

/* ── Bootstrap text overrides ── */
[data-theme="dark"] .text-dark { color: var(--mtv-text-dark) !important; }
[data-theme="dark"] .text-body { color: var(--mtv-text-body) !important; }
[data-theme="dark"] .text-muted { color: var(--mtv-text-muted) !important; }
[data-theme="dark"] .bg-white { background-color: var(--mtv-bg-white) !important; }
[data-theme="dark"] .bg-light { background-color: var(--mtv-bg-light) !important; }
[data-theme="dark"] .border { border-color: var(--mtv-border-light) !important; }
[data-theme="dark"] .border-bottom { border-bottom-color: var(--mtv-border-light) !important; }
[data-theme="dark"] .border-top { border-top-color: var(--mtv-border-light) !important; }

/* ── Icon circles ── */
[data-theme="dark"] .mtv-icon-circle-primary { background: rgba(35, 61, 255, 0.2); }
[data-theme="dark"] .mtv-icon-circle-secondary { background: rgba(14, 165, 233, 0.2); }
[data-theme="dark"] .mtv-icon-circle-accent,
[data-theme="dark"] .mtv-icon-circle-warning { background: rgba(245, 158, 11, 0.2); }
[data-theme="dark"] .mtv-icon-circle-success { background: rgba(16, 185, 129, 0.2); }

/* ── Stat/Metric cards ── */
[data-theme="dark"] .mtv-stat-card-value,
[data-theme="dark"] .mtv-metric-value { color: var(--mtv-text-dark); }

/* ── Badges ── */
[data-theme="dark"] .mtv-badge-primary { background: rgba(35, 61, 255, 0.2); }
[data-theme="dark"] .mtv-badge-success { background: rgba(16, 185, 129, 0.2); }
[data-theme="dark"] .mtv-badge-warning { background: rgba(245, 158, 11, 0.2); }
[data-theme="dark"] .mtv-badge-danger { background: rgba(239, 68, 68, 0.2); }

/* ── Testimonials ── */
[data-theme="dark"] .mtv-testimonial {
    background: var(--mtv-bg-card);
    border-color: var(--mtv-border-light);
}

/* ── Footer ── */
[data-theme="dark"] .mtv-footer { background: #020617; }

/* ── Cookie banner ── */
[data-theme="dark"] .mtv-cookie-banner {
    background: #1e293b;
    border-color: var(--mtv-border-light);
}

/* ── Tabs ── */
[data-theme="dark"] .nav-tabs { border-bottom-color: var(--mtv-border-light); }
[data-theme="dark"] .nav-tabs .nav-link { color: var(--mtv-text-muted); }
[data-theme="dark"] .nav-tabs .nav-link.active {
    background: var(--mtv-bg-card);
    border-color: var(--mtv-border-light) var(--mtv-border-light) var(--mtv-bg-card);
    color: var(--mtv-text-dark);
}

/* ── List group ── */
[data-theme="dark"] .list-group-item {
    background: var(--mtv-bg-card);
    border-color: var(--mtv-border-light);
    color: var(--mtv-text-body);
}

/* ── Accordion ── */
[data-theme="dark"] .accordion-item { background: var(--mtv-bg-card); border-color: var(--mtv-border-light); }
[data-theme="dark"] .accordion-button { background: var(--mtv-bg-card); color: var(--mtv-text-dark); }
[data-theme="dark"] .accordion-button:not(.collapsed) { background: rgba(35, 61, 255, 0.1); color: var(--mtv-primary-light); }
[data-theme="dark"] .accordion-button::after { filter: invert(1); }
[data-theme="dark"] .accordion-body { color: var(--mtv-text-body); }

/* ── Pagination ── */
[data-theme="dark"] .page-link {
    background: var(--mtv-bg-card);
    border-color: var(--mtv-border-light);
    color: var(--mtv-text-body);
}
[data-theme="dark"] .page-link:hover { background: #334155; color: var(--mtv-text-dark); }
[data-theme="dark"] .page-item.active .page-link { background: var(--mtv-primary); border-color: var(--mtv-primary); }

/* ── Misc ── */
[data-theme="dark"] .notification-dot { border-color: #1e293b; }
[data-theme="dark"] hr { border-color: var(--mtv-border-light); opacity: 0.5; }
[data-theme="dark"] code { background: rgba(35, 61, 255, 0.15); color: #93c5fd; }
[data-theme="dark"] pre { background: #0f172a; border-color: var(--mtv-border-light); }
[data-theme="dark"] .offcanvas { background: #0f172a; color: var(--mtv-text-body); }
[data-theme="dark"] .mtv-offcanvas { background: rgba(11,15,26,.98); border-left-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .mtv-offcanvas .btn-close { filter: invert(1); }
[data-theme="dark"] .mtv-offcanvas-group { border-bottom-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .mtv-offcanvas-toggle { color: var(--mtv-text-white); }
[data-theme="dark"] .mtv-offcanvas-link { color: var(--mtv-text-muted); }
[data-theme="dark"] .mtv-offcanvas-link:hover { color: var(--mtv-text-white); }
[data-theme="dark"] .mtv-offcanvas-link.active { color: var(--mtv-primary-light); }
[data-theme="dark"] .mtv-offcanvas-actions { border-top-color: rgba(255,255,255,0.08); }

/* Dark mode: Navbar dropdown */
[data-theme="dark"] .mtv-navbar .dropdown-menu { background: rgba(12,15,26,.95); border-color: rgba(255,255,255,.06); box-shadow: 0 20px 50px rgba(0,0,0,.3); }
[data-theme="dark"] .mtv-navbar .dropdown-item { color: rgba(255,255,255,.8); }
[data-theme="dark"] .mtv-navbar .dropdown-item:hover { color: #fff; }
[data-theme="dark"] .mtv-nav-item-title { color: #fff; }
[data-theme="dark"] .mtv-nav-item-desc { color: rgba(255,255,255,.4); }

/* Dark mode: Admin sidebar */
[data-theme="dark"] .mtv-dashboard--admin .mtv-sidebar { background: linear-gradient(180deg,#1a1a2e 0%,#16213e 100%); border-right-color: rgba(245,158,11,.15); }
[data-theme="dark"] .mtv-dashboard--admin .mtv-sidebar-link.active { background: linear-gradient(135deg,var(--mtv-accent),#f97316); color: #fff; }
[data-theme="dark"] .mtv-dashboard--admin .mtv-sidebar-link.active i { background: rgba(255,255,255,.2); color: #fff; }
[data-theme="dark"] .mtv-dashboard--admin .mtv-sidebar-link:hover { background: rgba(245,158,11,.08); }
[data-theme="dark"] .mtv-dashboard--admin .mtv-sidebar-heading { color: rgba(245,158,11,.4); }
[data-theme="dark"] .breadcrumb-item + .breadcrumb-item::before { color: var(--mtv-text-muted); }
[data-theme="dark"] .breadcrumb-item a { color: var(--mtv-text-muted); }
[data-theme="dark"] .breadcrumb-item.active { color: var(--mtv-text-body); }

/* ── Dark Mode Toggle ── */
.mtv-theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: var(--mtv-radius-sm);
    border: 1px solid var(--mtv-border-light);
    background: transparent;
    color: var(--mtv-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--mtv-transition-fast);
    padding: 0;
}
.mtv-theme-toggle:hover {
    color: var(--mtv-primary);
    border-color: var(--mtv-primary);
    background: rgba(35, 61, 255, 0.04);
}
[data-theme="dark"] .mtv-theme-toggle {
    border-color: #475569;
    color: var(--mtv-text-muted);
    background: #334155;
}
[data-theme="dark"] .mtv-theme-toggle:hover {
    color: #fbbf24;
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}
.mtv-theme-toggle .fa-sun { display: none; }
.mtv-theme-toggle .fa-moon { display: inline; }
[data-theme="dark"] .mtv-theme-toggle .fa-sun { display: inline; }
[data-theme="dark"] .mtv-theme-toggle .fa-moon { display: none; }

/* ── Sidebar theme toggle ── */
.mtv-sidebar-theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.25rem;
    color: var(--mtv-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    border-radius: var(--mtv-radius-sm);
    margin: 0.1rem 0;
    transition: var(--mtv-transition-fast);
}
.mtv-sidebar-theme-toggle:hover {
    color: var(--mtv-primary);
    background: rgba(35, 61, 255, 0.04);
}
.mtv-sidebar-theme-toggle i {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    background: var(--mtv-gray-100, #F3F4F6);
    border-radius: 6px;
    flex-shrink: 0;
}
[data-theme="dark"] .mtv-sidebar-theme-toggle i {
    background: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .mtv-sidebar-theme-toggle:hover {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

/* ══ Light Mode: Section Overrides ══ */

/* Smooth transitions for theme switching */
.mtv-hero,
.mtv-section-dark,
.mtv-section--dark,
.mtv-cta-section,
.mtv-page-banner,
.mtv-footer,
.mtv-card-dark,
.mtv-glass {
    transition: background 0.4s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ── Hero: Light mode (default) ── */
[data-theme="light"] .mtv-hero {
    background: var(--mtv-gradient-hero);
}
[data-theme="light"] .mtv-hero .text-gradient {
    background: linear-gradient(135deg, var(--mtv-primary), var(--mtv-secondary)) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}
[data-theme="light"] .mtv-hero .mtv-badge {
    background: rgba(35, 61, 255, 0.07) !important;
    color: var(--mtv-primary) !important;
    border: 1px solid rgba(35, 61, 255, 0.15) !important;
}
[data-theme="light"] .mtv-hero .mtv-glass {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: var(--mtv-shadow-card);
}

/* ── Dark mode: Navbar back to dark glass ── */
[data-theme="dark"] .mtv-navbar {
    background: rgba(12, 15, 26, 0.7);
    border-bottom-color: rgba(255, 255, 255, 0.04);
}
[data-theme="dark"] .mtv-navbar.scrolled {
    background: rgba(12, 15, 26, 0.9);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}
[data-theme="dark"] .mtv-navbar .navbar-brand { color: var(--mtv-text-white); }
[data-theme="dark"] .mtv-navbar .nav-link { color: rgba(255, 255, 255, 0.55); background: none; }
[data-theme="dark"] .mtv-navbar .nav-link.active,
[data-theme="dark"] .mtv-navbar .nav-link:hover { color: #fff; background: none; }

/* ── Dark mode: Hero dark gradient ── */
[data-theme="dark"] .mtv-hero {
    background: linear-gradient(160deg, #0C0F1A 0%, #111633 40%, #0C1429 100%);
}
[data-theme="dark"] .mtv-hero::before {
    background: radial-gradient(ellipse at 25% 40%, rgba(35, 61, 255, 0.12) 0, transparent 55%),
                radial-gradient(ellipse at 75% 70%, rgba(139, 92, 246, 0.08) 0, transparent 55%);
}
[data-theme="dark"] .mtv-hero h1 { color: var(--mtv-text-white); }
[data-theme="dark"] .mtv-hero p.lead { color: rgba(255, 255, 255, 0.5); }
[data-theme="dark"] .mtv-hero .mtv-glass {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

/* ── Dark mode: Sidebar dark ── */
[data-theme="dark"] .mtv-sidebar {
    background: #111827;
    border-right-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .mtv-sidebar-brand { border-bottom-color: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] .mtv-sidebar-brand span { color: #f1f5f9; }
[data-theme="dark"] .mtv-sidebar-heading { color: rgba(255, 255, 255, 0.4); }
[data-theme="dark"] .mtv-sidebar-link { color: rgba(255, 255, 255, 0.7); }
[data-theme="dark"] .mtv-sidebar-link:hover { color: #f1f5f9; background: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] .mtv-sidebar-link.active { color: #fff; background: var(--mtv-primary); }
[data-theme="dark"] .mtv-sidebar-link i { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.6); }
[data-theme="dark"] .mtv-sidebar-link:hover i { background: rgba(255, 255, 255, 0.15); color: #f1f5f9; }
[data-theme="dark"] .mtv-sidebar-link.active i { background: rgba(255, 255, 255, 0.25); color: #fff; }
[data-theme="dark"] .mtv-sidebar-footer { border-top-color: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] .mtv-sidebar-user-name { color: #e2e8f0; }
[data-theme="dark"] .mtv-sidebar-user-role { color: rgba(255, 255, 255, 0.5); }
[data-theme="dark"] .mtv-sidebar-chevron { color: rgba(255, 255, 255, 0.8); }
[data-theme="dark"] .mtv-sidebar-children { border-left-color: rgba(255, 255, 255, 0.12); }
[data-theme="dark"] .mtv-sidebar-child { color: rgba(255, 255, 255, 0.6); }
[data-theme="dark"] .mtv-sidebar-child:hover { color: #f1f5f9; }
[data-theme="dark"] .mtv-sidebar-child.active { color: #fff; }
[data-theme="dark"] .mtv-org-switcher { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.1); }
[data-theme="dark"] .mtv-org-switcher:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.15); }
[data-theme="dark"] .mtv-org-switcher-name { color: #e2e8f0; }
[data-theme="dark"] .mtv-org-switcher-type { color: rgba(255, 255, 255, 0.45); }
[data-theme="dark"] .mtv-sidebar-theme-toggle { background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.55); }
[data-theme="dark"] .mtv-sidebar-theme-toggle:hover { background: rgba(255, 255, 255, 0.1); color: #e2e8f0; }
[data-theme="dark"] .mtv-sidebar-area-btn { color: rgba(255, 255, 255, 0.65); }
[data-theme="dark"] .mtv-sidebar-area-btn:hover { background: rgba(255, 255, 255, 0.1); color: #f1f5f9; }

/* ── Dark sections: ALWAYS dark bg, even in light mode ── */
[data-theme="light"] .mtv-section-dark,
[data-theme="light"] .mtv-section--dark {
    background: linear-gradient(180deg, #0C0F1A, #141B2D);
    color: var(--mtv-text-white);
}
[data-theme="light"] .mtv-section-dark h1,
[data-theme="light"] .mtv-section-dark h2,
[data-theme="light"] .mtv-section-dark h3,
[data-theme="light"] .mtv-section-dark h4,
[data-theme="light"] .mtv-section-dark h5,
[data-theme="light"] .mtv-section-dark h6,
[data-theme="light"] .mtv-section--dark h1,
[data-theme="light"] .mtv-section--dark h2,
[data-theme="light"] .mtv-section--dark h3,
[data-theme="light"] .mtv-section--dark h4,
[data-theme="light"] .mtv-section--dark h5,
[data-theme="light"] .mtv-section--dark h6 { color: #fff !important; }
[data-theme="light"] .mtv-section-dark p,
[data-theme="light"] .mtv-section-dark .lead,
[data-theme="light"] .mtv-section--dark p,
[data-theme="light"] .mtv-section--dark .lead { color: rgba(255, 255, 255, 0.6); }
[data-theme="light"] .mtv-section-dark .text-muted,
[data-theme="light"] .mtv-section--dark .text-muted { color: rgba(255, 255, 255, 0.4) !important; }
[data-theme="light"] .mtv-section-dark .mtv-section-label,
[data-theme="light"] .mtv-section--dark .mtv-section-label {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}
[data-theme="light"] .mtv-section-dark .mtv-feature-box,
[data-theme="light"] .mtv-section--dark .mtv-feature-box {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="light"] .mtv-section-dark .btn-mtv-secondary,
[data-theme="light"] .mtv-section--dark .btn-mtv-secondary {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}
[data-theme="light"] .mtv-section-dark .btn-mtv-secondary:hover,
[data-theme="light"] .mtv-section--dark .btn-mtv-secondary:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}
/* Icon circles in dark sections */
[data-theme="light"] .mtv-section-dark .mtv-icon-circle-primary,
[data-theme="light"] .mtv-section--dark .mtv-icon-circle-primary { background: rgba(35, 61, 255, 0.2); }
[data-theme="light"] .mtv-section-dark .mtv-icon-circle-secondary,
[data-theme="light"] .mtv-section--dark .mtv-icon-circle-secondary { background: rgba(14, 165, 233, 0.2); }
[data-theme="light"] .mtv-section-dark .mtv-icon-circle-accent,
[data-theme="light"] .mtv-section--dark .mtv-icon-circle-accent,
[data-theme="light"] .mtv-section-dark .mtv-icon-circle-warning,
[data-theme="light"] .mtv-section--dark .mtv-icon-circle-warning { background: rgba(245, 158, 11, 0.2); }
[data-theme="light"] .mtv-section-dark .mtv-icon-circle-success,
[data-theme="light"] .mtv-section--dark .mtv-icon-circle-success { background: rgba(16, 185, 129, 0.2); }

/* ── CTA Section: ALWAYS gradient bg, ALWAYS white text ── */
[data-theme="light"] .mtv-section-dark.mtv-cta-section {
    background: linear-gradient(135deg, var(--mtv-primary-dark) 0%, var(--mtv-primary) 100%) !important;
    color: #fff !important;
}
[data-theme="light"] .mtv-section-dark.mtv-cta-section .mtv-section-title,
[data-theme="light"] .mtv-section-dark.mtv-cta-section h2,
[data-theme="light"] .mtv-section-dark.mtv-cta-section h3 { color: #fff !important; }
[data-theme="light"] .mtv-section-dark.mtv-cta-section .mtv-section-subtitle,
[data-theme="light"] .mtv-section-dark.mtv-cta-section p { color: rgba(255, 255, 255, 0.85) !important; }
[data-theme="light"] .mtv-section-dark.mtv-cta-section .text-white:not(.badge):not(.btn) { color: #fff !important; }
[data-theme="light"] .mtv-section-dark.mtv-cta-section .text-gradient {
    background: none !important;
    -webkit-text-fill-color: #fff !important;
    color: #fff !important;
}
[data-theme="light"] .mtv-section-dark.mtv-cta-section .btn-mtv-secondary {
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}
[data-theme="light"] .mtv-section-dark.mtv-cta-section .btn-mtv-secondary:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.7) !important;
}

/* CTA secondary button: stronger border visibility */
.mtv-cta-section .btn-mtv-secondary {
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
}
.mtv-cta-section .btn-mtv-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff;
}

/* Hero badge — light mode */
.mtv-hero .mtv-badge {
    background: rgba(35, 61, 255, 0.07);
    color: var(--mtv-primary);
    border: 1px solid rgba(35, 61, 255, 0.15);
}

/* Dark mode: hero buttons + badges white */
[data-theme="dark"] .mtv-hero .btn-mtv-secondary {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}
[data-theme="dark"] .mtv-hero .btn-mtv-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}
[data-theme="dark"] .mtv-hero .mtv-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* ── Page banner ── */
[data-theme="light"] .mtv-page-banner {
    background: #eef2ff;
    color: var(--mtv-text-dark);
}
[data-theme="light"] .mtv-page-banner h1 { color: var(--mtv-text-dark); }
[data-theme="light"] .mtv-page-banner .lead { color: var(--mtv-text-body); }

/* ── Footer ── */
[data-theme="light"] .mtv-footer { background: #1e293b; }

/* ── Card dark ── */
[data-theme="light"] .mtv-card-dark {
    background: #f0f4f9;
    border-color: var(--mtv-border-light);
}
[data-theme="light"] .mtv-card-dark,
[data-theme="light"] .mtv-card-dark h1,
[data-theme="light"] .mtv-card-dark h2,
[data-theme="light"] .mtv-card-dark h3,
[data-theme="light"] .mtv-card-dark h4 { color: var(--mtv-text-dark); }
[data-theme="light"] .mtv-card-dark p,
[data-theme="light"] .mtv-card-dark .text-muted { color: var(--mtv-text-body) !important; }

/* ── Pricing card ── */
[data-theme="light"] .mtv-pricing-card {
    background: #fff;
    border-color: var(--mtv-border-light);
    color: var(--mtv-text-dark);
}
[data-theme="light"] .mtv-pricing-card.featured { border-color: var(--mtv-primary); }

/* ── Cookie banner ── */
[data-theme="light"] .mtv-cookie-banner {
    background: #fff;
    border-color: var(--mtv-border-light);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

/* ── Section subtitle in dark sections: always light ── */
[data-theme="light"] .mtv-section-dark .mtv-section-subtitle { color: rgba(255, 255, 255, 0.5) !important; }

/* ── Dark hero text-gradient ── */
[data-theme="dark"] .mtv-hero .text-gradient {
    background: linear-gradient(135deg, #93c5fd, #60a5fa) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}
[data-theme="dark"] .mtv-hero .lead { color: var(--mtv-text-muted) !important; }
[data-theme="dark"] .mtv-section-subtitle { color: var(--mtv-text-muted); }

/* ── Dark sections: headings ALWAYS white on dark bg ── */
[data-theme="dark"] .mtv-section-dark h1,
[data-theme="dark"] .mtv-section-dark h2,
[data-theme="dark"] .mtv-section-dark h3,
[data-theme="dark"] .mtv-section-dark h4,
[data-theme="dark"] .mtv-section-dark h5,
[data-theme="dark"] .mtv-section-dark h6 {
    color: #fff !important;
}
[data-theme="dark"] .mtv-section-dark .text-gradient {
    background: linear-gradient(135deg, #93c5fd, #60a5fa) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}
[data-theme="dark"] .mtv-section-dark .mtv-section-subtitle,
[data-theme="dark"] .mtv-section-dark p { color: rgba(255, 255, 255, 0.6) !important; }
[data-theme="dark"] .mtv-section-dark .mtv-section-label {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

/* ── Light mode accordion ── */
[data-theme="light"] .accordion-item { background: #fff; border-color: var(--mtv-border-light); }
[data-theme="light"] .accordion-button { background: #fff; color: var(--mtv-text-dark); }
[data-theme="light"] .accordion-button:not(.collapsed) { background: rgba(35, 61, 255, 0.08); color: var(--mtv-primary); }
[data-theme="light"] .accordion-button::after { filter: none; }

/* ── Step numbers in light dark sections ── */
[data-theme="light"] .mtv-section-dark .mtv-step-number {
    background: var(--mtv-primary);
    color: #fff;
}

/* ── Section rows overflow ── */
.mtv-section .row { overflow: visible; }
.mtv-section .row > [class*="col-"] { overflow: visible; }

/* ── Step numbers in sections ── */
.mtv-section .d-flex.flex-column .mtv-step-number {
    position: static;
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
    background: var(--mtv-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ── Sidebar chevron light mode ── */
[data-theme="light"] .mtv-sidebar-chevron { color: var(--mtv-text-muted); }
[data-theme="light"] .mtv-text-primary-light { color: var(--mtv-primary) !important; }

/* ── Sprint 8-10: Blog + Newsletter dark mode ── */
[data-theme="dark"] .mtv-kpi-card { background: var(--mtv-bg-light); border-color: var(--mtv-border-light); }
[data-theme="dark"] .mtv-quick-action { background: var(--mtv-bg-light); border-color: var(--mtv-border-light); color: var(--mtv-text-dark); }
[data-theme="dark"] .mtv-quick-action:hover { border-color: var(--mtv-primary); }
[data-theme="dark"] .mtv-timeline::before { background: var(--mtv-border-light); }
[data-theme="dark"] .mtv-timeline-item::before { border-color: var(--mtv-bg-dark); }
[data-theme="dark"] .mtv-contract-card { border-color: var(--mtv-primary); background: var(--mtv-bg-light); }
[data-theme="dark"] .blog-content blockquote { background: var(--mtv-bg-light); border-color: var(--mtv-primary); }
[data-theme="dark"] .blog-content pre { background: var(--mtv-bg-light); border-color: var(--mtv-border-light); }
[data-theme="dark"] .blog-content code { background: var(--mtv-bg-light); }
[data-theme="dark"] .blog-content th { background: var(--mtv-bg-light); }
