@import url('./tokens.css');
.ui-icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ui-icon { display: inline-block; width: 1em; height: 1em; flex: 0 0 auto; vertical-align: -0.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-main);
    background-color: var(--light-bg);
    line-height: 1.5;
    overflow-x: hidden;
    max-width: 100%;
    padding-top: 80px;
}

.wrap {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ── NAVBAR ── */
.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4);
    z-index: 10;
}

/*  Notif Dropdown  */
.notif-dropdown {
    display: none; position: absolute; top: calc(100% + 12px); right: -10px;
    width: 340px; background: white; border-radius: 16px;
    box-shadow: 0 12px 40px rgba(15,23,42,0.18); border: 1px solid #e2e8f0;
    z-index: 100; overflow: hidden; animation: dropIn 0.25s ease; cursor: default;
}
@media (max-width: 768px) {
    .notif-dropdown {
        position: fixed !important;
        top: 80px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 92% !important;
        max-width: 400px !important;
        right: auto !important;
    }
}
.notif-dropdown.open { display: block; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.notif-header { padding: 1rem 1.25rem; border-bottom: 1px solid #f1f5f9; display: flex; justify-content: space-between; align-items: center; }
.notif-body { max-height: 360px; overflow-y: auto; }
.notif-item { display: flex; gap: 12px; padding: 1rem 1.25rem; border-bottom: 1px solid #f1f5f9; position: relative; transition: background 0.2s; text-decoration: none; }
.notif-item:hover { background: #f8fafc; }
.notif-icon { width: 36px; height: 36px; border-radius: 10px; background: white; border: 1px solid #e2e8f0; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-content { flex: 1; }
.notif-title { display: block; font-size: 0.85rem; font-weight: 700; color: #1e293b; margin-bottom: 2px; }
.notif-time { display: block; font-size: 0.72rem; color: #94a3b8; }

.navbar {
    height: 80px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10001;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    height: 70px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-navy);
    letter-spacing: -0.8px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.75rem;
    background: rgba(15, 23, 42, 0.03);
    padding: 6px;
    border-radius: 100px;
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px 18px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.nav-links li a:hover {
    color: var(--primary-navy);
    background: rgba(15, 23, 42, 0.05);
}

.nav-links li a.active {
    background: var(--primary-navy);
    color: white !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.nav-ctas {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* ── MOBILE BOTTOM NAVIGATION ── */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    z-index: 2000;
    padding: 0 1rem;
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }
    
    /* Push content up to avoid being hidden by the bar */
    body {
        padding-top: 70px !important;
        padding-bottom: 75px !important;
    }
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: #94a3b8;
    transition: all 0.3s ease;
    flex: 1;
    position: relative;
}

.bottom-nav-link svg {
    width: 22px;
    height: 22px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottom-nav-link span {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bottom-nav-link.active {
    color: var(--primary-teal);
}

.bottom-nav-link.active svg {
    transform: translateY(-4px) scale(1.1);
}

.bottom-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    width: 4px;
    height: 4px;
    background: var(--primary-teal);
    border-radius: 50%;
}

.bottom-nav-link:active svg {
    transform: scale(0.9);
}

/* ── SKELETON LOADING ── */
.skeleton {
    background: #f1f5f9;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 8px;
    display: inline-block;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text { height: 12px; margin-bottom: 8px; width: 100%; }
.skeleton-title { height: 24px; margin-bottom: 12px; width: 60%; }
.skeleton-card { height: 280px; border-radius: 20px; width: 100%; }

/* ── BUTTON SYSTEM ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.8rem 1.6rem;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-teal);
    color: white;
    box-shadow: 0 8px 20px var(--shadow-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px var(--shadow-color);
    filter: brightness(1.05);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-premium);
}

/* Navbar specific aliases */
.btn-signin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    background: var(--primary-navy);
    color: white;
}

.btn-signin:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-premium);
}

.btn-getstarted {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    background: var(--primary-teal);
    color: white;
    box-shadow: 0 8px 20px var(--shadow-color);
}

.btn-getstarted:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px var(--shadow-color);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-navy);
    color: var(--primary-navy);
}

.btn-outline:hover {
    background: var(--primary-navy);
    color: white;
}

/* ── DASHBOARD SHARED ── */
.dashboard-container {
    /* top/bottom only: the shorthand wiped .wrap's side padding */
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
    min-height: calc(100vh - 70px);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.dashboard-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-navy);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h4 {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-navy);
}

/* ── TABLE AESTHETIC ── */
.premium-table-wrap {
    background: white;
    border-radius: 24px;
    border: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f8fafc;
    padding: 1.25rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #e2e8f0;
}

td {
    padding: 1.25rem 1.5rem;
    font-size: 0.95rem;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
}

tr:last-child td {
    border-bottom: none;
}

.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: capitalize;
}

.status-approved { background: #ecfdf5; color: #059669; }
.status-pending { background: #fffbeb; color: #e6a600; }
.status-rejected { background: #fef2f2; color: #dc2626; }

/* ── MODAL SYSTEM ── */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 2rem;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.modal-card {
    background: white;
    width: 100%;
    max-width: 480px;
    border-radius: 32px;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.modal-overlay.active .modal-card {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: #f1f5f9;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--primary-navy);
}

.modal-close:hover {
    background: #e2e8f0;
    transform: rotate(90deg);
}

.auth-toggle {
    display: flex;
    background: #f8fafc;
    padding: 6px;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.auth-toggle-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-toggle-btn.active {
    background: white;
    color: var(--primary-navy);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* ── AUTHENTICATION & FORMS ── */
.auth-page-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px - 250px);
    padding: 4rem 1.5rem;
    background: url('../images/hero.png') center/cover no-repeat fixed;
    position: relative;
    z-index: 1;
}

.auth-page-wrap::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(240, 249, 255, 0.85);
    z-index: -1;
}

.auth-card-premium {
    background: white;
    width: 100%;
    max-width: 480px;
    border-radius: 28px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.auth-card-premium:hover {
    box-shadow: 0 25px 50px rgba(15, 23, 42, 0.08);
}

.auth-card-premium-header {
    background: #f0f5ff;
    padding: 2.25rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-card-premium-title-group h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-navy);
    margin-bottom: 0.35rem;
}

.auth-card-premium-title-group p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.auth-card-premium-body {
    padding: 2.25rem 2rem;
}

.auth-card-premium-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.5;
}

.auth-card-premium-footer a {
    color: #014ccc;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.auth-card-premium-footer a:hover {
    color: #0036a1;
}

@media (max-width: 768px) {
    .auth-page-wrap {
        align-items: flex-start;
        padding: 2rem 1rem;
    }
    .auth-card-premium {
        margin: auto 0;
        border-radius: 20px;
    }
    .auth-card-premium-header,
    .auth-card-premium-body {
        padding: 1.5rem;
    }
    .auth-card-premium-title-group h1 {
        font-size: 1.4rem;
    }
}

.auth-page {
    background: url('../images/hero.png') center/cover no-repeat fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(240, 249, 255, 0.8); /* lighter overlay */
    z-index: -1;
}

.form-container {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
    position: relative;
    padding: 0;
}

.form-header-bg {
    background-color: #f0f5ff;
    padding: 1.25rem 1.25rem 1.5rem 1.25rem;
    position: relative;
}

.form-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.form-header-text h1 {
    font-size: 1.2rem;
    color: #014ccc;
    font-weight: 700;
    margin-bottom: 0px;
}

.form-header-text p {
    font-size: 0.75rem;
    color: #001856;
    max-width: 250px;
    line-height: 1.2;
    margin-top: 2px;
}

.form-header-logo {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.form-header-logo svg {
    width: 28px;
    height: 28px;
    color: #014ccc;
}

.form-header-logo-brand {
    font-size: 0.55rem;
    color: #014ccc;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0px;
}

.form-header-logo-slogan {
    font-size: 0.5rem;
    color: #60a5fa;
    font-style: italic;
    white-space: nowrap;
}

.form-home-btn {
    position: absolute;
    bottom: -14px;
    left: 1.5rem;
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    color: #374151;
    z-index: 2;
    text-decoration: none;
}
.form-home-btn svg { width: 14px; height: 14px; }

.form-close-btn {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    line-height: 1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.form-body {
    padding: 1.5rem 1.25rem 1.25rem 1.25rem;
    background: white;
}

.form-group {
    margin-bottom: 0.75rem;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.2rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    font-size: 0.85rem;
    color: #1f2937;
    background: white;
}
.form-group input::placeholder {
    color: #9ca3af;
}

.form-group input:focus {
    border-color: #014ccc;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-icon-right {
    position: absolute;
    right: 10px;
    top: 18px;
    color: #6b7280;
    cursor: pointer;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}
.input-icon-right svg { width: 14px; height: 14px; }

.auth-btn {
    width: 100%;
    background: #014ccc; 
    color: white;
    padding: 0.6rem;
    border-radius: 50px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 0.25rem;
    transition: background 0.2s;
}

.auth-btn:hover {
    background: #001856;
}

.auth-forgot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
    color: #6b7280;
    font-size: 0.75rem;
}

.auth-forgot a {
    color: #6b7280;
    text-decoration: none;
}
.auth-forgot a:hover {
    color: #374151;
}

.auth-footer-line {
    border-top: 1px solid #e5e7eb;
    margin: 0.75rem 0;
}

.auth-signup {
    text-align: center;
    color: #6b7280;
    font-size: 0.8rem;
}

.auth-signup a {
    color: #014ccc;
    font-weight: 600;
    text-decoration: none;
}

.auth-signup a:hover {
    text-decoration: underline;
}

/* ── PASSWORD STRENGTH ── */
.password-requirements {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.requirement-item {
    font-size: 0.7rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 2px;
}

.requirement-item.valid {
    color: #059669;
}

.requirement-item.invalid {
    color: #dc2626;
}

.requirement-item svg {
    width: 10px;
    height: 10px;
}

/* ── PROGRESS STEPS ── */
.steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}
.step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}
.step.active {
    background: var(--primary-teal);
    color: white;
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1);
}
.step-line {
    height: 2px;
    background: #e2e8f0;
    width: 40px;
}

/* ── DASHBOARD LOCK OVERLAY ── */
.dashboard-lock-overlay {
    position: fixed;
    top: 70px; left: 0; width: 100%; height: calc(100% - 70px);
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
}

.lock-card {
    background: white;
    padding: 3rem 2.5rem;
    border-radius: 28px;
    max-width: 440px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
}

.lock-icon-wrap {
    width: 64px;
    height: 64px;
    background: #f0fdf4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: #059669;
}

.alert {
    display: none !important;
}

.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fee2e2; }
.alert-success { background: #ecfdf5; color: #059669; border: 1px solid #d1fae5; }
.alert-warning { background: #fffbeb; color: #e6a600; border: 1px solid #fef3c7; }

/* ── TOAST NOTIFICATION SYSTEM ── */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 1rem 1.25rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 320px;
    max-width: 400px;
    transform: translateX(120%);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
}

.toast.active {
    transform: translateX(0);
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary-navy);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
}

.toast-close:hover {
    background: rgba(15, 23, 42, 0.05);
    color: #1e293b;
}

/* ── AI CHAT VARIATION ── */
.toast-ai {
    background: #001856;
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 40px rgba(0,24,86,0.3);
    border-bottom-right-radius: 4px; /* chat bubble look */
}

.toast-ai .toast-content {
    color: white;
}

.toast-ai .toast-icon {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    box-shadow: 0 0 15px rgba(99,102,241,0.5);
}

.toast-ai .toast-close {
    color: rgba(255,255,255,0.5);
}

.toast-ai .toast-close:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0,0,0,0.05);
}

.toast-progress-bar {
    height: 100%;
    background: var(--primary-teal);
    width: 100%;
    transition: width linear;
}

/* ── KNOWLEDGE CIRCLE ── */
.circular-chart {
  display: block;
  margin: 10px auto;
  max-width: 80%;
  max-height: 250px;
}

.circle-bg {
  fill: none;
  stroke: #eee;
  stroke-width: 3.8;
}

.circle {
  fill: none;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke: var(--primary-teal);
  animation: progress 1s ease-out forwards;
}

@keyframes progress {
  0% { stroke-dasharray: 0 100; }
}

.knowledge-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    position: relative;
    padding: 2rem !important;
}

.knowledge-circle {
    position: relative;
    width: 120px;
    height: 120px;
}

.knowledge-circle .percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-navy);
}

.knowledge-info h4 {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary-navy);
    margin-bottom: 0.25rem;
}

.knowledge-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}
.toast-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    display: flex;
    transition: color 0.2s;
}

.toast-close:hover { color: var(--primary-navy); }

