/* 资料库采用紧凑的指标栏、对齐的分类磁贴与克制的搜索区域。 */
.knowledge-overview{--kl-ink:#243d54;--kl-muted:#64788b;--kl-line:#e5ecf2;margin:0 0 24px;color:var(--kl-ink)}
.knowledge-overview svg{display:block;width:22px;height:22px;flex:none}
body.workspace-simple .knowledge-library-card{padding:0;border:0;background:transparent;box-shadow:none}
body.workspace-simple .knowledge-library-header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 24px}
body.workspace-simple .knowledge-library-header h2{margin:0;font-size:25px;line-height:1.4;letter-spacing:.4px;color:#253e54}
body.workspace-simple #goUpload{display:inline-flex;align-items:center;justify-content:center;gap:8px;margin:0;padding:10px 17px;min-height:42px;border:1px solid #304f6b;border-radius:10px;background:#304f6b;color:#fff;font-size:13px;box-shadow:0 3px 8px #304f6b12}
body.workspace-simple #goUpload::before{content:'+';font-size:20px;line-height:16px;font-weight:400}
body.workspace-simple #goUpload:hover{background:#254159;border-color:#254159;color:#fff}
.knowledge-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0 0 24px;padding:0;background:transparent;border-radius:0}
.knowledge-stat{display:flex;align-items:center;gap:16px;padding:20px 24px;min-width:0;border-radius:14px;background:#edf2f6}
.knowledge-stats-has-web{grid-template-columns:repeat(3,minmax(0,1fr))}.knowledge-stat-web{background:#edf5f2}.knowledge-stat-web .knowledge-stat-symbol{color:#64968a}.knowledge-stat-web strong{color:#477668}
.knowledge-stat-symbol{display:grid;place-items:center;width:44px;height:44px;flex:none;border-radius:13px;color:#597a99;background:#ffffffc9;box-shadow:0 2px 8px #29496404}
.knowledge-stat-symbol svg{width:23px;height:23px}
.knowledge-stat-copy>span{display:block;color:#5d7488;font-size:12px;line-height:1.6;margin-bottom:2px}
.knowledge-stat-number{display:flex;align-items:baseline;gap:9px;flex-wrap:wrap}
.knowledge-stat strong{font-size:29px;font-weight:650;letter-spacing:-.7px;line-height:1.3;color:#29465f;font-variant-numeric:tabular-nums}
.knowledge-stat small{color:#647b8e;font-size:12px;white-space:nowrap}
.knowledge-flow{position:relative;display:grid;grid-template-columns:126px minmax(0,1fr) 196px;align-items:center;gap:0;min-height:238px;box-sizing:border-box;margin:0 0 20px;padding:20px 24px 26px;border:1px solid #dde8f5;border-radius:16px;background:linear-gradient(115deg,#f8fbff 0%,#f0f6fd 52%,#f6f8fd 100%);overflow:hidden}
.knowledge-flow h3{margin:0 0 14px;color:#304c69;font-size:14px;font-weight:600;line-height:1.5}
.knowledge-flow-inputs,.knowledge-flow-outputs{position:relative;z-index:1;min-width:0}
.knowledge-flow-source,.knowledge-flow-destination{display:flex;align-items:center;gap:10px;box-sizing:border-box;min-height:38px;padding:8px 10px;border:1px solid #dfe9f4;border-radius:9px;background:#ffffffb3;color:#42627e;font-size:12px;line-height:1.5}
.knowledge-flow-source+.knowledge-flow-source,.knowledge-flow-destination+.knowledge-flow-destination{margin-top:10px}
.knowledge-flow-source{width:112px}.knowledge-flow-source svg{color:#5998c4}.knowledge-flow-source:nth-of-type(2) svg{color:#6b9d8c}
.knowledge-flow-destination svg{color:#6487b3}.knowledge-flow-destination:last-of-type svg{color:#648f81}
.knowledge-flow svg:not(.knowledge-flow-network){width:19px;height:19px}
.knowledge-flow-visual{min-width:0;align-self:stretch;display:flex;align-items:center}
.knowledge-flow .knowledge-flow-network{display:block;width:100%;height:auto;max-height:230px;flex:1;overflow:visible}
.knowledge-flow-wires path{fill:none;stroke-width:.65;opacity:.19}
.knowledge-flow-points circle{opacity:.85}
.knowledge-flow-streams{fill:none;stroke:#648fd0;stroke-width:1.5;stroke-linecap:round;stroke-dasharray:3 145;animation:knowledge-flow-travel 12s linear infinite;opacity:.55}
.knowledge-flow-permission{margin:10px 0 0;color:#708398;font-size:11px;line-height:1.6}
.knowledge-flow-caption{position:absolute;right:24px;bottom:8px;margin:0;color:#8b9bac;font-size:10px;line-height:1.4}
@keyframes knowledge-flow-travel{to{stroke-dashoffset:-592}}
@media(prefers-reduced-motion:reduce){.knowledge-flow-streams{animation:none;stroke-dasharray:none;opacity:.2}}
@media(max-width:1100px){.knowledge-flow{grid-template-columns:100px minmax(0,1fr) 170px;padding:18px 18px 26px;min-height:212px}.knowledge-flow-source{width:96px}.knowledge-flow-destination{gap:7px;padding:8px;font-size:11px}.knowledge-flow h3{font-size:13px}}
@media(max-width:600px){.knowledge-flow{grid-template-columns:minmax(0,1fr);gap:8px;margin-bottom:16px;padding:16px 14px 26px}.knowledge-flow-inputs{display:flex;flex-wrap:wrap;gap:7px}.knowledge-flow h3{margin:0 0 3px;font-size:12px}.knowledge-flow-inputs h3{width:100%}.knowledge-flow-source{width:auto;flex:1;min-height:32px;padding:6px 8px;gap:7px}.knowledge-flow-outputs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.knowledge-flow-outputs h3,.knowledge-flow-permission{grid-column:1/-1}.knowledge-flow-destination{min-height:36px;padding:7px;gap:6px}.knowledge-flow-source+.knowledge-flow-source,.knowledge-flow-destination+.knowledge-flow-destination{margin-top:0}.knowledge-flow-permission{margin:0;font-size:10px}.knowledge-flow .knowledge-flow-network{max-height:140px}.knowledge-flow-caption{right:14px;bottom:7px}.knowledge-flow-source,.knowledge-flow-destination{font-size:11px}}
.knowledge-overview-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:stretch}
.knowledge-overview-columns>section{min-width:0;border:1px solid var(--kl-line);border-radius:16px;padding:22px;background:#fff;box-sizing:border-box;box-shadow:0 4px 18px #253e5403}
.knowledge-panel-heading,.knowledge-feedback-heading{display:flex;align-items:center;gap:10px;min-height:34px;margin:0 0 20px}
.knowledge-panel-heading h3,.knowledge-feedback-heading h3{margin:0;color:var(--kl-ink);font-size:15px;line-height:1.5;font-weight:600}
.knowledge-categories>h3{margin:0 0 18px;font-size:15px;color:var(--kl-ink)}
.knowledge-panel-symbol{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:#eef3fa;color:#6283a5;flex:none}
.knowledge-panel-symbol svg{width:19px;height:19px}
.knowledge-panel-symbol-web{background:#edf7f4;color:#588c80}
.knowledge-website-total{margin-left:auto;padding:5px 9px;border-radius:7px;background:#f1f7f5;color:#527e73;font-size:11px;white-space:nowrap;font-variant-numeric:tabular-nums}
.knowledge-category-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.knowledge-category,#workspace .knowledge-category{display:flex;align-items:center;gap:10px;min-height:50px;max-width:100%;box-sizing:border-box;margin:0;padding:10px 12px;border:1px solid transparent;border-radius:10px;background:#f6f8fb;color:#4b657c;text-align:left;box-shadow:none;font-size:13px;line-height:1.6;transition:background-color .16s,border-color .16s}
.knowledge-category-all{grid-column:1/-1}
.knowledge-category-symbol{display:grid;place-items:center;flex:none;color:#91a7bc}
.knowledge-category-symbol svg{width:17px;height:17px}
.knowledge-category-name{min-width:0;overflow-wrap:anywhere}
.knowledge-category-count{display:flex;align-items:center;justify-content:center;margin-left:auto;min-width:24px;height:24px;box-sizing:border-box;padding:0 5px;border-radius:6px;background:#ffffffbe;color:#536f8a;font-size:12px;font-weight:600;line-height:1;font-variant-numeric:tabular-nums}
button.knowledge-category:hover,#workspace button.knowledge-category:hover{border-color:#d0deeb;background:#edf3f9;color:#304f6b}
button.knowledge-category[aria-pressed=true],#workspace button.knowledge-category[aria-pressed=true]{border-color:#c8d8e8;background:#eaf1f8;color:#304f6b}
.knowledge-category[aria-pressed=true] .knowledge-category-symbol{color:#55799c}
.knowledge-category[aria-pressed=true] .knowledge-category-count{background:#dce7f2;color:#375c80}
button.knowledge-category:focus-visible,#workspace button.knowledge-category:focus-visible{outline:2px solid #648bb3;outline-offset:3px}
.knowledge-web-category,#workspace .knowledge-web-category{background:#f1f7f5;color:#5b7c73;border-color:transparent}
.knowledge-web-category .knowledge-category-symbol{color:#81a99d}
.knowledge-web-category .knowledge-category-count{color:#557e71}
.knowledge-website-feedback>p{margin:0;font-size:13px;line-height:1.8;color:var(--kl-muted);overflow-wrap:anywhere}
.knowledge-website-feedback>p:empty{display:none}
.knowledge-website-categories{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0}
.knowledge-website-category{display:flex;align-items:center;justify-content:space-between;gap:14px;min-width:0;min-height:50px;box-sizing:border-box;padding:10px 12px;border:1px solid transparent;border-radius:10px;background:#f4f8f7;font-size:13px;line-height:1.6}
.knowledge-website-category dt{display:flex;align-items:center;gap:10px;min-width:0;color:#4f6b62;overflow-wrap:anywhere}
.knowledge-website-category-all{grid-column:1/-1;background:#eaf3ef;border-color:#d5e6df}.knowledge-website-category .knowledge-category-symbol{color:#86aa9e}.knowledge-website-category dt>span:last-child{min-width:0;overflow-wrap:anywhere}
.knowledge-website-category dd{display:flex;align-items:center;justify-content:center;margin:0;min-width:24px;height:24px;box-sizing:border-box;padding:0 5px;border-radius:6px;background:#ffffffbe;color:#527e70;font-size:12px;font-weight:600;line-height:1;font-variant-numeric:tabular-nums;flex:none}
.knowledge-website-category{position:relative;transition:background-color .16s,border-color .16s}.knowledge-website-category-all{background:#f4f8f7;border-color:transparent}.knowledge-website-category:hover,.knowledge-website-category.selected{border-color:#c9dfd4;background:#eaf3ef}
#workspace button.knowledge-website-select,button.knowledge-website-select{display:flex;align-items:center;gap:10px;min-width:0;min-height:0;height:auto;margin:0;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;box-shadow:none;cursor:pointer;white-space:normal}button.knowledge-website-select::after{content:'';position:absolute;inset:0;border-radius:10px}button.knowledge-website-select:focus-visible{outline:none}button.knowledge-website-select:focus-visible::after{outline:2px solid #648f7e;outline-offset:3px}button.knowledge-website-select>span:last-child{overflow-wrap:anywhere;min-width:0}
.knowledge-categories>.muted{font-size:12px;line-height:1.8;color:var(--kl-muted)}
.knowledge-search-panel{border:1px solid #e5ecf2;border-radius:16px;padding:24px;background:#fff;box-shadow:0 4px 18px #253e5403}
.knowledge-content-title{margin:0 0 18px;color:#2d465d;font-size:16px;line-height:1.6;font-weight:600}
body.workspace-simple .knowledge-search-panel .library-toolbar{align-items:flex-end;gap:12px;margin:0 0 18px}
body.workspace-simple .knowledge-search-panel .library-toolbar label{display:grid;gap:7px;margin:0;font-size:12px;color:#5d7488}
body.workspace-simple .knowledge-search-panel .library-toolbar label:first-child{flex:1;min-width:180px}
body.workspace-simple .knowledge-search-panel .library-toolbar input,body.workspace-simple .knowledge-search-panel .library-toolbar select{box-sizing:border-box;height:44px;min-height:44px;margin:0;border:1px solid #e0e8ef;border-radius:10px;background-color:#fafbfd;font-size:13px;color:#3f5c75;box-shadow:none}
body.workspace-simple .knowledge-search-panel #librarySearch{padding-left:40px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23849aae' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m16 16 4 4'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:14px center}
body.workspace-simple .knowledge-search-panel #librarySearch::placeholder{color:#5d7488}
body.workspace-simple #librarySubmit{height:44px;min-width:78px;margin:0;padding:10px 22px;border-radius:10px;box-shadow:none}
body.workspace-simple #workspace #libraryManage{height:44px;min-height:44px;margin:0;padding:10px 16px;border:1px solid #d4e2eb;border-radius:10px;background:#f7fafc;color:#52718a;font-size:13px;white-space:nowrap;box-shadow:none}
body.workspace-simple #workspace #libraryManage:hover:not(:disabled){background:#eaf2f7;border-color:#b9cfdc;color:#345b78}
body.workspace-simple #workspace #libraryManage[aria-expanded=true]{background:#e9f2f5;border-color:#c5dce4;color:#365f75}
body.workspace-simple #libraryCount{font-size:12px;color:#73899b}
body.workspace-simple #librarySources{margin:0}
body.workspace-simple #librarySources>li{padding:20px;gap:24px}
body.workspace-simple #librarySources>li.library-search-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;margin:0;padding:28px 20px;border:1px dashed #e1e8ef;border-radius:12px;background:#fbfcfd;text-align:center}
.library-empty-symbol{display:grid;place-items:center;width:42px;height:42px;margin-bottom:3px;border-radius:50%;background:#edf3f8;color:#8ba3b9}
.library-empty-symbol svg{width:21px;height:21px}
body.workspace-simple #librarySources .library-search-empty strong{font-size:13px;font-weight:500;color:#5b748b}
body.workspace-simple #librarySources .library-search-empty p{margin:0;color:#5d7488;font-size:12px}
body.workspace-simple #librarySources .table-actions{display:grid;grid-template-columns:repeat(3,max-content);gap:8px;flex:0 0 auto;width:auto;max-width:none}
body.workspace-simple #librarySources .table-actions button{flex:none;width:auto;min-width:0;white-space:nowrap;margin:0;padding:8px 12px}
body.workspace-simple #librarySources .source-description{flex:1;min-width:0}
body.workspace-simple #librarySources .source-description strong{overflow-wrap:anywhere}
body.workspace-simple #librarySources button.library-source-title{display:block;max-width:100%;padding:0;margin:0;border:0;border-radius:3px;background:transparent;box-shadow:none;color:#304f6b;white-space:normal;text-align:left;font:inherit;cursor:pointer}body.workspace-simple #librarySources button.library-source-title:hover{color:#1f6c8c;text-decoration:underline;text-underline-offset:4px}body.workspace-simple #librarySources button.library-source-title:focus-visible{outline:2px solid #648bb3;outline-offset:4px}
.library-pagination{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:14px;margin-top:20px;font-size:12px;color:#657d90}.library-pagination[hidden]{display:none}.library-pagination button{margin:0;min-height:38px;padding:7px 14px}
.knowledge-category-tag{display:inline-block;margin:8px 8px 0 0;padding:3px 8px;border-radius:5px;background:#f0f4f8;color:#60788e;font-size:12px}
.knowledge-category-dialog{width:min(420px,calc(100vw - 32px));box-sizing:border-box;border:1px solid #dce4eb;border-radius:14px;padding:24px}
.knowledge-category-dialog form{display:grid;gap:14px}.knowledge-category-dialog input{box-sizing:border-box;width:100%}.knowledge-category-dialog h2{font-size:19px;margin-top:0}.knowledge-category-dialog p{font-size:13px;color:#718493}.knowledge-category-dialog::backdrop{background:#18304755}
@media(prefers-reduced-motion:reduce){.knowledge-category,#workspace .knowledge-category,.knowledge-website-category{transition:none}}
@media(max-width:1000px){.knowledge-overview-columns{grid-template-columns:1fr}.knowledge-overview-columns>section{padding:20px}.knowledge-website-categories{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){body.workspace-simple #librarySources>li{align-items:flex-start;flex-direction:column;gap:14px;padding:16px}body.workspace-simple #librarySources .table-actions{display:flex;flex-wrap:wrap;max-width:100%}.knowledge-search-panel{padding:20px}}
@media(max-width:600px){body.workspace-simple .knowledge-library-header{margin-bottom:18px;gap:12px}body.workspace-simple .knowledge-library-header h2{font-size:22px}body.workspace-simple #goUpload{padding:8px 12px;min-height:40px}.knowledge-stats{padding:0;margin-bottom:16px;gap:10px;border-radius:0}.knowledge-stat{padding:16px 12px;gap:10px;border-radius:12px}.knowledge-stat-symbol{display:none}.knowledge-stat strong{font-size:27px}.knowledge-stat-number{gap:5px}.knowledge-stat small{font-size:11px}.knowledge-overview-columns{gap:16px}.knowledge-overview-columns>section{padding:18px;border-radius:13px}.knowledge-panel-heading,.knowledge-feedback-heading{margin-bottom:16px}.knowledge-category-list{gap:8px}.knowledge-category,#workspace .knowledge-category{padding:10px;gap:8px;font-size:12px}.knowledge-category-symbol svg{width:16px;height:16px}.knowledge-website-categories{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.knowledge-website-category{padding:10px;gap:8px;font-size:12px}.knowledge-website-category dt{gap:8px}.knowledge-search-panel{padding:18px;border-radius:13px}.knowledge-content-title{margin-bottom:16px}.knowledge-overview{margin-bottom:16px}body.workspace-simple .knowledge-search-panel .library-toolbar{flex-wrap:wrap;gap:10px}body.workspace-simple .knowledge-search-panel .library-toolbar label:first-child{flex-basis:100%}body.workspace-simple #libraryCount{margin:0 0 12px}body.workspace-simple #librarySources>li.library-search-empty{padding:24px 14px}}

/* 内嵌资料库内容区域，并将上传操作按钮保持在右侧边缘。 */
body.workspace-simple .knowledge-library-card{box-sizing:border-box;padding:20px 22px 22px}
body.workspace-simple .knowledge-library-header #goUpload{margin-left:auto}
@media(max-width:600px){body.workspace-simple .knowledge-library-card{padding:16px 14px 18px}}
