.classroom-roster-page .roster-workspace {
    gap: 24px;
    max-width: 1160px;
}

.classroom-roster-page .roster-workspace-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 32px;
    align-items: end;
    padding-bottom: 26px;
    border-bottom: 1px solid #dedbd4;
}

.classroom-roster-page .roster-workspace-header__copy {
    min-width: 0;
}

.classroom-roster-page .roster-workspace-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 24px;
    color: #59697c;
    font-size: .83rem;
    font-weight: 760;
    text-decoration: none;
}

.classroom-roster-page .roster-workspace-back:hover,
.classroom-roster-page .roster-workspace-back:focus-visible {
    color: #172b45;
}

.classroom-roster-page .roster-workspace-header .eyebrow {
    margin-bottom: 8px;
    color: #756c5c;
}

.classroom-roster-page .roster-workspace-header h1 {
    max-width: 22ch;
    margin: 0;
    color: #152b47;
    font-size: clamp(2rem, 4.1vw, 3.35rem);
    line-height: 1.02;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
}

.classroom-roster-page .roster-workspace-context {
    margin: 14px 0 0;
    color: #607086;
    font-size: .98rem;
    font-weight: 650;
    line-height: 1.5;
}

.classroom-roster-page .roster-workspace-header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    justify-content: flex-end;
    padding-bottom: 2px;
}

.classroom-roster-page .roster-workspace-header__actions :is(.primary-button, .secondary-button) {
    width: auto;
    min-width: 0;
    min-height: 44px;
    padding-inline: 17px;
    border-radius: 11px;
    white-space: nowrap;
}

.classroom-roster-page .roster-workspace-header__actions .primary-button {
    background: #172f4d;
    box-shadow: 0 8px 18px rgba(23, 47, 77, .13);
}

.classroom-roster-page .roster-workspace-surface {
    gap: 22px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.classroom-roster-page .roster-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.classroom-roster-page .roster-section-heading h2 {
    margin: 0;
    color: #172b45;
    font-size: clamp(1.45rem, 2.5vw, 1.85rem);
    letter-spacing: -.025em;
}

.classroom-roster-page .roster-section-heading .section-copy {
    margin: 5px 0 0;
    color: #65758a;
}

.classroom-roster-page .roster-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid #dedbd4;
    border-radius: 15px;
    background: #fcfbf9;
}

.classroom-roster-page .roster-summary-grid .summary-card {
    align-content: center;
    gap: 6px;
    min-height: 94px;
    padding: 16px 20px;
    border: 0;
    border-right: 1px solid #e3e0da;
    border-radius: 0;
    background: transparent;
}

.classroom-roster-page .roster-summary-grid .summary-card:last-child {
    border-right: 0;
}

.classroom-roster-page .roster-summary-grid .summary-label {
    color: #6b7480;
    font-size: .72rem;
    font-weight: 780;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.classroom-roster-page .roster-summary-grid .summary-value {
    color: #172b45;
    font-size: 1.65rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.035em;
}

.classroom-roster-page .roster-enrollment-panel {
    overflow: hidden;
    border: 1px solid #dedbd4;
    border-radius: 14px;
    background: #fff;
}

.classroom-roster-page .roster-enrollment-panel > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 64px;
    padding: 13px 16px;
    color: #233951;
    cursor: pointer;
    list-style: none;
}

.classroom-roster-page .roster-enrollment-panel > summary::-webkit-details-marker {
    display: none;
}

.classroom-roster-page .roster-enrollment-panel > summary:hover,
.classroom-roster-page .roster-enrollment-panel > summary:focus-visible {
    background: #faf9f6;
    outline: none;
}

.classroom-roster-page .roster-enrollment-panel > summary > span:first-child {
    display: grid;
    gap: 2px;
}

.classroom-roster-page .roster-enrollment-panel > summary strong {
    font-size: .92rem;
}

.classroom-roster-page .roster-enrollment-panel > summary small {
    color: #6d7785;
    font-size: .79rem;
}

.classroom-roster-page .roster-enrollment-panel__icon {
    position: relative;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border: 1px solid #d8d5ce;
    border-radius: 50%;
    background: #fff;
}

.classroom-roster-page .roster-enrollment-panel__icon::before,
.classroom-roster-page .roster-enrollment-panel__icon::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 1.5px;
    border-radius: 999px;
    background: #44576d;
    content: "";
    transform: translate(-50%, -50%);
    transition: transform 160ms ease;
}

.classroom-roster-page .roster-enrollment-panel__icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.classroom-roster-page .roster-enrollment-panel[open] .roster-enrollment-panel__icon::after {
    transform: translate(-50%, -50%) rotate(0deg);
}

.classroom-roster-page .roster-add-form {
    grid-template-columns: minmax(220px, 420px) auto;
    gap: 10px;
    padding: 16px;
    border: 0;
    border-top: 1px solid #e4e1db;
    border-radius: 0;
    background: #faf9f6;
}

.classroom-roster-page .roster-add-form .secondary-button {
    width: auto;
    min-width: 128px;
}

.classroom-roster-page .roster-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 16px;
    border-color: #dedbd4;
    border-radius: 14px;
    background: #faf9f6;
}

.classroom-roster-page .roster-controls__heading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 2px;
}

.classroom-roster-page .roster-controls__heading > div {
    display: grid;
    gap: 2px;
}

.classroom-roster-page .roster-controls__heading strong {
    color: #233951;
    font-size: .9rem;
}

.classroom-roster-page .roster-controls__heading span {
    color: #6d7785;
    font-size: .78rem;
}

