:root{
  --schools-blue:#39b6ff;
  --schools-blue-deep:#0876aa;
  --schools-blue-dark:#075d87;
  --schools-navy:#10212d;
  --schools-muted:#66737d;
  --schools-line:#c8eaff;
  --schools-soft:#eff9ff;
  --schools-soft-2:#f8fcff;
  --schools-card:#fff;
  --schools-success:#167348;
  --schools-warning:#9a5b00;
  --schools-danger:#9e2d2d;
  --schools-shadow:0 18px 50px rgba(0,104,154,.12);
}
*{box-sizing:border-box}
html{min-height:100%;-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{margin:0;min-height:100%;font-family:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;color:var(--schools-navy);background:radial-gradient(circle at 5% 0,rgba(57,182,255,.18),transparent 30%),linear-gradient(180deg,#fff 0,#f5fbff 52%,#edf8ff 100%);overflow-x:hidden}
html,body,.spo-schools-app{max-width:100%;overflow-x:hidden}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit}
button,a{-webkit-tap-highlight-color:transparent}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(8,118,170,.34);outline-offset:2px}
[hidden]{display:none!important}
.spo-schools-skip{position:fixed;left:16px;top:-80px;z-index:1000;background:#fff;border:2px solid var(--schools-blue-deep);padding:10px 14px;border-radius:12px;font-weight:900;transition:top .15s ease}
.spo-schools-skip:focus{top:12px}
.spo-schools-app{min-height:100vh;display:flex;flex-direction:column}
.spo-schools-header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.9);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border-bottom:1px solid rgba(57,182,255,.28)}
.spo-schools-header-inner{width:min(100%,1500px);margin:0 auto;padding:9px 20px;display:flex;align-items:center;justify-content:space-between;gap:18px}
.spo-schools-brand{display:flex;align-items:center;gap:12px;font-weight:850;min-width:0}
.spo-schools-brand img{height:48px;width:auto;max-width:190px;object-fit:contain;display:block}
.spo-schools-brand span{font-size:17px;white-space:nowrap}
.spo-schools-brand strong{font-weight:950}
.spo-schools-header-actions,.spo-schools-head-actions{display:flex;align-items:center;gap:9px}
.spo-schools-button{min-height:44px;padding:9px 14px;border:1px solid transparent;border-radius:14px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:900;cursor:pointer;background:#fff;transition:transform .12s ease,box-shadow .12s ease,opacity .12s ease}
.spo-schools-button:hover{transform:translateY(-1px)}
.spo-schools-button:active{transform:scale(.98)}
.spo-schools-button[disabled]{opacity:.55;cursor:wait;transform:none}
.spo-schools-button-primary{background:var(--schools-blue);color:#07131b;box-shadow:0 9px 24px rgba(0,109,159,.16)}
.spo-schools-button-quiet{border-color:var(--schools-line)}
.spo-schools-button-danger{background:#fff4f4;border-color:#efb8b8;color:var(--schools-danger)}
.spo-schools-global-status{display:none;width:min(calc(100% - 32px),1450px);margin:14px auto 0;padding:12px 14px;border-radius:14px;line-height:1.45;font-size:14px}
.spo-schools-global-status.is-visible{display:block}
.spo-schools-global-status.is-error{background:#fff1f1;border:1px solid #efb8b8;color:#812525}
.spo-schools-global-status.is-success{background:#effcf6;border:1px solid #a8e5ca;color:#155f3d}
.spo-schools-global-status.is-info{background:#eef9ff;border:1px solid var(--schools-line);color:#135671}
.spo-schools-main{width:min(100%,1500px);margin:0 auto;padding:22px 20px 70px;flex:1}
.spo-schools-state-card,.spo-schools-access-card{max-width:760px;margin:72px auto 0;background:rgba(255,255,255,.97);border:1px solid var(--schools-line);border-radius:28px;padding:30px;box-shadow:var(--schools-shadow)}
.spo-schools-state-card{display:flex;align-items:center;gap:16px}
.spo-schools-state-card strong{font-size:20px}
.spo-schools-state-card p{margin:5px 0 0;color:var(--schools-muted)}
.spo-schools-spinner{width:26px;height:26px;border-radius:50%;border:3px solid #b9e7ff;border-top-color:var(--schools-blue-deep);animation:schools-spin .8s linear infinite;flex:0 0 auto}
@keyframes schools-spin{to{transform:rotate(360deg)}}
.spo-schools-access-card h1{font-size:clamp(36px,7vw,58px);line-height:1.02;letter-spacing:-1.7px;margin:10px 0 14px}
.spo-schools-access-card>p{font-size:17px;color:var(--schools-muted);line-height:1.65;margin:0}
.spo-schools-eyebrow,.spo-schools-kicker,.spo-schools-form-label{font-size:11px;text-transform:uppercase;letter-spacing:1.5px;font-weight:950;color:var(--schools-blue-dark)}
.spo-schools-access-list{display:grid;gap:12px;margin-top:22px}
.spo-schools-access-item{padding:17px;border:1px solid var(--schools-line);border-radius:18px;background:var(--schools-soft-2);display:flex;justify-content:space-between;gap:15px;align-items:center}
.spo-schools-access-item strong{display:block}
.spo-schools-access-item span{display:block;color:var(--schools-muted);font-size:13px;margin-top:4px}
.spo-schools-application-form{display:grid;grid-template-columns:1fr 1fr;gap:15px;margin-top:24px}
.spo-schools-field{display:grid;gap:7px}
.spo-schools-field.is-full{grid-column:1/-1}
.spo-schools-field label{font-size:13px;font-weight:900}
.spo-schools-field input,.spo-schools-field select,.spo-schools-field textarea{width:100%;border:1px solid #a9ddf8;background:#fff;color:var(--schools-navy);border-radius:14px;padding:12px 13px;min-height:48px}
.spo-schools-field textarea{min-height:112px;resize:vertical}
.spo-schools-form-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:10px;margin-top:4px}
.spo-schools-form-note{grid-column:1/-1;margin:0;color:var(--schools-muted);font-size:12px;line-height:1.5}
.spo-schools-workspace{display:grid;grid-template-columns:260px minmax(0,1fr);gap:22px;align-items:start}
.spo-schools-sidebar{position:sticky;top:83px;min-height:calc(100vh - 112px);border:1px solid var(--schools-line);border-radius:24px;background:rgba(255,255,255,.96);box-shadow:0 12px 34px rgba(0,109,159,.08);padding:16px;display:flex;flex-direction:column}
.spo-schools-org-card{display:flex;align-items:center;gap:11px;padding:8px 7px 17px;border-bottom:1px solid #e2f3fc}
.spo-schools-org-mark{width:46px;height:46px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(135deg,var(--schools-blue),#dff5ff);border:1px solid #8ed7fb;font-weight:950;font-size:19px;flex:0 0 auto}
.spo-schools-org-copy{min-width:0}
.spo-schools-org-copy strong{display:block;line-height:1.3;overflow-wrap:anywhere}
.spo-schools-org-copy span{display:block;font-size:12px;color:var(--schools-muted);margin-top:4px}
.spo-schools-org-switcher{display:grid;gap:6px;margin:14px 5px 5px}
.spo-schools-org-switcher span{font-size:11px;font-weight:900;color:var(--schools-muted)}
.spo-schools-org-switcher select{width:100%;border:1px solid var(--schools-line);border-radius:12px;background:#fff;padding:9px}
.spo-schools-nav{display:grid;gap:5px;margin-top:15px}
.spo-schools-nav button{width:100%;min-height:45px;border:0;border-radius:13px;background:transparent;color:var(--schools-navy);display:grid;grid-template-columns:25px 1fr auto;align-items:center;gap:9px;padding:9px 11px;text-align:left;font-weight:850;cursor:pointer}
.spo-schools-nav button:hover{background:var(--schools-soft)}
.spo-schools-nav button.is-active{background:linear-gradient(135deg,#dff5ff,#f6fcff);color:#074e70;box-shadow:inset 0 0 0 1px #b8e8ff}
.spo-schools-nav-icon{font-size:17px;text-align:center}
.spo-schools-nav-count{min-width:24px;height:24px;padding:0 7px;border-radius:999px;background:#fff;border:1px solid var(--schools-line);display:grid;place-items:center;font-size:11px}
.spo-schools-sidebar-footer{margin-top:auto;padding:17px 6px 4px;color:var(--schools-muted);font-size:11px;display:flex;align-items:center;gap:8px}
.spo-schools-secure-dot{width:8px;height:8px;border-radius:50%;background:#24a36a;box-shadow:0 0 0 4px rgba(36,163,106,.12)}
.spo-schools-content{min-width:0}
.spo-schools-mobile-tabs{display:none}
.spo-schools-page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;background:rgba(255,255,255,.96);border:1px solid var(--schools-line);border-radius:24px;padding:24px 25px;box-shadow:0 12px 34px rgba(0,109,159,.08)}
.spo-schools-page-head h1{font-size:clamp(34px,4.5vw,52px);line-height:1.04;letter-spacing:-1.5px;margin:8px 0 8px}
.spo-schools-page-head p{margin:0;color:var(--schools-muted);line-height:1.55;max-width:720px}
.spo-schools-licence-banner{margin-top:16px;border-radius:18px;padding:16px 18px;display:flex;align-items:center;justify-content:space-between;gap:18px;background:linear-gradient(135deg,#e7f8ff,#fff);border:1px solid var(--schools-line)}
.spo-schools-licence-banner.is-warning{background:#fff8e9;border-color:#f0d08d}
.spo-schools-licence-banner.is-danger{background:#fff1f1;border-color:#efb8b8}
.spo-schools-licence-banner strong{display:block}
.spo-schools-licence-banner p{margin:4px 0 0;color:var(--schools-muted);font-size:13px}
.spo-schools-licence-pill{padding:8px 11px;border-radius:999px;background:#fff;border:1px solid currentColor;font-weight:950;font-size:12px;white-space:nowrap}
.spo-schools-view{display:none;margin-top:16px}
.spo-schools-view.is-active{display:block}
.spo-schools-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.spo-schools-metric{background:#fff;border:1px solid var(--schools-line);border-radius:19px;padding:17px;box-shadow:0 8px 24px rgba(0,109,159,.06);min-width:0}
.spo-schools-metric-top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.spo-schools-metric-label{font-size:11px;text-transform:uppercase;letter-spacing:1.05px;font-weight:900;color:var(--schools-muted)}
.spo-schools-metric-icon{width:30px;height:30px;border-radius:11px;background:var(--schools-soft);display:grid;place-items:center;color:var(--schools-blue-deep);font-weight:950}
.spo-schools-metric-value{font-size:29px;font-weight:950;letter-spacing:-.7px;margin-top:9px;overflow-wrap:anywhere}
.spo-schools-metric-note{font-size:12px;color:var(--schools-muted);margin-top:5px;line-height:1.35}
.spo-schools-progress{height:7px;border-radius:999px;background:#e8f5fb;margin-top:12px;overflow:hidden}
.spo-schools-progress>span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--schools-blue-deep),var(--schools-blue));width:0}
.spo-schools-two-column{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:16px}
.spo-schools-two-column-lower{grid-template-columns:.9fr 1.1fr}
.spo-schools-panel{background:#fff;border:1px solid var(--schools-line);border-radius:21px;padding:20px;box-shadow:0 9px 28px rgba(0,109,159,.06);min-width:0}
.spo-schools-panel-wide{width:100%}
.spo-schools-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:15px}
.spo-schools-panel-head h2{font-size:21px;letter-spacing:-.35px;margin:4px 0 0}
.spo-schools-panel-head p{font-size:13px;color:var(--schools-muted);margin:7px 0 0;line-height:1.5}
.spo-schools-text-button{border:0;background:transparent;padding:6px;color:var(--schools-blue-dark);font-weight:900;cursor:pointer;white-space:nowrap}
.spo-schools-stack{display:grid;gap:10px}
.spo-schools-list-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:13px;align-items:center;border:1px solid #d9effb;border-radius:15px;padding:13px;background:#fbfeff}
.spo-schools-list-row strong{display:block;line-height:1.35}
.spo-schools-list-row small{display:block;margin-top:4px;color:var(--schools-muted);line-height:1.4}
.spo-schools-row-meta{text-align:right;font-size:12px;color:var(--schools-muted)}
.spo-schools-row-meta strong{font-size:13px;color:var(--schools-navy)}
.spo-schools-badge{display:inline-flex;align-items:center;justify-content:center;padding:5px 8px;border-radius:999px;border:1px solid #b8e8ff;background:#f2fbff;color:#075d87;font-size:11px;font-weight:900;white-space:nowrap}
.spo-schools-badge.is-success{border-color:#a8e5ca;background:#effcf6;color:var(--schools-success)}
.spo-schools-badge.is-warning{border-color:#f0d08d;background:#fff8e9;color:var(--schools-warning)}
.spo-schools-badge.is-muted{border-color:#d9e4ea;background:#f5f8fa;color:#63707a}
.spo-schools-empty{padding:24px;border:1px dashed #a7dbf6;border-radius:16px;background:var(--schools-soft-2);text-align:center;color:var(--schools-muted);line-height:1.55}
.spo-schools-empty strong{display:block;color:var(--schools-navy);margin-bottom:5px}
.spo-schools-table-wrap{overflow:auto;border:1px solid #d9effb;border-radius:16px}
.spo-schools-table{width:100%;border-collapse:collapse;min-width:760px;background:#fff}
.spo-schools-table th,.spo-schools-table td{text-align:left;padding:13px 14px;border-bottom:1px solid #e5f3fb;vertical-align:top}
.spo-schools-table th{font-size:10px;text-transform:uppercase;letter-spacing:1.05px;color:var(--schools-muted);background:#f7fcff;position:sticky;top:0;z-index:1}
.spo-schools-table tr:last-child td{border-bottom:0}
.spo-schools-table td{font-size:13px}
.spo-schools-table td strong{display:block;line-height:1.35}
.spo-schools-table td small{display:block;color:var(--schools-muted);margin-top:3px;line-height:1.4}
.spo-schools-activity{display:grid;gap:0}
.spo-schools-activity-item{display:grid;grid-template-columns:12px 1fr;gap:11px;padding:11px 0;border-bottom:1px solid #e8f3f8}
.spo-schools-activity-item:last-child{border-bottom:0}
.spo-schools-activity-dot{width:10px;height:10px;border-radius:50%;background:var(--schools-blue);margin-top:4px;box-shadow:0 0 0 4px rgba(57,182,255,.12)}
.spo-schools-activity-item strong{font-size:13px;display:block}
.spo-schools-activity-item small{display:block;color:var(--schools-muted);margin-top:4px;line-height:1.45}
.spo-schools-detail-list{display:grid;gap:10px}
.spo-schools-detail-row{display:flex;justify-content:space-between;gap:20px;padding:11px 0;border-bottom:1px solid #e8f3f8}
.spo-schools-detail-row:last-child{border-bottom:0}
.spo-schools-detail-row span{color:var(--schools-muted);font-size:13px}
.spo-schools-detail-row strong{text-align:right;font-size:13px;overflow-wrap:anywhere}
.spo-schools-topic-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.spo-schools-topic-card{border:1px solid #d9effb;border-radius:16px;padding:15px;background:#fbfeff}
.spo-schools-topic-card strong{display:block;line-height:1.35}
.spo-schools-topic-card small{display:block;margin-top:5px;color:var(--schools-muted)}
.spo-schools-footer{padding:23px 18px;text-align:center;color:var(--schools-muted);font-size:12px;display:flex;justify-content:center;gap:7px;flex-wrap:wrap}
.spo-schools-footer a:hover{text-decoration:underline}
@media(max-width:1180px){
  .spo-schools-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
  .spo-schools-workspace{grid-template-columns:225px minmax(0,1fr)}
}
@media(max-width:920px){
  .spo-schools-workspace{display:block;max-width:100%}
  .spo-schools-sidebar{position:static;min-height:0;padding:13px;margin-bottom:12px;max-width:100%}
  .spo-schools-sidebar .spo-schools-nav,.spo-schools-sidebar-footer{display:none}
  .spo-schools-org-card{border-bottom:0;padding-bottom:8px}
  .spo-schools-org-switcher{margin-top:6px}
  .spo-schools-content{width:100%;max-width:100%;min-width:0}
  .spo-schools-mobile-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible;gap:7px;padding:0 0 10px;max-width:100%}
  .spo-schools-mobile-tabs button{min-width:0;width:100%;border:1px solid var(--schools-line);background:#fff;border-radius:999px;padding:9px 5px;font-size:12px;line-height:1.15;font-weight:850;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
  .spo-schools-mobile-tabs button.is-active{background:var(--schools-blue);border-color:var(--schools-blue);color:#07131b}
  .spo-schools-two-column,.spo-schools-two-column-lower{grid-template-columns:1fr}
}
@media(max-width:700px){
  .spo-schools-header{width:100%;overflow:hidden}
  .spo-schools-header-inner{width:100%;padding-top:7px;padding-bottom:7px;padding-left:max(9px,env(safe-area-inset-left));padding-right:max(9px,env(safe-area-inset-right));gap:6px}
  .spo-schools-brand{gap:0;flex:0 1 auto;min-width:0;overflow:hidden}
  .spo-schools-brand img{height:34px;width:auto;max-width:112px;min-width:0}
  .spo-schools-brand span{display:none}
  .spo-schools-header-actions{gap:5px;flex:0 0 auto}
  .spo-schools-header-actions .spo-schools-button-quiet{display:inline-flex}
  .spo-schools-header-actions .spo-schools-button{min-height:38px;padding:7px 8px;border-radius:12px;font-size:12px;line-height:1;white-space:nowrap}
  .spo-schools-main{width:100%;max-width:100%;padding:12px 9px 54px;overflow-x:hidden}
  .spo-schools-sidebar{border-radius:20px;padding:11px;margin-bottom:10px}
  .spo-schools-org-card{padding:5px 3px 7px}
  .spo-schools-org-mark{width:42px;height:42px;border-radius:14px;font-size:17px}
  .spo-schools-org-copy strong{font-size:14px}
  .spo-schools-org-copy span{font-size:11px}
  .spo-schools-page-head{padding:17px 15px;border-radius:19px;display:block}
  .spo-schools-head-actions{margin-top:13px}
  .spo-schools-page-head h1{font-size:34px;letter-spacing:-1px;margin-top:6px}
  .spo-schools-page-head p{font-size:14px;line-height:1.45}
  .spo-schools-licence-banner{padding:14px 15px;align-items:flex-start;flex-direction:column;gap:12px}
  .spo-schools-metrics{grid-template-columns:1fr 1fr}
  .spo-schools-panel{padding:15px;border-radius:18px}
  .spo-schools-panel-head h2{font-size:19px}
  .spo-schools-topic-grid{grid-template-columns:1fr}
  .spo-schools-application-form{grid-template-columns:1fr}
  .spo-schools-field,.spo-schools-field.is-full,.spo-schools-form-actions,.spo-schools-form-note{grid-column:1}
  .spo-schools-form-actions{display:grid}
  .spo-schools-access-card,.spo-schools-state-card{margin-top:32px;padding:20px;border-radius:21px}
  .spo-schools-table-wrap{overflow:visible;border:0;border-radius:0;background:transparent;max-width:100%}
  .spo-schools-table{display:block;width:100%;min-width:0;background:transparent}
  .spo-schools-table thead{display:none}
  .spo-schools-table tbody{display:grid;gap:11px}
  .spo-schools-table tr{display:block;border:1px solid #d9effb;border-radius:15px;background:#fff;overflow:hidden}
  .spo-schools-table td{display:grid;grid-template-columns:82px minmax(0,1fr);column-gap:10px;align-items:start;width:100%;padding:10px 11px;border-bottom:1px solid #e5f3fb;font-size:12px;line-height:1.4;overflow-wrap:anywhere;word-break:normal}
  .spo-schools-table tr:last-child td{border-bottom:1px solid #e5f3fb}
  .spo-schools-table td:last-child{border-bottom:0}
  .spo-schools-table td::before{grid-column:1;grid-row:1 / span 3;align-self:start;font-size:9px;line-height:1.3;text-transform:uppercase;letter-spacing:.9px;font-weight:950;color:var(--schools-muted)}
  .spo-schools-table td>*{grid-column:2;min-width:0}
  .spo-schools-table td>small{margin-top:3px}
  .spo-schools-table-classes td:nth-child(1)::before{content:"Class"}
  .spo-schools-table-classes td:nth-child(2)::before{content:"Course"}
  .spo-schools-table-classes td:nth-child(3)::before{content:"Board"}
  .spo-schools-table-classes td:nth-child(4)::before{content:"Year"}
  .spo-schools-table-classes td:nth-child(5)::before{content:"Lead teacher"}
  .spo-schools-table-classes td:nth-child(6)::before{content:"Students"}
  .spo-schools-table-classes td:nth-child(7)::before{content:"Join code"}
  .spo-schools-table-classes td:nth-child(8)::before{content:"Status"}
  .spo-schools-table-students td:nth-child(1)::before{content:"Student"}
  .spo-schools-table-students td:nth-child(2)::before{content:"Classes"}
  .spo-schools-table-students td:nth-child(3)::before{content:"Last active"}
  .spo-schools-table-students td:nth-child(4)::before{content:"Mastery"}
  .spo-schools-table-students td:nth-child(5)::before{content:"Status"}
  .spo-schools-table-assignments td:nth-child(1)::before{content:"Assignment"}
  .spo-schools-table-assignments td:nth-child(2)::before{content:"Class"}
  .spo-schools-table-assignments td:nth-child(3)::before{content:"Due"}
  .spo-schools-table-assignments td:nth-child(4)::before{content:"Recipients"}
  .spo-schools-table-assignments td:nth-child(5)::before{content:"Completion"}
  .spo-schools-table-assignments td:nth-child(6)::before{content:"Overdue"}
  .spo-schools-table-assignments td:nth-child(7)::before{content:"Status"}
  .spo-schools-table-assignments td:nth-child(8)::before{content:"Manage"}
}
@media(max-width:460px){
  .spo-schools-header-inner{gap:4px}
  .spo-schools-brand img{height:32px;max-width:104px}
  .spo-schools-header-actions{gap:4px}
  .spo-schools-header-actions .spo-schools-button{min-height:36px;padding:6px 7px;font-size:11px}
  .spo-schools-mobile-tabs{gap:6px}
  .spo-schools-mobile-tabs button{padding:8px 4px;font-size:11px}
  .spo-schools-metrics{grid-template-columns:1fr}
  .spo-schools-list-row{grid-template-columns:1fr}
  .spo-schools-row-meta{text-align:left}
  .spo-schools-table td{grid-template-columns:76px minmax(0,1fr);padding:9px 10px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}}

/* Step 3 v3.0.0 management actions */
.spo-schools-dialog{width:min(760px,calc(100% - 28px));max-height:min(88vh,900px);padding:0;border:0;border-radius:24px;background:#fff;color:var(--schools-navy);box-shadow:0 30px 90px rgba(3,57,83,.28);overflow:auto}
.spo-schools-dialog::backdrop{background:rgba(5,31,45,.58);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.spo-schools-dialog-shell{padding:24px}
.spo-schools-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding-bottom:17px;border-bottom:1px solid #e4f3fb}
.spo-schools-dialog-head h2{font-size:30px;line-height:1.08;letter-spacing:-.7px;margin:7px 0 7px}
.spo-schools-dialog-head p{margin:0;color:var(--schools-muted);line-height:1.5}
.spo-schools-dialog-close{width:42px;height:42px;flex:0 0 auto;border:1px solid var(--schools-line);border-radius:14px;background:#fff;color:var(--schools-navy);font-size:27px;line-height:1;cursor:pointer}
.spo-schools-dialog-close:hover{background:var(--schools-soft)}
.spo-schools-action-status{display:none;margin:16px 0 0;padding:12px 14px;border-radius:14px;font-size:13px;line-height:1.45}
.spo-schools-action-status.is-visible{display:block}
.spo-schools-action-status.is-error{background:#fff1f1;border:1px solid #efb8b8;color:#812525}
.spo-schools-action-status.is-success{background:#effcf6;border:1px solid #a8e5ca;color:#155f3d}
.spo-schools-action-status.is-info{background:#eef9ff;border:1px solid var(--schools-line);color:#135671}
.spo-schools-action-form{margin-top:19px}
.spo-schools-action-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}
.spo-schools-action-form .spo-schools-field>span{font-size:13px;font-weight:900;line-height:1.35}
.spo-schools-action-form .spo-schools-field>span small{font-weight:600;color:var(--schools-muted)}
.spo-schools-action-form .spo-schools-field input,.spo-schools-action-form .spo-schools-field select,.spo-schools-action-form .spo-schools-field textarea{width:100%;border:1px solid #a9ddf8;background:#fff;color:var(--schools-navy);border-radius:14px;padding:12px 13px;min-height:48px}
.spo-schools-action-form .spo-schools-field textarea{resize:vertical;min-height:112px}
.spo-schools-action-form .spo-schools-form-note{margin:14px 0 0}
.spo-schools-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px;padding-top:17px;border-top:1px solid #e4f3fb}
.spo-schools-head-actions{flex-wrap:wrap;justify-content:flex-end}

@media(max-width:700px){
  .spo-schools-head-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}
  .spo-schools-head-actions .spo-schools-button{width:100%;min-width:0}
  .spo-schools-head-actions .spo-schools-button:only-child{grid-column:1/-1}
  .spo-schools-dialog{width:calc(100% - 16px);max-height:calc(100vh - 16px);border-radius:20px}
  .spo-schools-dialog-shell{padding:18px 15px}
  .spo-schools-dialog-head{gap:12px}
  .spo-schools-dialog-head h2{font-size:25px}
  .spo-schools-dialog-close{width:38px;height:38px;border-radius:12px}
  .spo-schools-action-grid{grid-template-columns:1fr;gap:13px}
  .spo-schools-action-form .spo-schools-field.is-full{grid-column:1}
  .spo-schools-dialog-actions{display:grid;grid-template-columns:1fr;gap:8px}
  .spo-schools-dialog-actions .spo-schools-button{width:100%}
}

/* SPO Schools v3.0.5 Join Code controls */
.spo-schools-join-code-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  min-width: 12rem;
}

.spo-schools-join-code-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.spo-schools-join-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.spo-schools-join-actions .spo-schools-button {
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.78rem;
  line-height: 1.1;
}
/* Step 3D v3.0.6 student roster management */
.spo-schools-student-manage{display:grid;gap:18px;margin-top:19px}
.spo-schools-student-manage-loading{margin-top:19px;padding:22px;border:1px solid #d9effb;border-radius:16px;background:#fbfeff;color:var(--schools-muted);font-weight:800;text-align:center}
.spo-schools-student-manage-identity{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px;border:1px solid #cdeafa;border-radius:16px;background:#f6fcff}
.spo-schools-student-manage-identity strong{display:block;font-size:17px;line-height:1.35}
.spo-schools-student-manage-identity small{display:block;margin-top:4px;color:var(--schools-muted)}
.spo-schools-student-manage-section{display:grid;gap:10px;padding-top:4px}
.spo-schools-student-manage-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}
.spo-schools-student-manage-section-head strong{display:block;font-size:14px}
.spo-schools-student-manage-section-head small{display:block;margin-top:3px;color:var(--schools-muted);line-height:1.4}
.spo-schools-student-history-row{background:#f8fafb;border-color:#dfe8ed}
.spo-schools-student-no-add{padding:13px 14px;border:1px dashed #b8dfee;border-radius:14px;background:#fbfeff}
.spo-schools-student-no-add strong{display:block;font-size:13px}
.spo-schools-student-no-add small{display:block;margin-top:4px;color:var(--schools-muted);line-height:1.4}
.spo-schools-student-add-form{margin-top:0}
.spo-schools-student-manage .spo-schools-list-row .spo-schools-button{min-height:38px;padding:7px 10px;font-size:12px;white-space:nowrap}

@media(max-width:700px){
  .spo-schools-table-students td:nth-child(6)::before{content:"Actions"}
  .spo-schools-student-manage-identity{align-items:flex-start}
  .spo-schools-student-manage-section-head{display:block}
}

@media(max-width:460px){
  .spo-schools-student-manage-identity{display:grid;grid-template-columns:1fr}
  .spo-schools-student-manage .spo-schools-list-row .spo-schools-button{width:100%}
}


/* ===== Step 4C v3.0.7 RC1 - assignment management ===== */

.spo-schools-table-assignments{
  min-width:980px
}

.spo-schools-assignment-overdue-count{
  color:var(--schools-danger);
  font-weight:950
}

.spo-schools-assignment-loading{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  min-height:180px;
  color:var(--schools-muted)
}

.spo-schools-assignment-manage{
  margin-top:18px
}

.spo-schools-assignment-lifecycle{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:14px
}

.spo-schools-assignment-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-bottom:16px
}

.spo-schools-assignment-metric{
  border:1px solid var(--schools-line);
  background:var(--schools-soft);
  border-radius:16px;
  padding:13px 14px;
  min-width:0
}

.spo-schools-assignment-metric span{
  display:block;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.45px;
  color:var(--schools-muted)
}

.spo-schools-assignment-metric strong{
  display:block;
  margin-top:5px;
  font-size:22px;
  line-height:1;
  color:var(--schools-navy)
}

.spo-schools-assignment-detail-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-bottom:14px
}

.spo-schools-assignment-detail-item{
  border:1px solid var(--schools-line);
  border-radius:14px;
  padding:11px 12px;
  background:#fff;
  min-width:0
}

.spo-schools-assignment-detail-item span{
  display:block;
  font-size:11px;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.35px;
  color:var(--schools-muted)
}

.spo-schools-assignment-detail-item strong{
  display:block;
  margin-top:4px;
  font-size:14px;
  line-height:1.4;
  overflow-wrap:anywhere
}

.spo-schools-assignment-content-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin:0 0 15px;
  padding:9px 12px;
  border:1px solid var(--schools-line);
  border-radius:12px;
  font-weight:850;
  text-decoration:none
}

.spo-schools-assignment-content-link:hover{
  background:var(--schools-soft)
}

.spo-schools-assignment-section{
  margin-top:17px;
  padding-top:16px;
  border-top:1px solid var(--schools-line)
}

.spo-schools-assignment-section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px
}

.spo-schools-assignment-section-head strong{
  display:block;
  font-size:15px
}

.spo-schools-assignment-section-head small{
  display:block;
  margin-top:3px;
  color:var(--schools-muted)
}

.spo-schools-assignment-instructions{
  margin:0;
  line-height:1.6;
  color:var(--schools-navy)
}

.spo-schools-assignment-recipient-list{
  display:grid;
  gap:9px
}

.spo-schools-assignment-recipient{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  border:1px solid var(--schools-line);
  border-radius:15px;
  padding:12px 13px;
  background:#fff
}

.spo-schools-assignment-recipient.is-history{
  background:var(--schools-soft)
}

.spo-schools-assignment-recipient-main{
  min-width:0
}

.spo-schools-assignment-recipient-main strong,
.spo-schools-assignment-recipient-main small{
  display:block
}

.spo-schools-assignment-recipient-main small{
  margin-top:3px;
  color:var(--schools-muted);
  line-height:1.35;
  overflow-wrap:anywhere
}

.spo-schools-assignment-recipient-status{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:6px;
  flex:0 0 auto
}

.spo-schools-assignment-recipient-status small{
  font-size:11px;
  color:var(--schools-muted);
  font-weight:750
}

.spo-schools-assignment-warning{
  border:1px solid #efc681;
  background:#fff8eb;
  border-radius:16px;
  padding:14px 15px
}

.spo-schools-assignment-warning strong{
  display:block
}

.spo-schools-assignment-warning p{
  margin:6px 0 0;
  line-height:1.55;
  color:var(--schools-muted)
}

.spo-schools-assignment-close-confirm{
  margin-top:18px
}

@media(max-width:700px){
  .spo-schools-table-assignments{
    min-width:0
  }

  .spo-schools-assignment-summary{
    grid-template-columns:repeat(2,minmax(0,1fr))
  }

  .spo-schools-assignment-detail-grid{
    grid-template-columns:1fr
  }

  .spo-schools-assignment-recipient{
    align-items:flex-start;
    flex-direction:column
  }

  .spo-schools-assignment-recipient-status{
    align-items:flex-start;
    flex-direction:row;
    flex-wrap:wrap
  }

  .spo-schools-assignment-manage .spo-schools-dialog-actions,
  .spo-schools-assignment-close-confirm .spo-schools-dialog-actions{
    display:grid;
    grid-template-columns:1fr
  }

  .spo-schools-assignment-manage .spo-schools-dialog-actions .spo-schools-button,
  .spo-schools-assignment-close-confirm .spo-schools-dialog-actions .spo-schools-button{
    width:100%
  }
}


/* ===== Step 4D v3.0.8 RC1 - teacher content picker ===== */

.spo-schools-content-picker{
  display:grid;
  gap:16px;
  padding:18px;
  border:1px solid rgba(8,118,170,.20);
  border-radius:18px;
  background:linear-gradient(180deg,#fbfeff 0%,#f4fbff 100%)
}

.spo-schools-content-picker-heading,
.spo-schools-content-context,
.spo-schools-content-results-head,
.spo-schools-content-selected-main{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px
}

.spo-schools-content-picker-heading>div,
.spo-schools-content-context>div,
.spo-schools-content-selected-main>div{
  min-width:0;
  display:grid;
  gap:4px
}

.spo-schools-field-label{
  display:block;
  font-size:13px;
  font-weight:900;
  color:var(--schools-ink)
}

.spo-schools-content-library-badge,
.spo-schools-content-type{
  display:inline-flex;
  align-items:center;
  width:max-content;
  min-height:26px;
  padding:4px 9px;
  border-radius:999px;
  border:1px solid rgba(8,118,170,.22);
  background:#eaf8ff;
  color:#075f88;
  font-size:11px;
  font-weight:900;
  letter-spacing:.02em
}

.spo-schools-content-context{
  min-height:62px;
  padding:12px 14px;
  border-radius:14px;
  background:#fff;
  border:1px solid rgba(8,118,170,.14)
}

.spo-schools-content-context strong{
  font-size:13px
}

.spo-schools-content-context small{
  color:var(--schools-muted);
  line-height:1.45
}

.spo-schools-content-scope-button{
  flex:0 0 auto
}

.spo-schools-content-toolbar{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px
}

.spo-schools-content-toolbar .is-full{
  grid-column:1/-1
}

.spo-schools-content-results-head{
  min-height:28px
}

.spo-schools-content-results-head>span{
  color:var(--schools-muted);
  font-size:12px;
  font-weight:800
}

.spo-schools-content-results{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  max-height:390px;
  overflow:auto;
  padding:2px;
  scrollbar-gutter:stable
}

.spo-schools-content-card{
  appearance:none;
  width:100%;
  min-width:0;
  display:grid;
  gap:8px;
  text-align:left;
  padding:13px;
  border-radius:14px;
  border:1px solid rgba(18,45,60,.14);
  background:#fff;
  color:inherit;
  cursor:pointer;
  transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease
}

.spo-schools-content-card:hover{
  border-color:rgba(8,118,170,.45);
  box-shadow:0 10px 28px rgba(18,45,60,.08);
  transform:translateY(-1px)
}

.spo-schools-content-card:focus-visible{
  outline:3px solid rgba(8,118,170,.28);
  outline-offset:2px
}

.spo-schools-content-card.is-selected{
  border-color:var(--schools-blue);
  box-shadow:0 0 0 2px rgba(8,118,170,.12),0 10px 28px rgba(18,45,60,.08)
}

.spo-schools-content-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px
}

.spo-schools-content-card strong{
  font-size:13px;
  line-height:1.35
}

.spo-schools-content-card small{
  min-height:34px;
  color:var(--schools-muted);
  line-height:1.4
}

.spo-schools-content-count{
  color:var(--schools-muted);
  font-size:11px;
  font-weight:800
}

.spo-schools-content-card-action{
  color:#0876aa;
  font-size:12px;
  font-weight:900
}

.spo-schools-content-card.is-selected .spo-schools-content-card-action{
  color:#075f88
}

.spo-schools-content-empty{
  grid-column:1/-1;
  display:grid;
  gap:4px;
  min-height:104px;
  place-content:center;
  padding:20px;
  text-align:center;
  border:1px dashed rgba(8,118,170,.24);
  border-radius:14px;
  background:rgba(255,255,255,.72)
}

.spo-schools-content-empty strong{
  font-size:13px
}

.spo-schools-content-empty small{
  color:var(--schools-muted)
}

.spo-schools-content-empty.is-error{
  border-color:rgba(180,45,45,.28);
  background:#fff8f8
}

.spo-schools-content-selection{
  display:grid;
  gap:8px;
  padding-top:2px
}

.spo-schools-content-selected{
  min-height:72px;
  padding:13px 14px;
  border:1px solid rgba(8,118,170,.20);
  border-radius:14px;
  background:#fff
}

.spo-schools-content-selected-empty{
  display:grid;
  gap:4px
}

.spo-schools-content-selected-empty small,
.spo-schools-content-selected-main small{
  color:var(--schools-muted);
  line-height:1.4
}

.spo-schools-content-selected-main strong{
  font-size:14px;
  line-height:1.4
}

.spo-schools-content-preview{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  min-height:36px;
  padding:7px 10px;
  border:1px solid rgba(8,118,170,.24);
  border-radius:10px;
  color:#075f88;
  font-size:12px;
  font-weight:900;
  text-decoration:none
}

.spo-schools-content-preview:hover{
  background:#f1faff
}

.spo-schools-flashcard-instructions{
  display:grid;
  gap:7px;
  margin-top:10px
}

.spo-schools-flashcard-instructions[hidden]{
  display:none
}

.spo-schools-flashcard-instruction-row{
  display:flex;
  flex-wrap:wrap;
  gap:7px
}

.spo-schools-content-helper{
  appearance:none;
  min-height:34px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(8,118,170,.24);
  background:#fff;
  color:#075f88;
  font:inherit;
  font-size:12px;
  font-weight:850;
  cursor:pointer
}

.spo-schools-content-helper:hover{
  background:#eef9ff
}

.spo-schools-flashcard-instructions>small{
  color:var(--schools-muted);
  line-height:1.45
}

@media(max-width:700px){

  .spo-schools-content-picker{
    padding:14px
  }

  .spo-schools-content-picker-heading,
  .spo-schools-content-context,
  .spo-schools-content-selected-main{
    align-items:flex-start;
    flex-direction:column
  }

  .spo-schools-content-scope-button,
  .spo-schools-content-preview{
    width:100%;
    justify-content:center
  }

  .spo-schools-content-toolbar,
  .spo-schools-content-results{
    grid-template-columns:1fr
  }

  .spo-schools-content-results{
    max-height:460px
  }

  .spo-schools-content-card small{
    min-height:0
  }
}

@media(max-width:460px){

  .spo-schools-flashcard-instruction-row{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr))
  }

  .spo-schools-content-helper{
    width:100%
  }
}

/* UAT033 - school verification + licence conversion */
.spo-schools-field-group{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;grid-column:1/-1;padding:16px;border:1px solid #cbe9fa;border-radius:16px;background:#f8fcff}
.spo-schools-field-group[hidden]{display:none!important}
.spo-schools-field small{display:block;margin-top:6px;color:#607b8c;line-height:1.4}
.spo-schools-licence-convert{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:22px;align-items:center;margin-top:16px;padding:22px;border:1px solid #b9e4fb;border-radius:20px;background:linear-gradient(135deg,#f7fcff,#eef9ff)}
.spo-schools-licence-convert h3{margin:5px 0 8px;font-size:1.35rem}
.spo-schools-licence-convert p{margin:0;max-width:700px;color:#526e80}
.spo-schools-licence-price{min-width:150px;text-align:right;font-size:1.7rem;font-weight:900}
.spo-schools-licence-price small{display:block;margin-top:4px;font-size:.78rem;font-weight:600;color:#607b8c}
.spo-schools-billing-actions{justify-content:flex-start;margin-top:16px;flex-wrap:wrap}
@media(max-width:820px){.spo-schools-field-group{grid-template-columns:1fr}.spo-schools-licence-convert{grid-template-columns:1fr}.spo-schools-licence-price{text-align:left}}


/* UAT037 - clear school billing history */
.spo-billing-history{margin-top:22px;padding:20px;border:1px solid #d9e9f2;border-radius:18px;background:#fff}
.spo-billing-history-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}
.spo-billing-history-head h3{margin:3px 0 5px;font-size:1.15rem}
.spo-billing-history-head p{margin:0;color:#607888;line-height:1.45}
.spo-billing-history-list{display:grid;gap:10px}
.spo-billing-history-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:center;padding:15px 16px;border:1px solid #e2edf3;border-radius:14px;background:#fbfdff}
.spo-billing-history-main,.spo-billing-history-meta{display:grid;gap:4px;min-width:0}
.spo-billing-history-main>strong{font-size:.98rem;overflow-wrap:anywhere}
.spo-billing-history-main>small,.spo-billing-history-meta>small{color:#607888;line-height:1.4}
.spo-billing-history-type{font-size:.72rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#0876aa}
.spo-billing-history-meta{text-align:right;justify-items:end}
.spo-billing-history-meta>strong{font-size:1rem}
.spo-billing-history-status{display:inline-flex;align-items:center;min-height:25px;padding:3px 9px;border-radius:999px;background:#eaf8ff;border:1px solid #c5eafa;color:#075f89;font-size:.76rem;font-weight:800}
.spo-billing-history-empty{display:grid;gap:3px;padding:16px;border:1px dashed #cbdde7;border-radius:14px;color:#607888}
.spo-billing-history-empty strong{color:#18303f}
@media(max-width:640px){
  .spo-billing-history{padding:15px}
  .spo-billing-history-item{grid-template-columns:1fr;gap:10px}
  .spo-billing-history-meta{text-align:left;justify-items:start}
}


/* UAT039 - automated Stripe invoice links/status */
.spo-billing-history-links{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.spo-billing-history-links a{display:inline-flex;align-items:center;min-height:32px;padding:5px 10px;border:1px solid #bfe4f6;border-radius:999px;background:#f4fbff;color:#076b9a;text-decoration:none;font-size:.78rem;font-weight:800}
.spo-billing-history-links a:hover{text-decoration:underline}
