
:root{
  --bg:#f4f7fb;--surface:#fff;--ink:#172033;--muted:#6c7688;--line:#e4e9f1;
  --brand:#5b4ff3;--brand2:#7b6ef6;--ok:#17885b;--danger:#cf3e4d;--soft:#f0efff;
  --shadow:0 18px 55px rgba(24,38,72,.10);--radius:22px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;background:linear-gradient(180deg,#fbfcff,#f1f5fb);color:var(--ink)}
a{text-decoration:none;color:inherit}
button,input,textarea,select{font:inherit}
.shell{max-width:1320px;margin:auto;padding:22px}
.header{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:22px}
.brand{display:flex;align-items:center;gap:12px}.brandmark{width:50px;height:50px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,var(--brand),#44b4ff);color:#fff;font-weight:900;box-shadow:0 10px 25px rgba(91,79,243,.25)}
.brand h1{font-size:18px;margin:0}.brand p{margin:3px 0 0;color:var(--muted);font-size:12px}
.panel{background:rgba(255,255,255,.97);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}
.hidden{display:none!important}
.btn{border:0;border-radius:14px;padding:13px 18px;font-weight:850;cursor:pointer}
.btn.primary{background:linear-gradient(135deg,var(--brand),var(--brand2));color:#fff;box-shadow:0 10px 24px rgba(91,79,243,.24)}
.btn.secondary{background:#edf1f7;color:#34415d}.btn.ghost{background:#fff;border:1px solid var(--line);color:#35415c}
.btn:disabled{opacity:.4;cursor:not-allowed;box-shadow:none}
.textlink{border:0;background:transparent;color:var(--brand);padding:0;cursor:pointer;font-weight:800}
input,select,textarea{width:100%;border:1px solid #dbe1eb;border-radius:14px;padding:13px 14px;background:#fff;outline:none;transition:.18s}
input:focus,select:focus,textarea:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(91,79,243,.09)}
textarea{min-height:95px;resize:vertical}
label{display:block;font-size:13px;font-weight:800;margin:0 0 7px}
.notice{padding:12px 14px;border-radius:14px;font-size:13px;margin:12px 0}.notice.error{background:#fff1f2;color:#a82938}.notice.ok{background:#edf9f4;color:#176d4b}
.req{color:var(--danger)}

/* Observer */
.observer{max-width:810px;margin:auto}
.hero{text-align:center;padding:30px 30px 8px}.hero .brandmark{width:90px;height:90px;margin:0 auto 16px;font-size:22px}
.hero h2{font-size:30px;margin:0 0 8px;line-height:1.15}.hero p{margin:0;color:var(--muted)}
.content{padding:24px 30px 32px}.stepper{display:flex;gap:8px;margin:8px 0 24px}.stepper span{height:6px;flex:1;background:#e8ebf2;border-radius:99px}.stepper span.on{background:linear-gradient(90deg,var(--brand),var(--brand2))}
.section-title{font-size:21px;margin:0 0 7px}.section-sub{color:var(--muted);margin:0 0 20px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px}.actions{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:22px}
.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.campus-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.choice,.campus-card{border:1px solid var(--line);border-radius:20px;background:#fff;padding:19px;cursor:pointer;min-height:148px;position:relative;transition:.18s}
.choice:hover,.campus-card:hover{transform:translateY(-2px);box-shadow:0 12px 25px rgba(24,38,72,.08)}
.choice.selected,.campus-card.selected{border-color:var(--brand);background:#fbfbff;box-shadow:0 0 0 3px rgba(91,79,243,.08)}
.choice.disabled{opacity:.55;cursor:not-allowed;background:#f7f8fb}
.choice .ico,.campus-card .ico{font-size:30px}.choice h4,.campus-card h4{margin:10px 0 6px;font-size:16px}.campus-card h4{font-size:19px}.choice p,.campus-card p{margin:0;color:var(--muted);font-size:13px;line-height:1.4}
.badge{position:absolute;right:12px;top:12px;background:#eeefff;color:var(--brand);padding:5px 8px;border-radius:99px;font-size:10px;font-weight:900}
.criteria{display:grid;gap:14px}.criterion{border:1px solid var(--line);border-radius:18px;background:#fff;padding:18px}.criterion-title{font-weight:900}.criterion-desc{font-size:13px;color:var(--muted);line-height:1.48;margin:6px 0 14px}
.score{display:grid;grid-template-columns:repeat(11,1fr);gap:6px;margin-bottom:12px}.score button{border:1px solid #dbe1eb;background:#f8fafc;border-radius:10px;padding:9px 4px;font-weight:900;cursor:pointer}.score button.sel{background:var(--soft);border-color:var(--brand);color:var(--brand)}
.summary{margin-top:16px;background:#f8f9ff;border:1px solid #e5e7ff;border-radius:18px;padding:16px;display:flex;justify-content:space-between;align-items:center}.summary strong{font-size:23px}
.tag{display:inline-block;border-radius:99px;padding:5px 8px;background:#eef0ff;color:var(--brand);font-size:11px;font-weight:900}
.success{text-align:center;padding:30px 5px}.check{width:76px;height:76px;border-radius:50%;display:grid;place-items:center;margin:0 auto 15px;background:#e8f8f1;color:var(--ok);font-size:34px}

/* Admin */
.admin-panel{min-height:760px}.admin-login{max-width:430px;margin:65px auto;padding:28px;background:#fff;border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow)}
.admin-login h2{margin:0 0 8px}.admin-login p{color:var(--muted);margin:0 0 20px}
.dashboard{display:grid;grid-template-columns:245px 1fr;min-height:760px}.sidebar{background:#192238;color:#fff;padding:24px}.sidebrand{display:flex;align-items:center;gap:10px;margin-bottom:26px}.sidebrand .brandmark{width:42px;height:42px}
.nav{display:grid;gap:8px}.nav button{border:0;background:transparent;color:#bbc4d5;text-align:left;padding:11px 12px;border-radius:11px;cursor:pointer;font-weight:700}.nav button.active{background:#2b3651;color:#fff}
.main{padding:26px;background:#f7f9fc;min-width:0}.admin-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}.admin-head h2{margin:0}.admin-head small{color:var(--muted)}
.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}.kpi{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px}.kpi small{color:var(--muted)}.kpi strong{display:block;font-size:24px;margin-top:4px}
.campus-section{background:#fff;border:1px solid var(--line);border-radius:20px;padding:18px;margin-bottom:20px}
.campus-title{display:flex;align-items:center;gap:10px;margin-bottom:14px}.campus-title .dot{width:12px;height:12px;border-radius:50%;background:var(--brand)}.campus-title h3{margin:0}.campus-title p{margin:2px 0 0;color:var(--muted);font-size:12px}
.filters{display:grid;grid-template-columns:1.1fr 1.1fr 1fr 1fr 1fr;gap:10px;margin-bottom:14px}
.table-wrap{overflow:auto;background:#fff;border:1px solid var(--line);border-radius:18px}table{width:100%;border-collapse:collapse;min-width:980px}th,td{padding:13px 14px;border-bottom:1px solid #edf0f5;text-align:left;font-size:13px}th{background:#fbfcfe;color:#778199;font-size:11px;text-transform:uppercase;letter-spacing:.04em}tr:hover td{background:#fbfcff}
.linkbtn{border:0;background:transparent;color:var(--brand);font-weight:850;cursor:pointer}.trash-btn{border:0;background:transparent;cursor:pointer;font-size:18px;line-height:1;padding:7px 9px;border-radius:10px}.trash-btn:hover{background:#fff0f1}
.analytics-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.analytics-tabs button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:10px 14px;font-weight:850;cursor:pointer}.analytics-tabs button.active{background:var(--brand);color:#fff;border-color:var(--brand)}
.analytics-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:16px;margin-bottom:16px}.section-card,.chart-box{background:#fff;border:1px solid var(--line);border-radius:18px;padding:18px;margin-bottom:16px}.section-card h3,.chart-box h3{margin:0 0 6px}.section-card p,.chart-box p{margin:0 0 14px;color:var(--muted);font-size:13px}
.bar-list{display:grid;gap:12px}.bar-row{display:grid;grid-template-columns:230px 1fr 62px;gap:10px;align-items:center;font-size:13px}.bar-track{height:10px;background:#edf0f6;border-radius:999px;overflow:hidden}.bar-fill{height:100%;background:linear-gradient(90deg,var(--brand),#44b4ff);border-radius:999px}.bar-value{font-weight:850;text-align:right}
.levels{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.level-card{border-radius:16px;padding:16px;background:#f8f9fc;border:1px solid var(--line)}.level-card strong{font-size:24px;display:block;margin-top:4px}.level-card small{color:var(--muted)}
.radar-wrap{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:20px;align-items:center}.radar-svg{width:100%;max-width:520px;aspect-ratio:1/1;display:block;margin:auto}.radar-legend{display:grid;gap:7px}.radar-legend .meta{padding:9px}
.teachers-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.teacher-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:18px;cursor:pointer;transition:.18s}.teacher-card:hover{transform:translateY(-2px);box-shadow:0 12px 25px rgba(24,38,72,.08)}.teacher-card h4{margin:0 0 6px}.teacher-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.teacher-stat{background:#f7f9fc;border-radius:12px;padding:10px}.teacher-stat small{display:block;color:var(--muted);font-size:11px}.teacher-stat b{display:block;margin-top:3px}.campus-mini{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}.campus-mini span{font-size:11px;padding:5px 8px;background:#f1f4f9;border-radius:999px}
.profile-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:16px}.profile-name h3{margin:8px 0 4px}.profile-name p{margin:0;color:var(--muted)}
.spark{display:flex;gap:7px;align-items:end;height:110px;padding-top:8px}.spark i{flex:1;background:linear-gradient(180deg,#8f84ff,#5b4ff3);border-radius:7px 7px 2px 2px;min-width:8px}
.modal-backdrop{position:fixed;inset:0;background:rgba(11,18,32,.48);display:grid;place-items:center;padding:20px;z-index:20}.modal{width:min(940px,100%);max-height:88vh;overflow:auto;background:#fff;border-radius:22px;box-shadow:0 24px 70px rgba(0,0,0,.24)}.modal-head{position:sticky;top:0;background:#fff;border-bottom:1px solid var(--line);padding:18px 20px;display:flex;justify-content:space-between;align-items:center;z-index:1}.modal-body{padding:20px}.modal-meta{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:16px}.meta{background:#f7f9fc;border-radius:14px;padding:12px}.meta small{display:block;color:var(--muted);margin-bottom:4px}.modal-footer{display:flex;justify-content:flex-end;gap:10px;padding:16px 20px;border-top:1px solid var(--line);position:sticky;bottom:0;background:#fff}
@media(max-width:980px){.analytics-grid{grid-template-columns:1fr}.teachers-grid{grid-template-columns:1fr 1fr}}
@media(max-width:820px){
  .shell{padding:14px}.content{padding:20px}.hero h2{font-size:25px}.grid2,.cards,.campus-grid{grid-template-columns:1fr}.score{grid-template-columns:repeat(6,1fr)}
  .dashboard{display:block}.sidebar{padding:14px}.nav{grid-template-columns:repeat(3,1fr)}.nav button{text-align:center}.main{padding:15px}.kpis{grid-template-columns:1fr 1fr}.filters{grid-template-columns:1fr 1fr}.teachers-grid{grid-template-columns:1fr}.modal-meta{grid-template-columns:1fr}.bar-row{grid-template-columns:1fr}.bar-value{text-align:left}.radar-wrap{grid-template-columns:1fr}
}

/* v3.1 radar labels */
.radar-wrap.radar-only{display:block}
.radar-wrap.radar-only .radar-svg{max-width:760px}
.radar-label-value{font-size:17px;font-weight:900;fill:#172033}
.radar-label-text{font-size:11.5px;font-weight:750;fill:#536076}
.radar-axis-number{font-size:10px;font-weight:800;fill:#8a94a8}
@media(max-width:820px){
  .radar-label-value{font-size:15px}
  .radar-label-text{font-size:10.5px}
}

/* v3.2 official logos */
.brand-logo-round{
  width:52px;height:52px;border-radius:50%;object-fit:cover;display:block;
  background:#fff;box-shadow:0 8px 20px rgba(24,38,72,.10);
}
.sidebar-logo{width:42px;height:42px}
.login-logo{width:72px;height:72px;margin:0 0 14px 0}
.hero-logo-crop{
  width:180px;height:92px;overflow:hidden;margin:0 auto 16px;
  display:flex;align-items:flex-start;justify-content:center;
}
.hero-logo-crop img{
  width:180px;height:auto;display:block;
  transform:translateY(-2px);
}
@media(max-width:820px){
  .hero-logo-crop{width:150px;height:78px}
  .hero-logo-crop img{width:150px}
}

/* v4 — rubric, focus and N/P */
.criterion-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.criterion-head-left{min-width:0}
.na-toggle{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;background:#f4f6fa;border:1px solid #e1e6ef;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:800;color:#566177;cursor:pointer}
.na-toggle input{width:auto;margin:0;accent-color:var(--brand)}
.criterion.na{background:#f3f5f8;border-color:#dfe4eb;opacity:.78}
.criterion.na .score,.criterion.na textarea,.criterion.na .rubric-trigger,.criterion.na .score-instruction{pointer-events:none}
.criterion.na .score button,.criterion.na textarea{background:#e9edf2;color:#9aa3b2}
.score-instruction{font-size:12px;font-weight:800;color:#556176;margin:2px 0 10px}
.rubric-trigger{display:inline-flex;align-items:center;gap:7px;border:0;background:transparent;color:var(--brand);padding:0;margin:0 0 12px;font-weight:850;cursor:pointer}
.rubric-q{width:20px;height:20px;border:1px solid var(--brand);border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:900}
.na-note{display:none;margin:12px 0 0;background:#eef1f5;border-radius:12px;padding:10px 12px;color:#667084;font-size:12px;font-weight:750}
.criterion.na .na-note{display:block}
.rubric-modal{width:min(820px,100%)}
.rubric-grid{display:grid;gap:10px}
.rubric-band{border:1px solid var(--line);border-radius:16px;padding:14px;background:#fff}
.rubric-band.active{border-color:var(--brand);background:#f8f7ff;box-shadow:0 0 0 3px rgba(91,79,243,.08)}
.rubric-band-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:8px}
.rubric-band-score{font-size:18px;font-weight:950;color:var(--brand)}
.rubric-band-level{font-weight:900}
.rubric-cols{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.rubric-col{background:#f7f9fc;border-radius:12px;padding:10px}
.rubric-col small{display:block;color:var(--muted);font-weight:800;margin-bottom:5px}
.rubric-col div{font-size:13px;line-height:1.45}
.rubric-rules{margin-top:14px;background:#f7f9fc;border-radius:14px;padding:12px 14px}
.rubric-rules b{display:block;margin-bottom:6px}
.rubric-rules ul{margin:0;padding-left:18px;color:#5f6a7e;font-size:13px;line-height:1.5}
@media(max-width:820px){.criterion-head{display:block}.na-toggle{margin-top:10px}.rubric-cols{grid-template-columns:1fr}}

/* v5 — subject / teacher directory / class / required comments */
.select-note{font-size:12px;color:var(--muted);margin-top:7px}
.criterion.comment-missing textarea{border-color:#d94c5c;box-shadow:0 0 0 3px rgba(217,76,92,.08)}
.comment-required-note{display:none;color:#b93646;font-size:12px;font-weight:750;margin-top:6px}
.criterion.comment-missing .comment-required-note{display:block}
.filters.filters-v5{grid-template-columns:1fr 1fr .9fr .9fr .9fr .9fr .9fr}
@media(max-width:980px){.filters.filters-v5{grid-template-columns:1fr 1fr 1fr}}
@media(max-width:820px){.filters.filters-v5{grid-template-columns:1fr 1fr}}

/* v6 — Lesson Study */
.ls-intro{display:grid;gap:14px;margin-bottom:20px;padding:16px;border:1px solid var(--line);border-radius:18px;background:#fbfcff}
.ls-section{margin:22px 0 12px;padding:12px 14px;border-radius:14px;background:#f4f6fb;font-weight:900;color:#26324a}
.ls-choice-row{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.ls-choice{border:1px solid #dfe4ec;background:white;border-radius:12px;padding:9px 12px;font-weight:800;cursor:pointer}
.ls-choice.selected{border-color:var(--brand);background:#f2f0ff;color:var(--brand)}
.ls-help{display:inline-flex;align-items:center;gap:6px;border:0;background:transparent;color:var(--brand);font-weight:850;cursor:pointer;padding:0;margin-top:5px}
.ls-text-block{margin-top:16px;padding:16px;border:1px solid var(--line);border-radius:16px;background:#fff}
.ls-text-block textarea{min-height:110px}
.ls-final-title{margin:24px 0 8px;font-size:18px;font-weight:950}
.ls-comment-missing textarea{border-color:#d94c5c;box-shadow:0 0 0 3px rgba(217,76,92,.08)}
.ls-required-note{display:none;color:#b93646;font-size:12px;font-weight:750;margin-top:6px}
.ls-comment-missing .ls-required-note{display:block}
.ls-status-grid{display:grid;gap:10px}
.ls-status-card{border:1px solid var(--line);border-radius:14px;padding:14px;background:#fff}
.ls-status-card b{display:block;margin-bottom:5px}
@media(max-width:700px){.ls-choice{width:100%;text-align:left}}

/* v6.1 — focus student Lesson Study */
.ls-focus-banner{margin:0 0 16px;padding:14px 16px;border-radius:16px;background:#f5f7fc;border:1px solid var(--line)}
.ls-focus-banner b{display:block;font-size:16px;margin-bottom:4px}
.ls-meta-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:18px}
.ls-meta-grid .full{grid-column:1/-1}
@media(max-width:700px){.ls-meta-grid{grid-template-columns:1fr}.ls-meta-grid .full{grid-column:auto}}
