.template-editor-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:end;position:sticky;top:0;z-index:2;background:#f7fafb;padding:10px;border-bottom:1px solid #dde6e9}.template-editor-toolbar label{display:flex;gap:6px;align-items:center}.template-editor-toolbar label:first-child{display:grid;flex:1;min-width:200px}.template-editor-toolbar input:not([type=checkbox]){padding:8px;width:100%;border:1px solid #cbd8dc}.template-editor-toolbar button,.template-variable-toolbar button{padding:8px 12px;cursor:pointer}.template-editor-hint{font-size:13px;color:#64767c}.template-variable-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:15px}.template-variable-toolbar select{max-width:100%;padding:8px;border:1px solid #cbd8dc}.template-variable-toolbar [role=status]{font-size:13px;color:#287a87}.template-editor-paper,.template-document-preview{max-width:800px;margin:0 auto 24px;background:white;border:1px solid #d4dfe2;padding:35px 45px;font:14px/1.45 'Times New Roman',serif;color:#222}.template-editor-paper p,.template-document-preview p{min-height:1em;white-space:pre-wrap;margin:8px 0}.template-editor-paper p:focus{outline:2px solid #3cb9c4;background:#f0fbfc}.template-editor-paper table,.template-document-preview table{width:100%;border-collapse:collapse;table-layout:fixed;margin:12px 0}.template-editor-paper td,.template-document-preview td{padding:5px 10px;vertical-align:top;border:1px solid #e5e9eb;overflow-wrap:anywhere}.template-used-variables{display:flex;gap:6px;flex-wrap:wrap;margin:12px}.template-used-variables code{background:#eef4f6;padding:4px}.template-missing-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.template-missing-fields label{display:grid;font-size:13px;gap:5px}.template-missing-fields input{padding:8px;border:1px solid #ccd8dc;min-width:0;width:100%}.template-preview-actions{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}.service-template-overlay .modal{max-width:1100px;width:min(1100px,100%)}.service-template-list td:last-child{white-space:nowrap}.service-template-list button{margin:3px}.template-catalog-summary{font-size:13px;color:#64767c}.template-file-input{max-width:350px}@media(max-width:600px){.template-editor-paper,.template-document-preview{padding:16px}.template-missing-fields{grid-template-columns:1fr}.service-template-list td:last-child{white-space:normal}}
.service-template-list td small{display:block;margin-top:5px}.template-catalog-summary{padding:0 12px}
.template-variable-help{padding:10px 0;margin-bottom:16px;border-top:1px solid #dde6e9;border-bottom:1px solid #dde6e9;color:#40565e;font:13px/1.5 Arial,sans-serif}.template-variable-help p{margin:5px 0}.template-variable-toolbar input[type=search]{padding:9px;border:1px solid #cbd8dc}.template-used-variables{display:block;overflow:auto}.template-variable-table{width:100%;border-collapse:collapse;font:13px/1.4 Arial,sans-serif}.template-variable-table th,.template-variable-table td{text-align:left;padding:9px;border-bottom:1px solid #dde6e9;vertical-align:top}.template-variable-table code{white-space:nowrap}
.template-create-form{display:grid;gap:15px;padding:15px}.template-create-form label{display:grid;gap:7px}.template-create-form input{padding:10px;border:1px solid #cbd8dc}.template-create-form button{justify-self:start}
.template-variable-table td{white-space:normal;overflow-wrap:anywhere}.template-editor-toolbar label{margin:0}.template-editor-toolbar input[type=checkbox]{width:auto;display:inline-block;margin:0}
.service-template-list{table-layout:fixed;min-width:0;width:100%;white-space:normal}.service-template-list th:first-child{width:40%}.service-template-list th:nth-child(2){width:18%}.service-template-list th:last-child{width:42%}.service-template-list td,.service-template-list td:last-child{white-space:normal;overflow-wrap:anywhere}.service-template-list td:last-child a{display:inline-block;margin:3px}.service-template-list td strong{line-height:1.5}
.document-viewer-overlay .modal{width:calc(100vw - 32px);max-width:1700px;height:calc(100dvh - 32px);max-height:none;border-top:5px solid #32b8c3;display:flex;flex-direction:column;padding:0;overflow:hidden}
.document-viewer-overlay .modal__head{padding:12px 20px}
.document-viewer-overlay #modalBody{padding:0;flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column;position:relative}
.document-viewer-overlay .modal__foot{display:none}
.document-viewer-toolbar{display:flex;align-items:center;gap:12px;padding:9px 16px;background:#f7f8f9;border-block:1px solid #d8dce0;flex-shrink:0;font:14px Arial,sans-serif}
.document-viewer-zoom{display:flex;align-items:center;gap:10px}.document-viewer-spacer{flex:1}.document-viewer-workspace{display:flex;min-height:0;flex:1;background:#e8eaed}
.document-viewer-pages{width:200px;flex-shrink:0;overflow:auto;background:#f5f6f7;border-right:1px solid #d8dce0;padding:20px}.document-viewer-pages[hidden]{display:none}
.document-viewer-scroll{overflow:auto;flex:1;min-width:0;padding:20px 30px;position:relative}.document-viewer-paper{width:max-content;min-width:100%;display:flex;align-items:center;flex-direction:column;gap:20px}
.document-viewer-paper .doc-page{box-shadow:0 2px 6px #0004;flex-shrink:0}.doc-page p{min-height:1em}.doc-page td p{margin:0}
.document-page-thumbnail{display:grid;justify-items:center;gap:10px;width:100%;border:0;background:none;padding:8px;cursor:pointer;margin-bottom:12px;color:#30383b}
.document-page-miniature{pointer-events:none;width:max-content;box-shadow:0 1px 3px #0003;border:4px solid transparent;background:white}.document-page-thumbnail.is-current .document-page-miniature{border-color:#34b9c4}.document-page-miniature .doc-page{margin:0}
.document-viewer-details{position:absolute;z-index:5;right:0;top:54px;bottom:0;width:min(520px,100%);background:#fff;box-shadow:-4px 0 16px #0002;overflow:auto;padding:20px}.document-viewer-details[hidden]{display:none}.document-viewer-details summary{cursor:pointer;font-weight:600;margin:16px 0}.document-viewer-details .template-missing-fields{grid-template-columns:1fr}.document-viewer-details p{font-size:13px;color:#64767c}.document-viewer-details #servicePreviewUpdate{margin-top:16px}.document-viewer-loading{padding:35px;font:16px Arial,sans-serif}
@media(max-width:700px){.document-viewer-overlay .modal{width:100vw;height:100dvh}.document-viewer-pages{display:none}.document-viewer-scroll{padding:12px}.document-viewer-toolbar{gap:5px;flex-wrap:wrap}.document-viewer-toolbar .btn{padding:6px}.document-viewer-zoom{gap:4px}}
