/* ============================================
   Wolfofbey Platform - Custom Styles
   Premium dark + gold theme
   ============================================ */

/* ---- CSS Variables / Design Tokens ---- */
:root {
    --wb-primary: #cb202b;
    --wb-primary-light: #f03e4a;
    --wb-primary-dark: #a11a22;
    --wb-gold: var(--wb-primary);
    --wb-gold-light: var(--wb-primary-light);
    --wb-gold-dark: var(--wb-primary-dark);
    --wb-dark: #0D0D0D;
    --wb-dark-2: #1A1A1A;
    --wb-dark-3: #252525;
    --wb-dark-4: #2F2F2F;
    --wb-gray: #8A8A8A;
    --wb-gray-light: #B3B3B3;
    --wb-white: #F5F5F5;
    --wb-success: #2ECC71;
    --wb-danger: #E74C3C;
    --wb-info: #3498DB;
    --wb-radius: 12px;
    --wb-radius-sm: 8px;
    --wb-radius-lg: 20px;
    --wb-shadow: 0 4px 24px rgba(0,0,0,0.3);
    --wb-shadow-hover: 0 8px 40px rgba(203, 32, 43, 0.2);
    --wb-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-primary: 'Inter', sans-serif;
    --font-display: 'Outfit', sans-serif;
}

/* ---- Reset / Base ---- */
* { box-sizing: border-box; }

body {
    font-family: var(--font-primary);
    background-color: var(--wb-dark);
    color: var(--wb-white);
    line-height: 1.7;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
}

a {
    color: var(--wb-gold);
    text-decoration: none;
    transition: var(--wb-transition);
}
a:hover { color: var(--wb-gold-light); }

img { max-width: 100%; height: auto; }

::selection {
    background: var(--wb-gold);
    color: var(--wb-dark);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--wb-dark-2); }
::-webkit-scrollbar-thumb { background: var(--wb-dark-4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--wb-gold-dark); }

/* ============================================
   NAVBAR
   ============================================ */
#mainNavbar {
    background: rgba(13, 13, 13, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(203, 32, 43, 0.1);
    padding: 0.8rem 0;
    transition: var(--wb-transition);
}

#mainNavbar.scrolled {
    background: rgba(13, 13, 13, 0.97);
    padding: 0.5rem 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.navbar-brand {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 2px;
    padding: 0;
    margin: 0;
}

@media (max-width: 767.98px) {
    #mainNavbar .container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    .navbar-brand {
        flex: 1;
        max-width: 70%;
    }
    .navbar-toggler {
        order: 2;
    }
    .site-logo {
        height: 40px !important;
    }
}

.brand-wolf { color: var(--wb-white); font-weight: 800; }
.brand-of { color: var(--wb-gray); font-weight: 400; font-size: 0.85em; margin: 0 2px; }
.brand-bey { color: var(--wb-gold); font-weight: 800; }

.nav-link {
    color: var(--wb-gray-light) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem !important;
    position: relative;
    transition: var(--wb-transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--wb-gold);
    transition: var(--wb-transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--wb-white) !important;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 60%;
}

/* ---- Buttons ---- */
.btn-gold {
    background: linear-gradient(135deg, var(--wb-primary), var(--wb-primary-dark));
    color: var(--wb-white) !important;
    border: none;
    font-weight: 600;
    border-radius: var(--wb-radius-sm);
    transition: var(--wb-transition);
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--wb-primary-light), var(--wb-primary));
    color: var(--wb-white) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(203, 32, 43, 0.4);
}

.btn-outline-gold {
    border: 1.5px solid var(--wb-primary);
    color: var(--wb-primary) !important;
    background: transparent;
    font-weight: 600;
    border-radius: var(--wb-radius-sm);
    transition: var(--wb-transition);
}

.btn-outline-gold:hover {
    background: var(--wb-primary);
    color: var(--wb-white) !important;
    transform: translateY(-2px);
}

.btn-dark-custom {
    background: var(--wb-dark-3);
    color: var(--wb-white);
    border: 1px solid var(--wb-dark-4);
    border-radius: var(--wb-radius-sm);
    transition: var(--wb-transition);
}

.btn-dark-custom:hover {
    background: var(--wb-dark-4);
    color: var(--wb-gold);
    border-color: var(--wb-gold);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--wb-dark) 0%, var(--wb-dark-2) 50%, rgba(203,32,43,0.05) 100%);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(203,32,43,0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    100% { transform: translate(-50px, 50px) scale(1.2); opacity: 1; }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(203,32,43,0.1);
    border: 1px solid rgba(203,32,43,0.3);
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 0.85rem;
    color: var(--wb-gold);
    font-weight: 500;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

.hero-title .highlight {
    background: linear-gradient(135deg, var(--wb-gold), var(--wb-gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--wb-gray-light);
    max-width: 550px;
    line-height: 1.8;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 3rem;
    animation: fadeInUp 1.2s ease;
}

.hero-stat-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--wb-gold);
}

.hero-stat-label {
    font-size: 0.85rem;
    color: var(--wb-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   SECTION STYLING
   ============================================ */
.section-padding { padding: 6rem 0; }

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--wb-gold);
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--wb-gray-light);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.05rem;
}

.bg-dark-2 { background-color: var(--wb-dark-2); }
.bg-dark-3 { background-color: var(--wb-dark-3); }

.auth-page-section {
    padding-top: 6rem;
}

.auth-small-link {
    color: var(--wb-gold);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.auth-small-link:hover {
    color: var(--wb-white);
    text-decoration: underline;
}

/* ============================================
   COURSE CARDS
   ============================================ */
.course-card {
    background: var(--wb-dark-2);
    border: 1px solid var(--wb-dark-4);
    border-radius: var(--wb-radius);
    overflow: hidden;
    transition: var(--wb-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.course-card:hover {
    transform: translateY(-8px);
    border-color: rgba(203,32,43,0.3);
    box-shadow: var(--wb-shadow-hover);
}

.course-card-clickable {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.course-card-clickable:hover,
.course-card-clickable:focus {
    color: inherit;
    text-decoration: none;
}

.course-card-clickable:focus-visible {
    outline: 2px solid var(--wb-gold);
    outline-offset: 3px;
}

.course-card-clickable .btn {
    pointer-events: none;
}

/* Per-course themed hover — uses --card-accent set inline per card */
.themed-card:hover {
    transform: translateY(-8px);
    border-color: var(--card-accent) !important;
    box-shadow: 0 8px 40px color-mix(in srgb, var(--card-accent) 30%, transparent);
}

.themed-card .course-card-title a:hover {
    color: var(--card-accent) !important;
}

.course-card-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.course-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--wb-transition);
}

.course-card:hover .course-card-img img {
    transform: scale(1.05);
}

.course-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--wb-gold);
    color: var(--wb-dark);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.course-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-card-category {
    font-size: 0.8rem;
    color: var(--wb-gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.course-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--wb-white);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-card-title a { color: inherit; }
.course-card-title a:hover,
.course-card-clickable:hover .course-card-title { color: var(--wb-gold); }

.course-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--wb-gray);
    margin-bottom: 1rem;
}

.course-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--wb-dark-4);
    margin-top: auto;
}

.course-price {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--wb-gold);
}

.course-price.free {
    color: var(--wb-success);
}

.course-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--wb-gold);
    font-size: 0.85rem;
}

/* ============================================
   CATEGORY CARDS
   ============================================ */
.category-card {
    background: var(--wb-dark-2);
    border: 1px solid var(--wb-dark-4);
    border-radius: var(--wb-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: var(--wb-transition);
    cursor: pointer;
}

.category-card:hover {
    border-color: var(--wb-gold);
    transform: translateY(-4px);
    box-shadow: var(--wb-shadow-hover);
}

.category-card i {
    font-size: 2.5rem;
    color: var(--wb-gold);
    margin-bottom: 1rem;
    display: block;
}

.category-card h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--wb-white);
    margin-bottom: 0.25rem;
}

.category-card p {
    font-size: 0.85rem;
    color: var(--wb-gray);
    margin: 0;
}

/* ============================================
   TESTIMONIAL
   ============================================ */
.testimonial-card {
    background: var(--wb-dark-3);
    border: 1px solid var(--wb-dark-4);
    border-radius: var(--wb-radius);
    padding: 2rem;
    position: relative;
    transition: var(--wb-transition);
}

.testimonial-card:hover {
    border-color: rgba(203,32,43,0.3);
}

.testimonial-quote {
    font-size: 2rem;
    color: var(--wb-gold);
    opacity: 0.3;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

.testimonial-text {
    font-size: 1rem;
    color: var(--wb-gray-light);
    line-height: 1.8;
    font-style: italic;
    margin-bottom: 1.5rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--wb-primary), var(--wb-primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wb-white);
    font-weight: 700;
    font-size: 1.1rem;
}

.testimonial-name { font-weight: 600; font-size: 0.95rem; }
.testimonial-role { font-size: 0.8rem; color: var(--wb-gray); }

/* ============================================
   FORMS
   ============================================ */
.form-control, .form-select {
    background-color: var(--wb-dark-3);
    border: 1px solid var(--wb-dark-4);
    color: var(--wb-white);
    border-radius: var(--wb-radius-sm);
    padding: 0.75rem 1rem;
    transition: var(--wb-transition);
}

.form-control:focus, .form-select:focus {
    background-color: var(--wb-dark-2);
    border-color: var(--wb-gold);
    color: var(--wb-white);
    box-shadow: 0 0 0 3px rgba(203,32,43,0.15);
}

.form-control::placeholder { color: var(--wb-gray); }

.form-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--wb-gray-light);
    margin-bottom: 0.4rem;
}

.auth-card {
    background: var(--wb-dark-2);
    border: 1px solid var(--wb-dark-4);
    border-radius: var(--wb-radius-lg);
    padding: 2.5rem;
    max-width: 480px;
    margin: 0 auto;
    box-shadow: var(--wb-shadow);
}

