.doc-center .doc-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}.doc-center .doc-tabs .active{background:#163b66;color:white}.doc-designer{display:grid;grid-template-columns:minmax(320px,1fr) minmax(400px,1.3fr);gap:18px;align-items:start}.doc-preview{position:sticky;top:12px;min-width:0}.doc-preview iframe{width:100%;height:72vh;border:1px solid #cbd5e1;background:#e5e7eb}.doc-editor label,.doc-controls label,.doc-center form>label{display:flex;flex-direction:column;gap:5px}.doc-columns{display:grid;gap:10px;max-height:65vh;overflow:auto;margin:12px 0}.doc-column{border:1px solid #cbd5e1;border-radius:8px;padding:10px}.doc-center .entry button{margin:6px}.doc-center input,.doc-center select,.doc-center textarea{max-width:100%}.doc-center #docMessage:not(:empty){padding:12px;background:#eef4ff;border-radius:8px}.doc-center button:disabled{opacity:.5;cursor:not-allowed}@media(max-width:1000px){.doc-designer{grid-template-columns:1fr}.doc-preview{position:static}.doc-preview iframe{height:65vh}}

.report-layout-editor{margin:20px 0;border-top:2px solid #cbd5e1;padding-top:12px}.report-layout-rows{display:grid;gap:12px;margin:12px 0}.report-layout-row{border:1px solid #cbd5e1;border-radius:8px;padding:12px;background:#f8fafc}.report-cell-grid{display:grid;gap:10px;margin:10px 0}.report-cell{background:white;border:1px solid #dbe2ea;padding:10px}.report-cell textarea{min-height:70px}.report-layout-editor input[type=checkbox]{width:18px}.doc-editor .toolbar label{flex-direction:row;align-items:center}.doc-editor .toolbar input[type=checkbox]{width:18px}.doc-preview #docRowSelection label{display:block;margin:8px 0}.doc-preview #docRowSelection select{display:block;width:100%}

.doc-live-pages{max-height:72vh;overflow:auto;background:#e5e7eb;padding:10px;border:1px solid #cbd5e1}.doc-live-pages svg{display:block;width:100%;height:auto;margin-bottom:12px;box-shadow:0 1px 5px #0002}.doc-live-pages[hidden],.doc-preview iframe[hidden]{display:none}.doc-live-pages[aria-busy=true]{opacity:.55}@media(max-width:1000px){.doc-designer>.doc-preview{order:-1}.doc-live-pages{max-height:55vh}}

/* Keep the editor preview attached to the viewport, not a non-scrolling
   overflow ancestor. Scope shell changes to the open designer only. */
html:has(.doc-designer),body:has(.doc-designer){overflow-x:clip;overflow-y:visible}
body .admin-main:has(.doc-designer){overflow:visible}
.admin-main:has(.doc-designer)>.admin-top{position:static}
.doc-designer>.doc-editor{min-width:0}
.doc-designer>.doc-preview{position:sticky;top:12px;align-self:start;z-index:3;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain;background:var(--paper,#fff);scrollbar-gutter:stable}
.doc-designer .doc-live-pages,.doc-designer .doc-preview iframe{max-height:55vh;max-height:55dvh}
.doc-designer .doc-live-pages{overflow:auto;overflow-anchor:none}
.doc-designer .doc-live-pages svg{min-width:420px}
@media(max-width:1000px){
 .doc-designer{display:flex;flex-direction:column}
 .doc-designer>.doc-editor,.doc-designer>.doc-preview{width:100%}
 .doc-designer>.doc-preview{order:-1;top:6px;max-height:42vh;max-height:42dvh;padding:10px}
 .doc-designer>.doc-preview h3{font-size:14px;margin:0 0 6px}
 .doc-designer>.doc-preview>p{font-size:11px;margin:4px 0}
 .doc-designer .doc-live-pages,.doc-designer .doc-preview iframe{height:22vh;height:22dvh;max-height:22vh;max-height:22dvh}
 .doc-designer>.doc-editor{scroll-margin-top:44vh;scroll-margin-top:44dvh}
 .doc-designer .doc-editor :is(input,select,textarea,button){scroll-margin-top:44vh;scroll-margin-top:44dvh;scroll-margin-bottom:24px}
}
