/* Lumen LMS — Design System */
:root {
    --bg: #FFFFFF;
    --bg2: #F5F4EF;
    --border: #E3E1DA;
    --border2: #CFCDC4;
    --text: #2C2C2A;
    --text2: #6E6D66;
    --text3: #767468;
    --purple: #534AB7;
    --purple-bg: #EEEDFE;
    --purple-dk: #26215C;
    --purple-md: #3C3489;
    --purple-lt: #CECBF6;
    --green: #1D9E75;
    --green-bg: #E1F5EE;
    --green-tx: #085041;
    --amber: #EF9F27;
    --amber-bg: #FAEEDA;
    --amber-tx: #633806;
    --red: #E24B4A;
    --red-bg: #FCEBEB;
    --red-tx: #791F1F;
    --pink-bg: #FBEAF0;
    --pink-tx: #72243E;
    --blue-bg: #E6F1FB;
    --blue-tx: #0C447C;
    --r-sm: 6px;
    --r-md: 8px;
    --r-lg: 12px;
    --s1: 4px;
    --s2: 8px;
    --s3: 12px;
    --s4: 16px;
    --s5: 24px;
    --s6: 32px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg2);
    color: var(--text);
    font-size: 0.875rem;
    line-height: 1.55;
}

/* ---------- Layout ---------- */
.app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 212px;
    flex-shrink: 0;
    background: var(--bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
}

.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 56px;
    flex-shrink: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 24px;
}

.topbar .crumb {
    font-size: 13px;
    font-weight: 600;
}

.topbar .crumb small {
    font-weight: 400;
    color: var(--text2);
}

.topbar .right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--text2);
}

.topbar .right i {
    font-size: 18px;
    cursor: pointer;
}

.topbar .right>i:hover,
.topbar .right>div>i:hover {
    color: var(--text);
}

.content {
    flex: 1;
    overflow-y: auto;
    padding: 22px 26px;
    max-width: 100%;
}

.page-content {
    max-width: 100%;
}

/* ---------- Sidebar ---------- */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    margin-bottom: 14px;
}

.logo-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--purple);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--purple-bg);
    font-size: 16px;
}

.logo b {
    font-size: 15px;
    font-weight: 600;
}

.logo small {
    font-size: 10px;
    color: var(--text2);
    font-weight: 400;
    display: block;
}

.role-switch {
    display: flex;
    background: var(--bg2);
    border-radius: var(--r-md);
    padding: 3px;
    margin-bottom: 18px;
    font-size: 0.8125rem;
}

.role-switch a {
    flex: 1;
    border: none;
    background: transparent;
    padding: 9px 0;
    min-height: 38px;
    border-radius: var(--r-sm);
    cursor: pointer;
    color: var(--text2);
    font-size: 0.8125rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
}

.role-switch a.active {
    background: var(--bg);
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    list-style: none;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--r-md);
    color: var(--text2);
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
}

.nav-item a i {
    font-size: 17px;
}

.nav-item a:hover {
    background: var(--bg2);
}

.nav-item a.active {
    background: var(--bg2);
    color: var(--text);
    font-weight: 600;
}

.side-bottom {
    margin-top: auto;
}

/* ---------- Avatar ---------- */
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--blue-bg);
    color: var(--blue-tx);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

/* ---------- Cards ---------- */
.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 16px;
}

/* ---------- Stats ---------- */
.stat {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 13px 15px;
}

.stat p {
    font-size: 0.8125rem;
    color: var(--text2);
}

.stat b {
    font-size: 1.5rem;
    font-weight: 600;
    display: block;
    margin-top: 3px;
}

.stat .up {
    font-size: 11px;
    color: var(--green-tx);
    font-weight: 400;
}

.stat .down {
    font-size: 11px;
    color: var(--red-tx);
    font-weight: 400;
}

/* ---------- Grid ---------- */
.grid2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.grid3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.grid4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

/* ---------- Progress Bar ---------- */
.bar {
    height: 5px;
    border-radius: 3px;
    background: var(--bg2);
    overflow: hidden;
}

.bar-fill {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: var(--purple);
}

.bar-fill.green {
    background: var(--green);
}

.bar-fill.amber {
    background: var(--amber);
}

.bar-fill.red {
    background: var(--red);
}

.bar-fill.pink {
    background: #D4537E;
}

/* ---------- Badges ---------- */
.badge {
    font-size: 10px;
    padding: 2px 9px;
    border-radius: 10px;
    white-space: nowrap;
    display: inline-block;
}

.b-purple {
    background: var(--purple-bg);
    color: var(--purple-md);
}

.b-green {
    background: var(--green-bg);
    color: var(--green-tx);
}

.b-amber {
    background: var(--amber-bg);
    color: var(--amber-tx);
}

.b-red {
    background: var(--red-bg);
    color: var(--red-tx);
}

.b-pink {
    background: var(--pink-bg);
    color: var(--pink-tx);
}

.b-blue {
    background: var(--blue-bg);
    color: var(--blue-tx);
}

.b-gray {
    background: var(--bg2);
    color: var(--text2);
}

