/* MySpellings teacher workspace.
   Load after each page's existing styles. */

body.teacher-dashboard {
    --ink: #edf3ff;
    --muted: #a4b4cc;
    --line: #2a3952;
    --panel: #172338;
    --accent: #65e4c0;
    --nav: 248px;
    margin: 0;
    background: #0f192b;
    color: var(--ink);
    font: 15px/1.6 Inter, "Segoe UI", system-ui, sans-serif;
    color-scheme: dark;
}

.teacher-dashboard * {
    box-sizing: border-box;
}

.teacher-dashboard a {
    color: inherit;
    text-decoration: none;
}

.teacher-dashboard
:is(a, button, input, select, textarea, summary):focus-visible {
    outline: 3px solid #f6c96b;
    outline-offset: 4px;
}

.teacher-dashboard [hidden] {
    display: none !important;
}

.teacher-dashboard a[aria-disabled="true"] {
    opacity: .4;
    cursor: not-allowed;
    transform: none !important;
}

.teacher-dashboard .dash-original-header {
    display: none;
}

.teacher-dashboard .dash-skip {
    position: fixed;
    left: 20px;
    top: -100px;
    z-index: 20;
    background: var(--accent);
    color: #082e29;
    padding: 10px 18px;
    border-radius: 10px;
}

    .teacher-dashboard .dash-skip:focus {
        top: 12px;
    }

/* Sidebar */

.teacher-dashboard .dash-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--nav);
    background: #0a1221;
    border-right: 1px solid #223049;
    padding: 30px 18px 22px;
    display: flex;
    flex-direction: column;
    z-index: 5;
    overflow-y: auto;
}

.teacher-dashboard .dash-brand {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 0 12px 26px;
    font-size: 22px;
    letter-spacing: -1px;
    font-weight: 750;
}

    .teacher-dashboard .dash-brand > span:first-child {
        display: grid;
        place-items: center;
        background: #173c3c;
        border: 1px solid #3b7166;
        width: 37px;
        height: 37px;
        border-radius: 12px;
        color: var(--accent);
        font-size: 24px;
    }

    .teacher-dashboard .dash-brand small {
        display: block;
        font-size: 10px;
        letter-spacing: 2px;
        color: #92a4bf;
        font-weight: 600;
        margin-top: 0;
    }

.teacher-dashboard .dash-context {
    margin: 0 5px 28px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #121e31;
}

    .teacher-dashboard .dash-context small,
    .teacher-dashboard .dash-nav-label {
        font-size: 10px;
        letter-spacing: 1.6px;
        text-transform: uppercase;
        color: #8ea2bf;
        font-weight: 700;
    }

    .teacher-dashboard .dash-context strong {
        display: block;
        margin-top: 5px;
        font-size: 13px;
        overflow-wrap: anywhere;
    }

.teacher-dashboard .dash-nav-label {
    padding: 0 15px;
    margin-bottom: 9px;
}

.teacher-dashboard .dash-nav {
    display: grid;
    gap: 6px;
}

    .teacher-dashboard .dash-nav a {
        display: flex;
        align-items: center;
        gap: 13px;
        padding: 13px 15px;
        border-radius: 10px;
        color: #b0bfd4;
        font-size: 13px;
        font-weight: 600;
        border: 1px solid transparent;
        transition: background .18s, color .18s;
    }

        .teacher-dashboard .dash-nav a:hover {
            background: #17253b;
            color: white;
        }

        .teacher-dashboard .dash-nav a[aria-current="page"] {
            color: #82efd0;
            background: #163731;
            border-color: #28594d;
        }

