/* GAINVO controlled corrections and professional document gallery — v3.1.8 */

.builder-draft-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px}.builder-draft-actions .discard-draft{display:inline-flex;align-items:center;gap:5px;color:#9f2d2d}.builder-draft-actions .discard-draft .icon{width:14px}
.correction-alert{display:flex;align-items:flex-start;gap:10px}.correction-alert>.icon{flex:0 0 22px;margin-top:1px}.correction-alert>span{display:grid;gap:3px}.correction-alert small{line-height:1.45}
.correction-control details>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;list-style:none}.correction-control details>summary::-webkit-details-marker{display:none}.correction-control details>summary:after{content:"+";font-size:18px}.correction-control details[open]>summary:after{content:"−"}.correction-control form{margin-top:14px}

/* Keep the controlled-cancellation acknowledgement readable at every width.
   The explicit dimensions prevent the global text-input rules from enlarging
   the checkbox and squeezing the confirmation sentence out of its panel. */
.controlled-confirm{
  display:grid!important;
  grid-template-columns:18px minmax(0,1fr)!important;
  align-items:start!important;
  gap:10px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  margin:0!important;
  padding:12px!important;
  border:1px solid #f0c7c7!important;
  border-radius:11px!important;
  background:#fff8f8!important;
  color:#7f1d1d!important;
  font-size:10px!important;
  line-height:1.5!important;
  text-align:left!important;
  cursor:pointer
}
.controlled-confirm input[type="checkbox"]{
  appearance:auto;
  flex:none!important;
  width:18px!important;
  min-width:18px!important;
  max-width:18px!important;
  height:18px!important;
  min-height:18px!important;
  max-height:18px!important;
  margin:1px 0 0!important;
  padding:0!important;
  border-radius:4px!important;
  box-shadow:none!important;
  accent-color:#b42318
}
.controlled-confirm input[type="checkbox"]:focus-visible{
  outline:3px solid rgba(180,35,24,.22)!important;
  outline-offset:2px
}
.controlled-confirm>span{
  display:block!important;
  width:auto!important;
  min-width:0!important;
  max-width:100%!important;
  overflow-wrap:break-word!important;
  word-break:normal!important;
  white-space:normal!important
}

