:root{--bg: #ffffff;--bg-muted: #f6f7f9;--border: #e5e7eb;--text: #111827;--text-muted: #6b7280;--primary: #1f5eff;--primary-soft: #eef2ff;--assistant-bg: #ffffff;--user-bg: #1f5eff;--radius: 12px}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{font-family:Inter,Segoe UI,system-ui,-apple-system,Helvetica Neue,Arial,sans-serif;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased}.center-screen{display:flex;align-items:center;justify-content:center;height:100%}.login-bg{background:radial-gradient(1200px 600px at 15% 10%,#eef2ff 0%,transparent 60%),radial-gradient(900px 500px at 85% 90%,#e0f2fe 0%,transparent 55%),#fbfcfe}.login-card{width:420px;max-width:calc(100vw - 32px);padding:12px;box-shadow:0 1px 2px #1018280a,0 24px 60px -20px #1018282e;border:1px solid var(--border);border-radius:16px}.login-head{display:flex;gap:14px;align-items:center;margin-bottom:28px}.login-logo,.brand-mark{width:42px;height:42px;border-radius:12px;background:var(--primary);color:#fff;font-weight:700;font-size:20px;display:flex;align-items:center;justify-content:center;flex:0 0 auto}.app-shell{display:flex;height:100vh;overflow:hidden}.sidebar{width:300px;flex:0 0 300px;background:var(--bg-muted);border-right:1px solid var(--border);display:flex;flex-direction:column;min-height:0}.sidebar-head{padding:18px 16px 12px;border-bottom:1px solid var(--border)}.brand{display:flex;gap:10px;align-items:center;margin-bottom:16px}.brand-mark{width:34px;height:34px;font-size:16px;border-radius:10px}.brand-title{font-weight:650;font-size:15px;line-height:1.2}.brand-sub{font-size:12px;color:var(--text-muted)}.new-chat-btn{height:38px}.session-list{flex:1;overflow-y:auto;padding:10px 8px;display:flex;flex-direction:column;gap:2px}.sidebar-empty{padding:12px;font-size:13px}.session-item{display:flex;align-items:center;gap:4px;padding:9px 10px;border-radius:8px;cursor:pointer;font-size:13.5px;color:#374151;transition:background .15s ease}.session-item:hover{background:#eceefe}.session-item.active{background:#e3e9ff;color:#1d4ed8;font-weight:550}.session-title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-foot{border-top:1px solid var(--border);padding:12px}.user-block{display:flex;align-items:center;justify-content:space-between;gap:8px}.user-name{font-size:13px;font-weight:600;line-height:1.3}.user-role{font-size:12px;color:var(--text-muted)}.chat-main{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0}.chat-head{padding:16px 28px;border-bottom:1px solid var(--border);background:#fff}.chat-head-inner,.chat-thread,.composer-inner{width:100%;max-width:880px;margin:0 auto}.chat-scroll{flex:1;overflow-y:auto;padding:24px 28px 8px;background:#fcfcfd}.empty-state{max-width:720px;margin:40px auto;text-align:center}.hints{display:grid;gap:10px;margin-top:8px;text-align:left}.hint-card{border:1px solid var(--border);background:#fff;border-radius:10px;padding:12px 14px;font-size:13.5px;color:#374151}.message-row{display:flex;margin-bottom:16px}.message-row.user{justify-content:flex-end}.bubble{max-width:min(680px,88%);padding:12px 16px;border-radius:var(--radius);font-size:14.5px;line-height:1.55}.bubble.user{background:var(--user-bg);color:#fff;border-bottom-right-radius:4px}.bubble.assistant{background:var(--assistant-bg);border:1px solid var(--border);border-bottom-left-radius:4px;box-shadow:0 1px 2px #1018280a}.bubble-text{white-space:pre-wrap;word-break:break-word}.bubble-text:has(.md){white-space:normal}.md>*:first-child{margin-top:0}.md>*:last-child{margin-bottom:0}.md p{margin:0 0 8px;line-height:1.6}.md h1,.md h2,.md h3,.md h4{margin:14px 0 8px;font-size:15px;font-weight:600;line-height:1.35}.md h1{font-size:17px}.md ul,.md ol{margin:0 0 8px;padding-left:22px}.md li{margin:3px 0;line-height:1.55}.md li>p{margin:0}.md code{padding:1px 5px;border-radius:4px;background:#0f172a12;font-family:JetBrains Mono,Cascadia Mono,Consolas,monospace;font-size:.92em}.md pre{margin:8px 0;padding:10px 12px;border-radius:8px;background:#f6f8fa;border:1px solid var(--border);overflow-x:auto}.md pre code{padding:0;background:none;font-size:12.5px;line-height:1.5;white-space:pre}.md blockquote{margin:8px 0;padding:2px 12px;border-left:3px solid var(--border);color:var(--text-muted)}.md a{color:#1677ff;text-decoration:none}.md a:hover{text-decoration:underline}.md hr{margin:12px 0;border:none;border-top:1px solid var(--border)}.md-table-wrap{margin:8px 0;overflow-x:auto}.md table{border-collapse:collapse;font-size:13px;min-width:100%}.md th,.md td{border:1px solid var(--border);padding:6px 10px;text-align:left;vertical-align:top}.md th{background:#0f172a0a;font-weight:600}.md tbody tr:nth-child(2n){background:#0f172a05}.bubble-text.muted{color:var(--text-muted);display:flex;align-items:center;gap:8px}.tool-tags{margin-bottom:8px}.tool-tags .ant-tag{margin-bottom:4px;font-size:12px}.chart-card{margin:14px 0 4px;padding:14px;border:1px solid var(--border);border-radius:12px;background:#fff}.chart-card figcaption{font-size:13px;font-weight:600;color:#374151;margin-bottom:8px}.chart-body{width:100%}.chat-error-wrap{width:100%;max-width:880px;margin:0 auto 8px;padding:0 2px}.composer{border-top:1px solid var(--border);padding:12px 28px 14px;background:#fff}.attached-list{margin-bottom:8px}.composer-row{display:flex;gap:8px;align-items:flex-end}.composer-row .ant-input{resize:none}.composer-hint{margin-top:6px;font-size:12px;color:var(--text-muted)}@media(max-width:900px){.sidebar{display:none}.chat-head,.chat-scroll,.composer{padding-left:16px;padding-right:16px}.chat-error-wrap{padding:0 16px}.bubble{max-width:92%}}.citations{margin-top:12px;padding-top:10px;border-top:1px dashed var(--border)}.citations-title{font-size:12px;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:.04em;margin-bottom:6px}.citations-list{margin:0;padding-left:18px;display:grid;gap:8px}.citation-item{font-size:13px}.citation-head{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.citation-source{font-weight:550;color:#1f2937}.citation-section{font-size:12px;color:var(--text-muted);margin-top:2px}.citation-snippet{font-size:12.5px;color:#4b5563;margin-top:2px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.kb-link{justify-content:flex-start;margin-bottom:8px;color:#374151}.kb-upload{display:grid;gap:8px}.kb-upload-row{display:flex;gap:8px}.kb-title{font-size:13.5px;font-weight:550}.kb-error{margin-top:2px}.kb-search{display:grid;gap:8px;border-top:1px solid var(--border);padding-top:12px}.kb-results{display:grid;gap:8px;max-height:260px;overflow-y:auto}.kb-result{border:1px solid var(--border);border-radius:8px;padding:8px 10px;font-size:13px}.kb-result-head{display:flex;align-items:center;gap:6px}.result-files{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.row-inactive{opacity:.5}.user-block-info{cursor:pointer;min-width:0;flex:1}.user-block-info:hover .user-name{text-decoration:underline}
