.knowledge-modal.work-form .modal-content{display:flex;flex-direction:column;min-height:0;overflow:hidden;padding:0}
#kbRoot{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:22px;background:#f6f7f1}
#kbNotice{flex:none;margin:0;padding:10px 22px;font-size:13px;color:#526647;border-top:1px solid #e1e5d8;max-height:90px;overflow:auto;white-space:pre-wrap;background:#fff}
#kbNotice:empty{display:none}#kbNotice.error{color:#a13e32}
.kb-toolbar{display:flex;gap:12px}.kb-toolbar input{min-width:0;flex:1}.kb-toolbar button{flex:none;font-size:14px}
.kb-help,.kb-list-meta{font-size:13px;color:#6d7760}.kb-help{margin:12px 0 22px}.kb-list-meta{margin-bottom:10px}
.kb-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.kb-part{display:flex;flex-direction:column;align-items:flex-start;gap:12px;min-width:0;text-align:left;background:#fff;border:1px solid #dce1d3;border-radius:13px;padding:20px;color:#303c27;box-shadow:0 2px 0 #e7e9df}
.kb-part-number{font-size:22px;font-weight:800;overflow-wrap:anywhere;letter-spacing:-.5px}.kb-part strong{font-size:14px;line-height:1.5;font-weight:500;overflow-wrap:anywhere}.kb-part small{font-size:12px;color:#75806a}.kb-part-open{font-size:12px;color:#657329;margin-top:auto}
.kb-empty{grid-column:1/-1;padding:45px 20px;text-align:center;border:1px dashed #d0d8c4;border-radius:14px;background:#fafbf7;color:#6c765f}.kb-empty h3{color:#37442e;margin:0 0 12px!important}.kb-empty p{line-height:1.6}
.kb-pages{display:flex;justify-content:space-between;margin-top:16px;gap:10px}.kb-pages button[hidden]{display:none}
#kbCreate{padding:20px;margin:14px 0;border:1px solid #d2d9be;background:#fffef0;border-radius:12px}#kbCreate[hidden]{display:none}
#kbCreateForm{max-width:600px}#kbCreateForm label{display:block;margin:12px 0;font-size:13px}#kbCreateForm input{display:block;width:100%;margin-top:6px}#kbCreateForm p{font-size:12px;color:#727b61}#kbCreateForm>div{display:flex;gap:10px;justify-content:flex-end}
.kb-detail-head{display:flex;justify-content:space-between;gap:10px}.kb-detail-head button{font-size:13px;min-height:40px;background:#e9eddf;color:#455436}
.kb-part-header{padding:22px 0 18px}.kb-part-header h3{font-size:30px!important;letter-spacing:-1px;margin:8px 0!important;overflow-wrap:anywhere}.kb-part-header p{font-size:15px;margin:0 0 8px;overflow-wrap:anywhere}.kb-part-header small{color:#748165}
.kb-composer{margin-bottom:20px;background:#fff;border:1px solid #d8dfc9;border-radius:12px;overflow:hidden}.kb-composer>summary{padding:16px 18px;color:#45572b;background:#f3f3d9;cursor:pointer;font-size:15px;font-weight:650;list-style:none}.kb-composer>summary::after{content:'⌄';float:right}.kb-composer[open]>summary::after{content:'⌃'}
#kbForm{padding:18px}#kbForm>label{display:block;font-size:13px;font-weight:600;margin:0 0 6px}#kbCategory{margin-bottom:14px;width:100%;max-width:300px}#kbText{display:block;width:100%;font-size:16px;min-height:100px;max-height:300px;resize:vertical}
.kb-attach{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.kb-attach button{font-size:13px;min-height:42px;background:#eaf0e0;border:1px solid #d8e0cd;color:#40572e}#kbRecord{background:#fff6d2;border-color:#e7d786;color:#685420}.kb-limits{display:block;font-size:11px;line-height:1.6;color:#788268}
#kbSave{margin-top:14px;min-height:44px;font-size:14px;width:100%}.kb-queued{display:flex;align-items:center;gap:8px;flex-wrap:wrap;border:1px solid #dce2d3;border-radius:8px;padding:10px;margin-top:8px;min-width:0}.kb-queued>div{flex:1;min-width:0}.kb-queued b{display:block;font-size:12px;overflow-wrap:anywhere}.kb-queued small{display:block;font-size:11px;margin-top:5px;color:#73816b}.kb-queued button{min-width:36px;min-height:36px;font-size:12px}.kb-queued audio{width:100%;min-width:0;order:2;height:42px}
.kb-notes{display:flex;flex-direction:column;gap:15px}.kb-note{background:#fff;border:1px solid #dce2d5;border-radius:12px;padding:20px;min-width:0}.kb-note header{display:flex;gap:8px 16px;flex-wrap:wrap;align-items:center;margin-bottom:13px}.kb-note header b{font-size:12px;color:#59693c;background:#edf1e4;padding:5px 8px;border-radius:6px}.kb-note header span{font-size:12px;color:#79846d}.kb-note>p{margin:0;font-size:16px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}
.kb-media{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}.kb-photo{padding:0;min-width:0;background:#f0f2e9;border:1px solid #dbe1d2;overflow:hidden;border-radius:9px}.kb-photo img{display:block;width:100%;height:210px;object-fit:contain}.kb-video{min-width:0;border:1px solid #dbe1d2;border-radius:9px;overflow:hidden}.kb-video video{display:block;width:100%;max-height:400px;background:#151a12}.kb-file{display:flex;align-items:center;gap:12px;width:100%;min-width:0;text-align:left;background:#f1f4eb;color:#4e603a;padding:12px;border-radius:8px;font-size:13px;overflow-wrap:anywhere}.kb-file small{display:block;font-size:11px;font-weight:400;margin-top:5px}.kb-file>span{min-width:0}.kb-audio{grid-column:1/-1;min-width:0;background:#f6f7ef;padding:12px;border-radius:9px}.kb-audio>span{display:block;font-size:12px;color:#758169;margin-bottom:7px}.kb-audio audio{width:100%;min-width:0;height:45px}.kb-audio .kb-file{margin-top:6px;font-size:11px;background:none;padding:4px}
#kbOlder{width:100%;margin-top:16px;min-height:44px;font-size:13px}
.kb-file-overlay{position:absolute;inset:0;z-index:12;background:#f6f8f0;display:flex;flex-direction:column;align-items:flex-start;gap:18px;padding:24px;overflow:auto}.kb-file-overlay h3{overflow-wrap:anywhere;max-width:100%;font-size:20px!important}.kb-file-overlay p{font-size:14px;line-height:1.6}.knowledge-modal #dialogBody{position:relative}.knowledge-modal .chat-lightbox{z-index:13}
@media(max-width:760px){.kb-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.kb-part-number{font-size:20px}}
@media(max-width:600px){#kbRoot{padding:14px}.kb-toolbar{flex-wrap:wrap;gap:8px}.kb-toolbar input{flex-basis:100%;font-size:16px}.kb-toolbar button{width:100%;min-height:42px}.kb-help{font-size:12px;margin:12px 0 16px}.kb-cards{grid-template-columns:1fr;gap:10px}.kb-part{padding:16px;gap:8px}.kb-part-number{font-size:23px}.kb-part-open{align-self:flex-end}.kb-detail-head button{font-size:12px}.kb-part-header{padding:18px 0}.kb-part-header h3{font-size:27px!important}.kb-note{padding:14px}.kb-note>p{font-size:15px}.kb-note header span{font-size:11px}.kb-media{grid-template-columns:1fr}.kb-photo img{height:230px}#kbForm{padding:13px}.kb-attach{flex-direction:column}.kb-attach button{width:100%}#kbNotice{padding:10px 14px;font-size:12px}#kbCreate{padding:14px}.kb-file-overlay{padding:16px}.kb-empty{padding:30px 14px}}
