.document-branding-settings{grid-column:1/-1;border:1px solid var(--factly-border,#D9E7EB);border-radius:12px;padding:16px;margin-top:18px;background:var(--factly-surface,#F7FBFC)}
.document-branding-settings h4{margin:0 0 8px;color:var(--factly-ink,#13293D)}
.document-branding-assets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:16px 0}
.document-branding-asset{min-width:0;padding:12px;background:white;border:1px solid var(--factly-border,#D9E7EB);border-radius:8px}
.document-branding-asset label{display:block;font-weight:600;margin-bottom:8px}.document-branding-asset input{max-width:100%;font-size:12px}
.document-branding-asset img{display:block;width:150px;height:85px;object-fit:contain;margin:10px auto}.document-branding-asset img[hidden]{display:none}
.document-branding-asset .inline-actions{margin-top:10px;gap:6px;flex-wrap:wrap}
.document-branding-size{margin-top:14px}
.document-branding-defaults{width:100%;border-collapse:collapse}.document-branding-defaults th,.document-branding-defaults td{text-align:left;padding:8px;border-bottom:1px solid var(--factly-border,#D9E7EB)}
.document-branding-defaults input,.document-branding-options input{accent-color:var(--factly-primary,#0C7A8F)}
.document-branding-options{grid-column:1/-1;min-width:0;border:1px solid var(--factly-border,#D9E7EB);border-radius:8px;padding:12px;margin:8px 0}
.document-branding-options legend{font-weight:600;padding:0 6px}.document-branding-option-row{display:flex;gap:22px;flex-wrap:wrap;margin-bottom:8px}.document-branding-option-row label{display:flex;gap:7px;align-items:center}
.factly-invoice-preview-totals,.factly-invoice-preview-qr{position:relative}
.is-full-page .factly-invoice-preview-qr{display:block}
.is-full-page .factly-invoice-preview-qr > div:last-child{max-width:calc(95% - 82px);margin-top:5px}
.document-branding-preview{
  --stamp-width:65px;
  --stamp-height:48px;
  --stamp-scale:1;
  position:absolute;
  right:5%;
  bottom:6px;
  width:calc(var(--stamp-width) * var(--stamp-scale));
  height:calc(var(--stamp-height) * var(--stamp-scale));
  line-height:0;
  margin:0;
  padding:0;
  pointer-events:none;
}
.document-branding-preview.stamp-size-small{--stamp-scale:0.75}
.document-branding-preview.stamp-size-large{--stamp-scale:1.25}
.document-branding-preview .document-branding-preview-stamp{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:right bottom;z-index:2}
.is-full-page .factly-invoice-preview-totals .document-branding-preview{right:calc(100% + 8px);bottom:4px}
.document-branding-preview.has-signature{position:relative;right:auto;bottom:auto;width:auto;height:auto;padding:12px 0;text-align:right;break-inside:avoid}
.document-branding-preview .document-branding-preview-signature{display:inline-block;max-width:30%;width:auto;height:55px;object-fit:contain;margin-right:6%}
.is-continuous .factly-invoice-preview-totals .document-branding-preview{
  --stamp-width:41px;
  --stamp-height:35px;
  left:-20%;
  right:auto;
  bottom:4px;
}
.is-continuous .document-branding-preview-stamp{object-position:left bottom}
.is-continuous .document-branding-preview .document-branding-preview-signature{max-width:44%;height:40px}
#documentBrandingStatus{min-height:1.2em;margin-bottom:0}#documentBrandingStatus.is-error{color:#a52b35}
@media(max-width:600px){.document-branding-assets{grid-template-columns:1fr}.document-branding-settings{padding:12px}.document-branding-defaults th,.document-branding-defaults td{padding:6px}}