.teacher-dashboard .dash-icon {
    width: 19px;
    height: 19px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.teacher-dashboard .dash-nav
a[aria-current="page"]::after {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    margin-left: auto;
}

.teacher-dashboard .dash-side-bottom {
    margin-top: auto;
    padding-top: 32px;
}

.teacher-dashboard .dash-help {
    display: block;
    background: #15223a;
    border: 1px solid #293c59;
    border-radius: 12px;
    padding: 16px;
}

    .teacher-dashboard .dash-help strong {
        display: block;
        font-size: 13px;
        margin: 5px 0;
    }

    .teacher-dashboard .dash-help span {
        font-size: 12px;
        color: var(--muted);
    }

.teacher-dashboard .dash-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding: 0 7px;
    font-size: 11px;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.teacher-dashboard .dash-avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 34px;
    height: 34px;
    background: #293958;
    color: #d6e7ff;
    border: 1px solid #435676;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

/* Workspace */

.teacher-dashboard .dash-frame {
    margin-left: var(--nav);
    min-width: 0;
    min-height: 100vh;
    background: radial-gradient( ellipse at 75% 0, #192b42 0, transparent 55% ), #0f192b;
}

.teacher-dashboard .dash-top {
    min-height: 83px;
    padding: 19px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #27364b;
    background: #111c2ec9;
}

.teacher-dashboard .dash-breadcrumb {
    font-size: 11px;
    color: #94a8c3;
    letter-spacing: .4px;
}

.teacher-dashboard .dash-top-title {
    font-size: 16px;
    font-weight: 650;
    margin: 1px 0 0;
    line-height: 1.5;
}

.teacher-dashboard .dash-date {
    font-size: 12px;
    color: #aebed3;
}

.teacher-dashboard .dash-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #99e9d1;
    border: 1px solid #376458;
    background: #15352f;
    border-radius: 20px;
    padding: 5px 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
}

    .teacher-dashboard .dash-badge::before {
        content: "";
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: #72e9bf;
    }

.teacher-dashboard main {
    max-width: 1450px;
    margin: 0 auto;
    padding: 26px 36px 55px;
    min-width: 0;
}

    .teacher-dashboard main > h1 {
        font-size: 27px;
        letter-spacing: -.7px;
        margin: 8px 0 20px;
    }

.teacher-dashboard :is(h1, h2, h3) {
    color: var(--ink);
    line-height: 1.25;
}

.teacher-dashboard h2 {
    font-size: 19px;
    letter-spacing: -.3px;
    margin: 0 0 14px;
    font-weight: 650;
}

.teacher-dashboard h3 {
    font-size: 16px;
}

.teacher-dashboard p {
    line-height: 1.65;
}

.teacher-dashboard section {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px;
    margin: 0 0 22px;
    box-shadow: 0 8px 25px #0000000a;
    min-width: 0;
}

.teacher-dashboard :is(.small, .muted) {
    color: var(--muted);
    font-size: 12px;
}

/* Forms and action buttons */

.teacher-dashboard :is(input, select, textarea) {
    background: #111d30;
    color: var(--ink);
    border: 1px solid #3c4c66;
    border-radius: 9px;
    padding: 11px 13px;
    font: inherit;
    max-width: 100%;
    min-width: 0;
}

.teacher-dashboard input::placeholder,
.teacher-dashboard textarea::placeholder {
    color: #8397b3;
}

.teacher-dashboard label {
    color: #c9d6e8;
    font-size: 12px;
    font-weight: 600;
}

.teacher-dashboard :is(button, .dash-button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 43px;
    padding: 10px 16px;
    background: var(--accent);
    color: #092e28;
    border: 1px solid #65e4c0;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.5;
    text-decoration: none;
    box-shadow: 0 3px 8px #0000000a;
    cursor: pointer;
    transition: background .15s, transform .15s;
}

    .teacher-dashboard
    :is(button, .dash-button):hover:not(:disabled) {
        background: #8ff0d3;
        transform: translateY(-1px);
    }

    .teacher-dashboard
    :is(button, .dash-button):active:not(:disabled) {
        transform: translateY(0);
    }

.teacher-dashboard
:is(button:disabled, fieldset:disabled button) {
    opacity: .45;
    cursor: not-allowed;
}

.teacher-dashboard
:is(.secondary, button.secondary, .dash-button.secondary) {
    color: #dce8f8;
    background: #22344c;
    border-color: #3c506b;
}

    .teacher-dashboard
    :is( .secondary, button.secondary, .dash-button.secondary ):hover:not(:disabled) {
        background: #304661;
    }

.teacher-dashboard button.danger {
    background: #51322d;
    border-color: #a46b52;
    color: #ffdbb7;
}

.teacher-dashboard #status {
    font-size: 12px;
    color: #bdd5ea;
    background: #182c41;
    border: 1px solid #2d4b63;
    border-radius: 10px;
    padding: 11px 15px;
    margin-bottom: 23px;
}

    .teacher-dashboard
    #status:is([data-error="true"], .error) {
        background: #3c2929;
        border-color: #9a6257;
        color: #ffcebd;
    }

