This commit is contained in:
2026-06-04 15:43:44 +08:00
parent ac490d851a
commit 746513cc54
11 changed files with 955 additions and 131 deletions

View File

@@ -1,5 +1,7 @@
/* ── Design Tokens ──────────────────────────────── */
:root {
color-scheme: light;
--rail-bg: #ffffff;
--rail-surface: #f7f8fa;
--rail-fg: #111827;
@@ -10,18 +12,18 @@
--bg: #f2f4f7;
--surface: #ffffff;
--fg: #111827;
--fg: #111111;
--muted: #6b7280;
--border: #e5e7eb;
--border: #e5e5e5;
--border-strong: #d1d5db;
--accent: #e20074;
--accent-dim: rgba(226,0,116,.10);
--accent-hover: #c8006a;
--success: #16a34a;
--success-bg: rgba(22,163,74,.08);
--warn: #d97706;
--warn-bg: rgba(217,119,6,.08);
--success: #17a34a;
--success-bg: rgba(23,163,74,.08);
--warn: #eab308;
--warn-bg: rgba(234,179,8,.08);
--danger: #dc2626;
--danger-bg: rgba(220,38,38,.08);
--info: #2563eb;
@@ -31,29 +33,71 @@
--font-body: "TeleNeoWeb-Regular", "Inter", -apple-system, sans-serif;
--font-mono: ui-monospace, "JetBrains Mono", Menlo, monospace;
--sidebar-w: 232px;
--sidebar-w: 240px;
--topbar-h: 54px;
--radius-sm: 6px;
--radius-md: 10px;
--radius-sm: 8px;
--radius-md: 12px;
--radius-pill: 9999px;
--shadow-card: 0 1px 4px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.04);
--shadow-card: 0 2px 8px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.04);
}
/* Auto dark: matches system preference unless user chose light explicitly */
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
color-scheme: dark;
--rail-bg: #17181d;
--rail-surface: #1d1f26;
--rail-fg: #f5f7fb;
--rail-muted: #a2a9b8;
--rail-border: #2a2d35;
--rail-hover: rgba(255,255,255,.06);
--rail-active: rgba(226,0,116,.15);
--bg: #0f1014;
--surface: #17181d;
--fg: #f5f7fb;
--muted: #a2a9b8;
--border: #2a2d35;
--border-strong: #3a3d48;
--success: #22c55e;
--success-bg: rgba(34,197,94,.10);
--warn: #facc15;
--warn-bg: rgba(250,204,21,.10);
--danger: #f87171;
--danger-bg: rgba(248,113,113,.10);
}
}
/* Explicit dark mode (user toggled) */
[data-theme="dark"] {
--rail-bg: #1a1a2e;
--rail-surface: #16213e;
--rail-fg: #f0f0f0;
--rail-muted: #8b929e;
--rail-border: #2d3748;
color-scheme: dark;
--rail-bg: #17181d;
--rail-surface: #1d1f26;
--rail-fg: #f5f7fb;
--rail-muted: #a2a9b8;
--rail-border: #2a2d35;
--rail-hover: rgba(255,255,255,.06);
--rail-active: rgba(226,0,116,.15);
--bg: #0f0f1a;
--surface: #1a1a2e;
--fg: #f0f0f0;
--muted: #9ca3af;
--border: #2d3748;
--border-strong: #4a5568;
--bg: #0f1014;
--surface: #17181d;
--fg: #f5f7fb;
--muted: #a2a9b8;
--border: #2a2d35;
--border-strong: #3a3d48;
--success: #22c55e;
--success-bg: rgba(34,197,94,.10);
--warn: #facc15;
--warn-bg: rgba(250,204,21,.10);
--danger: #f87171;
--danger-bg: rgba(248,113,113,.10);
}
/* Explicit light (overrides auto dark) */
[data-theme="light"] {
color-scheme: light;
}
/* ── Base Reset ─────────────────────────────────── */
@@ -165,13 +209,11 @@ body {
padding: 18px 16px 14px;
border-bottom: 1px solid var(--rail-border);
}
.brand-mark {
width: 32px; height: 32px;
background: var(--accent);
color: #fff;
border-radius: 8px;
display: flex; align-items: center; justify-content: center;
font-size: 11px; font-weight: 700; font-family: var(--font-display);
.brand-logo {
height: 32px;
width: auto;
max-width: 48px;
object-fit: contain;
flex-shrink: 0;
}
.brand-name { font-size: 13px; font-weight: 700; font-family: var(--font-display); color: var(--rail-fg); }
@@ -538,8 +580,199 @@ body {
.citation-rail { border-left: 1px solid var(--border); overflow-y: auto; padding: 14px 0; background: var(--surface); }
.citation-header { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 0 16px 8px; }
.citation-item { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.citation-item { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); transition: background 0.15s; }
.citation-item.highlighted { background: var(--accent-dim); border-left: 3px solid var(--accent); }
.cit-score { font-size: 11px; font-weight: 700; font-family: var(--font-mono); color: var(--success); width: 34px; flex-shrink: 0; padding-top: 1px; }
.cit-index { font-size: 10px; font-weight: 700; font-family: var(--font-mono); color: var(--muted); width: 18px; flex-shrink: 0; padding-top: 2px; }
.cit-name { font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.cit-clause { font-size: 10px; font-family: var(--font-mono); color: var(--muted); margin-left: 5px; }
.cit-snippet { font-size: 11px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; }
/* Inline citation badge [N] in message text */
.cite-ref {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 18px;
height: 16px;
padding: 0 4px;
border-radius: 3px;
font-size: 10px;
font-weight: 700;
font-family: var(--font-mono);
background: var(--accent-dim);
color: var(--accent);
cursor: pointer;
vertical-align: middle;
margin: 0 1px;
border: none;
line-height: 1;
transition: background 0.12s;
}
.cite-ref:hover { background: var(--accent); color: #fff; }
/* ── Loading States ─────────────────────────────── */
.loading-shimmer {
background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%);
background-size: 200% 100%;
animation: shimmer 1.4s ease-in-out infinite;
border-radius: var(--radius-sm);
display: inline-block;
}
@keyframes shimmer {
0% { background-position: 200% 0; }
100% { background-position: -200% 0; }
}
.stat-value-loading { height: 32px; width: 64px; }
/* ── Upload Modal ───────────────────────────────── */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0,0,0,.45);
backdrop-filter: blur(3px);
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
}
.modal-dialog {
display: grid;
grid-template-columns: 1.15fr 0.85fr;
max-width: 1000px;
width: 100%;
max-height: 90vh;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 18px;
overflow: hidden;
box-shadow: 0 14px 48px rgba(0,0,0,.22);
position: relative;
}
.modal-panel {
padding: 28px;
overflow-y: auto;
display: flex;
flex-direction: column;
}
.modal-panel + .modal-panel {
border-left: 1px solid var(--border);
background: color-mix(in srgb, var(--surface) 76%, var(--bg) 24%);
}
.modal-eyebrow {
font-family: var(--font-mono);
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--accent);
margin-bottom: 8px;
}
.modal-title { font-size: 22px; font-weight: 700; font-family: var(--font-display); line-height: 1.2; }
.modal-lead { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
.modal-close {
position: absolute;
top: 16px; right: 20px;
background: none;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
width: 30px; height: 30px;
display: flex; align-items: center; justify-content: center;
cursor: pointer; color: var(--muted);
transition: background 0.12s;
}
.modal-close:hover { background: var(--bg); color: var(--fg); }
.dropzone {
margin-top: 20px;
border: 1px dashed rgba(226,0,116,.46);
border-radius: var(--radius-md);
background: rgba(226,0,116,.04);
padding: 28px 20px;
display: flex;
flex-direction: column;
align-items: center;
gap: 12px;
text-align: center;
min-height: 180px;
justify-content: center;
cursor: pointer;
transition: background 0.15s, border-color 0.15s;
}
.dropzone.drag-over { background: rgba(226,0,116,.08); border-color: var(--accent); }
.drop-icon {
width: 52px; height: 52px;
border-radius: 14px;
border: 1px solid rgba(226,0,116,.35);
background: var(--surface);
display: flex; align-items: center; justify-content: center;
color: var(--accent);
font-family: var(--font-mono);
font-size: 12px; font-weight: 700;
}
.drop-label { font-size: 15px; font-weight: 600; font-family: var(--font-display); }
.drop-hint { font-size: 12px; color: var(--muted); }
.drop-actions { display: flex; gap: 10px; margin-top: 4px; }
.staged-files { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.file-row {
border: 1px solid var(--border);
border-radius: var(--radius-sm);
background: var(--surface);
padding: 12px 14px;
display: flex; flex-direction: column; gap: 8px;
}
.file-row-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.file-name { font-size: 13px; font-weight: 500; }
.file-meta { font-size: 11px; color: var(--muted); font-family: var(--font-mono); }
.file-remove { background: none; border: none; cursor: pointer; color: var(--muted); padding: 2px; }
.file-remove:hover { color: var(--danger); }
.file-progress { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.file-progress-fill { height: 100%; background: var(--accent); border-radius: 2px; }
.upload-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.upload-field { display: flex; flex-direction: column; gap: 5px; }
.upload-field label { font-size: 12px; color: var(--muted); }
.upload-field input,
.upload-field select,
.upload-field textarea {
min-height: 36px;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
background: var(--surface);
padding: 0 10px;
font-size: 13px; color: var(--fg);
font-family: var(--font-body);
outline: none;
transition: border-color 0.12s;
}
.upload-field input:focus,
.upload-field select:focus,
.upload-field textarea:focus { border-color: var(--accent); }
.upload-field textarea { min-height: 72px; padding: 8px 10px; resize: vertical; }
.upload-field.full-width { grid-column: 1 / -1; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.queue-section { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.queue-card {
border: 1px solid var(--border);
border-radius: var(--radius-sm);
background: var(--surface);
padding: 12px 14px;
display: flex; flex-direction: column; gap: 8px;
}
.queue-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.queue-name { font-size: 13px; font-weight: 600; }
.queue-desc { font-size: 11px; color: var(--muted); margin-top: 2px; }
.queue-progress { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.queue-progress-fill { height: 100%; border-radius: 3px; background: color-mix(in srgb, var(--accent) 74%, white 26%); transition: width 0.4s ease; }
.summary-cards { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.summary-card-sm {
border: 1px solid var(--border);
border-radius: var(--radius-sm);
background: color-mix(in srgb, var(--surface) 88%, var(--bg) 12%);
padding: 12px 14px;
}
.summary-card-sm strong { font-size: 13px; font-family: var(--font-mono); }
.summary-card-hint { font-size: 11px; color: var(--muted); margin-top: 4px; }