/* ============================================================
   Pilos — Desktop App UI
   Dark · dense · IDE-grade · matches landing system (Figtree + indigo)
   ============================================================ */

:root {
  --accent: #6366f1;
  --accent-2: #818cf8;
  --accent-strong: #4f52e6;
  --accent-soft: rgba(99, 102, 241, 0.14);
  --accent-line: rgba(99, 102, 241, 0.35);
  --accent-glow: rgba(99, 102, 241, 0.45);

  --ok: #3ecf8e;
  --warn: #f6b73c;
  --err: #fb6f6f;
  --info: #5cb8ff;

  /* surfaces */
  --desk: #050507;
  --win: #0c0c11;
  --rail: #08080c;
  --panel: #0f0f15;
  --panel-2: #121219;
  --surface: #15151d;
  --surface-2: #1b1b25;
  --surface-3: #22222e;
  --hover: rgba(255, 255, 255, 0.04);
  --active: rgba(255, 255, 255, 0.07);

  --ink: #f2f2f6;
  --ink-2: #c4c4d0;
  --ink-3: #9a9aa8;
  --muted: #6f6f7d;
  --faint: #4d4d59;

  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.05);
  --line-3: rgba(255, 255, 255, 0.12);

  --r-xs: 6px; --r-sm: 8px; --r-md: 10px; --r-lg: 14px; --r-xl: 18px;

  --font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --rail-w: 60px;
  --panel-w: 248px;

  --shadow-win: 0 40px 90px -30px rgba(0,0,0,0.8), 0 16px 40px -18px rgba(0,0,0,0.6);
  --shadow-pop: 0 18px 50px -18px rgba(0,0,0,0.7);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(120% 90% at 80% -10%, rgba(99,102,241,0.10), transparent 55%),
    radial-gradient(100% 80% at 10% 110%, rgba(99,102,241,0.06), transparent 50%),
    var(--desk);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
::selection { background: var(--accent-soft); }
button { font-family: inherit; cursor: pointer; color: inherit; }
input, textarea, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.16); background-clip: content-box; }
.scroll { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.12) transparent; }

/* ---------- Desktop / window ---------- */
.desktop { height: 100vh; padding: 22px; display: grid; place-items: center; }
/* Embed mode: app fills the iframe edge-to-edge (host provides the frame) */
.embed body, html.embed body { background: var(--win); }
.embed .desktop { padding: 0; height: 100vh; }
.embed .win { max-width: none; width: 100%; height: 100vh; min-height: 0; border: none; border-radius: 0; box-shadow: none; }
.win {
  width: 100%; max-width: 1360px; height: calc(100vh - 44px); min-height: 560px;
  background: var(--win);
  border: 1px solid var(--line-3);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-win);
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
}
.titlebar {
  height: 40px; flex: none; display: flex; align-items: center; gap: 14px;
  padding: 0 14px; background: var(--rail);
  border-bottom: 1px solid var(--line-2);
  -webkit-user-select: none; user-select: none;
}
.lights { display: flex; gap: 8px; }
.light { width: 12px; height: 12px; border-radius: 50%; position: relative; }
.light.r { background: #ff5f57; } .light.y { background: #febc2e; } .light.g { background: #28c840; }
.tb-title { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; font-weight: 500; white-space: nowrap; }

/* ---------- Workspace switcher ---------- */
.ws-btn { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 9px 0 7px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 12.5px; font-weight: 600; transition: background 0.15s, border-color 0.15s; }
.ws-btn:hover { background: var(--surface-2); border-color: var(--line-3); }
.ws-btn-ic { width: 18px; height: 18px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; }
.ws-btn-nm { letter-spacing: -0.01em; }
.ws-opt { width: 100%; display: flex; align-items: center; gap: 11px; padding: 9px; border: none; background: none; border-radius: var(--r-sm); text-align: left; color: var(--ink-2); transition: background 0.12s; }
.ws-opt:hover { background: var(--hover); }
.ws-opt.on { background: var(--active); }
.ws-opt-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--surface-3); color: var(--ink); display: grid; place-items: center; flex: none; }
.ws-opt.on .ws-opt-ic { background: var(--accent-soft); color: var(--accent-2); }
.ws-opt-nm { font-size: 13px; font-weight: 650; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.ws-opt-d { font-size: 11.5px; color: var(--muted); margin-top: 1px; line-height: 1.35; }
.ws-lock { display: inline-flex; align-items: center; gap: 3px; font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.04em; padding: 1px 5px; border-radius: 999px; background: rgba(246,183,60,0.14); color: var(--warn); border: 1px solid rgba(246,183,60,0.3); }
.ws-ok { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.04em; padding: 1px 6px; border-radius: 999px; background: rgba(62,207,142,0.12); color: var(--ok); border: 1px solid rgba(62,207,142,0.3); }
.ws-cli { display: flex; align-items: center; gap: 10px; padding: 8px 9px 4px; }
.ws-cli-t { font-size: 12px; font-weight: 600; color: var(--ink); }
.ws-cli-d { font-size: 11px; color: var(--muted); margin-top: 1px; }
.tb-pill.warn { color: var(--warn); border-color: rgba(246,183,60,0.3); background: rgba(246,183,60,0.08); }

/* ---------- CLI gate ---------- */
.cli-gate { position: relative; width: 460px; max-width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 30px; text-align: center; box-shadow: var(--shadow-pop); }
.gate-ic { width: 60px; height: 60px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; margin: 0 auto; position: relative; }
.gate-lock { position: absolute; top: 26px; left: 50%; margin-left: 12px; width: 24px; height: 24px; border-radius: 50%; background: var(--warn); color: #3a2a05; display: grid; place-items: center; border: 3px solid var(--surface); }
.cli-gate .h2 { text-align: center; }
.cli-gate .cli-box { text-align: left; }
.cli-gate .row { justify-content: center; }
.gate-foot { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 18px; font-size: 11px; color: var(--muted); }
.gate-foot svg { color: var(--ok); }
.tb-title .sep { color: var(--faint); }
.tb-title .crumb { color: var(--ink); }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.tb-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px;
  border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface);
  font-size: 11.5px; color: var(--ink-2); font-weight: 500;
}
.tb-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(62,207,142,0.16); }
.tb-pill.mono { font-family: var(--mono); font-size: 11px; }
.tb-icon { width: 28px; height: 28px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); position: relative; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.tb-icon:hover { background: var(--surface-2); border-color: var(--line-3); color: var(--ink); }
.tb-icon.active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-2); }
.tb-icon svg { width: 16px; height: 16px; }
.notif-badge { position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--err); box-shadow: 0 0 0 2px var(--rail); }