.auth-card .auth-title {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-card .auth-subtitle {
    text-align: center;
    color: var(--wb-gray);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.auth-app-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 0%, rgba(203, 32, 43, 0.22), transparent 34rem),
        linear-gradient(180deg, #090909 0%, #111111 48%, #080808 100%);
}

.auth-app-body main {
    min-height: 100vh;
}

.app-login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(1.25rem, env(safe-area-inset-top)) 1rem max(1.25rem, env(safe-area-inset-bottom));
}

.app-login-shell {
    width: min(100%, 440px);
}

.app-login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.4rem;
}

.app-login-logo {
    width: min(78vw, 260px);
    height: auto;
    display: block;
}

.app-login-badge {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.35rem 0.8rem;
    border: 1px solid rgba(203, 32, 43, 0.45);
    border-radius: 999px;
    background: rgba(203, 32, 43, 0.12);
    color: var(--wb-gray-light);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.app-login-card {
    width: 100%;
    max-width: none;
    padding: 1.35rem;
    border-color: rgba(255, 255, 255, 0.09);
    border-radius: 22px;
    background: rgba(24, 24, 24, 0.92);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

.app-login-heading {
    margin-bottom: 1.35rem;
}

.app-login-card .auth-title {
    font-size: clamp(1.75rem, 8vw, 2.35rem);
    line-height: 1.05;
}

.app-login-card .auth-subtitle {
    max-width: 20rem;
    margin: 0.55rem auto 0;
    color: var(--wb-gray-light);
    line-height: 1.5;
}

.app-login-card .form-control {
    min-height: 3.25rem;
    border-radius: 14px;
    font-size: 1rem;
}

.app-login-card .btn-gold {
    min-height: 3.25rem;
    border-radius: 14px;
    font-size: 1rem;
}

.app-login-card .auth-small-link {
    color: var(--wb-gray-light);
    font-size: 0.86rem;
}

.account-settings-card {
    height: 100%;
    padding: 1.25rem;
    background: var(--wb-dark-2);
    border: 1px solid var(--wb-dark-4);
    border-radius: var(--wb-radius);
    box-shadow: var(--wb-shadow);
}

.account-settings-card h2 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

.account-settings-card p {
    color: var(--wb-gray-light);
    font-size: 0.95rem;
    line-height: 1.65;
}

.account-profile-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--wb-dark-4);
}

.account-profile-row:last-child {
    border-bottom: 0;
}

.account-profile-row span {
    color: var(--wb-gray);
    font-size: 0.88rem;
}

.account-profile-row strong {
    min-width: 0;
    text-align: right;
    overflow-wrap: anywhere;
}

.account-danger-card {
    border-color: rgba(231, 76, 60, 0.35);
}

.app-access-note {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(203, 32, 43, 0.08);
    border: 1px solid rgba(203, 32, 43, 0.22);
    border-radius: var(--wb-radius-sm);
}

.app-access-note > i {
    flex: 0 0 auto;
    color: var(--wb-gold);
    font-size: 1.35rem;
    line-height: 1.2;
}

.app-access-note strong {
    display: block;
    color: var(--wb-white);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.app-access-note p {
    margin: 0;
    color: var(--wb-gray-light);
    font-size: 0.88rem;
    line-height: 1.55;
}

.legal-page {
    min-height: 100vh;
    padding: 6rem 0 3rem;
    background:
        radial-gradient(circle at 50% 0%, rgba(203, 32, 43, 0.16), transparent 34rem),
        var(--wb-dark);
}

.legal-card {
    max-width: 860px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--wb-dark-2);
    border: 1px solid var(--wb-dark-4);
    border-radius: var(--wb-radius);
    box-shadow: var(--wb-shadow);
}

.legal-card h1 {
    margin: 0.35rem 0 0.3rem;
    font-size: clamp(2rem, 6vw, 3rem);
}

.legal-card h2 {
    margin-top: 1.5rem;
    font-size: 1.15rem;
}

.legal-card p {
    color: var(--wb-gray-light);
    line-height: 1.75;
}

.legal-updated {
    color: var(--wb-gray) !important;
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    .app-login-screen {
        align-items: stretch;
        padding-inline: 0.85rem;
    }

    .app-login-shell {
        display: flex;
        min-height: calc(100vh - 2.5rem);
        flex-direction: column;
        justify-content: center;
    }

    .app-login-card {
        padding: 1.15rem;
        border-radius: 20px;
    }
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    padding-top: 0;
}

.dashboard-sidebar {
    width: 280px;
    background: var(--wb-dark-2);
    border-right: 1px solid var(--wb-dark-4);
    padding: 1rem 0 2rem;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    transition: var(--wb-transition);
    z-index: 100;
}

.dashboard-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
}

.dashboard-content-polished {
    padding-top: 1.5rem;
}

.dashboard-page-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.6rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(203,32,43,0.07));
    border: 1px solid var(--wb-dark-4);
    border-radius: 8px;
}

.dashboard-menu-btn {
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--wb-dark-4);
    border-radius: 8px;
    background: var(--wb-dark-3);
    color: var(--wb-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    touch-action: manipulation;
}

.dashboard-menu-btn:hover {
    color: var(--wb-gold);
    border-color: rgba(203,32,43,0.45);
}

.dashboard-title-block {
    min-width: 0;
}

.dashboard-kicker {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--wb-gold);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dashboard-title-block h1 {
    margin: 0;
    color: var(--wb-white);
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 900;
    line-height: 1.1;
}

.dashboard-title-block p {
    margin: 0.35rem 0 0;
    color: var(--wb-gray);
    font-size: 0.92rem;
}

