/* ==========================================================================
   print.css - จัดรูปแบบตามแบบฟอร์ม "สถิติจำนวนนักเรียน โรงเรียนบ้านห้วยปอ"
   ขนาด A4 แนวตั้ง พอดี 1 หน้ากระดาษ
   ========================================================================== */

@page {
  size: A4 portrait;
  margin: 10mm 14mm 10mm 14mm;
}

@media print {
  .top-navbar,
  .control-bar,
  .report-action-bar,
  .duty-topic-card,
  #dutyTeacherCard,
  .duty-editor-card,
  .toast-container,
  .btn,
  .nav-tabs,
  #tabEntry,
  #tabDashboard,
  .modal-overlay {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-family: 'Sarabun', 'TH Sarabun New', sans-serif !important;
    font-size: 13.5px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .main-wrapper {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .report-preview-sheet {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    max-width: 100% !important;
  }

  .huai-po-document {
    width: 100% !important;
    page-break-after: avoid;
    page-break-inside: avoid;
  }
}

/* ==========================================================================
   สไตล์แบบฟอร์มเอกสาร "โรงเรียนบ้านห้วยปอ"
   ========================================================================== */
.huai-po-document {
  font-family: 'Sarabun', 'TH Sarabun New', sans-serif;
  color: #000000;
  max-width: 780px;
  margin: 0 auto;
}

/* หัวกระดาษ */
.doc-header {
  text-align: center;
  margin-bottom: 12px;
}

.doc-title {
  font-family: 'Sarabun', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: #000000;
}

.doc-subtitle {
  font-family: 'Sarabun', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: #000000;
}

.doc-date-line {
  font-size: 14px;
  margin: 0;
  color: #000000;
}

.doc-date-val {
  font-weight: 600;
  border-bottom: 1px dotted #333;
  padding: 0 6px;
}

/* ตารางสถิติแบบทางการ */
.huai-po-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
  border: 1.5px solid #000000;
}

.huai-po-table th,
.huai-po-table td {
  border: 1.2px solid #000000;
  padding: 4px 6px;
  font-size: 13.5px;
  line-height: 1.25;
}

.huai-po-table th {
  background-color: #ffffff;
  font-weight: 700;
  text-align: center;
  color: #000000;
}

.huai-po-table td.col-class {
  text-align: left;
  padding-left: 8px;
  white-space: nowrap;
}

.huai-po-table td.col-num {
  text-align: center;
}

.huai-po-table td.col-note {
  text-align: left;
  font-size: 12px;
}

.row-subtotal td {
  font-weight: 700;
  background-color: #fafafa;
}

.font-bold {
  font-weight: 700 !important;
}

/* ส่วนบันทึกเวรและรายการที่ปฏิบัติ */
.duty-section {
  margin-top: 12px;
  margin-bottom: 14px;
}

.duty-title {
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #000000;
}

.duty-lines-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.duty-line {
  border-bottom: 1px solid #777777;
  min-height: 20px;
  height: 20px;
  position: relative;
  display: flex;
  align-items: flex-end;
}

.duty-line-text {
  font-size: 13px;
  line-height: 1;
  color: #000000;
  padding-left: 4px;
}

/* รายชื่อครูเวร */
.teachers-section {
  margin-top: 12px;
  font-size: 13.5px;
}

.teachers-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.teachers-label {
  font-weight: 700;
  width: 75px;
  flex-shrink: 0;
}

.teacher-slot {
  flex: 1;
  white-space: nowrap;
}

/* ลายเซ็นผู้อำนวยการ */
.director-sign-box {
  margin-top: 26px;
  margin-left: auto;
  width: 290px;
  text-align: center;
  font-size: 13.5px;
  line-height: 1.4;
}

.director-sign-line {
  margin-bottom: 6px;
}

.director-name {
  font-weight: 700;
}

.director-position {
  font-size: 13px;
}
