/* =====================================================================
   10 mẫu hóa đơn / phiếu in (trang In hóa đơn).
   - Mẫu khổ A4/A5 có màu riêng từng mẫu.
   - Mẫu máy in nhiệt (80mm, 58mm, tem dán) chỉ dùng màu rất đậm vì máy in nhiệt in đen trắng.
   ===================================================================== */
.print-hint { margin-top: -6px; text-align: center; }
#inv-root { width: 100%; display: flex; justify-content: center; overflow-x: auto; }
.inv {
  --ink: #111; --mute: #555; --line: #222; --soft: #d9d9d9; --acc: #111; --acc-soft: #eee;
  background: #fff; color: var(--ink); box-shadow: 0 2px 18px rgba(15, 23, 42, .16);
  font: 12.5px/1.45 'Be Vietnam Pro', Arial, sans-serif; position: relative; flex: none;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; overflow-wrap: anywhere;
}
.inv table { width: 100%; border-collapse: collapse; }
.inv td, .inv th { padding: 3px 0; vertical-align: top; text-align: left; }
.inv .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inv .c { text-align: center; }
.inv .b { font-weight: 600; }
.inv .k { color: var(--mute); }
.inv .qr { display: block; width: 34mm; height: 34mm; }
.inv .bank { font-size: .9em; color: var(--mute); }
.inv .sums td { padding: 2px 0; }
.inv .sums .grand td { font-weight: 700; font-size: 1.12em; padding-top: 5px; border-top: 1px solid var(--line); }
.inv .signs { display: flex; justify-content: space-around; text-align: center; margin-top: 18px; min-height: 30mm; font-weight: 600; }
.inv .signs i { font-weight: 400; color: var(--mute); font-size: .9em; }
.inv .words { margin-top: 6px; }
.inv h1 { margin: 0; letter-spacing: .02em; }
.inv .items .u { color: var(--mute); font-size: .86em; margin-left: 5px; font-weight: 400; }
.inv .items .n { color: var(--mute); }