.dashboard-head-stats {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dashboard-head-stats span {
    min-height: 2.35rem;
    padding: 0.42rem 0.65rem;
    border: 1px solid var(--wb-dark-4);
    border-radius: 8px;
    background: rgba(0,0,0,0.12);
    color: var(--wb-gray-light);
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.dashboard-head-stats strong {
    color: var(--wb-white);
    font-size: 0.92rem;
}

.sidebar-nav .sidebar-club-link {
    position: relative;
    margin: 0.25rem 0.75rem;
    padding: 0.78rem 0.8rem !important;
    border: 1px solid transparent;
    border-radius: 8px;
    overflow: hidden;
}

.sidebar-nav .sidebar-club-link::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: .16;
    pointer-events: none;
}

.sidebar-nav .sidebar-club-link i,
.sidebar-nav .sidebar-club-link {
    position: relative;
    z-index: 1;
}

.sidebar-nav .sidebar-club-six {
    border-color: rgba(212, 168, 67, .32);
    color: #e8c96a !important;
}

.sidebar-nav .sidebar-club-six::before {
    background: linear-gradient(135deg, #d4a843, transparent 70%);
}

.sidebar-nav .sidebar-club-seven {
    border-color: rgba(226, 232, 240, .42);
    color: #f8fafc !important;
    box-shadow: 0 0 24px rgba(226,232,240,.08);
}

.sidebar-nav .sidebar-club-seven::before {
    opacity: .24;
    background: linear-gradient(135deg, #f8fafc, #8b5cf6 44%, transparent 78%);
}

.sidebar-nav .sidebar-club-link:hover,
.sidebar-nav .sidebar-club-link.active {
    transform: translateX(2px);
    background: rgba(255,255,255,.06) !important;
}

.sidebar-brand-block {
    padding: 0.25rem 1.25rem 1.1rem;
    border-bottom: 1px solid var(--wb-dark-4);
    margin-bottom: 0.65rem;
}

.sidebar-brand-link {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
}

.sidebar-logo {
    width: min(190px, 100%);
    height: auto;
    display: block;
}

.sidebar-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.sidebar-tool-btn {
    min-height: 2.25rem;
    border: 1px solid var(--wb-dark-4);
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    color: var(--wb-gray-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    text-decoration: none;
    transition: var(--wb-transition);
}

.sidebar-tool-btn:hover {
    color: var(--wb-gold);
    background: rgba(203,32,43,0.1);
    border-color: rgba(203,32,43,0.35);
}

.sidebar-nav .nav-link {
    padding: 0.75rem 1.5rem !important;
    color: var(--wb-gray-light) !important;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: var(--wb-transition);
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    color: var(--wb-gold) !important;
    background: rgba(203,32,43,0.05);
    border-left-color: var(--wb-gold);
}

.sidebar-nav .nav-link.active::after { display: none; }

.sidebar-nav .nav-link i {
    width: 24px;
    margin-right: 10px;
    text-align: center;
}

.sidebar-ticket-link,
.sidebar-count-link {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.sidebar-link-label {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.sidebar-ticket-badges {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
    flex-shrink: 0;
}

.sidebar-ticket-badge {
    min-width: 1.35rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.sidebar-ticket-badge.open {
    background: rgba(25, 135, 84, 0.18);
    color: #45d483;
}

.sidebar-ticket-badge.pending {
    background: rgba(255, 193, 7, 0.18);
    color: #ffd45a;
}

.sidebar-count-badge {
    min-width: 1.55rem;
    height: 1.35rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1;
}

.sidebar-count-badge.event {
    background: rgba(203, 32, 43, 0.18);
    color: var(--wb-gold);
}

.sidebar-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--wb-gray);
    padding: 1.5rem 1.5rem 0.5rem;
    font-weight: 600;
}

.sidebar-admin-root-title {
    padding-bottom: 0.2rem;
}

.sidebar-admin-groups {
    display: grid;
    gap: 0.8rem;
    padding: 0 0.75rem 0.5rem;
}

.sidebar-admin-group {
    padding: 0.7rem 0;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-admin-group:first-child {
    border-top: none;
}

.sidebar-admin-group-head {
    padding: 0 0.75rem 0.45rem;
}

.sidebar-admin-group-title,
.sidebar-admin-group-note {
    display: block;
}

.sidebar-admin-group-title {
    color: var(--wb-white);
    font-size: 0.88rem;
    font-weight: 900;
    line-height: 1.2;
}

.sidebar-admin-group-note {
    margin-top: 0.15rem;
    color: var(--wb-gray);
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.3;
}

.sidebar-admin-group .sidebar-nav .nav-link {
    margin: 0.12rem 0;
    padding: 0.58rem 0.75rem !important;
    border-left-width: 2px;
    border-radius: 8px;
    font-size: 0.88rem;
}

.sidebar-admin-group .sidebar-nav .nav-link:hover,
.sidebar-admin-group .sidebar-nav .nav-link.active {
    background: rgba(203,32,43,0.08);
}

.sidebar-admin-group .sidebar-nav .nav-link i {
    width: 20px;
    margin-right: 8px;
}

.sidebar-admin-group .sidebar-nav .sidebar-club-link {
    margin: 0.12rem 0;
}

/* ---- Stats Cards ---- */
.stat-card {
    background: var(--wb-dark-2);
    border: 1px solid var(--wb-dark-4);
    border-radius: var(--wb-radius);
    padding: 1.5rem;
    transition: var(--wb-transition);
}

.stat-card:hover {
    border-color: rgba(203,32,43,0.3);
    transform: translateY(-2px);
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--wb-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.stat-card-icon.gold { background: rgba(203,32,43,0.15); color: var(--wb-gold); }
.stat-card-icon.blue { background: rgba(52,152,219,0.15); color: var(--wb-info); }
.stat-card-icon.green { background: rgba(46,204,113,0.15); color: var(--wb-success); }
.stat-card-icon.red { background: rgba(231,76,60,0.15); color: var(--wb-danger); }

.stat-card-value {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
}

.stat-card-label {
    font-size: 0.85rem;
    color: var(--wb-gray);
}

/* ---- Progress Bar ---- */
.progress-custom {
    height: 6px;
    background: var(--wb-dark-4);
    border-radius: 3px;
    overflow: hidden;
}

.progress-custom-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--wb-gold-dark), var(--wb-gold));
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* ============================================
   LESSON PLAYER
   ============================================ */
.lesson-page-content {
    width: 100%;
    max-width: none;
}

.lesson-dashboard-head {
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin-bottom: 1rem;
}

.lesson-course-link {
    white-space: nowrap;
}

.lesson-breadcrumb .breadcrumb {
    margin-bottom: 0;
}

.lesson-player-wrapper {
    background: #000;
    border-radius: var(--wb-radius);
    overflow: hidden;
    aspect-ratio: 16/9;
    margin-bottom: 1.5rem;
}

.lesson-player-wrapper iframe,
.lesson-player-wrapper video {
    width: 100%;
    height: 100%;
    border: none;
}

.lesson-title-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.lesson-material-card,
.lesson-list-panel {
    background: var(--wb-dark-2);
    border: 1px solid var(--wb-dark-4);
    border-radius: 8px;
    color: var(--wb-gray-light);
}

.lesson-material-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.9;
}

.lesson-list-panel {
    padding: 1rem;
}

.lesson-nav-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.pdf-preview-wrapper {
    width: 100%;
    height: min(72vh, 760px);
    min-height: 520px;
    background: #111;
    border: 1px solid var(--wb-dark-4);
    border-radius: var(--wb-radius-sm);
    overflow: hidden;
}

.pdf-preview-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

@media (max-width: 767px) {
    .lesson-page-content {
        padding: 0.75rem;
    }

    .lesson-dashboard-head {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 0.7rem;
        padding: 0.75rem;
    }

    .lesson-dashboard-head .lesson-course-link {
        grid-column: 1 / -1;
        width: 100%;
        min-height: 2.4rem;
    }

    .lesson-breadcrumb {
        overflow-x: auto;
        white-space: nowrap;
    }

    .lesson-page-grid {
        --bs-gutter-y: 1rem;
    }

    .lesson-player-wrapper {
        border-radius: 8px;
        margin-bottom: 1rem;
    }

    .lesson-title-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
    }

    .lesson-title-actions h2 {
        font-size: 1.15rem !important;
        line-height: 1.25;
    }

    .lesson-title-actions form,
    .lesson-title-actions form .btn {
        width: 100%;
    }

    .lesson-material-card,
    .lesson-list-panel {
        padding: 0.85rem;
    }

    .lesson-material-card {
        line-height: 1.7;
        margin-bottom: 1rem;
    }

    .pdf-preview-wrapper {
        height: 60vh;
        min-height: 340px;
    }

    .lesson-nav-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.55rem;
    }

    .lesson-nav-actions > * {
        min-width: 0;
        width: 100%;
    }

    .lesson-nav-actions .btn {
        min-height: 2.55rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding-left: 0.65rem;
        padding-right: 0.65rem;
    }

    .lesson-list-panel h5 {
        padding: 0.25rem !important;
        margin-bottom: 0.35rem !important;
        font-size: 1rem;
    }

    .lesson-sidebar-item {
        min-height: 0;
        padding: 0.75rem;
    }

    .lesson-sidebar-title {
        font-size: 0.84rem;
        overflow-wrap: anywhere;
    }
}

/* ============================================
   SUPPORT TICKETS
   ============================================ */
body:has(.ticket-page) {
    overflow: hidden;
}

body:has(.ticket-page) footer {
    display: none;
}

.ticket-layout {
    display: grid;
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.ticket-page {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    height: auto;
    overflow: hidden;
    padding-top: 0;
    box-sizing: border-box;
    z-index: 90;
    background: var(--wb-dark);
}

.ticket-page .dashboard-content {
    height: 100%;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    padding-top: 0.25rem;
    padding-bottom: 0.3rem;
    box-sizing: border-box;
}

.ticket-dashboard-head {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    margin-bottom: 0.55rem;
}

.ticket-head-action {
    white-space: nowrap;
}

.ticket-dashboard-head .dashboard-head-stats {
    justify-content: end;
}

.ticket-page-filters {
    margin-bottom: 0.35rem;
}

.ticket-page-filters .btn {
    padding-top: 0.22rem;
    padding-bottom: 0.22rem;
}

.ticket-page .ticket-layout {
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    align-items: stretch;
}

.ticket-page .ticket-list {
    height: 100%;
    max-height: 100%;
}

.ticket-page .ticket-thread {
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    position: relative;
    overflow: hidden;
    padding-bottom: 0;
    box-sizing: border-box;
}

.ticket-list,
.ticket-thread {
    background: var(--wb-dark-2);
    border: 1px solid var(--wb-dark-4);
    border-radius: var(--wb-radius);
    color: var(--wb-white);
}

.ticket-layout .text-muted,
.ticket-thread .text-muted,
.ticket-list .text-muted {
    color: #aeb4bd !important;
}

.ticket-muted {
    color: #aeb4bd !important;
}

.ticket-list {
    padding: 0.75rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    min-height: 0;
}

.ticket-row {
    display: block;
    color: var(--wb-white);
    text-decoration: none;
    padding: 1rem;
    border-radius: var(--wb-radius-sm);
    border: 1px solid transparent;
    transition: var(--wb-transition);
}

.ticket-row strong,
.ticket-thread-head h4 {
    color: #fff;
}

.ticket-row .small,
.ticket-thread-head .small {
    color: #aeb4bd !important;
}

.ticket-row:hover,
.ticket-row.active {
    color: var(--wb-white);
    background: var(--wb-dark-3);
    border-color: rgba(203,32,43,0.35);
}

.ticket-thread {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.ticket-thread-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.55rem 0.9rem;
    border-bottom: 1px solid var(--wb-dark-4);
    flex-shrink: 0;
}

.ticket-thread-head h4 {
    font-size: 1.15rem;
}

.ticket-messages {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ticket-message {
    max-width: 78%;
    padding: 1rem;
    border-radius: var(--wb-radius-sm);
    background: var(--wb-dark-3);
    color: #e5e7eb;
    line-height: 1.6;
}

.ticket-message.own {
    align-self: flex-end;
    background: rgba(203,32,43,0.14);
    border: 1px solid rgba(203,32,43,0.28);
}

.ticket-message.staff {
    align-self: flex-start;
}

.ticket-message-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
    color: var(--wb-white);
}

.ticket-message-meta span {
    color: #b8bec7;
    font-size: 0.78rem;
}

.ticket-ai-summary {
    margin: 0.75rem 0.9rem 0;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(203, 32, 43, 0.28);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(203, 32, 43, 0.12), rgba(255, 255, 255, 0.035));
    color: #f8fafc;
    flex-shrink: 0;
}

.ticket-ai-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
    color: var(--wb-gold);
    font-weight: 900;
}

.ticket-ai-summary-head small {
    color: #b8bec7;
    font-size: 0.75rem;
    font-weight: 700;
}

.ticket-ai-summary-body {
    color: #e5e7eb;
    font-size: 0.9rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.ticket-ai-summary-body h3,
.ticket-ai-summary-body h4 {
    margin: 1rem 0 0.45rem;
    color: #fff;
    font-size: 0.98rem;
    font-weight: 900;
}

.ticket-ai-summary-body h3:first-child,
.ticket-ai-summary-body h4:first-child {
    margin-top: 0;
}

.ticket-ai-summary-body p {
    margin: 0 0 0.65rem;
}

.ticket-ai-summary-body ul,
.ticket-ai-summary-body ol {
    display: grid;
    gap: 0.55rem;
    margin: 0 0 0.8rem;
    padding-left: 1.1rem;
}

.ticket-ai-summary-body li {
    padding: 0.6rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.18);
}

.ticket-ai-summary-body strong {
    color: var(--wb-gold);
}

.ticket-reply {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-top: 1px solid var(--wb-dark-4);
    background: var(--wb-dark-2);
    flex: 0 0 auto;
    min-height: 44px;
    width: 100%;
    margin-top: auto;
    z-index: 2;
    box-sizing: border-box;
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
}

.ticket-page .ticket-reply textarea {
    min-height: 34px;
    height: 34px;
    padding: 0.35rem 0.6rem;
    resize: none;
}

.ticket-page .ticket-reply .btn {
    min-height: 34px;
    height: 34px;
    padding-left: 0.8rem;
    padding-right: 0.8rem;
}

.ticket-closed-note {
    display: block;
}

.ticket-reply textarea,
.ticket-thread textarea,
.ticket-thread select {
    color: #fff !important;
    background: var(--wb-dark-3) !important;
    border-color: var(--wb-dark-4) !important;
}

.ticket-reply textarea::placeholder,
.ticket-thread textarea::placeholder {
    color: #aeb4bd !important;
}

.ticket-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.ticket-category-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--wb-dark-3);
    border: 1px solid var(--wb-dark-4);
    border-radius: var(--wb-radius-sm);
    padding: 0.7rem;
    cursor: pointer;
    color: #f3f4f6;
}

