@fgbg/mdocs 1.3.24 → 1.3.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/agent-skills/changelog/SKILL.md +16 -0
- package/dist/web/assets/{AgentChatPanel-NcsMAhWM.js → AgentChatPanel-TJVgAwlH.js} +3 -3
- package/dist/web/assets/{AgentSkillFormCard-B99CncJO.js → AgentSkillFormCard-3ZpgH1RY.js} +2 -2
- package/dist/web/assets/{AiWriteWorkbench-DomEbwzU.js → AiWriteWorkbench-B9HrhEmd.js} +4 -4
- package/dist/web/assets/{DiagramEditor-NtNY3sZL-BhsjOCtK.js → DiagramEditor-NtNY3sZL-CyddeNUo.js} +1 -1
- package/dist/web/assets/DocChrome-C5syeHbQ.js +11 -0
- package/dist/web/assets/DocumentEditor-mG7hvAWj.js +1 -0
- package/dist/web/assets/{HtmlEditor-g2NNYmv2.js → HtmlEditor-DABDor1R.js} +1 -1
- package/dist/web/assets/{MergeView-GL7xdFM4.js → MergeView-BczHMfos.js} +1 -1
- package/dist/web/assets/{PlaygroundPage-Bb4X1bvp.js → PlaygroundPage-zg5tjWQs.js} +1 -1
- package/dist/web/assets/SettingsPage-BU0is_e7.js +1 -0
- package/dist/web/assets/SheetEditor-4nXVP3NN.js +16 -0
- package/dist/web/assets/{Toolbar-Bk3LKZfg.js → Toolbar-xB4u1mY1.js} +1 -1
- package/dist/web/assets/{VisitorPickerModal-zafJ6beK.js → VisitorPickerModal-Djpm5bTf.js} +1 -1
- package/dist/web/assets/{check-BMeXlsHC.js → check--tqH9AMO.js} +1 -1
- package/dist/web/assets/{copy-CCsiKd_j.js → copy-5mwMd6zK.js} +1 -1
- package/dist/web/assets/{docPlainCharCount-BjBZaoHy.js → docPlainCharCount-CTaZfi-M.js} +1 -1
- package/dist/web/assets/{index-3B7_9QOQ.js → index-CINfyH_g.js} +17 -17
- package/dist/web/assets/index-DCgILSIv.css +1 -0
- package/dist/web/assets/{italic-B6bGjo1_.js → italic-phhei7W3.js} +1 -1
- package/dist/web/assets/{meta2dEngine-BD2XbzaV-9HAADQ7Y.js → meta2dEngine-BD2XbzaV-BDjANcdr.js} +1 -1
- package/dist/web/assets/{plus-BD44y7Zf.js → plus-BxZJ-Mya.js} +1 -1
- package/dist/web/assets/{react-2y9P8xJn.js → react-8gAAnUbI.js} +5 -5
- package/dist/web/index.html +2 -2
- package/package.json +2 -2
- package/dist/web/assets/DocChrome-wfHrPEB7.js +0 -11
- package/dist/web/assets/DocumentEditor-CCuqHlmF.js +0 -1
- package/dist/web/assets/SettingsPage-B4INgMK-.js +0 -1
- package/dist/web/assets/SheetEditor-Cka57s62.js +0 -16
- package/dist/web/assets/index-BF754bDB.css +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,j as e}from"./react-vendor-BVS1XoFi.js";import{c as ie,$ as Es,a0 as Rs,V as Fs,l as de,a1 as zs,a2 as Ls,a3 as ee,a4 as Oe,a5 as Bs,a6 as Os,a7 as Us,a as Ks,d as Ze,a8 as ls,a9 as os,aa as $s,ab as Vs,ac as Ws,ad as _s,ae as Gs,af as rs,ag as ze,ah as qs,ai as Hs,aj as Js,X as Zs,ak as Ys,al as Qs,f as ds,am as Xs,an as et,ao as st,ap as tt,aq as at,ar as ms,as as nt,at as it,au as ct,av as lt,aw as ot,ax as rt,ay as dt,az as us,aA as mt,aB as ut,aC as ht,aD as pt,aE as gt,aF as ft,aG as xt,aH as yt,U as bt,aI as jt,aJ as Nt,aK as vt,aL as kt,r as St,j as wt,aM as Ct,k as Dt,m as It}from"./index-3B7_9QOQ.js";import{V as hs,a as Tt,M as Ye}from"./VisitorPickerModal-zafJ6beK.js";import{C as At}from"./check-BMeXlsHC.js";import{ai as Le,aj as Mt,ak as Pt,al as Et,am as Rt,an as Ft,ao as Qe,ap as zt,aq as Xe}from"./ui-CEFkTVnG.js";import"./diagram-BF8g9yg4.js";import"./motion-BAXVQJfN.js";function Lt({draft:a,onClose:s,onSuccess:g}){const{t:u,lang:y}=ie(),[z,x]=t.useState([]),[C,v]=t.useState(a.domainId??""),[p,S]=t.useState([]),[A,I]=t.useState(""),[c,N]=t.useState(`${a.displayName||"untitled"}_recovered.md`),[f,m]=t.useState(!1),[D,M]=t.useState(null),b=t.useRef(null),R=t.useRef(!0);t.useEffect(()=>(R.current=!0,()=>{R.current=!1}),[]),t.useEffect(()=>{Es().then(k=>{R.current&&x(k)})},[]),t.useEffect(()=>{C&&(S([]),I(""),Rs(C).then(k=>{R.current&&S(k)}).catch(()=>{R.current&&S([])}))},[C]),t.useEffect(()=>{const k=window.setTimeout(()=>{var P;return(P=b.current)==null?void 0:P.focus()},0);return()=>window.clearTimeout(k)},[]),t.useEffect(()=>{const k=P=>{P.key==="Escape"&&s()};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[s]);function O(k,P){for(const w of k){if(w.type==="folder"&&w.path===P)return w.documentId;if(w.type==="folder"){const F=O(w.children,P);if(F)return F}}return null}async function L(k){k.preventDefault(),m(!0),M(null);const P=c.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_\-.]/g,""),w=P.endsWith(".md")?P:P+".md",F=w.replace(/\.md$/i,"");try{const h=A?`${A}/${w}`:w,d=A?O(p,A)??void 0:void 0;await Ls({fileName:w,displayName:F,content:a.content,domainId:C,parentId:d}),g()}catch(h){M(ee(u,h))}finally{m(!1)}}return e.jsx("div",{className:"mdocs-dialog-backdrop",role:"presentation",onMouseDown:k=>{k.target===k.currentTarget&&!f&&s()},children:e.jsxs("div",{className:"mdocs-dialog card mdocs-recovery-dialog",role:"dialog","aria-modal":"true",children:[e.jsx("h1",{children:u("recoverDraft")}),e.jsx("p",{className:"muted",children:u("recoverDraftDesc",{name:a.displayName||u("unknownTitle")})}),e.jsxs("form",{onSubmit:L,className:"mdocs-dialog-form",children:[e.jsxs("label",{className:"mdocs-dialog-label",children:[u("domainLabel"),z.length>0&&e.jsx(Fs,{domains:z,value:C,onChange:v,onDomainsChange:x,ariaLabel:u("domainLabel"),localizeName:k=>de(k,y,u)})]}),e.jsxs("label",{className:"mdocs-dialog-label mdocs-recovery-tree-label",children:[u("recoverTargetFolder"),e.jsx("div",{className:"mdocs-recovery-tree",children:e.jsx(zs,{nodes:p,activeDocumentId:null,selectedParentPath:A,onOpen:()=>{},onOpenFolder:k=>I(k),onContextMenu:()=>{},onDeselect:()=>I("")})})]}),e.jsxs("label",{className:"mdocs-dialog-label",children:[u("fileNameLabel"),e.jsx("input",{ref:b,value:c,onChange:k=>N(k.target.value),placeholder:"recovered.md",maxLength:200,disabled:f})]}),D&&e.jsx("div",{className:"mdocs-dialog-error",children:D}),e.jsxs("div",{className:"mdocs-dialog-actions",children:[e.jsx("button",{type:"button",onClick:()=>!f&&s(),disabled:f,children:u("cancel")}),e.jsx("button",{type:"submit",className:"primary",disabled:f,children:u(f?"creating":"create")})]})]})]})})}function Bt({onPublish:a,onClose:s,onCountChange:g,onRecover:u}){const{t:y}=ie(),[z,x]=t.useState([]),[C,v]=t.useState(new Set),[p,S]=t.useState(!1),[A,I]=t.useState(null),[c,N]=t.useState(null),[f,m]=t.useState(null),D=t.useRef(null),M=t.useRef(!0);t.useEffect(()=>(M.current=!0,Oe().then(d=>{if(!M.current)return;const j=d.filter(T=>!T.published);x(j),g==null||g(j.length)}),()=>{M.current=!1,D.current&&(clearTimeout(D.current),D.current=null)}),[]),t.useEffect(()=>{const d=j=>{j.key==="Escape"&&s()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[s]);const b=t.useCallback((d,j)=>{m({message:d,type:j}),D.current&&clearTimeout(D.current),D.current=setTimeout(()=>m(null),3e3)},[]);async function R(d){await Os(d),v(j=>new Set(j).add(d));try{await a(d),x(j=>{const T=j.filter(K=>K.documentId!==d);return g==null||g(T.length),T}),b(y("published"),"success")}catch(j){j instanceof Us||b(y("publishFailed"),"error");const T=await Ks(d);T&&x(K=>K.map(G=>G.documentId===d?T:G))}finally{v(j=>{const T=new Set(j);return T.delete(d),T})}}async function O(d){I(null),await Ze(d),x(j=>{const T=j.filter(K=>K.documentId!==d);return g==null||g(T.length),T}),b(y("draftDeleted"),"success")}function L(d){const j=z.find(T=>T.documentId===d);j&&N(j)}function k(d){N(null),Ze(d),x(j=>{const T=j.filter(K=>K.documentId!==d);return g==null||g(T.length),T}),u==null||u(z.find(j=>j.documentId===d)),b(y("published"),"success")}async function P(){S(!0);let d=0,j=0;for(const G of z)try{await a(G.documentId),d++}catch{j++}const K=(await Oe()).filter(G=>!G.published);x(K),g==null||g(K.length),j===0?b(y("publishAll"),"success"):b(`${d} published, ${j} failed`,"error"),S(!1)}const w=d=>new Date(d).toLocaleString(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}),F=d=>Bs(y,d,d.publishError??"UNKNOWN"),h=z;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mdocs-drawer-overlay",onClick:s}),e.jsxs("div",{className:"mdocs-drawer",role:"dialog","aria-modal":"true",children:[e.jsxs("header",{className:"mdocs-drawer-header",children:[e.jsxs("div",{className:"mdocs-drawer-header-text",children:[e.jsxs("h2",{className:"mdocs-drawer-title",children:[y("unpublishedDrafts"),h.length>0&&e.jsx("span",{className:"mdocs-drawer-count-badge",children:h.length})]}),e.jsx("span",{className:"mdocs-drawer-subtitle",children:y("draftCount",{count:String(h.length)})})]}),e.jsx("button",{type:"button",className:"mdocs-drawer-close-btn",onClick:s,"aria-label":y("close"),children:"×"})]}),e.jsx("div",{className:"mdocs-drawer-body",children:h.length===0?e.jsxs("div",{className:"mdocs-drawer-empty",children:[e.jsx("div",{className:"mdocs-drawer-empty-icon","aria-hidden":"true",children:"✓"}),e.jsx("p",{className:"mdocs-drawer-empty-text",children:y("draftsEmptyState")})]}):e.jsx("div",{className:"mdocs-drawer-items",children:h.map(d=>{const j=!!d.publishError;return e.jsxs("div",{className:j?"mdocs-drawer-item mdocs-drawer-item-failed":"mdocs-drawer-item",children:[e.jsx("div",{className:"mdocs-drawer-item-icon","aria-hidden":"true",children:"📄"}),e.jsxs("div",{className:"mdocs-drawer-item-info",children:[e.jsx("span",{className:"mdocs-drawer-item-name",children:d.displayName||y("unknownTitle")}),j?e.jsxs("span",{className:"mdocs-drawer-item-error",children:[w(d.publishErrorAt)," · ",F(d)]}):e.jsxs("span",{className:"mdocs-drawer-item-meta",children:[w(d.updatedAt)," · ",y("localSnapshot")]})]}),e.jsxs("div",{className:"mdocs-drawer-item-actions",children:[j?e.jsx("button",{type:"button",className:"mdocs-btn-ghost mdocs-btn-ghost-primary",disabled:p,onClick:()=>L(d.documentId),children:y("recoverDraft")}):e.jsx("button",{type:"button",className:"mdocs-btn-ghost mdocs-btn-ghost-primary",disabled:C.has(d.documentId)||p,onClick:()=>void R(d.documentId),children:C.has(d.documentId)?y("publishing"):y("publish")}),e.jsx("button",{type:"button",className:"mdocs-btn-ghost mdocs-btn-ghost-danger",disabled:p,onClick:()=>I(d.documentId),children:y("delete")})]})]},d.documentId)})})}),e.jsxs("footer",{className:"mdocs-drawer-footer",children:[e.jsx("button",{type:"button",onClick:s,children:y("close")}),e.jsx("button",{type:"button",className:"primary",disabled:h.length===0||p,onClick:()=>void P(),children:p?y("publishing"):`${y("publishAll")} (${h.length})`})]}),f&&e.jsx("div",{className:"mdocs-drawer-toast mdocs-drawer-toast--"+f.type,role:"status",children:f.message})]}),A&&e.jsx("div",{className:"mdocs-dialog-backdrop",role:"presentation",onMouseDown:d=>{d.target===d.currentTarget&&I(null)},children:e.jsxs("div",{className:"mdocs-dialog card",role:"dialog","aria-modal":"true",children:[e.jsx("h1",{children:y("delete")}),e.jsx("p",{className:"muted",children:y("confirmDeleteDraft")}),e.jsxs("div",{className:"mdocs-dialog-actions",children:[e.jsx("button",{type:"button",onClick:()=>I(null),children:y("cancel")}),e.jsx("button",{type:"button",className:"danger",onClick:()=>void O(A),children:y("delete")})]})]})}),c&&e.jsx(Lt,{draft:c,onClose:()=>N(null),onSuccess:()=>k(c.documentId)})]})}function Ot(){const{t:a,lang:s}=ie(),g=ls(),u=t.useRef(!1),[y,z]=t.useState([]),[x,C]=t.useState(!1),[v,p]=t.useState(""),[S,A]=t.useState("restricted"),[I,c]=t.useState(!1),[N,f]=t.useState(null),[m,D]=t.useState(null),[M,b]=t.useState(""),[R,O]=t.useState(""),[L,k]=t.useState("all"),[P,w]=t.useState(null);t.useEffect(()=>(u.current=!0,()=>{u.current=!1}),[]);const F=t.useCallback(async()=>{C(!0),f(null);try{const i=await os();if(!u.current)return;z(i)}catch(i){if(!u.current)return;f(ee(a,i))}finally{u.current&&C(!1)}},[a]);t.useEffect(()=>{F()},[F]);async function h(i){if(i.preventDefault(),!v.trim()){f(a("domainNameRequired"));return}c(!0),f(null);try{if(await Gs({domainName:v.trim(),permission:S}),!u.current)return;p(""),A("restricted"),await F()}catch(r){if(!u.current)return;f(ee(a,r))}finally{u.current&&c(!1)}}async function d(i){if(M.trim()){f(null);try{if(await _s(i,M.trim()),!u.current)return;D(null),w(null),await F()}catch(r){if(!u.current)return;f(ee(a,r))}}}function j(i){D(i.domainId),b(i.domainName),w(null)}function T(){D(null),w(null)}async function K(i,r){f(null);try{if(await Ws(i,r),!u.current)return;w(null),await F()}catch(U){if(!u.current)return;f(ee(a,U))}}async function G(i){if(window.confirm(a("deleteDomainConfirmDetail",{name:i.domainName,count:String(i.docCount)}))){f(null);try{if(await Vs(i.domainId),!u.current)return;await F()}catch(r){if(!u.current)return;f(ee(a,r))}}}const J=t.useCallback(i=>$s(i,a),[a]),Z=t.useCallback(i=>de(i.domainName,s,a),[s,a]),Q=t.useMemo(()=>{const i=R.trim().toLowerCase();return y.filter(r=>L!=="all"&&r.permission!==L?!1:i?de(r.domainName,s,a).toLowerCase().includes(i)||r.domainName.toLowerCase().includes(i):!0)},[y,R,L,s,a]),q=t.useCallback((i,r)=>{const U=J(i.permission);return r?`${U} ${a("domainTypeBuiltinSuffix")}`:U},[J,a]);return{domains:y,loadingDomains:x,domainError:N,newDomainName:v,setNewDomainName:p,newDomainPermission:S,setNewDomainPermission:A,creating:I,handleCreateDomain:h,renamingId:m,setRenamingId:D,renameDraft:M,setRenameDraft:b,startRename:j,cancelRename:T,handleRename:d,changeTypeForId:P,setChangeTypeForId:w,handlePermissionChange:K,handleDelete:G,domainSearch:R,setDomainSearch:O,domainFilter:L,setDomainFilter:k,filteredDomains:Q,visitorId:g,plabel:J,localizeDomain:Z,domainTypeLabel:q}}const es={private:0,restricted:1,public:2};function ss(a){return Object.prototype.hasOwnProperty.call(es,a)?es[a]:null}function ts(a,s){const g=ss(a),u=ss(s);return g===null||u===null?"invalid":u>g?"upgrade":u<g?"downgrade":"same"}function Ut(){const{t:a}=ie(),s=Ot(),[g,u]=t.useState([]),[y,z]=t.useState(null),[x,C]=t.useState(""),v=t.useRef(null),[p,S]=t.useState(null),A=t.useCallback(async()=>{try{const c=await rs();u(c)}catch{u([])}},[]);t.useEffect(()=>{A()},[A]),t.useEffect(()=>{if(!s.changeTypeForId)return;const c=N=>{var f;(f=v.current)!=null&&f.contains(N.target)||s.setChangeTypeForId(null)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[s.changeTypeForId,s.setChangeTypeForId]);async function I(c){z(null);try{const N=await Qs(c.domainId);S({domainId:c.domainId,creatorVisitorId:c.creatorVisitorId,initialIds:N.map(f=>f.visitorId),memberRows:N})}catch(N){z({kind:"err",text:translateError(a,N)})}}return e.jsxs("div",{className:"mdocs-settings",children:[e.jsx("div",{className:"mdocs-settings-header",children:e.jsx("h2",{className:"mdocs-settings-title",children:a("domainManagement")})}),e.jsx("p",{className:"mdocs-domain-mgmt-restricted-hint",children:a("domainMgmtRestrictedMemberHint")}),e.jsxs("div",{className:"mdocs-settings-cards",children:[e.jsxs("div",{className:"mdocs-settings-card mdocs-domain-mgmt-create",children:[e.jsx("div",{className:"mdocs-settings-card-title",children:a("createDomain")}),e.jsxs("form",{onSubmit:s.handleCreateDomain,className:"mdocs-domain-mgmt-create-form",children:[e.jsxs("label",{className:"mdocs-domain-mgmt-field",children:[e.jsx("span",{className:"mdocs-domain-mgmt-label",children:a("domainName")}),e.jsx("input",{value:s.newDomainName,onChange:c=>s.setNewDomainName(c.target.value),placeholder:a("domainName"),maxLength:100,disabled:s.creating,className:"mdocs-domain-name-input"})]}),e.jsxs("fieldset",{className:"mdocs-domain-mgmt-fieldset",children:[e.jsx("legend",{className:"mdocs-domain-mgmt-label",children:a("domainPermission")}),e.jsx("div",{className:"mdocs-domain-mgmt-type-radios",children:ze.map(c=>e.jsxs("label",{className:"mdocs-domain-mgmt-radio",children:[e.jsx("input",{type:"radio",name:"newDomainPermission",checked:s.newDomainPermission===c,onChange:()=>s.setNewDomainPermission(c),disabled:s.creating}),e.jsx("span",{children:s.plabel(c)})]},c))})]}),e.jsx("button",{type:"submit",className:"primary mdocs-domain-mgmt-submit",disabled:s.creating,children:s.creating?a("creating"):a("create")})]})]}),y&&e.jsx("div",{className:"mdocs-settings-card",style:{color:y.kind==="ok"?"var(--mdocs-success, #0a7)":"var(--mdocs-danger)"},children:e.jsx("span",{className:"mdocs-settings-item-desc",children:y.text})}),s.domainError&&e.jsx("div",{className:"mdocs-settings-card mdocs-domain-error",children:e.jsx("span",{className:"mdocs-settings-item-desc",style:{color:"var(--mdocs-danger)"},children:s.domainError})}),e.jsxs("div",{className:"mdocs-settings-card mdocs-domain-mgmt-toolbar",children:[e.jsx("input",{type:"search",value:s.domainSearch,onChange:c=>s.setDomainSearch(c.target.value),placeholder:a("domainSearchPlaceholder"),className:"mdocs-domain-mgmt-search","aria-label":a("domainSearchPlaceholder")}),e.jsx("div",{className:"mdocs-domain-mgmt-filters",role:"group","aria-label":a("domainPermission"),children:["all",...ze].map(c=>e.jsx("button",{type:"button",className:"mdocs-domain-mgmt-filter"+(s.domainFilter===c?" active":""),"aria-pressed":s.domainFilter===c,onClick:()=>s.setDomainFilter(c),children:c==="all"?a("domainFilterAll"):s.plabel(c)},c))})]}),s.loadingDomains?e.jsx("div",{className:"mdocs-settings-card",children:e.jsx("span",{className:"mdocs-settings-item-desc",children:a("loading")})}):s.domains.length===0?e.jsx("div",{className:"mdocs-settings-card mdocs-settings-draft-empty",children:e.jsx("span",{className:"mdocs-settings-item-desc",children:a("noDomains")})}):s.filteredDomains.length===0?e.jsx("div",{className:"mdocs-settings-card mdocs-settings-draft-empty",children:e.jsx("span",{className:"mdocs-settings-item-desc",children:a("domainNoMatch")})}):e.jsx("div",{className:"mdocs-settings-card mdocs-domain-table-wrap",children:e.jsxs("table",{className:"mdocs-domain-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",children:a("domainColName")}),e.jsx("th",{scope:"col",children:a("domainColType")}),e.jsx("th",{scope:"col",className:"mdocs-domain-table-num",children:a("domainColDocCount")}),e.jsx("th",{scope:"col",children:a("domainColActions")})]})}),e.jsx("tbody",{children:s.filteredDomains.map(c=>{const N=qs(c,s.visitorId),f=Hs(c.domainId),m=Js(c),D=ts(c.permission,"public")==="upgrade",M=D?m?a("domainTooltipTypeLocked"):void 0:a("domainPermissionAlreadyTop");return e.jsxs("tr",{className:f?"mdocs-domain-table-row-builtin":void 0,children:[e.jsx("td",{children:s.renamingId===c.domainId?e.jsxs("div",{className:"mdocs-domain-table-rename",children:[e.jsx("input",{value:s.renameDraft,onChange:b=>s.setRenameDraft(b.target.value),maxLength:100,autoFocus:!0,className:"mdocs-domain-name-input"}),e.jsx("button",{type:"button",className:"primary",onClick:()=>void s.handleRename(c.domainId),children:a("save")}),e.jsx("button",{type:"button",onClick:s.cancelRename,children:a("cancel")})]}):e.jsxs("div",{className:"mdocs-domain-table-name-cell",children:[e.jsx("span",{className:"mdocs-domain-table-name",children:s.localizeDomain(c)}),f&&e.jsx("span",{className:"mdocs-domain-badge-builtin",children:a("domainBuiltIn")}),!N&&!f&&e.jsx("span",{className:"mdocs-domain-badge-shared",children:a("shared")})]})}),e.jsx("td",{children:e.jsx("span",{className:"mdocs-domain-table-type",title:M,children:e.jsx("span",{className:"mdocs-domain-permission-badge","data-permission":c.permission,children:s.domainTypeLabel(c,f)})})}),e.jsx("td",{className:"mdocs-domain-table-num",children:c.docCount}),e.jsxs("td",{className:"mdocs-domain-table-actions",children:[f&&e.jsx("span",{className:"mdocs-domain-not-modifiable",children:a("domainNotModifiable")}),!f&&!N&&e.jsx("span",{className:"mdocs-domain-not-creator-inline",children:a("domainNotCreator")}),!f&&N&&s.changeTypeForId===c.domainId&&e.jsxs("div",{className:"mdocs-domain-change-type-panel",ref:v,children:[e.jsx("div",{className:"mdocs-domain-type-segment",role:"radiogroup","aria-label":a("domainChangeType"),children:ze.map(b=>{const O=ts(c.permission,b)==="downgrade";return e.jsx("span",{title:O?a("domainPermissionNoDowngrade"):void 0,children:e.jsx("button",{type:"button",role:"radio","aria-checked":x===b,className:x===b?"active":"",disabled:O,onClick:()=>C(b),children:s.plabel(b)})},b)})}),e.jsx("button",{type:"button",className:"mdocs-domain-type-icon confirm","aria-label":a("save"),disabled:x===""||x===c.permission,onClick:()=>{x&&x!==c.permission&&s.handlePermissionChange(c.domainId,x)},children:e.jsx(At,{size:14,strokeWidth:2.5})}),e.jsx("button",{type:"button",className:"mdocs-domain-type-icon cancel","aria-label":a("cancel"),onClick:()=>s.setChangeTypeForId(null),children:e.jsx(Zs,{size:14,strokeWidth:2.5})})]}),!f&&N&&s.renamingId!==c.domainId&&s.changeTypeForId!==c.domainId&&e.jsxs("div",{className:"mdocs-domain-action-buttons",children:[c.permission==="restricted"&&e.jsx("button",{type:"button",className:"mdocs-domain-action mdocs-domain-action--primary",onClick:()=>void I(c),children:a("domainMembersManageButton")}),e.jsx("button",{type:"button",className:"mdocs-domain-action",title:m?a("domainLocked"):void 0,onClick:()=>{s.setChangeTypeForId(null),s.startRename(c)},disabled:m,children:a("rename")}),e.jsx("button",{type:"button",className:"mdocs-domain-action",title:M,onClick:()=>{s.setRenamingId(null),C(c.permission),s.setChangeTypeForId(c.domainId)},disabled:!D,children:a("domainChangeType")}),e.jsx("button",{type:"button",className:"mdocs-domain-action mdocs-domain-action--danger",title:m?a("domainLocked"):void 0,onClick:()=>void s.handleDelete(c),disabled:m,children:a("deleteDomain")})]})]})]},c.domainId)})})]})})]}),e.jsx(hs,{open:p!==null,title:a("domainMembersPickerTitle"),initialSelectedIds:(p==null?void 0:p.initialIds)??[],lockedIds:p?[p.creatorVisitorId]:[],seedMembers:p==null?void 0:p.memberRows,templates:g,onClose:()=>S(null),onConfirm:async c=>{p&&(await Ys(p.domainId,c),z({kind:"ok",text:a("domainMembersSaved",{count:String(c.length)})}))}})]})}function as(a){return a.length<=6?a:`${a.slice(0,6)}…`}function Kt(){const{t:a}=ie(),s=t.useRef(!0),[g,u]=t.useState([]),[y,z]=t.useState(!0),[x,C]=t.useState(null),[v,p]=t.useState(1),[S,A]=t.useState(null),[I,c]=t.useState(""),[N,f]=t.useState([]),[m,D]=t.useState(!1),[M,b]=t.useState(null),[R,O]=t.useState(!1),L=ls(),[k,P]=t.useState([]),[w,F]=t.useState("idle"),[h,d]=t.useState("");t.useEffect(()=>(s.current=!0,()=>{s.current=!1}),[]),t.useEffect(()=>{F("loading"),ds().then(o=>{s.current&&(P(o),F("ok"))}).catch(()=>{s.current&&F("err")})},[]);const j=t.useMemo(()=>{const o=new Map;for(const E of k)o.set(E.visitorId,E.visitorName);return o},[k]),T=t.useCallback(async()=>{z(!0),b(null);try{const o=await rs();s.current&&u(o)}catch(o){s.current&&b(ee(a,o))}finally{s.current&&z(!1)}},[a]);t.useEffect(()=>{T()},[T]);const K=t.useMemo(()=>N.map(o=>{const E=k.find(W=>W.visitorId===o);return{visitorId:o,name:E?E.visitorName:a("visitorPickerUnknownVisitor"),muted:!E}}),[N,k,a]);function G(o){f(E=>E.includes(o)?E.filter(W=>W!==o):[...E,o])}const J=v===1?I.trim().length>0:v===2?N.length>0:!0;function Z(){if(!(v>=3)){if(!J){O(!0);return}O(!1),p(v+1),d("")}}function Q(){v<=1||(O(!1),p(v-1))}function q(){C(null),A(null),c(""),f(L?[L]:[]),b(null),p(1),d(""),O(!1)}function i(o){C(null),A(o.id),c(o.displayName);const E=L&&!o.visitorIds.includes(L)?[...o.visitorIds,L]:[...o.visitorIds];f(E),b(null),p(1),d(""),O(!1)}async function r(){if(!(!I.trim()||N.length===0)){D(!0),b(null);try{if(S===null?await Xs({displayName:I.trim(),visitorIds:N}):await et(S,{displayName:I.trim(),visitorIds:N}),!s.current)return;q(),await T()}catch(o){if(!s.current)return;b(ee(a,o))}finally{s.current&&D(!1)}}}async function U(o){D(!0),b(null);try{if(await st(o),!s.current)return;C(null),S===o&&q(),await T()}catch(E){if(!s.current)return;b(ee(a,E))}finally{s.current&&D(!1)}}const V=[{key:1,label:a("memberTemplateStepName")},{key:2,label:a("memberTemplateStepMembers")},{key:3,label:a("memberTemplateStepSave")}],$=`${(v-1)/2*100}%`;return e.jsxs("div",{className:"mdocs-settings",children:[e.jsxs("div",{className:"mdocs-settings-header",children:[e.jsx("h2",{className:"mdocs-settings-title",children:a(S!==null?"memberTemplateUpdate":"memberTemplateFormNew")}),S!==null&&e.jsx("button",{type:"button",className:"secondary",onClick:q,style:{fontSize:12},children:a("memberTemplateCancelEdit")})]}),e.jsxs("div",{className:"mdocs-wizard-progress",children:[e.jsx("div",{className:"mdocs-wizard-progress-track",children:e.jsx("div",{className:"mdocs-wizard-progress-fill",style:{width:$}})}),e.jsx("div",{className:"mdocs-wizard-progress-steps",children:V.map(o=>{const E=v===o.key,W=v>o.key;return e.jsxs("div",{className:"mdocs-wizard-step-indicator",children:[e.jsx("div",{className:`mdocs-wizard-step-circle${E?" current":""}${W?" done":""}`,children:W?"✓":o.key}),e.jsx("span",{className:`mdocs-wizard-step-label${E?" current":""}${W?" done":""}`,children:o.label})]},o.key)})})]}),M&&e.jsx("div",{className:"mdocs-settings-item-desc",style:{color:"var(--mdocs-danger)",marginBottom:12,marginTop:12},children:M}),e.jsxs("div",{className:"mdocs-settings-cards",children:[e.jsxs("div",{className:"mdocs-settings-card mdocs-wizard-card",children:[v===1&&e.jsxs("div",{className:"mdocs-wizard-step-content",children:[e.jsx("input",{className:"mdocs-wizard-name-input",value:I,onChange:o=>c(o.target.value),placeholder:a("memberTemplateNamePlaceholder"),maxLength:200,disabled:m,autoFocus:!0,"aria-invalid":R&&!I.trim()}),R&&!I.trim()&&e.jsx("p",{className:"mdocs-wizard-hint",style:{color:"var(--mdocs-danger)"},children:a("domainNameRequired")})]}),v===2&&e.jsxs("div",{className:"mdocs-wizard-step-content",children:[e.jsx(Tt,{visitors:k,loadState:w,searchFilter:h,onSearchChange:d,selectedIds:new Set(N),onToggle:G,selectedRows:K,myVisitorId:L}),e.jsx("p",{className:`mdocs-wizard-hint${R&&N.length===0?" danger":""}`,children:"💡 "+a("memberTemplateStep2Hint")})]}),v===3&&e.jsx("div",{className:"mdocs-wizard-step-content",children:e.jsxs("div",{className:"mdocs-wizard-preview-card",children:[e.jsxs("div",{className:"mdocs-wizard-preview-row",children:[e.jsx("span",{className:"mdocs-wizard-preview-label",children:a("memberTemplateNameLabel")}),e.jsx("span",{className:"mdocs-wizard-preview-value",children:I})]}),e.jsxs("div",{className:"mdocs-wizard-preview-row",children:[e.jsx("span",{className:"mdocs-wizard-preview-label",children:a("memberTemplateIdsLabel")}),e.jsx("span",{className:"mdocs-wizard-preview-value",children:a("memberTemplateSelectedSummary",{count:String(N.length)})})]}),N.length>0&&e.jsxs("div",{className:"mdocs-wizard-preview-tags",children:[N.slice(0,15).map(o=>e.jsx("span",{className:"mdocs-wizard-preview-tag",children:as(o)},o)),N.length>15&&e.jsxs("span",{className:"mdocs-wizard-preview-tag mdocs-wizard-preview-tag-more",children:["+",N.length-15]})]})]})}),e.jsxs("div",{className:"mdocs-wizard-footer",children:[e.jsxs("button",{type:"button",className:"secondary",onClick:Q,children:["← ",a("memberTemplateWizardBack")]}),v<3?e.jsxs("button",{type:"button",className:"primary",onClick:Z,children:[a("memberTemplateWizardNext")," →"]}):e.jsx("button",{type:"button",className:"primary",onClick:()=>void r(),children:a(m?"saving":S===null?"memberTemplateCreate":"memberTemplateUpdate")})]})]}),e.jsxs("div",{className:"mdocs-settings-card",children:[e.jsx("div",{className:"mdocs-settings-card-title",children:a("memberTemplateSavedList")}),y?e.jsx("span",{className:"mdocs-settings-item-desc",children:a("loading")}):g.length===0?e.jsxs("div",{className:"mdocs-member-template-empty",children:[e.jsx("span",{className:"mdocs-settings-item-desc",children:a("memberTemplateEmpty")}),S===null&&e.jsx("button",{type:"button",className:"primary",onClick:q,children:a("memberTemplateEmptyAction")})]}):e.jsx("ul",{className:"mdocs-member-template-list",children:g.map(o=>e.jsx("li",{className:"mdocs-member-template-row",children:x===o.id?e.jsxs("div",{className:"mdocs-member-template-confirm-row",children:[e.jsx("span",{className:"mdocs-member-template-confirm-text",children:a("memberTemplateConfirmDeleteDesc",{name:o.displayName})}),e.jsxs("div",{className:"mdocs-member-template-confirm-actions",children:[e.jsx("button",{type:"button",className:"secondary",style:{color:"var(--mdocs-danger)"},onClick:()=>void U(o.id),children:a(m?"saving":"memberTemplateConfirmDeleteSubmit")}),e.jsx("button",{type:"button",className:"secondary",onClick:()=>C(null),children:a("memberTemplateConfirmDeleteCancel")})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mdocs-member-template-row-head",children:[e.jsx("strong",{children:o.displayName}),e.jsx("span",{className:"mdocs-settings-item-desc",children:a("memberTemplateCount",{count:String(o.visitorIds.length)})}),o.visitorIds.length>0&&e.jsx("div",{className:"mdocs-member-template-tags mdocs-member-template-tags-scroll",children:o.visitorIds.map(E=>e.jsx("span",{className:"mdocs-member-template-tag",children:j.get(E)??as(E)},E))})]}),e.jsxs("div",{className:"mdocs-member-template-row-actions",children:[e.jsx("button",{type:"button",className:"secondary",onClick:()=>i(o),children:a("edit")}),e.jsx("button",{type:"button",className:"secondary",onClick:()=>C(o.id),children:a("memberTemplateDelete")})]})]})},o.id))})]})]})]})}const $t=[{value:"deepseek-flash",label:"deepseek-flash(V4.1 Flash)"},{value:"deepseek-v4-pro",label:"deepseek-v4-pro(将路由至 Flash)"}],Vt=[{value:"openai-completions",label:"OpenAI 兼容"},{value:"anthropic-messages",label:"Anthropic 兼容"}];function Wt(a,s,g){return a==="deepseek"?"Deepseek":s||g}function ns(a){return`${Wt(a.kind,a.providerId,a.name)} · ${a.modelId} · ${a.name}`}function _t(){const{t:a}=ie(),s=t.useRef(!0),[g,u]=t.useState(""),[y,z]=t.useState([]),[x,C]=t.useState(null),[v,p]=t.useState(null),[S,A]=t.useState("deepseek"),[I,c]=t.useState(""),[N,f]=t.useState(""),[m,D]=t.useState(""),[M,b]=t.useState("openai-completions"),[R,O]=t.useState("deepseek-flash"),[L,k]=t.useState(1e6),[P,w]=t.useState(""),[F,h]=t.useState(!1),[d,j]=t.useState(null),[T,K]=t.useState(!1),[G,J]=t.useState(!0),[Z,Q]=t.useState(!1),[q,i]=t.useState(null),[r,U]=t.useState(!1),[V,$]=t.useState(!1),[o,E]=t.useState(!1),[W,se]=t.useState(null),[ce,ae]=t.useState(null),te=t.useRef(!1);t.useEffect(()=>(s.current=!0,()=>{s.current=!1}),[]);const ne=t.useCallback(async()=>{const l=await tt();if(s.current)return z(l),l},[]);function le(){p(null),A("deepseek"),c(""),f(""),D(""),b("openai-completions"),O("deepseek-flash"),k(1e6),w(""),h(!1),j(null),K(!1),$(!1),E(!1),i(null),U(!1)}function xe(l){p(l.id),A(l.kind),c(l.name),f(l.providerId??""),D(l.baseUrl),b(l.apiType);const _=l.modelId.trim(),je=new Set(["deepseek-flash","deepseek-v4-flash","deepseek-v4-flash-vision-exp","deepseek-v4.1-flash","deepseek-v4.1-flash-expires-on-0910"]);O(l.kind==="deepseek"?_==="deepseek-v4-pro"?"deepseek-v4-pro":je.has(_)?"deepseek-flash":_||"deepseek-flash":_),k(l.contextWindow||1e6),h(l.hasApiKey),j(l.apiKeyMasked),w(""),K(l.isDefault)}t.useEffect(()=>{(async()=>{try{const l=await at();if(!s.current)return;u(l.visitorName);const _=await ne();if(!s.current||!_)return;_.length===0&&(le(),C("create"))}catch(l){if(!s.current)return;i(l instanceof Error?l.message:String(l)),C("create")}finally{s.current&&J(!1)}})()},[ne]);function we(){le(),C("create")}function ye(l){xe(l),C("edit"),U(!1),i(null)}function oe(){le(),C(null)}async function Ce(l){if(!(l.isDefault||ce)){ae(l.id),i(null);try{await nt(l.id),await ne()}catch(_){if(!s.current)return;i(_ instanceof Error?_.message:String(_))}finally{s.current&&ae(null)}}}async function be(){if(W){Q(!0),i(null);try{await ct(W.id);const l=await ne();if(!s.current)return;x==="edit"&&v===W.id&&oe(),((l==null?void 0:l.length)??0)===0&&(le(),C("create"))}catch(l){if(!s.current)return;i(l instanceof Error?l.message:String(l))}finally{s.current&&(Q(!1),se(null))}}}async function De(){Q(!0),i(null),U(!1);try{const l=S==="custom"?{...x==="edit"&&v?{id:v}:{},...x==="create"&&T?{isDefault:!0}:{},kind:S,baseUrl:m,modelId:R,providerId:N.trim()||void 0,apiType:M,name:I,contextWindow:L,...P.trim()?{apiKey:P.trim()}:{}}:{...x==="edit"&&v?{id:v}:{},...x==="create"&&T?{isDefault:!0}:{},kind:S,modelId:R,name:I,contextWindow:L,...P.trim()?{apiKey:P.trim()}:{}};if(await it(l),!s.current)return;await ne(),U(!0),C(null),le()}catch(l){if(!s.current)return;i(l instanceof Error?l.message:String(l))}finally{s.current&&Q(!1)}}const Ie=x!==null;return e.jsxs("div",{className:"mdocs-agent-config-panel",children:[e.jsxs("div",{className:"mdocs-settings-header",children:[e.jsx("h2",{className:"mdocs-settings-title",children:a("agentConfig")}),G?null:e.jsx("button",{type:"button",className:"secondary",onClick:we,children:"添加配置"})]}),e.jsxs("div",{className:"mdocs-settings-cards",children:[!G&&y.length>0?e.jsxs("div",{className:"mdocs-settings-card mdocs-agent-config-card",children:[e.jsx("p",{className:"mdocs-agent-config-lead",children:"选择默认配置后,智能助手与帮写将使用该模型。"}),e.jsx("ul",{className:"mdocs-agent-config-list",children:y.map(l=>e.jsxs("li",{className:"mdocs-agent-config-item",children:[e.jsxs("label",{className:"mdocs-agent-config-item-default",children:[e.jsx("input",{type:"radio",name:"agent-default-config",checked:l.isDefault,disabled:ce!==null,onChange:()=>void Ce(l)}),e.jsx("span",{children:l.isDefault?"默认":"设为默认"})]}),e.jsxs("div",{className:"mdocs-agent-config-item-main",children:[e.jsx("strong",{children:ns(l)}),l.kind==="custom"?e.jsx("span",{className:"mdocs-agent-badge",children:"自定义"}):null,e.jsx("p",{className:"mdocs-agent-config-item-meta",children:l.hasApiKey?`Key ${l.apiKeyMasked??"已配置"}`:"未配置 Key"})]}),e.jsxs("div",{className:"mdocs-agent-config-item-actions",children:[e.jsx("button",{type:"button",className:"secondary small",onClick:()=>ye(l),children:a("edit")}),e.jsx("button",{type:"button",className:"secondary small",onClick:()=>se(l),children:"删除"})]})]},l.id))}),r?e.jsx("p",{className:"mdocs-agent-config-ok",children:a("saved")}):null,q?e.jsx("p",{className:"mdocs-agent-config-error",children:q}):null]}):null,Ie?e.jsxs("div",{className:"mdocs-settings-card mdocs-agent-config-card",children:[e.jsxs("p",{className:"mdocs-agent-config-lead",children:[x==="create"?"新建模型配置。":"编辑模型配置。","可以保存多套,勾选一条作为默认。智能助手和帮写使用默认那套。"]}),e.jsxs("div",{className:"mdocs-agent-form",children:[e.jsxs("div",{className:"mdocs-agent-kind-tabs",role:"tablist","aria-label":"配置方式",children:[e.jsx("button",{type:"button",role:"tab","aria-selected":S==="deepseek",className:S==="deepseek"?"active":"",onClick:()=>A("deepseek"),children:"Deepseek"}),e.jsx("button",{type:"button",role:"tab","aria-selected":S==="custom",className:S==="custom"?"active":"",onClick:()=>A("custom"),children:"自定义"})]}),S==="deepseek"?e.jsxs(e.Fragment,{children:[e.jsxs("label",{className:"mdocs-agent-field",children:[e.jsx("span",{children:a("agentConfigModel")}),e.jsx(Ye,{options:[...$t],value:R,onChange:O})]}),e.jsxs("label",{className:"mdocs-agent-field",children:[e.jsx("span",{children:a("agentConfigApiKey")}),e.jsxs("div",{className:"mdocs-agent-config-apikey",children:[e.jsx("input",{type:V?"text":"password",value:P,onChange:l=>w(l.target.value),placeholder:F?a("agentConfigApiKeyConfigured").replace("{{masked}}",d??"…"):a("agentConfigApiKeyPlaceholder"),autoComplete:"off"}),e.jsx("button",{type:"button",className:"mdocs-agent-config-eye","aria-label":a(V?"agentConfigHideKey":"agentConfigShowKey"),onClick:()=>$(l=>!l),children:V?"隐藏":"显示"})]})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("label",{className:"mdocs-agent-field",children:[e.jsx("span",{children:"API 地址"}),e.jsx("input",{type:"url",value:m,onChange:l=>{const _=l.target.value;if(D(_),te.current)return;_.toLowerCase().includes("anthropic")?b("anthropic-messages"):b("openai-completions")},placeholder:"https://api.example.com/v1",className:"mdocs-agent-mono"})]}),e.jsxs("label",{className:"mdocs-agent-field",children:[e.jsx("span",{children:"Model ID"}),e.jsx("input",{type:"text",value:R,onChange:l=>O(l.target.value),placeholder:"模型名称,如 gpt-4o",className:"mdocs-agent-mono"})]}),e.jsxs("label",{className:"mdocs-agent-field",children:[e.jsx("span",{children:a("agentConfigApiKey")}),e.jsxs("div",{className:"mdocs-agent-config-apikey",children:[e.jsx("input",{type:V?"text":"password",value:P,onChange:l=>w(l.target.value),placeholder:F?a("agentConfigApiKeyConfigured").replace("{{masked}}",d??"…"):"粘贴 API Key",autoComplete:"off"}),e.jsx("button",{type:"button",className:"mdocs-agent-config-eye","aria-label":a(V?"agentConfigHideKey":"agentConfigShowKey"),onClick:()=>$(l=>!l),children:V?"隐藏":"显示"})]})]})]}),e.jsxs("details",{className:"mdocs-agent-advanced",open:o,onToggle:l=>E(l.target.open),children:[e.jsx("summary",{children:"高级选项"}),S==="custom"?e.jsxs(e.Fragment,{children:[e.jsxs("label",{className:"mdocs-agent-field",children:[e.jsx("span",{children:"Provider ID(选填)"}),e.jsx("input",{type:"text",value:N,onChange:l=>f(l.target.value),placeholder:"不填则自动从 API 地址提取域名"})]}),e.jsxs("label",{className:"mdocs-agent-field",children:[e.jsx("span",{children:"API 协议"}),e.jsx(Ye,{options:[...Vt],value:M,onChange:l=>{te.current=!0,b(l)}})]})]}):null,e.jsxs("label",{className:"mdocs-agent-field",children:[e.jsx("span",{children:a("agentConfigName")}),e.jsx("input",{type:"text",value:I,onChange:l=>c(l.target.value),placeholder:a("agentConfigNameDefault").replace("{{name}}",g||"…")})]}),e.jsxs("label",{className:"mdocs-agent-field",children:[e.jsx("span",{children:a("agentConfigContextWindow")}),e.jsx("input",{type:"number",min:1e3,max:2e6,step:1e3,value:L,onChange:l=>k(Number(l.target.value)||1e6)}),e.jsx("p",{className:"mdocs-agent-field-hint",children:a("agentConfigContextWindowDesc")})]})]}),x==="create"&&y.length>0?e.jsxs("label",{className:"mdocs-agent-config-default-check",children:[e.jsx("input",{type:"checkbox",checked:T,onChange:l=>K(l.target.checked)}),e.jsx("span",{children:"保存后设为默认配置"})]}):null,q?e.jsx("p",{className:"mdocs-agent-config-error",children:q}):null,e.jsxs("div",{className:"mdocs-agent-config-actions",children:[e.jsx("button",{type:"button",onClick:()=>void De(),disabled:Z,children:a(Z?"saving":"save")}),y.length>0?e.jsx("button",{type:"button",className:"secondary",onClick:oe,disabled:Z,children:a("cancel")}):null]})]})]}):G?e.jsx("div",{className:"mdocs-settings-card mdocs-agent-config-card",children:e.jsx("p",{className:"mdocs-agent-config-muted",children:a("loading")})}):null]}),W?e.jsx(ms,{title:"删除配置",message:`确定删除「${ns(W)}」?${W.isDefault&&y.length>1?" 删除后将自动把另一条设为默认。":""}`,confirmLabel:"删除",cancelLabel:a("cancel"),onConfirm:()=>void be(),onCancel:()=>se(null)}):null]})}const Gt=/^[A-Za-z0-9_]+$/;function Be(a){return Gt.test(a.trim())}function qt(){const a=t.useRef(!0),[s,g]=t.useState([]),[u,y]=t.useState(!0),[z,x]=t.useState(null),[C,v]=t.useState(null),[p,S]=t.useState(!1),[A,I]=t.useState(""),[c,N]=t.useState(""),[f,m]=t.useState(""),[D,M]=t.useState(!1);t.useEffect(()=>(a.current=!0,()=>{a.current=!1}),[]);async function b(){y(!0),x(null);try{const h=await lt();if(!a.current)return;g(h)}catch(h){if(!a.current)return;x(h instanceof Error?h.message:String(h))}finally{a.current&&y(!1)}}t.useEffect(()=>{b()},[]);function R(){S(!0),v(null),I(""),N(""),m(""),x(null)}function O(h){S(!1),v(h.id),I(h.name),N(h.description),m(h.body),x(null)}function L(){S(!1),v(null),I(""),N(""),m("")}async function k(){const h=A.trim();if(!Be(h)){x("名称仅允许英文、数字、下划线");return}if(!f.trim()){x("正文不能为空");return}M(!0),x(null);try{if(p?await ot({name:h,description:c,body:f}):C&&await rt(C,{name:h,description:c,body:f}),!a.current)return;L(),await b()}catch(d){if(!a.current)return;x(d instanceof Error?d.message:String(d))}finally{a.current&&M(!1)}}async function P(h){if(window.confirm("删除该 Skill?已引用的历史轮次将跳过缺失项。")){x(null);try{if(await dt(h),!a.current)return;C===h&&L(),await b()}catch(d){if(!a.current)return;x(d instanceof Error?d.message:String(d))}}}const w=p||C!==null,F=!A.trim()||Be(A);return e.jsxs("div",{className:"mdocs-agent-skills-panel",children:[e.jsxs("div",{className:"mdocs-settings-header",children:[e.jsxs("h2",{className:"mdocs-settings-title",children:["Agent Skills",!u&&s.length>0?e.jsx("span",{className:"mdocs-agent-skills-count",children:s.length}):null]}),w?null:e.jsx("button",{type:"button",className:"secondary",onClick:R,children:"新建"})]}),e.jsx("div",{className:"mdocs-settings-cards",children:e.jsxs("div",{className:"mdocs-settings-card",children:[e.jsx("p",{className:"mdocs-settings-item-desc mdocs-agent-skills-lead",children:"私人提示词宏。名称对本账号唯一,仅英文、数字、下划线;智能助手 / 帮写里按名称引用。"}),z?e.jsx("p",{className:"mdocs-agent-skills-error",children:z}):null,w?e.jsxs("div",{className:"mdocs-agent-skills-form",children:[e.jsx("div",{className:"mdocs-agent-skills-form-head",children:e.jsx("strong",{children:p?"新建 Skill":"编辑 Skill"})}),e.jsxs("label",{className:"mdocs-agent-skills-field",children:[e.jsx("span",{children:"名称"}),e.jsx("input",{type:"text",value:A,onChange:h=>I(h.target.value),maxLength:64,spellCheck:!1,autoComplete:"off",placeholder:"e.g. weekly_report",className:F?void 0:"mdocs-agent-skills-input-invalid"}),F?e.jsx("span",{className:"mdocs-agent-skills-hint",children:"引用与索引键,保存后按此名称使用"}):e.jsx("span",{className:"mdocs-agent-skills-hint-bad",children:"仅允许 A–Z、a–z、0–9、_"})]}),e.jsxs("label",{className:"mdocs-agent-skills-field",children:[e.jsx("span",{children:"简介(可选)"}),e.jsx("input",{type:"text",value:c,onChange:h=>N(h.target.value),maxLength:200,placeholder:"一句话说明用途"})]}),e.jsxs("label",{className:"mdocs-agent-skills-field",children:[e.jsx("span",{children:"正文"}),e.jsx("textarea",{value:f,onChange:h=>m(h.target.value),rows:10,placeholder:"写入 Agent 应遵守的步骤与约束…"})]}),e.jsxs("div",{className:"mdocs-agent-config-actions",children:[e.jsx("button",{type:"button",onClick:()=>void k(),disabled:D||!F||!A.trim()||!f.trim(),children:D?"保存中…":"保存"}),e.jsx("button",{type:"button",className:"secondary",onClick:L,disabled:D,children:"取消"})]})]}):null,u?e.jsx("p",{className:"mdocs-settings-item-desc",children:"加载中…"}):null,!u&&s.length===0&&!w?e.jsxs("div",{className:"mdocs-agent-skills-empty",children:[e.jsx("p",{children:"还没有 Skill"}),e.jsx("button",{type:"button",className:"secondary",onClick:R,children:"新建第一个"})]}):null,!u&&s.length>0?e.jsx("ul",{className:"mdocs-agent-skills-list",children:s.map(h=>{const d=Be(h.name),j=C===h.id;return e.jsxs("li",{className:"mdocs-agent-skills-item"+(j?" mdocs-agent-skills-item-active":""),children:[e.jsxs("div",{className:"mdocs-agent-skills-item-main",children:[e.jsxs("div",{className:"mdocs-agent-skills-item-title-row",children:[e.jsx("code",{className:"mdocs-agent-skills-name",children:h.name}),d?null:e.jsx("span",{className:"mdocs-agent-skills-badge-warn",title:"名称含非法字符,请编辑改为英文数字下划线",children:"需改名"})]}),e.jsx("span",{className:"mdocs-agent-skills-desc",children:h.description.trim()||"无简介"})]}),e.jsxs("div",{className:"mdocs-agent-skills-item-actions",children:[e.jsx("button",{type:"button",className:"secondary small",onClick:()=>O(h),disabled:w&&!j,children:"编辑"}),e.jsx("button",{type:"button",className:"secondary small",onClick:()=>void P(h.id),disabled:w,children:"删除"})]})]},h.id)})}):null]})})]})}const Ht={algorithm:Pt.defaultAlgorithm,token:{colorPrimary:"#4CAF50",colorLink:"#4CAF50",colorInfo:"#4CAF50",colorSuccess:"#66BB6A",colorBgBase:"#ffffff",colorBgContainer:"#ffffff",colorText:"#212121",colorTextSecondary:"#616161",colorBorder:"#E0E0E0",colorFillSecondary:"#E8F5E9",borderRadius:8,fontFamily:"inherit"},components:{Table:{headerBg:"#F5F5F5",headerColor:"#212121",rowHoverBg:"#E8F5E9",borderColor:"#E0E0E0"},Button:{primaryShadow:"none"},Tag:{defaultBg:"#F5F5F5",defaultColor:"#616161"}}};function is(a,s){if(!a)return"—";const g=new Date(a);return Number.isNaN(g.getTime())?"—":g.toLocaleString(s==="zh"?"zh-CN":"en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}function Jt(a){const{t:s,lang:g}=ie(),[u,y]=t.useState(!1),[z,x]=t.useState(!1),[C,v]=t.useState(!1),[p,S]=t.useState([]),[A,I]=t.useState([]),[c,N]=t.useState(null),[f,m]=t.useState(null),[D,M]=t.useState(""),[b,R]=t.useState("keyword"),[O,L]=t.useState(null),[k,P]=t.useState(!1),w=t.useRef(0),[F,h]=t.useState({current:1,pageSize:20}),[d,j]=t.useState(0);async function T(){y(!0),m(null);try{const i=await mt();v(i.modelReady),S(i.items),I([]),j(i.items.length),h(r=>({...r,current:1}))}catch(i){m(ee(s,i)||s("embeddingIndexLoadFailed"))}finally{y(!1)}}t.useEffect(()=>{T()},[]);const K=t.useMemo(()=>{const i=new Map;for(const r of p)i.has(r.domainId)||i.set(r.domainId,de(r.domainName,g,s));return Array.from(i.entries()).map(([r,U])=>({text:U,value:r}))},[p,g,s]),G=t.useMemo(()=>{const i=D.trim().toLowerCase();return i?p.filter(r=>(r.displayName||"").toLowerCase().includes(i)||(r.relativePath||"").toLowerCase().includes(i)||r.documentId.toLowerCase().includes(i)):p},[p,D]),J=b==="semantic"&&!!D.trim();t.useEffect(()=>{if(b!=="semantic")return;const i=D.trim();if(!i){w.current+=1,L(null);return}const r=++w.current;P(!0);const U=window.setTimeout(()=>{(async()=>{try{const V=await us({query:i,mode:"semantic",topN:50});if(r!==w.current)return;const $=new Map(p.map(o=>[o.documentId,o]));L(V.results.map(o=>{const E=$.get(o.documentId);return E?{...E,snippet:o.snippet}:{documentId:o.documentId,displayName:o.displayName,relativePath:o.relativePath,domainId:o.domainId,domainName:o.domainId,documentUpdatedAt:o.updatedAt,chunkCount:0,chunkUnknown:!0,embeddingUpdatedAt:null,snippet:o.snippet}}))}catch{r===w.current&&L([])}finally{r===w.current&&P(!1)}})()},300);return()=>window.clearTimeout(U)},[b,D,p]);const Z=J?O??[]:G;t.useEffect(()=>{j(Z.length),h(i=>({...i,current:1}))},[Z.length,b]);const Q=t.useMemo(()=>[{title:s("myDocumentsColTitle"),dataIndex:"displayName",key:"displayName",ellipsis:!0,sorter:(i,r)=>(i.displayName||i.relativePath).localeCompare(r.displayName||r.relativePath,g==="zh"?"zh":"en"),render:(i,r)=>e.jsxs("div",{style:{minWidth:0},children:[e.jsx("button",{type:"button",className:"mdocs-linkish",style:{background:"none",border:"none",padding:0,cursor:"pointer",fontWeight:500,color:"inherit",textAlign:"left"},onClick:()=>a.onOpenDocument(r.documentId),children:r.displayName||r.relativePath||"Untitled"}),r.snippet&&e.jsx("div",{className:"mdocs-embedding-index-snippet",title:r.snippet,children:r.snippet})]})},{title:s("myDocumentsColDomain"),dataIndex:"domainId",key:"domainId",width:160,ellipsis:!0,filters:K,onFilter:(i,r)=>r.domainId===i,sorter:(i,r)=>de(i.domainName,g,s).localeCompare(de(r.domainName,g,s),g==="zh"?"zh":"en"),render:(i,r)=>de(r.domainName,g,s)},{title:s("embeddingIndexColDocUpdated"),dataIndex:"documentUpdatedAt",key:"documentUpdatedAt",width:160,sorter:(i,r)=>new Date(i.documentUpdatedAt).getTime()-new Date(r.documentUpdatedAt).getTime(),defaultSortOrder:"descend",render:i=>is(i,g)},{title:s("embeddingIndexColStatus"),dataIndex:"chunkCount",key:"buildStatus",width:140,filters:[{text:s("embeddingIndexFilterBuilt"),value:"built"},{text:s("embeddingIndexFilterMissing"),value:"missing"}],onFilter:(i,r)=>i==="built"?r.chunkCount>0:r.chunkCount===0,sorter:(i,r)=>i.chunkCount-r.chunkCount,render:(i,r)=>r.chunkUnknown?e.jsx(Le,{color:"success",children:s("embeddingIndexStatusBuiltUnknown")}):i>0?e.jsx(Le,{color:"success",children:s("embeddingIndexStatusReady",{chunks:String(i)})}):e.jsx(Le,{children:s("embeddingIndexStatusMissing")})},{title:s("embeddingIndexColBuiltAt"),dataIndex:"embeddingUpdatedAt",key:"embeddingUpdatedAt",width:160,sorter:(i,r)=>{const U=i.embeddingUpdatedAt?new Date(i.embeddingUpdatedAt).getTime():0,V=r.embeddingUpdatedAt?new Date(r.embeddingUpdatedAt).getTime():0;return U-V},render:i=>is(i,g)}],[K,g,a,s]);async function q(){const i=A.map(String);if(i.length!==0){x(!0),N(null),m(null);try{const r=await ut(i);v(r.modelReady),N(s("embeddingIndexRebuildResult",{ok:String(r.ok.length),skipped:String(r.skipped.length),failed:String(r.failed.length)})),await T()}catch(r){m(ee(s,r)||s("embeddingIndexRebuildFailed"))}finally{x(!1)}}}return e.jsx(Mt,{theme:Ht,children:e.jsxs("div",{className:"mdocs-settings mdocs-embedding-index",children:[e.jsx("div",{className:"mdocs-settings-header",children:e.jsx("h2",{className:"mdocs-settings-title",children:s("embeddingIndex")})}),e.jsxs("div",{className:"mdocs-settings-card",children:[e.jsx("p",{className:"muted",style:{marginTop:0},children:s("embeddingIndexDesc")}),e.jsxs("p",{style:{margin:"0 0 12px",fontSize:13},children:[s("embeddingIndexModel"),":"," ",e.jsx("strong",{children:s(C?"embeddingIndexModelReady":"embeddingIndexModelPending")})]}),e.jsxs(Et,{wrap:!0,style:{marginBottom:12},children:[e.jsx(Rt,{value:b,"aria-label":s("myDocumentsSearchMode"),onChange:i=>R(i),options:[{label:s("myDocumentsModeKeyword"),value:"keyword"},{label:s("myDocumentsModeSemantic"),value:"semantic"}]}),e.jsx(Ft.Search,{allowClear:!0,placeholder:s(b==="semantic"?"embeddingIndexSearchSemanticPlaceholder":"embeddingIndexSearchPlaceholder"),"aria-label":s(b==="semantic"?"embeddingIndexSearchSemanticPlaceholder":"embeddingIndexSearchPlaceholder"),value:D,onChange:i=>M(i.target.value),style:{width:240},disabled:u||z}),e.jsx(Qe,{onClick:()=>void T(),disabled:u||z,children:s("embeddingIndexRefresh")}),e.jsx(Qe,{type:"primary",onClick:()=>void q(),disabled:z||A.length===0,loading:z,children:s("embeddingIndexRebuildSelected",{count:String(A.length)})})]}),c&&e.jsx("p",{style:{fontSize:13,color:"var(--mdocs-text-muted)"},children:c}),f&&e.jsx("p",{className:"mdocs-doc-search-error",style:{marginBottom:8},children:f}),J&&!C&&e.jsx("p",{className:"muted",style:{margin:"0 0 8px",fontSize:13},children:s("myDocumentsSemanticNotReady")}),(()=>{const i=Number(F.pageSize)||20,r=Number(F.current)||1,U=d,V=Math.max(1,Math.ceil(U/i)||1);return e.jsx(zt,{size:"small",rowKey:"documentId",loading:u||J&&k,columns:Q,dataSource:Z,rowSelection:{selectedRowKeys:A,onChange:$=>I($)},pagination:{current:r,pageSize:i,total:U,showSizeChanger:!1,showQuickJumper:!1,showTotal:($,o)=>s("embeddingIndexPageTotal",{from:String(o[0]??0),to:String(o[1]??0),total:String($)})},onChange:($,o,E,W)=>{const se=$.pageSize??i,ce=W.currentDataSource.length,ae=Math.max(1,Math.ceil(ce/se)||1);let te=$.current??1;te>ae&&(te=ae),j(ce),h({current:te,pageSize:se})},locale:{emptyText:D.trim()?s("myDocumentsNoMatch"):s("embeddingIndexEmpty"),filterReset:s("embeddingIndexFilterReset"),filterConfirm:s("embeddingIndexFilterOk")},scroll:{x:900},footer:()=>e.jsxs("div",{className:"mdocs-embedding-index-pager",style:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"flex-end",gap:10},children:[e.jsx("span",{style:{fontSize:13},children:s("embeddingIndexPageSize")}),e.jsx(Xe,{size:"small",min:5,max:200,step:5,value:i,controls:!0,changeOnWheel:!0,disabled:u||z,"aria-label":s("embeddingIndexPageSize"),onChange:$=>{if($==null||!Number.isFinite(Number($)))return;const o=Math.min(200,Math.max(5,Math.floor(Number($))));h({current:1,pageSize:o})}}),e.jsx("span",{style:{fontSize:13},children:s("embeddingIndexGoPage")}),e.jsx(Xe,{size:"small",min:1,max:V,step:1,value:Math.min(r,V),controls:!0,changeOnWheel:!0,disabled:u||z||U===0,"aria-label":s("embeddingIndexGoPage"),onChange:$=>{if($==null||!Number.isFinite(Number($)))return;const o=Math.min(V,Math.max(1,Math.floor(Number($))));h(E=>({...E,current:o}))}}),e.jsxs("span",{style:{fontSize:13,color:"var(--mdocs-text-muted)"},children:["/ ",V]})]})})})()]})]})})}function cs(a,s){const g=localStorage.getItem(a);return g===null?s:g==="true"}function Se(a){const s=new Date(a);if(Number.isNaN(s.getTime()))return"—";const g=String(s.getMonth()+1).padStart(2,"0"),u=String(s.getDate()).padStart(2,"0");return`${s.getFullYear()}-${g}-${u}`}function aa(a){const{t:s,lang:g,setLang:u}=ie(),{onBack:y,onPublishDraft:z}=a,x=ht(),[C,v]=t.useState(!1),p=t.useRef(!0);t.useEffect(()=>(p.current=!0,()=>{p.current=!1}),[]),t.useEffect(()=>{x||v(!1)},[x]);const[S,A]=t.useState(()=>cs("mdocs.autoPublish",!1)),[I,c]=t.useState(()=>cs("mdocs.autoEdit",!0)),[N,f]=t.useState(!1),[m,D]=t.useState("general");function M(n){D(n),x&&v(!1)}const b=s(m==="general"?"general":m==="bookmarks"?"bookmarkTitle":m==="myDocuments"?"myDocuments":m==="embeddingIndex"?"embeddingIndex":m==="domainManagement"?"domainManagement":m==="memberTemplates"?"memberTemplates":m==="agentConfig"?"agentConfig":"saveAndPublish"),[R,O]=t.useState([]),[L,k]=t.useState(!0),[P,w]=t.useState(null),[F,h]=t.useState(!1),[d,j]=t.useState(!1),[T,K]=t.useState(!1),[G,J]=t.useState(!1),[Z,Q]=t.useState(null),[q,i]=t.useState(!1),[r,U]=t.useState(!1),[V,$]=t.useState(!1),[o,E]=t.useState(""),[W,se]=t.useState(!1),[ce,ae]=t.useState(!1),[te,ne]=t.useState(0),[le,xe]=t.useState([]),[we,ye]=t.useState(!1),[oe,Ce]=t.useState(""),[be,De]=t.useState([]),[Ie,l]=t.useState(!1),[_,je]=t.useState(""),[ue,ps]=t.useState("auto"),[Ne,Te]=t.useState(null),[Ue,Ae]=t.useState(!0),[me,gs]=t.useState(0),[Ke,$e]=t.useState("1"),[Ve,fs]=t.useState(0),[he,xs]=t.useState(""),[Me,ys]=t.useState(""),[ve,bs]=t.useState(""),[js,Ns]=t.useState(null),[vs,ks]=t.useState([]),ke=t.useRef(0),Pe=20,pe=Ne!==null,[We,Ss]=t.useState([]),[ws,Ee]=t.useState(!1),[Re,_e]=t.useState(null),[Fe,Ge]=t.useState(new Map);t.useEffect(()=>{localStorage.setItem("mdocs.autoPublish",String(S))},[S]),t.useEffect(()=>{localStorage.setItem("mdocs.autoEdit",String(I))},[I]),t.useEffect(()=>{m==="savePublish"&&Oe().then(n=>{p.current&&ne(n.filter(B=>!B.published).length)})},[m]),t.useEffect(()=>{m==="bookmarks"&&Cs(),m==="myDocuments"&&(fe(),ds().then(n=>{p.current&&ks(n)}).catch(()=>{}))},[m,he,Me,ve]),t.useEffect(()=>{if(m!=="myDocuments")return;const n=_.trim();if(!n){ke.current+=1,Te(null),Ae(!0);return}const B=++ke.current,Y=window.setTimeout(()=>{(async()=>{try{const H=await us({query:n,mode:ue,domainId:he||void 0,topN:50});if(!p.current||B!==ke.current)return;Te(H.results),Ae(H.modelReady)}catch{if(!p.current||B!==ke.current)return;Te([]),Ae(!0)}})()},300);return()=>window.clearTimeout(Y)},[m,_,ue,he]),t.useEffect(()=>{qe()},[]),t.useEffect(()=>{os().then(n=>{p.current&&Ss(n)}).catch(()=>{})},[]);const ge=new Map(We.map(n=>[n.domainId,n.domainName]));async function qe(){try{k(!0);const n=await pt();if(!p.current)return;O(n)}catch{}finally{p.current&&k(!1)}}async function Cs(){try{ye(!0);const n=await gt();if(!p.current)return;xe(n)}catch{}finally{p.current&&ye(!1)}}async function fe(n=0){try{l(!0);const B=await ft({offset:n*Pe,limit:Pe,domainId:he||void 0,creatorVisitorId:Me||void 0,groupBy:ve||void 0});if(!p.current)return;De(B.items),Ns(B.groups??null),fs(B.total),gs(n),$e(String(n+1))}catch{}finally{p.current&&l(!1)}}async function Ds(n){try{await St(n),xe(B=>B.filter(Y=>Y.documentId!==n))}catch{}}function Is(){if(R.some(B=>!B.revoked)){j(!0);return}He()}async function He(){try{h(!0);const n=await Ct();w({token:n.token,name:n.name}),await qe()}finally{h(!1)}}async function Ts(){try{$(!0);const n=await vt();Q(n.recoveryCode)}finally{$(!1)}}async function As(n){n.preventDefault();const B=o.trim();if(!(B&&B.length<4))try{se(!0),await kt(B),E(""),ae(!0),setTimeout(()=>ae(!1),3e3)}finally{se(!1)}}async function Ms(n){_e(n);try{const B=await wt(n),Y=new Map;B.forEach(H=>{Y.set(H.visitorId,H.permission)}),Ge(Y)}catch{Ge(new Map)}Ee(!0)}async function Ps(n){if(Re)try{const B=new Set(n.map(H=>H.visitorId)),Y=new Set(Fe.keys());for(const H of Y)B.has(H)||await Dt(Re,H);for(const H of n)await It(Re,H.visitorId,H.permission);await fe()}finally{Ee(!1),_e(null)}}const Je=le.filter(n=>{if(!oe.trim())return!0;const B=oe.toLowerCase();return(n.displayName||n.relativePath||"").toLowerCase().includes(B)||(n.ownerVisitorName||"").toLowerCase().includes(B)||(n.domainId||"").toLowerCase().includes(B)}),re=Math.ceil(Ve/Pe);return e.jsxs("div",{className:"mdocs-layout"+(x?" mdocs-layout--reader mdocs-layout--settings":""),children:[x&&C?e.jsx("button",{type:"button",className:"mdocs-mobile-nav-scrim","aria-label":s("collapseSidebar"),onClick:()=>v(!1)}):null,e.jsxs("aside",{className:"mdocs-sidebar"+(x?C?" mdocs-sidebar--drawer-open":" mdocs-sidebar--drawer":""),children:[e.jsxs("header",{className:"mdocs-sidebar-header",children:[e.jsxs("div",{className:"mdocs-brand",children:[e.jsx("img",{src:xt,alt:s("brand"),className:"mdocs-brand-logo"}),e.jsx("span",{children:s("brand")})]}),x?e.jsx("button",{type:"button",className:"mdocs-sidebar-toggle",onClick:()=>v(!1),"aria-label":s("collapseSidebar"),style:{background:"none",border:"none",cursor:"pointer",padding:"6px",color:"var(--mdocs-text-muted, #999)",borderRadius:4,display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(yt,{size:18})}):null]}),e.jsxs("nav",{className:"mdocs-config-tree",children:[e.jsx("div",{className:"mdocs-config-item"+(m==="general"?" active":""),onClick:()=>M("general"),children:s("general")}),e.jsx("div",{className:"mdocs-config-item"+(m==="bookmarks"?" active":""),onClick:()=>M("bookmarks"),children:s("bookmarkTitle")}),e.jsx("div",{className:"mdocs-config-item"+(m==="myDocuments"?" active":""),onClick:()=>M("myDocuments"),children:s("myDocuments")}),e.jsx("div",{className:"mdocs-config-item"+(m==="embeddingIndex"?" active":""),onClick:()=>M("embeddingIndex"),children:s("embeddingIndex")}),e.jsx("div",{className:"mdocs-config-item"+(m==="domainManagement"?" active":""),onClick:()=>M("domainManagement"),children:s("domainManagement")}),e.jsx("div",{className:"mdocs-config-item"+(m==="memberTemplates"?" active":""),onClick:()=>M("memberTemplates"),children:s("memberTemplates")}),e.jsx("div",{className:"mdocs-config-item"+(m==="agentConfig"?" active":""),onClick:()=>M("agentConfig"),children:s("agentConfig")}),e.jsx("div",{className:"mdocs-config-item"+(m==="savePublish"?" active":""),onClick:()=>M("savePublish"),children:s("saveAndPublish")})]}),e.jsx("footer",{className:"mdocs-settings-sidebar-footer",onClick:y,children:s("backToDocs")})]}),e.jsxs("main",{className:"mdocs-main",children:[x?e.jsxs("div",{className:"mdocs-settings-mobile-bar",children:[e.jsx("button",{type:"button",className:"mdocs-reader-nav-btn",onClick:()=>v(!0),"aria-label":s("expandSidebar"),children:e.jsx(bt,{size:18,strokeWidth:1.75})}),e.jsx("span",{className:"mdocs-settings-mobile-bar-title",children:b})]}):null,jt(),m==="general"?e.jsxs("div",{className:"mdocs-settings",children:[e.jsx("div",{className:"mdocs-settings-header",children:e.jsx("h2",{className:"mdocs-settings-title",children:s("general")})}),e.jsxs("div",{className:"mdocs-settings-cards",children:[e.jsx("div",{className:"mdocs-settings-card",children:e.jsxs("label",{className:"mdocs-settings-item",children:[e.jsx("span",{className:"mdocs-settings-item-info",children:e.jsx("span",{className:"mdocs-settings-card-title",children:s("language")})}),e.jsxs("span",{className:"mdocs-settings-lang",children:[e.jsx("button",{type:"button",className:g==="en"?"active":"",onClick:()=>u("en"),children:"EN"}),e.jsx("span",{children:"/"}),e.jsx("button",{type:"button",className:g==="zh"?"active":"",onClick:()=>u("zh"),children:"中"})]})]})}),e.jsx("div",{className:"mdocs-settings-card",children:e.jsxs("label",{className:"mdocs-settings-item",children:[e.jsxs("span",{className:"mdocs-settings-item-info",children:[e.jsx("span",{className:"mdocs-settings-card-title",children:s("autoEdit")}),e.jsx("span",{className:"mdocs-settings-item-desc",children:s("autoEditDesc")})]}),e.jsx("button",{type:"button",className:"mdocs-toggle"+(I?" active":""),role:"switch","aria-checked":I,onClick:()=>c(n=>!n),children:e.jsx("span",{className:"mdocs-toggle-knob"})})]})}),e.jsxs("div",{className:"mdocs-settings-card",children:[e.jsxs("div",{className:"mdocs-settings-item",children:[e.jsxs("span",{className:"mdocs-settings-item-info",children:[e.jsx("span",{className:"mdocs-settings-card-title",children:s("cliToken")}),e.jsx("span",{className:"mdocs-settings-item-desc",children:s("cliTokenDesc")}),!L&&R.length>0&&e.jsx("span",{className:"mdocs-settings-item-desc",style:{marginTop:8,fontSize:"0.85em",opacity:.8},children:R.map(n=>e.jsxs("span",{style:{display:"block"},children:[n.name," — ",new Date(n.createdAt).toLocaleString()," ",n.revoked?`(${s("cliTokenRevoked")})`:`(${s("cliTokenActive")})`]},n.tokenId))})]}),e.jsx("button",{type:"button",className:"secondary",onClick:Is,disabled:F||L,children:F?"…":R.some(n=>!n.revoked)?s("cliTokenReset"):s("cliTokenCreate")})]}),P&&e.jsxs("div",{className:"mdocs-settings-secret-result mdocs-settings-secret-result--ok",children:[e.jsxs("div",{className:"mdocs-settings-secret-result-head",children:[e.jsx("span",{className:"mdocs-settings-card-title",children:s("cliTokenGenerated")}),e.jsx("span",{className:"mdocs-settings-secret-value",children:P.token})]}),e.jsxs("div",{className:"mdocs-settings-secret-result-actions",children:[e.jsx("button",{type:"button",className:"secondary",onClick:()=>{(async()=>{try{await navigator.clipboard.writeText(P.token),J(!1),K(!0),window.setTimeout(()=>K(!1),2e3)}catch{K(!1),J(!0),window.setTimeout(()=>J(!1),3e3)}})()},children:s(T?"cliTokenCopied":"cliTokenCopy")}),e.jsx("button",{type:"button",onClick:()=>w(null),children:s("close")})]}),T&&e.jsxs("div",{className:"mdocs-settings-copy-feedback mdocs-settings-copy-feedback--ok",role:"status",children:["✓ ",s("cliTokenCopied")]}),G&&e.jsx("div",{className:"mdocs-settings-copy-feedback mdocs-settings-copy-feedback--err",role:"status",children:s("cliTokenCopyFailed")})]})]}),e.jsxs("div",{className:"mdocs-settings-card",children:[e.jsxs("div",{className:"mdocs-settings-item",children:[e.jsxs("span",{className:"mdocs-settings-item-info",children:[e.jsx("span",{className:"mdocs-settings-card-title",children:"🔑 恢复码"}),e.jsx("span",{className:"mdocs-settings-item-desc",children:"当 Token 丢失时,可用恢复码找回身份。生成后请立即保存,仅显示一次。"})]}),e.jsx("button",{type:"button",className:"secondary",onClick:Ts,disabled:V,children:V?"…":"生成恢复码"})]}),Z&&e.jsxs("div",{className:"mdocs-settings-secret-result mdocs-settings-secret-result--warn",children:[e.jsxs("div",{className:"mdocs-settings-secret-result-head",children:[e.jsx("span",{className:"mdocs-settings-card-title",children:"🔑 你的恢复码"}),e.jsx("span",{className:"mdocs-settings-item-desc",style:{marginTop:8},children:"请立即复制保存,关闭后不可再查看。"}),e.jsx("div",{className:"mdocs-settings-secret-code",children:Z})]}),e.jsxs("div",{className:"mdocs-settings-secret-result-actions",children:[e.jsx("button",{type:"button",className:"primary",onClick:()=>{(async()=>{try{await navigator.clipboard.writeText(Z),U(!1),i(!0),window.setTimeout(()=>i(!1),2e3)}catch{i(!1),U(!0),window.setTimeout(()=>U(!1),3e3)}})()},children:q?"已复制":"复制恢复码"}),e.jsx("button",{type:"button",onClick:()=>Q(null),children:s("close")})]}),q&&e.jsx("div",{className:"mdocs-settings-copy-feedback mdocs-settings-copy-feedback--ok",role:"status",children:"✓ 已复制到剪贴板"}),r&&e.jsx("div",{className:"mdocs-settings-copy-feedback mdocs-settings-copy-feedback--err",role:"status",children:"复制失败,请手动选中上方内容复制"})]})]}),e.jsxs("div",{className:"mdocs-settings-card",children:[e.jsx("div",{className:"mdocs-settings-item",children:e.jsxs("span",{className:"mdocs-settings-item-info",children:[e.jsx("span",{className:"mdocs-settings-card-title",children:"🔐 登录密码"}),e.jsx("span",{className:"mdocs-settings-item-desc",children:"设置密码后,可在其他浏览器或设备用「用户名+密码」登录。"})]})}),e.jsxs("form",{onSubmit:As,style:{marginTop:12},children:[e.jsx("input",{type:"password",placeholder:"输入新密码(至少 4 位,留空则清除密码)",value:o,onChange:n=>E(n.target.value),minLength:0,style:{marginBottom:8}}),ce&&e.jsx("div",{style:{color:"#4caf50",marginBottom:8,fontSize:"0.875rem"},children:"✓ 密码设置成功"}),e.jsx("button",{type:"submit",className:"secondary",disabled:W,children:W?"设置中…":"保存密码"})]})]})]})]}):m==="bookmarks"?e.jsxs("div",{className:"mdocs-settings",children:[e.jsx("div",{className:"mdocs-settings-header",children:e.jsx("h2",{className:"mdocs-settings-title",children:s("bookmarkTitle")})}),e.jsxs("div",{className:"mdocs-settings-card",children:[e.jsx("input",{type:"text",className:"mdocs-settings-search",placeholder:s("bookmarkSearch"),value:oe,onChange:n=>Ce(n.target.value)}),we?e.jsx("div",{style:{textAlign:"center",padding:"40px 0"},children:s("loading")}):e.jsx(e.Fragment,{children:Je.length===0?e.jsx("div",{style:{textAlign:"center",padding:"40px 0",opacity:.6},children:s(oe?"bookmarkNoMatch":"bookmarkEmpty")}):e.jsx("div",{className:"mdocs-settings-table-wrap",children:e.jsxs("table",{className:"mdocs-settings-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:s("bookmarkColTitle")}),e.jsx("th",{children:s("bookmarkColDomain")}),e.jsx("th",{children:s("bookmarkColAuthor")}),e.jsx("th",{children:s("bookmarkColTime")}),e.jsx("th",{style:{textAlign:"right"}})]})}),e.jsx("tbody",{children:Je.map(n=>e.jsxs("tr",{children:[e.jsx("td",{style:{cursor:"pointer",fontWeight:500},onClick:()=>a.onOpenDocument(n.documentId),children:n.displayName||n.relativePath||"Untitled"}),e.jsx("td",{children:n.isDeleted?e.jsx("span",{style:{opacity:.5,fontStyle:"italic"},children:"已删除"}):ge.get(n.domainId||"")||n.domainId||"—"}),e.jsx("td",{children:n.ownerVisitorName||"—"}),e.jsx("td",{children:new Date(n.bookmarkedAt).toLocaleDateString()}),e.jsx("td",{style:{textAlign:"right"},children:e.jsx("button",{type:"button",className:"secondary small",onClick:()=>Ds(n.documentId),children:s("bookmarkRemove")})})]},n.documentId))})]})})})]})]}):m==="myDocuments"?e.jsxs("div",{className:"mdocs-settings mdocs-my-docs",children:[e.jsx("div",{className:"mdocs-settings-header",children:e.jsx("h2",{className:"mdocs-settings-title",children:s("myDocuments")})}),e.jsxs("div",{className:"mdocs-settings-card",children:[e.jsxs("div",{className:"mdocs-my-docs-toolbar",children:[e.jsxs("div",{className:"mdocs-my-docs-search",children:[e.jsx(Nt,{size:16,strokeWidth:2,"aria-hidden":"true"}),e.jsx("input",{type:"text",placeholder:"搜索文章…",value:_,onChange:n=>je(n.target.value)})]}),e.jsxs("select",{className:"mdocs-my-docs-select",value:he,"aria-label":s("myDocumentsFilterDomain"),onChange:n=>xs(n.target.value),children:[e.jsx("option",{value:"",children:s("myDocumentsFilterAllDomains")}),We.map(n=>e.jsx("option",{value:n.domainId,children:ge.get(n.domainId)||n.domainName},n.domainId))]}),e.jsxs("select",{className:"mdocs-my-docs-select",value:ue,"aria-label":s("myDocumentsSearchMode"),onChange:n=>ps(n.target.value),children:[e.jsx("option",{value:"auto",children:s("myDocumentsModeAuto")}),e.jsx("option",{value:"keyword",children:s("myDocumentsModeKeyword")}),e.jsx("option",{value:"semantic",children:s("myDocumentsModeSemantic")})]}),!pe&&e.jsxs("select",{className:"mdocs-my-docs-select",value:Me,"aria-label":s("myDocumentsFilterCreator"),onChange:n=>ys(n.target.value),children:[e.jsx("option",{value:"",children:s("myDocumentsFilterAllCreators")}),vs.map(n=>e.jsx("option",{value:n.visitorId,children:n.visitorName},n.visitorId))]}),!pe&&e.jsxs("select",{className:"mdocs-my-docs-select",value:ve,"aria-label":s("myDocumentsGroupBy"),onChange:n=>bs(n.target.value),children:[e.jsx("option",{value:"",children:s("myDocumentsGroupNone")}),e.jsx("option",{value:"domain",children:s("myDocumentsGroupDomain")}),e.jsx("option",{value:"creator",children:s("myDocumentsGroupCreator")})]})]}),Ie&&!pe?e.jsx("div",{className:"mdocs-my-docs-empty",children:s("loading")}):pe?e.jsx(e.Fragment,{children:Ne.length===0?e.jsx("div",{className:"mdocs-my-docs-empty",children:s(ue==="semantic"&&!Ue?"myDocumentsSemanticNotReady":"myDocumentsNoMatch")}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mdocs-my-docs-search-meta",children:[s("myDocumentsResultCount",{count:String(Ne.length)}),ue==="semantic"&&!Ue?` · ${s("myDocumentsSemanticNotReadyShort")}`:""]}),e.jsx("div",{className:"mdocs-settings-table-wrap",children:e.jsxs("table",{className:"mdocs-settings-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:s("myDocumentsColTitle")}),e.jsx("th",{children:s("myDocumentsColDomain")}),e.jsx("th",{children:s("myDocumentsColCreator")}),e.jsx("th",{children:s("myDocumentsColUpdated")}),e.jsx("th",{children:s("myDocumentsColCreated")}),e.jsx("th",{})]})}),e.jsx("tbody",{children:Ne.map(n=>e.jsxs("tr",{children:[e.jsx("td",{className:"mdocs-my-docs-title",onClick:()=>a.onOpenDocument(n.documentId),children:n.displayName||n.relativePath||"Untitled"}),e.jsx("td",{children:ge.get(n.domainId||"")||n.domainId||"—"}),e.jsx("td",{children:n.ownerVisitorName||"—"}),e.jsx("td",{className:"mdocs-my-docs-date",children:Se(n.updatedAt)}),e.jsx("td",{className:"mdocs-my-docs-date",children:n.createdAt?Se(n.createdAt):"—"}),e.jsx("td",{className:"mdocs-my-docs-actions",children:e.jsx("button",{type:"button",className:"primary small",onClick:()=>a.onOpenDocument(n.documentId),children:s("bookmarkOpen")})})]},n.documentId))})]})})]})}):e.jsxs(e.Fragment,{children:[be.length===0?e.jsx("div",{className:"mdocs-my-docs-empty",children:s(_?"myDocumentsNoMatch":"myDocumentsEmpty")}):e.jsx("div",{className:"mdocs-settings-table-wrap",children:e.jsxs("table",{className:"mdocs-settings-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:s("myDocumentsColTitle")}),e.jsx("th",{children:s("myDocumentsColDomain")}),e.jsx("th",{children:s("myDocumentsColCreator")}),e.jsx("th",{children:s("myDocumentsColUpdated")}),e.jsx("th",{children:s("myDocumentsColCreated")}),e.jsx("th",{})]})}),e.jsx("tbody",{children:(js??[{key:"",items:be}]).flatMap(n=>{var H;const B=n.key?e.jsx("tr",{className:"mdocs-my-docs-group",children:e.jsx("td",{colSpan:6,children:ve==="domain"?ge.get(n.key)||n.key:((H=n.items[0])==null?void 0:H.creatorName)||n.key})},`group-${n.key}`):null,Y=n.items.map(X=>e.jsxs("tr",{children:[e.jsx("td",{className:"mdocs-my-docs-title",onClick:()=>a.onOpenDocument(X.documentId),children:X.displayName||X.relativePath||"Untitled"}),e.jsx("td",{children:ge.get(X.domainId||"")||X.domainId||"—"}),e.jsx("td",{children:X.creatorName||X.creatorVisitorId||"—"}),e.jsx("td",{className:"mdocs-my-docs-date",children:Se(X.updatedAt)}),e.jsx("td",{className:"mdocs-my-docs-date",children:Se(X.createdAt)}),e.jsxs("td",{className:"mdocs-my-docs-actions",children:[e.jsx("button",{type:"button",className:"ghost small",onClick:()=>Ms(X.documentId),children:s("docInfoInviteMember")}),e.jsx("button",{type:"button",className:"primary small",onClick:()=>a.onOpenDocument(X.documentId),children:s("bookmarkOpen")})]})]},X.documentId));return B?[B,...Y]:Y})})]})}),!pe&&e.jsxs("div",{className:"mdocs-my-docs-footer",children:[e.jsx("span",{className:"mdocs-settings-page-info",children:s("myDocumentsPageInfo",{current:String(re>0?me+1:0),total:String(re),count:String(Ve)})}),re>1&&e.jsxs("form",{className:"mdocs-my-docs-jump",onSubmit:n=>{n.preventDefault();const B=Number.parseInt(Ke,10);if(!Number.isFinite(B))return;const Y=Math.min(Math.max(B,1),re)-1;Y!==me&&fe(Y)},children:[e.jsx("span",{children:s("myDocumentsJumpTo")}),e.jsx("input",{type:"number",inputMode:"numeric",min:1,max:re,"aria-label":s("myDocumentsJumpTo"),value:Ke,onChange:n=>$e(n.target.value)}),e.jsx("button",{type:"submit",className:"secondary small",children:s("myDocumentsJump")})]}),re>1&&e.jsxs("div",{className:"mdocs-settings-pagination",children:[e.jsx("button",{type:"button",className:"secondary small",disabled:me<=0,onClick:()=>fe(me-1),children:s("myDocumentsPrev")}),e.jsx("button",{type:"button",className:"secondary small",disabled:me>=re-1,onClick:()=>fe(me+1),children:s("myDocumentsNext")})]})]})]})]})]}):m==="embeddingIndex"?e.jsx(Jt,{onOpenDocument:a.onOpenDocument}):m==="domainManagement"?e.jsx(Ut,{}):m==="memberTemplates"?e.jsx(Kt,{}):m==="agentConfig"?e.jsxs("div",{className:"mdocs-settings",children:[e.jsx(_t,{}),e.jsx(qt,{})]}):e.jsxs("div",{className:"mdocs-settings",children:[e.jsxs("div",{className:"mdocs-settings-header",children:[e.jsx("h2",{className:"mdocs-settings-title",children:s("saveAndPublish")}),e.jsx("button",{type:"button",className:"secondary",onClick:y,children:s("backToDocs")})]}),e.jsxs("div",{className:"mdocs-settings-cards",children:[e.jsx("div",{className:"mdocs-settings-card",children:e.jsxs("label",{className:"mdocs-settings-item",children:[e.jsxs("span",{className:"mdocs-settings-item-info",children:[e.jsx("span",{className:"mdocs-settings-card-title",children:s("autoSave")}),e.jsx("span",{className:"mdocs-settings-item-desc",children:s("autoSaveAlwaysOnDesc")})]}),e.jsx("span",{className:"mdocs-toggle active",role:"switch","aria-checked":"true","aria-disabled":"true",style:{opacity:.6,cursor:"not-allowed"},children:e.jsx("span",{className:"mdocs-toggle-knob"})})]})}),e.jsx("div",{className:"mdocs-settings-card",children:e.jsxs("label",{className:"mdocs-settings-item",children:[e.jsxs("span",{className:"mdocs-settings-item-info",children:[e.jsx("span",{className:"mdocs-settings-card-title",children:s("autoPublish")}),e.jsx("span",{className:"mdocs-settings-item-desc",children:s("autoPublishDesc")})]}),e.jsx("button",{type:"button",className:"mdocs-toggle"+(S?" active":""),role:"switch","aria-checked":S,onClick:()=>A(n=>!n),children:e.jsx("span",{className:"mdocs-toggle-knob"})})]})}),te>0?e.jsxs("button",{className:"mdocs-settings-card mdocs-settings-draft-link",onClick:()=>f(!0),children:[e.jsxs("span",{className:"mdocs-settings-draft-link-text",children:["📄 ",s("viewDrafts")," (",te,")"]}),e.jsx("span",{className:"mdocs-settings-draft-arrow","aria-hidden":"true",children:"›"})]}):e.jsx("div",{className:"mdocs-settings-card mdocs-settings-draft-empty",children:e.jsx("span",{className:"mdocs-settings-item-desc",children:s("noDrafts")})})]})]}),N&&e.jsx(Bt,{onPublish:z,onClose:()=>f(!1),onCountChange:ne,onRecover:a.onRecoverDraft})]}),d&&e.jsx(ms,{title:s("cliToken"),message:s("cliTokenResetConfirm"),confirmLabel:s("cliTokenReset"),cancelLabel:s("cancel"),busy:F,onConfirm:()=>{j(!1),He()},onCancel:()=>j(!1)}),e.jsx(hs,{open:ws,title:s("docInfoInviteMember"),initialSelectedIds:[...Fe.keys()],initialPermissions:Fe,templates:[],showPermissionSelect:!0,permissionOptions:[{value:"read",label:s("invitePermissionRead")},{value:"edit",label:s("invitePermissionEdit")}],onClose:()=>Ee(!1),onConfirm:n=>{Ps(n)}})]})}export{aa as SettingsPage};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{r as c,j as s}from"./react-vendor-BVS1XoFi.js";import{o as X,c as ke,p as G,q as ye,a as ve,s as Ce,e as Ie,g as je,u as we,t as $,v as K,w as Ne,x as Se,y as ne,z as Ee,A as De,B as Me,E as Be,F as Re,G as ze,H as Te,I as We,J as Ae,K as Pe,X as $e,L as Ke,M as Ve,r as Fe,i as Le,O as _e,P as Oe,Q as He,R as Ue}from"./index-3B7_9QOQ.js";import{D as qe}from"./DocChrome-wfHrPEB7.js";import{P as J}from"./plus-BD44y7Zf.js";import{B as Qe,I as Ge}from"./italic-B6bGjo1_.js";import"./ui-CEFkTVnG.js";import"./motion-BAXVQJfN.js";import"./diagram-BF8g9yg4.js";import"./file-type-policy-C6Nun42Q.js";/**
|
|
2
|
-
* @license lucide-react v0.562.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const Je=[["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}],["path",{d:"M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22",key:"1hyw0i"}],["path",{d:"m20 22-5-5",key:"1m27yz"}]],Xe=X("merge",Je);/**
|
|
7
|
-
* @license lucide-react v0.562.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const Ye=[["path",{d:"M8 19H5c-1 0-2-1-2-2V7c0-1 1-2 2-2h3",key:"lubmu8"}],["path",{d:"M16 5h3c1 0 2 1 2 2v10c0 1-1 2-2 2h-3",key:"1ag34g"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]],Ze=X("square-split-horizontal",Ye);/**
|
|
12
|
-
* @license lucide-react v0.562.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const pe=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],se=X("trash-2",pe);function V(t){return`${t.rowId}::${t.colId}`}function et(t,l,d){const r=t.rows.findIndex(u=>u.id===l.rowId),y=t.rows.findIndex(u=>u.id===d.rowId),b=t.columns.findIndex(u=>u.id===l.colId),C=t.columns.findIndex(u=>u.id===d.colId);if(r<0||y<0||b<0||C<0)return[l];const F=Math.min(r,y),R=Math.max(r,y),L=Math.min(b,C),j=Math.max(b,C),D=[];for(let u=F;u<=R;u+=1)for(let w=L;w<=j;w+=1)D.push({rowId:t.rows[u].id,colId:t.columns[w].id});return D}function tt(t){return t?{background:t.bg,color:t.color,fontWeight:t.bold?700:void 0,fontStyle:t.italic?"italic":void 0,fontSize:t.fontSize?`${t.fontSize}px`:void 0}:{}}function ut(t){const{t:l}=ke(),d=t.meta.documentId,[r,y]=c.useState(()=>G(t.initialContent)),[b,C]=c.useState(t.initialDisplayName),[F,R]=c.useState(!1),[L,j]=c.useState(t.hasLocalDraft??!1),[D,u]=c.useState(!1),[w,Y]=c.useState(!1),[ae,_]=c.useState(null),[Z,z]=c.useState(null),[N,M]=c.useState(null),[f,x]=c.useState(null),v=c.useRef(null),T=c.useRef(!1),I=c.useRef(null),O=c.useRef(r),H=c.useRef(b);O.current=r,H.current=b,I.current=N,c.useEffect(()=>{const e=()=>{T.current=!1};return window.addEventListener("mouseup",e),()=>window.removeEventListener("mouseup",e)},[]);const i=ye(r)??r.sheets[0],m=N&&f?et(i,N,f):[],U=new Set(m.map(V));c.useEffect(()=>{y(G(t.initialContent)),C(t.initialDisplayName),M(null),x(null),z(null)},[d,t.contentRevision,t.initialContent,t.initialDisplayName]),c.useEffect(()=>{let e=!1;return(async()=>{var n;const a=await ve(d);e||!a||a.contentKind!=="sheet"||(y(G(a.content)),a.displayName&&C(a.displayName),j(!0),(n=t.onDraftExistsChange)==null||n.call(t,!0))})(),()=>{e=!0}},[d]),c.useEffect(()=>Ce((e,a)=>{var n;e===d&&(j(a),(n=t.onDraftExistsChange)==null||n.call(t,a))}),[d]),c.useEffect(()=>{let e=!1;return Ie(d).then(a=>{e||u(!!(a!=null&&a.bookmarked))}),()=>{e=!0}},[d]);const q=c.useCallback(async()=>{var e;await je(d).execute(()=>we({documentId:d,content:$(O.current),displayName:H.current,contentKind:"sheet",localBaseCommitIdAtEditStart:t.meta.headCommitId??null,snapshotMeta:{permission:t.meta.permission,ownerVisitorId:t.meta.ownerVisitorId,domainId:t.meta.domainId}})),j(!0),(e=t.onDraftExistsChange)==null||e.call(t,!0)},[d,t]),p=c.useCallback(()=>{v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{q()},1e3)},[q]);c.useEffect(()=>()=>{v.current&&clearTimeout(v.current)},[]);function W(e){var a;t.canEdit&&(y(e),(a=t.onContentChange)==null||a.call(t,$(e)),p())}function k(e){W(_e(r,e))}function oe(e,a,n){if(a&&I.current){n.preventDefault(),x(e);return}T.current=!0,M(e),x(e),I.current=e}function ie(e){T.current&&x(e)}function Q(e,a){M(e),x(a),I.current=e}function ce(e,a,n){n.preventDefault();const o=i.rows;if(o.length===0)return;const S=o[0].id,g=o[o.length-1].id;if(a&&I.current){x({rowId:g,colId:e});return}Q({rowId:S,colId:e},{rowId:g,colId:e})}function le(e,a,n){n.preventDefault();const o=i.columns;if(o.length===0)return;const S=o[0].id,g=o[o.length-1].id;if(a&&I.current){x({rowId:e,colId:g});return}Q({rowId:e,colId:S},{rowId:e,colId:g})}function de(e){e.preventDefault();const a=i.rows,n=i.columns;a.length===0||n.length===0||Q({rowId:a[0].id,colId:n[0].id},{rowId:a[a.length-1].id,colId:n[n.length-1].id})}function B(e){if(!t.canEdit||m.length===0)return;let a=i;for(const n of m)a=Oe(a,n.rowId,n.colId,e);k(a)}function re(){var n;const e=m[0];if(!e)return;const a=K((n=i.rows.find(o=>o.id===e.rowId))==null?void 0:n.cells[e.colId]);B({bold:!(a!=null&&a.bold)})}function ue(){var n;const e=m[0];if(!e)return;const a=K((n=i.rows.find(o=>o.id===e.rowId))==null?void 0:n.cells[e.colId]);B({italic:!(a!=null&&a.italic)})}function he(){if(!(!t.canEdit||!N||!f))try{k(He(i,{startRowId:N.rowId,startColId:N.colId,endRowId:f.rowId,endColId:f.colId}))}catch{}}function me(){if(!t.canEdit||!f)return;const{tab:e}=Ue(i,f.rowId,f.colId);k(e)}async function ee(){var e;if(t.canEdit){R(!0);try{v.current&&(clearTimeout(v.current),v.current=null),await q(),await t.onPublish($(O.current),H.current.trim()||b,d),j(!1),(e=t.onDraftExistsChange)==null||e.call(t,!1)}finally{R(!1)}}}async function fe(){if(t.canEdit&&b.trim()!==t.initialDisplayName.trim())try{await ee()}catch{}}async function ge(){var e,a;if(!w){Y(!0);try{D?(await Fe(d),u(!1),(e=t.onShowToast)==null||e.call(t,l("bookmarkRemoved"))):(await Le(d),u(!0),(a=t.onShowToast)==null||a.call(t,l("bookmarkAdded")))}finally{Y(!1)}}}const h=(()=>{var a;const e=m[0];if(e)return K((a=i.rows.find(n=>n.id===e.rowId))==null?void 0:a.cells[e.colId])})();return s.jsxs("div",{className:"mdocs-sheet-editor",children:[s.jsx(qe,{fileType:"sheet",displayName:b,onDisplayNameChange:C,onDisplayNameBlur:()=>void fe(),domains:t.domains,currentDomainId:t.currentDomainId,onDomainChange:t.onDomainChange,onDomainsChange:t.onDomainsChange,canEdit:t.canEdit,editing:!0,actionsAlwaysVisible:!0,syncBehind:t.syncBehind,onSyncClick:t.onSyncClick,busy:F,draftExists:L,onPublish:()=>void ee(),onDelete:()=>void t.onDelete(),isBookmarked:D,bookmarkBusy:w,onToggleBookmark:()=>void ge(),onToggleComments:t.onToggleComments,commentPanelOpen:t.commentPanelOpen,commentCount:t.commentCount,readerChrome:t.readerChrome,onOpenMobileNav:t.onOpenMobileNav}),s.jsxs("div",{className:"mdocs-sheet-toolbar",children:[s.jsxs("div",{className:"mdocs-sheet-toolbar-left",children:[s.jsxs("button",{type:"button",className:"mdocs-sheet-btn",disabled:!t.canEdit,onClick:()=>k(Ne(i)),children:[s.jsx(J,{size:13,strokeWidth:2.2}),s.jsx("span",{children:l("sheetAddRow")})]}),s.jsxs("button",{type:"button",className:"mdocs-sheet-btn",disabled:!t.canEdit,onClick:()=>k(Se(i)),children:[s.jsx(J,{size:13,strokeWidth:2.2}),s.jsx("span",{children:l("sheetAddColumn")})]}),s.jsx("span",{className:"mdocs-sheet-toolbar-sep","aria-hidden":!0}),s.jsx("button",{type:"button",className:`mdocs-sheet-btn mdocs-sheet-btn-icon${h!=null&&h.bold?" is-active":""}`,disabled:!t.canEdit||m.length===0,title:l("sheetBold"),onClick:re,children:s.jsx(Qe,{size:13,strokeWidth:2.4})}),s.jsx("button",{type:"button",className:`mdocs-sheet-btn mdocs-sheet-btn-icon${h!=null&&h.italic?" is-active":""}`,disabled:!t.canEdit||m.length===0,title:l("sheetItalic"),onClick:ue,children:s.jsx(Ge,{size:13,strokeWidth:2.4})}),s.jsx("label",{className:"mdocs-sheet-style-label",title:l("sheetFontSize"),children:s.jsxs("select",{className:"mdocs-sheet-font-size",disabled:!t.canEdit||m.length===0,value:(h==null?void 0:h.fontSize)??"",onChange:e=>{const a=e.target.value;B(a?{fontSize:Number(a)}:{fontSize:void 0})},children:[s.jsx("option",{value:"",children:"Aa"}),[12,13,14,16,18,20,24].map(e=>s.jsx("option",{value:e,children:e},e))]})}),s.jsx("label",{className:"mdocs-sheet-style-label",title:l("sheetTextColor"),children:s.jsx("input",{type:"color",className:"mdocs-sheet-color",disabled:!t.canEdit||m.length===0,value:(h==null?void 0:h.color)??"#212121",onChange:e=>B({color:e.target.value})})}),s.jsx("label",{className:"mdocs-sheet-style-label",title:l("sheetBgColor"),children:s.jsx("input",{type:"color",className:"mdocs-sheet-color",disabled:!t.canEdit||m.length===0,value:(h==null?void 0:h.bg)??"#ffffff",onChange:e=>B({bg:e.target.value})})}),s.jsx("span",{className:"mdocs-sheet-toolbar-sep","aria-hidden":!0}),s.jsxs("button",{type:"button",className:"mdocs-sheet-btn",disabled:!t.canEdit||m.length<2,title:`${l("sheetMerge")}(按住拖选,或 Shift+点第二格)`,onClick:he,children:[s.jsx(Xe,{size:13,strokeWidth:2.2}),s.jsx("span",{children:l("sheetMerge")})]}),s.jsxs("button",{type:"button",className:"mdocs-sheet-btn",disabled:!t.canEdit||!f||!ne(i,f.rowId,f.colId),title:l("sheetUnmerge"),onClick:me,children:[s.jsx(Ze,{size:13,strokeWidth:2.2}),s.jsx("span",{children:l("sheetUnmerge")})]})]}),s.jsx("div",{className:"mdocs-sheet-toolbar-right",children:s.jsxs("span",{className:"mdocs-sheet-stats-badge",children:[i.name," · ",i.rows.length," 行 × ",i.columns.length," 列"]})})]}),s.jsx("div",{className:"mdocs-sheet-scroll",children:s.jsxs("table",{className:"mdocs-sheet-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{className:"mdocs-sheet-corner-cell",title:"全选",onMouseDown:de,children:"#"}),i.columns.map(e=>{const a=m.length>0&&i.rows.every(n=>U.has(V({rowId:n.id,colId:e.id})));return s.jsx("th",{className:`mdocs-sheet-th${a?" is-selected":""}`,onMouseDown:n=>{Z!==e.id&&(n.target.closest(".mdocs-sheet-col-del")||ce(e.id,n.shiftKey,n))},children:s.jsxs("div",{className:"mdocs-sheet-header-cell",children:[Z===e.id&&t.canEdit?s.jsx("input",{className:"mdocs-sheet-header-input",autoFocus:!0,defaultValue:e.name,title:"编辑列名",onClick:n=>n.stopPropagation(),onMouseDown:n=>n.stopPropagation(),onBlur:n=>{z(null);const o=n.target.value.trim();!o||o===e.name||k(Ee(i,e.id,o))},onKeyDown:n=>{n.key==="Enter"&&n.target.blur(),n.key==="Escape"&&z(null)}}):s.jsx("button",{type:"button",className:"mdocs-sheet-header-label",title:"单击全选列;双击重命名",onDoubleClick:n=>{n.preventDefault(),n.stopPropagation(),t.canEdit&&z(e.id)},children:e.name}),t.canEdit&&i.columns.length>1&&s.jsx("button",{type:"button",className:"mdocs-sheet-col-del",title:l("sheetDeleteColumn"),onMouseDown:n=>n.stopPropagation(),onClick:()=>{try{const{tab:n}=De(i,[e.id]);k(n)}catch{}},children:s.jsx(se,{size:12,strokeWidth:1.8})})]})},e.id)}),s.jsx("th",{className:"mdocs-sheet-actions-header"})]})}),s.jsx("tbody",{children:i.rows.map((e,a)=>{const n=m.length>0&&i.columns.every(o=>U.has(V({rowId:e.id,colId:o.id})));return s.jsxs("tr",{className:`mdocs-sheet-tr${n?" is-row-selected":""}`,children:[s.jsx("td",{className:`mdocs-sheet-rownum${n?" is-selected":""}`,title:"单击全选行",onMouseDown:o=>le(e.id,o.shiftKey,o),children:a+1}),i.columns.map(o=>{if(Me(i,e.id,o.id))return null;const S=e.cells[o.id],g=K(S),te=ne(i,e.id,o.id),be=Be(i,e.id,o.id),A=te&&be?Re(i,te):{rowSpan:1,colSpan:1},E={rowId:e.id,colId:o.id},xe=U.has(V(E));return s.jsx("td",{className:`mdocs-sheet-td${xe?" is-selected":""}`,rowSpan:A.rowSpan>1?A.rowSpan:void 0,colSpan:A.colSpan>1?A.colSpan:void 0,style:g!=null&&g.bg?{background:g.bg}:void 0,onMouseEnter:()=>ie(E),children:s.jsx("input",{className:"mdocs-sheet-cell-input",style:tt(g),value:Te(S),disabled:!t.canEdit,onMouseDown:P=>oe(E,P.shiftKey,P),onFocus:()=>{T.current||(M(E),x(E),I.current=E)},onChange:P=>k(ze(i,e.id,o.id,P.target.value))})},o.id)}),s.jsx("td",{className:"mdocs-sheet-actions-col",children:s.jsx("button",{type:"button",className:"mdocs-sheet-row-del",disabled:!t.canEdit,title:l("sheetDeleteRow"),onClick:()=>k(We(i,e.id)),children:s.jsx(se,{size:13,strokeWidth:1.8})})})]},e.id)})})]})}),s.jsxs("footer",{className:"mdocs-sheet-footer",children:[s.jsxs("div",{className:"mdocs-sheet-tabs",role:"tablist",children:[r.sheets.map(e=>{const a=e.id===i.id;return s.jsxs("div",{className:`mdocs-sheet-tab${a?" mdocs-sheet-tab--active":""}`,role:"tab","aria-selected":a,children:[ae===e.id&&t.canEdit?s.jsx("input",{className:"mdocs-sheet-tab-rename",autoFocus:!0,defaultValue:e.name,onBlur:n=>{_(null);const o=n.target.value.trim();if(!(!o||o===e.name))try{W(Ae(r,e.id,o))}catch{}},onKeyDown:n=>{n.key==="Enter"&&n.target.blur(),n.key==="Escape"&&_(null)}}):s.jsx("button",{type:"button",className:"mdocs-sheet-tab-btn",title:"双击可重命名工作表",onClick:()=>{var o;if(a)return;const n=Pe(r,e.id);y(n),M(null),x(null),t.canEdit&&((o=t.onContentChange)==null||o.call(t,$(n)),p())},onDoubleClick:()=>{t.canEdit&&_(e.id)},children:e.name}),t.canEdit&&r.sheets.length>1?s.jsx("button",{type:"button",className:"mdocs-sheet-tab-close",title:l("sheetDeleteSheet"),onClick:n=>{n.stopPropagation();try{W(Ke(r,e.id))}catch{}},children:s.jsx($e,{size:11,strokeWidth:2.4})}):null]},e.id)}),s.jsx("button",{type:"button",className:"mdocs-sheet-tab-add",disabled:!t.canEdit,title:l("sheetAddSheet"),onClick:()=>{const{doc:e}=Ve(r);W(e)},children:s.jsx(J,{size:13,strokeWidth:2.2})})]}),s.jsx("div",{className:"mdocs-sheet-footer-info",children:s.jsxs("span",{children:["共 ",r.sheets.length," 个工作表"]})})]})]})}export{ut as SheetEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.graph-page{display:flex;flex-direction:column;height:100%;position:relative;background:#f8fafc}.graph-toolbar{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;border-bottom:1px solid #e2e8f0;background:#fff;gap:12px;min-height:48px}.graph-toolbar-left{display:flex;align-items:center;gap:10px;min-width:0;flex:1 1 auto;overflow:hidden}.graph-toolbar-right{display:flex;align-items:center;gap:8px;flex-shrink:0}.graph-desktop-actions{display:flex;align-items:center;gap:8px}.graph-mobile-toggle-wrap{display:none}.graph-icon{font-size:18px;flex-shrink:0}.graph-title-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:15px;font-weight:600}.graph-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;font-size:13px;cursor:pointer;transition:all .15s;white-space:nowrap;height:32px}.graph-btn:hover{background:#f1f5f9}.graph-btn:disabled{opacity:.6;cursor:not-allowed}.graph-btn-ghost{border-color:transparent;background:transparent;color:#6366f1}.graph-btn-ghost:hover{background:#eef2ff}.graph-btn-primary{background:#6366f1;border-color:#6366f1;color:#fff}.graph-btn-primary:hover{background:#4f46e5}.graph-btn-danger{background:#ef4444;border-color:#ef4444;color:#fff;font-weight:500}.graph-btn-danger:hover{background:#dc2626}.graph-dropdown{position:relative}.graph-dropdown-menu{position:absolute;top:calc(100% + 4px);left:0;min-width:150px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 4px 16px #0000001a;padding:6px;z-index:20}.graph-dropdown-menu--right{left:auto;right:0}.graph-dropdown-item{display:block;width:100%;text-align:left;padding:8px 12px;border:none;background:transparent;border-radius:4px;font-size:13px;cursor:pointer;color:#334155;transition:background .1s}.graph-dropdown-item:hover{background:#f1f5f9}.graph-dropdown-item.active{background:#eef2ff;color:#4338ca;font-weight:600}.graph-dropdown-switch{display:flex;align-items:center;gap:8px;padding:8px 12px;font-size:13px;color:#334155;cursor:pointer;white-space:nowrap}.graph-dropdown-switch:hover{background:#f1f5f9;border-radius:4px}.graph-dropdown-switch input[type=checkbox]{accent-color:#6366f1}.graph-node-tooltip{position:absolute;transform:translate(-50%,calc(-100% - 14px));padding:6px 10px;border-radius:6px;background:#0f172aeb;color:#fff;font-size:12px;line-height:1.35;max-width:280px;white-space:normal;word-break:break-word;pointer-events:none;z-index:20;box-shadow:0 4px 12px #0000002e}.graph-canvas-container{flex:1;position:relative;overflow:hidden}.graph-canvas-container canvas{display:block}.graph-loading,.graph-error,.graph-empty{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:#64748b}.graph-empty h3,.graph-error h3{margin:0;color:#334155}.muted{color:#94a3b8;font-size:13px}.spin{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.graph-detail-panel{position:absolute;top:0;right:0;width:360px;height:100%;background:#fff;border-left:1px solid #e2e8f0;box-shadow:-4px 0 16px #0000000d;padding:20px;overflow-y:auto;z-index:10}.graph-detail-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.graph-node-type-badge{display:inline-block;padding:2px 10px;border-radius:12px;font-size:12px;font-weight:500}.graph-node-type-badge.concept{background:#eef2ff;color:#6366f1}.graph-node-type-badge.doc{background:#d1fae5;color:#059669}.graph-close-btn{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border:1px solid #cbd5e1;background:#f8fafc;border-radius:6px;cursor:pointer;color:#334155;flex-shrink:0}.graph-close-btn:hover{background:#e2e8f0;border-color:#94a3b8;color:#0f172a}.graph-detail-title{margin:0 0 16px;font-size:18px;color:#0f172a}.graph-detail-section{margin-bottom:20px}.graph-detail-section h4{margin:0 0 8px;font-size:13px;font-weight:600;color:#475569}.graph-detail-section p{margin:0;font-size:14px;line-height:1.6;color:#334155}.graph-detail-meta{font-size:12px;color:#94a3b8;margin-bottom:16px}.graph-node-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:4px}.graph-node-item{display:flex;align-items:center;gap:8px;padding:6px 10px;border-radius:4px;font-size:13px;color:#334155;cursor:pointer;transition:background .15s}.graph-node-item:hover{background:#f1f5f9}.graph-node-item .dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.graph-node-item.concept .dot{background:#6366f1}.graph-node-item.doc .dot{background:#10b981}.graph-doc-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:4px}.graph-doc-item button{width:100%;text-align:left;padding:6px 10px;border:none;background:transparent;border-radius:4px;font-size:13px;color:#334155;cursor:pointer;transition:background .15s}.graph-doc-item button:hover{background:#f1f5f9}.graph-progress-panel{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:24px;width:420px;max-width:90%;box-shadow:0 10px 40px #0000001a;z-index:10}.graph-progress-header{display:flex;align-items:center;gap:10px;font-weight:600;font-size:15px;color:#0f172a;margin-bottom:16px}.graph-progress-bar{width:100%;height:8px;background:#e2e8f0;border-radius:4px;overflow:hidden;margin-bottom:16px}.graph-progress-bar-fill{height:100%;background:linear-gradient(90deg,#8b5cf6,#06b6d4);border-radius:4px;transition:width .3s ease}.graph-progress-logs{max-height:240px;overflow-y:auto;font-size:13px;color:#475569;background:#f8fafc;border-radius:8px;padding:10px 12px}.graph-log-item{padding:4px 0;line-height:1.5;border-bottom:1px solid #e2e8f0}.graph-log-item:last-child{border-bottom:none}.graph-log-warn{color:#d97706}.graph-log-error{color:#dc2626}@media (max-width: 768px){.graph-page{position:fixed;top:0;right:0;bottom:0;left:0;z-index:50}.graph-toolbar{flex-wrap:wrap;gap:6px;padding:8px 10px;position:relative;background:#fff;border-bottom:1px solid #e2e8f0}.graph-toolbar-left{flex:1;min-width:0}.graph-toolbar-right{width:auto;position:relative}.graph-desktop-actions{display:none}.graph-mobile-toggle-wrap{display:block;position:relative}.graph-mobile-toggle-btn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:none;border-radius:8px;background:transparent;color:var(--mdocs-text-secondary, #6b7280);cursor:pointer;flex-shrink:0}.graph-mobile-toggle-btn:hover{background:var(--mdocs-hover-bg, #f0f0f0)}.graph-mobile-actions{position:absolute;top:calc(100% + 6px);right:0;min-width:220px;max-width:min(88vw,280px);padding:8px 0;z-index:120;box-shadow:0 4px 16px #0f172a1f;background:#fff;border:1px solid var(--mdocs-border, #e0e0e0);border-radius:12px;display:flex;flex-direction:column}.graph-mobile-action-group{padding:4px 0}.graph-mobile-action-label{padding:6px 16px 4px;font-size:11px;font-weight:600;color:var(--mdocs-text-muted, #616161);text-transform:uppercase;letter-spacing:.5px}.graph-mobile-action-item{display:flex;align-items:center;gap:8px;width:100%;padding:10px 16px;border:none;background:transparent;font:inherit;font-size:14px;color:var(--mdocs-text);text-align:left;cursor:pointer;transition:background .1s}.graph-mobile-action-item:hover{background:var(--mdocs-hover-bg, #f5f5f5)}.graph-mobile-action-item.active{background:var(--mdocs-hover-bg, #f5f5f5);font-weight:600}.graph-mobile-action-item:disabled{opacity:.5;cursor:not-allowed}.graph-mobile-action-primary{color:#6366f1;font-weight:600;border-top:1px solid var(--mdocs-border, #e0e0e0);margin-top:4px;padding-top:12px}.graph-mobile-action-switch{display:flex;align-items:center;gap:8px;padding:10px 16px;font-size:14px;color:var(--mdocs-text);cursor:pointer;transition:background .1s}.graph-mobile-action-switch:hover{background:var(--mdocs-hover-bg, #f5f5f5)}.graph-mobile-action-switch input[type=checkbox]{accent-color:#6366f1}.graph-btn{padding:5px 8px;font-size:12px;height:28px}.graph-detail-panel{top:0;right:0;left:0;bottom:0;width:100%;height:100%;border-left:none;box-shadow:none;border-radius:0;padding:16px;padding-bottom:max(16px,env(safe-area-inset-bottom,0px));z-index:40}.graph-detail-header{position:sticky;top:0;background:#fff;padding-bottom:8px;margin-bottom:8px;z-index:1}.graph-close-btn{width:40px;height:40px}.graph-detail-title{font-size:1.25rem;line-height:1.35;word-break:break-word}.graph-node-tooltip{max-width:min(280px,82vw)}.graph-progress-panel{width:calc(100% - 24px);max-width:none;padding:16px}}.mdocs-app-root{display:flex;flex-direction:column;height:100vh;max-height:100vh;min-height:0;overflow:hidden}.mdocs-shell{display:flex;flex-direction:column;flex:1 1 0;min-height:0;max-height:100%;overflow:hidden;position:relative}.mdocs-loading{height:100%;display:flex;align-items:center;justify-content:center}.mdocs-shell>.mdocs-layout,.mdocs-shell>.mdocs-main{flex:1 1 0;min-height:0;max-height:100%;height:100%;overflow:hidden}.mdocs-layout{display:flex;flex-direction:row;align-items:stretch;min-height:0;overflow:hidden}.mdocs-sidebar{background:#fafafa;border-right:1px solid var(--mdocs-border);display:flex;flex-direction:column;width:260px;flex:0 0 260px;height:100%;max-height:100%;min-width:0;min-height:0;align-self:stretch;overflow:hidden;transition:width .2s ease-out}.mdocs-sidebar-collapsed{width:64px;flex-basis:64px}.mdocs-sidebar-collapsed .mdocs-brand span,.mdocs-sidebar-collapsed .mdocs-sidebar-actions,.mdocs-sidebar-collapsed .mdocs-sidebar-list,.mdocs-sidebar-collapsed .mdocs-visitor-footer-name{opacity:0;pointer-events:none}.mdocs-sidebar-collapsed .mdocs-sidebar-actions{display:none}.mdocs-sidebar-header{padding:8px 16px;border-bottom:1px solid var(--mdocs-border);flex:0 0 auto;display:flex;align-items:center;justify-content:space-between}.mdocs-sidebar-collapsed .mdocs-sidebar-header{padding:8px 12px;justify-content:center}.mdocs-sidebar-collapsed .mdocs-brand-logo{margin-right:0}.mdocs-sidebar-collapsed .mdocs-brand span{display:none}.mdocs-brand{display:inline-flex;align-items:center;gap:8px;font-weight:600;font-size:24px;letter-spacing:.2px}.mdocs-brand-logo{width:24px;height:24px;display:block;flex-shrink:0}.mdocs-visitor-line{margin-top:2px;font-size:12px}.mdocs-lang-switch{margin-top:6px;font-size:12px;display:flex;align-items:center;gap:4px}.mdocs-lang-switch button{background:none;border:none;padding:0;font-size:12px;color:var(--mdocs-text-muted);cursor:pointer}.mdocs-lang-switch button.active{color:var(--mdocs-text);font-weight:600}.mdocs-lang-switch span{color:var(--mdocs-border)}.mdocs-sidebar-actions{padding:8px 10px 8px 12px;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:4px;flex:0 0 auto;border-bottom:1px solid var(--mdocs-border);position:relative;min-width:0}.mdocs-sidebar-create-btn{display:inline-flex;align-items:center;gap:3px;height:28px;padding:0 6px;border:1px solid var(--mdocs-border);border-radius:6px;background:var(--mdocs-bg);color:var(--mdocs-text);font-size:12px;line-height:1;cursor:pointer;flex:0 1 auto;min-width:0;white-space:nowrap}.mdocs-sidebar-create-btn:hover{border-color:var(--mdocs-accent);color:var(--mdocs-accent)}.mdocs-create-dropdown{position:absolute;left:24px;top:100%;background:var(--mdocs-bg);border:1px solid var(--mdocs-border);border-radius:8px;box-shadow:0 4px 16px #0000001f;z-index:100;min-width:160px;overflow:hidden}.mdocs-create-dropdown-item{display:flex;align-items:center;gap:8px;width:100%;padding:10px 16px;border:none;background:transparent;cursor:pointer;font-size:14px;color:var(--mdocs-text);text-align:left}.mdocs-create-dropdown-item:hover{background:var(--mdocs-accent-soft)}.mdocs-sidebar-icon{display:inline-flex;align-items:center;justify-content:center;line-height:0;cursor:pointer;opacity:.7;transition:opacity .15s,color .15s;border-radius:0;padding:0;flex:0 0 auto}.mdocs-sidebar-icon:hover{opacity:1;color:var(--mdocs-accent)}.mdocs-sidebar-list{flex:1 1 0;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:4px 8px 16px}.mdocs-doc-item{display:block;width:100%;text-align:left;padding:8px 10px;border-radius:var(--mdocs-radius);background:transparent;border:1px solid transparent;color:var(--mdocs-text);margin-bottom:2px}.mdocs-doc-item:hover{background:var(--mdocs-bg)}.mdocs-doc-item.active{background:var(--mdocs-accent-soft);border-color:var(--mdocs-accent-secondary);border-left:3px solid var(--mdocs-accent)}.mdocs-doc-item-title{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mdocs-doc-item-path{font-size:12px;color:var(--mdocs-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mdocs-tree-row{display:grid;grid-template-columns:12px 22px minmax(0,1fr) auto;column-gap:6px;align-items:center;width:100%;text-align:left;padding:6px 12px;border-radius:6px;background:transparent;border:1px solid transparent;color:var(--mdocs-text);margin-bottom:1px;font-size:13px;box-sizing:border-box}.mdocs-tree-row:hover{background:var(--mdocs-bg)}.mdocs-tree-row.active{background:#f2f3f5;border-left:3px solid var(--mdocs-accent);border-top:none;border-right:none;border-bottom:none}.mdocs-tree-row--graph-focus{background:#8b5cf61a;border-color:#a78bfa;border-left:3px solid #8b5cf6}.mdocs-tree-row--graph-focus .mdocs-tree-label{color:#6d28d9;font-weight:600}.mdocs-tree-select-target{background:var(--mdocs-bg);border-color:var(--mdocs-border)}.mdocs-tree-dragging{color:var(--mdocs-text-muted)}.mdocs-tree-row.active.mdocs-tree-dragging{color:var(--mdocs-text)}.mdocs-tree-drop-target{background:var(--mdocs-accent-soft);border-color:var(--mdocs-accent);outline:1px dashed var(--mdocs-accent)}.mdocs-sidebar-list.mdocs-tree-drop-root{outline:1px dashed var(--mdocs-accent);outline-offset:-2px;background:color-mix(in srgb,var(--mdocs-accent-soft) 40%,transparent)}.mdocs-tree-caret{width:20px;height:20px;display:flex;align-items:center;justify-content:center;color:var(--mdocs-text-muted);font-size:10px;cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:var(--mdocs-radius-sm);transition:background .15s ease}.mdocs-tree-caret:hover{background:var(--mdocs-bg)}.mdocs-tree-caret-spacer{width:12px}.mdocs-tree-icon{justify-self:center;font-size:11px;color:var(--mdocs-text-muted);width:auto;min-width:24px;text-align:center;padding:2px 5px;border-radius:var(--mdocs-radius-sm);background:var(--mdocs-bg);white-space:nowrap;margin-right:4px}.mdocs-tree-icon-html{color:#16a34a}.mdocs-tree-icon-sheet{color:#2563eb;font-size:10px;font-weight:700;letter-spacing:-.02em}.mdocs-tree-html-bracket{font-size:12px;font-weight:700;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1}.mdocs-tree-icon-dir{color:#6b7280;background:transparent;padding:0;justify-self:center;display:flex;align-items:center;justify-content:center}.mdocs-tree-icon-dir svg{display:block}.mdocs-sidebar-footer{padding:10px 16px;border-top:1px solid var(--mdocs-border);flex:0 0 auto;display:flex;align-items:center;gap:8px;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background .15s ease}.mdocs-sidebar-footer:hover{background:var(--mdocs-bg)}.mdocs-settings-sidebar-footer{padding:10px 16px;border-top:1px solid var(--mdocs-border);flex-shrink:0;font-size:13px;color:var(--mdocs-text-muted);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background .15s ease}.mdocs-settings-sidebar-footer:hover{background:var(--mdocs-bg);color:var(--mdocs-text)}.mdocs-agent-fab-wrap{position:fixed;z-index:200;width:36px;height:36px}.mdocs-agent-fab-wrap.dragging{z-index:220}.mdocs-agent-fab{width:36px;height:36px;border-radius:50%;background:var(--mdocs-surface, #fff);border:1px solid var(--mdocs-border, #e5e5e5);box-shadow:0 2px 8px #0000001f;display:flex;align-items:center;justify-content:center;cursor:grab;padding:0;touch-action:none;-webkit-user-select:none;user-select:none}.mdocs-agent-fab.dragging{cursor:grabbing;border-color:var(--mdocs-accent, #4d6bfe);box-shadow:0 4px 16px #4d6bfe4d}.mdocs-agent-fab:hover,.mdocs-agent-fab.open{border-color:var(--mdocs-accent, #4d6bfe);box-shadow:0 2px 12px #4d6bfe40}.mdocs-agent-fab--nodrag{cursor:pointer;touch-action:manipulation}.mdocs-agent-fab img{width:20px;height:20px;display:block;pointer-events:none}.mdocs-agent-fab-reset{position:absolute;top:calc(100% + 6px);left:50%;transform:translate(-50%);border:1px solid var(--mdocs-border, #e5e5e5);background:var(--mdocs-surface, #fff);color:var(--mdocs-text-muted, #666);font-size:11px;line-height:1;padding:4px 8px;border-radius:999px;cursor:pointer;box-shadow:0 1px 4px #00000014;white-space:nowrap}.mdocs-agent-fab-reset:hover{color:var(--mdocs-text);border-color:var(--mdocs-accent, #4d6bfe)}.mdocs-agent-panel{position:fixed;z-index:201;width:min(480px,calc(100vw - 72px));height:min(680px,calc(100vh - 80px));display:flex;flex-direction:column;background:#fff;border:1px solid #e8eaed;border-radius:14px;box-shadow:0 12px 40px #0f172a29;overflow:hidden}.mdocs-agent-panel--fullscreen{left:0;right:0;top:0;bottom:0;width:100%;height:100%;max-width:none;max-height:none;border:none;border-radius:0;box-shadow:none}.mdocs-agent-panel-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid #eef0f3;background:#fff;flex-shrink:0}.mdocs-agent-panel-title{display:inline-flex;align-items:center;gap:10px;font-size:15px;font-weight:600;color:#1f2329;min-width:0}.mdocs-agent-panel-title-logo{width:22px;height:22px;flex-shrink:0}.mdocs-agent-panel-context{position:absolute;right:50px;bottom:10px;width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;cursor:help;z-index:1;outline:none}.mdocs-agent-panel-context:hover,.mdocs-agent-panel-context:focus-visible{background:#f2f4f7}.mdocs-agent-panel-context-track{stroke:#d0d5dd}.mdocs-agent-panel-context-value{stroke:#3370ff;transition:stroke-dashoffset .25s ease}.mdocs-agent-panel-context-warn .mdocs-agent-panel-context-value{stroke:#d97706}.mdocs-agent-panel-context-danger .mdocs-agent-panel-context-value{stroke:#e11d48}.mdocs-agent-panel-context:after{content:attr(data-tooltip);position:absolute;right:0;bottom:calc(100% + 10px);padding:7px 10px;border-radius:8px;background:#1f2329;color:#fff;font-size:12px;font-weight:500;line-height:1.35;white-space:nowrap;opacity:0;pointer-events:none;transform:translateY(4px);transition:opacity .12s ease,transform .12s ease;box-shadow:0 6px 16px #0f172a33}.mdocs-agent-panel-context:hover:after,.mdocs-agent-panel-context:focus-visible:after{opacity:1;transform:translateY(0)}.mdocs-agent-panel-actions{display:inline-flex;align-items:center;gap:4px}.mdocs-agent-panel-icon-btn{width:32px;height:32px;padding:0;border:none;border-radius:8px;background:transparent;color:#8a919f;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}.mdocs-agent-panel-icon-btn:hover,.mdocs-agent-panel-icon-btn.active{background:#f2f4f7;color:#1f2329}.mdocs-agent-panel-body{flex:1;min-height:0;display:flex;flex-direction:column;padding:18px 18px 12px;background:#fafbfc}.mdocs-agent-panel-scroll-wrap{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}.mdocs-agent-panel-welcome{flex:1;min-height:0;overflow-y:auto;padding-right:2px}.mdocs-chat-jump-bottom{position:absolute;top:10px;left:50%;transform:translate(-50%);z-index:3;display:inline-flex;align-items:center;gap:4px;padding:5px 12px;border:1px solid #e5e7eb;border-radius:8px;background:#fff;color:#4e5969;font-size:12px;line-height:1;cursor:pointer;box-shadow:0 2px 8px #0f172a14}.mdocs-chat-jump-bottom:hover{color:#1f2329;border-color:#d0d5dd;background:#f8fafc}.mdocs-agent-panel-hello{margin:12px 0 10px;font-size:22px;font-weight:600;line-height:1.35;color:#1f2329}.mdocs-agent-panel-desc{margin:0 0 18px;font-size:14px;line-height:1.6;color:#646a73}.mdocs-agent-panel-chips{display:flex;flex-direction:column;gap:10px}.mdocs-agent-panel-chip{display:block;width:100%;text-align:left;padding:12px 14px;border-radius:10px;background:#fff;border:1px solid #e8eaed;font-size:14px;color:#1f2329;cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease}.mdocs-agent-panel-chip:hover:not(:disabled){border-color:#91b4ff;box-shadow:0 1px 4px #4080ff1f}.mdocs-agent-panel-chip:disabled{opacity:.6;cursor:not-allowed}.mdocs-agent-panel-status-warn{margin:0 0 12px;padding:10px 12px;border-radius:10px;background:#fff7ed;color:#9a3412;font-size:13px;line-height:1.45}.mdocs-agent-apikey-inline{margin:0 0 12px;padding:12px 14px;border-radius:10px;border:1px solid #fed7aa;background:#fff7ed}.mdocs-agent-apikey-inline-lead{margin:0 0 10px;font-size:13px;line-height:1.45;color:#9a3412}.mdocs-agent-apikey-inline-field{margin-bottom:10px}.mdocs-agent-apikey-inline-tabs{margin-bottom:12px}.mdocs-agent-apikey-inline-field.mdocs-agent-field span{display:block;margin-bottom:4px;font-size:12px;color:#9a3412;font-weight:500}.mdocs-agent-apikey-inline-field.mdocs-agent-field input{width:100%;box-sizing:border-box;padding:6px 10px;border:1px solid #fdba74;border-radius:6px;font-size:13px;background:#fff;color:#1f2937}.mdocs-agent-apikey-inline-field.mdocs-agent-field input:focus{outline:none;border-color:#f97316;box-shadow:0 0 0 2px #f9731626}.mdocs-agent-apikey-inline-protocol{display:grid;grid-template-columns:1fr 1fr;gap:0;padding:2px;border-radius:6px;background:#ffedd5;border:1px solid #fdba74}.mdocs-agent-apikey-inline-protocol button{border:none;background:transparent;padding:5px 8px;border-radius:5px;font-size:12px;font-weight:500;color:#9a3412;cursor:pointer;transition:background .15s,color .15s}.mdocs-agent-apikey-inline-protocol button.active{background:#fff;color:#7c2d12;box-shadow:0 1px 2px #7c2d121a}.mdocs-agent-apikey-inline-error{margin:0 0 8px;font-size:12px;color:var(--mdocs-danger, #c00)}.mdocs-agent-apikey-inline-save{padding:6px 14px;border:none;border-radius:6px;background:#6366f1;color:#fff;font-size:13px;cursor:pointer}.mdocs-agent-apikey-inline-save:hover:not(:disabled){background:#4f46e5}.mdocs-agent-apikey-inline-save:disabled{opacity:.55;cursor:not-allowed}.mdocs-agent-panel-messages{display:flex;flex-direction:column;gap:16px;padding:4px 0 12px}.mdocs-agent-panel-msg{display:flex;align-items:flex-start;gap:10px}.mdocs-agent-panel-msg-user{justify-content:flex-end}.mdocs-agent-panel-msg-assistant{justify-content:flex-start}.mdocs-agent-panel-avatar{width:32px;height:32px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;overflow:hidden;box-sizing:border-box}.mdocs-agent-panel-avatar-ai{background:#f0f5ff;border:1px solid #d6e4ff}.mdocs-agent-panel-avatar-ai img{width:18px;height:18px;display:block}.mdocs-agent-panel-avatar-user{background:#3370ff;color:#fff;font-size:13px;font-weight:600;line-height:1}.mdocs-agent-panel-msg-bubble{max-width:calc(100% - 42px);font-size:14px;line-height:1.65;word-break:break-word;min-width:0}.mdocs-agent-panel-msg-user .mdocs-agent-panel-msg-bubble{padding:10px 14px;border-radius:12px 12px 4px;background:#e8f3ff;color:#1f2329;white-space:pre-wrap}.mdocs-agent-panel-msg-assistant .mdocs-agent-panel-msg-bubble{padding:0;background:transparent;border:none;color:#1f2329}.mdocs-agent-panel-think-fold{margin:0 0 .5rem;padding:.35rem .55rem;border-radius:6px;background:color-mix(in srgb,var(--mdocs-border, #e5e7eb) 45%,transparent);font-size:.8rem;color:var(--mdocs-muted, #6b7280)}.mdocs-agent-panel-think-fold>summary{cursor:pointer;-webkit-user-select:none;user-select:none;list-style:none}.mdocs-agent-panel-think-fold>summary::-webkit-details-marker{display:none}.mdocs-agent-panel-think-fold>summary:before{content:"▸ ";display:inline-block;transition:transform .12s ease}.mdocs-agent-panel-think-fold[open]>summary:before{transform:rotate(90deg)}.mdocs-agent-panel-think-body{margin:.4rem 0 0;padding:0;white-space:pre-wrap;word-break:break-word;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.75rem;line-height:1.45;max-height:12rem;overflow:auto}.mdocs-agent-panel-thinking{display:inline-flex;align-items:center;gap:5px;padding:6px 2px;min-height:24px}.mdocs-agent-panel-thinking span{width:6px;height:6px;border-radius:50%;background:#8a919f;animation:mdocs-agent-dot-bounce 1.2s ease-in-out infinite}.mdocs-agent-panel-thinking span:nth-child(2){animation-delay:.18s}.mdocs-agent-panel-thinking span:nth-child(3){animation-delay:.36s}@keyframes mdocs-agent-dot-bounce{0%,60%,to{transform:translateY(0);opacity:.35}30%{transform:translateY(-5px);opacity:1}}.mdocs-agent-panel-md{color:#1f2329}.mdocs-agent-panel-timeline{display:flex;flex-direction:column;gap:10px;min-width:0}.mdocs-agent-panel-block{min-width:0}.mdocs-agent-panel-md>:first-child{margin-top:0}.mdocs-agent-panel-md>:last-child{margin-bottom:0}.mdocs-agent-panel-md h1,.mdocs-agent-panel-md h2,.mdocs-agent-panel-md h3,.mdocs-agent-panel-md h4{margin:.9em 0 .4em;font-weight:600;line-height:1.35;color:#1f2329}.mdocs-agent-panel-md h1{font-size:1.25em}.mdocs-agent-panel-md h2{font-size:1.15em}.mdocs-agent-panel-md h3,.mdocs-agent-panel-md h4{font-size:1.05em}.mdocs-agent-panel-md p{margin:.55em 0}.mdocs-agent-panel-md ul,.mdocs-agent-panel-md ol{margin:.45em 0;padding-left:1.35em}.mdocs-agent-panel-md li{margin:.25em 0}.mdocs-agent-panel-md li>p{margin:.2em 0}.mdocs-agent-panel-md strong{font-weight:600}.mdocs-agent-panel-md a{color:#3370ff;text-decoration:none}.mdocs-agent-panel-md a:hover{text-decoration:underline}.mdocs-agent-panel-md code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.9em;padding:.1em .35em;border-radius:4px;background:#f2f4f7;color:#c41d7f}.mdocs-agent-panel-md pre{margin:0;padding:10px 12px;border-radius:8px;background:#f5f6f8;overflow-x:auto}.mdocs-agent-panel-md-pre-wrap{position:relative;margin:.65em 0}.mdocs-agent-panel-md-pre-wrap pre{padding-right:36px}.mdocs-agent-panel-md-copy{position:absolute;top:6px;right:6px;z-index:1;display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:1px solid #e8eaed;border-radius:6px;background:#fff;color:#646a73;cursor:pointer}.mdocs-agent-panel-md-copy:hover{color:#1f2329;background:#f2f4f7}.mdocs-agent-mermaid{position:relative;margin:.65em 0;border:1px solid #e8eaed;border-radius:8px;background:#fafbfc;overflow:hidden}.mdocs-agent-mermaid-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 8px;border-bottom:1px solid #e8eaed;background:#f5f6f8}.mdocs-agent-mermaid-toggle{display:inline-flex;gap:2px;padding:2px;border-radius:6px;background:#e8eaed}.mdocs-agent-mermaid-toggle-btn{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border:none;border-radius:4px;background:transparent;color:#646a73;font-size:12px;line-height:1.2;cursor:pointer}.mdocs-agent-mermaid-toggle-btn.is-active{background:#fff;color:#1f2329;box-shadow:0 0 0 1px #d0d5dd}.mdocs-agent-mermaid-copy{position:static}.mdocs-agent-mermaid-diagram{padding:12px;overflow-x:auto;background:#fff}.mdocs-agent-mermaid-svg{display:flex;justify-content:center;line-height:0}.mdocs-agent-mermaid-svg-hit{width:100%;margin:0;padding:0;border:none;background:transparent;cursor:zoom-in;border-radius:4px}.mdocs-agent-mermaid-svg-hit:hover{outline:1px solid #d0d5dd;outline-offset:2px}.mdocs-agent-mermaid-svg-hit:focus-visible{outline:2px solid #3370ff;outline-offset:2px}.mdocs-agent-mermaid-svg-inner{display:flex;justify-content:center;line-height:0;pointer-events:none}.mdocs-agent-mermaid-svg svg,.mdocs-agent-mermaid-svg-inner svg{max-width:100%;height:auto}.mdocs-agent-mermaid-float{position:fixed;top:0;right:0;bottom:0;left:0;z-index:12000;display:flex;align-items:center;justify-content:center}.mdocs-agent-mermaid-float-backdrop{position:absolute;top:0;right:0;bottom:0;left:0;margin:0;padding:0;border:none;background:#0f172a8c;cursor:pointer}.mdocs-agent-mermaid-float-chrome{position:relative;z-index:1;display:flex;flex-direction:column;width:min(96vw,1100px);height:min(88vh,800px);border-radius:12px;background:#fff;box-shadow:0 16px 48px #0f172a47;overflow:hidden}.mdocs-agent-mermaid-float-tools{display:flex;align-items:center;gap:6px;padding:8px 10px;border-bottom:1px solid #e8eaed;background:#f5f6f8}.mdocs-agent-mermaid-float-btn{display:inline-flex;align-items:center;justify-content:center;min-width:32px;height:32px;padding:0 8px;border:1px solid #e8eaed;border-radius:6px;background:#fff;color:#1f2329;font-size:12px;cursor:pointer}.mdocs-agent-mermaid-float-btn:hover{background:#f2f4f7}.mdocs-agent-mermaid-float-scale{min-width:48px;text-align:center;font-size:12px;color:#646a73;font-variant-numeric:tabular-nums}.mdocs-agent-mermaid-float-stage{flex:1;position:relative;overflow:hidden;touch-action:none;cursor:grab;background:linear-gradient(90deg,#f0f2f5 1px,transparent 1px) 0 0 / 16px 16px,linear-gradient(#f0f2f5 1px,transparent 1px) 0 0 / 16px 16px,#fafbfc}.mdocs-agent-mermaid-float-stage.is-dragging{cursor:grabbing}.mdocs-agent-mermaid-float-canvas{position:absolute;left:50%;top:50%;transform-origin:center center;line-height:0;-webkit-user-select:none;user-select:none;pointer-events:none}.mdocs-agent-mermaid-float-canvas svg{display:block;max-width:none;height:auto}.mdocs-agent-mermaid-float-hint{margin:0;padding:6px 10px;border-top:1px solid #e8eaed;background:#fafbfc;color:#8f959e;font-size:12px;text-align:center}.mdocs-agent-mermaid-loading{padding:16px 8px;text-align:center;color:#8f959e;font-size:12.5px}.mdocs-agent-mermaid-error{padding:8px;color:#a8071a;font-size:12.5px}.mdocs-agent-mermaid-error p{margin:0 0 6px}.mdocs-agent-mermaid-error pre{margin:0;padding:8px;border-radius:6px;background:#fff2f0;color:#cf1322;white-space:pre-wrap;word-break:break-word;font-size:11.5px}.mdocs-agent-mermaid-code{margin:0}.mdocs-agent-mermaid-code pre{margin:0;border-radius:0;background:#f5f6f8}.mdocs-agent-panel-md pre code{padding:0;background:transparent;color:#1f2329;font-size:12.5px;line-height:1.5}.mdocs-agent-panel-md blockquote{margin:.55em 0;padding:.2em 0 .2em 12px;border-left:3px solid #d0d5dd;color:#646a73}.mdocs-agent-panel-md hr{margin:.9em 0;border:none;border-top:1px solid #e8eaed}.mdocs-agent-panel-md table{width:100%;border-collapse:collapse;margin:.65em 0;font-size:13px}.mdocs-agent-panel-md th,.mdocs-agent-panel-md td{border:1px solid #e8eaed;padding:6px 8px;text-align:left}.mdocs-agent-panel-md th{background:#f5f6f8;font-weight:600}.mdocs-agent-panel-sources{margin:0 0 12px;padding:10px 12px;border-radius:10px;background:#f2f4f7;font-size:13px}.mdocs-agent-panel-sources summary{cursor:pointer;font-weight:500;color:#646a73;list-style:none}.mdocs-agent-panel-sources summary::-webkit-details-marker{display:none}.mdocs-agent-panel-sources ol{margin:8px 0 0;padding-left:1.25em}.mdocs-agent-panel-sources li{margin:4px 0}.mdocs-agent-panel-sources a{color:#3370ff;text-decoration:none}.mdocs-agent-panel-sources a:hover{text-decoration:underline}.mdocs-agent-panel-tool-fold{margin:0;padding:8px 12px;border:1px solid #e8eaed;border-radius:10px;background:#f8f9fb;font-size:13px}.mdocs-agent-panel-tool-fold>summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-weight:500;color:#4e5969}.mdocs-agent-panel-tool-fold>summary::-webkit-details-marker{display:none}.mdocs-agent-panel-tool-fold>summary:before{content:"";width:0;height:0;border-left:5px solid #8a919f;border-top:4px solid transparent;border-bottom:4px solid transparent;flex-shrink:0}.mdocs-agent-panel-tool-fold[open]>summary:before{transform:rotate(90deg)}.mdocs-agent-panel-tool-fold-hint{margin-left:auto;font-size:12px;font-weight:400;color:#8a919f}.mdocs-agent-panel-sources-list{margin:8px 0 0;padding-left:1.25em}.mdocs-agent-panel-sources-list a{color:#3370ff;text-decoration:none}.mdocs-agent-panel-sources-list a:hover{text-decoration:underline}.mdocs-agent-panel-doc-table-wrap{margin:8px 0 0;padding:0;border:none;border-radius:0;background:transparent}.mdocs-agent-panel-doc-table-empty{margin:0;font-size:13px;color:#8a919f}.mdocs-agent-panel-doc-card-body{margin-top:8px}.mdocs-agent-panel-doc-card-path{margin:0;font-size:12px;color:#8a919f;word-break:break-all}.mdocs-agent-panel-doc-card-preview{margin:8px 0 0;font-size:13px;line-height:1.55;color:#4e5969;white-space:pre-wrap;word-break:break-word}.mdocs-agent-panel-doc-card-preview.muted{color:#8a919f}.mdocs-agent-panel-tool-notice{margin:0;padding:8px 12px;border-radius:8px;background:#f5f6f8;font-size:13px;color:#4e5969}.mdocs-agent-choice-card{padding:12px;border:1px solid #e8eaed;border-radius:10px;background:#fafbfc}.mdocs-agent-choice-card-done{opacity:.85}.mdocs-agent-choice-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-bottom:8px}.mdocs-agent-choice-title{margin:0;font-size:14px;font-weight:600;color:#1f2329}.mdocs-agent-choice-timer{flex-shrink:0;font-size:12px;font-variant-numeric:tabular-nums;color:#8a919f}.mdocs-agent-choice-progress{height:3px;border-radius:2px;background:#e8eaed;overflow:hidden;margin-bottom:10px}.mdocs-agent-choice-progress-bar{height:100%;width:100%;transform-origin:left center;background:#3370ff;transition:transform .1s linear}.mdocs-agent-choice-options{display:flex;flex-direction:column;gap:8px}.mdocs-agent-choice-option{text-align:left;border:1px solid #d0d3d9;background:#fff;border-radius:8px;padding:8px 12px;font:inherit;font-size:13px;color:#1f2329;cursor:pointer}.mdocs-agent-choice-option:hover:not(:disabled){border-color:#3370ff;color:#3370ff}.mdocs-agent-choice-option:disabled{cursor:not-allowed;opacity:.6}.mdocs-agent-choice-custom{display:flex;gap:8px;margin-top:10px}.mdocs-agent-choice-custom input{flex:1;min-width:0;border:1px solid #e8eaed;border-radius:8px;padding:8px 10px;font:inherit;font-size:13px}.mdocs-agent-choice-custom button{flex-shrink:0;border:none;border-radius:8px;padding:8px 12px;background:#3370ff;color:#fff;font:inherit;font-size:13px;cursor:pointer}.mdocs-agent-choice-custom button:disabled{opacity:.5;cursor:not-allowed}.mdocs-agent-choice-footer{margin-top:10px;display:flex;justify-content:flex-end}.mdocs-agent-choice-cancel{border:1px solid #d0d5dd;border-radius:8px;padding:6px 12px;background:#fff;color:#344054;font:inherit;font-size:13px;cursor:pointer}.mdocs-agent-choice-cancel:hover:not(:disabled){background:#f9fafb}.mdocs-agent-choice-cancel:disabled{opacity:.55;cursor:not-allowed}.mdocs-agent-choice-result{margin:0 0 8px;font-size:13px;color:#4e5969}.mdocs-agent-choice-result.muted{color:#8a919f}.mdocs-agent-skill-form-fields{display:flex;flex-direction:column;gap:10px;margin-top:10px}.mdocs-agent-skill-form-field{display:flex;flex-direction:column;gap:4px;font-size:12px;color:#646a73}.mdocs-agent-skill-form-field input,.mdocs-agent-skill-form-field textarea{width:100%;box-sizing:border-box;border:1px solid #d0d5dd;border-radius:8px;padding:8px 10px;font:inherit;color:#1f2329;background:#fff}.mdocs-agent-skill-form-field textarea{resize:vertical;min-height:120px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;line-height:1.45}.mdocs-agent-skill-form-error{margin:0;font-size:12px;color:#c00}.mdocs-agent-skill-form-actions{display:flex;justify-content:flex-end;gap:8px}.mdocs-agent-skill-form-actions button{border:none;border-radius:8px;padding:8px 14px;background:#3370ff;color:#fff;font:inherit;cursor:pointer}.mdocs-agent-skill-form-actions button.mdocs-agent-skill-form-cancel{background:#fff;color:#344054;border:1px solid #d0d5dd}.mdocs-agent-skill-form-actions button.mdocs-agent-skill-form-cancel:hover:not(:disabled){background:#f9fafb}.mdocs-agent-skill-form-actions button:disabled{opacity:.55;cursor:not-allowed}.mdocs-agent-panel-doc-table-title{margin:0 0 8px;font-size:13px;font-weight:600;color:#1f2329}.mdocs-agent-panel-doc-table{width:100%;border-collapse:collapse;font-size:13px}.mdocs-agent-panel-doc-table th,.mdocs-agent-panel-doc-table td{border:1px solid #e8eaed;padding:6px 8px;text-align:left;vertical-align:top}.mdocs-agent-panel-doc-table th{background:#f5f6f8;font-weight:600}.mdocs-agent-panel-doc-link{border:none;background:transparent;padding:0;color:#3370ff;text-decoration:none;font:inherit;cursor:pointer}.mdocs-agent-panel-doc-link:hover{text-decoration:underline}.mdocs-agent-panel-input-wrap{margin-top:8px;flex-shrink:0;background:#fff;border:1px solid #e8eaed;border-radius:14px;box-shadow:0 1px 2px #0f172a0a}.mdocs-agent-doc-ref{display:flex;align-items:center;gap:8px;margin:8px 8px 0;padding:8px 8px 8px 10px;border:1px solid #e4e7ec;border-radius:10px;background:#f9fafb}.mdocs-agent-doc-ref-icon{flex-shrink:0;color:#3370ff}.mdocs-agent-doc-ref-text{flex:1;min-width:0;line-height:1.3}.mdocs-agent-doc-ref-title{display:block;font-size:13px;font-weight:600;color:#1f2329;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mdocs-agent-doc-ref-path{display:block;margin-top:2px;font-size:11px;color:#98a2b3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mdocs-agent-doc-ref-unlink{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;margin-left:4px;padding:0;border:1px solid #d0d5dd;border-radius:8px;background:#fff;color:#667085;cursor:pointer}.mdocs-agent-doc-ref-unlink:hover:not(:disabled){border-color:#98a2b3;background:#f2f4f7;color:#344054}.mdocs-agent-doc-ref-unlink:disabled{opacity:.5;cursor:not-allowed}.mdocs-agent-panel-input-body{position:relative}.mdocs-agent-skill-ref{margin-top:8px;flex-shrink:0}.mdocs-agent-skill-ref-bar{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.mdocs-agent-skill-ref-anchor{position:relative;display:inline-flex}.mdocs-agent-skill-ref-toggle{border:1px solid #d0d5dd;background:#f8fafc;border-radius:999px;padding:4px 10px;font-size:12px;cursor:pointer;color:#344054}.mdocs-agent-skill-ref-toggle:hover:not(:disabled),.mdocs-agent-skill-ref-toggle-open{border-color:#98a2b3;background:#fff}.mdocs-agent-skill-ref-toggle:disabled{opacity:.5;cursor:not-allowed}.mdocs-agent-skill-popover{position:absolute;left:0;bottom:calc(100% + 6px);z-index:40;min-width:260px;max-width:min(360px,85vw);max-height:280px;display:flex;flex-direction:column;background:#fff;border:1px solid #e4e7ec;border-radius:10px;box-shadow:0 8px 24px #0f172a1f;overflow:hidden}.mdocs-agent-skill-popover-hint{padding:8px 12px 4px;font-size:11px;color:#98a2b3;flex-shrink:0}.mdocs-agent-skill-popover-list{list-style:none;margin:0;padding:4px;overflow-y:auto}.mdocs-agent-skill-popover-item{display:flex;align-items:flex-start;gap:8px;width:100%;text-align:left;border:none;background:transparent;border-radius:8px;padding:8px 10px;cursor:pointer;color:#1f2329}.mdocs-agent-skill-popover-item:hover:not(:disabled),.mdocs-agent-skill-popover-item:focus-visible{background:#f2f4f7;outline:none}.mdocs-agent-skill-popover-item-on{background:#eff8ff}.mdocs-agent-skill-popover-item-on:hover:not(:disabled){background:#e0f2fe}.mdocs-agent-skill-popover-item:disabled{opacity:.45;cursor:not-allowed}.mdocs-agent-skill-popover-check{width:14px;flex-shrink:0;font-size:12px;line-height:1.4;color:#175cd3}.mdocs-agent-skill-popover-text{display:flex;flex-direction:column;gap:2px;min-width:0}.mdocs-agent-skill-popover-name{font-size:13px;font-weight:600;color:#101828;line-height:1.3}.mdocs-agent-skill-popover-desc{font-size:12px;color:#667085;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.mdocs-agent-skill-popover-desc-muted{color:#98a2b3}.mdocs-agent-skill-chip{border:1px solid #e4e7ec;background:#fff;border-radius:999px;padding:3px 10px;font-size:12px;cursor:pointer;color:#475467}.mdocs-agent-skill-chip-on{border-color:#84caff;background:#eff8ff;color:#175cd3}.mdocs-agent-msg-skills{font-size:11px;color:#667085;margin-bottom:4px}.mdocs-agent-skills-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:0}.mdocs-agent-skills-panel{flex-shrink:0}.mdocs-agent-skills-count{display:inline-flex;align-items:center;justify-content:center;margin-left:10px;min-width:22px;height:22px;padding:0 7px;border-radius:999px;background:#eef2f6;color:#475467;font-size:12px;font-weight:600;vertical-align:middle}.mdocs-agent-skills-lead{margin:0 0 16px}.mdocs-agent-skills-error{margin:0 0 12px;padding:8px 12px;border-radius:8px;background:#fef3f2;color:#b42318;font-size:13px}.mdocs-agent-skills-form{margin-bottom:16px;padding:16px;border:1px solid #e4e7ec;border-radius:10px;background:#f9fafb}.mdocs-agent-skills-form-head{margin-bottom:12px;font-size:14px;color:#1f2329}.mdocs-agent-skills-field{display:flex;flex-direction:column;gap:6px;margin-bottom:12px;font-size:13px;color:#344054}.mdocs-agent-skills-field input,.mdocs-agent-skills-field textarea{width:100%;box-sizing:border-box;border:1px solid #d0d5dd;border-radius:8px;padding:8px 10px;font:inherit;background:#fff;color:#1f2329}.mdocs-agent-skills-field textarea{resize:vertical;min-height:140px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;line-height:1.5}.mdocs-agent-skills-input-invalid{border-color:#f97066!important;background:#fffbfa!important}.mdocs-agent-skills-hint{font-size:12px;color:#98a2b3}.mdocs-agent-skills-hint-bad{font-size:12px;color:#b42318}.mdocs-agent-skills-empty{display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:8px 0 4px}.mdocs-agent-skills-empty p{margin:0;color:#667085;font-size:13px}.mdocs-agent-skills-item{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:12px 4px;border-top:1px solid #eef2f6}.mdocs-agent-skills-item:first-child{border-top:none;padding-top:4px}.mdocs-agent-skills-item-active{background:#f8fafc;margin:0 -8px;padding-left:12px;padding-right:12px;border-radius:8px}.mdocs-agent-skills-item-main{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}.mdocs-agent-skills-item-title-row{display:flex;align-items:center;gap:8px;min-width:0}.mdocs-agent-skills-name{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:13px;font-weight:600;color:#175cd3;background:#eff8ff;border-radius:6px;padding:2px 8px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mdocs-agent-skills-badge-warn{flex-shrink:0;font-size:11px;font-weight:600;color:#b54708;background:#fffaeb;border:1px solid #fedf89;border-radius:999px;padding:1px 8px}.mdocs-agent-skills-desc{font-size:13px;color:#667085;line-height:1.4;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.mdocs-agent-skills-item-actions{display:flex;gap:8px;flex-shrink:0}.mdocs-agent-panel-input{width:100%;resize:none;border:none;border-radius:14px;padding:12px 92px 12px 12px;font:inherit;font-size:14px;line-height:1.5;background:transparent;color:#1f2329;box-sizing:border-box;outline:none;min-height:68px}.mdocs-agent-panel-input:disabled{opacity:.7;cursor:not-allowed}.mdocs-agent-panel-send{position:absolute;right:10px;bottom:10px;width:32px;height:32px;border:none;border-radius:10px;background:#3370ff;color:#fff;cursor:pointer;font-size:15px;line-height:1}.mdocs-agent-panel-send:disabled{background:#c3d4ff;cursor:not-allowed}.mdocs-agent-panel-send-stop{background:#5c6570;font-size:11px}.mdocs-agent-panel-send-stop:hover{background:#3d4450}.mdocs-agent-panel-footnote{margin:10px 0 0;font-size:12px;color:#8a919f;text-align:center}.mdocs-agent-panel-history{flex:1;min-height:0;display:flex;flex-direction:column;padding:12px 14px 16px;gap:10px;background:#fafbfc;overflow:hidden}.mdocs-agent-panel-history-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-shrink:0;font-size:14px;font-weight:600;color:#1f2329}.mdocs-agent-panel-history-back{border:none;background:transparent;color:#3370ff;font-size:13px;cursor:pointer;padding:4px 0}.mdocs-agent-panel-history-back:hover{text-decoration:underline}.mdocs-agent-panel-history-empty{margin:24px 0 0;font-size:15px;color:#1f2329;text-align:center}.mdocs-agent-panel-history-hint{margin:0;font-size:13px;color:#8a919f;text-align:center}.mdocs-agent-panel-history-list{list-style:none;margin:0;padding:0;overflow-y:auto;display:flex;flex-direction:column;gap:6px}.mdocs-agent-panel-history-item{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;padding:10px 12px;border:1px solid #e8eaed;border-radius:10px;background:#fff;cursor:pointer;color:#1f2329}.mdocs-agent-panel-history-item:hover:not(:disabled){border-color:#91b4ff}.mdocs-agent-panel-history-item.active{border-color:#3370ff;background:#f0f5ff}.mdocs-agent-panel-history-item:disabled{opacity:.6;cursor:not-allowed}.mdocs-agent-panel-history-title{flex:1;min-width:0;font-size:13px;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mdocs-agent-panel-history-time{flex-shrink:0;font-size:12px;color:#8a919f}.mdocs-visitor-avatar{width:26px;height:26px;border-radius:50%;background:var(--mdocs-accent);color:#fff;font-size:12px;font-weight:600;display:flex;align-items:center;justify-content:center;flex-shrink:0}.mdocs-visitor-footer-name{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;color:var(--mdocs-text)}.mdocs-config-tree{flex:1;padding:8px;overflow-y:auto}.mdocs-config-item{padding:8px 12px;border-radius:6px;font-size:13px;color:var(--mdocs-text);cursor:pointer;transition:background .12s ease}.mdocs-config-item:hover:not(.active){background:var(--mdocs-bg)}.mdocs-config-item.active{background:var(--mdocs-accent-soft);font-weight:500;cursor:default}.mdocs-settings{flex:1;min-height:0;overflow-y:auto;padding:32px 40px;background:#f9fafb;-webkit-overflow-scrolling:touch}.mdocs-settings-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}.mdocs-settings-title{margin:0;font-size:20px;font-weight:600}.mdocs-agent-config-title{display:inline-flex;align-items:center;gap:10px}.mdocs-agent-config-panel{width:100%;flex-shrink:0}.mdocs-agent-config-card{width:100%;box-sizing:border-box}.mdocs-agent-config-lead{margin:0 0 20px;font-size:13px;line-height:1.55;color:var(--mdocs-text-muted, #64748b)}.mdocs-agent-config-muted{margin:0;font-size:14px;color:var(--mdocs-text-muted, #64748b)}.mdocs-agent-config-ok{margin:12px 0 0;font-size:13px;color:#16a34a}.mdocs-agent-config-error{margin:0;font-size:13px;color:var(--mdocs-danger, #dc2626)}.mdocs-agent-form{display:flex;flex-direction:column;gap:16px}.mdocs-agent-field{display:flex;flex-direction:column;gap:6px;margin:0}.mdocs-agent-field>span{font-size:13px;font-weight:600;color:var(--mdocs-text, #0f172a)}.mdocs-agent-field input,.mdocs-agent-field select,.mdocs-agent-field .mdocs-mini-select,.mdocs-agent-field .mdocs-mini-select-trigger{width:100%;box-sizing:border-box}.mdocs-agent-field .mdocs-mini-select{display:block}.mdocs-agent-field .mdocs-mini-select-trigger{min-width:0;min-height:38px;padding:8px 12px;font-size:inherit;justify-content:space-between;border-radius:var(--mdocs-radius, 6px)}.mdocs-agent-field .mdocs-mini-select-trigger:focus-visible{border-color:var(--mdocs-accent, #3b82f6);box-shadow:0 0 0 3px var(--mdocs-accent-ring, rgba(59, 130, 246, .15));outline:none}.mdocs-agent-field-hint{margin:0;font-size:12px;color:var(--mdocs-text-muted, #64748b);line-height:1.45}.mdocs-agent-kind-tabs{display:grid;grid-template-columns:1fr 1fr;gap:0;padding:3px;border-radius:10px;background:#f1f5f9;border:1px solid #e2e8f0}.mdocs-agent-kind-tabs button{border:none;background:transparent;padding:8px 12px;border-radius:8px;font-size:13px;font-weight:500;color:#64748b;cursor:pointer;transition:background .15s,color .15s,box-shadow .15s}.mdocs-agent-kind-tabs button.active{background:#fff;color:#0f172a;box-shadow:0 1px 3px #0f172a14}.mdocs-agent-summary{margin:0;display:flex;flex-direction:column;gap:0}.mdocs-agent-summary-row{display:grid;grid-template-columns:88px 1fr;gap:12px;padding:10px 0;border-bottom:1px solid #f1f5f9;align-items:baseline}.mdocs-agent-summary-row:last-child{border-bottom:none}.mdocs-agent-summary dt{margin:0;font-size:12px;font-weight:500;color:#64748b}.mdocs-agent-summary dd{margin:0;font-size:14px;color:#0f172a;word-break:break-word}.mdocs-agent-badge{display:inline-block;margin-left:8px;padding:1px 8px;border-radius:999px;font-size:11px;font-weight:500;color:#6366f1;background:#eef2ff;vertical-align:middle}.mdocs-agent-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:13px}.mdocs-agent-advanced{border-top:1px solid #f1f5f9;padding-top:4px}.mdocs-agent-advanced summary{cursor:pointer;font-size:13px;font-weight:500;color:#64748b;padding:8px 0;list-style:none;-webkit-user-select:none;user-select:none}.mdocs-agent-advanced summary::-webkit-details-marker{display:none}.mdocs-agent-advanced[open] summary{margin-bottom:12px;color:#0f172a}.mdocs-agent-advanced .mdocs-agent-field+.mdocs-agent-field{margin-top:12px}.mdocs-agent-config-panel+.mdocs-agent-skills-panel{margin-top:28px}.mdocs-agent-config-logo{width:28px;height:28px;display:block}.mdocs-agent-config-field .mdocs-settings-card-title{display:block;margin-bottom:6px}.mdocs-agent-config-select{width:100%;max-width:320px}.mdocs-agent-config-select .mdocs-mini-select,.mdocs-agent-config-select .mdocs-mini-select-trigger{width:100%}.mdocs-agent-config-select .mdocs-mini-select-trigger{justify-content:space-between;padding:6px 12px;font-size:inherit;min-width:0}.mdocs-agent-config-readonly{margin:6px 0 0;font-size:14px;color:var(--mdocs-text, #111827);word-break:break-all}.mdocs-agent-config-apikey{display:flex;align-items:stretch;gap:8px}.mdocs-agent-config-apikey input{flex:1;min-width:0;min-height:38px}.mdocs-agent-config-eye{flex-shrink:0;align-self:stretch;display:inline-flex;align-items:center;justify-content:center;min-width:40px;padding:0 10px;border:1px solid var(--mdocs-border, #e2e8f0);border-radius:var(--mdocs-radius, 6px);background:var(--mdocs-surface, #fff);color:var(--mdocs-text-muted, #64748b);cursor:pointer;font-size:12px}.mdocs-agent-config-eye:hover{background:var(--mdocs-bg-hover, #f5f5f5)}.mdocs-agent-config-actions{display:flex;gap:8px;align-items:center}.mdocs-agent-config-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}.mdocs-agent-config-item{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding:12px 14px;border:1px solid #e2e8f0;border-radius:10px;background:#fafbfc}.mdocs-agent-config-item-default{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:11px;color:#64748b;cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap}.mdocs-agent-config-item-default input{margin:0;cursor:pointer}.mdocs-agent-config-item-main{min-width:0}.mdocs-agent-config-item-main strong{display:inline;font-size:14px;font-weight:600;color:#0f172a;word-break:break-word}.mdocs-agent-config-item-meta{margin:4px 0 0;font-size:12px;color:#64748b}.mdocs-agent-config-item-actions{display:flex;gap:6px;flex-shrink:0}.mdocs-agent-config-default-check{display:flex;align-items:center;gap:8px;font-size:13px;color:#334155;cursor:pointer;-webkit-user-select:none;user-select:none}.mdocs-agent-config-default-check input{margin:0}.mdocs-settings-cards{display:flex;flex-direction:column;gap:16px}.mdocs-settings-card{background:#fff;border-radius:12px;padding:20px 24px;box-shadow:0 1px 3px #00000014}.mdocs-settings-secret-result{margin-top:16px;padding:14px 16px;border-radius:10px;border:1px solid transparent}.mdocs-settings-secret-result--ok{border-color:var(--mdocs-success, #4caf50);background:var(--mdocs-success-soft, #f1f8f1)}.mdocs-settings-secret-result--warn{border-color:#e67e22;background:#fef9f0}.mdocs-settings-secret-result-head{display:flex;flex-direction:column;gap:4px}.mdocs-settings-secret-value{margin-top:8px;word-break:break-all;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.875rem;color:var(--mdocs-text, #1f2937)}.mdocs-settings-secret-code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:1.25rem;letter-spacing:.1em;background:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:10px 14px;margin-top:8px;-webkit-user-select:all;user-select:all}.mdocs-settings-secret-result-actions{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}.mdocs-settings-copy-feedback{margin-top:10px;font-size:.875rem}.mdocs-settings-copy-feedback--ok{color:var(--mdocs-success-text, #2e7d32)}.mdocs-settings-copy-feedback--err{color:var(--mdocs-error-text, #c62828)}.mdocs-settings-search{width:100%;padding:10px 14px;border:1px solid var(--mdocs-border);border-radius:8px;font-size:14px;color:var(--mdocs-text);background:#fff;margin-bottom:16px;outline:none;transition:border-color .15s}.mdocs-settings-search:focus{border-color:var(--mdocs-primary)}.mdocs-settings-search::placeholder{color:var(--mdocs-text-muted)}.mdocs-settings-table{width:100%;border-collapse:collapse;font-size:14px}.mdocs-settings-table thead th{text-align:left;padding:12px 8px;font-weight:600;color:var(--mdocs-text-muted);border-bottom:1px solid var(--mdocs-border);font-size:12px;text-transform:uppercase;letter-spacing:.5px}.mdocs-settings-table thead th:last-child{text-align:right}.mdocs-settings-table tbody td{padding:12px 8px;border-bottom:1px solid var(--mdocs-border-light);color:var(--mdocs-text)}.mdocs-settings-table tbody tr:last-child td{border-bottom:none}.mdocs-settings-table tbody tr:hover td{background:var(--mdocs-bg-hover)}.mdocs-settings-table-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.mdocs-settings-page-info{font-size:13px;color:var(--mdocs-text-muted);white-space:nowrap}.mdocs-settings-pagination{display:flex;align-items:center;justify-content:center;gap:8px;padding:16px 0 8px}.mdocs-settings-pagination button:disabled{opacity:.4;cursor:not-allowed}.mdocs-my-docs .mdocs-settings-title{font-size:18px;font-weight:600;color:#111827}.mdocs-my-docs .mdocs-settings-card{padding:24px 28px;border-radius:12px;box-shadow:0 4px 12px #0000000d}.mdocs-my-docs-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:nowrap;padding-bottom:16px;border-bottom:1px solid #f3f4f6}.mdocs-my-docs-search{position:relative;flex:1 1 120px;min-width:0}.mdocs-my-docs-search svg{position:absolute;left:12px;top:50%;width:16px;height:16px;color:#9ca3af;transform:translateY(-50%);pointer-events:none}.mdocs-my-docs-search input,.mdocs-my-docs-select{height:36px;margin:0;border:1px solid #e5e7eb;border-radius:8px;background:#fff;color:#111827;font-size:13px;outline:none;box-shadow:none}.mdocs-my-docs-search input{width:100%;padding:0 12px 0 36px}.mdocs-my-docs-select{flex:0 0 auto;width:auto;padding:0 28px 0 12px;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M2.2 4.3 6 8l3.8-3.7-.8-.8L6 6.4 3 3.5z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}.mdocs-my-docs-search input:focus,.mdocs-my-docs-select:focus,.mdocs-my-docs-search input:focus-visible,.mdocs-my-docs-select:focus-visible{border-color:#10b981;outline:none;box-shadow:0 0 0 3px #10b9811f}.mdocs-my-docs .mdocs-settings-table thead th{padding:8px 12px;font-size:13px;font-weight:600;letter-spacing:0;text-transform:none;color:#4b5563;background:#f9fafb;border-bottom:1px solid #f3f4f6}.mdocs-my-docs .mdocs-settings-table tbody td{padding:8px 12px;color:#6b7280;border-bottom:1px solid #f3f4f6;vertical-align:middle}.mdocs-my-docs .mdocs-settings-table tbody tr:hover td{background:#f3f4f6}.mdocs-my-docs-title{color:#111827;font-weight:600;cursor:pointer}.mdocs-my-docs-date{color:#9ca3af;font-variant-numeric:tabular-nums;white-space:nowrap}.mdocs-my-docs-search-meta{padding:4px 2px 10px;font-size:13px;color:#6b7280}.mdocs-embedding-index-snippet{margin-top:4px;font-size:12px;color:#6b7280;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.mdocs-my-docs-group td{padding:6px 12px;font-size:12px;font-weight:600;color:#4b5563;background:#f9fafb}.mdocs-my-docs-group:hover td{background:#f9fafb}.mdocs-my-docs-actions{text-align:right;white-space:nowrap}.mdocs-my-docs-actions button.ghost.small{padding:4px 8px;font-size:12px;color:#6b7280;background:transparent;border-color:transparent}.mdocs-my-docs-actions button.ghost.small:hover{color:#111827;background:#f3f4f6;border-color:transparent}.mdocs-my-docs-actions button.primary.small{padding:4px 10px;font-size:12px;border-radius:6px;background:#10b981;border-color:#10b981}.mdocs-my-docs-actions button.primary.small:hover{background:#059669;border-color:#059669}.mdocs-my-docs-empty{padding:40px 0;text-align:center;color:#9ca3af}.mdocs-my-docs-footer{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:12px}.mdocs-my-docs-footer .mdocs-settings-pagination{padding:0;justify-content:flex-end}.mdocs-my-docs-footer button.secondary{border-color:#e5e7eb;color:#4b5563;background:#fff}.mdocs-my-docs-footer button.secondary:hover{background:#f9fafb;border-color:#d1d5db}.mdocs-my-docs-jump{display:inline-flex;align-items:center;gap:6px;color:#6b7280;font-size:13px}.mdocs-my-docs-jump input{width:56px;height:28px;margin:0;padding:0 6px;text-align:center;border:1px solid #e5e7eb;border-radius:6px;font-size:13px;color:#111827}.mdocs-my-docs-jump input:focus,.mdocs-my-docs-jump input:focus-visible{border-color:#10b981;outline:none;box-shadow:0 0 0 3px #10b9811f}button.small{padding:6px 12px;font-size:12px}.mdocs-settings-card-title{font-weight:600;font-size:14px;color:var(--mdocs-text);display:inline-flex;align-items:center;gap:8px}.mdocs-settings-hero{background:#f0fdf4;border-left:4px solid #22c55e;box-shadow:none}.mdocs-settings-hero-icon{font-size:16px;flex-shrink:0}.mdocs-settings-badge{display:inline-block;font-size:11px;font-weight:500;color:#16a34a;background:#dcfce7;padding:1px 8px;border-radius:9999px;line-height:1.6}.mdocs-settings-item{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;cursor:pointer}.mdocs-settings-item-info{display:flex;flex-direction:column;gap:6px;min-width:0}.mdocs-settings-item-desc{font-size:13px;color:#6b7280;line-height:1.5}.mdocs-settings-lang{display:flex;align-items:center;gap:4px;font-size:13px}.mdocs-settings-lang button{background:none;border:1px solid var(--mdocs-border);padding:6px 16px;font-size:13px;color:var(--mdocs-text-muted);cursor:pointer;border-radius:6px}.mdocs-settings-lang button.active{color:var(--mdocs-text);font-weight:600;border-color:var(--mdocs-accent);background:var(--mdocs-accent-soft)}.mdocs-settings-lang span{color:var(--mdocs-border)}.mdocs-settings-draft-link{display:flex;align-items:center;justify-content:space-between;width:100%;border:none;cursor:pointer;text-align:left;font-size:14px;color:var(--mdocs-text);background:#fff;border-radius:12px;padding:20px 24px;box-shadow:0 1px 3px #00000014;transition:box-shadow .15s ease}.mdocs-settings-draft-link:hover{box-shadow:0 2px 8px #0000001f}.mdocs-settings-draft-link-text{font-weight:500}.mdocs-settings-draft-arrow{font-size:20px;color:var(--mdocs-text-muted);font-weight:300}.mdocs-settings-draft-empty{color:#9ca3af;font-size:13px;text-align:center;padding:16px 24px}.mdocs-tree-folder-row{box-sizing:border-box;cursor:pointer}.mdocs-tree-folder-select{min-width:0;overflow:hidden;margin:0;padding:0;text-align:left}.mdocs-tree-folder-row:hover .mdocs-tree-label{text-decoration:underline}.mdocs-tree-label{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.mdocs-tree-row>.mdocs-tree-label,.mdocs-tree-row>.mdocs-tree-folder-select{min-width:0;overflow:hidden}.mdocs-context-menu{position:fixed;min-width:200px;padding:4px;z-index:50;display:flex;flex-direction:column}.mdocs-context-item{text-align:left;border:none;background:transparent;padding:6px 10px;border-radius:6px;font-size:13px;color:var(--mdocs-text)}.mdocs-context-item:hover{background:var(--mdocs-bg)}.mdocs-context-item.danger{color:var(--mdocs-error)}.mdocs-context-item.danger:hover{background:var(--mdocs-error-soft)}.mdocs-context-divider{height:1px;background:var(--mdocs-border);margin:4px 8px;flex-shrink:0}.mdocs-document-editor-root{box-sizing:border-box;padding-left:50px;padding-right:50px;padding-top:20px;height:auto!important;min-height:100%}.mdocs-outline-siderail>div>div:first-child{border-left:1px solid var(--mdocs-border)!important;margin-top:24px!important;margin-bottom:24px!important;padding-left:16px!important;padding-right:16px!important;padding-top:20px!important}.mdocs-main{display:flex;flex-direction:column;flex:1 1 0;min-width:0;min-height:0;max-height:100%;height:100%;overflow:hidden;position:relative;background:#fff}.mdocs-empty{flex:1;display:flex;align-items:center;justify-content:center}.mdocs-editor{display:flex;flex-direction:column;flex:1;min-height:0}.mdocs-editor-toolbar{display:flex;align-items:center;gap:8px;padding:12px 20px;border-bottom:1px solid var(--mdocs-border);background:var(--mdocs-surface);flex-shrink:0}.mdocs-editor-title-input{width:200px;max-width:32vw;flex:0 0 auto;min-width:0;box-sizing:border-box}.mdocs-editor-permission-select{max-width:160px;flex:0 1 auto;min-width:100px;height:35px;padding:0 8px;border:1px solid var(--mdocs-border);border-radius:6px;background:var(--mdocs-surface);font-size:13px;color:var(--mdocs-text)}.mdocs-editor-toolbar-spacer{flex:1;min-width:4px}.mdocs-editor-toolbar-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}.mdocs-editor-toolbar-leading{display:flex;align-items:center;gap:8px;min-width:0;flex-shrink:0}.mdocs-editor-toolbar-trailing{display:flex;align-items:center;gap:8px;flex-shrink:0;min-width:0}.mdocs-doc-info-dropdown{position:absolute;top:calc(100% + 4px);right:0;min-width:220px;z-index:100;padding:8px 0;background:var(--mdocs-surface, #fff);border:1px solid var(--mdocs-border, #e5e5e5);border-radius:8px;box-shadow:0 2px 8px #00000026}.mdocs-editor-content-area :focus-visible{outline:none}.mdocs-editor-content-area{min-width:0!important}.mdocs-editor-content-area .editor_table_scrollable_wrapper{min-width:0!important;max-width:100%!important}.mdocs-editor-content-area img{max-width:100%!important}.mdocs-editor-scroll-host{box-sizing:border-box;flex:1;min-width:0;min-height:0;overflow:auto;padding:16px 16px 0}.mdocs-editor-scroll-host:after{content:"";display:block;height:80px}.mdocs-editor-body{flex:1;display:grid;grid-template-columns:1fr;min-height:0}.mdocs-editor h1{font-size:24px;font-weight:700;margin-top:0;margin-bottom:.5em}.mdocs-editor h2{font-size:20px;font-weight:600;margin-top:1.5em;margin-bottom:.5em}.mdocs-editor h3{font-size:18px;font-weight:500;margin-top:1.2em;margin-bottom:.5em}.mdocs-editor p,.mdocs-editor li,.mdocs-editor blockquote{line-height:1.6;margin-bottom:1em}.mdocs-editor ol,.mdocs-editor ul{padding-left:24px;margin-bottom:1em}.mdocs-editor li{margin-bottom:.5em}strong.label{color:var(--mdocs-accent);font-weight:600;margin-right:8px}.mdocs-save-dot{width:8px;height:8px;border-radius:50%;display:inline-block;flex-shrink:0;transition:background .3s ease}.mdocs-save-dot.saved{background:var(--mdocs-success)}.mdocs-save-dot.unsaved{background:var(--mdocs-warning)}.mdocs-save-dot.saving{background:var(--mdocs-warning);animation:save-dot-pulse 1s infinite}@keyframes save-dot-pulse{0%{opacity:1}50%{opacity:.5}to{opacity:1}}.mdocs-save-indicator{display:inline-flex;align-items:center;gap:4px;font-size:12px;color:var(--mdocs-text-muted)}.mdocs-settings-toggle{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:8px 0;cursor:pointer}.mdocs-toggle{width:40px;height:22px;border-radius:11px;background:var(--mdocs-border);border:none;padding:2px;cursor:pointer;transition:background .2s ease;flex-shrink:0;position:relative}.mdocs-toggle.active{background:var(--mdocs-accent)}.mdocs-toggle-knob{display:block;width:18px;height:18px;border-radius:50%;background:#fff;transition:transform .2s ease;box-shadow:var(--mdocs-shadow)}.mdocs-toggle.active .mdocs-toggle-knob{transform:translate(18px)}.mdocs-conflict-notice{position:fixed;bottom:20px;right:20px;max-width:360px;padding:12px 16px;background:var(--mdocs-warning-soft);border:1px solid var(--mdocs-warning);border-radius:var(--mdocs-radius-lg);box-shadow:var(--mdocs-shadow-md);z-index:30;font-size:13px;color:var(--mdocs-text)}.mdocs-conflict-notice-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.mdocs-conflict-notice p{margin:0;font-size:12px;color:var(--mdocs-text-muted);line-height:1.5}.mdocs-drawer-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0000004d;z-index:30;animation:backdrop-in .2s ease}.mdocs-drawer{position:fixed;top:0;right:0;bottom:0;width:440px;max-width:100vw;background:#fff;z-index:31;display:flex;flex-direction:column;box-shadow:-4px 0 16px #0000001a;animation:drawer-slide-in .25s ease}@keyframes drawer-slide-in{0%{transform:translate(100%)}to{transform:translate(0)}}.mdocs-drawer-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 24px 16px;border-bottom:1px solid var(--mdocs-border);flex-shrink:0}.mdocs-drawer-header-text{display:flex;flex-direction:column;gap:4px;min-width:0}.mdocs-drawer-title{margin:0;font-size:18px;font-weight:600;display:inline-flex;align-items:center;gap:8px}.mdocs-drawer-count-badge{display:inline-block;font-size:11px;font-weight:500;color:#16a34a;background:#dcfce7;padding:1px 8px;border-radius:9999px;line-height:1.6}.mdocs-drawer-subtitle{font-size:13px;color:var(--mdocs-text-muted)}.mdocs-drawer-close-btn{border:none;background:transparent;font-size:22px;color:var(--mdocs-text-muted);cursor:pointer;padding:0 4px;line-height:1;flex-shrink:0}.mdocs-drawer-close-btn:hover{color:var(--mdocs-text)}.mdocs-drawer-body{flex:1;overflow-y:auto;min-height:0}.mdocs-drawer-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:48px 24px;text-align:center}.mdocs-drawer-empty-icon{width:40px;height:40px;border-radius:50%;background:#dcfce7;color:#16a34a;display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:600}.mdocs-drawer-empty-text{margin:0;font-size:14px;color:var(--mdocs-text-muted)}.mdocs-drawer-items{display:flex;flex-direction:column}.mdocs-drawer-item{display:flex;align-items:center;gap:12px;padding:14px 24px;border-bottom:1px solid var(--mdocs-border)}.mdocs-drawer-item-icon{font-size:18px;flex-shrink:0;width:24px;text-align:center}.mdocs-drawer-item-info{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.mdocs-drawer-item-name{font-weight:500;font-size:14px;color:var(--mdocs-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mdocs-drawer-item-meta{font-size:12px;color:var(--mdocs-text-muted)}.mdocs-drawer-item-error{font-size:12px;color:var(--mdocs-danger)}.mdocs-drawer-item-failed{background:var(--mdocs-danger-bg, rgba(220, 38, 38, .04))}.mdocs-drawer-item-actions{display:flex;gap:6px;flex-shrink:0}.mdocs-btn-ghost{border:none;background:transparent;padding:4px 10px;font-size:13px;cursor:pointer;border-radius:6px;font-weight:500;transition:background .12s ease}.mdocs-btn-ghost:disabled{opacity:.5;cursor:not-allowed}.mdocs-btn-ghost-primary{color:var(--mdocs-accent)}.mdocs-btn-ghost-primary:hover:not(:disabled){background:var(--mdocs-accent-soft)}.mdocs-btn-ghost-danger{color:var(--mdocs-error)}.mdocs-btn-ghost-danger:hover:not(:disabled){background:var(--mdocs-error-soft)}.mdocs-drawer-footer{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:16px 24px;border-top:1px solid var(--mdocs-border);flex-shrink:0}.mdocs-drawer-toast{position:absolute;bottom:80px;left:24px;right:24px;padding:10px 16px;border-radius:var(--mdocs-radius);font-size:13px;z-index:1;animation:toast-in .3s ease}.mdocs-drawer-toast--success{background:var(--mdocs-success-soft);color:var(--mdocs-success-text)}.mdocs-drawer-toast--error{background:var(--mdocs-error-soft);color:var(--mdocs-error-text)}.mdocs-toast{position:absolute;right:20px;bottom:20px;padding:10px 14px;background:#f3f4f6;color:#374151;border:1px solid #d1d5db;border-radius:10px;font-size:12px;z-index:20;animation:toast-in .3s ease;box-shadow:0 4px 12px #00000014}.mdocs-toast.success{background:var(--mdocs-success-soft);color:var(--mdocs-success-text)}.mdocs-toast.warning{background:var(--mdocs-warning-soft);color:var(--mdocs-warning-text)}.mdocs-toast.error{background:var(--mdocs-error-soft);color:var(--mdocs-error-text)}@keyframes toast-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.mdocs-dialog-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0006;display:flex;align-items:center;justify-content:center;padding:24px;z-index:200;animation:backdrop-in .2s ease}@keyframes backdrop-in{0%{opacity:0}to{opacity:1}}.mdocs-dialog{width:min(420px,100%);padding:24px;animation:dialog-in .3s ease}@keyframes dialog-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.mdocs-dialog h1{margin:0 0 4px;font-size:18px;font-weight:600}.mdocs-dialog p{margin:0 0 16px;color:var(--mdocs-text-muted);font-size:13px}.mdocs-dialog form,.mdocs-dialog-form{display:flex;flex-direction:column;gap:12px}.mdocs-dialog-label{display:flex;flex-direction:column;gap:6px;font-size:13px}.mdocs-dialog-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:4px}.mdocs-dialog-error{color:var(--mdocs-error);font-size:12px}.mdocs-message-dialog{width:min(360px,92vw);padding:20px 24px 16px}.mdocs-message-dialog-title{margin:0 0 8px;font-size:16px;font-weight:600;color:var(--mdocs-text)}.mdocs-message-dialog-body{margin:0 0 16px;color:var(--mdocs-text-muted);font-size:14px;line-height:1.5;word-break:break-word}.mdocs-message-dialog-actions{display:flex;justify-content:flex-end}.mdocs-agent-close-confirm-backdrop{position:absolute;top:0;right:0;bottom:0;left:0;z-index:20;display:flex;align-items:center;justify-content:center;padding:16px;background:#0f172a59;border-radius:inherit}.mdocs-agent-close-confirm{width:min(320px,100%);background:#fff;border-radius:12px;box-shadow:0 12px 40px #0f172a2e}.mdocs-agent-close-confirm-actions{gap:8px}.mdocs-notice{position:absolute;top:12px;left:50%;transform:translate(-50%);z-index:10;max-width:560px;padding:12px 16px;display:flex;align-items:center;gap:10px}.mdocs-notice code{background:var(--mdocs-bg);padding:2px 6px;border-radius:6px;font-size:12px}.mdocs-shell-single{grid-template-columns:1fr}.mdocs-welcome{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:32px}.mdocs-welcome-icon{display:flex;align-items:center;justify-content:center;color:var(--mdocs-text-disabled);margin-bottom:8px}.mdocs-welcome h1{margin:0;font-size:28px;font-weight:600;letter-spacing:.2px}.mdocs-welcome-lead{max-width:360px;text-align:center;line-height:1.45}.mdocs-welcome-domain{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:center}.mdocs-welcome-domain-label{font-size:13px}.mdocs-welcome-actions{display:flex;gap:10px;margin-top:8px}.mdocs-welcome-recent{margin-top:24px;display:flex;flex-direction:column;gap:4px;min-width:240px;align-items:stretch}.mdocs-toolbar{position:sticky;top:0;z-index:10;background:var(--mdocs-surface);border-bottom:1px solid var(--mdocs-border)}.mdocs-sidebar-bookmark,.mdocs-sidebar-logout{transition:color .15s ease,background .15s ease}.mdocs-sidebar-bookmark:hover,.mdocs-sidebar-logout:hover{color:var(--mdocs-text, #111827)!important;background:var(--mdocs-bg-hover, #f3f4f6)!important}.mdocs-bookmark-btn{transition:transform .15s ease,opacity .15s ease}.mdocs-bookmark-btn:hover:not(:disabled){transform:scale(1.1)}.mdocs-tooltip{position:relative}.mdocs-tooltip:before{content:attr(data-tooltip);position:absolute;bottom:calc(100% + 8px);left:50%;transform:translate(-50%);padding:6px 10px;border-radius:6px;background:#000000d9;color:#fff;font-size:12px;white-space:nowrap;opacity:0;visibility:hidden;z-index:1000;pointer-events:none}.mdocs-tooltip:after{content:"";position:absolute;bottom:calc(100% + 1px);left:50%;transform:translate(-50%);border:4px solid transparent;border-top-color:#000000d9;opacity:0;visibility:hidden;z-index:1000;pointer-events:none}.mdocs-tooltip:hover:before,.mdocs-tooltip:hover:after{opacity:1;visibility:visible}.mdocs-tooltip-bottom:before{top:calc(100% + 8px);bottom:auto}.mdocs-tooltip-bottom:after{top:calc(100% + 1px);bottom:auto;border-top-color:transparent;border-bottom-color:#000000d9}.mdocs-bookmark-filterbar{display:flex;gap:8px;margin-bottom:12px}.mdocs-bookmark-filterbar input{flex:1;min-width:0;padding:6px 10px;border:1px solid var(--mdocs-border, #e5e7eb);border-radius:6px;font-size:13px;background:var(--mdocs-bg, #f9fafb);color:var(--mdocs-text, #111827);outline:none;transition:border-color .15s ease,box-shadow .15s ease}.mdocs-bookmark-filterbar input:focus{border-color:var(--mdocs-accent, #3b82f6);box-shadow:0 0 0 2px #3b82f626}.mdocs-bookmark-filterbar select{padding:6px 10px;border:1px solid var(--mdocs-border, #e5e7eb);border-radius:6px;font-size:13px;background:var(--mdocs-bg, #f9fafb);color:var(--mdocs-text, #111827);outline:none;cursor:pointer;max-width:140px}.mdocs-bookmark-filterbar select:focus{border-color:var(--mdocs-accent, #3b82f6);box-shadow:0 0 0 2px #3b82f626}.mdocs-mini-select-trigger{display:inline-flex;align-items:center;gap:4px;padding:3px 6px;border:1px solid var(--mdocs-border, #e5e5e5);border-radius:6px;font-size:12px;background:var(--mdocs-surface, #fff);color:var(--mdocs-text, #111827);cursor:pointer;min-width:72px;white-space:nowrap}.mdocs-mini-select-trigger:hover{background:var(--mdocs-bg-hover, #f5f5f5)}.mdocs-mini-select-chevron{transition:transform .15s ease}.mdocs-mini-select-chevron.open{transform:rotate(180deg)}.mdocs-mini-select-menu{position:absolute;top:calc(100% + 4px);left:0;z-index:1000;min-width:100%;padding:4px}.mdocs-mini-select-option{width:100%;text-align:left;padding:6px 10px;border:none;background:transparent;border-radius:4px;font-size:12px;cursor:pointer}.mdocs-mini-select-option:hover{background:var(--mdocs-hover-bg, #f5f5f5)}.mdocs-mini-select-option.active{background:var(--mdocs-accent-bg, #eff6ff);color:var(--mdocs-accent, #3b82f6)}.mdocs-bookmark-table{width:100%;border-collapse:separate;border-spacing:0 2px;table-layout:fixed}.mdocs-bookmark-table th{padding:6px 12px;font-size:.75rem;color:var(--mdocs-text-muted, #999);font-weight:600;text-align:left;border-bottom:1px solid var(--mdocs-border, #eee)}.mdocs-bookmark-table td{padding:10px 12px;font-size:.8125rem;color:var(--mdocs-text-muted, #999);vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mdocs-bookmark-table .mdocs-bookmark-col-title{color:var(--mdocs-text, #111827);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mdocs-bookmark-table .mdocs-bookmark-col-action{width:72px;white-space:nowrap;overflow:visible}.mdocs-bookmark-table tbody tr{border-radius:6px;transition:background .15s ease}.mdocs-bookmark-table tbody tr:hover td{background:var(--mdocs-hover-bg, #f5f5f5)}.mdocs-bookmark-removing{opacity:0;transform:translate(20px);transition:opacity .25s ease,transform .25s ease}.mdocs-recovery-dialog{width:min(520px,92vw)}.mdocs-recovery-tree-label{display:block}.mdocs-recovery-tree{max-height:180px;overflow-y:auto;border:1px solid var(--mdocs-border);border-radius:6px;padding:4px 0;background:var(--mdocs-bg, #fff)}.mdocs-recovery-tree .mdocs-sidebar-list{padding:0}.mdocs-ai-write-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1200;display:flex;flex-direction:column;background:#fff;color:#1f2329}.mdocs-ai-write-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;border-bottom:1px solid #e8eaed;flex-shrink:0}.mdocs-ai-write-header-left{display:flex;align-items:center;gap:12px;min-width:0}.mdocs-ai-write-title-logo{width:22px;height:22px;flex-shrink:0}.mdocs-ai-write-title{border:1px solid #e8eaed;border-radius:8px;padding:6px 10px;font:inherit;min-width:160px;max-width:360px}.mdocs-ai-write-header-actions{display:flex;gap:8px}.mdocs-ai-write-primary{background:#3370ff;color:#fff;border:none;border-radius:8px;padding:6px 12px;cursor:pointer}.mdocs-ai-write-body{flex:1;min-height:0;display:grid;grid-template-columns:minmax(280px,38%) 1fr}.mdocs-ai-write-chat{display:flex;flex-direction:column;border-right:1px solid #e8eaed;min-width:0;min-height:0}.mdocs-ai-write-chat-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-bottom:1px solid #e8eaed;flex-shrink:0}.mdocs-ai-write-chat-toolbar-label{font-size:13px;font-weight:600;color:#4e5969}.mdocs-ai-write-chat-toolbar-actions{display:flex;align-items:center;gap:2px}.mdocs-ai-write-history{flex:1;min-height:0;position:relative;border-bottom:none}.mdocs-ai-write-chat-scroll-wrap{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}.mdocs-ai-write-chat-messages{flex:1;overflow:auto;padding:16px}.mdocs-ai-write-hint,.mdocs-ai-write-diff-empty{color:#8a919f;font-size:13px;line-height:1.55}.mdocs-ai-write-thinking{margin:0 0 .5rem;padding:.35rem .55rem;border-radius:6px;background:color-mix(in srgb,var(--mdocs-border, #e5e7eb) 45%,transparent);font-size:.8rem;color:var(--mdocs-muted, #6b7280)}.mdocs-ai-write-thinking>summary{cursor:pointer;-webkit-user-select:none;user-select:none;list-style:none}.mdocs-ai-write-thinking>summary::-webkit-details-marker{display:none}.mdocs-ai-write-thinking>summary:before{content:"▸ ";display:inline-block;transition:transform .12s ease}.mdocs-ai-write-thinking[open]>summary:before{transform:rotate(90deg)}.mdocs-ai-write-thinking-body{margin:.4rem 0 0;padding:0;white-space:pre-wrap;word-break:break-word;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.75rem;line-height:1.45;max-height:12rem;overflow:auto}.mdocs-ai-write-timeline{display:flex;flex-direction:column;gap:8px}.mdocs-ai-write-timeline .mdocs-agent-panel-tool-notice{align-self:flex-start}.mdocs-ai-write-msg{margin-bottom:12px;font-size:14px;line-height:1.6}.mdocs-ai-write-msg-user{padding:8px 12px;border-radius:10px;background:#e8f3ff;white-space:pre-wrap}.mdocs-ai-write-error{margin:0 16px 8px;color:#cf1322;font-size:13px}.mdocs-ai-write-input-row{display:flex;gap:8px;padding:12px 16px;border-top:1px solid #e8eaed}.mdocs-ai-write-input-row textarea{flex:1;resize:none;border:1px solid #e8eaed;border-radius:10px;padding:10px 12px;font:inherit}.mdocs-ai-write-stop{background:#5c6570;color:#fff;border:none;border-radius:8px;padding:8px 14px;cursor:pointer;align-self:flex-end;margin-bottom:2px}.mdocs-ai-write-md-pane{display:flex;flex-direction:column;min-width:0;min-height:0}.mdocs-ai-write-md-tabs{display:flex;gap:4px;padding:8px 12px;border-bottom:1px solid #e8eaed}.mdocs-ai-write-md-tabs button{border:none;background:transparent;padding:6px 10px;border-radius:6px;cursor:pointer;color:#646a73}.mdocs-ai-write-md-tabs button.active{background:#f2f4f7;color:#1f2329;font-weight:600}.mdocs-ai-write-diff{flex:1;overflow:auto;padding:12px 16px}.mdocs-ai-write-diff-toolbar{display:flex;align-items:center;gap:8px;margin-bottom:12px}.mdocs-ai-write-diff-toolbar .mdocs-ai-write-diff-accept-all{background:#f6ffed;border:1px solid #b7eb8f;color:#389e0d;border-radius:6px;padding:4px 12px;cursor:pointer;font-weight:500}.mdocs-ai-write-diff-toolbar .mdocs-ai-write-diff-reject-all{background:#fff2f0;border:1px solid #ffccc7;color:#cf1322;border-radius:6px;padding:4px 12px;cursor:pointer;font-weight:500}.mdocs-ai-write-diff-toolbar .mdocs-ai-write-diff-accept-all:hover{background:#d9f7be;border-color:#95de64}.mdocs-ai-write-diff-toolbar .mdocs-ai-write-diff-reject-all:hover{background:#ffd8d2;border-color:#ffa39e}.mdocs-ai-write-diff-count{margin-right:auto;font-size:13px;color:#646a73}.mdocs-ai-write-hunk-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}.mdocs-ai-write-hunk{border:1px solid #e8eaed;border-radius:10px;overflow:hidden;background:#fafbfc}.mdocs-ai-write-hunk-actions{display:flex;gap:8px;padding:8px 10px;border-bottom:1px solid #e8eaed;background:#fff}.mdocs-ai-write-hunk-accept{background:#f6ffed;border:1px solid #b7eb8f;color:#389e0d;border-radius:6px;padding:4px 10px;cursor:pointer}.mdocs-ai-write-hunk-reject{background:#fff2f0;border:1px solid #ffccc7;color:#cf1322;border-radius:6px;padding:4px 10px;cursor:pointer}.mdocs-ai-write-hunk-pre{margin:0;padding:8px 10px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12.5px;line-height:1.5;overflow-x:auto}.mdocs-ai-write-line.del{background:#fff1f0;color:#a8071a}.mdocs-ai-write-line.add{background:#f6ffed;color:#237804}.mdocs-ai-write-editor{flex:1;width:100%;border:none;resize:none;padding:16px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:13px;line-height:1.55;box-sizing:border-box}.mdocs-ai-write-inline{position:relative;flex:1;overflow:auto;padding:8px 0 72px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12.5px;line-height:1.55}.mdocs-ai-write-inline-same{margin:0;padding:0 16px 0 12px;white-space:pre-wrap;word-break:break-word}.mdocs-ai-write-inline-hunk{position:relative;margin:0;padding:0 16px 0 12px;border:none;border-radius:0;background:transparent}.mdocs-ai-write-inline-hunk-add .mdocs-ai-write-line.add{background:#2ea0431f}.mdocs-ai-write-inline-hunk-del .mdocs-ai-write-line.del{background:#f851491f}.mdocs-ai-write-inline-hunk-mod .mdocs-ai-write-line.del{background:#f851491a}.mdocs-ai-write-inline-hunk-mod .mdocs-ai-write-line.add{background:#2ea0431a}.mdocs-ai-write-inline-hunk.is-active{outline:1px solid rgba(51,112,255,.35);outline-offset:-1px;background:#3370ff08}.mdocs-ai-write-rail{flex:0 0 3px;align-self:stretch;border-radius:1px;margin-right:8px}.mdocs-ai-write-line.del .mdocs-ai-write-rail{background:#f85149}.mdocs-ai-write-line.add .mdocs-ai-write-rail{background:#2ea043}.mdocs-ai-write-line.ctx .mdocs-ai-write-rail{background:transparent}.mdocs-ai-write-line{display:flex;align-items:stretch;gap:0;min-height:1.55em;margin:0 -16px 0 -12px;padding:0 16px 0 12px}.mdocs-ai-write-code{flex:1;min-width:0;white-space:pre-wrap;word-break:break-word}.mdocs-ai-write-line-readonly{-webkit-user-select:text;user-select:text;cursor:default}.mdocs-ai-write-inline-edit{flex:1;min-width:0;margin:0;padding:0;border:none;resize:none;outline:none;background:transparent;color:inherit;font:inherit;line-height:inherit;white-space:pre-wrap;word-break:break-word;overflow:hidden;field-sizing:content}.mdocs-ai-write-inline-edit:focus{outline:1px solid rgba(51,112,255,.35);outline-offset:1px;border-radius:2px}.mdocs-ai-write-line.add .mdocs-ai-write-inline-edit{background:#2ea0430f}.mdocs-ai-write-hunk-hover{position:absolute;top:6px;right:12px;z-index:2;display:flex;gap:6px;padding:4px;border-radius:8px;background:#ffffffeb;border:1px solid #e8eaed;box-shadow:0 4px 12px #0f172a14}.mdocs-ai-write-hunk-hover[hidden]{display:none!important}.mdocs-ai-write-hunk-accept{background:#1a7f37;border:none;color:#fff;border-radius:6px;padding:4px 10px;cursor:pointer;font-size:12px}.mdocs-ai-write-hunk-reject{background:#fff;border:1px solid #d0d7de;color:#24292f;border-radius:6px;padding:4px 10px;cursor:pointer;font-size:12px}.mdocs-ai-write-hunk-pre{margin:0;padding:0;font:inherit;background:transparent;overflow:visible}.mdocs-ai-write-float-nav{position:absolute;right:16px;bottom:16px;display:inline-flex;align-items:center;gap:6px;padding:6px 8px;border-radius:10px;background:#fffffff5;border:1px solid #e8eaed;box-shadow:0 8px 24px #0f172a1f;z-index:3;font-size:12px;color:#4e5969}.mdocs-ai-write-float-nav button{border:1px solid #e8eaed;background:#fff;border-radius:6px;padding:4px 8px;cursor:pointer;font:inherit}.mdocs-ai-write-float-nav .mdocs-ai-write-hunk-accept,.mdocs-ai-write-float-nav .mdocs-ai-write-hunk-reject{border:none}.mdocs-ai-write-diff-toolbar button.active{background:#f2f4f7;font-weight:600}@media (max-width: 768px){.mdocs-layout--reader{position:relative}.mdocs-layout--reader .mdocs-mobile-nav-scrim{position:fixed;top:0;right:0;bottom:0;left:0;z-index:45;border:none;padding:0;margin:0;background:#0f172a59;cursor:pointer}.mdocs-layout--reader .mdocs-sidebar--drawer,.mdocs-layout--reader .mdocs-sidebar--drawer-open{position:fixed;top:0;left:0;bottom:0;z-index:50;width:min(86vw,300px);max-width:300px;flex-shrink:0;transition:transform .22s ease;box-shadow:8px 0 28px #0f172a24}.mdocs-layout--reader .mdocs-sidebar--drawer{transform:translate(-105%);pointer-events:none}.mdocs-layout--reader .mdocs-sidebar--drawer-open{transform:translate(0);pointer-events:auto}.mdocs-layout--reader .mdocs-main{width:100%}.mdocs-document-editor-root{padding-left:5px;padding-right:5px}.mdocs-editor-scroll-host{padding-left:0;padding-right:0}.mdocs-layout--reader .mdocs-editor-content-area>div{border:none!important;border-radius:0!important;box-shadow:none!important}.mdocs-layout--reader .mdocs-outline-siderail{display:none!important}.mdocs-editor--reader{position:relative}.mdocs-editor-toolbar--float,.mdocs-editor-toolbar--docked{display:flex;flex-direction:row;align-items:center;gap:6px;width:100%;box-sizing:border-box;overflow:visible}.mdocs-editor-toolbar--float.mdocs-editor-toolbar--stacked,.mdocs-editor-toolbar--docked.mdocs-editor-toolbar--stacked{flex-direction:column;align-items:stretch;gap:0}.mdocs-editor-toolbar--float{position:absolute;top:0;left:0;right:0;z-index:30;padding:6px 8px;border:none;border-bottom:1px solid color-mix(in srgb,var(--mdocs-border) 80%,transparent);border-radius:0;background:color-mix(in srgb,var(--mdocs-surface) 98%,transparent);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-shadow:0 1px 3px #0f172a0f}.mdocs-editor-toolbar--docked{position:sticky;top:0;left:0;z-index:30;padding:6px 8px;border:none;border-radius:0;border-bottom:1px solid var(--mdocs-border);background:var(--mdocs-surface);box-shadow:none;transform:none}.mdocs-reader-top-row{display:flex;align-items:center;gap:6px;width:100%}.mdocs-reader-actions-row{display:flex;align-items:center;gap:8px;padding:6px 0 2px;overflow-x:auto;-webkit-overflow-scrolling:touch}.mdocs-editor-toolbar--float .mdocs-editor-toolbar-leading,.mdocs-editor-toolbar--docked .mdocs-editor-toolbar-leading{touch-action:none;cursor:grab;flex:1 1 auto;min-width:0;max-width:none;padding-right:0}.mdocs-editor-toolbar--float .mdocs-editor-toolbar-leading:active{cursor:grabbing}.mdocs-editor-toolbar--float .mdocs-editor-title-input,.mdocs-editor-toolbar--docked .mdocs-editor-title-input{width:auto;max-width:none;flex:1 1 auto;min-width:0;border:none;background:transparent;box-shadow:none;padding:4px;font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mdocs-editor-toolbar--float .mdocs-domain-select-wrapper,.mdocs-editor-toolbar--docked .mdocs-domain-select-wrapper{flex:0 1 auto;min-width:72px;max-width:min(26vw,108px)}.mdocs-editor-toolbar--float .mdocs-domain-select-trigger,.mdocs-editor-toolbar--docked .mdocs-domain-select-trigger{height:32px;padding:0 6px;font-size:12px}.mdocs-editor-toolbar--float .mdocs-reader-action-btn,.mdocs-editor-toolbar--docked .mdocs-reader-action-btn{padding:4px 10px;font-size:12px;line-height:1.2;white-space:nowrap;border-radius:999px;min-width:auto;flex-shrink:0}.mdocs-reader-sync-btn{flex-shrink:0;width:32px;height:32px;padding:0;justify-content:center;border-radius:8px}.mdocs-reader-more-menu{position:relative;flex-shrink:0}.mdocs-reader-more-btn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:none;border-radius:8px;background:transparent;color:var(--mdocs-text-secondary, #6b7280);cursor:pointer}.mdocs-reader-more-btn:hover{background:var(--mdocs-hover-bg, #f0f0f0)}.mdocs-reader-more-dropdown{position:absolute;top:calc(100% + 6px);right:0;min-width:240px;max-width:min(88vw,300px);padding:8px 0;z-index:120;box-shadow:0 4px 16px #0f172a1f}.mdocs-reader-more-item{width:100%;display:flex;align-items:center;gap:8px;padding:10px 16px;border:none;background:transparent;font:inherit;font-size:14px;color:var(--mdocs-text);text-align:left;cursor:pointer}.mdocs-reader-more-item:hover{background:var(--mdocs-hover-bg, #f5f5f5)}.mdocs-reader-more-item--danger{color:var(--mdocs-danger, #dc2626)}.mdocs-reader-more-divider{height:1px;margin:6px 0;background:var(--mdocs-border, #e5e5e5)}.mdocs-editor-toolbar--float .secondary,.mdocs-editor-toolbar--float .mdocs-reader-nav-btn,.mdocs-editor-toolbar--docked .secondary,.mdocs-editor-toolbar--docked .mdocs-reader-nav-btn{border:none;background:transparent;box-shadow:none}.mdocs-reader-nav-btn{display:inline-flex;align-items:center;justify-content:center;padding:4px;border-radius:8px;color:var(--mdocs-text);cursor:pointer;flex-shrink:0}.mdocs-reader-nav-btn:hover{background:var(--mdocs-hover-bg, #f0f0f0)}.mdocs-reader-expand-btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid var(--mdocs-border);border-radius:6px;background:transparent;color:var(--mdocs-text-secondary);cursor:pointer;flex-shrink:0;transition:background .15s}.mdocs-reader-expand-btn:hover{background:var(--mdocs-hover-bg, #f0f0f0)}.mdocs-editor--reader:not(.mdocs-editor--reader-docked) .mdocs-editor-content-area{padding-top:48px}.mdocs-editor--reader-docked .mdocs-editor-content-area{padding-top:0}.mdocs-reader-float-pill{position:absolute;top:12px;left:50%;transform:translate(-50%);z-index:20;display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border:1px solid var(--mdocs-border);border-radius:999px;background:color-mix(in srgb,var(--mdocs-surface) 96%,transparent);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-shadow:0 1px 3px #0f172a0f;color:var(--mdocs-text);font:inherit;font-size:14px;font-weight:600;cursor:pointer}.mdocs-welcome{position:relative}.mdocs-layout--settings .mdocs-settings-mobile-bar{display:flex;align-items:center;gap:8px;flex-shrink:0;padding:8px 12px;border-bottom:1px solid var(--mdocs-border);background:var(--mdocs-surface)}.mdocs-layout--settings .mdocs-settings-mobile-bar-title{font-size:15px;font-weight:600;color:var(--mdocs-text);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mdocs-layout--settings .mdocs-settings{padding:20px 16px}.mdocs-layout--settings .mdocs-settings-header{display:none}.mdocs-layout--settings .mdocs-settings-card{padding:16px;border-radius:10px}.mdocs-my-docs .mdocs-settings-card{padding:16px}.mdocs-my-docs-toolbar{flex-wrap:wrap}.mdocs-my-docs-select{flex:1 1 140px;width:auto;min-width:0}.mdocs-layout--settings .mdocs-settings-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:0 -16px;padding:0 16px}.mdocs-layout--settings .mdocs-settings-table{min-width:500px}.mdocs-layout--settings .mdocs-settings-item{flex-wrap:wrap;gap:8px}.mdocs-layout--settings .mdocs-settings-lang{flex-wrap:wrap}}.mdocs-tree-hover-actions{display:flex;align-items:center;gap:1px;justify-self:end;flex-shrink:0;width:46px;justify-content:flex-end;visibility:hidden;pointer-events:none}.mdocs-tree-row:hover .mdocs-tree-hover-actions,.mdocs-tree-row:focus-within .mdocs-tree-hover-actions,.mdocs-tree-row.active .mdocs-tree-hover-actions{visibility:visible;pointer-events:auto}.mdocs-tree-icon-btn{width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;border:none;background:transparent;border-radius:4px;cursor:pointer;padding:0;color:var(--mdocs-text-secondary, #6b7280);transition:color .15s,background .15s}.mdocs-tree-icon-btn:hover{color:var(--mdocs-text);background:color-mix(in srgb,var(--mdocs-text) 8%,transparent)}.mdocs-tree-icon-btn svg{display:block;flex-shrink:0}.mdocs-doc-search-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:220;display:flex;align-items:flex-start;justify-content:center;padding:min(18vh,120px) 16px 24px;background:#00000059;animation:backdrop-in .15s ease}.mdocs-doc-search-panel{width:min(560px,100%);max-height:min(70vh,520px);display:flex;flex-direction:column;background:var(--mdocs-surface, #fff);border:1px solid var(--mdocs-border, #e5e5e5);border-radius:10px;box-shadow:0 12px 40px #0000002e;overflow:visible;animation:dialog-in .18s ease}.mdocs-doc-search-bar{position:relative;z-index:2;display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid var(--mdocs-border, #e5e5e5);color:var(--mdocs-text-muted, #888);flex:0 0 auto;border-radius:10px 10px 0 0;background:var(--mdocs-surface, #fff)}.mdocs-doc-search-domain{position:relative;flex:0 0 auto}.mdocs-doc-search-mode{flex:0 0 auto;height:28px;padding:0 20px 0 8px;border:1px solid var(--mdocs-border, #e5e5e5);border-radius:6px;background:transparent;color:var(--mdocs-text, #111);font-size:12px;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M2.2 4.3 6 8l3.8-3.7-.8-.8L6 6.4 3 3.5z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 5px center;cursor:pointer}.mdocs-doc-search-mode:focus-visible{border-color:#10b981;outline:none}.mdocs-doc-search-domain-trigger{display:inline-flex;align-items:center;gap:4px;max-width:180px;min-width:108px;height:28px;padding:0 8px;border:1px solid var(--mdocs-border, #e5e5e5);border-radius:6px;background:transparent;color:var(--mdocs-text);font-size:12px;cursor:pointer}.mdocs-doc-search-domain-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mdocs-doc-search-domain-menu{position:absolute;top:calc(100% + 4px);right:0;z-index:30;width:min(280px,80vw);max-height:min(320px,50vh);overflow:auto;padding:6px;background:var(--mdocs-surface, #fff);border:1px solid var(--mdocs-border, #e5e5e5);border-radius:8px;box-shadow:0 8px 24px #00000029}.mdocs-doc-search-domain-filter{width:100%;box-sizing:border-box;margin-bottom:4px;padding:6px 8px;border:1px solid var(--mdocs-border, #e5e5e5);border-radius:6px;background:transparent;color:var(--mdocs-text);font-size:12px;outline:none}.mdocs-doc-search-domain-option{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:7px 8px;border:none;border-radius:6px;background:transparent;color:var(--mdocs-text);font-size:13px;text-align:left;cursor:pointer}.mdocs-doc-search-domain-option-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mdocs-doc-search-domain-option-tag{display:inline-flex;flex-shrink:0;align-items:center;color:var(--mdocs-text-muted, #888)}.mdocs-doc-search-domain-option:hover,.mdocs-doc-search-domain-option.active{background:var(--mdocs-accent-soft, #f0f4ff)}.mdocs-doc-search-domain-empty{margin:0;padding:8px;font-size:12px;color:var(--mdocs-text-muted, #888);text-align:center}.mdocs-doc-search-input{flex:1 1 auto;min-width:0;border:none;outline:none;background:transparent;font-size:16px;color:var(--mdocs-text)}.mdocs-doc-search-close{display:inline-flex;align-items:center;justify-content:center;border:none;background:transparent;color:var(--mdocs-text-muted, #888);cursor:pointer;padding:4px;border-radius:4px}.mdocs-doc-search-close:hover{color:var(--mdocs-text);background:color-mix(in srgb,var(--mdocs-text) 8%,transparent)}.mdocs-doc-search-results{flex:1 1 auto;min-height:120px;max-height:min(58vh,440px);overflow-y:auto;padding:6px;background:var(--mdocs-surface, #fff);border-radius:0 0 10px 10px}.mdocs-doc-search-hint,.mdocs-doc-search-error{margin:0;padding:16px 12px;font-size:13px;color:var(--mdocs-text-muted, #888);text-align:center}.mdocs-doc-search-error{color:var(--mdocs-danger, #c0392b)}.mdocs-doc-search-row{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;text-align:left;border:none;background:transparent;padding:10px 12px;border-radius:6px;cursor:pointer;color:var(--mdocs-text)}.mdocs-doc-search-row:hover,.mdocs-doc-search-row:focus-visible{background:var(--mdocs-accent-soft, #f0f4ff);outline:none}.mdocs-doc-search-row-title{font-weight:500;font-size:14px}.mdocs-doc-search-row-path,.mdocs-doc-search-row-snippet{font-size:12px;color:var(--mdocs-text-muted, #888);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.mdocs-doc-search-row-meta{font-size:12px;color:var(--mdocs-text-muted, #888)}.mdocs-doc-search-row-snippet{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.mdocs-doc-search-row mark{background:#facc1573;color:inherit;border-radius:2px;padding:0 1px}.mdocs-doc-search-row-head{display:flex;align-items:center;gap:6px;max-width:100%}.mdocs-doc-search-row-sources{display:inline-flex;gap:4px;flex:0 0 auto}.mdocs-doc-search-row-source{font-size:10px;line-height:1;padding:3px 5px;border-radius:4px;background:var(--mdocs-accent-soft, #eef2f7);color:var(--mdocs-text-muted, #6b7280);white-space:nowrap}.mdocs-lexical-md-bridge{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none;opacity:0}.mdocs-conflict-modal-root{position:fixed;top:0;right:0;bottom:0;left:0;z-index:2000;display:flex;align-items:center;justify-content:center;background:#00000073;pointer-events:auto}.mdocs-conflict-modal-panel{width:min(440px,92vw);padding:20px 24px;border-radius:8px;background:#fff5f5;border:2px solid #cf1322;box-shadow:0 8px 24px #cf132240}.mdocs-conflict-modal-title{margin:0 0 8px;font-size:1.1rem;color:#cf1322}.mdocs-conflict-modal-body{margin:0 0 16px;color:#434343;line-height:1.5}.mdocs-conflict-modal-force-hint{margin:-8px 0 16px;font-size:13px;color:#8c8c8c;line-height:1.45}.mdocs-conflict-modal-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}.mdocs-conflict-force-btn{border:1px solid #cf1322;background:#fff;color:#cf1322;border-radius:6px;padding:6px 12px;cursor:pointer}.mdocs-conflict-force-btn:hover:not(:disabled){background:#fff1f0}.mdocs-conflict-force-btn:disabled{opacity:.55;cursor:not-allowed}.mdocs-sync-btn{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border-radius:4px;border:1px solid var(--mdocs-border, #e5e5e5);background:transparent;cursor:pointer;font-size:13px}.mdocs-sync-btn.behind{border-color:#1677ff;color:#1677ff;box-shadow:0 0 0 2px #1677ff33;animation:mdocs-sync-pulse 1.5s ease-in-out infinite}@keyframes mdocs-sync-pulse{0%,to{box-shadow:0 0 0 2px #1677ff26}50%{box-shadow:0 0 0 4px #1677ff59}}.mdocs-merge-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1500;display:flex;flex-direction:column;background:var(--mdocs-bg, #fff)}.mdocs-merge-toolbar{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--mdocs-border, #e5e5e5)}.mdocs-merge-toolbar h2{margin:0;font-size:1rem}.mdocs-merge-toolbar-title{display:flex;align-items:center;gap:8px}.mdocs-merge-conflict-pill{display:inline-flex;align-items:center;padding:2px 8px;border-radius:999px;font-size:12px;font-weight:500}.mdocs-merge-conflict-pill.pending{color:#ad6800;background:#fff7e6;border:1px solid #ffd591}.mdocs-merge-conflict-pill.resolved{color:#135200;background:#f6ffed;border:1px solid #b7eb8f}.mdocs-merge-toolbar-actions{display:flex;gap:8px}.mdocs-merge-body{flex:1;display:grid;grid-template-columns:minmax(180px,1fr) minmax(320px,1.4fr) minmax(180px,1fr);gap:1px;min-height:0;background:var(--mdocs-border, #e5e5e5)}.mdocs-merge-side,.mdocs-merge-center{min-height:0;background:var(--mdocs-bg, #fff)}.mdocs-merge-side .mdocs-merge-pane{height:100%}.mdocs-merge-center{display:flex;flex-direction:column;min-width:0;min-height:0}.mdocs-merge-cm-host{flex:1;min-height:0;overflow:hidden}.mdocs-merge-cm-side{height:100%}.mdocs-merge-result-cm{flex:1}.mdocs-merge-pane-header-static{padding:8px 12px;border-bottom:1px solid var(--mdocs-border, #e5e5e5);font-size:13px;font-weight:600}.mdocs-merge-base-warning{font-size:12px;color:#ad6800}.mdocs-merge-inline-conflict{box-sizing:border-box;width:100%;padding:8px;border:1px solid #ffa39e;border-radius:6px;background:#fff2f0}.mdocs-merge-inline-chunks{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin-bottom:8px}.mdocs-merge-chunk-base .mdocs-merge-chunk-body{background:#f5f5f5;border:1px solid #d9d9d9}.mdocs-merge-inline-actions{display:flex;flex-wrap:wrap;gap:6px}.mdocs-merge-inline-actions button{padding:4px 10px;font-size:12px;border:1px solid var(--mdocs-border, #e5e5e5);border-radius:4px;background:#fff;cursor:pointer}.mdocs-merge-inline-actions button.active{border-color:#1677ff;color:#1677ff;background:#e6f4ff}.mdocs-merge-loading,.mdocs-merge-no-conflicts{margin:16px;color:var(--mdocs-muted, #666);font-size:13px}.mdocs-merge-conflicts-panel{flex:1;min-height:0;display:flex;flex-direction:column;border-bottom:1px solid var(--mdocs-border, #e5e5e5)}.mdocs-merge-conflicts-panel h3,.mdocs-merge-result-header h3{margin:0;font-size:13px;font-weight:600}.mdocs-merge-conflicts-panel h3{padding:8px 12px;border-bottom:1px solid var(--mdocs-border, #e5e5e5)}.mdocs-merge-conflict-list{flex:1;overflow:auto;padding:8px;display:flex;flex-direction:column;gap:8px}.mdocs-merge-conflict-card{border:1px solid var(--mdocs-border, #e5e5e5);border-radius:6px;padding:8px;background:var(--mdocs-bg, #fff)}.mdocs-merge-conflict-card.pending{border-color:#ffa39e;background:#fff2f0}.mdocs-merge-conflict-card.resolved{border-color:#b7eb8f;background:#f6ffed}.mdocs-merge-conflict-card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;font-size:12px;font-weight:600}.mdocs-merge-conflict-status{font-weight:500;color:var(--mdocs-muted, #666)}.mdocs-merge-conflict-chunks{display:grid;grid-template-columns:1fr 1fr;gap:8px}.mdocs-merge-chunk-label{font-size:11px;font-weight:600;margin-bottom:4px;color:var(--mdocs-muted, #666)}.mdocs-merge-chunk-body{margin:0;padding:8px;max-height:120px;overflow:auto;font-family:ui-monospace,monospace;font-size:12px;line-height:1.45;border-radius:4px;white-space:pre-wrap;word-break:break-word}.mdocs-merge-chunk-local .mdocs-merge-chunk-body{background:#e6f4ff;border:1px solid #91caff}.mdocs-merge-chunk-remote .mdocs-merge-chunk-body{background:#fff7e6;border:1px solid #ffd591}.mdocs-merge-manual-input{width:100%;min-height:64px;margin-top:8px;padding:8px;font-family:ui-monospace,monospace;font-size:12px;border:1px solid var(--mdocs-border, #e5e5e5);border-radius:4px;resize:vertical}.mdocs-merge-conflict-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.mdocs-merge-conflict-actions button{padding:4px 10px;font-size:12px;border:1px solid var(--mdocs-border, #e5e5e5);border-radius:4px;background:var(--mdocs-bg, #fff);cursor:pointer}.mdocs-merge-conflict-actions button.active{border-color:#1677ff;color:#1677ff;background:#e6f4ff}.mdocs-merge-result-panel{flex:0 0 38%;min-height:140px;display:flex;flex-direction:column}.mdocs-merge-result-header{display:flex;align-items:baseline;gap:8px;padding:8px 12px;border-bottom:1px solid var(--mdocs-border, #e5e5e5)}.mdocs-merge-result-hint{font-size:11px;color:var(--mdocs-muted, #666)}.mdocs-merge-result-textarea{flex:1;min-height:0}.mdocs-merge-columns{flex:1;display:grid;grid-template-columns:1fr 1fr 1fr;gap:1px;min-height:0;background:var(--mdocs-border, #e5e5e5)}.mdocs-merge-pane{display:flex;flex-direction:column;min-height:0;background:var(--mdocs-bg, #fff)}.mdocs-merge-pane-header{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid var(--mdocs-border, #e5e5e5);font-size:13px;font-weight:600}.mdocs-merge-pane-tabs button{margin-left:4px;padding:2px 8px;font-size:12px;border:1px solid transparent;border-radius:4px;background:transparent;cursor:pointer}.mdocs-merge-pane-tabs button.active{border-color:var(--mdocs-border, #e5e5e5);background:var(--mdocs-hover-bg, #f5f5f5)}.mdocs-merge-textarea,.mdocs-merge-readonly,.mdocs-merge-preview{flex:1;margin:0;padding:12px;overflow:auto;font-family:ui-monospace,monospace;font-size:13px;line-height:1.5;border:none;resize:none}.mdocs-merge-preview{font-family:inherit}.mdocs-merge-preview pre{white-space:pre-wrap}.mdocs-merge-body--inline{display:flex;flex-direction:column;grid-template-columns:none;background:var(--mdocs-bg, #fff);gap:0}.mdocs-merge-inline-pane{display:flex;flex-direction:column;flex:1;min-height:0}.mdocs-merge-inline-toolbar{display:flex;align-items:center;gap:8px;flex-shrink:0;padding:8px 16px;border-bottom:1px solid var(--mdocs-border, #e5e5e5);background:var(--mdocs-surface, #fff)}.mdocs-merge-inline-hint{flex:1;min-width:0;font-size:12px;color:var(--mdocs-text-muted, #888)}.mdocs-merge-inline-toolbar button{font-size:12px;padding:4px 10px;border:1px solid var(--mdocs-border, #e5e5e5);border-radius:6px;background:#fff;cursor:pointer}.mdocs-merge-inline{position:relative;flex:1;overflow:auto;padding:8px 0 72px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12.5px;line-height:1.55}.mdocs-merge-inline-same{margin:0;padding:0 16px 0 12px;white-space:pre-wrap;word-break:break-word}.mdocs-merge-inline-hunk{position:relative;margin:0;padding:0 16px 0 12px}.mdocs-merge-inline-hunk.is-active{outline:1px solid rgba(51,112,255,.35);outline-offset:-1px;background:#3370ff08}.mdocs-merge-inline-hunk.is-resolved{opacity:.72}.mdocs-merge-hunk-actions{position:absolute;top:6px;right:12px;z-index:2;display:flex;gap:6px}.mdocs-merge-hunk-resolved-tag{position:absolute;top:6px;right:12px;z-index:2;font-size:11px;color:var(--mdocs-text-muted, #888);background:#ffffffe6;padding:2px 8px;border-radius:6px;border:1px solid var(--mdocs-border, #e5e5e5)}.mdocs-merge-inline-editor{flex:1;width:100%;min-height:0;margin:0;padding:16px 20px;border:none;resize:none;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:13px;line-height:1.55;box-sizing:border-box;background:var(--mdocs-bg, #fff);color:var(--mdocs-text)}.mdocs-domain-lock{flex-shrink:0}.mdocs-domain-select-wrapper{position:relative;flex:0 1 auto;min-width:120px;max-width:200px}.mdocs-domain-select-trigger{width:100%;height:35px;display:inline-flex;align-items:center;gap:6px;padding:0 8px;border:1px solid var(--mdocs-border);border-radius:var(--mdocs-radius);background:var(--mdocs-surface);font-size:13px;color:var(--mdocs-text);cursor:pointer}.mdocs-domain-select-trigger:hover{border-color:var(--mdocs-border-hover)}.mdocs-domain-select-text{flex:1;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mdocs-domain-select-chevron{flex-shrink:0;transition:transform .15s ease}.mdocs-domain-select-chevron.open{transform:rotate(180deg)}.mdocs-domain-select-menu{position:absolute;top:calc(100% + 4px);left:0;right:0;min-width:160px;padding:4px;z-index:50;display:flex;flex-direction:column;gap:1px}.mdocs-domain-select-option{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 10px;border:none;border-radius:6px;background:transparent;font-size:13px;color:var(--mdocs-text);cursor:pointer;text-align:left}.mdocs-domain-select-option:hover{background:var(--mdocs-bg)}.mdocs-domain-select-option.active{background:var(--mdocs-accent-soft);font-weight:500}.mdocs-domain-create-form{display:flex;flex-direction:column;gap:12px}.mdocs-domain-create-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.mdocs-domain-name-input{flex:1;min-width:140px;padding:8px 10px;border:1px solid var(--mdocs-border);border-radius:6px;font-size:13px;background:var(--mdocs-bg);color:var(--mdocs-text);outline:none}.mdocs-domain-name-input:focus{border-color:var(--mdocs-accent)}.mdocs-domain-permission-select{flex-shrink:0}.mdocs-domain-item{display:flex;flex-direction:column;gap:12px}.mdocs-domain-item-main{display:flex;flex-direction:column;gap:4px}.mdocs-domain-item-info{display:flex;align-items:center;gap:8px}.mdocs-domain-item-name{font-weight:600;font-size:14px;color:var(--mdocs-text)}.mdocs-domain-item-meta{display:flex;align-items:center;gap:12px;font-size:12px}.mdocs-domain-permission-badge{display:inline-block;font-size:11px;font-weight:500;padding:2px 8px;border-radius:9999px;line-height:1.5}.mdocs-domain-permission-badge[data-permission=public]{color:#047857;background:#d1fae5}.mdocs-domain-permission-badge[data-permission=restricted]{color:#a16207;background:#fef3c7}.mdocs-domain-permission-badge[data-permission=private]{color:#4b5563;background:#f3f4f6}.mdocs-domain-doc-count{color:var(--mdocs-text-muted)}.mdocs-domain-item-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.mdocs-domain-item-actions .mdocs-domain-permission-select button{font-size:12px;padding:4px 10px}.mdocs-domain-rename-row{display:flex;align-items:center;gap:6px}.mdocs-domain-locked-hint{font-size:12px;opacity:.6}.mdocs-domain-locked-banner{display:flex;align-items:center;gap:8px;padding:8px 12px;margin:-20px -24px 16px;background:#fff8e1;border-bottom:1px solid #ffecb3;border-radius:12px 12px 0 0;font-size:13px;color:#ff8f00;line-height:1.4}.mdocs-domain-locked-icon{font-size:15px;flex-shrink:0}.mdocs-domain-badge-builtin,.mdocs-domain-badge-shared{display:inline-block;font-size:11px;font-weight:500;padding:1px 8px;border-radius:9999px;background:#f3f4f6;color:#6b7280;line-height:1.6;margin-left:8px}.mdocs-domain-not-creator{padding-top:8px;border-top:1px solid var(--mdocs-border);margin-top:4px}.mdocs-domain-error{border-left:3px solid var(--mdocs-error)}.mdocs-domain-item-actions button:disabled{pointer-events:none}.mdocs-domain-mgmt-create .mdocs-domain-mgmt-create-form{display:flex;flex-direction:column;gap:16px;margin-top:10px}.mdocs-domain-mgmt-field{display:flex;flex-direction:column;gap:6px}.mdocs-domain-mgmt-label{font-size:12px;font-weight:600;color:var(--mdocs-muted, #666)}.mdocs-domain-mgmt-fieldset{border:none;margin:0;padding:0}.mdocs-domain-mgmt-type-radios{display:flex;flex-wrap:wrap;gap:12px 20px;margin-top:6px}.mdocs-domain-mgmt-radio{display:inline-flex;align-items:center;gap:6px;cursor:pointer;font-size:14px}.mdocs-domain-mgmt-radio input{accent-color:var(--mdocs-accent, #2563eb)}.mdocs-domain-mgmt-submit{align-self:flex-start}.mdocs-domain-mgmt-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:12px;justify-content:space-between}.mdocs-domain-mgmt-search{flex:1;min-width:160px;max-width:320px;padding:8px 12px;border:1px solid var(--mdocs-border);border-radius:8px;font-size:14px;background:var(--mdocs-input-bg, var(--mdocs-surface));color:inherit}.mdocs-domain-mgmt-filters{display:flex;flex-wrap:wrap;gap:6px}.mdocs-domain-mgmt-filter{padding:6px 12px;border:1px solid var(--mdocs-border);border-radius:999px;background:var(--mdocs-surface);font-size:12px;cursor:pointer;color:inherit}.mdocs-domain-mgmt-filter:hover{border-color:var(--mdocs-muted)}.mdocs-domain-mgmt-filter.active{border-color:var(--mdocs-accent, #2563eb);background:color-mix(in srgb,var(--mdocs-accent, #2563eb) 12%,transparent)}.mdocs-domain-table-wrap{padding:0;overflow-x:auto}.mdocs-domain-table{width:100%;border-collapse:collapse;font-size:14px}.mdocs-domain-table th,.mdocs-domain-table td{text-align:left;padding:8px 14px;border-bottom:1px solid #f3f4f6;vertical-align:middle}.mdocs-domain-table th{font-weight:600;font-size:13px;color:#4b5563;background:#f9fafb;padding-top:10px;padding-bottom:10px}.mdocs-domain-table tbody tr:hover td{background:#f9fafb}.mdocs-domain-table th.mdocs-domain-table-num,.mdocs-domain-table td.mdocs-domain-table-num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;width:6rem;color:#6b7280}.mdocs-domain-table-row-builtin td{background:#fafafa}.mdocs-domain-table-name-cell{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.mdocs-domain-table-name{font-weight:600;color:#111827}.mdocs-domain-table-type{display:inline-flex;align-items:center;gap:6px}.mdocs-domain-table-rename{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.mdocs-domain-table-actions{min-width:14rem}.mdocs-domain-action-buttons{display:inline-flex;flex-wrap:wrap;align-items:center;gap:2px}.mdocs-domain-action{padding:4px 8px;border:none;border-radius:4px;background:transparent;color:#4b5563;font-size:12px;line-height:1.4;box-shadow:none;cursor:pointer}.mdocs-domain-action:hover:not(:disabled){background:#f3f4f6;color:#111827;border-color:transparent}.mdocs-domain-action--primary{padding:4px 12px;color:#059669;background:#ecfdf5;border-radius:4px}.mdocs-domain-action--primary:hover:not(:disabled){background:#d1fae5;color:#047857}.mdocs-domain-action--danger{color:#4b5563}.mdocs-domain-action--danger:hover:not(:disabled){background:#fef2f2;color:#dc2626}.mdocs-domain-action:disabled,.mdocs-domain-action--primary:disabled,.mdocs-domain-action--danger:disabled{color:#9ca3af;background:#f9fafb;opacity:1;cursor:not-allowed}.mdocs-domain-change-type-panel{display:inline-flex;flex-wrap:wrap;align-items:center;gap:6px}.mdocs-domain-type-segment{display:inline-flex;align-items:center;padding:2px;border:1px solid #e5e7eb;border-radius:8px;background:#fff}.mdocs-domain-type-segment button{min-width:44px;padding:4px 10px;border:none;border-radius:6px;background:transparent;color:#6b7280;font-size:12px;line-height:1.4;box-shadow:none}.mdocs-domain-type-segment button:hover:not(:disabled){background:#f3f4f6;color:#111827}.mdocs-domain-type-segment button.active{background:#ecfdf5;color:#047857;font-weight:600}.mdocs-domain-type-segment button:disabled{opacity:.4;cursor:not-allowed}.mdocs-domain-type-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid #e5e7eb;border-radius:6px;background:#fff;color:#6b7280;box-shadow:none}.mdocs-domain-type-icon.confirm{color:#047857;border-color:#a7f3d0;background:#ecfdf5}.mdocs-domain-type-icon.confirm:hover:not(:disabled){background:#d1fae5}.mdocs-domain-type-icon.cancel:hover{background:#f3f4f6;color:#111827}.mdocs-domain-type-icon:disabled{opacity:.4;cursor:not-allowed}.mdocs-domain-not-modifiable{display:inline-block;padding:4px 8px;border-radius:4px;color:#6b7280;background:#f3f4f6;font-size:12px;line-height:1.4}.mdocs-domain-not-creator-inline{font-size:12px;color:#6b7280;line-height:1.4;max-width:14rem}.mdocs-domain-table .mdocs-domain-item-actions button:disabled,.mdocs-domain-action-buttons button:disabled{cursor:not-allowed}.mdocs-member-template-name-input{display:block;width:100%;max-width:28rem;margin-top:4px;padding:6px 0;border:none;border-bottom:1px solid var(--mdocs-border);border-radius:0;font-size:15px;font-weight:500;background:transparent;color:var(--mdocs-text);outline:none}.mdocs-member-template-name-input:focus{border-bottom-color:var(--mdocs-accent)}.mdocs-member-template-name-input:disabled{opacity:.6}.mdocs-member-template-intro,.mdocs-domain-mgmt-restricted-hint{margin:0 0 1rem;max-width:52rem;font-size:14px;color:var(--mdocs-muted, #666);line-height:1.5}.mdocs-member-template-form .mdocs-member-template-ids{width:100%;max-width:40rem;margin-top:6px;padding:10px 12px;font-family:ui-monospace,monospace;font-size:13px;border:1px solid var(--mdocs-border);border-radius:6px;background:var(--mdocs-surface, #fff);resize:vertical}.mdocs-member-template-form-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.mdocs-member-template-list{list-style:none;margin:0;padding:0}.mdocs-member-template-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid color-mix(in srgb,var(--mdocs-border) 50%,transparent)}.mdocs-member-template-row:last-child{border-bottom:none}.mdocs-member-template-row-head{display:flex;flex-direction:column;gap:4px}.mdocs-member-template-row-actions{display:flex;flex-wrap:wrap;gap:8px}.mdocs-domain-member-import-title{flex:1 1 100%;margin:0;font-size:12px;font-weight:600;color:var(--mdocs-text);letter-spacing:.02em}.mdocs-domain-member-import{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:10px;padding-top:10px;border-top:1px dashed color-mix(in srgb,var(--mdocs-border) 60%,transparent)}.mdocs-domain-member-import select{min-width:10rem;padding:6px 8px;border-radius:6px;border:1px solid var(--mdocs-border)}.mdocs-domain-import-hint{font-size:12px;color:var(--mdocs-muted, #666)}.mdocs-domain-import-flash{font-size:13px;color:var(--mdocs-success, #0a7);margin-top:6px}.mdocs-member-template-members-row{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:8px}.mdocs-member-template-selected-count{font-size:14px;color:var(--mdocs-text)}.mdocs-wizard-card{display:flex;flex-direction:column}.mdocs-wizard-progress{margin-bottom:20px;padding:0 4px}.mdocs-wizard-progress-track{height:3px;background:color-mix(in srgb,var(--mdocs-border) 60%,transparent);border-radius:2px;margin-bottom:12px;position:relative}.mdocs-wizard-progress-fill{height:100%;background:var(--mdocs-accent, #2563eb);border-radius:2px;transition:width .3s ease}.mdocs-wizard-progress-steps{display:flex;justify-content:space-between;align-items:flex-start}.mdocs-wizard-step-indicator{display:flex;flex-direction:column;align-items:center;gap:6px}.mdocs-wizard-step-circle{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:600;line-height:1;border:2px solid var(--mdocs-border);color:var(--mdocs-muted, #999);background:var(--mdocs-surface);transition:all .2s ease}.mdocs-wizard-step-circle.current{border-color:var(--mdocs-accent, #2563eb);background:var(--mdocs-accent, #2563eb);color:#fff}.mdocs-wizard-step-circle.done{border-color:#16a34a;background:#16a34a;color:#fff}.mdocs-wizard-step-label{font-size:11px;color:var(--mdocs-muted, #999);white-space:nowrap;transition:color .2s ease}.mdocs-wizard-step-label.current{color:var(--mdocs-text);font-weight:600}.mdocs-wizard-step-label.done{color:#16a34a}.mdocs-wizard-step-content{min-height:320px;display:flex;flex-direction:column;gap:14px;padding:4px 0}.mdocs-wizard-name-input{width:100%;padding:12px 14px;border:1px solid var(--mdocs-border);border-radius:8px;font-size:16px;background:var(--mdocs-surface);color:var(--mdocs-text);outline:none;transition:border-color .15s ease}.mdocs-wizard-name-input:focus{border-color:var(--mdocs-accent, #2563eb)}.mdocs-wizard-name-input[aria-invalid=true]{border-color:var(--mdocs-danger);box-shadow:0 0 0 1px var(--mdocs-danger)}.mdocs-wizard-name-input:disabled{opacity:.6}.mdocs-wizard-hint{margin:4px 0 0;font-size:12px;color:var(--mdocs-muted, #999);line-height:1.4}.mdocs-wizard-hint.danger{color:var(--mdocs-danger)}.mdocs-wizard-preview-card{border:1px solid var(--mdocs-border);border-radius:8px;padding:16px;background:var(--mdocs-bg);display:flex;flex-direction:column;gap:12px}.mdocs-wizard-preview-row{display:flex;align-items:center;gap:12px}.mdocs-wizard-preview-label{font-size:12px;font-weight:600;color:var(--mdocs-muted, #999);min-width:60px;flex-shrink:0}.mdocs-wizard-preview-value{font-size:14px;color:var(--mdocs-text);font-weight:500}.mdocs-wizard-preview-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}.mdocs-wizard-preview-tag{display:inline-block;padding:3px 10px;font-size:12px;font-family:ui-monospace,monospace;background:color-mix(in srgb,var(--mdocs-accent, #2563eb) 12%,transparent);color:var(--mdocs-accent, #2563eb);border-radius:4px;line-height:1.5}.mdocs-wizard-preview-tag-more{background:color-mix(in srgb,var(--mdocs-border) 50%,transparent);color:var(--mdocs-muted, #666)}.mdocs-wizard-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:16px;padding-top:16px;border-top:1px solid color-mix(in srgb,var(--mdocs-border) 50%,transparent)}.mdocs-member-template-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.mdocs-member-template-tags-scroll{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;padding-bottom:4px}.mdocs-member-template-tag{display:inline-block;padding:2px 8px;font-size:11px;background:color-mix(in srgb,var(--mdocs-accent, #2563eb) 12%,transparent);color:var(--mdocs-accent, #2563eb);border-radius:4px;line-height:1.6;white-space:nowrap}.mdocs-member-template-confirm-row{display:flex;flex-wrap:wrap;align-items:center;gap:12px;width:100%;padding:4px 0}.mdocs-member-template-confirm-text{font-size:13px;color:var(--mdocs-danger);line-height:1.4}.mdocs-member-template-confirm-actions{display:flex;gap:8px}.mdocs-member-template-empty{display:flex;flex-direction:column;align-items:flex-start;gap:12px}.mdocs-visitor-picker-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:10000;background:color-mix(in srgb,#000 45%,transparent);display:flex;align-items:center;justify-content:center;padding:24px;box-sizing:border-box}.mdocs-visitor-picker-dialog{width:min(960px,100%);max-height:min(88vh,900px);display:flex;flex-direction:column;background:var(--mdocs-surface, #fff);color:var(--mdocs-text);border-radius:12px;box-shadow:0 12px 48px color-mix(in srgb,#000 35%,transparent);border:1px solid var(--mdocs-border)}.mdocs-visitor-picker-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid var(--mdocs-border)}.mdocs-visitor-picker-title{margin:0;font-size:1.125rem;font-weight:600}.mdocs-visitor-picker-close{border:none;background:transparent;font-size:1.5rem;line-height:1;cursor:pointer;color:var(--mdocs-muted, #666);padding:4px 8px;border-radius:6px}.mdocs-visitor-picker-close:hover{background:color-mix(in srgb,var(--mdocs-border) 40%,transparent)}.mdocs-visitor-picker-toolbar{display:flex;flex-wrap:wrap;gap:12px;align-items:center;padding:12px 18px;border-bottom:1px solid color-mix(in srgb,var(--mdocs-border) 60%,transparent)}.mdocs-visitor-picker-search{flex:1 1 100%;min-width:0;padding:6px 12px;border:1px solid var(--mdocs-border);border-radius:8px;font-size:14px}.mdocs-visitor-picker-template-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.mdocs-template-picker{position:relative}.mdocs-template-picker-trigger{display:inline-flex;align-items:center;gap:6px;min-width:11rem;padding:8px 10px;border-radius:8px;border:1px solid var(--mdocs-border);background:var(--mdocs-surface);font-size:13px;color:var(--mdocs-text);cursor:pointer}.mdocs-template-picker-trigger:hover{border-color:var(--mdocs-border-hover)}.mdocs-template-picker-trigger:disabled{opacity:.5;cursor:default}.mdocs-template-picker-text{flex:1;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mdocs-template-picker-chevron{flex-shrink:0;transition:transform .15s ease}.mdocs-template-picker-chevron.open{transform:rotate(180deg)}.mdocs-template-picker-menu{position:absolute;top:calc(100% + 4px);left:0;min-width:100%;padding:4px;z-index:60;display:flex;flex-direction:column;gap:1px}.mdocs-template-picker-option{display:flex;align-items:center;padding:6px 10px;border:none;border-radius:6px;background:transparent;font-size:13px;color:var(--mdocs-text);cursor:pointer;text-align:left;width:100%}.mdocs-template-picker-option:hover{background:var(--mdocs-bg)}.mdocs-template-picker-option.active{background:var(--mdocs-accent-soft);font-weight:500}.mdocs-visitor-picker-error,.mdocs-visitor-picker-loading{padding:8px 18px;font-size:14px}.mdocs-visitor-picker-error{color:var(--mdocs-danger);background:color-mix(in srgb,var(--mdocs-danger) 12%,transparent)}.mdocs-visitor-picker-columns{display:grid;grid-template-columns:1fr 1fr;gap:0;min-height:280px;max-height:50vh;overflow:hidden}@media (max-width: 720px){.mdocs-visitor-picker-columns{grid-template-columns:1fr;max-height:none}}.mdocs-visitor-picker-col{display:flex;flex-direction:column;min-width:0;border-right:1px solid var(--mdocs-border)}.mdocs-visitor-picker-col:last-child{border-right:none}.mdocs-visitor-picker-col-title{margin:0;padding:10px 14px;font-size:13px;font-weight:600;background:color-mix(in srgb,var(--mdocs-border) 22%,transparent);border-bottom:1px solid var(--mdocs-border)}.mdocs-visitor-picker-table-wrap{flex:1;overflow:auto}.mdocs-visitor-picker-table{width:100%;border-collapse:collapse;font-size:13px}.mdocs-visitor-picker-table th,.mdocs-visitor-picker-table td{padding:8px 12px;text-align:left;border-bottom:1px solid color-mix(in srgb,var(--mdocs-border) 55%,transparent);vertical-align:middle}.mdocs-visitor-picker-table th{position:sticky;top:0;background:var(--mdocs-surface, #fff);z-index:1;font-weight:600}.mdocs-visitor-picker-check-col{width:3rem;text-align:center;white-space:nowrap}.mdocs-visitor-picker-id-short{font-family:ui-monospace,monospace;font-size:12px}.mdocs-visitor-picker-id-full{font-family:ui-monospace,monospace;font-size:11px;word-break:break-all}.mdocs-visitor-picker-empty-cell{padding:24px!important;text-align:center;color:var(--mdocs-muted, #666)}.mdocs-visitor-picker-remove{border:none;background:transparent;color:var(--mdocs-danger);cursor:pointer;font-size:1.25rem;line-height:1;padding:0 4px}.mdocs-visitor-picker-locked{color:var(--mdocs-muted, #999);font-size:12px}.mdocs-visitor-picker-name-muted{color:var(--mdocs-muted, #666);font-style:italic}.mdocs-visitor-picker-footer{display:flex;justify-content:flex-end;gap:10px;padding:14px 18px;border-top:1px solid var(--mdocs-border)}.mdocs-visitor-picker-self-marker{color:#16a34a;font-weight:500;margin-left:4px}.mdocs-editor-with-comments{display:flex;flex:1;min-width:0;min-height:0;overflow:hidden}.mdocs-editor-container{flex:1;min-width:0;overflow:hidden;display:flex;flex-direction:column}.mdocs-comments-panel{width:360px;flex-shrink:0;border-left:1px solid var(--mdocs-border, #eee);background:var(--mdocs-bg-secondary, #fafafa);display:flex;flex-direction:column;overflow:hidden;position:relative}.mdocs-comments-resize-handle{position:absolute;left:0;top:0;bottom:0;width:4px;cursor:col-resize;background:transparent;transition:background .2s;z-index:10}.mdocs-comments-resize-handle:hover,.mdocs-comments-resize-handle:active{background:var(--mdocs-primary, #1976d2)}.mdocs-comments-header{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid var(--mdocs-border, #eee);background:#fff;flex-shrink:0}.mdocs-comments-error{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 16px;font-size:.85rem;color:#d32f2f;background:#fff5f5;border-bottom:1px solid #ffe0e0}.mdocs-comments-error button{background:none;border:none;color:#d32f2f;cursor:pointer;padding:2px;display:flex;align-items:center}.mdocs-comments-close-btn{background:none;border:none;cursor:pointer;padding:4px;border-radius:4px;color:#666;display:flex;align-items:center;justify-content:center}.mdocs-comments-close-btn:hover{background:var(--mdocs-hover-bg, #f0f0f0)}.mdocs-comments-list{flex:1;overflow-y:auto;padding:16px}.mdocs-comments-empty{text-align:center;color:#999;padding:2rem 0}.mdocs-comment-root{margin-bottom:16px;padding:12px;background:#fff;border-radius:8px;border:1px solid var(--mdocs-border, #eee)}.mdocs-comment-replies{margin-top:12px;margin-left:24px;padding-left:12px;border-left:2px solid var(--mdocs-border-light, #e8e8e8)}.mdocs-comment-reply{margin-bottom:8px;padding:8px;background:#fafafa;border-radius:6px}.mdocs-comment-header{display:flex;align-items:center;gap:6px;margin-bottom:6px;font-size:.875rem}.mdocs-comment-avatar{width:24px;height:24px;border-radius:50%;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;font-size:.75rem;font-weight:500;display:flex;align-items:center;justify-content:center;flex-shrink:0}.mdocs-comment-avatar-small{width:20px;height:20px;font-size:.7rem}.mdocs-comment-author{font-weight:500;color:#333}.mdocs-comment-time{color:#999;font-size:.8rem}.mdocs-comment-reply-to{color:var(--mdocs-primary, #1976d2);font-size:.8rem;font-weight:500}.mdocs-comment-reply-to:before{content:"↳ ";margin-right:2px;color:var(--mdocs-primary, #1976d2)}.mdocs-comment-content{font-size:.9rem;line-height:1.5;color:#333;word-break:break-word;white-space:pre-wrap}.mdocs-comment-reply-btn{background:none;border:none;color:#1976d2;cursor:pointer;font-size:.85rem;padding:0;margin-top:4px}.mdocs-comment-reply-btn:hover{text-decoration:underline}.mdocs-comment-delete{background:none;border:none;color:#999;cursor:pointer;padding:2px;margin-left:auto;border-radius:4px;display:flex;align-items:center;justify-content:center}.mdocs-comment-delete:hover{color:#d32f2f;background:#ffebee}.mdocs-comments-input-wrapper{padding:12px 16px;border-top:1px solid var(--mdocs-border, #eee);background:#fff;flex-shrink:0;position:relative}.mdocs-comments-input-drag-handle{width:32px;height:3px;background:#e0e0e0;border-radius:2px;margin:0 auto 8px;cursor:row-resize;transition:background .2s}.mdocs-comments-input-drag-handle:hover,.mdocs-comments-input-drag-handle:active{background:var(--mdocs-primary, #1976d2)}.mdocs-comment-reply-notice{display:flex;justify-content:space-between;align-items:center;font-size:.85rem;color:#666;margin-bottom:8px}.mdocs-comment-reply-notice button{background:none;border:none;cursor:pointer;color:#999;font-size:.8rem;display:flex;align-items:center;gap:2px}.mdocs-comment-reply-notice button:hover{color:#666}.mdocs-comment-reply-to-name{color:#1976d2;font-weight:500}.mdocs-comments-input{width:100%;padding:8px 12px 24px;border:1px solid #ddd;border-radius:6px;font-size:.9rem;font-family:inherit;resize:none;box-sizing:border-box;display:block}.mdocs-comments-char-count{position:absolute;right:22px;transform:translateY(-22px);font-size:.75rem;color:#999;padding:0 4px;background:linear-gradient(to bottom,transparent 0%,white 30%);pointer-events:none;z-index:1}.mdocs-comments-char-count.mdocs-char-count--warn{color:#d32f2f}.mdocs-comments-input:focus{outline:none;border-color:#1976d2}.mdocs-comments-input-actions{display:flex;justify-content:flex-end;margin-top:4px}.mdocs-btn-primary{background:#1976d2;color:#fff;border:none;padding:6px 16px;border-radius:6px;cursor:pointer;font-size:.9rem}.mdocs-btn-primary:hover{background:#1565c0}.mdocs-btn-primary:disabled{background:#90caf9;cursor:not-allowed}:root{--mdocs-accent: #4CAF50;--mdocs-accent-dark: #388E3C;--mdocs-accent-secondary: #81C784;--mdocs-accent-soft: #E8F5E9;--mdocs-accent-ring: rgba(76, 175, 80, .25);--mdocs-success: #66BB6A;--mdocs-success-soft: #E8F5E9;--mdocs-success-text: #2E7D32;--mdocs-warning: #FFB74D;--mdocs-warning-soft: #FFF3E0;--mdocs-warning-text: #EF6C00;--mdocs-error: #EF5350;--mdocs-error-soft: #FFEBEE;--mdocs-error-text: #C62828;--mdocs-danger: #E53935;--mdocs-bg: #F5F5F5;--mdocs-surface: #ffffff;--mdocs-border: #E0E0E0;--mdocs-border-hover: #BDBDBD;--mdocs-text: #212121;--mdocs-text-muted: #616161;--mdocs-text-disabled: #BDBDBD;--mdocs-radius-sm: 4px;--mdocs-radius: 8px;--mdocs-radius-lg: 12px;--mdocs-radius-xl: 16px;--mdocs-shadow: 0 1px 3px rgba(0, 0, 0, .1);--mdocs-shadow-md: 0 4px 6px rgba(0, 0, 0, .1);--mdocs-shadow-lg: 0 10px 15px rgba(0, 0, 0, .1);color-scheme:light}*{box-sizing:border-box}html,body,#root{height:100%;min-height:0;margin:0;overflow:hidden}body{font-family:Inter,Noto Sans SC,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,PingFang SC,Hiragino Sans GB,Microsoft YaHei,sans-serif;background:var(--mdocs-bg);color:var(--mdocs-text);font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:focus-visible{outline:2px solid var(--mdocs-accent);outline-offset:2px}button{font-family:inherit;font-size:inherit;border-radius:var(--mdocs-radius);border:1px solid var(--mdocs-border);background:var(--mdocs-surface);color:var(--mdocs-text);padding:6px 14px;cursor:pointer;transition:background .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease,transform .1s ease}button:hover{border-color:var(--mdocs-border-hover)}button:active{transform:scale(.98)}button:disabled{background:var(--mdocs-bg);border-color:var(--mdocs-border);color:var(--mdocs-text-disabled);cursor:not-allowed;transform:none}button.primary{background:var(--mdocs-accent);border-color:var(--mdocs-accent);color:#fff}button.primary:hover{background:var(--mdocs-accent-dark);border-color:var(--mdocs-accent-dark)}button.primary:active{background:var(--mdocs-accent-dark);transform:scale(.98)}button.primary:focus-visible{box-shadow:0 0 0 3px var(--mdocs-accent-ring)}button.secondary{background:transparent;border-color:var(--mdocs-accent);color:var(--mdocs-accent)}button.secondary:hover{background:var(--mdocs-accent-soft)}button.secondary:focus-visible{box-shadow:0 0 0 3px var(--mdocs-accent-ring)}button.danger{background:transparent;border-color:var(--mdocs-error);color:var(--mdocs-error-text, var(--mdocs-error))}button.danger:hover{background:var(--mdocs-error-soft);border-color:var(--mdocs-error);color:var(--mdocs-error-text, #c62828)}button.danger:focus-visible{box-shadow:0 0 0 3px #ef53504d}button.ghost{background:transparent;border-color:transparent;color:var(--mdocs-text-muted)}button.ghost:hover{background:var(--mdocs-bg);color:var(--mdocs-text)}input,textarea{font-family:inherit;font-size:inherit;border-radius:var(--mdocs-radius);border:1px solid var(--mdocs-border);background:var(--mdocs-surface);color:var(--mdocs-text);padding:8px 12px;outline:none;transition:border-color .15s ease,box-shadow .15s ease}input:focus,textarea:focus{border-color:var(--mdocs-accent);box-shadow:0 0 0 3px var(--mdocs-accent-ring)}input:disabled,textarea:disabled{background:var(--mdocs-bg);color:var(--mdocs-text-disabled);cursor:not-allowed}select{font-family:inherit;font-size:inherit;border-radius:var(--mdocs-radius);border:1px solid var(--mdocs-border);background:var(--mdocs-surface);color:var(--mdocs-text);padding:6px 12px;outline:none;cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease}select:focus{border-color:var(--mdocs-accent);box-shadow:0 0 0 3px var(--mdocs-accent-ring)}a{color:var(--mdocs-accent);text-decoration:none}a:hover{text-decoration:underline}.muted{color:var(--mdocs-text-muted)}.card{background:var(--mdocs-surface);border:1px solid var(--mdocs-border);border-radius:var(--mdocs-radius-lg);box-shadow:var(--mdocs-shadow)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:var(--mdocs-bg)}::-webkit-scrollbar-thumb{background:var(--mdocs-border);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:var(--mdocs-border-hover)}.mdocs-playground-page{box-sizing:border-box;height:100%;min-height:0;overflow-y:auto;padding:16px;background:var(--mdocs-bg);-webkit-overflow-scrolling:touch}.mdocs-playground-header{margin-bottom:12px}.mdocs-playground-back{color:var(--mdocs-accent);text-decoration:none;font-size:13px}.mdocs-playground-back:hover{text-decoration:underline}.mdocs-playground-editor{padding:16px}.mdocs-demo-banner{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;padding:8px 16px;font-size:13px;display:flex;align-items:center;justify-content:center;gap:8px}.mdocs-demo-banner a{color:#ffffffe6;text-decoration:underline}
|