.document-window{width:min(1120px,96vw);max-height:92vh;padding:0;border:1px solid #dfe6eb;border-radius:14px;background:#fff;color:#203746}.document-window::backdrop{background:#102b3b88}.document-window>header{display:flex;align-items:center;justify-content:space-between;padding:18px 24px;border-bottom:1px solid #dfe6eb}.document-window h2{margin:0;font-size:22px}.document-body{padding:20px 24px;overflow:auto;max-height:calc(92vh - 90px)}.document-window form>label{display:block;margin-bottom:14px}.document-window input:not([type=checkbox]),.document-window select{max-width:100%;padding:9px;border:1px solid #ccd8e0;border-radius:6px;font:inherit}.document-window form>label>input:not([type=checkbox]){display:block;width:100%;box-sizing:border-box;margin-top:6px}.document-window .document-publish{display:flex;align-items:center;gap:8px}.document-publish input{width:18px;height:18px;margin:0}.document-editor-toolbar{display:flex;flex-wrap:wrap;gap:6px;padding:10px;background:#f3f6f8;border-radius:8px}.document-editor-toolbar button{padding:7px 9px;margin:0}.document-paper{margin:18px auto;padding:40px;max-width:794px;min-height:280px;background:#fff;color:#111;border:1px solid #dfe6eb;font:10pt/1 Arial,sans-serif;overflow-wrap:anywhere;box-sizing:border-box}.document-paper p{margin:0}.document-paper img{max-width:100%;height:auto}.document-editor:focus{outline:2px solid #9cafbc}.document-window footer{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.document-window .settings-help{font-size:12px}.document-window [hidden]{display:none!important}@media(max-width:650px){.document-body{padding:14px}.document-paper{padding:18px}.document-editor-toolbar button{font-size:12px}}
.document-window .client-primary{background:#214e64;border-color:#214e64;color:#fff;font-weight:600}.document-window .document-body>label{display:grid;gap:8px}.document-window .document-body>label>select{width:100%}
/* Compact controls keep the document selection and expose their active state. */
.document-editor-toolbar{align-items:center;gap:8px;position:sticky;top:-20px;z-index:2;border:1px solid #dfe6eb;box-shadow:0 2px 5px #20374608}
.document-tool-group{display:flex;gap:3px;align-items:center;padding-right:8px;border-right:1px solid #d5dfe6}
.document-editor-toolbar .document-tool{display:inline-flex;align-items:center;justify-content:center;width:34px;min-width:34px;height:34px;padding:0;border:1px solid transparent;border-radius:5px;background:transparent;color:#214e64;font:600 16px Arial;cursor:pointer}
.document-tool svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
.document-editor-toolbar .document-tool:hover{background:#e3edf3}
.document-editor-toolbar .document-tool[aria-pressed=true]{background:#dcebf3;border-color:#96b5c5;color:#173e53}
.document-tool-italic{font-style:italic!important}.document-tool-underline{text-decoration:underline}
.document-editor-toolbar select,.document-editor-toolbar>button{height:36px;padding:6px 9px;font-size:12px;margin:0}
.document-editor-toolbar select[aria-label="Campo automático"]{max-width:230px}
.document-editor font[size="1"]{font-size:10pt}.document-editor font[size="2"]{font-size:12pt}.document-editor font[size="3"]{font-size:14pt}.document-editor font[size="4"]{font-size:16pt}.document-editor font[size="5"]{font-size:18pt}.document-editor font[size="6"]{font-size:24pt}.document-editor font[size="7"]{font-size:32pt}
.document-editor h1{font-size:24pt}.document-editor h2{font-size:18pt}.document-editor h3{font-size:14pt}
.document-editor-toolbar :focus-visible{outline:2px solid #214e64;outline-offset:2px}
.document-templates-table{width:100%;table-layout:fixed}
.document-templates-table th,.document-templates-table td{vertical-align:middle;padding:14px 12px}
.document-templates-table th:first-child{width:40%;text-align:left}
.document-templates-table th:nth-child(2){width:20%}
.document-templates-table th:nth-child(3){width:25%}
.document-templates-table th:last-child{width:15%}
.document-templates-table th:not(:first-child),.document-templates-table td:not(:first-child){text-align:center}
.document-templates-table td:first-child{overflow-wrap:anywhere}
.document-templates-table .client-row-actions{justify-content:center}

.document-templates-table .document-availability{white-space:nowrap;height:34px;margin:0;padding:6px 10px;font-size:12px}
.document-templates-table .document-availability[aria-pressed=true]{background:#edf3e8;border-color:#d5e2cb;color:#36583b}
/* A4 at CSS print scale: 210 mm wide, with the same 20 mm PDF margins. */
.document-paper{width:210mm;max-width:none;min-height:297mm;padding:20mm;border:0;outline:1px solid #dfe6eb;font:10pt/1 Arial,sans-serif;letter-spacing:normal}
.document-paper p,.document-paper div,.document-paper li{font-family:inherit;font-size:inherit;line-height:inherit;color:inherit;letter-spacing:normal}
.document-paper p{margin:0}.document-paper li{margin-bottom:0}
.document-window .document-paper h1{font-size:24pt;margin:0}
.document-window .document-paper h2{font-size:18pt;margin:0}
.document-window .document-paper h3{font-size:14pt;margin:0}
.document-paper h1,.document-paper h2,.document-paper h3{font-family:Arial,sans-serif;line-height:1;letter-spacing:normal}
.document-paper img{max-height:245mm;object-fit:contain}
.document-font-size{display:flex;align-items:center;gap:5px;font-size:12px}
.document-editor-toolbar .document-font-size input{width:70px;height:36px;padding:6px;box-sizing:border-box}

.document-paper div,.document-paper ul,.document-paper ol,.document-paper li{margin-top:0;margin-bottom:0}
.document-templates-table .client-row-actions{display:flex;justify-content:center;align-items:center;gap:6px}
.document-templates-table .document-availability{width:140px;display:inline-flex;align-items:center;justify-content:center}


.document-paper{text-align:center}
.document-image-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:6px 10px;border:1px solid #ccd8e0;border-radius:6px;background:#fff}
.document-image-tools label{display:flex;align-items:center;gap:8px;font-size:12px;margin:0}
.document-image-tools input{width:84px;height:36px}
.document-editor img{cursor:pointer}
.document-editor .document-image-selected{outline:2px solid #214e64;outline-offset:3px}
.document-body{position:relative}
.document-image-frame{position:absolute;pointer-events:none;border:1px solid #214e64;box-sizing:border-box;z-index:2}
.document-image-handle,.document-image-move{position:absolute;pointer-events:auto;touch-action:none;margin:0!important;padding:0!important;background:#fff;border:2px solid #214e64;border-radius:3px;color:#214e64}
.document-image-handle{width:12px;height:12px}
.document-image-nw{left:-6px;top:-6px;cursor:nwse-resize}
.document-image-ne{right:-6px;top:-6px;cursor:nesw-resize}
.document-image-sw{left:-6px;bottom:-6px;cursor:nesw-resize}
.document-image-se{right:-6px;bottom:-6px;cursor:nwse-resize}
.document-image-move{left:calc(50% - 14px);top:-32px;width:28px;height:26px;cursor:move}
.document-editor img{touch-action:none;cursor:move}
.document-paper{position:relative;isolation:isolate}
.document-editor-toolbar{flex-direction:column;align-items:stretch;gap:10px;z-index:3}
.document-toolbar-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0}
.document-editor-toolbar .document-toolbar-row button,.document-editor-toolbar .document-toolbar-row select,.document-editor-toolbar .document-toolbar-row input{box-sizing:border-box;height:36px;margin:0;vertical-align:middle}
.document-toolbar-row>button,.document-toolbar-row>select{padding:6px 9px;font-size:12px}
.document-editor-toolbar .document-font-size{margin:0;align-self:center;line-height:1;white-space:nowrap}
.document-editor-toolbar .document-tool-group{height:36px;flex:none}
.document-editor-toolbar .document-image-tools{align-self:stretch;margin:0}
.document-window .document-generation-footer{position:sticky;bottom:-20px;background:#fff;border-top:1px solid #dfe6eb;padding:12px 0;align-items:center;z-index:3}
.document-generation-footer .feedback{flex:1;margin:0;font-size:13px;padding:10px;white-space:normal}
