:root {
    --navy: #102a43;
    --navy-2: #183b56;
    --blue: #1769e0;
    --blue-dark: #0b55c7;
    --blue-soft: #eaf2ff;
    --aqua: #14b8a6;
    --amber: #f59e0b;
    --rose: #ef5b68;
    --ink: #162337;
    --muted: #6b7c93;
    --line: #e3eaf2;
    --surface: #ffffff;
    --canvas: #f4f7fb;
    --shadow: 0 12px 32px rgba(27, 53, 87, .09);
    --radius: 16px;
    --sidebar: 252px;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--canvas); }

body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: "DM Sans", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(480px, 1.1fr) minmax(420px, .9fr);
    background: #fff;
}

.login-brand {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    padding: 56px 7vw;
    color: white;
    background:
        radial-gradient(circle at 73% 70%, rgba(64, 201, 255, .22), transparent 24%),
        radial-gradient(circle at 8% 8%, rgba(45, 212, 191, .13), transparent 24%),
        linear-gradient(145deg, #0b2641 0%, #103c6d 55%, #0f57a5 100%);
}

.login-brand::before,
.login-brand::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 50%;
}

.login-brand::before { width: 520px; height: 520px; right: -120px; bottom: -120px; }
.login-brand::after { width: 360px; height: 360px; right: -40px; bottom: -40px; }

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff;
    background: linear-gradient(145deg, #1d7cf2, #0aa7c2);
    border-radius: 13px;
    box-shadow: 0 8px 18px rgba(15, 105, 224, .25);
    font-family: "Manrope", sans-serif;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.08em;
}

