@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg: #F4F6FA;
    --surface: #FFFFFF;
    --border: #E4E7ED;
    --border-2: #CBD0D9;

    --navy: #1A2B47;
    --navy-dk: #0F1D32;
    --navy-h: rgba(255, 255, 255, 0.07);

    --gold: #C49A2A;
    --gold-lt: rgba(196, 154, 42, 0.11);
    --gold-bd: rgba(196, 154, 42, 0.28);

    --green: #0B8F6E;
    --green-bg: rgba(11, 143, 110, 0.10);
    --green-dk: #097A5E;

    --amber: #D97706;
    --amber-bg: rgba(217, 119, 6, 0.09);
    --amber-bd: rgba(217, 119, 6, 0.22);

    --red: #DC2626;
    --red-bg: rgba(220, 38, 38, 0.08);

    --fg: #111827;
    --fg-2: #374151;
    --fg-mu: #6B7280;
    --fg-sub: #9CA3AF;

    --r-sm: 7px;
    --r-md: 11px;
    --r-lg: 14px;
    --sh-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --sh-md: 0 4px 14px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0E1117;
        --surface: #161C27;
        --border: #252D3E;
        --border-2: #303A50;
        --navy: #1C2D48;
        --navy-dk: #111924;
        --fg: #E2E8F0;
        --fg-2: #C1CAD6;
        --fg-mu: #8A94A6;
        --fg-sub: #626F82;
        --gold-lt: rgba(196, 154, 42, 0.14);
        --green-bg: rgba(11, 143, 110, 0.14);
        --amber-bg: rgba(217, 119, 6, 0.12);
        --red-bg: rgba(220, 38, 38, 0.12);
        --sh-sm: 0 1px 3px rgba(0, 0, 0, 0.22);
        --sh-md: 0 4px 14px rgba(0, 0, 0, 0.28);
    }
}

:root[data-theme="dark"] {
    --bg: #0E1117;
    --surface: #161C27;
    --border: #252D3E;
    --border-2: #303A50;
    --navy: #1C2D48;
    --navy-dk: #111924;
    --fg: #E2E8F0;
    --fg-2: #C1CAD6;
    --fg-mu: #8A94A6;
    --fg-sub: #626F82;
    --gold-lt: rgba(196, 154, 42, 0.14);
    --green-bg: rgba(11, 143, 110, 0.14);
    --amber-bg: rgba(217, 119, 6, 0.12);
    --red-bg: rgba(220, 38, 38, 0.12);
    --sh-sm: 0 1px 3px rgba(0, 0, 0, 0.22);
    --sh-md: 0 4px 14px rgba(0, 0, 0, 0.28);
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    background: var(--bg);
    color: var(--fg);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ── AUTH LAYOUT ─────────────────────────────────────── */

.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 24px 16px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 40px 36px;
    box-shadow: var(--sh-md);
}

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
}

.auth-logo-tag {
    font-size: 11px;
    color: var(--fg-mu);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 2px;
}

.auth-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
}

.auth-sub {
    font-size: 13px;
    color: var(--fg-mu);
    margin-bottom: 24px;
}

.auth-foot {
    text-align: center;
    font-size: 13px;
    color: var(--fg-mu);
    margin-top: 18px;
}

.auth-links-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 8px;
}

.auth-links-row a,
.auth-links-row button.link-text {
    font-size: 12px;
    color: var(--gold);
    font-weight: 500;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    text-decoration: none;
}

.auth-links-row a:hover,
.auth-links-row button.link-text:hover {
    text-decoration: underline;
}

.auth-foot a {
    color: var(--gold);
    font-weight: 500;
    cursor: pointer;
}

.auth-info {
    margin-top: 14px;
    padding: 12px 14px;
    background: var(--bg);
    border-radius: var(--r-sm);
    font-size: 13px;
    color: var(--fg-mu);
}

/* ── FORM ELEMENTS ───────────────────────────────────── */

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--fg-2);
    margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--border-2);
    border-radius: var(--r-sm);
    font-family: inherit;
    font-size: 14px;
    color: var(--fg);
    background: var(--surface);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.field textarea {
    height: auto;
    min-height: 100px;
    padding: 12px 14px;
    resize: vertical;
    line-height: 1.5;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-lt);
}

.field-hint {
    font-size: 12px;
    color: var(--fg-mu);
    margin-top: 5px;
}

.field-row {
    display: flex;
    gap: 14px;
}

.field-row .field {
    flex: 1;
    min-width: 0;
}