.teacher-dashboard.dash-authenticated.dash-page-home
#status:not([data-error="true"]) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.teacher-dashboard .error {
    color: #ffbcad;
}

.teacher-dashboard .notice {
    font-size: 12px;
    color: #a8e6cf;
}

/* Existing list, code and account components */

.teacher-dashboard .grid {
    gap: 22px;
    align-items: start;
}

.teacher-dashboard .layout {
    grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr);
    gap: 22px;
}

.teacher-dashboard .row {
    gap: 16px;
}

.teacher-dashboard .saved-list {
    background: #1e3245;
    border-color: #365268;
    border-radius: 11px;
}

    .teacher-dashboard .saved-list button {
        background: #29475b;
        color: #c7fff0;
        border: 1px solid #406576;
        text-decoration: none;
        padding: 9px 12px;
        margin-bottom: 10px;
        min-height: 42px;
        width: 100%;
        justify-content: flex-start;
    }

.teacher-dashboard .release,
.teacher-dashboard .code,
.teacher-dashboard .request,
.teacher-dashboard .school {
    border-color: #34445d;
}

.teacher-dashboard .count {
    background: #173d36;
    color: #a7f4d8;
    border: 1px solid #2e6656;
}

.teacher-dashboard #draft-note {
    background: #20394b;
    border: 1px solid #36566b;
    color: #c4d9e9;
}

.teacher-dashboard
#editor button:is([value="draft"], [value="schedule"]) {
    background: #24364c;
    color: #dce8f8;
    border-color: #405573;
}

    .teacher-dashboard
    #editor button:is( [value="draft"], [value="schedule"] ):hover:not(:disabled) {
        background: #304661;
    }

.teacher-dashboard.dash-page-lists
main > section:first-of-type {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 4px 20px;
    padding: 16px 24px;
}

    .teacher-dashboard.dash-page-lists
    main > section:first-of-type label {
        margin: 0;
        grid-column: 1;
        grid-row: 1;
    }

.teacher-dashboard.dash-page-lists #class-picker {
    grid-column: 2;
    grid-row: 1;
}

.teacher-dashboard.dash-page-lists #class-detail {
    grid-column: 2;
    margin: 0;
    font-size: 11px;
}

.teacher-dashboard.dash-page-account
#account > section:first-child {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 20px;
    align-items: center;
}

    .teacher-dashboard.dash-page-account
    #account > section:first-child :is(h2, p) {
        grid-column: 1;
        margin: 0;
    }

    .teacher-dashboard.dash-page-account
    #account > section:first-child h2 {
        margin-bottom: 5px;
    }

.teacher-dashboard.dash-page-account #logout {
    grid-column: 2;
    grid-row: 1 / 4;
    margin: 0;
    background: #25384e;
    border-color: #435b76;
    color: #dce8f8;
}

.teacher-dashboard.dash-page-codes main > #heading,
.teacher-dashboard.dash-page-codes main > p:first-child {
    display: none;
}

/* Sign in */