/* ---------- 1. Bill nhiệt 80mm ---------- */
.inv-nhiet-80 { width: 80mm; padding: 5mm 4mm 7mm; font-family: 'Lexend', 'Be Vietnam Pro', sans-serif; font-size: 12px; color: #0f172a; }
.inv-nhiet-80 .shop { font-size: 17px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; line-height: 1.25; }
.inv-nhiet-80 .sub { font-size: 11px; color: #334155; margin-top: 1mm; }
.inv-nhiet-80 .title { display: flex; align-items: center; gap: 2mm; margin: 3mm 0 2mm; font-weight: 700; font-size: 11.5px; letter-spacing: .12em; }
.inv-nhiet-80 .title::before, .inv-nhiet-80 .title::after { content: ''; flex: 1; border-top: 1.5px solid #0f172a; }
.inv-nhiet-80 .meta { display: flex; justify-content: space-between; gap: 3mm; }
.inv-nhiet-80 .meta small { display: block; font-size: 9.5px; color: #475569; text-transform: uppercase; letter-spacing: .08em; }
.inv-nhiet-80 .meta b { font-size: 12.5px; }
.inv-nhiet-80 .who { margin-top: 2mm; padding: 1.5mm 2mm; border: 1px solid #0f172a; border-radius: 2mm; line-height: 1.4; }
.inv-nhiet-80 .list { margin-top: 2.5mm; border-top: 1.5px dashed #0f172a; padding-top: 1.5mm; }
.inv-nhiet-80 .list.small { font-size: 11px; }
.inv-nhiet-80 .it { padding: 1mm 0; }
.inv-nhiet-80 .nm { font-weight: 600; }
.inv-nhiet-80 .ln { display: flex; align-items: baseline; gap: 1.5mm; }
.inv-nhiet-80 .ln i { flex: 1; border-bottom: 1.5px dotted #64748b; transform: translateY(-3px); }
.inv-nhiet-80 .ln span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.inv-nhiet-80 .total { display: flex; justify-content: space-between; align-items: center; margin-top: 2.5mm; background: #0f172a; color: #fff; padding: 2.2mm 3mm; border-radius: 1.5mm; }
.inv-nhiet-80 .total span { font-size: 11px; letter-spacing: .1em; font-weight: 600; }
.inv-nhiet-80 .total b { font-size: 17px; }
.inv-nhiet-80 .pay { margin-top: 2mm; }
.inv-nhiet-80 .pill { display: inline-block; border: 1px solid #0f172a; border-radius: 99px; padding: .5mm 3mm; font-size: 11px; }
.inv-nhiet-80 .qrbox { margin-top: 3mm; border-top: 1.5px dashed #0f172a; padding-top: 2.5mm; text-align: center; }
.inv-nhiet-80 .cap { font-weight: 600; font-size: 11px; margin-bottom: 1.5mm; }
.inv-nhiet-80 .frame { display: inline-block; padding: 2mm; position: relative;
  background: linear-gradient(#0f172a, #0f172a) top left / 5mm 1.5px, linear-gradient(#0f172a, #0f172a) top left / 1.5px 5mm,
    linear-gradient(#0f172a, #0f172a) top right / 5mm 1.5px, linear-gradient(#0f172a, #0f172a) top right / 1.5px 5mm,
    linear-gradient(#0f172a, #0f172a) bottom left / 5mm 1.5px, linear-gradient(#0f172a, #0f172a) bottom left / 1.5px 5mm,
    linear-gradient(#0f172a, #0f172a) bottom right / 5mm 1.5px, linear-gradient(#0f172a, #0f172a) bottom right / 1.5px 5mm; background-repeat: no-repeat; }
.inv-nhiet-80 .qr { width: 40mm; height: 40mm; }
.inv-nhiet-80 .bank { text-align: center; margin-top: 1mm; color: #334155; }
.inv-nhiet-80 .foot { margin-top: 3.5mm; padding-top: 2mm; border-top: 1.5px dashed #0f172a; font-style: italic; }

/* ---------- 2. Bill nhiệt 80mm nổi bật ---------- */
.inv-nhiet-80-dam { width: 80mm; padding: 0 0 4mm; font-size: 12px; color: #1c0a0a; }
.inv-nhiet-80-dam .band { background: #6b0f0f; color: #fff; text-align: center; padding: 5mm 3mm 4mm; }
.inv-nhiet-80-dam .band .shop { font: 600 21px/1.15 'Oswald', 'Be Vietnam Pro', sans-serif; text-transform: uppercase; letter-spacing: .04em; }
.inv-nhiet-80-dam .band .sub { font-size: 10.5px; opacity: .92; margin-top: 1mm; }
.inv-nhiet-80-dam .pad { padding: 0 4mm; }
.inv-nhiet-80-dam .meta { display: flex; justify-content: space-between; gap: 2mm; margin-top: 3mm; padding-bottom: 2mm; border-bottom: 2px solid #6b0f0f; }
.inv-nhiet-80-dam .meta small { display: block; font: 500 9.5px 'Oswald', sans-serif; letter-spacing: .12em; color: #6b0f0f; }
.inv-nhiet-80-dam .meta b { font-size: 13px; }
.inv-nhiet-80-dam .who { margin-top: 2mm; font-size: 11.5px; }
.inv-nhiet-80-dam .list { list-style: none; margin: 2mm 0 0; padding: 0; }
.inv-nhiet-80-dam .list li { display: flex; gap: 2mm; align-items: flex-start; padding: 1.6mm 0; border-bottom: 1px dotted #6b0f0f; }
.inv-nhiet-80-dam .no { flex: none; width: 5mm; height: 5mm; border-radius: 50%; background: #6b0f0f; color: #fff; display: grid; place-items: center; font-size: 9.5px; font-weight: 700; margin-top: .3mm; }
.inv-nhiet-80-dam .nm { flex: 1; font-weight: 600; }
.inv-nhiet-80-dam .nm small { display: block; font-weight: 400; color: #57534e; font-size: 10.5px; }
.inv-nhiet-80-dam .list b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.inv-nhiet-80-dam .sums.mini { margin-top: 2mm; font-size: 11px; }
.inv-nhiet-80-dam .sums.mini .grand { display: none; }
.inv-nhiet-80-dam .total { margin-top: 3mm; border: 2.5px solid #6b0f0f; border-radius: 2mm; text-align: center; padding: 2mm; }
.inv-nhiet-80-dam .total small { display: block; font: 500 10px 'Oswald', sans-serif; letter-spacing: .16em; color: #6b0f0f; }
.inv-nhiet-80-dam .total b { font: 600 24px/1.2 'Oswald', sans-serif; }
.inv-nhiet-80-dam .pay { margin-top: 1.5mm; font-weight: 600; }
.inv-nhiet-80-dam .qrwrap { margin-top: 3mm; text-align: center; }
.inv-nhiet-80-dam .qr { margin: 0 auto 1mm; width: 40mm; height: 40mm; }
.inv-nhiet-80-dam .foot { margin-top: 3mm; font: 500 12px 'Oswald', sans-serif; letter-spacing: .05em; color: #6b0f0f; }
.inv-nhiet-80-dam .zig { height: 3mm; margin-top: 3mm; background: linear-gradient(-45deg, #fff 1.5mm, transparent 0) 0 0 / 3mm 3mm, linear-gradient(45deg, #fff 1.5mm, #6b0f0f 0) 0 0 / 3mm 3mm; }

/* ---------- 3. Bill nhiệt 58mm kiểu máy tính tiền ---------- */
.inv-nhiet-58 { width: 58mm; padding: 3mm 2.5mm 6mm; font: 10.5px/1.45 'IBM Plex Mono', ui-monospace, monospace; color: #052e16; }
.inv-nhiet-58 .shop { font-size: 13px; font-weight: 700; text-transform: uppercase; margin: .5mm 0; }
.inv-nhiet-58 .stars { overflow: hidden; white-space: nowrap; letter-spacing: -.02em; color: #14532d; }
.inv-nhiet-58 .dash { border-top: 1px dashed #052e16; margin: 1.5mm 0; }
.inv-nhiet-58 .nm { font-weight: 600; }
.inv-nhiet-58 .line { display: flex; justify-content: space-between; gap: 6px; white-space: pre-wrap; }
.inv-nhiet-58 .line span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.inv-nhiet-58 .line.grand { font-weight: 700; font-size: 14px; margin: 1mm 0; padding: 1mm 0; border-top: 2px solid #052e16; border-bottom: 2px solid #052e16; }
.inv-nhiet-58 .pay { margin: 1.5mm 0; }
.inv-nhiet-58 .qr { margin: 2mm auto 1mm; width: 34mm; height: 34mm; }

/* ---------- 4. A5 cổ điển (đỏ rượu + vàng đồng, chữ có chân) ---------- */
.inv-a5-co-dien { --wine: #7a1f2b; --gold: #b08d57; width: 148mm; min-height: 210mm; padding: 5mm; background: #fffdf6; font: 11.5px/1.42 'Lora', Georgia, serif; color: #2b1d16; }
.inv-a5-co-dien .frame { border: 3px double var(--wine); outline: 1px solid var(--gold); outline-offset: -6px; padding: 5mm 7mm; min-height: calc(210mm - 10mm); box-sizing: border-box; display: flex; flex-direction: column; }
.inv-a5-co-dien .shop { font-size: 19px; font-weight: 700; color: var(--wine); text-transform: uppercase; letter-spacing: .06em; }
.inv-a5-co-dien .sub { font-size: 11px; color: #6b5245; }
.inv-a5-co-dien .orn { text-align: center; color: var(--gold); letter-spacing: .6em; margin: 1mm 0 0; font-size: 10px; }
.inv-a5-co-dien h1 { font-size: 21px; font-weight: 600; font-style: italic; color: var(--wine); letter-spacing: .01em; }
.inv-a5-co-dien .meta { margin: 1mm 0 3mm; color: #6b5245; }
.inv-a5-co-dien .cust { margin-bottom: 2.5mm; padding: 1.5mm 3mm; border-left: 3px solid var(--gold); background: #faf3e3; line-height: 1.45; display: grid; grid-template-columns: 1fr 1fr; gap: 0 4mm; }
.inv-a5-co-dien .cust .k { color: var(--wine); font-weight: 600; }
.inv-a5-co-dien .items th { color: var(--wine); font-weight: 700; font-size: .9em; border-top: 1.5px solid var(--wine); border-bottom: 1.5px solid var(--wine); padding: 1.5mm 2px; }
.inv-a5-co-dien .items td { border-bottom: 1px solid #e6d8bf; padding: 1mm 2px; }
.inv-a5-co-dien .sums { width: 58%; margin: 1.5mm 0 0 auto; }
.inv-a5-co-dien .sums .grand td { color: var(--wine); border-top: 1.5px solid var(--wine); font-size: 1.2em; }
.inv-a5-co-dien .words { font-size: .95em; text-align: right; margin-top: 1mm; }
.inv-a5-co-dien .row-end { display: flex; justify-content: space-between; align-items: flex-end; gap: 4mm; margin-top: 3mm; }
.inv-a5-co-dien .pm { margin-top: 1.5mm; }
.inv-a5-co-dien .qr { width: 24mm; height: 24mm; padding: 1.5mm; border: 1px solid var(--gold); background: #fff; }
.inv-a5-co-dien .foot { margin-top: auto !important; padding-top: 2mm; }
.inv-a5-co-dien .foot { margin-top: 2mm; color: #6b5245; font-style: italic; }

/* ---------- 5. A4 doanh nghiệp (xanh dương) ---------- */
.inv-a4-doanh-nghiep { --blue: #1d4ed8; --navy: #172554; --sky: #eff6ff; width: 210mm; min-height: 297mm; padding: 0; font-size: 12.5px; display: flex; color: #0f172a; }
.inv-a4-doanh-nghiep .strip { flex: none; width: 7mm; background: linear-gradient(180deg, var(--navy), var(--blue) 60%, #60a5fa); }
.inv-a4-doanh-nghiep .page { flex: 1; padding: 13mm 14mm 12mm 12mm; display: flex; flex-direction: column; position: relative; }
.inv-a4-doanh-nghiep header { display: flex; justify-content: space-between; gap: 10mm; padding-bottom: 5mm; border-bottom: 2px solid var(--blue); }
.inv-a4-doanh-nghiep .ibrand { display: flex; gap: 4mm; align-items: center; }
.inv-a4-doanh-nghiep .mono { width: 17mm; height: 17mm; border-radius: 3mm; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 22px; flex: none; }
.inv-a4-doanh-nghiep .shop { font-size: 19px; font-weight: 800; color: var(--navy); text-transform: uppercase; }
.inv-a4-doanh-nghiep .sub { color: #475569; }
.inv-a4-doanh-nghiep .doc { text-align: right; flex: none; max-width: 46%; }
.inv-a4-doanh-nghiep .doc h1 { font-size: 22px; line-height: 1.15; color: var(--blue); font-weight: 800; }
.inv-a4-doanh-nghiep .doc .no { margin-top: 2mm; }
.inv-a4-doanh-nghiep .doc .dt { color: #475569; }
.inv-a4-doanh-nghiep .parties { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; margin: 6mm 0 5mm; }
.inv-a4-doanh-nghiep .parties section { background: var(--sky); border-radius: 2.5mm; padding: 3.5mm 4mm; line-height: 1.6; border-top: 3px solid var(--blue); }
.inv-a4-doanh-nghiep .parties .cap { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; color: var(--blue); }
.inv-a4-doanh-nghiep .parties b { font-size: 14px; }
.inv-a4-doanh-nghiep .items th { background: var(--blue); color: #fff; padding: 2.5mm 3mm; font-weight: 600; font-size: 11.5px; }
.inv-a4-doanh-nghiep .items th:first-child { border-radius: 2mm 0 0 2mm; }
.inv-a4-doanh-nghiep .items th:last-child { border-radius: 0 2mm 2mm 0; }
.inv-a4-doanh-nghiep .items td { padding: 2.5mm 3mm; border-bottom: 1px solid #dbeafe; }
.inv-a4-doanh-nghiep .items tbody tr:nth-child(even) td { background: #f8fbff; }
.inv-a4-doanh-nghiep .items .amt { font-weight: 700; color: var(--navy); }
.inv-a4-doanh-nghiep .row-end { display: flex; gap: 8mm; margin-top: 5mm; }
.inv-a4-doanh-nghiep .left { flex: 1; }
.inv-a4-doanh-nghiep .words span { display: block; font-size: 10.5px; letter-spacing: .08em; color: var(--blue); font-weight: 700; text-transform: uppercase; }
.inv-a4-doanh-nghiep .note { margin-top: 3mm; color: #475569; }
.inv-a4-doanh-nghiep .qrrow { display: flex; gap: 4mm; align-items: center; margin-top: 4mm; }
.inv-a4-doanh-nghiep .qr { width: 28mm; height: 28mm; padding: 1.5mm; border: 1.5px solid #bfdbfe; border-radius: 2mm; }
.inv-a4-doanh-nghiep .tot { width: 76mm; flex: none; }
.inv-a4-doanh-nghiep .sums td { padding: 1.5mm 0; }
.inv-a4-doanh-nghiep .sums .grand td { background: var(--navy); color: #fff; padding: 2.5mm 3mm; border: 0; font-size: 15px; }
.inv-a4-doanh-nghiep .pm { margin-top: 2mm; text-align: right; color: #475569; }
.inv-a4-doanh-nghiep .signs { margin-top: 10mm; min-height: 34mm; color: var(--navy); }
.inv-a4-doanh-nghiep footer { margin-top: auto; text-align: center; color: #fff; background: var(--blue); border-radius: 2mm; padding: 2.5mm; }

/* ---------- 6. A4 tối giản (một màu nhấn xanh ngọc) ---------- */
.inv-a4-toi-gian { --teal: #0f766e; width: 210mm; min-height: 297mm; padding: 16mm 18mm 12mm; font: 13px/1.6 'IBM Plex Sans', 'Be Vietnam Pro', Arial, sans-serif; color: #1f2933; display: flex; flex-direction: column; }
.inv-a4-toi-gian .muted { color: #6b7280; }
.inv-a4-toi-gian header { display: flex; justify-content: space-between; align-items: flex-start; }
.inv-a4-toi-gian .dot { width: 9mm; height: 9mm; border-radius: 50%; background: var(--teal); margin-bottom: 3mm; }
.inv-a4-toi-gian .shop { font-size: 17px; font-weight: 600; }
.inv-a4-toi-gian .big { font-size: 38px; font-weight: 300; letter-spacing: -.02em; line-height: 1.05; margin-bottom: 2mm; color: var(--teal); }
.inv-a4-toi-gian .grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8mm; margin: 10mm 0 7mm; padding: 5mm 0; border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; }
.inv-a4-toi-gian .lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--teal); font-weight: 600; margin-bottom: 1mm; }
.inv-a4-toi-gian .name { font-size: 16px; font-weight: 600; }
.inv-a4-toi-gian .hero { font-size: 22px; font-weight: 600; color: var(--teal); white-space: nowrap; }
.inv-a4-toi-gian .items th { font-weight: 500; color: #6b7280; border-bottom: 1.5px solid #1f2933; padding: 0 0 3mm; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
.inv-a4-toi-gian .items td { border-bottom: 1px solid #eef0f2; padding: 2.6mm 0; }
.inv-a4-toi-gian .items td.r, .inv-a4-toi-gian .items th.r { padding-left: 6mm; }
.inv-a4-toi-gian .end { display: flex; justify-content: space-between; align-items: flex-start; gap: 10mm; margin-top: 8mm; }
.inv-a4-toi-gian .qrrow { display: flex; gap: 4mm; align-items: center; }
.inv-a4-toi-gian .tot { width: 80mm; }
.inv-a4-toi-gian .sums .grand td { font-size: 21px; font-weight: 600; border-top: 2px solid var(--teal); color: var(--teal); padding-top: 3mm; }
.inv-a4-toi-gian .qr { width: 26mm; height: 26mm; }
.inv-a4-toi-gian footer { margin-top: auto; padding-top: 8mm; display: flex; align-items: center; gap: 4mm; color: #6b7280; }
.inv-a4-toi-gian footer .bar { width: 14mm; height: 2px; background: var(--teal); }

/* ---------- 7. A4 hiện đại (gradient tím) ---------- */
.inv-a4-hien-dai { --a: #4338ca; --b: #7c3aed; --soft: #eef2ff; width: 210mm; min-height: 297mm; padding: 0; font: 12.5px/1.5 'Bricolage Grotesque', 'Be Vietnam Pro', sans-serif; color: #1e1b4b; display: flex; flex-direction: column; }
.inv-a4-hien-dai .band { position: relative; overflow: hidden; background: linear-gradient(120deg, var(--a), var(--b)); color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 8mm; padding: 13mm 15mm; }
.inv-a4-hien-dai .band i { position: absolute; border-radius: 50%; border: 10mm solid rgba(255, 255, 255, .09); pointer-events: none; }
.inv-a4-hien-dai .band .c1 { width: 70mm; height: 70mm; right: -18mm; top: -38mm; }
.inv-a4-hien-dai .band .c2 { width: 46mm; height: 46mm; left: 38%; bottom: -30mm; }
.inv-a4-hien-dai .ibrand { display: flex; gap: 4mm; align-items: center; position: relative; }
.inv-a4-hien-dai .mono { width: 17mm; height: 17mm; border-radius: 50%; background: rgba(255, 255, 255, .18); border: 1.5px solid rgba(255, 255, 255, .6); display: grid; place-items: center; font-weight: 700; font-size: 21px; flex: none; }
.inv-a4-hien-dai .shop { font-size: 21px; font-weight: 700; }
.inv-a4-hien-dai .sub { color: #e0e7ff; font-size: 11.5px; }
.inv-a4-hien-dai .band > .r { position: relative; white-space: normal; max-width: 50%; }
.inv-a4-hien-dai .label { font-size: 11px; letter-spacing: .35em; color: #c7d2fe; }
.inv-a4-hien-dai .code { font-size: 26px; font-weight: 700; line-height: 1.15; }
.inv-a4-hien-dai .body { padding: 9mm 15mm 12mm; flex: 1; display: flex; flex-direction: column; }
.inv-a4-hien-dai .cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3mm; margin-bottom: 7mm; }
.inv-a4-hien-dai .cards div { background: #fff; border: 1px solid #e0e7ff; border-top: 3px solid; border-radius: 2.5mm; padding: 3mm; box-shadow: 0 1px 0 #eef2ff; }
.inv-a4-hien-dai .cards .k1 { border-top-color: #4338ca; } .inv-a4-hien-dai .cards .k2 { border-top-color: #7c3aed; }
.inv-a4-hien-dai .cards .k3 { border-top-color: #db2777; } .inv-a4-hien-dai .cards .k4 { border-top-color: #0891b2; }
.inv-a4-hien-dai .cards span { display: block; font-size: 10.5px; color: #6366f1; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.inv-a4-hien-dai .cards b, .inv-a4-hien-dai .cards i { display: block; font-style: normal; }
.inv-a4-hien-dai .cards i { color: #64748b; font-size: 11.5px; }
.inv-a4-hien-dai .items { border-radius: 3mm; overflow: hidden; }
.inv-a4-hien-dai .items th { background: var(--soft); color: var(--a); padding: 3mm; font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.inv-a4-hien-dai .items td { padding: 3mm; border-bottom: 1px solid #eef2ff; }
.inv-a4-hien-dai .items .n { color: #a5b4fc; font-weight: 700; }
.inv-a4-hien-dai .items .amt { font-weight: 700; }
.inv-a4-hien-dai .row-end { display: flex; justify-content: space-between; gap: 8mm; margin-top: 7mm; }
.inv-a4-hien-dai .left { flex: 1; }
.inv-a4-hien-dai .qrrow { display: flex; gap: 4mm; align-items: center; background: var(--soft); border-radius: 3mm; padding: 3mm; }
.inv-a4-hien-dai .qr { width: 30mm; height: 30mm; background: #fff; padding: 1.5mm; border-radius: 2mm; }
.inv-a4-hien-dai .note { margin-top: 4mm; color: #4b5563; }
.inv-a4-hien-dai .totbox { width: 80mm; flex: none; border-radius: 3mm; padding: 4mm; background: #fff; border: 1px solid #e0e7ff; }
.inv-a4-hien-dai .totbox .grand td { background: linear-gradient(90deg, var(--a), var(--b)) 0 0 / 200% 100%; color: #fff; padding: 3mm; border: 0; font-size: 17px; }
.inv-a4-hien-dai .totbox .grand td:first-child { border-radius: 2mm 0 0 2mm; } .inv-a4-hien-dai .totbox .grand td:last-child { border-radius: 0 2mm 2mm 0; background-position: 100% 0; }
.inv-a4-hien-dai .totbox .words { font-size: 11.5px; color: #6366f1; }
.inv-a4-hien-dai footer { margin-top: auto; padding-top: 10mm; text-align: center; color: #6366f1; font-weight: 600; }

/* ---------- 8. A4 hai liên (thẻ màu xanh lá / cam) ---------- */
.inv-a4-hai-lien { width: 210mm; min-height: 297mm; padding: 8mm 10mm; font-size: 11.5px; display: flex; flex-direction: column; color: #1f2937; }
.inv-a4-hai-lien .copy { --c: #047857; --cs: #ecfdf5; flex: 1; display: flex; border: 1.5px solid var(--c); border-radius: 3mm; overflow: hidden; }
.inv-a4-hai-lien .copy.l2 { --c: #b45309; --cs: #fffbeb; }
.inv-a4-hai-lien .tab { flex: none; width: 9mm; background: var(--c); color: #fff; display: grid; place-items: center; }
.inv-a4-hai-lien .tab span { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 800; letter-spacing: .3em; font-size: 12px; }
.inv-a4-hai-lien .in { flex: 1; padding: 4mm 5mm; display: flex; flex-direction: column; }
.inv-a4-hai-lien header { display: flex; justify-content: space-between; gap: 6mm; background: var(--cs); margin: -4mm -5mm 3mm; padding: 3.5mm 5mm; border-bottom: 2px solid var(--c); }
.inv-a4-hai-lien header .r { white-space: normal; max-width: 55%; }
.inv-a4-hai-lien header .r > b { color: var(--c); font-size: 13px; }
.inv-a4-hai-lien .lien { font-weight: 600; color: var(--c); }
.inv-a4-hai-lien .shop { font-size: 15px; font-weight: 800; color: var(--c); }
.inv-a4-hai-lien .sub { color: #4b5563; }
.inv-a4-hai-lien .cust { display: flex; flex-wrap: wrap; gap: 0 6mm; margin-bottom: 2mm; }
.inv-a4-hai-lien .items th { background: var(--c); color: #fff; padding: 1.5mm 2mm; font-weight: 600; }
.inv-a4-hai-lien .items td { border-bottom: 1px solid #e5e7eb; padding: 1.3mm 2mm; }
.inv-a4-hai-lien .row-end { display: flex; justify-content: space-between; align-items: flex-start; gap: 6mm; margin-top: 2mm; }
.inv-a4-hai-lien .sums { width: 62mm; flex: none; }
.inv-a4-hai-lien .sums .grand td { color: var(--c); border-top-color: var(--c); }
.inv-a4-hai-lien .signs { margin-top: auto; padding-top: 3mm; min-height: 16mm; }
.inv-a4-hai-lien .cut { border-top: 1.5px dashed #6b7280; margin: 5mm -10mm; position: relative; text-align: center; }
.inv-a4-hai-lien .cut span { position: relative; top: -0.8em; background: #fff; padding: 0 3mm; color: var(--mute); font-size: 10px; }

/* ---------- 9. Phiếu giao hàng A5 ngang (cam) ---------- */
.inv-phieu-giao { --o: #ea580c; --od: #9a3412; --os: #fff7ed; width: 210mm; min-height: 148mm; padding: 0; font-size: 12.5px; display: flex; flex-direction: column; color: #1c1917; }
.inv-phieu-giao header { display: flex; justify-content: space-between; align-items: center; gap: 6mm; background: var(--o); color: #fff; padding: 4mm 9mm; }
.inv-phieu-giao header .t { font: 700 22px/1.1 'Chakra Petch', 'Be Vietnam Pro', sans-serif; letter-spacing: .04em; }
.inv-phieu-giao header .sub { opacity: .92; }
.inv-phieu-giao header .r { white-space: normal; max-width: 50%; }
.inv-phieu-giao header .no { font: 700 18px 'Chakra Petch', sans-serif; background: #fff; color: var(--od); border-radius: 2mm; padding: 1mm 3mm; display: inline-block; }
.inv-phieu-giao .k { font-size: 10.5px; color: var(--od); font-weight: 700; letter-spacing: .1em; margin-bottom: 1mm; }
.inv-phieu-giao .muted { color: #78716c; }
.inv-phieu-giao .route { display: grid; grid-template-columns: 1fr auto 1.5fr; gap: 5mm; align-items: stretch; padding: 4mm 9mm 0; }
.inv-phieu-giao .from { background: var(--os); border-radius: 2.5mm; padding: 3mm 4mm; line-height: 1.45; }
.inv-phieu-giao .arrow { align-self: center; font-size: 24px; color: var(--o); }
.inv-phieu-giao .to { border: 2px solid var(--o); border-radius: 2.5mm; padding: 3mm 4mm; }
.inv-phieu-giao .to .name { font-size: 21px; font-weight: 800; line-height: 1.2; }
.inv-phieu-giao .to .phone { font: 700 19px 'Chakra Petch', sans-serif; letter-spacing: .03em; color: var(--od); }
.inv-phieu-giao .to .addr { font-size: 14px; line-height: 1.4; }
.inv-phieu-giao .cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 7mm; padding: 3mm 9mm 4mm; flex: 1; }
.inv-phieu-giao .gt td { border-bottom: 1px dotted #d6d3d1; padding: 1mm 0; }
.inv-phieu-giao .note { margin-top: 2mm; font-style: italic; }
.inv-phieu-giao .pg-side { display: flex; flex-direction: column; }
.inv-phieu-giao .cod { background: var(--o); color: #fff; border-radius: 2.5mm; padding: 3mm 4mm; text-align: center; }
.inv-phieu-giao .cod span { display: block; font-weight: 700; letter-spacing: .08em; font-size: 11px; }
.inv-phieu-giao .cod b { font: 700 24px/1.2 'Chakra Petch', sans-serif; }
.inv-phieu-giao .cod.paid { background: #15803d; }
.inv-phieu-giao .cod.paid b { font-size: 16px; }
.inv-phieu-giao .signs { margin-top: auto; padding-top: 4mm; min-height: 22mm; }

/* ---------- 10. Tem dán vận chuyển 100×75mm (máy in tem nhiệt, đen trắng) ---------- */
.inv-tem-dan { width: 100mm; height: 75mm; padding: 0; font-size: 11px; display: flex; flex-direction: column; border: 1.5px solid #000; overflow: hidden; color: #000; }
.inv-tem-dan .top { display: flex; justify-content: space-between; align-items: center; gap: 2mm; background: #000; color: #fff; padding: 1.8mm 3mm; }
.inv-tem-dan .from { font-size: 10px; }
.inv-tem-dan .code { font: 600 15px 'Oswald', sans-serif; letter-spacing: .06em; background: #fff; color: #000; padding: 0 2mm; border-radius: 1mm; max-width: 55%; text-align: center; }
.inv-tem-dan .to { flex: 1; padding: 2mm 3mm; overflow: hidden; }
.inv-tem-dan .k { font: 600 9.5px 'Oswald', sans-serif; letter-spacing: .2em; border-bottom: 1px solid #000; display: inline-block; margin-bottom: .5mm; }
.inv-tem-dan .name { font: 600 20px/1.12 'Oswald', 'Be Vietnam Pro', sans-serif; text-transform: uppercase; }
.inv-tem-dan .phone { font: 600 19px 'Oswald', sans-serif; letter-spacing: .06em; }
.inv-tem-dan .addr { font-size: 12.5px; line-height: 1.3; font-weight: 600; }
.inv-tem-dan .bottom { display: flex; gap: 2.5mm; border-top: 2px solid #000; align-items: stretch; }
.inv-tem-dan .cod { background: #000; color: #fff; padding: 1.2mm 3mm; display: flex; flex-direction: column; justify-content: center; }
.inv-tem-dan .cod span { font-size: 8.5px; letter-spacing: .12em; }
.inv-tem-dan .cod b { font: 600 19px 'Oswald', sans-serif; }
.inv-tem-dan .info { font-size: 10px; padding: 1.2mm 0; flex: 1; }
.inv-tem-dan .hatch { width: 12mm; background: repeating-linear-gradient(45deg, #000 0 1.6mm, #fff 1.6mm 3.2mm); }

/* =====================================================================
   10 MẪU HÓA ĐƠN BỔ SUNG
   ===================================================================== */

/* ---------- 11. Bill 80mm quán cà phê ---------- */
.inv-k80-cafe { width: 80mm; padding: 0 4mm 6mm; font: 12px/1.45 'Baloo 2', 'Be Vietnam Pro', sans-serif; color: #2a1608; }
.inv-k80-cafe .holes { height: 4mm; margin: 0 -4mm 2mm; background: radial-gradient(circle at 2mm 0, #fff 1.3mm, #2a1608 1.4mm, #2a1608 1.6mm, transparent 1.7mm) 0 0 / 4mm 4mm repeat-x; }
.inv-k80-cafe .cup { font-size: 22px; line-height: 1; }
.inv-k80-cafe .shop { font-size: 20px; font-weight: 800; line-height: 1.15; }
.inv-k80-cafe .sub { font-size: 11px; color: #5b4636; }
.inv-k80-cafe .ticket { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1mm; margin: 3mm 0 2mm; border-top: 2px solid #2a1608; border-bottom: 2px solid #2a1608; padding: 1.5mm 0; text-align: center; }
.inv-k80-cafe .ticket small { display: block; font-size: 9.5px; color: #5b4636; }
.inv-k80-cafe .ticket b { font-size: 11.5px; line-height: 1.2; }
.inv-k80-cafe .menu { margin-top: 2mm; }
.inv-k80-cafe .menu td { padding: 1.3mm 0; border-bottom: 1px dashed #8a6a52; }
.inv-k80-cafe .menu .q { width: 9mm; font-weight: 800; font-size: 13px; }
.inv-k80-cafe .menu small { display: block; color: #5b4636; font-size: 10.5px; }
.inv-k80-cafe .menu td.r { font-weight: 700; }
.inv-k80-cafe .sums { margin-top: 2mm; }
.inv-k80-cafe .sums .grand td { font-size: 18px; font-weight: 800; border-top: 2px solid #2a1608; }
.inv-k80-cafe .pm { margin-top: 1.5mm; }
.inv-k80-cafe .foot { margin-top: 3mm; font-size: 13px; font-weight: 700; }

/* ---------- 12. Bill 80mm kiểu siêu thị ---------- */
.inv-k80-sieu-thi { width: 80mm; padding: 5mm 4mm 7mm; font: 11.5px/1.4 'IBM Plex Sans', 'Be Vietnam Pro', sans-serif; color: #000; }
.inv-k80-sieu-thi .shop { font-size: 16px; font-weight: 700; text-transform: uppercase; }
.inv-k80-sieu-thi .sub { font-size: 10.5px; }
.inv-k80-sieu-thi .title { margin: 2.5mm 0 1.5mm; padding: 1mm 0; background: #000; color: #fff; font-weight: 700; letter-spacing: .15em; }
.inv-k80-sieu-thi .ikv { display: flex; justify-content: space-between; gap: 3mm; }
.inv-k80-sieu-thi .ikv b { text-align: right; }
.inv-k80-sieu-thi .mart { margin: 2mm 0; border-top: 1.5px solid #000; border-bottom: 1.5px solid #000; }
.inv-k80-sieu-thi .mart th { font-size: 10px; text-transform: uppercase; border-bottom: 1px solid #000; padding: 1mm 0; }
.inv-k80-sieu-thi .mart .nm { font-weight: 600; padding-top: 1.2mm; }
.inv-k80-sieu-thi .mart .nums td { padding-bottom: 1mm; border-bottom: 1px dotted #666; font-variant-numeric: tabular-nums; }
.inv-k80-sieu-thi .mart td.r, .inv-k80-sieu-thi .mart th.r { padding-left: 2mm; }
.inv-k80-sieu-thi .sums { margin-top: 1.5mm; }
.inv-k80-sieu-thi .sums .grand td { border-top: 3px double #000; font-size: 16px; }
.inv-k80-sieu-thi .foot { margin-top: 3mm; padding-top: 2mm; border-top: 1px dashed #000; font-weight: 600; }

/* ---------- 13. A5 pastel hồng ---------- */
.inv-a5-pastel { --acc: #db2777; width: 148mm; min-height: 210mm; padding: 9mm 9mm; font: 12px/1.45 'Nunito', 'Be Vietnam Pro', sans-serif; color: #4a2340;
  background: radial-gradient(circle, #fce7f3 1.2mm, transparent 1.3mm) 0 0 / 9mm 9mm, #fff8fb; display: flex; flex-direction: column; }
.inv-a5-pastel header { display: flex; justify-content: space-between; align-items: center; gap: 4mm; }
.inv-a5-pastel .shop { font-size: 19px; font-weight: 800; color: #be185d; }
.inv-a5-pastel .sub { font-size: 11px; color: #7c5470; }
.inv-a5-pastel .bubble { flex: none; background: #fbcfe8; color: #9d174d; font-weight: 800; font-size: 17px; padding: 3mm 6mm; border-radius: 99px; }
.inv-a5-pastel .pchips { display: flex; gap: 2mm; flex-wrap: wrap; margin: 3mm 0; }
.inv-a5-pastel .pchips span { background: #fff; border: 1.5px solid #f9a8d4; border-radius: 99px; padding: .8mm 3mm; }
.inv-a5-pastel .card { background: #fff; border-radius: 4mm; padding: 3mm 4mm; box-shadow: 0 1px 0 #fbcfe8, 0 0 0 1px #fce7f3; margin-bottom: 3mm; }
.inv-a5-pastel .cap { font-size: 10.5px; font-weight: 800; color: #db2777; text-transform: uppercase; letter-spacing: .08em; }
.inv-a5-pastel .nt { color: #7c5470; }
.inv-a5-pastel .items th { color: #be185d; border-bottom: 2px solid #fbcfe8; padding: 1mm 1mm; font-size: 11px; }
.inv-a5-pastel .items td { padding: 1.2mm 1mm; border-bottom: 1px dashed #fbcfe8; }
.inv-a5-pastel .sumrow { display: flex; gap: 5mm; align-items: flex-start; }
.inv-a5-pastel .sumrow .words { flex: 1; color: #7c5470; font-style: italic; margin-top: 1mm; }
.inv-a5-pastel .sumrow .sums { width: 62mm; }
.inv-a5-pastel .sums .grand td { color: #be185d; border-top: 2px solid #f9a8d4; font-size: 16px; }
.inv-a5-pastel .payblk { background: #fff; border-color: #f9a8d4; border-radius: 4mm; padding: 2.5mm 4mm; }
.inv-a5-pastel .payblk .pb-row { padding: .4mm 0; border-bottom-color: #fce7f3; }
.inv-a5-pastel .payblk .pb-qr { width: 30mm; } .inv-a5-pastel .payblk .pb-qr .qr { width: 26mm; height: 26mm; }
.inv-a5-pastel .foot { margin-top: auto; padding-top: 3mm; color: #db2777; font-weight: 700; }

/* ---------- 14. A5 lá xanh ---------- */
.inv-a5-la-xanh { --acc: #15803d; width: 148mm; min-height: 210mm; padding: 10mm 10mm 8mm; font: 12px/1.45 'Lexend', 'Be Vietnam Pro', sans-serif; color: #14321f; background: #fbfef9; overflow: hidden; display: flex; flex-direction: column; }
.inv-a5-la-xanh .leaf { position: absolute; width: 26mm; height: 26mm; background: #bbf7d0; border-radius: 0 100% 0 100%; opacity: .75; }
.inv-a5-la-xanh .l1 { top: -8mm; right: -6mm; transform: rotate(10deg); }
.inv-a5-la-xanh .l2 { bottom: -10mm; left: -8mm; background: #86efac; transform: rotate(-20deg); opacity: .5; }
.inv-a5-la-xanh header { text-align: center; position: relative; }
.inv-a5-la-xanh .shop { font-family: 'Lora', Georgia, serif; font-size: 20px; font-weight: 700; color: #166534; }
.inv-a5-la-xanh .sub { font-size: 10.5px; color: #4d7c5a; }
.inv-a5-la-xanh .ttl { display: flex; align-items: center; gap: 3mm; margin: 3mm 0; color: #15803d; font-weight: 600; letter-spacing: .14em; font-size: 12px; }
.inv-a5-la-xanh .ttl::before, .inv-a5-la-xanh .ttl::after { content: ''; flex: 1; height: 2px; background: linear-gradient(90deg, transparent, #22c55e, transparent); }
.inv-a5-la-xanh .info { display: grid; grid-template-columns: 1fr 1fr; gap: 2mm 4mm; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 3mm; padding: 2.5mm 3.5mm; margin-bottom: 3mm; position: relative; }
.inv-a5-la-xanh .info .w { grid-column: 1 / -1; }
.inv-a5-la-xanh .info small { display: block; font-size: 9.5px; color: #15803d; text-transform: uppercase; letter-spacing: .08em; }
.inv-a5-la-xanh .items th { background: #dcfce7; color: #166534; padding: 1.3mm 1.5mm; font-size: 10.5px; }
.inv-a5-la-xanh .items td { padding: 1.2mm 1.5mm; border-bottom: 1px solid #dcfce7; }
.inv-a5-la-xanh .sums { width: 60%; margin: 2mm 0 0 auto; }
.inv-a5-la-xanh .sums .grand td { color: #15803d; border-top: 2px solid #22c55e; font-size: 15px; }
.inv-a5-la-xanh .words { text-align: right; color: #4d7c5a; font-size: 11px; }
.inv-a5-la-xanh .payblk { background: #fff; border-color: #86efac; padding: 2.5mm 3.5mm; position: relative; }
.inv-a5-la-xanh .payblk .pb-row { padding: .4mm 0; border-bottom-color: #dcfce7; }
.inv-a5-la-xanh .payblk .pb-qr { width: 30mm; } .inv-a5-la-xanh .payblk .pb-qr .qr { width: 26mm; height: 26mm; }
.inv-a5-la-xanh .foot { margin-top: auto; padding-top: 3mm; color: #166534; position: relative; }

/* ---------- 15. A5 ngang xanh navy ---------- */
.inv-a5-ngang { --acc: #1e3a8a; width: 210mm; min-height: 148mm; padding: 0; display: flex; font: 11.5px/1.42 'Be Vietnam Pro', sans-serif; color: #0f172a; }
.inv-a5-ngang .lc { flex: none; width: 62mm; background: #1e3a8a; color: #e0e7ff; padding: 7mm 6mm; }
.inv-a5-ngang .lc .shop { color: #fff; font-size: 16px; font-weight: 800; line-height: 1.2; }
.inv-a5-ngang .lc .sub { font-size: 10px; margin-top: 1mm; }
.inv-a5-ngang .lc .big { margin: 5mm 0 3mm; font: 600 24px/1 'Oswald', sans-serif; letter-spacing: .12em; color: #fcd34d; }
.inv-a5-ngang .ikv { margin-top: 2.5mm; }
.inv-a5-ngang .ikv small { display: block; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: #a5b4fc; }
.inv-a5-ngang .ikv b { color: #fff; }
.inv-a5-ngang .rc { flex: 1; padding: 7mm 7mm 6mm; display: flex; flex-direction: column; }
.inv-a5-ngang .items th { color: #1e3a8a; border-bottom: 2px solid #1e3a8a; padding: 1.2mm 1mm; font-size: 10.5px; }
.inv-a5-ngang .items td { padding: 1.2mm 1mm; border-bottom: 1px solid #e2e8f0; }
.inv-a5-ngang .rc-end { margin-left: auto; width: 70mm; margin-top: 2mm; }
.inv-a5-ngang .sums td { padding: .5mm 0; }
.inv-a5-ngang .sums .grand td { color: #1e3a8a; border-top: 2px solid #fcd34d; font-size: 15px; }
.inv-a5-ngang .words { font-size: 10.5px; color: #475569; text-align: right; }
.inv-a5-ngang .payblk { margin-top: 3mm; padding: 2mm 3mm; border-left: 4px solid #fcd34d; font-size: 10.5px; }
.inv-a5-ngang .payblk .pb-row { padding: .2mm 0; }
.inv-a5-ngang .payblk .pb-qr { width: 26mm; } .inv-a5-ngang .payblk .pb-qr .qr { width: 25mm; height: 25mm; }
.inv-a5-ngang .foot { margin-top: auto; padding-top: 2mm; color: #475569; font-style: italic; }

/* ---------- 16. A4 sang trọng đen vàng ---------- */
.inv-a4-den-vang { --acc: #a07d3b; --gold: #c9a35a; width: 210mm; min-height: 297mm; padding: 0; font: 12.5px/1.5 'Lora', Georgia, serif; color: #1c1917; display: flex; flex-direction: column; }
.inv-a4-den-vang .top { background: #0c0a09; color: #e7d9b8; text-align: center; padding: 10mm 15mm 8mm; border-bottom: 3px solid var(--gold); }
.inv-a4-den-vang .mono { width: 15mm; height: 15mm; margin: 0 auto 2.5mm; border: 1.5px solid var(--gold); transform: rotate(45deg); display: grid; place-items: center; }
.inv-a4-den-vang .mono span { transform: rotate(-45deg); font-size: 15px; font-weight: 700; color: var(--gold); }
.inv-a4-den-vang .shop { font-size: 24px; font-weight: 700; color: var(--gold); letter-spacing: .12em; text-transform: uppercase; }
.inv-a4-den-vang .top .sub { font-size: 11.5px; }
.inv-a4-den-vang .pg { padding: 10mm 16mm 12mm; flex: 1; display: flex; flex-direction: column; }
.inv-a4-den-vang .head { display: flex; justify-content: space-between; align-items: flex-end; gap: 8mm; border-bottom: 1px solid var(--gold); padding-bottom: 4mm; }
.inv-a4-den-vang h1 { font-size: 34px; font-weight: 600; font-style: italic; color: #0c0a09; }
.inv-a4-den-vang .meta { display: flex; gap: 7mm; text-align: right; }
.inv-a4-den-vang small { display: block; font-size: 9.5px; letter-spacing: .18em; color: var(--acc); }
.inv-a4-den-vang .to { margin: 6mm 0; }
.inv-a4-den-vang .to b { display: block; font-size: 17px; }
.inv-a4-den-vang .to span { color: #57534e; }
.inv-a4-den-vang .items th { background: #0c0a09; color: var(--gold); padding: 2.5mm 3mm; font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.inv-a4-den-vang .items td { padding: 2.5mm 3mm; border-bottom: 1px solid #e7e0d0; }
.inv-a4-den-vang .items .n { color: var(--acc); }
.inv-a4-den-vang .end { display: flex; justify-content: space-between; gap: 10mm; margin-top: 6mm; }
.inv-a4-den-vang .words { flex: 1; font-style: italic; }
.inv-a4-den-vang .nt { margin-top: 2mm; font-style: normal; color: #57534e; }
.inv-a4-den-vang .tot { width: 78mm; border: 1.5px solid var(--gold); padding: 3mm 4mm; }
.inv-a4-den-vang .sums .grand td { color: #0c0a09; border-top: 1px solid var(--gold); font-size: 18px; }
.inv-a4-den-vang .payblk { border-color: var(--gold); border-radius: 0; background: #fdfaf3; }
.inv-a4-den-vang .payblk .pb-row { border-bottom-color: #ece3cf; }
.inv-a4-den-vang footer { margin-top: auto; padding-top: 8mm; text-align: center; color: var(--acc); font-style: italic; letter-spacing: .04em; }

/* ---------- 17. A4 ruy băng cam vàng ---------- */
.inv-a4-ruy-bang { --acc: #ea580c; width: 210mm; min-height: 297mm; padding: 16mm 16mm 12mm; font: 13px/1.5 'Baloo 2', 'Be Vietnam Pro', sans-serif; color: #431407; overflow: hidden; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #fff7ed 0, #fff 70mm); }
.inv-a4-ruy-bang .ribbon { position: absolute; top: 12mm; right: -16mm; width: 70mm; transform: rotate(35deg); background: linear-gradient(90deg, #f97316, #facc15); color: #fff; text-align: center; padding: 2mm 0; box-shadow: 0 2px 0 #c2410c; }
.inv-a4-ruy-bang .ribbon span { font-weight: 800; letter-spacing: .25em; font-size: 15px; }
.inv-a4-ruy-bang .shop { font-size: 28px; font-weight: 800; color: #c2410c; line-height: 1.1; max-width: 70%; }
.inv-a4-ruy-bang .sub { color: #9a3412; max-width: 70%; }
.inv-a4-ruy-bang .hello { margin-top: 6mm; font-size: 18px; }
.inv-a4-ruy-bang .facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3mm; margin: 4mm 0 6mm; }
.inv-a4-ruy-bang .facts div { background: #fff; border: 2px solid #fed7aa; border-radius: 4mm; padding: 2.5mm 3mm; }
.inv-a4-ruy-bang .facts small { display: block; color: #ea580c; font-weight: 700; font-size: 11px; }
.inv-a4-ruy-bang .facts b { line-height: 1.3; display: block; }
.inv-a4-ruy-bang .tbl { border: 2px solid #fdba74; border-radius: 4mm; overflow: hidden; }
.inv-a4-ruy-bang .items th { background: #ffedd5; color: #c2410c; padding: 2.5mm 3mm; font-weight: 800; }
.inv-a4-ruy-bang .items td { padding: 2.3mm 3mm; border-top: 1px dashed #fed7aa; }
.inv-a4-ruy-bang .items .n { color: #fb923c; font-weight: 800; }
.inv-a4-ruy-bang .end { display: flex; justify-content: space-between; gap: 8mm; margin-top: 5mm; }
.inv-a4-ruy-bang .note { flex: 1; }
.inv-a4-ruy-bang .words { margin-top: 2mm; color: #9a3412; font-style: italic; }
.inv-a4-ruy-bang .tot { width: 78mm; }
.inv-a4-ruy-bang .sums .grand td { background: linear-gradient(90deg, #f97316, #facc15) 0 0 / 200% 100%; color: #fff; padding: 2.5mm 3mm; border: 0; font-size: 19px; }
.inv-a4-ruy-bang .sums .grand td:first-child { border-radius: 3mm 0 0 3mm; } .inv-a4-ruy-bang .sums .grand td:last-child { border-radius: 0 3mm 3mm 0; background-position: 100% 0; }
.inv-a4-ruy-bang .payblk { background: #fff; border: 2px solid #fdba74; border-radius: 4mm; }
.inv-a4-ruy-bang .payblk .pb-row { border-bottom-color: #ffedd5; }
.inv-a4-ruy-bang footer { margin-top: auto; padding-top: 8mm; text-align: center; font-size: 17px; font-weight: 800; color: #ea580c; }

/* ---------- 18. A4 kiểu bảng tính ---------- */
.inv-a4-bang-tinh { --acc: #107c41; width: 210mm; min-height: 297mm; padding: 12mm 12mm; font: 12px/1.35 'IBM Plex Sans', 'Be Vietnam Pro', sans-serif; color: #1f2937; display: flex; flex-direction: column; }
.inv-a4-bang-tinh .xl-bar { display: flex; align-items: center; gap: 3mm; border: 1px solid #c6c6c6; border-bottom: 0; padding: 1.5mm 3mm; font: 11px 'IBM Plex Mono', monospace; color: #374151; background: #fafafa; }
.inv-a4-bang-tinh .xl-bar .fx { font-style: italic; font-weight: 700; color: #107c41; border-right: 1px solid #c6c6c6; padding-right: 3mm; }
.inv-a4-bang-tinh .xl { border: 1px solid #c6c6c6; }
.inv-a4-bang-tinh .xl th, .inv-a4-bang-tinh .xl td { border: 1px solid #d4d4d4; padding: 1.6mm 2mm; }
.inv-a4-bang-tinh .xl thead th { background: #f3f3f3; color: #555; font-weight: 500; text-align: center; font-size: 10.5px; padding: .8mm; }
.inv-a4-bang-tinh .xl .rn { background: #f3f3f3; color: #555; font-weight: 500; text-align: center; width: 8mm; font-size: 10.5px; }
.inv-a4-bang-tinh .xl td.r { font-family: 'IBM Plex Mono', monospace; }
.inv-a4-bang-tinh .ttl { font-size: 17px; font-weight: 700; color: #107c41; }
.inv-a4-bang-tinh .mut { color: #6b7280; }
.inv-a4-bang-tinh .hd td { background: #107c41; color: #fff; font-weight: 600; }
.inv-a4-bang-tinh tbody tr:nth-child(odd):not(.hd):not(.sel) td { background: #fbfdfb; }
.inv-a4-bang-tinh .sel td { outline: 2px solid #107c41; outline-offset: -2px; background: #e8f5ee !important; font-size: 14px; }
.inv-a4-bang-tinh .payblk { border-radius: 0; border-color: #c6c6c6; border-top: 3px solid #107c41; }
.inv-a4-bang-tinh .tabs { margin-top: auto; display: flex; gap: 0; border-top: 1px solid #c6c6c6; font-size: 11px; }
.inv-a4-bang-tinh .tabs span { padding: 1.5mm 5mm; color: #6b7280; }
.inv-a4-bang-tinh .tabs .on { background: #fff; color: #107c41; font-weight: 700; border-bottom: 3px solid #107c41; }

/* ---------- 19. A4 cột trái xanh rêu ---------- */
.inv-a4-cot-trai { --acc: #3f6212; width: 210mm; min-height: 297mm; padding: 0; display: flex; font: 12.5px/1.5 'Lexend', 'Be Vietnam Pro', sans-serif; color: #1a2e05; }
.inv-a4-cot-trai .sb { flex: none; width: 64mm; background: #3f6212; color: #ecfccb; padding: 14mm 7mm; }
.inv-a4-cot-trai .sb .mono { width: 16mm; height: 16mm; border-radius: 4mm; background: #bef264; color: #1a2e05; display: grid; place-items: center; font-weight: 800; font-size: 20px; margin-bottom: 4mm; }
.inv-a4-cot-trai .sb .shop { font-size: 18px; font-weight: 700; color: #fff; line-height: 1.25; }
.inv-a4-cot-trai .sb .sub { font-size: 11px; color: #d9f99d; margin-top: 1mm; }
.inv-a4-cot-trai .blk { margin-top: 7mm; }
.inv-a4-cot-trai .blk small { display: block; font-size: 9.5px; letter-spacing: .16em; color: #bef264; margin-bottom: .5mm; }
.inv-a4-cot-trai .blk b { color: #fff; }
.inv-a4-cot-trai .qrb { background: #fff; color: #3f6212; border-radius: 3mm; padding: 3mm; text-align: center; font-size: 11px; font-weight: 600; }
.inv-a4-cot-trai .qrb .qr { width: 36mm; height: 36mm; margin: 0 auto 1mm; }
.inv-a4-cot-trai .mn { flex: 1; padding: 14mm 12mm 12mm; display: flex; flex-direction: column; }
.inv-a4-cot-trai .hd { display: flex; align-items: baseline; gap: 6mm; flex-wrap: wrap; border-bottom: 3px solid #84cc16; padding-bottom: 3mm; margin-bottom: 5mm; }
.inv-a4-cot-trai .hd h1 { font-size: 30px; font-weight: 700; color: #3f6212; letter-spacing: .06em; margin-right: auto; }
.inv-a4-cot-trai .hd small { color: #65a30d; }
.inv-a4-cot-trai .items th { color: #3f6212; border-bottom: 2px solid #3f6212; padding: 2mm 2mm; font-size: 11px; text-transform: uppercase; }
.inv-a4-cot-trai .items td { padding: 2.3mm 2mm; border-bottom: 1px solid #ecfccb; }
.inv-a4-cot-trai .items .n { color: #84cc16; font-weight: 700; }
.inv-a4-cot-trai .end { display: flex; gap: 6mm; justify-content: space-between; align-items: flex-start; margin-top: 5mm; }
.inv-a4-cot-trai .words { flex: 1; color: #4d7c0f; font-style: italic; }
.inv-a4-cot-trai .sums { width: 70mm; }
.inv-a4-cot-trai .sums .grand td { background: #3f6212; color: #fff; padding: 2.5mm 3mm; border: 0; font-size: 16px; }
.inv-a4-cot-trai .payblk { border-color: #a3e635; background: #f7fee7; }
.inv-a4-cot-trai .payblk .pb-row { border-bottom-color: #d9f99d; }
.inv-a4-cot-trai footer { margin-top: auto; padding-top: 8mm; color: #4d7c0f; }

/* ---------- 20. A4 sổ tay viết tay ---------- */
.inv-a4-so-tay { --acc: #1d4ed8; width: 210mm; min-height: 297mm; padding: 12mm 12mm; font: 17px/9mm 'Patrick Hand', 'Be Vietnam Pro', cursive; color: #1e3a8a; background: #fffef7; }
.inv-a4-so-tay .paper { min-height: calc(297mm - 24mm); padding: 6mm 8mm 8mm 22mm; position: relative; box-sizing: border-box;
  background: linear-gradient(90deg, transparent 15mm, #f87171 15mm, #f87171 15.5mm, transparent 15.5mm), repeating-linear-gradient(180deg, transparent 0, transparent calc(9mm - 1px), #bfdbfe calc(9mm - 1px), #bfdbfe 9mm); background-color: #fff; box-shadow: 0 0 0 1px #e5e7eb; }
.inv-a4-so-tay .tape { position: absolute; width: 30mm; height: 9mm; background: rgba(250, 204, 21, .45); z-index: 2; }
.inv-a4-so-tay .t1 { top: 7mm; left: 14mm; transform: rotate(-8deg); }
.inv-a4-so-tay .t2 { top: 7mm; right: 14mm; transform: rotate(7deg); }
.inv-a4-so-tay h1 { font-size: 32px; line-height: 18mm; color: #b91c1c; letter-spacing: .02em; }
.inv-a4-so-tay .ln2 { min-height: 9mm; }
.inv-a4-so-tay u { text-decoration: none; border-bottom: 1.5px dotted #1e3a8a; }
.inv-a4-so-tay .hand { margin-top: 0; }
.inv-a4-so-tay .hand th, .inv-a4-so-tay .hand td { padding: 0 1mm; height: 9mm; vertical-align: bottom; }
.inv-a4-so-tay .hand th { color: #b91c1c; font-weight: 400; }
.inv-a4-so-tay .end { display: flex; gap: 6mm; justify-content: space-between; align-items: flex-start; }
.inv-a4-so-tay .words { flex: 1; }
.inv-a4-so-tay .sums { width: 80mm; }
.inv-a4-so-tay .sums td { padding: 0; height: 9mm; vertical-align: bottom; }
.inv-a4-so-tay .sums .grand td { border-top: 0; color: #b91c1c; font-size: 22px; }
.inv-a4-so-tay .h1row { display: flex; align-items: center; justify-content: space-between; gap: 6mm; }
.inv-a4-so-tay .circle { flex: none; border: 2.5px solid #dc2626; color: #dc2626; border-radius: 50%; padding: 1mm 6mm; transform: rotate(-6deg); font-size: 22px; line-height: 1.3; }
.inv-a4-so-tay .payblk { font: 13px/1.5 'Be Vietnam Pro', sans-serif; background: #fff; border: 2px dashed #93c5fd; color: #1e293b; margin-top: 9mm; }
.inv-a4-so-tay .foot { margin-top: 6mm; color: #b91c1c; font-size: 20px; }

/* ---------- Khối thanh toán chuyển khoản (dùng chung, màu theo --pb của từng mẫu) ---------- */
.inv .payblk { --pb: var(--acc); display: flex; gap: 4mm; align-items: center; margin-top: 4mm; border: 1.5px solid var(--pb); border-radius: 2.5mm; padding: 3mm 4mm; break-inside: avoid; }
.inv .payblk.none { display: block; padding: 2mm 4mm; }
.inv .payblk .pb-body { flex: 1; min-width: 0; }
.inv .payblk .pb-h { font-weight: 700; color: var(--pb); text-transform: uppercase; letter-spacing: .06em; font-size: .88em; margin-bottom: 1.5mm; }
.inv .payblk .pb-row { display: flex; gap: 3mm; padding: .9mm 0; border-bottom: 1px dashed #d4d4d8; }
.inv .payblk .pb-row:last-child { border-bottom: 0; }
.inv .payblk .pb-row span { flex: none; width: 27mm; color: var(--mute); }
.inv .payblk .pb-row b { min-width: 0; }
.inv .payblk .pb-k { color: var(--mute); }
.inv .payblk .pb-qr { flex: none; text-align: center; width: 38mm; }
.inv .payblk .pb-qr .qr { width: 32mm; height: 32mm; margin: 0 auto; padding: 1mm; background: #fff; }
.inv .payblk .pb-note { font-size: .78em; color: var(--mute); margin-top: 1mm; line-height: 1.35; }
/* Bill nhiệt: xếp dọc, QR ở giữa */
.inv-nhiet-80 .payblk, .inv-nhiet-80-dam .payblk, .inv-k80-cafe .payblk, .inv-k80-sieu-thi .payblk { --pb: currentColor; flex-direction: column; align-items: stretch; gap: 2mm; padding: 2.5mm 3mm; font-size: 11px; }
.inv-nhiet-80 .payblk .pb-row span, .inv-nhiet-80-dam .payblk .pb-row span, .inv-k80-cafe .payblk .pb-row span, .inv-k80-sieu-thi .payblk .pb-row span { width: 22mm; }
.inv-nhiet-80 .payblk .pb-qr, .inv-nhiet-80-dam .payblk .pb-qr, .inv-k80-cafe .payblk .pb-qr, .inv-k80-sieu-thi .payblk .pb-qr { width: auto; }
.inv-nhiet-80 .payblk .pb-qr .qr, .inv-nhiet-80-dam .payblk .pb-qr .qr, .inv-k80-cafe .payblk .pb-qr .qr, .inv-k80-sieu-thi .payblk .pb-qr .qr { width: 40mm; height: 40mm; }
.inv-nhiet-80-dam .payblk { border-color: #6b0f0f; } .inv-nhiet-80-dam .payblk .pb-h { color: #6b0f0f; }
.inv-nhiet-80 .who small { display: block; font-size: 9.5px; color: #475569; text-transform: uppercase; letter-spacing: .08em; }
/* Màu từng mẫu */
.inv-a5-co-dien { --acc: var(--wine); }
.inv-a5-co-dien .payblk { background: #fff; border-color: var(--gold); border-left: 4px solid var(--wine); }
.inv-a5-co-dien .payblk .pb-row { border-bottom-color: #e6d8bf; }
.inv-a5-co-dien .badge-row { display: flex; align-items: center; gap: 4mm; margin-top: 2mm; }
.inv-a5-co-dien .payblk { margin-top: 3mm; padding: 2mm 3mm; }
.inv-a5-co-dien .payblk .pb-row { padding: .4mm 0; }
.inv-a5-co-dien .sums td { padding: .5mm 0; }
.inv-a5-co-dien .payblk .pb-qr { width: 30mm; } .inv-a5-co-dien .payblk .pb-qr .qr { width: 26mm; height: 26mm; border: 0; }
.inv-a4-doanh-nghiep { --acc: var(--blue); }
.inv-a4-doanh-nghiep .payblk { background: var(--sky); border: 0; border-left: 5px solid var(--blue); margin-bottom: 6mm; }
.inv-a4-doanh-nghiep .payblk .pb-row { border-bottom-color: #bfdbfe; }
.inv-a4-toi-gian { --acc: var(--teal); }
.inv-a4-toi-gian .payblk { border: 0; border-top: 2px solid var(--teal); border-radius: 0; padding: 4mm 0 0; margin-top: 7mm; }
.inv-a4-toi-gian .payblk .pb-row { border-bottom-color: #eef0f2; }
.inv-a4-hien-dai { --acc: var(--a); }
.inv-a4-hien-dai .payblk { background: var(--soft); border: 0; border-radius: 3mm; padding: 4mm 5mm; }
.inv-a4-hien-dai .payblk .pb-row { border-bottom-color: #c7d2fe; }
.inv-a4-hai-lien .copy .payblk { --pb: var(--c); margin-top: 2mm; padding: 2mm 3mm; gap: 3mm; font-size: 10.5px; }
.inv-a4-hai-lien .copy .payblk .pb-h { margin-bottom: .5mm; }
.inv-a4-hai-lien .copy .payblk .pb-row { padding: .3mm 0; }
.inv-a4-hai-lien .copy .payblk .pb-qr { width: 25mm; } .inv-a4-hai-lien .copy .payblk .pb-qr .qr { width: 24mm; height: 24mm; }
.inv-a4-hai-lien .row-end .left { flex: 1; min-width: 0; }
.inv-phieu-giao { --acc: var(--o); }
.inv-phieu-giao .gt th { font-size: 10.5px; color: var(--od); border-bottom: 1.5px solid var(--o); padding: 1mm 0; }
.inv-phieu-giao .gt td.r, .inv-phieu-giao .gt th.r { padding-left: 3mm; }
.inv-phieu-giao .goods .sums { width: 70%; margin: 1.5mm 0 0 auto; font-size: 12px; }
.inv-phieu-giao .goods .sums td { padding: .5mm 0; }
.inv-phieu-giao .goods .sums .grand td { color: var(--od); border-top-color: var(--o); }
.inv-phieu-giao .pg-side .payblk { --pb: var(--o); margin-top: 3mm; padding: 2mm 3mm; gap: 2mm; flex-direction: column; align-items: stretch; font-size: 11px; }
.inv-phieu-giao .pg-side .payblk .pb-row span { width: 22mm; }
.inv-phieu-giao .pg-side .payblk .pb-row { padding: .3mm 0; }
.inv-phieu-giao .pg-side .payblk .pb-qr { width: auto; } .inv-phieu-giao .pg-side .payblk .pb-qr .qr { width: 26mm; height: 26mm; }

/* ---------- Khi in: chỉ in tờ hóa đơn ---------- */
@media print {
  .print-hint, #inv-page { display: none !important; }
  #inv-root { display: block; overflow: visible; }
  .inv { box-shadow: none; margin: 0 auto; }
  .inv-nhiet-80, .inv-nhiet-80-dam { width: 72mm; padding-left: 0; padding-right: 0; }
  .inv-nhiet-80-dam .pad { padding: 0 1mm; }
  .inv-nhiet-58 { width: 48mm; padding-left: 0; padding-right: 0; }
  .inv-a5-co-dien { min-height: 209mm; }
  .inv-a5-co-dien .frame { min-height: calc(209mm - 12mm); }
  .inv-a4-doanh-nghiep, .inv-a4-toi-gian, .inv-a4-hien-dai { min-height: 296mm; }
  .inv-a4-hai-lien { min-height: 296mm; }
  .inv-phieu-giao { min-height: 147mm; }
  .inv-tem-dan { border: 0; }
  .inv-k80-cafe, .inv-k80-sieu-thi { width: 72mm; padding-left: 0; padding-right: 0; }
  .inv-k80-cafe .holes { margin: 0 0 2mm; }
  .inv-a5-pastel, .inv-a5-la-xanh { min-height: 209mm; }
  .inv-a5-ngang { min-height: 147mm; }
  .inv-a4-den-vang, .inv-a4-ruy-bang, .inv-a4-bang-tinh, .inv-a4-cot-trai, .inv-a4-so-tay { min-height: 296mm; }
}
@media (max-width: 860px) { .print-bar .input { max-width: 100%; } }