/* ── ALERT ───────────────────────────────────────────── */

.alert {
    padding: 11px 14px;
    border-radius: var(--r-sm);
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

.alert.show {
    display: block;
}

.alert-error {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.alert-success {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid rgba(11, 143, 110, 0.2);
}

/* ── BUTTONS ─────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 42px;
    padding: 0 20px;
    border-radius: var(--r-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background 0.15s, opacity 0.15s;
    min-width: 100px;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-full {
    width: 100%;
}

.btn-navy {
    background: var(--navy);
    color: #fff;
}

.btn-navy:hover:not(:disabled) {
    background: #1f3558;
}

.btn-gold {
    background: var(--gold);
    color: #fff;
}

.btn-gold:hover:not(:disabled) {
    background: #af881f;
}

.btn-green {
    background: var(--green);
    color: #fff;
}

.btn-green:hover:not(:disabled) {
    background: var(--green-dk);
}

.btn-ghost {
    background: transparent;
    color: var(--fg-2);
    border: 1px solid var(--border-2);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--bg);
}

.btn-danger {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.btn-sm {
    height: 34px;
    font-size: 13px;
    padding: 0 14px;
    min-width: 70px;
}

.btn-xs {
    height: 28px;
    font-size: 12px;
    padding: 0 10px;
    min-width: 50px;
    border-radius: 5px;
}

.icon-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    border-radius: var(--r-sm);
    background: transparent;
    border: 1px solid var(--border);
    color: var(--fg-mu);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
}

.icon-btn:hover {
    background: var(--bg);
    color: var(--fg);
}

.icon-btn.del:hover {
    background: var(--red-bg);
    color: var(--red);
}

/* ── APP LAYOUT ──────────────────────────────────────── */

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ── SIDEBAR ─────────────────────────────────────────── */

.sidebar {
    width: 220px;
    min-width: 220px;
    height: 100vh;
    background: var(--navy);
    position: sticky;
    top: 0;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar.admin {
    background: var(--navy-dk);
}

.sb-brand {
    padding: 22px 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sb-brand-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.sb-brand-tag {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.38);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-top: 2px;
}

.sb-nav {
    flex: 1;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.sb-section {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.28);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 8px 10px 3px;
}

.ni {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--r-sm);
    color: rgba(255, 255, 255, 0.62);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    border: none;
    background: transparent;
    font-family: inherit;
    text-align: left;
    width: 100%;
    text-decoration: none;
}

.ni:hover {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.9);
}

.ni.active {
    background: var(--gold-lt);
    color: #EDD87A;
}

.ni-icon {
    font-size: 15px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.ni-badge {
    margin-left: auto;
    background: var(--gold);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.sb-user {
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sb-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    transition: color 0.15s, background 0.15s;
}

.sb-logout:hover {
    color: #fff;
    background: rgba(220, 38, 38, 0.12);
}

.sb-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gold-lt);
    border: 1.5px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    flex-shrink: 0;
}

.sb-u-info {
    min-width: 0;
    flex: 1;
}

.sb-u-name {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sb-u-role {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.32);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── MAIN CONTENT ────────────────────────────────────── */

.main {
    flex: 1;
    min-height: 100vh;
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
}

.main-inner {
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
}

.pg-hdr {
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.pg-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--fg);
}

.pg-sub {
    font-size: 13px;
    color: var(--fg-mu);
    margin-top: 3px;
}

.pg-hdr-r {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

/* ── CARDS ───────────────────────────────────────────── */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-sm);
}

.card-pad {
    padding: 20px 24px;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

/* ── CHIPS / BADGES ──────────────────────────────────── */

.chip {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    flex-shrink: 0;
}

.chip-done {
    background: var(--green-bg);
    color: var(--green);
}

.chip-curr {
    background: var(--gold-lt);
    color: var(--gold);
}

.chip-lock {
    background: var(--bg);
    color: var(--fg-sub);
}

.day-chip {
    background: var(--gold-lt);
    color: var(--gold);
    border: 1px solid var(--gold-bd);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

/* ── WEEK ACCORDION ──────────────────────────────────── */

.week-list {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.week-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--sh-sm);
}

.week-hdr {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 20px;
    cursor: pointer;
    user-select: none;
    width: 100%;
    background: transparent;
    border: none;
    font-family: inherit;
    text-align: left;
    transition: background 0.15s;
}

.week-hdr:hover {
    background: var(--bg);
}

.w-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.w-badge.done {
    background: var(--green-bg);
    color: var(--green);
}

.w-badge.active {
    background: var(--gold-lt);
    color: var(--gold);
    border: 1px solid var(--gold-bd);
}

.w-badge.locked {
    background: var(--bg);
    color: var(--fg-sub);
    border: 1px solid var(--border);
}

.week-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--fg);
    flex: 1;
    min-width: 0;
}

