/* ============================================================
   تصميم كتيّب شهادة الدرجات (A3 مطوي) — مصدر واحد للحقيقة.
   مشترك بين report_cards.html (الإصدار) و report_card_view.html (ولي الأمر/الإيميل).
   ملاحظة: قواعد #printRoot ومعاينة .sheet على الشاشة خاصة بكل صفحة وتبقى محلية.
   ============================================================ */
.sheet{width:420mm;height:297mm;background:#fff;display:flex}
.pnl{width:210mm;height:297mm;padding:12mm 11mm;display:flex;flex-direction:column}
.pnl.fold{border-left:1px dashed #cbd5e1}
.hdr{display:flex;align-items:center;justify-content:space-between;gap:8mm;border-bottom:2px solid #1a3a8f;padding-bottom:4mm}
.hdr .mid{align-self:center;padding-top:4mm}
.hdr .logo{width:22mm;height:22mm;object-fit:contain}
.hdr .logo-ph{width:22mm;height:22mm;background:#f1f5f9;border-radius:4px;display:flex;align-items:center;justify-content:center;font-size:7pt;color:#94a3b8;text-align:center}
.hdr .mid{flex:1;text-align:center}
.hdr .mid h1{font-size:12pt;color:#1a3a8f;font-weight:800;line-height:1.35}
.hdr .mid h1 .sl+.sl{font-size:.82em;color:#334155}
.hdr .mid .ar{font-size:9pt;color:#475569;line-height:1.35}
.hdr .mid .ar .sl+.sl{font-size:.9em}
.hdr .mid .en{font-size:7.5pt;color:#64748b;direction:ltr}
.hdr4{display:flex;align-items:center;justify-content:space-between;gap:6mm;border-bottom:2px solid #1a3a8f;padding-bottom:3mm}
.harab{flex:1;text-align:right;direction:rtl;font-size:7.2pt;color:#1a3a8f;font-weight:700;line-height:1.5}
.heng{flex:1;text-align:left;direction:ltr;font-size:6.6pt;color:#334155;font-weight:600;line-height:1.5}
.harab .b{font-weight:800;font-size:8.2pt}
.heng .b{font-weight:800;font-size:7.4pt;color:#1a3a8f}
.sl{white-space:nowrap}
.hlogo-c{width:27mm;height:27mm;object-fit:contain;flex-shrink:0}
.pglogo{display:block;height:20mm;object-fit:contain;margin:0 auto 3mm}
.doctitle{text-align:center;margin:6mm 0 4mm}
.doctitle .big{font-size:16pt;font-weight:800;color:#1a3a8f}
.doctitle .sub{font-size:10pt;color:#475569;margin-top:1mm}
table{width:100%;border-collapse:collapse;font-size:8.5pt}
th,td{border:1px solid #cbd5e1;padding:1.6mm 2mm;text-align:center}
thead th{background:#1a3a8f;color:#fff;font-weight:700;font-size:8pt}
.bio td{text-align:right;padding:1.3mm 3mm;font-size:8.5pt}
.bio .lbl{background:#f1f5f9;font-weight:700;color:#1a3a8f;width:42%}
.bio .lbl .en{display:block;font-size:7pt;color:#64748b;font-weight:400;direction:ltr}
.subj td.s{text-align:center;font-weight:600}
.subj td.s2{text-align:center;font-weight:600}
.subj th{font-size:7.5pt;line-height:1.2}
.subj th .ar{display:block;font-size:6.5pt;color:#cbd5e1;font-weight:400}
tr.total td{background:#eef2ff;font-weight:800}
tr.gpa td{background:#1a3a8f;color:#fff;font-weight:800;font-size:11pt}
.attest-wrap{margin-top:auto}
.attest{width:100%;border-collapse:collapse;font-size:8pt;margin-top:5mm;table-layout:fixed}
.attest td{border:1px solid #1a3a8f;width:25%}
.attest .sigarea{height:16mm;text-align:center;vertical-align:middle;padding:1mm}
.attest .siglbl{text-align:center;background:#f1f5f9;font-weight:800;color:#1a3a8f;padding:2mm 1mm;vertical-align:middle}
.attest .siglbl .en{display:block;font-size:6.2pt;color:#64748b;font-weight:400;direction:ltr}
.attest .stamp{color:#aeb6c2;font-weight:700;vertical-align:middle;font-size:8.5pt}
.accredit{display:flex;align-items:center;justify-content:space-between;gap:6mm;margin-top:3mm;padding:0 8mm}
.accredit img{height:13mm;object-fit:contain}
.acc-logo{height:13mm;object-fit:contain}
.ftr{margin-top:3mm;text-align:center;font-size:6.5pt;color:#94a3b8;border-top:1px solid #e2e8f0;padding-top:2mm;direction:ltr}
.official{flex:1;border:1.5px solid #94a3b8;border-radius:4px;margin:8mm 0;padding:4mm;font-size:8pt;color:#64748b}
.notes-box{border:1px solid #cbd5e1;border-radius:4px;min-height:34mm;padding:3mm;margin-top:2mm;background:#fcfcfd;font-size:9pt}
.section-h{font-size:10pt;font-weight:800;color:#1a3a8f;margin:5mm 0 2mm;text-align:left;direction:ltr}
.qr-row{display:flex;gap:4mm;align-items:center;margin-top:3mm}
.qr{width:26mm;height:26mm;border:1px solid #1a3a8f;border-radius:4px;display:flex;align-items:center;justify-content:center;font-size:7pt;color:#94a3b8;text-align:center}
.qr-row .t{font-size:7.5pt;color:#475569}

@media print{
  .sheet{page-break-after:always}
  @page{size:A3 landscape;margin:0}
}
