@import url('/includes/platform_animations.php');

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --background: #f6f7fb;
    --surface: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --sidebar-width: 270px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: Tahoma, Arial, sans-serif;
    color: var(--text);
}

.brand-name {
    font-weight: 800;
}

.auth-card {
    max-width: 560px;
    margin: 0 auto;
}

/* Admin layout */

.admin-body {
    margin: 0;
    background: var(--background);
}

.admin-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1050;
    width: var(--sidebar-width);
    height: 100vh;
    padding: 22px 16px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px 24px;
}

.sidebar-brand strong {
    display: block;
    font-size: 17px;
}

.sidebar-brand small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: var(--text);
    color: #fff;
    font-weight: 800;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-left: 4px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.sidebar-link,
.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: #4b5563;
    text-decoration: none;
    transition: 0.2s ease;
}

.sidebar-link i,
.sidebar-logout i {
    width: 22px;
    font-size: 18px;
}

.sidebar-link:hover {
    background: #f3f4f6;
    color: var(--text);
}

.sidebar-link.active {
    background: #eff6ff;
    color: var(--primary);
    font-weight: 700;
}

.disabled-link {
    opacity: 0.48;
    pointer-events: none;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.sidebar-logout:hover {
    background: #fef2f2;
    color: #dc2626;
}

.admin-main {
    min-height: 100vh;
    margin-right: var(--sidebar-width);
}

.admin-topbar {
    min-height: 76px;
    padding: 14px 30px;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
}

.admin-content {
    padding: 30px;
}

.page-heading h1 {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 800;
}

.page-heading p {
    margin: 0;
    color: var(--muted);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 11px;
}

.admin-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #111827;
    color: #fff;
    font-weight: 800;
}

.admin-user-name {
    display: block;
    max-width: 180px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-user-role {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.sidebar-toggle {
    display: none;
}

.stat-card {
    height: 100%;
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
}

.stat-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #eff6ff;
    color: var(--primary);
    font-size: 20px;
}

.stat-label {
    color: var(--muted);
    font-size: 14px;
}

.stat-number {
    margin-top: 20px;
    margin-bottom: 0;
    font-size: 34px;
    font-weight: 800;
}

.content-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
}

.content-card-header {
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-card-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
}

.quick-action {
    height: 100%;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: 0.2s ease;
}

.quick-action:hover {
    transform: translateY(-2px);
    border-color: #bfdbfe;
    color: var(--primary);
}

.quick-action-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: #f3f4f6;
    font-size: 20px;
}