.ticket-category-option span {
    color: #f3f4f6;
}

@media (min-width: 992px) {
    body:has(.ticket-page) {
        overflow: hidden;
    }

    .ticket-page {
        position: fixed;
        inset: 0;
        min-height: 0;
        height: auto;
        overflow: hidden;
        padding-top: 0;
        background: var(--wb-dark);
    }

    .ticket-page .dashboard-content {
        height: 100%;
        min-height: 0;
        margin-left: 280px;
        padding: 0.45rem 1rem 0.55rem;
        overflow: hidden;
        display: grid;
        grid-template-rows: auto auto auto minmax(0, 1fr);
        gap: 0;
    }

    .ticket-dashboard-head {
        min-height: 0;
        margin: 0 0 0.45rem;
        padding: 0.75rem;
    }

    .ticket-dashboard-head .ticket-head-action {
        padding: 0.38rem 0.7rem;
        line-height: 1.1;
    }

    .ticket-page-filters {
        min-height: 0;
        margin: 0 0 0.45rem;
        align-content: start;
    }

    .ticket-page-filters .btn {
        padding: 0.25rem 0.55rem;
        line-height: 1.1;
    }

    .ticket-page .ticket-layout {
        display: grid;
        grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
        gap: 0.75rem;
        min-height: 0;
        height: 100%;
        max-height: 100%;
        overflow: hidden;
        align-items: stretch;
    }

    .ticket-page .ticket-list,
    .ticket-page .ticket-thread {
        min-height: 0;
        height: 100%;
        max-height: 100%;
        border-radius: 8px;
        overflow: hidden;
    }

    .ticket-page .ticket-list {
        padding: 0.55rem;
        overflow-y: auto;
    }

    .ticket-page .ticket-thread {
        display: grid;
        grid-template-rows: auto minmax(0, 1fr) auto;
        padding: 0;
    }

    .ticket-page .ticket-thread-head {
        padding: 0.55rem 0.8rem;
        min-height: 0;
    }

    .ticket-page .ticket-thread-head h4 {
        font-size: 1rem;
        line-height: 1.2;
    }

    .ticket-page .ticket-messages {
        min-height: 0;
        height: auto;
        max-height: none;
        overflow-y: auto;
        padding: 0.75rem 0.9rem;
        gap: 0.75rem;
    }

    .ticket-page .ticket-message {
        padding: 0.75rem 0.9rem;
        line-height: 1.45;
    }

    .ticket-page .ticket-reply {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.5rem;
        min-height: 46px;
        width: 100%;
        margin: 0;
        padding: 0.4rem 0.6rem;
        border-top: 1px solid var(--wb-dark-4);
        background: var(--wb-dark-2);
        position: static;
    }

    .ticket-page .ticket-reply textarea {
        height: 34px;
        min-height: 34px;
        padding: 0.35rem 0.6rem;
        resize: none;
    }

    .ticket-page .ticket-reply .btn {
        height: 34px;
        min-height: 34px;
        padding: 0 0.8rem;
        white-space: nowrap;
    }
}

.permission-panel {
    background: var(--wb-dark-2);
    border: 1px solid var(--wb-dark-4);
    border-radius: var(--wb-radius);
    padding: 1.25rem;
    color: var(--wb-white);
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.permission-option {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    background: var(--wb-dark-3);
    border: 1px solid var(--wb-dark-4);
    border-radius: var(--wb-radius-sm);
    padding: 0.85rem;
    color: #f3f4f6;
    cursor: pointer;
}

.permission-option input {
    margin-top: 0.2rem;
}

.permission-option span {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-weight: 700;
}

.permission-option small {
    color: #aeb4bd;
    font-weight: 500;
    line-height: 1.35;
}

@media (max-width: 991.98px) {
    body:has(.ticket-page) {
        overflow: auto;
    }

    .ticket-page {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        height: auto;
        overflow: visible;
        padding-top: 0;
    }

    .ticket-page .dashboard-content {
        min-height: 100vh;
        height: auto;
        overflow: visible;
        display: flex;
        flex-direction: column;
        padding: 0.55rem;
    }

    .ticket-layout {
        grid-template-columns: 1fr;
    }

    .ticket-page .ticket-layout {
        display: grid;
        grid-template-rows: minmax(9rem, 26dvh) minmax(0, 1fr);
        height: calc(100dvh - 13.5rem);
        min-height: 34rem;
        overflow: hidden;
    }

    .ticket-page .ticket-thread {
        min-height: 0;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr) auto;
        overflow: hidden;
    }

    .ticket-page .ticket-list,
    .ticket-page .ticket-thread {
        min-height: 0;
        height: 100%;
        max-height: 100%;
    }
}

@media (max-width: 575.98px) {
    .ticket-page {
        top: auto;
    }

    .ticket-page .dashboard-content {
        padding: 0.45rem;
    }

    .ticket-dashboard-head {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 0.65rem;
        margin-bottom: 0.45rem;
        padding: 0.75rem;
    }

    .ticket-dashboard-head .dashboard-head-stats {
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ticket-dashboard-head .ticket-head-action {
        grid-column: 1 / -1;
        width: 100%;
        min-height: 2.45rem;
        padding: 0.35rem 0.55rem;
        font-size: 0.85rem;
    }

    .ticket-page-filters {
        gap: 0.35rem !important;
        margin-bottom: 0.4rem;
    }

    .ticket-page-filters .btn {
        padding: 0.3rem 0.45rem;
        font-size: 0.76rem;
    }

    .ticket-page .ticket-layout {
        gap: 0.45rem;
        grid-template-rows: minmax(7.5rem, 24dvh) minmax(0, 1fr);
        height: calc(100dvh - 15.75rem);
        min-height: 32rem;
        overflow: hidden;
    }

    .ticket-page .ticket-list {
        height: 100%;
        max-height: 100%;
        padding: 0.45rem;
        overflow-y: auto;
    }

    .ticket-page .ticket-thread {
        height: 100%;
        min-height: 0;
        max-height: 100%;
        padding-bottom: 0;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr) auto;
        overflow: hidden;
    }

    .ticket-row {
        padding: 0.65rem;
    }

    .ticket-thread-head {
        padding: 0.55rem 0.65rem;
        gap: 0.45rem;
    }

    .ticket-thread-head h4 {
        font-size: 1rem;
    }

    .ticket-thread-head .btn,
    .ticket-thread-head .form-select {
        font-size: 0.78rem;
        padding: 0.3rem 0.45rem;
    }

    .ticket-messages {
        padding: 0.55rem;
        gap: 0.55rem;
        min-height: 0;
        overflow-y: auto;
    }

    .ticket-message {
        padding: 0.65rem;
        font-size: 0.9rem;
    }

    .ticket-reply {
        grid-template-columns: minmax(0, 1fr) 44px;
        gap: 0.45rem;
        padding: 0.45rem;
        min-height: 48px;
        position: sticky;
        bottom: 0;
    }

    .ticket-page .ticket-reply textarea {
        height: 38px;
        min-height: 38px;
        padding: 0.45rem 0.6rem;
        font-size: 0.9rem;
    }

    .ticket-page .ticket-reply .btn {
        min-height: 38px;
        height: 38px;
        width: 44px;
        padding: 0;
        font-size: 0;
    }

    .ticket-page .ticket-reply .btn i {
        font-size: 1rem;
        margin: 0 !important;
    }

    .ticket-thread-head {
        flex-direction: column;
    }

    .ticket-message {
        max-width: 100%;
    }

    .ticket-category-grid {
        grid-template-columns: 1fr;
    }

    .permission-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Student Ticket Experience ---- */
.student-ticket-page .dashboard-page-head {
    background:
        radial-gradient(circle at 100% 0%, rgba(212, 168, 67, 0.12), transparent 28%),
        linear-gradient(135deg, rgba(255,255,255,0.045), rgba(203,32,43,0.08));
}

.student-ticket-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0.4rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 0.5rem;
}

.student-ticket-list-head strong,
.student-ticket-list-head span {
    display: block;
}

.student-ticket-list-head strong {
    color: #fff;
    font-weight: 900;
}

.student-ticket-list-head span {
    color: #aeb4bd;
    font-size: 0.78rem;
}

.student-ticket-page .ticket-row {
    position: relative;
    margin-bottom: 0.45rem;
    background: rgba(255,255,255,0.025);
    animation: ticketSlideIn 0.28s ease both;
}

.student-ticket-page .ticket-row:hover {
    transform: translateX(3px);
}

.student-ticket-row-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.7rem;
    align-items: start;
}

.student-ticket-status-dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
    margin-top: 0.35rem;
    background: #94a3b8;
    box-shadow: 0 0 0 0 rgba(148, 163, 184, 0.28);
}

.student-ticket-status-dot.is-open {
    background: #45d483;
    animation: ticketPulse 1.8s ease infinite;
}

.student-ticket-status-dot.is-pending {
    background: #ffd45a;
}

.student-ticket-status-dot.is-closed {
    background: #94a3b8;
}

.student-ticket-snippet {
    margin-top: 0.45rem;
    color: #d8dde5;
    font-size: 0.84rem;
    line-height: 1.35;
}

.student-ticket-thread-meta {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    color: #aeb4bd;
    font-size: 0.82rem;
}

.student-ticket-thread-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.student-ticket-page .ticket-message {
    max-width: 86%;
    padding: 0;
    background: transparent;
    border: 0;
    display: flex;
    align-items: flex-end;
    gap: 0.55rem;
    animation: ticketBubbleIn 0.24s ease both;
}