/* Toast Variants */
.toast-success .toast-icon { background: #ecfdf5; color: #059669; }
.toast-error .toast-icon { background: #fef2f2; color: #dc2626; }
.toast-info .toast-icon { background: #eff6ff; color: #014ccc; }

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(15, 23, 42, 0.1);
    width: 100%;
    border-radius: 0 0 16px 16px;
}

.toast.active .toast-progress-bar {
    height: 100%;
    background: currentColor;
    opacity: 0.3;
    animation: toastProgress 30s linear forwards;
}

/* ── HERO SECTION ── */
.hero {
    position: relative;
    height: 700px;
    width: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('../images/hero.png');
    background-size: cover;
    background-position: center center;
    z-index: -3;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #f8fafc;
    z-index: -4;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Lighter gradient — fades from semi-white on far left to fully transparent by 45% */
    background: linear-gradient(90deg,
        rgba(248, 250, 252, 0.97) 0%,
        rgba(248, 250, 252, 0.85) 15%,
        rgba(248, 250, 252, 0.3)  35%,
        rgba(248, 250, 252, 0)    50%,
        transparent 100%);
    z-index: -2;
}

.hero-blur {
    position: absolute;
    top: 0; left: 0; width: 40%; height: 100%;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    /* Feather the blur so it doesn't create a hard line */
    mask-image: linear-gradient(to right, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 40%, transparent 100%);
    z-index: -1;
}

.hero-body {
    width: 100%;
    z-index: 1;
}

.hero-content {
    max-width: 600px;
    margin-left: max(2rem, (100% - 1200px) / 2 + 2rem);
    padding: 4rem 0;
}

.hero-badge {
    display: inline-block;
    background: rgba(8, 145, 178, 0.1);
    color: var(--primary-teal);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2rem;
}

.hero-headline {
    font-size: 56px; /* 48px-56px requirement */
    line-height: 1;
    font-weight: 800;
    color: var(--primary-navy);
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

.hero-accent {
    color: var(--primary-teal);
}

.hero-sub {
    font-size: 18px; /* Strict requirement */
    color: var(--text-muted);
    margin-bottom: 3rem;
    line-height: 1.7;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.btn-primary {
    background: var(--primary-teal);
    color: white;
    padding: 1.1rem 2.22rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(8, 145, 178, 0.2);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(8, 145, 178, 0.3);
}

.btn-ghost {
    padding: 1.1rem 2.2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    color: var(--primary-navy);
    border: 2px solid rgba(15, 23, 42, 0.1);
    transition: all 0.3s ease;
}

.btn-ghost:hover {
    background: rgba(15, 23, 42, 0.05);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item strong {
    font-size: 1.5rem;
    color: var(--primary-navy);
}

.stat-item span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stat-sep {
    width: 1px;
    height: 30px;
    background: rgba(0,0,0,0.1);
}

/* ── TRUSTED SECTION ── */
.trusted {
    padding: 2rem 0;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.trusted-label {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.trusted-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0.6;
    filter: grayscale(1);
    flex-wrap: wrap;
    gap: 2rem;
}

.trusted-row span {
    font-weight: 800;
    font-size: 1rem;
}

/* ── FEATURES ── */
.features {
    padding: 5rem 0;
}

.eyebrow {
    color: var(--primary-teal);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.sec-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--primary-navy);
    margin-bottom: 1.5rem;
}

.sec-sub {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 4rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feat-card {
    padding: 2.5rem;
    border-radius: 24px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.feat-blue { background: #eff6ff; }
.feat-teal { background: #f0fdfa; }
.feat-purple { background: #faf5ff; }
.feat-green { background: #f0fdf4; }

.feat-icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.feat-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-navy);
}

.feat-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ── MATERIALS SECTION (Home) ── */
.materials-sec {
    padding: 6rem 0;
    background: #f8fafc;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.res-card {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s ease, 
                border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    min-height: 240px;
}

.res-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.08);
    border-color: rgba(1, 76, 204, 0.3);
}

.res-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.res-card:hover .res-card-img {
    transform: scale(1.06);
}

/* Custom Gradients for different subject categories */
.res-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--primary-teal);
    font-weight: 800;
    position: relative;
    padding: 1rem;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    gap: 0.5rem;
}

.res-card-placeholder.subject-mathematics,
.res-card-placeholder.subject-physics,
.res-card-placeholder.subject-chemistry,
.res-card-placeholder.subject-biology,
.res-card-placeholder.subject-computer-science,
.res-card-placeholder.subject-agriculture,
.res-card-placeholder[class*="math"],
.res-card-placeholder[class*="phys"],
.res-card-placeholder[class*="chem"],
.res-card-placeholder[class*="bio"],
.res-card-placeholder[class*="comp"] {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0369a1;
}

.res-card-placeholder.subject-history,
.res-card-placeholder.subject-geography,
.res-card-placeholder.subject-business-studies,
.res-card-placeholder.subject-religious-education,
.res-card-placeholder[class*="hist"],
.res-card-placeholder[class*="geog"],
.res-card-placeholder[class*="bus"],
.res-card-placeholder[class*="rel"] {
    background: linear-gradient(135deg, #f5f3ff 0%, #ddd6fe 100%);
    color: #6d28d9;
}

.res-card-placeholder.subject-english,
.res-card-placeholder.subject-kiswahili,
.res-card-placeholder.subject-foreign-languages,
.res-card-placeholder[class*="eng"],
.res-card-placeholder[class*="kisw"],
.res-card-placeholder[class*="lang"] {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #b45309;
}

.res-card-placeholder.subject-performing-arts,
.res-card-placeholder.subject-visual-arts,
.res-card-placeholder.subject-physical-education,
.res-card-placeholder.subject-home-science,
.res-card-placeholder[class*="art"],
.res-card-placeholder[class*="music"],
.res-card-placeholder[class*="phys-ed"],
.res-card-placeholder[class*="science"] {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #15803d;
}

.placeholder-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.placeholder-subject-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* Image Badge Overlays */
.media-badge {
    position: absolute;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2;
    letter-spacing: 0.5px;
}

.badge-price {
    top: 12px;
    right: 12px;
}

.badge-price.free {
    background: #059669;
    color: white;
}

.badge-price.paid {
    background: var(--primary-navy);
    color: white;
}

.badge-owned {
    top: 12px;
    left: 12px;
    background: #10b981;
    color: white;
}

/* Card Body Content */
.res-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.res-card-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    width: 100%;
}

.res-meta-subject, .res-meta-level {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.res-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #001856;
    text-transform: uppercase;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3rem; /* Fixed height for clean alignment */
}

.res-creator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
    min-width: 0;
}

.res-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #014ccc;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    flex-shrink: 0;
}

.res-teacher-link {
    font-size: 0.8rem;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.res-teacher-link:hover {
    color: var(--primary-teal);
}

.res-topic {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.res-stars {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 1rem;
}

.stars {
    display: flex;
    gap: 1px;
}

.star {
    font-size: 10px;
}

.star.filled {
    color: #ffb800;
}

.star.empty {
    color: #e2e8f0;
}

.res-rating-num {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffb800;
    margin-left: 4px;
}

/* Card Footer & Actions */
.res-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    border-top: 1px solid #f1f5f9;
    padding-top: 0.85rem;
}

.res-downloads {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 600;
}

.res-footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.res-price {
    font-size: 0.9rem;
    font-weight: 800;
    color: #001856;
}

.res-btn {
    background: #001856;
    color: white;
    text-decoration: none;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.res-btn:hover {
    background: #014ccc;
    transform: translateY(-1px);
}

.res-footer-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
}

.footer-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.res-action-btn-wrap {
    display: flex;
    width: 100%;
}

.res-action-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.7rem 1.25rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    min-height: 42px;
    text-align: center;
}

.res-action-btn .btn-icon {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.btn-download, .btn-download-free {
    background: var(--primary-teal);
    color: white;
    box-shadow: 0 4px 14px rgba(1, 76, 204, 0.15);
}

.btn-download:hover, .btn-download-free:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(1, 76, 204, 0.25);
    filter: brightness(1.08);
}

.btn-download:hover .btn-icon, .btn-download-free:hover .btn-icon {
    transform: translateY(2px);
}

.btn-buy {
    background: var(--primary-navy);
    color: white;
    box-shadow: 0 4px 14px rgba(0, 24, 86, 0.15);
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 24, 86, 0.25);
    filter: brightness(1.15);
}

.btn-login-dl, .btn-login-buy {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-login-dl:hover, .btn-login-buy:hover {
    background: #e2e8f0;
    color: var(--primary-navy);
}

.btn-parent-req {
    background: #eff6ff !important;
    color: #014ccc !important;
    border: 1.5px solid #bfdbfe !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    padding: 0.4rem 0.85rem !important;
    border-radius: 999px !important;
    transition: all 0.25s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

.btn-parent-req:hover {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
    border-color: #93c5fd !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 14px rgba(1, 76, 204, 0.18) !important;
}

/* Custom Checkbox & Radio Buttons */
.filter-label input[type="radio"],
.filter-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    outline: none;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
    background: #fff;
    margin: 0;
    flex-shrink: 0;
}

.filter-label input[type="checkbox"] {
    border-radius: 6px;
}

.filter-label input[type="radio"]:checked {
    border-color: var(--primary-teal);
    background: var(--primary-teal);
}

.filter-label input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.filter-label input[type="checkbox"]:checked {
    border-color: var(--primary-teal);
    background: var(--primary-teal);
}

.filter-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

/* Sidebar Accordion/Details Panel Styling */
.filter-details {
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 0.6rem 0.85rem;
    background: #f8fafc;
    margin-top: 0.5rem;
    transition: all 0.2s ease;
}

.filter-details[open] {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.filter-summary {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--primary-navy);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    outline: none;
}

.filter-summary::-webkit-details-marker {
    display: none;
}

.summary-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-dot {
    width: 6px;
    height: 6px;
    border-radius: 2px;
    display: inline-block;
}

.stem-dot { background: #014ccc; }
.humanities-dot { background: #6366f1; }
.languages-dot { background: #ffb800; }
.arts-dot { background: #10b981; }

.filter-summary::after {
    content: '+';
    font-size: 1.1rem;
    font-weight: 500;
    transition: transform 0.2s ease;
    color: #94a3b8;
    line-height: 1;
}

.filter-details[open] .filter-summary::after {
    content: '−';
    color: var(--primary-teal);
}

.filter-detail-content {
    padding-left: 14px;
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Free Toggle switch iOS-style */
.free-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.free-toggle input {
    display: none;
}

.free-toggle-track {
    width: 44px;
    height: 24px;
    background-color: #cbd5e1;
    border-radius: 100px;
    position: relative;
    transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.free-toggle-thumb {
    width: 18px;
    height: 18px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.free-toggle input:checked + .free-toggle-track {
    background-color: #059669;
}

.free-toggle input:checked + .free-toggle-track .free-toggle-thumb {
    transform: translateX(20px);
}

/* Level option highlight */
.level-option {
    margin-bottom: 4px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    transition: all 0.2s ease;
}

.level-option:hover {
    border-color: var(--primary-teal);
    background: #f8fafc;
}

.level-option.senior-highlight {
    background: #f0f9ff;
    border-color: #bae6fd;
}

/* File type indicators */
.file-type-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.ft-pdf { background-color: #ef4444; }
.ft-doc { background-color: #3b82f6; }
.ft-ppt { background-color: #f97316; }
.ft-mp4 { background-color: #10b981; }
.ft-jpg { background-color: #8b5cf6; }

/* Active filters list styling */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 0.35rem 0.75rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.filter-tag:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

.filter-tag a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
}

.filter-tag a::after {
    content: '×';
    font-size: 1.1rem;
    line-height: 1;
    font-weight: 400;
}

.filter-tag.clear-all a::after {
    content: '';
}

/* Search wrap suggestion anchor fix */
.hero-search-wrap {
    position: relative;
}

/* Quick subject pills */
.quick-pills {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.quick-pill {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1.15rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.quick-pill:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    transform: translateY(-1px);
}

.quick-pill.active {
    background: white;
    color: var(--primary-navy);
    border-color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ── RESOURCES HYBRID LAYOUT ── */
.resources-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: start;
    margin-top: 3rem;
}

.sidebar-filters {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 2.5rem 2.25rem;
    border-radius: 32px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    position: sticky;
    top: 100px;
    box-shadow: 0 4px 30px rgba(15, 23, 42, 0.02);
}

.filter-group {
    margin-bottom: 2.5rem;
}

.filter-group h4 {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    margin-bottom: 1.5rem;
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: color 0.2s;
}

.filter-label:hover {
    color: var(--primary-teal);
}

.filter-label input[type="checkbox"],
.filter-label input[type="radio"] {
    accent-color: var(--primary-teal);
    width: 18px; height: 18px;
}

.sidebar-toggle-btn {
    display: none;
}

@media (max-width: 991px) {
    .resources-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .sidebar-toggle-btn {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: space-between;
        padding: 1rem;
        background: white;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        margin-bottom: 1rem;
        cursor: pointer;
        font-weight: 700;
        font-family: inherit;
        color: var(--primary-navy);
        box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    }
    .sidebar-filters {
        display: none;
        position: static;
        width: 100%;
        margin-bottom: 2rem;
        padding: 1.5rem;
    }
    .sidebar-filters.open {
        display: block;
        animation: fadeInDown 0.3s ease;
    }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.res-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    margin-top: auto;
    border-top: 1px solid #f1f5f9;
}

.res-meta {
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    gap: 1rem;
}

.btn-dl {
    background: var(--primary-navy);
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
}

/* ── TEACHER CTA ── */
.teacher-cta {
    padding: 7rem 0;
    background: var(--primary-navy);
    color: #fff;
    overflow: hidden;
}

.cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.teacher-cta h2 {
    font-size: 3rem;
    color: #fff;
    margin-bottom: 1.5rem;
}

.cta-list {
    list-style: none;
    margin: 2rem 0 3rem;
}

.cta-list li {
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.btn-white {
    background: #fff;
    color: var(--primary-teal);
}

.cta-visual {
    position: relative;
    padding: 2rem;
}

.earn-card {
    background: #fff;
    padding: 2.5rem;
    border-radius: 30px;
    color: #000;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}

.earn-label { font-size: 0.9rem; color: #64748B; margin-bottom: 0.5rem; }
.earn-amount { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; }
.earn-bar { height: 10px; background: #f1f5f9; border-radius: 5px; margin-bottom: 1rem; }
.earn-fill { width: 70%; height: 100%; background: var(--primary-teal); border-radius: 5px; }
.earn-note { font-size: 0.85rem; color: #059669; font-weight: 700; }

.upload-card {
    position: absolute;
    bottom: -1rem;
    right: -1rem;
    background: #fff;
    padding: 1.5rem;
    border-radius: 20px;
    color: #000;
    display: flex;
    gap: 1rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    width: 250px;
}

.upload-title { font-weight: 800; font-size: 0.95rem; }
.upload-meta { font-size: 0.8rem; color: #64748B; }

/* ── TOAST ── */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    z-index: 99999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    max-width: 320px;
}
.toast-show { opacity: 1; transform: translateY(0); }
.toast-success { background: #059669; }
.toast-error   { background: #dc2626; }
.toast-info    { background: var(--primary-teal); }

/* ── LIB SEARCH ── */
.lib-search-wrap {
    margin-bottom: 2rem;
}
.lib-search-wrap input {
    width: 100%;
    max-width: 400px;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font-family: inherit;
    font-size: 0.95rem;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.lib-search-wrap input:focus {
    outline: none;
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 4px rgba(8,145,178,0.1);
}

/* ── RESOURCES HERO (NEW) ── */
.mkt-hero-v2 {
    position: relative;
    padding: 2.5rem 0 1.5rem;
    background-image: url('../images/resources_hero_bg.png');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    overflow: hidden;
}

.mkt-hero-v2::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, 
        rgba(15, 23, 42, 0.85) 0%, 
        rgba(15, 23, 42, 0.6) 50%,
        rgba(15, 23, 42, 0.95) 100%);
    z-index: 1;
}

.mkt-hero-v2 .wrap {
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.mkt-hero-v2 h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 1rem;
    line-height: 1.1;
    color: #ffffff;
}

.mkt-hero-v2 p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.hero-search-form {
    max-width: 800px;
    margin: 0 auto;
}

.hero-search-wrap {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid white;
    border-radius: 100px;
    padding: 0.6rem 0.6rem 0.6rem 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.hero-search-icon {
    color: #94a3b8;
    flex-shrink: 0;
    margin-right: 0.75rem;
}

.hero-search-wrap input {
    flex: 1;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-navy);
    background: transparent;
    padding: 0.8rem 0;
}

.hero-search-btn {
    background: var(--primary-teal);
    color: white;
    border: none;
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(8, 145, 178, 0.3);
}
.hero-search-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }

.hero-search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: white;
    border-radius: 14px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
    display: none;
    z-index: 100;
    overflow: hidden;
    border: 1px solid #f1f5f9;
}

.suggestion-item {
    padding: 0.85rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f8fafc;
}
.suggestion-item:hover { background: #f0fdfa; color: var(--primary-teal); }
.suggestion-item:last-child { border-bottom: none; }

.quick-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.quick-pill {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}
.quick-pill:hover, .quick-pill.active {
    background: var(--primary-teal);
    color: white;
    border-color: var(--primary-teal);
}

/* ── ACTIVE FILTER TAGS ── */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 14px;
    border: 1px solid #f1f5f9;
}

.filter-tag {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.filter-tag a { color: inherit; text-decoration: none; }

/* ── SIDEBAR EXTRAS ── */
.sidebar-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 1.25rem 0;
}

.free-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.free-toggle input { display: none; }

.free-toggle-track {
    width: 44px;
    height: 24px;
    background: #e2e8f0;
    border-radius: 50px;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}

.free-toggle input:checked ~ .free-toggle-track { background: var(--primary-teal); }

.free-toggle-thumb {
    position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.free-toggle input:checked ~ .free-toggle-track .free-toggle-thumb { transform: translateX(20px); }

.file-type-dot {
    width: 10px; height: 10px;
    border-radius: 3px;
    display: inline-block;
    flex-shrink: 0;
}
.ft-pdf  { background: #ef4444; }
.ft-doc  { background: #014ccc; }
.ft-ppt  { background: #f97316; }
.ft-mp4  { background: #8b5cf6; }
.ft-jpg  { background: #10b981; }

.star-row { color: #ffb800; letter-spacing: 1px; font-size: 0.9rem; }

/* ── UPLOAD GRID & ACTIONS ── */
.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.upload-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}
.upload-actions .btn-primary { flex: 2; }
.upload-actions .btn-outline  { flex: 1; }

/* ── RES LEVEL BADGE ── */
.res-level {
    background: #f1f5f9;
    color: #475569;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

/* ── SIDEBAR MOBILE TOGGLE ── */
.sidebar-toggle-btn {
    display: none;
    width: 100%;
    padding: 0.85rem 1.25rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-navy);
    cursor: pointer;
    text-align: left;
    margin-bottom: 1rem;
    justify-content: space-between;
    align-items: center;
}
.sidebar-toggle-btn svg { transition: transform 0.3s; }
.sidebar-toggle-btn.open svg { transform: rotate(180deg); }

/* ── RESPONSIVE: TABLET (≤1024px) ── */
@media (max-width: 1024px) {
    .resources-container {
        grid-template-columns: 240px 1fr;
        gap: 2rem;
    }
    .cta-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .cta-visual { display: none; }
    .hero-headline { font-size: 48px; }
    .hero-content { margin-left: 2rem; }
    .sec-title { font-size: 2.2rem; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── RESPONSIVE: MOBILE (≤768px) ── */
@media (max-width: 768px) {

    /* Wrap padding */
    .wrap { padding: 0 1rem; }

    /* Navbar */
    .nav-links { display: none; }
    .nav-ctas  { display: none; }
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 4px;
        z-index: 1100;
    }
    /* Consistently managed by final override block */

    /* Dashboard navbars — add hamburger support */
    .navbar .nav-inner .user-badge { display: none; }

    /* Hero — show image on mobile as bottom half, text on top */
    .hero {
        height: auto;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        padding: 0;
        align-items: stretch;
    }
    .hero-bg {
        background-position: center top;
    }
    /* Transparent dark scrim — lets image show through clearly */
    .hero-overlay {
        background: linear-gradient(
            to bottom,
            rgba(15, 23, 42, 0.55) 0%,
            rgba(15, 23, 42, 0.35) 50%,
            rgba(15, 23, 42, 0.6)  100%
        );
    }
    /* Remove the blur entirely on mobile so image is crisp */
    .hero-blur { display: none; }
    .hero-body { display: flex; align-items: center; min-height: 100vh; }
    .hero-content {
        margin: 0 auto;
        padding: 6rem 1.25rem 4rem;
        text-align: center;
        max-width: 100%;
    }
    /* Switch text colours to white so they read on the dark scrim */
    .hero-headline { font-size: 2.4rem; letter-spacing: -1px; color: #fff; }
    .hero-accent   { color: var(--accent-cyan); }
    .hero-sub      { font-size: 1rem; color: rgba(255,255,255,0.8); }
    .hero-badge    { font-size: 12px; background: rgba(255,255,255,0.15); color: #fff; }
    .hero-stats .stat-item strong { color: #fff; }
    .hero-stats .stat-item span   { color: rgba(255,255,255,0.7); }
    .hero-stats .stat-sep         { background: rgba(255,255,255,0.2); }
    .hero-btns { justify-content: center; flex-wrap: wrap; gap: 0.75rem; }
    .hero-stats { justify-content: center; flex-wrap: wrap; gap: 1rem; }
    /* Ghost button readable on dark bg */
    .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.4); }
    .btn-ghost:hover { background: rgba(255,255,255,0.1); }

    /* Resources hero search */
    .mkt-hero { padding: 2.5rem 0 2rem; }
    .mkt-hero h1 { font-size: 1.6rem !important; }
    .mkt-hero p  { font-size: 0.9rem !important; }
    .hero-search-wrap { flex-wrap: wrap; gap: 0.5rem; padding: 0.75rem; }
    .hero-search-wrap input { min-width: 0; font-size: 0.9rem; }
    .hero-search-btn { width: 100%; border-radius: 10px; padding: 0.7rem; }
    .quick-pills { gap: 0.4rem; }
    .quick-pill { font-size: 0.75rem; padding: 0.35rem 0.75rem; }

    /* Resources layout — stack sidebar */
    .resources-container { grid-template-columns: 1fr; gap: 0; margin-top: 1.5rem; }
    .sidebar-toggle-btn { display: flex; }
    .sidebar-filters {
        position: static;
        display: none;
        margin-bottom: 1.5rem;
        padding: 1.5rem;
    }
    .sidebar-filters.open { display: block; }

    /* Cards grid — 1 column on small, 2 on medium */
    .cards-grid { grid-template-columns: 1fr; gap: 1rem; }

    /* Dashboard header */
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .dashboard-header h1 { font-size: 1.5rem; }
    .dashboard-header .btn { width: 100%; justify-content: center; }

    /* Stats grid */
    .stats-grid { grid-template-columns: 1fr; gap: 1rem; }
    .stat-card { padding: 1.5rem; }
    .stat-card .value { font-size: 1.6rem; }

    /* Teacher table — horizontal scroll */
    .premium-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table { min-width: 600px; }
    th, td { padding: 1rem; font-size: 0.85rem; }

    /* Forms */
    .form-container { padding: 1.75rem 1.25rem; border-radius: 20px; }
    .form-header h1 { font-size: 1.75rem; }
    .upload-grid { grid-template-columns: 1fr !important; }
    .upload-actions { flex-direction: column; }
    .upload-actions .btn-primary,
    .upload-actions .btn-outline { flex: none; width: 100%; justify-content: center; }

    /* Lock card */
    .lock-card { padding: 2rem 1.5rem; margin: 1rem; }

    /* Modal */
    .modal-card { padding: 2rem 1.5rem; border-radius: 20px; }




    /* Features */
    .features-grid { grid-template-columns: 1fr; }
    .feat-card { padding: 1.75rem; }
    .sec-title { font-size: 1.8rem; }

    /* Trusted row */
    .trusted-row { justify-content: center; gap: 1rem; }
    .trusted-row span { font-size: 0.85rem; }

    /* Active filters */
    .active-filters { padding: 0.75rem 1rem; }

    /* Lib search */
    .lib-search-wrap input { max-width: 100%; }

    /* Toast */
    .toast { right: 1rem; left: 1rem; max-width: none; bottom: 1rem; }

    /* Sec header row */
    .sec-header-row { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

/* ── RESPONSIVE: SMALL MOBILE (≤480px) ── */
@media (max-width: 480px) {
    .hero-headline { font-size: 2rem; color: #fff; }
    .hero-btns { flex-direction: column; }
    .hero-btns .btn-primary,
    .hero-btns .btn-ghost { width: 100%; justify-content: center; text-align: center; }
    .auth-toggle-btn { font-size: 12px; padding: 8px 6px; }
    .cards-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
}

/* ── RESPONSIVE: MEDIUM (481–768px) — 2-col cards ── */
@media (min-width: 481px) and (max-width: 768px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ── ADMIN DASHBOARD ── */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: #f0f4f8;
}

/* Sidebar */
.admin-sidebar {
    width: 272px;
    min-width: 272px;
    background: #ffffff;
    color: var(--text-main);
    padding: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 4px 0 24px rgba(15,23,42,0.04);
    border-right: 1px solid rgba(15,23,42,0.05);
    z-index: 100;
    overflow-y: auto;
    scrollbar-width: none;
}
.admin-sidebar::-webkit-scrollbar { display: none; }

.admin-sidebar .sidebar-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: var(--sidebar-logo-height);
    flex-shrink: 0;
    padding: var(--space-3) var(--space-6);
    text-decoration: none;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-3);
}

.admin-sidebar .sidebar-logo .logo-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, #014ccc, #6366f1);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.admin-sidebar .sidebar-logo .logo-text-wrap span {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-navy);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.admin-sidebar .sidebar-logo .logo-text-wrap small {
    display: block;
    font-size: 0.6rem;
    color: #475569;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.admin-sidebar .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 1rem 1rem;
    flex-grow: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.admin-sidebar .sidebar-nav::-webkit-scrollbar { width: 4px; }
.admin-sidebar .sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.admin-sidebar .sidebar-nav::-webkit-scrollbar-thumb { background: rgba(15,23,42,0.1); border-radius: 4px; }

.sidebar-section-label {
    font-size: 0.62rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 1.1rem 0.75rem 0.4rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.7rem 0.75rem;
    border-radius: 10px;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.18s ease;
    position: relative;
    cursor: pointer;
}

.sidebar-link .link-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    background: #f1f5f9;
    color: #64748b;
    flex-shrink: 0;
    transition: all 0.18s ease;
}

.sidebar-link:hover {
    background: #f8fafc;
    color: var(--primary-navy);
}
.sidebar-link:hover .link-icon {
    background: #e2e8f0;
    color: var(--primary-navy);
}

.sidebar-link.active {
    background: rgba(8, 145, 178, 0.08);
    color: var(--primary-teal);
}
.sidebar-link.active .link-icon {
    background: rgba(8, 145, 178, 0.15);
    color: var(--primary-teal);
}
.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0; top: 18%; bottom: 18%;
    width: 3px;
    background: var(--primary-teal);
    border-radius: 0 3px 3px 0;
}

.sidebar-badge {
    margin-left: auto;
    background: #ef4444;
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 99px;
    min-width: 20px;
    text-align: center;
    line-height: 1.6;
}

.sidebar-user-card {
    margin: 1rem;
    padding: 0.9rem 1rem;
    background: #f8fafc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.sidebar-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #014ccc, #6366f1);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.9rem; color: white;
    flex-shrink: 0;
}

/* Main area */
.admin-main {
    flex-grow: 1;
    padding: 0 3rem 1.5rem 3rem;
    overflow-y: auto;
    max-height: 100vh;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 3rem;
    margin: 0 -3rem 1.25rem -3rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    position: sticky;
    top: 0;
    z-index: 99;
    gap: 1rem;
}

.admin-topbar h1 {
    font-size: 1.85rem;
    font-weight: 800;
    color: #001856;
    margin: 0;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.admin-topbar p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

/* Stat cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.6rem 1.75rem;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(241, 245, 249, 1);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.11);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 3px;
}
.stat-card.blue::before   { background: linear-gradient(90deg, #014ccc, #6366f1); }
.stat-card.teal::before   { background: linear-gradient(90deg, #014ccc, #06b6d4); }
.stat-card.green::before  { background: linear-gradient(90deg, #059669, #10b981); }
.stat-card.purple::before { background: linear-gradient(90deg, #7c3aed, #a78bfa); }

.stat-card-icon {
    width: 46px; height: 46px;
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
}
.stat-card.blue   .stat-card-icon { background: #eff6ff; color: #014ccc; }
.stat-card.teal   .stat-card-icon { background: #ecfeff; color: #014ccc; }
.stat-card.green  .stat-card-icon { background: #ecfdf5; color: #059669; }
.stat-card.purple .stat-card-icon { background: #f5f3ff; color: #7c3aed; }

.stat-card .stat-label {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #001856;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-card .stat-meta {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Table card */
.admin-table-card {
    background: white;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
    border: 1px solid #f1f5f9;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.admin-table-header {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
}

.admin-table-header h3 { font-size: 1rem; font-weight: 800; color: #001856; }
.admin-table-header p  { font-size: 0.78rem; color: #94a3b8; margin-top: 2px; }

.admin-count-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.3rem 0.85rem;
    border-radius: 99px;
}

.admin-table-card table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-table-card thead tr { background: #f8fafc; border-bottom: 1px solid #f1f5f9; }
.admin-table-card thead th {
    padding: 0.8rem 1.5rem;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.admin-table-card tbody tr { border-bottom: 1px solid #f8fafc; transition: background 0.12s; }
.admin-table-card tbody tr:last-child { border-bottom: none; }
.admin-table-card tbody tr:hover { background: #f8fafc; }
.admin-table-card tbody td { padding: 0.9rem 1.5rem; color: #334155; vertical-align: middle; }

.admin-table-card .empty-row td {
    padding: 4rem 2rem; text-align: center; color: #94a3b8; font-size: 0.9rem;
}

/* Action buttons */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.35rem 0.85rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    border: none;
    white-space: nowrap;
}
.action-btn.approve  { background: #ecfdf5; color: #059669; }
.action-btn.approve:hover  { background: #059669; color: white; }
.action-btn.reject   { background: #fef2f2; color: #ef4444; }
.action-btn.reject:hover   { background: #ef4444; color: white; }
.action-btn.view     { background: #eff6ff; color: #014ccc; }
.action-btn.view:hover     { background: #014ccc; color: white; }
.action-btn.delete   { background: #fef2f2; color: #dc2626; }
.action-btn.delete:hover   { background: #dc2626; color: white; }

/* Dashboard sections */
.dashboard-section {
    display: none;
    animation: sectionFadeIn 0.25s ease;
}

.dashboard-section.active { display: block; }

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

/* Quick status row on overview */
.quick-status-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.quick-status-item {
    background: white;
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    display: flex; align-items: center; gap: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
}

.quick-status-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

/* ── AUTH MODAL ── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: white;
    width: 100%;
    max-width: 440px;
    border-radius: 24px;
    padding: 1.75rem;
    position: relative;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #e2e8f0;
    color: var(--primary-navy);
}

.auth-toggle {
    display: flex;
    background: #f8fafc;
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 1.25rem;
}

.auth-toggle-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: transparent;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    color: #64748b;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
}

.auth-toggle-btn.active {
    background: white;
    color: var(--primary-navy);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1);
}

.form-group textarea {
    width: 100%;
    min-height: 96px;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: all 0.2s;
}

.form-group textarea:focus {
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1);
}

.form-group input[type="file"] {
    padding: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    background: var(--color-bg-soft);
    cursor: pointer;
}

.form-group input[type="file"]::file-selector-button {
    margin-right: 0.75rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--color-border-dk);
    border-radius: 8px;
    background: #fff;
    color: var(--color-primary);
    font: 700 0.8rem var(--font-body);
    cursor: pointer;
}

.form-group input[type="file"]::file-selector-button:hover {
    background: var(--color-bg-muted);
}

.btn-primary {
    background: var(--primary-teal);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    filter: brightness(1.1);
}


.lock-icon-wrap svg {
    filter: drop-shadow(0 4px 6px rgba(8, 145, 178, 0.1));
}

/* ── PAYMENT UI ENHANCEMENTS ── */
.processing-spinner {
    width: 64px;
    height: 64px;
    border: 12px solid #f1f5f9;
    border-top: 12px solid #014ccc;
    border-radius: 50%;
    margin: 0 auto;
    animation: spin-payment 1s linear infinite;
}

@keyframes spin-payment {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.dashboard-lock-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.lock-card {
    background: white;
    width: 100%;
    max-width: 440px;
    border-radius: 24px;
    padding: 1.75rem;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slide-up-modal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slide-up-modal {
    0% { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.hidden { display: none !important; }

/* ── ADMIN / TEACHER DASHBOARD RESPONSIVE ── */

/* Hamburger toggle for dashboard sidebar */
.dash-hamburger {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 300;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg,#014ccc,#6366f1);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 4px 14px rgba(8,145,178,0.35);
}
.dash-hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}
.dash-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.dash-hamburger.open span:nth-child(2) { opacity: 0; }
.dash-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Sidebar overlay backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.5);
    z-index: 199;
    backdrop-filter: blur(2px);
}
.sidebar-backdrop.show { display: block; }

/* Mobile topbar quick-actions: profile + bell float top-right near hamburger */
.topbar-mobile-actions {
    display: none;
}

@media (max-width: 900px) {
    /* Show hamburger */
    .dash-hamburger { display: flex; }

    /* Slide sidebar off-screen by default */
    .admin-layout { display: block; position: relative; }

    .admin-sidebar {
        position: fixed;
        top: 0; left: 0;
        height: 100vh;
        width: 272px;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
        z-index: 200;
    }
    .admin-sidebar.open { transform: translateX(0); }

    /* Main content takes full width */
    .admin-main {
        padding: 0 1rem 2rem;
        max-height: none;
        min-width: 0;
    }

    /* Topbar: hide the right-side actions (they move to fixed top-right) */
    .admin-topbar {
        margin: 0 -1rem 1.5rem -1rem;
        padding: 1.5rem 1rem 1.5rem 4.5rem;
        flex-direction: row;
        align-items: center;
        width: auto;
        position: sticky;
        top: 0;
        z-index: 99;
    }
    .admin-topbar h1 { font-size: 1.2rem; }
    .admin-topbar p { font-size: 0.75rem; }
    /* Hide the full action bar in topbar on mobile */
    .admin-topbar > div:last-child {
        display: none !important;
    }

    /* Show the floating top-right actions */
    .topbar-mobile-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        position: fixed;
        top: 0.75rem;
        right: 1rem;
        z-index: 300;
    }

    /* Stats grid adapts on tablets */
    .stats-grid { grid-template-columns: repeat(2,1fr) !important; gap: 1rem; }

    /* Show the floating top-right quick actions */
    .topbar-mobile-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        position: fixed;
        top: 0.75rem;
        right: 1rem;
        z-index: 300;
    }

    /* Table cards remain usable on smaller widths */
    .admin-table-card { overflow-x: auto; }
    .admin-table-card table { min-width: 100%; }
    .admin-table-card thead th,
    .admin-table-card tbody td { padding: 0.75rem 1rem; font-size: 0.8rem; }

    .admin-table-card thead th { white-space: normal; }
    .admin-table-card tbody td { white-space: normal; }
    .admin-table-card tbody td > div { display: flex; flex-wrap: wrap; gap: 0.5rem; }
    .admin-table-card tbody td .action-btn { flex: 1 1 auto; min-width: calc(50% - 0.25rem); }

    .admin-table-header { flex-wrap: wrap; gap: 0.5rem; padding: 1rem 1.25rem; }
    .admin-table-header h3 { font-size: 1rem; }
    .admin-table-header .admin-count-badge { margin-top: 0.5rem; }

    .um-tab { font-size: 0.85rem; text-align: center; padding: 0.9rem 0.75rem; }
    .um-panel table { min-width: 100%; }

    /* Ensure inline grid layouts stack on tablets */
    .admin-main div[style*="grid-template-columns"] {
        display: block !important;
    }
    .admin-main div[style*="grid-template-columns"] > * {
        width: 100% !important;
    }

    /* Commission max-width full */
    #commission .admin-table-card > div { max-width: 100% !important; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr !important; }
    .admin-main { padding: 1rem 0.75rem 2rem; padding-top: 4rem; }
    .admin-topbar h1 { font-size: 1.15rem; }
    .admin-topbar p { font-size: 0.9rem; }
    .admin-table-card table { min-width: 100%; }
    .admin-table-card tbody td { padding: 0.7rem 0.85rem; font-size: 0.78rem; }
    .admin-table-card thead th { padding: 0.7rem 0.85rem; font-size: 0.65rem; }
    .admin-table-card .action-btn { width: 100%; justify-content: center; }
    .admin-table-card tbody td > div { flex-direction: column; align-items: stretch; }
    .admin-table-card .admin-table-header, .admin-table-header { flex-direction: column; align-items: stretch; }
    .admin-table-header { padding: 0.9rem 1rem; }
    .um-tab { font-size: 0.8rem; }

    .dashboard-lock-overlay { padding: 1rem; }
    .lock-card { max-width: 100%; margin: 0 0.5rem; }
}


/* ═══════════════════════════════════════════════════════════
   HOME PAGE V2  —  STUNNING REDESIGN
   ═══════════════════════════════════════════════════════════ */

/* ── SCROLL REVEAL BASE ── */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
.reveal-up.revealed, .reveal-right.revealed {
    opacity: 1;
    transform: none;
}

/* ── HERO PHOTO BG ── */
.hero-photo-bg {
    position: relative;
    min-height: 75vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: #2d2d2d;
}

.hero-bg-img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('../images/hero_v5.png');
    background-size: cover;
    background-position: center right;
    z-index: 0;
}

.hero-bg-fade {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, 
        rgba(248, 250, 252, 1) 0%, 
        rgba(248, 250, 252, 0.95) 20%, 
        rgba(248, 250, 252, 0.4) 50%, 
        rgba(248, 250, 252, 0) 100%);
    z-index: 1;
}

.hero-body-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-text-panel {
    max-width: 600px;
    padding: 2.5rem 0;
}

.hero-hl {
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1.1;
    font-weight: 800;
    color: #001856;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

.hero-body-text {
    font-size: 18px;
    color: #475569;
    margin-bottom: 2.5rem;
    line-height: 1.7;
    max-width: 500px;
}

.hero-btns-v2 {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.btn-hero-solid {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #014ccc;
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(8, 145, 178, 0.3);
    transition: all 0.3s ease;
}

.btn-hero-solid:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(8, 145, 178, 0.4);
    filter: brightness(1.05);
}

.btn-hero-outline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.05);
    color: #001856;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid rgba(15, 23, 42, 0.1);
    transition: all 0.3s ease;
}

.btn-hero-outline:hover {
    background: rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
}

/* Light stats version for light background */
.hero-stats-light {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin-top: 2rem;
}

.hstat-light {
    display: flex;
    flex-direction: column;
}

.hstat-light strong, .hstat-light span {
    font-size: 1.8rem;
    font-weight: 800;
    color: #001856;
    line-height: 1;
}

.hstat-light span {
    color: #014ccc;
    font-size: 1.2rem;
    margin-left: 2px;
}

.hstat-light small {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    margin-top: 0.4rem;
}

.hstat-sep-light {
    width: 1px;
    height: 40px;
    background: #e2e8f0;
}


/* ── TRUSTED V2 ── */
.trusted-v2 {
    background: #f8fafc;
    padding: 1.5rem 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    overflow: hidden;
}
.trusted-label-v2 {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #94a3b8;
    margin-bottom: 1.25rem;
}
.marquee-track {
    overflow: hidden;
    position: relative;
}

.marquee-content {
    display: flex;
    gap: 1rem;
    width: max-content;
    animation: marqueeScroll 30s linear infinite;
}
.marquee-track:hover .marquee-content { animation-play-state: paused; }
@keyframes marqueeScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.marquee-pill {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    padding: 0.55rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}
.marquee-pill:hover {
    border-color: #014ccc;
    color: #014ccc;
    box-shadow: 0 4px 15px rgba(8,145,178,0.1);
}

/* ── FEATURES V2 ── */
.features-v2 {
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}
.features-v2-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdfe 50%, #ffffff 100%);
}
.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.eyebrow-v2 {
    color: #014ccc;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.78rem;
    margin-bottom: 1rem;
}
.sec-title-v2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.15;
    color: #001856;
    margin-bottom: 1rem;
}
.sec-sub-v2 {
    font-size: 1.05rem;
    color: #64748b;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}

.features-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.feat-glass {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(8,145,178,0.1);
    border-radius: 24px;
    padding: 2.5rem;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}
.feat-glass::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--icon-color, #014ccc), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.feat-glass:hover::before { opacity: 1; }
.feat-glass:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 50px rgba(0,0,0,0.1);
    border-color: rgba(8,145,178,0.2);
}

.feat-glass-icon {
    width: 58px; height: 58px;
    border-radius: 16px;
    background: var(--icon-bg, rgba(8,145,178,0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--icon-color, #014ccc);
    transition: all 0.3s ease;
}
.feat-glass:hover .feat-glass-icon {
    box-shadow: 0 8px 20px var(--icon-bg, rgba(8,145,178,0.2));
    transform: scale(1.05);
}

.feat-glass h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #001856;
    margin-bottom: 0.75rem;
}
.feat-glass p {
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 1.5rem;
}
.feat-glass-arrow {
    font-size: 1.3rem;
    color: var(--icon-color, #014ccc);
    opacity: 0;
    transform: translateX(-6px);
    transition: all 0.3s ease;
}
.feat-glass:hover .feat-glass-arrow { opacity: 1; transform: translateX(0); }

/* ── MATERIALS V2 ── */
.materials-sec-v2 {
    padding: 4rem 0;
    background: #f8fafc;
}
.sec-header-row-v2 {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
}
.btn-viewall-v2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 800;
    color: #014ccc;
    font-size: 0.9rem;
    transition: gap 0.2s ease;
}
.btn-viewall-v2:hover { gap: 13px; }

.cards-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.res-card-v2 {
    background: #fff;
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 240px;
}

.res-card-v2:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.08);
    border-color: rgba(1, 76, 204, 0.3);
}

.res-card-accent {
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: linear-gradient(180deg, #014ccc, #67e8f9);
    border-radius: 4px 0 0 4px;
    z-index: 10;
}

.res-card-v2-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    width: 100%;
}

.res-badge-v2, .res-level-v2 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.res-title-v2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #001856;
    text-transform: uppercase;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3rem; /* Fixed height for clean alignment */
}

.res-creator-row-v2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
    min-width: 0;
}

.res-avatar-v2 {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #014ccc;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    flex-shrink: 0;
}

.res-teacher-link-v2 {
    font-size: 0.8rem;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.res-teacher-link-v2:hover {
    color: var(--primary-teal);
}

.res-topic-v2 {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.res-stars-v2 {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 1rem;
}

.stars-v2 {
    display: flex;
    gap: 1px;
}

.res-rating-num-v2 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffb800;
    margin-left: 4px;
}

.res-footer-v2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    border-top: 1px solid #f1f5f9;
    padding-top: 0.85rem;
}

.res-downloads-v2 {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 600;
}

.btn-dl-v2 {
    background: #001856;
    color: white;
    text-decoration: none;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-dl-v2:hover {
    background: #014ccc;
    transform: translateY(-1px);
}

/* ── TEACHER CTA V2 ── */
.teacher-cta-v2 {
    padding: 5rem 0;
    background: linear-gradient(135deg, #00103a 0%, #0c1a3b 50%, #0a1628 100%);
    color: #fff;
    overflow: hidden;
    position: relative;
}
.cta-mesh {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse 60% 80% at 10% 50%, rgba(8,145,178,0.2) 0%, transparent 60%),
        radial-gradient(ellipse 50% 70% at 85% 30%, rgba(124,58,237,0.15) 0%, transparent 60%);
}
.cta-dots {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 40px 40px;
}

.cta-grid-v2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}
.cta-headline {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 1.25rem;
}
.cta-desc {
    color: rgba(255,255,255,0.65);
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 2rem;
}
.cta-list-v2 {
    list-style: none;
    margin-bottom: 2.5rem;
}
.cta-list-v2 li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255,255,255,0.8);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
}
.cta-check {
    width: 22px; height: 22px;
    background: rgba(8,145,178,0.2);
    border: 1px solid rgba(8,145,178,0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #67e8f9;
    flex-shrink: 0;
    font-weight: 900;
}
.btn-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    color: #014ccc;
    padding: 1rem 2rem;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}
.btn-cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.4);
    background: #f0fdfe;
}

/* Earn card V2 */
.cta-visual-v2 { position: relative; }
.earn-card-v2 {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 2.5rem;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}
.earn-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.earn-icon { font-size: 1.75rem; }
.earn-period {
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.08);
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
}
.earn-label-v2 { font-size: 0.85rem; color: rgba(255,255,255,0.5); margin-bottom: 0.4rem; }
.earn-amount-v2 { font-size: 2.5rem; font-weight: 800; color: #fff; margin-bottom: 1.5rem; }
.earn-progress-track {
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}
.earn-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #014ccc, #67e8f9);
    border-radius: 4px;
    transition: width 1.5s cubic-bezier(0.22,1,0.36,1);
}
.earn-meta-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.earn-pct, .earn-trend {
    font-size: 0.78rem;
    font-weight: 700;
}
.earn-pct { color: rgba(255,255,255,0.5); }
.earn-trend { color: #10b981; }
.earn-breakdown { display: flex; flex-direction: column; gap: 0.75rem; }
.breakdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}
.breakdown-item strong { color: #fff; font-weight: 800; margin-left: auto; }
.breakdown-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Mini card */
.mini-card-v2 {
    position: absolute;
    top: -24px; right: -24px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);
    border-radius: 18px;
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    animation: floatCard 6s ease-in-out infinite;
}
.mini-card-num { font-size: 1.3rem; font-weight: 800; color: #fff; line-height: 1; }
.mini-card-label { font-size: 0.72rem; color: rgba(255,255,255,0.5); font-weight: 600; }

/* ── RESPONSIVE — HOME V2 ── */
@media (max-width: 1024px) {
    .hero-bg-img { background-position: center; }
    .hero-bg-fade {
        background: linear-gradient(180deg, 
            rgba(248, 250, 252, 0.95) 0%, 
            rgba(248, 250, 252, 0.8) 40%, 
            rgba(248, 250, 252, 0.4) 100%);
    }
    .hero-text-panel {
        max-width: 100%;
        text-align: center;
        padding: 5rem 1.5rem;
    }
    .hero-body-text { margin: 0 auto 2.5rem; }
    .hero-btns-v2 { justify-content: center; gap: 1.25rem; }
    .hero-stats-light { justify-content: center; gap: 1.5rem; }
    
    .cta-grid-v2 { grid-template-columns: 1fr; gap: 3rem; }
    .cta-visual-v2 { display: flex; justify-content: center; }
    .earn-card-v2 { max-width: 420px; }
}

@media (max-width: 768px) {
    .wrap { padding: 0 1.25rem; }
    .nav-inner { padding: 0 1.25rem; }
    .features-grid-v2 { grid-template-columns: 1fr; gap: 1.25rem; }
    .cards-grid-v2 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
    .sec-header-row-v2 { flex-direction: column; align-items: center; text-align: center; gap: 1.5rem; }
    .hero-hl { font-size: 38px; }
    .features-v2 { padding: 4rem 0; }
    .materials-sec-v2 { padding: 4rem 0; }
    .teacher-cta-v2 { padding: 4rem 0; }
}

@media (max-width: 480px) {
    .wrap { padding: 0 1rem; }
    .nav-inner { padding: 0 1rem; }
}

@media (max-width: 1024px) {
    .resources-container {
        grid-template-columns: 260px 1fr;
        gap: 2rem;
    }
}

@media (max-width: 991px) {
    .resources-container {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }
    .sidebar-toggle-btn {
        display: flex !important;
        width: 100%;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 1.25rem;
        background: white;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        margin-bottom: 1.5rem;
        cursor: pointer;
        font-weight: 700;
        color: var(--primary-navy);
        box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    }
    .sidebar-filters {
        display: none;
        position: static;
        width: 100%;
        padding: 2rem !important;
        border-radius: 20px !important;
        box-shadow: none !important;
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
    }
    .sidebar-filters.open {
        display: block;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .navbar { height: 70px !important; }
    .nav-links, .nav-ctas { display: none !important; }
    .hamburger { display: flex !important; }
    
        /* Consistently managed by final override block */
    
    .mkt-hero-v2 h1 { font-size: 2.1rem !important; }
    .hero-search-wrap { 
        max-width: 92% !important; 
        margin: 0 auto 1.5rem !important;
        border-radius: 50px !important; 
        flex-wrap: nowrap !important; 
        padding: 0.3rem 0.3rem 0.3rem 1rem !important; 
    }
    .hero-search-wrap input { flex: 1; padding: 0.5rem 0; font-size: 0.85rem; min-width: 0; }
    .hero-search-btn { width: auto !important; padding: 0.6rem 1.15rem !important; border-radius: 100px !important; font-size: 0.8rem !important; }
    .hero-search-icon { display: block !important; width: 14px; height: 14px; margin-right: 0.4rem; }
}

@media (max-width: 480px) {
    .cards-grid { grid-template-columns: 1fr !important; }
    .cards-grid-v2 { grid-template-columns: 1fr !important; }
    .mkt-hero-v2 h1 { font-size: 1.8rem !important; }
    .hero-search-wrap { 
        max-width: 95% !important;
        padding: 0.25rem 0.25rem 0.25rem 0.75rem !important;
    }
    .hero-search-wrap input { font-size: 0.75rem; }
    .hero-search-btn { padding: 0.5rem 0.85rem !important; font-size: 0.75rem !important; }
}

/* ── Modern Notification Center (Small Interface) ── */
.notif-bell-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.notif-bell {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.notif-bell:hover {
    background: #e2e8f0;
    color: #001856;
    border-color: #cbd5e1;
}
.notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 99px;
    border: 2px solid white;
    min-width: 18px;
    text-align: center;
}

.notif-popup {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 380px;
    max-height: 500px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    z-index: 9999;
    display: none;
    flex-direction: column;
    animation: notifSlideDown 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: top right;
}
@keyframes notifSlideDown {
    from { opacity: 0; transform: translateY(-10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.notif-popup.active { display: flex; }

.notif-popup-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.notif-popup-header h3 {
    font-size: 1rem;
    font-weight: 800;
    color: #001856;
    margin: 0;
}
.notif-mark-read {
    font-size: 0.75rem;
    font-weight: 700;
    color: #014ccc;
    background: none;
    border: none;
    cursor: pointer;
}

.notif-popup-body {
    padding: 0.75rem;
    overflow-y: auto;
    flex: 1;
}
.notif-popup-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 16px;
    margin-bottom: 0.5rem;
    transition: background 0.2s ease;
    border: 1px solid transparent;
}
.notif-popup-item.unread {
    background: #f0fdfa;
    border-color: #ccfbf1;
}
.notif-popup-item:hover {
    background: #f8fafc;
}
.notif-popup-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.notif-icon-purchase { background: #ecfdf5; color: #059669; }
.notif-icon-system { background: #eff6ff; color: #014ccc; }

.notif-popup-content { flex: 1; }
.notif-popup-msg {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
}
.notif-popup-time {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 4px;
}

/* ── Modern Notification Center (Unified Interface) ── */
.notif-bell-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.notif-bell {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.notif-bell:hover {
    background: #e2e8f0;
    color: #001856;
    border-color: #cbd5e1;
}

.notif-popup {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 380px;
    max-height: 500px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    z-index: 9999;
    display: none;
    flex-direction: column;
    animation: notifSlideDown 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: top right;
}
@keyframes notifSlideDown {
    from { opacity: 0; transform: translateY(-10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.notif-popup.active { display: flex; }

.notif-popup-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.notif-popup-header h3 {
    font-size: 1rem;
    font-weight: 800;
    color: #001856;
    margin: 0;
}
.notif-mark-read {
    font-size: 0.75rem;
    font-weight: 700;
    color: #014ccc;
    background: none;
    border: none;
    cursor: pointer;
}

.notif-popup-body {
    padding: 0.75rem;
    overflow-y: auto;
    flex: 1;
}
.notif-popup-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 16px;
    margin-bottom: 0.5rem;
    transition: background 0.2s ease;
    border: 1px solid transparent;
}
.notif-popup-item.unread { background: #f0fdfa; border-color: #ccfbf1; }
.notif-popup-item:hover { background: #f8fafc; }
.notif-popup-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.notif-icon-purchase { background: #ecfdf5; color: #059669; }
.notif-icon-system { background: #eff6ff; color: #014ccc; }

.notif-popup-content { flex: 1; }
.notif-popup-msg {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
}
.notif-popup-time {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 4px;
}
.notif-popup-footer {
    padding: 1rem;
    text-align: center;
    border-top: 1px solid #f1f5f9;
}
.notif-popup-footer a {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-decoration: none;
}

@media (max-width: 768px) {
    .notif-popup {
        width: 92% !important;
        max-width: 400px !important;
        right: auto !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        top: 80px !important;
    }
}

/* ── COMPRESSED MOBILE MENU (HARD OVERRIDE) ── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    z-index: 10001 !important;
    transition: all 0.2s ease;
}
.hamburger:hover { background: #e2e8f0; }
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #001856;
    border-radius: 2px;
    transition: all 0.3s ease;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── FLOATING POPUP MOBILE MENU (MODAL STYLE) ── */
.mobile-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 80px;
    right: 20px;
    left: auto;
    width: 240px;
    background: #ffffff;
    padding: 0 1.5rem;
    z-index: 10000;
    box-shadow: 0 15px 35px rgba(0, 24, 86, 0.15);
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, padding 0.25s ease;
}

.mobile-menu.open {
    display: flex !important;
    max-height: 520px;
    opacity: 1;
    pointer-events: auto;
    padding: 1rem 1.5rem 1.5rem;
}

.mobile-menu a {
    display: block;
    text-decoration: none;
    color: #1e293b;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s;
    text-align: center;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover,
.mobile-menu a.active { color: #014ccc; }

/* Overlay Background */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 24, 86, 0.4);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mobile-menu-overlay.open {
    display: block;
    opacity: 1;
}

@media (min-width: 769px) {
    .mobile-menu, .mobile-menu-overlay { display: none !important; }
    .hamburger { display: none !important; }
}

@media (max-width: 768px) {
    .nav-links, .nav-ctas { display: none !important; }
    .hamburger { display: flex !important; }
    .navbar { height: 70px !important; }
    .mobile-menu { top: 75px !important; }
}

/* ── PRICING REDESIGN V2 ── */
.pricing-section-v2 {
    background: #f8fafc;
    padding: 5rem 0;
}
.pricing-header-v2 {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}
.pricing-header-v2 h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: #001856;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 1rem;
}
.pricing-header-v2 p {
    font-size: 1.1rem;
    color: #64748b;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Billing Toggle */
.toggle-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 4rem;
}
.toggle-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #64748b;
    transition: color 0.2s;
    cursor: pointer;
}
.toggle-label.active {
    color: #014ccc;
}
.switch-input {
    display: none;
}
.switch-label {
    display: inline-block;
    width: 64px;
    height: 34px;
    background: #e2e8f0;
    border-radius: 34px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s;
}
.switch-label::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: white;
    top: 4px;
    left: 4px;
    transition: transform 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.switch-input:checked + .switch-label {
    background: #014ccc;
}
.switch-input:checked + .switch-label::after {
    transform: translateX(30px);
}
.discount-badge {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Pricing Grid & Cards */
.pricing-grid-v2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto 6rem;
    align-items: stretch;
}
@media (max-width: 992px) {
    .pricing-grid-v2 {
        grid-template-columns: repeat(2, 1fr);
        max-width: 760px;
    }
}
@media (max-width: 768px) {
    .pricing-grid-v2 {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
}

.pricing-card-v2 {
    background: white;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    padding: 3rem 2.25rem 2.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}
.pricing-card-v2:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 24, 86, 0.08);
    border-color: rgba(1, 76, 204, 0.15);
}
.pricing-card-v2.featured {
    border-color: #014ccc;
    box-shadow: 0 10px 30px rgba(1, 76, 204, 0.08);
    transform: scale(1.03);
    z-index: 10;
}
.pricing-card-v2.featured:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 24px 50px rgba(1, 76, 204, 0.15);
}

/* Card Accents & Badges */
.card-top-bar {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    border-radius: 24px 24px 0 0;
}
.accent-teal { background: linear-gradient(90deg, #0d9488, #2dd4bf); }
.accent-blue { background: linear-gradient(90deg, #014ccc, #60a5fa); }
.accent-purple { background: linear-gradient(90deg, #7c3aed, #c084fc); }

.card-badge {
    position: absolute;
    top: 20px;
    right: 24px;
    background: linear-gradient(135deg, #014ccc, #1e40af);
    color: white;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(1, 76, 204, 0.2);
}

.card-header-v2 {
    margin-bottom: 2rem;
}
.card-tier-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: #001856;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.card-desc {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

.card-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 2rem;
}
.card-price {
    font-size: 3rem;
    font-weight: 800;
    color: #001856;
    letter-spacing: -1px;
    line-height: 1;
}
.card-price-interval {
    font-size: 0.95rem;
    font-weight: 600;
    color: #94a3b8;
}

.card-features-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: #001856;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.25rem;
}
.card-features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-grow: 1;
}
.card-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.92rem;
    color: #334155;
    line-height: 1.4;
}
.card-feature-item svg {
    flex-shrink: 0;
    margin-top: 3px;
}

.btn-card-cta {
    display: block;
    width: 100%;
    padding: 1rem;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.btn-solid-blue {
    background: #014ccc;
    color: white;
}
.btn-solid-blue:hover {
    background: #0036a1;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(1, 76, 204, 0.25);
}
.btn-outline-navy {
    background: transparent;
    border: 2px solid #001856;
    color: #001856;
    padding: calc(1rem - 2px);
}
.btn-outline-navy:hover {
    background: #001856;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 24, 86, 0.15);
}

/* Comparison Table */
.comparison-section {
    max-width: 900px;
    margin: 0 auto 6rem;
    padding: 0 1.5rem;
}
.comparison-section h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    color: #001856;
    margin-bottom: 3rem;
}
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    background: white;
}
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 650px;
}
.comparison-table th, .comparison-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.95rem;
}
.comparison-table th {
    font-weight: 800;
    color: #001856;
    background: #f8fafc;
}
.comparison-table tbody tr:last-child td {
    border-bottom: none;
}
.comparison-table td:first-child {
    font-weight: 700;
    color: #001856;
}
.comparison-table td:not(:first-child) {
    text-align: center;
    color: #475569;
}
.comparison-table td.highlight {
    font-weight: 700;
    color: #014ccc;
}

/* FAQ Section */
.faq-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem 2rem;
}
.faq-section h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    color: #001856;
    margin-bottom: 3rem;
}
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.faq-item-v2 {
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.2s ease;
}
.faq-item-v2:hover {
    border-color: rgba(1, 76, 204, 0.2);
    box-shadow: 0 4px 15px rgba(0, 24, 86, 0.02);
}
.faq-question-btn {
    width: 100%;
    background: transparent;
    border: none;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.05rem;
    font-weight: 800;
    color: #001856;
    text-align: left;
    cursor: pointer;
    outline: none;
}
.faq-question-btn svg {
    transition: transform 0.2s ease;
    color: #94a3b8;
}
.faq-item-v2.active .faq-question-btn svg {
    transform: rotate(45deg);
    color: #014ccc;
}
.faq-answer-v2 {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
}
.faq-answer-inner {
    padding: 0 1.5rem 1.5rem;
}

/* ── PRODUCT DETAIL PAGE ── */
.product-hero-section {
    padding-top: 2rem !important; /* reduced white space */
    padding-bottom: 2rem !important;
}

.hero-split {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 3rem;
}

.hero-visual {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    aspect-ratio: 16/11;
    max-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-stats {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 1rem;
}

.item-stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    color: #475569;
}

.product-buy-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.reviews-grid-v2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.review-card-v2 {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    box-shadow: 0 4px 15px rgba(0,0,0,0.01);
}

@media (max-width: 991px) {
    .hero-split {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .hero-visual {
        max-height: 300px;
        margin: 0 auto 1.5rem;
        max-width: 480px;
    }
    .reviews-grid-v2 {
        grid-template-columns: 1fr;
    }
}

/* ── OVERHAULED CARD COMPONENT STYLES ── */
.res-card, .res-card-v2 {
    background: #ffffff !important;
    border-radius: 28px !important;
    padding: 1.5rem 1.75rem 1.5rem 1.75rem !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03) !important;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s ease, 
                border-color 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    overflow: hidden !important;
    min-height: 270px !important;
}

.res-card:hover, .res-card-v2:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08) !important;
    border-color: rgba(1, 76, 204, 0.25) !important;
}

.res-card-accent {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 5px !important;
    background: linear-gradient(180deg, #014ccc, #67e8f9) !important;
    z-index: 10;
}

.res-card-top-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    margin-bottom: 0.75rem !important;
}

.res-meta-subject {
    font-size: 1.05rem !important;
    font-weight: 500 !important;
    color: #1f2937 !important;
}

.res-meta-level {
    font-size: 1.05rem !important;
    font-weight: 500 !important;
    color: #1f2937 !important;
    margin-left: auto !important;
}

.res-title {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #001856 !important;
    text-transform: uppercase !important;
    margin-top: 0.25rem !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.3 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    height: 3.25rem !important;
}

.res-creator-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 0.5rem !important;
}

.res-avatar {
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    background: #014ccc !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    flex-shrink: 0 !important;
}

.res-teacher-link {
    font-size: 0.9rem !important;
    color: #4b5563 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    transition: color 0.2s ease !important;
}

.res-teacher-link:hover {
    color: #014ccc !important;
}

.res-topic {
    font-size: 0.95rem !important;
    color: #4b5563 !important;
    font-weight: 500 !important;
    margin-bottom: 0.5rem !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-transform: none !important;
}

.res-stars-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 1rem !important;
}

.stars-list {
    display: flex !important;
    gap: 3px !important;
}

.stars-list svg {
    width: 14px !important;
    height: 14px !important;
}

.res-rating-value {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #eab308 !important;
    margin-left: 2px !important;
}

.res-card-footer {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: auto !important;
    border-top: 1px solid #f1f5f9 !important;
    padding-top: 0.85rem !important;
    width: 100% !important;
}

.res-downloads-count {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 0.9rem !important;
    color: #9ca3af !important;
    font-weight: 600 !important;
}

.res-footer-right {
    display: flex !important;
    align-items: center !important;
    gap: 1.5rem !important;
}

.res-price-text {
    font-size: 1rem !important;
    font-weight: 800 !important;
    color: #001856 !important;
}

.res-btn-pill {
    background: #001856 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 0.4rem 1.5rem !important;
    border-radius: 24px !important;
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    transition: all 0.2s ease !important;
    border: none !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: 32px !important;
    min-height: unset !important;
    box-shadow: none !important;
}

.res-btn-pill:hover {
    background: #014ccc !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

.res-btn-pill.btn-download, .res-btn-pill.btn-download-free {
    background: #014ccc !important;
}

.res-btn-pill.btn-download:hover, .res-btn-pill.btn-download-free:hover {
    background: #001856 !important;
}

/* ── CUSTOM DROPDOWN SELECT ── */
.custom-select-wrapper {
    position: relative !important;
    display: inline-block !important;
    font-family: inherit !important;
}

.custom-select-trigger {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 0.5rem 1.25rem !important;
    font-weight: 700 !important;
    color: #475569 !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    min-width: 170px !important;
    font-family: inherit !important;
}

.custom-select-trigger:hover {
    border-color: #014ccc !important;
    color: #001856 !important;
}

.custom-select-wrapper.active .custom-select-trigger {
    border-color: #014ccc !important;
    color: #001856 !important;
    box-shadow: 0 0 0 3px rgba(1, 76, 204, 0.1) !important;
}

.custom-select-arrow {
    transition: transform 0.2s ease !important;
    color: #94a3b8 !important;
    flex-shrink: 0 !important;
}

.custom-select-wrapper.active .custom-select-arrow {
    transform: rotate(180deg) !important;
    color: #014ccc !important;
}

.custom-options-container {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 0 !important;
    right: 0 !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-8px) !important;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.2s ease !important;
    z-index: 1000 !important;
    overflow: hidden !important;
    min-width: 170px !important;
}

.custom-select-wrapper.active .custom-options-container {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.custom-option {
    padding: 0.65rem 1.25rem !important;
    color: #475569 !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    cursor: pointer !important;
    transition: background 0.15s ease, color 0.15s ease !important;
    text-align: left !important;
    white-space: nowrap !important;
}

.custom-option:hover {
    background: #f8fafc !important;
    color: #014ccc !important;
}

.custom-option.selected {
    background: #f0f4ff !important;
    color: #014ccc !important;
    font-weight: 800 !important;
}

/* ── MATERIALS PAGE HEADER RESPONSIVENESS ── */
.resources-header-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 2rem !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
    width: 100% !important;
}

.resources-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    flex-wrap: wrap !important;
}


@media (max-width: 576px) {
    .resources-header-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .resources-header-actions {
        width: 100% !important;
        justify-content: space-between !important;
        gap: 0.75rem !important;
    }
    
    .custom-select-wrapper {
        flex-grow: 1 !important;
        width: 100% !important;
    }
    
    .custom-select-trigger {
        width: 100% !important;
        display: flex !important;
    }
}




/* =====================================================
   ADMIN PORTAL — COMPREHENSIVE RESPONSIVENESS FIXES
   ===================================================== */

/* Named grid helpers used in dashboard & analytics */
.admin-charts-grid {
    display: grid;
    /* minmax(0, …): a column may shrink below its content, else a wide
       canvas pins it open and the chart overflows the card */
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.admin-charts-grid-inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

/* ── CHARTS ──
   Chart.js sizes its canvas to the parent box. A canvas that is also what
   sizes that box (the default: an inline element in an auto-height div)
   feeds back into itself and grows a few pixels on every resize, forever.
   So a chart always lives in a .chart-frame: a positioned box whose height
   is set here, with the canvas taken out of flow. The frame cannot depend on
   the canvas, so nothing can loop.
     --chart-h    height (and, for .chart-frame--fill, the minimum height)
     --chart-max  upper bound for .chart-frame--fill */
.chart-frame {
    position: relative;
    width: 100%;
    min-width: 0;
    height: var(--chart-h, 280px);
}
.chart-frame > canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
}
/* inside a flex column card: take the card's spare height, within bounds */
.chart-frame--fill {
    flex: 1 1 auto;
    height: auto;
    min-height: var(--chart-h, 280px);
    max-height: var(--chart-max, 520px);
}
.chart-card {
    display: flex;
    flex-direction: column;
}
/* no data: a compact notice, not a chart-sized hole */
.chart-frame.is-empty {
    height: auto;
    min-height: 0;
    max-height: none;
}
.chart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 9rem;
    height: 100%;
    padding: 1.5rem;
    text-align: center;
    color: #94a3b8;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 16px;
}

/* sizes for the admin grid */
.admin-charts-grid .chart-frame--fill { --chart-h: 320px; }
.admin-charts-grid-inner .chart-frame { --chart-h: 160px; }

.admin-status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.admin-financials-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.analytics-insights-grid {
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 1.5rem;
}
.analytics-row-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.analytics-row-grid-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Strategic insight widget — flex row that wraps */
.strategic-insight-inner {
    padding: 2.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
}
.strategic-insight-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.2);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}
.strategic-insight-avatar img { width: 100%; height: 100%; object-fit: cover; }
.strategic-insight-body { flex: 1; min-width: 220px; }
.strategic-insight-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Topbar logout — hide text label on very small screens */
.topbar-logout-label { display: inline; }

/* User/financial tab bars — allow wrapping */
.admin-tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e2e8f0;
    background: #f8fafc;
    flex-wrap: wrap;
}
.admin-tab-bar button {
    flex: 1;
    min-width: 80px;
    padding: 1rem 0.5rem;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Tablet (≤ 900px) — already handled above, extend here ---- */
@media (max-width: 900px) {
    .admin-charts-grid,
    .admin-financials-stats,
    .analytics-insights-grid,
    .analytics-row-grid,
    .analytics-row-grid-half {
        grid-template-columns: 1fr !important;
    }
    .admin-status-grid {
        grid-template-columns: 1fr 1fr;
    }
    .strategic-insight-inner {
        padding: 1.75rem;
        gap: 1.25rem;
    }
}

/* ---- Mobile (≤ 600px) ---- */
@media (max-width: 600px) {
    /* Topbar: stack title + actions vertically */
    .admin-topbar {
        flex-direction: column;
        align-items: flex-start !important;
        padding: 1rem 1rem 1rem 4.5rem !important;
        gap: 0.75rem;
    }
    .admin-topbar > div:last-child {
        width: 100%;
        justify-content: flex-end;
    }

    /* Status grid single column */
    .admin-status-grid {
        grid-template-columns: 1fr !important;
    }

    /* Strategic insight: stack avatar + text */
    .strategic-insight-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
        gap: 1rem;
    }
    .strategic-insight-avatar {
        width: 72px;
        height: 72px;
    }
    .strategic-insight-actions {
        flex-direction: column;
    }
    .strategic-insight-actions a,
    .strategic-insight-actions button {
        width: 100%;
        text-align: center;
    }

    /* Hide logout text, keep icon */
    .topbar-logout-label { display: none; }

    /* User/financial tabs: smaller text */
    .admin-tab-bar button,
    .um-tab,
    .fin-tab-btn {
        font-size: 0.75rem !important;
        padding: 0.75rem 0.4rem !important;
    }

    /* Table: hide lower-priority columns */
    .admin-table-card table { min-width: 480px; }

    /* Commission form full width */
    #commission .admin-table-card > div {
        padding: 1.25rem !important;
    }

    /* Charts: shorter frames on a phone */
    .admin-charts-grid .chart-frame--fill {
        --chart-h: 220px;
    }

    /* Modals full-width on mobile */
    .lock-card {
        border-radius: 16px;
        padding: 1.5rem;
    }
}

/* ---- Small mobile (≤ 400px) ---- */
@media (max-width: 400px) {
    .admin-topbar h1 { font-size: 1rem !important; }
    .stat-card .stat-value { font-size: 1.6rem; }
    .admin-table-card thead th { font-size: 0.6rem; }
    .admin-table-card tbody td { font-size: 0.75rem; }
}

/* =====================================================
   TOPBAR PROFILE DROPDOWN
   ===================================================== */
.admin-topbar p {
    margin-top: 2px;
}

.topbar-profile-wrap {
    position: relative;
}

.topbar-profile-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 5px 10px 5px 5px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.topbar-profile-btn:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.topbar-profile-btn svg {
    color: #94a3b8;
    transition: transform 0.2s;
}
.topbar-profile-btn.open svg {
    transform: rotate(180deg);
}

.topbar-avatar {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, #001856, #014ccc);
    color: white;
    font-size: 0.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.topbar-profile-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15,23,42,0.12);
    z-index: 500;
    overflow: hidden;
    animation: tpmFadeIn 0.15s ease;
}
.topbar-profile-menu.open {
    display: block;
}
@keyframes tpmFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tpm-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: #f8fafc;
}
.tpm-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #001856, #014ccc);
    color: white;
    font-size: 0.85rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tpm-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #001856;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tpm-role {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 600;
    text-transform: capitalize;
    margin-top: 1px;
}
.tpm-divider {
    height: 1px;
    background: #f1f5f9;
}
.tpm-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: background 0.12s;
}
.tpm-item:hover {
    background: #f8fafc;
    color: #001856;
}
.tpm-item svg {
    color: #64748b;
    flex-shrink: 0;
}
.tpm-logout {
    color: #ef4444;
}
.tpm-logout:hover {
    background: #fef2f2;
    color: #dc2626;
}
.tpm-logout svg {
    color: #ef4444;
}

/* ─────────────────────────────────────────────────────────────────────────────
   PUBLIC MARKETING PAGES REDESIGN — ULTRA PREMIUM EDTECH SYSTEM
   ───────────────────────────────────────────────────────────────────────────── */

.reveal-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
    opacity: 0;
    transform: translateX(24px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.revealed, .reveal-right.revealed {
    opacity: 1;
    transform: translate(0, 0);
}

/* HERO STYLING */
.hero-photo-bg {
    position: relative;
    min-height: 78vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: #f8fafc;
}

.hero-bg-img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('../images/hero_v5.png');
    background-size: cover;
    background-position: center right;
    z-index: 0;
    opacity: 1;
}

.hero-bg-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 0.92) 25%,
        rgba(255, 255, 255, 0.4) 55%,
        rgba(255, 255, 255, 0) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.hero-body-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 0 0 5rem;
    margin-top: -1.5rem;
}

.hero-text-panel {
    max-width: 580px;
    padding-left: 3rem;
}

.hero-hl {
    font-size: clamp(2.6rem, 5vw, 4.2rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    color: #001856;
    margin-bottom: 1.25rem;
}

.hero-body-text {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #475569;
    max-width: 560px;
    margin-bottom: 2rem;
}

.hero-btns-v2 {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn-hero-solid {
    background: linear-gradient(135deg, #014ccc 0%, #00287a 100%);
    color: #ffffff;
    padding: 1rem 2.25rem;
    border-radius: 99px;
    font-weight: 800;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(1, 76, 204, 0.4);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.1);
}

.btn-hero-solid svg {
    transition: transform 0.3s ease;
}

.btn-hero-solid:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(1, 76, 204, 0.5);
    background: linear-gradient(135deg, #0036a1 0%, #001f5c 100%);
}

.btn-hero-solid:hover svg {
    transform: translateX(4px);
}

.btn-hero-outline {
    background: rgba(255, 255, 255, 0.9);
    color: #001856;
    border: 2px solid rgba(0, 24, 86, 0.1);
    padding: 0.95rem 2.25rem;
    border-radius: 99px;
    font-weight: 800;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 6px 15px rgba(0, 24, 86, 0.05);
}

.btn-hero-outline:hover {
    background: #ffffff;
    border-color: #014ccc;
    color: #014ccc;
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0, 24, 86, 0.1);
}

.hero-stats-light {
    display: inline-flex;
    align-items: center;
    gap: 2rem;
    padding: 1.1rem 1.75rem;
    background: rgba(0, 24, 86, 0.06);
    border: 1px solid rgba(0, 24, 86, 0.1);
    border-radius: 18px;
}

.hstat-light {
    text-align: center;
}

.hstat-light strong {
    font-size: 1.7rem;
    font-weight: 800;
    color: #001856;
    line-height: 1;
}

.hstat-light span {
    font-size: 1.1rem;
    font-weight: 800;
    color: #014ccc;
}

.hstat-light small {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 3px;
}

.hstat-sep-light {
    width: 1px;
    height: 36px;
    background: #e2e8f0;
}

@media (max-width: 768px) {
    /* Hero fills screen; image anchored bottom so educator face shows below text */
    .hero-photo-bg { min-height: 100svh; align-items: flex-start; background-color: #f8fafc; }
    .hero-bg-img { opacity: 1; background-position: 60% bottom; }
    .hero-bg-fade {
        background: linear-gradient(
            180deg,
            rgba(255,255,255,1)    0%,
            rgba(255,255,255,0.95) 45%,
            rgba(255,255,255,0.7)  60%,
            rgba(255,255,255,0)    85%
        );
    }
    /* Compact text block at top — leaves bottom ~40% for the educator image */
    .hero-body-wrap { padding: 0; margin-top: -3rem; }
    .hero-text-panel { max-width: 100%; padding-left: 1.25rem; padding-right: 1.25rem; text-align: left; }
    .hero-hl { font-size: clamp(1.85rem, 7.5vw, 2.5rem); letter-spacing: -1px; margin-bottom: 0.65rem; }
    .hero-body-text { font-size: 0.9rem; max-width: 100%; margin-bottom: 1.25rem; line-height: 1.6; color: #1e293b; text-shadow: 0 1px 2px rgba(255,255,255,1); }
    .hero-btns-v2 { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 0.85rem; }
    .btn-hero-solid, .btn-hero-outline { width: auto; justify-content: center; padding: 0.65rem 1.25rem; font-size: 0.85rem; }
    .hero-stats-light { gap: 1rem; padding: 0.8rem 1.25rem; flex-wrap: wrap; justify-content: flex-start; width: 100%; margin-top: 0.5rem; background: rgba(255,255,255,0.95); box-shadow: 0 4px 15px rgba(0,0,0,0.05); border-radius: 12px; }
    .hstat-light strong { font-size: 1.2rem; }
    .hstat-light small { font-size: 0.62rem; }
    .hstat-sep-light { height: 26px; }
}

/* PAN-AFRICAN MARQUEE */
.trusted-v2 {
    background: #0f172a;
    padding: 1.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.trusted-label-v2 {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.1rem;
    padding: 0 1rem;
}

.marquee-track {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-content {
    display: inline-flex;
    gap: 1.5rem;
    animation: marqueeScroll 28s linear infinite;
}

@keyframes marqueeScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.marquee-pill {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #cbd5e1;
    padding: 0.45rem 1.25rem;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.82rem;
    white-space: nowrap;
}

/* GLASS FEATURES */
.features-v2 {
    padding: 6rem 0;
    background: #f8fafc;
    position: relative;
}

.eyebrow-v2 {
    color: #014ccc;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
}

.sec-title-v2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #001856;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

.sec-sub-v2 {
    color: #64748b;
    font-size: 1rem;
    max-width: 540px;
}

.features-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.75rem;
    margin-top: 3rem;
}

.feat-glass {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    position: relative;
}

.feat-glass:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 35px rgba(0, 24, 86, 0.08);
    border-color: #014ccc;
}

.feat-glass-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--icon-bg);
    color: var(--icon-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.feat-glass h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #001856;
    margin-bottom: 0.5rem;
}

.feat-glass p {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.6;
}

.feat-glass-arrow {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    color: #014ccc;
    font-weight: 800;
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
}

.feat-glass:hover .feat-glass-arrow {
    opacity: 1;
    transform: translateX(3px);
}

/* ── RESPONSIVE FILTER SIDEBAR ── */
@media (max-width: 640px) {
  .sidebar-filters {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.95);
    padding: 1.5rem;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform .3s ease;
    z-index: 1000;
  }
  .sidebar-filters.open { transform: translateX(0); }
  .sidebar-toggle-btn { display: inline-flex; }
}
@media (min-width: 641px) {
  .sidebar-filters {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding-right: 0.5rem;
  }
  .sidebar-toggle-btn { display: none; }
}

/* Filter group styling */
.filter-group {
  margin-bottom: 1rem;
  background: #f9fafb;
  padding: 0.75rem 1rem;
  border-radius: 12px;
}
.filter-details summary {
  cursor: pointer;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   PLATFORM-WIDE RESPONSIVENESS FIXES
   ═══════════════════════════════════════════════════════════ */

/* ── GLOBAL: prevent horizontal overflow everywhere ── */
*, *::before, *::after { box-sizing: border-box; }
img, video, iframe, embed, object { max-width: 100%; }

/* ── NAVBAR: logo never overflows on small screens ── */
.nav-inner { gap: 0.75rem; }
.logo img { max-height: 48px; width: auto; }
@media (max-width: 400px) {
    .logo img { max-height: 38px; }
    .nav-inner { padding: 0 0.75rem; }
}

/* ── STUDENT DASHBOARD: tab bar scrolls horizontally on mobile ── */
.dashboard-container > div[style*="border-bottom"] {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.dashboard-container > div[style*="border-bottom"]::-webkit-scrollbar { display: none; }

@media (max-width: 768px) {
    /* Student dashboard tab row: scroll instead of wrap */
    .dashboard-container > div[style*="border-bottom"] {
        flex-wrap: nowrap !important;
        gap: 0 !important;
    }
    .dashboard-container > div[style*="border-bottom"] button {
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 0.78rem !important;
        padding: 0.65rem 0.75rem !important;
    }
    /* Lib search: full width below tabs */
    .lib-search-wrap { width: 100%; margin-bottom: 0 !important; }
    .lib-search-wrap input { width: 100% !important; max-width: 100% !important; }

    /* Student dashboard: learning progress grid single col */
    .dashboard-container > div[style*="grid-template-columns: repeat(auto-fit"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Support tab: stack 2-col grid */
    #tab-content-support > div[style*="grid-template-columns:1fr 1fr"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.25rem !important;
    }

    /* Teacher dashboard: support section 2-col → 1-col */
    #support > div[style*="grid-template-columns:1fr 1fr"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.25rem !important;
    }

    /* Teacher AI section: side-main-grid stacks */
    .side-main-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.25rem !important;
    }

    /* Teacher topbar: hide upload button text on very small screens */
    #teacherTopbar > div:last-child > a[href="/upload"] span { display: none; }

    /* Wallet form: stack amount + phone + button */
    .wallet-form {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    .wallet-form .form-group { margin: 0 !important; }

    /* Admin task assign grid: single col */
    #tasks > div[style*="grid-template-columns:1fr 1fr"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
}

@media (max-width: 480px) {
    /* Student progress grid: single col on very small */
    .dashboard-container > div[style*="grid-template-columns: repeat(auto-fit"] {
        grid-template-columns: 1fr !important;
    }
    /* Streak bar: wrap items */
    .streak-bar { flex-wrap: wrap; gap: 0.75rem; padding: 1rem; }
    /* Badge grid: 2 cols */
    .badge-grid { grid-template-columns: repeat(2, 1fr) !important; }
    /* Card btn row: 3 cols still fine, but reduce padding */
    .card-btn-row { gap: 0.35rem; }
    .card-btn-sm { font-size: 0.7rem; padding: 0.45rem 0.35rem; }
}

/* ── PROFILE PAGE: responsive grid ── */
@media (max-width: 960px) {
    .profile-grid-container { grid-template-columns: 1fr !important; }
    .profile-showcase-card { position: static !important; }
}
@media (max-width: 640px) {
    .profile-wrap { margin-top: 1.5rem !important; padding: 0 1rem !important; }
    .form-row-2col { grid-template-columns: 1fr !important; }
    .spiritual-cards-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .save-cta-btn { font-size: 0.9rem; }
}

/* ── MATERIALS PAGE: main wrap padding on mobile ── */
@media (max-width: 768px) {
    main.wrap[style*="padding: 3rem"] { padding: 1.5rem 1rem !important; }
    .mkt-hero-v2 { padding: 2rem 0 1.25rem; }
    .mkt-hero-v2 h1 { font-size: 1.75rem !important; letter-spacing: -0.5px; }
    .mkt-hero-v2 p { font-size: 0.88rem !important; }
}

/* ── ADMIN TABLE: horizontal scroll wrapper ── */
.admin-table-card { overflow-x: auto; }
.admin-table-card table { min-width: 560px; }

/* ── TEACHER TOPBAR: prevent overflow on tablet ── */
@media (max-width: 900px) {
    #teacherTopbar {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding-left: 4.5rem !important;
    }
    #teacherTopbar > div:last-child {
        display: none !important;
    }
}

/* ── CHECKOUT / PAYMENT PAGES: full-width on mobile ── */
@media (max-width: 600px) {
    .lock-card { width: calc(100% - 2rem) !important; max-width: none !important; margin: 1rem !important; padding: 1.5rem !important; }
    .modal-card { width: calc(100% - 2rem) !important; max-width: none !important; margin: 1rem !important; padding: 1.5rem !important; }
}

/* ── PRODUCT PAGE: hero split responsive ── */
@media (max-width: 768px) {
    .hero-split { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
    .hero-visual { max-height: 240px !important; }
    .reviews-grid-v2 { grid-template-columns: 1fr !important; }
    .item-stats { flex-wrap: wrap; gap: 0.5rem; }
}

/* ── PRICING PAGE: cards stack on mobile ── */
@media (max-width: 600px) {
    .pricing-grid-v2 { grid-template-columns: 1fr !important; max-width: 100% !important; padding: 0 1rem; }
    .pricing-card-v2.featured { transform: none !important; }
    .toggle-wrapper { flex-wrap: wrap; justify-content: center; }
    .comparison-section { padding: 0 1rem !important; }
    .faq-section { padding: 0 1rem 2rem !important; }
    .faq-question-btn { font-size: 0.92rem; padding: 1.1rem; }
}

/* ── UPLOAD FORM: full-width grid on mobile ── */
@media (max-width: 768px) {
    .upload-grid { grid-template-columns: 1fr !important; }
    .upload-actions { flex-direction: column !important; }
    .upload-actions .btn-primary, .upload-actions .btn-outline { width: 100% !important; }
}

/* ── BECOME TEACHER / ONBOARDING: center content ── */
@media (max-width: 768px) {
    .cta-grid-v2 { grid-template-columns: 1fr !important; gap: 2rem !important; }
    .cta-visual-v2 { display: none !important; }
    .earn-card-v2 { max-width: 100% !important; }
    .mini-card-v2 { display: none !important; }
}

/* ── GENERAL ALIGNMENT: ensure all flex rows wrap ── */
.admin-table-header { flex-wrap: wrap; gap: 0.5rem; }
.res-card-footer { flex-wrap: wrap; gap: 0.5rem; }

/* ── TOAST: full width on mobile ── */
@media (max-width: 480px) {
    .toast-container { right: 0.75rem; left: 0.75rem; top: 1rem; }
    .toast { min-width: 0; width: 100%; }
}

/* ── SIDE-MAIN GRID (Teacher AI section) ── */
.side-main-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 900px) {
    .side-main-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ── TWO-COL GRID (Teacher profile section) ── */
.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
@media (max-width: 768px) {
    .two-col-grid { grid-template-columns: 1fr !important; }
}

/* ── ADMIN MAIN: ensure no overflow on mobile ── */
@media (max-width: 900px) {
    .admin-main { overflow-x: hidden; }
    .admin-main > * { max-width: 100%; }
}

/* ── STUDENT DASHBOARD NAVBAR: fix overlap with topbar-mobile-actions ── */
@media (max-width: 768px) {
    .navbar .nav-ctas { display: none !important; }
    /* Student dashboard uses its own navbar — ensure hamburger visible */
    .navbar .hamburger { display: flex !important; }
    /* Prevent topbar-mobile-actions from overlapping logo */
    .topbar-mobile-actions { gap: 6px; }
    .topbar-mobile-actions .btn-upgrade-gold { padding: 0.3rem 0.6rem !important; font-size: 0.68rem !important; }
}

/* ── MATERIALS PAGE: active filters wrap cleanly ── */
@media (max-width: 480px) {
    .active-filters { padding: 0.6rem 0.75rem; gap: 0.4rem; }
    .filter-tag { font-size: 0.72rem; padding: 0.25rem 0.6rem; }
}

/* ── ADMIN DASHBOARD: task assign form grid ── */
@media (max-width: 768px) {
    div[style*="grid-template-columns:1fr 1fr"][style*="gap:1rem"] {
        display: flex !important;
        flex-direction: column !important;
    }
}

/* ── ENSURE IMAGES IN CARDS DON'T OVERFLOW ── */
.res-card img, .res-card-v2 img { max-width: 100%; height: auto; }

/* ── ADMIN FINANCIALS: stat cards 2-col on mobile ── */
@media (max-width: 600px) {
    .admin-financials-stats { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 400px) {
    .admin-financials-stats { grid-template-columns: 1fr !important; }
}

/* ── QUICK STATUS ROW: single col on mobile ── */
@media (max-width: 600px) {
    .quick-status-row { grid-template-columns: 1fr !important; }
}

/* ── STUDENT DASHBOARD: cards grid responsive ── */
@media (min-width: 481px) and (max-width: 768px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
    .cards-grid { grid-template-columns: 1fr !important; }
}

/* ── PREVENT LONG WORDS FROM BREAKING LAYOUT ── */
.res-title, .res-title-v2, .admin-topbar h1, .stat-card .stat-value {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ── MOBILE BOTTOM NAV: ensure it doesn't cover content ── */
@media (max-width: 768px) {
    .dashboard-container { padding-bottom: 5rem; }
    .site-footer, .footer-v2 { padding-bottom: 5rem !important; }
}

/* ── NOTIF DROPDOWN: mobile full-width fix ── */
@media (max-width: 768px) {
    .notif-dropdown {
        position: fixed !important;
        top: 75px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 92% !important;
        max-width: 400px !important;
        right: auto !important;
        z-index: 9999;
    }
}

/* ── TWO-COL-GRID: responsive ── */
@media (max-width: 768px) {
    .two-col-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ── WALLET FORM: stack on mobile ── */
@media (max-width: 600px) {
    .wallet-form {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    .wallet-form > * { width: 100% !important; }
    .wallet-form button { height: auto !important; padding: 0.75rem !important; }
}



/* =====================================================
   CONTAINED MATERIAL LISTS (desktop only)
   Long lists of materials scroll inside their own section on wide
   screens instead of stretching the page; headings, filters and
   table header rows stay in view. Tablets and phones keep the
   natural page flow (no height cap, no nested scrolling).
   Usage: add .materials-scroll to the list container, plus
   --cards for card grids or --table for a wrapper around a <table>.
   Pages can tune --materials-scroll-max / --materials-scroll-pad.
   ===================================================== */
@media (min-width: 1025px) and (min-height: 600px) {
    .materials-scroll {
        max-height: var(--materials-scroll-max, min(72vh, 900px));
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior-y: contain;
        scrollbar-width: thin;
        scrollbar-color: rgba(1, 76, 204, 0.28) transparent;
    }
    .materials-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
    .materials-scroll::-webkit-scrollbar-track { background: transparent; }
    .materials-scroll::-webkit-scrollbar-thumb {
        background-color: rgba(1, 76, 204, 0.22);
        border-radius: 8px;
        border: 2px solid transparent;
        background-clip: padding-box;
    }
    .materials-scroll::-webkit-scrollbar-thumb:hover { background-color: rgba(1, 76, 204, 0.4); }

    /* Card grids: leave room for hover lift and shadows, which the
       scroll container would otherwise clip; let cards shrink. */
    .materials-scroll--cards {
        padding: var(--materials-scroll-pad, 6px);
        margin: calc(-1 * var(--materials-scroll-pad, 6px));
    }
    .materials-scroll--cards > * { min-width: 0; }

    /* Tables: keep horizontal scroll for wide tables; pin the header row. */
    .materials-scroll--table { overflow-x: auto; }
    .materials-scroll--table thead th {
        position: sticky;
        top: 0;
        z-index: 1;
        /* Bootstrap tables keep their own header colour; others use the admin grey. */
        background-color: var(--materials-scroll-head-bg, var(--bs-table-bg, #f8fafc));
    }
}
/* A larger brand mark with less empty canvas around the visible logo. */
.admin-sidebar > .sidebar-logo {
    box-sizing: border-box;
    height: var(--sidebar-logo-height);
    padding: 0 var(--space-6);
    margin-bottom: 0;
    flex-shrink: 0;
}
.admin-sidebar .sidebar-logo .sidebar-brand-image {
    width: var(--sidebar-logo-image-width);
    height: var(--sidebar-logo-image-height);
    max-width: 100%;
    object-fit: cover;
    object-position: center;
}

/* Keep the page area for content; sidebar and browser title identify the section. */
.admin-main > .admin-actions-only {
    position: static;
    justify-content: flex-end;
    padding: var(--space-3) 0 !important;
    margin: 0 0 var(--space-4);
    background: transparent;
    border: 0;
    backdrop-filter: none;
}
.admin-main > .admin-actions-only > div { display: flex !important; justify-content: flex-end; }
