/* Estilos limitados à Base de Conhecimento e seus diálogos. */
#app:has(>.knowledge-page){height:calc(100dvh - 62px);min-height:0;overflow:hidden;padding:30px 32px}
.knowledge-page{height:calc(100% + 28px);margin:-14px;display:flex;flex-direction:column;gap:12px;min-width:0;--kb-border:#e3e7de;--kb-muted:#77816f}
.knowledge-page button,#kb-dialog button{font-size:11px;min-height:28px;padding:5px 8px}
.knowledge-page button:focus-visible,.knowledge-page input:focus-visible,.knowledge-page select:focus-visible,#kb-dialog :focus-visible{outline:2px solid #526f5a;outline-offset:2px}
.kb-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;flex:none}.kb-heading h1{font-size:21px;margin:0 0 3px;letter-spacing:-.5px}.kb-heading p{font-size:11px;color:var(--kb-muted);margin:0}.kb-heading-actions{display:flex;gap:5px;flex-wrap:wrap}.knowledge-page .kb-mobile-tree{display:none}
.kb-workspace{display:grid;grid-template-columns:240px minmax(240px,1fr) 250px;flex:1;min-height:0;border:1px solid var(--kb-border);border-radius:7px;overflow:hidden}.kb-workspace.kb-no-properties{grid-template-columns:240px minmax(240px,1fr)}
.kb-tree-pane,.kb-editor-pane,.kb-properties-pane{display:flex;flex-direction:column;min-height:0;min-width:0}.kb-tree-pane{background:#fafbf8;border-right:1px solid var(--kb-border)}.kb-properties-pane{border-left:1px solid var(--kb-border);background:#fdfefb}.kb-pane-heading{height:40px;min-height:40px;display:flex;align-items:center;gap:5px;padding:6px 10px;border-bottom:1px solid var(--kb-border)}.kb-pane-heading h2{font-size:12px;margin:0;flex:1}.kb-pane-heading span{font-size:10px;color:var(--kb-muted)}.kb-pane-heading button{border:0;background:transparent;padding:2px 4px;min-height:24px;font-size:10px}
.kb-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-gutter:stable}.kb-search{padding:8px;flex:none}.kb-search input{width:100%;padding:6px 8px;font-size:11px;height:30px;border:1px solid var(--kb-border);border-radius:5px;background:white}.kb-tree{padding:3px 6px 12px}.kb-row{display:flex;align-items:center;gap:3px;height:39px;width:max-content;min-width:100%;padding:2px 4px 2px calc(3px + var(--depth)*18px);border:1px solid transparent;border-radius:5px;margin:2px 0;position:relative}.kb-row:hover{background:#f0f3eb}.kb-row.selected{background:#e5eddf;border-color:#d4dfcb;box-shadow:inset 2px 0 #6f8c61}.knowledge-page .kb-expander{width:16px;flex:0 0 16px;border:0;background:transparent;padding:0;min-height:25px}.kb-expander:disabled{opacity:.4;cursor:default}.knowledge-page .kb-node{display:flex;align-items:center;gap:6px;flex:1;min-width:130px;max-width:250px;border:0;background:transparent;padding:0 3px;text-align:left}.kb-node-text{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kb-node-text small{font-size:9px;color:var(--kb-muted);margin-top:2px}.knowledge-page .kb-more{border:0;background:transparent;padding:0 4px;opacity:0}.kb-row:hover .kb-more,.kb-row:focus-within .kb-more,.kb-row.selected .kb-more{opacity:1}.kb-root-drop{font-size:10px;border:1px dashed #bfcbb5;border-radius:4px;padding:12px 6px;margin:10px 2px;color:var(--kb-muted);text-align:center}.kb-dragging{opacity:.45}.kb-drop-before:before,.kb-drop-after:after{content:'';position:absolute;left:0;right:0;height:2px;background:#52775a}.kb-drop-before:before{top:-2px}.kb-drop-after:after{bottom:-2px}.kb-drop-inside{outline:2px solid #789d66;background:#dce9d2}.kb-drop-root{box-shadow:inset 0 0 0 2px #789d66}
.kb-breadcrumbs{display:flex;align-items:center;gap:3px;flex-wrap:wrap;min-height:33px;padding:4px 9px;border-bottom:1px solid var(--kb-border);font-size:10px;color:var(--kb-muted)}.kb-breadcrumbs button{background:transparent;border:0;font-size:10px;min-height:20px;padding:3px}.kb-pages{display:flex;gap:3px;flex:none;overflow-x:auto;padding:5px 9px;border-bottom:1px solid var(--kb-border)}.kb-pages button{white-space:nowrap;border:0;background:transparent}.kb-pages button.active{background:#e8ede3;font-weight:600}.kb-document-heading{display:flex;gap:6px;align-items:center;padding:10px 14px 6px}.kb-document-heading input{border:0;background:transparent;font-size:22px;font-weight:600;min-width:0;flex:1;padding:2px 0}.kb-status{font-size:9px;color:#52775a;background:#edf2e8;border-radius:4px;padding:3px 5px}.kb-toolbar{display:flex;gap:2px;overflow-x:auto;flex:none;padding:5px 10px;border-bottom:1px solid var(--kb-border)}.kb-toolbar button{flex:none;min-width:25px;border:0;padding:3px 6px;min-height:27px;background:transparent}.kb-toolbar button[data-k-format=bold]{font-weight:bold}.kb-toolbar button[data-k-format=italic]{font-style:italic}.kb-toolbar button[data-k-format=underline]{text-decoration:underline}.kb-document{padding:12px 16px}.kb-editor{min-height:100%;max-width:860px;margin:auto;outline:none;font-size:12px;line-height:1.7;overflow-wrap:anywhere}.kb-editor:focus-visible{outline:1px solid #d4dfcb;outline-offset:4px}.kb-editor h1{font-size:25px;line-height:1.3}.kb-editor h2{font-size:18px;line-height:1.4}.kb-editor h3{font-size:14px}.kb-editor p,.kb-editor ul,.kb-editor ol{margin:9px 0}.kb-editor blockquote,.kb-editor .note{border-left:3px solid #8ca280;background:#f3f6ee;margin:12px 0;padding:8px 12px}.kb-editor pre,.kb-editor .code{white-space:pre-wrap;background:#f4f5f1;border:1px solid var(--kb-border);border-radius:4px;padding:10px;font:11px/1.6 monospace}.kb-editor table{border-collapse:collapse;width:100%;font-size:11px}.kb-editor th,.kb-editor td{border:1px solid var(--kb-border);padding:6px;text-align:left}.kb-editor th{background:#f3f5ef}.kb-editor a{color:#386845;text-decoration:underline}.kb-editor-note{padding:5px 10px;color:var(--kb-muted);font-size:9px;border-top:1px solid var(--kb-border)}
.kb-properties{padding:10px}.kb-properties form,.kb-dates{border-bottom:1px solid var(--kb-border);margin-bottom:12px;padding-bottom:10px}.kb-properties h3{font-size:11px;margin:0 0 8px;font-weight:600}.kb-properties label,#kb-dialog label{display:block;font-size:10px;color:#697561;margin:7px 0}.kb-properties input,.kb-properties select{display:block;width:100%;min-width:0;height:29px;padding:5px 7px;border:1px solid var(--kb-border);border-radius:4px;background:white;margin-top:4px;font-size:11px}.kb-field-pair{display:grid;grid-template-columns:65px minmax(0,1fr);gap:6px}.kb-property-actions{display:flex;gap:4px;flex-wrap:wrap;margin-top:7px}.kb-property-actions button{font-size:10px}.kb-danger{color:#a2463d}.kb-dates span{display:block;font-size:9px;line-height:1.8;color:var(--kb-muted)}.kb-memory{font-size:10px;line-height:1.5;color:var(--kb-muted)}.kb-empty{padding:20px;font-size:12px;color:var(--kb-muted)}
#kb-dialog{width:min(490px,94vw);padding:20px;max-height:90dvh;overflow:auto}#kb-dialog h2{font-size:18px;margin:0 0 14px}#kb-dialog p{font-size:12px;line-height:1.5}#kb-dialog input,#kb-dialog select{display:block;width:100%;padding:7px 8px;min-height:32px;border:1px solid #d9dfd2;border-radius:5px;margin:5px 0 12px;font-size:12px}#kb-dialog .kb-error{color:#a2463d}.kb-dialog-actions{display:flex;gap:5px;justify-content:flex-end;flex-wrap:wrap;margin-top:12px}
@media(max-width:1150px){.kb-workspace{grid-template-columns:210px minmax(220px,1fr) 220px}.kb-workspace.kb-no-properties{grid-template-columns:210px minmax(220px,1fr)}}
@media(max-width:980px){.kb-workspace{grid-template-columns:200px minmax(0,1fr);position:relative}.kb-properties-pane{position:absolute;right:0;top:0;bottom:0;width:250px;background:#fdfefb;z-index:4;box-shadow:-5px 0 15px #0001}.kb-workspace.kb-no-properties{grid-template-columns:200px minmax(0,1fr)}}
@media(max-width:760px){#app:has(>.knowledge-page){padding:12px 10px}.knowledge-page{margin:0;height:100%}.kb-heading{align-items:flex-start;flex-wrap:wrap;gap:7px}.kb-heading h1{font-size:19px}.knowledge-page .kb-mobile-tree{display:inline-block}.kb-heading-actions{gap:4px}.kb-workspace,.kb-workspace.kb-no-properties{display:flex;position:relative}.kb-editor-pane{flex:1;width:100%}.kb-tree-pane{display:none;position:absolute;inset:0 auto 0 0;width:min(280px,90%);z-index:5;box-shadow:5px 0 16px #0002;background:#fafbf8}.kb-tree-pane.open{display:flex}.kb-document{padding:10px 13px}.kb-document-heading input{font-size:20px}.kb-breadcrumbs{max-height:65px;overflow:auto}.kb-properties-pane{width:min(250px,90%)}.kb-heading p{display:none}}