@media (max-width: 991px) {
    .admin-sidebar {
        transform: translateX(100%);
        box-shadow: -15px 0 40px rgba(17, 24, 39, 0.12);
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-main {
        margin-right: 0;
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .admin-content {
        padding: 22px 16px;
    }

    .admin-topbar {
        padding: 14px 16px;
    }

    .admin-user-text {
        display: none;
    }
}
/* ===== Academy 911 UI Refresh: Materio-inspired, custom implementation ===== */
:root{
  --primary:#6c5ce7;--primary-dark:#5946d2;--primary-soft:#f0edff;
  --secondary:#00b894;--danger:#e74c3c;--warning:#f5a623;
  --background:#f7f7fb;--surface:#fff;--text:#2d3436;--muted:#7f8c8d;
  --border:#ececf4;--shadow:0 10px 30px rgba(31,35,48,.07);--radius:18px;
}
html{scroll-behavior:smooth} body{background:var(--background);font-family:'Cairo',Tahoma,Arial,sans-serif;color:var(--text)}
.btn{border-radius:12px;font-weight:700;padding:.65rem 1.05rem}.btn-primary{background:var(--primary);border-color:var(--primary)}.btn-primary:hover{background:var(--primary-dark);border-color:var(--primary-dark)}
.btn-outline-primary{color:var(--primary);border-color:#cfc9ff}.btn-outline-primary:hover{background:var(--primary-soft);color:var(--primary-dark);border-color:#bdb5ff}
.card,.content-card,.stat-card{border:1px solid var(--border)!important;border-radius:var(--radius)!important;box-shadow:var(--shadow)!important;background:#fff}
.table{--bs-table-bg:transparent}.table thead th{font-size:.82rem;color:#6f7383;font-weight:800;background:#fafafd!important;border-bottom:1px solid var(--border)}.table td,.table th{padding:.95rem 1rem;vertical-align:middle}
.form-control,.form-select{border-radius:12px;border-color:#e3e4ec;padding:.72rem .9rem}.form-control:focus,.form-select:focus{border-color:#b9b0ff;box-shadow:0 0 0 .22rem rgba(108,92,231,.12)}
.alert{border-radius:14px;border:0}.badge{border-radius:999px;padding:.45em .7em}.text-primary{color:var(--primary)!important}

/* Admin */
.admin-body{background:#f6f5fb}.admin-sidebar{background:#fff;border-left:0;box-shadow:-8px 0 28px rgba(36,38,53,.04);padding:20px 14px}.brand-icon{background:linear-gradient(135deg,var(--primary),#8f7ff7);box-shadow:0 8px 18px rgba(108,92,231,.25)}
.sidebar-link,.sidebar-logout{border-radius:12px;padding:11px 13px}.sidebar-link:hover{background:#f7f5ff;color:var(--primary)}.sidebar-link.active{background:linear-gradient(90deg,#f0edff,#f8f7ff);color:var(--primary);box-shadow:inset -3px 0 0 var(--primary)}
.admin-topbar{background:rgba(247,247,251,.88);border-bottom:0;padding:18px 30px}.admin-avatar{background:linear-gradient(135deg,var(--primary),#8f7ff7)}.admin-content{padding:30px 32px}.page-heading h1{font-size:26px}.stat-card{padding:22px}.stat-icon{background:var(--primary-soft);color:var(--primary)}

/* Teacher shell */
.teacher-body{background:#f6f5fb}.teacher-navbar{background:#fff!important;border-bottom:1px solid var(--border);box-shadow:0 6px 22px rgba(31,35,48,.04)}
.teacher-navbar .navbar-brand{color:var(--text)!important;font-weight:900}.teacher-shell{min-height:calc(100vh - 64px)}.teacher-sidebar{background:#fff;border-left:1px solid var(--border);padding:22px 14px!important}.teacher-sidebar h5{font-size:.8rem;color:#a0a3ad;padding:0 12px;text-transform:uppercase}.teacher-sidebar a{display:flex!important;align-items:center;gap:10px;color:#555b68;text-decoration:none;padding:11px 13px;margin-bottom:5px!important;border-radius:11px;font-weight:700}.teacher-sidebar a:hover{background:#f4f1ff;color:var(--primary)}.teacher-main{padding:30px!important}

/* Student */
.student-nav{background:#fff;border-bottom:1px solid var(--border);box-shadow:0 6px 22px rgba(31,35,48,.04)}.student-nav .navbar-brand{color:var(--primary)!important;font-weight:900}.student-hero{background:linear-gradient(135deg,#6c5ce7,#8f7ff7);border-radius:24px;padding:34px;color:#fff;box-shadow:0 18px 40px rgba(108,92,231,.22)}.student-quick{display:flex;align-items:center;gap:14px;padding:18px;background:#fff;border:1px solid var(--border);border-radius:16px;text-decoration:none;color:var(--text);box-shadow:var(--shadow);height:100%}.student-quick i{width:44px;height:44px;border-radius:13px;display:grid;place-items:center;background:var(--primary-soft);color:var(--primary);font-size:20px}.student-quick:hover{transform:translateY(-2px);color:var(--primary)}
.student-account-actions{display:inline-flex!important;align-items:center!important;gap:10px!important;flex:0 0 auto!important;flex-wrap:nowrap!important}.student-account-actions .account-menu-actions,.student-account-actions .account-dropdown-wrap,.student-account-actions .notification-dropdown-wrap{display:inline-flex!important;align-items:center!important;flex:0 0 auto!important;margin:0!important}.student-account-actions .notification-bell-btn{margin:0!important;color:var(--primary)!important}.student-account-actions .notification-bell-btn i{color:var(--primary)!important}
.text-bg-primary{background-color:var(--primary)!important}.progress-bar{background-color:var(--primary)!important}.student-stat-link{display:block;text-decoration:none;color:var(--text);transition:transform .2s ease,box-shadow .2s ease;min-height:170px}.student-stat-link:hover{transform:translateY(-4px);color:var(--text);box-shadow:0 15px 38px rgba(31,35,48,.11)!important}.student-stat-action{display:flex;align-items:center;gap:6px;color:var(--primary);font-size:.78rem;font-weight:800;margin-top:10px}.student-stat-action i{transition:transform .2s ease}.student-stat-link:hover .student-stat-action i{transform:translateX(-4px)}.course-progress .progress{background:#ece9ff}.student-hero .btn-light{color:#342d79;border:0;box-shadow:0 8px 20px rgba(49,38,132,.15)}
@media(max-width:767.98px){.student-hero{padding:25px 20px;border-radius:20px}.student-hero .btn{width:100%}.student-stat-link{min-height:145px;padding:18px}.student-quick{padding:15px}.container.py-5{padding-top:1.5rem!important;padding-bottom:2rem!important}.card-body.p-4,.card-body.p-lg-5{padding:1.25rem!important}}

/* Student experience — clean Academy 911 visual system */
.student-dashboard-page,.student-courses-page>.container,.student-course-page>.container,.student-lesson-page>.container{max-width:1320px}
.student-dashboard-page .student-hero{position:relative;overflow:hidden;padding:40px 44px;background:linear-gradient(125deg,#5b49da 0%,#735fe9 52%,#9182f5 100%)}
.student-dashboard-page .student-hero:before,.student-dashboard-page .student-hero:after{content:"";position:absolute;border-radius:50%;border:38px solid rgba(255,255,255,.07);pointer-events:none}
.student-dashboard-page .student-hero:before{width:230px;height:230px;left:-65px;top:-105px}.student-dashboard-page .student-hero:after{width:150px;height:150px;left:24%;bottom:-115px}
.student-dashboard-page .student-hero>*{position:relative;z-index:1}
.student-dashboard-page .stat-card{padding:22px 24px;border-color:#ebe9f5!important;background:linear-gradient(180deg,#fff,#fefeff)}
.student-dashboard-page .stat-number{font-size:2.05rem;font-weight:900;margin:22px 0 2px;color:#20222d}
.student-dashboard-page .student-quick{min-height:92px;border-radius:20px;transition:.22s ease}
.student-dashboard-page .student-quick:hover{border-color:#d8d2ff;box-shadow:0 15px 36px rgba(57,47,126,.1);transform:translateY(-3px)}

.student-courses-page,.student-course-page,.student-lesson-page{background:linear-gradient(180deg,#f8f8fc 0,#f5f5fa 100%)}
.student-courses-page .student-course-card{overflow:hidden;border-radius:24px!important;transition:transform .22s ease,box-shadow .22s ease}
.student-courses-page .student-course-card:hover{transform:translateY(-5px);box-shadow:0 18px 45px rgba(35,35,54,.11)!important}
.student-courses-page .student-course-cover{width:100%;height:220px!important;object-fit:cover;display:block}
.student-courses-page .student-course-cover-placeholder{position:relative;background:linear-gradient(135deg,#5946d2,#8b79f4)!important}
.student-courses-page .student-course-cover-placeholder:before{content:"";position:absolute;width:170px;height:170px;border:30px solid rgba(255,255,255,.09);border-radius:50%;left:-42px;top:-60px}
.student-courses-page .student-course-cover-placeholder i{position:relative;z-index:1}
.student-courses-page .card-body{display:flex;flex-direction:column}.student-courses-page .card-footer{margin-top:auto}
.student-courses-page #activate-course{border-radius:22px!important;background:linear-gradient(135deg,#fff,#fbfaff)}
.student-courses-page #activate-course .bi-ticket-perforated{color:var(--primary)}
.student-courses-page .progress{height:8px;border-radius:999px;overflow:hidden}
.student-courses-page .btn-primary{box-shadow:0 8px 20px rgba(108,92,231,.2)}

.student-course-page .student-course-hero-card{border-radius:26px!important}
.student-course-page .student-course-hero-card img{aspect-ratio:16/10;min-height:100%!important}
.student-course-page .course-sections .accordion-item{border-radius:20px!important;border:1px solid #ebeaf3!important;box-shadow:0 8px 25px rgba(31,35,48,.045)!important}
.student-course-page .course-sections .accordion-button{min-height:92px}
.student-course-page .course-sections .lesson-row{padding:22px 24px!important}
.student-course-page .course-sections .lesson-row:hover{background:#faf9ff}
.student-course-page .course-sections .lesson-number{background:#f0edff;color:#6655df}
.student-course-page .course-sections .btn-primary{min-width:145px}

.student-lesson-page .lesson-page{max-width:1400px}
.student-lesson-page .lesson-main-card{overflow:hidden}
.student-lesson-page .lesson-main-card>.card-body{padding:30px!important}
.student-lesson-page .lesson-main-card .ratio{border-radius:18px!important;background:#11111a!important}
.student-lesson-page .lesson-side-card{border:1px solid #eae8f2!important;box-shadow:0 12px 35px rgba(31,35,48,.07)!important}
.student-lesson-page .lesson-course-link{border:1px solid transparent;margin-bottom:4px}
.student-lesson-page .lesson-course-link.active{border-color:#dcd6ff}
.student-lesson-page .lesson-navigation .btn{min-width:150px}

@media(max-width:991.98px){.student-dashboard-page .student-hero{padding:32px 28px}.student-courses-page .student-course-cover{height:auto!important;aspect-ratio:16/9}.student-course-page .student-course-hero-card img{aspect-ratio:16/9;min-height:0!important}.student-course-page .student-course-hero-card .card-body{padding:28px!important}}
@media(max-width:575.98px){.student-dashboard-page,.student-courses-page>.container,.student-course-page>.container,.student-lesson-page>.container{padding-left:14px!important;padding-right:14px!important}.student-dashboard-page .student-hero{padding:25px 20px}.student-dashboard-page .student-hero h1{font-size:1.65rem}.student-dashboard-page .stat-card{min-height:132px;padding:17px 18px}.student-dashboard-page .stat-number{font-size:1.7rem;margin-top:14px}.student-courses-page .student-course-card{border-radius:20px!important}.student-courses-page #activate-course .card-body{padding:18px!important}.student-course-page .course-sections .accordion-button{padding:18px!important}.student-course-page .course-sections .lesson-row{padding:18px!important}.student-course-page .course-sections .lesson-row>div>div:first-child{align-items:flex-start!important}.student-course-page .course-sections .btn{width:100%;margin-top:4px}.student-lesson-page .lesson-main-card>.card-body{padding:18px!important}}

/* Public/auth */
.public-shell{min-height:100vh}.auth-card{border-radius:22px!important;box-shadow:0 18px 45px rgba(31,35,48,.08)!important}.navbar.public-nav{background:#fff!important;border-bottom:1px solid var(--border)}

@media(max-width:991px){.admin-content,.teacher-main{padding:20px!important}.teacher-sidebar{min-height:auto!important;border-left:0;border-bottom:1px solid var(--border)}.teacher-shell .row{display:block}.teacher-sidebar{width:100%}.teacher-main{width:100%}}

/* Academy 911 - refreshed teacher workspace */
.teacher-body{background:#f6f7fb;font-family:'Cairo',Tahoma,Arial,sans-serif;margin:0;min-height:100vh;color:#171926}.teacher-topbar{position:fixed;top:0;right:0;left:0;height:78px;background:rgba(255,255,255,.96);border-bottom:1px solid #e9eaf1;z-index:1045;backdrop-filter:blur(12px)}.teacher-topbar-inner{height:100%;display:flex;align-items:center;padding:0 26px;gap:18px}.teacher-brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:#171926;font-weight:900;font-size:1.15rem}.teacher-brand-icon{width:40px;height:40px;border-radius:12px;background:#6c5ce7;color:#fff;display:grid;place-items:center}.teacher-account-btn{display:flex;align-items:center;gap:10px;border:1px solid #e7e7ef;background:#fff;border-radius:15px;padding:7px 10px;color:#171926}.teacher-account-avatar{width:38px;height:38px;border-radius:12px;background:#f0edff;color:#6c5ce7;display:grid;place-items:center;font-size:1.1rem}.teacher-account-btn strong{display:block;font-size:.86rem}.teacher-account-btn small{display:block;color:#8a8e9c;font-size:.7rem}.teacher-account-menu{min-width:230px;border:1px solid #ececf4;border-radius:16px;padding:8px;box-shadow:0 18px 50px rgba(35,38,55,.14)}.teacher-account-menu .dropdown-item{padding:10px 12px;border-radius:10px;display:flex;gap:10px;align-items:center}.teacher-sidebar-new{position:fixed;right:0;top:78px;bottom:0;width:255px;background:#fff;border-left:1px solid #e9eaf1;padding:24px 16px 18px;flex-direction:column;z-index:1035}.teacher-side-title{color:#a0a4b1;font-size:.75rem;font-weight:700;padding:0 12px 12px}.teacher-side-nav{display:flex;flex-direction:column;gap:6px}.teacher-side-nav a{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:12px;text-decoration:none;color:#616675;font-weight:700;transition:.2s}.teacher-side-nav a i{font-size:1.15rem;width:23px}.teacher-side-nav a:hover{background:#f7f6ff;color:#6c5ce7}.teacher-side-nav a.active{background:#6c5ce7;color:#fff;box-shadow:0 8px 20px rgba(108,92,231,.22)}.teacher-side-logout{margin-top:auto;text-decoration:none;color:#dc3545;background:#fff5f5;border-radius:12px;padding:12px 14px;display:flex;align-items:center;gap:12px;font-weight:700}.teacher-main-new{margin-right:255px;padding:110px 30px 38px;min-height:100vh}.teacher-welcome{min-height:205px;border-radius:26px;background:linear-gradient(135deg,#6c5ce7,#8275ee);padding:38px 42px;color:#fff;display:flex;align-items:center;justify-content:space-between;gap:24px;box-shadow:0 18px 45px rgba(108,92,231,.18);overflow:hidden;position:relative}.teacher-welcome:after{content:"";position:absolute;width:270px;height:270px;border-radius:50%;border:55px solid rgba(255,255,255,.08);left:-80px;top:-100px}.teacher-welcome>*{position:relative;z-index:1}.teacher-welcome-badge{display:inline-block;background:#fff;color:#6c5ce7;border-radius:999px;padding:6px 12px;font-size:.76rem;font-weight:800;margin-bottom:15px}.teacher-welcome h1{font-size:clamp(1.8rem,3vw,2.5rem);font-weight:900;margin:0 0 10px}.teacher-welcome p{margin:0;color:rgba(255,255,255,.76)}.teacher-welcome-action{font-weight:800;border-radius:12px;padding:11px 18px}.teacher-stat-card{height:100%;min-height:128px;background:#fff;border:1px solid #ebeaf1;border-radius:20px;padding:20px;text-decoration:none;color:#171926;display:flex;align-items:center;gap:15px;box-shadow:0 7px 26px rgba(30,34,48,.04);transition:.2s}.teacher-stat-card:hover{transform:translateY(-3px);box-shadow:0 12px 34px rgba(30,34,48,.08);color:#171926}.teacher-stat-icon{width:52px;height:52px;flex:0 0 52px;border-radius:16px;display:grid;place-items:center;background:#f0edff;color:#6c5ce7;font-size:1.35rem}.teacher-stat-card small{display:block;color:#8b8f9d;font-size:.78rem;margin-bottom:3px}.teacher-stat-card strong{display:block;font-size:1.75rem;font-weight:900}.teacher-stat-arrow{margin-right:auto;color:#b1b4bd}.teacher-panel{background:#fff;border:1px solid #ebeaf1;border-radius:22px;padding:25px;box-shadow:0 7px 26px rgba(30,34,48,.04)}.teacher-panel-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.teacher-panel-heading span{color:#6c5ce7;font-size:.76rem;font-weight:800}.teacher-panel-heading h2{font-size:1.25rem;font-weight:900;margin:4px 0 0}.teacher-panel-heading>i{font-size:1.35rem;color:#6c5ce7;background:#f0edff;width:45px;height:45px;border-radius:14px;display:grid;place-items:center}.teacher-quick-card{display:flex;align-items:center;gap:12px;padding:16px;border:1px solid #ececf4;border-radius:16px;text-decoration:none;color:#171926;height:100%;transition:.2s}.teacher-quick-card:hover{border-color:#d8d3ff;background:#faf9ff;color:#171926}.teacher-quick-card>span{width:43px;height:43px;border-radius:13px;background:#f0edff;color:#6c5ce7;display:grid;place-items:center;font-size:1.08rem}.teacher-quick-card div{min-width:0}.teacher-quick-card strong{display:block;font-size:.92rem}.teacher-quick-card small{display:block;color:#9397a4;font-size:.72rem;margin-top:3px}.teacher-quick-card>i{margin-right:auto;color:#b2b5bf}.teacher-mobile-toggle{display:none;border:0;background:#f0edff;color:#6c5ce7;width:42px;height:42px;border-radius:12px;font-size:1.35rem}.teacher-mobile-sidebar{width:280px!important}.teacher-mobile-sidebar .teacher-side-nav a.active{background:#6c5ce7;color:#fff}@media(max-width:991.98px){.teacher-mobile-toggle{display:grid;place-items:center}.teacher-main-new{margin-right:0;padding:100px 18px 30px}.teacher-welcome{padding:30px 25px;min-height:190px}.teacher-topbar-inner{padding:0 16px}}@media(max-width:575.98px){.teacher-brand span:last-child{display:none}.teacher-welcome{align-items:flex-start;flex-direction:column}.teacher-welcome-action{width:100%}.teacher-main-new{padding-left:12px;padding-right:12px}.teacher-stat-card{padding:16px;min-height:112px}.teacher-stat-icon{width:44px;height:44px;flex-basis:44px}.teacher-stat-card strong{font-size:1.45rem}.teacher-stat-arrow{display:none}.teacher-panel{padding:18px}}

.teacher-layout-compat,.teacher-content-compat{display:contents}

.account-trigger{border:1px solid #e7e7ef;background:#fff;border-radius:999px;padding:6px 8px 6px 12px;display:flex;align-items:center;gap:9px;box-shadow:0 5px 18px rgba(44,48,66,.07);color:#171926}.account-trigger:hover,.account-trigger:focus{background:#f8f7ff;color:#171926;border-color:#dcd8ff}.account-avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#6c5ce7;color:#fff;font-size:1.05rem}.account-chevron{width:27px;height:27px;border-radius:50%;display:grid;place-items:center;background:#f2f1f8;color:#565b69;font-size:.8rem}.account-menu{min-width:245px;border:1px solid #ececf4;border-radius:18px;padding:9px;box-shadow:0 18px 48px rgba(29,32,48,.14);margin-top:10px!important}.account-menu .dropdown-item{border-radius:12px;padding:11px 12px;font-weight:600;display:flex;align-items:center;gap:10px}.account-menu .dropdown-item i{width:22px;text-align:center;color:#6c5ce7}.account-menu .dropdown-item:hover{background:#f5f3ff}.account-menu .logout-item,.account-menu .logout-item i{color:#dc3545}.account-menu .dropdown-divider{margin:6px 4px;border-color:#efeff4}@media(max-width:575.98px){.account-name{display:none}.account-menu{min-width:220px}}

/* Academy 911 unified account dropdown */
.account-dropdown-wrap{position:relative}.account-trigger{appearance:none!important;-webkit-appearance:none!important;border:1px solid #e4e2f3!important;background:#fff!important;border-radius:999px!important;padding:6px 8px 6px 12px!important;display:flex!important;align-items:center!important;gap:9px!important;box-shadow:0 7px 22px rgba(44,48,66,.08)!important;color:#171926!important;min-height:auto!important;font-family:'Cairo',sans-serif!important}.account-trigger::after{display:none!important}.account-trigger:hover,.account-trigger:focus,.account-trigger.show{background:#faf9ff!important;color:#171926!important;border-color:#d8d3ff!important;box-shadow:0 8px 26px rgba(108,92,231,.13)!important}.account-avatar{width:38px!important;height:38px!important;flex:0 0 38px!important;border-radius:50%!important;display:grid!important;place-items:center!important;background:#6c5ce7!important;color:#fff!important;font-size:1.05rem!important}.account-name{white-space:nowrap!important}.account-chevron{width:28px!important;height:28px!important;flex:0 0 28px!important;border-radius:50%!important;display:grid!important;place-items:center!important;background:#f2f1f8!important;color:#666b78!important;font-size:.78rem!important}.account-menu{min-width:250px!important;border:1px solid #ececf4!important;border-radius:20px!important;padding:10px!important;box-shadow:0 20px 55px rgba(29,32,48,.15)!important;margin-top:10px!important;background:#fff!important}.account-menu .dropdown-item{border-radius:13px!important;padding:11px 13px!important;font-weight:600!important;display:flex!important;align-items:center!important;gap:10px!important;color:#252735!important;line-height:1.5!important}.account-menu .dropdown-item i{width:22px!important;text-align:center!important;color:#6c5ce7!important;font-size:1rem!important}.account-menu .dropdown-item:hover,.account-menu .dropdown-item:focus{background:#f5f3ff!important;color:#332f75!important}.account-menu .logout-item,.account-menu .logout-item i{color:#ef4444!important}.account-menu .dropdown-divider{margin:7px 5px!important;border-color:#efeff4!important}.profile-back-btn{display:inline-flex!important;align-items:center!important;gap:8px!important;border:1px solid #e5e4ee!important;background:#fff!important;color:#303341!important;border-radius:14px!important;padding:10px 15px!important;font-weight:700!important;text-decoration:none!important;box-shadow:0 5px 18px rgba(31,35,48,.05)!important}.profile-back-btn:hover{background:#f8f7ff!important;border-color:#d9d5ff!important;color:#5e50d6!important;transform:translateY(-1px)!important}.profile-nav-actions{display:flex!important;align-items:center!important;gap:12px!important}@media(max-width:575.98px){.account-name{display:none!important}.account-menu{min-width:225px!important}.profile-nav-actions{gap:8px!important}.profile-back-btn{padding:9px 11px!important}.profile-back-btn .back-label{display:none!important}}


/* fixed notification bell */
.notification-bell-btn{
    background:transparent !important;
    border:none !important;
    outline:none !important;
    box-shadow:none !important;
    color:#2563eb;
    width:42px;
    height:42px;
    padding:0;
    margin:0 10px;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    border-radius:50%;
}

.notification-bell-btn:hover{
    background:#f1f5ff !important;
}

.notification-bell-btn i{
    font-size:26px;
    color:#2563eb;
}


/* keep notification beside account in all headers */
.account-menu-actions{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:10px!important;
    height:auto!important;
}
.account-menu-actions .notification-bell-btn{
    margin:0!important;
    position:relative!important;
}

.account-menu-actions,
.account-dropdown-wrap {
    display: flex;
    align-items: center;
}

.notification-bell-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Notification dropdown: keep Arabic messages readable without changing the header. */
.notification-dropdown-wrap{position:relative!important}
.notification-menu{
    width:min(300px,calc(100vw - 20px))!important;
    min-width:min(300px,calc(100vw - 20px))!important;
    max-height:340px!important;
    overflow-y:auto!important;
    padding:5px 0!important;
    border:1px solid #e5e7ef!important;
    border-radius:12px!important;
    box-shadow:0 10px 28px rgba(30,41,59,.12)!important;
    direction:rtl!important;
    text-align:right!important;
}
.notification-menu .dropdown-header{padding:7px 13px!important;color:#8a91a1!important;font-size:.88rem!important}
.notification-item{
    display:block!important;
    width:100%!important;
    padding:9px 13px!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    line-height:1.65!important;
    color:#252735!important;
    border-top:1px solid #f0f1f5!important;
}
.notification-item:first-of-type{border-top:0!important}
.notification-item strong{display:block!important;margin-bottom:2px!important;font-size:.94rem!important;line-height:1.4!important;color:#171926!important}
.notification-item div{font-size:.87rem!important;color:#4f5564!important}
.notification-menu .text-center.p-3{padding:.8rem!important;font-size:.9rem!important}

/* Wallet header: keep the bell and account control as one compact group. */
.student-nav .wallet-account-menu{display:inline-flex!important;align-items:center!important;justify-content:flex-start!important;flex:0 0 auto!important;width:auto!important;max-width:max-content!important;gap:10px!important;margin:0!important}
.student-nav .wallet-account-menu .account-menu-actions,.student-nav .wallet-account-menu .account-dropdown-wrap{display:inline-flex!important;align-items:center!important;flex:0 0 auto!important;width:auto!important;max-width:none!important;margin:0!important}
.student-nav .wallet-account-menu .notification-dropdown-wrap{display:inline-flex!important;position:relative!important;flex:0 0 auto!important;width:auto!important;margin:0!important}

/* Account menu inspired by the reference, using Academy 911 purple identity. */
.account-menu{
    min-width:255px!important;
    padding:8px!important;
    overflow:hidden!important;
    border:1px solid #ded9ff!important;
    border-top:4px solid #6c5ce7!important;
    border-radius:6px 6px 18px 18px!important;
    background:#fff!important;
    box-shadow:0 20px 55px rgba(60,47,130,.18)!important;
}
.account-menu>li{width:100%!important}
.account-menu .dropdown-item{
    width:100%!important;
    min-height:43px!important;
    padding:10px 13px!important;
    border-radius:9px!important;
    color:#29263a!important;
    transition:background-color .22s ease,color .22s ease,box-shadow .22s ease!important;
}
.account-menu .dropdown-item i{
    color:#6c5ce7!important;
    font-size:1.08rem!important;
}
.account-menu .dropdown-item:hover,
.account-menu .dropdown-item:focus{
    background:#6c5ce7!important;
    color:#fff!important;
    box-shadow:0 7px 18px rgba(108,92,231,.25)!important;
}
.account-menu .dropdown-item:hover i,
.account-menu .dropdown-item:focus i{color:#fff!important}
.account-menu .dropdown-divider{margin:6px 3px!important;border-color:#ebe9f7!important}
.account-menu .logout-item{color:#e5484d!important}
.account-menu .logout-item i{color:#e5484d!important}
.account-menu .logout-item:hover,
.account-menu .logout-item:focus{background:#e5484d!important;color:#fff!important;box-shadow:0 7px 18px rgba(229,72,77,.22)!important}
.account-menu .logout-item:hover i,
.account-menu .logout-item:focus i{color:#fff!important}
.account-avatar img{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:cover!important;border-radius:inherit!important;display:block!important}

html,body{max-width:100%;overflow-x:hidden}
@media(max-width:767.98px){
    .home-nav .container{flex-wrap:nowrap;gap:8px}
    .home-logo{font-size:1rem!important;white-space:nowrap}
    .home-hero{padding:38px 0!important}
    .home-hero .row{--bs-gutter-x:1rem;--bs-gutter-y:2rem}
    .home-hero h1{font-size:clamp(1.85rem,9vw,2.55rem)!important}
    .hero-copy{font-size:.98rem!important;line-height:1.85!important}
    .product-shot{padding:10px!important;border-radius:20px!important;transform:none!important}
    .product-shot .screen{padding:12px!important}
    .product-shot .mini-side,.product-shot .metric{padding:12px!important}
    .home-section{padding:48px 0!important}
    .feature{padding:22px!important}
    .home-footer,.home-footer .container{width:100%!important;max-width:100%!important}
}

/* Mobile dropdowns: always open fully inside the viewport. */
@media(max-width:575.98px){
    .account-menu.show,
    .notification-menu.show{
        position:fixed!important;
        top:76px!important;
        left:12px!important;
        right:auto!important;
        bottom:auto!important;
        transform:none!important;
        width:calc(100vw - 24px)!important;
        min-width:0!important;
        max-width:340px!important;
        max-height:calc(100vh - 92px)!important;
        overflow-x:hidden!important;
        overflow-y:auto!important;
        margin:0!important;
        z-index:1080!important;
    }
    .notification-menu.show{padding-top:8px!important}
    .account-menu .dropdown-item{white-space:normal!important}
}

/* Dark mode contrast fixes: account menu, home steps/CTA and public profile. */
html[data-academy-theme="dark"] .account-menu{background:#1b1f29!important;border-color:#393450!important;border-top-color:#8071ff!important;box-shadow:0 20px 55px rgba(0,0,0,.38)!important}
html[data-academy-theme="dark"] .account-menu .dropdown-item{color:#f4f5f8!important}
html[data-academy-theme="dark"] .account-menu .dropdown-item i{color:#988cff!important}
html[data-academy-theme="dark"] .account-menu .dropdown-item:hover,
html[data-academy-theme="dark"] .account-menu .dropdown-item:focus{background:#6c5ce7!important;color:#fff!important}
html[data-academy-theme="dark"] .account-menu .dropdown-item:hover i,
html[data-academy-theme="dark"] .account-menu .dropdown-item:focus i{color:#fff!important}
html[data-academy-theme="dark"] .account-menu .dropdown-divider{border-color:#3b404d!important}
html[data-academy-theme="dark"] .account-menu .logout-item,
html[data-academy-theme="dark"] .account-menu .logout-item i{color:#ff656d!important}

html[data-academy-theme="dark"] .platform-step{filter:none!important;background:linear-gradient(145deg,#252a36,#20242f)!important;border-color:#393f4e!important;box-shadow:0 16px 42px rgba(0,0,0,.24)!important}
html[data-academy-theme="dark"] .platform-step-number,
html[data-academy-theme="dark"] .platform-step-copy,
html[data-academy-theme="dark"] .platform-step-copy h3{color:#fff!important}
html[data-academy-theme="dark"] .platform-step-copy p{color:#c8ccd6!important}
html[data-academy-theme="dark"] .platform-step-art{background:#303644!important;box-shadow:inset 0 0 0 1px #444b5c!important}
html[data-academy-theme="dark"] .home-cta h2{color:#fff!important}
html[data-academy-theme="dark"] .home-cta p{color:#eeeaff!important;opacity:1!important}

html[data-academy-theme="dark"] .profile-card{background:#1b1f29!important;border-color:#343a48!important;color:#f5f6fa!important}
html[data-academy-theme="dark"] .profile-body,
html[data-academy-theme="dark"] .profile-body h1,
html[data-academy-theme="dark"] .profile-body h2,
html[data-academy-theme="dark"] .profile-body h3,
html[data-academy-theme="dark"] .profile-body strong{color:#f7f8fb!important}
html[data-academy-theme="dark"] .profile-body .text-muted{color:#b8bdca!important}
html[data-academy-theme="dark"] .info-card,
html[data-academy-theme="dark"] .bio-box,
html[data-academy-theme="dark"] .course-card{background:#232833!important;border-color:#383e4c!important;color:#f5f6fa!important}
html[data-academy-theme="dark"] .avatar,
html[data-academy-theme="dark"] .avatar-placeholder{border-color:#1b1f29!important}

html[data-academy-theme="dark"] .wallet-page-card{background:#1b1f29!important;border:1px solid #343a48!important;color:#f5f6fa!important}
html[data-academy-theme="dark"] .wallet-page-card h2,
html[data-academy-theme="dark"] .wallet-page-card h5{color:#f7f8fb!important}
html[data-academy-theme="dark"] .wallet-balance-card{background:#252b38!important;border-color:#3b4353!important;color:#fff!important}
html[data-academy-theme="dark"] .wallet-balance-card h2,
html[data-academy-theme="dark"] .wallet-balance-card h5{color:#fff!important}
html[data-academy-theme="dark"] .wallet-page-card hr{border-color:#454b59!important;opacity:1!important}
html[data-academy-theme="dark"] .wallet-empty-state{background:#232833!important;border-color:#383e4c!important;color:#d7dae2!important}
html[data-academy-theme="dark"] .wallet-transactions .table{--bs-table-bg:#232833;--bs-table-color:#f4f5f8;--bs-table-border-color:#3d4452;color:#f4f5f8!important}

/* Wallet page redesign. */
.wallet-page{min-height:calc(100vh - 72px);background:radial-gradient(circle at 85% 5%,rgba(108,92,231,.13),transparent 28%),linear-gradient(180deg,#f8f7ff,#f5f6fb)}
.wallet-page>.container{max-width:1180px}
.wallet-hero{position:relative;overflow:hidden;display:grid;grid-template-columns:1fr minmax(320px,430px);align-items:center;gap:42px;padding:38px 42px;margin-bottom:24px;border-radius:30px;background:linear-gradient(135deg,#5e4fda 0%,#7768ef 58%,#8b7df5 100%);color:#fff;box-shadow:0 22px 55px rgba(80,67,190,.22)}
.wallet-hero:before,.wallet-hero:after{content:"";position:absolute;border-radius:50%;background:rgba(255,255,255,.08)}
.wallet-hero:before{width:260px;height:260px;right:-90px;top:-140px}.wallet-hero:after{width:190px;height:190px;left:24%;bottom:-145px}
.wallet-hero-copy,.wallet-balance-card{position:relative;z-index:1}
.wallet-eyebrow{display:inline-flex;align-items:center;gap:7px;padding:7px 12px;border-radius:999px;background:rgba(255,255,255,.14);font-size:.78rem;font-weight:800;margin-bottom:13px}
.wallet-hero h1{font-size:clamp(2rem,4vw,3rem);font-weight:900;margin:0 0 10px;color:#fff}
.wallet-hero p{max-width:520px;margin:0;color:rgba(255,255,255,.82);line-height:1.9}
.wallet-balance-card{min-height:205px;padding:24px 26px;border:1px solid rgba(255,255,255,.32)!important;border-radius:25px;background:rgba(255,255,255,.16)!important;backdrop-filter:blur(16px);color:#fff!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 18px 40px rgba(47,36,133,.2)}
.wallet-balance-icon{position:absolute;left:22px;top:22px;width:50px;height:50px;border-radius:16px;display:grid;place-items:center;background:rgba(255,255,255,.18);font-size:1.35rem}
.wallet-balance-label{font-weight:700;color:rgba(255,255,255,.78);margin-bottom:8px}
.wallet-balance-value{direction:rtl;display:flex;align-items:flex-end;gap:9px;line-height:1;margin-top:8px}
.wallet-balance-value strong{font-size:clamp(2.3rem,4vw,3.5rem);font-weight:900;color:#fff}.wallet-balance-value span{font-weight:800;padding-bottom:7px;color:rgba(255,255,255,.84)}
.wallet-balance-note{position:absolute;right:26px;bottom:22px;display:flex;align-items:center;gap:7px;font-size:.78rem;color:rgba(255,255,255,.74)}
.wallet-actions-card,.wallet-history-card{background:#fff;border:1px solid #e9e8f2;border-radius:25px;padding:26px;box-shadow:0 12px 35px rgba(35,38,55,.06)}
.wallet-actions-card{margin-bottom:24px}
.wallet-section-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:20px}.wallet-section-heading>div>span{color:#6c5ce7;font-size:.76rem;font-weight:900}.wallet-section-heading h2{font-size:1.3rem;font-weight:900;color:#202331;margin:4px 0 0}.wallet-section-heading>i{width:46px;height:46px;border-radius:15px;display:grid;place-items:center;background:#f0edff;color:#6c5ce7;font-size:1.2rem}
.wallet-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.wallet-action{border:0;border-radius:18px;padding:17px 18px;display:flex;align-items:center;gap:13px;text-align:right;color:#fff;transition:transform .2s ease,box-shadow .2s ease}.wallet-action:hover{transform:translateY(-3px)}.wallet-action-primary{background:linear-gradient(135deg,#6656df,#7a6cf0);box-shadow:0 12px 25px rgba(108,92,231,.23)}.wallet-action-whatsapp{background:linear-gradient(135deg,#138b59,#20aa6d);box-shadow:0 12px 25px rgba(20,150,94,.2)}
.wallet-action-icon{width:48px;height:48px;flex:0 0 48px;border-radius:15px;display:grid;place-items:center;background:rgba(255,255,255,.16);font-size:1.25rem}.wallet-action strong,.wallet-action small{display:block}.wallet-action strong{font-size:.94rem}.wallet-action small{font-size:.71rem;color:rgba(255,255,255,.76);margin-top:4px}.wallet-action-arrow{margin-right:auto}.wallet-disabled{border-radius:16px;padding:15px;background:#f4f4f8;color:#747887}
.wallet-history-heading{padding-bottom:18px;border-bottom:1px solid #eeedf4}.wallet-count{font-size:.78rem!important;font-weight:800!important;color:#6c5ce7!important;background:#f0edff;padding:7px 12px;border-radius:999px}.wallet-empty-state{text-align:center;padding:46px 20px!important;background:transparent!important;border:0!important}.wallet-empty-state>span{width:72px;height:72px;border-radius:23px;display:grid;place-items:center;margin:0 auto 16px;background:#f0edff;color:#6c5ce7;font-size:1.8rem}.wallet-empty-state h3{font-size:1rem;font-weight:900;color:#2b2e3b}.wallet-empty-state p{font-size:.82rem;color:#858997;margin:7px 0 0}
.wallet-transactions{border:1px solid #ecebf3;border-radius:18px;overflow:hidden}.wallet-transactions thead th{background:#f8f7fc;color:#737785;font-size:.76rem;font-weight:800;border:0;padding:14px 18px}.wallet-transactions tbody td{padding:15px 18px;border-color:#efeff4;color:#353846}.wallet-operation{display:flex;align-items:center;gap:11px}.wallet-operation>span{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:#f0edff;color:#6c5ce7}.wallet-operation strong{font-size:.85rem}.wallet-amount{font-weight:900;color:#6555df}.wallet-date{font-size:.78rem;color:#858997;white-space:nowrap}
html[data-academy-theme="dark"] .wallet-page{background:radial-gradient(circle at 85% 5%,rgba(108,92,231,.16),transparent 28%),linear-gradient(180deg,#131620,#171a24)}
html[data-academy-theme="dark"] .wallet-actions-card,html[data-academy-theme="dark"] .wallet-history-card{background:#1c202a;border-color:#333947;box-shadow:0 12px 35px rgba(0,0,0,.2)}
html[data-academy-theme="dark"] .wallet-section-heading h2{color:#f6f7fa!important}html[data-academy-theme="dark"] .wallet-section-heading>i,html[data-academy-theme="dark"] .wallet-count,html[data-academy-theme="dark"] .wallet-empty-state>span{background:#2c2944;color:#9a8fff}
html[data-academy-theme="dark"] .wallet-history-heading{border-color:#343a48}html[data-academy-theme="dark"] .wallet-empty-state h3{color:#f5f6fa!important}html[data-academy-theme="dark"] .wallet-empty-state p{color:#afb4c0!important}
html[data-academy-theme="dark"] .wallet-transactions{border-color:#363c49}html[data-academy-theme="dark"] .wallet-transactions thead th{background:#252a35;color:#b8bdc8}html[data-academy-theme="dark"] .wallet-transactions tbody td{background:#20252f;color:#f1f2f6;border-color:#353b48}html[data-academy-theme="dark"] .wallet-operation>span{background:#302c4b;color:#a296ff}html[data-academy-theme="dark"] .wallet-amount{color:#aea5ff}html[data-academy-theme="dark"] .wallet-date{color:#b6bbc6}html[data-academy-theme="dark"] .wallet-disabled{background:#252a35;color:#c3c7d0}
@media(max-width:767.98px){.wallet-page>.container{padding-left:14px;padding-right:14px}.wallet-hero{grid-template-columns:1fr;gap:24px;padding:28px 22px;border-radius:24px}.wallet-hero-copy{text-align:center}.wallet-eyebrow{margin-inline:auto}.wallet-balance-card{min-height:190px}.wallet-actions-card,.wallet-history-card{padding:19px;border-radius:21px}.wallet-actions{grid-template-columns:1fr}.wallet-action{padding:15px}.wallet-transactions table{min-width:640px}}

/* Strong dark-mode contrast for wallet dialogs and student dashboard. */
html[data-academy-theme="dark"] .wallet-hero-copy p{color:#f0edff!important;opacity:1!important}
html[data-academy-theme="dark"] .wallet-balance-label{color:#f2efff!important}
html[data-academy-theme="dark"] .wallet-balance-note{color:#d9d6e6!important}

html[data-academy-theme="dark"] #chargeWalletModal .modal-content,
html[data-academy-theme="dark"] #paymentStepModal .modal-content,
html[data-academy-theme="dark"] #whatsAppChargeModal .modal-content{background:#1d222c!important;border:1px solid #3a414f!important;color:#f5f6fa!important}
html[data-academy-theme="dark"] #chargeWalletModal .modal-header,
html[data-academy-theme="dark"] #chargeWalletModal .modal-footer,
html[data-academy-theme="dark"] #paymentStepModal .modal-header,
html[data-academy-theme="dark"] #paymentStepModal .modal-footer,
html[data-academy-theme="dark"] #whatsAppChargeModal .modal-header,
html[data-academy-theme="dark"] #whatsAppChargeModal .modal-footer{border-color:#39404d!important}
html[data-academy-theme="dark"] #chargeWalletModal .modal-title,
html[data-academy-theme="dark"] #paymentStepModal .modal-title,
html[data-academy-theme="dark"] #whatsAppChargeModal .modal-title,
html[data-academy-theme="dark"] #chargeWalletModal .form-label,
html[data-academy-theme="dark"] #paymentStepModal .form-label,
html[data-academy-theme="dark"] #whatsAppChargeModal .form-label{color:#fff!important}
html[data-academy-theme="dark"] #chargeWalletModal .btn-close,
html[data-academy-theme="dark"] #paymentStepModal .btn-close,
html[data-academy-theme="dark"] #whatsAppChargeModal .btn-close{filter:invert(1) grayscale(1);opacity:.85}
html[data-academy-theme="dark"] #chargeWalletModal .form-control,
html[data-academy-theme="dark"] #paymentStepModal .form-control,
html[data-academy-theme="dark"] #paymentStepModal .form-select,
html[data-academy-theme="dark"] #whatsAppChargeModal .form-control{background:#272d38!important;border-color:#414958!important;color:#fff!important}
html[data-academy-theme="dark"] #chargeWalletModal .form-control::placeholder,
html[data-academy-theme="dark"] #paymentStepModal .form-control::placeholder,
html[data-academy-theme="dark"] #whatsAppChargeModal .form-control::placeholder{color:#9fa5b1!important;opacity:1}
html[data-academy-theme="dark"] #paymentStepModal #transferNumber{background:#272d38!important;border-color:#414958!important;color:#f3f4f7!important}
html[data-academy-theme="dark"] #paymentStepModal .alert-info{background:#173642!important;border-color:#205264!important;color:#d9f7ff!important}
html[data-academy-theme="dark"] #whatsAppChargeModal .text-muted{color:#bec3cd!important}

html[data-academy-theme="dark"] .student-dashboard-page .student-hero p{color:#f0edff!important;opacity:1!important}
html[data-academy-theme="dark"] .student-dashboard-page .stat-card,
html[data-academy-theme="dark"] .student-dashboard-page .student-quick{background:#1d222c!important;border-color:#363d4b!important;color:#f5f6fa!important;box-shadow:0 10px 28px rgba(0,0,0,.2)!important}
html[data-academy-theme="dark"] .student-dashboard-page .stat-label,
html[data-academy-theme="dark"] .student-dashboard-page .stat-number,
html[data-academy-theme="dark"] .student-dashboard-page .student-quick strong{color:#f7f8fb!important}
html[data-academy-theme="dark"] .student-dashboard-page .student-quick small{color:#b8bdc8!important}
html[data-academy-theme="dark"] .student-dashboard-page .stat-icon,
html[data-academy-theme="dark"] .student-dashboard-page .student-quick>i{background:#302c4b!important;color:#9f94ff!important}
html[data-academy-theme="dark"] .student-dashboard-page .student-stat-action{color:#a99fff!important}
html[data-academy-theme="dark"] .student-dashboard-page>h2,
html[data-academy-theme="dark"] .student-dashboard-page h2.h5{color:#fff!important}

/* Student courses: expandable descriptions with synchronized card heights. */
.student-courses-page .student-courses-grid>.col-xl-4{display:flex}
.student-courses-page .student-course-card{display:flex;flex-direction:column;width:100%}
.student-courses-page .student-course-card>.card-body{flex:1 1 auto}
.student-courses-page .course-description{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;line-height:1.85;transition:color .2s ease}
.student-courses-page .course-description.is-expanded{display:block;overflow:visible}
.student-courses-page .course-description-toggle{appearance:none;border:0;background:transparent;color:#6c5ce7;padding:2px 0;font-size:.76rem;font-weight:900;cursor:pointer}
.student-courses-page .course-description-toggle:hover{color:#5546cf;text-decoration:underline}

/* Student lessons/course page: complete dark-mode surfaces and readable text. */
html[data-academy-theme="dark"] .student-course-page .course-sections .accordion-item{background:#1d222c!important;border-color:#363d4b!important;box-shadow:0 8px 25px rgba(0,0,0,.22)!important}
html[data-academy-theme="dark"] .student-course-page .course-sections .accordion-button,
html[data-academy-theme="dark"] .student-course-page .course-sections .accordion-button.collapsed{background:#1d222c!important;color:#f6f7fa!important}
html[data-academy-theme="dark"] .student-course-page .course-sections .accordion-button:not(.collapsed){background:#252a38!important;color:#fff!important}
html[data-academy-theme="dark"] .student-course-page .course-sections .accordion-button::after{filter:invert(1) grayscale(1) brightness(1.8)}
html[data-academy-theme="dark"] .student-course-page .course-sections .accordion-button .text-dark,
html[data-academy-theme="dark"] .student-course-page .course-sections .accordion-button .fw-bold{color:#f7f8fb!important}
html[data-academy-theme="dark"] .student-course-page .course-sections .accordion-button .text-muted{color:#b8bdc8!important}
html[data-academy-theme="dark"] .student-course-page .course-sections .section-icon{background:#302c4b!important;color:#a196ff!important}
html[data-academy-theme="dark"] .student-course-page .course-sections .section-icon.secondary{background:#29303c!important;color:#b9bfca!important}
html[data-academy-theme="dark"] .student-course-page .course-sections .accordion-body{background:#191e27!important}
html[data-academy-theme="dark"] .student-course-page .course-sections .lesson-row{background:#20252f!important;border-color:#383e4b!important;color:#f5f6fa!important}
html[data-academy-theme="dark"] .student-course-page .course-sections .lesson-row:hover{background:#262c38!important}
html[data-academy-theme="dark"] .student-course-page .course-sections .lesson-row h3,
html[data-academy-theme="dark"] .student-course-page .course-sections .lesson-row strong{color:#f7f8fb!important}
html[data-academy-theme="dark"] .student-course-page .course-sections .lesson-row .text-muted{color:#b7bcc7!important}
html[data-academy-theme="dark"] .student-course-page .course-sections .lesson-number{background:#303642!important;color:#fff!important}

html[data-academy-theme="dark"] .student-courses-page .student-course-card{background:#1d222c!important;border-color:#363d4b!important;color:#f5f6fa!important}
html[data-academy-theme="dark"] .student-courses-page .student-course-card .card-footer{background:#232833!important;border-color:#383e4b!important}
html[data-academy-theme="dark"] .student-courses-page .student-course-card h2{color:#fff!important}
html[data-academy-theme="dark"] .student-courses-page .student-course-card .text-muted{color:#b8bdc8!important}
html[data-academy-theme="dark"] .student-courses-page .course-description-toggle{color:#a99fff!important}

/* Wallet history readability */
.wallet-transactions thead th{color:#4b5060!important;font-size:.82rem!important;font-weight:900!important}
.wallet-operation>div{display:flex;flex-direction:column;gap:3px}.wallet-operation small{font-size:.68rem;color:#8b90a0;line-height:1.5}.wallet-amount,.wallet-date{font-weight:800}
html[data-academy-theme="dark"] .wallet-transactions thead th{color:#f2f3f7!important;background:#272c37!important}
html[data-academy-theme="dark"] .wallet-operation small{color:#b9bec9!important}
html[data-academy-theme="dark"] .wallet-date{color:#d5d8df!important}
html[data-academy-theme="dark"] .wallet-amount{color:#c3bcff!important}

/* ===== 2026-08-19 FULL DARK MODE AUDIT BACKSTOP =====
   Screen-only dark-mode coverage for legacy/admin/teacher/student components.
   Light mode and print output are intentionally untouched.
*/
@media screen {

html[data-academy-theme="dark"]{
    --background:#10141d;
    --surface:#1c212b;
    --text:#f4f6fb;
    --muted:#aeb6c5;
    --border:#343b49;
    --shadow:0 10px 30px rgba(0,0,0,.18);
}

/* ---------- Global reusable Bootstrap / legacy components ---------- */
html[data-academy-theme="dark"] body{
    background-color:#10141d;
    color:#f4f6fb;
}
html[data-academy-theme="dark"] .card,
html[data-academy-theme="dark"] .content-card,
html[data-academy-theme="dark"] .stat-card{
    background:#1c212b!important;
    border-color:#343b49!important;
    color:#f4f6fb!important;
}
html[data-academy-theme="dark"] .card-header,
html[data-academy-theme="dark"] .card-footer,
html[data-academy-theme="dark"] .content-card-header{
    background-color:#1c212b!important;
    border-color:#343b49!important;
    color:#f4f6fb!important;
}
html[data-academy-theme="dark"] .card h1,
html[data-academy-theme="dark"] .card h2,
html[data-academy-theme="dark"] .card h3,
html[data-academy-theme="dark"] .card h4,
html[data-academy-theme="dark"] .card h5,
html[data-academy-theme="dark"] .card h6,
html[data-academy-theme="dark"] .content-card h1,
html[data-academy-theme="dark"] .content-card h2,
html[data-academy-theme="dark"] .content-card h3,
html[data-academy-theme="dark"] .content-card h4,
html[data-academy-theme="dark"] .content-card h5,
html[data-academy-theme="dark"] .content-card h6{
    color:#f7f8fb!important;
}
html[data-academy-theme="dark"] .text-muted,
html[data-academy-theme="dark"] .form-text{
    color:#aeb6c5!important;
}
html[data-academy-theme="dark"] .text-dark{
    color:#f4f6fb!important;
}
html[data-academy-theme="dark"] .bg-white{
    background-color:#1c212b!important;
}
html[data-academy-theme="dark"] .bg-light:not(.btn):not(.badge){
    background-color:#242a35!important;
    color:#f4f6fb!important;
}
html[data-academy-theme="dark"] .border,
html[data-academy-theme="dark"] .border-top,
html[data-academy-theme="dark"] .border-bottom,
html[data-academy-theme="dark"] .border-start,
html[data-academy-theme="dark"] .border-end{
    border-color:#3a4250!important;
}

/* Forms */
html[data-academy-theme="dark"] .form-control,
html[data-academy-theme="dark"] .form-select,
html[data-academy-theme="dark"] textarea.form-control,
html[data-academy-theme="dark"] .input-group-text{
    background-color:#242a35!important;
    border-color:#3c4452!important;
    color:#f7f8fb!important;
}
html[data-academy-theme="dark"] .form-control::placeholder,
html[data-academy-theme="dark"] textarea::placeholder{
    color:#858e9e!important;
    opacity:1!important;
}
html[data-academy-theme="dark"] .form-control:focus,
html[data-academy-theme="dark"] .form-select:focus{
    background-color:#262d39!important;
    color:#fff!important;
    border-color:#7467eb!important;
    box-shadow:0 0 0 .2rem rgba(108,92,231,.16)!important;
}
html[data-academy-theme="dark"] .form-select option{
    background:#242a35!important;
    color:#fff!important;
}
html[data-academy-theme="dark"] input[type="file"]::file-selector-button{
    background:#303745!important;
    color:#f4f6fb!important;
    border-color:#414958!important;
}
html[data-academy-theme="dark"] .form-check-input:not(:checked){
    background-color:#202631;
    border-color:#687284;
}

/* Tables */
html[data-academy-theme="dark"] .table{
    --bs-table-bg:#1c212b;
    --bs-table-color:#f4f6fb;
    --bs-table-border-color:#343c49;
    --bs-table-striped-bg:#202631;
    --bs-table-striped-color:#f4f6fb;
    --bs-table-hover-bg:#242b36;
    --bs-table-hover-color:#fff;
    color:#f4f6fb!important;
}
html[data-academy-theme="dark"] .table > :not(caption) > * > *{
    background-color:transparent!important;
    color:#f4f6fb!important;
    border-color:#343c49!important;
}
html[data-academy-theme="dark"] .table thead th,
html[data-academy-theme="dark"] .table thead.table-light > tr > *,
html[data-academy-theme="dark"] .table .table-light,
html[data-academy-theme="dark"] .table .table-light > *{
    background:#252b36!important;
    color:#dfe3eb!important;
    border-color:#3a4250!important;
}
html[data-academy-theme="dark"] .table tbody tr:hover > *{
    background:#242b36!important;
    color:#fff!important;
}
html[data-academy-theme="dark"] .table a:not(.btn){
    color:#8393ff!important;
}

/* Light badges and outline buttons that disappear on dark surfaces */
html[data-academy-theme="dark"] .badge.text-bg-light,
html[data-academy-theme="dark"] .badge.bg-light{
    background:#2b323e!important;
    color:#f4f6fb!important;
    border-color:#46505f!important;
}
html[data-academy-theme="dark"] .btn-outline-dark{
    color:#f3f5f9!important;
    border-color:#8d96a6!important;
}
html[data-academy-theme="dark"] .btn-outline-dark:hover{
    background:#f3f5f9!important;
    border-color:#f3f5f9!important;
    color:#171926!important;
}
html[data-academy-theme="dark"] .btn-outline-secondary{
    color:#c9cfda!important;
    border-color:#778191!important;
}
html[data-academy-theme="dark"] .btn-outline-secondary:hover{
    background:#778191!important;
    color:#fff!important;
}
html[data-academy-theme="dark"] .btn-outline-primary{
    color:#9488ff!important;
    border-color:#8174f5!important;
}
html[data-academy-theme="dark"] .btn-outline-primary:hover{
    background:#6c5ce7!important;
    border-color:#6c5ce7!important;
    color:#fff!important;
}
html[data-academy-theme="dark"] .btn-outline-success{
    color:#4dd89a!important;
    border-color:#35bd82!important;
}
html[data-academy-theme="dark"] .btn-outline-danger{
    color:#ff6670!important;
    border-color:#ff5964!important;
}

/* Alerts */
html[data-academy-theme="dark"] .alert-light{
    background:#242a35!important;
    border-color:#3c4452!important;
    color:#e9ecf2!important;
}
html[data-academy-theme="dark"] .alert-secondary{
    background:#292f39!important;
    border-color:#424a58!important;
    color:#d6dae2!important;
}
html[data-academy-theme="dark"] .alert-info{
    background:#202f43!important;
    border-color:#36506c!important;
    color:#dceeff!important;
}
html[data-academy-theme="dark"] .alert-success{
    background:#1d352b!important;
    border-color:#315744!important;
    color:#dff8ea!important;
}
html[data-academy-theme="dark"] .alert-warning{
    background:#3b321e!important;
    border-color:#5b4c2c!important;
    color:#ffe9a9!important;
}
html[data-academy-theme="dark"] .alert-danger{
    background:#3b2228!important;
    border-color:#62343e!important;
    color:#ffe2e5!important;
}

/* Modal / dropdown / pagination / list / accordion */
html[data-academy-theme="dark"] .modal-content,
html[data-academy-theme="dark"] .dropdown-menu,
html[data-academy-theme="dark"] .list-group-item,
html[data-academy-theme="dark"] .accordion-item,
html[data-academy-theme="dark"] .accordion-button{
    background:#1c212b!important;
    color:#f4f6fb!important;
    border-color:#343c49!important;
}
html[data-academy-theme="dark"] .modal-header,
html[data-academy-theme="dark"] .modal-footer{
    border-color:#373f4d!important;
}
html[data-academy-theme="dark"] .dropdown-item{
    color:#eef0f5;
}
html[data-academy-theme="dark"] .dropdown-item:hover,
html[data-academy-theme="dark"] .dropdown-item:focus{
    background:#292f3b;
    color:#fff;
}
html[data-academy-theme="dark"] .accordion-button:not(.collapsed){
    background:#252c38!important;
    color:#fff!important;
}
html[data-academy-theme="dark"] .accordion-button::after{
    filter:invert(1) grayscale(1) brightness(1.7);
}
html[data-academy-theme="dark"] .page-link{
    background:#1f2530!important;
    color:#dfe3eb!important;
    border-color:#39414f!important;
}
html[data-academy-theme="dark"] .page-item.active .page-link{
    background:#6c5ce7!important;
    border-color:#6c5ce7!important;
    color:#fff!important;
}
html[data-academy-theme="dark"] .btn-close{
    filter:invert(1) grayscale(1) brightness(1.8);
}

/* ---------- Admin custom pages found by the audit ---------- */
html[data-academy-theme="dark"] body.admin-body .settings-shell,
html[data-academy-theme="dark"] body.admin-body .settings-content,
html[data-academy-theme="dark"] body.admin-body .setting-row-card,
html[data-academy-theme="dark"] body.admin-body .hint-card,
html[data-academy-theme="dark"] body.admin-body .permission-choice,
html[data-academy-theme="dark"] body.admin-body .maintenance-preview,
html[data-academy-theme="dark"] body.admin-body .upload-box,
html[data-academy-theme="dark"] body.admin-body .certificate-course-setting,
html[data-academy-theme="dark"] body.admin-body .xp-admin-level-card{
    background:#1c212b!important;
    border-color:#343b49!important;
    color:#f4f6fb!important;
}
html[data-academy-theme="dark"] body.admin-body .settings-page-head h1,
html[data-academy-theme="dark"] body.admin-body .setting-copy strong,
html[data-academy-theme="dark"] body.admin-body .section-head h2{
    color:#f7f8fb!important;
}
html[data-academy-theme="dark"] body.admin-body .settings-page-head p,
html[data-academy-theme="dark"] body.admin-body .setting-copy p{
    color:#aeb6c5!important;
}
html[data-academy-theme="dark"] body.admin-body .settings-tabs{
    background:#171c25!important;
    border-color:#343b49!important;
}
html[data-academy-theme="dark"] body.admin-body .settings-tabs .nav-link{
    color:#bdc4d0!important;
}
html[data-academy-theme="dark"] body.admin-body .settings-tabs .nav-link.active{
    background:#6c5ce7!important;
    color:#fff!important;
}
html[data-academy-theme="dark"] body.admin-body .settings-subpermissions{
    background:#242a35!important;
    border-color:#675bd0!important;
}
html[data-academy-theme="dark"] body.admin-body .discount-stat-card,
html[data-academy-theme="dark"] body.admin-body .discount-system-toggle-row,
html[data-academy-theme="dark"] body.admin-body .discount-code-copy{
    background:#1c212b!important;
    border-color:#343b49!important;
    color:#f4f6fb!important;
}
html[data-academy-theme="dark"] body.admin-body .discount-codes-table{
    color:#f4f6fb!important;
}
html[data-academy-theme="dark"] body.admin-body [style*="background:#fff"],
html[data-academy-theme="dark"] body.admin-body [style*="background: #fff"],
html[data-academy-theme="dark"] body.admin-body [style*="background:white"],
html[data-academy-theme="dark"] body.admin-body [style*="background: white"]{
    background:#1c212b!important;
}

/* ---------- Teacher custom pages ---------- */
html[data-academy-theme="dark"] body.teacher-body .teacher-stat-card,
html[data-academy-theme="dark"] body.teacher-body .teacher-panel,
html[data-academy-theme="dark"] body.teacher-body .teacher-quick-card{
    color:#f4f6fb!important;
}
html[data-academy-theme="dark"] body.teacher-body [style*="background:#fff"],
html[data-academy-theme="dark"] body.teacher-body [style*="background: #fff"]{
    background:#1c212b!important;
}

/* ---------- Student / public-shell pages ---------- */
html[data-academy-theme="dark"] body.public-shell{
    background:#10141d!important;
    color:#f4f6fb!important;
}
html[data-academy-theme="dark"] .student-nav{
    background:#171c25!important;
    border-color:#303744!important;
}
html[data-academy-theme="dark"] .student-nav .navbar-brand{
    color:#9488ff!important;
}
html[data-academy-theme="dark"] .student-quick,
html[data-academy-theme="dark"] .student-stat-link{
    background:#1c212b!important;
    border-color:#343b49!important;
    color:#f4f6fb!important;
}
html[data-academy-theme="dark"] .student-quick:hover,
html[data-academy-theme="dark"] .student-stat-link:hover{
    color:#fff!important;
}

/* Course content / accordion */
html[data-academy-theme="dark"] .course-sections .accordion-item,
html[data-academy-theme="dark"] .course-sections .accordion-button,
html[data-academy-theme="dark"] .course-sections .lesson-row{
    background:#1c212b!important;
    border-color:#343b49!important;
    color:#f4f6fb!important;
}
html[data-academy-theme="dark"] .course-sections .accordion-button:not(.collapsed){
    background:#252a38!important;
    color:#fff!important;
}
html[data-academy-theme="dark"] .course-sections .lesson-number,
html[data-academy-theme="dark"] .course-sections .section-icon{
    background:#303642!important;
    color:#fff!important;
}

/* XP page custom cards */
html[data-academy-theme="dark"] .xp-page{
    background:#10141d!important;
}
html[data-academy-theme="dark"] .xp-mini-card,
html[data-academy-theme="dark"] .xp-rules-card,
html[data-academy-theme="dark"] .xp-levels-card,
html[data-academy-theme="dark"] .xp-history-card,
html[data-academy-theme="dark"] .xp-history-item,
html[data-academy-theme="dark"] .xp-rule-item{
    background:#1c212b!important;
    border-color:#343b49!important;
    color:#f4f6fb!important;
}
html[data-academy-theme="dark"] .xp-mini-card small,
html[data-academy-theme="dark"] .xp-history-copy small,
html[data-academy-theme="dark"] .xp-rule-item small{
    color:#aeb6c5!important;
}
html[data-academy-theme="dark"] .xp-level-item{
    background:#202631!important;
    border-color:#38404e!important;
    color:#b7bfcc!important;
}
html[data-academy-theme="dark"] .xp-level-item.reached{
    background:#292742!important;
    border-color:#514b7f!important;
    color:#e1ddff!important;
}
html[data-academy-theme="dark"] .xp-filter-bar button{
    background:#242a35!important;
    border-color:#3d4553!important;
    color:#c3cad6!important;
}
html[data-academy-theme="dark"] .xp-filter-bar button.active{
    background:#6c5ce7!important;
    border-color:#6c5ce7!important;
    color:#fff!important;
}

/* Preserve bright branded hero surfaces: dark mode should not flatten them. */
html[data-academy-theme="dark"] .student-hero,
html[data-academy-theme="dark"] .teacher-welcome,
html[data-academy-theme="dark"] .wallet-hero,
html[data-academy-theme="dark"] .xp-hero{
    color:#fff!important;
}
html[data-academy-theme="dark"] .student-hero h1,
html[data-academy-theme="dark"] .teacher-welcome h1,
html[data-academy-theme="dark"] .wallet-hero h1,
html[data-academy-theme="dark"] .xp-hero h1,
html[data-academy-theme="dark"] .xp-hero h2{
    color:#fff!important;
}

/* Dark mode must never alter certificate printing. */
}

@media print{
    html[data-academy-theme="dark"] body,
    html[data-academy-theme="dark"] .cert{
        background:#fff!important;
        color:#171827!important;
    }
}

/* Home CTA backdrop fix: dark mode only.
   Keep the purple CTA card unchanged; make only its outer section match
   the solid dark section above instead of showing the page grid backdrop. */
html[data-academy-theme="dark"] #how.home-section{
    background:#10141d!important;
    background-image:none!important;
}

/* Home dark-mode section background alignment.
   CTA section stays on the page/grid background.
   How-it-works section also uses the same page/grid background instead of a separate solid block. */
html[data-academy-theme="dark"] #how.home-section{
    background:transparent!important;
    background-image:none!important;
}
html[data-academy-theme="dark"] .platform-steps{
    background:transparent!important;
    background-image:none!important;
}
html[data-academy-theme="dark"] .platform-steps:before{
    display:none!important;
}