/* ---------- Buttons ---------- */
.btn {
    font-size: 0.875rem;
    border: 1px solid var(--border2);
    background: var(--bg);
    border-radius: var(--r-md);
    padding: 9px 15px;
    min-height: 40px;
    cursor: pointer;
    color: var(--text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn:hover {
    background: var(--bg2);
}

.btn.primary {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.btn.primary:hover {
    opacity: .88;
}

.btn.sm {
    font-size: 0.8125rem;
    padding: 7px 12px;
    min-height: 34px;
}

/* ---------- Chips ---------- */
.chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.chip {
    font-size: 0.875rem;
    padding: 9px 16px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 16px;
    border: 1px solid var(--border);
    color: var(--text2);
    cursor: pointer;
    background: var(--bg);
    text-decoration: none;
}

.chip.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

/* ---------- Tile Icon ---------- */
.tile-ic {
    width: 38px;
    height: 38px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    flex-shrink: 0;
}

/* ---------- Table ---------- */
.table-wrap {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
}

.thead {
    display: flex;
    gap: 10px;
    padding: 9px 14px;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text2);
}

.trow {
    display: flex;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    align-items: center;
}

.trow:last-child {
    border-bottom: none;
}

/* ---------- Row list ---------- */
.row-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.row-item:last-child {
    border-bottom: none;
}

.grow {
    flex: 1;
    min-width: 0;
}

/* ---------- Forms ---------- */
input[type=text],
input[type=email],
input[type=password],
input[type=search] {
    font-size: 0.875rem;
    border: 1px solid var(--border2);
    border-radius: var(--r-md);
    padding: 8px 11px;
    background: var(--bg);
    color: var(--text);
    outline: none;
    width: 100%;
}

input:focus {
    border-color: var(--purple);
}

.field label {
    font-size: 0.8125rem;
    color: var(--text2);
    display: block;
    margin-bottom: 5px;
}

.field {
    margin-bottom: 14px;
}

/* ---------- Toggle ---------- */
.toggle {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: var(--bg2);
    border: 1px solid var(--border);
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s;
}

.toggle::after {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border2);
    position: absolute;
    top: 2px;
    left: 2px;
    transition: left .15s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}

.toggle.on {
    background: var(--purple);
    border-color: var(--purple);
}

.toggle.on::after {
    left: 22px;
    border-color: var(--purple);
}

/* ---------- Switch (native checkbox toggle) ---------- */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.switch .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 24px;
    transition: background .2s, border-color .2s;
}

.switch .slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 2px;
    top: 2px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}

.switch input:checked+.slider {
    background: var(--purple);
    border-color: var(--purple);
}

.switch input:checked+.slider::before {
    transform: translateX(20px);
}

/* ---------- AI Tutor ---------- */
.tutor {
    width: 280px;
    flex-shrink: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    display: flex;
    flex-direction: column;
    height: 480px;
}

.tutor-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}

.tutor-head .spark {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--purple-bg);
    color: var(--purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.tutor-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    font-size: 12px;
}

.msg-user {
    align-self: flex-end;
    max-width: 88%;
    background: var(--text);
    color: var(--bg);
    padding: 8px 12px;
    border-radius: 12px 12px 4px 12px;
    line-height: 1.5;
}

.msg-bot {
    align-self: flex-start;
    max-width: 92%;
    background: var(--bg2);
    padding: 9px 12px;
    border-radius: 12px 12px 12px 4px;
    line-height: 1.55;
}

.tutor-foot {
    padding: 10px 12px;
    border-top: 1px solid var(--border);
}

.send-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.send-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--purple);
    color: var(--purple-bg);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ---------- Video Player ---------- */
.video-player {
    background: #2C2C2A;
    border-radius: var(--r-lg);
    height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 10px;
}

.play-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(241, 239, 232, .94);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #2C2C2A;
    cursor: pointer;
}

/* ---------- Player layout ---------- */
.player-wrap {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.player-main {
    flex: 1;
    min-width: 0;
}

/* ---------- Podium ---------- */
.podium {
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 16px;
    text-align: center;
    background: var(--bg);
}

.podium.first {
    border: 2px solid var(--purple);
}

/* ---------- SCORM frame ---------- */
.scorm-frame {
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    margin-bottom: 10px;
    background: var(--bg);
}

.scorm-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--bg2);
    padding: 8px 14px;
    font-size: 12px;
    color: var(--text2);
    border-bottom: 1px solid var(--border);
}

/* ---------- Utilities ---------- */
.sec {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text2);
    margin: var(--s5) 0 var(--s3);
}

.muted {
    color: var(--text2);
}

.tiny {
    font-size: 11px;
}

.xtiny {
    font-size: 10px;
}

.mb-sm {
    margin-bottom: 12px;
}

.mb-md {
    margin-bottom: 18px;
}

.mb-lg {
    margin-bottom: 24px;
}

.pg-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 10px;
    flex-wrap: wrap;
}

.pg-head h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
    .sidebar {
        width: 60px;
        padding: 18px 8px;
    }

    .sidebar .logo b,
    .sidebar .logo small,
    .nav-item span,
    .role-switch {
        display: none;
    }

    .nav-item a {
        justify-content: center;
    }

    .player-wrap {
        flex-wrap: wrap;
    }

    .tutor {
        width: 100%;
        height: 380px;
    }

    .grid3,
    .grid4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------- Game Hub ---------- */
