.student-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.page-eyebrow {
    font-size: .75rem;
    font-weight: 800;
    color: var(--app-primary-strong);
    text-transform: uppercase;
    letter-spacing: .02em;
}

.student-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

.student-overview-card {
    min-height: 78px;
    padding: .9rem 1rem;
    border-radius: .75rem;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
}

.student-overview-label {
    font-size: .78rem;
    color: var(--app-text-soft);
    margin-bottom: .25rem;
}

.student-overview-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--app-text);
}

.students-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--app-border);
    background: #f8fafc;
}

.student-search-form {
    display: flex;
    gap: .5rem;
    width: min(100%, 460px);
}

.student-list-shell {
    overflow: hidden;
}

.student-person-cell {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 220px;
    color: inherit;
}

.student-avatar-sm {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: #fff;
    font-weight: 800;
    font-size: .9rem;
    border: 1px solid transparent;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .1);
}

.student-muted-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: .25rem .65rem;
    background: var(--app-primary-faint);
    border: 1px solid var(--app-border);
    color: var(--app-text);
    font-size: .82rem;
}

.student-row-actions {
    display: inline-flex;
    justify-content: flex-end;
    gap: .4rem;
    white-space: nowrap;
}

.empty-state-title {
    font-weight: 700;
    color: var(--app-text);
}

.min-w-0 {
    min-width: 0;
}

.student-profile-hero {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    border-radius: .8rem;
    border: 1px solid var(--app-border);
    background: linear-gradient(135deg, var(--app-surface), var(--app-primary-faint));
    box-shadow: var(--app-shadow);
}

.student-profile-avatar {
    width: 88px;
    height: 88px;
    border-radius: 999px;
    overflow: hidden;
    flex: 0 0 88px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--app-primary);
    border: 2px solid rgba(255, 255, 255, .88);
    color: #fff;
    font-size: 1.45rem;
    font-weight: 800;
}

.student-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-profile-main {
    flex: 1 1 auto;
    min-width: 0;
}

.student-profile-contact {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem .9rem;
    color: var(--app-text-soft);
    font-size: .9rem;
}

.student-profile-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .75rem;
}

.student-profile-pills span {
    border-radius: 999px;
    padding: .25rem .7rem;
    background: var(--app-primary-faint);
    border: 1px solid var(--app-border);
    color: var(--app-primary-strong);
    font-size: .82rem;
    font-weight: 700;
}

.student-profile-actions {
    flex: 0 0 auto;
}

.student-photo-upload {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--app-border);
    border-radius: .75rem;
    background: var(--app-surface-subtle);
    padding: 1rem;
}

.student-photo-preview {
    width: 96px;
    height: 96px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    background: var(--app-surface);
    color: var(--app-text-soft);
    font-size: .75rem;
    text-align: center;
}

.student-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-photo-upload-body {
    min-width: 0;
}

.student-photo-remove {
    margin-top: .65rem;
}

.record-profile-picture {
    grid-row: span 2;
}

.record-profile-picture img {
    width: 96px;
    height: 96px;
    margin-top: .35rem;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    object-fit: cover;
}

.student-detail-layout {
    align-items: start;
}

.surface-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.info-note {
    border-top: 1px solid var(--app-border);
    padding-top: 1rem;
}

.guardian-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}

.guardian-card,
.student-note-card {
    border: 1px solid var(--app-border);
    border-radius: .75rem;
    padding: .9rem 1rem;
    background: #f8fafc;
}

.guardian-title,
.student-note-title {
    font-size: .78rem;
    font-weight: 800;
    color: var(--app-text-soft);
    margin-bottom: .35rem;
}

.student-note-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}

.student-note-card p {
    margin: 0;
    color: var(--app-text-soft);
    font-size: .9rem;
    white-space: pre-wrap;
}

.student-consent-summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 28px;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    background: var(--app-primary-faint);
    color: var(--app-primary-strong);
    font-size: .78rem;
    font-weight: 850;
}

.student-consent-list {
    display: grid;
    gap: .6rem;
}

.student-consent-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: 54px;
    border: 1px solid var(--app-border);
    border-radius: .7rem;
    background: var(--app-surface-muted);
    padding: .7rem .8rem;
}

.student-consent-title {
    color: var(--app-text);
    font-size: .9rem;
    font-weight: 780;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.student-consent-meta {
    color: var(--app-text-soft);
    font-size: .78rem;
    margin-top: .15rem;
}

.student-consent-state {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    border-radius: 999px;
    border: 1px solid var(--app-border);
    padding: .18rem .55rem;
    font-size: .74rem;
    font-weight: 850;
    white-space: nowrap;
}

.student-consent-state.accepted {
    border-color: color-mix(in srgb, var(--app-success) 40%, var(--app-border));
    background: color-mix(in srgb, var(--app-success) 12%, var(--app-surface));
    color: var(--app-success);
}

.student-consent-state.pending {
    border-color: color-mix(in srgb, var(--app-accent) 44%, var(--app-border));
    background: color-mix(in srgb, var(--app-accent) 14%, var(--app-surface));
    color: color-mix(in srgb, var(--app-accent) 62%, var(--app-text));
}

.student-consent-state.declined {
    background: var(--app-surface-strong);
    color: var(--app-text-soft);
}

.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
}

.quick-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: .65rem;
    border: 1px solid var(--app-border);
    background: #f8fafc;
    color: var(--app-text) !important;
    text-decoration: none;
    font-size: .88rem;
    font-weight: 750;
    text-align: center;
    padding: .55rem .7rem;
}

.quick-action-link:hover,
.quick-action-link:focus {
    background: var(--app-primary-faint);
    border-color: var(--app-primary);
    color: var(--app-primary-strong) !important;
}

.student-form-shell {
    max-width: 1040px;
    padding: 1.25rem;
}

.student-form-section-title {
    margin-top: .5rem;
    padding-top: .85rem;
    border-top: 1px solid var(--app-border);
    color: var(--app-text);
    font-size: .86rem;
    font-weight: 800;
}

@media (max-width: 992px) {
    .student-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .student-page-header,
    .student-profile-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .student-profile-avatar {
        width: 76px;
        height: 76px;
        flex-basis: 76px;
    }

    .student-profile-actions .btn {
        width: 100%;
    }

    .student-search-form {
        width: 100%;
    }

    .student-photo-upload {
        grid-template-columns: minmax(0, 1fr);
    }

    .guardian-grid,
    .student-note-grid,
    .quick-action-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 576px) {
    .student-overview-grid,
    .info-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .student-search-form {
        flex-direction: column;
    }

    .student-row-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}

