/* الاستمارة الرسمية (ورقة A4): تُعرض للمتقدم بعد الإرسال، وتُطبع من لوحة التحكم ومن صفحة المتقدم.
   الحاوية .print-root يجب أن تكون ابناً مباشراً لـ body حتى تُخفى بقية الصفحة عند الطباعة. */
.app-form { background: #fff; color: #000; font-size: 11.5pt; line-height: 1.5; font-family: "Segoe UI", Tahoma, Arial, sans-serif; }
.app-form .p-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 12px; border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: 10px; }
.app-form .p-brand { text-align: center; }
.app-form .p-brand img { display: block; height: 80px; margin: 0 auto 4px; }
.app-form .p-brand div { font-weight: 700; font-size: 12.5pt; }
.app-form .p-brand .p-dept { font-weight: 600; font-size: 11pt; }
.app-form h1 { font-size: 14pt; margin: 0 0 10px; text-align: center; line-height: 1.5; color: #000; }
.app-form .p-meta { font-size: 10pt; text-align: left; }
.app-form .p-meta strong { font-size: 12pt; }
.app-form .p-note { text-align: center; font-size: 10pt; margin: -4px 0 8px; }
.app-form h2 { font-size: 12pt; margin: 14px 0 6px; padding: 3px 8px; background: #eee; border: 1px solid #000; color: #000;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.app-form table { width: 100%; border-collapse: collapse; font-size: 11pt; table-layout: fixed; }
.app-form th, .app-form td { border: 1px solid #000; padding: 5px 8px; text-align: right; white-space: normal; color: #000; overflow-wrap: anywhere; }
.app-form th { width: 18%; font-weight: 600; background: #f6f6f6; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.app-form .docs th { width: auto; }
.app-form .sign { display: flex; justify-content: space-between; margin-top: 48px; gap: 24px; }
.app-form .sign div { flex: 1; text-align: center; border-top: 1px solid #000; padding-top: 6px; }
.app-form section, .app-form tr { break-inside: avoid; }
/* الاستمارة الفارغة: خانات بارتفاع يكفي للكتابة باليد */
/* مضغوطة لتكفي صفحة A4 واحدة */
.app-form.p-blank { font-size: 10.5pt; page: blank; }
@page blank { size: A4; margin: 9mm 12mm; }
.app-form.p-blank td, .app-form.p-blank th { height: 1.75em; padding: 2px 8px; }
.app-form.p-blank .p-head { margin-bottom: 6px; padding-bottom: 4px; }
.app-form.p-blank h1 { margin-bottom: 4px; }
.app-form.p-blank h2 { margin: 8px 0 4px; }
.app-form.p-blank .p-brand img { height: 56px; }
.app-form.p-blank .sign { margin-top: 36px; }
.app-form .p-box { display: inline-block; margin-inline-end: 10px; }

@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff !important; color: #000 !important; padding: 0 !important; }
  body > :not(.print-root) { display: none !important; }
  .print-root { display: block !important; margin: 0 !important; padding: 0 !important; box-shadow: none !important; max-width: none !important; }
}
