:root {
  --ink: #17201d;
  --muted: #66736e;
  --paper: #f5f2e9;
  --surface: #fffdf8;
  --surface-2: #ece8dc;
  --green: #1f654d;
  --green-2: #2d8768;
  --lime: #c9e265;
  --orange: #e8793d;
  --yellow: #f2c94c;
  --red: #b94a3d;
  --border: #dcd8cc;
  --shadow: 0 18px 50px rgba(42, 54, 49, .10);
}

/* Acompanhamento do cadastro e correção em lote */
.pending-names,.complete-registration{margin:12px 0;padding:10px 12px;border-radius:12px;font-size:12px;line-height:1.45;background:#fff3df;color:#7a4b12}.complete-registration{background:#e7f5e7;color:#245d3f}.batch-summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:18px 0}.batch-summary-grid div{padding:14px;border:1px solid var(--border);border-radius:14px;text-align:center;background:#fff}.batch-summary-grid strong{display:block;font-size:24px}.batch-summary-grid span{font-size:12px;color:var(--muted)}.batch-result-list{display:grid;gap:10px;max-height:52vh;overflow:auto}.batch-result-card{padding:14px;border:1px solid var(--border);border-left:5px solid #c85447;border-radius:14px;background:#fff}.batch-result-card.pass{border-left-color:#27835c}.batch-result-card>div{display:flex;justify-content:space-between;gap:12px;align-items:center}.batch-result-card small{display:block;color:var(--muted);overflow-wrap:anywhere}.batch-result-card details{margin-top:10px}.batch-result-card details p{margin:7px 0;font-size:12px}.batch-result-card summary{cursor:pointer;font-weight:700}
.btn-danger{background:#fff4f2;color:#a6382d;border:1px solid #e5b0aa}.btn-danger:hover{background:#f9ded9}
.registration-inline-list{margin-top:16px;padding:14px;border:1px solid var(--border);border-radius:14px;background:#fff}.registration-inline-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:11px 0;border-top:1px solid var(--border)}.registration-inline-row:first-of-type{border-top:0}.registration-inline-row small{display:block;color:var(--muted);margin-top:3px}.registration-inline-row .row-actions{display:flex;gap:8px}
.badge.red{background:#f9ded9;color:#9d3027}.classroom-list{display:grid;gap:18px}.classroom-panel{padding:20px}.classroom-panel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:16px}.classroom-panel-head>div:first-child{display:flex;align-items:center;gap:12px}.classroom-panel-head h2,.classroom-panel-head p{margin:0}.classroom-panel-head p{color:var(--muted);margin-top:4px}.class-student-list{display:grid;border:1px solid var(--border);border-radius:14px;overflow:hidden;background:#fff}.class-student-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:12px;width:100%;padding:12px 14px;border:0;border-top:1px solid var(--border);background:#fff;color:var(--ink);text-align:left;cursor:pointer}.class-student-row:first-child{border-top:0}.class-student-row:hover{background:#f5f8ef}.class-student-row small{display:block;color:var(--muted);margin-top:2px}.classroom-actions{margin-top:16px;flex-wrap:wrap}.evaluation-points-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px}.points-total{margin-top:10px;padding:10px 12px;border-radius:10px;background:#eef6dc;color:#36551f}.evaluation-points-summary{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}.evaluation-points-summary span{padding:5px 8px;border-radius:999px;background:#eef6dc;color:#36551f;font-size:12px;font-weight:700}.student-detail-modal{width:min(960px,calc(100vw - 24px))}.student-detail-status{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:16px}.grades.student-detail-grades{grid-template-columns:repeat(2,minmax(0,1fr));max-height:58vh;overflow:auto;padding-right:4px}.split-actions{justify-content:space-between}.grade-line small{color:var(--muted);margin-left:4px}.recovery-line{background:#fff6e8}.registration-class-tabs{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px;margin:16px 0}.registration-class-tab{min-width:0;padding:13px 15px;border:1px solid var(--border);border-radius:13px;background:var(--surface);color:var(--ink);text-align:left}.registration-class-tab strong,.registration-class-tab small{display:block}.registration-class-tab small{margin-top:3px;color:var(--muted)}.registration-class-tab.active{border-color:var(--green);background:#e8f3ec;box-shadow:0 0 0 2px rgba(31,101,77,.12)}.registration-class-tab.active strong{color:var(--green)}
@media(max-width:700px){.batch-summary-grid{grid-template-columns:repeat(2,1fr)}.batch-result-card>div{align-items:flex-start;flex-direction:column}}
@media(max-width:700px){.registration-inline-row{grid-template-columns:1fr auto}.registration-inline-row .row-actions{grid-column:1/-1}}
@media(max-width:700px){.classroom-panel-head{flex-direction:column}.class-student-row{grid-template-columns:auto minmax(0,1fr) auto}.class-student-row .badge{grid-column:2/4;justify-self:start}.grades.student-detail-grades{grid-template-columns:1fr}.student-detail-status,.split-actions{align-items:stretch;flex-direction:column}.split-actions .btn{width:100%}.registration-class-tabs{grid-template-columns:1fr}}

.classroom-picker { display:grid; grid-template-columns:repeat(auto-fit,minmax(235px,1fr)); gap:12px; margin:18px 0 22px; }
.classroom-selector-card { min-width:0; display:grid; grid-template-columns:48px minmax(0,1fr) auto; align-items:center; gap:12px; padding:15px; border:1px solid var(--border); border-radius:15px; background:var(--surface); color:var(--ink); text-align:left; box-shadow:0 8px 24px rgba(42,54,49,.04); }
.classroom-selector-card:hover,.classroom-selector-card:focus-visible { border-color:var(--green-2); outline:3px solid rgba(45,135,104,.12); }
.classroom-selector-card.active { border-color:var(--green); background:#edf5ef; box-shadow:0 0 0 2px rgba(31,101,77,.1); }
.classroom-selector-copy { min-width:0; }
.classroom-selector-copy strong,.classroom-selector-copy small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.classroom-selector-copy strong { font:800 15px "Manrope",sans-serif; }
.classroom-selector-copy small { margin-top:4px; color:var(--muted); font-size:11px; }
.classroom-selector-arrow { color:var(--green); font-size:20px; font-weight:800; }
.selected-classroom-report { padding:22px; }
.classroom-report-head { display:grid; grid-template-columns:minmax(240px,.7fr) minmax(480px,1.3fr); gap:24px; align-items:start; margin-bottom:18px; }
.classroom-report-title { display:flex; align-items:center; gap:13px; min-width:0; }
.classroom-report-title h2,.classroom-report-title p { margin:0; }
.classroom-report-title h2 { font:800 24px "Manrope",sans-serif; }
.classroom-report-title p { margin-top:4px; color:var(--muted); font-size:12px; }
.classroom-report-side { display:grid; gap:12px; justify-items:end; }
.classroom-report-side .row-actions { justify-content:flex-end; }
.classroom-report-metrics { display:grid; grid-template-columns:repeat(3,minmax(105px,1fr)); gap:8px; width:100%; }
.classroom-report-metrics span { padding:10px 12px; border-radius:11px; background:#f0eee6; color:var(--muted); font-size:11px; text-align:center; }
.classroom-report-metrics strong { display:block; margin-bottom:2px; color:var(--ink); font:800 20px "Manrope",sans-serif; }
.classroom-report-metrics .done { background:#e8f3ec; color:#376953; }
.classroom-report-metrics .done strong { color:var(--green); }
.classroom-report-metrics .pending { background:#fff0df; color:#80512f; }
.classroom-status-strip { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 16px; padding-top:15px; border-top:1px solid var(--border); }
.classroom-choice-empty strong,.classroom-choice-empty span { display:block; }
.classroom-choice-empty span { margin-top:5px; color:var(--muted); }

@media(max-width:900px){.classroom-report-head{grid-template-columns:1fr}.classroom-report-side{justify-items:stretch}.classroom-report-side .row-actions{justify-content:flex-start}.classroom-report-side .row-actions .btn{flex:1 1 220px}}
@media(max-width:1000px){.legacy-key-card{grid-template-columns:1fr}.legacy-link-control{flex-wrap:wrap}.legacy-link-control .btn{width:100%}.activity-actions{grid-column:2;justify-content:flex-start}}
@media(max-width:600px){.classroom-picker{grid-template-columns:1fr}.classroom-report-metrics{grid-template-columns:1fr}.classroom-report-title{align-items:flex-start}.selected-classroom-report{padding:17px 14px}}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", system-ui, sans-serif;
  overflow-x: hidden;
}
img, video, canvas, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a { color: inherit; }

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
}
.login-art {
  position: relative;
  overflow: hidden;
  padding: 64px clamp(32px, 7vw, 104px);
  background: var(--green);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-art::before,
.login-art::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: .9;
}
.login-art::before { width: 430px; height: 430px; right: -190px; top: -120px; background: var(--lime); }
.login-art::after { width: 270px; height: 270px; left: -100px; bottom: -110px; border: 60px solid var(--orange); }
.brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; font: 800 21px "Manrope", sans-serif; letter-spacing: -.5px; }
.brand-mark { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px 12px 12px 3px; background: var(--lime); color: var(--green); display: grid; place-items: center; font-size: 22px; line-height: 1; }
.hero-copy { position: relative; z-index: 1; max-width: 590px; margin: 110px 0; }
.eyebrow { color: var(--lime); font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; font-size: 12px; }
.hero-copy h1 { margin: 14px 0 18px; font: 800 clamp(40px, 5.2vw, 74px)/.98 "Manrope", sans-serif; letter-spacing: -3px; }
.hero-copy p { margin: 0; max-width: 480px; font-size: 18px; line-height: 1.6; color: rgba(255,255,255,.78); }
.art-footer { position: relative; z-index: 1; display: flex; gap: 10px; flex-wrap: wrap; }
.mini-tag { border: 1px solid rgba(255,255,255,.24); padding: 8px 12px; border-radius: 999px; color: rgba(255,255,255,.83); font-size: 13px; }

.login-panel { padding: 48px clamp(28px, 6vw, 90px); background: var(--surface); display: flex; flex-direction:column; align-items: center; }
.login-card { width: min(420px, 100%); margin: auto; }
.login-card h2 { margin: 0 0 8px; font: 800 32px "Manrope", sans-serif; letter-spacing: -1px; }
.login-card > p { margin: 0 0 26px; color: var(--muted); line-height: 1.55; }
.role-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; background: var(--surface-2); border-radius: 13px; margin-bottom: 24px; }
.role-tab { border: 0; border-radius: 9px; padding: 11px; background: transparent; color: var(--muted); font-weight: 700; }
.role-tab.active { background: var(--surface); color: var(--ink); box-shadow: 0 3px 14px rgba(0,0,0,.07); }
.field { margin: 15px 0; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 11px; padding: 13px 14px; background: #fff; color: var(--ink); outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(45,135,104,.14); }
.form-select { width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: #fff; color: var(--ink); }
.login-help { display: flex; justify-content: space-between; gap: 14px; margin: 10px 0 22px; color: var(--muted); font-size: 12px; }
.registration-open-note { margin:10px 0 20px; padding:10px 12px; border-radius:10px; background:#eef4da; color:#4d5d29; font-size:11px; line-height:1.45; }
.registration-open-note strong { display:block; }
.field-label-row { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:7px; }
.field-label-row label { margin-bottom:0; }
.help-btn { width:28px; height:28px; flex:0 0 28px; display:grid; place-items:center; border:1px solid rgba(31,101,77,.24); border-radius:50%; background:#eef4da; color:var(--green); font:800 13px "Manrope",sans-serif; cursor:pointer; }
.help-btn:hover,.help-btn:focus-visible { background:var(--lime); outline:3px solid rgba(45,135,104,.16); outline-offset:2px; }
.title-with-help { display:flex; align-items:center; gap:10px; }
.title-with-help h1,.title-with-help h2 { margin-right:0; }
.title-with-help.small { align-items:center; }
.title-with-help.small h2 { margin:0; }
.help-modal { width:min(460px,100%); }
.help-modal .modal-head > div { display:flex; align-items:center; gap:12px; }
.help-symbol { width:38px; height:38px; flex:0 0 38px; display:grid; place-items:center; border-radius:50%; background:var(--lime); color:var(--green-dark); font:800 18px "Manrope",sans-serif; }
.help-modal p { color:var(--muted); line-height:1.65; }
.empty-state.compact { padding:24px 12px; }
.disabled-control { opacity:.48; pointer-events:none; }

.btn { min-height: 44px; border: 0; border-radius: 11px; padding: 12px 17px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align:center; line-height:1.2; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: #164f3c; }
.btn-secondary { background: var(--surface-2); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-block { width: 100%; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 246px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--green); color: #fff; padding: 26px 18px; display: flex; flex-direction: column; }
.sidebar-brand-row { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.sidebar .brand { padding: 0 10px 28px; min-width:0; }
.sidebar-close { display:none; width:44px; height:44px; flex:0 0 44px; border:0; border-radius:11px; background:rgba(255,255,255,.12); color:#fff; font-size:26px; line-height:1; }
.menu-scrim { display:none; }
.nav { display: grid; gap: 5px; }
.nav-btn { width: 100%; min-height:44px; border: 0; background: transparent; color: rgba(255,255,255,.68); border-radius: 10px; padding: 11px 12px; text-align: left; display: flex; gap: 11px; align-items: center; font-weight: 600; }
.nav-btn:hover, .nav-btn.active { background: rgba(255,255,255,.11); color: #fff; }
.nav-icon { width: 22px; height:22px; flex:0 0 22px; display:grid; place-items:center; text-align: center; font-size: 17px; line-height:1; }
.sidebar-bottom { margin-top: auto; }
.teacher-chip { padding: 14px 12px; border-top: 1px solid rgba(255,255,255,.14); display: flex; align-items: center; gap: 10px; }
.avatar { width: 39px; height: 39px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: var(--green); font-weight: 800; flex: 0 0 auto; }
.teacher-chip strong { display: block; font-size: 13px; }
.teacher-chip small { display: block; color: rgba(255,255,255,.58); margin-top: 2px; }

.main { min-width: 0; }
.topbar { height: 76px; padding: 0 clamp(20px, 4vw, 48px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); background: rgba(245,242,233,.88); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 5; }
.crumb { color: var(--muted); font-size: 14px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 44px; height: 44px; flex:0 0 44px; display:grid; place-items:center; padding:0; border-radius: 11px; background: var(--surface); border: 1px solid var(--border); font-size: 18px; line-height:1; }
.mobile-menu { display: none; }
.content { padding: 36px clamp(20px, 4vw, 48px) 70px; max-width: 1440px; margin: auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-head h1 { margin: 0 0 6px; font: 800 clamp(28px, 4vw, 40px) "Manrope", sans-serif; letter-spacing: -1.5px; }
.page-head p { margin: 0; color: var(--muted); }
.dashboard-hero { min-height: 344px; border-radius: 24px; overflow: hidden; display: grid; grid-template-columns: minmax(410px,.9fr) minmax(420px,1.1fr); position: relative; background: #164f3c; box-shadow: 0 24px 60px rgba(31,101,77,.2); margin-bottom: 32px; }
.dashboard-hero::after { content:""; position:absolute; inset:0; background: linear-gradient(90deg,rgba(17,69,52,.98) 0%,rgba(17,69,52,.92) 35%,rgba(17,69,52,.22) 67%,rgba(17,69,52,0) 100%); pointer-events:none; }
.dashboard-hero-copy { position: relative; z-index: 2; padding: 40px 0 36px 42px; color: #fff; align-self: center; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; color: #d9ec95; text-transform: uppercase; letter-spacing: 1.3px; font-size: 11px; font-weight: 800; }
.hero-kicker::before { content:""; width: 7px; height: 7px; border-radius:50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(201,226,101,.14); }
.dashboard-hero h1 { margin: 13px 0 11px; font: 800 clamp(30px,3.4vw,48px)/1.04 "Manrope",sans-serif; letter-spacing:-2px; }
.dashboard-hero p { max-width: 550px; margin:0; color:rgba(255,255,255,.76); font-size:15px; line-height:1.6; }
.dashboard-hero-art { position:absolute; inset:0 0 0 32%; z-index:0; background: url("assets/dashboard-hero.png") center right/cover no-repeat; }
.hero-actions { display:flex; gap:10px; margin-top:24px; flex-wrap:wrap; }
.hero-btn { background: var(--lime); color:#173f31; box-shadow: 0 10px 24px rgba(0,0,0,.16); }
.hero-btn:hover { background:#d9ec95; }
.hero-btn-secondary { background:rgba(255,255,255,.1); color:#fff; border:1px solid rgba(255,255,255,.24); backdrop-filter:blur(8px); }
.hero-trust { display:flex; gap:18px; flex-wrap:wrap; margin-top:22px; color:rgba(255,255,255,.66); font-size:11px; }
.section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin: 4px 0 15px; }
.section-heading h2 { margin:3px 0 0; font:800 23px "Manrope",sans-serif; letter-spacing:-.6px; }
.section-kicker { color:var(--green-2); text-transform:uppercase; font-size:10px; letter-spacing:1.25px; font-weight:800; }
.updated-chip { display:inline-flex; align-items:center; gap:7px; color:var(--muted); font-size:11px; background:rgba(255,255,255,.58); border:1px solid var(--border); border-radius:999px; padding:7px 10px; }
.updated-chip i { width:7px; height:7px; border-radius:50%; background:#4aa979; box-shadow:0 0 0 4px rgba(74,169,121,.12); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 27px; }
.stat, .panel, .class-card, .student-hero, .grade-card { min-width:0; background: var(--surface); border: 1px solid var(--border); border-radius: 15px; }
.stat { padding: 19px 20px; position:relative; overflow:hidden; box-shadow:0 8px 30px rgba(42,54,49,.045); transition:transform .2s ease,box-shadow .2s ease; }
.stat:hover { transform:translateY(-2px); box-shadow:0 14px 34px rgba(42,54,49,.08); }
.stat-top { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.stat-icon { width:36px; height:36px; flex:0 0 36px; display:grid; place-items:center; border-radius:10px; font-size:16px; line-height:1; font-weight:800; }
.stat-icon.green { color:#23634c; background:#dcefe2; }
.stat-icon.blue { color:#365d78; background:#dceaf2; }
.stat-icon.orange { color:#93501e; background:#f9e2ce; }
.stat-icon.gold { color:#78601c; background:#f8edbe; }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { margin: 8px 0 4px; font: 800 31px "Manrope", sans-serif; letter-spacing:-1px; }
.stat-foot { font-size: 12px; color: var(--green-2); display:flex; align-items:center; gap:6px; }
.trend-dot { width:5px; height:5px; border-radius:50%; background:currentColor; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(300px,.75fr); gap: 20px; }
.dashboard-grid > *, .admin-grid > * { min-width:0; }
.panel { padding: 22px; box-shadow: 0 10px 34px rgba(42,54,49,.045); }
.panel-head { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 18px; }
.panel-head h2 { margin: 0; font: 800 19px "Manrope", sans-serif; }
.panel-head a { color: var(--green); font-size: 13px; font-weight: 700; text-decoration: none; }
.activity-list { display: grid; gap: 3px; }
.activity-row { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid #ebe7dc; }
.activity-row:last-child { border-bottom: 0; }
.activity-icon { width: 40px; height: 40px; flex:0 0 40px; border-radius: 10px; display: grid; place-items: center; background: #e8efe8; color: var(--green); font-size:17px; line-height:1; }
.activity-row strong { display: block; font-size: 14px; }
.activity-row small { display: block; color: var(--muted); margin-top: 3px; }
.activity-actions { justify-content:flex-end; }
.activity-actions .btn { white-space:nowrap; }
.btn-compact { padding:9px 12px; }
.legacy-keys-panel { margin-top:22px; border-color:#e7c989; background:#fffdf7; }
.legacy-keys-panel .panel-head p { margin:5px 0 0; color:var(--muted); }
.legacy-key-list { display:grid; gap:14px; margin-top:18px; }
.legacy-key-card { display:grid; grid-template-columns:minmax(210px,1fr) minmax(300px,1.4fr) auto; gap:14px; align-items:center; padding:16px; border:1px solid var(--border); border-radius:16px; background:#fff; }
.legacy-key-card strong,.legacy-key-card small { display:block; }
.legacy-key-card small { margin-top:4px; color:var(--muted); }
.legacy-link-control { display:flex; gap:10px; align-items:center; }
.legacy-link-control select { min-width:0; flex:1; }
.legacy-warning { grid-column:1/-1; color:#9a6414!important; }
.badge { display: inline-flex; border-radius: 999px; padding: 6px 9px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge.green { color: #23634c; background: #dcefe2; }
.badge.orange { color: #93501e; background: #f9e2ce; }
.badge.gray { color: #666; background: #ebe9e2; }
.progress-list { display: grid; gap: 18px; }
.progress-label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 7px; }
.progress-track { height: 8px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.progress-fill { height: 100%; border-radius: inherit; background: var(--green-2); }
.alert-card { margin-top: 20px; padding: 17px; border-radius: 12px; background: #fff0df; border-left: 4px solid var(--orange); }
.alert-card strong { display: block; margin-bottom: 5px; }
.alert-card p { margin: 0; color: #74513d; font-size: 13px; line-height: 1.45; }

.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.class-card { padding: 20px; }
.class-top { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.class-code { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--green); color: #fff; font-weight: 800; }
.class-card h3 { margin: 18px 0 4px; font: 800 18px "Manrope", sans-serif; }
.class-card p { margin: 0; color: var(--muted); font-size: 13px; }
.class-meta { display: flex; gap: 16px; margin: 18px 0; padding-top: 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }

.table-wrap { overflow-x: auto; max-width:100%; -webkit-overflow-scrolling:touch; scrollbar-color:var(--green-2) var(--surface-2); scrollbar-width:thin; }
.table-wrap:focus-visible { outline:3px solid rgba(45,135,104,.2); outline-offset:3px; }
table { width: 100%; border-collapse: collapse; min-width: 700px; }
th { text-align: left; color: var(--muted); font-size: 12px; padding: 11px 12px; border-bottom: 1px solid var(--border); }
td { padding: 15px 12px; border-bottom: 1px solid #ebe7dc; font-size: 13px; }
td strong { display: block; }
td small { color: var(--muted); }
.score { font-weight: 800; }
.score.low { color: var(--red); }
.action-link { border: 0; background: none; color: var(--green); font-weight: 700; padding: 0; }

.upload-zone { border: 1.5px dashed #aaa99e; border-radius: 15px; min-height: 180px; display: grid; place-items: center; text-align: center; padding: 28px; background: rgba(255,255,255,.45); }
.upload-zone .big-icon { font-size: 34px; }
.upload-zone h3 { margin: 10px 0 5px; }
.upload-zone p { margin: 0 0 16px; color: var(--muted); font-size: 13px; }

.correction-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.correction-option { border: 1px solid var(--border); border-radius: 14px; padding: 18px; background: var(--surface); display:grid; grid-template-columns:48px minmax(0,1fr); align-items:start; gap:14px; }
.correction-option-icon { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 13px; display: grid; place-items: center; background: #e5efe9; color: var(--green); font-size: 23px; line-height:1; }
.correction-option h3 { margin: 0 0 4px; font-size: 15px; }
.correction-option p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.correction-option .btn { margin:0; width:100%; }
.correction-option > .btn,.correction-option > .stack-actions { grid-column:1 / -1; }
.stack-actions { margin:0; display:grid; grid-template-columns:1fr 1fr; gap:7px; width:100%; }
.stack-actions .btn { margin-left: 0; }
.proof-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.proof-filter { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.proof-filter select { min-width:180px; border:1px solid var(--border); border-radius:10px; background:#fff; padding:10px 12px; color:var(--ink); }
.proof-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.proof-card a { display:block; background:#fff; }
.proof-thumb { aspect-ratio: 900/636; width: 100%; object-fit: contain; display: block; background: #fff; }
.proof-body { padding: 12px; }
.proof-body strong { display: block; font-size: 13px; }
.proof-body small { display: block; color: var(--muted); margin-top: 3px; }
.proof-score { float: right; font: 800 20px "Manrope",sans-serif; color: var(--green); }

.scanner-modal { width:min(1500px,calc(100vw - 20px)); max-width:none; padding:0; overflow:hidden; }
.scanner-header { padding: 20px 23px; display: flex; justify-content: space-between; gap: 20px; align-items: center; border-bottom: 1px solid var(--border); }
.scanner-header h2 { margin: 0; font: 800 22px "Manrope",sans-serif; }
.scanner-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.scanner-layout { display:grid; grid-template-columns:minmax(320px,.72fr) minmax(0,1.28fr); min-height:620px; }
.camera-area { position: relative; min-height: 620px; background: #101713; display: grid; place-items: center; overflow: hidden; color: #fff; }
.camera-area video, .camera-area .captured-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.camera-area .captured-photo { object-fit:contain; background:#101713; }
.camera-empty { text-align: center; max-width: 360px; padding: 30px; position: relative; z-index: 2; }
.camera-empty .camera-big { font-size: 54px; margin-bottom: 12px; }
.camera-empty h3 { margin: 0 0 7px; }
.camera-empty p { margin: 0 0 20px; color: rgba(255,255,255,.68); font-size: 13px; line-height: 1.5; }
.camera-guide { position: absolute; inset: 8%; z-index: 3; pointer-events: none; }
.guide-corner { position: absolute; width: 52px; height: 52px; border-color: var(--lime); border-style: solid; }
.guide-corner.tl { left: 0; top: 0; border-width: 4px 0 0 4px; border-radius: 12px 0 0 0; }
.guide-corner.tr { right: 0; top: 0; border-width: 4px 4px 0 0; border-radius: 0 12px 0 0; }
.guide-corner.bl { left: 0; bottom: 0; border-width: 0 0 4px 4px; border-radius: 0 0 0 12px; }
.guide-corner.br { right: 0; bottom: 0; border-width: 0 4px 4px 0; border-radius: 0 0 12px 0; }
.scan-pill { position: absolute; z-index: 4; left: 50%; bottom: 22px; transform: translateX(-50%); background: rgba(16,23,19,.86); color: #fff; border-radius: 999px; padding: 9px 14px; font-size: 12px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.scan-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(242,201,76,.16); }
.scan-pill.ready .scan-dot { background: var(--lime); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(201,226,101,0); } }
.scanner-panel { min-width:0; padding:21px; background:var(--surface); border-left:1px solid var(--border); display:flex; flex-direction:column; max-height:calc(100vh - 100px); overflow-y:auto; overflow-x:hidden; }
.scanner-panel .field { margin-top: 0; margin-bottom: 13px; }
.scanner-hint { padding: 12px; border-radius: 10px; background: #eef4da; color: #4d5d29; font-size: 12px; line-height: 1.5; margin-bottom: 16px; }
.scanner-hint.warning-hint { background: #fff0df; color: #80512f; }
.camera-controls { display: grid; gap: 9px; margin-top: auto; }
.capture-input { display: none; }
.result-box { border-radius: 13px; background: #e5f1e7; padding: 17px; margin: 7px 0 15px; }
.result-box .result-label { color: #4a705f; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; font-weight: 700; }
.result-box .result-score { font: 800 38px "Manrope",sans-serif; color: var(--green); margin: 4px 0; }
.result-box p { margin: 0; color: #4a705f; font-size: 12px; line-height: 1.45; }
.answer-dots { display: flex; gap: 5px; margin: 12px 0 4px; }
.answer-dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 800; background: #cfe6d6; color: var(--green); }
.answer-dot.wrong { background: #f5d8cf; color: var(--red); }
.answer-dot.review { background: #ffe1a8; color: #80512f; }
.scan-review { display:grid; gap:6px; margin:0 0 16px; }
.scan-review-head { display:flex; align-items:end; justify-content:space-between; gap:10px; padding:2px 1px 6px; }
.scan-review-head strong { display:block; font-size:13px; }
.scan-review-head small { display:block; color:var(--muted); font-size:10px; margin-top:2px; }
.scan-review-head span { color:var(--muted); font-size:10px; }
.scan-review-row { min-width:0; display:grid; grid-template-columns:30px minmax(68px,.7fr) minmax(190px,1.7fr) minmax(54px,.45fr) minmax(84px,.8fr); gap:8px; align-items:center; padding:10px; border:1px solid var(--border); border-left:4px solid #4aa979; border-radius:10px; background:#fff; }
.scan-review-row.review { border-left-color:#d69b2d; background:#fffaf0; }
.scan-review-row.wrong { border-left-color:#c55a49; background:#fff7f4; }
.scan-question { width:27px; height:27px; display:grid; place-items:center; border-radius:50%; background:#edf1eb; font-size:11px; font-weight:800; }
.scan-review-row small { display:block; color:var(--muted); font-size:9px; line-height:1.2; }
.scan-review-row strong { display:block; margin-top:2px; font-size:13px; }
.scan-detected span { display:block; color:var(--muted); font-size:9px; margin-top:2px; }
.scan-answer-editor { display:flex; flex-wrap:wrap; gap:5px; }
.scan-answer-choice { min-width:30px; height:30px; padding:0 8px; border:1px solid var(--border); border-radius:8px; background:#fff; color:var(--ink); font-weight:800; cursor:pointer; }
.scan-answer-choice:hover,.scan-answer-choice:focus-visible { border-color:var(--green); outline:2px solid rgba(31,101,77,.13); }
.scan-answer-choice.selected { border-color:var(--green); background:var(--green); color:#fff; }
.scan-answer-choice.blank { font-size:9px; font-weight:700; }
.scan-key { text-align:center; }
.scan-reading { text-align:right; }
.scan-reading small,.scan-detected strong { overflow-wrap:anywhere; }
.scan-reading span { display:block; font-size:10px; font-weight:800; color:var(--green); }
.scan-review-row.review .scan-reading span { color:#9a681d; }
.scan-review-row.wrong .scan-reading span { color:var(--red); }
.privacy-note { font-size: 11px; line-height: 1.4; color: var(--muted); margin-top: 12px; }

.grade-entry-modal { width:min(1120px,calc(100vw - 32px)); }
.grade-entry-controls { display:grid; grid-template-columns:1fr 1fr 1fr 1.2fr; gap:12px; }
.grade-import-bar { display:flex; align-items:center; justify-content:space-between; gap:18px; margin:16px 0; padding:15px 16px; border:1px dashed #aaa99e; border-radius:13px; background:#f7f7f1; }
.grade-import-bar strong,.grade-import-bar small { display:block; }
.grade-import-bar small { color:var(--muted); margin-top:3px; }
.grade-import-actions { display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.grade-form-actions > .row-actions { margin-left:auto; }
.grade-entry-table-wrap { max-height:52vh; overflow:auto; border:1px solid var(--border); border-radius:13px; }
.grade-entry-table { width:100%; border-collapse:collapse; background:#fff; }
.grade-entry-table th { position:sticky; top:0; z-index:1; padding:11px 14px; background:#eef3e9; text-align:left; font-size:12px; }
.grade-entry-table th:last-child { width:180px; }
.grade-entry-table td { padding:10px 14px; border-top:1px solid var(--border); }
.grade-entry-table td small { display:block; color:var(--muted); margin-top:2px; }
.grade-score-input { width:100%; min-width:110px; }
.grade-entry-table tr.grade-row-missing td { background:#fff0ee; border-top-color:#efbbb5; }
.grade-entry-table tr.grade-row-missing td:first-child { box-shadow:inset 4px 0 0 var(--red); }
.grade-entry-table tr.grade-row-missing td small { color:var(--red); font-weight:700; }
.grade-entry-table tr.grade-row-missing .grade-score-input { border-color:#d9584b; background:#fffafa; }

.admin-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px; border-radius: 15px; margin-bottom: 20px; background: var(--green); color: #fff; overflow: hidden; position: relative; }
.admin-banner::after { content: ""; position: absolute; width: 190px; height: 190px; border-radius: 50%; right: -60px; top: -85px; background: var(--lime); opacity: .9; }
.admin-banner > * { position: relative; z-index: 1; }
.admin-banner h2 { margin: 0 0 5px; font: 800 22px "Manrope",sans-serif; }
.admin-banner p { margin: 0; color: rgba(255,255,255,.72); font-size: 13px; }
.admin-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(310px,.65fr); gap: 20px; }
.settings-layout { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.settings-card { min-width:0; }
.settings-card .panel-head p { margin:5px 0 0; color:var(--muted); font-size:12px; }
.settings-icon { width:42px; height:42px; flex:0 0 42px; display:grid; place-items:center; border-radius:12px; color:var(--green); background:#e4f1e8; font-size:20px; }
.setting-toggle { display:flex; gap:12px; align-items:flex-start; padding:14px; margin-top:14px; border:1px solid var(--border); border-radius:12px; background:#faf9f4; cursor:pointer; }
.setting-toggle input { width:20px; height:20px; flex:0 0 20px; margin:1px 0 0; accent-color:var(--green); }
.setting-toggle strong,.setting-toggle small { display:block; }
.setting-toggle strong { font-size:13px; }
.setting-toggle small { color:var(--muted); margin-top:4px; line-height:1.45; }
.setting-toggle.enabled { background:#eef4da; }
.settings-actions { grid-column:1 / -1; display:flex; justify-content:flex-end; gap:10px; padding:4px 0; }
.auth-modal { width:min(500px,100%); }
.person-cell { display: flex; align-items: center; gap: 10px; }
.person-cell .avatar { width: 34px; height: 34px; font-size: 12px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 5px; }
.mini-chip { display: inline-flex; border-radius: 999px; padding: 4px 7px; background: #e7eee9; color: #426353; font-size: 10px; font-weight: 700; }
.assignment-list { display: grid; gap: 10px; }
.assignment { border-bottom: 1px solid var(--border); padding: 0 0 12px; }
.assignment:last-child { border: 0; padding-bottom: 0; }
.assignment strong { display: block; font-size: 13px; }
.assignment span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.permission-note { display: flex; gap: 10px; align-items: flex-start; padding: 13px; border-radius: 11px; background: #fff0df; color: #754f35; font-size: 12px; line-height: 1.45; margin-top: 15px; }
.institution-panel { margin-bottom:20px; }
.institution-panel .panel-head p { margin:4px 0 0; color:var(--muted); font-size:11px; }
.institution-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:14px; }
.institution-card { display:flex; gap:16px; align-items:center; min-height:118px; border:1px solid var(--border); border-radius:14px; padding:16px; background:#faf8f2; }
.institution-logo { width:112px; height:86px; flex:0 0 112px; display:grid; place-items:center; border-radius:10px; background:#fff; border:1px solid var(--border); overflow:hidden; color:var(--green); font-size:11px; font-weight:800; }
.institution-logo img { width:100%; height:100%; object-fit:contain; padding:6px; }
.institution-logo.shape-landscape { width:174px; height:88px; flex-basis:174px; }
.institution-logo.shape-square { width:106px; height:106px; flex-basis:106px; }
.institution-logo.shape-circle { width:106px; height:106px; flex-basis:106px; border-radius:50%; }
.institution-logo.shape-portrait { width:88px; height:116px; flex-basis:88px; }
.logo-frame.shape-circle img { border-radius:50%; }
.institution-copy { min-width:0; flex:1; }
.institution-edit { min-height:38px; padding:9px 12px; flex:0 0 auto; }
.institution-card strong,.institution-card small { display:block; }
.institution-card strong { font-size:15px; }
.institution-card small { margin-top:5px; color:var(--muted); font-size:11px; }

.key-list { display: grid; gap: 14px; }
.key-card { display: grid; grid-template-columns: 52px minmax(0,1fr) auto; gap: 15px; align-items: center; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.key-mark { width: 48px; height: 48px; flex:0 0 48px; border-radius: 13px; background: #e3efe7; color: var(--green); display: grid; place-items: center; font-size: 23px; line-height:1; }
.key-card h3 { margin: 0 0 4px; font: 800 16px "Manrope",sans-serif; }
.key-card p { margin: 0; color: var(--muted); font-size: 12px; }
.key-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.key-actions { display: flex; gap: 8px; align-items: center; }
.key-builder { padding: 23px; }
.builder-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.builder-section h3 { margin: 0 0 5px; font: 800 16px "Manrope",sans-serif; }
.builder-section > p { margin: 0 0 15px; color: var(--muted); font-size: 12px; }
.option-count-section { display:grid; grid-template-columns:minmax(0,1fr) 260px; gap:22px; align-items:end; }
.option-count-section .field { margin:0; }
.answer-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 18px; }
.answer-row { display: grid; grid-template-columns: 26px repeat(var(--option-count,5),1fr); gap: 5px; align-items: center; }
.question-number { font-size: 12px; color: var(--muted); font-weight: 700; }
.answer-choice { border: 1px solid var(--border); background: transparent; border-radius: 8px; height: 34px; color: var(--muted); font-size: 12px; font-weight: 800; }
.answer-choice.selected { background: var(--green); border-color: var(--green); color: #fff; }
.rule-list { display: grid; gap: 10px; }
.rule-row { display: grid; grid-template-columns: minmax(0,1fr) 210px; gap: 15px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.rule-row:last-child { border-bottom: 0; }
.rule-row strong { display: block; font-size: 13px; }
.rule-row span { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.check-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.check-option { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 12px; background: #fff; }
.check-option input { accent-color: var(--green); width: 17px; height: 17px; }
.role-badge { display: inline-flex; align-items: center; gap: 5px; color: #615429; background: #f4e8b9; border-radius: 999px; padding: 5px 8px; font-size: 10px; font-weight: 800; }

.gradebook-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.gradebook-head .form-select { width: auto; min-width: 210px; }
.gradebook-table th:not(:first-child), .gradebook-table td:not(:first-child) { text-align: center; }
.gradebook-table td:first-child { min-width: 190px; }
.gradebook-table .average-cell { background: #edf3e7; color: var(--green); font-weight: 800; }
.gradebook-table .recovery-cell { background: #fff0df; color: var(--red); font-weight: 800; }
.gradebook-summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 12px; margin: 18px 0 22px; }
.gradebook-summary > div { border: 1px solid var(--border); border-radius: 11px; padding: 13px; background: var(--surface); }
.gradebook-summary strong { display: block; font: 800 21px "Manrope",sans-serif; }
.gradebook-summary span { color: var(--muted); font-size: 11px; }
.page-actions { display:flex; flex-wrap:wrap; gap:9px; justify-content:flex-end; }
.privacy-chip { display:inline-flex; padding:7px 10px; border-radius:999px; background:#eef4da; color:#4d5d29; font-size:11px; font-weight:700; }
.import-modal { width:min(700px,100%); }
.import-drop { margin-top:18px; padding:24px; border:1.5px dashed #aaa99e; border-radius:14px; background:#faf8f2; text-align:center; }
.import-drop .big-icon { display:block; font-size:32px; color:var(--green); }
.import-drop h3 { margin:7px 0 4px; }
.import-drop p { max-width:510px; margin:0 auto 14px; color:var(--muted); font-size:12px; line-height:1.5; }
.import-drop .action-link { display:block; margin:13px auto 0; }
.csv-format { margin-top:14px; padding:14px; border-radius:11px; background:#eef1eb; }
.csv-format strong { display:block; font-size:12px; margin-bottom:8px; }
.csv-format code { display:block; color:#405046; font-size:11px; line-height:1.7; white-space:normal; }
.import-summary { display:flex; justify-content:space-between; gap:12px; margin-top:15px; padding:12px 14px; border-radius:10px; background:#e5f1e7; color:#275f48; font-size:12px; }
.import-summary span { color:#4a705f; }
.csv-preview { margin-top:10px; max-height:245px; border:1px solid var(--border); border-radius:10px; }
.csv-preview table { min-width:520px; }
.csv-preview td { padding:10px 12px; }
.grade-card-head { display:flex; justify-content:space-between; gap:14px; align-items:flex-start; }
.discipline-average { text-align:right; }
.discipline-average strong { display:block; color:var(--green); font:800 26px "Manrope",sans-serif; }
.discipline-average span { color:var(--muted); font-size:10px; white-space:nowrap; }
.minimum-line { background:#f7f4eb; margin:0 -7px; padding-left:7px; padding-right:7px; }
.no-grades { padding:18px 0; border-top:1px solid var(--border); color:var(--muted); font-size:12px; }
.pending { margin-top:14px; border-radius:10px; padding:11px 12px; background:#ebe9e2; color:#666; font-size:12px; }
.section-title-row { display:flex; justify-content:space-between; gap:16px; align-items:end; }
.section-title-row h2 { margin-bottom:4px; }
.section-title-row p { margin:0 0 18px; color:var(--muted); font-size:12px; }
.field small { display:block; color:var(--muted); font-size:10px; margin-top:5px; }
.btn:disabled { opacity:.5; cursor:not-allowed; }

.criteria-box { margin-top: 16px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: #f7f4eb; }
.criteria-box h3 { margin: 0 0 4px; font-size: 14px; }
.criteria-box > p { margin: 0 0 13px; color: var(--muted); font-size: 11px; }
.format-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.format-grid > div { padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.format-grid strong, .format-grid span { display: block; }
.format-grid strong { font-size: 12px; margin-bottom: 5px; }
.format-grid span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.criteria-weight { display: grid; grid-template-columns: minmax(0,1fr) 80px; gap: 10px; align-items: center; }
.criteria-weight input[type="number"] { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px; }
.document-drop { border: 1.5px dashed #aaa99e; border-radius: 13px; padding: 22px; text-align: center; background: #faf8f2; }
.document-drop h3 { margin: 7px 0 4px; }
.document-drop p { margin: 0 0 14px; color: var(--muted); font-size: 12px; }
.analysis-list { display: grid; gap: 8px; margin-top: 16px; }
.analysis-item { display: grid; grid-template-columns: 25px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--border); background: #fff; }
.analysis-icon { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.analysis-item.pass .analysis-icon { background: #dcefe2; color: var(--green); }
.analysis-item.fail .analysis-icon { background: #f5d8cf; color: var(--red); }
.analysis-item strong { display: block; font-size: 12px; }
.analysis-item small { display: block; color: var(--muted); margin-top: 2px; }
.analysis-score { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 15px; margin-top: 16px; border-radius: 12px; background: var(--green); color: #fff; }
.analysis-score strong { font: 800 30px "Manrope",sans-serif; }
.analysis-score span { color: rgba(255,255,255,.72); font-size: 12px; }
.teacher-scope { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 20px; }
.enrollment-control { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:20px; padding:20px 22px; border:1px solid var(--border); border-radius:15px; background:var(--surface); }
.enrollment-control.open { background:#eef4da; border-color:#c8d99b; }
.enrollment-control h2 { margin:5px 0 4px; font:800 18px "Manrope",sans-serif; }
.enrollment-control p { margin:0; color:var(--muted); font-size:12px; }
.enrollment-status { font-size:11px; font-weight:800; color:#8d4538; text-transform:uppercase; letter-spacing:.04em; }
.enrollment-control.open .enrollment-status { color:var(--green); }
.enrollment-actions { display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.registration-class-list { display:grid; gap:10px; margin-top:14px; }
.registration-class-list .check-option { align-items:flex-start; }
.registration-class-list .check-option span,.registration-class-list .check-option strong,.registration-class-list .check-option small { display:block; }
.registration-class-list .check-option small { color:var(--muted); margin-top:3px; }
.scope-card { padding: 15px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.scope-card strong { display: block; font-size: 13px; }
.scope-card span { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }

.student-shell { min-height: 100vh; background: linear-gradient(180deg, var(--green) 0 270px, var(--paper) 270px); }
.student-nav { max-width: 1180px; margin: auto; padding: 25px 28px; color: #fff; display: flex; justify-content: space-between; align-items: center; }
.student-main { max-width: 1120px; margin: 36px auto 0; padding: 0 28px 70px; }
.student-hero { padding: 27px; box-shadow: var(--shadow); display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.student-hero h1 { margin: 0 0 7px; font: 800 28px "Manrope",sans-serif; }
.student-hero p { margin: 0; color: var(--muted); }
.student-summary { text-align: right; }
.student-summary strong { display: block; font: 800 31px "Manrope",sans-serif; color: var(--green); }
.student-summary small { color: var(--muted); }
.student-section { margin-top: 30px; }
.student-section h2 { font: 800 21px "Manrope",sans-serif; }
.grades { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 15px; }
.grade-card { padding: 20px; }
.grade-card h3 { margin: 0; font-size: 16px; }
.grade-card .teacher { color: var(--muted); font-size: 12px; margin: 4px 0 19px; }
.grade-line { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--border); font-size: 13px; }
.recovery { margin-top: 14px; border-radius: 10px; padding: 11px 12px; background: #fff0df; color: #80512f; font-size: 12px; }
.approved { margin-top: 14px; border-radius: 10px; padding: 11px 12px; background: #e4f1e7; color: #275f48; font-size: 12px; }

.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(18,28,24,.55); z-index: 20; display: grid; place-items: center; padding: 20px; }
.modal { width: min(560px,100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border-radius: 17px; box-shadow: var(--shadow); padding: 25px; }
.modal.scanner-modal { width:min(1400px,calc(100vw - 40px)); max-width:none; }
.activity-builder-modal { width:min(1050px,calc(100vw - 40px)); }
.activity-builder-modal .criteria-box { margin-top:18px; }
.activity-key-builder .panel-head { align-items:flex-start; }
.activity-key-builder .compact-field { min-width:130px; margin:0; }
.activity-classroom-links { grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); }
.activity-points { max-width:220px; margin-top:16px; }
.admin-banner + .enrollment-control,.admin-page .enrollment-control,.registration-class-tabs,.registration-roster,.registration-requests { display:none!important; }
.gradebook-discipline-tools { margin:18px 0; padding:18px; border:1px solid var(--border); border-radius:14px; background:#f8faf5; }
.gradebook-discipline-tools .panel-head p { margin:4px 0 0; color:var(--muted); font-size:12px; }
.discipline-report-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.discipline-report-card { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px; border:1px solid var(--border); border-radius:12px; background:#fff; color:var(--ink); text-align:left; cursor:pointer; }
.discipline-report-card:hover { border-color:var(--green); background:#f0f7f2; }
.discipline-report-card strong,.discipline-report-card small { display:block; }
.discipline-report-card small { margin-top:4px; color:var(--muted); font-size:11px; }
.discipline-report-modal { width:min(900px,calc(100vw - 32px)); }
.discipline-report-summary { display:grid; grid-template-columns:repeat(5,1fr); gap:10px; margin:18px 0; }
.discipline-report-summary div,.discipline-report-summary button { padding:14px; border:1px solid transparent; border-radius:12px; background:#eef3eb; text-align:center; color:var(--ink); }
.discipline-report-summary button { cursor:pointer; }
.discipline-report-summary button.active { border-color:var(--green); background:#dfeee4; box-shadow:0 0 0 2px rgba(31,101,77,.1); }
.discipline-report-summary strong,.discipline-report-summary span { display:block; }
.discipline-report-summary strong { font:800 24px "Manrope",sans-serif; color:var(--green); }
.discipline-report-summary span { color:var(--muted); font-size:11px; }
.report-selectors { margin-top:18px; }
.discipline-student-report { max-height:48vh; overflow:auto; border:1px solid var(--border); border-radius:13px; }
.discipline-student-row { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:12px 14px; border-top:1px solid var(--border); }
.discipline-student-row:first-child { border-top:0; }
.discipline-student-row strong,.discipline-student-row small { display:block; }
.discipline-student-row small { margin-top:3px; color:var(--muted); font-size:11px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { margin: 0; font: 800 23px "Manrope",sans-serif; }
.modal-subtitle { margin:4px 0 0; color:var(--muted); font-size:12px; }
.close-btn { border: 0; background: var(--surface-2); width: 44px; height: 44px; flex:0 0 44px; display:grid; place-items:center; border-radius: 10px; font-size:24px; line-height:1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.print-sheet-modal { width:min(720px,100%); }
.print-explainer { margin-top:20px; display:flex; align-items:center; gap:13px; padding:14px 16px; border-radius:12px; background:#eef4da; color:#435124; }
.print-explainer-icon { width:38px; height:38px; border-radius:10px; display:grid; place-items:center; background:#fff; font-size:19px; }
.print-explainer strong,.print-explainer p { display:block; margin:0; }
.print-explainer p { font-size:12px; margin-top:3px; line-height:1.45; }
.logo-uploader { display:grid; grid-template-columns:120px minmax(0,1fr); gap:16px; align-items:center; margin:16px 0; padding:15px; border:1px solid var(--border); border-radius:12px; background:#faf8f2; }
.logo-preview { height:86px; border:1.5px dashed #aaa99e; border-radius:10px; background:#fff; display:grid; place-items:center; overflow:hidden; color:var(--muted); font-weight:800; font-size:12px; }
.logo-preview img { width:100%; height:100%; object-fit:contain; padding:7px; }
.institution-logo-uploader { grid-template-columns:180px minmax(0,1fr); }
.institution-logo-uploader .logo-preview { height:130px; }
.institution-logo-uploader .logo-preview.shape-landscape { width:180px; height:105px; }
.institution-logo-uploader .logo-preview.shape-square { width:130px; height:130px; }
.institution-logo-uploader .logo-preview.shape-circle { width:130px; height:130px; border-radius:50%; }
.institution-logo-uploader .logo-preview.shape-portrait { width:96px; height:140px; }
.logo-uploader strong { display:block; font-size:13px; }
.logo-uploader p { margin:4px 0 10px; color:var(--muted); font-size:11px; }
.sheet-preview { margin-top:18px; padding:12px; border:1px solid var(--border); border-radius:12px; background:#e9e5db; }
.mini-sheet { aspect-ratio:1.9/1; background:#fff; border-radius:7px; display:grid; grid-template-columns:42px minmax(0,1fr) 1fr; align-items:start; gap:9px; padding:10px; box-shadow:0 3px 10px rgba(0,0,0,.05); }
.mini-sheet::after { content:"○  ○  ○  ○  ○\A○  ○  ○  ○  ○"; white-space:pre; justify-self:end; font:11px/1.8 monospace; color:#444; }
.mini-sheet strong,.mini-sheet small { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.mini-sheet strong { font-size:10px; }
.mini-sheet small { color:var(--muted); font-size:8px; margin-top:3px; }
.mini-logo { width:36px; height:27px; border-radius:5px; display:grid; place-items:center; background:#e8efe8; color:var(--green); font-size:9px; font-weight:800; overflow:hidden; }
.mini-logo img { width:100%; height:100%; object-fit:contain; }
.cut-line { text-align:center; font-size:8px; color:#777; letter-spacing:1px; padding:5px 0; border-bottom:1px dashed #999; margin-bottom:5px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 30; background: var(--ink); color: #fff; padding: 13px 16px; border-radius: 10px; box-shadow: var(--shadow); transform: translateY(120px); opacity: 0; transition: .25s ease; }
.toast.show { transform: translateY(0); opacity: 1; }
.site-footer { display:flex; justify-content:space-between; align-items:center; gap:24px; padding:22px 28px; color:var(--muted); font-size:11px; letter-spacing:.15px; }
.footer-brand { display:flex; align-items:center; gap:10px; text-align:left; }
.footer-mark { display:grid; place-items:center; width:30px; height:30px; flex:0 0 30px; border-radius:9px; color:var(--green-dark); background:var(--lime); font-size:16px; font-weight:900; box-shadow:0 5px 14px rgba(29,104,80,.12); }
.footer-brand > span:last-child, .footer-signature { display:flex; flex-direction:column; gap:2px; }
.footer-brand strong { color:var(--ink); font-size:12px; letter-spacing:-.1px; }
.footer-brand small, .footer-signature small { color:var(--muted); font-size:10px; }
.footer-signature { align-items:flex-end; text-align:right; }
.footer-signature > span { color:var(--muted); }
.footer-signature strong { color:var(--green); font-weight:800; }
.footer-signature a { color:var(--green); font-weight:800; text-decoration:none; border-bottom:1px solid rgba(31,101,77,.35); }
.footer-signature a:hover,.footer-signature a:focus-visible { color:var(--green-dark); border-bottom-color:currentColor; outline:2px solid rgba(45,135,104,.18); outline-offset:3px; border-radius:2px; }
.login-panel .site-footer { margin-top:auto; padding:20px 0 4px; }
.login-panel .footer-brand { display:none; }
.login-panel .footer-signature { width:100%; align-items:center; text-align:center; }
.main > .site-footer { border-top:1px solid var(--border); margin:4px 28px 0; }
.student-main > .site-footer { margin-top:36px; border-top:1px solid rgba(36,62,51,.14); }
@media (max-width: 680px) {
  .discipline-report-grid,.discipline-report-summary { grid-template-columns:1fr; }
  .gradebook-discipline-tools .panel-head { align-items:stretch; flex-direction:column; }
  .stack-actions { grid-template-columns:1fr; }
  .site-footer { flex-direction:column; gap:12px; padding:20px 16px; }
  .footer-signature { align-items:center; text-align:center; }
  .institution-card { align-items:flex-start; flex-wrap:wrap; }
  .institution-logo { width:100%; height:140px; flex-basis:100%; }
  .institution-edit { width:100%; }
  .enrollment-control { align-items:stretch; flex-direction:column; }
  .enrollment-actions,.enrollment-control .btn { width:100%; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.credential-box { display:grid; grid-template-columns:minmax(90px,.45fr) minmax(0,1fr); gap:10px 16px; margin:18px 0; padding:18px; border:1px solid var(--border); border-radius:14px; background:#f4f7ef; }
.credential-box span { color:var(--muted); font-size:13px; align-self:center; }
.credential-box strong { font-size:18px; overflow-wrap:anywhere; }
.row-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.action-link.danger { color:#a43a32; }
.registration-requests td small { display:block; margin-top:4px; color:var(--muted); }

@media (max-width: 1100px) {
  .scanner-layout { grid-template-columns:1fr; }
  .scanner-panel { border-left:0; border-top:1px solid var(--border); }
  .camera-area { min-height:430px; }
}

@media (max-width: 980px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-art { min-height: 360px; padding: 38px; }
  .hero-copy { margin: 60px 0 40px; }
  .hero-copy h1 { font-size: 48px; }
  .login-panel { padding: 48px 28px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .cards-grid, .grades { grid-template-columns: repeat(2,1fr); }
  .scanner-layout { grid-template-columns: 1fr; }
  .scanner-panel { border-left: 0; border-top: 1px solid var(--border); }
  .camera-area { min-height: 430px; }
  .admin-grid { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns:1fr; }
  .institution-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dashboard-hero { grid-template-columns:1fr; min-height:380px; }
  .dashboard-hero-art { inset:0 0 0 25%; }
  .proof-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .format-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .correction-actions { grid-template-columns:1fr; }
  .grade-entry-controls { grid-template-columns:1fr 1fr; }
}
@media (max-width: 860px) {
  body.menu-open { overflow:hidden; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset:0 auto 0 0; left: -290px; z-index: 25; width:min(282px,86vw); height:100dvh; padding:20px 16px; transition: left .22s; overflow-y:auto; overscroll-behavior:contain; }
  .sidebar.open { left: 0; box-shadow: 18px 0 50px rgba(0,0,0,.25); }
  .sidebar .brand { padding:0 6px 20px; font-size:19px; }
  .sidebar-close { display:grid; place-items:center; margin-bottom:20px; }
  .menu-scrim { position:fixed; inset:0; z-index:20; border:0; background:rgba(18,28,24,.55); opacity:0; pointer-events:none; display:block; transition:opacity .22s; }
  .menu-scrim.visible { opacity:1; pointer-events:auto; }
  .mobile-menu { display: inline-grid; place-items: center; }
  .topbar { height: 66px; padding:0 16px; gap:10px; }
  .top-actions { min-width:0; gap:8px; }
  .topbar-context { flex:1 1 auto; }
  .crumb { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
  .content { padding:25px 16px 52px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-head > .btn { width:100%; }
  .cards-grid, .grades { grid-template-columns: 1fr; }
  .correction-actions, .proof-grid, .format-grid { grid-template-columns: 1fr; }
  .correction-option { align-items: flex-start; flex-wrap: wrap; }
  .correction-option .btn { margin-left: 63px; }
  .correction-option .stack-actions { margin-left: 63px; width: calc(100% - 63px); }
  .correction-option .stack-actions .btn { margin-left: 0; width: 100%; }
  .format-grid { grid-template-columns: 1fr; }
  .modal-backdrop.camera-backdrop { padding: 0; place-items: stretch; }
  .scanner-modal { width:100%; max-height:100dvh; min-height:100dvh; border-radius:0; }
  .scanner-header { padding: 15px 17px; }
  .scanner-header h2 { font-size:19px; }
  .scanner-layout { min-height:0; }
  .camera-area { min-height:48dvh; }
  .scanner-panel { padding:18px 16px calc(18px + env(safe-area-inset-bottom)); }
  .scanner-panel { max-height:none; overflow:visible; }
  .scan-review-row { grid-template-columns:30px minmax(0,1fr) auto; align-items:start; }
  .scan-answer-editor { grid-column:2 / -1; }
  .scan-key { grid-column:2; text-align:left; }
  .scan-reading { grid-column:3; grid-row:3; max-width:145px; }
  .grade-entry-controls { grid-template-columns:1fr; }
  .grade-import-bar { align-items:stretch; flex-direction:column; }
  .grade-import-bar .btn { width:100%; }
  .grade-import-actions { display:grid; grid-template-columns:1fr; }
  .grade-form-actions > .row-actions { width:100%; margin-left:0; }
  .grade-form-actions > .row-actions .btn { flex:1; }
  .scan-pill { max-width:calc(100% - 32px); white-space:normal; text-align:center; justify-content:center; }
  .key-card { grid-template-columns: 46px minmax(0,1fr); }
  .key-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .answer-grid, .check-grid { grid-template-columns: 1fr; }
  .rule-row { grid-template-columns: 1fr; }
  .option-count-section { grid-template-columns:1fr; }
  .admin-banner { align-items: flex-start; flex-direction: column; }
  .gradebook-summary, .teacher-scope { grid-template-columns: 1fr; }
  .student-hero { align-items: flex-start; flex-direction: column; }
  .student-nav { padding:20px 16px; }
  .student-main { margin-top:22px; padding:0 16px 50px; }
  .student-summary { text-align: left; }
  .dashboard-hero { min-height:440px; }
  .dashboard-hero::after { background:linear-gradient(90deg,rgba(17,69,52,.98) 0%,rgba(17,69,52,.88) 66%,rgba(17,69,52,.35) 100%); }
  .dashboard-hero-copy { padding:32px 28px; }
  .dashboard-hero-art { inset:0 0 0 0; opacity:.4; }
  .logo-uploader { grid-template-columns:1fr; }
  .logo-preview { height:110px; }
  .institution-list { grid-template-columns:1fr; }
  .page-actions { width:100%; justify-content:stretch; }
  .page-actions .btn { flex:1 1 210px; }
  .import-summary { flex-direction:column; }
  .panel { padding:18px 16px; }
  .panel-head { align-items:flex-start; flex-wrap:wrap; }
  .activity-row { grid-template-columns:40px minmax(0,1fr); }
  .activity-row .badge { grid-column:2; justify-self:start; }
  .key-actions { width:100%; }
  .key-actions .btn { flex:1; }
  .modal-backdrop:not(.camera-backdrop) { padding:12px; align-items:end; }
  .modal-backdrop:not(.camera-backdrop) .modal { width:100%; max-height:calc(100dvh - 24px); border-radius:18px 18px 10px 10px; padding:20px 16px calc(20px + env(safe-area-inset-bottom)); }
  .form-actions { position:sticky; bottom:0; margin:20px -16px -20px; padding:14px 16px calc(14px + env(safe-area-inset-bottom)); background:rgba(255,253,248,.96); border-top:1px solid var(--border); backdrop-filter:blur(10px); }
  .main > .site-footer { margin:0 16px; }
  .toast { left:16px; right:16px; bottom:calc(16px + env(safe-area-inset-bottom)); text-align:center; }
}
@media (max-width: 480px) {
  .login-art { min-height: 220px; padding: 24px 20px; }
  .login-art::before { width:260px; height:260px; right:-130px; top:-100px; }
  .login-art::after { width:150px; height:150px; left:-70px; bottom:-80px; border-width:34px; }
  .hero-copy { margin: 32px 0 8px; }
  .hero-copy h1 { max-width:280px; margin-bottom:0; font-size: 36px; letter-spacing: -2px; }
  .hero-copy p { display:none; }
  .art-footer { display: none; }
  .login-panel { padding:32px 20px calc(24px + env(safe-area-inset-bottom)); align-items:flex-start; }
  .login-card h2 { font-size:28px; }
  .field input, .field select, .field textarea, .form-select { font-size:16px; }
  .stats { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .top-actions .btn { width:44px; padding: 11px; }
  .top-actions .btn span { display: none; }
  .topbar .top-actions:last-child .icon-btn { display:none; }
  .dashboard-hero { min-height:465px; border-radius:18px; }
  .dashboard-hero-copy { padding:28px 20px; }
  .dashboard-hero h1 { font-size:34px; }
  .hero-trust { display:grid; gap:7px; }
  .section-heading { align-items:flex-start; flex-direction:column; }
  .student-hero { padding:21px 18px; }
  .student-hero h1 { font-size:24px; }
  .grade-card-head { flex-direction:column; }
  .discipline-average { text-align:left; }
  .correction-option .btn, .correction-option .stack-actions { margin-left:0; width:100%; }
  .key-card { grid-template-columns:42px minmax(0,1fr); gap:12px; padding:15px; }
  .key-mark { width:42px; height:42px; flex-basis:42px; font-size:20px; }
  .key-actions { display:grid; grid-template-columns:1fr; }
  .answer-row { grid-template-columns:24px repeat(var(--option-count,5),minmax(34px,1fr)); gap:4px; }
  .answer-choice { min-width:0; padding:0; }
  .print-explainer { align-items:flex-start; }
  .mini-sheet { grid-template-columns:32px minmax(0,1fr); aspect-ratio:auto; min-height:150px; }
  .mini-sheet::after { grid-column:1 / -1; justify-self:center; }
  .logo-uploader { padding:12px; }
  .analysis-item { grid-template-columns:25px minmax(0,1fr); }
  .analysis-item > :last-child { grid-column:2; justify-self:start; }
  .form-actions { flex-direction:column-reverse; }
  .form-actions .btn { width:100%; }
  .settings-actions { flex-direction:column-reverse; }
  .settings-actions .btn { width:100%; }
  .site-footer { padding-inline:8px; }
}

@media (max-width: 360px) {
  .topbar { padding-inline:10px; }
  .content { padding-inline:12px; }
  .hero-actions { display:grid; }
  .hero-actions .btn { width:100%; }
  .dashboard-hero h1 { font-size:30px; }
  .panel { padding:15px 12px; }
  .answer-row { grid-template-columns:22px repeat(var(--option-count,5),minmax(30px,1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}
