.teacher-dashboard-nav{display:flex;flex-wrap:wrap;gap:8px;padding:6px;margin:0 0 24px;border:1px solid var(--dash-line,#d9dfd6);border-radius:16px;background:#edf3ee}
.teacher-dashboard-nav button{display:flex;flex:1;align-items:center;justify-content:center;gap:10px;min-height:52px;padding:12px 16px;border:1px solid transparent;border-radius:11px;color:var(--forest-deep);background:transparent;font:inherit;font-size:.83rem;font-weight:800;cursor:pointer}
.teacher-dashboard-nav button[aria-current=page]{border-color:rgba(36,90,74,.12);background:var(--dash-card,#fffef9);box-shadow:0 3px 10px rgba(23,63,53,.04)}
.teacher-dashboard-nav button:hover{background:var(--dash-card,#fffef9)}
.teacher-dashboard-nav svg{width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.teacher-dashboard-nav .tab-badge{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:999px;color:#fff;background:var(--forest);font-size:.62rem;font-weight:800}
.teacher-dashboard #teacher-panel{grid-template-columns:minmax(0,1fr);gap:20px}
.teacher-dashboard #teacher-panel>.student-section:not(.full-span){height:auto;max-height:none;min-height:0}
.teacher-dashboard .admin-card,.teacher-dashboard #school-workspace-panel .panel{min-width:0;border:1px solid var(--dash-line,#d9dfd6);border-radius:18px;background:var(--dash-card,#fffef9);box-shadow:0 8px 24px rgba(23,63,53,.045)}
.teacher-dashboard #create-panel{padding:0;overflow:hidden}
.teacher-dashboard #create-panel>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:68px;padding:20px 28px;color:var(--forest-deep);font-size:1rem;font-weight:800;cursor:pointer;list-style:none}
.teacher-dashboard #create-panel>summary::-webkit-details-marker{display:none}
.teacher-dashboard #create-panel[open]>summary .ui-chevron{transform:rotate(90deg)}
.teacher-dashboard #create-panel>.card-copy,.teacher-dashboard #create-panel>form,.teacher-dashboard #invite-result{margin:0 28px 24px}
.teacher-dashboard #create-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 20px}
.teacher-dashboard #create-form>.field{margin:0}
.teacher-dashboard #create-form .form-status{grid-column:1/-1;margin:0}
.teacher-dashboard #create-form .form-status:empty{display:none}
.teacher-dashboard #create-form .button{margin:0;min-height:44px}
.teacher-dashboard .section-heading{align-items:center;gap:20px;padding:25px 28px 20px}
.teacher-dashboard .section-heading .eyebrow{display:none}
.teacher-dashboard .section-heading h2{font-size:clamp(1.35rem,2vw,1.7rem)}
.teacher-dashboard .section-heading>div:first-child>p:last-child{font-size:.8rem;line-height:1.5}
.teacher-dashboard #teacher-panel .account-totals{gap:9px;flex-wrap:wrap}
.teacher-dashboard #teacher-panel .account-totals span{min-width:76px;align-items:flex-start;padding:9px 12px;border-radius:10px;background:#edf5ee}
.teacher-dashboard #teacher-panel .account-totals b{font-size:1.1rem}
.teacher-dashboard .managed-toolbar{flex-wrap:wrap}
.teacher-dashboard .managed-toolbar .search-field{min-width:180px}
.teacher-dashboard .managed-toolbar input,.teacher-dashboard .managed-toolbar select{font-size:.8rem}
.teacher-dashboard #managed-group-filter{flex:1;min-width:0;max-width:100%;height:100%;border:0;color:var(--text);background:transparent;font:inherit;font-size:.8rem;cursor:pointer}
.teacher-dashboard #deletion-requests-list{display:grid;gap:10px;padding:0 28px 28px}
.teacher-dashboard .people-list{align-content:start;max-height:650px;scrollbar-width:thin;scrollbar-color:#8dac9c #edf3ee}
.teacher-dashboard .person-row{padding:17px;gap:12px 20px;background:#fff;transition:none}
.teacher-dashboard .person-row:hover{transform:none}
.teacher-dashboard .person-name strong{font-size:.87rem}
.teacher-dashboard .person-name small{font-size:.76rem}
.teacher-dashboard .person-actions{max-width:none;gap:7px}
.teacher-dashboard .person-actions .tiny-button{min-height:36px;padding:8px 11px;font-size:.73rem}
.teacher-dashboard .person-meta span{font-size:.7rem}
.teacher-dashboard .teacher-reports-panel{display:grid;gap:20px}
.teacher-dashboard #school-workspace-panel .eyebrow{display:none}
.teacher-dashboard #school-workspace-panel .tabs{gap:8px;border:0}
.teacher-dashboard #school-workspace-panel .tabs button{border:1px solid rgba(36,90,74,.16);border-radius:10px;font-size:.82rem}
.teacher-dashboard #school-workspace-panel .tabs button[aria-current=page]{color:#fff;background:var(--forest)}
.teacher-dashboard #school-workspace-panel .group-grid{grid-template-columns:repeat(auto-fit,minmax(min(255px,100%),1fr))}
.teacher-dashboard #my-documents-panel{display:none}
.teacher-dashboard #feedback-card{display:none}
.teacher-dashboard #summary-email-panel .section-heading .eyebrow{display:none}
.teacher-dashboard #teacher-panel .search-field:focus-within{outline:3px solid var(--forest-deep);outline-offset:2px}
.teacher-dashboard-nav button:focus-visible,.teacher-dashboard #create-panel>summary:focus-visible{outline:3px solid var(--forest-deep);outline-offset:2px}
.teacher-dashboard-nav[hidden],.teacher-dashboard-nav button[hidden],.teacher-dashboard .teacher-reports-panel[hidden],.teacher-dashboard #teacher-panel[hidden],.teacher-dashboard #create-panel[hidden]{display:none}
@media(max-width:640px){.teacher-dashboard #deletion-requests-list{padding:0 20px 20px}}
@media(max-width:900px){.teacher-dashboard .person-row{grid-template-columns:minmax(0,1fr)}.teacher-dashboard .person-actions{grid-column:1;grid-row:3;justify-content:flex-start}.teacher-dashboard .teacher-flags-overview{align-items:flex-start;flex-direction:column}.teacher-dashboard .teacher-flags-overview .button{flex:auto}}
@media(max-width:640px){.teacher-dashboard-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin-bottom:18px}.teacher-dashboard-nav button{justify-content:flex-start;gap:8px;padding:10px;font-size:.73rem}.teacher-dashboard-nav svg{width:19px;height:19px}.teacher-dashboard .admin-heading{gap:16px}.teacher-dashboard #create-panel>summary{padding:20px}.teacher-dashboard #create-panel>.card-copy,.teacher-dashboard #create-panel>form,.teacher-dashboard #invite-result{margin-right:20px;margin-left:20px}.teacher-dashboard #create-form{grid-template-columns:minmax(0,1fr)}.teacher-dashboard .section-heading{align-items:flex-start;padding:22px 20px 18px}.teacher-dashboard .managed-toolbar .search-field{min-width:0}.teacher-dashboard .people-list{padding:0 20px 20px}.teacher-dashboard .person-actions{gap:7px}.teacher-dashboard .teacher-flags-overview{padding:22px 20px}.teacher-dashboard .teacher-flags-overview .button{white-space:normal;flex-wrap:wrap}.teacher-dashboard #teacher-panel .account-totals span{min-width:0;flex:1}.teacher-dashboard .teacher-reports-panel .flag-actions{flex-wrap:wrap}.teacher-dashboard #school-workspace-panel .tabs{flex-wrap:wrap}.teacher-dashboard #school-workspace-panel .tabs button{white-space:normal}.teacher-dashboard #my-documents-panel{margin-top:18px}}
.teacher-dashboard #managed-accounts-section{overflow:visible}
.teacher-dashboard #managed-group-filter-field .score-select{flex:1;min-width:0}
.teacher-dashboard #managed-group-filter-field .score-select-trigger{border:0;background:transparent;padding:0;height:40px}
.teacher-dashboard #managed-group-filter-field .score-select-menu{min-width:190px;max-height:270px;overflow:auto;scrollbar-width:thin}
.teacher-dashboard .student-filter{flex:none;min-width:120px}
.teacher-dashboard #status-filter{min-width:210px;max-height:380px;overflow:auto;scrollbar-width:thin}
.teacher-dashboard #status-filter p{margin:6px 10px 3px;color:var(--muted);font-size:.67rem;font-weight:800}
.teacher-dashboard #status-filter button{display:flex;align-items:center;gap:10px;text-align:left}
.teacher-dashboard #status-filter .filter-chip:before{content:"";width:15px;height:15px;flex:none;border:1px solid #8dac9c;border-radius:4px}
.teacher-dashboard #status-filter .filter-chip[aria-pressed=true]{color:var(--forest-deep);background:#e8f2ed}
.teacher-dashboard #status-filter .filter-chip[aria-pressed=true]:before{content:"✓";display:grid;place-items:center;color:white;background:var(--forest);border-color:var(--forest);font-size:.68rem}
.teacher-dashboard #clear-student-filters{border-top:1px solid var(--line);border-radius:0;margin-top:5px;color:var(--muted)}
.teacher-report-tools{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:0 28px 20px}
.teacher-report-filters{display:flex;gap:4px;padding:4px;border:1px solid var(--line);border-radius:11px;background:#edf3ee}
.teacher-report-filters button{min-height:36px;padding:8px 16px;border:0;border-radius:8px;background:transparent;color:var(--forest-deep);font:inherit;font-size:.78rem;font-weight:800;cursor:pointer}
.teacher-report-filters button[aria-pressed=true]{color:#fff;background:var(--forest)}
#teacher-report-count{margin:0;font-size:.75rem;color:var(--muted)}
.teacher-dashboard #teacher-report-bug{min-height:42px;padding:10px 16px;font-size:.8rem;gap:16px}
.teacher-dashboard #my-reports{display:grid;gap:12px;padding:0 28px 28px}
.teacher-dashboard .report-card{margin:0;padding:0;overflow:hidden;border:1px solid rgba(36,90,74,.16);border-radius:14px;background:#fff}
.report-card-summary{display:flex;align-items:center;gap:16px;padding:20px;list-style:none;cursor:pointer}
.report-card-summary::-webkit-details-marker{display:none}
.report-kind-icon{display:grid;place-items:center;flex:none;width:42px;height:42px;border-radius:12px;color:var(--forest);background:#e8f2ed}
.report-kind-icon svg{width:23px;height:23px}
.report-card-copy{display:grid;flex:1;min-width:0;gap:5px}
.report-card-copy strong{font-size:.9rem;color:var(--forest-deep)}
.report-card-copy>span{font-size:.82rem;line-height:1.55;color:var(--text);overflow-wrap:anywhere}
.report-card-copy small{font-size:.71rem;color:var(--muted)}
.report-card-summary>.badge{flex:none;white-space:normal;text-align:center}
.report-card-summary>.ui-chevron{flex:none;font-size:1.2rem}
.report-card[open]>.report-card-summary>.ui-chevron{transform:rotate(90deg)}
.report-card-body{padding:20px;border-top:1px solid var(--line);overflow-wrap:anywhere}
.report-card-body h3{margin:22px 0 12px;font-size:.85rem}
.report-full-description{margin:0 0 12px;white-space:pre-wrap;font-size:.85rem;line-height:1.65}
.report-card-body .report-conversation{max-height:360px;overflow:auto;scrollbar-width:thin}
.report-card-body .my-report-reply-form{display:grid;gap:10px;margin:18px 0}
.report-card-body .my-report-reply-form label{display:grid;gap:7px;font-size:.78rem;font-weight:700}
.report-card-body .my-report-reply-form textarea{width:100%;min-width:0;padding:12px;resize:vertical;border:1px solid var(--line-strong);border-radius:10px;font:inherit;font-weight:400;line-height:1.5}
.report-card-body .my-report-reply-form button{justify-self:end;min-height:36px;padding:8px 20px}
.report-card-body .flag-actions{justify-content:flex-end;margin-top:20px}
.teacher-reports-empty{display:grid;gap:8px;padding:38px 20px;border:1px dashed #c6d6cc;border-radius:14px;background:#f6f9f4;text-align:center}
.teacher-reports-empty strong{font-size:1rem;color:var(--forest-deep)}
.teacher-reports-empty p{margin:0;font-size:.83rem;color:var(--muted);line-height:1.6}
.report-card-summary:focus-visible,.teacher-report-filters button:focus-visible{outline:3px solid var(--forest-deep);outline-offset:-3px}
@media(max-width:640px){.teacher-dashboard .managed-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}.teacher-dashboard .student-filter{min-width:0}.teacher-dashboard .student-filter .score-select-trigger{font-size:.75rem}.teacher-dashboard #status-filter{left:0;right:auto}.teacher-report-tools{flex-wrap:wrap;padding:0 20px 18px}.teacher-dashboard #my-reports{padding:0 20px 20px}.report-card-summary{display:grid;grid-template-columns:32px minmax(0,1fr) 16px;gap:10px;padding:15px}.report-kind-icon{width:32px;height:32px;border-radius:9px}.report-card-copy{grid-column:2;grid-row:1/3}.report-card-summary>.badge{grid-column:2;grid-row:3;justify-self:start}.report-card-summary>.ui-chevron{grid-column:3;grid-row:1}.report-card-body{padding:16px}.teacher-report-filters button{padding:8px 13px}}
/* Pop-ups: the close button stays reachable while long content scrolls inside a calm, rounded scroll area. */
.maintenance-dialog{overflow:hidden}
.maintenance-dialog>.dialog-frame{max-height:calc(100svh - 30px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#9fbcae transparent}
.maintenance-dialog>.dialog-frame>.dialog-close{position:sticky;top:6px;left:auto;z-index:4;display:grid;margin:0 0 -34px}

.setup-checklist{margin-bottom:18px}
.setup-checklist .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.setup-bar{height:8px;margin:4px 0 14px;border-radius:999px;background:#e3eee7;overflow:hidden}
.setup-bar span{display:block;height:100%;border-radius:999px;background:#245a4a;transition:width .3s ease}
.setup-list{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.setup-list li{display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid #d5e5da;border-radius:10px;background:var(--dash-card,#fffef9)}
.setup-list li.is-done{background:#f3f8f4;color:#5a7268}
.setup-tick{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;width:22px;height:22px;border:2px solid #a9cab4;border-radius:50%;color:#fff;font-size:.72rem;font-weight:800}
.setup-list li.is-done .setup-tick{border-color:#245a4a;background:#245a4a}
.setup-label{flex:1;font-size:.86rem;font-weight:700}
.setup-go,.setup-dismiss{min-height:36px;padding:6px 14px;border:1px solid #a9cab4;border-radius:9px;background:var(--dash-card,#fffef9);color:#173f35;font-weight:800;font-size:.76rem;cursor:pointer}
.setup-go:hover,.setup-dismiss:hover{border-color:#55bd92;background:#eef7f1}
.setup-hint{color:#5a7268;font-size:.74rem}
a.setup-hint{text-decoration:underline}

.teacher-dashboard #student-limit{margin:0 28px 18px;padding:12px 14px;border:1px solid var(--line,#dfe8e1);border-radius:10px;background:#f3f8f4;color:#2f4a3f;font-size:.82rem;line-height:1.5}.teacher-dashboard #student-limit[hidden]{display:none}.teacher-dashboard #student-limit strong{font-weight:800}.teacher-dashboard #student-limit.is-full{border-color:#e8c0c6;background:#fbeff1;color:#8e3e49}
.table-message .retry-button{margin-top:10px}
@media(max-width:640px){.teacher-dashboard #student-limit{margin-right:20px;margin-left:20px}}

/* ---- Dashboard refresh (teacher): same look as the student and personal dashboards ---- */
.teacher-dashboard-nav{border-color:var(--dash-line,#d9dfd6);border-radius:18px;background:#efeee6}
.teacher-dashboard-nav button[aria-current=page]{border-color:var(--dash-line,#d9dfd6);box-shadow:none}
.teacher-dashboard .admin-card,.teacher-dashboard #school-workspace-panel .panel{border-radius:var(--dash-radius,20px);box-shadow:none}
.teacher-dashboard #teacher-panel .account-totals span{background:var(--dash-tint-sage,#e4eddf)}
.teacher-dashboard .person-row{border-radius:14px}
.teacher-dashboard #school-workspace-panel .tabs button[aria-current=page]{background:var(--dash-ink,#173f35)}

/* "At a glance" strip at the top of the Students tab: what needs doing first, then the plain totals. */
.teacher-dashboard .staff-overview{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1.2fr);gap:14px}
.teacher-dashboard .staff-stat-group{display:grid;grid-template-columns:repeat(auto-fit,minmax(118px,1fr));gap:10px;min-width:0}
.teacher-dashboard .staff-stat{display:grid;align-content:space-between;gap:8px;min-width:0;min-height:84px;padding:14px 16px;border:1px solid var(--dash-line,#d9dfd6);border-radius:16px;background:var(--dash-card,#fffef9);color:var(--forest-deep);font:inherit;text-align:left}
.teacher-dashboard .staff-stat small{color:var(--muted);font-size:.72rem;font-weight:700;line-height:1.3}
.teacher-dashboard .staff-stat b{font-size:1.65rem;line-height:1;letter-spacing:-.04em;font-variant-numeric:tabular-nums}
.teacher-dashboard button.staff-stat{cursor:pointer;transition:border-color .18s,background .18s}
.teacher-dashboard button.staff-stat:hover{border-color:var(--forest)}
.teacher-dashboard button.staff-stat.is-attention{border-color:var(--forest);background:#e8f2ed}
.teacher-dashboard button.staff-stat.is-attention small{color:var(--forest-deep)}
.teacher-dashboard button.staff-stat:focus-visible{outline:3px solid var(--forest-deep);outline-offset:2px}
.teacher-dashboard .staff-stat-group:not(.is-actions) .staff-stat{background:#f3f7f3}
@media(max-width:900px){.teacher-dashboard .staff-overview{grid-template-columns:1fr}}
@media(max-width:640px){.teacher-dashboard .staff-stat-group{grid-template-columns:repeat(2,minmax(0,1fr))}.teacher-dashboard .staff-stat{min-height:74px;padding:12px 14px}.teacher-dashboard .staff-stat b{font-size:1.4rem}}
.student-dashboard.teacher-dashboard .dash-pair{grid-template-columns:1fr}
/* Managed accounts: search count, help panel, state labels and paging.
   Colours come from the shared variables (--forest, --mint, --line, --muted), which
   school-domain.css re-points to the school's colours on school domains. */
.teacher-dashboard .managed-toolbar .search-field svg{display:block;flex:none}
.teacher-dashboard #refresh svg{vertical-align:-2px}
.teacher-dashboard .managed-pager .tiny-button:focus-visible,.teacher-dashboard .roster-empty .tiny-button:focus-visible{outline:3px solid var(--forest);outline-offset:2px}
.teacher-dashboard .roster-count{margin:0;padding:0 28px 12px;color:var(--muted);font-size:.78rem;font-weight:700}
.teacher-dashboard .roster-count:empty{display:none}
.teacher-dashboard .person-meta .badge.roster-state{text-transform:none;font-weight:700}
.teacher-dashboard .roster-empty{gap:12px;padding:24px 16px;border:1px dashed var(--line-strong);border-radius:13px;background:var(--mint)}
.teacher-dashboard .roster-empty p{margin:0}
.teacher-dashboard .roster-empty-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.teacher-dashboard .person-actions .tiny-button:disabled{opacity:.5;cursor:not-allowed}
.teacher-dashboard .managed-pager{display:flex;align-items:center;justify-content:center;gap:16px;padding:4px 28px 24px}
.teacher-dashboard .managed-pager[hidden]{display:none}
.teacher-dashboard .managed-pager>span{color:var(--muted);font-size:.78rem;font-weight:700}
.teacher-dashboard .managed-pager .tiny-button{min-width:96px;min-height:38px}
.teacher-dashboard .managed-pager .tiny-button:disabled{opacity:.45;cursor:default}
@media(max-width:700px){.teacher-dashboard .roster-count{padding-inline:20px}.teacher-dashboard .roster-help-list>div{grid-template-columns:1fr}.teacher-dashboard .managed-pager{padding-inline:20px;flex-wrap:wrap}}
