/* พิมพ์รายชื่อ A4 (admin-print.js · เจ้าของระบบ 28 ต.ค. 2569 · Taste Skill)
   หน้าต่างออกแบบ: คอลัมน์เป็นช่องติ๊กสองแถว · เรียงตาม + ทิศทาง · ตัวอย่างตารางจริง 6 แถว
   กระดาษ: ขอบ 0.5 ซม. ทุกด้าน · หัวกระดาษ (thead) ซ้ำทุกหน้า · เลขหน้ามุมขวาล่าง · ระยะบรรทัดเท่าหน้าเว็บ (1.5) */
.healthy-formal .print-dialog .modal-body { display: grid; gap: 16px; }
.healthy-formal .print-dialog h2 { margin: 0 58px 0 0; }
.healthy-formal .pd-section h3 { margin: 0 0 8px; color: #17211c; font-size: 1rem; }
.healthy-formal .pd-columns { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
.healthy-formal .pd-check { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 10px; border: 1px solid #d5e2dc; border-radius: 10px; color: #17211c; cursor: pointer; }
.healthy-formal .pd-check:has(input:checked) { border-color: #194e31; background: #f1f8f4; }
.healthy-formal .pd-check input { width: 18px; height: 18px; accent-color: #194e31; }
.healthy-formal .pd-sort { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.healthy-formal .pd-sort select { min-width: 0; min-height: 44px; }
.healthy-formal .pd-dir { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 12px; background: #eef3f0; }
.healthy-formal .pd-dir button { min-height: 38px; padding: 4px 12px; border: 0; border-radius: 9px; background: transparent; color: #4b5b53; font: inherit; font-size: .9rem; font-weight: 600; white-space: nowrap; cursor: pointer; }
.healthy-formal .pd-dir button[aria-checked="true"] { background: #fff; color: #194e31; box-shadow: 0 1px 2px rgba(23, 33, 28, .12); }
.healthy-formal .pd-preview { overflow: auto; border: 1px solid #d5e2dc; border-radius: 12px; }
.healthy-formal .pd-preview table { width: 100%; border-collapse: collapse; font-size: .82rem; line-height: 1.5; }
.healthy-formal .pd-preview th, .healthy-formal .pd-preview td { padding: 3px 6px; border-bottom: 1px solid #e3ebe6; text-align: left; white-space: nowrap; }
.healthy-formal .pd-preview th { background: #f7faf8; color: #4b5b53; font-weight: 700; }
.healthy-formal .pd-preview-note { margin: 6px 0 0; color: #66736c; font-size: .86rem; }
.healthy-formal .pd-actions { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
.healthy-formal .pd-actions #printGoBtn { min-height: 52px; }
.pc-sign { min-width: 30mm; }

@media print {
  @page {
    size: A4 portrait;
    margin: 5mm;
    @bottom-right { content: "หน้า " counter(page) " / " counter(pages); font: 7pt 'Noto Sans Thai', sans-serif; color: #666; }
  }
  .print-section .print-table { width: 100%; border-collapse: collapse; font-size: 10pt; line-height: 1.5; }
  .print-section .print-table th, .print-section .print-table td { padding: 1px 4px; border: 1px solid #bbb; text-align: left; vertical-align: top; }
  .print-section .print-table thead { display: table-header-group; }
  .print-section .print-table tr { break-inside: avoid; }
  .print-section .print-table thead tr:last-child th { background: #f1f4f2; font-weight: 700; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-section .print-head-row th { padding: 0 0 2mm; border: 0; font-weight: 400; }
  .print-section .print-head { display: flex; flex-wrap: wrap; gap: 0 4mm; align-items: baseline; }
  .print-section .print-head strong { font-size: 12pt; }
  .print-section .print-head span { color: #444; font-size: 8.5pt; }
  .print-section .pc-no, .print-section .pc-checkin, .print-section .pc-finish { width: 1%; white-space: nowrap; text-align: center; }
  .print-section .pc-bib, .print-section .pc-shirt { white-space: nowrap; }
  /* เลข BIB ใหญ่และหนา หาชื่อในกระดาษได้เร็ว (เจ้าของระบบ 28 ต.ค. 2569) · หัวคอลัมน์ขนาดเดิม */
  .print-section tbody .pc-bib { font-size: 12pt; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
  .print-section .pc-sign { width: 28mm; }
}
