@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("fonts/dm-sans-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("fonts/dm-sans-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 600 800;
    font-display: swap;
    src: url("fonts/manrope-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 600 800;
    font-display: swap;
    src: url("fonts/manrope-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --ink: #17231f;
    --muted: #66736e;
    --muted-2: #8c9692;
    --paper: #ffffff;
    --canvas: #f3f5f1;
    --line: #e3e8e3;
    --line-strong: #d4dcd6;
    --forest-950: #102d26;
    --forest-900: #16382f;
    --forest-800: #1e4a3e;
    --forest-700: #27604f;
    --mint-100: #e5f3ec;
    --mint-200: #cee7da;
    --mint-600: #398365;
    --gold-100: #fff1d2;
    --gold-500: #d68b16;
    --red-100: #fde8e5;
    --red-500: #c8574b;
    --blue-100: #e6eff8;
    --blue-500: #4c78a4;
    --violet-100: #eee9f8;
    --violet-500: #7b62a4;
    --shadow-sm: 0 1px 2px rgb(22 56 47 / 5%), 0 6px 20px rgb(22 56 47 / 4%);
    --shadow-md: 0 16px 50px rgb(16 45 38 / 13%);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --sidebar-width: 256px;
    --font-body: "DM Sans", "Segoe UI", sans-serif;
    --font-display: "Manrope", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background: var(--canvas);
    font: 15px/1.5 var(--font-body);
    -webkit-font-smoothing: antialiased;
}

body.is-dialog-open {
    overflow: hidden;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    color: inherit;
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgb(57 131 101 / 25%);
    outline-offset: 2px;
}

svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--forest-900);
    font: 800 19px/1 var(--font-display);
    letter-spacing: -0.03em;
    text-decoration: none;
}

.brand--light {
    color: #fff;
}

.brand__mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: #fff;
    background: var(--mint-600);
    border-radius: 11px;
}

.brand__mark svg {
    width: 27px;
    height: 27px;
    stroke-width: 1.7;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 9px;
    color: var(--mint-600);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow--light {
    color: #91cbb3;
}

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 17px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 700;
    transition: transform 160ms ease, background 160ms ease, border 160ms ease, box-shadow 160ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:active {
    transform: translateY(0);
}

.button:disabled {
    opacity: 0.58;
    cursor: wait;
    pointer-events: none;
    transform: none;
}

.button svg {
    width: 18px;
    height: 18px;
}

.button--primary {
    color: #fff;
    background: var(--forest-800);
    box-shadow: 0 6px 18px rgb(30 74 62 / 16%);
}

.button--primary:hover {
    background: var(--forest-700);
    box-shadow: 0 8px 24px rgb(30 74 62 / 20%);
}

.button--secondary,
.button--ghost {
    color: var(--ink);
    background: #fff;
    border-color: var(--line-strong);
}

.button--secondary:hover,
.button--ghost:hover {
    background: #f8faf8;
    border-color: #c3cec7;
}

.button--danger {
    color: #fff;
    background: var(--red-500);
}

.button--danger:hover {
    background: #b7483e;
}

.button--wide {
    width: 100%;
}

.button--small {
    min-height: 38px;
    padding-inline: 14px;
    font-size: 13px;
}

.icon-button {
    display: inline-grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    color: var(--muted);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    transition: color 160ms ease, background 160ms ease, border 160ms ease;
}

.icon-button:hover {
    color: var(--forest-800);
    background: var(--mint-100);
    border-color: var(--mint-200);
}

.icon-button--inverse {
    color: #c3d5ce;
    background: transparent;
    border-color: rgb(255 255 255 / 12%);
}

/* Login */
.login-view {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(390px, 0.88fr) minmax(480px, 1.12fr);
}

.login-story {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(30px, 5vw, 64px);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 95% 14%, rgb(111 174 144 / 22%), transparent 32%),
        radial-gradient(circle at 12% 86%, rgb(213 177 83 / 10%), transparent 26%),
        var(--forest-950);
}

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

.login-story::before {
    width: 520px;
    height: 520px;
    top: 18%;
    left: -300px;
}

.login-story::after {
    width: 360px;
    height: 360px;
    right: -170px;
    bottom: -120px;
}

.login-story__content,
.login-story > .brand,
.login-story__foot {
    position: relative;
    z-index: 1;
}

.login-story__content {
    width: min(100%, 530px);
    margin: auto 0;
    padding-block: 54px;
}

.login-story h1 {
    max-width: 500px;
    margin: 0 0 22px;
    font: 800 clamp(42px, 5vw, 68px)/1.04 var(--font-display);
    letter-spacing: -0.055em;
}

.login-story__content > p {
    max-width: 500px;
    margin: 0;
    color: #bed0c9;
    font-size: 17px;
    line-height: 1.75;
}

.login-story__foot {
    margin: 0;
    color: #7fa094;
    font-size: 12px;
}

.story-preview {
    width: min(100%, 480px);
    margin-top: clamp(34px, 6vh, 66px);
    padding: 21px 22px 18px;
    background: rgb(255 255 255 / 7%);
    border: 1px solid rgb(255 255 255 / 9%);
    border-radius: var(--radius-md);
    box-shadow: 0 24px 60px rgb(0 0 0 / 15%);
    backdrop-filter: blur(8px);
}

.story-preview__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #d6e2de;
    font-size: 12px;
    font-weight: 700;
}