.teacher-dashboard .narrow {
    max-width: 510px;
    margin: 28px auto;
}

.teacher-dashboard #login-panel h2 {
    font-size: 29px;
    letter-spacing: -.8px;
}

.teacher-dashboard #login-panel {
    padding: 34px;
}

    .teacher-dashboard #login-panel p {
        color: var(--muted);
        font-size: 13px;
    }

.teacher-dashboard #login button[type="submit"] {
    width: 100%;
    margin-top: 23px;
}

.teacher-dashboard #show-reset {
    width: 100%;
    font-size: 12px;
}

.teacher-dashboard .dash-auth-note {
    max-width: 510px;
    margin: 30px auto;
    text-align: center;
    font-size: 12px;
    color: #9fb4ca;
}

.teacher-dashboard.dash-page-home:not(.dash-authenticated)
.dash-sidebar {
    position: static;
    width: auto;
    padding: 20px 32px;
    display: block;
    border-right: 0;
    border-bottom: 1px solid #223049;
}

.teacher-dashboard.dash-page-home:not(.dash-authenticated)
:is( .dash-context, .dash-nav-label, .dash-nav, .dash-side-bottom, .dash-top, .dash-auth-note ) {
    display: none;
}

.teacher-dashboard.dash-page-home:not(.dash-authenticated)
.dash-brand {
    padding: 0;
    display: inline-flex;
}

.teacher-dashboard.dash-page-home:not(.dash-authenticated)
.dash-frame {
    margin-left: 0;
}

.teacher-dashboard.dash-page-home:has( #login-panel:not([hidden]) ) #status:not([data-error="true"]) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Dashboard welcome */

.teacher-dashboard #portal > .grid {
    display: block;
}

.teacher-dashboard .dash-welcome {
    position: relative;
    overflow: hidden;
    background: linear-gradient( 115deg, #183e42, #173149 65%, #17263c );
    border-color: #39616a;
    padding: 30px;
    min-height: 255px;
    isolation: isolate;
}

    .teacher-dashboard .dash-welcome::before {
        content: "";
        position: absolute;
        width: 380px;
        height: 380px;
        left: -180px;
        top: -230px;
        border: 1px solid #ffffff12;
        border-radius: 50%;
        pointer-events: none;
    }

    .teacher-dashboard .dash-welcome h2 {
        font-size: clamp(26px, 2.6vw, 39px);
        letter-spacing: -1.2px;
        max-width: 550px;
        margin: 10px 0 12px;
        line-height: 1.16;
    }

    .teacher-dashboard .dash-welcome > .dash-eyebrow {
        font-size: 10px;
        color: #8eead2;
        letter-spacing: 2px;
        font-weight: 750;
        margin-bottom: 8px;
        text-transform: uppercase;
    }

    .teacher-dashboard .dash-welcome .dash-intro {
        max-width: 490px;
        color: #c1d4e0;
        font-size: 13px;
        margin: 0 0 15px;
    }

    .teacher-dashboard .dash-welcome #account-email {
        font-size: 11px;
        color: #adced6;
        margin: 7px 0;
        overflow-wrap: anywhere;
    }

    .teacher-dashboard .dash-welcome > p:has(a) {
        display: inline-block;
        margin: 8px 10px 0 0;
    }

    .teacher-dashboard .dash-welcome #logout {
        margin: 8px 0 0;
        background: #ffffff0b;
        border-color: #54717e;
        color: #dbe7ef;
    }

    .teacher-dashboard
    .dash-welcome:has(.dash-fox) > :not(.dash-fox) {
        position: relative;
        z-index: 1;
        max-width: 65%;
    }

.teacher-dashboard .dash-fox {
    position: absolute;
    width: 300px;
    height: 230px;
    object-fit: cover;
    object-position: center;
    right: 15px;
    bottom: 0;
    border-radius: 14px 14px 0 0;
}

/* Real workspace totals */