.student-ticket-page .ticket-message.own {
    flex-direction: row-reverse;
    align-self: flex-end;
    background: transparent;
    border: 0;
}

.student-ticket-page .ticket-message.staff {
    align-self: flex-start;
}

.student-ticket-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 900;
}

.student-ticket-page .ticket-message.own .student-ticket-avatar {
    background: rgba(203,32,43,0.22);
    border-color: rgba(203,32,43,0.3);
}

.student-ticket-bubble {
    padding: 0.85rem 0.95rem;
    border-radius: 14px 14px 14px 4px;
    background: var(--wb-dark-3);
    border: 1px solid rgba(255,255,255,0.08);
    color: #e5e7eb;
    line-height: 1.55;
    box-shadow: 0 10px 24px rgba(0,0,0,0.14);
}

.student-ticket-page .ticket-message.own .student-ticket-bubble {
    border-radius: 14px 14px 4px 14px;
    background: rgba(203,32,43,0.16);
    border-color: rgba(203,32,43,0.28);
}

.student-ticket-page .ticket-reply {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    padding: 0.6rem 0.75rem;
}

.student-ticket-create-intro {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(203,32,43,0.22);
    border-radius: 8px;
    background: rgba(203,32,43,0.08);
}

.student-ticket-create-intro i {
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: var(--wb-gold);
    background: rgba(0,0,0,0.18);
}

.student-ticket-create-intro strong,
.student-ticket-create-intro span {
    display: block;
}

.student-ticket-create-intro strong {
    color: #fff;
}

.student-ticket-create-intro span {
    color: #aeb4bd;
    font-size: 0.84rem;
}

.student-ticket-modal .modal-content {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(212,168,67,0.18);
    background:
        radial-gradient(circle at 100% 0%, rgba(212,168,67,0.13), transparent 30%),
        linear-gradient(180deg, var(--wb-dark-2), var(--wb-dark-3));
    box-shadow: 0 24px 60px rgba(0,0,0,0.42);
}

.student-ticket-modal .modal-dialog {
    max-width: 640px;
}

.student-ticket-modal .modal-header {
    padding: 1.2rem 1.25rem 0.9rem;
    border-bottom-color: rgba(255,255,255,0.08);
}

.student-ticket-modal .modal-title {
    font-weight: 900;
    color: #fff;
}

.student-ticket-modal .modal-body {
    padding: 1.15rem 1.25rem;
}

.student-ticket-modal .modal-footer {
    padding: 0.9rem 1.25rem 1.15rem;
    border-top-color: rgba(255,255,255,0.08);
}

.student-ticket-modal .modal-footer .btn {
    min-height: 2.8rem;
    padding-inline: 1.1rem;
    border-radius: 10px;
    font-weight: 900;
}

.student-ticket-modal .form-label {
    color: #fff;
    font-weight: 900;
}

.student-ticket-modal .form-control {
    min-height: 2.75rem;
    border-radius: 10px;
    background: rgba(0,0,0,0.18);
    border-color: rgba(255,255,255,0.1);
}

.student-ticket-modal textarea.form-control {
    min-height: 8.5rem;
}

.student-ticket-page .ticket-category-grid {
    gap: 0.75rem;
}

.student-ticket-page .ticket-category-option {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    min-height: 4.35rem;
    padding: 0.85rem 0.9rem;
    overflow: hidden;
    isolation: isolate;
    border-radius: 12px;
    transition: var(--wb-transition);
}

.student-ticket-page .ticket-category-option::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--ticket-category-accent, var(--wb-gold)) 18%, transparent), transparent 55%);
    opacity: 0.45;
    z-index: -1;
    transition: var(--wb-transition);
}

.student-ticket-page .ticket-category-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.student-ticket-page .ticket-category-option:hover,
.student-ticket-page .ticket-category-option.is-selected,
.student-ticket-page .ticket-category-option:has(input:checked) {
    border-color: color-mix(in srgb, var(--ticket-category-accent, var(--wb-gold)) 62%, transparent);
    background: rgba(255,255,255,0.05);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.18);
}

.student-ticket-page .ticket-category-option:hover::before,
.student-ticket-page .ticket-category-option.is-selected::before,
.student-ticket-page .ticket-category-option:has(input:checked)::before {
    opacity: 0.86;
}

.student-ticket-page .ticket-category-option::after {
    content: '\F26E';
    font-family: "bootstrap-icons";
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    color: transparent;
    background: rgba(0,0,0,0.18);
    font-size: 0.82rem;
    transition: var(--wb-transition);
}

.student-ticket-page .ticket-category-option.is-selected::after,
.student-ticket-page .ticket-category-option:has(input:checked)::after {
    color: #050505;
    background: var(--ticket-category-accent, var(--wb-gold));
    border-color: var(--ticket-category-accent, var(--wb-gold));
    transform: scale(1.05);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--ticket-category-accent, var(--wb-gold)) 18%, transparent);
}

.student-ticket-category-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: rgba(0,0,0,0.18);
    color: var(--ticket-category-accent, var(--wb-gold)) !important;
    border: 1px solid color-mix(in srgb, var(--ticket-category-accent, var(--wb-gold)) 36%, transparent);
    font-size: 1.05rem;
    transition: var(--wb-transition);
}

.student-ticket-page .ticket-category-option.is-selected .student-ticket-category-icon,
.student-ticket-page .ticket-category-option:has(input:checked) .student-ticket-category-icon {
    color: #050505 !important;
    background: var(--ticket-category-accent, var(--wb-gold));
    border-color: var(--ticket-category-accent, var(--wb-gold));
    transform: scale(1.04);
}

.student-ticket-category-copy {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
}

.student-ticket-category-copy strong {
    color: #fff;
    line-height: 1.15;
}

.student-ticket-category-copy small {
    color: #aeb4bd;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.student-ticket-page .ticket-category-option.is-selected .student-ticket-category-copy small,
.student-ticket-page .ticket-category-option:has(input:checked) .student-ticket-category-copy small {
    color: color-mix(in srgb, var(--ticket-category-accent, var(--wb-gold)) 88%, white);
}

.student-ticket-count {
    margin-top: 0.35rem;
    text-align: right;
    color: #aeb4bd;
    font-size: 0.78rem;
}

@keyframes ticketSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ticketBubbleIn {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes ticketPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(69, 212, 131, 0.25);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(69, 212, 131, 0);
    }
}

@media (max-width: 575.98px) {
    .student-ticket-modal .modal-dialog {
        margin: 0.75rem;
    }

    .student-ticket-modal .modal-body {
        padding: 1rem;
    }

    .student-ticket-create-intro {
        align-items: flex-start;
    }

    .student-ticket-page .ticket-category-grid {
        grid-template-columns: 1fr;
    }

    .student-ticket-page .ticket-message {
        max-width: 100%;
    }

    .student-ticket-page .ticket-reply {
        grid-template-columns: minmax(0, 1fr) 44px;
    }
}

/* ============================================
   COURSE DETAIL
   ============================================ */
.course-hero {
    background: linear-gradient(180deg, var(--wb-dark-2) 0%, var(--wb-dark) 100%);
    padding: 7rem 0 5rem;
}

.course-detail-content {
    width: 100%;
    max-width: none;
}

.course-detail-page-head {
    margin-bottom: 1rem;
}

.course-detail-hero {
    padding: clamp(1.1rem, 3vw, 2rem);
    margin-bottom: 1rem;
    border: 1px solid var(--wb-dark-4);
    border-radius: 8px;
    background:
        radial-gradient(circle at 80% 0%, rgba(203,32,43,0.11), transparent 32%),
        linear-gradient(180deg, var(--wb-dark-2) 0%, var(--wb-dark) 100%);
}

.course-detail-main {
    padding-top: 1.25rem !important;
}

.course-detail-cta-card,
.course-detail-info-card {
    background: var(--wb-dark-2);
    border: 1px solid var(--wb-dark-4);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--wb-shadow);
}

.course-detail-cta-card {
    background: var(--wb-dark-3);
}

.course-detail-cta-body {
    padding: clamp(1rem, 3vw, 2rem);
}

.course-detail-info-card {
    padding: 1.5rem;
    position: sticky;
    top: 1rem;
}

.course-detail-info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.curriculum-item {
    background: var(--wb-dark-3);
    border: 1px solid var(--wb-dark-4);
    border-radius: var(--wb-radius-sm);
    padding: 1rem 1.25rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--wb-transition);
}

.curriculum-item:hover {
    border-color: rgba(203,32,43,0.3);
    background: var(--wb-dark-4);
}

.curriculum-item.locked {
    opacity: 0.6;
}

.curriculum-item.is-complete {
    border-color: rgba(46,204,113,0.28);
}

.curriculum-item .lesson-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.curriculum-item .lesson-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--wb-dark-4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--wb-gray-light);
}

.badge-free {
    background: rgba(46,204,113,0.15);
    color: var(--wb-success);
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="light"] .course-detail-hero,
[data-theme="light"] .course-detail-cta-card,
[data-theme="light"] .course-detail-info-card {
    background: #FFFFFF;
    border-color: #E2E8F0;
}

.lesson-chapter-group {
    margin-bottom: 1rem;
}

.lesson-chapter-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0.35rem 0.65rem;
    color: var(--wb-white);
    font-weight: 800;
    letter-spacing: 0;
}

.lesson-chapter-heading span {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.lesson-chapter-heading span::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--wb-gold);
    box-shadow: 0 0 0 4px rgba(203,32,43,0.14);
}

