.paper {
  width: 210mm;
  min-height: 297mm;
  background: #fff;
  position: relative;
  box-shadow: 0 2px 14px rgba(0,0,0,.2);
  color: #111;
  font-family: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
  direction: rtl;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

table.pg {
  width: 100%;
  border-collapse: collapse;
  min-height: 297mm;
}

table.pg > thead { display: table-header-group; }
table.pg > tfoot { display: table-footer-group; }
table.pg td { padding: 0; vertical-align: top; }

.lh { padding: 9mm 20mm 0; }

.lh-in {
  display: flex;
  align-items: center;
  gap: 6mm;
  padding-bottom: 3mm;
}

.lh img {
  width: 24mm;
  height: 24mm;
  object-fit: contain;
  flex: none;
}

.lh .nm { flex: 1; text-align: center; }
.lh .ar { font-size: 23pt; font-weight: 800; color: #1b3a6b; line-height: 1.25; }
.lh .en { font-size: 10.5pt; font-weight: 700; color: #2f5597; letter-spacing: .6pt; direction: ltr; }
.lh .un { font-size: 11pt; color: #555; margin-top: .5mm; }
.lh .sp { width: 24mm; flex: none; }
.lh .ln { height: 1.1mm; background: #c9a227; border-bottom: .5mm solid #1b3a6b; box-sizing: content-box; }

table.pg td.bodycell { padding: 6mm 22mm 4mm; }

.meta {
  display: flex;
  justify-content: space-between;
  font-size: 11.5pt;
  font-weight: 700;
  color: #1b3a6b;
  margin-bottom: 7mm;
}

.to {
  font-size: 13pt;
  font-weight: 800;
  color: #1b3a6b;
  line-height: 1.7;
  margin-bottom: 3mm;
}

.gr { font-size: 13pt; font-weight: 700; margin-bottom: 3mm; }

.sj {
  font-size: 13pt;
  font-weight: 800;
  color: #1b3a6b;
  margin: 2mm 0 5mm;
  padding: 1.5mm 3mm;
  border-right: 1.3mm solid #c9a227;
  background: #f3f6fb;
}

.bd {
  font-size: var(--fs, 13pt);
  line-height: 1.95;
  text-align: justify;
}

.bd p { margin: 0 0 3.2mm; }
.bd ul { margin: 0 0 3.2mm; padding: 0 7mm 0 0; }
.bd li { margin: 0 0 1mm; }

.cl { font-size: var(--fs, 13pt); line-height: 1.9; margin: 3mm 0 6mm; }

.sig {
  position: relative;
  min-height: 46mm;
  break-inside: avoid;
  page-break-inside: avoid;
}

.sigbox {
  position: relative;
  width: 62mm;
  text-align: center;
  font-size: 12.5pt;
}

.sigbox.right  { margin-right: 0; margin-left: auto; }
.sigbox.left   { margin-right: auto; margin-left: 0; }
.sigbox.center { margin: 0 auto; }

.sigbox .t { font-weight: 800; color: #1b3a6b; }
.sigbox .n { font-weight: 700; margin-top: 1mm; }
.sigbox .l { margin-top: 9mm; border-top: .3mm solid #333; padding-top: .8mm; font-size: 10.5pt; color: #555; }

.seal {
  position: absolute;
  mix-blend-mode: multiply;
  opacity: .9;
  transform: rotate(-7deg);
  pointer-events: none;
  top: 6mm;
  left: 50%;
  margin-left: -20mm;
}

.notes { font-size: 11pt; line-height: 1.8; margin-top: 3mm; color: #222; }
.notes b { color: #1b3a6b; }

.lf {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 0 20mm 6mm;
  text-align: center;
  font-size: 10.5pt;
  color: #333;
}

.lf .ln { height: .9mm; background: #c9a227; margin-bottom: 2.5mm; }
.lf bdi { direction: ltr; unicode-bidi: isolate; font-weight: 700; color: #1b3a6b; }
.fsp { height: 24mm; }

.ph { background: #fff3b0; }

#printArea { display: none; }

@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff; }
  body > *:not(#printArea) { display: none !important; }
  #printArea { display: block; }
  .paper { box-shadow: none; min-height: 0; }
  table.pg { min-height: 0; }
  .lf { position: fixed; }
  .ph { background: none; }
  .cardsheet { padding: 12mm 10mm; }
  .prow {
    display: flex;
    flex-direction: row;
    gap: 6mm;
    margin: 0 0 6mm;
    justify-content: center;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .prow:nth-child(4n) { break-after: page; page-break-after: always; }
  .card {
    box-shadow: none;
    outline: .15mm dashed #888;
    outline-offset: .4mm;
  }
}