.brand-mark span { color: #9ff5ec; font-size: .72em; }
.brand-mark--large { width: 58px; height: 58px; font-size: 22px; border-radius: 17px; }

.login-copy {
    position: relative;
    z-index: 2;
    max-width: 610px;
    margin-top: 18vh;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.login-brand .eyebrow { color: #7ee8dc; }
.login-copy h1 {
    margin: 0;
    font: 800 clamp(44px, 5.2vw, 76px)/1.02 "Manrope", sans-serif;
    letter-spacing: -.055em;
}
.login-copy > p:last-child {
    max-width: 530px;
    margin: 28px 0 0;
    color: rgba(255,255,255,.72);
    font-size: 18px;
    line-height: 1.65;
}

.login-orbit { position: absolute; inset: 0; pointer-events: none; }
.orbit-card {
    position: absolute;
    z-index: 2;
    width: 132px;
    padding: 16px;
    color: rgba(255,255,255,.66);
    background: rgba(255,255,255,.09);
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 17px;
    backdrop-filter: blur(12px);
    font-size: 12px;
}
.orbit-card strong { display: block; margin-top: 6px; color: #fff; font-size: 25px; }
.orbit-card--one { right: 10%; bottom: 18%; transform: rotate(3deg); }
.orbit-card--two { right: 31%; bottom: 7%; transform: rotate(-4deg); }
.orbit-dot { position: absolute; width: 10px; height: 10px; background: #67e8f9; border-radius: 50%; box-shadow: 0 0 24px #67e8f9; }
.orbit-dot--one { right: 20%; top: 24%; }
.orbit-dot--two { left: 15%; bottom: 20%; }

.login-panel {
    display: grid;
    place-items: center;
    padding: 48px;
    background: #fff;
}
.login-form { width: min(410px, 100%); }
.mobile-brand { display: none; align-items: center; gap: 12px; margin-bottom: 56px; font: 800 21px "Manrope"; }
.login-form h2 { margin: 0; font: 800 34px "Manrope"; letter-spacing: -.035em; }
.form-intro { margin: 12px 0 34px; color: var(--muted); line-height: 1.55; }

.field { display: grid; gap: 9px; margin: 0 0 20px; color: #334e68; font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    color: var(--ink);
    background: #fff;
    border: 1px solid #d8e1ec;
    border-radius: 10px;
    outline: none;
    transition: border-color .18s, box-shadow .18s;
}
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: #68a6f5;
    box-shadow: 0 0 0 4px rgba(23,105,224,.1);
}
.field input::placeholder, .field textarea::placeholder { color: #a3afbf; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 55px; }
.password-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); padding: 5px; color: var(--blue); background: none; border: 0; font-size: 12px; font-weight: 700; }
.form-error { min-height: 20px; margin: 0 0 10px; color: #c53030; font-size: 13px; }
.login-help { margin: 26px 0 0; color: #8291a5; text-align: center; font-size: 12px; }

.btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 17px;
    border: 0;
    border-radius: 10px;
    font-weight: 700;
    transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { cursor: wait; opacity: .65; transform: none; }
.btn--primary { color: white; background: var(--blue); box-shadow: 0 8px 20px rgba(23,105,224,.2); }
.btn--primary:hover { background: var(--blue-dark); }
.btn--secondary { color: var(--blue); background: var(--blue-soft); }
.btn--ghost { color: #52657a; background: #eef2f7; box-shadow: none; }
.btn--danger { color: #b42332; background: #ffedf0; box-shadow: none; }
.btn--danger:hover { background: #ffdfe4; }
.btn--wide { width: 100%; min-height: 50px; justify-content: space-between; padding-inline: 20px; }
.btn--small { min-height: 34px; padding: 7px 11px; border-radius: 8px; font-size: 12px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) 1fr; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    width: var(--sidebar);
    display: flex;
    flex-direction: column;
    padding: 22px 16px 18px;
    color: #cad8e8;
    background: var(--navy);
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 26px; color: #fff; text-decoration: none; }
.sidebar-brand strong { display: block; font: 800 18px "Manrope"; }
.sidebar-brand small { display: block; margin-top: 2px; color: #8ea9c3; font-size: 11px; }
.main-nav { flex: 1; }
.nav-label { margin: 18px 12px 8px; color: #6988a6; font-size: 10px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
    padding: 11px 12px;
    color: #b9cbe0;
    background: transparent;
    border: 0;
    border-radius: 10px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(23,105,224,.85), rgba(28,129,214,.55)); }
.nav-icon { width: 22px; color: #86bafc; text-align: center; font-size: 18px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 14px 8px 0; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-user-copy { min-width: 0; flex: 1; }
.sidebar-user-copy strong, .sidebar-user-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-copy strong { color: #fff; font-size: 12px; }
.sidebar-user-copy small { margin-top: 3px; color: #7795b2; font-size: 10px; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: linear-gradient(145deg, #37b8bf, #1d75dc); border-radius: 12px; font-size: 12px; font-weight: 800; }
.avatar--small { width: 36px; height: 36px; border-radius: 50%; }
.icon-button { width: 32px; height: 32px; color: #90a9c1; background: transparent; border: 0; border-radius: 8px; }
.icon-button:hover { color: #fff; background: rgba(255,255,255,.07); }

.workspace { min-width: 0; grid-column: 2; }
.topbar {
    height: 86px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 32px;
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
}
.page-kicker { margin: 0 0 3px; color: var(--muted); font-size: 11px; }
.topbar h1 { margin: 0; font: 800 21px "Manrope"; letter-spacing: -.025em; }
.topbar-actions { display: flex; align-items: center; gap: 13px; margin-left: auto; }
.search-shell { position: relative; width: 300px; }
.search-box { width: 100%; display: flex; align-items: center; gap: 8px; padding: 0 12px; color: #8495a8; background: #f3f6fa; border: 1px solid #edf1f6; border-radius: 10px; }
.search-box input { width: 100%; height: 38px; background: transparent; border: 0; outline: 0; font-size: 12px; }
.search-results { position: absolute; top: calc(100% + 9px); right: 0; z-index: 40; width: min(420px, calc(100vw - 36px)); max-height: 430px; overflow-y: auto; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 18px 45px rgba(25,47,74,.18); }
.search-group-title { margin: 7px 9px 5px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.search-result { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; color: var(--ink); background: transparent; border: 0; border-radius: 9px; text-align: left; }
.search-result:hover, .search-result:focus { background: var(--blue-soft); outline: 0; }
.search-result-icon { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; color: var(--blue); background: #edf5ff; border-radius: 9px; font-size: 10px; font-weight: 800; }
.search-result strong, .search-result small { display: block; }
.search-result strong { font-size: 12px; }
.search-result small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.search-empty { padding: 22px 15px; color: var(--muted); text-align: center; font-size: 12px; }
.notification-button { width: 36px; height: 36px; color: var(--blue); background: var(--blue-soft); border: 0; border-radius: 50%; font-size: 9px; }
.menu-button { display: none; width: 36px; height: 36px; background: #eef3f8; border: 0; border-radius: 9px; }
.content { max-width: 1500px; margin: 0 auto; padding: 30px 32px 52px; outline: 0; }

.hero {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 30px;
    color: #fff;
    background: linear-gradient(120deg, #12365b, #1769e0);
    border-radius: 20px;
    box-shadow: var(--shadow);
}
.hero::after { content: ""; position: absolute; width: 260px; height: 260px; right: -70px; top: -110px; border: 48px solid rgba(255,255,255,.07); border-radius: 50%; }
.hero > * { position: relative; z-index: 1; }
.hero .eyebrow { color: #93eee5; }
.hero h2 { margin: 0 0 10px; font: 800 clamp(24px, 3vw, 36px) "Manrope"; letter-spacing: -.035em; }
.hero p { max-width: 600px; margin: 0; color: rgba(255,255,255,.72); line-height: 1.55; }
.hero-actions { display: flex; align-items: center; gap: 10px; }
.hero .btn--primary { color: var(--blue); background: #fff; box-shadow: none; white-space: nowrap; }
.hero .btn--secondary { color: #fff; background: rgba(255,255,255,.12); white-space: nowrap; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 20px 0; }
.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 19px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.stat-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 12px; font-weight: 800; }
.stat-icon.blue { color: var(--blue); background: var(--blue-soft); }
.stat-icon.aqua { color: #0f9488; background: #e4fbf7; }
.stat-icon.amber { color: #c77a04; background: #fff6df; }
.stat-icon.rose { color: #d74453; background: #ffedf0; }
.stat-card strong { display: block; font: 800 24px "Manrope"; }
.stat-card span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }

.section { margin-top: 24px; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.section-header h2 { margin: 0; font: 800 19px "Manrope"; letter-spacing: -.025em; }
.section-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.section-actions { display: flex; gap: 9px; }

.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.course-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 6px 18px rgba(35,55,80,.04);
    transition: transform .18s, box-shadow .18s;
}
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.course-stripe { height: 6px; background: linear-gradient(90deg, var(--blue), #2fc8b6); }
.course-card-body { padding: 19px; }
.course-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.course-code { padding: 5px 8px; color: var(--blue); background: var(--blue-soft); border-radius: 7px; font-size: 10px; font-weight: 800; letter-spacing: .05em; }
.status { display: inline-flex; align-items: center; gap: 5px; color: #27826e; font-size: 10px; font-weight: 700; }
.status::before { content: ""; width: 6px; height: 6px; background: #33c795; border-radius: 50%; }
.course-card h3 { min-height: 48px; margin: 0 0 7px; font: 800 17px/1.35 "Manrope"; }
.course-period { margin: 0; color: var(--muted); font-size: 11px; }
.course-teacher { min-height: 38px; margin: 16px 0; padding-top: 14px; border-top: 1px solid #eef2f6; color: #52667b; font-size: 11px; line-height: 1.45; }
.course-counts { display: flex; gap: 18px; margin-bottom: 17px; color: var(--muted); font-size: 11px; }
.course-card-actions { display: flex; gap: 8px; }
.course-card-actions .btn:first-child { flex: 1; }

.empty-state { padding: 52px 24px; background: #fff; border: 1px dashed #cbd7e5; border-radius: var(--radius); text-align: center; }
.empty-icon { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 14px; color: var(--blue); background: var(--blue-soft); border-radius: 18px; font-size: 25px; }
.empty-state h3 { margin: 0 0 7px; font: 800 18px "Manrope"; }
.empty-state p { max-width: 480px; margin: 0 auto 18px; color: var(--muted); font-size: 13px; }

.data-card { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.table-toolbar { display: flex; gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); }
.table-search { min-width: 220px; display: flex; align-items: center; gap: 7px; margin-left: auto; padding: 0 10px; color: #8495a8; background: #f5f7fa; border: 1px solid #e8edf3; border-radius: 9px; }
.table-search input { width: 100%; height: 34px; background: transparent; border: 0; outline: 0; font-size: 11px; }
.filter-chip { padding: 7px 12px; color: #66788d; background: #f4f7fa; border: 0; border-radius: 8px; font-size: 11px; font-weight: 700; }
.filter-chip.active { color: var(--blue); background: var(--blue-soft); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 18px; border-bottom: 1px solid #eef2f6; text-align: left; font-size: 12px; }
th { color: #78899c; background: #fbfcfe; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
tbody tr:hover { background: #fafcff; }
.person-cell { display: flex; align-items: center; gap: 11px; }
.person-cell .avatar { width: 34px; height: 34px; border-radius: 10px; }
.person-cell strong { display: block; font-size: 12px; }
.person-cell small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.role-badge { display: inline-flex; padding: 5px 8px; color: #315f8f; background: #edf5fd; border-radius: 7px; font-size: 10px; font-weight: 700; }
.row-actions { display: flex; align-items: center; gap: 7px; white-space: nowrap; }

.classroom-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.back-button { width: 40px; height: 40px; color: var(--blue); background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.classroom-title { flex: 1; }
.classroom-title h2 { margin: 0; font: 800 22px "Manrope"; }
.classroom-title p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.progress-pill { min-width: 190px; padding: 11px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--muted); font-size: 10px; }
.progress-bar { height: 5px; overflow: hidden; background: #e9eef4; border-radius: 9px; }
.progress-bar span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--blue), var(--aqua)); }
.classroom-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 18px; }
.module-stack { display: grid; gap: 18px; align-content: start; }
.module-card { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.module-header { display: flex; align-items: center; gap: 11px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.module-symbol { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; font-weight: 800; }
.module-symbol.blue { color: var(--blue); background: var(--blue-soft); }
.module-symbol.aqua { color: #0f9488; background: #e4fbf7; }
.module-symbol.amber { color: #c77a04; background: #fff6df; }
.module-symbol.rose { color: #d74453; background: #ffedf0; }
.module-symbol.purple { color: #7755c7; background: #f2edff; }
.module-header h3 { margin: 0; font: 800 14px "Manrope"; }
.module-header span { margin-left: auto; color: var(--muted); font-size: 10px; }
.module-body { padding: 12px 17px; }
.module-item { padding: 11px 0; border-bottom: 1px solid #eef2f6; }
.module-item:last-child { border: 0; }
.module-item strong { display: block; font-size: 12px; }
.module-item p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.module-empty { padding: 20px 5px; color: var(--muted); text-align: center; font-size: 11px; }

.profile-card { max-width: 670px; padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.profile-main { display: flex; align-items: center; gap: 16px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.profile-main .avatar { width: 58px; height: 58px; font-size: 17px; }
.profile-main h3 { margin: 0 0 4px; font: 800 19px "Manrope"; }
.profile-main p { margin: 0; color: var(--muted); font-size: 12px; }
.profile-details { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-top: 22px; }
.detail-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.detail-value { font-size: 13px; font-weight: 600; }

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(7,24,41,.58);
    backdrop-filter: blur(4px);
}
.modal { width: min(590px, 100%); max-height: calc(100vh - 44px); overflow-y: auto; background: #fff; border-radius: 18px; box-shadow: 0 28px 70px rgba(0,0,0,.25); }
.modal.modal--grading { width: min(760px, 100%); }
.modal-header { display: flex; justify-content: space-between; padding: 23px 25px 17px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font: 800 21px "Manrope"; }
.modal-close { width: 34px; height: 34px; color: #64768b; background: #f1f4f8; border: 0; border-radius: 9px; font-size: 22px; }
.modal-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0 15px; padding: 22px 25px 4px; }
.modal-body .field--full { grid-column: 1 / -1; }
.grading-evidence { margin-bottom: 17px; padding: 17px; background: #f4f8ff; border: 1px solid #cfe0f7; border-radius: 13px; }
.grading-evidence > header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.grading-evidence > header > strong { padding: 5px 9px; color: #1559aa; background: #fff; border: 1px solid #d7e5f6; border-radius: 999px; font-size: 9px; }
.grading-evidence h3 { margin: 2px 0 0; font: 800 15px "Manrope"; }
.evidence-kicker, .evidence-label { display: block; color: #58708a; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.evidence-list { display: grid; gap: 8px; max-height: 260px; overflow-y: auto; }
.grading-evidence article { padding: 13px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.evidence-list article { display: grid; grid-template-columns: auto 1fr; gap: 11px; }
.evidence-number { display: grid; place-items: center; width: 25px; height: 25px; color: #fff; background: var(--blue); border-radius: 50%; font-size: 10px; font-weight: 900; }
.grading-evidence article + article { margin-top: 8px; }
.grading-evidence time, .evidence-empty { color: var(--muted); font-size: 9px; }
.grading-evidence p { margin: 7px 0 0; color: #263b51; font-size: 12px; line-height: 1.65; }
.task-evidence-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 10px; }
.task-evidence-grid article { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.evidence-file-name { overflow-wrap: anywhere; color: #263b51; font-size: 11px; }
.modal .form-error { padding: 0 25px; }
.import-guide { margin-bottom: 18px; padding: 15px 16px; color: #40566d; background: var(--blue-soft); border: 1px solid #d9eaff; border-radius: 11px; }
.import-guide strong { display: block; color: var(--ink); font-size: 13px; }
.import-guide p { margin: 6px 0 9px; font-size: 11px; line-height: 1.5; }
.import-guide a { color: var(--blue); font-size: 11px; font-weight: 800; }
.delete-warning { padding: 17px; color: #6f2630; background: #fff1f3; border: 1px solid #ffd2d9; border-radius: 11px; }
.delete-warning strong { display: block; color: #9f2534; font-size: 14px; }
.delete-warning p { margin: 7px 0 0; font-size: 12px; line-height: 1.55; }
.modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 17px 25px 22px; }

.toast-region { position: fixed; z-index: 200; right: 22px; top: 20px; display: grid; gap: 10px; }
.toast { min-width: 270px; max-width: 370px; padding: 13px 15px; color: #fff; background: #173a5d; border-radius: 11px; box-shadow: var(--shadow); font-size: 12px; animation: toast-in .22s ease-out; }
.toast.error { background: #b93d49; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-7px); } }

.skeleton { overflow: hidden; position: relative; min-height: 120px; background: #edf2f7; border-radius: var(--radius); }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: shimmer 1.2s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }

.classroom-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 18px 0;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(135deg, #f7f9ff, #fff);
    box-shadow: var(--shadow);
}
.classroom-tools > div:first-child { display: grid; gap: 3px; }
.classroom-tools span, .form-hint { color: var(--muted); font-size: 11px; }
.classroom-tool-actions, .inline-actions, .resource-list { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-actions, .resource-list { margin-top: 9px; }
.resource-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 9px;
    color: var(--blue);
    background: var(--blue-soft);
    border-radius: 9px;
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
}
.media-resource { display: grid; width: 100%; gap: 6px; color: var(--ink); font-size: 10px; font-weight: 700; }
.media-resource audio, .media-resource video { width: 100%; max-height: 220px; border-radius: 10px; }
.student-module-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 3px 2px;
    color: var(--blue);
    background: none;
    border: 0;
    font: 800 12px "Manrope";
    text-align: left;
    cursor: pointer;
}
.student-module-link:hover span { text-decoration: underline; }
.student-module-link b { font-size: 17px; transition: transform .18s; }
.student-module-link:hover b { transform: translateX(3px); }
.student-detail-head { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.student-detail-head > div { display: grid; gap: 2px; }
.student-detail-head span { color: var(--blue); font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.student-detail-head h2 { margin: 0; font: 800 24px "Manrope"; letter-spacing: -.025em; }
.student-detail-head p { margin: 0; color: var(--muted); font-size: 11px; }
.student-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 18px; }
.student-detail-main { display: grid; gap: 18px; }
.student-content-card, .student-action-card, .discussion-list, .quiz-shell, .quiz-result {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.student-content-card { padding: 24px; }
.student-content-card h3, .student-action-card h3, .discussion-list h3 { margin: 0 0 12px; font: 800 15px "Manrope"; }
.content-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.content-meta span { padding: 6px 9px; color: #3d536b; background: var(--surface); border-radius: 999px; font-size: 9px; font-weight: 800; }
.rich-copy { color: #3d4d5e; font-size: 12px; line-height: 1.8; }
.lesson-resources, .task-attachments { display: grid; gap: 12px; margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--line); }
.media-resource--expanded { gap: 9px; padding: 14px; background: var(--surface); border-radius: 13px; font-size: 11px; }
.media-resource--expanded video { max-height: 460px; background: #15202b; }
.external-video { display: grid; gap: 10px; }
.external-video > strong { font-size: 11px; }
.external-video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 13px; background: #15202b; }
.external-video .resource-link { justify-self: start; }
.document-preview { display: grid; gap: 10px; }
.document-preview > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.document-preview iframe { width: 100%; min-height: 560px; border: 1px solid var(--line); border-radius: 12px; }
.image-resource { margin: 0; }
.image-resource img { display: block; max-width: 100%; border-radius: 12px; }
.image-resource figcaption { margin-top: 7px; color: var(--muted); font-size: 10px; }
.student-action-card { position: sticky; top: 88px; padding: 20px; }
.student-action-card > p { color: var(--muted); font-size: 11px; line-height: 1.6; }
.student-action-card form { display: grid; gap: 13px; margin-top: 16px; }
.student-action-card .btn { width: 100%; }
.status-chip { display: inline-flex; margin-bottom: 13px; padding: 5px 9px; color: #17664a; background: #eaf8f2; border-radius: 999px; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.status-chip.is-closed { color: #9a3944; background: #fff0f2; }
.status-chip.is-complete { color: #17664a; }
.discussion-list { padding: 22px; }
.discussion-reply { display: grid; grid-template-columns: auto 1fr; gap: 11px; padding: 15px 0; border-top: 1px solid var(--line); }
.discussion-reply header { display: flex; justify-content: space-between; gap: 10px; }
.discussion-reply strong { font-size: 11px; }
.discussion-reply time { color: var(--muted); font-size: 9px; }
.discussion-reply p { margin: 6px 0 0; color: #3d4d5e; font-size: 11px; line-height: 1.65; }
.upload-field small { color: var(--muted); font-size: 9px; }
.submission-success { display: grid; gap: 3px; margin-top: 15px; padding: 12px; color: #17664a; background: #eaf8f2; border-radius: 11px; font-size: 10px; }
.evaluation-window { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 24px; }
.evaluation-window div { display: grid; gap: 5px; padding: 13px; background: var(--surface); border-radius: 11px; }
.evaluation-window span { color: var(--muted); font-size: 9px; }
.evaluation-window strong { font-size: 10px; }
.quiz-shell { overflow: hidden; }
.quiz-toolbar { position: sticky; z-index: 2; top: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 22px; background: #fff; border-bottom: 1px solid var(--line); }
.quiz-toolbar > div:first-child { display: grid; gap: 3px; }
.quiz-toolbar span { color: var(--muted); font-size: 9px; }
.quiz-toolbar strong { font-size: 12px; }
.quiz-timer { display: grid; min-width: 130px; padding: 9px 13px; color: #17664a; background: #eaf8f2; border-radius: 11px; text-align: right; }
.quiz-timer strong { font: 800 22px "Manrope"; letter-spacing: .03em; }
.quiz-timer.is-warning { color: #9a3944; background: #fff0f2; }
#quiz-form { padding: 24px; }
.quiz-question { margin: 0 0 18px; padding: 20px; background: var(--canvas); border: 1px solid var(--line); border-radius: 14px; }
.quiz-question legend { display: flex; justify-content: space-between; width: 100%; padding: 0 4px; color: var(--blue); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.quiz-question legend b { color: var(--muted); }
.quiz-question > p { margin: 5px 0 16px; font-size: 12px; font-weight: 700; line-height: 1.6; }
.quiz-options { display: grid; gap: 8px; }
.quiz-options label { display: flex; align-items: center; gap: 10px; padding: 11px 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.quiz-options label:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.quiz-options span { font-size: 11px; }
.quiz-open-answer { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; resize: vertical; }
.quiz-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 8px; }
.quiz-actions > span { margin-right: auto; color: var(--muted); font-size: 10px; }
.quiz-result { display: grid; justify-items: center; max-width: 590px; margin: 30px auto; padding: 44px; text-align: center; }
.result-icon { display: grid; place-items: center; width: 58px; height: 58px; color: #fff; background: #27a77a; border-radius: 50%; font-size: 26px; }
.quiz-result span, .quiz-result p { color: var(--muted); font-size: 11px; }
.quiz-result h3 { margin: 8px 0 0; font: 800 30px "Manrope"; }
.weight-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.weight-grid > div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 12px;
    background: var(--surface);
    border-radius: 11px;
    font-size: 11px;
}
.weight-grid .weight-total { color: #17664a; background: #eaf8f2; }
.option-builder {
    display: grid;
    gap: 10px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
}
.option-row { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.option-row input[type="text"] { width: 100%; }

.gradebook-head { align-items: flex-end; }
.grade-course-select { display: grid; gap: 5px; min-width: 260px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.grade-course-select select { min-height: 40px; padding: 0 11px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; text-transform: none; }
.weight-editor { margin-bottom: 18px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.weight-editor > header, .weight-editor > footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.weight-editor h3 { margin: 0 0 4px; font: 800 16px "Manrope"; }
.weight-editor p, .weight-editor footer span { margin: 0; color: var(--muted); font-size: 11px; }
.weight-summary { display: grid; min-width: 90px; text-align: right; }
.weight-summary strong { color: var(--blue); font: 800 22px "Manrope"; }
.weight-summary span { color: var(--muted); font-size: 10px; }
.weight-activity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 17px 0; }
.weight-activity-grid label { display: grid; gap: 7px; padding: 12px; background: var(--canvas); border-radius: 11px; }
.weight-activity-grid label > span { overflow: hidden; color: var(--ink); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.weight-activity-grid label > div { display: flex; align-items: center; gap: 5px; }
.weight-input { width: 100%; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
#weight-editor-status.is-error { color: #b93d49; font-weight: 800; }
.gradebook-card { overflow: hidden; }
.gradebook-table { min-width: 760px; }
.gradebook-table th { min-width: 135px; vertical-align: bottom; white-space: normal; }
.gradebook-table th:first-child { min-width: 220px; }
.gradebook-table th small, .grade-student small, .grade-final small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 600; }
.grade-activity-type { display: block; margin-bottom: 5px; color: var(--blue); font-size: 8px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.grade-input { width: 82px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; text-align: center; }
.grade-input:disabled { color: #9aa9b8; background: #f0f3f6; }
.grade-value, .grade-final strong { font-weight: 800; }
.gradebook-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; }

@media (max-width: 1120px) {
    .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .search-shell { width: 230px; }
}

@media (max-width: 860px) {
    .login-page { grid-template-columns: 1fr; }
    .login-brand { display: none; }
    .mobile-brand { display: flex; }
    .login-panel { min-height: 100vh; padding: 32px 24px; }
    .app-shell { display: block; }
    .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: 20px 0 50px rgba(0,0,0,.16); }
    .sidebar.open { transform: translateX(0); }
    .workspace { width: 100%; }
    .menu-button { display: block; }
    .topbar { padding: 0 18px; }
    .content { padding: 22px 18px 42px; }
    .search-shell { width: min(250px, 48vw); }
    .notification-button { display: none; }
    .classroom-grid { grid-template-columns: 1fr; }
    .classroom-tools { align-items: flex-start; flex-direction: column; }
    .weight-activity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .student-detail-layout { grid-template-columns: 1fr; }
    .student-action-card { position: static; }
}

@media (max-width: 590px) {
    .course-grid, .stat-grid { grid-template-columns: 1fr; }
    .hero { display: block; padding: 24px; }
    .hero-actions { margin-top: 20px; flex-wrap: wrap; }
    .section-header { align-items: flex-start; }
    .section-actions { flex-wrap: wrap; justify-content: flex-end; }
    .modal-body { grid-template-columns: 1fr; }
    .modal-body .field--full { grid-column: auto; }
    .task-evidence-grid { grid-template-columns: 1fr; }
    .classroom-head { align-items: flex-start; flex-wrap: wrap; }
    .progress-pill { width: 100%; }
    .topbar-actions .avatar { display: none; }
    .profile-details { grid-template-columns: 1fr; }
    .section-actions { width: 100%; justify-content: flex-start; }
    .table-toolbar { flex-wrap: wrap; }
    .table-search { width: 100%; margin-left: 0; }
    .gradebook-head, .weight-editor > header, .weight-editor > footer, .gradebook-footer { align-items: stretch; flex-direction: column; }
    .grade-course-select { min-width: 0; width: 100%; }
    .weight-activity-grid { grid-template-columns: 1fr; }
    .weight-summary { text-align: left; }
    .evaluation-window { grid-template-columns: 1fr; }
    .quiz-toolbar, .quiz-actions { align-items: stretch; flex-direction: column; }
    .quiz-timer { text-align: left; }
}
