/* Variables CSS pour un thème Clair Premium (Violet) */
:root {
    --primary-color: #6d28d9;
    --secondary-color: #8b5cf6;
    --accent-color: #d946ef;
    --bg-light: #f8fafc;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-size: 0.85rem; /* Taille de police encore réduite */
    -webkit-font-smoothing: antialiased;
}

.admin-body {
    font-size: 0.915rem !important; /* Augmentation de 1px */
}

/* Custom Accent Theme for BAC */
.text-accent { color: var(--accent-color) !important; }
.bg-accent { background-color: var(--accent-color) !important; }
.bg-accent-light { background-color: rgba(217, 70, 239, 0.1) !important; }
.border-accent { border-color: var(--accent-color) !important; }
.btn-outline-accent { color: var(--accent-color); border: 1px solid var(--accent-color); }
.btn-outline-accent:hover { background-color: var(--accent-color); color: var(--white); }
.btn-accent { background-color: var(--accent-color); color: var(--white); border: none; }
.btn-accent:hover { background-color: #c026d3; color: var(--white); } /* Fuchsia 600 */

/* Typographie */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    letter-spacing: -0.025em;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glassmorphism Classes */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    box-shadow: var(--shadow-soft);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(255, 255, 255, 0.8);
}

/* Boutons Premium */
.btn-premium {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 700;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
    transition: all 0.3s ease;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(109, 40, 217, 0.5); /* Changed shadow to match purple */
    color: var(--white);
}

.btn-premium-blue {
    background: linear-gradient(135deg, #0284c7, #3b82f6); /* Blue gradient */
    color: var(--white);
    border: none;
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 700;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
    transition: all 0.3s ease;
}

.btn-premium-blue:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
    color: var(--white);
}

.btn-premium-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-premium-outline:hover {
    background: rgba(109, 40, 217, 0.05);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Hero Section Animée */
.hero-wrapper {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(250, 245, 255, 0.7) 0%, rgba(248, 250, 252, 0.85) 100%), url('/images/algerian_students_hero.png');
    background-size: cover;
    background-position: center;
    padding: 120px 0 80px 0;
}

.hero-bg-shapes {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    overflow: hidden;
}

.shape-1 {
    position: absolute;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(109, 40, 217, 0.1) 0%, rgba(255,255,255,0) 70%);
    top: -200px; right: -100px;
}
.shape-2 {
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, rgba(255,255,255,0) 70%);
    bottom: -100px; left: -100px;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Forms (Login/Register) */
.form-control {
    border-radius: 0.75rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid #e2e8f0;
    background-color: var(--bg-light);
    transition: all 0.3s ease;
}

.hero-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 900px;
    opacity: 0.07; /* Effet de filigrane très subtil */
    z-index: 0;
    pointer-events: none;
}

.form-control:focus {
    background-color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.1);
}

.split-layout {
    min-height: 100vh;
    display: flex;
}
.split-left {
    flex: 1;
    background: linear-gradient(135deg, rgba(109, 40, 217, 0.9), rgba(139, 92, 246, 0.9)), url('/images/students.png');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    padding: 3rem;
    text-align: center;
}

.split-left-register {
    background: linear-gradient(135deg, rgba(109, 40, 217, 0.9), rgba(139, 92, 246, 0.9)), url('/images/algerian_students_register.png');
    background-size: cover;
    background-position: center;
}

