|
|
|
@ -1,11 +1,24 @@ |
|
|
|
/* ==================== CSS 变量 ==================== */ |
|
|
|
:root { --bg:#f0f2f5; --card:#fff; --primary:#6366f1; --primary2:#8b5cf6; --success:#10b981; --warn:#f59e0b; --danger:#ef4444; --text:#1f2937; --sub:#6b7280; --border:#e5e7eb; --radius:10px; } |
|
|
|
:root { |
|
|
|
--bg:#f5f6f8; --card:#ffffff; --surface:#fafbfc; |
|
|
|
--primary:#111827; --primary-d:#030712; --primary2:#374151; |
|
|
|
--success:#10b981; --warn:#f59e0b; --danger:#ef4444; |
|
|
|
--text:#1f2937; --sub:#6b7280; --muted:#9ca3af; |
|
|
|
--border:#e7e9ee; --border-strong:#d1d5db; |
|
|
|
--radius:12px; --radius-sm:8px; --radius-lg:16px; |
|
|
|
--shadow-sm:0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06); |
|
|
|
--shadow:0 2px 8px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.04); |
|
|
|
--shadow-lg:0 10px 30px rgba(16,24,40,.10); |
|
|
|
--ring:0 0 0 3px rgba(17,24,39,.12); |
|
|
|
} |
|
|
|
|
|
|
|
* { margin:0; padding:0; box-sizing:border-box; } |
|
|
|
body { font-family: -apple-system,"Microsoft YaHei",sans-serif; background:var(--bg); color:var(--text); min-height:100vh; } |
|
|
|
html, body { height:100%; } |
|
|
|
body { font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif; background:var(--bg); color:var(--text); overflow:hidden; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; line-height:1.55; } |
|
|
|
#app { height:100vh; display:flex; flex-direction:column; min-height:0; } |
|
|
|
|
|
|
|
/* ==================== 顶部导航 ==================== */ |
|
|
|
.topbar { background:linear-gradient(135deg, var(--primary) 0%, var(--primary2) 100%); color:#fff; padding:0 24px; height:56px; display:flex; align-items:center; gap:12px; position:sticky; top:0; z-index:100; } |
|
|
|
.topbar { background:#1f2937; color:#fff; padding:0 24px; height:56px; display:flex; align-items:center; gap:12px; flex:none; z-index:100; } |
|
|
|
.topbar .logo { font-size:20px; font-weight:700; } |
|
|
|
.topbar .ver { font-size:12px; opacity:.7; margin-left:4px; } |
|
|
|
.topbar .links { margin-left:auto; display:flex; gap:12px; } |
|
|
|
@ -13,36 +26,41 @@ body { font-family: -apple-system,"Microsoft YaHei",sans-serif; background:var(- |
|
|
|
.topbar .links a:hover { opacity:1; } |
|
|
|
|
|
|
|
/* ==================== Tab 导航 ==================== */ |
|
|
|
.tabs { display:flex; gap:0; background:var(--card); border-bottom:1px solid var(--border); padding:0 24px; position:sticky; top:56px; z-index:99; } |
|
|
|
.tabs { display:flex; gap:0; background:var(--card); border-bottom:1px solid var(--border); padding:0 24px; flex:none; z-index:99; } |
|
|
|
.tab-btn { padding:14px 24px; border:none; background:none; font-size:14px; cursor:pointer; border-bottom:3px solid transparent; color:var(--sub); transition:all .2s; font-family:inherit; display:flex; align-items:center; gap:6px; } |
|
|
|
.tab-btn:hover { color:var(--text); } |
|
|
|
.tab-btn.active { color:var(--primary); border-bottom-color:var(--primary); font-weight:600; } |
|
|
|
.tab-icon { font-size:18px; } |
|
|
|
|
|
|
|
/* ==================== 内容区 ==================== */ |
|
|
|
.main { max-width:1400px; margin:0 auto; padding:20px; } |
|
|
|
.main { max-width:1400px; width:100%; margin:0 auto; padding:20px; flex:1; min-height:0; overflow-y:auto; } |
|
|
|
/* 聊天 Tab:圣杯布局,内容撑满视口、外层不滚动 */ |
|
|
|
.main.main-chat { overflow:hidden; padding:16px; display:flex; } |
|
|
|
.chat-tab-pane { flex:1; min-width:0; min-height:0; display:flex; } |
|
|
|
@keyframes fadeIn { from{opacity:0;transform:translateY(8px);} to{opacity:1;transform:translateY(0);} } |
|
|
|
|
|
|
|
/* ==================== 卡片 ==================== */ |
|
|
|
.card { background:var(--card); border-radius:var(--radius); padding:20px; margin-bottom:16px; border:1px solid var(--border); } |
|
|
|
.card h2 { font-size:16px; margin-bottom:12px; display:flex; align-items:center; gap:8px; } |
|
|
|
.card h3 { font-size:14px; margin-bottom:8px; color:var(--sub); } |
|
|
|
.card { background:var(--card); border-radius:var(--radius); padding:22px; margin-bottom:16px; border:1px solid var(--border); } |
|
|
|
.card h2 { font-size:16px; font-weight:600; margin-bottom:16px; display:flex; align-items:center; gap:8px; } |
|
|
|
.card h3 { font-size:13px; font-weight:600; margin-bottom:8px; color:var(--sub); } |
|
|
|
|
|
|
|
/* ==================== 表单 ==================== */ |
|
|
|
.input-row { display:flex; gap:8px; margin-bottom:12px; flex-wrap:wrap; } |
|
|
|
.input, .textarea, .select { padding:10px 14px; border:1px solid var(--border); border-radius:8px; font-size:14px; font-family:inherit; outline:none; transition:border-color .2s; } |
|
|
|
.input:focus, .textarea:focus, .select:focus { border-color:var(--primary); } |
|
|
|
.input:focus, .textarea:focus, .select:focus { border-color:var(--primary); box-shadow:var(--ring); } |
|
|
|
.input { flex:1; min-width:200px; } |
|
|
|
.textarea { width:100%; resize:vertical; min-height:120px; } |
|
|
|
.select { min-width:160px; } |
|
|
|
.input-sm { width:120px; flex:none; } |
|
|
|
.input-field-sm { display:flex; flex-direction:column; gap:4px; flex:none; } |
|
|
|
.input-field-sm span { font-size:12px; color:var(--sub); font-weight:600; } |
|
|
|
|
|
|
|
.btn { padding:10px 20px; border:none; border-radius:8px; font-size:14px; cursor:pointer; font-family:inherit; font-weight:500; transition:all .2s; display:inline-flex; align-items:center; gap:6px; white-space:nowrap; } |
|
|
|
.btn:disabled { opacity:.5; cursor:not-allowed; } |
|
|
|
.btn-primary { background:var(--primary); color:#fff; } |
|
|
|
.btn-primary:hover:not(:disabled) { background:#4f46e5; } |
|
|
|
.btn-primary:hover:not(:disabled) { background:#000; } |
|
|
|
.btn-purple { background:var(--primary2); color:#fff; } |
|
|
|
.btn-purple:hover:not(:disabled) { background:#7c3aed; } |
|
|
|
.btn-purple:hover:not(:disabled) { background:#1f2937; } |
|
|
|
.btn-success { background:var(--success); color:#fff; } |
|
|
|
.btn-outline { background:#fff; color:var(--primary); border:1px solid var(--primary); } |
|
|
|
.btn-sm { padding:6px 12px; font-size:12px; } |
|
|
|
@ -50,28 +68,24 @@ body { font-family: -apple-system,"Microsoft YaHei",sans-serif; background:var(- |
|
|
|
.btn-warn { background:var(--warn); color:#fff; } |
|
|
|
|
|
|
|
/* ==================== 消息区 ==================== */ |
|
|
|
.msg-area { border:1px solid var(--border); border-radius:var(--radius); height:400px; overflow-y:auto; padding:16px; background:#fafbfc; margin-bottom:12px; display:flex; flex-direction:column; gap:10px; } |
|
|
|
.msg { display:flex; gap:10px; max-width:85%; animation: fadeIn .3s; } |
|
|
|
.msg-area { border:1px solid var(--border); border-radius:var(--radius); height:400px; overflow-y:auto; padding:16px; background:#fff; margin-bottom:12px; display:flex; flex-direction:column; gap:10px; } |
|
|
|
.msg { display:flex; gap:12px; max-width:88%; animation: fadeIn .25s; } |
|
|
|
.msg.user { align-self:flex-end; flex-direction:row-reverse; } |
|
|
|
.msg.assistant { align-self:flex-start; } |
|
|
|
.msg-avatar { width:34px; height:34px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0; } |
|
|
|
.msg.user .msg-avatar { background:var(--primary); color:#fff; } |
|
|
|
.msg.assistant .msg-avatar { background:var(--success); color:#fff; } |
|
|
|
.msg-bubble { padding:10px 14px; border-radius:12px; line-height:1.6; font-size:14px; word-break:break-word; white-space:pre-wrap; } |
|
|
|
.msg.user .msg-bubble { background:var(--primary); color:#fff; border-bottom-right-radius:4px; } |
|
|
|
.msg.assistant .msg-bubble { background:#fff; border:1px solid var(--border); border-bottom-left-radius:4px; } |
|
|
|
.msg.streaming .msg-bubble { border-color:var(--primary); box-shadow:0 0 0 1px var(--primary); } |
|
|
|
.msg-bubble { line-height:1.65; font-size:15px; word-break:break-word; white-space:pre-wrap; } |
|
|
|
.msg.user .msg-bubble { background:#f4f4f5; color:var(--text); padding:10px 14px; border-radius:14px; } |
|
|
|
.msg.assistant .msg-bubble { background:transparent; padding:1px 0; } |
|
|
|
|
|
|
|
/* ==================== 商品信息展示 ==================== */ |
|
|
|
.result-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:12px; margin-top:12px; } |
|
|
|
.result-item { background:#f9fafb; padding:12px 16px; border-radius:8px; border:1px solid var(--border); } |
|
|
|
.result-item { background:#fafafa; padding:12px 16px; border-radius:10px; border:1px solid var(--border); } |
|
|
|
.result-item .label { font-size:12px; color:var(--sub); margin-bottom:4px; } |
|
|
|
.result-item .value { font-size:14px; font-weight:500; } |
|
|
|
.result-json { background:#1e293b; color:#e2e8f0; padding:16px; border-radius:8px; font-family:'Fira Code',monospace; font-size:13px; white-space:pre-wrap; overflow-x:auto; } |
|
|
|
|
|
|
|
/* ==================== 文件上传区 ==================== */ |
|
|
|
.upload-zone { border:2px dashed var(--border); border-radius:var(--radius); padding:32px; text-align:center; transition:all .2s; cursor:pointer; margin-bottom:12px; } |
|
|
|
.upload-zone:hover, .upload-zone.drag-over { border-color:var(--primary); background:#eef2ff; } |
|
|
|
.upload-zone:hover, .upload-zone.drag-over { border-color:var(--primary); background:#f3f4f6; } |
|
|
|
.upload-zone p { color:var(--sub); } |
|
|
|
.upload-zone .icon { font-size:40px; margin-bottom:8px; } |
|
|
|
|
|
|
|
@ -89,9 +103,11 @@ body { font-family: -apple-system,"Microsoft YaHei",sans-serif; background:var(- |
|
|
|
|
|
|
|
/* ==================== 表格样式 ==================== */ |
|
|
|
.data-table { width:100%; border-collapse:collapse; font-size:13px; } |
|
|
|
.data-table th { background:#f9fafb; padding:10px 12px; text-align:left; font-weight:600; border-bottom:2px solid var(--border); white-space:nowrap; } |
|
|
|
.data-table td { padding:10px 12px; border-bottom:1px solid var(--border); vertical-align:middle; } |
|
|
|
.data-table tr:hover { background:#f9fafb; } |
|
|
|
.data-table th { background:#fafafa; padding:11px 12px; text-align:left; font-weight:600; font-size:12px; color:var(--sub); border-bottom:1px solid var(--border); white-space:nowrap; } |
|
|
|
.data-table td { padding:11px 12px; border-bottom:1px solid var(--border); vertical-align:middle; } |
|
|
|
.data-table tr:hover { background:#fafafa; } |
|
|
|
.data-table td .btn { margin:2px 0; } |
|
|
|
.data-table td .btn + .btn { margin-left:6px; } |
|
|
|
.data-table .status-ready { color:var(--success); font-weight:600; } |
|
|
|
.data-table .status-processing { color:var(--warn); font-weight:600; } |
|
|
|
.data-table .status-failed { color:var(--danger); font-weight:600; } |
|
|
|
@ -105,9 +121,9 @@ body { font-family: -apple-system,"Microsoft YaHei",sans-serif; background:var(- |
|
|
|
|
|
|
|
/* ==================== 统计卡片 ==================== */ |
|
|
|
.stat-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); gap:12px; margin-bottom:16px; } |
|
|
|
.stat-card { background:#f9fafb; border-radius:8px; padding:16px; text-align:center; border:1px solid var(--border); } |
|
|
|
.stat-card .number { font-size:28px; font-weight:700; color:var(--primary); } |
|
|
|
.stat-card .label { font-size:12px; color:var(--sub); margin-top:4px; } |
|
|
|
.stat-card { background:#fafafa; border-radius:10px; padding:18px 16px; text-align:center; border:1px solid var(--border); } |
|
|
|
.stat-card .number { font-size:26px; font-weight:700; color:var(--text); letter-spacing:-.01em; } |
|
|
|
.stat-card .label { font-size:12px; color:var(--muted); margin-top:5px; } |
|
|
|
|
|
|
|
/* ==================== 弹窗 ==================== */ |
|
|
|
.modal-overlay { position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,.5); z-index:200; display:none; align-items:center; justify-content:center; } |
|
|
|
@ -118,11 +134,11 @@ body { font-family: -apple-system,"Microsoft YaHei",sans-serif; background:var(- |
|
|
|
.modal-close:hover { color:var(--text); } |
|
|
|
|
|
|
|
/* ==================== 分类标签 ==================== */ |
|
|
|
.category-tag { display:inline-block; padding:2px 8px; border-radius:12px; font-size:11px; background:#eef2ff; color:var(--primary); } |
|
|
|
.category-tag { display:inline-block; padding:2px 8px; border-radius:12px; font-size:11px; background:#f3f4f6; color:var(--text); } |
|
|
|
|
|
|
|
/* ==================== 搜索结果 ==================== */ |
|
|
|
.search-result { background:#f9fafb; border-radius:8px; padding:12px; margin-bottom:8px; border:1px solid var(--border); } |
|
|
|
.search-result .score { font-size:12px; color:var(--success); font-weight:600; } |
|
|
|
.search-result { background:#fafafa; border-radius:10px; padding:12px 14px; margin-bottom:8px; border:1px solid var(--border); } |
|
|
|
.search-result .score { font-size:12px; color:var(--sub); font-weight:600; } |
|
|
|
.search-result .meta { font-size:12px; color:var(--sub); margin-top:4px; } |
|
|
|
.search-result .content { font-size:13px; margin-top:6px; line-height:1.5; } |
|
|
|
|
|
|
|
@ -134,72 +150,137 @@ body { font-family: -apple-system,"Microsoft YaHei",sans-serif; background:var(- |
|
|
|
|
|
|
|
/* ==================== 消息列表样式(会话管理) ==================== */ |
|
|
|
.msg-item { border:1px solid var(--border); } |
|
|
|
.msg-item.msg-user { background:#f0f9ff; border-left:3px solid var(--primary); } |
|
|
|
.msg-item.msg-assistant { background:#f0fdf4; border-left:3px solid var(--success); } |
|
|
|
.msg-item.msg-system { background:#f9fafb; border-left:3px solid var(--sub); } |
|
|
|
.msg-item.msg-user { background:#fafafa; border-left:3px solid #111827; } |
|
|
|
.msg-item.msg-assistant { background:#fff; border-left:3px solid var(--border-strong); } |
|
|
|
.msg-item.msg-system { background:#fafafa; border-left:3px solid var(--muted); } |
|
|
|
|
|
|
|
/* ==================== 响应式 ==================== */ |
|
|
|
@media(max-width:768px) { .tabs { overflow-x:auto; } .tab-btn { padding:12px 16px; font-size:13px; } .stream-compare { grid-template-columns:1fr; } .stat-grid { grid-template-columns:1fr 1fr; } } |
|
|
|
|
|
|
|
/* ==================== Chat Panel ==================== */ |
|
|
|
.chat-shell { display:grid; grid-template-columns:280px minmax(0, 1fr); gap:16px; min-height:680px; } |
|
|
|
.chat-shell { display:grid; grid-template-columns:260px minmax(0, 1fr); gap:16px; flex:1; min-width:0; min-height:0; } |
|
|
|
.chat-sidebar, .chat-main { background:var(--card); border:1px solid var(--border); border-radius:var(--radius); } |
|
|
|
.chat-sidebar { padding:16px; display:flex; flex-direction:column; gap:18px; } |
|
|
|
.agent-card { display:flex; align-items:center; gap:12px; padding-bottom:14px; border-bottom:1px solid var(--border); } |
|
|
|
.agent-avatar { width:44px; height:44px; border-radius:8px; display:flex; align-items:center; justify-content:center; background:#111827; color:#fff; font-weight:800; letter-spacing:0; } |
|
|
|
.agent-name { font-weight:700; } |
|
|
|
.agent-status { margin-top:4px; color:var(--sub); font-size:12px; display:flex; align-items:center; gap:6px; } |
|
|
|
.agent-status span { width:7px; height:7px; border-radius:999px; background:var(--success); display:inline-block; } |
|
|
|
.chat-sidebar { padding:16px; display:flex; flex-direction:column; gap:20px; overflow:hidden; min-height:0; } |
|
|
|
.agent-card { display:flex; align-items:center; gap:12px; } |
|
|
|
.agent-avatar { width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center; background:#4f46e5; color:#fff; font-weight:700; font-size:14px; } |
|
|
|
.agent-name { font-weight:600; font-size:14px; } |
|
|
|
.agent-status { margin-top:3px; color:var(--muted); font-size:12px; display:flex; align-items:center; gap:6px; } |
|
|
|
.agent-status span { width:6px; height:6px; border-radius:999px; background:var(--success); display:inline-block; } |
|
|
|
.side-section { display:flex; flex-direction:column; gap:8px; } |
|
|
|
.side-label { font-size:12px; color:var(--sub); font-weight:700; } |
|
|
|
.role-option { width:100%; border:1px solid var(--border); background:#fff; border-radius:8px; padding:10px; display:flex; gap:10px; align-items:flex-start; text-align:left; cursor:pointer; transition:all .2s; font-family:inherit; } |
|
|
|
.role-option:hover, .role-option.active { border-color:var(--primary); background:#f8faff; } |
|
|
|
.role-option strong { display:block; font-size:13px; color:var(--text); margin-bottom:3px; } |
|
|
|
.role-option small { display:block; font-size:12px; color:var(--sub); line-height:1.4; } |
|
|
|
.role-badge { flex:none; min-width:38px; padding:3px 6px; border-radius:6px; background:#eef2ff; color:var(--primary); font-size:11px; text-align:center; font-weight:700; } |
|
|
|
.side-label { font-size:12px; color:var(--muted); font-weight:500; } |
|
|
|
.toggle-line { display:flex; align-items:center; gap:8px; font-size:13px; cursor:pointer; } |
|
|
|
.toggle-line input { width:16px; height:16px; } |
|
|
|
.chat-select { width:100%; min-width:0; } |
|
|
|
.kb-check-list { max-height:156px; overflow-y:auto; border:1px solid var(--border); border-radius:8px; background:#fff; padding:6px; display:flex; flex-direction:column; gap:4px; } |
|
|
|
.kb-check-item { display:flex; align-items:center; gap:8px; padding:7px 8px; border-radius:6px; font-size:13px; cursor:pointer; } |
|
|
|
.kb-check-item:hover { background:#f8faff; } |
|
|
|
.kb-check-item input { width:15px; height:15px; flex:none; } |
|
|
|
.kb-empty { color:var(--sub); font-size:12px; padding:8px; } |
|
|
|
.side-note { color:var(--sub); font-size:12px; line-height:1.5; } |
|
|
|
.session-box { padding:8px 10px; border:1px solid var(--border); border-radius:8px; background:#f9fafb; font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } |
|
|
|
.side-actions { display:flex; gap:8px; } |
|
|
|
.side-actions .btn { flex:1; justify-content:center; } |
|
|
|
.chat-main { display:flex; flex-direction:column; min-width:0; overflow:hidden; } |
|
|
|
.chat-header { padding:18px 20px; border-bottom:1px solid var(--border); display:flex; align-items:flex-start; justify-content:space-between; gap:16px; } |
|
|
|
.chat-header h2 { margin-bottom:6px; font-size:18px; } |
|
|
|
.chat-header p { color:var(--sub); font-size:13px; } |
|
|
|
.chat-meta { display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end; } |
|
|
|
.chat-mode { min-width:140px; } |
|
|
|
.rag-pill { display:inline-flex; align-items:center; min-height:34px; padding:0 10px; border-radius:999px; background:#f3f4f6; color:var(--sub); font-size:12px; font-weight:700; } |
|
|
|
.rag-pill.on { background:#ecfdf5; color:#047857; } |
|
|
|
.quick-row { padding:14px 20px 0; display:flex; gap:8px; flex-wrap:wrap; } |
|
|
|
.quick-row button { border:1px solid var(--border); background:#fff; border-radius:999px; padding:7px 12px; font-size:12px; color:var(--text); cursor:pointer; transition:all .2s; } |
|
|
|
.quick-row button:hover { border-color:var(--primary); color:var(--primary); background:#f8faff; } |
|
|
|
.chat-msg-area { flex:1; height:auto; min-height:420px; margin:14px 20px; background:#f8fafc; } |
|
|
|
.chat-msg-area .msg { max-width:78%; } |
|
|
|
.chat-main { display:flex; flex-direction:column; min-width:0; min-height:0; overflow:hidden; } |
|
|
|
.chat-header { padding:18px 24px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; gap:16px; } |
|
|
|
.chat-title h2 { font-size:16px; font-weight:600; } |
|
|
|
.chat-subline { margin-top:5px; color:var(--muted); font-size:12px; display:flex; align-items:center; gap:7px; flex-wrap:wrap; } |
|
|
|
.chat-subline .dot-sep { color:var(--border-strong); } |
|
|
|
.rag-dot { width:7px; height:7px; border-radius:999px; background:var(--muted); display:inline-block; } |
|
|
|
.rag-dot.on { background:var(--success); } |
|
|
|
.chat-mode { min-width:130px; font-size:13px; } |
|
|
|
.quick-row { padding:18px 24px 0; display:flex; gap:8px; flex-wrap:wrap; } |
|
|
|
.quick-row button { border:none; background:#f7f7f8; border-radius:999px; padding:7px 14px; font-size:13px; color:var(--sub); cursor:pointer; transition:all .15s; } |
|
|
|
.quick-row button:hover { background:#ececee; color:var(--text); } |
|
|
|
.chat-msg-area { flex:1; height:auto; min-height:0; margin:0; border:none; border-radius:0; padding:24px; background:#fff; gap:18px; } |
|
|
|
.chat-msg-area .msg { max-width:100%; } |
|
|
|
.chat-msg-area .msg.user { max-width:80%; } |
|
|
|
.chat-msg-area .msg-content { min-width:0; } |
|
|
|
.chat-msg-area .msg-avatar { font-size:12px; font-weight:700; } |
|
|
|
.msg-tools { margin-top:5px; display:flex; align-items:center; gap:8px; font-size:11px; color:var(--sub); } |
|
|
|
.msg-tools button { border:none; background:none; color:var(--primary); cursor:pointer; font-size:11px; padding:0; } |
|
|
|
.chat-composer { border-top:1px solid var(--border); padding:14px 20px; display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:10px; align-items:end; background:#fff; } |
|
|
|
.chat-textarea { min-height:46px; max-height:140px; resize:vertical; padding:12px 14px; } |
|
|
|
.send-btn { height:46px; min-width:92px; justify-content:center; } |
|
|
|
|
|
|
|
@media(max-width:960px) { |
|
|
|
.chat-shell { grid-template-columns:1fr; } |
|
|
|
.chat-sidebar { order:2; } |
|
|
|
.chat-main { order:1; min-height:620px; } |
|
|
|
} |
|
|
|
.edit-textarea { width:100%; min-width:min(260px, 100%); } |
|
|
|
.edit-actions { display:flex; align-items:center; gap:8px; margin-top:8px; flex-wrap:wrap; } |
|
|
|
.edit-actions span { font-size:12px; color:var(--muted); } |
|
|
|
.msg-tools { margin-top:7px; display:flex; align-items:center; gap:4px; font-size:12px; color:var(--muted); flex-wrap:wrap; opacity:0; transition:opacity .15s; } |
|
|
|
.msg:hover .msg-tools, .msg.streaming .msg-tools { opacity:1; } |
|
|
|
.msg-tools span { margin-right:4px; } |
|
|
|
.msg-tools button { border:none; background:transparent; color:var(--muted); cursor:pointer; font-size:12px; padding:2px 7px; border-radius:6px; line-height:1.4; transition:all .15s; } |
|
|
|
.msg-tools button:hover { background:#f4f4f5; color:var(--text); } |
|
|
|
.msg-tools button:focus-visible { outline:none; box-shadow:var(--ring); } |
|
|
|
.chat-composer { border-top:1px solid var(--border); padding:16px 24px 20px; background:#fff; } |
|
|
|
.composer-box { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:end; border:1px solid var(--border); border-radius:14px; padding:8px 8px 8px 14px; transition:border-color .15s; } |
|
|
|
.composer-box:focus-within { border-color:var(--text); } |
|
|
|
.chat-textarea { border:none; outline:none; background:transparent; resize:none; min-height:40px; max-height:160px; padding:8px 0; font-size:15px; font-family:inherit; line-height:1.5; } |
|
|
|
.send-btn { height:40px; min-width:72px; border:none; border-radius:10px; background:var(--text); color:#fff; font-size:14px; font-weight:500; cursor:pointer; transition:opacity .15s; } |
|
|
|
.send-btn:hover:not(:disabled) { opacity:.85; } |
|
|
|
.send-btn:disabled { opacity:.35; cursor:not-allowed; } |
|
|
|
|
|
|
|
@media(max-width:860px) { |
|
|
|
.main.main-chat { overflow-y:auto; display:block; } |
|
|
|
.chat-tab-pane { display:block; } |
|
|
|
.chat-shell { grid-template-columns:1fr; height:auto; min-height:0; } |
|
|
|
.chat-sidebar { order:1; overflow:visible; } |
|
|
|
.chat-main { order:2; min-height:560px; } |
|
|
|
.chat-msg-area { min-height:360px; } |
|
|
|
} |
|
|
|
@media(max-width:640px) { |
|
|
|
.chat-header { flex-direction:column; } |
|
|
|
.chat-meta { justify-content:flex-start; } |
|
|
|
.chat-msg-area .msg { max-width:94%; } |
|
|
|
.chat-composer { grid-template-columns:1fr; } |
|
|
|
.send-btn { width:100%; } |
|
|
|
.chat-header { flex-direction:column; align-items:flex-start; } |
|
|
|
.chat-msg-area .msg, .chat-msg-area .msg.user { max-width:100%; } |
|
|
|
.quick-row { padding:14px 16px 0; } |
|
|
|
.chat-msg-area { padding:16px; } |
|
|
|
.chat-composer { padding:12px 16px 16px; } |
|
|
|
} |
|
|
|
|
|
|
|
/* ==================== 滚动条 ==================== */ |
|
|
|
* { scrollbar-width:thin; scrollbar-color:#cbd0d8 transparent; } |
|
|
|
::-webkit-scrollbar { width:10px; height:10px; } |
|
|
|
::-webkit-scrollbar-thumb { background:#cbd0d8; border-radius:999px; border:2px solid transparent; background-clip:content-box; } |
|
|
|
::-webkit-scrollbar-thumb:hover { background:#aab0bb; background-clip:content-box; } |
|
|
|
::-webkit-scrollbar-track { background:transparent; } |
|
|
|
|
|
|
|
/* ==================== Markdown 渲染(AI 回复) ==================== */ |
|
|
|
.msg-bubble.markdown-body { white-space:normal; } |
|
|
|
.markdown-body { font-size:14px; line-height:1.7; word-break:break-word; } |
|
|
|
.markdown-body > *:first-child { margin-top:0; } |
|
|
|
.markdown-body > *:last-child { margin-bottom:0; } |
|
|
|
.markdown-body p { margin:8px 0; } |
|
|
|
.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4 { margin:14px 0 8px; line-height:1.3; font-weight:700; } |
|
|
|
.markdown-body h1 { font-size:20px; } .markdown-body h2 { font-size:18px; } .markdown-body h3 { font-size:16px; } .markdown-body h4 { font-size:14px; } |
|
|
|
.markdown-body ul,.markdown-body ol { margin:8px 0; padding-left:22px; } |
|
|
|
.markdown-body li { margin:3px 0; } |
|
|
|
.markdown-body li>p { margin:2px 0; } |
|
|
|
.markdown-body a { color:var(--primary); text-decoration:none; } |
|
|
|
.markdown-body a:hover { text-decoration:underline; } |
|
|
|
.markdown-body code { font-family:'Fira Code',ui-monospace,SFMono-Regular,Menlo,monospace; font-size:.88em; background:#f1f1f2; color:#374151; padding:.12em .4em; border-radius:5px; } |
|
|
|
.markdown-body pre { background:#1e293b; color:#e2e8f0; padding:14px 16px; border-radius:10px; overflow-x:auto; margin:10px 0; } |
|
|
|
.markdown-body pre code { background:none; color:inherit; padding:0; font-size:13px; } |
|
|
|
.markdown-body blockquote { margin:10px 0; padding:6px 14px; border-left:2px solid var(--border-strong); background:#fafafa; color:var(--sub); border-radius:0 8px 8px 0; } |
|
|
|
.markdown-body table { border-collapse:collapse; margin:10px 0; font-size:13px; width:100%; } |
|
|
|
.markdown-body th,.markdown-body td { border:1px solid var(--border); padding:6px 10px; text-align:left; } |
|
|
|
.markdown-body th { background:#f3f4f6; font-weight:600; } |
|
|
|
.markdown-body hr { border:none; border-top:1px solid var(--border); margin:14px 0; } |
|
|
|
.markdown-body img { max-width:100%; border-radius:8px; } |
|
|
|
|
|
|
|
/* 思考中光标 */ |
|
|
|
.msg .thinking { color:var(--sub); } |
|
|
|
.msg .thinking::after { content:'▋'; margin-left:2px; animation:blink 1s steps(2) infinite; } |
|
|
|
@keyframes blink { 0%,50%{opacity:1;} 51%,100%{opacity:0;} } |
|
|
|
|
|
|
|
/* ==================== 对话页 · 助手卡片(左) ==================== */ |
|
|
|
.side-section-grow { flex:1; min-height:0; } |
|
|
|
.assistant-list { display:flex; flex-direction:column; gap:4px; overflow-y:auto; padding-right:2px; margin:0 -6px; } |
|
|
|
.assistant-card { width:100%; border:none; background:transparent; border-radius:9px; padding:9px 10px; display:flex; gap:10px; align-items:center; text-align:left; cursor:pointer; transition:background .12s; font-family:inherit; } |
|
|
|
.assistant-card:hover { background:#f4f4f5; } |
|
|
|
.assistant-card.active { background:#f4f4f5; } |
|
|
|
.assistant-avatar-sm { flex:none; width:30px; height:30px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:600; color:#fff; background:#0d9488; } |
|
|
|
.assistant-list .assistant-card:nth-child(6n+1) .assistant-avatar-sm { background:#0d9488; } |
|
|
|
.assistant-list .assistant-card:nth-child(6n+2) .assistant-avatar-sm { background:#ea580c; } |
|
|
|
.assistant-list .assistant-card:nth-child(6n+3) .assistant-avatar-sm { background:#2563eb; } |
|
|
|
.assistant-list .assistant-card:nth-child(6n+4) .assistant-avatar-sm { background:#16a34a; } |
|
|
|
.assistant-list .assistant-card:nth-child(6n+5) .assistant-avatar-sm { background:#db2777; } |
|
|
|
.assistant-list .assistant-card:nth-child(6n+6) .assistant-avatar-sm { background:#0891b2; } |
|
|
|
.assistant-meta { min-width:0; display:flex; flex-direction:column; gap:1px; } |
|
|
|
.assistant-meta strong { font-size:13px; font-weight:600; color:var(--text); } |
|
|
|
.assistant-meta small { font-size:12px; color:var(--muted); line-height:1.4; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } |
|
|
|
|
|
|
|
/* ==================== 引用来源(回答下方) ==================== */ |
|
|
|
.msg-sources { margin-top:14px; padding-top:12px; border-top:1px solid var(--border); } |
|
|
|
.msg-sources-head { font-size:12px; font-weight:500; color:var(--muted); margin-bottom:10px; display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; } |
|
|
|
.source-doc { border:none; border-radius:0; background:transparent; padding:0; margin-bottom:12px; } |
|
|
|
.source-doc:last-child { margin-bottom:0; } |
|
|
|
.source-doc.clickable { cursor:pointer; } |
|
|
|
.source-doc.clickable:hover .source-doc-title { color:var(--primary); } |
|
|
|
.source-doc-head { display:flex; align-items:center; gap:8px; margin-bottom:5px; flex-wrap:wrap; } |
|
|
|
.source-doc-title { font-size:13px; font-weight:600; color:var(--text); word-break:break-word; min-width:0; transition:color .15s; } |
|
|
|
.source-open { font-size:11px; color:var(--muted); flex:none; } |
|
|
|
.source-chunk { font-size:12px; line-height:1.6; color:var(--sub); border-left:2px solid var(--border); padding-left:10px; margin-top:4px; } |
|
|
|
.source-rel { display:inline-block; font-size:11px; color:var(--muted); margin-right:6px; font-weight:600; } |
|
|
|
.source-snippet { color:var(--sub); } |