:root{--grey:#e8e6e2;--red:#a3232b}
.page{width:210mm;min-height:297mm;background:#fff;box-shadow:0 10px 30px rgba(0,0,0,.18);padding:12mm 14mm 10mm;font-family:var(--thai);font-size:11pt;color:#1d1a16;display:flex;flex-direction:column}
.q-head{display:flex;justify-content:space-between;align-items:flex-start}
.q-head img{height:13mm}
.q-title{text-align:right}
.q-title small{display:block;font-family:var(--sans);font-size:13pt;color:#444}
.q-title b{font-family:var(--thai);font-weight:600;font-size:24pt;line-height:1.1}
.q-meta{display:grid;grid-template-columns:1.25fr 1fr;gap:8mm;margin-top:5mm;align-items:start}
.kv{display:grid;grid-template-columns:24mm 1fr;gap:.8mm 3mm;font-size:9.5pt;line-height:1.4}
.kv dt{font-weight:600}
.kv dd{white-space:pre-line}
.box{background:var(--grey);border-radius:4mm;padding:4mm 5mm}
.box .kv{grid-template-columns:26mm 1fr}
.sep{border:0;border-top:1px solid #333;margin:4mm 0 3mm;width:100%}
.q-table{width:100%;border-collapse:collapse;margin-top:4mm;font-size:9.5pt}
.q-table thead th{background:var(--grey);font-weight:600;padding:2.5mm 2mm;text-align:right}
.q-table thead th:nth-child(2){text-align:left}
.q-table thead th:first-child{text-align:center;width:10mm}
.q-table td{padding:1.8mm 2mm;vertical-align:top;text-align:right;border-bottom:1px solid #eee}
.q-table td:first-child{text-align:center}
.q-table td:nth-child(2){text-align:left}
.q-table .nm{font-weight:600}
.q-table .dt{white-space:pre-line;color:#444;font-size:9pt;line-height:1.35}
.q-table tr{break-inside:avoid}
.q-foot{display:grid;grid-template-columns:1fr 1fr;gap:8mm;margin-top:4mm;border-top:1px solid #333;padding-top:3mm;break-inside:avoid}
.q-foot .lines{display:grid;gap:1.2mm;font-size:9.5pt;align-content:start}
.q-foot .lines div{display:flex;justify-content:space-between}
.q-foot .lines .muted{color:#666}
.gbox{background:var(--grey);border-radius:4mm;padding:4mm 5mm;display:grid;gap:1mm}
.gbox .lbl{font-weight:600;font-size:10.5pt}
.gbox .amt{font-family:var(--sans);font-weight:800;font-size:18pt;text-align:right}
.gbox .txt{text-align:right;font-size:9.5pt}
.gbox .dep{display:flex;justify-content:space-between;font-size:9.5pt;border-top:1px solid #ccc;padding-top:1.5mm;margin-top:1mm}
.q-cond{margin-top:4mm;font-size:9pt;line-height:1.5;break-inside:avoid}
.q-cond b{display:block;font-size:10pt}
.q-cond div{white-space:pre-line}
.q-sign{margin-top:auto;padding-top:6mm;display:grid;grid-template-columns:1fr 1fr;gap:12mm;text-align:center;font-size:9.5pt;break-inside:avoid}
.q-sign .ln{border-top:1px dotted #555;margin:10mm 6mm 2mm}
.q-note{font-family:'Permanent Marker',cursive;color:var(--red);font-size:12pt;transform:rotate(-3deg);display:inline-block}


.pa-t th,.pa-t td{padding-left:1.4mm;padding-right:1.4mm}
.pa-t .neg,.neg{color:#a3232b}
.gbox.gneg{background:#f6d9d9}
.gbox.gneg .amt{color:#a3232b}
