/* ===================== Printable GST tax invoice (A4) ===================== */
.iv-paper {
  --iv-accent: #1f3a5f;
  --iv-line: #8f98a3;
  --iv-hair: #d5dae0;
  --iv-soft: #f2f4f7;
  --iv-ink: #111418;
  --iv-ink-2: #3d4650;
  position: relative;
  width: 210mm;
  min-height: 297mm;
  padding: 10mm;
  margin: 0 auto;
  box-sizing: border-box;
  background: #fff;
  color: var(--iv-ink);
  font: 400 8.6pt/1.4 "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "calt" 0, "case" 0;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  overflow: hidden;
}
.iv-paper *, .iv-paper *::before, .iv-paper *::after { box-sizing: border-box; }
.iv-paper table { border-collapse: collapse; width: 100%; }
.iv-paper th, .iv-paper td { text-align: left; vertical-align: top; font-weight: 400; }
.iv-paper b, .iv-paper .iv-strong { font-weight: 600; }
.iv-paper .r { text-align: right; }
/* tabular figures only where amounts line up; elsewhere they widen hyphens in dates and bill numbers */
.iv-paper td.r, .iv-paper th.r, .iv-totals td { font-variant-numeric: tabular-nums; }
.iv-paper .c { text-align: center; }
.iv-muted { color: var(--iv-ink-2); }