.game-hub {
    background: linear-gradient(135deg, #534AB7, #3C3489);
    border-radius: var(--r-lg);
    padding: 18px;
    color: #EEEDFE;
    margin-bottom: 20px;
}

.gh-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.gh-lvl {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    border: 2px solid rgba(255, 255, 255, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.gh-name b {
    font-size: 16px;
    color: #fff;
}

.gh-name p {
    font-size: 11px;
    color: #CECBF6;
}

.gh-rank {
    margin-left: auto;
    text-align: right;
}

.gh-rank b {
    font-size: 18px;
    color: #fff;
}

.gh-rank p {
    font-size: 10px;
    color: #CECBF6;
}

.gh-xp {
    height: 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .2);
    overflow: hidden;
    margin-bottom: 5px;
}

.gh-xp i {
    display: block;
    height: 100%;
    background: #fff;
    transition: width .6s ease;
}

.gh-xprow {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #CECBF6;
    margin-bottom: 14px;
}

.gh-stats {
    display: flex;
    gap: 8px;
}

.gh-stat {
    flex: 1;
    background: rgba(255, 255, 255, .12);
    border-radius: var(--r-md);
    padding: 9px 10px;
    text-align: center;
}

.gh-stat b {
    font-size: 17px;
    color: #fff;
    display: block;
}

.gh-stat p {
    font-size: 10px;
    color: #CECBF6;
}

/* ---------- Daily Boost Card ---------- */
.boost-card {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    border: 1px solid var(--purple-lt);
    background: var(--purple-bg);
}

/* ---------- Continue Learning Card ---------- */
.continue-card {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

/* ---------- Achievements Strip ---------- */
.ach-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.ach {
    flex-shrink: 0;
    width: 64px;
    text-align: center;
}

.ach .aic {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin: 0 auto 4px;
    background: var(--bg2);
    color: var(--text3);
    border: 1px solid var(--border);
}

.ach.got .aic {
    background: var(--purple-bg);
    color: var(--purple);
    border-color: var(--purple-lt);
}

.ach p {
    font-size: 9px;
    color: var(--text2);
    line-height: 1.2;
}

/* ---------- Tile Icon ---------- */
.tile-ic {
    width: 38px;
    height: 38px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    flex-shrink: 0;
}

/* ---------- Bar fill (generic) ---------- */
.bar i {
    display: block;
    height: 100%;
    background: var(--purple);
    border-radius: 3px;
}

.bar i.g {
    background: var(--green);
}

.bar i.a {
    background: var(--amber);
}

.bar i.r {
    background: var(--red);
}

.bar i.purple {
    background: var(--purple);
}

.bar i.pink {
    background: #E24B7A;
}

.bar i.teal {
    background: #1D9E75;
}

.bar i.navy {
    background: #3C3489;
}

.bar i.blue {
    background: #3C7DD9;
}

/* ---------- Section heading ---------- */
.sec {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text2);
    margin: var(--s5) 0 var(--s3);
}

/* ---------- Grow utility ---------- */
.grow {
    flex: 1;
    min-width: 0;
}

/* ---------- Daily Boost ---------- */
.boost-wrap {
    max-width: 520px;
    margin: 0 auto;
}

.boost-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.boost-streak {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}

.boost-hud {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 10px 14px;
    margin-bottom: 14px;
}

.boost-lvl {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--purple);
    color: var(--purple-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.xp-wrap {
    flex: 1;
    min-width: 0;
}

.xp-row {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text2);
    margin-bottom: 3px;
}

.xp-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--bg2);
    overflow: hidden;
}

.xp-bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #7F77DD, #534AB7);
    transition: width .5s ease;
}

.boost-combo {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #D85A30;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity .2s, transform .2s;
    transform: scale(.8);
}

.boost-combo.show {
    opacity: 1;
    transform: scale(1);
}

.boost-prog {
    display: flex;
    gap: 5px;
    margin-bottom: 14px;
}

.boost-prog span {
    flex: 1;
    height: 5px;
    border-radius: 3px;
    background: var(--bg2);
}

.boost-prog span.done {
    background: var(--green);
}

.boost-prog span.now {
    background: var(--purple);
}

.timer-wrap {
    height: 4px;
    border-radius: 2px;
    background: var(--bg2);
    overflow: hidden;
    margin-bottom: 16px;
}

.timer-bar {
    height: 100%;
    background: var(--green);
    width: 100%;
    transition: width .1s linear, background .3s;
}

.timer-bar.warn {
    background: var(--amber);
}

.timer-bar.crit {
    background: var(--red);
}

.boost-q {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 22px;
    margin-bottom: 14px;
}

