/* Document styles: one font everywhere (Nexus feedback), full A4 page, growing tables. */
.page {
  width: 210mm; height: 297mm; box-sizing: border-box; padding: 8mm 9mm;
  background: #fff; color: #000;
  font-family: Arial, Helvetica, sans-serif; font-size: 8.6pt; line-height: 1.3;
  display: flex; flex-direction: column;
}
.page.auto { height: auto; min-height: 297mm; }
.page * { box-sizing: border-box; }

.doc-head { text-align: center; margin-bottom: 3mm; position: relative; min-height: 12mm; }
.doc-head .logo { position: absolute; left: 0; top: 0; max-height: 14mm; max-width: 40mm; object-fit: contain; }
.co-name { font-size: 15pt; font-weight: 700; }
.doc-title { font-size: 10pt; font-weight: 700; margin-top: 1.5mm; }
.doc-sub { font-size: 8pt; margin-top: 1.5mm; }

.sheet { flex: 1; display: flex; flex-direction: column; border-top: .75pt solid #000; border-left: .75pt solid #000; }
.page.auto .sheet { flex: 1 0 auto; }
.g { display: grid; }
.stack { display: flex; flex-direction: column; }
.stack > :last-child { flex: 1; }
.c { border-right: .75pt solid #000; border-bottom: .75pt solid #000; padding: 1.2mm 1.6mm; min-width: 0; overflow-wrap: anywhere; }
.c.tight { padding: 0; }
.lbl { font-weight: 700; }
.kv { margin: .2mm 0; }
.kv .k { font-weight: 700; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 3mm; margin-top: 1mm; }
.strong { font-weight: 700; }
.small { font-size: 7.5pt; }
.right { text-align: right; }
.center { text-align: center; }

.items-wrap { flex: 1 0 auto; display: flex; flex-direction: column; min-height: 28mm;
  border-right: .75pt solid #000; border-bottom: .75pt solid #000; }
table.items { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.items thead { display: table-header-group; }
table.items th { font-weight: 700; border-bottom: .75pt solid #000; padding: 1.2mm 1mm; text-align: center; vertical-align: middle; }
table.items td { padding: 1.1mm 1mm; vertical-align: top; overflow-wrap: anywhere; }
table.items th + th, table.items td + td { border-left: .75pt solid #000; }
table.items tbody tr { break-inside: avoid; }
.filler { flex: 1; position: relative; min-height: 3mm; }
.filler table { position: absolute; inset: 0; height: 100%; }
.page.auto .filler { flex: 0 0 3mm; }
table.items.foot td { border-top: .75pt solid #000; padding: 1.2mm 1mm; }
.page.tax table.items { font-size: 7.6pt; }
.page.tax table.items td, .page.tax table.items th { padding-left: .7mm; padding-right: .7mm; }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.center { text-align: center; }
td.right { text-align: right; }

.sign { display: flex; flex-direction: column; justify-content: space-between; height: 100%; min-height: 22mm; text-align: right; }
.sig-space { flex: 1; min-height: 10mm; display: flex; align-items: center; justify-content: flex-end; }
img.sig { max-height: 16mm; max-width: 45mm; object-fit: contain; }
.sig-box { border: .75pt solid #000; min-height: 16mm; margin-bottom: 1mm; display: flex; align-items: center; justify-content: center; }

table.mini { width: 100%; border-collapse: collapse; }
table.mini th, table.mini td { border: .75pt solid #000; padding: .8mm 1.4mm; }
table.mini th { text-align: center; }
table.mini.sum td { border: 0; border-bottom: .75pt solid #000; }
table.mini.sum td + td { border-left: .75pt solid #000; }
table.mini.sum tr:last-child td { border-bottom: 0; }
table.mini.sum .grand td { font-weight: 700; }

.brand { font-size: 19pt; font-weight: 800; letter-spacing: .2px; }
.logo-sm { max-height: 12mm; max-width: 38mm; object-fit: contain; display: block; margin-bottom: 1mm; }
.ti-title { font-size: 13pt; font-weight: 700; margin-top: 1mm; }
.ti-rule { font-size: 8pt; font-weight: 700; }
.copy-label { margin-top: 1.8mm; font-weight: 700; font-size: 8pt; border: .75pt solid #000; display: inline-block; padding: .5mm 2.5mm; }
.foc-tag { font-weight: 700; border: .75pt solid #000; padding: .4mm 2mm; }
.terms-title { font-weight: 700; font-size: 10pt; margin-bottom: 2mm; }
.terms-body { text-align: justify; }

/* certificate of origin, purchase order terms */
.coo-title { font-size: 14pt; font-weight: 700; margin-top: 3mm; letter-spacing: .3px; }
.coo-sub { font-size: 9pt; margin-top: 1mm; }
.coo-issuer { font-size: 8.5pt; font-weight: 700; margin-top: 2.5mm; }
.page.coo .c .sig-space { min-height: 14mm; }
.terms-after { margin-top: 3mm; }
.terms-after .terms-body { font-size: 7.6pt; line-height: 1.32; }