.body { flex: 1; display: flex; min-height: 0; }
/* every top-level screen fills the area to the right of the rail */
.chat-wrap, .wf, .set-wrap, .main, .term-wrap, .onb { flex: 1; min-width: 0; }

/* ---------- Icon rail ---------- */
.rail { width: var(--rail-w); flex: none; background: var(--rail); border-right: 1px solid var(--line-2); display: flex; flex-direction: column; align-items: center; padding: 10px 0; gap: 4px; }
.rail-logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(150deg, var(--accent), color-mix(in oklch, var(--accent) 55%, #000)); display: grid; place-items: center; margin-bottom: 10px; box-shadow: 0 4px 12px -4px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.3); position: relative; }
.rail-logo::after { content: ""; position: absolute; inset: 8px; border: 2px solid #fff; border-radius: 4px; border-bottom-color: transparent; border-right-color: transparent; transform: rotate(45deg); }
.rail-btn { width: 42px; height: 38px; border: none; background: none; border-radius: var(--r-md); display: grid; place-items: center; color: var(--ink-3); position: relative; transition: background 0.15s, color 0.15s; }
.rail-btn svg { width: 19px; height: 19px; }
.rail-btn:hover { background: var(--hover); color: var(--ink); }
.rail-btn.active { background: var(--accent-soft); color: var(--accent-2); }
.rail-btn.active::before { content: ""; position: absolute; left: -9px; top: 50%; transform: translateY(-50%); width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.rail-btn .tip { position: absolute; left: 52px; top: 50%; transform: translateY(-50%) scale(0.96); transform-origin: left center; background: var(--surface-3); border: 1px solid var(--line); color: var(--ink); font-size: 11.5px; padding: 5px 9px; border-radius: var(--r-sm); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.12s, transform 0.12s; z-index: 50; box-shadow: var(--shadow-pop); }
.rail-btn:hover .tip { opacity: 1; transform: translateY(-50%) scale(1); }
.rail-spacer { flex: 1; }
.rail-ava { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg,#f59e0b,#ec4899); display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #fff; margin-top: 6px; cursor: pointer; border: 1px solid var(--line-3); }

/* ---------- Contextual panel ---------- */
.panel { width: var(--panel-w); flex: none; background: var(--panel); border-right: 1px solid var(--line-2); display: flex; flex-direction: column; min-height: 0; }
.panel-head { padding: 14px 14px 10px; flex: none; }
.panel-title { font-size: 14px; font-weight: 650; letter-spacing: -0.01em; display: flex; align-items: center; justify-content: space-between; }
.panel-title .add { width: 26px; height: 26px; border-radius: var(--r-sm); border: 1px solid var(--line-3); background: var(--surface-2); display: grid; place-items: center; color: var(--ink); transition: background 0.15s, color 0.15s, border-color 0.15s; }
.panel-title .add:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.panel-search { margin: 10px 0 0; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.panel-search svg { width: 14px; height: 14px; }
.panel-search input { flex: 1; background: none; border: none; outline: none; color: var(--ink); font-size: 12.5px; }
.panel-search input::placeholder { color: var(--muted); }
.panel-search .kbd { font-family: var(--mono); font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.panel-body { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 8px 14px; }
.panel-sec { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 12px 8px 6px; display: flex; align-items: center; justify-content: space-between; }
.panel-sec .n { color: var(--faint); }

.list-item { display: flex; align-items: center; gap: 10px; padding: 8px 9px; border-radius: var(--r-sm); cursor: pointer; color: var(--ink-2); transition: background 0.12s, color 0.12s; position: relative; }
.list-item:hover { background: var(--hover); color: var(--ink); }
.list-item.active { background: var(--active); color: var(--ink); }
.list-item.active::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 2.5px; border-radius: 3px; background: var(--accent); }
.list-item .li-ico { width: 16px; height: 16px; flex: none; color: var(--ink-3); }
.list-item.active .li-ico { color: var(--accent-2); }
.li-main { flex: 1; min-width: 0; }
.li-name { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-badge { font-family: var(--mono); font-size: 9.5px; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); color: var(--ink-3); flex: none; }
.li-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot-run { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: pulse 1.6s infinite; }
.dot-ok { background: var(--ok); } .dot-warn { background: var(--warn); } .dot-err { background: var(--err); } .dot-idle { background: var(--faint); }
@keyframes pulse { 50% { opacity: 0.4; } }

.panel-foot { flex: none; border-top: 1px solid var(--line-2); padding: 10px; }

/* ---------- Main ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--win); }
.main-head { height: 48px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line-2); }
.main-title { font-size: 14.5px; font-weight: 650; letter-spacing: -0.015em; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.main-sub { font-size: 12px; color: var(--muted); }
.main-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.main-body { flex: 1; min-height: 0; overflow-y: auto; }

/* ---------- Buttons / chips ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 12.5px; font-weight: 550; transition: background 0.14s, border-color 0.14s, transform 0.12s; white-space: nowrap; }
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: var(--surface-2); border-color: var(--line-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; box-shadow: 0 6px 16px -8px var(--accent-glow); }
.btn.primary:hover { background: var(--accent-strong); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--hover); color: var(--ink); }
.btn.sm { height: 27px; padding: 0 10px; font-size: 11.5px; }
.btn.icon { width: 32px; padding: 0; justify-content: center; }
.btn.icon.sm { width: 27px; }

.seg { display: inline-flex; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); gap: 2px; }
.seg button { height: 24px; padding: 0 12px; border: none; background: none; border-radius: 6px; font-size: 12px; font-weight: 550; color: var(--ink-3); transition: background 0.14s, color 0.14s; }
.seg button.on { background: var(--accent); color: #fff; }
.seg button:not(.on):hover { color: var(--ink); background: var(--hover); }

.tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.03em; padding: 2px 7px; border-radius: var(--r-pill, 999px); background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.tag.accent { background: var(--accent-soft); color: var(--accent-2); border-color: var(--accent-line); }
.tag.ok { background: rgba(62,207,142,0.12); color: var(--ok); border-color: rgba(62,207,142,0.3); }
.tag.warn { background: rgba(246,183,60,0.12); color: var(--warn); border-color: rgba(246,183,60,0.3); }
.tag.err { background: rgba(251,111,111,0.12); color: var(--err); border-color: rgba(251,111,111,0.3); }
.tag.pro { background: var(--accent-soft); color: var(--accent-2); border-color: var(--accent-line); }

.avatar { border-radius: 9px; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; color: #fff; flex: none; }

/* ---------- Empty / utility ---------- */
.kbd { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; background: var(--surface); }
.divider { height: 1px; background: var(--line-2); margin: 12px 0; }
.fade-in { animation: fadeIn 0.32s var(--ease); }
@keyframes fadeIn { from { opacity: 0.4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pop-in { animation: popIn 0.3s var(--ease); }
@keyframes popIn { from { transform: translateY(10px) scale(0.99); } to { transform: none; } }

/* ============================================================
   CHAT screen
   ============================================================ */
.chat-wrap { display: flex; height: 100%; min-height: 0; }
.chat-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 0 8px; }
.chat-inner { max-width: 820px; margin: 0 auto; padding: 0 26px; }
.cmsg { display: flex; gap: 13px; padding: 14px 0; opacity: 0.5; transform: translateY(8px); animation: msgIn 0.45s var(--ease) forwards; }
@keyframes msgIn { to { opacity: 1; transform: none; } }
.cmsg .cav { width: 30px; height: 30px; border-radius: 9px; flex: none; }
.cmsg .cbody { flex: 1; min-width: 0; }
.cmsg .chead { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.cmsg .cname { font-size: 13px; font-weight: 650; }
.cmsg .crole { font-family: var(--mono); font-size: 10px; color: var(--muted); padding: 1px 6px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); white-space: nowrap; }
.cmsg .ctime { font-size: 11px; color: var(--faint); margin-left: auto; }
.cmsg .ctext { font-size: 13.5px; line-height: 1.62; color: var(--ink-2); }
.cmsg .ctext p { margin: 0 0 9px; }
.cmsg .ctext p:last-child { margin: 0; }
.cmsg .ctext strong { color: var(--ink); font-weight: 600; }
.cmsg .ctext code { font-family: var(--mono); font-size: 12px; background: var(--surface); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; color: var(--accent-2); }
.cmsg.user .ctext { color: var(--ink); }
.code-block { font-family: var(--mono); font-size: 12px; line-height: 1.7; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; margin: 10px 0; overflow-x: auto; }
.code-block .ck { color: #c792ea; } .code-block .cs { color: var(--ok); } .code-block .cc { color: var(--muted); } .code-block .cf { color: var(--info); }
.msg-tools { display: flex; gap: 7px; margin-top: 10px; flex-wrap: wrap; }
.tool-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-family: var(--mono); padding: 4px 9px; border-radius: 7px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-3); }
.tool-chip svg { width: 12px; height: 12px; }
.tool-chip .ok { color: var(--ok); }

.agent-typing { display: flex; gap: 13px; padding: 10px 0; }
.agent-typing .cav { width: 30px; height: 30px; border-radius: 9px; flex: none; }
.tdots { display: inline-flex; align-items: center; gap: 4px; height: 30px; }
.tdots span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.3s infinite; }
.tdots span:nth-child(2){animation-delay:.18s;} .tdots span:nth-child(3){animation-delay:.36s;}
@keyframes blink { 0%,60%,100%{opacity:.25;transform:translateY(0);} 30%{opacity:1;transform:translateY(-3px);} }

.composer { flex: none; padding: 14px 26px 18px; border-top: 1px solid var(--line-2); }
.composer-inner { max-width: 820px; margin: 0 auto; }
.composer-box { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-lg); padding: 12px 14px; transition: border-color 0.15s; }
.composer-box:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.composer-box textarea { width: 100%; background: none; border: none; outline: none; resize: none; color: var(--ink); font-size: 13.5px; line-height: 1.5; min-height: 24px; }
.composer-box textarea::placeholder { color: var(--muted); }
.composer-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.composer-row .left { display: flex; align-items: center; gap: 4px; }
.composer-row .send { margin-left: auto; width: 32px; height: 32px; border-radius: var(--r-sm); background: var(--accent); border: none; display: grid; place-items: center; color: #fff; transition: background 0.15s; }
.composer-row .send:hover { background: var(--accent-strong); }
.mini-ico { width: 28px; height: 28px; border-radius: var(--r-sm); border: none; background: none; display: grid; place-items: center; color: var(--muted); transition: background 0.14s, color 0.14s; }
.mini-ico:hover { background: var(--hover); color: var(--ink); }
.mini-ico svg { width: 16px; height: 16px; }
.composer-hint { display: flex; align-items: center; gap: 10px; margin-top: 9px; font-size: 11px; color: var(--muted); }

/* Chat right inspector — agents in the room */
.chat-aside { width: 240px; flex: none; border-left: 1px solid var(--line-2); background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.aside-head { padding: 14px; font-size: 12.5px; font-weight: 650; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; }
.aside-body { flex: 1; overflow-y: auto; padding: 10px; }
.room-agent { display: flex; flex-direction: column; padding: 10px 9px; border-radius: var(--r-md); transition: background 0.14s; }
.room-agent:hover { background: var(--hover); }
.room-agent .ra-top { display: flex; align-items: center; gap: 10px; }
.room-agent .ra-av { width: 32px; height: 32px; border-radius: 9px; flex: none; }
.room-agent .ra-nm { font-size: 12.5px; font-weight: 600; }
.room-agent .ra-st { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.room-agent .ra-st .d { width: 6px; height: 6px; border-radius: 50%; }

/* ============================================================
   WORKFLOW builder
   ============================================================ */
.wf { display: flex; height: 100%; min-height: 0; }
.wf-pal { width: 200px; flex: none; border-right: 1px solid var(--line-2); background: var(--panel); padding: 12px; overflow-y: auto; }
.pal-sec { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 14px 4px 8px; }
.pal-sec:first-child { margin-top: 4px; }
.pal-node { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); margin-bottom: 6px; cursor: grab; font-size: 12px; white-space: nowrap; transition: border-color 0.14s, transform 0.12s; }
.pal-node:hover { border-color: var(--accent-line); transform: translateX(2px); }
.pal-node .pn-ic { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex: none; }
.pal-node .pn-ic svg { width: 14px; height: 14px; }

.wf-canvas { flex: 1; min-width: 0; position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.07) 1px, transparent 0) 0 0 / 24px 24px,
    var(--win);
}
.wf-toolbar { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; align-items: center; gap: 8px; z-index: 8; }
.wf-zoom { position: absolute; bottom: 14px; left: 14px; display: flex; align-items: center; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 3px; z-index: 8; }
.wf-zoom button { width: 28px; height: 26px; border: none; background: none; border-radius: 6px; color: var(--ink-3); display: grid; place-items: center; }
.wf-zoom button:hover { background: var(--hover); color: var(--ink); }
.wf-zoom .zl { font-family: var(--mono); font-size: 11px; color: var(--ink-3); padding: 0 8px; min-width: 46px; text-align: center; }
.wf-stage { position: absolute; inset: 0; }
.wnode { position: absolute; width: 196px; background: var(--surface); border: 1px solid var(--line-3); border-radius: var(--r-md); box-shadow: var(--shadow-pop); cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; z-index: 3; }
.wnode:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.wnode.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-pop); }
.wnode.running { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 0 30px -6px var(--accent-glow); }
.wnode.done { border-color: rgba(62,207,142,0.4); }
.wnode-head { display: flex; align-items: center; gap: 9px; padding: 10px 11px; }
.wnode-ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: none; }
.wnode-ic svg { width: 15px; height: 15px; }
.wnode-tt { font-size: 12.5px; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wnode-kind { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.wnode-body { padding: 0 11px 11px; font-size: 11.5px; color: var(--ink-3); }
.wnode-foot { border-top: 1px solid var(--line-2); padding: 7px 11px; display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.port { position: absolute; width: 11px; height: 11px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--line-3); z-index: 4; }
.port.in { top: -6px; left: 50%; transform: translateX(-50%); }
.port.out { bottom: -6px; left: 50%; transform: translateX(-50%); }
.port.yes { bottom: -6px; left: 32%; } .port.no { bottom: -6px; left: 68%; }
.wf-edges { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: visible; }
.wf-edges path { fill: none; stroke: var(--line-3); stroke-width: 2; }
.wf-edges path.lit { stroke: var(--accent); stroke-dasharray: 6 6; animation: dash 0.6s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -12; } }
.edge-lbl { font-family: var(--mono); font-size: 9px; fill: var(--muted); }

.wf-inspect { width: 256px; flex: none; border-left: 1px solid var(--line-2); background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.insp-head { padding: 13px 14px; border-bottom: 1px solid var(--line-2); font-size: 12.5px; font-weight: 650; }
.insp-body { flex: 1; overflow-y: auto; padding: 14px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 11px; color: var(--ink-3); margin-bottom: 6px; font-weight: 550; }
.field .control { width: 100%; height: 32px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 12.5px; padding: 0 10px; outline: none; display: flex; align-items: center; gap: 8px; }
.field textarea.control { height: auto; min-height: 70px; padding: 9px 10px; resize: vertical; line-height: 1.5; }
.field .control:focus { border-color: var(--accent-line); }

/* ============================================================
   TERMINAL
   ============================================================ */
.term-wrap { height: 100%; display: flex; flex-direction: column; background: #07070b; }
.term-tabs { display: flex; align-items: center; gap: 2px; padding: 8px 12px 0; background: var(--rail); border-bottom: 1px solid var(--line-2); }
.term-tab { display: flex; align-items: center; gap: 8px; padding: 8px 13px; font-size: 12px; color: var(--ink-3); border-radius: 8px 8px 0 0; cursor: pointer; font-family: var(--mono); white-space: nowrap; }
.term-tab.on { background: #07070b; color: var(--ink); }
.term-tab .x { width: 16px; height: 16px; border-radius: 4px; display: grid; place-items: center; color: var(--muted); }
.term-tab .x:hover { background: var(--hover); color: var(--ink); }
.term-body { flex: 1; overflow-y: auto; padding: 16px 20px; font-family: var(--mono); font-size: 12.5px; line-height: 1.75; }
.tline { white-space: pre-wrap; word-break: break-word; }
.tprompt { color: var(--accent-2); } .tpath { color: var(--info); } .tok { color: var(--ok); } .twarn { color: var(--warn); } .terr { color: var(--err); } .tdim { color: var(--muted); } .tcmd { color: var(--ink); } .tacc { color: var(--accent-2); }
.tcursor { display: inline-block; width: 8px; height: 15px; background: var(--accent); vertical-align: text-bottom; animation: blink2 1s steps(1) infinite; }
@keyframes blink2 { 50% { opacity: 0; } }
.term-status { flex: none; height: 28px; display: flex; align-items: center; gap: 14px; padding: 0 16px; background: var(--rail); border-top: 1px solid var(--line-2); font-family: var(--mono); font-size: 11px; color: var(--muted); }
.term-status .s-item { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.term-status .s-item svg { width: 12px; height: 12px; }

/* ============================================================
   ANALYTICS
   ============================================================ */
.dash { padding: 22px; max-width: 1100px; margin: 0 auto; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.stat .sk { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.stat .sk svg { width: 14px; height: 14px; }
.stat .sv { font-size: 27px; font-weight: 650; letter-spacing: -0.02em; margin-top: 8px; display: flex; align-items: baseline; gap: 6px; }
.stat .sv .unit { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat .strend { font-size: 11.5px; margin-top: 6px; display: flex; align-items: center; gap: 5px; }
.strend.up { color: var(--ok); } .strend.down { color: var(--err); }
.card2 { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.card2-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card2-title { font-size: 13.5px; font-weight: 650; white-space: nowrap; }
.card2-sub { font-size: 11.5px; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 7px; height: 150px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar { width: 100%; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, var(--accent), var(--accent-strong)); position: relative; transition: height 0.6s var(--ease); min-height: 3px; }
.bar.alt { background: linear-gradient(180deg, var(--surface-3), var(--surface-2)); }
.bar-lbl { font-family: var(--mono); font-size: 9.5px; color: var(--muted); }
.ctx-ring { display: grid; place-items: center; }
.legend { display: flex; flex-direction: column; gap: 10px; }
.legend-row { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.legend-row .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend-row .lv { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.meter { height: 8px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.meter .fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.agent-cost-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.agent-cost-row:last-child { border: none; }

/* ============================================================
   MCP / cards / lists for agents, runs, settings
   ============================================================ */
.pad { padding: 22px; max-width: 1100px; margin: 0 auto; }
.grid-cards { display: grid; gap: 14px; }
.gc-3 { grid-template-columns: repeat(3, 1fr); }
.gc-2 { grid-template-columns: repeat(2, 1fr); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; transition: border-color 0.15s, transform 0.15s, background 0.15s; }
.tile.hover:hover { border-color: var(--line-3); transform: translateY(-2px); }
.tile-head { display: flex; align-items: flex-start; gap: 12px; }
.tile-logo { width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; flex: none; font-family: var(--mono); font-weight: 700; font-size: 14px; }
.tile-logo img { width: 22px; height: 22px; }
.tile-nm { font-size: 13.5px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.tile-desc { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.tile-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }

/* switch */
.switch { width: 38px; height: 22px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line); position: relative; transition: background 0.18s; flex: none; padding: 0; }
.switch .knob { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.2s var(--ease); }
.switch.on { background: var(--accent); border-color: transparent; }
.switch.on .knob { transform: translateX(16px); }

/* table (runs) */
.rtable { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rtable th { text-align: left; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 0 14px 10px; border-bottom: 1px solid var(--line-2); }
.rtable td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); color: var(--ink-2); }
.rtable tr { cursor: pointer; transition: background 0.12s; }
.rtable tbody tr:hover { background: var(--hover); }
.run-name { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 550; }
.spark { display: inline-flex; align-items: flex-end; gap: 2px; height: 18px; }
.spark i { width: 3px; background: var(--accent); border-radius: 2px; opacity: 0.55; }

/* ============================================================
   ONBOARDING
   ============================================================ */
.onb { height: 100%; display: grid; place-items: center; padding: 30px; position: relative; overflow: hidden; }
.onb-overlay { position: absolute; inset: 0; z-index: 100; display: flex; background: rgba(5,5,7,0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.onb-close { position: absolute; top: 16px; right: 16px; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-3); display: grid; place-items: center; }
.onb-close:hover { color: var(--ink); border-color: var(--line-3); }
.onb-glow { position: absolute; top: -10%; left: 50%; transform: translateX(-50%); width: 700px; height: 400px; background: radial-gradient(closest-side, var(--accent-glow), transparent 72%); opacity: 0.3; pointer-events: none; }
.onb-card { width: 560px; max-width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 30px; position: relative; box-shadow: var(--shadow-pop); }
.onb-steps { display: flex; align-items: center; gap: 0; margin: 22px 0; }
.onb-step { display: flex; align-items: center; gap: 9px; flex: 1; }
.onb-step .num { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line-3); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--muted); flex: none; }
.onb-step.done .num { background: var(--ok); border-color: var(--ok); color: #06281a; }
.onb-step.active .num { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.onb-step .lbl { font-size: 12px; color: var(--ink-3); }
.onb-step.active .lbl { color: var(--ink); font-weight: 600; }
.onb-line { flex: 1; height: 1.5px; background: var(--line-3); margin: 0 6px; }
.onb-line.done { background: var(--ok); }
.cli-box { font-family: var(--mono); font-size: 12.5px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px 14px; display: flex; align-items: center; gap: 10px; margin: 14px 0; }
.cli-box .dollar { color: var(--ok); } .cli-box code { color: var(--ink); flex: 1; }
.cli-box .copy { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--ink-3); }
.cli-box .copy:hover { color: var(--ink); border-color: var(--line-3); }

/* settings */
.set-wrap { display: flex; height: 100%; min-height: 0; }
.set-nav { width: 200px; flex: none; border-right: 1px solid var(--line-2); background: var(--panel); padding: 12px 10px; }
.set-nav-item { padding: 9px 11px; border-radius: var(--r-sm); font-size: 12.5px; color: var(--ink-3); cursor: pointer; display: flex; align-items: center; gap: 10px; transition: background 0.12s, color 0.12s; }
.set-nav-item svg { width: 16px; height: 16px; }
.set-nav-item:hover { background: var(--hover); color: var(--ink); }
.set-nav-item.on { background: var(--active); color: var(--ink); }
.set-body { flex: 1; overflow-y: auto; padding: 26px; }
.set-sec { max-width: 640px; }
.set-row { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.set-row .info { flex: 1; }
.set-row .info .t { font-size: 13px; font-weight: 600; }
.set-row .info .d { font-size: 12px; color: var(--muted); margin-top: 2px; }

.section-label { font-size: 11px; font-family: var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.h2 { font-size: 18px; font-weight: 650; letter-spacing: -0.02em; margin: 0; }
.muted { color: var(--muted); }
.row { display: flex; align-items: center; gap: 10px; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; }
.mt8{margin-top:8px;} .mt12{margin-top:12px;} .mt16{margin-top:16px;} .mt20{margin-top:20px;} .mt24{margin-top:24px;}
.wrap-flex { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Dropdown menus ---------- */
.menu-wrap { position: relative; display: inline-flex; }
.menu { position: absolute; top: calc(100% + 6px); z-index: 200; background: var(--surface-2); border: 1px solid var(--line-3); border-radius: var(--r-md); box-shadow: var(--shadow-pop); padding: 5px; animation: popIn 0.16s var(--ease); }
.menu-left { left: 0; } .menu-right { right: 0; }
.menu-head { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 7px 9px 5px; }
.menu-sep { height: 1px; background: var(--line-2); margin: 5px 4px; }
.menu-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 9px; border-radius: var(--r-sm); border: none; background: none; color: var(--ink-2); font-size: 12.5px; font-weight: 500; text-align: left; transition: background 0.12s, color 0.12s; }
.menu-item:hover { background: var(--hover); color: var(--ink); }
.menu-item.on { color: var(--accent-2); }
.menu-item.danger { color: var(--err); }
.menu-item.danger:hover { background: rgba(251,111,111,0.1); }
.menu-item .mi-ic { display: grid; place-items: center; color: var(--ink-3); }
.menu-item:hover .mi-ic { color: var(--ink); }
.menu-item.danger .mi-ic { color: var(--err); }
.menu-item .mi-l { flex: 1; white-space: nowrap; }
.menu-item .mi-ck { color: var(--accent-2); }
.menu-item .mi-kbd { font-family: var(--mono); font-size: 10px; color: var(--muted); }

.notif { padding: 2px; }
.notif-row { display: flex; gap: 10px; padding: 9px; border-radius: var(--r-sm); transition: background 0.12s; cursor: pointer; }
.notif-row:hover { background: var(--hover); }
.notif-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.notif-ic svg { width: 15px; height: 15px; }
.notif-t { font-size: 12px; color: var(--ink); font-weight: 550; }
.notif-d { font-size: 11px; color: var(--muted); margin-top: 1px; line-height: 1.4; }
.notif-time { font-size: 10px; color: var(--faint); margin-top: 3px; font-family: var(--mono); }
.notif-foot { border-top: 1px solid var(--line-2); margin-top: 4px; padding-top: 4px; }

/* per-agent model selector + permission in chat aside */
.ra-model { margin-top: 8px; }
.model-btn { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-family: var(--mono); font-size: 10.5px; max-width: 100%; }
.model-btn:hover { border-color: var(--line-3); color: var(--ink); }
.model-btn svg { width: 12px; height: 12px; flex: none; color: var(--muted); }
.model-btn .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-perm { display: flex; align-items: center; gap: 7px; margin-top: 8px; font-size: 11px; color: var(--ink-3); }
.room-perm .muted { color: var(--muted); }

/* ---------- Reports (Work Day Reporter) ---------- */
.rep-conf { width: 280px; flex: none; border-right: 1px solid var(--line-2); background: var(--panel); padding: 14px; overflow-y: auto; }
.rep-note { display: flex; gap: 8px; align-items: flex-start; font-size: 11px; line-height: 1.45; color: var(--ink-3); background: rgba(62,207,142,0.08); border: 1px solid rgba(62,207,142,0.22); border-radius: var(--r-sm); padding: 8px 10px; margin: 8px 0 2px; }
.rep-note svg { color: var(--ok); flex: none; margin-top: 1px; }
.rep-note b { color: var(--ink-2); font-weight: 600; }
.ckrow { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--r-sm); cursor: pointer; transition: background 0.12s; }
.ckrow:hover { background: var(--hover); }
.ckbox { width: 16px; height: 16px; border-radius: 5px; border: 1px solid var(--line-3); background: var(--surface); display: grid; place-items: center; color: transparent; flex: none; transition: background 0.14s, border-color 0.14s, color 0.14s; }
.ckbox.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ckrow .ck-name { font-size: 12.5px; font-weight: 550; }
.ckrow .ck-path { font-family: var(--mono); font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.optrow { display: flex; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; margin-bottom: 7px; transition: border-color 0.15s, background 0.15s; }
.optrow:hover { border-color: var(--line-3); }
.optrow.on { border-color: var(--accent-line); background: var(--accent-soft); }
.rdot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-3); flex: none; margin-top: 2px; transition: border 0.15s; background: var(--win); }
.optrow.on .rdot { border: 4.5px solid var(--accent); }
.optrow .ot { font-size: 12.5px; font-weight: 600; }
.optrow .od { font-size: 11px; color: var(--muted); line-height: 1.4; margin-top: 1px; }
.rep-gen { display: flex; align-items: center; gap: 12px; padding: 40px 0; color: var(--muted); font-size: 13px; justify-content: center; }
.rep-body { padding: 18px 20px; }
.rep-sec { padding: 6px 0 10px; }
.rep-sec + .rep-sec { border-top: 1px solid var(--line-2); margin-top: 6px; padding-top: 14px; }
.rep-sec-t { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 650; margin-bottom: 6px; }
.rep-sec-ic { width: 22px; height: 22px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; }
.rep-item { display: flex; gap: 10px; align-items: baseline; font-size: 13px; color: var(--ink-2); padding: 4px 0 4px 4px; line-height: 1.55; }
.rep-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: none; position: relative; top: -2px; }
.rep-time { font-family: var(--mono); font-size: 10.5px; color: var(--muted); flex: none; }
.ts-row { display: grid; grid-template-columns: 120px 1fr 50px; gap: 12px; font-size: 12.5px; color: var(--ink-2); padding: 7px 4px; border-bottom: 1px solid var(--line-2); align-items: baseline; }
.ts-row:last-child { border-bottom: none; }
.ts-time { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.ts-dur { font-family: var(--mono); font-size: 11.5px; color: var(--ink); text-align: right; }
.ts-total { border-top: 1px solid var(--line); font-weight: 650; color: var(--ink); }
.rep-files { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 4px; }
.file-pill { font-family: var(--mono); font-size: 11px; padding: 4px 9px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); display: inline-flex; align-items: center; gap: 7px; }
.file-pill i { font-style: normal; font-size: 9.5px; }
.fs-added { color: var(--ok); } .fs-modified { color: var(--warn); } .fs-deleted { color: var(--err); }
.rep-acc { width: 100%; display: flex; align-items: center; gap: 9px; padding: 13px 16px; background: none; border: none; color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.rep-acc-body { border-top: 1px solid var(--line-2); padding: 10px 16px 14px; }
.rep-file-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 11px; }
.rep-file-row .fs-added, .rep-file-row .fs-modified { font-family: var(--mono); font-size: 10px; }
.rep-diff { font-family: var(--mono); font-size: 10.5px; color: var(--muted); flex: none; }

@media (max-width: 900px) {
  .panel { display: none; }
  .chat-aside, .wf-inspect, .wf-pal, .set-nav { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .gc-3, .gc-2 { grid-template-columns: 1fr; }
}
