:root {
    --bg: #f7f6fb;
    --surface: #ffffff;
    --surface-soft: #f2f0f8;
    --surface-raised: #ffffff;
    --ink: #211d2f;
    --muted: #706b7f;
    --line: #e9e5f2;
    --primary: #5b3fd9;
    --primary-dark: #4329b2;
    --primary-soft: #eeeafd;
    --gold: #dcae35;
    --gold-soft: #fff7df;
    --success: #138a5b;
    --success-soft: #e8f8f0;
    --danger: #c43c4c;
    --danger-soft: #fff0f2;
    --warning: #a26712;
    --warning-soft: #fff7e7;
    --info: #2d67b3;
    --info-soft: #edf5ff;
    --shadow-sm: 0 1px 2px rgba(28, 20, 55, .05), 0 6px 18px rgba(47, 33, 97, .06);
    --shadow-md: 0 18px 50px rgba(50, 35, 105, .13);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --sidebar-width: 264px;
}

html[data-theme="dark"] {
    --bg: #100e18;
    --surface: #181522;
    --surface-soft: #211d2d;
    --surface-raised: #201c2c;
    --ink: #f5f1ff;
    --muted: #aaa3ba;
    --line: #312b40;
    --primary: #8f76ff;
    --primary-dark: #7259ea;
    --primary-soft: #2b2349;
    --gold: #efc65a;
    --gold-soft: #332b18;
    --success: #5bd39d;
    --success-soft: #173427;
    --danger: #ff8995;
    --danger-soft: #3c1e25;
    --warning: #efc16a;
    --warning-soft: #382d19;
    --info: #75a9ee;
    --info-soft: #192b43;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .15), 0 8px 24px rgba(0, 0, 0, .18);
    --shadow-md: 0 18px 50px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
svg.icon { width: 20px; height: 20px; flex: 0 0 auto; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 2px; }

.skip-link {
    position: fixed; left: 16px; top: -80px; z-index: 1000;
    background: var(--primary); color: white; padding: 10px 14px; border-radius: 10px;
}
.skip-link:focus { top: 16px; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 60;
    width: var(--sidebar-width); display: flex; flex-direction: column;
    background: var(--surface); border-right: 1px solid var(--line); padding: 24px 18px;
}
.sidebar__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.brand__mark {
    display: inline-grid; place-items: center; width: 39px; height: 39px; flex: 0 0 auto;
    border-radius: 13px; color: white; background: linear-gradient(145deg, var(--primary), #785bea);
    font-weight: 800; box-shadow: 0 10px 28px rgba(91, 63, 217, .25);
}
.brand__copy { display: grid; min-width: 0; }
.brand__copy strong { font-size: 14px; letter-spacing: -.02em; white-space: nowrap; }
.brand__copy small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.sidebar__nav { display: flex; flex-direction: column; gap: 5px; margin-top: 34px; overflow-y: auto; }
.nav-label { margin: 0 10px 8px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.nav-label--spaced { margin-top: 22px; }
.nav-item {
    display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px;
    border-radius: 13px; color: var(--muted); font-size: 13px; font-weight: 650; transition: .2s ease;
}
.nav-item:hover { background: var(--surface-soft); color: var(--ink); transform: translateX(2px); }
.nav-item--active { color: var(--primary); background: var(--primary-soft); }
.sidebar__footer { margin-top: auto; border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 12px; }
.sidebar-profile { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sidebar-profile__copy { display: grid; min-width: 0; }
.sidebar-profile__copy strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-profile__copy small { font-size: 10px; color: var(--muted); }
.avatar {
    width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center;
    flex: 0 0 auto; background: var(--primary); color: white; font-size: 12px; font-weight: 800;
}
.logout-button {
    border: 0; width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    background: transparent; color: var(--muted); border-radius: 12px; font-size: 12px; font-weight: 650;
}
.logout-button:hover { color: var(--danger); background: var(--danger-soft); }
.sidebar__close { display: none; }
.sidebar-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(22, 16, 37, .5); backdrop-filter: blur(4px); }

.main-column { width: calc(100% - var(--sidebar-width)); margin-left: var(--sidebar-width); min-width: 0; }
.topbar {
    min-height: 98px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding: 22px clamp(22px, 4vw, 52px); background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 40; border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}
.topbar__left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar h1 { margin: 1px 0 0; font-size: clamp(20px, 2vw, 27px); letter-spacing: -.035em; line-height: 1.2; }
.eyebrow { margin: 0; color: var(--primary); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .16em; }
.topbar__description { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.topbar__actions { display: flex; align-items: center; gap: 10px; }
.icon-button {
    position: relative; width: 40px; height: 40px; display: inline-grid; place-items: center;
    border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--ink);
}
.icon-button:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); box-shadow: var(--shadow-sm); }
.mobile-menu-button { display: none; }
.notification-dot {
    position: absolute; right: -5px; top: -6px; min-width: 19px; height: 19px; padding: 0 5px;
    display: grid; place-items: center; border-radius: 999px; background: var(--danger); color: white;
    font-size: 9px; font-weight: 800; border: 2px solid var(--bg);
}
.user-menu { position: relative; }
.profile-button {
    min-height: 43px; display: flex; align-items: center; gap: 10px; padding: 3px 10px 3px 4px;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px;
}
.profile-button__copy { display: grid; text-align: left; max-width: 140px; }
.profile-button__copy strong { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-button__copy small { color: var(--muted); font-size: 9px; }
.user-menu__panel {
    position: absolute; right: 0; top: calc(100% + 10px); width: 210px; z-index: 80;
    border: 1px solid var(--line); background: var(--surface-raised); box-shadow: var(--shadow-md); border-radius: 16px; padding: 7px;
}
.user-menu__panel a, .user-menu__panel button {
    width: 100%; border: 0; background: transparent; color: var(--ink); display: flex; align-items: center; gap: 10px;
    padding: 10px; border-radius: 10px; font-size: 12px; text-align: left;
}
.user-menu__panel a:hover, .user-menu__panel button:hover { background: var(--surface-soft); }

.page-content { max-width: 1440px; margin: 0 auto; padding: 30px clamp(22px, 4vw, 52px) 70px; }
.flash {
    margin: 16px clamp(22px, 4vw, 52px) 0; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    border: 1px solid; border-radius: 13px; font-size: 12px; font-weight: 600;
}
.flash button { border: 0; background: transparent; color: currentColor; font-size: 20px; line-height: 1; }
.flash--success { color: var(--success); background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.flash--error { color: var(--danger); background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.flash--warning { color: var(--warning); background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 30%, transparent); }
.flash--info { color: var(--info); background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 30%, transparent); }

.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--dashboard { grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); align-items: start; }
.stack { display: grid; gap: 18px; }
.stack--sm { gap: 10px; }
.section { margin-bottom: 28px; }
.section-header { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-header h2, .section-header h3 { margin: 0; font-size: 16px; letter-spacing: -.025em; }
.section-header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.section-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.card__body { padding: 20px; }
.card__header { padding: 17px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.card__header h2, .card__header h3 { margin: 0; font-size: 14px; }
.card__header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.card--interactive { transition: .2s ease; }
.card--interactive:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--primary) 30%, var(--line)); }
.card--empty { text-align: center; padding: 42px 24px; }
.card--empty .empty-icon { width: 58px; height: 58px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 18px; background: var(--primary-soft); color: var(--primary); }
.card--empty h2, .card--empty h3 { margin: 0 0 5px; }
.card--empty p { max-width: 480px; margin: 0 auto; color: var(--muted); font-size: 12px; }