.split-left-login {
    background: linear-gradient(135deg, rgba(109, 40, 217, 0.9), rgba(139, 92, 246, 0.9)), url('/images/algerian_student_login.png');
    background-size: cover;
    background-position: center;
}
.split-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    padding: 3rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .split-layout {
        flex-direction: column;
    }
    .split-left {
        display: none; /* Cache l'image sur mobile pour se concentrer sur le formulaire */
    }
    .split-right {
        padding: 2rem 1rem;
    }
    
    .hero-wrapper {
        padding: 100px 0 60px 0;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .btn-premium, .btn-premium-outline {
        padding: 0.5rem 1.2rem;
        font-size: 0.95rem !important;
    }
    .hero-content .btn-premium, .hero-content .btn-premium-outline {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
    .hero-content .d-flex {
        flex-direction: column;
        gap: 10px !important;
    }
}

/* Navbar */
.navbar-premium {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

.navbar-premium > .container-fluid,
.navbar-premium > .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.navbar-premium .nav-link {
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 5px; /* Espace pour la ligne de soulignement */
    font-size: 1.2rem !important;
    font-weight: 800 !important;
}

.navbar-premium .nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

.navbar-premium .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    border-radius: 5px;
    transition: width 0.3s ease;
}

.navbar-premium .nav-link:hover::after {
    width: 60%;
}

/* Sidebar Admin Responsive */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw;
}
.admin-wrapper {
    min-height: 100vh;
    overflow-x: hidden !important;
    position: relative;
    max-width: 100vw;
}
.admin-sidebar {
    width: 225px;
    min-width: 225px;
    min-height: 100vh;
    transition: all 0.3s ease;
}
.admin-content {
    min-width: 0 !important;
    width: 100%;
}
/* Sidebar Admin Collapsible / Offcanvas in Mobile */
.admin-mobile-topbar {
    display: none !important;
}
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1048;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 991.98px) {
    .admin-wrapper {
        flex-direction: column !important;
    }
    .admin-sidebar {
        position: fixed !important;
        top: 0;
        right: 0;
        bottom: 0;
        height: 100vh !important;
        width: 285px !important;
        max-width: 85vw !important;
        z-index: 1055 !important;
        transform: translateX(100%);
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15) !important;
        overflow-y: auto !important;
    }
    .admin-sidebar.show {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }
    .admin-content {
        padding: 85px 1rem 1.5rem 1.5rem !important; /* Add top padding to clear mobile topbar */
        width: 100% !important;
    }
    .admin-mobile-topbar {
        display: flex !important;
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        height: 65px;
        background-color: var(--white, #ffffff);
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        z-index: 1040;
        align-items: center;
        justify-content: space-between;
    }
    [data-theme="dark"] .admin-mobile-topbar {
        background-color: #1e293b !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
}

/* ==========================================
   DEVELOPMENT: DARK MODE OVERRIDES
   ========================================== */

[data-theme="dark"] {
    --bg-light: #0f172a;
    --text-dark: #f8fafc;
    --text-muted: #94a3b8;
    --white: #1e293b;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    
    /* Bootstrap 5 Native Variables Overrides */
    --bs-body-bg: #0f172a;
    --bs-body-bg-rgb: 15, 23, 42;
    --bs-body-color: #f8fafc;
    --bs-body-color-rgb: 248, 250, 252;
    --bs-secondary-bg: #1e293b;
    --bs-secondary-bg-rgb: 30, 41, 59;
    --bs-tertiary-bg: #0f172a;
    --bs-tertiary-bg-rgb: 15, 23, 42;
    --bs-border-color: rgba(255, 255, 255, 0.1);
    --bs-border-color-translucent: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] body {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

[data-theme="dark"] .hero-wrapper {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%), url('/images/algerian_students_hero.png') !important;
    background-size: cover !important;
    background-position: center !important;
}

[data-theme="dark"] .bg-white {
    background-color: var(--white) !important;
}

[data-theme="dark"] .card {
    background-color: var(--white) !important;
    color: var(--text-dark) !important;
}

[data-theme="dark"] .card-header {
    background-color: rgba(255, 255, 255, 0.02) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .table {
    --bs-table-bg: transparent !important;
    --bs-table-color: var(--text-dark) !important;
    --bs-table-border-color: rgba(255, 255, 255, 0.1) !important;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02) !important;
    --bs-table-striped-color: var(--text-dark) !important;
    --bs-table-active-bg: rgba(255, 255, 255, 0.1) !important;
    --bs-table-active-color: var(--text-dark) !important;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.04) !important;
    --bs-table-hover-color: var(--text-dark) !important;
    color: var(--text-dark) !important;
}

