/* The six invoice templates. An invoice is an A4 page: 794 x 1123 CSS
   pixels on screen (scaled to fit), 210 x 297 mm on paper. It is the
   business's document, so it uses the business's colour (--brand), not the
   partner's theme. */

.inv {
  --ink: #16181D; --soft: #5E6573; --rule: #E3E5EA; --tint: color-mix(in srgb, var(--brand) 7%, #fff);
  position: relative; width: 794px; min-height: 1123px; padding: 56px 60px 48px; background: #fff; color: var(--ink);
  font: 13px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: flex; flex-direction: column; text-align: left; overflow: hidden;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; font-variant-numeric: tabular-nums;
}
.inv * { box-sizing: border-box; }
.inv h1, .inv h4, .inv p, .inv dl, .inv dd { margin: 0; }
.inv h4 { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); margin-bottom: 6px; }
.inv b { font-weight: 650; }
.inv .r { text-align: right; }
.inv table { width: 100%; border-collapse: collapse; }
.inv__logo { width: 64px; height: 64px; object-fit: contain; display: block; }
.inv__logo--text { display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: 20px; }
.inv__items { margin-top: 28px; }
.inv__items th { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); padding: 9px 10px; text-align: left; border-bottom: 1.5px solid var(--ink); }
.inv__items th.r { text-align: right; }
.inv__items td { padding: 11px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.inv__items th:first-child, .inv__items td:first-child { padding-left: 0; }
.inv__items th:last-child, .inv__items td:last-child { padding-right: 0; }
.inv__none { color: var(--soft); font-style: italic; }
.inv .inv__totals { width: 300px; margin: 18px 0 0 auto; }
.inv__totals td { padding: 6px 0; }
.inv__totals td:last-child { text-align: right; }
.inv__totals .inv__grand td { border-top: 1.5px solid var(--ink); padding-top: 10px; font-size: 17px; font-weight: 750; }
.inv__foot { margin-top: auto; padding-top: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.inv__foot p { color: #3A3F4A; }
.inv__legal { margin-top: 22px !important; padding-top: 12px; border-top: 1px solid var(--rule); color: var(--soft); font-size: 10.5px; text-align: center; }
.inv__stamp {
  position: absolute; top: 210px; right: 70px; transform: rotate(-12deg); padding: 6px 18px; border: 3px solid #1E9E63; border-radius: 8px;
  color: #1E9E63; font-size: 26px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .75; z-index: 2;
}
.inv dl { display: grid; grid-template-columns: auto auto; gap: 3px 16px; }
.inv dt { color: var(--soft); }
.inv dd { text-align: right; font-weight: 600; }
.inv__parties { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 30px; }

/* ---- Classic: serif, ruled, timeless ---- */
.inv--classic { font-family: Georgia, "Times New Roman", serif; font-size: 13.5px; border-top: 6px solid var(--brand); }
.inv--classic .inv__head { display: flex; justify-content: space-between; gap: 30px; }
.inv--classic .inv__from { display: grid; gap: 12px; }
.inv--classic .inv__title { text-align: right; }
.inv--classic h1 { font-size: 34px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 14px; }
.inv--classic h4 { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.inv--classic .inv__items th { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; border-bottom: 3px double var(--ink); }
.inv--classic .inv__totals .inv__grand td { border-top: 3px double var(--ink); }

/* ---- Modern: a colour band, cards, a big amount due ---- */
.inv--modern { padding-top: 0; }
.inv--modern .inv__band {
  margin: 0 -60px; padding: 34px 60px; background: var(--brand); color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 24px;
}
.inv--modern .inv__brand { display: flex; align-items: center; gap: 16px; }
.inv--modern .inv__brand .inv__logo { width: 62px; height: 62px; border-radius: 50%; background: #fff; padding: 3px; }
.inv--modern .inv__brand b { display: block; font-size: 19px; font-weight: 700; }
.inv--modern .inv__brand span { opacity: .8; font-size: 12px; }
.inv--modern .inv__title { text-align: right; }
.inv--modern h1 { font-size: 36px; font-weight: 300; letter-spacing: -0.01em; line-height: 1; }
.inv--modern .inv__title span { display: block; margin-top: 6px; opacity: .85; font-weight: 600; letter-spacing: .04em; }
.inv--modern .inv__cards { display: grid; grid-template-columns: 1.1fr 1.1fr 1fr; gap: 14px; margin-top: 30px; }
.inv--modern .inv__cards > div { padding: 14px 16px; border-radius: 10px; background: var(--tint); }
.inv--modern .inv__cards dl { grid-template-columns: 1fr; gap: 0; }
.inv--modern .inv__cards dd { text-align: left; margin-bottom: 6px; }
.inv--modern .inv__cards dt { font-size: 11px; }
.inv--modern .inv__items th { border-bottom: 0; background: var(--tint); color: color-mix(in srgb, var(--brand) 75%, #000); }
.inv--modern .inv__items th:first-child { padding-left: 12px; border-radius: 8px 0 0 8px; }
.inv--modern .inv__items th:last-child { padding-right: 12px; border-radius: 0 8px 8px 0; }
.inv--modern .inv__items td:first-child { padding-left: 12px; }
.inv--modern .inv__items td:last-child { padding-right: 12px; }
.inv--modern .inv__sum { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; margin-top: 22px; }
.inv--modern .inv__due { padding: 16px 20px; border-radius: 12px; background: var(--brand); color: #fff; min-width: 230px; }
.inv--modern .inv__due span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.inv--modern .inv__due b { display: block; font-size: 30px; font-weight: 750; letter-spacing: -0.02em; margin: 2px 0; }
.inv--modern .inv__due small { opacity: .85; }
.inv--modern .inv__totals { margin-top: 0; }
.inv--modern .inv__totals .inv__grand td { border-top-color: var(--brand); color: var(--brand); }
.inv--modern .inv__stamp { top: 150px; }

/* ---- Minimal: quiet, lots of air ---- */
.inv--minimal { padding: 72px 76px 56px; font-size: 12.5px; color: #2A2D33; }
.inv--minimal .inv__head { display: flex; justify-content: space-between; align-items: flex-start; }
.inv--minimal .inv__logo { width: 48px; height: 48px; }
.inv--minimal h1 { font-size: 15px; font-weight: 500; letter-spacing: .02em; }
.inv--minimal h1 span { color: var(--soft); margin-left: 8px; font-weight: 400; }
.inv--minimal .inv__grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 28px; margin-top: 64px; }
.inv--minimal .inv__grid3 dl { grid-template-columns: 1fr; gap: 0; }
.inv--minimal .inv__grid3 dd { text-align: left; font-weight: 500; margin-bottom: 8px; }
.inv--minimal .inv__vat { margin-top: 8px !important; color: var(--soft); }
.inv--minimal h4 { font-weight: 500; letter-spacing: .04em; text-transform: none; font-size: 11.5px; }
.inv--minimal .inv__items { margin-top: 64px; }
.inv--minimal .inv__items th { font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 11.5px; border-bottom: 1px solid var(--rule); }
.inv--minimal .inv__items td { border-bottom-color: #F0F1F4; padding: 13px 10px; }
.inv--minimal .inv__totals .inv__grand td { border-top: 1px solid var(--ink); font-size: 15px; font-weight: 600; }
.inv--minimal .inv__totals .inv__grand td:last-child::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-right: 8px; vertical-align: middle; }
.inv--minimal .inv__legal { border-top: 0; }

/* ---- Bold: heavy type, a block of colour for the total ---- */
.inv--bold .inv__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.inv--bold h1 { font-size: 64px; line-height: .9; font-weight: 900; letter-spacing: -0.04em; text-transform: uppercase; }
.inv--bold .inv__from { display: flex; gap: 14px; align-items: flex-start; text-align: right; }
.inv--bold .inv__from .inv__logo { order: 2; }
.inv--bold .inv__hero { display: grid; grid-template-columns: 1fr 1.2fr; margin-top: 34px; border-radius: 14px; overflow: hidden; }
.inv--bold .inv__hero > div { background: var(--brand); color: #fff; padding: 22px 24px; }
.inv--bold .inv__hero > div span { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.inv--bold .inv__hero > div b { display: block; font-size: 40px; font-weight: 850; letter-spacing: -0.03em; line-height: 1.1; }
.inv--bold .inv__hero dl { background: #16181D; color: #fff; padding: 18px 24px; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.inv--bold .inv__hero dl div { display: block; }
.inv--bold .inv__hero dt { color: rgba(255,255,255,.6); font-size: 11px; }
.inv--bold .inv__hero dd { text-align: left; font-weight: 700; }
.inv--bold .inv__items th { background: #16181D; color: #fff; border: 0; }
.inv--bold .inv__items th:first-child, .inv--bold .inv__items td:first-child { padding-left: 12px; }
.inv--bold .inv__items th:last-child, .inv--bold .inv__items td:last-child { padding-right: 12px; }
.inv--bold .inv__items td { font-weight: 550; }
.inv--bold .inv__totals .inv__grand td { font-size: 20px; font-weight: 900; border-top: 3px solid #16181D; }
.inv--bold .inv__stamp { top: 120px; right: 260px; }

/* ---- Receipt: a till slip down the middle of the page ---- */
.inv--receipt { align-items: center; padding: 56px 0; background: #fff; font-family: "SF Mono", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace; font-size: 12.5px; }
.inv--receipt .inv__slip { width: 380px; padding: 30px 28px 26px; background: #FCFCFA; border: 1px solid var(--rule); border-radius: 4px; box-shadow: 0 1px 0 #fff inset; }
.inv--receipt .inv__c { text-align: center; }
.inv--receipt .inv__c .inv__logo { margin: 0 auto 10px; width: 58px; height: 58px; }
.inv--receipt .inv__shop { display: block; font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.inv--receipt .inv__rule { border-top: 1.5px dashed #9AA0AA; margin: 14px 0 !important; }
.inv--receipt h1 { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 10px; }
.inv--receipt .inv__kv td { padding: 2px 0; }
.inv--receipt .inv__kv td:last-child { text-align: right; }
.inv--receipt .inv__addr { color: var(--soft); text-align: right; font-size: 11.5px; }
.inv--receipt .inv__items { margin: 0; }
.inv--receipt .inv__items td { border: 0; padding: 4px 0; }
.inv--receipt .inv__items small { display: block; color: var(--soft); font-size: 11px; }
.inv--receipt .inv__totals { width: 100%; margin: 0; }
.inv--receipt .inv__totals .inv__grand td { border-top: 0; font-size: 16px; }
.inv--receipt .inv__small { font-size: 11px; color: var(--soft); }
.inv--receipt .inv__thanks { margin: 12px 0 10px !important; font-weight: 700; }
.inv--receipt .inv__barcode { height: 38px; margin: 6px 24px 4px !important; background: repeating-linear-gradient(90deg, #16181D 0 2px, transparent 2px 4px, #16181D 4px 5px, transparent 5px 8px, #16181D 8px 11px, transparent 11px 12px); }
.inv--receipt .inv__stamp { top: 120px; right: 150px; }

/* ---- Detailed: VAT on every line, and a VAT summary ---- */
.inv--detailed { font-size: 12.5px; border-top: 6px solid var(--brand); }
.inv--detailed .inv__head { display: flex; justify-content: space-between; gap: 30px; }
.inv--detailed .inv__from { display: grid; gap: 12px; }
.inv--detailed h1 { font-size: 26px; font-weight: 750; letter-spacing: -0.01em; text-align: right; margin-bottom: 12px; color: var(--brand); }
.inv--detailed .inv__items--detail th { font-size: 9.5px; letter-spacing: .04em; padding: 8px 6px; vertical-align: bottom; line-height: 1.25; }
.inv--detailed .inv__items--detail td { padding: 9px 6px; }
.inv--detailed tfoot td { padding: 10px 6px; font-weight: 700; border-top: 1.5px solid var(--ink); }
.inv--detailed tfoot td:first-child { padding-left: 0; }
.inv--detailed tfoot td:last-child { padding-right: 0; }
.inv--detailed .inv__sum { display: flex; justify-content: space-between; gap: 30px; margin-top: 22px; align-items: flex-start; }
.inv--detailed .inv__vatsum { width: 300px; background: var(--tint); border-radius: 8px; }
.inv--detailed .inv__vatsum th, .inv--detailed .inv__vatsum td { padding: 7px 12px; text-align: left; white-space: nowrap; }
.inv--detailed .inv__vatsum th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--soft); }
.inv--detailed .inv__vatsum .r { text-align: right; }
.inv--detailed .inv__totals { margin-top: 0; }