.hero-card { overflow: hidden; background: linear-gradient(135deg, #5034cc, #7458e8 65%, #9a79ee); color: white; border: 0; }
.hero-card__content { position: relative; z-index: 2; padding: clamp(24px, 4vw, 38px); }
.hero-card::before, .hero-card::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero-card { position: relative; }
.hero-card::before { width: 230px; height: 230px; right: -70px; top: -95px; }
.hero-card::after { width: 150px; height: 150px; left: 42%; bottom: -105px; }
.hero-card h2 { max-width: 680px; margin: 10px 0 8px; font-size: clamp(24px, 3vw, 38px); line-height: 1.12; letter-spacing: -.045em; }
.hero-card p { max-width: 620px; margin: 0; color: rgba(255,255,255,.78); font-size: 13px; }
.hero-card__meta { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 18px; }
.hero-card__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.hero-card__progress { margin-top: 24px; max-width: 760px; }

.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 25px; padding: 0 10px; border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: 10px; font-weight: 750; }
.pill--primary { background: var(--primary-soft); color: var(--primary); }
.pill--success { background: var(--success-soft); color: var(--success); }
.pill--warning { background: var(--warning-soft); color: var(--warning); }
.pill--danger { background: var(--danger-soft); color: var(--danger); }
.pill--gold { background: var(--gold-soft); color: var(--warning); }
.pill--glass { background: rgba(255,255,255,.14); color: white; border: 1px solid rgba(255,255,255,.15); }

.button {
    min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 11px; font-weight: 800; transition: .2s ease;
}
.button:hover { transform: translateY(-1px); }
.button--primary { color: white; background: var(--primary); }
.button--primary:hover { background: var(--primary-dark); box-shadow: 0 10px 24px rgba(91, 63, 217, .25); }
.button--secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.button--secondary:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.button--ghost { background: transparent; color: var(--primary); }
.button--danger { color: white; background: var(--danger); }
.button--light { color: var(--primary-dark); background: white; }
.button--glass { color: white; border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.1); }
.button--sm { min-height: 33px; padding: 0 12px; border-radius: 10px; font-size: 10px; }
.button--block { width: 100%; }

