/* Lumen LMS — Design System */
:root {
    --bg: #FFFFFF;
    --bg2: #F5F4EF;
    --border: #E3E1DA;
    --border2: #CFCDC4;
    --text: #2C2C2A;
    --text2: #6E6D66;
    --text3: #A3A199;
    --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;
}

* {
    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: 13px;
    line-height: 1.5;
}

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

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

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

.topbar {
    height: 54px;
    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;
}

.page-content {
    max-width: 980px;
}

/* ---------- 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: 11px;
}

.role-switch a {
    flex: 1;
    border: none;
    background: transparent;
    padding: 6px 0;
    border-radius: var(--r-sm);
    cursor: pointer;
    color: var(--text2);
    font-size: 11px;
    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: 11px;
    color: var(--text2);
}

.stat b {
    font-size: 21px;
    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: 12px;
    border: 1px solid var(--border2);
    background: var(--bg);
    border-radius: var(--r-md);
    padding: 7px 13px;
    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: 11px;
    padding: 4px 10px;
}

/* ---------- Chips ---------- */
.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.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: 11px;
    font-weight: 600;
    color: var(--text2);
}

.trow {
    display: flex;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    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: 12px;
    border: 1px solid var(--border2);
    border-radius: var(--r-md);
    padding: 7px 11px;
    background: var(--bg);
    color: var(--text);
    outline: none;
    width: 100%;
}

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

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

.field {
    margin-bottom: 12px;
}

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

.toggle::after {
    content: "";
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border2);
    position: absolute;
    top: 1px;
    left: 1px;
    transition: left .15s;
}

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

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

/* ---------- 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: 12px;
    font-weight: 600;
    color: var(--text2);
    margin: 18px 0 10px;
}

.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: 18px;
    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);
}

/* ---------- Section heading ---------- */
.sec {
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    margin: 18px 0 10px;
}

/* ---------- 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);
}