:root{font-family:Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;color:#142033;background:#f3f7fb;font-synthesis:none;--nav:#071f3d;--nav2:#0c315d;--blue:#1478ee;--blue2:#0c9cf4;--line:#dce6f1;--muted:#66758b;--danger:#d92d20;--warn:#b54708;--ok:#067647;--shadow:0 18px 50px rgba(25,60,100,.09);--radius:22px}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:radial-gradient(circle at 70% 0,#eefaff 0,transparent 33%),#f3f7fb}button,input,select,textarea{font:inherit}button{cursor:pointer}.shell{display:grid;grid-template-columns:248px minmax(0,1fr);min-height:100vh}.sidebar{background:linear-gradient(180deg,var(--nav),#06182f);color:#fff;padding:22px 16px;position:sticky;top:0;height:100vh;overflow:auto}.brand{display:flex;gap:12px;align-items:center;padding:0 8px 22px}.brand-mark{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(135deg,#2a9cff,#1768de);box-shadow:0 10px 30px rgba(24,130,240,.3);color:#fff}.brand-svg{width:27px;height:27px;display:block}.brand strong{display:block;font-size:19px}.brand small{opacity:.66}.nav-group{margin:16px 0 7px;padding:0 10px;color:#6f91b7;font-size:12px;letter-spacing:.08em}.nav-link{width:100%;border:0;color:#d7e7fa;background:transparent;padding:11px 12px;border-radius:12px;text-align:left;margin:3px 0;display:flex;align-items:center;gap:10px}.nav-link:hover,.nav-link.active{background:linear-gradient(90deg,#164a82,#1467b6);color:#fff}.nav-icon{width:20px;opacity:.85}.sidebar-foot{position:absolute;bottom:20px;left:16px;right:16px;border-top:1px solid rgba(255,255,255,.15);padding-top:14px;font-size:12px;color:#87a6c8}.main{min-width:0}.topbar{height:66px;background:rgba(255,255,255,.92);backdrop-filter:blur(12px);border-bottom:1px solid #e2e8f0;display:flex;align-items:center;justify-content:space-between;padding:0 30px;position:sticky;top:0;z-index:10}.topbar-title{font-weight:800}.top-actions{display:flex;align-items:center;gap:10px}.chip{border:1px solid var(--line);background:#fff;padding:7px 11px;border-radius:999px;font-size:13px}.page{padding:30px;max-width:1480px;margin:auto}.hero{background:rgba(255,255,255,.95);border:1px solid #e4ebf3;border-radius:30px;padding:34px 38px;box-shadow:var(--shadow);margin-bottom:22px}.hero h1{font-size:34px;letter-spacing:-.04em;margin:0 0 8px}.hero p{margin:0;color:var(--muted);line-height:1.7}.grid{display:grid;gap:18px}.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.card{background:#fff;border:1px solid #dfe8f1;border-radius:var(--radius);padding:22px;box-shadow:0 10px 30px rgba(30,65,105,.06)}.card h2,.card h3{margin:0 0 10px}.stat strong{font-size:36px;display:block;margin:10px 0}.muted{color:var(--muted)}.small{font-size:13px}.btn{border:0;border-radius:11px;padding:11px 18px;font-weight:700;transition:.18s}.btn-primary{color:#fff;background:linear-gradient(135deg,var(--blue),var(--blue2));box-shadow:0 8px 18px rgba(20,120,238,.22)}.btn-primary:hover{transform:translateY(-1px)}.btn-secondary{background:#fff;color:#15588e;border:1px solid #9fc5e5}.btn-danger{background:#fff1f0;color:var(--danger);border:1px solid #f6c7c3}.btn-ghost{background:#eef4f9;color:#344b65}.btn:disabled{opacity:.5;cursor:not-allowed}.form{display:grid;gap:14px}.field label{display:block;font-size:13px;font-weight:700;margin-bottom:6px}.input,.select,.textarea{width:100%;border:1px solid #cad8e7;background:#fbfdff;border-radius:11px;padding:11px 12px;outline:none}.input:focus,.select:focus,.textarea:focus{border-color:#2b8df0;box-shadow:0 0 0 3px rgba(43,141,240,.12)}.textarea{min-height:108px;resize:vertical}.auth-page{min-height:100vh;display:grid;grid-template-columns:1.05fr .95fr;background:#f6f9fd}.auth-cover{background:linear-gradient(150deg,#061d39,#0b4d88 65%,#138ef0);color:#fff;padding:8vw;display:flex;flex-direction:column;justify-content:center}.auth-cover h1{font-size:48px;margin:0 0 18px;line-height:1.15}.auth-cover p{font-size:18px;color:#d8e9fa;line-height:1.8}.auth-panel{display:grid;place-items:center;padding:30px}.auth-box{width:min(440px,100%);background:#fff;border:1px solid #e0e8f0;border-radius:26px;padding:32px;box-shadow:var(--shadow)}.auth-tabs{display:flex;background:#f0f5fa;border-radius:12px;padding:4px;margin-bottom:22px}.auth-tabs button{flex:1;border:0;border-radius:9px;padding:9px;background:transparent}.auth-tabs .active{background:#fff;box-shadow:0 3px 12px rgba(30,60,90,.09);font-weight:800}.alert{padding:12px 14px;border-radius:10px;margin:10px 0;font-size:14px}.alert-error{background:#fff1f0;color:#b42318}.alert-ok{background:#ecfdf3;color:#067647}.alert-warn{background:#fffaeb;color:#b54708}.agent-card{position:relative;overflow:hidden;min-height:214px;display:flex;flex-direction:column}.agent-card::after{content:"";position:absolute;width:130px;height:130px;border-radius:50%;right:-50px;top:-40px;background:radial-gradient(circle,#dff4ff,transparent 70%)}.agent-badge{display:inline-flex;align-items:center;gap:7px;color:#0d6fc3;font-weight:800;font-size:13px}.agent-card p{color:var(--muted);line-height:1.7;flex:1}.case-row,.list-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 0;border-bottom:1px solid #edf1f5}.case-row:last-child,.list-row:last-child{border-bottom:0}.status{display:inline-block;padding:4px 8px;border-radius:999px;font-size:12px;background:#eef5fb;color:#315c80}.status.ok{background:#ecfdf3;color:#067647}.status.warn{background:#fff7e8;color:#a15c00}.status.danger{background:#fff1f0;color:#b42318}.chat-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:18px}.chat-window{height:calc(100vh - 180px);min-height:580px;display:flex;flex-direction:column;padding:0}.chat-head{padding:20px 22px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between}.chat-head-right{display:flex;align-items:center;gap:14px}.hotline-tip{font-size:13px;color:var(--muted);white-space:nowrap}.hotline-tip a{color:#0d6fc3;font-weight:700;text-decoration:none}.messages{padding:22px;overflow:auto;flex:1;background:linear-gradient(180deg,#f8fbfe,#fff)}.message{max-width:82%;margin:0 0 16px;padding:14px 16px;border-radius:16px;line-height:1.72;white-space:pre-wrap}.message.user{margin-left:auto;background:#1678ed;color:#fff;border-bottom-right-radius:5px}.message.assistant{background:#fff;border:1px solid #dfe8f1;border-bottom-left-radius:5px;box-shadow:0 6px 20px rgba(25,60,90,.06)}.message-meta{margin-top:8px;font-size:12px;opacity:.65}.ai-disclaimer{margin-top:6px;font-size:11px;color:#9aa5b5;opacity:.8;line-height:1.5;border-top:1px dashed #e8edf4;padding-top:6px}.composer{padding:16px;border-top:1px solid var(--line);display:flex;gap:10px;background:#fff}.composer textarea{min-height:52px;max-height:140px}.evidence-list details{border:1px solid #e2e8f0;border-radius:11px;padding:10px;margin:8px 0}.evidence-list summary{cursor:pointer;font-weight:700}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse;font-size:14px}.table th,.table td{text-align:left;padding:11px;border-bottom:1px solid #e7edf4;vertical-align:top}.table th{color:#506176;background:#f7fafc}.toolbar{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-bottom:16px}.empty{text-align:center;padding:40px;color:var(--muted)}.modal-backdrop{position:fixed;inset:0;background:rgba(4,20,40,.45);display:grid;place-items:center;z-index:50;padding:20px}.modal{width:min(620px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:22px;padding:26px;box-shadow:0 30px 80px rgba(0,0,0,.25)}.split{display:flex;justify-content:space-between;gap:12px;align-items:center}.section-title{display:flex;align-items:end;justify-content:space-between;margin:24px 0 14px}.section-title h2{margin:0}
/* 页内 Tab 切换（运营管理 2026-08-19）：粘在 topbar 下方，滚动时保持可见 */
.subtabs{position:sticky;top:66px;z-index:9;display:flex;gap:6px;overflow-x:auto;background:rgba(243,247,251,.94);backdrop-filter:blur(10px);padding:12px 2px;margin-bottom:6px;scrollbar-width:none}
.subtabs::-webkit-scrollbar{display:none}
.subtabs button{border:0;border-radius:11px;padding:9px 16px;background:rgba(255,255,255,.75);color:#42536b;font-weight:700;white-space:nowrap;box-shadow:0 2px 8px rgba(30,60,100,.07);transition:.15s}
.subtabs button:hover{background:#fff;color:#15588e}
.subtabs button.active{background:linear-gradient(135deg,var(--blue),var(--blue2));color:#fff;box-shadow:0 6px 16px rgba(20,120,238,.25)}
.admin-tabpane{display:none}
.admin-tabpane.active{display:block;animation:fadein .18s ease}
@keyframes fadein{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.loading{display:inline-block;width:18px;height:18px;border:2px solid #c5d9ed;border-top-color:#1678ed;border-radius:50%;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(max-width:1050px){.grid-4{grid-template-columns:repeat(2,1fr)}.grid-3{grid-template-columns:repeat(2,1fr)}.chat-layout{grid-template-columns:1fr}.chat-window{height:auto;min-height:650px}}@media(max-width:760px){.shell{display:block}.sidebar{position:fixed;z-index:30;transform:translateX(-105%);width:260px;transition:.2s}.sidebar.open{transform:translateX(0)}.topbar{padding:0 16px}.page{padding:16px}.hero{padding:24px;border-radius:22px}.hero h1{font-size:28px}.grid-4,.grid-3,.grid-2{grid-template-columns:1fr}.auth-page{grid-template-columns:1fr}.auth-cover{display:none}.message{max-width:92%}.mobile-menu{display:inline-flex!important}}.mobile-menu{display:none}
.phase-progress{margin-bottom:4px}
.phase-track{height:6px;background:#e8eef4;border-radius:999px;overflow:hidden;margin-bottom:14px}
.phase-fill{height:100%;width:var(--progress,0%);background:linear-gradient(90deg,#1478ee,#0c9cf4);border-radius:999px;transition:width .5s ease}
.phase-steps{display:flex;justify-content:space-between;gap:6px}
.phase-step{display:flex;flex-direction:column;align-items:center;gap:4px;flex:1;text-align:center}
.phase-dot{font-size:15px;color:#b0bccb;line-height:1}
.phase-label{font-size:11px;color:var(--muted);white-space:nowrap}
.phase-step.done .phase-dot{color:#067647}
.phase-step.done .phase-label{color:#067647;font-weight:600}
.phase-step.active .phase-dot{color:#1478ee}
.phase-step.active .phase-label{color:#1478ee;font-weight:700}
.auth-inline-link{display:flex;justify-content:flex-end;margin-top:10px}.link-button{border:0;background:transparent;color:#0d6fc3;padding:4px 0;font-weight:700}.link-button:hover{text-decoration:underline}
.setting-preview{background:#f7fafc;border:1px solid #e2e8f0;border-radius:10px;padding:12px;white-space:pre-wrap;min-height:92px;font-size:12px;color:#3c536b}.code-input{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}

/* ── 知识库目录化管理（2026-08-26）：左侧目录树 + 右侧列表 ── */
.kb-layout{display:grid;grid-template-columns:252px minmax(0,1fr);gap:18px;align-items:start;margin-top:4px}
.kb-tree{padding:14px;position:sticky;top:86px}
.kb-tree-head{font-size:12px;font-weight:800;letter-spacing:.08em;color:var(--muted);padding:4px 8px 10px;border-bottom:1px solid var(--line);margin-bottom:8px}
.kb-node{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:10px;cursor:pointer;font-size:14px;color:#22364e;margin:2px 0}
.kb-node:hover{background:#eef4fa}
.kb-node-active{background:linear-gradient(90deg,#e3f0fe,#eef6ff);color:#0d6fc3;font-weight:700}
.kb-biz{font-weight:600}
.kb-leaf{padding-left:34px;font-size:13.5px;color:var(--muted)}
.kb-leaf.kb-node-active{color:#0d6fc3}
.kb-count{margin-left:auto;font-size:12px;background:#eef5fb;color:#315c80;border-radius:999px;padding:2px 8px}
.kb-node-active .kb-count{background:#cfe5fb;color:#0d6fc3}
.kb-main{min-width:0}
@media(max-width:1050px){.kb-layout{grid-template-columns:1fr}.kb-tree{position:static;max-height:220px;overflow:auto}}


/* ── 知识智能入库（两步式弹窗加宽）── */
.kb-wide{width:min(860px,100%)}
#intakeContent{font-family:inherit;line-height:1.6}