[data-theme="dark"] .table-light {
    --bs-table-bg: #0f172a !important;
    --bs-table-color: #f8fafc !important;
    --bs-table-border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .table th, [data-theme="dark"] .table td {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .table-hover tbody tr:hover {
    color: var(--text-dark) !important;
    background-color: rgba(255, 255, 255, 0.04) !important;
}

[data-theme="dark"] .form-control, [data-theme="dark"] .form-select {
    background-color: #0f172a;
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .form-check-input {
    background-color: #0f172a !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

[data-theme="dark"] .form-check-input:checked {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

[data-theme="dark"] input:disabled, 
[data-theme="dark"] input[readonly] {
    background-color: #1e293b !important;
    color: #cbd5e1 !important;
    opacity: 0.8;
}


[data-theme="dark"] .form-control:focus, [data-theme="dark"] .form-select:focus {
    background-color: #0f172a;
    color: #f8fafc;
}

[data-theme="dark"] .form-control::placeholder {
    color: #64748b;
}

[data-theme="dark"] .bg-light {
    background-color: #0f172a !important;
}

[data-theme="dark"] .border {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .admin-sidebar {
    background-color: #1e293b !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .admin-sidebar .sidebar-brand {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .admin-sidebar .nav-link {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .admin-sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #fff !important;
}

[data-theme="dark"] .admin-sidebar .nav-link.active {
    background-color: var(--primary-color) !important;
    color: white !important;
}

[data-theme="dark"] .text-dark {
    color: #f8fafc !important;
}

[data-theme="dark"] .text-muted {
    color: #94a3b8 !important;
}

[data-theme="dark"] .text-secondary {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .text-light {
    color: #f8fafc !important;
}

[data-theme="dark"] .text-black-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

[data-theme="dark"] .alert-danger, [data-theme="dark"] .alert-success {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

[data-theme="dark"] hr {
    background-color: rgba(255, 255, 255, 0.2);
    opacity: 0.2;
}

[data-theme="dark"] .navbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .lesson-item {
    background-color: #1e293b !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
}

[data-theme="dark"] .navbar-premium {
    background: rgba(15, 23, 42, 0.95) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .navbar-premium .nav-link {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .navbar-premium .nav-link:hover,
[data-theme="dark"] .navbar-premium .nav-link.active {
    color: white !important;
}

[data-theme="dark"] .dropdown-menu {
    background-color: var(--white) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-dark) !important;
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: white !important;
}

/* Sidebar Premium Color Modes & Section Links No-Wrap */
.admin-sidebar .nav-link {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    font-size: 0.9rem !important;
    padding: 0.5rem 0.8rem !important;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.admin-sidebar .nav-link span {
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-sidebar .nav-link i {
    flex-shrink: 0 !important;
}
.nav-pills-custom .nav-link,
.nav-pills .nav-link {
    white-space: nowrap !important;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.nav-pills-custom {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}
.nav-pills-custom::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}
.admin-sidebar .nav-link i {
    transition: transform 0.2s ease;
}
.admin-sidebar .nav-link:hover i {
    transform: scale(1.15);
}
.admin-sidebar .nav-link.active-blue { background-color: rgba(59, 130, 246, 0.1) !important; color: #3b82f6 !important; font-weight: 700; }
.admin-sidebar .nav-link.active-green { background-color: rgba(16, 185, 129, 0.1) !important; color: #10b981 !important; font-weight: 700; }
.admin-sidebar .nav-link.active-indigo { background-color: rgba(99, 102, 241, 0.1) !important; color: #6366f1 !important; font-weight: 700; }
.admin-sidebar .nav-link.active-amber { background-color: rgba(245, 158, 11, 0.1) !important; color: #f59e0b !important; font-weight: 700; }
.admin-sidebar .nav-link.active-cyan { background-color: rgba(6, 182, 212, 0.1) !important; color: #06b6d4 !important; font-weight: 700; }
.admin-sidebar .nav-link.active-purple { background-color: rgba(168, 85, 247, 0.1) !important; color: #a855f7 !important; font-weight: 700; }
.admin-sidebar .nav-link.active-rose { background-color: rgba(244, 63, 94, 0.1) !important; color: #f43f5e !important; font-weight: 700; }
.admin-sidebar .nav-link.active-orange { background-color: rgba(249, 115, 22, 0.1) !important; color: #f97316 !important; font-weight: 700; }
.admin-sidebar .nav-link.active-slate { background-color: rgba(100, 116, 139, 0.1) !important; color: #64748b !important; font-weight: 700; }

/* Sidebar Hover Highlight & Shift Effects */
.sidebar-blue:hover { background-color: rgba(59, 130, 246, 0.08) !important; color: #3b82f6 !important; transform: translateX(-6px); }
.sidebar-green:hover { background-color: rgba(16, 185, 129, 0.08) !important; color: #10b981 !important; transform: translateX(-6px); }
.sidebar-indigo:hover { background-color: rgba(99, 102, 241, 0.08) !important; color: #6366f1 !important; transform: translateX(-6px); }
.sidebar-amber:hover { background-color: rgba(245, 158, 11, 0.08) !important; color: #f59e0b !important; transform: translateX(-6px); }
.sidebar-cyan:hover { background-color: rgba(6, 182, 212, 0.08) !important; color: #06b6d4 !important; transform: translateX(-6px); }
.sidebar-purple:hover { background-color: rgba(168, 85, 247, 0.08) !important; color: #a855f7 !important; transform: translateX(-6px); }
.sidebar-rose:hover { background-color: rgba(244, 63, 94, 0.08) !important; color: #f43f5e !important; transform: translateX(-6px); }
.sidebar-orange:hover { background-color: rgba(249, 115, 22, 0.08) !important; color: #f97316 !important; transform: translateX(-6px); }
.sidebar-slate:hover { background-color: rgba(100, 116, 139, 0.08) !important; color: #64748b !important; transform: translateX(-6px); }

/* Smart Study Companion Distinctive AI Style */
.sidebar-ai {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(236, 72, 153, 0.08)) !important;
    border: 1px solid rgba(124, 58, 237, 0.2) !important;
    transition: all 0.3s ease !important;
}
.sidebar-ai:hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.16), rgba(236, 72, 153, 0.16)) !important;
    border-color: rgba(124, 58, 237, 0.4) !important;
    color: #7c3aed !important;
    transform: translateX(-6px) scale(1.02);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.15);
}
.admin-sidebar .nav-link.active-ai {
    background: linear-gradient(135deg, #7c3aed, #ec4899) !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
    border: none !important;
}
.admin-sidebar .nav-link.active-ai i,
.admin-sidebar .nav-link.active-ai span {
    color: #ffffff !important;
}

/* Sidebar Category Header Badges - Ultra Premium Banner Gradient */
.sidebar-category-blue {
    background: linear-gradient(135deg, #1e1b4b 0%, #1e3a8a 60%, #2563eb 100%) !important;
    border-right: 4px solid #3b82f6 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(30, 27, 75, 0.3) !important;
}
.sidebar-category-purple {
    background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 60%, #7c3aed 100%) !important;
    border-right: 4px solid #ec4899 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(30, 27, 75, 0.3) !important;
}
.sidebar-category-amber {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #4338ca 100%) !important;
    border-right: 4px solid #f59e0b !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(30, 27, 75, 0.3) !important;
}

/* Dark Mode support for Sidebar Category Header Badges */
[data-theme="dark"] .sidebar-category-blue {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #1d4ed8 100%) !important;
    border-right: 4px solid #60a5fa !important;
    color: #ffffff !important;
}
[data-theme="dark"] .sidebar-category-purple {
    background: linear-gradient(135deg, #0f172a 0%, #581c87 60%, #6d28d9 100%) !important;
    border-right: 4px solid #f472b6 !important;
    color: #ffffff !important;
}
[data-theme="dark"] .sidebar-category-amber {
    background: linear-gradient(135deg, #0f172a 0%, #312e81 60%, #3730a3 100%) !important;
    border-right: 4px solid #fbbf24 !important;
    color: #ffffff !important;
}

/* Pricing Cards Hover Effects */
.pricing-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.pricing-card:hover {
    transform: translateY(-12px) scale(1.025) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12) !important;
}

/* Featured Plan Subtle Glow Pulse */
.border-primary-accent-featured {
    border: 2px solid var(--primary-color) !important;
    animation: border-pulse 3s infinite alternate;
}

@keyframes border-pulse {
    0% {
        box-shadow: 0 10px 25px -5px rgba(109, 40, 217, 0.2);
    }
    100% {
        box-shadow: 0 15px 35px 0 rgba(109, 40, 217, 0.45);
    }
}

/* Level Page Subscribe Button Hover Effect */
.level-subscribe-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.level-subscribe-btn:hover {
    background-color: var(--btn-color) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-2px) !important;
}

/* Align public header dropdown items */
.navbar-premium .dropdown-menu {
    text-align: right !important;
    right: 0 !important;
    left: auto !important;
}
.navbar-premium .dropdown-item {
    text-align: right !important;
    display: block !important;
    width: 100% !important;
    padding: 0.5rem 1.5rem !important;
    font-size: 1rem !important;
}

/* Pricing Amount Box Styles for Light & Dark Mode */
.pricing-amount-box {
    transition: all 0.3s ease;
}
.pricing-amount-1 {
    background: linear-gradient(135deg, #ffedd5, #fff7ed) !important;
    color: #7c2d12 !important;
}
.pricing-amount-2 {
    background: linear-gradient(135deg, #d1fae5, #f0fdf4) !important;
    color: #064e3b !important;
}
.pricing-amount-3 {
    background: linear-gradient(135deg, #ede9fe, #f5f3ff) !important;
    color: #3b0764 !important;
}
.pricing-amount-live {
    background: linear-gradient(135deg, #fee2e2, #fef2f2) !important;
    color: #991b1b !important;
}

/* Dark mode overrides */
[data-theme="dark"] .pricing-amount-1 {
    background: rgba(249, 115, 22, 0.15) !important;
    color: #ff9d5c !important;
}
[data-theme="dark"] .pricing-amount-2 {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
}
[data-theme="dark"] .pricing-amount-3 {
    background: rgba(109, 40, 217, 0.15) !important;
    color: #a78bfa !important;
}
[data-theme="dark"] .pricing-amount-live {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
}

/* Invert mobile menu toggler icon in dark mode for visibility */
[data-theme="dark"] .navbar-toggler-icon {
    filter: invert(1) !important;
}

/* Dark Mode Hero Badge & Buttons High-Contrast Overrides */
[data-theme="dark"] .hero-wrapper .badge.bg-primary {
    background-color: rgba(167, 139, 250, 0.15) !important;
    color: #c084fc !important;
}
[data-theme="dark"] .btn-premium {
    background: linear-gradient(135deg, #8b5cf6, #d946ef) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4) !important;
}
[data-theme="dark"] .btn-premium-outline {
    color: #a78bfa !important;
    border: 2px solid #a78bfa !important;
}
[data-theme="dark"] .btn-premium-outline:hover {
    background: rgba(167, 139, 250, 0.1) !important;
    color: #c084fc !important;
}

/* Hide hero white watermark canvas in dark mode to prevent contrast clashing */
[data-theme="dark"] .hero-bg-image-watermark {
    display: none !important;
}

/* Modals Dark Mode */
[data-theme="dark"] .modal-content {
    background-color: var(--white) !important; /* Maps to #1e293b */
    color: var(--text-dark) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}
[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: rgba(255, 255, 255, 0.1) !important;
}
[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Input Group Text Dark Mode */
[data-theme="dark"] .input-group-text {
    background-color: #0f172a !important;
    color: #94a3b8 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Nav Pills Dark Mode */
[data-theme="dark"] .nav-pills .nav-link:not(.active) {
    color: #cbd5e1;
}
[data-theme="dark"] .nav-pills .nav-link:not(.active):hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Button Light Dark Mode */
[data-theme="dark"] .btn-light {
    background-color: #334155 !important;
    color: #f8fafc !important;
    border-color: #475569 !important;
}
[data-theme="dark"] .btn-light:hover {
    background-color: #475569 !important;
    color: #ffffff !important;
}

/* Custom Level Filter Tabs Colors */
.filter-tab-1 {
    color: #f97316 !important;
    border: 1px solid rgba(249, 115, 22, 0.2) !important;
    background: transparent;
}
.filter-tab-1:hover {
    background-color: rgba(249, 115, 22, 0.1) !important;
}
.filter-tab-1.active {
    background-color: #f97316 !important;
    color: white !important;
    border-color: #f97316 !important;
}

.filter-tab-2 {
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
    background: transparent;
}
.filter-tab-2:hover {
    background-color: rgba(16, 185, 129, 0.1) !important;
}
.filter-tab-2.active {
    background-color: #10b981 !important;
    color: white !important;
    border-color: #10b981 !important;
}

.filter-tab-3 {
    color: #6d28d9 !important;
    border: 1px solid rgba(109, 40, 217, 0.2) !important;
    background: transparent;
}
.filter-tab-3:hover {
    background-color: rgba(109, 40, 217, 0.1) !important;
}
.filter-tab-3.active {
    background-color: #6d28d9 !important;
    color: white !important;
    border-color: #6d28d9 !important;
}

/* Level Dropdown Links Explicit Orange Palette for Navbar */
.dropdown-item-level-1 {
    color: #f97316 !important;
}
.dropdown-item-level-1:hover, .dropdown-item-level-1:focus {
    background-color: rgba(249, 115, 22, 0.1) !important;
    color: #ea580c !important;
}

.dropdown-item-level-2 {
    color: #10b981 !important;
}
.dropdown-item-level-2:hover, .dropdown-item-level-2:focus {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: #059669 !important;
}

.dropdown-item-level-3 {
    color: #6d28d9 !important;
}
.dropdown-item-level-3:hover, .dropdown-item-level-3:focus {
    background-color: rgba(109, 40, 217, 0.1) !important;
    color: #5b21b6 !important;
}

/* Universal High-Contrast Hover for Subscription & Live Buttons */
.btn-custom-theme,
.btn-activate-sub,
.btn-warning,
.btn-danger,
.zoom-join-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-custom-theme:hover {
    color: #ffffff !important;
    filter: brightness(1.15) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(109, 40, 217, 0.4) !important;
}

.btn-warning:hover {
    color: #0f172a !important;
    filter: brightness(1.1) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4) !important;
}

.btn-danger:hover {
    color: #ffffff !important;
    filter: brightness(1.1) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4) !important;
}

/* Universal Print Styles - Suppress Default Browser Headers & Footers (URL, Document Title, Date, Page Numbers) */
@page {
    size: auto;
    margin: 0 !important;
}
@media print {
    @page {
        size: auto;
        margin: 0 !important;
    }
}

/* ==========================================================================
   ULTRA-PREMIUM POPUP & MODAL CLOSE BUTTON ENHANCEMENTS
   ========================================================================== */

/* Ensure popups and modal containers use relative positioning for absolute top close icons */
.premium-popup-card,
.modal-content,
.modal-dialog,
.popup-box,
.modal-box,
.solution-card-modal {
    position: relative !important;
}

/* 1. Top-Corner Icon Close Buttons (X button) */
.popup-close-x,
.modal-close-icon,
.btn-modal-close-x,
.btn-close-modal-icon,
.premium-popup-card > .btn-close,
.modal-header .btn-close,
.modal-content > .btn-close {
    position: absolute !important;
    top: 14px !important;
    left: 14px !important; /* Top-left corner for RTL layout */
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: rgba(241, 245, 249, 0.9) !important;
    border: 1px solid rgba(203, 213, 225, 0.8) !important;
    color: #64748b !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    z-index: 20 !important;
    outline: none !important;
    opacity: 1 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* LTR Direction Override */
[dir="ltr"] .popup-close-x,
[dir="ltr"] .modal-close-icon,
[dir="ltr"] .btn-modal-close-x,
[dir="ltr"] .btn-close-modal-icon,
[dir="ltr"] .premium-popup-card > .btn-close,
[dir="ltr"] .modal-header .btn-close {
    left: auto !important;
    right: 14px !important;
}

/* Micro-interaction on Hover for Top Close Icon */
.popup-close-x:hover,
.modal-close-icon:hover,
.btn-modal-close-x:hover,
.btn-close-modal-icon:hover,
.premium-popup-card > .btn-close:hover,
.modal-header .btn-close:hover,
.modal-content > .btn-close:hover {
    background: #fee2e2 !important;
    color: #ef4444 !important;
    border-color: #fca5a5 !important;
    transform: rotate(90deg) scale(1.12) !important;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3) !important;
}

/* Active / Press State */
.popup-close-x:active,
.modal-close-icon:active,
.btn-modal-close-x:active,
.btn-close-modal-icon:active,
.premium-popup-card > .btn-close:active,
.modal-header .btn-close:active {
    transform: rotate(90deg) scale(0.92) !important;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.2) !important;
}

/* 2. Dark Mode Support for Top Close Icon */
[data-theme="dark"] .popup-close-x,
[data-theme="dark"] .modal-close-icon,
[data-theme="dark"] .btn-modal-close-x,
[data-theme="dark"] .btn-close-modal-icon,
[data-theme="dark"] .premium-popup-card > .btn-close,
[data-theme="dark"] .modal-header .btn-close {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    color: #cbd5e1 !important;
}

[data-theme="dark"] .popup-close-x:hover,
[data-theme="dark"] .modal-close-icon:hover,
[data-theme="dark"] .btn-modal-close-x:hover,
[data-theme="dark"] .btn-close-modal-icon:hover,
[data-theme="dark"] .premium-popup-card > .btn-close:hover,
[data-theme="dark"] .modal-header .btn-close:hover {
    background: rgba(239, 68, 68, 0.25) !important;
    color: #f87171 !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
    box-shadow: 0 4px 18px rgba(239, 68, 68, 0.4) !important;
}

/* 3. Main Action Close Buttons (.btn-popup-close, .btn-modal-close) */
.btn-popup-close,
.btn-modal-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 11px 22px !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;
}

.btn-popup-close:hover,
.btn-modal-close:hover {
    transform: translateY(-2px) !important;
    filter: brightness(1.08) !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15) !important;
}

.btn-popup-close:active,
.btn-modal-close:active {
    transform: translateY(0) scale(0.98) !important;
}