.progress { height: 8px; border-radius: 999px; background: var(--surface-soft); overflow: hidden; }
.progress__bar { height: 100%; border-radius: inherit; background: var(--primary); transition: width .35s ease; }
.progress--light { background: rgba(255,255,255,.16); }
.progress--light .progress__bar { background: white; }
.progress-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; font-size: 10px; color: var(--muted); }
.hero-card .progress-meta { color: rgba(255,255,255,.75); }

.metric-card { padding: 18px; }
.metric-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.metric-card__icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: var(--primary-soft); color: var(--primary); }
.metric-card__value { margin: 17px 0 2px; font-size: 26px; font-weight: 850; letter-spacing: -.04em; }
.metric-card__label { color: var(--muted); font-size: 11px; }
.metric-card__foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }

.action-list { display: grid; }
.action-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.action-row:last-child { border-bottom: 0; }
.action-row__main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.action-row__icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; background: var(--primary-soft); color: var(--primary); }
.action-row strong { display: block; font-size: 12px; }
.action-row small { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }
.action-row:hover { background: color-mix(in srgb, var(--surface-soft) 65%, transparent); }

.day-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.day-chip { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-soft); color: var(--muted); font-size: 10px; font-weight: 800; border: 1px solid var(--line); }
.day-chip--complete { background: var(--primary); color: white; border-color: var(--primary); }
.day-chip--current { color: var(--primary); border: 2px solid var(--primary); background: var(--primary-soft); }

