.document-workspace-frame{display:block;width:100%;height:100%;min-height:0;border:0;background:transparent}
.document-workspace-active{overflow:hidden}
.document-workspace-active .content{height:100dvh;min-height:0;padding-bottom:16px;overflow:hidden;display:flex;flex-direction:column}
.document-workspace-active .content>.header #pageTitle,.document-workspace-active .content>.header #pageSubtitle{display:none}
.document-workspace-active .content>.header{height:72px;min-height:72px;margin-bottom:12px;flex-shrink:0}
.document-workspace-active .content>.view.active{padding-top:0;overflow:hidden;flex:1;min-height:0}
/* 生成合同、报价单模板、合同模板管理由整页 iframe 承载文档工作区；
   管理智能体沿用 management-assistant.css 的三列同层布局（内容区让出宽度），
   此处只约束工作区自身高度，不覆盖管理智能体定位、宽度或拖拽条。 */

@media(max-width:820px){
 .document-workspace-active .layout{display:flex;flex-direction:column;height:100dvh;min-height:0}
 .document-workspace-active .layout>.sidebar{flex-shrink:0}
 .document-workspace-active .content{flex:1;height:auto;padding-bottom:12px}
 .document-workspace-active .content>.header{height:60px;min-height:60px;margin-bottom:8px}
}

/* 生成合同独立采用主浏览器滚动，其他模板菜单维持既有布局。 */
body.document-workspace-active.document-generate-active{overflow:visible}
.document-workspace-active.document-generate-active .content{height:auto;min-height:0;overflow:visible;display:block}
.document-workspace-active.document-generate-active .content>.header{height:116px;min-height:116px}
.document-workspace-active.document-generate-active .content>.header #pageTitle{display:block}
.document-workspace-active.document-generate-active .content>.view.active{flex:none;overflow:visible;min-height:0}
.document-workspace-frame.document-generate-frame{height:640px}
body.document-generate-modal-active{overflow:hidden!important}
.document-workspace-frame.document-generate-modal-frame{position:fixed;inset:0;width:100vw;height:100dvh!important;z-index:10000;background:transparent}
@media(max-width:820px){.document-workspace-active.document-generate-active .layout{height:auto;min-height:100dvh}.document-workspace-active.document-generate-active .content{height:auto;flex:none}.document-workspace-active.document-generate-active .content>.header{height:96px;min-height:96px}}
