Files
strata-ctl/web/assets/app.css
T
adm 0d335b808c agent: wire MCP connectors into the loop (rmcp v3, Initialize lifecycle)
- src/mcp: streamable-HTTP client (rmcp v3.12) negotiating Initialize +
  LATEST_WITH_INITIALIZE; namespaced mcp__{connector}__{tool} surface, write
  badges from ToolAnnotations, persisted discovery (tools_json) so the agent
  tool declarations stay byte-stable for KV-cache reuse.
- store: mcp_connectors catalog + tools_json column (idempotent migration) and
  set_mcp_tools; per-session per-tool allowlist (SessionSettings.mcp_enabled).
- agent: execute_mcp routes namespaced calls, gated on the session allowlist
  before any network call; Bearer token comes from the DB catalog, never echoed.
- api/sessions: build the MCP surface into Ambient + the agent tool declarations
  on both the turn and prewarm paths (identical rebuild keeps the prefix stable).
- api/mcp + GUI: connector CRUD, tool-discovery picker, per-session enable.
- examples/mcp_probe: read-only CLI discovery spike.

Live-verified: 22 gmail tools discovered, gmail_labels returned 25 labels, and a
full model-driven GUI turn (7 enabled tools) with a 9197-token RESUME cache hit.
2026-11-30 02:29:55 +01:00

492 lines
22 KiB
CSS

