/* كشوف الفرقة الأولى فقط — الحفاظ على تسطيرة النماذج الأصلية. */
.first-paper-reports{direction:rtl}
.first-paper-controls{margin-bottom:16px}
.first-paper-preview{display:grid;gap:24px;justify-items:center;overflow:auto;background:#dce3e8;border-radius:14px;padding:18px}
.first-paper-sheet{box-sizing:border-box;direction:rtl;background:#fff;color:#111;font-family:Cairo,Tahoma,Arial,sans-serif;width:210mm;height:287mm;padding:7mm 8mm 5mm;display:flex;flex-direction:column;box-shadow:0 8px 25px #0002;overflow:hidden;break-after:page;page-break-after:always}
.first-paper-attendance-sheet{width:287mm;height:200mm;padding:5mm 7mm 4mm}
.first-paper-header{display:grid;grid-template-columns:1fr 48px 1fr;align-items:start;font-size:11px;font-weight:700;min-height:22mm;line-height:1.7}
.first-paper-attendance-sheet .first-paper-header{min-height:16mm}
.first-paper-institute{text-align:right}.first-paper-detail{text-align:right;grid-column:3;justify-self:end;min-width:46mm}
.first-paper-logo{grid-column:2;grid-row:1;display:flex;justify-content:center;align-items:flex-start}
.first-paper-logo img{max-width:38px;max-height:42px;object-fit:contain}
.first-paper-title{text-align:center;font-size:13px;margin:1mm 0 2mm;font-weight:900;line-height:1.45}
.first-paper-tables{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;direction:rtl;align-items:start}
.first-paper-layout-1 .first-paper-tables{grid-template-columns:minmax(0,1fr)}
.first-paper-table,.first-paper-visit-plan,.first-paper-exam-committee{width:100%;border-collapse:collapse;table-layout:fixed;direction:rtl;color:#111}
.first-paper-table{font-size:8px}
.first-paper-table th,.first-paper-table td{border:1px solid #555;text-align:center;vertical-align:middle;box-sizing:border-box;padding:0 2px;overflow-wrap:anywhere;height:6.15mm;line-height:1.15}
.first-paper-attendance-sheet .first-paper-table th,.first-paper-attendance-sheet .first-paper-table td{height:4.15mm}
.first-paper-table th{height:7mm!important;font-weight:900;font-size:8px;white-space:nowrap}
.first-paper-attendance-sheet .first-paper-table th{height:6mm!important}
.first-paper-table td.first-paper-name{text-align:right;padding-right:3px;font-weight:600}
.first-paper-table .first-paper-col-0{width:6%}
.first-paper-visits .first-paper-col-1{width:50%}.first-paper-visits .first-paper-col-2{width:20%}.first-paper-visits .first-paper-col-3{width:24%}
.first-paper-exam .first-paper-col-1{width:48%}.first-paper-exam .first-paper-col-2{width:16%}.first-paper-exam .first-paper-col-3{width:15%}.first-paper-exam .first-paper-col-4{width:15%}
.first-paper-attendance .first-paper-col-1{width:42%}.first-paper-attendance .first-paper-col-2,.first-paper-attendance .first-paper-col-3,.first-paper-attendance .first-paper-col-4,.first-paper-attendance .first-paper-col-5{width:10%}.first-paper-attendance .first-paper-col-6{width:12%}
.first-paper-layout-1 .first-paper-table{font-size:10px}.first-paper-layout-1 .first-paper-table th{font-size:10px}
.first-paper-footer{margin-top:auto;break-inside:avoid;page-break-inside:avoid;padding-top:2mm;flex-shrink:0}
.first-paper-visit-plan{font-size:8px}
.first-paper-visit-plan td,.first-paper-visit-plan th{border:1px solid #555;height:7mm;text-align:center;vertical-align:middle;padding:0 2px;line-height:1.2}
.first-paper-visit-plan th{font-weight:900;background:#f6f6f6;height:7mm}
.first-paper-visit-plan th:nth-child(1){width:4%}.first-paper-visit-plan th:nth-child(2){width:28%}.first-paper-visit-plan th:nth-child(3){width:8%}.first-paper-visit-plan th:nth-child(4){width:12%}.first-paper-visit-plan th:nth-child(5){width:22%}.first-paper-visit-plan th:nth-child(6){width:14%}.first-paper-visit-plan th:nth-child(7){width:12%}
.first-paper-supervisor-sign{text-align:center;font-size:12px;font-weight:800;padding:3mm 0 1mm;break-inside:avoid}
.first-paper-exam-committee{font-size:8px}
.first-paper-exam-committee th,.first-paper-exam-committee td{border:1px solid #555;height:9mm;text-align:center;padding:2px;line-height:1.2}
.first-paper-exam-committee th{font-size:8px;font-weight:900;height:8mm}
.first-paper-exam-committee th:nth-child(1){width:4%}.first-paper-exam-committee th:nth-child(2){width:21%}.first-paper-exam-committee th:nth-child(3){width:10%}.first-paper-exam-committee th:nth-child(4){width:14%}.first-paper-exam-committee th:nth-child(5){width:7%}.first-paper-exam-committee th:nth-child(6){width:19%}.first-paper-exam-committee th:nth-child(7){width:7%}.first-paper-exam-committee th:nth-child(8){width:18%}
@media(max-width:820px){.first-paper-preview{justify-items:start}.first-paper-sheet{transform-origin:top right;transform:scale(.8);margin-bottom:-55mm}.first-paper-attendance-sheet{transform:scale(.58);margin-bottom:-85mm}}
@page benha-first-portrait{size:A4 portrait;margin:5mm}
@page benha-first-landscape{size:A4 landscape;margin:5mm}
@media print{
  body.first-paper-print-mode *{visibility:hidden!important}
  body.first-paper-print-mode .first-paper-preview,body.first-paper-print-mode .first-paper-preview *{visibility:visible!important}
  body.first-paper-print-mode .first-paper-preview{position:absolute!important;inset:0!important;width:100%!important;display:block!important;overflow:visible!important;padding:0!important;margin:0!important;background:#fff!important}
  body.first-paper-print-mode .first-paper-sheet{page:benha-first-portrait;width:200mm;height:287mm;margin:0!important;transform:none!important;box-shadow:none!important;break-after:page!important;page-break-after:always!important;border:0!important;overflow:hidden!important}
  body.first-paper-print-mode .first-paper-attendance-sheet{page:benha-first-landscape;width:287mm;height:200mm}
  body.first-paper-print-mode .first-paper-sheet:last-child{break-after:auto!important;page-break-after:auto!important}
  body.first-paper-print-mode::after{display:none!important}
  /* لا تفصل توقيعات التقارير الرسمية السابقة عن الجدول عند إمكان احتوائها. */
  .first-paper-footer,.first-paper-exam-committee,.first-paper-supervisor-sign{break-inside:avoid!important;page-break-inside:avoid!important}
}
/* الحفاظ على تواقيع التقارير السابقة مع تجنب تقسيمها داخل صفحات أخرى. */
@media print{
  .official-old-signatures,.attendance-signatures,.exam-committee,.eval-signatures{
    break-inside:avoid!important;page-break-inside:avoid!important;
  }
  .level2-attendance-sheet .attendance-signatures{break-inside:avoid!important}
}
