/* School accounts in the main app: passwordless sign-in screens, teacher lock-down, student results. */

/* ── Sign-in window: email code + setup code ── */
#group-school-auth.sa-row { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
#authModal .sa-link {
    background: none !important; border: 0 !important; box-shadow: none !important;
    color: #4f46e5 !important; -webkit-text-fill-color: #4f46e5 !important;
    font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; padding: 6px; align-self: center;
}
#authModal .sa-link:hover { text-decoration: underline; }
#authModal .sa-btn i { width: 20px; text-align: center; color: #4f46e5; }
#authModal .auth-modal.sa-open > :not(.sa-panel):not(.auth-blob):not(.auth-close) { display: none !important; }
#authModal .sa-panel { position: relative; display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
#authModal .sa-panel .sa-body { display: flex; flex-direction: column; gap: 10px; }
#authModal .sa-back {
    align-self: flex-start; background: none !important; border: 0 !important; cursor: pointer; font: inherit;
    color: #5b6178 !important; -webkit-text-fill-color: #5b6178 !important; font-size: .88rem; padding: 4px 0;
}
#authModal .sa-title { margin: 2px 0 0; font-size: 1.35rem; color: #1d2235; -webkit-text-fill-color: #1d2235; }
#authModal .sa-sub, #authModal .sa-step, #authModal .sa-note { margin: 0; color: #5b6178; font-size: .9rem; line-height: 1.45; }
#authModal .sa-step { margin-top: 6px; font-weight: 600; color: #1d2235; }
#authModal .sa-note { font-size: .82rem; }
#authModal .sa-otp, #authModal .sa-code { font-size: 1.4rem; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }

/* ── School teacher (locked): no class creation, no Class Roster, no class edits ── */
body.school-locked #btn-manage-roster,
body.school-locked #btn-lib-create-first-class,
body.school-locked #btn-lib-tour-first-class,
body.school-locked .lib-chip--new,
body.school-locked #btn-add-class-mgmt,
body.school-locked #btn-create-class,
body.school-locked #slp-create-class,
body.school-locked #gm-cp-create,
body.school-locked .spn-cp-roster,
body.school-locked [data-empty-new-class],
body.school-locked .mgmt-actions,
body.school-locked #lib-no-classes .lib-empty-title,
body.school-locked #lib-no-classes .lib-empty-sub { display: none !important; }

.lib-school-note { display: none; }
body.school-locked #lib-no-classes .lib-school-note { display: block; text-align: center; max-width: 340px; margin: 0 auto; }
.lib-school-note b { display: block; font-size: 1.05rem; margin-bottom: 6px; }
.lib-school-note span { opacity: .75; font-size: .92rem; line-height: 1.45; }

/* "School" button in the Library header (admin, principal, vp, lead) */
#btn-school-page i { color: #4f46e5; }

/* ── Student: subject switcher + My results (inside the homework sheet look, theme vars from homework-hub.css) ── */
#sch-fab.sch-fab { bottom: calc(max(18px, env(safe-area-inset-bottom)) + 138px); }
#sch-sheet { --h-bg: #0f1522; --h-surface: #161e2e; --h-raised: #1e283b; --h-border: rgba(255,255,255,.09); --h-text: #eaf0f8; --h-muted: #8d99ae; --h-accent: #6d6afe; }
html[data-theme="light"] #sch-sheet { --h-bg: #f6f7fb; --h-surface: #fff; --h-raised: #eef1f7; --h-border: rgba(15,23,42,.1); --h-text: #152033; --h-muted: #5f6b82; --h-accent: #5b57f0; }
.sch-body { display: flex; flex-direction: column; gap: 16px; }
.sch-h { display: block; margin-bottom: 8px; color: var(--h-text); }
.sch-subjects { display: flex; flex-wrap: wrap; gap: 8px; }
.sch-subject {
    border: 1.5px solid var(--h-border); background: var(--h-raised); color: var(--h-text); border-radius: 999px;
    padding: 8px 14px; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
}
.sch-subject:hover:not(:disabled) { border-color: var(--h-accent); }
.sch-subject.is-current { background: var(--h-accent); border-color: var(--h-accent); color: #fff; cursor: default; }
.sch-results { display: flex; flex-direction: column; gap: 12px; }
.sch-res-class { border: 1px solid var(--h-border); border-radius: 14px; padding: 12px 14px; background: var(--h-raised); color: var(--h-text); }
.sch-res-class h4 { margin: 0 0 8px; font-size: 1rem; }
.sch-res-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--h-border); font-size: .92rem; }
.sch-res-row:first-of-type { border-top: 0; }
.sch-res-row b { font-variant-numeric: tabular-nums; }
.sch-res-row .pass { color: #10b981; }
.sch-res-row .fail { color: #ef4444; }
.sch-res-empty { color: var(--h-muted); font-size: .9rem; }
.sch-res-att { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; font-size: .85rem; color: var(--h-muted); }