.teaching-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .65fr); gap: 22px; align-items: start; }
.media-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #171329; overflow: hidden; border-radius: 18px; }
.media-frame iframe, .media-frame video { width: 100%; height: 100%; border: 0; display: block; }
.audio-player { padding: 32px; min-height: 220px; display: grid; place-items: center; text-align: center; background: radial-gradient(circle at top right, #7a5ae6, #35236f 60%, #211541); color: white; border-radius: 18px; }
.audio-player audio { width: min(520px, 100%); margin-top: 20px; }
.audio-player__icon { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.14); margin: 0 auto; }
.teaching-copy h2 { margin: 8px 0; font-size: clamp(21px, 3vw, 30px); letter-spacing: -.04em; }
.teaching-copy p { color: var(--muted); font-size: 12px; }
.teaching-list { display: grid; gap: 9px; max-height: calc(100vh - 190px); overflow-y: auto; padding-right: 4px; }
.teaching-item { display: flex; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.teaching-item:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.teaching-item--current { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
.teaching-item--locked { opacity: .62; }
.teaching-item__status { width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; background: var(--surface-soft); color: var(--muted); }
.teaching-item--completed .teaching-item__status { background: var(--success-soft); color: var(--success); }
.teaching-item--current .teaching-item__status { background: var(--primary); color: white; }
.teaching-item__copy { min-width: 0; }
.teaching-item__copy strong { display: block; font-size: 11px; line-height: 1.35; }
.teaching-item__copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.teaching-day-group h3 { margin: 3px 0 9px; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-group { display: grid; gap: 7px; }
.form-group--full { grid-column: 1 / -1; }
.form-label { font-size: 10px; font-weight: 800; color: var(--ink); text-transform: uppercase; letter-spacing: .08em; }
.form-help { color: var(--muted); font-size: 9px; }
.input, .select, .textarea {
    width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
    background: var(--surface); color: var(--ink); outline: none; transition: .2s ease;
}
.textarea { min-height: 120px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent); }
.input-group { position: relative; }
.input-group .input { padding-right: 46px; }
.input-action { position: absolute; right: 5px; top: 5px; width: 33px; height: 33px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); border-radius: 9px; }
.checkbox-row { display: flex; align-items: center; gap: 9px; font-size: 11px; }
.checkbox-row input { width: 17px; height: 17px; accent-color: var(--primary); }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 9px; margin-top: 18px; flex-wrap: wrap; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 720px; }
.table th, .table td { padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: left; font-size: 11px; vertical-align: middle; }
.table th { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .11em; font-weight: 800; background: color-mix(in srgb, var(--surface-soft) 65%, transparent); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in srgb, var(--surface-soft) 55%, transparent); }
.table-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; background: var(--muted); }
.status-dot--active { background: var(--success); }
.status-dot--pending { background: var(--warning); }
.status-dot--suspended { background: var(--danger); }

.timeline { display: grid; gap: 14px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 38px 1fr; gap: 12px; }
.timeline-item:not(:last-child)::after { content: ""; position: absolute; left: 18px; top: 38px; bottom: -15px; width: 1px; background: var(--line); }
.timeline-item__marker { width: 38px; height: 38px; z-index: 1; border-radius: 13px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.timeline-item__body { padding: 2px 0 12px; }
.timeline-item__body h3 { margin: 0; font-size: 12px; }
.timeline-item__body p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }

.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.search-box { position: relative; min-width: min(360px, 100%); }
.search-box .input { padding-left: 40px; }
.search-box svg { position: absolute; left: 12px; top: 12px; color: var(--muted); }
.pagination { display: flex; gap: 6px; justify-content: flex-end; margin-top: 15px; }
.pagination a, .pagination span { min-width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; font-size: 10px; background: var(--surface); }
.pagination .is-current { color: white; background: var(--primary); border-color: var(--primary); }

.stat-list { display: grid; gap: 13px; }
.stat-list__item { display: grid; gap: 7px; }
.stat-list__meta { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; }
.stat-list__meta span:last-child { color: var(--muted); }

.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; background: rgba(22, 16, 37, .58); backdrop-filter: blur(5px); }
.modal[hidden] { display: none; }
.modal__card { width: min(520px, 100%); max-height: 90vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-md); }

