
/* The receipt is embedded inside the portal page, so neutralise any host
   styling that could leak in on shared class names (.bar, .amt, ...). */
.rcpt,.rcpt *{border-radius:0;box-shadow:none;text-transform:none;box-sizing:border-box}
.rcpt{width:76mm;margin:0 auto;padding:3mm 1.5mm 6mm;background:#fff;color:#000;
  font-family:"DejaVu Sans Mono","Consolas","Courier New",monospace;
  font-size:7.2pt;line-height:1.42;-webkit-font-smoothing:antialiased}
.rcpt .brand{display:flex;align-items:center;justify-content:center;margin-bottom:6px}
/* brightness(0) flattens the navy wordmark to solid black for the till roll,
   keeping its transparency. */
.rcpt .brand img{width:46mm;height:auto;filter:brightness(0)}
.rcpt .brand span{font-weight:700;font-size:11pt;letter-spacing:2px}
.rcpt .bname{text-align:center;font-weight:700;font-size:8.2pt;margin-bottom:2px}
.rcpt .baddr{text-align:center;font-size:6.9pt;line-height:1.35}
.rcpt .bar{background:#000;color:#fff;text-align:center;font-weight:700;
  padding:4px 2px;margin:8px 0}
.rcpt .bar.big{font-size:9.6pt}
.rcpt .bar.sp{letter-spacing:2.6px;font-size:8pt}
.rcpt .ln{text-align:center;font-size:7.4pt}
.rcpt .dash{border-top:1px dashed #000;margin:7px 0}
.rcpt .dbl{border-top:3px double #000;margin:6px 0}
.rcpt .bcode{display:flex;justify-content:center;margin-top:4px}
.rcpt .bcode svg{width:52mm;height:12mm}
.rcpt .bcnum{text-align:center;font-size:7pt;letter-spacing:1px;margin-bottom:6px}
.rcpt .nmline{text-align:center;font-weight:700;letter-spacing:1.3px;font-size:8.4pt}
.rcpt .doc{text-align:center;font-size:7.4pt;margin-top:2px}
.rcpt table{width:100%;border-collapse:collapse;table-layout:fixed}
.rcpt .items thead th{border-top:1px solid #000;border-bottom:1px solid #000;
  padding:3px 0;font-size:7pt;text-align:left;font-weight:700}
.rcpt .items th.amt,.rcpt .items td.amt{text-align:right;width:15mm}
.rcpt .items th.sn,.rcpt .items td.sn{width:5mm;text-align:left;vertical-align:top}
.rcpt .items td{padding:4px 0;vertical-align:top;
  border-bottom:1px dotted #b0b0b0;overflow-wrap:anywhere}
.rcpt .items tr:last-child td{border-bottom:none}
.rcpt .pn{font-weight:700;font-size:7.4pt}
.rcpt .mt{font-size:6.3pt;color:#333}
.rcpt .qr{font-size:7pt;margin-top:1px}
.rcpt td.amt{font-weight:700;white-space:nowrap;padding-left:2px;font-size:7.4pt}
.rcpt .tot{display:flex;align-items:baseline;font-size:7.4pt;margin:2px 0}
.rcpt .tot span{white-space:nowrap}
.rcpt .tot b{white-space:nowrap;font-weight:700}
.rcpt .tot.dots{gap:2px}
.rcpt .tot.dots::before{content:"";order:1;flex:1;border-bottom:1px dotted #000;
  transform:translateY(-3px)}
.rcpt .tot.dots b{order:2}
.rcpt .tot.strong{font-weight:700;font-size:8pt}
.rcpt .pay{text-align:center;font-size:17pt;font-weight:700;letter-spacing:0.5px;margin:3px 0 1px}
.rcpt .paylbl{text-align:center;font-size:7pt;letter-spacing:1.8px}
.rcpt .gsth{text-align:center;font-weight:700;letter-spacing:1px;margin:7px 0 4px;font-size:7.8pt}
.rcpt .gst th,.rcpt .gst td{border:1px solid #000;padding:2px 3px;font-size:6.6pt}
.rcpt .gst th{font-weight:700}
.rcpt .gst .r{text-align:right}
.rcpt .gst .c{text-align:center}
.rcpt .fine{text-align:center;font-size:6.4pt;color:#222;margin-top:6px;line-height:1.35}
.rcpt .hi{text-align:center;font-size:8.6pt;margin:8px 0;line-height:1.55;
  font-family:"Nirmala UI","Noto Sans Devanagari",system-ui,sans-serif}
.rcpt .hi.big{font-weight:700;font-size:10pt}
.rcpt .wa{display:flex;justify-content:center;margin:8px 0 6px}
.rcpt .qrbox{display:flex;justify-content:center;margin:2px 0 4px}
.rcpt .qrbox img{width:32mm;height:32mm;image-rendering:pixelated}


.a4,.a4 *{box-sizing:border-box;border-radius:0}
/* min-height fills the printable area of one A4 sheet (297mm less 12mm margins)
   so the footer sits at the foot of the page instead of floating mid-sheet on a
   short bill. A longer bill just grows past it onto the next sheet. */
.a4{width:186mm;min-height:271mm;margin:0 auto;color:#000;background:#fff;
  display:flex;flex-direction:column;
  font-family:"Segoe UI",system-ui,-apple-system,Arial,sans-serif;
  font-size:8.6pt;line-height:1.45}
.a4 .r{text-align:right}
.a4 .c{text-align:center}
.a4 .b{font-weight:700}
.a4 .mono{font-family:Consolas,"DejaVu Sans Mono",monospace;font-size:8pt}
.a4 table{width:100%;border-collapse:collapse}

/* ── header ─────────────────────────────────────────────────────────────── */
.a4 .hd{display:flex;justify-content:space-between;align-items:flex-start;
  gap:10mm;border-bottom:1.5pt solid #000;padding-bottom:3.5mm}
.a4 img.wm{width:54mm;height:auto;display:block;filter:brightness(0)}
.a4 .wm-t{font-weight:700;font-size:15pt;letter-spacing:3px}
.a4 .bn{font-weight:700;font-size:10.5pt;margin-top:2.5mm}
.a4 .ba{font-size:8.2pt;max-width:110mm}
.a4 .hd-r{text-align:right;flex:none}
.a4 .ti{font-weight:700;font-size:11pt;letter-spacing:3px;
  border:1.2pt solid #000;padding:1.6mm 5mm;display:inline-block}
.a4 .meta{margin:3mm 0 0 auto;width:auto}
.a4 .meta td{padding:0.6mm 0 0.6mm 4mm;font-size:9pt;text-align:right;white-space:nowrap}
.a4 .meta td:first-child{padding-left:0;text-align:left}

/* ── savings ────────────────────────────────────────────────────────────── */
.a4 .saved{border:1.2pt solid #000;text-align:center;font-weight:700;
  font-size:11pt;padding:1.8mm;margin-top:3.5mm;letter-spacing:.3px}

/* ── patient / barcode ──────────────────────────────────────────────────── */
.a4 .party{display:flex;gap:8mm;align-items:center;justify-content:space-between;
  border-bottom:0.6pt solid #000;padding:3mm 0}
.a4 .pc.bcw{flex:none;text-align:center}
.a4 .nm-line{font-weight:700;font-size:11pt;letter-spacing:1.4px}
.a4 .doc{font-size:9pt;margin-top:1mm}
.a4 .bcode svg{width:46mm;height:9mm;display:block}
.a4 .bcn{font-size:8pt;letter-spacing:1px;font-family:Consolas,monospace;margin-top:.6mm}

/* ── items ──────────────────────────────────────────────────────────────── */
/* Fully ruled grid — column separators included, so the eye can track a value
   back to its heading across the width of the sheet. */
.a4 .items{margin-top:4mm;table-layout:fixed;border:0.8pt solid #000}
.a4 .items th{border:0.8pt solid #000;padding:1.8mm 1.4mm;text-align:left;
  font-size:8pt;font-weight:700}
.a4 .items th.r{text-align:right}.a4 .items th.c{text-align:center}
.a4 .items td{padding:1.7mm 1.4mm;border:0.5pt solid #999;
  vertical-align:top;overflow-wrap:anywhere}
.a4 .items td.nm{font-weight:600}
.a4 .items th:nth-child(1),.a4 .items td:nth-child(1){width:8mm}
.a4 .items th:nth-child(3),.a4 .items td:nth-child(3){width:25mm}
.a4 .items th:nth-child(4),.a4 .items td:nth-child(4){width:14mm}
.a4 .items th:nth-child(5),.a4 .items td:nth-child(5){width:11mm}
.a4 .items th:nth-child(6),.a4 .items td:nth-child(6){width:18mm}
.a4 .items th:nth-child(7),.a4 .items td:nth-child(7){width:12mm}
.a4 .items th:nth-child(8),.a4 .items td:nth-child(8){width:20mm}
.a4 .items th:nth-child(9),.a4 .items td:nth-child(9){width:24mm}

/* A long bill runs onto further sheets: repeat the column header, never split a
   line item, and keep the totals / GST / footer blocks whole. */
.a4 .items thead{display:table-header-group}
.a4 .items tr{break-inside:avoid;page-break-inside:avoid}
.a4 .cols,.a4 .ft,.a4 .party,.a4 .pay,.a4 .gst{break-inside:avoid;page-break-inside:avoid}

/* ── summary row ────────────────────────────────────────────────────────── */
.a4 .cols{display:flex;gap:10mm;margin-top:5mm;align-items:flex-start}
.a4 .col-l{flex:1;min-width:0}
.a4 .col-r{flex:none;width:70mm}
.a4 .sh{font-size:8pt;letter-spacing:2px;text-transform:uppercase;
  font-weight:700;margin-bottom:1.8mm}
.a4 .gst th,.a4 .gst td{border:0.6pt solid #000;padding:1.3mm 1.6mm;font-size:8pt}
.a4 .gst th{font-weight:700}
/* One totals block ending in the payable line, rather than a separate boxed
   figure — on a single-item bill that repeated the same number twice over. */
.a4 .sums{border:0.8pt solid #000}
.a4 .sums td{padding:1.6mm 2.5mm;font-size:9.4pt;border-bottom:0.5pt solid #999}
.a4 .sums td.r{font-variant-numeric:tabular-nums;white-space:nowrap;text-align:right}
.a4 .sums tr.cap td{font-size:8pt;padding-bottom:1mm;padding-top:1.8mm}
.a4 .sums tr.pay td{border-bottom:none;border-top:1.2pt solid #000;
  font-weight:700;padding:2.4mm 2.5mm}
.a4 .sums tr.pay td:first-child{font-size:8pt;letter-spacing:1.6px}
.a4 .sums tr.pay td.r{font-size:15pt;letter-spacing:.3px}

/* ── footer ─────────────────────────────────────────────────────────────── */
/* margin-top:auto on the first of the two trailing blocks drops the disclaimer
   AND the footer to the foot of the sheet together, so a one-line bill doesn't
   leave them stranded mid-page. On a bill that fills the sheet it collapses. */
.a4 .fine{font-size:7.6pt;margin-top:auto;padding-top:6mm;text-align:center;line-height:1.4}
.a4 .ft{display:flex;gap:10mm;align-items:center;justify-content:space-between;
  border-top:0.6pt solid #000;margin-top:3.5mm;padding-top:3.5mm}
.a4 .ft-l{flex:1;min-width:0;text-align:center}
.a4 .ft-r{flex:none;text-align:center}
.a4 .ft-r img{width:26mm;height:26mm;image-rendering:pixelated;display:block}
.a4 .cap{font-size:7.2pt;margin-top:1.2mm}
.a4 .hi{font-family:"Nirmala UI","Noto Sans Devanagari",system-ui,sans-serif;
  font-size:9.4pt;line-height:1.55}
.a4 .hi.big{font-weight:700;font-size:11pt;margin-bottom:2mm}
.a4 .wa{display:flex;justify-content:center;margin:2.5mm 0 1.5mm}
.a4 .tag{font-size:8pt}