.boost-tag {
    font-size: 11px;
    color: var(--text2);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.boost-q h2 {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 18px;
}

.boost-opt {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid var(--border2);
    border-radius: var(--r-md);
    padding: 13px 15px;
    margin-bottom: 9px;
    background: var(--bg);
    cursor: pointer;
    font-size: 13px;
    transition: .12s;
}

.boost-opt:hover {
    border-color: var(--purple);
    background: var(--purple-bg);
}

.boost-opt.ok {
    border-color: var(--green);
    background: var(--green-bg);
    color: var(--green-tx);
    font-weight: 600;
}

.boost-opt.bad {
    border-color: var(--red);
    background: var(--red-bg);
    color: var(--red-tx);
}

.boost-opt.dim {
    opacity: .5;
}

.boost-opt:disabled {
    cursor: default;
}

.boost-fb {
    font-size: 12px;
    padding: 10px 14px;
    border-radius: var(--r-md);
    margin-top: 6px;
    line-height: 1.5;
    display: none;
}

.boost-fb.show {
    display: block;
}

.boost-fb.good {
    background: var(--green-bg);
    color: var(--green-tx);
}

.boost-fb.miss {
    background: var(--amber-bg);
    color: var(--amber-tx);
}

.boost-done {
    text-align: center;
    padding: 30px 20px;
}

.boost-done .big {
    font-size: 46px;
}

.streak-cal {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 14px 0;
}

.streak-cal span {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    background: var(--bg2);
    color: var(--text2);
}

.streak-cal span.hit {
    background: var(--purple);
    color: var(--purple-bg);
}

/* ---------- Wager Chips ---------- */
.wager {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    align-items: center;
}

.wager-chip {
    flex: 1;
    text-align: center;
    border: 1px solid var(--border2);
    border-radius: var(--r-md);
    padding: 8px 4px;
    cursor: pointer;
    font-size: 11px;
    background: var(--bg);
}

.wager-chip b {
    display: block;
    font-size: 14px;
}

.wager-chip.on {
    border-color: var(--purple);
    background: var(--purple-bg);
    color: var(--purple-md);
    font-weight: 600;
}

/* ---------- Next button ---------- */
.next-btn {
    font-size: 14px;
    font-weight: 500;
}

/* ---------- Calendar ---------- */
.cal-toggle {
    display: inline-flex;
    background: var(--bg2);
    border-radius: var(--r-md);
    padding: 3px;
    font-size: 11px;
}

.cal-toggle button {
    border: none;
    background: transparent;
    padding: 5px 12px;
    border-radius: var(--r-sm);
    cursor: pointer;
    color: var(--text2);
    font-size: 11px;
    font-weight: 500;
}

.cal-toggle button.on {
    background: var(--bg);
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

.cal-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.cal-arrow {
    width: 30px;
    height: 30px;
    border-radius: var(--r-md);
    border: 1px solid var(--border2);
    background: var(--bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 16px;
}

.cal-arrow:hover {
    background: var(--bg2);
}

.wk {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    text-align: center;
    margin-bottom: 20px;
}

.wk div {
    padding: 9px 0 8px;
    border-radius: var(--r-md);
    cursor: pointer;
    background: var(--bg);
    border: 1px solid var(--border);
    transition: .12s;
}

.wk div:hover {
    background: var(--bg2);
}

.wk div p {
    font-size: 11px;
    color: var(--text2);
}

.wk div b {
    font-size: 15px;
    font-weight: 500;
}

.wk div.today {
    border-color: var(--purple);
}

.wk div.today p {
    color: var(--purple-md);
    font-weight: 600;
}

.wk div.sel,
.wk div.sel:hover {
    background: var(--text);
    border-color: var(--text);
}

.wk div.sel p {
    color: var(--bg);
    opacity: .7;
}

.wk div.sel b {
    color: var(--bg);
}

.mb-sm {
    margin-bottom: 10px;
}

.mb-md {
    margin-bottom: 16px;
}

/* ---------- Calendar Month Grid ---------- */
.cal-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 20px;
}

.cal-mhead {
    text-align: center;
    font-size: 10px;
    color: var(--text2);
    font-weight: 600;
    padding-bottom: 2px;
}

.mcell {
    min-height: 62px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--bg);
    padding: 6px 6px 5px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: .12s;
}

.mcell:hover {
    background: var(--bg2);
}

.mcell.out {
    opacity: .38;
}

.mcell.today {
    border-color: var(--purple);
}

.mcell.today .mnum {
    color: var(--purple-md);
    font-weight: 700;
}

.mcell.sel,
.mcell.sel:hover {
    background: var(--text);
    border-color: var(--text);
}

.mcell.sel .mnum {
    color: var(--bg);
}

.mnum {
    font-size: 12px;
    font-weight: 500;
}

.mcell .cal-dots {
    justify-content: flex-start;
    margin-top: auto;
    height: 5px;
}

.cal-dots {
    display: flex;
    gap: 3px;
    justify-content: center;
    height: 6px;
    margin-top: 5px;
}

.cal-dots i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    display: block;
}

/* ---------- Clickable Course Card ---------- */
a.card:hover {
    border-color: var(--purple);
    box-shadow: 0 2px 8px rgba(83, 74, 183, .1);
}

/* ---------- New Home Page Components ---------- */
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.card-head b {
    font-size: 1rem;
}

.link {
    font-size: 12px;
    color: var(--purple-md);
    cursor: pointer;
    font-weight: 500;
}

.link:hover {
    text-decoration: underline;
}

.thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    flex-shrink: 0;
    border-radius: var(--r-md);
}

.goal-ring {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(var(--purple) var(--p, 60%), var(--bg2) 0);
    margin: 0 auto;
}

.goal-ring span {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.goal-ring b {
    font-size: 26px;
    font-weight: 600;
    color: var(--text);
    line-height: 1;
}

.goal-ring small {
    font-size: 13px;
    color: var(--text2);
    margin-top: 2px;
}

.rank-box {
    background: var(--bg2);
    border-radius: var(--r-md);
    padding: 12px 8px;
    text-align: center;
    width: 92px;
    flex-shrink: 0;
}

.lb-r {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 12px;
}

.lb-rank {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.me-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--r-lg);
    background: var(--purple-bg);
    font-size: 13px;
    color: var(--purple-dk);
}

