.document-template-dialog{width:min(96vw,1180px);height:min(94vh,940px);padding:0;border:0;border-radius:18px;background:#e7eaee;box-shadow:0 30px 100px rgba(15,23,42,.42)}
.document-template-dialog::backdrop{background:rgba(15,23,42,.62);backdrop-filter:blur(4px)}
.document-template-toolbar{height:60px;padding:0 16px;display:flex;align-items:center;justify-content:space-between;background:#fff;border-bottom:1px solid #dbe1e8}
.document-template-toolbar strong{font-size:14px;letter-spacing:.08em;text-transform:uppercase}.document-template-actions{display:flex;gap:8px}.document-template-actions button{min-height:36px;padding:0 13px;border:1px solid #d7dde5;border-radius:8px;background:#fff;color:#172033;font-weight:700;cursor:pointer}.document-template-actions button[data-document-download]{background:#c43a32;border-color:#c43a32;color:#fff}
.document-template-stage{height:calc(100% - 61px);overflow:auto;padding:28px;display:grid;place-items:start center}.document-template-paper{width:210mm;min-height:297mm;box-sizing:border-box;background:#fff;color:var(--doc-ink,#111827);padding:17mm 16mm 15mm;box-shadow:0 18px 56px rgba(15,23,42,.20);font-family:Georgia,'Times New Roman',serif;position:relative}
.document-template-paper *{box-sizing:border-box}.document-template-top{display:grid;grid-template-columns:1fr auto;gap:20px;align-items:start;border-top:6px solid var(--doc-accent,#c43a32);padding-top:12px}.document-template-brand{display:flex;align-items:center;gap:12px;min-width:0}.document-template-brand img{max-width:42mm;max-height:18mm;width:auto;height:auto;object-fit:contain;object-position:left center}.document-template-mark{width:48px;height:48px;display:grid;place-items:center;border:2px solid var(--doc-accent,#c43a32);border-radius:50%;font-family:system-ui,sans-serif;font-weight:800;color:var(--doc-accent,#c43a32)}.document-template-contact{font:10px/1.55 system-ui,sans-serif;color:var(--doc-muted,#64748b);white-space:pre-line}.document-template-meta{text-align:right;font-family:system-ui,sans-serif}.document-template-date{font-size:25px;font-weight:800;color:var(--doc-accent,#c43a32)}.document-template-type{margin-top:5px;font-size:11px;font-weight:800;letter-spacing:.13em;text-transform:uppercase}.document-template-parties{display:grid;grid-template-columns:1fr 1fr;gap:36px;margin:16mm 0 11mm}.document-template-eyebrow{font:700 9px/1.2 system-ui,sans-serif;color:var(--doc-muted,#64748b);letter-spacing:.13em;text-transform:uppercase}.document-template-name{margin:5px 0;font-size:19px;font-weight:700}.document-template-details{font:11px/1.55 system-ui,sans-serif;color:var(--doc-muted,#64748b);white-space:pre-line}.document-template-table{width:100%;border-collapse:collapse;font-family:system-ui,sans-serif;font-size:10px}.document-template-table th{padding:8px 6px;border-bottom:1.5px solid var(--doc-ink,#111827);font-size:8px;letter-spacing:.11em;color:var(--doc-muted,#64748b);text-align:left}.document-template-table th:not(:first-child),.document-template-table td:not(:first-child){text-align:right}.document-template-table td{padding:9px 6px;border-bottom:1px solid var(--doc-line,#dbe1e8);vertical-align:top}.document-template-total{width:76mm;margin:12mm 0 0 auto;border-collapse:collapse;font:11px/1.5 system-ui,sans-serif}.document-template-total td{padding:5px 0;border-bottom:1px solid var(--doc-line,#dbe1e8)}.document-template-total td:last-child{text-align:right;font-weight:700}.document-template-total .is-final td{border:0;padding-top:9px;font-size:15px;font-weight:800}.document-template-footer{position:absolute;right:16mm;bottom:12mm;left:16mm;border-top:1px solid var(--doc-line,#dbe1e8);padding-top:6px;font:8px/1.5 system-ui,sans-serif;color:var(--doc-muted,#64748b);white-space:pre-line}.document-template-watermark{position:absolute;right:18mm;bottom:34mm;transform:rotate(-25deg);font:800 36px/1 system-ui,sans-serif;letter-spacing:.12em;color:var(--doc-accent,#c43a32);opacity:.18}.document-template-paper.document-template-paper--export{width:210mm;height:297mm;min-height:0;overflow:hidden}
.document-template--forge_physical_v1{font-family:ui-serif,Georgia,serif;padding:13mm 14mm}.document-template--forge_physical_v1 .document-template-top{border:1.5px solid var(--doc-ink);border-top:7px solid var(--doc-accent);padding:8mm;grid-template-columns:1fr 44mm}.document-template--forge_physical_v1 .document-template-brand img{width:30mm;height:14mm}.document-template--forge_physical_v1 .document-template-mark{border-radius:2px;width:38px;height:38px}.document-template--forge_physical_v1 .document-template-date{font-size:19px}.document-template--forge_physical_v1 .document-template-parties{margin:10mm 0 8mm;padding:5mm 0;border-bottom:1px solid var(--doc-line)}.document-template--forge_physical_v1 .document-template-name{font-size:16px}.document-template--forge_physical_v1 .document-template-table th{background:var(--doc-ink);color:#fff;border:0;padding:8px}.document-template--forge_physical_v1 .document-template-table td{padding:8px 6px}.document-template--forge_physical_v1 .document-template-total{margin-top:8mm}.document-template--forge_physical_v1 .document-template-footer{left:14mm;right:14mm;bottom:10mm}.document-template--forge_physical_v1 .document-template-watermark{bottom:30mm}
@media(max-width:760px){.document-template-dialog{width:100vw;height:100vh;max-height:none;border-radius:0}.document-template-stage{padding:12px;place-items:start}.document-template-paper{transform-origin:top left;transform:scale(.42);margin-bottom:calc(-297mm * .58)}.document-template-actions button{font-size:0;width:38px;padding:0}.document-template-actions button::first-letter{font-size:14px}}
.document-template-fiscal{position:absolute;left:16mm;bottom:26mm;display:flex;align-items:center;gap:7px;font:8px/1.35 system-ui,sans-serif;color:var(--doc-muted,#64748b)}.document-template-fiscal-qr{width:78px;height:78px;background:#fff}.document-template-fiscal-qr img,.document-template-fiscal-qr canvas{display:block;width:78px!important;height:78px!important}.document-template-fiscal strong,.document-template-fiscal span,.document-template-fiscal small{display:block}.document-template-fiscal strong{font-size:10px;letter-spacing:.08em;color:var(--doc-ink,#111827)}.document-template-fiscal small{max-width:42mm;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