.week-prog {
    font-size: 12px;
    color: var(--fg-mu);
    flex-shrink: 0;
}

.wchev {
    font-size: 12px;
    color: var(--fg-sub);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.wchev.open {
    transform: rotate(180deg);
}

.week-body {
    border-top: 1px solid var(--border);
    padding: 16px 20px 20px;
}

.prog-bar-wrap {
    height: 4px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
    width: 80px;
}

.prog-bar {
    height: 100%;
    background: var(--green);
    border-radius: 10px;
}

/* ── MODULE ──────────────────────────────────────────── */

.mod-sec {
    margin-bottom: 18px;
}

.mod-sec:last-child {
    margin-bottom: 0;
}

.mod-hdr {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.mod-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mod-dot.done {
    background: var(--green);
}

.mod-dot.prog {
    background: var(--gold);
}

.mod-dot.locked {
    background: var(--fg-sub);
}

.mod-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--fg-mu);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── LESSON ROW ──────────────────────────────────────── */

.lesson-rows {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.lr {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 13px;
    border-radius: var(--r-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.1s;
    text-decoration: none;
}

.lr:hover:not(.locked) {
    background: var(--bg);
}

.lr.curr {
    background: var(--gold-lt);
    border-color: var(--gold-bd);
}

.lr.locked {
    opacity: 0.42;
    cursor: not-allowed;
    pointer-events: none;
}

.lr-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.lr-title {
    font-size: 14px;
    color: var(--fg-2);
    flex: 1;
    min-width: 0;
}

.lr.curr .lr-title {
    color: var(--fg);
    font-weight: 600;
}

.lr-dur {
    font-size: 12px;
    color: var(--fg-sub);
    flex-shrink: 0;
}

.lr.act {
    border-left: 3px solid var(--amber);
    background: var(--amber-bg);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.lr.act:hover:not(.locked) {
    background: rgba(217, 119, 6, 0.14);
}

.act-pill {
    font-size: 10px;
    font-weight: 700;
    color: var(--amber);
    background: rgba(217, 119, 6, 0.13);
    padding: 2px 7px;
    border-radius: 10px;
    flex-shrink: 0;
}

/* ── LESSON VIEW ─────────────────────────────────────── */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 500;
    color: var(--fg-mu);
    cursor: pointer;
    margin-bottom: 18px;
    border: none;
    background: none;
    font-family: inherit;
    text-decoration: none;
}

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

.lesson-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.lesson-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.video-box {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    margin-bottom: 20px;
}

.video-box iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.notes-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.notes-heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fg-mu);
    margin-bottom: 10px;
}

.notes-body {
    font-size: 14px;
    color: var(--fg-2);
    line-height: 1.7;
}

.lesson-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ── LIVE CLASSES ────────────────────────────────────── */

.live-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.live-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--sh-sm);
}

.live-date {
    text-align: center;
    flex-shrink: 0;
    min-width: 48px;
}

.live-date-d {
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
}

.live-date-m {
    font-size: 10px;
    font-weight: 600;
    color: var(--fg-mu);
    text-transform: uppercase;
}

.live-sep {
    width: 1px;
    height: 40px;
    background: var(--border);
    flex-shrink: 0;
}

.live-info {
    flex: 1;
    min-width: 0;
}

.live-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 3px;
}

.live-time {
    font-size: 13px;
    color: var(--fg-mu);
}

.live-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    flex-shrink: 0;
}

.live-badge.up {
    background: var(--green-bg);
    color: var(--green);
}

.live-badge.past {
    background: var(--bg);
    color: var(--fg-sub);
}

.live-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ── NOTIFICATIONS ───────────────────────────────────── */

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

.notif-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notif-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 14px 18px;
    display: flex;
    gap: 13px;
    align-items: flex-start;
}

.notif-card.unread {
    border-left: 3px solid var(--gold);
}

.notif-card.unread .notif-msg {
    font-weight: 500;
    color: var(--fg);
}

.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
}

.notif-card.unread .notif-dot {
    background: var(--gold);
}

.notif-card.read .notif-dot {
    background: var(--border);
}

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