.lesson-chapter-heading small {
    color: var(--wb-gray);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.lesson-chapter-heading.is-complete .lesson-chapter-label {
    color: var(--wb-success);
}

.lesson-chapter-heading.is-complete .lesson-chapter-label::before {
    background: var(--wb-success);
    box-shadow: 0 0 0 4px rgba(46,204,113,0.14);
}

.chapter-complete-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.45rem;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: rgba(46,204,113,0.14);
    color: var(--wb-success);
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.lesson-sidebar-item {
    text-decoration: none;
    min-height: 58px;
}

.lesson-sidebar-item.is-current {
    border-color: var(--wb-gold);
    background: rgba(203,32,43,0.12);
}

.lesson-sidebar-item.is-current .lesson-sidebar-title {
    color: var(--wb-gold);
    font-weight: 800;
}

.lesson-sidebar-title {
    color: var(--wb-gray-light);
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.35;
}

.curriculum-item .lesson-number.is-complete {
    background: var(--wb-success);
    color: #fff;
}

/* ============================================
   ADMIN PANEL
   ============================================ */
.admin-table {
    background: var(--wb-dark-2);
    border-radius: var(--wb-radius);
    overflow: hidden;
}

.admin-table .table {
    color: var(--wb-white);
    margin: 0;
}

.admin-table .table thead th {
    background: var(--wb-dark-3);
    border-bottom: 1px solid var(--wb-dark-4);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wb-gray-light);
    padding: 1rem;
}

.admin-table .table td {
    padding: 1rem;
    border-bottom: 1px solid var(--wb-dark-4);
    vertical-align: middle;
}

.admin-table .table tbody tr:hover {
    background: rgba(203,32,43,0.03);
}

/* ---- Admin Modal ---- */
.modal-content {
    background: var(--wb-dark-2);
    border: 1px solid var(--wb-dark-4);
    border-radius: var(--wb-radius);
}

.modal-header {
    border-bottom: 1px solid var(--wb-dark-4);
    padding: 1.25rem 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--wb-dark-4);
    padding: 1rem 1.5rem;
}

.modal-title { font-weight: 700; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--wb-dark-2);
    border-top: 1px solid var(--wb-dark-4);
    padding: 4rem 0 0;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: 2px;
}

.footer-desc {
    color: var(--wb-gray);
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer-heading {
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--wb-white);
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li { margin-bottom: 0.6rem; }

.footer-links a {
    color: var(--wb-gray);
    font-size: 0.9rem;
    transition: var(--wb-transition);
}

.footer-links a:hover {
    color: var(--wb-gold);
    padding-left: 4px;
}

.footer-contact li {
    color: var(--wb-gray);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--wb-dark-3);
    border: 1px solid var(--wb-dark-4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wb-gray-light);
    font-size: 1.1rem;
    transition: var(--wb-transition);
}

.social-link:hover {
    background: var(--wb-gold);
    border-color: var(--wb-gold);
    color: var(--wb-dark);
    transform: translateY(-3px);
}

.footer-divider {
    border-color: var(--wb-dark-4);
    margin: 2rem 0 0;
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.85rem;
    color: var(--wb-gray);
}

/* ============================================
   ALERTS (Bootstrap override)
   ============================================ */
.alert {
    border-radius: var(--wb-radius-sm);
    border: none;
    font-size: 0.9rem;
}

/* ============================================
   DROPDOWN (dark theme)
   ============================================ */
.dropdown-menu-dark {
    background: var(--wb-dark-3);
    border: 1px solid var(--wb-dark-4);
    border-radius: var(--wb-radius-sm);
}

.dropdown-menu-dark .dropdown-item:hover {
    background: rgba(203,32,43,0.1);
    color: var(--wb-gold);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991.98px) {
    .dashboard-sidebar {
        transform: translateX(-100%);
        z-index: 1300;
        box-shadow: 18px 0 42px rgba(0,0,0,0.32);
    }
    .dashboard-sidebar.show {
        transform: translateX(0);
    }
    .dashboard-content {
        margin-left: 0;
    }
    .hero-stats {
        gap: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .section-padding { padding: 4rem 0; }
    
    .hero-section {
        min-height: auto;
        padding: 2rem 0 3rem;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem !important;
        margin-bottom: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin: 0 auto 2.5rem;
    }

    .hero-stats {
        justify-content: center;
        gap: 2rem;
        margin-top: 2rem;
    }

    .hero-section .d-flex.gap-3 {
        justify-content: center;
    }

    .site-logo {
        height: 40px !important;
    }
    
    .hero-stat-number { font-size: 1.5rem; }
    


    .section-title {
        font-size: 1.8rem !important;
    }

    .navbar > .container {
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px;
    }

    .navbar-brand {
        margin-right: 0 !important;
    }

    .navbar-toggler {
        margin: 0 auto !important;
        padding: 5px;
    }

    .navbar-collapse {
        width: 100%;
        margin-top: 10px;
        padding: 1.2rem !important;
        text-align: center;
    }

    .navbar-nav {
        margin-bottom: 1rem;
    }

    .nav-link {
        font-size: 1rem;
        padding: 0.6rem !important;
    }

    .navbar-actions {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--wb-dark-4);
        flex-direction: column !important;
        display: flex !important;
        gap: 12px !important;
    }

    .mobile-utils {
        width: 100%;
        justify-content: center !important;
        margin-bottom: 5px;
    }

    .navbar-actions .btn {
        width: 100% !important;
        padding: 0.6rem !important;
        font-size: 0.9rem;
    }

    .dashboard-content-polished {
        padding: 1rem;
    }

    .dashboard-page-head {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
        gap: 0.8rem;
        padding: 0.85rem;
        margin-bottom: 1rem;
    }

    .dashboard-head-stats {
        grid-column: 1 / -1;
        justify-content: stretch;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.45rem;
    }

    .dashboard-head-stats span {
        min-height: 2.6rem;
        padding: 0.4rem;
        justify-content: center;
        flex-direction: column;
        gap: 0.1rem;
        text-align: center;
        font-size: 0.68rem;
    }

    .dashboard-head-stats strong {
        font-size: 0.92rem;
    }

    .dashboard-title-block p {
        display: none;
    }

    /* Footer mobile fixes */
    .site-footer {
        text-align: center;
        padding-top: 3rem;
    }

    .footer-brand {
        display: flex;
        justify-content: center;
    }

    .footer-brand, .social-links, .footer-contact li {
        justify-content: center;
    }

    .footer-links li {
        margin-bottom: 0.8rem;
    }

    .footer-desc {
        max-width: 350px;
        margin-left: auto;
        margin-right: auto;
    }

    .footer-heading {
        margin-top: 1rem;
    }

    /* Course detail mobile fixes */
    .course-hero:not(.course-detail-hero) {
        padding-top: 6rem;
        text-align: center;
    }

    .course-detail-content {
        padding: 1rem;
    }

    .course-detail-page-head {
        text-align: left;
    }

    .course-detail-hero {
        padding: 1rem;
        text-align: left;
    }

    .course-detail-hero .row {
        --bs-gutter-y: 1.25rem;
    }

    .course-detail-hero h1 {
        font-size: 1.85rem !important;
        line-height: 1.12;
        margin-bottom: 0.8rem !important;
    }

    .course-detail-hero p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1rem !important;
    }

    .breadcrumb {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.15rem;
    }

    .course-hero .d-flex.flex-wrap {
        justify-content: flex-start;
        gap: 0.65rem !important;
    }

    .course-detail-main {
        padding: 0 0 1.5rem !important;
    }

    .course-detail-main .row {
        --bs-gutter-y: 1.5rem;
    }

    .course-detail-cta-body,
    .course-detail-info-card {
        padding: 1rem;
    }

    .course-detail-info-card {
        position: static;
    }

    .curriculum-item {
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.85rem;
    }

    .curriculum-item .lesson-info {
        min-width: 0;
        align-items: flex-start;
    }

    .curriculum-item .lesson-info > div {
        min-width: 0;
    }

    .curriculum-item .lesson-info a,
    .curriculum-item .lesson-info div {
        overflow-wrap: anywhere;
    }

    .curriculum-item .lesson-number {
        flex: 0 0 32px;
    }

    .lesson-chapter-heading {
        align-items: flex-start;
        gap: 0.35rem;
        flex-direction: column;
    }

    .lesson-chapter-heading small {
        white-space: normal;
        line-height: 1.5;
    }

    .chapter-complete-badge {
        margin-left: 0;
        margin-top: 0.25rem;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 2rem !important;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .course-detail-content {
        padding: 0.65rem;
    }

    .course-detail-hero {
        margin-bottom: 0.75rem;
    }

    .course-detail-hero h1 {
        font-size: 1.55rem !important;
    }

    .course-detail-hero .badge {
        max-width: 100%;
        white-space: normal;
        text-align: left;
    }

    .course-detail-cta-card img {
        max-height: 13rem;
        object-fit: cover;
    }

    .course-detail-main h3 {
        font-size: 1.15rem !important;
    }

    .category-card {
        padding: 1.5rem 1rem;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 6px 15px;
        line-height: 1.4;
        text-wrap: balance;
    }

    .hero-section .d-flex.gap-3 {
        flex-direction: column;
        width: 100%;
        padding: 0 1rem;
    }

    .hero-section .btn {
        width: 100% !important;
    }
}

/* ============================================
   MISC UTILITIES
   ============================================ */
.text-gold { color: var(--wb-gold) !important; }
.bg-gold-subtle { background: rgba(203,32,43,0.1); }
.border-gold { border-color: var(--wb-gold) !important; }

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--wb-gray);
}

.empty-state i { font-size: 3rem; margin-bottom: 1rem; display: block; opacity: 0.5; }
.empty-state h5 { color: var(--wb-white); margin-bottom: 0.5rem; }

/* ---- Thumbnail placeholder ---- */
.thumb-placeholder {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--wb-dark-3), var(--wb-dark-4));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wb-gray);
    font-size: 2rem;
    border-radius: var(--wb-radius-sm);
}

/* ============================================
   LIGHT THEME 
   ============================================ */