.story-preview__badge {
    padding: 4px 9px;
    color: #a9d5c2;
    background: rgb(114 184 151 / 14%);
    border-radius: 999px;
}

.story-bars {
    display: grid;
    height: 112px;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    align-items: end;
    margin-top: 16px;
}

.story-bars div {
    display: flex;
    height: 100%;
    flex-direction: column-reverse;
    align-items: center;
    gap: 7px;
    color: #7fa094;
    font-size: 10px;
}

.story-bars i {
    width: 100%;
    height: var(--height);
    background: #5fa283;
    border-radius: 5px 5px 2px 2px;
}

.story-bars i.is-high {
    background: #d1a54a;
}

.login-panel {
    display: grid;
    min-height: 100vh;
    padding: 40px;
    place-items: center;
    background: #f7f8f5;
}

.login-card {
    width: min(100%, 420px);
}

.login-card__mobile-brand {
    display: none;
    margin-bottom: 54px;
}

.login-card h2 {
    margin: 0 0 10px;
    font: 800 clamp(30px, 3vw, 40px)/1.15 var(--font-display);
    letter-spacing: -0.045em;
}

.form-intro {
    margin: 0 0 32px;
    color: var(--muted);
}

.stack-form {
    display: grid;
    gap: 19px;
}

.field {
    min-width: 0;
}

.field--full {
    grid-column: 1 / -1;
}

.field label {
    display: block;
    margin-bottom: 7px;
    color: #34423d;
    font-size: 13px;
    font-weight: 700;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    transition: border 160ms ease, box-shadow 160ms ease;
}

.field input,
.field select {
    height: 46px;
    padding: 0 13px;
}

.field textarea {
    min-height: 128px;
    padding: 12px 13px;
    resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #a2aaa7;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--mint-600);
    box-shadow: 0 0 0 3px rgb(57 131 101 / 9%);
    outline: none;
}

#homework-dialog .field input:disabled,
#homework-dialog .field select:disabled {
    color: #727d78;
    -webkit-text-fill-color: #727d78;
    background-color: #f0f2f1;
    border-color: #d8ddda;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 1;
}

#homework-dialog .field:has(input:disabled) label,
#homework-dialog .field:has(select:disabled) label {
    color: #7c8682;
}

#homework-dialog input[type="date"]:disabled::-webkit-calendar-picker-indicator {
    opacity: 0.45;
}

.field.has-error > input,
.field.has-error > select,
.field.has-error > textarea,
.field.has-error > .input-wrap input {
    border-color: var(--red-500);
}

.input-wrap {
    position: relative;
}

.input-wrap svg {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #87938e;
    transform: translateY(-50%);
    pointer-events: none;
}

.input-wrap input {
    padding-left: 43px;
}

.field-error {
    min-height: 17px;
    margin: 4px 0 0;
    color: var(--red-500);
    font-size: 11px;
}

.field-help {
    margin: 5px 0 0;
    color: var(--muted-2);
    font-size: 10px;
    line-height: 1.45;
}

.field-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted-2);
    font-size: 11px;
}

.field-meta .field-error {
    flex: 1;
}

.dialog .field-error {
    min-height: 0;
}

.dialog .field-error:empty {
    display: none;
    margin: 0;
}

.form-alert {
    margin-top: -4px;
    padding: 10px 12px;
    color: #973c34;
    background: var(--red-100);
    border-radius: 9px;
    font-size: 13px;
}

.demo-access {
    display: grid;
    width: 100%;
    grid-template-columns: auto 1fr auto;
    gap: 11px;
    align-items: center;
    margin-top: 26px;
    padding: 13px;
    color: var(--ink);
    text-align: left;
    background: transparent;
    border: 1px dashed #cad3cd;
    border-radius: 12px;
    cursor: pointer;
}

.demo-access:hover {
    background: #f1f5f1;
    border-color: #aebeb4;
}

.demo-access__icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: var(--forest-800);
    background: var(--mint-100);
    border-radius: 9px;
    font-weight: 800;
}

.demo-access strong,
.demo-access small {
    display: block;
}

.demo-access strong {
    font-size: 12px;
}

.demo-access small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.demo-access__action {
    color: var(--mint-600);
    font-size: 11px;
    font-weight: 800;
}

/* App shell */
.app-view {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    z-index: 40;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    padding: 25px 18px 18px;
    overflow-x: hidden;
    overflow-y: auto;
    color: #fff;
    background: var(--forest-950);
}

.sidebar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 9px;
}

.sidebar__close {
    display: none;
}

.sidebar__account {
    display: grid;
    gap: 13px;
    margin: 25px 0 0;
    padding: 16px 13px;
    background: rgb(255 255 255 / 5%);
    border: 1px solid rgb(255 255 255 / 6%);
    border-radius: 13px;
}

.sidebar__date {
    margin: 0 0 3px;
    color: #7fa093;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.sidebar__welcome {
    margin: 0;
    color: #fff;
    font: 800 14px/1.3 var(--font-display);
    letter-spacing: -0.02em;
}

.sidebar-profile {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
    padding-top: 12px;
    border-top: 1px solid rgb(255 255 255 / 7%);
}

.sidebar-profile .avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
}

.sidebar-profile .profile-button__text {
    min-width: 0;
}

.sidebar-profile .profile-button__text strong {
    color: #e7efec;
}

