/* biz-doc.css — business documents: the page (templates) and the studio around it */
@font-face{font-family:'BDSans';src:url(../vendor/noto/NotoSans-Regular.ttf) format('truetype');font-weight:400;font-display:swap}
@font-face{font-family:'BDSans';src:url(../vendor/noto/NotoSans-Bold.ttf) format('truetype');font-weight:700;font-display:swap}
/* ---------- page ---------- */
.bd-p{--bd-ac:#3b5bdb;--bd-ink:#1f2937;--bd-mute:#6b7280;--bd-line:#e5e7eb;--bd-soft:color-mix(in srgb,var(--bd-ac) 8%,#fff);width:210mm;min-height:297mm;box-sizing:border-box;padding:15mm 15mm 14mm;background:#fff;color:var(--bd-ink);font:9.5pt/1.45 'BDSans','Noto Sans',Arial,sans-serif;position:relative;text-align:left}
.bd-p.p-letter{width:215.9mm;min-height:279.4mm}
.bd-p.f-serif{font-family:Georgia,'Times New Roman',serif}
.bd-p *{box-sizing:border-box}
.bd-p p{margin:0}
.bd-head{display:flex;align-items:flex-start;gap:8mm;margin-bottom:9mm}
.bd-logo{max-width:60mm;object-fit:contain;object-position:left center}
.bd-ttl{flex:1;min-width:0}
.bd-ttl h1{margin:0;font-size:22pt;line-height:1.1;letter-spacing:.02em;color:var(--bd-ac);font-weight:700}
.bd-status{display:inline-block;margin-top:2mm;padding:.6mm 3mm;border:.5mm solid currentColor;border-radius:1.5mm;font-size:8.5pt;font-weight:700;letter-spacing:.08em;color:#64748b}
.bd-status.s-paid{color:#15803d}.bd-status.s-overdue{color:#b91c1c}.bd-status.s-sent{color:#1d4ed8}.bd-status.s-draft{color:#92400e}
.bd-meta{display:grid;gap:1.2mm;text-align:right;min-width:52mm}
.bd-meta div{display:flex;justify-content:space-between;gap:5mm}
.bd-meta span{color:var(--bd-mute)}
.bd-meta b{font-weight:700}
.bd-parties{display:grid;grid-template-columns:repeat(auto-fit,minmax(50mm,1fr));gap:6mm;margin-bottom:7mm}
.bd-lbl{display:block;font-size:7.5pt;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--bd-mute);margin-bottom:1mm}
.bd-party b{display:block;font-size:10.5pt;margin-bottom:.6mm}
.bd-party p{color:#374151}
.bd-tid{font-weight:700;color:var(--bd-ink)!important}
.bd-items{width:100%;border-collapse:collapse;margin-bottom:5mm}
.bd-items th{background:var(--bd-ac);color:#fff;font-size:8pt;font-weight:700;text-align:left;padding:2.2mm 2mm;text-transform:uppercase;letter-spacing:.04em}
.bd-items td{padding:2.2mm 2mm;border-bottom:.3mm solid var(--bd-line);vertical-align:top}
.bd-items .r{text-align:right;white-space:nowrap}
.bd-items .n{width:7mm;color:var(--bd-mute)}
.bd-items td.d b{font-weight:600}
.bd-items td.d small{display:block;color:var(--bd-mute);font-size:8.5pt;margin-top:.5mm}
.bd-empty{text-align:center;color:var(--bd-mute);padding:8mm!important}
.bd-sum{display:flex;gap:8mm;align-items:flex-start;margin-bottom:6mm}
.bd-sum-l{flex:1;min-width:0;display:grid;gap:4mm}
.bd-totals{width:76mm;display:grid;gap:1.4mm}
.bd-totals>div{display:flex;justify-content:space-between;gap:4mm}
.bd-totals span{color:#4b5563}
.bd-grand{border-top:.4mm solid var(--bd-ink);padding-top:2mm;margin-top:1mm;font-size:12pt}
.bd-grand span,.bd-grand b{color:var(--bd-ink)!important;font-weight:700}
.bd-bal{background:var(--bd-soft);padding:1.6mm 2mm;border-radius:1.5mm;font-weight:700}
.bd-words{font-size:8.5pt;color:#374151}
.bd-words span{font-weight:700}
.bd-legal{font-size:8.5pt;font-weight:700}
.bd-pay{display:flex;gap:5mm;align-items:flex-start}
.bd-pay>div:first-child{flex:1}
.bd-qr{text-align:center;width:28mm}
.bd-qr svg{width:28mm;height:28mm;display:block}
.bd-qr small{display:block;font-size:7pt;color:var(--bd-mute)}
.bd-gst{width:100%;border-collapse:collapse;margin-bottom:6mm;font-size:8.5pt}
.bd-gst th,.bd-gst td{border:.3mm solid var(--bd-line);padding:1.4mm 2mm;text-align:left}
.bd-gst th{background:#f8fafc}
.bd-gst .r{text-align:right}
.bd-note{margin-bottom:4mm}
.bd-note p{color:#374151}
.bd-foot{display:flex;justify-content:flex-end;gap:12mm;margin-top:8mm}
.bd-sign{text-align:center;min-width:50mm}
.bd-sign img{max-height:18mm;max-width:55mm;display:block;margin:0 auto 1mm}
.bd-sign i{display:block;height:14mm}
.bd-sign span{display:block;border-top:.3mm solid #9ca3af;padding-top:1mm;font-weight:600}
.bd-sign small{color:var(--bd-mute)}
.bd-accept{margin-right:auto}
.bd-gen{position:absolute;left:15mm;bottom:7mm;font-size:7pt;color:#9ca3af}
/* modern: coloured header band */
.t-modern .bd-head{margin:-15mm -15mm 9mm;padding:12mm 15mm 9mm;background:var(--bd-ac);color:#fff}
.t-modern .bd-ttl h1,.t-modern .bd-meta span,.t-modern .bd-meta b{color:#fff}
.t-modern .bd-status{color:#fff}
.t-modern .bd-logo{background:#fff;border-radius:2mm;padding:1.5mm}
.t-modern .bd-items th{background:var(--bd-soft);color:var(--bd-ac)}
/* minimal: hairlines, no fills */
.t-minimal .bd-ttl h1{font-weight:400;letter-spacing:.25em;color:var(--bd-ink);font-size:18pt}
.t-minimal .bd-items th{background:none;color:var(--bd-mute);border-bottom:.4mm solid var(--bd-ink)}
.t-minimal .bd-bal{background:none;border-top:.3mm solid var(--bd-line)}
/* bold: dark table head and a big total box */
.t-bold .bd-ttl h1{font-size:30pt;color:var(--bd-ink)}
.t-bold .bd-items th{background:var(--bd-ink)}
.t-bold .bd-grand{background:var(--bd-ac);color:#fff;border:0;padding:3mm;border-radius:2mm}
.t-bold .bd-grand span,.t-bold .bd-grand b{color:#fff!important}
/* compact: more rows per page */
.t-compact{font-size:8.5pt;padding:11mm 12mm}
.t-compact .bd-head{margin-bottom:5mm}
.t-compact .bd-ttl h1{font-size:16pt}
.t-compact .bd-items td,.t-compact .bd-items th{padding:1.3mm 1.6mm}
.t-compact .bd-parties{margin-bottom:4mm}

.bd-out .bd-p{min-height:0;padding-top:8mm;padding-bottom:4mm}.bd-out .t-modern .bd-head{margin-top:-8mm}
/* ---------- studio ---------- */
#studio.ps{display:block}
.bs{--bs-gap:16px;text-align:left;color:var(--text,#1e2635)}
.bs-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;background:var(--panel,#fff);border:1px solid var(--border,#e4e9f2);border-radius:14px;padding:8px 10px;margin-bottom:var(--bs-gap);position:sticky;top:calc(var(--ps-top,0px) + 6px);z-index:20}
.bs-bar .grow{flex:1}
.bs-b{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--border-2,#dfe4ee);background:var(--panel,#fff);color:inherit;border-radius:10px;padding:7px 12px;font:600 13px inherit;font-family:inherit;cursor:pointer;width:auto;min-width:0;white-space:nowrap}
.bs-b:hover{border-color:var(--accent,#4f6ef7)}
.bs-b.pri{background:var(--accent,#4f6ef7);border-color:var(--accent,#4f6ef7);color:#fff}
.bs-b.on{background:var(--accent-soft,#eef1fe);border-color:var(--accent,#4f6ef7);color:var(--accent-dark,#3a52c4)}
.bs-b svg{width:16px;height:16px}
.bs-seg{display:inline-flex;border:1px solid var(--border-2,#dfe4ee);border-radius:10px;overflow:hidden}
.bs-seg button{border:0;background:none;padding:7px 10px;font:600 12.5px inherit;font-family:inherit;color:var(--muted,#5a6377);cursor:pointer;min-width:0;width:auto}
.bs-seg button.on{background:var(--accent-soft,#eef1fe);color:var(--accent-dark,#3a52c4)}
.bs-menu{position:relative}
.bs-menu>div{position:absolute;right:0;top:calc(100% + 6px);background:var(--panel,#fff);border:1px solid var(--border,#e4e9f2);border-radius:12px;box-shadow:0 12px 32px rgba(15,23,42,.14);padding:6px;display:grid;min-width:220px;z-index:30}
.bs-menu>div[hidden]{display:none}
.bs-menu>div button{border:0;background:none;text-align:left;padding:8px 10px;border-radius:8px;font:500 13.5px inherit;font-family:inherit;color:inherit;cursor:pointer;width:auto}
.bs-menu>div button:hover{background:var(--field,#f4f6fb)}
.bs-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.08fr);gap:var(--bs-gap);align-items:start}
.bs.swap .bs-ed{order:2}.bs.swap .bs-pv{order:1}
.bs.only-ed .bs-body{grid-template-columns:minmax(0,1fr)}.bs.only-ed .bs-pv{display:none}
.bs.only-pv .bs-body{grid-template-columns:minmax(0,1fr)}.bs.only-pv .bs-ed{display:none}
.bs-ed{display:grid;gap:12px;min-width:0}
.bs-card{background:var(--panel,#fff);border:1px solid var(--border,#e4e9f2);border-radius:14px;min-width:0}
.bs-card>summary{list-style:none;cursor:pointer;padding:13px 16px;font-weight:700;font-size:14.5px;display:flex;align-items:center;gap:8px}
.bs-card>summary::-webkit-details-marker{display:none}
.bs-card>summary::after{content:'';margin-left:auto;width:8px;height:8px;border-right:2px solid var(--muted,#5a6377);border-bottom:2px solid var(--muted,#5a6377);transform:rotate(45deg);transition:transform .15s}
.bs-card[open]>summary::after{transform:rotate(-135deg)}
.bs-card>summary small{font-weight:500;color:var(--muted,#5a6377);font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:50%}
.bs-in{padding:0 16px 16px;display:grid;gap:10px}
.bs-g2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.bs-g3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.bs-f{display:flex;flex-direction:column;gap:4px;min-width:0}
.bs-f>span{font-size:12px;font-weight:600;color:var(--muted,#5a6377)}
.bs-f input,.bs-f select,.bs-f textarea{width:100%;box-sizing:border-box;border:1px solid var(--border,#e4e9f2);border-radius:9px;padding:8px 10px;background:var(--panel,#fff);color:inherit;font:14px inherit;font-family:inherit;min-width:0}
.bs-f textarea{resize:vertical;min-height:56px}
.bs-f input:focus,.bs-f select:focus,.bs-f textarea:focus{outline:0;border-color:var(--accent,#4f6ef7);box-shadow:0 0 0 3px var(--accent-soft,#eef1fe)}
.bs-chk{display:flex;align-items:center;gap:8px;font-size:13.5px;cursor:pointer}
.bs-chk input{width:17px;height:17px;margin:0}
.bs-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.bs-hint{font-size:12px;color:var(--muted,#5a6377);margin:0}
.bs-logo{display:flex;gap:12px;align-items:center}
.bs-logo .bs-drop{flex:1;border:2px dashed var(--border-2,#dfe4ee);border-radius:12px;padding:12px;text-align:center;font-size:13px;color:var(--muted,#5a6377);cursor:pointer}
.bs-logo .bs-drop.over{border-color:var(--accent,#4f6ef7);background:var(--accent-soft,#eef1fe)}
.bs-logo img{max-height:56px;max-width:120px;border-radius:6px;border:1px solid var(--border,#e4e9f2);background:#fff}
/* items */
.bs-items{display:grid;gap:8px}
.bs-it{display:grid;grid-template-columns:18px minmax(0,1fr) 26px;gap:6px;align-items:start;background:var(--field,#f8fafc);border:1px solid var(--border,#eef1f6);border-radius:11px;padding:8px}
.bs-it.drag{opacity:.4}
.bs-it .h{cursor:grab;color:var(--faint,#9aa3b5);font-size:14px;line-height:34px;user-select:none;text-align:center}
.bs-it input,.bs-it textarea,.bs-it select{width:100%;box-sizing:border-box;border:1px solid var(--border,#e4e9f2);border-radius:8px;padding:7px 8px;background:var(--panel,#fff);color:inherit;font:13.5px inherit;font-family:inherit;min-width:0}
.bs-it textarea{resize:vertical;min-height:32px;margin-top:5px;font-size:12.5px}
.bs-it .amtl{flex:1.4 1 110px!important;text-align:right}.bs-it .amt{font-weight:700;font-size:14px;line-height:33px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bs-it .x{border:0;background:none;color:var(--faint,#9aa3b5);font-size:18px;cursor:pointer;line-height:32px;padding:0;width:auto;min-width:0}
.bs-it .x:hover{color:#dc2626}
.bs-it .more{grid-column:2/-1;display:flex;flex-wrap:wrap;gap:6px}.bs-it .more label{min-width:70px}
.bs-it .more label{display:flex;flex-direction:column;gap:2px;font-size:11px;color:var(--muted,#5a6377);flex:1 1 80px}


/* templates */
.bs-tpls{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.bs-tpl{border:2px solid var(--border,#e4e9f2);border-radius:10px;padding:6px;background:#fff;cursor:pointer;display:grid;gap:4px;font:600 11.5px inherit;font-family:inherit;color:#1f2937;width:auto;min-width:0}
.bs-tpl.on{border-color:var(--accent,#4f6ef7)}
.bs-tpl i{display:block;height:44px;border-radius:5px;background:linear-gradient(#e5e7eb,#e5e7eb) 6px 26px/60% 3px no-repeat,linear-gradient(#e5e7eb,#e5e7eb) 6px 32px/80% 3px no-repeat,#fafafa}
.bs-tpl[data-t=classic] i{background:linear-gradient(var(--c),var(--c)) 6px 6px/40% 6px no-repeat,linear-gradient(var(--c),var(--c)) 6px 18px/88% 4px no-repeat,linear-gradient(#e5e7eb,#e5e7eb) 6px 26px/60% 3px no-repeat,#fafafa}
.bs-tpl[data-t=modern] i{background:linear-gradient(var(--c),var(--c)) 0 0/100% 14px no-repeat,linear-gradient(#e5e7eb,#e5e7eb) 6px 24px/70% 3px no-repeat,linear-gradient(#e5e7eb,#e5e7eb) 6px 32px/80% 3px no-repeat,#fafafa}
.bs-tpl[data-t=minimal] i{background:linear-gradient(#9ca3af,#9ca3af) 6px 8px/30% 2px no-repeat,linear-gradient(#1f2937,#1f2937) 6px 18px/88% 1px no-repeat,linear-gradient(#e5e7eb,#e5e7eb) 6px 26px/60% 2px no-repeat,#fff}
.bs-tpl[data-t=bold] i{background:linear-gradient(#1f2937,#1f2937) 6px 5px/50% 8px no-repeat,linear-gradient(#1f2937,#1f2937) 6px 18px/88% 4px no-repeat,linear-gradient(var(--c),var(--c)) right 6px bottom 5px/40% 9px no-repeat,#fafafa}
.bs-tpl[data-t=compact] i{background:repeating-linear-gradient(#fafafa 0 4px,#e5e7eb 4px 5px) 6px 8px/88% 32px no-repeat,#fafafa}
.bs-sw{display:flex;gap:6px;flex-wrap:wrap}
.bs-sw button{width:26px;height:26px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px var(--border-2,#dfe4ee);cursor:pointer;padding:0;min-width:0}
.bs-sw button.on{box-shadow:0 0 0 2px var(--accent,#4f6ef7)}
/* preview */
.bs-pv{position:sticky;top:calc(var(--ps-top,0px) + 74px);min-width:0}
.bs-pvbar{display:flex;align-items:center;gap:8px;margin-bottom:8px;font-size:12.5px;color:var(--muted,#5a6377)}
.bs-pvbox{background:#e9edf4;border-radius:14px;padding:14px;overflow:auto;max-height:calc(100vh - 150px)}
.bs-scale{transform-origin:top left;box-shadow:0 8px 28px rgba(15,23,42,.18)}
.bs-total{display:flex;justify-content:space-between;align-items:center;background:var(--panel,#fff);border:1px solid var(--border,#e4e9f2);border-radius:14px;padding:12px 16px}
.bs-total b{font-size:20px}
.bs-sigpad{border:1px dashed var(--border-2,#cfd6e4);border-radius:10px;background:#fff;touch-action:none;width:100%;height:120px;display:block}
/* documents list */
.bs-docs{position:fixed;inset:0;background:rgba(15,23,42,.5);z-index:9990;display:flex;align-items:flex-start;justify-content:center;padding:6vh 16px}
.bs-docs>div{background:var(--panel,#fff);color:var(--text,#1e2635);border-radius:16px;width:min(920px,100%);max-height:84vh;overflow:auto;padding:18px}
.bs-docs table{width:100%;border-collapse:collapse;font-size:13.5px}
.bs-docs th,.bs-docs td{padding:8px;border-bottom:1px solid var(--border,#eef1f6);text-align:left;white-space:nowrap}
.bs-docs td.r,.bs-docs th.r{text-align:right}
.bs-docs .tag{display:inline-block;padding:2px 8px;border-radius:999px;font-size:11.5px;font-weight:700;background:var(--field,#f1f5f9)}
.bs-docs .tag.paid{background:#dcfce7;color:#166534}.bs-docs .tag.overdue{background:#fee2e2;color:#991b1b}.bs-docs .tag.sent{background:#dbeafe;color:#1e40af}
.bs-tabs{display:none}
@media (max-width:900px){.bs-body{grid-template-columns:minmax(0,1fr)!important}.bs-tabs{display:inline-flex}.bs .bs-pv{position:static}.bs:not(.m-pv) .bs-pv{display:none}.bs.m-pv .bs-ed{display:none}.bs .bs-lay{display:none}.bs-pvbox{max-height:none}}
@media (max-width:600px){.bs-g2,.bs-g3{grid-template-columns:minmax(0,1fr)}.bs-tpls{grid-template-columns:repeat(3,minmax(0,1fr))}.bs-bar .lbl{display:none}.bs-in{padding:0 12px 12px}}
@media print{body *{visibility:hidden!important}.bs-print,.bs-print *{visibility:visible!important}.bs-print{position:absolute;left:0;top:0}.bs-print .bd-p{box-shadow:none}@page{margin:0}}
.bs-f .bs-row select{width:76px!important;flex:none}
/* payslip (biz-pay.js) */
.bp-top{display:flex;gap:6mm;margin-bottom:6mm;align-items:stretch}
.bp-info{flex:1;display:grid;grid-template-columns:1fr 1fr;gap:1.6mm 6mm;border:.3mm solid var(--bd-line);border-radius:2mm;padding:3.5mm 4mm}
.bp-info div{display:flex;justify-content:space-between;gap:3mm;font-size:8.8pt}
.bp-info span{color:var(--bd-mute)}
.bp-net{width:52mm;background:var(--bd-soft);border-radius:2mm;padding:4mm;display:flex;flex-direction:column;justify-content:center;text-align:center}
.bp-net span{font-size:8pt;text-transform:uppercase;letter-spacing:.08em;color:var(--bd-mute);font-weight:700}
.bp-net b{font-size:17pt;color:var(--bd-ac);margin:1mm 0}
.bp-net small{font-size:7.5pt;color:var(--bd-mute)}
.bp-tab .bp-dn{border-left:.4mm solid var(--bd-line)}
.bp-tab .bp-sum td{font-weight:700;background:#f8fafc}
.bs-it.bp-line{grid-template-columns:18px minmax(0,1fr) 26px}
/* timesheet (biz-time.js) */
.bs-it.bt-row{grid-template-columns:34px minmax(0,1fr) 26px}
.bt-row .h{cursor:default;font-weight:700;font-size:12px;color:var(--muted,#5a6377)}
.bt-l1{display:grid;grid-template-columns:140px minmax(0,1fr) minmax(0,1fr);gap:6px}
.bt-tab td small{display:block;color:var(--bd-mute);font-size:8pt}
@media (max-width:600px){.bt-l1{grid-template-columns:minmax(0,1fr)}}
.bs-chk{display:flex!important;align-items:flex-start;gap:8px}
.bs-chk input{flex:none;width:17px!important;height:17px!important;margin:2px 0 0!important}
.bs-f input[type=color]{height:36px;padding:2px 4px;cursor:pointer}

/* ---------- 12 invoice / receipt designs (biz-doc-view.js TPLS). PDF-safe: solid colours, shapes as inline SVG ---------- */
.bd-deco{position:absolute;left:0;top:0;right:0;height:0;z-index:0;pointer-events:none}
.bd-deco svg{position:absolute;display:block}
.bd-p>*:not(.bd-deco){position:relative;z-index:1}
.bd-p .bd-gen{position:absolute}
/* refined classic: accent rule + tinted meta box */
.t-classic .bd-head{padding-bottom:5mm;border-bottom:.8mm solid var(--bd-ac)}
.t-classic .bd-meta{background:var(--bd-soft);padding:3mm 4mm;border-radius:1.5mm}
.t-classic .bd-grand{border-top-color:var(--bd-ac)}
/* corporate: dark band, accent stripe, white meta card */
.t-corporate .bd-head{margin:-15mm -15mm 10mm;padding:11mm 15mm 9mm;background:var(--bd-ink);color:#fff;border-bottom:2mm solid var(--bd-ac);align-items:center}
.t-corporate .bd-ttl h1{color:#fff;letter-spacing:.14em;text-transform:uppercase;font-size:20pt}
.t-corporate .bd-status{color:#fff}
.t-corporate .bd-logo{background:#fff;border-radius:2mm;padding:1.5mm}
.t-corporate .bd-meta{background:#fff;color:var(--bd-ink);padding:3mm 4mm;border-radius:1.5mm}
.t-corporate .bd-items th{background:var(--bd-ink)}
.t-corporate .bd-items tbody tr:nth-child(even) td{background:#f8fafc}
.t-corporate .bd-grand{background:var(--bd-ac);border:0;padding:2.6mm 3mm;border-radius:1.5mm}.t-corporate .bd-grand span,.t-corporate .bd-grand b{color:#fff!important}
/* elegant: serif, centred title, hairline rules */
.t-elegant{font-family:'BDSerif',Georgia,serif}
.t-elegant .bd-head{flex-direction:column;align-items:center;text-align:center;gap:4mm;padding-bottom:6mm;border-bottom:.3mm solid var(--bd-ac)}
.t-elegant .bd-ttl h1{font-weight:400;letter-spacing:.3em;text-transform:uppercase;color:var(--bd-ink);font-size:20pt}
.t-elegant .bd-meta{display:flex;flex-wrap:wrap;justify-content:center;gap:2mm 8mm;text-align:center;min-width:0}
.t-elegant .bd-meta div{flex-direction:column;gap:0}
.t-elegant .bd-items th{background:none;color:var(--bd-ac);border-top:.3mm solid var(--bd-ac);border-bottom:.3mm solid var(--bd-ac);font-weight:400;letter-spacing:.14em}
.t-elegant .bd-grand{border-top:.3mm solid var(--bd-ac);border-bottom:.3mm solid var(--bd-ac);padding-bottom:2mm}
/* geometric: angled shapes top-right */
.t-geometric .bd-deco svg{right:0;top:0;width:92mm;height:46mm}
.t-geometric .bd-head{flex-direction:column;align-items:flex-start;gap:5mm;padding-right:80mm;min-height:30mm}
.t-geometric .bd-meta{min-width:58mm}
.t-geometric .bd-items th{background:var(--bd-ac)}
/* stripe: accent band down the left of every page */
.t-stripe{border-left:7mm solid var(--bd-ac);padding-left:13mm}
.t-stripe .bd-ttl h1{color:var(--bd-ink);font-size:26pt}
.t-stripe .bd-ttl h1::after{content:"";display:block;width:14mm;height:1.2mm;background:var(--bd-ac);margin-top:2.5mm}
.t-stripe .bd-items th{background:none;color:var(--bd-ac);border-bottom:.6mm solid var(--bd-ac)}
.t-stripe .bd-bal{background:var(--bd-ac);color:#fff}
/* wave header */
.t-wave .bd-deco svg{left:0;top:0;width:100%;height:54mm}
.t-wave .bd-head{min-height:30mm;margin-bottom:16mm;color:#fff}
.t-wave .bd-ttl h1,.t-wave .bd-meta span,.t-wave .bd-meta b,.t-wave .bd-status{color:#fff}
.t-wave .bd-logo{background:#fff;border-radius:2mm;padding:1.5mm}
.t-wave .bd-items th{background:var(--bd-soft);color:var(--bd-ac)}
/* cards: tinted cards for parties and totals, rounded rows */
.t-cards{background:#fff}
.t-cards .bd-head{align-items:center}
.t-cards .bd-ttl h1{font-size:24pt;color:var(--bd-ink)}
.t-cards .bd-meta{background:var(--bd-soft);padding:3mm 4mm;border-radius:2mm}
.t-cards .bd-party{background:#f8fafc;border:.3mm solid var(--bd-line);border-radius:2mm;padding:3.5mm 4mm}
.t-cards .bd-party .bd-lbl{color:var(--bd-ac)}
.t-cards .bd-items th{background:var(--bd-ink)}
.t-cards .bd-totals{background:#f8fafc;border:.3mm solid var(--bd-line);border-radius:2mm;padding:3mm 4mm}
/* split header: accent block holds the title */
.t-split .bd-head{margin:-15mm -15mm 10mm;padding:0;gap:0;align-items:stretch;min-height:40mm}
.t-split .bd-ttl{flex:0 0 58%;background:var(--bd-ac);color:#fff;padding:12mm 8mm 8mm 15mm;display:flex;flex-direction:column;justify-content:flex-end;order:0}
.t-split .bd-ttl h1{color:#fff;font-size:26pt}
.t-split .bd-status{color:#fff}
.t-split .bd-logo{position:absolute;left:15mm;top:9mm;background:#fff;border-radius:2mm;padding:1.5mm;max-height:14mm}
.t-split .bd-meta{flex:1;background:var(--bd-soft);padding:10mm 15mm 8mm 8mm;align-content:end}
.t-split .bd-items th{background:var(--bd-ink)}
/* print-out: the first page header keeps its bleed */
.bd-out .t-corporate .bd-head,.bd-out .t-split .bd-head{margin-top:-8mm}
/* design picker: live thumbnails */
.bs-tpls.th{grid-template-columns:repeat(auto-fill,minmax(86px,1fr))}
.bs-tpls.th{width:100%;min-width:0}.bs-tpls.th .bs-tpl{min-width:0}
/* the scaled page inside must not size the grid: contain it */
.bs-tpl .bs-thb{position:relative;width:100%;overflow:hidden;contain:size layout paint;border-radius:3px;box-shadow:0 1px 4px rgba(15,23,42,.2);background:#fff;height:auto}
.bs-tpl .bs-thb>*{position:absolute;left:0;top:0;transform-origin:top left}
.bs-undo{display:inline-flex;align-items:center;gap:10px;padding:8px 12px;border-radius:10px;background:#0f172a;color:#fff;font-size:13px}.bs-undo button{border:0;background:none;color:#93c5fd;font:700 13px inherit;font-family:inherit;cursor:pointer;padding:0}
/* editor buttons never overflow their card: long labels wrap */
.bs-in .bs-b{max-width:100%;white-space:normal;text-align:left;line-height:1.35}
