/* ============================================================
   Academic Report card (A4 portrait) — online result + print
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

.rep-page{background:#8ea9c9;padding:20px 10px 50px}
.rep{width:210mm;min-height:297mm;margin:0 auto;background:#fff;color:#111;padding:10mm 9mm;
  font-family:'Poppins',sans-serif;position:relative;box-shadow:0 14px 44px -20px rgba(0,0,0,.6);overflow:hidden}
.rep-wm{position:absolute;inset:0;display:grid;place-items:center;opacity:.06;pointer-events:none;z-index:0}
.rep-wm img{width:150mm}
.rep-wm .t{font-size:40px;font-weight:800;text-align:center;line-height:1.2;color:#1d4f9c}
.rep > *{position:relative;z-index:1}

.rep-head{display:grid;grid-template-columns:32mm 1fr 30mm;gap:5mm;align-items:start}
.rep-head .logo{width:32mm;height:32mm;object-fit:contain}
.rep-head .logo-fb{width:30mm;height:30mm;border-radius:50%;border:3px solid #1d4f9c;display:grid;place-items:center;
  font-weight:800;color:#1d4f9c;font-size:16px;text-align:center;line-height:1.1;padding:4px}
.rep-title{text-align:center}
.rep-title h1{margin:0;font-size:30px;font-weight:800;letter-spacing:.01em;line-height:1.1}
.rep-title p{margin:1.6mm 0 0;font-size:12.5px}
.rep-title a{color:#1155cc}
.rep-title .ar{margin-top:2.5mm;font-size:16px}
.rep-title .ar b{font-weight:700}
.rep-photo{width:30mm;height:36mm;border:1px solid #9fb4cf;background:#dff0fb;overflow:hidden;display:grid;place-items:center;
  font-size:8px;color:#6c86a5;font-weight:700}
.rep-photo img{width:100%;height:100%;object-fit:cover;object-position:top center}

.rep-meta{display:grid;grid-template-columns:1.25fr 1fr;gap:2mm 8mm;margin:7mm 0 6mm;font-size:13px}
.rep-meta .row{display:flex;gap:2mm}
.rep-meta .row .k{width:34mm;flex:0 0 auto;color:#111}
.rep-meta .row .c{width:3mm}
.rep-meta .row .val{font-weight:700}

.rep table{width:100%;border-collapse:collapse;font-size:12.5px}
.rep table th,.rep table td{border:1px solid #222;padding:1.6mm 2mm;text-align:center}
.rep table th{background:#dbe6f5;font-weight:700}
.rep .sub-td{text-align:left;font-weight:500}
.rep .subject-h{font-size:18px;font-weight:800;text-align:left}
.rep tbody tr:nth-child(even) td{background:#eee}
.rep .strip td{background:#fbd7c0 !important;font-weight:700}
.rep .strip td.v{background:#fff !important;font-weight:600}

.rep-sec{margin-top:8mm}
.rep-cos th.left,.rep-cos td.left{text-align:left}
.rep-cos thead th{background:#fff;font-weight:700}

.rep-banner{background:#111;color:#fff;text-align:center;font-size:20px;font-weight:700;padding:2.6mm;margin:9mm 0 6mm}
.rep-signs{display:flex;justify-content:space-between;font-style:italic;font-weight:700;font-size:12.5px;
  border-bottom:1.2px solid #111;padding-bottom:2mm}
.rep-inst{text-align:center;font-weight:700;font-size:12px;margin:2mm 0 4mm}
.rep-scale p{font-size:11.5px;margin:0 0 2mm}
.rep-scale table th:first-child,.rep-scale table td:first-child{background:#f3f5f8;font-weight:700}
.rep-note{margin-top:5mm;font-size:11px;color:#555;text-align:center}

/* result search UI */
.res-hero{background:linear-gradient(135deg,#12356b,#1d4f9c 55%,#2b7fd4);color:#fff;padding:34px 6vw 72px}
.res-hero h1{margin:0;font-size:30px;font-weight:800}
.res-hero p{margin:6px 0 0;opacity:.9;font-size:14px}
.res-card{max-width:960px;margin:-46px auto 0;background:#fff;border-radius:16px;padding:22px;
  box-shadow:0 20px 50px -28px rgba(10,30,60,.6)}
.res-card form{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;align-items:end}
.res-card .field label{font-size:12px;font-weight:700;color:#405167;display:block;margin-bottom:5px}
.res-card select,.res-card input{width:100%;padding:11px 12px;border:1px solid #cfd8e3;border-radius:10px;font:inherit;background:#fff}
.res-btn{background:#1d4f9c;color:#fff;border:0;border-radius:10px;padding:12px 18px;font-weight:700;cursor:pointer}
.res-btn:hover{background:#163d79}
.res-alert{max-width:960px;margin:16px auto 0;background:#fdecea;color:#912018;border:1px solid #f3c0ba;
  padding:12px 16px;border-radius:10px;font-weight:600}
.res-actions{max-width:960px;margin:22px auto 0;display:flex;gap:10px;justify-content:flex-end}

@media (max-width:800px){
  .res-card form{grid-template-columns:1fr 1fr}
  .rep{width:100%;padding:16px}
  .rep-head{grid-template-columns:22mm 1fr 24mm}
  .rep-title h1{font-size:20px}
  .rep-meta{grid-template-columns:1fr}
}
@media print{
  body{background:#fff !important}
  .no-print{display:none !important}
  .rep-page{background:#fff;padding:0}
  .rep{box-shadow:none;margin:0;width:auto;min-height:auto}
  @page{size:A4 portrait;margin:8mm}
}