.document-style-guidance{display:flex;align-items:flex-start;gap:10px;margin:0 0 18px;padding:13px 14px;border-radius:13px;background:#eff6ff;color:#153e75}.document-style-guidance>.icon{flex:0 0 19px}.document-style-guidance>span{display:grid;gap:3px}.document-style-guidance strong{font-size:11px}.document-style-guidance small{color:#60738b;font-size:9px;line-height:1.5}
.template-picker-v317{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.template-picker-v317 label{display:grid;align-content:start;gap:5px;padding:8px;border:1px solid transparent;border-radius:15px;transition:.18s ease}.template-picker-v317 label:hover,.template-picker-v317 label.selected,.template-picker-v317 label:has(input:checked){border-color:var(--brand);background:var(--brand-soft);transform:translateY(-1px)}.template-picker-v317 label>strong{font-size:11px;text-align:left}.template-picker-v317 label>small{min-height:24px;color:var(--muted);font-size:8px;line-height:1.4}.template-picker-v317 .template-thumb{position:relative;height:124px;padding:12px;border-radius:9px;overflow:hidden;box-shadow:0 6px 18px rgba(18,32,51,.08)}.template-picker-v317 .template-thumb i{display:block;height:5px}.template-picker-v317 .template-thumb i:first-child{height:20px}.template-picker-v317 .template-thumb i:nth-child(2){width:100%;margin-top:5px}.template-picker-v317 .template-thumb i:nth-child(3){width:78%}.template-picker-v317 .template-thumb i:nth-child(4){width:48%;margin-left:auto;margin-top:14px;height:15px}
.template-thumb.executive{padding-top:35px;background:linear-gradient(#153e75 0 27px,#fff 27px)}.template-thumb.executive i:first-child{position:absolute;top:6px;left:11px;width:34%;height:13px;background:#fff}.template-thumb.executive i:nth-child(4){background:#d69e2e}
.template-thumb.classic{border-radius:2px!important;background:#fff;border-color:#8794a5!important}.template-thumb.classic i:first-child{width:100%!important;background:#405a78!important}.template-thumb.classic:after{content:"";position:absolute;inset:7px;border:1px solid #d3d9e0;pointer-events:none}
.template-thumb.minimal{border-color:#e8edf2!important;background:#fff}.template-thumb.minimal i:first-child{width:32%!important;height:8px!important;background:#21364d!important}.template-thumb.minimal i:nth-child(2),.template-thumb.minimal i:nth-child(3){background:#edf0f3}.template-thumb.minimal i:nth-child(4){height:3px;background:#21364d}
.template-thumb.bold{background:linear-gradient(135deg,#153e75 0 38%,#f5f8fc 38%)}.template-thumb.bold i:first-child{width:48%!important;background:#fff!important}.template-thumb.bold i:nth-child(2),.template-thumb.bold i:nth-child(3){margin-left:40%;background:#b8c7d8}.template-thumb.bold i:nth-child(4){background:#d69e2e}
.template-thumb.ledger{border-radius:1px!important;background:repeating-linear-gradient(0deg,#fff 0 16px,#edf0f3 16px 17px)}.template-thumb.ledger i{border-radius:0!important;background:#657382}.template-thumb.ledger i:first-child{width:100%!important;background:#263746!important}.template-thumb.ledger i:nth-child(4){height:2px;background:#263746}
.template-thumb.compact{height:124px!important;padding:9px!important}.template-thumb.compact i{margin-bottom:3px}

/* Executive: high-trust corporate letterhead. */
.receipt-paper.template-executive{padding-top:0}.template-executive .receipt-head{margin:0 -52px;padding:34px 52px 28px;background:var(--receipt-brand);color:#fff}.template-executive .receipt-business h2,.template-executive .receipt-title span{color:#fff}.template-executive .receipt-business p{color:rgba(255,255,255,.75)}.template-executive .receipt-logo-placeholder{background:#fff;color:var(--receipt-brand)}.template-executive .receipt-rule{height:7px;margin:0 -52px 29px;background:var(--receipt-accent)}.template-executive .receipt-items th{background:#eef2f6;color:#26374a;border-top:2px solid var(--receipt-brand);border-bottom:1px solid #ccd5df}.template-executive .receipt-totals .grand{background:var(--receipt-brand);border-left:5px solid var(--receipt-accent)}

/* Classic: formal typography and framed structure. */
.receipt-paper.template-classic{border:7px double var(--receipt-brand);font-family:Georgia,"Times New Roman",serif}.template-classic .receipt-head{align-items:flex-start}.template-classic .receipt-business{align-items:flex-start}.template-classic .receipt-business h2{font-family:Georgia,"Times New Roman",serif;font-size:23px}.template-classic .receipt-title span{font-family:Georgia,"Times New Roman",serif;font-weight:700;letter-spacing:.04em}.template-classic .receipt-rule{height:1px;background:var(--receipt-brand);box-shadow:0 4px 0 var(--receipt-accent)}.template-classic .receipt-items th{background:#fff;color:var(--receipt-brand);border-top:2px solid var(--receipt-brand);border-bottom:2px solid var(--receipt-brand)}.template-classic .receipt-totals .grand{background:#fff;color:var(--receipt-brand);border-top:3px double var(--receipt-brand);border-bottom:3px double var(--receipt-brand)}

/* Minimal: generous white space with restrained colour. */
.receipt-paper.template-minimal{padding:62px 64px}.template-minimal .receipt-logo-placeholder{border-radius:50%;background:#f0f3f6;color:var(--receipt-brand)}.template-minimal .receipt-business h2{color:#1d2d3e}.template-minimal .receipt-title span{font-size:23px;font-weight:700;color:#1d2d3e}.template-minimal .receipt-rule{height:1px;background:#dce2e9}.template-minimal .receipt-items th{padding-inline:5px;background:#fff;color:#66758a;border-bottom:1px solid #9aa6b4}.template-minimal .receipt-items td{padding-inline:5px}.template-minimal .receipt-totals .grand{background:#fff;color:#1d2d3e;border-top:2px solid #1d2d3e;border-bottom:1px solid #1d2d3e}

/* Bold: contemporary diagonal brand statement. */
.receipt-paper.template-bold:before{content:"";position:absolute;right:-155px;top:-190px;width:390px;height:390px;transform:rotate(25deg);background:var(--receipt-brand);z-index:0}.template-bold>*{position:relative;z-index:1}.template-bold .receipt-head{min-height:110px}.template-bold .receipt-title span,.template-bold .receipt-title strong{color:#fff}.template-bold .receipt-rule{height:8px;border-radius:8px;background:linear-gradient(90deg,var(--receipt-brand),var(--receipt-accent))}.template-bold .receipt-items th{background:var(--receipt-brand)}.template-bold .receipt-totals .grand{background:var(--receipt-brand);border-left:6px solid var(--receipt-accent);border-radius:4px}

/* Ledger: neutral, precise and audit-friendly. */
.receipt-paper.template-ledger{font-family:Arial,Helvetica,sans-serif;color:#172433}.template-ledger .receipt-logo-placeholder{border-radius:2px;background:#263746}.template-ledger .receipt-business h2,.template-ledger .receipt-title span{color:#263746}.template-ledger .receipt-title span{font-size:24px;font-weight:800;letter-spacing:.03em}.template-ledger .receipt-rule{height:2px;background:#263746}.template-ledger .receipt-items{border:1px solid #8592a1}.template-ledger .receipt-items th{border-right:1px solid #fff;background:#263746}.template-ledger .receipt-items td{border-right:1px solid #cfd6de;border-bottom:1px solid #cfd6de}.template-ledger .receipt-totals>div:last-child{border:1px solid #9aa5b1}.template-ledger .receipt-totals .grand{background:#263746}.template-ledger .receipt-totals .balance{border-top:1px solid #9aa5b1;background:#eef1f4;color:#263746}

/* Compact: retains every field while using less vertical space. */
.receipt-paper.template-compact{min-height:820px;padding:34px 38px}.template-compact .receipt-business img,.template-compact .receipt-logo-placeholder{width:49px;height:49px}.template-compact .receipt-title span{font-size:22px;font-weight:700}.template-compact .receipt-rule{margin:18px 0;height:3px}.template-compact .receipt-meta{margin-bottom:18px}.template-compact .receipt-items th,.template-compact .receipt-items td{padding:7px}.template-compact .receipt-totals{margin-top:18px}.template-compact .receipt-foot{margin-top:35px}.template-compact .receipt-thanks{margin-top:18px}

@media(max-width:900px){.template-picker-v317{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:680px){.builder-draft-actions{width:100%;justify-content:space-between}.builder-top{flex-wrap:wrap}.template-picker-v317{grid-template-columns:repeat(2,minmax(0,1fr))}.template-picker-v317 label>small{min-height:0}.receipt-paper.template-bold:before{right:-220px}.document-style-guidance{padding:11px}.controlled-confirm{font-size:11px!important;padding:12px!important}}
@media(max-width:360px){.template-picker-v317{grid-template-columns:1fr}.template-picker-v317 .template-thumb{height:145px}}

@media print{
  body[data-print-format^="thermal"] .receipt-paper{font-family:Arial,Helvetica,sans-serif!important;border:0!important}
  body[data-print-format^="thermal"] .receipt-paper:before{display:none!important}
  body[data-print-format^="thermal"] .receipt-paper .receipt-head{min-height:0!important;margin:0!important;padding:0!important;background:#fff!important;color:#000!important}
  body[data-print-format^="thermal"] .receipt-paper .receipt-business h2,body[data-print-format^="thermal"] .receipt-paper .receipt-title span,body[data-print-format^="thermal"] .receipt-paper .receipt-title strong{color:#000!important}
  body[data-print-format^="thermal"] .receipt-paper .receipt-business p{color:#222!important}
  body[data-print-format^="thermal"] .receipt-paper .receipt-rule{height:1px!important;margin:4mm 0!important;background:#000!important;box-shadow:none!important}
  body[data-print-format^="thermal"] .receipt-paper .receipt-items{border:0!important}
}
