/* A4 tax invoice, laid out to match SamSolve invoice SAM/2026-27/010. */
@font-face { font-family: "Lato"; font-weight: 400; font-style: normal; src: url(fonts/lato-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 700; font-style: normal; src: url(fonts/lato-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 400; font-style: italic; src: url(fonts/lato-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 700; font-style: italic; src: url(fonts/lato-latin-700-italic.woff2) format("woff2"); }

/* Lato has no ₹ sign: take just that character from Noto Sans, as the PDF does. */
@font-face { font-family: "Lato"; font-weight: 400; src: url(fonts/noto-sans-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+20B9; }
@font-face { font-family: "Lato"; font-weight: 700; src: url(fonts/noto-sans-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+20B9; }

.inv { --ib: #1B4F8C; --in: #12305A; --il: #C5D0DE; --it: #EEF3FA;
  width: 210mm; min-height: 297mm; padding: 6.5mm 15mm 6mm; background: #fff; color: #222;
  font: 8.4pt/1.4 "Lato", "Segoe UI", Arial, sans-serif; box-sizing: border-box; text-align: left; }
.inv * { box-sizing: border-box; }
.inv table { width: 100%; border-collapse: collapse; }
.inv th, .inv td { font-size: inherit; }
.inv .c { text-align: center; } .inv .r { text-align: right; }

.inv-head { display: flex; justify-content: space-between; align-items: flex-start; }
.inv-logo { min-height: 10mm; }
.inv-logo img { display: block; height: 24.5mm; width: auto; max-width: 70mm; object-fit: contain; }
.inv-title { text-align: right; padding-top: 5mm; }
.inv-title h1 { margin: 0; color: var(--ib); font-size: 17.5pt; line-height: 1.1; font-weight: 700; }
.inv-copy { font-size: 6.4pt; color: #555; margin-top: 4px; letter-spacing: 0.02em; }
.inv-rule { height: 2.5px; background: var(--ib); margin: 3mm 0 3mm; }

.inv-meta th, .inv-meta td { border: 1px solid var(--il); padding: 3.5px 8px; text-align: left; font-weight: 400; }
.inv-meta th { background: var(--it); color: var(--ib); font-weight: 700; width: 16%; }
.inv-meta td { width: 34%; }

.inv-two { display: grid; grid-template-columns: 1fr 1fr; margin-top: 2.6mm; border: 1px solid var(--il); }
.inv-two > section + section { border-left: 1px solid var(--il); }
.inv-two h3 { margin: 0; background: var(--ib); color: #fff; font-size: 8.3pt; font-weight: 700; padding: 5px 8px; }
.inv-box { padding: 5px 8px 6px; line-height: 1.42; }
.inv-box b { font-weight: 700; }
.inv-party { color: var(--ib); font-weight: 700; margin-bottom: 2px; }
.inv-box ul { margin: 0; padding-left: 15px; } .inv-box li { margin: 0 0 1px; line-height: 1.42; }

.inv-items { margin-top: 2.6mm; }
.inv-items th { background: var(--ib); color: #fff; padding: 5px 8px; font-weight: 700; border: 1px solid var(--ib); text-align: left; }
.inv-items th.c { text-align: center; } .inv-items th.r { text-align: right; }
.inv-items th.dark { background: var(--in); border-color: var(--in); }
.inv-items th:nth-child(1) { width: 5%; } .inv-items th:nth-child(3) { width: 9%; } .inv-items th:nth-child(4), .inv-items th:nth-child(5) { width: 16.2%; }
.inv-items td { border: 1px solid var(--il); padding: 5px 8px 6px; vertical-align: top; }
.inv-item-title { color: var(--ib); font-weight: 700; line-height: 1.42; }
.inv-items .desc p { margin: 4px 0 0; line-height: 1.45; }
.inv-items .desc ul { margin: 4px 0 0; padding-left: 16px; } .inv-items .desc li { margin: 0; line-height: 1.42; }
.inv li::marker { color: var(--ib); }

.inv-totals-wrap { display: flex; justify-content: flex-end; margin-top: 2.2mm; }
.inv .inv-totals { width: 50%; }
.inv-totals td { border: 1px solid var(--il); padding: 3.6px 8px; text-align: right; }
.inv-totals td:first-child { width: 59%; }
.inv-totals tr.strong td { font-weight: 700; } .inv-totals tr.strong td:first-child { color: var(--ib); }
.inv-totals tr.tint td { background: var(--it); font-weight: 700; } .inv-totals tr.tint td:first-child { color: var(--ib); }
.inv-totals tr.navy td { background: var(--in); border-color: var(--in); color: #fff; font-weight: 700; }

.inv-words { margin-top: 2.6mm; border: 1px solid var(--il); background: #F5F8FC; padding: 6px 8px; }
.inv-words b { color: var(--ib); }

.inv-summary h4 { color: var(--ib); margin: 2.4mm 0 1.4mm; font-size: 9pt; font-weight: 700; }
.inv-tax th { background: var(--ib); color: #fff; padding: 4px 8px; font-weight: 700; border: 1px solid #fff; border-top-color: var(--ib); text-align: right; }
.inv-tax th:first-child { border-left-color: var(--ib); } .inv-tax th:last-child { border-right-color: var(--ib); }
.inv-tax th.c { text-align: center; }
.inv-tax td { border: 1px solid var(--il); padding: 4px 8px; }
.inv-tax tr.total td { background: var(--it); color: var(--ib); font-weight: 700; }
.inv-summary + .inv-two { margin-top: 2.2mm; }

.inv-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 10mm; margin-top: 3.4mm; }
.inv-note { flex: 0 0 52%; border-top: 1px solid var(--il); padding-top: 6px; font-style: italic; color: #555; font-size: 8pt; line-height: 1.6; }
.inv-sign { flex: 0 0 37%; border-top: 1.5px solid var(--ib); padding-top: 6px; text-align: right; line-height: 1.9; }
.inv-sign-line { color: var(--ib); font-weight: 700; }

@page { size: A4; margin: 0; }
@media print {
  .inv { min-height: 0; }
  .inv tr, .inv-two, .inv-totals-wrap, .inv-words, .inv-summary, .inv-foot { break-inside: avoid; }
}

.inv-sac { color: #555; font-size: 7.6pt; margin-top: 1px; }
.inv-bank.has-qr { position: relative; padding-right: 92px; min-height: 86px; }
.inv-qrbox { position: absolute; right: 8px; top: 6px; text-align: center; font-size: 6.6pt; color: #555; }
.inv-qr { display: block; width: 70px; height: 70px; margin: 0 auto 2px; }
.inv-signature { display: block; margin: 4px 0 0 auto; max-height: 34px; max-width: 150px; object-fit: contain; }