.rec {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
}

.rec:hover {
    background: var(--bg2);
}

.psum {
    text-align: center;
}

.psum-ic {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin: 0 auto 8px;
}

.psum-val {
    font-size: 22px;
    font-weight: 600;
    display: block;
}

.row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.row:last-child {
    border-bottom: none;
}

.sub {
    font-size: 12px;
    color: var(--text2);
}

/* ---------- My Skills Page ---------- */
.readiness-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #534AB7, #3C3489);
    border-radius: var(--r-lg);
    padding: 20px;
    color: #EEEDFE;
    margin-bottom: 22px;
}

.ring {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(#fff var(--p, 72%), rgba(255, 255, 255, .22) 0);
}

.ring span {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #473F9E;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: 700;
    color: #fff;
}

.rh-body {
    flex: 1;
    min-width: 0;
}

.role-track {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    color: #CECBF6;
    margin-top: 6px;
    flex-wrap: wrap;
}

.role-track b {
    color: #fff;
    font-size: 13px;
}

.role-track i {
    font-size: 14px;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.skill-item:last-child {
    border-bottom: none;
}

.skill-item .sn {
    flex: 1;
    min-width: 0;
}

.lvl-pips {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}

.lvl-pips i {
    width: 20px;
    height: 6px;
    border-radius: 3px;
    background: var(--bg2);
    display: block;
}

.lvl-pips i.on {
    background: var(--purple);
}

.lvl-pips i.tgt {
    background: var(--purple-lt);
}

.skill-item .st {
    width: 96px;
    text-align: center;
    flex-shrink: 0;
}

.gap-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    margin-bottom: 10px;
    background: var(--bg);
}

/* ---------- Adaptive Skill Check ---------- */
.ad-skills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ad-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text2);
}

.ad-opt {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid var(--border2);
    border-radius: var(--r-md);
    padding: 12px 14px;
    margin-bottom: 8px;
    background: var(--bg);
    cursor: pointer;
    font-size: 13px;
    transition: .12s;
}

.ad-opt:hover {
    border-color: var(--purple);
    background: var(--purple-bg);
}

.ad-options {
    display: flex;
    flex-direction: column;
}

.insight {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
}

.insight:last-child {
    border-bottom: none;
}

.insight .ic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--purple-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.insight b {
    font-size: 13px;
    display: block;
    margin-bottom: 2px;
}

.ins-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

/* ---------- Assignments Page ---------- */
.as-bulk {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text2);
    flex-wrap: wrap;
    padding: 8px 12px;
    border-radius: var(--r-md);
    border: 1px solid transparent;
}

.as-bulk.active {
    background: var(--purple-bg);
    border-color: var(--purple-lt);
}

/* ---------- Modal ---------- */
.modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(44, 44, 42, .45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 90;
    padding: 20px;
}

.modal-bg.show {
    display: flex;
}

.modal {
    background: var(--bg);
    border-radius: var(--r-lg);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 18px;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.modal-head b {
    font-size: 15px;
}

.modal-x {
    border: none;
    background: none;
    font-size: 18px;
    color: var(--text2);
    cursor: pointer;
}

.field {
    margin-bottom: 14px;
}

.field label {
    font-size: 0.8125rem;
    color: var(--text2);
    display: block;
    margin-bottom: 5px;
}

/* ---------- Course Cards (My Learning) ---------- */
.crs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.crs-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: .15s;
}

.crs-card.click {
    cursor: pointer;
}

.crs-card.click:hover {
    border-color: var(--border2);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
    transform: translateY(-2px);
}

.crs-cover {
    height: 140px;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crs-cover .cover-ic {
    position: absolute;
    top: 10px;
    left: 12px;
    z-index: 1;
    font-size: 24px;
    color: rgba(255, 255, 255, .8);
}

.crs-save {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 1;
    width: 34px;
    height: 34px;
    border: none;
    background: rgba(255, 255, 255, .85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--text2);
}

.crs-save:hover {
    background: #fff;
}

.crs-save.on {
    color: var(--purple);
}

.crs-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.crs-body b {
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 6px;
}

.crs-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.crs-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: 11px;
    color: var(--text2);
    margin-bottom: 10px;
}

.crs-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.crs-meta .due-late {
    color: var(--red-tx);
    font-weight: 600;
}

.crs-meta .due-soon {
    color: var(--amber-tx);
    font-weight: 600;
}

.crs-prog {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    margin-bottom: 10px;
}

.crs-prog .bar {
    flex: 1;
}

.crs-body .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    border-radius: 20px;
    padding: 9px 16px;
    min-height: 38px;
    font-size: 14px;
}

@media (max-width: 1100px) {
    .crs-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .crs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .crs-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Admin Courses Bulk ---------- */
.ac-bulk {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text2);
    flex-wrap: wrap;
    padding: 8px 12px;
    border-radius: var(--r-md);
    border: 1px solid transparent;
}

.ac-bulk.active {
    background: var(--purple-bg);
    border-color: var(--purple-lt);
}

/* ---------- Admin Courses Tabs ---------- */
.ac-tabs {
    display: flex;
    gap: 0;
}