.sidebar-profile .profile-button__text small {
    max-width: 150px;
    overflow: hidden;
    color: #8fab9f;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.main-nav {
    margin-top: 27px;
}

.nav-label {
    margin: 0 12px 9px;
    color: #66877b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nav-item {
    position: relative;
    display: flex;
    width: 100%;
    height: 46px;
    align-items: center;
    gap: 12px;
    margin: 3px 0;
    padding: 0 13px;
    color: #a9beb6;
    background: transparent;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    transition: color 160ms ease, background 160ms ease;
}

.nav-item:hover {
    color: #fff;
    background: rgb(255 255 255 / 5%);
}

.nav-item.is-active {
    color: #fff;
    background: #1f4a3e;
}

.nav-item.is-active::before {
    position: absolute;
    width: 3px;
    height: 22px;
    left: -18px;
    content: "";
    background: #82c0a4;
    border-radius: 0 4px 4px 0;
}

.nav-item svg {
    width: 19px;
    height: 19px;
}

.sidebar__insight {
    margin-top: auto;

}

.sidebar__insight-icon {
    display: grid;
    width: 31px;
    height: 31px;
    margin-bottom: 10px;
    place-items: center;
    color: #d7ac53;
    background: rgb(215 172 83 / 12%);
    border-radius: 9px;
}

.sidebar__insight-icon svg {
    width: 17px;
    height: 17px;
}

.sidebar__insight strong {
    color: #e7efec;
    font-size: 11px;
}

.sidebar__insight p {
    margin: 6px 0 0;
    font-size: 11px;
    line-height: 1.55;
}

.sidebar__foot {
    display: grid;
    gap: 3px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgb(255 255 255 / 7%);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    color: #8fab9f;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 11px;
    text-align: left;
}

.sidebar-link:hover {
    color: #fff;
    background: rgb(255 255 255 / 5%);
}

.sidebar-link svg {
    width: 16px;
    height: 16px;
}

.sidebar-scrim {
    display: none;
}

.app-main {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
}

.menu-button {
    display: none;
}

.avatar {
    display: grid;
    width: 37px;
    height: 37px;
    place-items: center;
    color: var(--forest-800);
    background: var(--mint-100);
    border: 1px solid var(--mint-200);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
}

.profile-button__text strong,
.profile-button__text small {
    display: block;
}

.profile-button__text strong {
    max-width: 175px;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-button__text small {
    margin-top: 1px;
    color: var(--muted);
    font-size: 9px;
}

.workspace {
    width: min(100%, 1500px);
    margin: 0 auto;
    padding: clamp(30px, 4vw, 53px) clamp(22px, 3.4vw, 48px) 56px;
}

.page {
    display: none;
}

.page.is-active {
    display: block;
    animation: page-in 220ms ease both;
}

@keyframes page-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 27px;
}

.page-heading h1 {
    margin: 0;
    font: 800 clamp(27px, 3vw, 38px)/1.15 var(--font-display);
    letter-spacing: -0.045em;
}

.page-heading p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.page-heading > .button {
    text-decoration: none;
}

/* Home dashboard */
.stats-grid.stats-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.home-today-panel,
.home-week-panel,
.home-latest-panel,
.login-history-panel,
.notes-panel {
    padding: 21px;
}

.notes-panel {
    grid-column: 1 / -1;
}

.latest-homework-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    padding: 11px 12px;
    background: #fafbf9;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.latest-homework-list {
    display: grid;
    gap: 8px;
}

.latest-homework-row__avatar {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    color: var(--forest-700);
    font-size: 9px;
    font-weight: 800;
    background: var(--mint-100);
    border-radius: 50%;
}

.latest-homework-row__avatar.tone-1 { color: var(--blue-500); background: var(--blue-100); }
.latest-homework-row__avatar.tone-2 { color: var(--gold-500); background: var(--gold-100); }
.latest-homework-row__avatar.tone-3 { color: var(--violet-500); background: var(--violet-100); }

.latest-homework-row__content {
    min-width: 0;
}

.latest-homework-row strong,
.latest-homework-row small {
    display: block;
}

.latest-homework-row strong {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.latest-homework-row small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.45;
}

.latest-homework-row small i {
    padding-inline: 3px;
    color: var(--muted-2);
    font-style: normal;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 17px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--line);
}

.section-heading h2 {
    margin: -2px 0 0;
    font: 800 17px/1.3 var(--font-display);
    letter-spacing: -0.025em;
}

.section-heading p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 10px;
}

.home-class-list {
    display: grid;
    gap: 7px;
}

.home-class-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 11px;
    align-items: center;
    padding: 10px;
    color: var(--ink);
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 10px;
    transition: background 150ms ease, border 150ms ease, transform 150ms ease;
}

.home-class-row:hover {
    background: #fafcf9;
    border-color: var(--mint-200);
    transform: translateX(2px);
}

.home-class-row > span:nth-child(2) strong,
.home-class-row > span:nth-child(2) small {
    display: block;
}

.home-class-row > span:nth-child(2) strong {
    font-size: 11px;
}

