:root{--blue:#005A8B;--navy:#132245;--light:#78AFE9;--orange:#FF791F;--yellow:#FEDE42;--bg:#f5f8fb;--card:#fff;--text:#172033;--muted:#667085;--line:#e4eaf0;--green:#157347;--red:#b42318;--shadow:0 12px 35px rgba(19,34,69,.09);--radius:18px}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--text);line-height:1.45}a{color:var(--blue);text-decoration:none}button,input,textarea,select{font:inherit}button{cursor:pointer}.topbar{height:74px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:sticky;top:0;z-index:40}.brand{display:flex;align-items:center;gap:11px;color:var(--navy)}.brand>span:last-child{display:flex;flex-direction:column;line-height:1.08}.brand strong{font-size:18px}.brand small{font-size:11px;color:var(--muted);margin-top:4px;letter-spacing:.02em}.brand-mark{width:38px;height:38px;border-radius:11px 11px 11px 3px;background:var(--blue);color:white;display:inline-flex;align-items:center;justify-content:center;font-weight:800;font-family:monospace;box-shadow:0 7px 18px rgba(0,90,139,.2)}.brand-mark.big{width:54px;height:54px;font-size:17px;border-radius:16px 16px 16px 5px}.topbar-right{display:flex;align-items:center;gap:14px}.user-chip{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:600}.avatar{width:30px;height:30px;border-radius:50%;background:#e6f2f8;color:var(--blue);display:grid;place-items:center}.shell{display:flex;min-height:calc(100vh - 74px)}.sidebar{width:230px;background:var(--navy);padding:26px 18px;color:white;position:fixed;top:74px;bottom:0;left:0}.sidebar-label{font-size:10px;letter-spacing:.16em;color:#9fb0d1;font-weight:800;margin:2px 10px 12px}.nav-link{display:block;color:#dce8f6;padding:11px 12px;border-radius:10px;margin-bottom:5px;font-weight:650;font-size:14px}.nav-link:hover{background:rgba(255,255,255,.08);color:white}.sidebar-note{position:absolute;bottom:18px;left:18px;right:18px;padding:13px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.08);border-radius:12px;color:#b9c6dd;font-size:11px;line-height:1.5}.content{margin-left:230px;flex:1;padding:34px;min-width:0}.content.student-content{margin-left:0}.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;margin-bottom:24px}.page-head h1{font-size:30px;line-height:1.1;color:var(--navy);margin:6px 0 7px}.page-head p{margin:0;color:var(--muted)}.eyebrow{font-size:10px;letter-spacing:.16em;font-weight:900;color:var(--blue)}.head-actions{display:flex;gap:8px}.btn{border:0;border-radius:10px;padding:10px 15px;font-weight:750;font-size:14px;display:inline-flex;align-items:center;justify-content:center;gap:7px;transition:.18s ease}.btn:hover{transform:translateY(-1px)}.btn-primary{background:var(--blue);color:#fff;box-shadow:0 7px 16px rgba(0,90,139,.16)}.btn-secondary{background:#edf4f8;color:var(--blue);border:1px solid #d5e5ee}.btn-ghost{background:transparent;color:var(--navy);border:1px solid var(--line)}.btn-dark{background:var(--navy);color:white}.btn-danger{background:#fff1f0;color:var(--red);border:1px solid #ffd8d4}.btn-disabled{background:#eef1f4;color:#98a2b3;cursor:not-allowed}.btn-block{width:100%}.btn-sm{padding:7px 10px;font-size:12px}.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:22px;box-shadow:0 1px 1px rgba(19,34,69,.02)}.card h2{font-size:18px;color:var(--navy);margin:0 0 17px}.card h3{color:var(--navy)}.card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.card-head h2{margin:0}.card-head p{margin:3px 0 0;color:var(--muted);font-size:13px}.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin-bottom:20px}.stat-card{background:white;border:1px solid var(--line);border-radius:16px;padding:19px 20px;display:flex;flex-direction:column}.stat-card span{font-size:12px;color:var(--muted);font-weight:700}.stat-card strong{font-size:31px;color:var(--navy);margin:5px 0}.stat-card small{color:#98a2b3}.two-col{display:grid;grid-template-columns:1.3fr .8fr;gap:20px}.two-col.uneven{grid-template-columns:.65fr 1.35fr}.settings-grid{display:grid;grid-template-columns:1.45fr .8fr;gap:20px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:13px}th{text-align:left;padding:10px 12px;color:#758196;font-size:10px;text-transform:uppercase;letter-spacing:.08em;border-bottom:1px solid var(--line)}td{padding:13px 12px;border-bottom:1px solid #edf1f5;vertical-align:middle}tr:last-child td{border-bottom:0}td small{color:var(--muted)}.actions{display:flex;gap:12px}.table-link{font-weight:700}.pill{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;background:#f0f2f5;color:#566173;font-size:10px;text-transform:uppercase;letter-spacing:.04em;font-weight:850}.pill-green{background:#eaf7ef;color:var(--green)}.pill-orange{background:#fff4e8;color:#a34e00}.warn-count{min-width:25px;height:25px;border-radius:8px;background:#fff1f0;color:var(--red);display:inline-grid;place-items:center;font-weight:800}.empty{padding:28px;text-align:center;color:#8791a2;background:#fafbfd;border:1px dashed #dfe5eb;border-radius:12px}.event-list{display:flex;flex-direction:column}.event{display:flex;gap:11px;padding:11px 0;border-bottom:1px solid #edf1f5}.event:last-child{border-bottom:0}.event-dot{width:9px;height:9px;border-radius:50%;background:var(--blue);margin-top:6px;flex:0 0 auto}.event-dot.danger{background:var(--orange)}.event strong{font-size:13px}.event p{margin:2px 0;color:#657084;font-size:12px}.event small{color:#9aa3b2}.flash-stack{margin-bottom:16px}.alert{padding:11px 14px;border-radius:10px;font-size:13px;margin-bottom:8px}.alert-success{background:#eaf7ef;color:#16633b}.alert-danger{background:#fff0ef;color:#a52016}.alert-warning{background:#fff7e8;color:#8a4b00}.stack-form{display:flex;flex-direction:column;gap:13px}label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:750;color:#495469}label small{font-weight:500;color:#8b95a5}input,textarea,select{width:100%;border:1px solid #d8e0e8;background:#fff;border-radius:10px;padding:10px 11px;outline:0;color:var(--text);transition:.15s}input:focus,textarea:focus,select:focus{border-color:var(--light);box-shadow:0 0 0 3px rgba(120,175,233,.18)}textarea{resize:vertical}.form-grid{display:grid;gap:12px;margin:13px 0}.form-grid.two{grid-template-columns:1fr 1fr}.form-grid.three{grid-template-columns:repeat(3,1fr)}.toggle-list{display:flex;flex-direction:column}.toggle-list.compact{margin-top:13px;border-top:1px solid var(--line)}.toggle-row{flex-direction:row;align-items:center;justify-content:space-between;gap:14px;padding:13px 0;border-bottom:1px solid #eef2f5}.toggle-row span{display:flex;flex-direction:column;gap:2px}.toggle-row strong{font-size:13px;color:var(--navy)}.toggle-row small{font-size:11px;color:var(--muted)}.toggle-row input[type=checkbox]{appearance:none;width:39px;height:22px;border:0;border-radius:20px;background:#ccd4dd;padding:0;position:relative;flex:0 0 auto}.toggle-row input[type=checkbox]:after{content:"";position:absolute;width:16px;height:16px;top:3px;left:3px;background:#fff;border-radius:50%;box-shadow:0 1px 3px rgba(0,0,0,.2);transition:.18s}.toggle-row input[type=checkbox]:checked{background:var(--blue)}.toggle-row input[type=checkbox]:checked:after{left:20px}.sticky-save{position:sticky;bottom:16px;margin-top:18px;background:rgba(255,255,255,.94);backdrop-filter:blur(8px);border:1px solid var(--line);box-shadow:var(--shadow);border-radius:14px;padding:11px;display:flex;justify-content:flex-end;gap:8px;z-index:20}.mt{margin-top:10px}.mt-lg{margin-top:20px}hr{border:0;border-top:1px solid var(--line);margin:22px 0}.question-list{display:flex;flex-direction:column}.question-row{display:flex;align-items:center;gap:14px;padding:13px 0;border-bottom:1px solid #edf1f5}.question-row:last-child{border-bottom:0}.qnum{width:34px;height:34px;border-radius:10px;background:#eaf3f8;color:var(--blue);display:grid;place-items:center;font-weight:850;flex:0 0 auto}.qmain{flex:1;min-width:0}.qmeta{display:flex;align-items:center;gap:8px;margin-bottom:5px;font-size:11px;color:var(--muted)}.helper-card p{font-size:13px;color:#5f6879}.callout{padding:13px;border-radius:11px;background:#f0f6fb;border-left:4px solid var(--blue);font-size:12px;color:#4d5a6d}.callout.centered{text-align:center;border-left:0}.codearea,.code-editor,.code-review{font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace}.codearea{background:#111827;color:#e5eef9;border-color:#253149;line-height:1.55}.test-form{display:grid;grid-template-columns:1fr 1fr 100px 90px auto;gap:10px;align-items:end}.checkbox-inline{flex-direction:row;align-items:center;padding-bottom:10px}.checkbox-inline input{width:auto}.test-list{margin-top:18px}.test-row{display:grid;grid-template-columns:130px 1fr auto;gap:15px;align-items:center;border-top:1px solid var(--line);padding:12px 0}.test-row>div{display:flex;flex-direction:column}.test-row small{color:var(--muted)}.test-row pre{margin:0;background:#f7f9fb;padding:10px;border-radius:8px;white-space:pre-wrap;font-size:11px}.pill-btn{border:0;padding:5px 9px;border-radius:999px;background:#fff1f0;color:#a52016;font-size:11px;font-weight:800}.pill-btn.active{background:#eaf7ef;color:var(--green)}.monitor-grid{display:grid;grid-template-columns:1.5fr .8fr;gap:20px}.scroll-events{max-height:610px;overflow:auto}.live-label{font-size:10px;letter-spacing:.15em;font-weight:900;color:var(--green);display:flex;align-items:center;gap:7px}.live-label i{width:8px;height:8px;background:#1da363;border-radius:50%;box-shadow:0 0 0 5px rgba(29,163,99,.10)}.review-list{display:flex;flex-direction:column;gap:14px}.review-head{display:grid;grid-template-columns:auto 1fr 120px;gap:14px;align-items:start}.review-head h3{font-size:15px;margin:7px 0 0}.score-box input{margin-top:5px}.answer-box,.code-review{margin-top:16px;padding:14px;background:#f7f9fb;border:1px solid var(--line);border-radius:11px}.code-review{white-space:pre-wrap;background:#111827;color:#e7edf7;max-height:430px;overflow:auto}.muted{color:var(--muted)}
/* login */.login-body{background:linear-gradient(120deg,var(--navy) 0 53%,#f3f7fb 53% 100%);min-height:100vh}.login-wrap{min-height:100vh;display:grid;grid-template-columns:1.15fr .85fr;align-items:center;max-width:1180px;margin:auto;padding:50px}.login-hero{color:white;padding:40px 60px 40px 10px}.hero-badge{display:inline-block;color:#bcd9ed;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.05);padding:7px 10px;border-radius:999px;font-size:10px;font-weight:800;letter-spacing:.15em}.login-hero h1{font-size:60px;line-height:.98;margin:22px 0 18px;letter-spacing:-.04em}.login-hero h1 span{color:#78AFE9}.login-hero>p{max-width:520px;color:#c9d4e4;font-size:17px}.hero-points{margin-top:28px;display:grid;gap:9px;color:#dce5f0;font-size:13px}.login-card{width:min(430px,100%);justify-self:end;background:white;padding:34px;border-radius:24px;box-shadow:0 25px 70px rgba(19,34,69,.19)}.login-card h2{font-size:27px;color:var(--navy);margin:18px 0 3px}.login-card>.muted{margin-top:0}.login-logo{display:flex}.login-foot{text-align:center;font-size:10px;color:#98a2b3;margin:20px 0 0}
/* student */.student-wrap{max-width:1150px;margin:0 auto}.student-hero{background:linear-gradient(125deg,var(--navy),#173b67);color:white;padding:35px 38px;border-radius:22px;margin-bottom:20px;position:relative;overflow:hidden}.student-hero:after{content:"</>";position:absolute;right:35px;top:4px;font:bold 110px/1 monospace;color:rgba(255,255,255,.05)}.student-hero .eyebrow{color:#9fcae4}.student-hero h1{font-size:34px;margin:7px 0}.student-hero p{color:#c8d4e5;margin:0;max-width:650px}.exam-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:17px}.exam-card{background:white;border:1px solid var(--line);border-radius:18px;padding:21px;display:flex;flex-direction:column;box-shadow:0 1px 2px rgba(19,34,69,.03)}.exam-card-top{display:flex;justify-content:space-between;align-items:center}.course-chip{font-size:10px;background:#e9f3f8;color:var(--blue);font-weight:900;padding:6px 9px;border-radius:8px;text-transform:uppercase;letter-spacing:.06em}.exam-card h2{color:var(--navy);font-size:19px;margin:16px 0 7px}.exam-card>p{color:var(--muted);font-size:13px;min-height:54px}.exam-facts{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:8px 0 18px;border-top:1px solid var(--line);padding-top:14px}.exam-facts span{font-size:10px;color:var(--muted);display:flex;flex-direction:column}.exam-facts strong{font-size:15px;color:var(--navy)}
/* exam */.exam-mode{overflow-x:hidden}.exam-mode .topbar{display:none}.exam-mode .shell{min-height:100vh}.exam-mode .content{padding:0}.exam-layout{display:grid;grid-template-columns:245px 1fr;min-height:100vh}.exam-nav{background:var(--navy);padding:25px 19px;color:white;position:fixed;width:245px;top:0;bottom:0;left:0;display:flex;flex-direction:column}.exam-nav-title h2{font-size:16px;margin:12px 0 25px}.question-palette{display:grid;grid-template-columns:repeat(5,1fr);gap:7px}.palette-btn{height:35px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.05);color:#d8e3f3;border-radius:8px;font-weight:800;font-size:12px}.palette-btn.active{background:var(--light);color:var(--navy);border-color:var(--light)}.palette-btn.answered:not(.active){background:rgba(120,175,233,.17);border-color:#5c93c3}.palette-btn.flagged{outline:2px solid var(--yellow)}.monitor-status{margin-top:auto;display:flex;gap:9px;align-items:center;padding:13px;border-radius:12px;background:rgba(255,255,255,.06)}.monitor-status>div{display:flex;flex-direction:column}.monitor-status strong{font-size:11px}.monitor-status small{font-size:9px;color:#aebbd1}.status-dot{width:9px;height:9px;border-radius:50%;background:#8895aa}.status-dot.on{background:#34c37a;box-shadow:0 0 0 5px rgba(52,195,122,.1)}.exam-main{margin-left:245px;background:#f5f7fa;min-height:100vh}.exam-top{height:74px;background:white;border-bottom:1px solid var(--line);padding:0 32px;display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;z-index:15}.exam-top>div:first-child{display:flex;gap:12px;align-items:center}.timer{border-left:1px solid var(--line);padding-left:24px;display:flex;flex-direction:column;align-items:flex-end}.timer small{font-size:8px;letter-spacing:.12em;color:var(--muted);font-weight:900}.timer strong{font-size:20px;color:var(--navy);font-variant-numeric:tabular-nums}.timer.urgent strong{color:var(--red)}.questions-stage{max-width:980px;margin:0 auto;padding:34px}.question-panel{display:none;background:white;border:1px solid var(--line);border-radius:20px;padding:30px;box-shadow:0 8px 28px rgba(19,34,69,.04)}.question-panel.active{display:block}.question-title{display:flex;justify-content:space-between;color:var(--blue);font-size:11px;text-transform:uppercase;letter-spacing:.06em;font-weight:850;margin-bottom:16px}.question-panel>h2{font-size:21px;line-height:1.55;color:var(--navy);font-weight:680;margin:0 0 27px;white-space:pre-wrap}.mcq-list{display:flex;flex-direction:column;gap:10px}.mcq-option{flex-direction:row;align-items:center;gap:13px;padding:14px;border:1px solid #e0e6ed;border-radius:12px;cursor:pointer;font-size:13px;font-weight:600}.mcq-option:hover{border-color:#a9cadd;background:#f8fbfd}.mcq-option input{width:17px;accent-color:var(--blue)}.mcq-option:has(input:checked){border-color:var(--blue);background:#eef7fb;box-shadow:0 0 0 1px var(--blue)}.option-letter{width:29px;height:29px;border-radius:8px;background:#f0f3f6;display:grid;place-items:center;color:#667085;font-weight:900}.mcq-option:has(input:checked) .option-letter{background:var(--blue);color:white}.answer-label{font-size:12px}.short-answer{min-height:170px}.code-toolbar{height:46px;background:#111827;border-radius:12px 12px 0 0;display:flex;align-items:center;justify-content:space-between;padding:0 10px 0 15px}.language-tag{color:#9fb4cd;font:700 11px monospace}.code-editor{width:100%;height:380px;resize:vertical;background:#0d1420;color:#e7edf7;border:0;border-radius:0 0 12px 12px;padding:18px;font-size:13px;line-height:1.55;tab-size:4;outline:0}.io-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:13px}.stdin-box{font-family:monospace}.output-box{height:90px;overflow:auto;margin:0;background:#f7f9fb;border:1px solid var(--line);border-radius:10px;padding:10px;font:12px/1.45 monospace;white-space:pre-wrap}.locked-note{margin-top:10px;padding:11px 13px;background:#fff8e8;border:1px solid #f7e0a9;color:#7a5710;border-radius:10px;font-size:11px}.question-actions{display:flex;align-items:center;gap:8px;border-top:1px solid var(--line);padding-top:20px;margin-top:28px}.question-actions .next-btn,.question-actions #openSubmit{margin-left:auto}.secure-gate{position:fixed;inset:0;background:rgba(9,18,35,.93);backdrop-filter:blur(7px);z-index:100;display:grid;place-items:center}.gate-card{width:min(420px,calc(100% - 30px));background:white;border-radius:22px;padding:33px;text-align:center}.gate-card .brand-mark{margin:auto}.gate-card h2{color:var(--navy);font-size:24px}.gate-card p{color:var(--muted);font-size:13px;line-height:1.6}.modal-backdrop{position:fixed;inset:0;background:rgba(10,20,38,.52);z-index:90;display:none;place-items:center}.modal-backdrop.show{display:grid}.modal{width:min(450px,calc(100% - 30px));background:white;border-radius:20px;padding:26px;box-shadow:var(--shadow)}.modal h2{color:var(--navy);margin-top:0}.modal p{color:var(--muted);font-size:13px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:22px}.result-wrap{max-width:600px;margin:70px auto;text-align:center;background:white;border:1px solid var(--line);border-radius:24px;padding:40px;box-shadow:var(--shadow)}.result-icon{width:62px;height:62px;border-radius:50%;background:#eaf7ef;color:var(--green);display:grid;place-items:center;font-size:28px;font-weight:900;margin:0 auto 17px}.result-wrap h1{color:var(--navy);margin:7px}.result-wrap>p{color:var(--muted)}.score-display{display:flex;align-items:baseline;justify-content:center;gap:7px;margin:25px}.score-display strong{font-size:54px;color:var(--blue)}.score-display span{color:var(--muted)}.result-breakdown{border:1px solid var(--line);border-radius:13px;margin:20px 0;text-align:left}.result-breakdown>div{display:flex;justify-content:space-between;padding:10px 13px;border-bottom:1px solid var(--line);font-size:12px}.result-breakdown>div:last-child{border-bottom:0}
@media(max-width:1000px){.sidebar{display:none}.content{margin-left:0}.stat-grid{grid-template-columns:repeat(2,1fr)}.two-col,.settings-grid,.monitor-grid{grid-template-columns:1fr}.exam-cards{grid-template-columns:repeat(2,1fr)}.test-form{grid-template-columns:1fr 1fr}.test-form button{width:max-content}.login-wrap{grid-template-columns:1fr;padding:25px}.login-hero{display:none}.login-card{justify-self:center}.login-body{background:#f3f7fb}}@media(max-width:720px){.content{padding:20px}.topbar{padding:0 14px}.user-chip{display:none}.page-head{flex-direction:column}.stat-grid,.exam-cards{grid-template-columns:1fr}.form-grid.two,.form-grid.three{grid-template-columns:1fr}.exam-layout{display:block}.exam-nav{position:static;width:100%;height:auto}.monitor-status{margin-top:18px}.exam-main{margin-left:0}.questions-stage{padding:14px}.question-panel{padding:20px}.io-grid{grid-template-columns:1fr}.test-form{grid-template-columns:1fr}.review-head{grid-template-columns:auto 1fr}.score-box{grid-column:2}.login-card{padding:25px}.question-actions{flex-wrap:wrap}}

/* --- Exam layout hotfix: keep the fixed question navigator out of CSS Grid flow. --- */
.exam-layout{
  display:block;
  min-height:100vh;
  width:100%;
}
.exam-nav{
  position:fixed;
  width:245px;
  top:0;
  bottom:0;
  left:0;
}
.exam-main{
  margin-left:245px;
  width:calc(100% - 245px);
  min-width:0;
}
.questions-stage{
  width:100%;
  max-width:980px;
  margin:0 auto;
  padding:34px;
}
.question-panel{
  width:100%;
  min-width:0;
}

@media(max-width:720px){
  .exam-layout{display:block;width:100%;}
  .exam-nav{position:static;width:100%;height:auto;}
  .exam-main{margin-left:0;width:100%;}
  .questions-stage{width:100%;padding:14px;}
}

/* ===== Phase 1: integrity, grade portal, archive/delete ===== */
.student-topnav{display:flex;align-items:center;gap:8px}.student-topnav a{font-size:12px;font-weight:800;color:#526078;padding:8px 10px;border-radius:8px}.student-topnav a:hover{background:#f0f5f9;color:var(--blue)}
.head-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.head-actions form{margin:0}.inline-form{display:inline}.link-button{border:0;background:transparent;color:var(--blue);font:inherit;font-size:12px;font-weight:800;padding:0;cursor:pointer}.link-button:hover{text-decoration:underline}.danger-link{color:var(--red)}.btn-danger{background:#b42318;color:white;border-color:#b42318}.btn-danger:hover{background:#8f1d14}
.settings-card{max-width:980px}.toggle-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.toggle-row{display:flex!important;flex-direction:row!important;align-items:flex-start!important;gap:12px;padding:15px;border:1px solid var(--line);border-radius:13px;background:#fbfcfe;cursor:pointer}.toggle-row input{width:19px;height:19px;margin-top:2px;accent-color:var(--blue)}.toggle-row span{display:flex;flex-direction:column;gap:4px}.toggle-row strong{color:var(--navy);font-size:13px}.toggle-row small{color:var(--muted);font-size:11px;line-height:1.45}
.performance-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px;margin:18px 0 26px}.performance-card{background:white;border:1px solid var(--line);border-radius:18px;padding:20px;box-shadow:0 3px 16px rgba(19,34,69,.04)}.primary-performance{border-top:4px solid var(--blue)}.performance-main{display:flex;align-items:baseline;gap:10px;margin:14px 0}.performance-main strong{font-size:42px;color:var(--navy);letter-spacing:-.04em}.performance-main span{color:var(--muted);font-size:12px;font-weight:700}.performance-meta{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin:10px 0 12px}.performance-meta span{display:flex;flex-direction:column;background:#f7f9fb;border-radius:10px;padding:9px;color:var(--muted);font-size:10px}.performance-meta b{color:var(--navy);font-size:15px}.section-head-inline{display:flex;align-items:flex-end;justify-content:space-between;margin:26px 0 12px}.section-head-inline h2{margin:3px 0 0;color:var(--navy)}.section-head-inline a{font-size:12px;font-weight:800}.portal-section{margin-top:18px}.student-page-head{margin-bottom:0}
.trend-list{display:flex;flex-direction:column}.trend-row{display:grid;grid-template-columns:220px 1fr;gap:20px;padding:15px 0;border-bottom:1px solid var(--line)}.trend-row:last-child{border-bottom:0}.trend-label{display:flex;flex-direction:column}.trend-label strong{color:var(--navy);font-size:13px}.trend-label small{color:var(--muted);font-size:10px;margin-top:4px}.trend-bars{display:grid;gap:7px}.trend-bars>div{display:grid;grid-template-columns:72px 1fr 50px;align-items:center;gap:8px}.trend-bars span{font-size:9px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);font-weight:800}.trend-bars b{font-size:11px;color:var(--navy);text-align:right}.bar-track{height:8px;border-radius:999px;background:#edf1f5;overflow:hidden}.bar-track i{display:block;height:100%;background:var(--blue);border-radius:inherit}.class-bar .bar-track i{background:#8fa1b5}
.result-page{max-width:1050px;margin:0 auto}.result-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:28px}.result-hero h1{margin:5px 0;color:var(--navy)}.result-hero p{margin:0;color:var(--muted)}.result-score{text-align:right;display:flex;flex-direction:column}.result-score strong{font-size:46px;color:var(--blue);line-height:1}.result-score span{font-size:11px;color:var(--muted);margin-top:4px}.result-score b{display:inline-block;align-self:flex-end;margin-top:8px;background:#eaf4f9;color:var(--blue);padding:5px 8px;border-radius:8px}.result-pending{background:#eaf7ef;color:var(--green);padding:12px 16px;border-radius:12px;font-weight:800}.comparison-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}.comparison-grid>div{background:#f7f9fb;border:1px solid #edf0f3;border-radius:12px;padding:13px;display:flex;flex-direction:column}.comparison-grid span{font-size:9px;text-transform:uppercase;color:var(--muted);font-weight:800;letter-spacing:.05em}.comparison-grid strong{font-size:22px;color:var(--navy);margin-top:3px}.distribution{margin-top:20px;padding-top:15px;border-top:1px solid var(--line)}.distribution-bars{height:135px;display:flex;align-items:flex-end;gap:18px;padding:0 12px}.dist-col{flex:1;height:125px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;position:relative}.dist-col>span{font-size:10px;color:var(--muted)}.dist-col i{display:block;width:min(38px,80%);min-height:3px;background:var(--light);border-radius:7px 7px 0 0;margin:4px 0}.dist-col small{font-size:9px;color:var(--muted)}.dist-col b{position:absolute;bottom:-20px;font-size:9px;color:var(--blue)}.feedback-card{margin-top:18px;padding:22px}.feedback-card h2{color:var(--navy);margin:5px 0}.feedback-card p{white-space:pre-wrap;color:#344054;line-height:1.65}.result-breakdown.detailed{margin-bottom:0}.result-question-row{display:grid!important;grid-template-columns:1fr auto;gap:8px!important}.result-question-row>div{display:flex;flex-direction:column}.result-question-row small{font-size:9px;color:var(--muted)}.result-question-row p{grid-column:1/-1;margin:0;color:var(--muted);font-size:11px;white-space:pre-wrap}.result-actions{display:flex;gap:8px;justify-content:center;margin:22px 0 40px}.feedback-editor{margin-bottom:15px}.feedback-editor textarea,.feedback-field textarea{width:100%}.feedback-field{margin-top:13px}.timeline-list{max-height:430px;overflow:auto}
.integrity-toggle{border:1px solid #d5dae2;background:#f5f7fa;color:#667085;border-radius:999px;padding:5px 10px;font-size:10px;font-weight:900;cursor:pointer}.integrity-toggle.on{background:#eaf7ef;border-color:#b7e3c8;color:#16794b}.warning-backdrop{position:fixed;inset:0;background:rgba(10,20,38,.63);backdrop-filter:blur(5px);z-index:140;display:none;place-items:center;padding:18px}.warning-backdrop.show{display:grid}.warning-card{width:min(460px,100%);background:white;border-radius:22px;padding:30px;text-align:center;box-shadow:0 30px 90px rgba(0,0,0,.25);border-top:5px solid #d92d20}.warning-icon{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;background:#fee4e2;color:#b42318;font-size:30px;font-weight:900;margin:0 auto 14px}.warning-card h2{color:var(--navy);font-size:23px;margin:7px 0}.warning-card p{color:#475467;line-height:1.6}.warning-count{display:inline-block;background:#fff4ed;color:#b54708;border-radius:999px;padding:7px 12px;font-size:11px;font-weight:900;margin:6px 0 18px}.exam-actions{white-space:nowrap}

@media(max-width:900px){.toggle-grid{grid-template-columns:1fr}.comparison-grid{grid-template-columns:repeat(2,1fr)}.trend-row{grid-template-columns:1fr}.student-topnav{display:none}}
@media(max-width:600px){.performance-meta{grid-template-columns:1fr 1fr}.result-hero{align-items:flex-start;flex-direction:column}.result-score{text-align:left}.result-score b{align-self:flex-start}.comparison-grid{grid-template-columns:1fr 1fr}.trend-bars>div{grid-template-columns:65px 1fr 44px}.head-actions{width:100%}.head-actions .btn{flex:1;text-align:center}}

/* ===== Phase 1.1: central gradebook + Canvas roster import ===== */
.gradebook-head{align-items:flex-end}.gradebook-toolbar{margin-bottom:14px;padding:18px 20px}.grade-filter-form{display:grid;grid-template-columns:minmax(180px,260px) minmax(260px,1fr);gap:14px;align-items:end}.grade-filter-form label{display:flex;flex-direction:column;gap:6px;color:var(--muted);font-size:11px;font-weight:800}.grade-filter-form input,.grade-filter-form select{width:100%;border:1px solid #d7dee7;border-radius:10px;padding:10px 12px;background:white;color:var(--text)}.gradebook-note{margin-top:12px;font-size:11px;color:var(--muted);background:#f8fafc;border:1px solid #eef1f5;border-radius:10px;padding:10px 12px}.gradebook-card{padding:0;overflow:hidden}.gradebook-scroll{overflow:auto;max-width:100%;max-height:70vh}.gradebook-table{border-collapse:separate;border-spacing:0;min-width:1050px;width:max-content}.gradebook-table th,.gradebook-table td{border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:#fff;min-width:132px;padding:12px 13px;vertical-align:middle}.gradebook-table thead th{position:sticky;top:0;z-index:7;background:#f6f8fb;color:#344054;font-size:10px;text-transform:uppercase;letter-spacing:.04em}.gradebook-table .sticky-student{position:sticky;left:0;z-index:8;min-width:230px;max-width:230px}.gradebook-table thead .sticky-student{z-index:10;background:#edf3f7}.gradebook-table tbody .sticky-student{background:#fbfcfd}.gradebook-table tbody tr:hover td{background:#f8fbfd}.gradebook-table tbody tr:hover .sticky-student{background:#f2f8fb}.student-cell{display:flex;flex-direction:column;gap:2px}.student-cell strong{color:var(--navy);font-size:12px}.student-cell span,.student-cell small{font-size:10px;color:var(--muted)}.exam-grade-head a{display:block;color:var(--navy);font-size:11px;text-transform:none;letter-spacing:0;max-width:170px;white-space:normal}.exam-grade-head small{display:block;color:var(--muted);font-size:9px;text-transform:none;letter-spacing:0;margin-top:4px}.grade-cell{text-align:center}.grade-score{display:inline-flex;flex-direction:column;align-items:center;gap:2px;padding:7px 9px;border-radius:9px}.grade-score:hover{background:#eaf4f9}.grade-score strong{color:var(--navy);font-size:12px}.grade-score span{font-size:10px;color:var(--blue);font-weight:800}.grade-empty{color:#a6afba}.grade-summary{text-align:center;background:#fbfcfe!important}.grade-summary strong{display:block;color:var(--navy);font-size:13px}.grade-summary small{display:block;color:var(--muted);font-size:9px;margin-top:2px}.summary-head{background:#eef5f8!important}.canvas-import-grid{align-items:start}.import-card h2{margin-top:0;color:var(--navy)}.import-card h2:not(:first-child){margin-top:26px}.import-example{display:grid;grid-template-columns:1.4fr .7fr 1fr 1.4fr 1fr;border:1px solid var(--line);border-radius:10px;overflow:hidden;margin:14px 0 24px}.import-example span{padding:9px;background:#f7f9fb;border-right:1px solid var(--line);font-size:9px;color:#475467;font-weight:800;white-space:nowrap}.import-example span:last-child{border-right:0}.info-box{margin-top:18px;background:#edf7fb;border:1px solid #d6eaf3;border-radius:12px;padding:14px}.info-box strong{color:var(--navy);font-size:12px}.info-box p{margin:5px 0 0;color:#526274;font-size:11px;line-height:1.55}.import-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:15px 0}.import-stats>div{background:#f7f9fb;border-radius:11px;padding:13px;display:flex;flex-direction:column}.import-stats strong{font-size:24px;color:var(--navy)}.import-stats span{font-size:9px;color:var(--muted);text-transform:uppercase;font-weight:800}.credential-head{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin-top:22px}.credential-head h3{margin:0;color:var(--navy)}.credential-head p{margin:4px 0 0}.credential-table{margin-top:10px;max-height:360px}.credential-table code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;background:#f3f6f8;padding:4px 6px;border-radius:6px;font-size:11px}.tall-empty{min-height:360px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}.tall-empty strong{color:var(--navy)}.tall-empty span{color:var(--muted);font-size:11px}.student-grade-table td{vertical-align:middle}
@media(max-width:900px){.grade-filter-form{grid-template-columns:1fr}.import-stats{grid-template-columns:1fr 1fr}.credential-head{align-items:flex-start;flex-direction:column}.import-example{overflow-x:auto}}

/* Temporary-password / first-login flow */
.password-change-wrap{max-width:620px;margin:46px auto;padding:0 20px}.password-change-card{padding:28px}.password-change-card h1{margin:6px 0 10px;color:var(--navy)}.password-change-card small{display:block;margin-top:5px;color:var(--muted)}.pill-warning{background:#fff4df!important;color:#8a5a00!important;border-color:#f5d596!important}.check-row{display:flex!important;flex-direction:row!important;align-items:flex-start!important;gap:9px}.check-row input{width:auto!important;margin-top:3px}.check-row span{line-height:1.45}