[data-theme="light"] {
    --wb-dark: #FFFFFF;
    --wb-dark-2: #F8FAFC;
    --wb-dark-3: #F1F5F9;
    --wb-dark-4: #E2E8F0;
    --wb-white: #0F172A;
    --wb-gray: #64748B;
    --wb-gray-light: #475569;
    --wb-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .dashboard-sidebar {
    background: #FFFFFF !important;
    border-right: 1px solid #F1F5F9 !important;
}

[data-theme="light"] .sidebar-brand-block {
    border-bottom-color: #F1F5F9 !important;
}

[data-theme="light"] .sidebar-tool-btn {
    background: #F8FAFC;
    border-color: #E2E8F0;
    color: #475569;
}

[data-theme="light"] .dashboard-page-head {
    background: linear-gradient(135deg, #FFFFFF, #F8FAFC);
    border-color: #E2E8F0;
}

[data-theme="light"] .dashboard-menu-btn {
    background: #FFFFFF;
    border-color: #E2E8F0;
    color: #0F172A;
}

[data-theme="light"] .dashboard-head-stats span {
    background: #F8FAFC;
    border-color: #E2E8F0;
    color: #64748B;
}

[data-theme="light"] .dashboard-head-stats strong {
    color: #0F172A;
}

[data-theme="light"] .sidebar-nav .nav-link {
    color: #64748B !important;
}

[data-theme="light"] .sidebar-nav .nav-link:hover,
[data-theme="light"] .sidebar-nav .nav-link.active {
    color: var(--wb-gold) !important;
    background: rgba(203, 32, 43, 0.04) !important;
    border-left-color: var(--wb-gold) !important;
}

[data-theme="light"] .sidebar-section-title {
    color: #94A3B8 !important;
}

[data-theme="light"] .sidebar-admin-group {
    border-top-color: #F1F5F9;
}

[data-theme="light"] .sidebar-admin-group-title {
    color: #0F172A;
}

[data-theme="light"] .sidebar-admin-group-note {
    color: #94A3B8;
}

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

[data-theme="light"] #mainNavbar {
    background: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] #mainNavbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

[data-theme="light"] .brand-wolf {
    color: var(--wb-white);
}

[data-theme="light"] .navbar-toggler-icon {
    filter: invert(1);
}

[data-theme="light"] .text-white { color: #1A1A1A !important; }
[data-theme="light"] .text-white-50 { color: #495057 !important; }

/* Invert PDF/Embed background blocks on light mode if needed */
[data-theme="light"] .lesson-player-wrapper {
    background: #E9ECEF;
}

[data-theme="light"] .lesson-material-card,
[data-theme="light"] .lesson-list-panel {
    background: #FFFFFF;
    border-color: #E2E8F0;
    color: #475569;
}

[data-theme="light"] .admin-table .table {
    color: #1A1A1A;
}
[data-theme="light"] .btn-outline-light { color: #1A1A1A; border-color: #1A1A1A; } [data-theme="light"] .btn-outline-light:hover { background: #1A1A1A; color: #fff !important; }

/* Light mode dropdown override */
[data-theme="light"] .dropdown-menu-dark {
    background-color: var(--wb-dark) !important;
    border-color: var(--wb-dark-4) !important;
}

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

[data-theme="light"] .dropdown-menu-dark .dropdown-item:hover {
    background-color: var(--wb-dark-2) !important;
    color: var(--wb-gold) !important;
}

[data-theme="light"] .dropdown-menu-dark .dropdown-divider {
    border-top: 1px solid var(--wb-dark-4) !important;
}

/* ============================================
   RTL SUPPORT
   ============================================ */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .navbar-nav {
    padding-right: 0;
}

[dir="rtl"] .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

[dir="rtl"] .me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

[dir="rtl"] .me-1 {
    margin-left: 0.25rem !important;
    margin-right: 0 !important;
}

[dir="rtl"] .ms-2 {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

[dir="rtl"] .dropdown-menu {
    text-align: right;
}

[dir="rtl"] .sidebar-nav .nav-link i {
    margin-left: 10px;
    margin-right: 0;
}

[dir="rtl"] .sidebar-admin-group .sidebar-nav .nav-link {
    border-left: none;
    border-right: 2px solid transparent;
}

[dir="rtl"] .sidebar-admin-group .sidebar-nav .nav-link:hover,
[dir="rtl"] .sidebar-admin-group .sidebar-nav .nav-link.active {
    border-right-color: var(--wb-gold);
}

[dir="rtl"] .sidebar-admin-group .sidebar-nav .nav-link i {
    margin-left: 8px;
    margin-right: 0;
}

[dir="rtl"] .dashboard-sidebar {
    left: auto;
    right: 0;
    border-left: 1px solid var(--wb-dark-4);
    border-right: none;
}

[dir="rtl"] .dashboard-content {
    margin-left: 0;
    margin-right: 280px;
}

@media (max-width: 991.98px) {
    [dir="rtl"] .dashboard-sidebar {
        right: -280px;
        left: auto;
        transform: none;
    }
    [dir="rtl"] .dashboard-sidebar.show {
        right: 0;
    }
    [dir="rtl"] .dashboard-content {
        margin-right: 0;
    }
}

/* Logo Styling */
.site-logo {
    height: 55px !important;
    width: auto !important;
    display: block;
    max-width: 300px;
}

.footer-logo {
    height: 30px !important;
    width: auto !important;
    display: block;
    max-width: 180px;
}

/* ============================================
   PORTAL CAROUSEL
   ============================================ */
.portal-home {
    min-height: 100vh;
    background: #070707;
    overflow: hidden;
}

.portal-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    isolation: isolate;
}

.portal-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    overflow: hidden;
}

.portal-hero-bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    filter: saturate(1.08) contrast(1.08);
    animation: portalBgRotate 20s ease-in-out infinite, portalBgDrift 18s ease-in-out infinite alternate;
}

.portal-hero-bg img:nth-child(2) {
    animation-delay: 5s, 0s;
}

.portal-hero-bg img:nth-child(3) {
    animation-delay: 10s, 0s;
}

.portal-hero-bg img:nth-child(4) {
    animation-delay: 15s, 0s;
}

.portal-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(7, 7, 7, 0.58) 0%, rgba(7, 7, 7, 0.28) 48%, rgba(7, 7, 7, 0.04) 100%),
        linear-gradient(180deg, rgba(7, 7, 7, 0.04) 0%, rgba(7, 7, 7, 0.26) 100%);
}

.portal-language-switch {
    position: absolute;
    top: max(1.15rem, env(safe-area-inset-top));
    right: max(1.15rem, env(safe-area-inset-right));
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(8, 8, 8, 0.58);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(16px);
}

.portal-language-switch a {
    min-width: 2.9rem;
    min-height: 2.35rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 900;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.portal-language-switch a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.portal-language-switch a.active {
    color: #070707;
    background: var(--wb-primary);
}

.portal-language-switch span {
    width: 1px;
    height: 1.4rem;
    background: rgba(255, 255, 255, 0.14);
}

.portal-hero-inner {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 0.66fr) minmax(560px, 1.34fr);
    gap: clamp(1.4rem, 3.2vw, 3rem);
    align-items: center;
    padding-top: 2.6rem;
    padding-bottom: 1.3rem;
}

.portal-hero-copy {
    max-width: 680px;
    animation: portalFadeUp 0.85s ease both;
}

.portal-hero-logo {
    width: min(70vw, 300px);
    height: auto;
    display: block;
    margin-bottom: 1.35rem;
    filter: drop-shadow(0 16px 38px rgba(0, 0, 0, 0.44));
}

.portal-hero-logo-after-title {
    margin-top: 0.85rem;
    margin-bottom: 0;
}

.portal-hero-wordmark {
    display: inline-flex;
    margin-bottom: 1.35rem;
    color: #fff;
    font-size: clamp(2.1rem, 4.4vw, 4rem);
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 16px 38px rgba(0, 0, 0, 0.44);
}

.portal-eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--wb-primary-light);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.85rem;
}

.portal-hero h1 {
    margin: 0;
    max-width: 12ch;
    color: #fff;
    font-size: clamp(2.75rem, 5.25vw, 4.85rem);
    line-height: 0.96;
    font-weight: 900;
}

.portal-hero-title-with-logo {
    max-width: 11ch;
}

.portal-hero-title-with-logo span {
    display: block;
}

.portal-title-brand-logo {
    display: block;
    width: clamp(13.5rem, 31vw, 23rem);
    max-width: 100%;
    height: auto;
    margin: 0.14em 0 0.06em;
    filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.42));
}

.portal-hero-copy p {
    max-width: 590px;
    margin: 1rem 0 0;
    color: rgba(245, 245, 245, 0.78);
    font-size: clamp(1rem, 2vw, 1.22rem);
    line-height: 1.7;
}

.portal-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.5rem;
}

.portal-primary-action,
.portal-secondary-action {
    min-height: 3.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.8rem 1.25rem;
    border-radius: 10px;
}

.portal-secondary-action {
    border-color: rgba(255, 255, 255, 0.34);
    color: #fff !important;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
}

.portal-mobile-showcase {
    display: none;
}

.portal-mobile-dashboard-card {
    display: none;
}

.portal-proof-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    max-width: 620px;
    margin-top: 1.25rem;
}

.portal-proof-grid span {
    min-height: 4.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.85rem 0.9rem 0.85rem 1rem;
    border-left: 3px solid var(--wb-primary);
    background:
        linear-gradient(rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.025)),
        rgba(16, 16, 16, 0.72);
    color: rgba(245, 245, 245, 0.74);
    font-size: 0.84rem;
    line-height: 1.25;
    animation: portalSoftPulse 3.8s ease-in-out infinite;
}

.portal-proof-grid strong {
    display: block;
    color: #fff;
    font-size: clamp(1.45rem, 2.3vw, 1.9rem);
    line-height: 0.95;
    margin-bottom: 0.25rem;
}

[dir="rtl"] .portal-hero-copy {
    text-align: right;
}

[dir="rtl"] .portal-hero h1 {
    max-width: 12ch;
}

[dir="rtl"] .portal-hero-actions {
    justify-content: flex-start;
}

[dir="rtl"] .portal-proof-grid span {
    border-left: 0;
    border-right: 3px solid var(--wb-primary);
    padding: 0.85rem 1rem 0.85rem 0.9rem;
}

.portal-showcase {
    align-self: center;
    display: grid;
    gap: 1rem;
    transform: translateY(-1.2rem);
    --portal-final-y: -1.2rem;
    animation: portalFadeUp 0.95s ease 0.12s both;
}

