.egm{padding-bottom:40px}
.egh{font-size:30px;margin:10px 0 4px}
.eglead{color:var(--mute);margin:0 0 14px}
.egc{background:#fff;border:1px solid #e3e6f4;border-radius:18px;padding:14px 16px;margin:12px 0;box-shadow:0 2px 10px rgba(55,48,163,.06)}
.egc h2{font-size:19px;margin:0 0 8px}
.egc h3{font-size:16px;margin:12px 0 6px}
.eghint{color:var(--mute);font-size:14px;margin:4px 0 8px}
.egrow{margin:10px 0 0}
.egseg{display:flex;flex-wrap:wrap;gap:8px}
.egseg label{flex:1;min-width:210px}
.egseg input{position:absolute;opacity:0}
.egseg span{display:block;text-align:center;padding:12px;border-radius:14px;border:2px solid #c7d2fe;background:#f5f6ff;font-weight:700;cursor:pointer}
.egseg input:checked+span{background:#3730a3;color:#fff;border-color:#3730a3}
.egseg input:focus-visible+span{outline:3px solid #f59e0b}
.egchk{display:grid;gap:6px;grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}
.egchk label{display:flex;gap:8px;align-items:center;padding:8px 10px;border:1px solid #e3e6f4;border-radius:12px;background:#fafbff;cursor:pointer;font-size:15px}
.egchk input{width:20px;height:20px;flex:none}
.egchk .cnt{margin-inline-start:auto;color:var(--mute);font-size:13px}
.egf{display:inline-flex;flex-direction:column;gap:4px;margin:6px 12px 6px 0;font-size:14px;font-weight:600}
.egf.wide{display:flex}
.egf input[type=text],.egf input[type=number],.egf select,.egf textarea,.egf input[type=file]{font:inherit;font-weight:400;padding:9px 10px;border:1px solid #c7d2fe;border-radius:10px;background:#fff;max-width:100%;box-sizing:border-box}
.egf input[type=number]{width:110px}
.egb{font:inherit;font-weight:800;font-size:17px;padding:12px 22px;border:0;border-radius:14px;background:linear-gradient(120deg,#3730a3,#5b21b6);color:#fff;cursor:pointer;box-shadow:0 4px 14px rgba(55,48,163,.28)}
.egb2{font:inherit;font-weight:700;padding:8px 14px;border:1px solid #c7d2fe;border-radius:12px;background:#eef0ff;color:#312e81;cursor:pointer}
.egb:focus-visible,.egb2:focus-visible{outline:3px solid #f59e0b}
.eglist{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.eglist li{display:flex;align-items:center;gap:10px;border:1px solid #e3e6f4;border-radius:14px;padding:8px;background:#fafbff}
.eglist .th{flex:none;width:120px;height:70px;object-fit:cover;object-position:top;border:1px solid #ddd;border-radius:8px;background:#fff}
.eglist .tx{flex:1;min-width:0;font-size:14px}
.eglist .tx b{display:block;font-size:15px}
.eglist .ab{display:flex;gap:4px;flex-wrap:wrap}
.eglist .ab button{font:inherit;border:1px solid #c7d2fe;background:#fff;border-radius:10px;min-width:38px;min-height:38px;cursor:pointer}
.egsp{border-top:1px dashed #c7d2fe;margin-top:10px;padding-top:4px}
.egwarn{color:#b45309;font-weight:600}
/* printable sheet */
.sheet{display:none}
@media print{
 @page{size:A4;margin:12mm}
 body.eg{background:#fff}
 .noprint,.skip{display:none!important}
 .sheet{display:block!important;width:186mm;direction:rtl;font-family:Rubik,Arial,sans-serif;color:#000}
 .sheet .hd{border-bottom:2px solid #000;padding-bottom:6px;margin-bottom:10px}
 .sheet .hd .top1{display:flex;align-items:center;gap:12px}
 .sheet .hd img.logo{max-height:22mm;max-width:40mm;object-fit:contain}
 .sheet .hd .sch{font-size:15pt;font-weight:600}
 .sheet .hd h1{font-size:22pt;margin:2px 0}
 .sheet .fields{display:flex;gap:18px;flex-wrap:wrap;margin-top:8px;font-size:12pt}
 .sheet .fields span{flex:1;min-width:40mm;border-bottom:1px solid #000;padding-bottom:1px;white-space:nowrap}
 .sheet .fields span.nm{flex:2.2}
 .sheet .inst{margin:8px 0;font-size:11.5pt;white-space:pre-wrap}
 .sheet .qb{break-inside:avoid;margin:0 0 8mm}
 .sheet .qb img{width:100%;height:auto;max-height:226mm;object-fit:contain;object-position:right top;display:block}
 .sheet .qb .src{font-size:9pt;color:#444;margin-top:2px}
 .sheet .sp{break-before:page;break-after:page;height:268mm;box-sizing:border-box}
 .sheet .sp.grid{background-image:linear-gradient(#9aa7c7 .3mm,transparent .3mm),linear-gradient(90deg,#9aa7c7 .3mm,transparent .3mm);background-size:5mm 5mm;background-position:0 0}
 .sheet .sp.blank{background:#fff}
 .sheet .sp+.sp{break-before:auto}
 .sheet .sp:last-child{break-after:auto}
}
@media(max-width:600px){.eglist li{display:grid;grid-template-columns:85px minmax(0,1fr);align-items:start}.eglist .th{width:85px;height:65px}.eglist .ab{grid-column:1/-1;justify-content:flex-end}.eglist .tx{line-height:1.5}.egchk{grid-template-columns:repeat(auto-fill,minmax(min(230px,100%),1fr))}}
@media print{.sheet .sp.grid{-webkit-print-color-adjust:exact;print-color-adjust:exact}.sheet .hd h1,.sheet .sch{overflow-wrap:anywhere}}
@media print{.sheet .hd .top1{position:relative;display:block;min-height:24mm;text-align:center;padding-inline:42mm}.sheet .hd img.logo{position:absolute;inset-inline-start:0;top:0;max-width:38mm}.sheet .hd .top1>div{text-align:center}.sheet .hd h1{font-size:20pt}.sheet .hd .sch{font-size:13pt}}
@media print{.sheet .hd img.logo{inset-inline-start:auto;left:0;right:auto}}
@media print{.sheet .hd{position:relative}.sheet .exam-bsd{position:absolute;right:0;top:0;font-size:11pt;line-height:1.2}}
.eggridopt{display:flex;align-items:center;gap:8px;padding:10px 0}.eggridopt input{width:20px;height:20px;flex:none}
@media print{.sheet .qp{height:270mm;display:flex;flex-direction:column;break-after:page;break-inside:avoid}.sheet .qp:last-child{break-after:auto}.sheet .qp .qb{margin-bottom:3mm;flex:none}.sheet .qp .qb img{max-height:244mm}.sheet .qp.first-qp .qb img{max-height:208mm}.sheet .qp .hd,.sheet .qp .inst{flex:none}.sheet .grid-rest{flex:1;min-height:8mm;background-image:linear-gradient(#9aa7c7 .2mm,transparent .2mm),linear-gradient(90deg,#9aa7c7 .2mm,transparent .2mm);background-size:5mm 5mm;-webkit-print-color-adjust:exact;print-color-adjust:exact}.sheet .qp+.sp{break-before:auto}}
@media print{.sheet .fields{justify-content:flex-end;direction:ltr}.sheet .fields span.nm{flex:none;width:85mm;min-width:0;direction:rtl;text-align:right}}
@media print{.sheet .fields{justify-content:flex-start}}
@media print{.sheet .fields span.nm{text-align:left}}
.eg [hidden]{display:none!important}
