/* Shared document workspace for both knowledge center and administration. */
.document-editor-dialog,.knowledge-workspace .document-editor-dialog { width:100vw; height:100dvh; max-width:100vw; max-height:100dvh; margin:0; padding:0; border:0; border-radius:0; overflow:hidden; background:#fff; color:#303743; }
.document-editor-dialog::backdrop { background:#fff; }
.document-editor-form,.knowledge-workspace .document-editor-form { display:flex; flex-direction:column; height:100%; min-height:0; gap:0; margin:0; }
.document-editor-form .document-editor-appbar { display:flex; justify-content:space-between; align-items:center; gap:24px; min-height:64px; flex:0 0 auto; padding:12px 24px; margin:0; border-bottom:1px solid #e9ebef; background:#fff; }
.document-editor-location,.document-editor-actions { display:flex; align-items:center; gap:12px; min-width:0; }
.document-editor-location { flex:1; }.document-editor-location>span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; color:#6f7784; }
.document-editor-divider { width:1px; height:20px; background:#e6e8ed; flex-shrink:0; }
.document-editor-dialog .document-editor-appbar button { padding:7px 13px; height:34px; border:1px solid #dfe3e9; border-radius:5px; background:white; color:#606a79; font-size:12px; font-weight:400; white-space:nowrap; }
.document-editor-dialog .document-editor-location button { border-color:transparent; padding-left:2px; }
.document-editor-dialog .document-editor-appbar button[type=submit] { color:white; background:#dc222f; border-color:#dc222f; font-weight:500; }
.document-editor-actions>span { max-width:240px; color:#929aa6; font-size:11px; line-height:1.7; }
.document-editor-dialog button:disabled { opacity:.4; cursor:not-allowed; }
.document-editor-dialog button:focus-visible,.document-editor-dialog input:focus-visible { outline:2px solid #b7858b; outline-offset:2px; }
.kb-edit-host,.ak-document-editor,.ak-editor-host { display:flex; flex:1; flex-direction:column; min-height:0; min-width:0; }
.document-editor { position:relative; display:flex; flex-direction:column; flex:1; height:100%; min-height:0; min-width:0; color:#344054; --border-color:#e7eaf0; --toolbar-background:#fff; --panel-background:#fff; --textarea-background-color:#fff; --text-color:#344054; --second-color:#8994a3; --toolbar-icon-color:#606b7b; --toolbar-icon-hover-color:#dc222f; --toolbar-height:44px; }
.document-editor .vditor { flex:1; min-height:0; border:0; border-radius:0; background:white; font-family:'PingFang SC','Microsoft YaHei',system-ui,sans-serif; }
.document-editor .vditor-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; flex:0 0 auto; gap:3px; min-height:48px; padding:7px 20px!important; border-bottom:1px solid #e9ebef; background:#fafbfc; border-radius:0; box-shadow:none; }
.document-editor .vditor-toolbar__item { padding:0; }
.document-editor .vditor-toolbar button { display:flex; align-items:center; justify-content:center; width:30px; height:30px; padding:5px; border:0; border-radius:4px; color:#606b7b; background:transparent; font-size:12px; }
.document-editor .vditor-toolbar button:hover,.document-editor .vditor-menu--current { background:#edf0f4!important; color:#24354b!important; }
.document-editor .vditor-toolbar button[data-type="insert-block"] { width:74px; padding:5px 10px; font-size:12px; }
.document-editor .vditor-toolbar [data-type="upload"] { display:flex; align-items:center; justify-content:center; width:30px; height:30px; padding:5px; border:0; border-radius:4px; color:#606b7b; cursor:pointer; }
.document-editor .vditor-toolbar .vditor-panel button,.document-editor .vditor-toolbar .vditor-hint button { width:100%; height:auto; min-height:30px; justify-content:flex-start; padding:6px 12px; }
.document-editor .vditor-toolbar svg { position:static; display:block; width:16px; height:16px; flex-shrink:0; }
.document-editor .vditor-toolbar .vditor-toolbar__divider { height:18px; margin:0 7px; border-color:#dce1e8; }
.document-editor .vditor-content { flex:1; min-height:0; background:#fff; }
.document-editor .vditor-outline { width:210px; max-width:210px; flex:0 0 210px; padding:26px 12px 24px; border-right:1px solid #edf0f3; background:#fafbfc; color:#808b99; }
.document-editor .vditor-outline__title { padding:0 13px 16px; font-size:12px; font-weight:500; color:#98a1ad; }
.document-editor .vditor-outline__content { font-size:12px; line-height:1.8; }.document-editor .vditor-outline__content:empty::after { content:'添加标题后在这里查看目录'; display:block; padding:12px; color:#b0b7c0; font-size:11px; }
.document-editor .vditor-outline li>span { border-radius:4px; }.document-editor .vditor-outline__item--current { color:#c34450; }
.document-editor .vditor-wysiwyg { display:flex; flex-direction:column; min-width:0; min-height:0; overflow:hidden; flex:1; background:#fff; }
.document-editor .document-page-title { flex:0 0 auto; padding:32px max(36px,calc((100% - 780px) / 2)) 10px; }
.document-editor-dialog .document-title-input,.knowledge-workspace .document-editor-dialog .document-title-input { display:block; width:100%; height:60px; margin:0; padding:0; border:0; outline:0; border-radius:0; background:transparent; color:#29313d; font:600 32px/1.5 'PingFang SC','Microsoft YaHei',system-ui,sans-serif!important; box-shadow:none; }
.document-editor-dialog .document-title-input::placeholder { color:#b4bbc5; }
.document-editor .vditor-wysiwyg .vditor-reset { flex:1; min-height:0; height:auto; overflow:auto; padding:12px max(36px,calc((100% - 780px) / 2)) 100px!important; font-family:inherit; font-size:15px; line-height:1.85; background:white; color:#344054; scroll-padding-top:24px; scrollbar-width:thin; }
.document-editor .vditor-reset h1 { font-size:28px; }.document-editor .vditor-reset h2 { font-size:23px; }.document-editor .vditor-reset h3 { font-size:19px; }
.document-editor .vditor-reset h1,.document-editor .vditor-reset h2,.document-editor .vditor-reset h3 { font-weight:600; border:0; padding:0; margin:24px 0 12px; line-height:1.5; }
.document-editor .vditor-reset p { font-size:15px; color:inherit; margin:8px 0; line-height:1.85; }
.document-editor .vditor-reset blockquote { padding:9px 15px; background:#f6f8fa; border-left:3px solid #c4ceda; color:#748092; border-radius:0 5px 5px 0; }
.document-editor .vditor-reset img { max-width:100%; height:auto; border-radius:6px; }
.document-editor .vditor-reset table { display:table; width:100%; white-space:normal; border-collapse:collapse; margin:14px 0; font-size:14px; }
.document-editor .vditor-reset th,.document-editor .vditor-reset td { border:1px solid #dfe5ec; padding:9px 12px; color:#4c596b; font-size:14px; font-weight:400; white-space:normal; line-height:1.7; }.document-editor .vditor-reset th { background:#f5f7fa; font-weight:500; }
.document-editor .vditor-reset pre { background:#f7f8fa; border-radius:6px; }.document-editor .vditor-reset pre code { font-size:13px; }
.document-editor .vditor-reset input[type=checkbox] { width:15px; height:15px; margin:0 7px 0 0; padding:0; accent-color:#54677f; display:inline-block; }
.document-editor .vditor-input { width:auto; border:1px solid #dce2e9; padding:5px 8px; background:#fff; color:#5e6b7c; font-size:12px; }
.document-editor .vditor-hint,.document-insert-menu { border:1px solid #e0e5ec; border-radius:7px; background:white; box-shadow:0 7px 28px #2330491a; min-width:230px; padding:6px; max-height:340px; overflow:auto; }
.document-editor .vditor-hint button,.document-insert-menu .document-block-item { display:flex; align-items:center; justify-content:flex-start; width:100%; gap:10px; text-align:left; font-size:12px; line-height:1.6; border:0; border-radius:4px; background:white; color:#566476; padding:7px 9px; }
.document-editor .vditor-hint button:hover,.document-insert-menu button:hover,.document-insert-menu button:focus { background:#f1f4f8; }
.document-block-symbol { display:inline-flex; align-items:center; justify-content:center; width:26px; height:25px; border:1px solid #e3e7ed; border-radius:4px; color:#8290a2; font-size:11px; flex-shrink:0; }
.document-insert-menu { position:absolute; top:46px; left:20px; z-index:30; }
.document-editor-bottom { display:flex; justify-content:space-between; gap:20px; flex:0 0 auto; padding:9px 22px; border-top:1px solid #edf0f4; color:#a0a8b3; font-size:10px; background:white; }
.document-editor.is-readonly .document-insert-menu { display:none; }
.document-editor-dialog .kb-import-warnings { margin:0; padding:7px 24px; border-width:0 0 1px; border-radius:0; flex:0 0 auto; font-size:11px; }
.document-editor-dialog .ak-document-error { flex:0 0 auto; margin:0; padding:10px 24px; background:#fff6f7; border-top:1px solid #f1d9dd; }
.document-editor-dialog .ak-reader { flex:1; min-height:0; height:auto; width:100%; border:0; border-radius:0; }
.document-editor-dialog .ak-read-title { padding:28px max(32px,calc((100% - 860px) / 2)) 10px; font-size:28px; font-weight:600; }
.document-editor-dialog [hidden] { display:none!important; }
@media(max-width:850px){.document-editor-form .document-editor-appbar{padding:10px 14px;gap:12px;flex-wrap:wrap}.document-editor-actions{gap:7px}.document-editor-actions>span{font-size:10px;max-width:140px}.document-editor .vditor-toolbar{justify-content:flex-start;padding:6px 12px!important}.document-editor .vditor-outline{width:165px;max-width:165px;flex-basis:165px}.document-editor .document-page-title{padding:24px 22px 8px}.document-editor-dialog .document-title-input,.knowledge-workspace .document-editor-dialog .document-title-input{font-size:27px!important;height:48px}.document-editor .vditor-wysiwyg .vditor-reset{padding:8px 22px 70px!important;font-size:14px}.document-editor .vditor-reset p{font-size:14px}.document-editor-bottom{font-size:9px;padding:8px 12px}}
@media(max-width:540px){.document-editor-actions{width:100%;justify-content:flex-end}.document-editor-actions>span{margin-right:auto}.document-editor .vditor-toolbar button{width:28px;height:28px}.document-editor .vditor-toolbar .vditor-toolbar__divider{margin:0 3px}.document-editor .vditor-outline{display:none!important}.document-editor .document-page-title{padding:20px 16px 6px}.document-editor .vditor-wysiwyg .vditor-reset{padding:8px 16px 60px!important}.document-editor-bottom>span:first-child{max-width:70%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