.teacher-dashboard .dash-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1.25fr;
    gap: 16px;
    margin-bottom: 26px;
}

.teacher-dashboard .dash-stat {
    padding: 19px 22px;
    background: #172338;
    border: 1px solid var(--line);
    border-radius: 13px;
    display: flex;
    gap: 15px;
    align-items: center;
    min-width: 0;
}

    .teacher-dashboard .dash-stat .dash-icon {
        width: 25px;
        height: 25px;
        color: #7dcabf;
    }

    .teacher-dashboard .dash-stat strong {
        font-size: 26px;
        letter-spacing: -.8px;
        line-height: 1.2;
        display: block;
        color: #e8f2ff;
    }

    .teacher-dashboard .dash-stat span {
        display: block;
        font-size: 11px;
        color: var(--muted);
        margin-top: 3px;
    }

    .teacher-dashboard .dash-stat:last-child strong {
        font-size: 15px;
        letter-spacing: 0;
        color: #f2d39e;
    }

/* Class tiles */

.teacher-dashboard .dash-class-panel {
    padding: 25px;
}

.teacher-dashboard .dash-section-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

    .teacher-dashboard .dash-section-top h2 {
        margin: 0 0 5px;
        font-size: 22px;
    }

    .teacher-dashboard .dash-section-top p {
        margin: 0;
        color: var(--muted);
        font-size: 12px;
    }

.teacher-dashboard .dash-search-wrap {
    position: relative;
    width: 240px;
    max-width: 100%;
}

    .teacher-dashboard .dash-search-wrap .dash-icon {
        position: absolute;
        top: 13px;
        left: 12px;
        color: #849ab5;
        width: 16px;
        height: 16px;
    }

    .teacher-dashboard .dash-search-wrap input {
        padding-left: 37px;
        width: 100%;
        font-size: 12px;
    }

.teacher-dashboard #classes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.teacher-dashboard .class-card {
    position: relative;
    margin: 0;
    padding: 24px;
    background: linear-gradient( 135deg, #20334b, #1b2b42 );
    border: 1px solid #3a506e;
    border-radius: 13px;
    min-width: 0;
    transition: border-color .15s, transform .15s;
}

    .teacher-dashboard .class-card:hover {
        border-color: #5c9d9b;
        transform: translateY(-2px);
    }

    .teacher-dashboard .class-card::before {
        content: "CLASSROOM";
        display: block;
        letter-spacing: 1.8px;
        color: #8cdac9;
        font-size: 9px;
        font-weight: 750;
        margin-bottom: 17px;
    }

    .teacher-dashboard .class-card strong {
        display: block;
        font-size: 27px;
        letter-spacing: -.6px;
        line-height: 1.2;
        margin-bottom: 7px;
        overflow-wrap: anywhere;
    }

    .teacher-dashboard .class-card span {
        display: block;
        color: #b6c5da;
        font-size: 12px;
        margin-bottom: 22px;
        overflow-wrap: anywhere;
    }

    .teacher-dashboard .class-card a {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        border-radius: 8px;
        padding: 11px 13px;
        background: #6ae1bf;
        color: #092f29;
        font-size: 12px;
        font-weight: 750;
        min-height: 43px;
        margin-top: 9px !important;
        text-decoration: none;
    }

        .teacher-dashboard .class-card a::after {
            content: "↗";
            font-size: 18px;
            font-weight: 400;
        }

        .teacher-dashboard .class-card a + a {
            background: #273c55;
            color: #d2dfed;
            border: 1px solid #455b76;
        }

        .teacher-dashboard .class-card a:hover {
            filter: brightness(1.1);
        }

    .teacher-dashboard .class-card:only-child {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 30px;
        align-items: center;
    }

        .teacher-dashboard .class-card:only-child::before {
            grid-column: 1;
            grid-row: 1;
            margin-bottom: 10px;
        }

        .teacher-dashboard .class-card:only-child strong {
            grid-column: 1;
            grid-row: 2;
        }

        .teacher-dashboard .class-card:only-child span {
            grid-column: 1;
            grid-row: 3;
            margin-bottom: 0;
        }

        .teacher-dashboard .class-card:only-child a {
            grid-column: 2;
            grid-row: 2;
            margin: 0 !important;
        }

            .teacher-dashboard .class-card:only-child a + a {
                grid-row: 3;
                margin-top: 10px !important;
            }

