.knowledge-page .main { height:100dvh; display:flex; flex-direction:column; overflow:hidden; }
.knowledge-page .topbar { flex-shrink:0; }
.knowledge-workspace { --kb-line:#e8e9ed; --kb-muted:#8a909a; flex:1; min-height:0; display:flex; flex-direction:column; padding:0 32px 28px; color:#353a43; }
.knowledge-workspace [hidden] { display:none!important; }
.knowledge-workspace button,.knowledge-workspace input,.knowledge-workspace textarea,.knowledge-workspace select { font:inherit; }
.knowledge-workspace button { border:1px solid #dfe2e7; border-radius:6px; padding:7px 11px; background:#fff; color:#555e6a; font-size:12px; cursor:pointer; white-space:nowrap; }
.knowledge-workspace button:hover { background:#f6f7f9; }
.knowledge-workspace button:disabled { opacity:.4; cursor:not-allowed; }
.knowledge-workspace .kb-primary { background:var(--red); color:white; border-color:var(--red); }
.knowledge-workspace .kb-primary:hover { background:#be1b27; }
.knowledge-workspace button:focus-visible,.knowledge-workspace input:focus-visible,.knowledge-workspace textarea:focus-visible,.knowledge-workspace select:focus-visible,.knowledge-workspace a:focus-visible { outline:2px solid #bd6870; outline-offset:2px; }
.knowledge-workspace .kb-danger { color:#b84c55; }
.kb-header { display:flex; gap:20px; align-items:center; justify-content:space-between; padding:4px 0 22px; flex-shrink:0; }
.kb-header p { margin:0 0 5px; font-size:11px; color:var(--kb-muted); }.kb-header h1 { margin:0; font-size:25px; font-weight:600; letter-spacing:-.5px; }
.kb-header-actions { display:flex; flex-wrap:wrap; gap:8px; }
.kb-layout { display:grid; grid-template-columns:190px minmax(0,1fr); flex:1; min-height:0; border:1px solid var(--kb-line); border-radius:8px; background:white; overflow:hidden; }
.kb-spaces { display:flex; flex-direction:column; min-height:0; padding:16px 10px 12px; border-right:1px solid var(--kb-line); background:#fafbfc; }
.kb-spaces-heading { display:flex; justify-content:space-between; align-items:center; padding:0 7px 12px; font-size:11px; color:var(--kb-muted); }
.kb-spaces-heading button { padding:2px 0; border:0; font-size:10px; background:none; }
.kb-spaces .kb-all,.kb-spaces .kb-trash,.kb-spaces .kb-space { width:100%; text-align:left; border:0; background:transparent; padding:9px 10px; }
.kb-spaces button.is-active { background:#edeff2; color:#303640; }
.kb-space-list { overflow:auto; min-height:50px; flex:1; margin:8px 0; scrollbar-width:thin; }
.kb-space { display:flex; flex-direction:column; gap:5px; margin-bottom:3px; }.kb-space span { max-width:100%; overflow:hidden; text-overflow:ellipsis; }.kb-space small { color:var(--kb-muted); font-size:10px; font-weight:400; }
.kb-credit { color:#a1a6ae; padding:12px 10px 0; font-size:10px; }.kb-empty-hint { color:var(--kb-muted); padding:10px; font-size:12px; line-height:1.8; }
.kb-main { min-height:0; min-width:0; display:flex; flex-direction:column; }
.kb-context { padding:17px 20px 12px; display:flex; align-items:center; justify-content:space-between; gap:12px; flex-shrink:0; }
.kb-context>div:first-child { min-width:0; }.kb-context h2 { font-size:16px; font-weight:600; margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.kb-context p { margin:6px 0 0; font-size:11px; color:var(--kb-muted); line-height:1.7; overflow-wrap:anywhere; }
.kb-space-actions { display:flex; gap:5px; flex-shrink:0; }.kb-space-actions button { border:0; padding:4px 6px; font-size:10px; color:#8d939d; }
.kb-tabs { display:flex; gap:24px; padding:0 20px; border-bottom:1px solid var(--kb-line); flex-shrink:0; }
.kb-tabs button { border:0; border-radius:0; border-bottom:2px solid transparent; padding:10px 0; background:transparent; color:var(--kb-muted); }
.kb-tabs button[aria-selected=true] { color:var(--red); border-bottom-color:var(--red); font-weight:500; }
.kb-doc-panel { display:grid; grid-template-columns:230px minmax(0,1fr); min-height:0; flex:1; }
.kb-document-list { display:flex; flex-direction:column; border-right:1px solid var(--kb-line); min-height:0; }
.kb-search { display:block; margin:14px 12px 0; }.kb-search input { width:100%; border:1px solid #e2e5e9; padding:8px 10px; border-radius:5px; font-size:11px; background:#fafbfc; }
.kb-list-status { padding:8px 14px; font-size:10px; margin:0; color:var(--kb-muted); overflow-wrap:anywhere; }
.kb-documents { overflow:auto; flex:1; min-height:0; scrollbar-width:thin; }
.kb-doc-row { position:relative; border-top:1px solid #f0f1f3; }.kb-doc-row.is-active { background:#f5f6f8; box-shadow:inset 2px 0 0 #b8bec7; }
.kb-doc-row .kb-doc-link { display:flex; flex-direction:column; gap:7px; text-align:left; border:0; border-radius:0; width:100%; padding:15px; white-space:normal; background:transparent; }
.kb-doc-link strong { color:#414854; font-size:12px; font-weight:500; overflow-wrap:anywhere; }.kb-doc-link span { font-size:11px; color:#9299a3; line-height:1.65; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }.kb-doc-link small { color:#9ca2ab; font-size:10px; }
.kb-doc-row .kb-restore { margin:0 15px 12px; font-size:10px; padding:4px 10px; }
.kb-document-view { min-width:0; min-height:0; display:flex; flex-direction:column; }.kb-no-document { margin:auto; padding:40px 24px; text-align:center; }.kb-no-document h3 { font-size:16px; font-weight:500; color:#7e8692; }.kb-no-document p { color:#a1a7b0; font-size:12px; line-height:1.8; }
.kb-document { display:flex; flex-direction:column; flex:1; min-height:0; }.kb-document>header { padding:18px 22px 14px; border-bottom:1px solid #f0f1f3; flex-shrink:0; }.kb-document h3 { font-size:19px; font-weight:600; margin:0; overflow-wrap:anywhere; }.kb-document-meta { font-size:10px; color:#9aA0aa; margin:8px 0 12px; overflow-wrap:anywhere; }.kb-document>header>div:last-child { display:flex; flex-wrap:wrap; gap:7px; }.kb-document>header button { font-size:11px; padding:5px 10px; }
.kb-reader { width:100%; flex:1; min-height:180px; border:0; background:white; }
.kb-ask-panel { padding:26px clamp(20px,3vw,50px); flex:1; min-height:0; overflow:auto; }
.kb-ask-intro h3 { margin:0 0 8px; font-size:19px; font-weight:500; }.kb-ask-intro p { font-size:12px; line-height:1.7; color:var(--kb-muted); margin:0 0 22px; }
.kb-question-form { border:1px solid #dfe3e8; border-radius:8px; padding:14px; }.kb-question-form textarea { border:0; width:100%; min-height:82px; resize:vertical; font-size:13px; line-height:1.8; background:transparent; color:#414854; }.kb-question-form>div { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-top:12px; }.kb-question-form>div label { font-size:11px; color:#939aa4; }.kb-question-form select { padding:5px; border:1px solid #e1e4e9; border-radius:5px; background:white; font-size:11px; color:#626b78; }.kb-ask-scope { margin-right:auto; color:#9da3ac; font-size:10px; }.kb-ask-note { color:#a2a8b0; font-size:10px; line-height:1.6; margin:12px 0 0; }
.kb-ask-status { color:#8d95a0; font-size:12px; margin:18px 0; }.kb-answer { border-top:1px solid var(--kb-line); padding:22px 0; }.kb-answer-meta { color:#999faa; font-size:10px; margin-bottom:14px; }.kb-answer-body { white-space:pre-wrap; overflow-wrap:anywhere; font-size:14px; line-height:1.95; }.kb-answer h4 { font-weight:500; font-size:12px; margin:26px 0 12px; color:#7d8693; }.kb-source { border:1px solid #e6e9ed; border-radius:5px; padding:12px; margin-top:8px; }.kb-source summary { font-size:12px; cursor:pointer; color:#697583; }.kb-source p { white-space:pre-wrap; font-size:12px; line-height:1.8; color:#8993a1; }.kb-source button { margin-top:8px; font-size:11px; }
.kb-draft { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:8px 12px; border:1px solid #eee3c9; background:#fffdf7; border-radius:5px; font-size:11px; color:#9b8861; margin-bottom:12px; }.kb-draft span { margin-right:auto; }.kb-draft button { padding:3px 7px; font-size:10px; }
.knowledge-workspace dialog { max-width:calc(100vw - 32px); max-height:90dvh; border:1px solid #e0e4e9; border-radius:10px; padding:24px; color:#414854; background:white; overflow:auto; }.knowledge-workspace dialog::backdrop { background:#17213166; }.knowledge-workspace dialog h2 { margin:0; font-size:20px; font-weight:600; }.knowledge-workspace dialog header,.knowledge-workspace dialog footer { display:flex; justify-content:space-between; align-items:center; gap:12px; }.knowledge-workspace dialog footer { margin-top:18px; }.knowledge-workspace dialog footer>span { margin-right:auto; font-size:11px; color:#89939f; }.knowledge-workspace dialog p { font-size:12px; color:#8d95a1; line-height:1.7; }
.kb-space-dialog { width:460px; }.kb-space-form { display:flex; flex-direction:column; gap:18px; }.kb-space-form label { display:flex; flex-direction:column; gap:8px; font-size:12px; }.kb-space-form input,.kb-space-form textarea,.kb-space-form select { width:100%; border:1px solid #e0e4e8; border-radius:5px; padding:9px 10px; background:#fff; font-size:13px; }.kb-space-form footer { justify-content:flex-end!important; }.kb-space-form p { margin:0; }.kb-space-error { color:#b95861!important; }
.kb-editor-dialog { width:980px; }.kb-editor-form>header { margin-bottom:16px; }.kb-edit-title { display:block; width:100%; border:0; border-bottom:1px solid #e6e9ed; margin-bottom:18px; padding:12px 0; font-size:24px!important; color:#343d49; font-weight:500!important; }.kb-editor-form .CodeMirror { font-size:13px; line-height:1.8; }.kb-editor-form .editor-toolbar { border-color:#e4e7ec; }.kb-editor-form .editor-toolbar button { width:auto; height:30px; padding:3px 7px; border:0; font-size:11px; }.kb-editor-form .CodeMirror { border-color:#e4e7ec; }.kb-editor-form .CodeMirror button { padding:0; }.kb-import-warnings { padding:10px 12px; border:1px solid #eee3c9; background:#fffcf4; color:#a08c63!important; }
.kb-versions-dialog { width:620px; }.kb-version { display:flex; align-items:center; justify-content:space-between; gap:14px; border-top:1px solid #e9ebee; padding:12px 0; font-size:12px; }
@media(max-width:1350px){.knowledge-workspace{padding:0 20px 20px}.kb-layout{grid-template-columns:165px minmax(0,1fr)}.kb-doc-panel{grid-template-columns:195px minmax(0,1fr)}.kb-context{align-items:flex-start}.kb-space-actions{flex-direction:column}}
@media(max-width:1100px){.kb-doc-panel{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(120px,30%) minmax(230px,1fr)}.kb-document-list{border-right:0;border-bottom:1px solid var(--kb-line)}.kb-documents{display:flex}.kb-doc-row{width:210px;flex-shrink:0;border-top:0;border-right:1px solid #f0f1f3}.kb-document>header{padding:12px 18px}.kb-header{align-items:flex-start}.kb-header-actions{justify-content:flex-end}}
@media(max-width:760px){.knowledge-workspace{padding:0 12px 16px;overflow:auto;min-height:600px}.knowledge-page .main{height:auto;min-height:100dvh;overflow:visible}.kb-header{flex-direction:column;gap:12px}.kb-header h1{font-size:22px}.kb-layout{display:flex;flex-direction:column;min-height:700px}.kb-spaces{flex-shrink:0;border-right:0;border-bottom:1px solid var(--kb-line);max-height:210px}.kb-space-list{display:flex;min-height:56px;overflow:auto}.kb-spaces .kb-space{width:150px;flex-shrink:0}.kb-spaces .kb-all,.kb-spaces .kb-trash{width:auto;align-self:flex-start}.kb-credit{display:none}.kb-main{flex:1}.kb-document-view{min-height:330px}.kb-context{padding:14px}.kb-doc-panel{min-height:480px;grid-template-rows:150px minmax(330px,1fr)}.kb-tabs{padding:0 14px}.kb-ask-panel{padding:20px 16px}.kb-header-actions{justify-content:flex-start}.knowledge-workspace dialog{padding:18px}.kb-editor-dialog{width:calc(100vw - 24px)}.kb-editor-form footer{flex-wrap:wrap}.kb-editor-form footer>span{width:100%}}