.auth-body { background: #171126; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 1fr) minmax(420px, .85fr); }
.auth-visual { position: relative; padding: clamp(32px, 6vw, 76px); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; background: radial-gradient(circle at 70% 10%, rgba(181,144,255,.38), transparent 35%), linear-gradient(145deg, #271653, #5b3fd9 60%, #7f5dea); color: white; }
.auth-visual::after { content: ""; position: absolute; width: 420px; height: 420px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; right: -160px; bottom: -180px; box-shadow: 0 0 0 80px rgba(255,255,255,.035), 0 0 0 160px rgba(255,255,255,.025); }
.brand--light .brand__copy small { color: rgba(255,255,255,.65); }
.auth-visual__copy { position: relative; z-index: 2; max-width: 680px; }
.auth-visual__copy h1 { margin: 17px 0 14px; font-size: clamp(38px, 5vw, 67px); line-height: .98; letter-spacing: -.065em; }
.auth-visual__copy p { max-width: 580px; color: rgba(255,255,255,.72); font-size: 14px; }
.auth-visual__quote { position: relative; z-index: 2; max-width: 510px; font-size: 12px; color: rgba(255,255,255,.7); }
.auth-visual__quote strong { color: white; }
.auth-panel { display: grid; place-items: center; padding: 28px; background: var(--bg); }
.auth-card { width: min(440px, 100%); }
.auth-card .flash { margin: 0 0 18px; }
.auth-card__header { margin-bottom: 25px; }
.auth-card__header h1 { margin: 0; font-size: 30px; letter-spacing: -.045em; }
.auth-card__header p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.auth-card__footer { margin-top: 20px; text-align: center; color: var(--muted); font-size: 11px; }
.auth-card__footer a { color: var(--primary); font-weight: 750; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; margin: 19px 0; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }

.mobile-bottom-nav { display: none; }
.hidden { display: none !important; }
.text-muted { color: var(--muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-sm { font-size: 11px; }
.text-xs { font-size: 9px; }
.text-right { text-align: right; }
.font-bold { font-weight: 800; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex-wrap { flex-wrap: wrap; }

@media (max-width: 1120px) {
    .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .teaching-layout { grid-template-columns: minmax(0, 1fr) 320px; }
}

@media (max-width: 900px) {
    .sidebar { transform: translateX(-102%); transition: transform .25s ease; box-shadow: var(--shadow-md); }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar__close, .mobile-menu-button { display: inline-grid; }
    .main-column { width: 100%; margin-left: 0; }
    .topbar { min-height: 82px; padding: 16px 18px; }
    .page-content { padding: 24px 18px 92px; }
    .flash { margin-inline: 18px; }
    .grid--dashboard, .teaching-layout { grid-template-columns: 1fr; }
    .teaching-list { max-height: none; }
    .mobile-bottom-nav {
        position: fixed; left: 50%; bottom: 12px; z-index: 45; transform: translateX(-50%);
        width: min(540px, calc(100% - 24px)); display: grid; grid-template-columns: repeat(5, 1fr);
        padding: 6px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--surface) 92%, transparent);
        backdrop-filter: blur(16px); box-shadow: var(--shadow-md);
    }
    .mobile-bottom-nav a { min-height: 50px; display: grid; place-items: center; align-content: center; gap: 2px; color: var(--muted); border-radius: 13px; font-size: 8px; font-weight: 700; }
    .mobile-bottom-nav a svg { width: 18px; height: 18px; }
    .mobile-bottom-nav a.is-active { color: var(--primary); background: var(--primary-soft); }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-visual { min-height: 340px; padding: 32px; }
    .auth-visual__copy h1 { font-size: clamp(34px, 10vw, 52px); }
}

@media (max-width: 640px) {
    .topbar__description, .profile-button__copy { display: none; }
    .topbar h1 { font-size: 19px; }
    .topbar__actions { gap: 7px; }
    .profile-button { padding-right: 4px; }
    .grid--2, .grid--3, .grid--4, .form-grid { grid-template-columns: 1fr; }
    .hero-card__content { padding: 23px; }
    .hero-card h2 { font-size: 27px; }
    .card__body { padding: 16px; }
    .section-header { align-items: flex-start; flex-direction: column; }
    .section-actions { width: 100%; }
    .section-actions .button { flex: 1; }
    .form-group--full { grid-column: auto; }
    .form-actions { justify-content: stretch; }
    .form-actions .button { flex: 1; }
    .auth-panel { padding: 26px 20px 40px; }
    .auth-visual { min-height: 290px; }
    .auth-visual__quote { display: none; }
    .auth-card__header h1 { font-size: 27px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