/* Quick-action tiles */

.teacher-dashboard .dash-tools {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    margin: 0 0 22px;
}

.teacher-dashboard .dash-tool {
    position: relative;
    display: block;
    padding: 21px;
    background: #17263a;
    border: 1px solid #304760;
    border-radius: 12px;
    min-height: 140px;
    transition: border-color .15s, background .15s;
}

    .teacher-dashboard .dash-tool:hover {
        border-color: #65b6ab;
        background: #1d3348;
    }

    .teacher-dashboard .dash-tool > .dash-icon {
        color: #83d5c6;
        width: 23px;
        height: 23px;
        margin-bottom: 12px;
    }

    .teacher-dashboard .dash-tool strong {
        display: block;
        font-size: 13px;
        margin-bottom: 5px;
    }

    .teacher-dashboard .dash-tool span {
        display: block;
        color: var(--muted);
        font-size: 11px;
        max-width: 90%;
    }

    .teacher-dashboard .dash-tool::after {
        content: "↗";
        position: absolute;
        right: 19px;
        top: 17px;
        color: #869fba;
        font-size: 19px;
    }

/* Footer and support */

.teacher-dashboard .dash-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 2px;
    color: #9eafc7;
    font-size: 11px;
}

    .teacher-dashboard .dash-footer a {
        padding: 9px 12px;
        background: #1d2b41;
        border: 1px solid #35475f;
        border-radius: 8px;
    }

    .teacher-dashboard .dash-footer .dash-button {
        font-size: 11px;
    }

.teacher-dashboard.dash-page-account main > p a,
.teacher-dashboard.dash-page-account
#account section p > a {
    display: inline-flex;
    padding: 10px 14px;
    border: 1px solid #3a536e;
    background: #21384e;
    border-radius: 9px;
    color: #b6efdf;
    font-size: 12px;
    font-weight: 650;
    overflow-wrap: anywhere;
    max-width: 100%;
}

.teacher-dashboard .dash-back-pill {
    display: inline-flex;
    padding: 9px 13px;
    border: 1px solid #3b506e;
    border-radius: 9px;
    background: #1e3048;
    color: #c1d8ed;
    font-size: 12px;
}

.teacher-dashboard .dash-note-bar {
    padding: 16px 20px;
    background: #202b3d;
    border: 1px solid #3c4960;
    border-radius: 12px;
    color: #aebed1;
    font-size: 12px;
    margin-bottom: 22px;
}

    .teacher-dashboard .dash-note-bar strong {
        color: #e5d3b0;
    }

/* Wide desktop */