.notif-msg {
    font-size: 14px;
    color: var(--fg-2);
    line-height: 1.5;
}

.notif-time {
    font-size: 12px;
    color: var(--fg-sub);
    margin-top: 4px;
}

.link-text {
    color: var(--gold);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

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

/* ── ADMIN STUDENTS TABLE ────────────────────────────── */

.table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--sh-sm);
}

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

.data-table th {
    padding: 11px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--fg-mu);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 13px 16px;
    font-size: 13px;
    color: var(--fg-2);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

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

.data-table tr:hover td {
    background: var(--bg);
}

.status-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    text-transform: capitalize;
}

.status-pill.approved {
    background: var(--green-bg);
    color: var(--green);
}

.status-pill.pending {
    background: var(--amber-bg);
    color: var(--amber);
    border: 1px solid var(--amber-bd);
}

.status-pill.revoked {
    background: var(--red-bg);
    color: var(--red);
}

.td-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* ── ADMIN CURRICULUM ────────────────────────────────── */

.admin-lesson-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    margin-bottom: 6px;
}

.admin-lesson-row:last-child {
    margin-bottom: 0;
}

.a-day {
    font-size: 11px;
    font-weight: 700;
    color: var(--fg-mu);
    flex-shrink: 0;
    min-width: 36px;
}

.a-title {
    font-size: 13px;
    color: var(--fg-2);
    flex: 1;
    min-width: 0;
}

.a-actions {
    display: flex;
    gap: 4px;
}

/* ── ADMIN FORM ──────────────────────────────────────── */

.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px;
    box-shadow: var(--sh-sm);
}

.form-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--fg-mu);
    margin-bottom: 14px;
}

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

/* ── ADMIN LIVE CLASSES ──────────────────────────────── */

.a-live-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.a-live-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.a-live-info {
    flex: 1;
    min-width: 0;
}

.a-live-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 3px;
}

.a-live-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.a-live-meta span {
    font-size: 12px;
    color: var(--fg-mu);
}

.a-live-meta a {
    font-size: 12px;
    color: var(--gold);
}

.a-live-meta a:hover {
    text-decoration: underline;
}

.a-live-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.inline-form {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 18px;
    margin-bottom: 16px;
}

.inline-form-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 14px;
}

/* ── ADMIN NOTIFICATIONS ─────────────────────────────── */

.notif-compose {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--sh-sm);
}

.notif-log {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--sh-sm);
}

.notif-log-hdr {
    padding: 13px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    color: var(--fg);
}

.notif-log-row {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

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

.n-to {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--bg);
    color: var(--fg-mu);
    flex-shrink: 0;
    margin-top: 1px;
    white-space: nowrap;
}

.n-text {
    font-size: 13px;
    color: var(--fg-2);
    flex: 1;
    min-width: 0;
    line-height: 1.45;
}

.n-time {
    font-size: 11px;
    color: var(--fg-sub);
    flex-shrink: 0;
    white-space: nowrap;
}

/* ── OTP INPUT ───────────────────────────────────────── */

.otp-wrap {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.otp-input {
    width: 48px !important;
    height: 56px !important;
    text-align: center;
    font-size: 22px !important;
    font-weight: 700;
    border-radius: var(--r-sm) !important;
    padding: 0 !important;
}

.otp-timer {
    text-align: center;
    font-size: 13px;
    color: var(--fg-mu);
    margin-bottom: 16px;
}

.otp-timer span {
    font-weight: 600;
    color: var(--gold);
}

/* ── PROGRESS SUMMARY ────────────────────────────────── */

.progress-summary {
    text-align: right;
}

.progress-summary-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--green);
}

.progress-summary-bar {
    width: 140px;
    margin-top: 6px;
    margin-left: auto;
}

/* ── EMPTY STATE ─────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--fg-mu);
    font-size: 14px;
}

.empty-state-icon {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* ── MOBILE LAYOUT ───────────────────────────────────── */

.mob-wrap {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg);
}

.mob-hdr {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--navy);
    padding: 13px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mob-hdr.admin {
    background: var(--navy-dk);
}

.mob-hdr-brand {
    display: flex;
    flex-direction: column;
}

.mob-hdr-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.mob-hdr-sub {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 1px;
}

.mob-hdr-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mob-hdr-day {
    font-size: 11px;
    font-weight: 600;
    color: var(--gold);
    background: var(--gold-lt);
    padding: 3px 8px;
    border-radius: 10px;
}

.mob-hdr-logout {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
}