.classroom-roster-page .roster-reset-button {
    padding: 5px 0;
    border: 0;
    background: transparent;
    color: #59697c;
    cursor: pointer;
    font: inherit;
    font-size: .78rem;
    font-weight: 780;
}

.classroom-roster-page .roster-reset-button:hover,
.classroom-roster-page .roster-reset-button:focus-visible {
    color: #172b45;
    text-decoration: underline;
}

.classroom-roster-page .roster-controls .form-field > span,
.classroom-roster-page .roster-add-form .form-field > span {
    color: #59697c;
    font-size: .72rem;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.classroom-roster-page .roster-controls :is(select, input),
.classroom-roster-page .roster-add-form input {
    min-height: 44px;
    border-color: #d6d3cc;
    border-radius: 10px;
    background: #fff;
}

.classroom-roster-page .roster-results-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 2px 2px 10px;
    border-bottom: 1px solid #e3e0da;
}

.classroom-roster-page .roster-results-heading h3 {
    margin: 0;
    color: #172b45;
    font-size: 1rem;
}

.classroom-roster-page .roster-results-heading span {
    color: #687789;
    font-size: .78rem;
    font-weight: 720;
}

.classroom-roster-page .roster-list {
    gap: 8px;
}

.classroom-roster-page .roster-item {
    grid-template-columns: minmax(220px, 1.25fr) minmax(260px, 1fr) auto auto;
    padding: 14px 16px;
    border-color: #e0ddd7;
    border-radius: 13px;
    box-shadow: 0 4px 14px rgba(31, 35, 40, .035);
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 160ms ease;
}

.classroom-roster-page .roster-item:hover,
.classroom-roster-page .roster-item:focus-within {
    border-color: #c8c2b7;
    box-shadow: 0 9px 24px rgba(31, 35, 40, .065);
    transform: translateY(-1px);
}

.classroom-roster-page .roster-name {
    color: #1c3655;
    font-weight: 820;
    text-decoration: none;
}

.classroom-roster-page .roster-name:hover,
.classroom-roster-page .roster-name:focus-visible {
    text-decoration: underline;
}

.classroom-roster-page .roster-activity {
    gap: 7px;
}

.classroom-roster-page .roster-activity-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    color: #6b7888;
    font-size: .76rem;
}

.classroom-roster-page .roster-activity-item strong {
    color: #2e435c;
    font-size: .8rem;
    text-align: right;
}

.classroom-roster-page .roster-actions .lesson-action {
    min-height: 38px;
    padding-inline: 12px;
    border-radius: 9px;
    font-size: .78rem;
}

.classroom-roster-page .roster-empty-state {
    display: grid;
    justify-items: center;
    gap: 8px;
    min-height: 220px;
    padding: 46px 24px;
    border: 1px dashed #d5d0c7;
    border-radius: 15px;
    background: #fcfbf9;
    color: #657386;
    text-align: center;
}

.classroom-roster-page .roster-empty-state__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 4px;
    border: 1px solid #d9d5cd;
    border-radius: 50%;
    background: #fff;
    color: #756c5c;
    font-size: 1.1rem;
    font-weight: 800;
}

.classroom-roster-page .roster-empty-state h3 {
    margin: 0;
    color: #243a54;
    font-size: 1.05rem;
}

.classroom-roster-page .roster-empty-state p {
    max-width: 48ch;
    margin: 0;
    line-height: 1.55;
}

.classroom-roster-page .roster-empty-state .secondary-button {
    width: auto;
    min-width: 0;
    margin-top: 8px;
}

@media (max-width: 960px) {
    .classroom-roster-page .roster-workspace-header {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 20px;
    }

    .classroom-roster-page .roster-workspace-header__actions {
        justify-content: flex-start;
    }

    .classroom-roster-page .roster-item {
        grid-template-columns: minmax(220px, 1fr) minmax(220px, .8fr) auto;
    }

    .classroom-roster-page .roster-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .classroom-roster-page .roster-workspace-header h1 {
        font-size: clamp(1.9rem, 10vw, 2.65rem);
    }

    .classroom-roster-page .roster-workspace-header__actions :is(.primary-button, .secondary-button) {
        flex: 1 1 180px;
        justify-content: center;
    }

    .classroom-roster-page .roster-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .classroom-roster-page .roster-summary-grid .summary-card:nth-child(2) {
        border-right: 0;
    }

    .classroom-roster-page .roster-summary-grid .summary-card:nth-child(-n + 2) {
        border-bottom: 1px solid #e3e0da;
    }

    .classroom-roster-page .roster-add-form,
    .classroom-roster-page .roster-controls,
    .classroom-roster-page .roster-item {
        grid-template-columns: minmax(0, 1fr);
    }

    .classroom-roster-page .roster-add-form .secondary-button {
        width: 100%;
    }

    .classroom-roster-page .roster-item > .badge,
    .classroom-roster-page .roster-actions {
        grid-column: 1;
        justify-self: start;
    }
}

@media (max-width: 480px) {
    .classroom-roster-page .roster-workspace-back {
        margin-bottom: 18px;
    }

    .classroom-roster-page .roster-section-heading,
    .classroom-roster-page .roster-controls__heading,
    .classroom-roster-page .roster-results-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .classroom-roster-page .roster-summary-grid .summary-card {
        min-height: 82px;
        padding: 14px;
    }

    .classroom-roster-page .roster-enrollment-panel > summary small {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .classroom-roster-page .roster-enrollment-panel__icon::before,
    .classroom-roster-page .roster-enrollment-panel__icon::after,
    .classroom-roster-page .roster-item {
        transition: none !important;
        transform: none !important;
    }
}
