/* Invoice Studio — invoice paper + all 22 templates (the 14-template "studio"
   set, namespaced .style-*, plus the 8-template "premium pack", namespaced
   .gpaper). Shared by the editor (index.php) and the template gallery
   (templates.php) so a preview always matches what the editor renders. */

:root{
  --noir:#16181d;
  --logo-h:66px;
  --no-scale:1;
  --accent-55:#9590d6;
  --accent-60:#8c86d3;
  --accent-07:#f2f1fa;
}

.paper{background:#fff;box-shadow:0 18px 55px #1c214018;width:794px;min-height:1123px;position:relative;color:#252832}
.paper.capturing{box-shadow:none}
/* placeholder text shown in the live preview for empty fields (see phSpans /
   previewFill). Muted on screen; removed from the printed/PDF output so a real
   invoice never carries placeholder words. */
.paper .ph,.gpaper .ph{color:#c0c4cf!important;font-weight:400!important;font-style:normal}
.paper .ph-logo,.gpaper .ph-logo{opacity:.5}
.paper.capturing .ph,.gpaper.capturing .ph,.paper.capturing .ph-logo,.gpaper.capturing .ph-logo{display:none}
@media print{.paper .ph,.gpaper .ph,.paper .ph-logo,.gpaper .ph-logo{display:none}}
.paper.letter{width:816px;min-height:1056px}

/* ================= studio set: 14 templates (.style-*) ================= */
.invoice{padding:58px 60px;min-height:100%;font-size:12px}
.inv-head{display:flex;justify-content:space-between;gap:30px;margin-bottom:45px}
.logo{max-width:150px;max-height:65px;object-fit:contain;margin-bottom:10px;transition:.15s}
.bizname{font-size:22px;font-weight:800}
.muted{color:#7d8290}
.inv-title{text-align:right}
.inv-title h1{margin:0;font-size:34px;letter-spacing:2px}
.meta{margin-top:10px;line-height:1.8}
.parties{display:grid;grid-template-columns:1fr 1fr;gap:30px;margin-bottom:35px}
.label{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:#8a8e99;font-weight:800;margin-bottom:7px}
.party strong{display:block;font-size:14px;margin-bottom:4px}
.table{width:100%;border-collapse:collapse;margin-top:15px}
.table th{text-align:left;padding:11px 8px;font-size:10px;text-transform:uppercase;letter-spacing:.6px;color:#707585;border-bottom:2px solid #252832}
.table td{padding:12px 8px;border-bottom:1px solid #e9eaf0}
.table th.right,.table td.right{white-space:nowrap;padding-left:24px}
.table td:first-child,.table th:first-child{width:99%}
.right{text-align:right}
.totals{margin-left:auto;width:280px;margin-top:18px}
.totalrow{display:flex;justify-content:space-between;padding:6px 0}
.grand{border-top:2px solid #252832;margin-top:5px;padding-top:10px;font-size:17px;font-weight:800}
.notes{margin-top:42px;border-top:1px solid #e4e5ea;padding-top:16px;white-space:pre-line}
.footer{position:absolute;bottom:30px;left:60px;right:60px;text-align:center;color:#999eab;font-size:10px}
.logo-size-small{max-width:100px;max-height:45px}
.logo-size-medium{max-width:150px;max-height:65px}
.logo-size-large{max-width:220px;max-height:95px}

.style-modern .inv-head{border-bottom:5px solid var(--accent);padding-bottom:22px}.style-modern .table th{background:#f4f5ff;border:0}
.style-minimal .inv-title h1{font-weight:500}.style-minimal .table th{border-bottom:1px solid #ccc}
.style-elegant .inv-head{border-bottom:1px solid #c8a66b;padding-bottom:22px}.style-elegant .inv-title h1{font-family:Georgia,serif;font-weight:500;color:#6d5528}
.style-bold .inv-head{background:#20222b;color:#fff;margin:-58px -60px 38px;padding:35px 60px}.style-bold .muted{color:#c8cad1}.style-bold .table th{background:#20222b;color:#fff;border:0}
.style-emerald .table th{background:#e9f5f1;border:0;color:#186b5a}.style-emerald .grand{color:#176c5a;border-color:#176c5a}
.style-executive .inv-head{background:#191b23;color:#fff;margin:-58px -60px 40px;padding:38px 60px;border-bottom:6px solid var(--accent)}.style-executive .muted{color:#c6c9d2}.style-executive .table th{background:#f0f1f5;border:0}
.style-luxury .inv-head{border-bottom:1px solid #c7a969;padding-bottom:25px}.style-luxury .inv-title h1,.style-luxury .bizname{font-family:Georgia,serif;color:#6a5227}.style-luxury .table th{font-family:Georgia,serif;border-bottom:1px solid #b99b62}
.style-saas .inv-head{border-bottom:0;background:#f0f1ff;margin:-58px -60px 38px;padding:38px 60px}.style-saas .inv-title h1{color:var(--accent);font-size:30px}.style-saas .table th{background:#f4f5fb;border:0;border-radius:5px}
.style-creative .inv-head{border-left:9px solid var(--accent);padding-left:22px}.style-creative .inv-title h1{font-size:39px;letter-spacing:-1px}.style-creative .table th{color:var(--accent);border-bottom:2px solid var(--accent)}
.style-corporate .inv-head{background:#eef3f8;margin:-58px -60px 40px;padding:40px 60px;border-bottom:1px solid #d7dfe8}.style-corporate .table th{background:#26394d;color:#fff;border:0}
.style-sidebar .inv-head{display:grid;grid-template-columns:1fr 230px;background:#f5f6f8;margin:-58px -60px 42px;padding:0;color:#252832}.style-sidebar .inv-head>div:first-child{padding:38px 20px 38px 60px}.style-sidebar .inv-head .inv-title{background:var(--accent);color:#fff;padding:38px 60px}.style-sidebar .inv-head .inv-title h1{font-size:27px}.style-sidebar .inv-head .muted{color:#666b78}
.style-dark{background:#20222a;color:#f6f7fa}.style-dark .invoice{background:#20222a;color:#f6f7fa}.style-dark .muted{color:#b9bdc8}.style-dark .inv-head{border-bottom:4px solid var(--accent)}.style-dark .table th{background:#30333e;color:#fff;border:0}.style-dark .table td{border-color:#3a3d47}.style-dark .grand{border-color:#fff}
.style-compact .invoice{padding:40px 45px;font-size:10px}.style-compact .inv-head{margin-bottom:27px}.style-compact .table td{padding:7px}.style-compact .table th{padding:7px;background:#f5f6f8;border:0}.style-compact .notes{margin-top:25px}
.style-split .inv-head{background:linear-gradient(90deg,#edf3ff 0 42%,#fff 42%);margin:-58px -60px 42px;padding:45px 60px}.style-split .inv-title h1{color:var(--accent)}
.invoice{padding:58px 60px;min-height:100%;font-size:12px}

/* ===== Premium template pack (namespaced .gpaper) ===== */
.gpaper>.invoice{flex:1;display:flex;flex-direction:column;padding:0;min-width:0;font-size:14px;color:#14161c}
.gpaper{background:#fff;color:#14161c;box-shadow:0 1px 3px rgba(16,24,40,.1),0 20px 55px rgba(16,24,40,.14);overflow:hidden;display:flex;flex-direction:column;print-color-adjust:exact;-webkit-print-color-adjust:exact}
.gpaper.capturing{box-shadow:none}
.gpaper .inv{display:flex;flex-direction:column;flex:1}
.gpaper .body{display:flex;flex-direction:column;flex:1}
.gpaper .logo{width:auto;height:auto;max-width:var(--logo-w,150px);max-height:calc(var(--logo-w,150px) * .6);object-fit:contain;display:block}
.gpaper .mark{height:var(--logo-h);min-width:var(--logo-h);padding:0 .22em;border-radius:calc(var(--logo-h)*.22);background:var(--accent);display:inline-flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:calc(var(--logo-h)*.38);letter-spacing:.02em;flex:none}
.gpaper .addr{font-size:12.5px;line-height:1.6;color:#5b6270;white-space:pre-line}
.gpaper .lbl{font-size:9.5px;text-transform:uppercase;letter-spacing:.14em;color:#9aa1ac;font-weight:600;margin-bottom:6px}
.gpaper .who{font-size:13.5px;font-weight:600;color:#14161c;margin-bottom:2px}
.gpaper .notes{margin-top:auto;padding-top:28px;font-size:11.5px;color:#7b8290;line-height:1.65;white-space:pre-line}
.gpaper .invno{white-space:nowrap}

/* inline date lines — "Issue : 10 Aug 2026" */
.gpaper .dtline{display:flex;gap:7px;align-items:baseline;white-space:nowrap;line-height:1.5}
.gpaper .dtline + .dtline{margin-top:7px}
.gpaper .dtk{font-size:9.5px;text-transform:uppercase;letter-spacing:.14em;color:#9aa1ac;font-weight:600}
.gpaper .dtv{font-size:12.5px;font-weight:600;color:#14161c}
.gpaper .dtgroup{flex:none}

/* shared table skeleton */
.gpaper table.li{width:100%;border-collapse:collapse}
.gpaper table.li th{font-size:9.5px;text-transform:uppercase;letter-spacing:.12em;color:#9aa1ac;text-align:left;padding:0 0 11px;font-weight:600}
.gpaper table.li th.r,.gpaper table.li td.r{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;padding-left:30px}
.gpaper table.li td:first-child,.gpaper table.li th:first-child{width:99%}
.gpaper table.li td{padding:13px 0;font-size:13px;vertical-align:top;color:#5b6270;border-bottom:1px solid #f1f2f5}
.gpaper table.li td .desc{font-weight:500;color:#14161c;font-size:13.5px}
.gpaper .totals{margin-top:22px;margin-left:auto;width:280px}
.gpaper .trow{display:flex;justify-content:space-between;align-items:baseline;gap:26px;font-size:13px;padding:8px 0;color:#5b6270;font-variant-numeric:tabular-nums}
.gpaper .grand{display:flex;justify-content:space-between;align-items:baseline;gap:28px;font-size:18px;font-weight:700;color:#14161c;padding-top:13px;margin-top:5px;border-top:2px solid #14161c;font-variant-numeric:tabular-nums}
.gpaper .grand > span:last-child{white-space:nowrap}

/* ================= 1. NOIR ================= */
.gpaper.tpl-noir{font-family:Inter,sans-serif}
.tpl-noir .nb-top{background:var(--noir);color:#fff;padding:38px 46px 30px;display:flex;justify-content:space-between;align-items:flex-start;gap:26px}
.tpl-noir .nb-brand{display:flex;flex-direction:column;gap:12px;min-width:0}
.tpl-noir .chip{background:#fff;border-radius:10px;padding:8px 11px;align-self:flex-start;display:inline-flex}
.tpl-noir .nb-name{font-family:'Space Grotesk',sans-serif;font-size:17px;font-weight:600;color:#fff;letter-spacing:-.01em}
.tpl-noir .nb-top .addr{color:rgba(255,255,255,.55);font-size:12px}
.tpl-noir .nb-title{text-align:right;flex:none}
.tpl-noir .nb-title b{display:block;font-family:'Space Grotesk',sans-serif;font-size:15px;font-weight:600;letter-spacing:.42em;text-transform:uppercase;color:var(--accent)}
.tpl-noir .nb-title .invno{display:block;font-family:'IBM Plex Mono',monospace;font-size:calc(26px * var(--no-scale));color:#fff;margin-top:10px;letter-spacing:-.01em;line-height:1.15}
.tpl-noir .nb-strip{background:#1e2129;display:flex;gap:38px;padding:20px 46px;align-items:flex-start}
.tpl-noir .nb-strip > div{flex:none;min-width:0}
.tpl-noir .nb-strip > div:first-child{flex:1 1 auto}
.tpl-noir .nb-strip .lbl{color:rgba(255,255,255,.4)}
.tpl-noir .nb-strip .who{color:#fff;font-size:13px}
.tpl-noir .nb-strip .addr{color:rgba(255,255,255,.55);font-size:11.5px}
.tpl-noir .dtk{color:rgba(255,255,255,.42)}
.tpl-noir .dtv{color:#fff;font-family:'IBM Plex Mono',monospace;font-size:12px}
.tpl-noir .body{padding:34px 46px 42px}
.tpl-noir table.li th{color:#14161c;border-bottom:1.5px solid var(--noir);padding-bottom:10px}
.tpl-noir table.li td.r{font-family:'IBM Plex Mono',monospace;font-size:12.5px}
.tpl-noir .totals{width:310px}
.tpl-noir .trow{font-family:'IBM Plex Mono',monospace;font-size:12.5px}
.tpl-noir .grand{background:var(--noir);color:#fff;border:none;margin-top:12px;padding:15px 18px;font-family:'Space Grotesk',sans-serif;font-size:17px}

/* ================= 2. AURORA ================= */
.gpaper.tpl-aurora{font-family:Inter,sans-serif}
.tpl-aurora .au-hero{background:linear-gradient(135deg,var(--accent) 0%,var(--accent-55) 100%);color:#fff;padding:40px 46px 62px;display:flex;justify-content:space-between;align-items:flex-start;gap:26px}
.tpl-aurora .au-hero > div:first-child{min-width:0}
.tpl-aurora .au-name{font-size:18px;font-weight:700;color:#fff;margin-top:12px;letter-spacing:-.01em}
.tpl-aurora .au-hero .addr{color:rgba(255,255,255,.8);font-size:12px}
.tpl-aurora .au-title{text-align:right;flex:none}
.tpl-aurora .au-title b{display:block;font-size:38px;font-weight:800;letter-spacing:-.03em;line-height:1}
.tpl-aurora .au-title .invno{display:inline-block;margin-top:10px;background:rgba(255,255,255,.2);border-radius:99px;padding:5px 13px;font-size:calc(12px * max(var(--no-scale),.72));font-weight:600}
.tpl-aurora .body{padding:0 46px 44px}
.tpl-aurora .au-card{background:#fff;border-radius:18px;box-shadow:0 10px 34px rgba(16,24,40,.13);padding:22px 24px;display:flex;gap:30px;margin-top:-30px;position:relative;align-items:flex-start}
.tpl-aurora .au-card > div{flex:none;min-width:0}
.tpl-aurora .au-card > div:first-child{flex:1 1 auto}
.tpl-aurora table.li{margin-top:30px}
.tpl-aurora table.li th{color:var(--accent);padding:11px 0}
.tpl-aurora table.li thead tr{background:var(--accent-07)}
.tpl-aurora table.li th:first-child{border-radius:9px 0 0 9px;padding-left:14px}
.tpl-aurora table.li th:last-child{border-radius:0 9px 9px 0;padding-right:14px}
.tpl-aurora table.li td{border-bottom:1px solid #f1f2f5}
.tpl-aurora table.li td:first-child{padding-left:14px}
.tpl-aurora table.li td:last-child{padding-right:14px}
.tpl-aurora .grand{border:none;background:linear-gradient(135deg,var(--accent),var(--accent-60));color:#fff;border-radius:99px;padding:14px 24px;margin-top:10px;font-size:16px}

/* ================= 3. MONOGRAM ================= */
.gpaper.tpl-monogram{font-family:Inter,sans-serif}
.tpl-monogram .inv{padding:54px 58px 48px}
.tpl-monogram .mg-head{text-align:center}
.tpl-monogram .mg-head .logo,.tpl-monogram .mg-head .mark{margin:0 auto}
.tpl-monogram .mg-name{font-family:'Instrument Serif',serif;font-size:30px;margin-top:16px;letter-spacing:.01em}
.tpl-monogram .mg-head .addr{text-align:center;font-size:12px;margin-top:6px}
.tpl-monogram .mg-rule{width:100%;height:1px;background:#e4e0d8;margin:26px 0;position:relative}
.tpl-monogram .mg-rule::after{content:"";position:absolute;left:50%;top:-3.5px;width:8px;height:8px;transform:translateX(-50%) rotate(45deg);background:var(--accent)}
.tpl-monogram .mg-title{font-family:'Instrument Serif',serif;font-style:italic;font-size:34px;color:var(--accent);text-align:center;line-height:1}
.tpl-monogram .mg-meta{display:flex;justify-content:center;flex-wrap:wrap;gap:8px 22px;margin-top:14px}
.tpl-monogram .mg-meta .invno{font-size:11.5px;letter-spacing:.1em;color:#8a8578;text-transform:uppercase;align-self:center}
.tpl-monogram .mg-to{text-align:center;margin:30px 0 10px}
.tpl-monogram .mg-to .addr{text-align:center}
.tpl-monogram table.li{margin-top:14px}
.tpl-monogram table.li th{border-bottom:1px solid #e4e0d8;letter-spacing:.18em;color:#a39c8c}
.tpl-monogram table.li td{border-bottom:1px solid #f4f1ea}
.tpl-monogram .grand{font-family:'Instrument Serif',serif;font-size:24px;font-weight:400;border-top:1px solid var(--accent)}
.tpl-monogram .notes{border-top:1px solid #f4f1ea;margin-top:34px}

/* ================= 4. LEDGER ================= */
.gpaper.tpl-ledger{font-family:Inter,sans-serif}
.tpl-ledger .inv{padding:46px 48px 44px}
.tpl-ledger .ld-head{display:flex;justify-content:space-between;align-items:flex-start;gap:26px;margin-bottom:26px}
.tpl-ledger .ld-head > div:first-child{min-width:0}
.tpl-ledger .ld-name{font-size:17px;font-weight:700;margin-top:11px;letter-spacing:-.01em}
.tpl-ledger .ld-box{border:1.5px solid var(--ink);min-width:250px;flex:none}
.tpl-ledger .ld-box .r0{display:flex;justify-content:space-between;gap:22px;padding:9px 13px;border-bottom:1px solid #e6e8ec;font-size:12px}
.tpl-ledger .ld-box .r0:last-child{border-bottom:none}
.tpl-ledger .ld-box .k{font-family:'IBM Plex Mono',monospace;font-size:10px;text-transform:uppercase;letter-spacing:.1em;color:#8a909c;white-space:nowrap}
.tpl-ledger .ld-box .v{font-family:'IBM Plex Mono',monospace;font-weight:500;color:var(--ink);white-space:nowrap}
.tpl-ledger .ld-box .hd{background:var(--ink);color:#fff;padding:9px 13px;font-family:'IBM Plex Mono',monospace;font-size:11px;letter-spacing:.22em;text-transform:uppercase}
.tpl-ledger .ld-to{margin-bottom:22px}
.tpl-ledger .lbl{font-family:'IBM Plex Mono',monospace;letter-spacing:.16em}
.tpl-ledger table.li{border:1.5px solid var(--ink)}
.tpl-ledger table.li th{background:var(--ink);color:#fff;padding:10px 14px;font-family:'IBM Plex Mono',monospace;letter-spacing:.13em}
.tpl-ledger table.li td{padding:11px 14px;border-bottom:1px solid #eceef1}
.tpl-ledger table.li tbody tr:nth-child(even){background:#f8f9fa}
.tpl-ledger table.li tbody tr:last-child td{border-bottom:none}
.tpl-ledger table.li td.r{font-family:'IBM Plex Mono',monospace;font-size:12.5px}
.tpl-ledger .totals{border:1.5px solid var(--ink);width:300px;margin-top:20px}
.tpl-ledger .trow{padding:9px 14px;border-bottom:1px solid #eceef1;font-family:'IBM Plex Mono',monospace;font-size:12px}
.tpl-ledger .grand{border-top:none;margin-top:0;padding:12px 14px;background:var(--ink);color:#fff;font-family:'IBM Plex Mono',monospace;font-size:15px;letter-spacing:.02em}

/* ================= 5. EDITORIAL ================= */
.gpaper.tpl-editorial{font-family:Inter,sans-serif}
.tpl-editorial .inv{padding:50px 52px 46px}
.tpl-editorial .ed-top{display:flex;justify-content:space-between;align-items:flex-start;gap:26px;margin-bottom:34px}
.tpl-editorial .ed-top > div:first-child{min-width:0}
.tpl-editorial .ed-word{font-family:Fraunces,serif;font-size:64px;font-weight:600;line-height:.86;letter-spacing:-.035em;color:var(--ink)}
.tpl-editorial .ed-no{font-family:'IBM Plex Mono',monospace;font-size:calc(12.5px * max(var(--no-scale),.8));color:var(--accent);margin-top:14px;letter-spacing:.1em}
.tpl-editorial .ed-brand{text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:11px;flex:none;max-width:46%}
.tpl-editorial .ed-name{font-size:15px;font-weight:700}
.tpl-editorial .ed-brand .addr{text-align:right;font-size:12px}
.tpl-editorial .ed-meta{display:flex;gap:30px;border-top:3px solid var(--ink);border-bottom:1px solid #e6e8ec;padding:20px 0;margin-bottom:6px;align-items:flex-start}
.tpl-editorial .ed-meta > div{flex:none;min-width:0}
.tpl-editorial .ed-meta > div:first-child{flex:1 1 auto}
.tpl-editorial table.li{margin-top:16px}
.tpl-editorial table.li th{color:var(--ink);border-bottom:1px solid #e6e8ec;padding-bottom:9px}
.tpl-editorial table.li td .desc{font-family:Fraunces,serif;font-size:15px;font-weight:500}
.tpl-editorial .totals{width:100%;display:flex;flex-direction:column;align-items:flex-end;margin-top:16px}
.tpl-editorial .trow{width:260px}
.tpl-editorial .grand{width:100%;border-top:3px solid var(--ink);font-family:Fraunces,serif;font-size:34px;font-weight:600;letter-spacing:-.02em;padding-top:16px;margin-top:10px}

/* ================= 6. SLATE ================= */
.gpaper.tpl-slate{font-family:'Space Grotesk',sans-serif}
.tpl-slate .inv{display:grid;grid-template-columns:74px 1fr;flex:1}
.tpl-slate .sl-rail{background:var(--accent);color:#fff;position:relative;overflow:hidden}
.tpl-slate .sl-rail span{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) rotate(-90deg);font-size:13px;letter-spacing:.55em;text-transform:uppercase;font-weight:600;white-space:nowrap}
.tpl-slate .sl-main{padding:44px 46px 42px;display:flex;flex-direction:column;font-family:Inter,sans-serif;min-width:0}
.tpl-slate .sl-top{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;margin-bottom:32px}
.tpl-slate .sl-top > div:first-child{min-width:0}
.tpl-slate .sl-top > div:last-child{flex:none;text-align:right}
.tpl-slate .sl-name{font-family:'Space Grotesk',sans-serif;font-size:17px;font-weight:600;margin-top:11px}
.tpl-slate .sl-no{font-family:'Space Grotesk',sans-serif;font-size:calc(30px * var(--no-scale));font-weight:700;letter-spacing:-.025em;text-align:right;color:var(--accent);line-height:1.15;margin-bottom:10px}
.tpl-slate .sl-top .dtline{justify-content:flex-end}
.tpl-slate .sl-meta{background:#f6f7f9;border-left:3px solid var(--accent);padding:18px 20px;margin-bottom:8px}
.tpl-slate table.li th{color:var(--accent);border-bottom:1px solid #e6e8ec;padding-bottom:10px}
.tpl-slate .grand{border-top:2px solid var(--accent);color:var(--accent);font-family:'Space Grotesk',sans-serif}
@media(max-width:520px){.tpl-slate .inv{grid-template-columns:1fr}.tpl-slate .sl-rail{height:44px}.tpl-slate .sl-rail span{transform:translate(-50%,-50%)}}

/* ================= 7. CLASSIC ================= */
.gpaper.tpl-classic{font-family:Inter,sans-serif}
.tpl-classic .inv{padding:52px 54px 46px}
.tpl-classic .cl-head{text-align:center;padding-bottom:22px;border-bottom:3px double var(--ink)}
.tpl-classic .cl-head .logo,.tpl-classic .cl-head .mark{margin:0 auto}
.tpl-classic .cl-name{font-family:Fraunces,serif;font-size:27px;font-weight:600;margin-top:14px;letter-spacing:-.01em}
.tpl-classic .cl-head .addr{text-align:center;font-size:12px;margin-top:5px}
.tpl-classic .cl-title{font-family:Fraunces,serif;font-size:13px;letter-spacing:.45em;text-transform:uppercase;color:var(--accent);font-weight:600;margin-top:14px}
.tpl-classic .cl-meta{display:flex;justify-content:space-between;gap:26px;padding:24px 0 10px}
.tpl-classic .cl-meta .rt{text-align:right;flex:none}
.tpl-classic .cl-meta .rt .who{font-size:calc(13.5px * max(var(--no-scale),.85))}
.tpl-classic .cl-meta .rt .dtline{justify-content:flex-end}
.tpl-classic table.li th{border-bottom:1.5px solid var(--ink);padding-bottom:9px;color:var(--ink)}
.tpl-classic .grand{font-family:Fraunces,serif;font-weight:600}

/* ================= 8. MINIMAL (airy) ================= */
.gpaper.tpl-airy{font-family:Inter,sans-serif}
.tpl-airy .inv{padding:56px 56px 50px}
.tpl-airy .mn-top{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;padding-bottom:16px;border-bottom:1px solid var(--ink)}
.tpl-airy .mn-top > div:first-child{min-width:0}
.tpl-airy .mn-top > div:last-child{flex:none}
.tpl-airy .mn-name{font-size:13.5px;font-weight:600;letter-spacing:.01em;margin-top:10px}
.tpl-airy .mn-t{font-size:10px;text-transform:uppercase;letter-spacing:.4em;color:#9aa1ac;font-weight:600;text-align:right}
.tpl-airy .mn-no{font-size:calc(13.5px * max(var(--no-scale),.85));font-weight:600;text-align:right;margin-top:8px}
.tpl-airy .mn-meta{display:flex;flex-wrap:wrap;gap:20px 28px;padding:26px 0 34px;align-items:flex-start}
.tpl-airy .mn-meta > div{flex:1 1 140px;min-width:0}
.tpl-airy .mn-meta > .dtgroup{flex:0 0 auto}
.tpl-airy .mn-meta .addr{font-size:11.5px}
.tpl-airy .lbl{font-size:9px;letter-spacing:.18em}
.tpl-airy table.li th{border-bottom:1px solid #e6e8ec;padding-bottom:9px;color:#b6bbc4}
.tpl-airy table.li td{border-bottom:none;padding:9px 0}
.tpl-airy .totals{width:100%;margin-top:26px}
.tpl-airy .trow{width:250px;margin-left:auto;font-size:12px;padding:6px 0;border-bottom:1px solid #f1f2f5}
.tpl-airy .grand{width:100%;border-top:1px solid var(--ink);padding-top:18px;margin-top:14px;font-size:15px;font-weight:600}
.tpl-airy .grand > span:last-child{font-size:40px;font-weight:700;letter-spacing:-.035em;color:var(--accent)}

@media print{
  body{background:#fff}
  .paper{box-shadow:none;margin:0!important;transform:none!important;width:210mm;min-height:297mm}
  .paper.letter{width:8.5in;min-height:11in}
  .invoice{padding:15mm}
}

/* --- Phase 3: type-appropriate document blocks --- */
.doc-extras{margin-top:18px;display:flex;flex-direction:column;gap:14px}
.se-lbl{font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:#8a8a99;font-weight:700;margin-bottom:4px}
.ship-to{margin-top:6px}
.ship-to .se-addr{font-size:12.5px;line-height:1.5}
.pay-block{border:1px solid #e6e6ef;border-radius:8px;padding:10px 12px;max-width:340px}
.pay-block .pr{display:flex;justify-content:space-between;gap:20px;font-size:12.5px;padding:2px 0}
.acceptance-block{display:flex;gap:24px;margin-top:20px}
.acceptance-block .acc-col{flex:1;font-size:11px;color:#6a6a78;text-align:center}
.acceptance-block .acc-line{display:block;border-bottom:1px solid #b9b9c6;height:26px;margin-bottom:5px}
.standing-note{font-size:11.5px;color:#8a8a99;font-style:italic}
.paper.doc-paid{position:relative}
.paper.doc-paid::after{content:'PAID';position:absolute;top:26px;right:30px;font-family:'Geist',Arial,sans-serif;font-weight:800;font-size:34px;letter-spacing:.06em;color:rgba(40,160,90,.16);border:3px solid rgba(40,160,90,.22);border-radius:8px;padding:4px 14px;transform:rotate(-14deg);pointer-events:none}