.home-class-row > span:nth-child(2) small {
    margin-top: 2px;
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-class-row > svg {
    width: 15px;
    height: 15px;
    color: var(--muted-2);
}

.home-class-row .load-badge {
    margin-top: 0;
}

.week-load-chart {
    display: grid;
    height: 260px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
    padding: 22px 4px 4px;
}

.week-load-day {
    display: grid;
    height: 100%;
    grid-template-rows: 20px minmax(40px, 1fr) 17px 15px;
    gap: 4px;
    align-items: end;
    color: var(--muted);
    text-align: center;
}

.week-load-day__count {
    align-self: end;
    font-size: 9px;
    font-weight: 800;
}

.week-load-day__bar {
    width: 72%;
    height: var(--bar-height);
    min-height: 8px;
    align-self: end;
    justify-self: center;
    background: #d8dfdb;
    border-radius: 6px 6px 2px 2px;
}

.week-load-day__bar--low { background: var(--mint-600); }
.week-load-day__bar--medium { background: var(--gold-500); }
.week-load-day__bar--high { background: var(--red-500); }

.week-load-day strong {
    color: var(--ink);
    font-size: 9px;
}

.week-load-day small {
    color: var(--muted-2);
    font-size: 8px;
}

.login-history-list {
    display: grid;
    gap: 8px;
}

.login-history-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    padding: 11px 12px;
    background: #fafbf9;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.login-history-row__number {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    color: var(--forest-700);
    font-size: 10px;
    font-weight: 800;
    background: var(--mint-100);
    border-radius: 50%;
}

.login-history-row strong,
.login-history-row small {
    display: block;
}

.login-history-row strong {
    font-size: 11px;
}

.login-history-row small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
}

.notes-list {
    display: grid;
    max-height: 360px;
    gap: 8px;
    overflow: auto;
}

.note-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 11px;
    align-items: start;
    padding: 13px;
    background: #fafbf9;
    border: 1px solid var(--line);
    border-radius: 11px;
}

.note-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 7px;
}

.note-card__head strong {
    font-size: 11px;
}

.note-card__head small {
    color: var(--muted-2);
    font-size: 8px;
}

.note-card p {
    margin: 5px 0 0;
    color: #3e4b46;
    font-size: 11px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.note-form {
    margin-top: 13px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
}

.note-form:focus-within {
    border-color: var(--mint-600);
    box-shadow: 0 0 0 3px rgb(57 131 101 / 9%);
}

.note-form textarea {
    width: 100%;
    min-height: 55px;
    padding: 0;
    color: var(--ink);
    background: transparent;
    border: 0;
    resize: vertical;
    outline: 0;
}

.note-form__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
    color: var(--muted-2);
    border-top: 1px solid var(--line);
    font-size: 9px;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding-bottom: 4px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
}

.legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.dot--low { background: var(--mint-600); }
.dot--medium { background: var(--gold-500); }
.dot--high { background: var(--red-500); }

.panel {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

/* Calendar drill-down workflow */
.workflow-view {
    animation: page-in 220ms ease both;
}

.workflow-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 24px;
    padding: 0;
    color: var(--muted);
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.workflow-back:hover {
    color: var(--forest-800);
}

.workflow-back svg {
    width: 17px;
    height: 17px;
    transition: transform 160ms ease;
}

.workflow-back:hover svg {
    transform: translateX(-3px);
}

.workflow-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 24px;
}

.workflow-heading h1 {
    margin: 0;
    font: 800 clamp(27px, 3vw, 38px)/1.15 var(--font-display);
    letter-spacing: -0.045em;
}

.workflow-heading p {
    max-width: 680px;
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.workflow-heading--actions {
    align-items: center;
}

.workflow-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin-bottom: 16px;
    color: var(--muted-2);
    font-size: 10px;
    font-weight: 600;
}

.workflow-breadcrumb svg {
    width: 12px;
    height: 12px;
}

.workflow-breadcrumb strong {
    color: var(--forest-800);
}

.workflow-summary {
    min-width: 145px;
    padding: 17px 20px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 13px;
    box-shadow: var(--shadow-sm);
}

.workflow-summary strong,
.workflow-summary span {
    display: block;
}

.workflow-summary strong {
    font: 800 18px/1.2 var(--font-display);
}

.workflow-summary span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.workflow-tip {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 20px;
    padding: 12px 14px;
    color: #456158;
    background: var(--mint-100);
    border: 1px solid var(--mint-200);
    border-radius: 11px;
}

.workflow-tip__icon {
    display: grid;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    place-items: center;
    color: #fff;
    background: var(--mint-600);
    border-radius: 50%;
    font-family: Georgia, serif;
    font-size: 12px;
    font-weight: 700;
}

.workflow-tip p {
    margin: 0;
    font-size: 11px;
}

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

.class-date-card {
    position: relative;
    display: flex;
    min-height: 190px;
    flex-direction: column;
    padding: 18px;
    overflow: hidden;
    color: var(--ink);
    text-align: left;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 170ms ease, border 170ms ease, box-shadow 170ms ease;
}

.class-date-card::before {
    position: absolute;
    height: 3px;
    top: 0;
    right: 0;
    left: 0;
    content: "";
    background: #c7ceca;
}

.class-date-card--low::before { background: var(--mint-600); }
.class-date-card--medium::before { background: var(--gold-500); }
.class-date-card--high::before { background: var(--red-500); }

.class-date-card:hover {
    z-index: 1;
    border-color: var(--mint-200);
    box-shadow: 0 14px 35px rgb(22 56 47 / 10%);
    transform: translateY(-3px);
}

.class-date-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.class-date-card .load-badge {
    margin-top: 0;
}

.class-date-card__body {
    display: block;
    margin-top: 19px;
}

