.sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  background: #fff;
  padding: 14mm;
  color: #1a1a1a;
  font-family: Sarabun, "Noto Sans Thai", "TH Sarabun New", sans-serif;
  box-shadow: 0 0 0 1px #ccc;
}
.sheet.is-draft { background: #fffdf7; }
.draft-mark {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
  font-size: 48pt;
  font-weight: 700;
  color: rgba(153, 27, 27, 0.12);
  pointer-events: none;
  letter-spacing: 0.2em;
}
.lh { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.lh-left { flex: 1; min-width: 0; }
.org-name { font-size: 12pt; font-weight: 700; margin-bottom: 4px; }
.org-meta { font-size: 8.25pt; color: #444; }
.org-line { line-height: 1.6; margin: 0 0 1pt; }
.doc-right { flex: 0 0 68mm; width: 68mm; text-align: center; }
.doc-title { font-size: 13pt; font-weight: 700; margin-bottom: 8px; white-space: nowrap; }
.doc-row { display: flex; justify-content: center; gap: 8px; font-size: 9pt; line-height: 1.65; }
.doc-lbl { color: #444; min-width: 7.4em; text-align: right; }
.doc-val { font-weight: 600; min-width: 10.5em; text-align: left; }
.rule { border: 0; border-top: 1px solid #222; margin: 10pt 0; }
.party { text-align: left; padding-left: 14pt; }
.recv-label { font-size: 9pt; font-weight: 600; margin: 0 0 10pt; padding-left: 0; }
.cust-name { font-size: 10pt; font-weight: 700; margin-bottom: 6px; }
.cust-row { font-size: 9pt; line-height: 1.75; margin-top: 3pt; }
.lbl { color: #444; }
.section { font-size: 10pt; font-weight: 600; margin: 4pt 0 10pt; }
table.items { width: 100%; border-collapse: collapse; font-size: 8.5pt; table-layout: fixed; }
table.items th { background: #f0f0f0; font-weight: 600; border: 1px solid #555; padding: 6px 8px; }
table.items td { border: 1px solid #555; padding: 6px 8px; vertical-align: top; }
.tc { text-align: center; }
.tr { text-align: right; }
.mono { font-variant-numeric: tabular-nums; }
.tot td { border: none !important; }
.tot td.tot-box { border: 1px solid #555 !important; font-weight: 700; white-space: nowrap; padding: 6px 8px; }
.tot.net td.tot-box { border-bottom-width: 2.2px !important; }
.bank { margin-top: 26pt; padding-left: 22pt; }
.bank h3, .terms h3, .pay-method h3 { font-size: 10pt; font-weight: 600; margin: 0 0 6pt; }
.bank h3, .pay-method h3 { margin-left: -22pt; }
.bank-row { display: grid; grid-template-columns: 7.5em 1fr; font-size: 9pt; line-height: 1.85; margin-bottom: 2pt; }
.terms { margin-top: 12pt; }
.terms ul { margin: 0; padding-left: 18pt; }
.terms li { font-size: 8.5pt; line-height: 1.7; margin-bottom: 7pt; }
.pay-method { margin-top: 36pt; padding-left: 16pt; font-size: 9pt; line-height: 1.85; }
.pay-method h3 { margin-bottom: 14pt; }
.disclaimer { margin-top: 14pt; font-size: 8.5pt; line-height: 1.7; }
.settle { margin-top: 6pt; max-width: 70mm; }
.settle-row { display: grid; grid-template-columns: 1fr auto; gap: 8pt; }
.settle-net { font-weight: 700; }
.balance { margin-top: 16pt; font-size: 8.5pt; color: #444; }
.sig { text-align: center; width: 52mm; margin-left: auto; margin-top: 78pt; padding-top: 0; }
.sig-gap { height: 0; }
.sig-line { border-top: 1px solid #222; margin-bottom: 6pt; }
.sig-lbl, .sig-org { font-size: 9pt; line-height: 1.45; }
@media print {
  .draft-mark { color: rgba(153, 27, 27, 0.18); }
  @page { size: A4; margin: 0; }
  .sheet { box-shadow: none; margin: 0; }
}