.mob-body {
    flex: 1;
    padding: 16px 16px 84px;
}

.mob-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}

.mob-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 4px 8px;
    text-decoration: none;
    color: var(--fg-sub);
    font-size: 10px;
    font-weight: 500;
    gap: 3px;
    position: relative;
    transition: color 0.15s;
}

.mob-nav-item.active {
    color: var(--gold);
}

.mob-nav-icon {
    font-size: 20px;
    line-height: 1;
}

.mob-nav-label {
    font-size: 10px;
}

.mob-nav-badge {
    position: absolute;
    top: 7px;
    right: calc(50% - 16px);
    background: var(--gold);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 1.4;
}

/* ── MOBILE PAGE HEADER ──────────────────────────────── */

.mob-pg-hdr {
    margin-bottom: 16px;
}

.mob-pg-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--fg);
}

.mob-pg-sub {
    font-size: 12px;
    color: var(--fg-mu);
    margin-top: 2px;
}

.mob-pg-hdr-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

/* ── MOBILE PROGRESS ─────────────────────────────────── */

.mob-progress {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.mob-progress-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--green);
    flex-shrink: 0;
}

.mob-progress-bar-wrap {
    flex: 1;
    height: 5px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
}

/* ── MOBILE LESSON VIEW ──────────────────────────────── */

.mob-lesson-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.mob-lesson-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 14px;
    line-height: 1.35;
}

.mob-video-box {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    margin-bottom: 14px;
}

.mob-video-box iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.mob-complete-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

/* ── MOBILE LIVE CLASSES ─────────────────────────────── */

.mob-live-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: var(--sh-sm);
}

.mob-live-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.mob-live-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--fg);
    flex: 1;
    min-width: 0;
    margin-right: 8px;
}

.mob-live-time {
    font-size: 12px;
    color: var(--fg-mu);
    margin-top: 3px;
}

/* ── MOBILE NOTIF ────────────────────────────────────── */

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

/* ── MOBILE AUTH ─────────────────────────────────────── */

.mob-auth-wrap {
    min-height: 100vh;
    background: var(--bg);
    padding: 32px 16px 24px;
    display: flex;
    flex-direction: column;
}

.mob-auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.mob-auth-logo-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
}

.mob-auth-logo-tag {
    font-size: 11px;
    color: var(--fg-mu);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 3px;
}

.mob-auth-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
}

.mob-auth-sub {
    font-size: 13px;
    color: var(--fg-mu);
    margin-bottom: 24px;
}

.mob-auth-foot {
    text-align: center;
    font-size: 13px;
    color: var(--fg-mu);
    margin-top: 20px;
}

.mob-auth-foot a {
    color: var(--gold);
    font-weight: 500;
}

.mob-auth-links-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 8px;
}

.mob-auth-links-row a,
.mob-auth-links-row button.link-text {
    font-size: 12px;
    color: var(--gold);
    font-weight: 500;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    text-decoration: none;
}

.mob-auth-links-row a:hover,
.mob-auth-links-row button.link-text:hover {
    text-decoration: underline;
}

.mob-auth-info {
    margin-top: 14px;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    font-size: 13px;
    color: var(--fg-mu);
}

/* ── MOBILE ADMIN ────────────────────────────────────── */

.mob-table {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
}

.mob-student-row {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.mob-student-info {
    flex: 1;
    min-width: 0;
}

.mob-student-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--fg);
}

.mob-student-meta {
    font-size: 11px;
    color: var(--fg-mu);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mob-lesson-row {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 11px 12px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mob-lesson-row:last-child {
    margin-bottom: 0;
}

.mob-a-class-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 13px 14px;
    margin-bottom: 8px;
}

.mob-a-class-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 4px;
}

.mob-a-class-meta {
    font-size: 11px;
    color: var(--fg-mu);
    margin-bottom: 8px;
}

.mob-a-class-actions {
    display: flex;
    gap: 6px;
}

.mob-notif-log {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    margin-top: 16px;
}

.mob-notif-log-hdr {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    font-weight: 700;
    color: var(--fg-mu);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mob-notif-log-row {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
}

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

.mob-notif-log-to {
    font-size: 10px;
    font-weight: 700;
    color: var(--fg-mu);
    margin-bottom: 3px;
}

.mob-notif-log-text {
    font-size: 12px;
    color: var(--fg-2);
    line-height: 1.45;
}

.mob-notif-log-time {
    font-size: 11px;
    color: var(--fg-sub);
    margin-top: 3px;
}