.class-date-card__body strong,
.class-date-card__body small {
    display: block;
}

.class-date-card__body strong {
    font: 800 16px/1.3 var(--font-display);
}

.class-date-card__body small {
    margin-top: 5px;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.class-date-card__action {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    color: var(--mint-600);
    font-size: 10px;
    font-weight: 800;
}

.class-date-card__action svg {
    width: 14px;
    height: 14px;
    transition: transform 160ms ease;
}

.class-date-card:hover .class-date-card__action svg {
    transform: translateX(3px);
}

.class-workload-summary {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 18px;
    padding: 15px 17px;
    color: #586560;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid #aeb7b2;
    border-radius: 12px;
}

.class-workload-summary--low { border-left-color: var(--mint-600); }
.class-workload-summary--medium { border-left-color: var(--gold-500); background: #fffcf6; }
.class-workload-summary--high { border-left-color: var(--red-500); background: #fff9f8; }

.class-workload-summary__count {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--forest-800);
    background: var(--mint-100);
    border-radius: 11px;
    font: 800 17px/1 var(--font-display);
}

.class-workload-summary--medium .class-workload-summary__count { color: #9a620d; background: var(--gold-100); }
.class-workload-summary--high .class-workload-summary__count { color: #a94138; background: var(--red-100); }

.class-workload-summary strong,
.class-workload-summary p {
    display: block;
    margin: 0;
}

.class-workload-summary strong {
    color: var(--ink);
    font-size: 12px;
}

.class-workload-summary p {
    margin-top: 2px;
    font-size: 10px;
}

.homework-detail-list--page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.homework-detail-list--page .homework-card {
    min-height: 160px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.homework-detail-list--page .empty-state {
    grid-column: 1 / -1;
    padding: 60px 20px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
}

/* Calendar */
.calendar-layout {
    display: grid;
    grid-template-columns: minmax(560px, 1fr) minmax(270px, 0.34fr);
    gap: 20px;
    align-items: start;
}

.calendar-panel {
    padding: 22px;
}

.calendar-toolbar {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 19px;
}

.month-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
}

.month-navigation h2 {
    min-width: 165px;
    margin: 0;
    font: 800 17px/1.2 var(--font-display);
    text-align: center;
    text-transform: capitalize;
}

.month-navigation .icon-button {
    width: 34px;
    height: 34px;
}

.weekday-row,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.weekday-row {
    margin-bottom: 7px;
}

.weekday-row span {
    padding: 4px 5px 8px;
    color: var(--muted-2);
    font-size: 10px;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
}

.calendar-grid {
    overflow: hidden;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 12px;
    gap: 1px;
}

.calendar-day {
    position: relative;
    display: flex;
    min-height: clamp(74px, 8vw, 103px);
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
    overflow: hidden;
    background: #fff;
    border: 0;
    cursor: pointer;
    text-align: left;
    transition: background 140ms ease, box-shadow 140ms ease;
}

.calendar-day:hover {
    z-index: 1;
    background: #f9fbf8;
    box-shadow: inset 0 0 0 1px var(--mint-200);
}

.calendar-day.is-outside {
    color: #b4bbb8;
    background: #fafbfa;
}

.calendar-day.is-selected {
    z-index: 2;
    background: #eff7f2;
    box-shadow: inset 0 0 0 2px var(--mint-600);
}

.calendar-day.is-today .calendar-day__number {
    color: #fff;
    background: var(--forest-800);
}

.calendar-day__number {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}

.load-badge {
    display: inline-flex;
    max-width: 100%;
    min-height: 21px;
    align-items: center;
    gap: 5px;
    margin-top: auto;
    padding: 3px 7px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
}

.load-badge::before {
    width: 5px;
    height: 5px;
    content: "";
    background: currentColor;
    border-radius: 50%;
}

.load-badge--empty {
    color: #89938f;
    background: #eef1ef;
}

.load-badge--low {
    color: #287153;
    background: var(--mint-100);
}

.load-badge--medium {
    color: #a4680b;
    background: var(--gold-100);
}

.load-badge--high {
    color: #b1453b;
    background: var(--red-100);
}

.day-panel {
    position: sticky;
    top: 99px;
    padding: 21px;
}

.day-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding-bottom: 17px;
    border-bottom: 1px solid var(--line);
}

.day-panel__head h2 {
    margin: -2px 0 0;
    font: 800 17px/1.25 var(--font-display);
    letter-spacing: -0.025em;
}

.count-pill {
    flex: 0 0 auto;
    padding: 5px 9px;
    color: var(--forest-800);
    background: var(--mint-100);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

.class-load-list {
    display: grid;
    gap: 8px;
    margin-top: 15px;
}

.class-load-card {
    display: grid;
    width: 100%;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
    padding: 11px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition: border 150ms ease, background 150ms ease, transform 150ms ease;
}

.class-load-card:hover {
    background: #fafcf9;
    border-color: var(--mint-200);
    transform: translateX(2px);
}

.class-symbol {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: var(--forest-800);
    background: var(--mint-100);
    border-radius: 9px;
    font: 800 11px/1 var(--font-display);
}

.class-load-card__text strong,
.class-load-card__text small {
    display: block;
}

.class-load-card__text strong {
    font-size: 12px;
}

.class-load-card__text small {
    margin-top: 2px;
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.class-load-card > svg {
    width: 15px;
    height: 15px;
    color: var(--muted-2);
}

.empty-state {
    padding: 34px 18px;
    color: var(--muted);
    text-align: center;
}

.empty-state__icon {
    display: grid;
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    place-items: center;
    color: var(--mint-600);
    background: var(--mint-100);
    border-radius: 14px;
}

.empty-state__icon svg {
    width: 23px;
    height: 23px;
}

.empty-state strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
    font-size: 13px;
}

.empty-state p {
    margin: 0;
    font-size: 11px;
}

/* Management */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 13px;
}

.stat-card__icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: var(--forest-800);
    background: var(--mint-100);
    border-radius: 11px;
}

.stat-card__icon.is-gold { color: #a4680b; background: var(--gold-100); }
.stat-card__icon.is-blue { color: var(--blue-500); background: var(--blue-100); }

.stat-card strong,
.stat-card small {
    display: block;
}

.stat-card strong {
    font: 800 22px/1.1 var(--font-display);
}

.stat-card small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.management-panel {
    overflow: hidden;
}

.management-toolbar {
    display: flex;
    min-height: 80px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.management-toolbar h2 {
    margin: 0;
    font: 800 16px/1.2 var(--font-display);
}

.management-toolbar p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 10px;
}

.search-box {
    position: relative;
    display: block;
    width: min(100%, 250px);
}

.search-box svg {
    position: absolute;
    top: 50%;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--muted-2);
    transform: translateY(-50%);
}

.search-box input {
    width: 100%;
    height: 39px;
    padding: 0 12px 0 38px;
    background: #f8faf8;
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 11px;
}

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

.data-table th,
.data-table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.data-table th {
    color: var(--muted-2);
    background: #fbfcfb;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.data-table td {
    font-size: 12px;
}

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

.data-table tbody tr:hover {
    background: #fbfcfb;
}

.entity-cell {
    display: flex;
    align-items: center;
    gap: 11px;
}

.entity-cell strong,
.entity-cell small {
    display: block;
}

.entity-cell strong {
    font-size: 12px;
}

.entity-cell small {
    margin-top: 1px;
    color: var(--muted);
    font-size: 9px;
}

.teacher-avatar {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--forest-800);
    background: var(--mint-100);
    border-radius: 50%;
    font-size: 10px;
    font-weight: 800;
}

.teacher-avatar.tone-1 { color: var(--violet-500); background: var(--violet-100); }
.teacher-avatar.tone-2 { color: var(--blue-500); background: var(--blue-100); }
.teacher-avatar.tone-3 { color: #a4680b; background: var(--gold-100); }

.subject-chip {
    display: inline-flex;
    padding: 4px 8px;
    color: var(--forest-800);
    background: var(--mint-100);
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
}

.row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
}

.row-action {
    display: grid;
    width: 32px;
    height: 32px;
    padding: 0;
    place-items: center;
    color: var(--muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
}

.row-action:hover {
    color: var(--forest-800);
    background: var(--mint-100);
}

.row-action.is-danger:hover {
    color: var(--red-500);
    background: var(--red-100);
}

.row-action svg {
    width: 16px;
    height: 16px;
}

/* Dialogs */
.dialog {
    width: min(calc(100% - 28px), 520px);
    padding: 0;
    overflow: hidden;
    color: var(--ink);
    background: #fff;
    border: 0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.dialog--large {
    width: min(calc(100% - 28px), 700px);
}

.dialog::backdrop {
    background: rgb(9 25 21 / 58%);
    backdrop-filter: blur(3px);
}

.dialog[open] {
    animation: dialog-in 180ms ease both;
}

@keyframes dialog-in {
    from { opacity: 0; transform: translateY(10px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.dialog__form,
.dialog__shell {
    display: flex;
    width: 100%;
    height: 92vh;
    height: 92dvh;
    max-height: 92vh;
    max-height: 92dvh;
    flex-direction: column;
    overflow: hidden;
}

.dialog__head {
    display: flex;
    flex: 0 0 auto;
    min-height: 0;
    max-height: 200px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0;
    padding: 12px 18px;
    overflow: hidden;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.dialog__head .eyebrow {
    margin-bottom: 4px;
    font-size: 9px;
}

.dialog__head h2 {
    margin: 0;
    font: 800 20px/1.2 var(--font-display);
    letter-spacing: -0.035em;
}

.dialog__head p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.dialog__body {
    min-height: 0;
    max-height: none;
    flex: 1 1 0;
    padding: 22px 25px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.dialog__body--compact {
    min-height: 0;
}

.dialog__actions {
    display: flex;
    flex: 0 0 auto;
    min-height: 0;
    max-height: 200px;
    justify-content: flex-end;
    gap: 9px;
    margin: 0;
    padding: 8px 18px;
    overflow: hidden;
    background: #fff;
    border-top: 1px solid var(--line);
}

.dialog__actions .button {
    min-height: 38px;
}

.dialog__actions--center {
    justify-content: center;
}

.form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 17px;
}

.dialog .field,
.dialog .form-grid,
.dialog .input-wrap,
.dialog input,
.dialog select,
.dialog textarea {
    width: 100%;
}

.context-strip {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 0 21px;
    padding: 11px 13px;
    color: var(--forest-800);
    background: var(--mint-100);
    border-radius: 10px;
    font-size: 11px;
}

.context-strip strong {
    font-weight: 800;
}

/* Searchable multi-select */
.multi-select {
    position: relative;
    width: 100%;
}

.multi-select__trigger {
    display: flex;
    width: 100%;
    height: 46px;
    min-height: 46px;
    max-height: 46px;
    flex: 0 0 46px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 13px;
    color: var(--ink);
    text-align: left;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    overflow: hidden;
}

.multi-select__trigger:hover,
.multi-select__trigger[aria-expanded="true"] {
    border-color: var(--mint-600);
}

.multi-select__trigger[aria-expanded="true"] {
    box-shadow: 0 0 0 3px rgb(57 131 101 / 9%);
}

.field.has-error .multi-select__trigger,
.field.has-error .multi-select__trigger:hover,
.field.has-error .multi-select__trigger[aria-expanded="true"] {
    border-color: var(--red-500);
    box-shadow: none;
}

.multi-select__trigger > svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    color: var(--muted);
    transition: transform 160ms ease;
}

.multi-select__trigger[aria-expanded="true"] > svg {
    transform: rotate(180deg);
}

.multi-select__value {
    min-width: 0;
    max-width: 100%;
    flex: 1 1 auto;
    overflow: hidden;
    line-height: 1.3;
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.multi-select__value.is-placeholder {
    color: #a2aaa7;
    font-weight: 400;
}

.multi-select__dropdown {
    position: absolute;
    z-index: 80;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    margin-top: 0;
    overflow: hidden;
    contain: layout;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    box-shadow: 0 18px 48px rgb(16 45 38 / 18%);
}

.multi-select__dropdown:not([hidden]) {
    display: grid;
    height: 300px;
    min-height: 300px;
    max-height: 300px;
    grid-template-rows: 60px minmax(0, 1fr) 42px;
}

.multi-select__search {
    position: relative;
    display: block;
    height: 60px;
    min-height: 60px;
    max-height: 60px;
    padding: 10px;
    background: #fafbf9;
    border-bottom: 1px solid var(--line);
}

.multi-select__search svg {
    position: absolute;
    top: 50%;
    left: 22px;
    width: 16px;
    height: 16px;
    color: var(--muted-2);
    transform: translateY(-50%);
    pointer-events: none;
}

.multi-select__search input {
    height: 38px;
    padding-left: 37px;
    font-size: 11px;
    background: #fff;
}

.multi-select__options {
    min-height: 0;
    max-height: none;
    padding: 6px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.multi-select__option {
    position: relative;
    display: flex;
    min-height: 39px;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    color: #34423d;
    border-radius: 8px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
}

.field label.multi-select__option {
    display: flex;
    margin-bottom: 0;
}

.field label.multi-select__search {
    display: block;
    margin-bottom: 0;
}

.multi-select__option:hover {
    background: #f2f6f3;
}

.multi-select__option[aria-selected="true"] {
    color: var(--forest-800);
    background: var(--mint-100);
    font-weight: 700;
}

.multi-select__option input {
    position: absolute;
    z-index: 1;
    width: 100%;
    height: 100%;
    inset: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    pointer-events: auto;
}

.multi-select__option:has(input:focus-visible) {
    outline: 2px solid var(--mint-600);
    outline-offset: -2px;
}

.multi-select__check {
    display: grid;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    place-items: center;
    color: transparent;
    background: #fff;
    border: 1px solid #cbd4ce;
    border-radius: 5px;
}

.multi-select__check svg {
    width: 13px;
    height: 13px;
    stroke-width: 2.4;
}

.multi-select__option[aria-selected="true"] .multi-select__check {
    color: #fff;
    background: var(--forest-800);
    border-color: var(--forest-800);
}

.multi-select__footer {
    display: flex;
    width: 100%;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    flex: 0 0 42px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 11px;
    color: var(--muted);
    background: #fafbf9;
    border-top: 1px solid var(--line);
    font-size: 9px;
    overflow: hidden;
}

.multi-select__footer span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.multi-select__footer button {
    width: auto;
    height: auto;
    flex: 0 0 auto;
    padding: 4px 7px;
    color: var(--mint-600);
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
}

.multi-select__empty {
    padding: 25px 12px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.subject-chip-list {
    display: flex;
    max-width: 380px;
    flex-wrap: wrap;
    gap: 4px;
}

.subject-chip--more {
    color: var(--muted);
    background: #edf0ee;
}

.homework-detail-list {
    display: grid;
    gap: 10px;
}

.homework-card {
    position: relative;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.homework-card::before {
    position: absolute;
    width: 3px;
    top: 15px;
    bottom: 15px;
    left: -1px;
    content: "";
    background: var(--mint-600);
    border-radius: 0 3px 3px 0;
}

.homework-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.homework-card__top > div:first-child {
    display: flex;
    align-items: center;
    gap: 9px;
}

.homework-card h3 {
    margin: 0;
    font: 800 13px/1.3 var(--font-display);
}

.homework-card small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
}

.homework-card p {
    margin: 13px 0 0;
    color: #3e4b46;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.homework-card__actions {
    display: flex;
    gap: 4px;
}

.dialog--confirm {
    width: min(calc(100% - 28px), 420px);
}

.dialog__body--confirm {
    display: grid;
    min-height: 0;
    align-content: center;
    text-align: center;
}

.confirm-icon {
    display: grid;
    width: 52px;
    height: 52px;
    margin: 0 auto 15px;
    place-items: center;
    color: var(--red-500);
    background: var(--red-100);
    border-radius: 15px;
}

.confirm-icon svg {
    width: 25px;
    height: 25px;
}

.dialog__body--confirm > p {
    margin: 0 auto;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

/* Feedback */
.toast-region {
    position: fixed;
    z-index: 1000;
    top: 18px;
    right: 18px;
    bottom: auto;
    left: auto;
    display: grid;
    width: min(calc(100% - 36px), 330px);
    height: auto;
    gap: 8px;
    margin: 0;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    color: #fff;
    background: var(--forest-900);
    border-radius: 11px;
    box-shadow: var(--shadow-md);
    font-size: 12px;
    animation: toast-in 220ms ease both;
}

.toast.is-error {
    background: #8e3932;
}

.toast::before {
    display: grid;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    place-items: center;
    content: "✓";
    color: var(--forest-900);
    background: #a9d5c2;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 900;
}

.toast.is-error::before {
    content: "!";
    color: #8e3932;
    background: #f4c7c2;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1180px) {
    :root { --sidebar-width: 224px; }
    .calendar-layout { grid-template-columns: minmax(500px, 1fr) 270px; }
    .stats-grid.stats-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
    .sidebar {
        width: 270px;
        transform: translateX(-100%);
        transition: transform 220ms ease;
    }

    .sidebar.is-open {
        transform: translateX(0);
        box-shadow: 20px 0 60px rgb(0 0 0 / 20%);
    }

    .sidebar__close,
    .menu-button {
        display: grid;
    }

    .menu-button {
        position: fixed;
        z-index: 30;
        top: 15px;
        left: 15px;
        box-shadow: var(--shadow-sm);
    }

    .sidebar-scrim {
        position: fixed;
        z-index: 35;
        inset: 0;
        display: block;
        visibility: hidden;
        padding: 0;
        opacity: 0;
        background: rgb(6 20 16 / 42%);
        border: 0;
        transition: opacity 220ms ease, visibility 220ms ease;
    }

    .sidebar-scrim.is-visible {
        visibility: visible;
        opacity: 1;
    }

    .app-main {
        margin-left: 0;
    }

    .workspace {
        padding-top: 76px;
    }

    .calendar-layout {
        grid-template-columns: 1fr;
    }

    .day-panel {
        position: static;
    }

    .class-load-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .home-layout {
        grid-template-columns: 1fr;
    }

    .notes-panel {
        grid-column: auto;
    }
}

@media (max-width: 760px) {
    .login-view {
        grid-template-columns: 1fr;
    }

    .login-story {
        display: none;
    }

    .login-panel {
        padding: 28px 22px;
    }

    .login-card__mobile-brand {
        display: inline-flex;
    }

    .workspace {
        padding: 76px 15px 44px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    .workflow-heading,
    .workflow-heading--actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .workflow-heading--actions .button {
        width: 100%;
    }

    .workflow-summary {
        width: 100%;
        text-align: left;
    }

    .class-date-grid,
    .homework-detail-list--page {
        grid-template-columns: 1fr;
    }

    .class-date-card {
        min-height: 170px;
    }

    .page-heading--actions .button {
        width: 100%;
    }

    .legend {
        padding: 10px 12px;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 9px;
    }

    .calendar-panel {
        padding: 13px;
    }

    .calendar-toolbar {
        align-items: flex-start;
    }

    .month-navigation {
        gap: 4px;
    }

    .month-navigation h2 {
        min-width: 122px;
        font-size: 14px;
    }

    .calendar-day {
        min-height: 68px;
        padding: 6px;
    }

    .calendar-day__number {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }

    .load-badge {
        width: 100%;
        justify-content: center;
        padding-inline: 3px;
        font-size: 0;
    }

    .load-badge::after {
        content: attr(data-count);
        font-size: 9px;
    }

    .class-load-list,
    .stats-grid {
        grid-template-columns: 1fr;
    }

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

    .management-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .search-box {
        width: 100%;
        max-width: none;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table thead {
        display: none;
    }

    .data-table tr {
        position: relative;
        padding: 16px 92px 16px 16px;
        border-bottom: 1px solid var(--line);
    }

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

    .data-table td {
        padding: 3px 0;
        border: 0;
    }

    .data-table td::before {
        margin-right: 6px;
        color: var(--muted-2);
        content: attr(data-label);
        font-size: 9px;
        font-weight: 700;
        text-transform: uppercase;
    }

    .data-table td:first-child::before,
    .data-table td:last-child::before {
        content: none;
    }

    .data-table td:last-child {
        position: absolute;
        top: 17px;
        right: 13px;
        width: auto;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .field--full {
        grid-column: auto;
    }
}

@media (max-width: 470px) {
    .login-panel { align-items: start; }
    .login-card { padding-top: 18px; }
    .today-button { display: none; }
    .calendar-toolbar > .button { padding-inline: 10px; }
    .day-panel { padding: 17px; }
    .dialog__head { padding: 11px 16px; }
    .dialog__body { padding: 19px 20px; }
    .dialog__actions { padding: 8px 16px; }
    .dialog__actions .button { flex: 1; }
    .multi-select__dropdown:not([hidden]) {
        height: 270px;
        min-height: 270px;
        max-height: 270px;
    }
    .stats-grid.stats-grid--four { grid-template-columns: 1fr; }
    .home-class-row { grid-template-columns: auto minmax(0, 1fr) auto; }
    .home-class-row .load-badge { display: none; }
    .week-load-chart { height: 220px; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
