
:root{
  --primary:#0b5ed7;
  --primary-dark:#123b78;
  --navy:#10233f;
  --text:#182b49;
  --muted:#6b778c;
  --bg:#f3f6fa;
  --surface:#ffffff;
  --surface-2:#f7f9fc;
  --border:#e2e8f0;
  --success:#198754;
  --success-dark:#146c43;
  --danger:#c92a2a;
  --warning:#b7791f;
  --shadow:0 8px 28px rgba(16,35,63,.08);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:Inter,Segoe UI,Arial,Helvetica,sans-serif;
  font-size:14px;
  line-height:1.45;
  background:var(--bg);
  color:var(--text);
}
button,input{
  font:inherit;
}
button{
  border:0;
  border-radius:9px;
  background:var(--primary);
  color:#fff;
  font-weight:700;
  padding:10px 14px;
  cursor:pointer;
  transition:.15s ease;
}
button:hover{filter:brightness(.97)}
button:disabled{opacity:.55;cursor:not-allowed}
.btn-light{background:#edf2f7;color:var(--text)}
.btn-secondary{background:#667085}
.btn-danger{background:var(--danger)}
.btn-full{width:100%;margin-top:18px}

.site-header{
  height:54px;
  background:linear-gradient(135deg,var(--primary),var(--primary-dark));
  color:#fff;
  display:flex;
  align-items:center;
}
.site-header-inner{
  width:min(1180px,94%);
  margin:0 auto;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
}
.brand{
  font-size:16px;
  font-weight:900;
  letter-spacing:.25px;
}
.network{font-size:11px;opacity:.9}

.school-bar{
  position:sticky;
  top:0;
  z-index:200;
  background:rgba(255,255,255,.97);
  backdrop-filter:blur(8px);
  border-bottom:1px solid var(--border);
  box-shadow:0 2px 12px rgba(16,35,63,.06);
}
.school-bar-inner{
  width:min(1180px,94%);
  margin:0 auto;
  min-height:52px;
  padding:7px 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.school-main{
  min-width:0;
}
.school-name{
  margin:0;
  font-size:15px;
  line-height:1.25;
  font-weight:900;
  text-transform:uppercase;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  color:var(--primary-dark);
}
.school-ref{
  margin-top:2px;
  color:var(--muted);
  font-size:10px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.school-extra{
  text-align:right;
  color:var(--muted);
  font-size:10px;
  line-height:1.35;
}

.container{
  width:min(1180px,94%);
  margin:22px auto;
}
.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:15px;
  box-shadow:var(--shadow);
  padding:22px;
}
.narrow{
  width:min(520px,100%);
  margin:42px auto;
}
.center{text-align:center}
.intro{
  color:var(--muted);
  line-height:1.55;
  font-size:13px;
}
.icon{
  width:58px;height:58px;
  border-radius:15px;
  margin:0 auto 15px;
  background:#eaf2ff;
  color:var(--primary);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  font-size:19px;
}
h1{font-size:22px;line-height:1.25;margin:0 0 8px}
h2{font-size:18px;line-height:1.3;margin:0 0 5px}
h3{font-size:15px;line-height:1.3;margin:0 0 8px}

label{display:block;font-weight:700;font-size:13px;margin:16px 0 7px}
input{
  width:100%;
  border:1px solid var(--border);
  border-radius:9px;
  padding:11px 12px;
  background:#fff;
  color:var(--text);
  outline:none;
}
input:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(11,94,215,.09);
}

.status{
  display:none;
  margin-top:16px;
  padding:11px 12px;
  border-radius:9px;
  font-size:12px;
  line-height:1.5;
}
.status.show{display:block}
.info{background:#eaf3ff;color:#084298}
.success{background:#e9f7ef;color:#146c43}
.error{background:#fdecec;color:#b02a37}
.warning{background:#fff4e5;color:#8a4b08}

.progress{
  height:8px;
  background:#e9edf3;
  border-radius:999px;
  overflow:hidden;
  margin-top:14px;
  display:none;
}
.bar{
  height:100%;
  width:0;
  background:var(--primary);
  transition:width .2s ease;
}
.stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:9px;
  margin-top:15px;
}
.stat{
  background:var(--surface-2);
  border:1px solid var(--border);
  border-radius:10px;
  padding:12px 10px;
  text-align:center;
}
.stat b{
  display:block;
  font-size:20px;
  color:var(--primary);
  line-height:1;
  margin-bottom:4px;
}
.stat span{font-size:10px;color:var(--muted)}

.school-welcome{
  border:1px solid #d9e6f7;
  background:linear-gradient(135deg,#f5f9ff,#fbfdff);
  border-radius:13px;
  padding:15px 16px;
  margin-bottom:16px;
}
.school-welcome h2{
  color:var(--primary-dark);
  margin-bottom:4px;
}
.school-welcome p{
  margin:0;
  color:var(--muted);
  font-size:12px;
}

.student-layout{
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:15px;
}
.profile{
  width:58px;
  height:58px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid #e6edf5;
  background:#f0f3f7;
}
.student-meta{
  color:var(--muted);
  font-size:12px;
}
.summary{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:9px;
  margin:17px 0;
}
.summary-box{
  background:var(--surface-2);
  border:1px solid var(--border);
  border-radius:10px;
  padding:10px;
}
.summary-box span{
  display:block;
  color:var(--muted);
  font-size:9px;
  text-transform:uppercase;
  font-weight:800;
  letter-spacing:.35px;
  margin-bottom:5px;
}
.summary-box b{
  display:block;
  font-size:13px;
  word-break:break-word;
}

.top-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-bottom:15px;
}
.subject-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-top:14px;
}
.subject-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
  padding:15px;
}
.subject-card:hover{
  box-shadow:0 6px 18px rgba(16,35,63,.08);
  border-color:#d4dfed;
}
.subject-card p{
  margin:4px 0;
  color:var(--muted);
  font-size:11px;
}
.subject-card button{
  width:100%;
  margin-top:11px;
  padding:9px 11px;
  font-size:12px;
}
.empty{
  padding:25px 18px;
  border:1px dashed var(--border);
  border-radius:11px;
  text-align:center;
  color:var(--muted);
  font-size:13px;
}

.exam-page{
  padding-top:82px;
}
.exam-top-nav{
  position:fixed;
  left:0;
  right:0;
  top:0;
  z-index:500;
  height:68px;
  background:rgba(255,255,255,.98);
  border-bottom:1px solid var(--border);
  box-shadow:0 4px 18px rgba(16,35,63,.12);
}
.exam-top-nav-inner{
  width:min(1180px,94%);
  height:100%;
  margin:0 auto;
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:14px;
}
.exam-school-name{
  font-size:14px;
  font-weight:900;
  color:var(--primary-dark);
  text-transform:uppercase;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.exam-school-ref{
  color:var(--muted);
  font-size:9px;
  margin-top:1px;
}
.exam-controls{
  display:flex;
  align-items:center;
  gap:7px;
}
.exam-controls .timer{
  min-width:112px;
  padding:9px 10px;
  border-radius:9px;
  background:var(--navy);
  color:#fff;
  font-size:17px;
  line-height:1;
  text-align:center;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}
.exam-controls .timer.warning{background:#bd7a12}
.exam-controls .timer.danger{background:#b42318}
.exam-submit-top{
  min-width:88px;
  padding:9px 12px;
  font-size:12px;
}

.question-card{
  margin-top:16px;
  border:1px solid var(--border);
  border-radius:12px;
  padding:17px;
  background:#fff;
}
.question-number{
  font-size:11px;
  color:var(--muted);
  font-weight:800;
  margin-bottom:9px;
}
.question-text{
  font-size:15px;
  line-height:1.55;
  margin-bottom:15px;
  white-space:pre-wrap;
}
.options{
  display:grid;
  gap:8px;
}
.option{
  display:flex;
  align-items:flex-start;
  gap:9px;
  padding:10px 11px;
  border:1px solid var(--border);
  border-radius:9px;
  cursor:pointer;
  font-size:13px;
  line-height:1.45;
}
.option.selected{
  background:#edf5ff;
  border-color:#8db9ee;
}
.option input{
  width:auto;
  margin-top:2px;
}
.exam-nav{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:12px;
}
.exam-nav .group{
  display:flex;
  gap:8px;
}
.exam-nav button{
  padding:9px 12px;
  font-size:12px;
}
.question-grid-title{
  margin-top:14px;
  margin-bottom:7px;
  color:var(--muted);
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.35px;
}
.question-grid{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.qbtn{
  width:36px;
  height:36px;
  padding:0;
  background:#edf2f7;
  color:var(--text);
  font-size:11px;
}
.qbtn.answered{
  background:#198754 !important;
  border-color:#157347 !important;
  color:#fff !important;
}
.qbtn.current{
  box-shadow:0 0 0 2px rgba(11,94,215,.2);
}
.qbtn.current.answered{
  background:#146c43 !important;
}
.exam-warning{
  margin-top:13px;
  padding:9px 11px;
  border-radius:9px;
  background:#fff4e5;
  border:1px solid #f6d7a1;
  color:#8a4b08;
  text-align:center;
  font-size:10px;
  line-height:1.45;
}

.footer{
  height:25px;
  text-align:center;
  color:var(--muted);
  font-size:10px;
  padding:4px;
}

.hide-platform{
  display:none !important;
}

@media(max-width:900px){
  .summary{grid-template-columns:repeat(3,1fr)}
  .subject-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:650px){
  body{font-size:13px}
  .site-header{height:50px}
  .brand{font-size:14px}
  .school-bar-inner{min-height:48px}
  .school-name{font-size:13px}
  .school-extra{display:none}
  .summary{grid-template-columns:repeat(2,1fr)}
  .subject-grid{grid-template-columns:1fr}
  .card{padding:17px}
  .container{width:94%;margin:15px auto}
  .exam-top-nav{height:61px}
  .exam-top-nav-inner{grid-template-columns:1fr auto;gap:8px}
  .exam-school-name{font-size:11px}
  .exam-school-ref{font-size:8px}
  .exam-controls{gap:4px}
  .exam-controls .timer{min-width:92px;font-size:14px;padding:8px 7px}
  .exam-submit-top{min-width:70px;padding:8px 7px;font-size:10px}
  .exam-page{padding-top:72px}
  .question-text{font-size:14px}
}