.portal-showcase-main {
    width: min(108%, 940px);
    justify-self: center;
    border-radius: 14px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
    animation: portalFloat 5.5s ease-in-out infinite;
}

.portal-mini-courses {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    width: min(100%, 820px);
    justify-self: center;
}

.portal-mini-courses img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    animation: portalFadeUp 0.75s ease both;
}

.portal-mini-courses a {
    display: block;
    border-radius: 10px;
    transition: transform 0.18s ease, filter 0.18s ease;
}

.portal-mini-courses a:hover {
    transform: translateY(-3px);
    filter: brightness(1.08);
}

.portal-mini-courses a:nth-child(2) img {
    animation-delay: 0.1s;
}

.portal-mini-courses a:nth-child(3) img {
    animation-delay: 0.2s;
}

.portal-showcase-arabic {
    width: min(100%, 620px);
    justify-self: center;
    padding: clamp(1.4rem, 3vw, 2.25rem);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background:
        linear-gradient(135deg, rgba(209, 161, 79, 0.22), rgba(255, 255, 255, 0.05)),
        rgba(10, 10, 10, 0.76);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
    animation: portalFloat 5.5s ease-in-out infinite;
}

.portal-showcase-arabic h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(2.1rem, 4vw, 4rem);
    font-weight: 900;
    line-height: 1.05;
}

.portal-showcase-arabic p {
    margin: 1rem 0 0;
    color: rgba(245, 245, 245, 0.78);
    font-size: 1.05rem;
    line-height: 1.8;
}

.portal-arabic-programs {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.portal-arabic-programs span {
    display: flex;
    align-items: center;
    min-height: 4.25rem;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.065);
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
}

@keyframes portalFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(var(--portal-final-y, 0));
    }
}

@keyframes portalFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

@keyframes portalBgDrift {
    from {
        transform: scale(1.03) translate3d(0, 0, 0);
    }
    to {
        transform: scale(1.09) translate3d(-1.2%, -1%, 0);
    }
}

@keyframes portalBgRotate {
    0%, 22% {
        opacity: 0.92;
    }
    28%, 94% {
        opacity: 0;
    }
    100% {
        opacity: 0.92;
    }
}

@keyframes portalSoftPulse {
    0%, 100% {
        border-color: rgba(255, 255, 255, 0.11);
    }
    50% {
        border-color: rgba(203, 32, 43, 0.34);
    }
}

@media (prefers-reduced-motion: reduce) {
    .portal-hero-bg img,
    .portal-hero-copy,
    .portal-showcase,
    .portal-showcase-main,
    .portal-mini-courses img,
    .portal-proof-grid span {
        animation: none !important;
    }

    .portal-hero-bg img:first-child {
        opacity: 0.92;
    }
}

.portal-carousel .carousel-indicators {
    margin-bottom: 1rem;
}
.portal-carousel .carousel-indicators [data-bs-target] {
    width: 30px;
    height: 4px;
    border-radius: 2px;
    background-color: var(--wb-white);
    opacity: 0.5;
    border: none;
    transition: var(--wb-transition);
}
.portal-carousel .carousel-indicators .active {
    width: 60px;
    opacity: 1;
    background-color: var(--wb-gold);
}
.portal-carousel .carousel-item {
    transition: transform 0.8s ease-in-out;
}

@media (max-width: 991.98px) {
    .portal-hero {
        min-height: 100vh;
    }

    .portal-hero-inner {
        min-height: 100vh;
        grid-template-columns: 1fr;
        padding-top: 2.2rem;
        padding-bottom: 1.5rem;
        gap: 1.1rem;
    }

    .portal-hero h1 {
        max-width: 12ch;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .portal-hero-copy {
        max-width: 40rem;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    [dir="rtl"] .portal-hero-copy {
        text-align: center;
    }

    .portal-hero-copy p {
        margin-left: auto;
        margin-right: auto;
    }

    .portal-hero-logo,
    .portal-title-brand-logo {
        margin-left: auto;
        margin-right: auto;
    }

    .portal-hero-actions {
        justify-content: center;
    }

    [dir="rtl"] .portal-hero-actions {
        justify-content: center;
    }

    .portal-proof-grid {
        margin-left: auto;
        margin-right: auto;
    }

    .portal-showcase {
        align-self: auto;
        transform: none;
        --portal-final-y: 0;
        justify-items: center;
    }

    .portal-showcase-main {
        justify-self: center;
        width: min(100%, 420px);
    }
}

@media (max-width: 575.98px) {
    .portal-home,
    .portal-hero {
        min-height: 100svh;
    }

    .portal-hero::before {
        background:
            linear-gradient(180deg, rgba(7, 7, 7, 0.38) 0%, rgba(7, 7, 7, 0.64) 52%, rgba(7, 7, 7, 0.78) 100%),
            linear-gradient(90deg, rgba(7, 7, 7, 0.36), rgba(7, 7, 7, 0.18));
    }

    .portal-hero-inner {
        min-height: 100svh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding-top: calc(max(1rem, env(safe-area-inset-top)) + 3rem);
        padding-bottom: max(0.9rem, env(safe-area-inset-bottom));
        gap: 0.75rem;
    }

    .portal-language-switch {
        top: max(0.75rem, env(safe-area-inset-top));
        right: max(0.75rem, env(safe-area-inset-right));
    }

    .portal-language-switch a {
        min-width: 2.55rem;
        min-height: 2.15rem;
    }

    .portal-hero-copy {
        width: 100%;
        text-align: center;
    }

    .portal-hero h1 {
        max-width: min(92vw, 21rem);
        font-size: clamp(2.82rem, 14.4vw, 3.82rem);
        line-height: 0.94;
        text-align: center;
    }

    .portal-hero-title-with-logo span {
        font-size: clamp(2.82rem, 14.4vw, 3.82rem);
        line-height: 0.94;
    }

    .portal-title-brand-logo {
        width: min(82vw, 19rem);
        margin: 0.14em auto 0.08em;
    }

    .portal-hero-copy p {
        max-width: 24rem;
        margin: 0.65rem auto 0;
        font-size: 0.86rem;
        line-height: 1.48;
        text-align: center;
    }

    .portal-mobile-dashboard-card {
        display: grid;
        grid-template-columns: 1fr;
        align-items: center;
        width: min(100%, 22rem);
        margin: 0.95rem auto 0;
        padding: 0.8rem 0.9rem;
        border: 1px solid rgba(255, 255, 255, 0.13);
        border-radius: 10px;
        background:
            linear-gradient(135deg, rgba(203, 32, 43, 0.16), rgba(255, 255, 255, 0.045)),
            rgba(10, 10, 10, 0.66);
        box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
        backdrop-filter: blur(14px);
    }

    .portal-mobile-dashboard-copy {
        min-width: 0;
        text-align: center;
    }

    .portal-mobile-dashboard-copy strong {
        display: block;
        color: #fff;
        font-size: 0.94rem;
        font-weight: 900;
        line-height: 1.2;
        margin-bottom: 0.45rem;
    }

    .portal-mobile-dashboard-copy div {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.35rem;
    }

    .portal-mobile-dashboard-copy span {
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        min-height: 1.55rem;
        padding: 0.24rem 0.42rem;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.07);
        color: rgba(255, 255, 255, 0.76);
        font-size: 0.64rem;
        font-weight: 850;
        white-space: nowrap;
    }

    .portal-mobile-dashboard-copy i {
        color: var(--wb-primary-light);
        font-size: 0.72rem;
    }

    .portal-hero-logo {
        width: min(68vw, 220px);
        margin: 0.65rem auto 0;
    }

    .portal-eyebrow {
        margin-bottom: 0.45rem;
        font-size: 0.64rem;
    }

    .portal-hero-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.55rem;
        margin-top: 1.85rem;
        width: min(100%, 22rem);
        margin-left: auto;
        margin-right: auto;
    }

    .portal-primary-action,
    .portal-secondary-action {
        width: 100%;
        min-height: 3rem;
        padding: 0.7rem 1rem;
    }

    .portal-proof-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.4rem;
        width: min(100%, 23rem);
        margin: 1.55rem auto 0;
    }

    .portal-proof-grid span {
        min-height: 3.3rem;
        align-items: center;
        text-align: center;
        padding: 0.48rem 0.55rem;
        font-size: 0.66rem;
        line-height: 1.18;
        border-left-width: 2px;
    }

    .portal-proof-grid strong {
        font-size: 1rem;
        margin-bottom: 0.12rem;
    }

    .portal-mini-courses {
        display: none;
    }

    .portal-mobile-showcase {
        display: flex;
        justify-content: center;
        width: min(100%, 24rem);
        margin: 0.45rem auto 0.15rem;
        animation: portalFadeUp 0.75s ease 0.08s both;
        --portal-final-y: 0;
    }

    .portal-mobile-showcase img {
        width: min(102vw, 390px);
        max-height: 31svh;
        object-fit: contain;
        opacity: 0.96;
        filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.42));
    }

    .portal-showcase {
        display: none;
    }
}

@media (max-width: 380px) {
    .portal-hero h1 {
        font-size: 2.58rem;
    }

    .portal-hero-title-with-logo span {
        font-size: 2.58rem;
    }

    .portal-hero-copy p {
        display: none;
    }

    .portal-proof-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .portal-proof-grid span {
        min-height: 3rem;
        font-size: 0.58rem;
        padding: 0.38rem 0.42rem;
    }

    .portal-proof-grid strong {
        font-size: 0.86rem;
    }

    .portal-mobile-showcase img {
        width: min(100vw, 355px);
        max-height: 29svh;
    }
}

/* ============================================
   SAFETY NET: prevent stuck Bootstrap backdrops
   from ever greying out / blocking the page
   ============================================ */
.modal-backdrop {
    display: none !important;
}

/* Re-enable ONLY when a modal is genuinely open */
.modal.show ~ .modal-backdrop,
body.modal-open .modal-backdrop {
    display: block !important;
}