@media (min-width: 1600px) {
    body.teacher-dashboard {
        --nav: 270px;
    }

    .teacher-dashboard main {
        padding: 35px 45px 60px;
    }

    .teacher-dashboard #classes {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Compact desktop */

@media (max-width: 1180px) {
    body.teacher-dashboard {
        --nav: 215px;
    }

    .teacher-dashboard main {
        padding: 24px;
    }

    .teacher-dashboard .dash-top {
        padding: 20px 24px;
    }

    .teacher-dashboard .dash-brand {
        font-size: 19px;
        padding-left: 4px;
        gap: 8px;
    }

    .teacher-dashboard .dash-stats {
        gap: 10px;
    }

    .teacher-dashboard .dash-stat {
        padding: 17px 14px;
        gap: 10px;
    }

        .teacher-dashboard .dash-stat .dash-icon {
            display: none;
        }

    .teacher-dashboard .dash-fox {
        width: 230px;
        height: 215px;
    }

    .teacher-dashboard
    .dash-welcome:has(.dash-fox) > :not(.dash-fox) {
        max-width: 62%;
    }

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

    .teacher-dashboard .row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Tablet and mobile navigation */

@media (max-width: 900px) {
    .teacher-dashboard .dash-sidebar {
        position: static;
        width: auto;
        padding: 14px 20px;
        display: block;
        border-right: 0;
        border-bottom: 1px solid #29384d;
        overflow: visible;
    }

    .teacher-dashboard .dash-brand {
        padding: 0;
        display: inline-flex;
        font-size: 20px;
    }

        .teacher-dashboard .dash-brand small {
            display: none;
        }

    .teacher-dashboard .dash-context,
    .teacher-dashboard .dash-nav-label,
    .teacher-dashboard .dash-side-bottom {
        display: none;
    }

    .teacher-dashboard .dash-nav {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 7px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #0c1628f5;
        backdrop-filter: blur(16px);
        border-top: 1px solid #34445b;
        padding: 9px 10px max(9px, env(safe-area-inset-bottom));
        z-index: 10;
    }

        .teacher-dashboard .dash-nav a {
            flex-direction: column;
            gap: 4px;
            text-align: center;
            padding: 8px 3px;
            font-size: 10px;
            min-height: 59px;
        }

            .teacher-dashboard
            .dash-nav a[aria-current="page"]::after {
                display: none;
            }

    .teacher-dashboard .dash-frame {
        margin-left: 0;
    }

    .teacher-dashboard .dash-top {
        min-height: 68px;
        padding: 13px 24px;
    }

    .teacher-dashboard main {
        padding-bottom: 115px;
    }

    .teacher-dashboard .dash-date {
        font-size: 11px;
    }

    .teacher-dashboard .grid {
        grid-template-columns: 1fr;
    }

    .teacher-dashboard .dash-welcome h2 {
        font-size: 32px;
    }
}

/* Phone */

@media (max-width: 560px) {
    .teacher-dashboard main {
        padding: 19px 16px 110px;
    }

    .teacher-dashboard .dash-top {
        padding: 13px 18px;
        min-height: 60px;
    }

    .teacher-dashboard .dash-date {
        display: none;
    }

    .teacher-dashboard .dash-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 20px;
    }

    .teacher-dashboard .dash-stat {
        padding: 15px;
    }

        .teacher-dashboard .dash-stat:last-child {
            grid-column: 1 / -1;
            padding: 12px 15px;
        }

            .teacher-dashboard .dash-stat:last-child > div {
                display: flex;
                align-items: center;
                gap: 12px;
                flex-wrap: wrap;
            }

            .teacher-dashboard .dash-stat:last-child span {
                margin: 0;
            }

            .teacher-dashboard
            .dash-stat:last-child .dash-icon {
                display: block;
                width: 20px;
                height: 20px;
            }

    .teacher-dashboard .dash-welcome {
        padding: 20px;
        min-height: 0;
    }

        .teacher-dashboard .dash-welcome h2 {
            font-size: 26px;
            margin: 8px 0 12px;
        }

        .teacher-dashboard .dash-welcome .dash-intro,
        .teacher-dashboard .dash-welcome #account-email {
            display: none;
        }

        .teacher-dashboard
        .dash-welcome > .dash-eyebrow {
            font-size: 9px;
            margin-bottom: 0;
        }

    .teacher-dashboard .dash-fox {
        display: none;
    }

    .teacher-dashboard
    .dash-welcome:has(.dash-fox) > :not(.dash-fox) {
        max-width: 100%;
    }

    .teacher-dashboard section {
        padding: 20px;
    }

    .teacher-dashboard .dash-class-panel {
        padding: 20px;
    }

    .teacher-dashboard #classes {
        grid-template-columns: 1fr;
    }

    .teacher-dashboard .dash-search-wrap {
        width: 100%;
    }

    .teacher-dashboard .dash-section-top {
        gap: 15px;
    }

    .teacher-dashboard .class-card {
        padding: 22px;
    }

        .teacher-dashboard .class-card:only-child {
            display: block;
        }

            .teacher-dashboard .class-card:only-child span {
                margin-bottom: 22px;
            }

            .teacher-dashboard .class-card:only-child a {
                margin-top: 9px !important;
            }

    .teacher-dashboard .dash-tools {
        grid-template-columns: 1fr;
    }

    .teacher-dashboard .dash-tool {
        min-height: 0;
        padding: 18px 18px 18px 61px;
    }

        .teacher-dashboard .dash-tool > .dash-icon {
            position: absolute;
            left: 20px;
            top: 23px;
        }

    .teacher-dashboard .dash-footer {
        align-items: flex-start;
    }

    .teacher-dashboard .row {
        grid-template-columns: 1fr;
    }

    .teacher-dashboard .narrow {
        margin: 18px auto;
    }

    .teacher-dashboard #login-panel {
        padding: 25px;
    }

    .teacher-dashboard .dash-page-title {
        font-size: 24px;
    }

    .teacher-dashboard.dash-page-account
    #account > section:first-child {
        display: block;
    }

        .teacher-dashboard.dash-page-account
        #account > section:first-child p {
            margin: 8px 0;
        }

    .teacher-dashboard.dash-page-account #logout {
        margin-top: 12px;
    }

    .teacher-dashboard :is(input, select, textarea),
    .teacher-dashboard .dash-search-wrap input {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .teacher-dashboard * {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* Keep authentication actions and support links on the same central axis. */
.teacher-dashboard .dash-auth-logo{display:none}
.teacher-dashboard.dash-page-home:not(.dash-authenticated) .dash-auth-logo{display:block;width:190px;height:auto}
.teacher-dashboard.dash-page-home:not(.dash-authenticated) .dash-brand>span{display:none}
.teacher-dashboard.dash-page-home:not(.dash-authenticated) .dash-sidebar{padding:20px max(20px,calc((100vw - 1090px)/2))}
.teacher-dashboard.dash-page-home:not(.dash-authenticated) .dash-footer{max-width:510px;margin:22px auto 0;padding:0;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:10px}
.teacher-dashboard .dash-footer a{display:inline-flex;align-items:center;justify-content:center;min-height:42px;line-height:1.4;white-space:normal;text-align:center}
.teacher-dashboard #request-reset button[type=submit],.teacher-dashboard #set-password button[type=submit],.teacher-dashboard #back-login{width:100%}
.teacher-dashboard :is(#login-panel,#request-panel,#set-panel){width:100%}
.teacher-dashboard :is(#login-panel,#request-panel,#set-panel){padding:34px}
.teacher-dashboard :is(#login-panel,#request-panel,#set-panel) h2{font-size:29px;letter-spacing:-.8px}
.teacher-dashboard :is(#login-panel,#request-panel,#set-panel) input{min-width:0}
.teacher-dashboard.dash-page-home:not(.dash-authenticated) #status:not([data-error="true"]){position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.teacher-dashboard.dash-page-home:not(.dash-authenticated) #status[data-error="true"]{max-width:510px;margin:20px auto}
@media(max-width:560px){.teacher-dashboard :is(#login-panel,#request-panel,#set-panel){padding:25px}}
@media(max-width:560px){.teacher-dashboard.dash-page-home:not(.dash-authenticated) .dash-footer{gap:8px;margin-top:20px}.teacher-dashboard.dash-page-home:not(.dash-authenticated) .dash-footer a{flex:1 1 120px;min-height:44px}.teacher-dashboard.dash-page-home:not(.dash-authenticated) .dash-footer a:first-child{flex-basis:100%}.teacher-dashboard.dash-page-home:not(.dash-authenticated) .dash-auth-logo{width:175px}}
