/* الورقة الرسمية A4 بالهوية المعتمدة */
:root{--doc:"Sakkal Majalla","Noto Naskh Arabic","Traditional Arabic",serif;--ui:"Readex Pro","Segoe UI",Tahoma,sans-serif}

/* ورقة A4 بالهوية المعتمدة: ترويسة، إطار تركوازي، لسان المجال على الحافة، ختم دائري */
.sheet{width:210mm;height:297mm;box-sizing:border-box;background:#fff;color:#111B20;font-family:var(--doc);position:relative;padding:11mm 14mm 8mm 18mm;display:flex;flex-direction:column;gap:3.4mm;font-size:15.5px;line-height:1.62;overflow:hidden;direction:rtl;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.sheet .edge{position:absolute;left:0;top:0;width:2.6mm;height:100%;background:#E3ECED}
.sheet .tab{position:absolute;left:0;top:68mm;width:4.8mm;height:42mm;background:#15445A;display:flex;align-items:center;justify-content:center}
.sheet .tab span{color:#fff;font-family:var(--ui);font-size:11.5px;writing-mode:vertical-rl;white-space:nowrap}
.lh{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;border-bottom:2px solid #0DA9A6;padding-bottom:2.4mm;line-height:1.55;gap:4mm}
.lh .r,.lh .l{font-size:13.5px;font-weight:700;color:#15445A}
.lh .l{text-align:left}
.lh img{height:16mm;width:auto}
.tt{display:flex;align-items:center;gap:3.5mm}
.tt .b{background:#15445A;color:#fff;font-family:var(--ui);font-size:19px;padding:1mm 5mm;font-weight:500;white-space:nowrap}
.tt i{flex:1;height:2px;background:#15445A}
.tt .d{font-size:15px;white-space:nowrap}
.sheet .body{flex:1;min-height:0;display:flex;flex-direction:column;gap:2.6mm;overflow:hidden}
.sheet p{margin:0;text-align:justify}
.sheet h3{margin:1mm 0 0;font-family:var(--ui);font-size:15.5px;color:#15445A;font-weight:600}
.sheet ol,.sheet ul{margin:0;padding-inline-start:7mm}
.sheet table{width:100%;border-collapse:collapse;font-size:14px;line-height:1.42}
.sheet th{background:#15445A;color:#fff;font-weight:700;text-align:right;padding:1.1mm 2mm;border:1px solid #15445A}
.sheet td{padding:1mm 2mm;border:1px solid #C9D9DB;vertical-align:top}
.sheet tr:nth-child(even) td{background:#F4F7F7}
.sheet tr.tot td{background:#E6F4F3;font-weight:700}
.sheet td.num{text-align:center;font-variant-numeric:tabular-nums;white-space:nowrap}
.sheet th.num{text-align:center}
.sheet table.def{font-size:14.5px;line-height:1.42}
.sheet table.def td,.sheet table.def th{padding:1.1mm 2mm}
.sheet table.def th{width:38mm;background:#E6F4F3;color:#15445A;border-color:#C9D9DB;vertical-align:top}
.sheet .code{font-family:var(--ui);font-size:13px;color:#0A7F7C;font-weight:600;unicode-bidi:isolate;white-space:nowrap}
.sheet .judge{font-weight:700}
.sheet .judge.ok{color:#06724A}.sheet .judge.part{color:#8A6212}.sheet .judge.no{color:#A23B3B}
.sign{display:flex;align-items:center;justify-content:space-between;gap:6mm;margin-top:1mm}
.sign .ps{display:flex;gap:12mm;flex:1}
.sign .p{display:flex;flex-direction:column;gap:0.6mm;font-size:16px;line-height:1.5}
.sign .p b{color:#15445A}
.sign .stp{width:27mm;height:27mm;border-radius:50%;border:2px solid #9C8550;display:flex;align-items:center;justify-content:center;color:#9C8550;font-size:14px;flex-shrink:0}
.foot{display:flex;gap:4mm;align-items:center;border-top:1px solid #0DA9A6;padding-top:2mm;font-size:12.5px;color:#3D5A64;line-height:1.4;font-family:var(--doc)}
.foot span:first-child{flex:1}
.foot .pg{white-space:nowrap;font-variant-numeric:tabular-nums}
.sheet .ph2{display:grid;grid-template-columns:1fr 1fr;gap:4mm}
.sheet .ph2 figure{margin:0;display:flex;flex-direction:column;gap:1mm}
.sheet .ph2 img{width:100%;height:62mm;object-fit:cover;border:1px solid #C9D9DB}
.sheet .ph2 figcaption{font-size:14px;text-align:center;color:#3D5A64}
.sheet .lead{font-size:16.5px}
.sheet .attn{border-inline-start:3px solid #0DA9A6;padding-inline-start:3mm;font-size:15px;color:#3D5A64}
/* الأغلفة */
.cover{padding:12mm 14mm 10mm 22mm;gap:7mm}
.cover .edge{width:5.5mm;background:#0A7F7C}
.cover .tab{top:38mm;height:46mm;width:5.5mm}
.dots{display:flex;justify-content:center;gap:2.6mm;align-items:center;direction:ltr;margin-top:14mm}
.dots span{border-radius:50%;display:block}
.cv{display:flex;flex-direction:column;align-items:center;gap:3mm;text-align:center}
.cv .k{font-family:var(--ui);font-size:20px;color:#0A7F7C;font-weight:500}
.cv .n{font-family:var(--ui);font-size:44px;color:#15445A;font-weight:700;line-height:1.25}
.cv .rule{width:32mm;height:3px;background:#9C8550}
.cv .o{font-size:26px;font-weight:700;margin-top:2mm}
.cv .j{font-size:20px;color:#3D5A64}
.kp{display:grid;grid-template-columns:repeat(3,1fr);gap:4mm}
.kp div{border:1px solid #9FB8BF;padding:3mm;text-align:center;display:flex;flex-direction:column}
.kp b{font-family:var(--ui);font-size:30px;color:#15445A;font-weight:600;line-height:1.3}
@media print{
  @page{size:A4;margin:0}
  html,body{background:#fff!important;margin:0;padding:0}
  .hint{display:none!important}
  .sheet{break-after:page;margin:0!important;box-shadow:none!important}
  .sheet:last-child{break-after:auto}
}

.pl{display:grid;gap:4mm;flex:1;min-height:0}
.pl figure{margin:0;display:flex;flex-direction:column;gap:1mm;min-height:0}
.pl img{width:100%;height:100%;object-fit:cover;border:1px solid #C9D9DB;min-height:0;flex:1}
.pl figcaption{font-size:13.5px;text-align:center;color:#3D5A64}
.pl.n1{grid-template-rows:1fr}
.pl.n2{grid-template-rows:1fr 1fr}
.pl.n3{grid-template-columns:1fr 1fr;grid-template-rows:1.25fr 1fr}
.pl.n3 figure:first-child{grid-column:1/-1}
.pl.n4{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}
.chk{font-family:var(--ui);font-size:15px;display:inline-flex;gap:6mm}
.chk span{display:inline-flex;align-items:center;gap:2mm}
.chk i{width:4.2mm;height:4.2mm;border:1.5px solid #15445A;display:inline-flex;align-items:center;justify-content:center;font-style:normal;font-size:12px;line-height:1;color:#15445A}
.sheet table.grid td{text-align:center;height:13mm;vertical-align:middle;font-size:13.5px;line-height:1.35}
.sheet table.grid td.k{background:#E6F4F3;font-weight:700;color:#15445A}
.sheet .two{display:grid;grid-template-columns:1fr 1fr;gap:4mm}

.sheet table.sm{font-size:12.5px;line-height:1.35}
.sheet table.sm td,.sheet table.sm th{padding:.7mm 1.6mm}
.sheet .kp b{font-size:26px}
.sheet .two{align-items:start}
.sheet ul.chk2{list-style:none;padding:0;margin:4px 0}.sheet ul.chk2 li{margin:3px 0;line-height:1.6}
.sign .ps{min-width:0}
.sign .pr{flex-shrink:0;min-width:42mm}
.sign .pr .p b{color:#15445A}
.sign .p .sl{position:relative;display:inline-block}
.sign .p .sgi{position:absolute;right:13mm;bottom:-1mm;height:13mm;max-width:40mm;object-fit:contain;pointer-events:none}
.sign .stp.has{border-color:transparent;overflow:hidden}
.sign .stp img{width:100%;height:100%;object-fit:contain;opacity:.92;transform:rotate(-8deg)}

.sheet table.grade th{font-size:8.5pt;line-height:1.25}
.sheet table.grade td{font-size:9.5pt}
.sheet td.sgc{position:relative;height:8mm;padding:0}
.sheet td.sgc[data-sig]{cursor:pointer}
.sheet td.sgc[data-sig]:empty::after{content:"اضغط للتوقيع";font:9pt "Readex Pro",Tahoma,sans-serif;color:#7A949B;display:block;text-align:center}
@media print{.sheet td.sgc:empty::after{content:none}}
.sheet td.sgc .sgi2{position:absolute;inset:0;margin:auto;height:9mm;max-width:32mm;object-fit:contain;pointer-events:none}
.sheet .apstamp{display:flex;align-items:center;gap:10px;justify-content:flex-start;margin-top:4mm;padding:2mm 3mm;border:1px solid #0B7C79;border-radius:3mm;font-size:10pt;color:#075A58}
.sheet .apstamp img{height:18mm;width:auto}.sheet .apstamp img.sg{height:12mm}
.sheet .apdraft{margin-top:4mm;padding:2mm 3mm;border:1px dashed #B13A31;border-radius:3mm;color:#B13A31;font-size:10pt;text-align:center}
.sheet table.att th,.sheet table.att td{padding:1px 2px;font-size:8pt;text-align:center}.sheet table.att td.ab{background:#FBE5E2;color:#B13A31;font-weight:700}
.sheet .nq{margin:0 0 4mm;break-inside:avoid}.sheet .nq p{margin:0 0 1.5mm}.sheet .nch{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:1fr 1fr;gap:1mm 6mm}
.sheet .nch li span{font-weight:700;margin-inline-end:2mm}.sheet .npass{font-size:11.5pt;line-height:1.9;text-align:justify}
.sheet .chart{width:100%;height:auto}.sheet .chart .cl{font:9pt Tahoma,sans-serif;fill:#3a5560}.sheet .chart .cv{font:bold 9pt Tahoma,sans-serif;fill:#15445A}.sheet .chart .cw{font:bold 8.5pt Tahoma,sans-serif;fill:#fff}.sheet .chart .gl{stroke:#D6E1E2}
.sheet .chart rect[fill^="var"]{fill:#0B7C79}
.sheet table.att td.nm{font-size:7.5pt;text-align:right;white-space:nowrap;overflow:hidden}
.sheet table.att tr{height:6.2mm}
.sheet p.hint2{font-size:7.5pt;color:#555;margin:2px 0 0}
/* الصور الموزعة تلقائيًا */
.sheet .phx{display:flex;flex-direction:column;flex:1;min-height:0;gap:1.5mm;margin-top:1mm}
.sheet .phg{display:flex;flex-direction:column;min-height:0;gap:1.5mm}
.sheet .phc{margin:0;font-family:var(--ui);font-size:13.5px;font-weight:600;color:#15445A;text-align:right}
.pl.wide{grid-template-columns:repeat(auto-fit,minmax(0,1fr));grid-template-rows:minmax(0,1fr)}
.pl.wide.n1{grid-template-columns:minmax(0,64%);justify-content:center}