.iv-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 6mm; margin-bottom: 2.5mm; }
.iv-title { font-size: 16pt; font-weight: 700; letter-spacing: .14em; color: var(--iv-accent); line-height: 1; }
.iv-title small { display: block; font-size: 7.5pt; letter-spacing: .08em; font-weight: 600; color: var(--iv-ink-2); margin-top: 1.6mm; text-transform: uppercase; }
.iv-top-right { display: flex; align-items: center; gap: 2.5mm; }
.iv-paid { font-size: 9.5pt; font-weight: 800; letter-spacing: .2em; color: #067647; border: 1.6px solid #067647; border-radius: 1mm; padding: .7mm 2.2mm .7mm 3mm; line-height: 1.2; }
.iv-label-paid { color: #067647; }
.iv-kv th { color: var(--iv-ink-2); padding: .4mm 3mm .4mm 0; white-space: nowrap; width: 1%; }
.iv-kv td { padding: .4mm 0; }
.iv-partial { margin-top: 2mm; padding-top: 1.6mm; border-top: 1px dashed var(--iv-hair); }
.iv-terms-list { margin: 0; padding-left: 3.6mm; }
.iv-terms-list li { margin: 0 0 .3mm; padding-left: .4mm; }
.iv-copy { font-size: 7pt; font-weight: 700; letter-spacing: .1em; color: var(--iv-accent); border: 1.2px solid var(--iv-accent); border-radius: 1mm; padding: 1.1mm 2.4mm; white-space: nowrap; }

/* boxed grids */
.iv-grid { border: 1px solid var(--iv-line); }
.iv-grid > tbody > tr > td, .iv-grid > tr > td { border: 1px solid var(--iv-line); padding: 2.2mm 3mm; }
.iv-label { font-size: 6.8pt; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--iv-accent); margin-bottom: 1mm; }
.iv-gap { margin-top: 2mm; }

.iv-head .iv-supplier { width: 57%; }
.iv-sup { display: flex; gap: 3.5mm; align-items: flex-start; }
.iv-logo { max-width: 26mm; max-height: 20mm; object-fit: contain; flex: none; }
.iv-trade { font-size: 13.5pt; font-weight: 700; letter-spacing: .02em; color: var(--iv-ink); line-height: 1.15; margin-bottom: .6mm; text-transform: uppercase; }
.iv-legal { font-size: 8pt; color: var(--iv-ink-2); margin-bottom: 1mm; }
.iv-meta, .iv-supply { background: #fbfcfd; }
.iv-meta table th, .iv-supply table th { width: 40%; color: var(--iv-ink-2); padding: .55mm 2mm .55mm 0; white-space: nowrap; }
.iv-meta table td, .iv-supply table td { padding: .55mm 0; }
.iv-meta table th { width: 44%; }
.iv-meta .iv-strong { font-size: 10pt; }
.iv-cname { font-size: 10.5pt; font-weight: 700; margin-bottom: .6mm; }

/* items */
.iv-items { margin-top: -1px; border: 1px solid var(--iv-line); }
.iv-items thead { display: table-header-group; }
.iv-items th {
  background: var(--iv-soft); color: var(--iv-ink); font-size: 6.9pt; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; padding: 1.8mm 2mm; border: 1px solid var(--iv-line); border-top: 1.6px solid var(--iv-accent);
}
.iv-items td { padding: 1.8mm 2mm; border-left: 1px solid var(--iv-line); border-right: 1px solid var(--iv-line); border-bottom: 1px solid var(--iv-hair); }
.iv-items tbody tr { break-inside: avoid; page-break-inside: avoid; }
.iv-items tfoot td { border: 1px solid var(--iv-line); background: var(--iv-soft); font-weight: 700; padding: 1.8mm 2mm; }
.iv-items .r { white-space: nowrap; }
.iv-desc { font-weight: 600; }
.iv-details { font-size: 7.6pt; color: var(--iv-ink-2); margin-top: .6mm; }
.iv-unit { font-size: 7pt; color: var(--iv-ink-2); }
.w-sn { width: 6mm; } .w-sac { width: 15mm; } .w-qty { width: 19mm; } .w-rate { width: 22mm; }
.w-disc { width: 18mm; } .w-gst { width: 11mm; } .w-amt { width: 27mm; }

/* totals */
.iv-sum { margin-top: -1px; break-inside: avoid; page-break-inside: avoid; }
.iv-words { width: 57%; }
.iv-totals { padding: 0 !important; }
.iv-totals table th { padding: 1.3mm 3mm; color: var(--iv-ink-2); border-bottom: 1px solid var(--iv-hair); }
.iv-totals table td { padding: 1.3mm 3mm; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--iv-hair); }
.iv-totals .iv-grand th, .iv-totals .iv-grand td {
  border-top: 1.6px solid var(--iv-accent); border-bottom: 0; color: var(--iv-accent); font-weight: 700; font-size: 10.5pt; padding: 2mm 3mm;
}

/* SAC summary */
.iv-tax { margin-top: 2mm; border: 1px solid var(--iv-line); break-inside: avoid; page-break-inside: avoid; }
.iv-tax th { background: var(--iv-soft); font-size: 6.6pt; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 1.2mm 2mm; border: 1px solid var(--iv-line); }
.iv-tax td { padding: 1.2mm 2mm; border: 1px solid var(--iv-hair); border-left-color: var(--iv-line); border-right-color: var(--iv-line); }
.iv-tax tfoot td { font-weight: 700; background: var(--iv-soft); border: 1px solid var(--iv-line); }

.iv-endorse {
  margin-top: 2mm; border: 1.2px solid var(--iv-accent); border-radius: 1mm; padding: 2mm 3mm;
  font-weight: 700; font-size: 8pt; letter-spacing: .02em; color: var(--iv-accent); text-align: center;
}
.iv-endorse span { font-weight: 600; color: var(--iv-ink); }
.iv-cancel-note { margin-top: 2mm; border: 1.2px solid #b42318; color: #b42318; padding: 2mm 3mm; font-weight: 600; text-align: center; border-radius: 1mm; }

/* footer blocks - kept together with the footnote so nothing is left alone on a page */
.iv-end { break-inside: avoid; page-break-inside: avoid; }
.iv-foot { margin-top: 2mm; break-inside: avoid; page-break-inside: avoid; }
.iv-bank { width: 57%; }
.iv-bank-flex { display: flex; justify-content: space-between; gap: 3mm; align-items: flex-start; }
.iv-bank table th { color: var(--iv-ink-2); padding: .4mm 2.5mm .4mm 0; white-space: nowrap; width: 1%; }
.iv-bank table td { padding: .4mm 0; word-break: break-word; }
.iv-qr { flex: none; width: 27mm; text-align: center; font-size: 6.4pt; line-height: 1.25; color: var(--iv-ink-2); }
.iv-qr svg { display: block; width: 25mm; height: 25mm; margin: 0 auto 1mm; }
.iv-notes { margin-bottom: 1.5mm; }
.iv-terms { font-size: 7.8pt; }
.iv-decl { font-size: 7.8pt; color: var(--iv-ink-2); }
.iv-paper td.iv-sign { text-align: center; vertical-align: bottom; }
.iv-sig-img { display: block; max-height: 15mm; max-width: 52mm; margin: 1.5mm auto .8mm; object-fit: contain; }
.iv-sig-space { height: 13mm; }
.iv-sig-label { border-top: 1px solid var(--iv-line); display: inline-block; padding-top: 1mm; min-width: 45mm; font-weight: 600; }
.iv-sig-name { font-size: 7.6pt; color: var(--iv-ink-2); margin-top: .4mm; }
.iv-footnote { margin-top: 2mm; text-align: center; font-size: 7pt; color: var(--iv-ink-2); }

/* cancelled watermark */
.iv-wm { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 3; }
.iv-wm span {
  font-size: 74pt; font-weight: 800; letter-spacing: .12em; color: rgba(180, 35, 24, .13);
  border: 2.2mm solid rgba(180, 35, 24, .13); padding: 0 7mm; transform: rotate(-28deg); border-radius: 4mm;
}