.ac-tab {
    padding: 10px 14px;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    background: none;
    color: var(--text2);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ac-tab:hover {
    color: var(--text);
}

.ac-tab.on {
    color: var(--purple);
    border-bottom-color: var(--purple);
}

/* ---------- Updated Sidebar & App Shell ---------- */
.side {
    width: 212px;
    flex-shrink: 0;
    background: var(--bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    overflow-y: auto;
}

.side .logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 8px;
    margin-bottom: 14px;
    background: #fff;
    border-radius: var(--r-md);
    text-decoration: none;
    color: inherit;
}

.side .logo .logo-img {
    width: 100%;
    max-width: 48px;
    height: auto;
    display: block;
}

.side .logo .logo-name {
    width: 100%;
    max-width: 140px;
    height: auto;
    display: block;
    margin-top: 2px;
}

.side .role-switch {
    display: flex;
    background: var(--bg2);
    border-radius: var(--r-md);
    padding: 3px;
    margin-bottom: 18px;
    font-size: 13px;
}

.side .role-switch button {
    flex: 1;
    border: none;
    background: transparent;
    padding: 9px 0;
    min-height: 38px;
    border-radius: var(--r-sm);
    cursor: pointer;
    color: var(--text2);
    font-size: 13px;
    font-weight: 500;
}

.side .role-switch button.on {
    background: var(--bg);
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

.side .nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.side .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    min-height: 42px;
    border-radius: var(--r-md);
    color: var(--text2);
    cursor: pointer;
    font-size: 14px;
    border: none;
    background: none;
    text-align: left;
    width: 100%;
    text-decoration: none;
}

.side .nav-item i {
    font-size: 17px;
}

.side .nav-item:hover {
    background: var(--bg2);
}

.side .nav-item.active {
    background: var(--bg2);
    color: var(--text);
    font-weight: 600;
}

.searchbar {
    flex: 1;
    max-width: 520px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border2);
    border-radius: 18px;
    padding: 7px 14px;
    background: var(--bg);
}

.searchbar i {
    color: var(--text3);
    font-size: 15px;
}

.searchbar .ai-tag {
    margin-left: auto;
    font-size: 11px;
    letter-spacing: .5px;
    padding: 2px 7px;
    border-radius: 8px;
    background: var(--purple-bg);
    color: var(--purple-md);
    font-weight: 600;
}

.searchbar input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 13px;
    background: transparent;
    color: var(--text);
}

.topbar .crumb {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.notif-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bell-wrap {
    position: relative;
    cursor: pointer;
}

@media (max-width: 880px) {
    .side {
        width: 60px;
        padding: 18px 8px;
    }

    .side .logo b,
    .side .logo small,
    .side .nav-item span,
    .side .role-switch {
        display: none;
    }

    .side .nav-item {
        justify-content: center;
    }

    .searchbar {
        display: none;
    }
}

/* ---------- Progress Page ---------- */
.bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 84px;
}

.bars div {
    flex: 1;
    background: var(--purple-lt);
    border-radius: 4px 4px 0 0;
}

.bars div.hl {
    background: var(--purple);
}

.bars div.dim {
    background: var(--bg2);
}

.bar-labels {
    display: flex;
    gap: 8px;
    font-size: 10px;
    color: var(--text2);
    text-align: center;
    margin-top: 4px;
}

.bar-labels span {
    flex: 1;
}

.cert-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.cert-row:last-child {
    border-bottom: none;
}

/* ---------- Leaderboard Page ---------- */
.podium-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px 16px;
    margin-bottom: 18px;
}

.podium-wrap {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 14px;
}

.podium {
    text-align: center;
    width: 120px;
}

.podium .pav {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    margin: 0 auto 8px;
    background: var(--bg2);
    color: var(--text2);
}

.podium b {
    font-size: 13px;
    display: block;
}

.podium .pts {
    font-size: 11px;
    color: var(--text2);
    display: block;
    margin: 2px 0 6px;
}

.podium .step {
    font-size: 11px;
    color: var(--text2);
    font-weight: 600;
}

.podium.first {
    transform: translateY(-10px);
}

.podium.first .pav {
    width: 56px;
    height: 56px;
    font-size: 16px;
    background: var(--purple-bg);
    color: var(--purple);
    border: 2px solid var(--purple);
}

.podium.first .step {
    color: var(--purple);
}

.lb-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    color: var(--text2);
    font-weight: 600;
}

/* ---------- Global Refinements from Wireframe ---------- */
.grid2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s3);
}

.grid3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--s3);
}

.grid4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--s3);
}

.stat {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 13px 15px;
}

.stat p {
    font-size: 0.8125rem;
    color: var(--text2);
}

.stat b {
    font-size: 1.5rem;
    font-weight: 600;
    display: block;
    margin-top: 3px;
}

.stat .up {
    font-size: 11px;
    color: var(--green-tx);
    font-weight: 400;
}

.stat .down {
    font-size: 11px;
    color: var(--red-tx);
    font-weight: 400;
}

.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--s4);
}

.pg-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--s4);
    gap: 10px;
    flex-wrap: wrap;
}

.pg-head h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.table,
.table-wrap {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
}

.thead {
    display: flex;
    gap: 10px;
    padding: 9px 14px;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text2);
}

.trow {
    display: flex;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    align-items: center;
}

.trow:last-child {
    border-bottom: none;
}

.chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.chip {
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 16px;
    border: 1px solid var(--border);
    color: var(--text2);
    cursor: pointer;
    background: var(--bg);
    text-decoration: none;
}

.chip.on,
.chip.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.badge {
    font-size: 10px;
    padding: 2px 9px;
    border-radius: 10px;
    white-space: nowrap;
}

.b-purple {
    background: var(--purple-bg);
    color: var(--purple-md);
}

.b-green {
    background: var(--green-bg);
    color: var(--green-tx);
}

.b-amber {
    background: var(--amber-bg);
    color: var(--amber-tx);
}

.b-red {
    background: var(--red-bg);
    color: var(--red-tx);
}

.b-pink {
    background: var(--pink-bg);
    color: var(--pink-tx);
}

.b-blue {
    background: var(--blue-bg);
    color: var(--blue-tx);
}

.b-gray {
    background: var(--bg2);
    color: var(--text2);
}

.bar {
    height: 5px;
    border-radius: 3px;
    background: var(--bg2);
    overflow: hidden;
}

.bar i {
    display: block;
    height: 100%;
    background: var(--purple);
    border-radius: 3px;
}

.bar i.g {
    background: var(--green);
}

.bar i.a {
    background: var(--amber);
}

.bar i.r {
    background: var(--red);
}

.bar-fill {
    display: block;
    height: 100%;
    background: var(--purple);
    border-radius: 3px;
}

.bar-fill.green {
    background: var(--green);
}

.btn {
    font-size: 0.875rem;
    border: 1px solid var(--border2);
    background: var(--bg);
    border-radius: var(--r-md);
    padding: 9px 15px;
    min-height: 40px;
    cursor: pointer;
    color: var(--text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn:hover {
    background: var(--bg2);
}

.btn.primary {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.btn.primary:hover {
    opacity: .88;
}

.btn.sm {
    font-size: 0.8125rem;
    padding: 7px 12px;
    min-height: 34px;
}

.muted {
    color: var(--text2);
}

.tiny {
    font-size: 11px;
}

.xtiny {
    font-size: 10px;
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--blue-bg);
    color: var(--blue-tx);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.pav {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}

.topbar {
    height: 56px;
    flex-shrink: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: var(--s4);
    padding: 0 var(--s5);
}

.topbar .right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text2);
}

.topbar .right i {
    font-size: 18px;
    cursor: pointer;
}

.content {
    flex: 1;
    overflow-y: auto;
    padding: 22px 26px;
    max-width: 100%;
}

.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

@media (max-width: 1100px) {
    .grid3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 880px) {
    .grid4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {

    .grid2,
    .grid3,
    .grid4 {
        grid-template-columns: 1fr;
    }
}

/* ---------- Sidebar Promo Card ---------- */
.side-promo {
    margin-top: 12px;
    background: var(--purple-bg);
    border: 1px solid var(--purple-lt);
    border-radius: var(--r-md);
    padding: 14px;
    text-align: center;
}

.side-promo .sp-ic {
    width: 34px;
    height: 34px;
    border-radius: var(--r-md);
    background: var(--purple);
    color: var(--purple-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin: 0 auto 8px;
}

.side-promo b {
    font-size: 12px;
    color: var(--purple-dk);
    display: block;
}

.side-promo p {
    font-size: 13px;
    color: var(--purple-md);
    line-height: 1.35;
    margin: 3px 0 0;
}

/* ---------- Notification Dot ---------- */
.bell-wrap {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.bell-wrap i {
    font-size: 18px;
}

.notif-dot {
    position: absolute;
    top: -4px;
    right: -6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--purple);
    color: #fff;
    font-size: 9px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg);
}

/* =====================================================================
   Glassmorphism theme — matches the wireframe's frosted-glass look
   with radial gradient background and translucent cards.
===================================================================== */
:root {
    --glass: rgba(255, 255, 255, .55);
    --glass-2: rgba(255, 255, 255, .42);
    --glass-line: rgba(255, 255, 255, .6);
    --glass-shadow: 0 8px 30px rgba(70, 60, 140, .10);
    --blur: blur(16px) saturate(140%);
}

body {
    background:
        radial-gradient(680px 480px at 8% -6%, rgba(129, 116, 236, .35), transparent 60%),
        radial-gradient(700px 520px at 104% 4%, rgba(216, 90, 140, .24), transparent 58%),
        radial-gradient(760px 620px at 50% 116%, rgba(41, 180, 150, .20), transparent 60%),
        linear-gradient(135deg, #EEF0FB 0%, #F4EEFB 45%, #FBEEF3 100%);
    background-attachment: fixed;
}

.app {
    background: transparent;
}

/* Frosted surfaces */
.side,
.topbar,
.card,
.stat,
.table,
.table-wrap,
.search-panel,
.tutor,
.modal,
.podium-card,
.gap-card,
.boost-hud,
.boost-q,
.rank-box {
    background: var(--glass);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    border-color: var(--glass-line);
    box-shadow: var(--glass-shadow);
}

.side {
    border-right: 1px solid var(--glass-line);
}

.topbar {
    border-bottom: 1px solid var(--glass-line);
}

/* ---------- Course Player (wireframe style) ---------- */
.player-wrap {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.player-main {
    flex: 1;
    min-width: 0;
}

.video {
    background: #2C2C2A;
    border-radius: var(--r-lg);
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 10px;
    overflow: hidden;
}

.play-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(241, 239, 232, .94);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #2C2C2A;
    cursor: pointer;
}

.seek {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text2);
    margin-bottom: 14px;
}

.seek .bar {
    flex: 1;
    height: 4px;
}

.sidecol {
    width: 300px;
    flex-shrink: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    display: flex;
    flex-direction: column;
    height: 520px;
    overflow: hidden;
}

.side-tabs {
    display: flex;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
}

.side-tab {
    flex: 1;
    border: none;
    background: none;
    padding: 11px 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-bottom: 2px solid transparent;
}

.side-tab i {
    font-size: 15px;
}

.side-tab:hover {
    background: var(--bg2);
}

.side-tab.on {
    color: var(--purple);
    border-bottom-color: var(--purple);
}

.side-pane {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.side-pane.toc {
    overflow-y: auto;
    padding: 12px;
}

.syll .item,
.side-pane .item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: var(--r-md);
    font-size: 12px;
    color: var(--text2);
    cursor: pointer;
    text-decoration: none;
}

.side-pane .item.now {
    background: var(--purple-bg);
    color: var(--text);
    font-weight: 600;
}

.side-pane .item.done .toc-ic {
    background: var(--green-bg);
    color: var(--green-tx);
}

.side-pane .item:hover {
    background: var(--bg2);
}

.toc-ic {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: var(--purple-bg);
    color: var(--purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.toc-t {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
}

.toc-m {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--text2);
    margin-top: 1px;
}

.back-link {
    font-size: 12px;
    color: var(--text2);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
    background: none;
    border: none;
}

.back-link:hover {
    color: var(--text);
}

@media (max-width: 880px) {
    .player-wrap {
        flex-wrap: wrap;
    }

    .sidecol {
        width: 100%;
        height: 440px;
    }
}

/* ---------- Certificate Modal ---------- */
.cert {
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: #FDFCF9;
    padding: 34px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cert::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 2px solid var(--purple-lt);
    border-radius: 6px;
    pointer-events: none;
}

.cert .c-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--purple);
    color: var(--purple-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 10px;
}

.cert .c-kicker {
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text2);
}

.cert h2 {
    font-size: 21px;
    font-weight: 600;
    margin: 4px 0 14px;
}

.cert .c-name {
    font-size: 24px;
    font-weight: 600;
    color: var(--purple-dk);
    margin: 6px 0;
}

.cert .c-line {
    width: 180px;
    height: 1px;
    background: var(--border2);
    margin: 4px auto 12px;
}

.cert .c-course {
    font-size: 14px;
    font-weight: 600;
    margin: 4px 0 2px;
}

.cert .c-meta {
    font-size: 11px;
    color: var(--text2);
}

.cert .c-foot {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 24px;
    font-size: 10px;
    color: var(--text2);
    text-align: left;
}

.cert .c-sig {
    text-align: center;
}

.cert .c-sig b {
    display: block;
    font-size: 13px;
    color: var(--text);
    font-style: italic;
    font-family: Georgia, serif;
}

.cert-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 14px;
}