/* strata-ctl web GUI — mobile-first. Single column on phones; a persistent
session sidebar appears on wide screens. Touch-friendly targets, 16px inputs
(avoids iOS focus zoom), safe-area insets for notched phones. */
:root {
--bg: #0f1115;
--panel: #171a21;
--panel-2: #1f2430;
--border: #2a3040;
--text: #e6e9ef;
--muted: #9aa4b2;
--accent: #4f8cff;
--accent-press: #3a6fd6;
--user: #2b3a55;
--danger: #e5534b;
--radius: 14px;
--sidebar-w: 280px;
--font-size: 16px;
}
* { box-sizing: border-box; }
/* The `hidden` attribute must always win over author `display` rules (e.g. the
stats modal uses display:flex); otherwise toggling .hidden has no effect. */
[hidden] { display: none !important; }
html, body {
margin: 0;
height: 100%;
background: var(--bg);
color: var(--text);
font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
font-size: var(--font-size, 16px);
line-height: 1.5;
}
#app { display: flex; height: 100dvh; overflow: hidden; }
/* ---- Buttons ---- */
.btn {
appearance: none;
border: 1px solid var(--border);
background: var(--panel-2);
color: var(--text);
border-radius: 10px;
padding: 10px 14px;
font-size: 0.95rem;
cursor: pointer;
min-height: 44px;
transition: background 0.12s ease, transform 0.05s ease;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:active { background: var(--accent-press); }
.btn.ghost { background: transparent; }
.btn.icon { padding: 8px 12px; font-size: 1.2rem; line-height: 1; }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: 0.5; cursor: default; }
/* ---- Drawer / sidebar ---- */
#drawer {
position: fixed;
inset: 0 auto 0 0;
width: min(82vw, var(--sidebar-w));
background: var(--panel);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
transform: translateX(-100%);
transition: transform 0.2s ease;
z-index: 30;
padding-top: env(safe-area-inset-top);
}
#drawer.open { transform: translateX(0); }
#scrim {
position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 20;
}
/* Resizable sidebar/chat separator: desktop only (mobile uses a drawer). */
#splitter { display: none; }
body.resizing { cursor: col-resize; user-select: none; }
.drawer-head {
display: flex; align-items: center; justify-content: space-between;
gap: 8px; padding: 12px;
border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; letter-spacing: 0.3px; }
#session-list { list-style: none; margin: 0; padding: 8px; overflow-y: auto; flex: 1; }
#session-list li {
padding: 8px 10px; border-radius: 10px; cursor: pointer;
color: var(--muted); min-height: 44px;
display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
#session-list li:hover { background: var(--panel-2); }
#session-list li.active { background: var(--panel-2); color: var(--text); }
.session-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-actions { display: flex; gap: 2px; opacity: 0; transition: opacity 0.12s ease; }
#session-list li:hover .session-actions, #session-list li.active .session-actions { opacity: 1; }
.sess-btn {
background: transparent; border: none; cursor: pointer; font-size: 0.9rem;
padding: 4px 6px; min-height: 32px; border-radius: 6px; line-height: 1;
}
.sess-btn:hover { background: var(--border); }
.sess-btn.danger:hover { background: var(--danger); }
@media (hover: none) { .session-actions { opacity: 1; } }
.drawer-foot { padding: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
/* ---- Main column ---- */
#main { flex: 1; display: flex; flex-direction: column; min-width: 0; height: 100dvh; }
#topbar {
display: flex; align-items: center; gap: 10px;
padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top));
border-bottom: 1px solid var(--border); background: var(--panel);
}
.title-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#session-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.muted { color: var(--muted); font-size: 0.8rem; }
#transcript {
flex: 1; overflow-y: auto; padding: 16px 12px;
display: flex; flex-direction: column; gap: 14px;
scroll-behavior: smooth;
}
.empty { color: var(--muted); text-align: center; margin: auto; max-width: 28ch; }
/* Sliding-window banner: the browser shows the same recent window the model
sees; older turns are preserved server-side. Sticky so it stays visible. */
.window-note {
position: sticky; top: 0; z-index: 1;
max-width: 860px; width: 100%; margin: 0 auto;
padding: 6px 12px; font-size: 0.75rem; color: var(--muted);
background: var(--panel-2); border: 1px solid var(--border);
border-radius: 8px; text-align: center;
}
/* ---- Message bubbles ---- */
.msg { max-width: 860px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; }
.msg .role { font-size: 0.75rem; color: var(--muted); margin-bottom: 4px; }
.msg .role .when { font-variant-numeric: tabular-nums; opacity: 0.85; }
.msg.user { align-items: flex-end; }
.msg.user .bubble {
background: var(--user); border-radius: var(--radius) var(--radius) 4px var(--radius);
padding: 10px 14px; max-width: 85%;
}
.msg.assistant .bubble {
background: var(--panel); border: 1px solid var(--border);
border-radius: var(--radius) var(--radius) var(--radius) 4px;
padding: 10px 14px; width: 100%;
}
.bubble .content { white-space: pre-wrap; word-wrap: break-word; }
.bubble .content:empty::after { content: "…"; color: var(--muted); }
/* Rendered assistant Markdown/LaTeX (server-sanitized content_html). Normal
flow instead of pre-wrap so paragraphs, lists and tables lay out correctly.
Scoped to .rendered so user bubbles and tool output are untouched. */
.bubble .content.rendered { white-space: normal; }
.content.rendered > :first-child { margin-top: 0; }
.content.rendered > :last-child { margin-bottom: 0; }
.content.rendered p { margin: 0 0 0.6em; }
.content.rendered h1, .content.rendered h2, .content.rendered h3,
.content.rendered h4, .content.rendered h5, .content.rendered h6 {
margin: 0.8em 0 0.4em; line-height: 1.25; font-weight: 600;
}
.content.rendered h1 { font-size: 1.3rem; }
.content.rendered h2 { font-size: 1.2rem; }
.content.rendered h3 { font-size: 1.1rem; }
.content.rendered h4, .content.rendered h5, .content.rendered h6 { font-size: 1rem; }
.content.rendered ul, .content.rendered ol { margin: 0 0 0.6em; padding-left: 1.4em; }
.content.rendered li { margin: 0.2em 0; }
.content.rendered li > ul, .content.rendered li > ol { margin: 0.2em 0; }
.content.rendered a { color: var(--accent); text-decoration: none; }
.content.rendered a:hover { text-decoration: underline; }
/* Agent-shared download links read as a distinct chip; the server already forces
Content-Disposition: attachment, so clicking downloads rather than navigates. */
.content.rendered a.download-link {
display: inline-flex; align-items: center; gap: 6px;
padding: 3px 10px; margin: 2px 0;
background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px;
color: var(--accent); font-size: 0.85rem; text-decoration: none;
}
.content.rendered a.download-link::before { content: "\2B07"; font-size: 0.9em; }
.content.rendered a.download-link:hover { border-color: var(--accent); text-decoration: none; }
.content.rendered blockquote {
margin: 0 0 0.6em; padding: 0.2em 0 0.2em 0.9em;
border-left: 3px solid var(--border); color: var(--muted);
}
.content.rendered code {
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 0.88em; background: var(--panel-2);
border: 1px solid var(--border); border-radius: 5px; padding: 0.1em 0.35em;
}
.content.rendered pre {
margin: 0 0 0.6em; padding: 10px 12px; overflow-x: auto;
background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
}
.content.rendered pre code {
background: none; border: none; padding: 0; font-size: 0.85rem;
white-space: pre; color: var(--text);
}
.content.rendered hr { border: none; border-top: 1px solid var(--border); margin: 0.9em 0; }
/* Tables scroll horizontally on narrow screens instead of overflowing. */
.content.rendered table {
border-collapse: collapse; margin: 0 0 0.6em; display: block;
max-width: 100%; overflow-x: auto; font-size: 0.9rem;
}
.content.rendered th, .content.rendered td {
border: 1px solid var(--border); padding: 5px 9px; text-align: left;
}
.content.rendered th { background: var(--panel-2); font-weight: 600; }
.content.rendered img { max-width: 100%; height: auto; border-radius: 8px; }
.content.rendered del { color: var(--muted); }
/* Native MathML (pulldown-latex): no JS, no web fonts needed for correctness.
Do NOT override `display` on <math>: the UA uses `block math` / `inline math`
and a plain `display:block` would destroy MathML layout (vertical stacking).
Block equations keep their native centered block layout and scroll if wide. */
.content.rendered math { font-size: 1.05em; }
.content.rendered math[display="block"] {
margin: 0.6em 0; padding: 2px 0;
overflow-x: auto; overflow-y: hidden;
}
details.thinking { margin-bottom: 8px; }
details.thinking summary {
cursor: pointer; color: var(--muted); font-size: 0.85rem; user-select: none;
}
details.thinking .reasoning {
white-space: pre-wrap; word-wrap: break-word; color: var(--muted);
font-size: 0.9rem; border-left: 2px solid var(--border);
padding-left: 10px; margin-top: 6px;
}
.usage { color: var(--muted); font-size: 0.72rem; margin-top: 6px; }
/* ---- Agent tool blocks ---- */
.msg.tool .bubble {
background: var(--panel-2); border: 1px solid var(--border);
border-radius: var(--radius); padding: 10px 14px; width: 100%;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.tool-cmd { display: block; white-space: pre-wrap; word-wrap: break-word; font-size: 0.9rem; }
.tool-out {
margin: 8px 0 0; max-height: 300px; overflow: auto;
white-space: pre-wrap; word-wrap: break-word; color: var(--muted);
font-size: 0.82rem; background: var(--bg); border-radius: 8px; padding: 8px;
}
.tool-out:empty { display: none; }
/* ---- Composer ---- */
#composer {
display: flex; gap: 8px; align-items: flex-end;
padding: 10px 12px; padding-bottom: calc(10px + env(safe-area-inset-bottom));
border-top: 1px solid var(--border); background: var(--panel);
}
#input {
flex: 1; resize: none; max-height: 40dvh;
background: var(--panel-2); color: var(--text);
border: 1px solid var(--border); border-radius: 12px;
padding: 12px 14px; font-size: 16px; font-family: inherit; line-height: 1.4;
}
#input:focus { outline: none; border-color: var(--accent); }
#send { min-width: 52px; font-size: 1.3rem; }
/* Busy: the framework is generating, so send is unavailable. Red + hourglass +
a slow pulse make the state obvious (id+class wins over .btn:disabled grey). */
#send.busy {
background: var(--danger); border-color: var(--danger);
opacity: 1; cursor: default; animation: send-pulse 1.2s ease-in-out infinite;
}
@keyframes send-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
#attach { min-width: 44px; font-size: 1.2rem; }
/* ---- Attachment chips (composer + sent user turn) ---- */
.attachments {
display: flex; flex-wrap: wrap; gap: 6px;
padding: 8px 12px 0; background: var(--panel);
}
.attach-chip {
display: inline-flex; align-items: center; gap: 6px;
max-width: 240px; padding: 4px 8px;
background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px;
font-size: 0.8rem; color: var(--text);
}
.attach-chip .attach-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-chip .attach-kind { color: var(--muted); }
.attach-chip button {
border: none; background: transparent; color: var(--muted);
cursor: pointer; font-size: 0.9rem; line-height: 1; padding: 0 2px;
}
.attach-chip button:hover { color: var(--danger); }
.msg-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
/* ---- Queued turns (typed while busy; FIFO, no steer) ---- */
.queue { display: flex; flex-direction: column; gap: 6px; padding: 8px 12px 0; background: var(--panel); }
.queue-chip {
display: flex; align-items: center; gap: 8px;
padding: 6px 10px; background: var(--panel-2);
border: 1px dashed var(--border); border-radius: 10px; font-size: 0.82rem;
}
.queue-chip .queue-label {
flex: 0 0 auto; color: var(--muted); font-size: 0.66rem;
text-transform: uppercase; letter-spacing: 0.6px;
}
.queue-chip .queue-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-chip .queue-attach { flex: 0 0 auto; color: var(--muted); }
.queue-chip button {
border: none; background: transparent; color: var(--muted);
cursor: pointer; font-size: 0.95rem; line-height: 1; padding: 0 2px;
}
.queue-chip button:hover { color: var(--danger); }
/* ---- Stats modal ---- */
#stats-modal, #dialog, #settings-modal, #notepad-modal, #mcp-picker-modal {
position: fixed; inset: 0; z-index: 40;
background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center;
padding: 20px;
}
.modal-card {
background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
padding: 20px; max-width: 420px; width: 100%;
}
.modal-card h2 { margin: 0 0 12px; font-size: 1.1rem; }
/* The MCP tool picker lists many tools with descriptions: give it room to scroll. */
#mcp-picker-modal .modal-card { width: min(560px, 100%); max-width: 560px; max-height: 85dvh; overflow-y: auto; }
/* ---- Stats dashboard ---- */
.stats-card {
width: min(940px, 100%); max-width: 940px; max-height: 88dvh;
display: flex; flex-direction: column; padding: 0; overflow: hidden;
}
.stats-head {
display: flex; align-items: center; gap: 12px;
padding: 14px 18px; border-bottom: 1px solid var(--border);
background: var(--panel); flex: 0 0 auto;
}
.stats-head h2 { margin: 0; font-size: 1.15rem; }
.stats-live { flex: 1; font-size: 0.72rem; text-align: right; font-variant-numeric: tabular-nums; }
.stats-head .btn.icon { min-height: 36px; padding: 6px 10px; font-size: 1rem; }
.stats-content { padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; }
/* Overview cards: 2-up on phones, 3-up from 700px. */
.stat-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-card {
background: var(--panel-2); border: 1px solid var(--border);
border-radius: 12px; padding: 12px 14px; min-width: 0;
}
.stat-card .label {
font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.7px; color: var(--muted);
}
.stat-card .value {
font-size: 1.5rem; font-weight: 600; line-height: 1.25; margin-top: 4px;
font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.stat-card .sub { font-size: 0.73rem; color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.stat-card.engine .value { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; }
.stat-card .model {
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 0.72rem; color: var(--muted); margin-top: 5px; overflow-wrap: anywhere;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: 0 0 auto; }
.dot.idle { background: #3fb950; }
.dot.busy { background: #d29922; }
/* Section headings inside the dashboard. */
.stat-section > h3 { margin: 0; font-size: 0.95rem; }
.stat-section > .sub { font-size: 0.73rem; color: var(--muted); margin: 2px 0 12px; }
.stat-empty { color: var(--muted); font-size: 0.85rem; padding: 10px 0; }
/* Daily activity chart: stacked prompt/completion bars (pure CSS, responsive). */
.chart-bars { display: flex; align-items: flex-end; gap: 3px; height: 132px; }
.chart-bars .bar {
flex: 1 1 0; min-width: 0; height: 100%;
display: flex; flex-direction: column; justify-content: flex-end;
}
.chart-bars .bar i { display: block; width: 100%; }
.chart-bars .bar i.prompt { background: var(--accent-press); }
.chart-bars .bar i.completion { background: var(--accent); border-radius: 3px 3px 0 0; }
.chart-bars .bar:hover i { filter: brightness(1.18); }
.chart-x { display: flex; justify-content: space-between; gap: 8px; font-size: 0.66rem; color: var(--muted); margin-top: 6px; }
.chart-legend { display: flex; gap: 14px; margin-top: 10px; font-size: 0.72rem; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.swatch.prompt { background: var(--accent-press); }
.swatch.completion { background: var(--accent); }
/* Per-session breakdown: relative token-share bars, busiest first. */
.sess-stats { display: flex; flex-direction: column; gap: 12px; }
.sess-stat { min-width: 0; }
.sess-stat.current .name { color: var(--accent); }
.sess-stat-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sess-stat-top .name { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sess-stat-top .tok { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.sess-bar { display: flex; height: 8px; border-radius: 5px; overflow: hidden; background: var(--bg); margin: 5px 0 4px; }
.sess-bar i { display: block; height: 100%; }
.sess-bar i.prompt { background: var(--accent-press); }
.sess-bar i.completion { background: var(--accent); }
.sess-stat-sub { font-size: 0.7rem; color: var(--muted); }
@media (min-width: 700px) {
.stat-cards { grid-template-columns: repeat(3, 1fr); }
}
#dialog-msg { margin: 0 0 16px; }
#dialog-input {
width: 100%; background: var(--panel-2); color: var(--text);
border: 1px solid var(--border); border-radius: 10px;
padding: 10px 12px; font-size: 16px; font-family: inherit; margin: 0 0 16px;
}
#dialog-input:focus { outline: none; border-color: var(--accent); }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; }
/* ---- Settings modal ---- */
.settings-card { width: min(560px, 100%); max-height: 85vh; overflow-y: auto; }
/* Scope switch reads as a segmented control so the two scopes are unmistakable. */
.scope-toggle {
display: flex; gap: 3px; margin: 0 0 12px; padding: 3px;
background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px;
}
.scope-toggle .btn { flex: 1; border: none; background: transparent; min-height: 38px; border-radius: 8px; }
.scope-toggle .btn.active { background: var(--accent); color: #fff; }
#set-hint { margin: 0 0 12px; }
#set-name-hint { margin: -8px 0 12px; }
.small { font-size: 0.8rem; }
.field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; }
.field > span { font-size: 0.85rem; color: var(--muted); }
.field input, .field textarea, .field select {
width: 100%; background: var(--panel-2); color: var(--text);
border: 1px solid var(--border); border-radius: 8px;
padding: 8px 10px; font-size: 16px; font-family: inherit;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field input:disabled { opacity: 0.6; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.sess-btn:disabled { opacity: 0.35; cursor: default; }
/* ---- Notepad (read-only pinned entries, agent-managed) ---- */
.notepad-card { width: min(560px, 100%); max-width: 560px; max-height: 85dvh; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.notepad-card .stats-head h2 { flex: 1; }
.notepad-hint { margin: 0; padding: 10px 18px 0; }
.notepad-content { padding: 14px 18px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.notepad-entry { display: flex; gap: 10px; align-items: baseline; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); }
.notepad-key { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; color: var(--accent); flex: 0 0 auto; max-width: 42%; overflow-wrap: anywhere; }
.notepad-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
/* ---- Wide screens: persistent sidebar ---- */
@media (min-width: 900px) {
#drawer { position: static; transform: none; width: var(--sidebar-w); flex-shrink: 0; }
#scrim { display: none !important; }
#menu { display: none; }
.msg.user .bubble { max-width: 70%; }
#splitter {
display: block; flex: 0 0 6px; width: 6px; cursor: col-resize;
position: relative; background: transparent; touch-action: none;
}
#splitter::after {
content: ""; position: absolute; top: 0; bottom: 0; left: 2px; width: 2px;
background: var(--border); transition: background 0.12s ease;
}
#splitter:hover::after, #splitter:focus-visible::after, body.resizing #splitter::after {
background: var(--accent);
}
#splitter:focus-visible { outline: none; }
}
/* ---- MCP connectors / tool picker (settings) ---- */
.mcp-block { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.mcp-block h3 { margin: 0 0 4px; font-size: 0.95rem; }
.mcp-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.mcp-row {
display: flex; align-items: center; justify-content: space-between; gap: 8px;
padding: 8px 10px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
}
.mcp-row-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mcp-name { font-weight: 600; }
.mcp-url, .mcp-token { font-size: 0.75rem; color: var(--muted); overflow-wrap: anywhere; }
.mcp-count { font-size: 0.75rem; color: var(--muted); }
.mcp-row-actions { display: flex; gap: 6px; flex-shrink: 0; }
.mcp-add { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mcp-add input {
flex: 1 1 140px; min-width: 0; padding: 8px; font-size: 0.85rem;
background: var(--panel); border: 1px solid var(--border); border-radius: 6px; color: var(--text);
}
.mcp-picker-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; margin: 8px 0; }
.mcp-tool {
display: flex; align-items: flex-start; gap: 8px; padding: 8px;
background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
}
.mcp-tool input { margin-top: 3px; flex-shrink: 0; }
.mcp-tool-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mcp-tool-name { font-weight: 600; font-size: 0.85rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mcp-tool-desc { font-size: 0.75rem; color: var(--muted); overflow-wrap: anywhere; }
.mcp-write-badge {
font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.03em;
padding: 1px 6px; border-radius: 999px; color: var(--danger);
border: 1px solid var(--danger); background: transparent;
}