/* ========================================================================== LocalAiLab Assistant — custom desktop UI (Phase 1) -------------------------------------------------------------------------- Design language: a quiet "warm studio" look carried from the app's established brand (terracotta accent on warm cream paper, warm ink text). The signature element is the agent activity trail — the streaming thinking/tool steps — rendered as a calm, collapsible trail inside the conversation instead of Gradio's raw log boxes. Stylesheet layout: - app.css ..................... global tokens, base, shell + header, shared chat primitives (chip / tool-row), and the migrated-tab components. - components/chat/*.css ...... per-component styles for the chat tabs (MessageList / Composer / ChatPane / RagControls / DrControls / VisionControls). ========================================================================== */ :root { /* palette — warm, Claude-ish, matches the pinned brand tokens */ --bg: #faf9f5; --bg-elev: #ffffff; --bg-soft: #f3efe6; --bg-sidebar: #efeae0; --bg-input: #ffffff; /* Text is pure BLACK in light mode (user request: black text on the light/white surfaces so it reads clearly). The secondary/faint text uses dark neutrals for hierarchy — still far darker than the old warm browns, keeping 10:1+ contrast on the cream/white surfaces. */ --ink: #000000; --ink-soft: #4a4a4a; --ink-faint: #6f6f6f; --line: #e4dcd0; --line-strong: #d6ccbc; --accent: #d97757; --accent-deep: #c25e3f; --accent-soft: #f7e6dd; --accent-ink: #8a4427; --amber-bg: #fbf0dc; --amber-line: #eed9b0; --amber-ink: #8a5b1d; --ok: #4e7a57; --err: #b4453a; --code-bg: #2d261f; --code-ink: #f3e9dc; --code-line: #45392c; --shadow-sm: 0 1px 2px rgba(58, 47, 39, 0.06); --shadow-md: 0 10px 28px rgba(58, 47, 39, 0.12); --radius-sm: 8px; --radius: 14px; --radius-lg: 20px; --font-ui: "Segoe UI Variable Text", "Segoe UI", "Leelawadee UI", "Khmer OS Battambang", system-ui, -apple-system, sans-serif; --font-display: Georgia, "Times New Roman", serif; --font-code: "Cascadia Code", Consolas, "Courier New", monospace; --sidebar-w: 236px; --sidebar-w-collapsed: 68px; --header-h: 62px; /* Migrated-tab component tokens (STT / Data / KB / Settings / About). Dark mode re-maps these below; light mode must match the black-ink family too, so card titles, inputs, console text and buttons read as black text on the warm cards instead of the old dark-brown fallbacks. */ --text-strong: #000000; --text-dim: #4a4a4a; } html.dark { --bg: #1d1814; --bg-elev: #26201a; --bg-soft: #221c17; --bg-sidebar: #16120f; --bg-input: #2a231c; /* All text is pure white in dark mode so it stands out on the dark surfaces (user request: make the text white wherever the background is not white). This covers the neutral ink family, code text, the amber thinking/plan labels and the terracotta-tinted labels; only the semantic status colors (--ok / --err) stay coloured. */ --ink: #ffffff; --ink-soft: #ffffff; --ink-faint: #ffffff; --line: #362e25; --line-strong: #46392d; --accent: #e8936c; --accent-deep: #f0a88a; --accent-soft: #3a2720; --accent-ink: #ffffff; --amber-bg: #33291b; --amber-line: #4a3c26; --amber-ink: #ffffff; --ok: #7faf88; --err: #e07a6e; --code-bg: #120e0b; --code-ink: #ffffff; --code-line: #2c251d; --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25); --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.35); /* Migrated-tab component tokens. These are ONLY defined in :root as fallbacks (#3f332b etc. are dark ink built for the light cream cards), so dark mode must re-map them here — otherwise card titles, inputs, console text and buttons render dark-on-dark (1.05–1.42:1 contrast). Mapped onto the same warm surfaces/tints as their :root originals: text-strong -> --ink, text-dim -> --ink-soft, primary-* -> accent. Neutral text is pure white here too, matching the --ink family. */ --text-strong: #ffffff; --text-dim: #ffffff; --primary-500: #e8936c; --primary-600: #e8936c; --primary-700: #ffffff; /* --card-bg is deliberately aligned with --bg-elev (#26201a, was #2b2620) so the migrated-tab cards share the header/tab-active surface; light mode keeps the warm #fffdf9 fallback. */ --card-bg: #26201a; --card-border: #3d362c; --input-bg: #221e19; --console-bg: #1e1a15; --btn-bg: #383129; } * { box-sizing: border-box; } html, body { height: 100%; } body { margin: 0; font-family: var(--font-ui); background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow: hidden; } button { font-family: inherit; cursor: pointer; } select { font-family: inherit; cursor: pointer; } ::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; } ::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); background-clip: content-box; } ::-webkit-scrollbar-track { background: transparent; } /* ========================================================================== Shell layout ========================================================================== */ .shell { display: flex; height: 100vh; } .sidebar { width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: var(--bg-sidebar); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 12px 14px; overflow: hidden; transition: width 0.18s ease, flex-basis 0.18s ease; } /* Collapsed sidebar — an icon-only rail (the header ☰ toggles it, the choice is remembered across sessions). Width, the brand name/subtitle, tab labels and the footer text all hide; icons stay centred and the tab/header buttons keep their title tooltips. */ .shell.collapsed .sidebar { width: var(--sidebar-w-collapsed); flex-basis: var(--sidebar-w-collapsed); } .shell.collapsed .sidebar .brand { justify-content: center; padding-inline: 0; } .shell.collapsed .sidebar .brand > div:last-child, .shell.collapsed .sidebar .tab-lb, .shell.collapsed .sidebar .sidebar-foot span:not(.offline-dot), .shell.collapsed .sidebar .sidebar-foot .yt-link { display: none; } /* Collapsed rail: keep the Free All VRAM button reachable as a compact icon-only pill (its label hides; the 💥 stays) — the "always visible" contract. The CPU/RAM/VRAM readout chips hide with the rail. */ .shell.collapsed .sidebar .sidebar-stats .mem-chip { display: none; } .shell.collapsed .sidebar .sidebar-stats { padding-inline: 4px; align-items: center; } .shell.collapsed .sidebar .sidebar-stats .vram-btn { padding: 6px 8px; } .shell.collapsed .sidebar .sidebar-stats .vram-btn-label { display: none; } .shell.collapsed .sidebar .tab-btn { justify-content: center; padding-inline: 0; } .shell.collapsed .sidebar .sidebar-foot { justify-content: center; padding-inline: 0; } .brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 16px; border-bottom: 1px solid var(--line); margin-bottom: 14px; } .brand-mark { width: 38px; height: 38px; /* CIRCULAR tile matching the round logo's shape — the logo is a circle with transparent corners, so a square (or rounded-square) tile behind it showed its orange gradient around the logo. A circle lets the logo cover the tile edge-to-edge: no orange ring. The gradient stays as a fallback in case the image ever fails to load. */ border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-deep)); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); flex: 0 0 auto; overflow: hidden; } /* The brand logo (ui/web/public/logo.png — the round LocalAiLab logo, same image as the favicon). Fills the whole circular tile (no padding) so it covers the orange fallback gradient completely. */ .brand-logo { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 50%; } .brand-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: 0.2px; line-height: 1.15; } /* Title + version badge on one row, baselines aligned — the badge sits right after the title, never inside it (so .brand-name stays pure). */ .brand-title-row { display: flex; align-items: baseline; min-width: 0; } /* Version badge right after the app title — a small muted pill so the version reads as part of the brand header (it moved up from the sidebar footer where it used to sit next to the YouTube link). */ .brand-ver { /* flex item inside .brand-title-row: display/vertical-align are inert there (flex items are blockified), so only margin+pill styling apply */ margin-left: 8px; padding: 1px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-soft); color: var(--ink-faint); font-family: var(--font-ui); font-size: 10.5px; font-weight: 600; letter-spacing: 0.1px; line-height: 1.4; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; } .tabs { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; min-height: 0; } .tab-btn { display: flex; align-items: center; gap: 10px; width: 100%; border: none; background: transparent; color: var(--ink-soft); text-align: left; padding: 9px 10px; border-radius: var(--radius-sm); font-size: 14px; transition: background 0.12s ease, color 0.12s ease; } .tab-btn:hover { background: var(--bg-elev); color: var(--ink); } .tab-btn.active { background: var(--bg-elev); /* Black text on the white pill (light mode) — the terracotta accent bar on the left still marks the active tab, so the label doesn't need to carry the color. Dark mode overrides this to white below. */ color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); position: relative; } .tab-btn.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); } .tab-ic { font-size: 16px; width: 20px; text-align: center; flex: 0 0 auto; } .tab-lb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sidebar-foot { border-top: 1px solid var(--line); padding: 12px 8px 2px; font-size: 11.5px; color: var(--ink-faint); display: flex; align-items: center; gap: 6px; } .offline-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent); } /* YouTube tutorial channel — replaces the old 'works offline' label at the left end of the footer. Prominent pill: terracotta accent so it reads as the channel CTA rather than muted footer text; the ▶️ glyph and bold label make it visible at a glance, and the long Khmer label ellipsizes instead of pushing the version away. */ .sidebar-foot .yt-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 12%, var(--bg-elev)); border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line)); border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 600; text-decoration: none; line-height: 1.2; min-width: 0; max-width: 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease; } .sidebar-foot .yt-ic { font-size: 11px; flex: 0 0 auto; } .sidebar-foot .yt-txt { overflow: hidden; text-overflow: ellipsis; } .sidebar-foot .yt-link:hover { background: color-mix(in srgb, var(--accent) 20%, var(--bg-elev)); border-color: var(--accent); color: var(--accent-ink); } /* -------------------------------------------------------------------------- Header -------------------------------------------------------------------------- */ .main { flex: 1; min-width: 0; display: flex; flex-direction: column; } .header { position: relative; /* anchors the vram confirmation toast */ height: var(--header-h); flex: 0 0 var(--header-h); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg-elev) 70%, transparent); backdrop-filter: blur(8px); display: flex; align-items: center; gap: 10px; padding: 0 18px; } .header-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--ink); margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .header-actions { display: flex; align-items: center; gap: 8px; } .icon-btn { border: 1px solid var(--line); background: var(--bg-elev); color: var(--ink-soft); border-radius: var(--radius-sm); width: 34px; height: 34px; font-size: 15px; display: flex; align-items: center; justify-content: center; transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease; } .icon-btn:hover { border-color: var(--accent); color: var(--accent-ink); } .icon-btn:disabled { opacity: 0.5; cursor: default; border-color: var(--line); color: var(--ink-soft); } .pill-select { appearance: none; border: 1px solid var(--line); background: var(--bg-elev) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239c8c7c' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center; color: var(--ink); border-radius: var(--radius-sm); padding: 6px 26px 6px 10px; font-size: 13px; max-width: 210px; transition: border-color 0.12s ease; } .pill-select:hover { border-color: var(--accent); } /* 'already downloaded?' status chip — sits at the end of the header model dropdown (the web port of the Gradio model-status notice card). Compact pill with the notice's emoji + bold title; the full bilingual notice is the hover tooltip. Warm Claude palette, light + dark mirrors. */ .model-status-chip { border: 1px solid var(--accent-soft); background: var(--accent-soft); color: var(--accent-ink); border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: help; transition: border-color 0.12s ease, background 0.12s ease; } .model-status-chip:hover { border-color: var(--accent); } .dark .model-status-chip { border-color: var(--accent-soft); background: color-mix(in srgb, var(--accent-soft) 45%, transparent); } .model-dl-badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent-ink); border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 600; white-space: nowrap; animation: dl-pulse-border 1.5s infinite alternate; } .model-dl-badge.done { border-color: #2e7d32; background: rgba(46, 125, 50, 0.12); color: #2e7d32; animation: none; } .model-dl-badge.error { border-color: #c62828; background: rgba(198, 40, 40, 0.12); color: #c62828; animation: none; } @keyframes dl-pulse-border { 0% { border-color: var(--accent-soft); } 100% { border-color: var(--accent); } } .embed-active-info { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-muted); padding: 4px 0; } .embed-active-info strong { color: var(--text-strong); font-weight: 600; } /* The accent/amber tokens above are pure white in dark mode; these two tokens double as non-text surfaces (send-button / brand-mark gradients, btn-primary backgrounds), so their text uses are whitened via targeted rules instead. Links keep their underline so they stay clickable. */ .dark .rich a, .dark .upload-name { color: #ffffff; } /* 'Free VRAM' button at the model-status chip — free all VRAM right where the model notice shows, without leaving the tab for Settings. Stop-toned pill matching the chip's compact header scale. */ .vram-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid color-mix(in srgb, var(--err) 38%, var(--line)); background: color-mix(in srgb, var(--err) 9%, var(--bg-elev)); color: var(--err); border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 600; white-space: nowrap; transition: border-color 0.12s ease, background 0.12s ease; } .vram-btn:hover:not(:disabled) { border-color: var(--err); background: color-mix(in srgb, var(--err) 15%, var(--bg-elev)); } .vram-btn:disabled { opacity: 0.55; cursor: not-allowed; } /* Live CPU/RAM/VRAM usage readouts + Free All VRAM in the SIDEBAR — warm Claude palette chips that show how much of the machine is in use (and how much freeing VRAM actually recovered). Stacked full-width so the sidebar reads CPU → RAM → VRAM top to bottom, with the Free-VRAM button below. */ .sidebar-stats { display: flex; flex-direction: column; gap: 6px; padding: 10px 8px 12px; border-top: 1px solid var(--line); margin-top: auto; position: relative; } .mem-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink-soft); border-radius: 999px; padding: 5px 12px; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; user-select: text; cursor: help; transition: border-color 0.12s ease, color 0.12s ease; } .mem-chip:hover { border-color: var(--accent); color: var(--accent-ink); } /* Sidebar usage rows — full-width stacked CPU/RAM/VRAM chips (label left, value right) so the stats column reads cleanly top to bottom. */ .sidebar-stats .mem-chip { display: flex; justify-content: space-between; gap: 8px; width: 100%; } .mem-chip-label { font-weight: 600; flex: 0 0 auto; } .sidebar-stats .mem-chip-val { min-width: 0; overflow: hidden; text-overflow: ellipsis; } /* Free All VRAM — full-width under the usage chips so it stays one tap away in the sidebar on every tab. */ .sidebar-stats .vram-btn { width: 100%; justify-content: center; text-align: center; padding: 6px 12px; } /* Transient toast after freeing VRAM — anchored just above the sidebar stats block (it has position: relative) so it never shifts the layout; auto-hides client-side. */ .seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-elev); } .seg button { border: none; background: transparent; color: var(--ink-soft); padding: 6px 12px; font-size: 13px; transition: background 0.12s ease, color 0.12s ease; } .seg button.active { background: var(--accent-soft); /* Black text in light mode — the tinted pill already marks the active choice; dark mode overrides to white below. */ color: var(--ink); font-weight: 600; } .dark .seg button.active { color: #ffffff; } .busy-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: pulse 1s ease-in-out infinite; } @keyframes pulse { 0%, 100% { opacity: 0.35; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1.1); } } /* -------------------------------------------------------------------------- Content wrapper (owns the active tab pane) -------------------------------------------------------------------------- */ .content { flex: 1; min-height: 0; display: flex; flex-direction: column; } /* -------------------------------------------------------------------------- Shared chat primitives — used by ChatPane AND the migrated tabs (SettingsTab chip-row, DataTab chips, tool rows on every migrated tab). The chat-specific layouts/bubbles live in components/chat/*.css. -------------------------------------------------------------------------- */ .chip-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; } .chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink-soft); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; user-select: none; cursor: pointer; transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease; } .chip.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--accent-ink); font-weight: 600; } .chip input { display: none; } .tool-row { display: flex; gap: 8px; margin-top: 10px; align-items: center; } /* Save buttons show their confirmation INLINE, directly below the button (the tab-wide tool-flash stays for everything else). Shared by every tab's Save Report / Save Transcript / Save Audio buttons. */ .save-group { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; } .save-notice { font-size: 0.78rem; line-height: 1.35; color: var(--ok, #4e7a57); max-width: 340px; word-break: break-word; } .save-notice.err { color: var(--err, #b4453a); } .tool-flash { margin-left: auto; font-size: 12.5px; color: var(--ok); } .tool-flash.err { color: var(--err); } /* Confirmation popup — the toast that pops over the WHOLE app when a llama-server / GGUF / whisper-server path is activated (Enter or click outside the field) or VRAM is freed. Fixed + dead-center of the window (vertical AND horizontal) so it reads as a true popup over whatever tab is open; auto-hides after a few seconds. */ .settings-toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 9999; max-width: min(560px, calc(100vw - 48px)); padding: 16px 22px; border-radius: var(--radius, 14px); background: var(--bg-elev, #ffffff); border: 1px solid var(--card-border, #e7e0d3); border-left: 5px solid var(--ok, #4e7a57); box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28); color: var(--text-strong, #000000); font-size: 0.9rem; font-weight: 600; line-height: 1.5; text-align: center; word-break: break-word; animation: toast-pop 0.22s ease-out; } /* Gentle entrance — the popup scales in from the center so it reads as a confirmation "pop", not a slide-up status line. */ @keyframes toast-pop { from { opacity: 0; transform: translate(-50%, -50%) scale(0.92); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } } /* Error variant — the Free-All-VRAM failure uses the same centered popup but with the danger tone (red left border + red text) instead of the success green. */ .settings-toast.err { border-left-color: color-mix(in srgb, var(--err, #b4453a) 60%, var(--line, #e7e0d3)); color: var(--err, #b4453a); } /* reduced motion */ @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } } /* ── Migrated tabs: STT / Data / KB / Settings / About ─────────────── */ .tab-scroll { display: flex; flex-direction: column; gap: 14px; height: 100%; overflow-y: auto; padding: 4px 2px 24px; } .card { background: var(--card-bg, #fffdf9); border: 1px solid var(--card-border, #e7e0d3); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 1px 2px rgba(95, 74, 54, 0.05); } .card-title { font-size: 0.95rem; font-weight: 700; color: var(--text-strong, #3f332b); letter-spacing: 0.01em; } /* Subheading inside a card — the merged Settings status card labels its second console block (CUDA) under the Hardware & Driver block. */ .card-subtitle { font-size: 0.85rem; font-weight: 700; color: var(--text-dim, #4a4a4a); letter-spacing: 0.01em; margin-top: 2px; } .field-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; } /* Collapsed "Generation Settings" section — SHARED by the chat panes (below the composer) and the Data tab (its analysis config): the mode chips, the per-tab context-window dropdown and the tab-specific controls fold away so the input area stays clean. Lives in app.css (not a component stylesheet) because it now spans component boundaries — a shared class, like .card and .field. Collapsed by default. */ .gen-settings { margin-top: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-soft); } .gen-settings summary { cursor: pointer; list-style: none; padding: 8px 12px; font-size: 12.5px; color: var(--ink-soft); user-select: none; display: flex; align-items: center; gap: 6px; } .gen-settings summary::-webkit-details-marker { display: none; } .gen-settings summary::before { content: "▸"; font-size: 11px; transition: transform 0.15s ease; color: var(--ink-faint); } .gen-settings[open] summary::before { transform: rotate(90deg); } .gen-settings summary:hover { color: var(--accent-ink); } .gen-settings-body { padding: 10px 12px 12px; border-top: 1px solid var(--line); } .gen-settings-body > :last-child { margin-bottom: 0; } /* A non-wrapping inline group inside a .field-row (e.g. paired buttons). */ .field-row-inline { flex-wrap: nowrap; gap: 6px; } .field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; } /* Settings providers: each provider is one block (one per row), and all provider blocks are laid out side by side in a responsive grid. */ .provider-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; align-items: start; } .provider-block { border: 1px solid var(--card-border, #e7e0d3); border-radius: 12px; background: var(--bg-soft, #faf6ee); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; } .provider-title { font-size: 0.82rem; font-weight: 700; color: var(--text-strong, #3f332b); border-bottom: 1px dashed var(--card-border, #e7e0d3); padding-bottom: 6px; } .provider-fields { display: flex; flex-direction: column; gap: 10px; } .field { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 150px; } .field-num { flex: 0 1 120px; } .select-wide { flex: 2; min-width: 200px; } .field-label { font-size: 0.78rem; font-weight: 600; color: var(--text-dim, #8a7a63); } .field input, .field select, .field textarea, .select-wide { width: 100%; box-sizing: border-box; background: var(--input-bg, #fdfbf6); border: 1px solid var(--card-border, #e7e0d3); border-radius: 9px; padding: 8px 10px; font: inherit; color: var(--text-strong, #3f332b); outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease; } .field input:focus, .field select:focus, .field textarea:focus, .select-wide:focus { border-color: var(--primary-500, #d97757); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-500, #d97757) 15%, transparent); } .upload-area { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px 12px; border: 1.5px dashed var(--card-border, #e7e0d3); border-radius: 12px; cursor: pointer; color: var(--text-dim, #8a7a63); font-size: 0.9rem; transition: border-color 0.15s ease, background 0.15s ease; text-align: center; } .upload-area:hover { border-color: var(--primary-500, #d97757); background: rgba(217, 119, 87, 0.06); } .upload-name { color: var(--primary-600, #c96a49); font-weight: 600; } .btn { border: 1px solid var(--card-border, #e7e0d3); background: var(--btn-bg, #f7f2e9); color: var(--text-strong, #3f332b); border-radius: 10px; padding: 8px 14px; font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: filter 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease; } .btn:hover:not(:disabled) { filter: brightness(0.97); box-shadow: 0 1px 4px rgba(95, 74, 54, 0.15); } .btn:active:not(:disabled) { transform: translateY(1px); } .btn:disabled { opacity: 0.45; cursor: not-allowed; } .btn-primary { background: var(--primary-600, #d97757); border-color: var(--primary-600, #d97757); color: #fff; } .btn-primary:hover:not(:disabled) { filter: brightness(1.05); } .btn-danger { /* #b4453a = the light-mode --err: white text on it is 5.47:1 (WCAG AA), vs 4.21:1 on the old #c25e4a — and the SAME red reads in both modes. */ background: #b4453a; border-color: #b4453a; color: #fff; } .btn-sm { padding: 6px 11px; font-size: 0.8rem; } .console { margin: 0; padding: 12px; background: var(--console-bg, #f6f1e6); border: 1px solid var(--card-border, #e7e0d3); border-radius: 10px; font-family: "Cascadia Mono", Consolas, monospace; font-size: 0.78rem; line-height: 1.55; color: var(--text-strong, #3f332b); white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow-y: auto; } .console.log { max-height: 220px; color: #9db48b; } .status-line { padding: 8px 12px; border-radius: 10px; background: rgba(217, 119, 87, 0.1); color: var(--primary-700, #a5533a); font-size: 0.85rem; font-weight: 600; } .status-line.err { background: rgba(194, 94, 74, 0.12); color: var(--err); } /* ── Download progress bar ──────────────────────────────────────────── */ .dl-progress { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--card-bg, #f5f0e8); border: 1px solid var(--card-border, #e7e0d3); } .dl-progress-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; gap: 8px; } /* ── Model Management Section in Settings ────────────────────────────── */ .provider-subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; } .subtab-btn { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--card-border, #e7e0d3); background: var(--card-bg, #f5f0e8); color: var(--text-soft, #555); font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.15s ease; display: inline-flex; align-items: center; gap: 5px; } .subtab-btn:hover { background: var(--hover-bg, #ece5d8); color: var(--text-strong, #222); } .subtab-btn.active { background: var(--primary-500, #e08a6a); color: #fff; border-color: var(--primary-600, #d97757); box-shadow: 0 1px 4px rgba(217, 119, 87, 0.25); } .model-mgmt-box { background: var(--console-bg, #f6f1e6); border: 1px solid var(--card-border, #e7e0d3); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 12px; } .model-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } .model-status-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 0.76rem; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--card-bg, #f5f0e8); border: 1px solid var(--card-border, #e7e0d3); color: var(--text-strong, #333); } .model-status-chip.ready { background: rgba(38, 166, 91, 0.12); border-color: rgba(38, 166, 91, 0.3); color: #27ae60; } .model-status-chip.download { background: rgba(230, 126, 34, 0.12); border-color: rgba(230, 126, 34, 0.3); color: #d35400; } .model-status-chip.cloud { background: rgba(52, 152, 219, 0.12); border-color: rgba(52, 152, 219, 0.3); color: #2980b9; } .model-details-text { font-family: var(--font-mono, monospace); font-size: 0.75rem; color: var(--text-muted, #777); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .model-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; } .model-table th, .model-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--card-border, #e7e0d3); vertical-align: middle; } .model-table th { background: var(--card-bg, #f5f0e8); font-weight: 700; color: var(--text-dim, #8a7a63); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.03em; } .model-table tr:hover td { background: var(--hover-bg, rgba(236, 229, 216, 0.4)); } .model-name-cell { display: flex; flex-direction: column; gap: 2px; } .model-name-title { font-weight: 600; color: var(--text-strong, #333); } .model-name-id { font-family: var(--font-mono, monospace); font-size: 0.72rem; color: var(--text-muted, #888); } .action-btn-group { display: inline-flex; align-items: center; gap: 6px; } .model-dl-card { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--card-bg, #f5f0e8); border: 1px solid var(--primary-300, #f0b49e); box-shadow: 0 2px 8px rgba(224, 138, 106, 0.12); } .dl-progress-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; font-size: 0.75rem; color: var(--text-soft, #555); } .dl-progress-meta .dl-size { font-weight: 600; color: var(--text-strong, #222); } .dl-progress-meta .dl-speed { color: var(--primary-600, #d97757); font-weight: 600; } .dl-progress-meta .dl-status { color: var(--text-muted, #888); margin-left: auto; } .dl-progress-label { font-size: 0.82rem; font-weight: 600; color: var(--text-strong, #3f332b); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } .dl-progress-pct { font-size: 0.85rem; font-weight: 700; color: var(--primary-600, #d97757); white-space: nowrap; } .dl-progress-track { height: 8px; background: var(--card-border, #e7e0d3); border-radius: 4px; overflow: hidden; } .dl-progress-bar { height: 100%; background: linear-gradient(90deg, var(--primary-500, #e08a6a), var(--primary-600, #d97757)); border-radius: 4px; transition: width 0.3s ease; } .dl-progress-size { margin-top: 4px; font-size: 0.75rem; color: var(--text-muted, #8a7e72); text-align: right; } .kb-log { margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: rgba(60, 60, 80, 0.08); border: 1px solid rgba(120, 120, 150, 0.18); max-height: 240px; overflow: auto; font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); font-size: 0.78rem; line-height: 1.45; color: var(--text-soft, #555); white-space: pre-wrap; word-break: break-word; } .kb-log-line { padding: 1px 0; } .table-wrap { overflow-x: auto; border: 1px solid var(--card-border, #e7e0d3); border-radius: 10px; } .doc-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; } .doc-table th, .doc-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--card-border, #e7e0d3); white-space: nowrap; } .doc-table th { background: var(--console-bg, #f6f1e6); font-weight: 700; color: var(--text-dim, #8a7a63); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; } .doc-table tbody tr { cursor: pointer; transition: background 0.12s ease; } .doc-table tbody tr:hover { background: rgba(217, 119, 87, 0.06); } .doc-table tbody tr.sel { background: rgba(217, 119, 87, 0.16); box-shadow: inset 3px 0 0 var(--primary-500, #d97757); } /* Thumbnail previews of a visual document's pages (KB Visual Index). */ .vis-cell { display: inline-flex; align-items: center; gap: 8px; min-width: 0; } .vis-strip { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; max-width: 220px; } .vis-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid var(--card-border, #e7e0d3); background: var(--card-bg, #fff); flex: none; cursor: zoom-in; } .vis-thumb:hover { border-color: var(--primary-500, #d97757); } .chart-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; } .chart-item { width: 100%; border: 1px solid var(--card-border, #e7e0d3); border-radius: 10px; background: var(--card-bg, #fff); } .report-box summary { cursor: pointer; font-weight: 600; color: var(--primary-700, #a5533a); margin-bottom: 8px; } /* live streaming caret on the STT report while the analysis runs */ .report-box .rich.live::after { content: ""; display: inline-block; width: 8px; height: 15px; margin-left: 3px; vertical-align: -2px; border-radius: 2px; background: var(--accent); animation: blink 0.9s steps(2, start) infinite; } .report-preview { padding: 14px; border: 1px solid var(--card-border, #e7e0d3); border-radius: 10px; background: var(--console-bg, #f6f1e6); } .reports-path { font-size: 0.8rem; color: var(--text-dim, #8a7a63); font-family: "Cascadia Mono", Consolas, monospace; word-break: break-all; } .empty-hint { color: var(--text-dim, #8a7a63); font-size: 0.85rem; padding: 10px 0; } .about-box .rich h1, .about-box .rich h2, .about-box .rich h3 { color: var(--primary-700, #a5533a); } .tool-row.wrap { flex-wrap: wrap; }