/* ---------- Admin pages: input & select styling ---------- */
input[type=search],
input[type=text],
select {
    font-size: 13px;
    border: 1px solid var(--border2);
    border-radius: 20px;
    padding: 8px 14px;
    background: var(--bg);
    color: var(--text);
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236E6D66' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

select {
    padding-right: 32px;
}

input[type=search],
input[type=text] {
    background-image: none;
}

input[type=search]:focus,
input[type=text]:focus,
select:focus {
    border-color: var(--purple);
}

/* ---------- Bulk action buttons (pill style) ---------- */
.as-bulk .btn.sm,
.ac-bulk .btn.sm,
.ct-bulk .btn.sm {
    border-radius: 18px;
    padding: 6px 14px;
}

.as-bulk,
.ac-bulk,
.ct-bulk {
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text2);
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 8px 12px;
    border-radius: var(--r-md);
    border: 1px solid transparent;
}

.ct-bulk.active {
    background: var(--purple-bg);
    border-color: var(--purple-lt);
}

/* ---------- Course Type Picker ---------- */
.ac-picker {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.ac-ptype {
    border: 1px solid var(--border2);
    border-radius: var(--r-md);
    background: var(--bg);
    padding: 14px 10px;
    cursor: pointer;
    text-align: center;
    transition: .12s;
}

.ac-ptype:hover {
    border-color: var(--purple);
    background: var(--purple-bg);
}

.ac-ptype.on {
    border-color: var(--purple);
    background: var(--purple-bg);
    box-shadow: 0 0 0 3px var(--purple-bg);
}

.ac-ptype i {
    font-size: 20px;
    color: var(--purple);
    display: block;
    margin-bottom: 5px;
}

.ac-ptype b {
    font-size: 12px;
    display: block;
}

@media (max-width: 600px) {
    .ac-picker {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------- All buttons pill-shaped ---------- */
.btn {
    border-radius: 20px;
}

.pg-head .btn {
    border-radius: 20px;
}

/* ---------- Dropdown Menu ---------- */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 20;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    padding: 6px;
    min-width: 220px;
    display: none;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text);
    border-radius: var(--r-sm);
    cursor: pointer;
}

.dropdown-menu button:hover {
    background: var(--bg2);
}

.dropdown-menu button i {
    font-size: 16px;
    color: var(--text2);
}