:root{
  --bg:#f3f5f7;--card:#fff;--text:#18212b;--muted:#66717e;--line:#dfe4e8;
  --primary:#1c4f7a;--primary2:#123d60;--danger:#a52a2a;--success:#176b45;--info:#2d5f8f;
}
*{box-sizing:border-box}
body{margin:0;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--text)}
a{color:var(--primary)}
.card{background:var(--card);max-width:760px;margin:28px auto;padding:28px;border-radius:16px;box-shadow:0 8px 30px rgba(0,0,0,.08)}
.narrow{max-width:520px}
.student-card{max-width:680px}
.brand{font-weight:800;letter-spacing:.18em;color:var(--primary);font-size:1.05rem}
h1{margin:.35rem 0 1rem}
h2{font-size:1.1rem}
.lead{font-size:1.05rem;line-height:1.5}
label{display:block;font-weight:650;font-size:.94rem}
input{width:100%;padding:12px;margin-top:6px;border:1px solid var(--line);border-radius:9px;font:inherit;background:#fff}
button,.button{display:inline-block;border:0;border-radius:9px;background:var(--primary);color:white;padding:12px 18px;font-weight:700;text-decoration:none;cursor:pointer}
button:hover,.button:hover{background:var(--primary2)}
button:disabled{opacity:.6;cursor:default}
.secondary{background:#e9eef2!important;color:#263442!important}
.upload-box{display:flex;align-items:center;justify-content:center;min-height:125px;border:2px dashed #9aabb8;border-radius:12px;background:#f8fafb;cursor:pointer;font-size:1.05rem;color:var(--primary);margin:20px 0}
.upload-box input{display:none}
.preview{width:100%;max-height:520px;object-fit:contain;border-radius:10px;border:1px solid var(--line);background:#eee}
.hidden{display:none!important}
.notice,.error,.success{padding:13px 15px;border-radius:9px;margin:14px 0;line-height:1.45}
.notice.error,.error{background:#fbeaea;color:#792222}
.notice.success,.success{background:#e7f4ed;color:#145638}
.notice.info{background:#eaf1f8;color:#234d73}
.progress{height:10px;background:#e7ebee;border-radius:999px;overflow:hidden;margin-top:18px}
.progress>div{height:100%;width:0;background:var(--primary);transition:width .2s}
#progressText{font-size:.92rem;color:var(--muted)}
.result-card{margin-top:18px;padding-top:10px;border-top:1px solid var(--line)}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.result-card button{margin-top:16px;margin-right:8px}
.muted,.privacy{color:var(--muted);font-size:.9rem;line-height:1.45}
.privacy{margin-top:24px}
.admin-link{text-align:center;margin-top:24px}
.topbar{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:14px 22px;background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0}
.wide{max-width:1400px;margin:22px auto;padding:0 18px}
.toolbar{display:flex;justify-content:space-between;gap:16px;align-items:flex-end;flex-wrap:wrap}
.filters{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap}
.filters>input{width:260px}
.filters label{font-size:.82rem}
.filters label input{width:160px}
.table-wrap{overflow:auto;background:#fff;border-radius:12px;border:1px solid var(--line)}
table{border-collapse:collapse;width:100%;min-width:860px}
th,td{text-align:left;padding:11px 12px;border-bottom:1px solid var(--line);white-space:nowrap}
th{background:#f7f9fa}
@media(max-width:650px){
  .card{margin:0;min-height:100vh;border-radius:0;padding:20px}
  .grid{grid-template-columns:1fr}
  .topbar{align-items:flex-start;flex-direction:column}
}
