/* ==========================================================================
   Challan — the receipt document (shared by canvas, export, print, share view)
   Brand colour is used sparingly: a financial document must stay clean and printable.
   ========================================================================== */

.rc {
  --ink: #161B26; --soft: #475467; --mute: #7A8494; --rule: #E7E9EE; --rule-2: #D5D9E0; --fill: #F7F8FA;
  --pad-x: 60px; --pad-y: 56px; --fs: 12.5px; --cell: 10px;
  position: relative; width: var(--page-w); min-height: var(--page-h);
  background: #fff; color: var(--ink);
  font-family: var(--font-ui); font-size: var(--fs); line-height: 1.5;
  padding: var(--pad-y) var(--pad-x) 48px;
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum";
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
  overflow-wrap: anywhere; text-align: start;
}
.rc * { box-sizing: border-box; }
.rc .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rc h1, .rc [role="heading"] { margin: 0; }
.rc p { margin: 0; }
.rc .i { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.f-serif { font-family: var(--font-serif); --fs: 13.5px; }
.f-grotesk .rc-title, .f-grotesk .rc-biz-name, .f-grotesk .rc-grand, .f-grotesk th { font-family: var(--font-grotesk); }

.dn-compact { --pad-x: 44px; --pad-y: 40px; --fs: 11.5px; --cell: 6px; }
.dn-spacious { --pad-x: 72px; --pad-y: 68px; --cell: 13px; }

/* Header -------------------------------------------------------------- */
.rc-head { display: flex; gap: 24px; }
.rc-head-l { display: flex; gap: 16px; align-items: flex-start; min-width: 0; flex: 1; }
.logo-top .rc-head-l { flex-direction: column; gap: 12px; }
.rc-head-r { text-align: end; flex: none; max-width: 46%; }
.rc-logo { flex: none; }
.rc-logo img { height: var(--logo, 52px); width: auto; max-width: 200px; object-fit: contain; }
.rc-biz { min-width: 0; }
.rc-biz-name { font-size: 16px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.rc-biz-lines { color: var(--soft); font-size: .92em; margin-top: 4px; line-height: 1.55; }
.rc-contact { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; }
.rc-contact .sep { width: 1px; height: 10px; background: var(--rule-2); display: inline-block; }
.rc-ids { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.rc-ids b { font-weight: 500; color: var(--ink); letter-spacing: .01em; }
.rc-title { font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; color: var(--ink); }
.rc-no { margin-top: 6px; color: var(--soft); }
.rc-no b { color: var(--ink); font-weight: 600; }
.rc-label { color: var(--mute); font-size: .88em; font-weight: 500; margin-bottom: 4px; }

/* Parties + details --------------------------------------------------- */
.rc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin: 36px 0 26px; }
.rc-meta.no-party { grid-template-columns: 1fr; }
.rc-meta.no-party .rc-dl { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.rc-meta.no-dl { grid-template-columns: 1fr; margin-top: 0; }
.rc-party-name { font-size: 14px; font-weight: 600; }
.rc-party { color: var(--soft); }
.rc-party .rc-party-name { color: var(--ink); }
.rc-party-extra { margin-top: 8px; }
.rc-party-extra span { display: block; color: var(--mute); font-size: .88em; }
.rc-party-extra div { color: var(--ink); }
.rc-dl { margin: 0; display: grid; gap: 6px; align-content: start; }
.rc-dl > div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--rule); padding-bottom: 6px; }
.rc-dl dt { color: var(--mute); }
.rc-dl dd { margin: 0; font-weight: 500; text-align: end; }

/* Items ---------------------------------------------------------------- */
.rc-items table { width: 100%; border-collapse: collapse; }
.rc-items th { font-size: .88em; font-weight: 500; color: var(--mute); text-align: start; padding: 8px var(--cell); border-bottom: 1.5px solid var(--ink); white-space: nowrap; }
.rc-items td { padding: var(--cell); border-bottom: 1px solid var(--rule); vertical-align: top; }
.rc-items tr { break-inside: avoid; page-break-inside: avoid; }
.rc-items .c-idx { width: 34px; color: var(--mute); padding-inline-start: 0; white-space: nowrap; }
.rc-items .c-num { text-align: end; white-space: nowrap; }
.rc-items .c-amt { font-weight: 500; }
.rc-items .c-code { color: var(--soft); white-space: nowrap; }
.rc-items .c-unit { color: var(--soft); }
.rc-items tfoot td { border-bottom: 0; padding-top: 12px; }
.rc-item-name { font-weight: 500; }
.rc-item-sub { color: var(--mute); font-size: .9em; margin-top: 2px; }
.rc-unit { color: var(--mute); }
.rc-empty-row td { color: var(--mute); font-style: italic; padding: 18px var(--cell); }

/* Summary -------------------------------------------------------------- */
.rc-summary { display: grid; grid-template-columns: 1fr minmax(240px, 300px); gap: 40px; margin-top: 22px; break-inside: avoid; page-break-inside: avoid; }
.rc-sum-l { display: grid; gap: 16px; align-content: start; color: var(--soft); }
.rc-totals { display: grid; gap: 2px; align-content: start; align-self: start; }
.rc-row { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; color: var(--soft); }
.rc-row .num { color: var(--ink); }
.rc-grand { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 6px; padding-top: 12px; border-top: 1.5px solid var(--ink); font-size: 20px; font-weight: 650; letter-spacing: -.015em; }
.rc-incl { color: var(--mute); font-size: .9em; text-align: end; }
.rc-paid { margin-top: 6px; }
.rc-balance { font-weight: 600; color: var(--ink); }
.rc-balance .num { font-weight: 600; }
.rc-status-row { display: flex; justify-content: flex-end; margin-top: 10px; }
.rc-status { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid currentColor; }
.st-paid { color: #067647; background: #F0FDF5; }
.st-partial { color: #B54708; background: #FFFAEB; }
.st-unpaid { color: #B42318; background: #FEF3F2; }
.rc-words span, .rc-pay span { display: block; color: var(--mute); font-size: .88em; }
.rc-words { color: var(--ink); font-weight: 500; }
.rc-pay { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px 20px; }
.rc-pay b { color: var(--ink); font-weight: 500; }
.rc-breakdown { border-collapse: collapse; font-size: .9em; width: 100%; max-width: 360px; }
.rc-breakdown th { text-align: start; color: var(--mute); font-weight: 500; padding: 4px 8px 4px 0; border-bottom: 1px solid var(--rule-2); }
.rc-breakdown td { padding: 4px 8px 4px 0; color: var(--ink); }
.rc-breakdown .num { text-align: end; }
.rc-qr { justify-self: start; display: inline-grid; gap: 6px; justify-items: center; }
.rc-qr svg { width: 96px; height: 96px; }
.rc-qr svg path, .rc-qr svg rect[fill="black"] { fill: #111; }
.qr-s svg { width: 72px; height: 72px; } .qr-l svg { width: 128px; height: 128px; }
.rc-qr-label { font-size: .85em; color: var(--mute); }
.rc-notes { display: grid; gap: 10px; }
.rc-thanks { color: var(--ink); font-weight: 500; }
.rc-terms p { white-space: pre-line; font-size: .92em; }

/* Signatures + stamp --------------------------------------------------- */
.rc-sign { display: flex; justify-content: space-between; gap: 48px; margin-top: 48px; break-inside: avoid; page-break-inside: avoid; }
.rc-sig { position: relative; width: 210px; margin-inline-start: auto; }
.rc-sig:first-child:not(.rc-sig-auth) { margin-inline-start: 0; }
.rc-sig-mark { height: 54px; display: flex; align-items: flex-end; }
.rc-sig-mark img { max-height: 54px; max-width: 190px; object-fit: contain; }
.rc-sig-type { font-family: var(--font-script); font-size: 30px; line-height: 1; color: #1f2a44; }
.rc-sig-line { border-top: 1px solid var(--ink); margin-top: 4px; }
.rc-sig-label { font-size: .88em; color: var(--mute); margin-top: 6px; }
.rc-sig-label span { display: block; color: var(--ink); font-weight: 500; }
.rc-stamp { position: absolute; width: 96px; height: 96px; object-fit: contain; inset-inline-start: -64px; top: -40px; opacity: .88; transform: rotate(-8deg); mix-blend-mode: multiply; }
.rc-stamp.only { position: static; transform: rotate(-6deg); }

.rc-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-top: 40px; padding-top: 14px; border-top: 1px solid var(--rule); color: var(--mute); font-size: .9em; }
.rc-foot-main { display: grid; gap: 6px; }
.rc-foot-fields { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.rc-foot-fields b { color: var(--soft); font-weight: 500; }

/* ======================= Templates ======================= */

/* Modern — a top rule in the accent, tinted totals card */
.tpl-modern::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--acc); }
.tpl-modern .rc-title { color: var(--acc-ink); }
.tpl-modern .rc-totals { background: var(--acc-tint); border-radius: 10px; padding: 14px 16px 16px; }
.tpl-modern .rc-grand { border-top-color: var(--acc-tint-2); color: var(--acc-ink); font-size: 22px; }
.tpl-modern .rc-items th { border-bottom-color: var(--rule-2); }

/* Minimal — no fills, hairlines, quiet type */
.tpl-minimal { --pad-x: 72px; --pad-y: 72px; }
.tpl-minimal .rc-title { font-weight: 450; font-size: 22px; color: var(--soft); letter-spacing: -.01em; }
.tpl-minimal .rc-no b { color: var(--ink); }
.tpl-minimal .rc-items th { border-bottom: 1px solid var(--rule-2); }
.tpl-minimal .rc-dl > div { border-bottom: 0; padding-bottom: 0; }
.tpl-minimal .rc-grand { border-top: 1px solid var(--rule-2); font-weight: 500; font-size: 22px; }
.tpl-minimal .rc-grand .num { color: var(--acc-ink); }
.tpl-minimal .rc-foot { border-top: 0; }

/* Classic — centred letterhead, ruled grid, small caps */
.tpl-classic .rc-head.hd-center { flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.tpl-classic .rc-biz-name { font-size: 22px; font-weight: 600; }
.tpl-classic .rc-contact, .tpl-classic .rc-ids { justify-content: center; }
.tpl-classic .rc-titlebar { display: flex; justify-content: space-between; align-items: baseline; margin-top: 22px; padding: 10px 0; border-top: 3px double var(--ink); border-bottom: 1px solid var(--ink); }
.tpl-classic .rc-title { font-size: 20px; font-variant: small-caps; letter-spacing: .06em; font-weight: 600; }
.tpl-classic .rc-no { margin: 0; }
.tpl-classic .rc-items table { border: 1px solid var(--rule-2); }
.tpl-classic .rc-items th { background: var(--fill); border: 1px solid var(--rule-2); color: var(--ink); font-weight: 600; }
.tpl-classic .rc-items td { border: 1px solid var(--rule-2); }
.tpl-classic .rc-items .c-idx { padding-inline-start: var(--cell); text-align: center; }
.tpl-classic .rc-grand { border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink); padding-bottom: 8px; }
.tpl-classic .rc-grand .num { color: var(--acc-ink); }

/* Professional — accent band, filled table head */
.tpl-professional { padding-top: 0; }
.tpl-professional .rc-band { display: flex; justify-content: space-between; align-items: center; margin: 0 calc(-1 * var(--pad-x)) 28px; padding: 22px var(--pad-x); background: var(--acc); color: var(--acc-on); }
.tpl-professional .rc-band .rc-title { color: inherit; font-size: 22px; }
.tpl-professional .rc-band .rc-no { color: inherit; opacity: .85; margin: 0; }
.tpl-professional .rc-band .rc-no b { color: inherit; }
.tpl-professional .rc-head.hd-band { flex-direction: column; gap: 0; }
.tpl-professional .rc-head-row { display: flex; gap: 16px; align-items: flex-start; }
.tpl-professional .rc-items th { background: var(--acc-tint); color: var(--acc-ink); border-bottom: 0; font-weight: 600; padding-top: 10px; padding-bottom: 10px; }
.tpl-professional .rc-items .c-idx { padding-inline-start: var(--cell); }
.tpl-professional .rc-grand { background: var(--acc-tint); color: var(--acc-ink); border-top: 0; padding: 12px 14px; border-radius: 6px; }

/* Elegant — serif, airy, italic labels */
.tpl-elegant { --pad-x: 76px; --pad-y: 68px; }
.tpl-elegant .rc-head.hd-center { flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.tpl-elegant .rc-biz-name { font-size: 24px; font-weight: 400; letter-spacing: .01em; }
.tpl-elegant .rc-contact, .tpl-elegant .rc-ids { justify-content: center; }
.tpl-elegant .rc-titlebar { text-align: center; margin-top: 30px; }
.tpl-elegant .rc-title { font-size: 15px; font-weight: 400; letter-spacing: .32em; color: var(--acc-ink); text-transform: none; font-variant: small-caps; }
.tpl-elegant .rc-titlebar .rc-no { margin-top: 2px; }
.tpl-elegant .rc-label, .tpl-elegant .rc-dl dt, .tpl-elegant .rc-items th { font-style: italic; font-weight: 400; }
.tpl-elegant .rc-items th { border-bottom: 1px solid var(--rule-2); }
.tpl-elegant .rc-dl > div { border-bottom: 1px dotted var(--rule-2); }
.tpl-elegant .rc-grand { font-weight: 400; font-size: 26px; border-top: 1px solid var(--rule-2); }
.tpl-elegant .rc-grand span:first-child { font-style: italic; font-size: 16px; }
.tpl-elegant .rc-foot { justify-content: center; text-align: center; border-top: 0; }

/* Bold — oversized title, total as a solid block */
.tpl-bold .rc-head.hd-title { flex-direction: column; gap: 22px; }
.tpl-bold .rc-title { font-size: 58px; line-height: .95; letter-spacing: -.045em; color: var(--acc-ink); font-weight: 700; }
.tpl-bold .rc-head-row { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: start; padding-top: 18px; border-top: 2px solid var(--ink); }
.tpl-bold .rc-head-row .rc-no { margin: 0; text-align: end; font-size: 14px; }
.tpl-bold .rc-items th { font-weight: 700; color: var(--ink); border-bottom-width: 2px; }
.tpl-bold .rc-summary { grid-template-columns: 1fr minmax(260px, 330px); }
.tpl-bold .rc-grand { background: var(--acc); color: var(--acc-on); border: 0; padding: 16px 18px; font-size: 26px; font-weight: 700; margin-top: 10px; }

/* Retail — shop counter: centred, dashed, zebra */
.tpl-retail { --pad-x: 52px; }
.tpl-retail .rc-head.hd-center { flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.tpl-retail .rc-biz-name { font-size: 20px; font-weight: 700; }
.tpl-retail .rc-contact, .tpl-retail .rc-ids { justify-content: center; }
.tpl-retail .rc-titlebar { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; padding: 10px 0; border-top: 1.5px dashed var(--rule-2); border-bottom: 1.5px dashed var(--rule-2); }
.tpl-retail .rc-title { font-size: 15px; font-weight: 700; color: var(--acc-ink); }
.tpl-retail .rc-no { margin: 0; }
.tpl-retail .rc-meta { margin-top: 20px; }
.tpl-retail .rc-items th { border-bottom: 1.5px dashed var(--ink); }
.tpl-retail .rc-items tbody tr:nth-child(even) td { background: var(--fill); }
.tpl-retail .rc-items td { border-bottom: 0; }
.tpl-retail .rc-grand { border-top: 1.5px dashed var(--ink); border-bottom: 3px double var(--ink); padding-bottom: 8px; font-weight: 700; }

/* Compact — dense, for long item lists */
.tpl-compact { --pad-x: 40px; --pad-y: 36px; --fs: 11.5px; --cell: 6px; }
.tpl-compact .rc-title { font-size: 18px; }
.tpl-compact .rc-biz-name { font-size: 14px; }
.tpl-compact .rc-meta { margin: 20px 0 14px; gap: 20px; }
.tpl-compact .rc-items th { background: var(--fill); border-bottom: 1px solid var(--rule-2); }
.tpl-compact .rc-items .c-idx { padding-inline-start: var(--cell); }
.tpl-compact .rc-grand { font-size: 16px; }
.tpl-compact .rc-sign { margin-top: 28px; }

/* Creative — tinted sidebar holds the facts */
.tpl-creative { padding: 0; }
.tpl-creative .rc-sidegrid { display: grid; grid-template-columns: 232px 1fr; min-height: var(--page-h); }
.tpl-creative .rc-aside { background: var(--acc-tint); padding: 48px 26px; display: grid; gap: 26px; align-content: start; }
.tpl-creative .rc-head.hd-side { flex-direction: column; gap: 14px; }
.tpl-creative .rc-title { font-size: 34px; line-height: 1; letter-spacing: -.04em; color: var(--acc-ink); font-weight: 700; }
.tpl-creative .rc-dl > div { flex-direction: column; gap: 0; border-bottom: 0; padding: 0; }
.tpl-creative .rc-dl dd { text-align: start; }
.tpl-creative .rc-main { padding: 48px 44px 40px; }
.tpl-creative .rc-items th { border-bottom: 2px solid var(--acc); }
.tpl-creative .rc-summary { grid-template-columns: 1fr; gap: 20px; }
.tpl-creative .rc-totals { max-width: 320px; margin-inline-start: auto; width: 100%; }
.tpl-creative .rc-grand { color: var(--acc-ink); font-size: 24px; border-top-color: var(--acc); }
.tpl-creative .rc-meta.no-dl { margin: 0 0 22px; }

/* Luxury — dark letterhead, serif, accent hairline */
.tpl-luxury { padding-top: 0; }
.tpl-luxury .rc-head.hd-band { flex-direction: column; gap: 0; }
.tpl-luxury .rc-band { display: flex; justify-content: space-between; align-items: baseline; margin: 0 calc(-1 * var(--pad-x)) 30px; padding: 30px var(--pad-x) 26px; background: #14161C; color: #F4F1EA; border-bottom: 3px solid var(--acc); }
.tpl-luxury .rc-band .rc-title { color: inherit; font-size: 26px; font-weight: 400; letter-spacing: .04em; }
.tpl-luxury .rc-band .rc-no { color: #C9C3B6; margin: 0; }
.tpl-luxury .rc-band .rc-no b { color: #F4F1EA; }
.tpl-luxury .rc-head-row { display: flex; gap: 18px; align-items: flex-start; }
.tpl-luxury .rc-biz-name { font-size: 20px; font-weight: 600; }
.tpl-luxury .rc-items th { font-style: italic; font-weight: 400; border-bottom: 1px solid var(--ink); }
.tpl-luxury .rc-grand { font-size: 26px; font-weight: 600; border-top: 1px solid var(--acc); }
.tpl-luxury .rc-grand .num { color: var(--acc-ink); }


/* Rent statement — the classic "Received with thanks…" paragraph -------- */
.rc-statement { margin: 4px 0 6px; padding: 22px 24px; border: 1px solid var(--rule-2); border-radius: 8px; background: var(--fill); }
.rc-statement p { font-size: 15px; line-height: 1.85; color: var(--ink); }
.rc-statement b { font-weight: 650; }
.rc-statement .st-words { color: var(--soft); font-style: italic; }
.f-serif .rc-statement p { font-size: 16px; }
.tpl-classic .rc-statement, .tpl-elegant .rc-statement, .tpl-luxury .rc-statement { background: none; border-width: 0 0 0 3px; border-color: var(--acc); border-radius: 0; padding: 6px 0 6px 20px; }

/* TDS + net received */
.rc-tds { color: var(--soft); }
.rc-net { margin-top: 4px; padding-top: 8px; border-top: 1px dashed var(--rule-2); font-weight: 650; color: var(--ink); font-size: 14px; }
.rc-net .num { font-weight: 650; }

/* Revenue stamp box beside the landlord's signature */
.rc-sig.has-rev { padding-inline-end: 0; }
.rc-revstamp { position: absolute; inset-inline-start: -86px; bottom: 28px; width: 70px; height: 78px; border: 1.5px dashed var(--rule-2); border-radius: 4px; display: grid; place-items: center; text-align: center; font-size: 9.5px; line-height: 1.3; color: var(--mute); }

/* Agreement terms attached to a receipt */
.rc-agree { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--rule); break-inside: avoid; }
.rc-agree-title { font-size: 13px; font-weight: 650; margin: 0 0 10px; color: var(--ink); }
.rc-agree ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; color: var(--soft); counter-reset: t; }
.rc-agree li { counter-increment: t; display: grid; grid-template-columns: 22px 1fr; line-height: 1.55; }
.rc-agree li::before { content: counter(t) "."; color: var(--ink); font-weight: 600; }
.rc-agree-accept { margin-top: 12px !important; font-size: .92em; color: var(--mute); font-style: italic; }

/* RTL ------------------------------------------------------------------ */
.rc[dir="rtl"] .rc-contact > span, .rc[dir="rtl"] .rc-ids b, .rc[dir="rtl"] .num, .rc[dir="rtl"] .c-num, .rc[dir="rtl"] .rc-no b, .rc[dir="rtl"] .rc-dl dd { unicode-bidi: isolate; }
.rc[dir="rtl"] .rc-contact > span, .rc[dir="rtl"] .rc-ids b, .rc[dir="rtl"] .rc-no b { direction: ltr; }
.rc[dir="rtl"] .rc-items .c-num, .rc[dir="rtl"] .rc-dl dd { text-align: left; }
.rc[dir="rtl"] .rc-head-r { text-align: left; }
.rc[dir="rtl"] .rc-stamp { transform: rotate(8deg); }

/* ======================= Thermal ======================= */
.rc-thermal {
  --pad-x: 14px; font-family: var(--font-mono); font-size: 11.5px; line-height: 1.45; color: #111;
  width: var(--page-w); min-height: 0; padding: 18px var(--pad-x) 26px; text-align: start;
}
.rc-thermal.t58 { --pad-x: 9px; font-size: 10.5px; }
.rc-thermal > * + * { margin-top: 2px; }
.th-logo { display: flex; justify-content: center; margin-bottom: 6px; }
.th-logo img { height: 40px; width: auto; filter: grayscale(1) contrast(1.2); }
.t58 .th-logo img { height: 32px; }
.th-name { text-align: center; font-weight: 500; font-size: 1.3em; letter-spacing: .02em; }
.th-c { text-align: center; }
.th-sm { font-size: .9em; color: #333; }
.th-title { text-align: center; font-weight: 500; letter-spacing: .12em; margin: 6px 0 4px; }
.th-rule { border-top: 1px dashed #111; margin: 8px 0 !important; }
.th-kv { display: flex; justify-content: space-between; gap: 8px; }
.th-kv > :last-child { text-align: end; white-space: nowrap; }
.th-kv > :first-child { min-width: 0; }
.th-item { margin-top: 5px; break-inside: avoid; }
.th-desc { font-weight: 500; }
.th-total { display: flex; justify-content: space-between; font-weight: 500; font-size: 1.35em; margin: 6px 0 !important; padding: 4px 0; border-top: 1px solid #111; border-bottom: 1px solid #111; }
.th-status { display: flex; justify-content: center; margin-top: 8px !important; }
.th-status .rc-status { background: none !important; color: #111 !important; border-color: #111; font-family: var(--font-mono); font-weight: 500; }
.th-qr { display: grid; justify-items: center; gap: 4px; margin-top: 10px !important; text-align: center; }
.th-qr svg { width: 120px; height: 120px; }
.t58 .th-qr svg { width: 100px; height: 100px; }
.th-thanks { font-weight: 500; }
.th-sign { margin-top: 26px !important; }
.th-sign div { border-top: 1px solid #111; padding-top: 4px; text-align: center; font-size: .9em; }
.th-tear { position: absolute; left: 0; right: 0; bottom: -8px; height: 8px; background: linear-gradient(-45deg, transparent 6px, #fff 0) 0 0 / 12px 8px repeat-x, linear-gradient(45deg, transparent 6px, #fff 0) 0 0 / 12px 8px repeat-x; }

/* Export rasteriser (html2canvas) measures text without OpenType features — keep spacing plain */
.is-export, .is-export * { letter-spacing: 0 !important; font-feature-settings: normal !important; font-variant-numeric: normal !important; font-kerning: none; }
.is-export .i { width: 12px; height: 12px; }

/* ======================= Rent Slip ======================= */
.tpl-rentslip { padding: 40px; font-family: var(--font-serif); }
.slip { background: #fff; border: 2px solid #111; padding: 28px 42px 30px; color: #111; font-size: 15.5px; line-height: 1.5; break-inside: avoid; }
.slip-title { text-align: center; font-size: 29px; font-weight: 600; letter-spacing: .01em; margin: 0 0 40px; }
.slip-row { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.slip-row > span:last-child { min-width: 220px; }
.slip b { font-weight: 600; }
.slip-text { line-height: 2.7; text-align: start; margin: 0; }
.slip .bl { padding: 0 .3em; color: var(--acc-ink); font-weight: 600; text-decoration: underline; text-decoration-color: #111; text-decoration-thickness: 1.3px; text-underline-offset: 6px; text-decoration-skip-ink: none; }
.slip .bl.empty { display: inline-block; vertical-align: baseline; height: 1em; border-bottom: 1.3px solid #111; text-decoration: none; padding: 0; margin: 0 .3em; }
.slip-mid { display: flex; justify-content: flex-end; min-height: 128px; padding-inline-end: 96px; margin-top: 4px; }
.slip-stamp { width: 96px; height: 116px; border: 1.5px dashed #6B8790; border-radius: 3px; display: grid; place-items: center; text-align: center; font-size: 11px; line-height: 1.35; color: #4C6670; background: #fff; font-family: var(--font-ui); text-transform: uppercase; letter-spacing: .08em; }
.slip-foot { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; }
.slip-pay { align-self: start; padding-top: 52px; }
.slip-ref { font-size: .88em; color: #3D4E55; }
.slip-bal { margin-top: 8px; }
.slip-sign { position: relative; min-width: 220px; display: grid; gap: 8px; }
.slip-mark { height: 46px; display: flex; align-items: flex-end; }
.slip-mark img { max-height: 46px; max-width: 200px; object-fit: contain; mix-blend-mode: multiply; }
.slip-mark .rc-sig-type { font-size: 30px; }
.slip-name { margin-top: -6px; font-size: .92em; color: #2B3A40; }
.slip-seal { position: absolute; width: 84px; height: 84px; object-fit: contain; inset-inline-end: -26px; top: -40px; opacity: .85; transform: rotate(-8deg); mix-blend-mode: multiply; }
.slip-footnote { margin-top: 22px; padding-top: 10px; border-top: 1px solid rgba(0, 0, 0, .18); font-size: 12.5px; color: #3D4E55; }

/* ======================= Tax Invoice Grid ======================= */
.tpl-taxgrid { --g: #111; padding: 36px 40px 40px; font-size: 12.5px; color: #111; }
.tpl-taxgrid .g-title { text-align: center; font-family: var(--font-serif); font-size: 22px; font-weight: 600; letter-spacing: .06em; margin-bottom: 14px; }
.tpl-taxgrid table { width: 100%; border-collapse: collapse; }
.tpl-taxgrid td, .tpl-taxgrid th { border: 1px solid var(--g); vertical-align: top; padding: 8px 10px; }
.g-box + .g-items, .g-items + .g-box { margin-top: -1px; }
.g-seller { width: 64%; }
.g-seller .rc-logo { float: inline-end; margin: 0 0 6px 10px; }
.g-name { font-size: 19px; font-weight: 700; letter-spacing: .01em; text-transform: uppercase; margin-bottom: 3px; color: var(--acc-ink); }
.g-line { line-height: 1.55; }
.g-line b, .g-pair b, .g-kv span:first-child, .g-to, .g-tot b { font-weight: 600; }
.g-meta .g-pair + .g-pair { margin-top: 5px; }
.g-meta-2 { vertical-align: top; }
.g-pair { line-height: 1.5; }
.g-buyer { line-height: 1.55; }
.g-to { font-style: italic; text-decoration: underline; margin-bottom: 2px; }
.g-bname { font-weight: 700; font-size: 13.5px; text-transform: uppercase; }
.g-items th { font-weight: 700; text-align: center; padding: 9px 8px; background: #fff; }
.g-items th.g-r, .g-items td.g-r { text-align: end; }
.g-items .g-c { text-align: center; white-space: nowrap; }
.g-items .g-r { white-space: nowrap; }
.g-items .g-no { width: 46px; text-align: center; }
.g-items tbody td { border-top: 0; border-bottom: 0; }
.g-items tbody tr:first-child td { border-top: 1px solid var(--g); }
.g-intro td { padding-bottom: 2px; }
.rc-part, .tpl-taxgrid .rc-part { line-height: 1.6; }
.rc-part span { font-weight: 600; }
.g-desc { font-weight: 500; }
.g-note { color: #444; font-size: .92em; }
.g-fill td { height: 56px; }
.g-tot td { border-top: 1px solid var(--g) !important; border-bottom: 1px solid var(--g) !important; padding: 6px 10px; }
.g-tot td:first-child { border-inline-end: 1px solid var(--g); }
.g-grand td { font-size: 14px; }
.g-grand td:last-child b { font-size: 15px; color: var(--acc-ink); }
.g-after td { padding: 10px 12px; }
.g-words { margin-bottom: 10px; }
.g-words b { font-weight: 700; }
.g-bank { margin-top: 6px; }
.g-bank-h { font-weight: 700; text-decoration: underline; margin-bottom: 4px; }
.g-kv { display: grid; grid-template-columns: 150px 1fr; line-height: 1.6; }
.g-after .rc-pay { margin-bottom: 8px; }
.g-notes .rc-notes, .g-notes .rc-terms { margin: 0; }
.g-signrow { display: flex; justify-content: space-between; align-items: flex-end; min-height: 110px; gap: 24px; }
.g-sign { margin-inline-start: auto; text-align: center; min-width: 210px; position: relative; color: #333; }
.g-recv { margin-inline-start: 0; }
.g-mark { height: 54px; display: flex; align-items: flex-end; justify-content: center; }
.g-mark img { max-height: 54px; max-width: 200px; object-fit: contain; mix-blend-mode: multiply; }
.g-mark .rc-sig-type { font-size: 30px; }
.g-sname { font-weight: 600; color: #111; }
.g-seal { position: absolute; width: 84px; height: 84px; object-fit: contain; inset-inline-start: -70px; top: -20px; opacity: .85; transform: rotate(-8deg); mix-blend-mode: multiply; }
.tpl-taxgrid .rc-foot { margin-top: 14px; }
/* Particulars + bank details on the other templates */
.rc-particulars { margin: 0 0 14px; padding: 10px 12px; border-inline-start: 3px solid var(--acc); background: var(--fill); border-radius: 4px; }
.rc-bank dl { margin: 0; display: grid; gap: 2px; }
.rc-bank dl > div { display: grid; grid-template-columns: 110px 1fr; gap: 8px; }
.rc-bank dt { color: var(--mute); }
.rc-bank dd { margin: 0; color: var(--ink); font-weight: 500; }
