/* HELM v2 — base layer. Layout + components. Editions override the variables and flip layout. */

:root {
  --bg: #FAFAF8;
  --surface: #FFFFFF;
  --surface-2: #F4F4F1;
  --ink: #1C1C20;
  --dim: #84848E;
  --line: rgba(28, 28, 32, .09);
  --accent: #7C6CF6;
  --ok: #2BB673;
  --warn: #E8A23D;
  --bad: #E05A4D;
  --radius: 10px;
  --rail-w: 232px;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, system-ui, sans-serif;
  --font-display: var(--font-body);
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --shadow: 0 1px 2px rgba(20, 20, 30, .05), 0 8px 24px rgba(20, 20, 30, .06);
  --g-edge: rgba(127, 127, 140, .28);
  --g-folder: #9a9aa4;
  --g-label: #44444c;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 .4em; line-height: 1.25; }
p { margin: .35em 0; }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }

.boot-splash { height: 100vh; display: grid; place-items: center; }

/* ---------- shell layout ---------- */
#shell { display: flex; min-height: 100vh; }
.rail {
  width: var(--rail-w); flex: 0 0 var(--rail-w);
  display: flex; flex-direction: column;
  padding: 18px 12px 14px;
  border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh;
  background: var(--surface);
}
main#page { flex: 1; padding: 34px 42px 90px; max-width: 1280px; min-width: 0; }

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brand.big { padding: 0 0 6px; justify-content: center; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 7px; flex: 0 0 22px;
  background: conic-gradient(from 210deg, var(--accent), color-mix(in srgb, var(--accent) 40%, var(--ink)) 60%, var(--accent));
}
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name { font-weight: 700; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-edition { font-size: 10.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .14em; }

.nav { flex: 1; overflow-y: auto; padding: 2px 0; }
.nav-sec { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); padding: 16px 10px 5px; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; margin: 1px 0; border-radius: 8px;
  color: var(--dim); font-size: 13.5px; font-weight: 500;
  transition: background .12s, color .12s;
}
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link.active { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.nav-link.active .nav-ic { color: var(--accent); }
.nav-ic { width: 18px; text-align: center; font-size: 13px; flex: 0 0 18px; }
.nav-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.userbox { display: flex; align-items: center; gap: 9px; padding: 10px 8px 2px; border-top: 1px solid var(--line); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 30px;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.2; font-size: 12.5px; min-width: 0; flex: 1; }
.user-meta b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dim { color: var(--dim); }

/* ---------- page chrome ---------- */
.page-enter { opacity: 0; transform: translateY(7px); }
.page-enter.page-in { opacity: 1; transform: none; transition: opacity .28s ease, transform .28s ease; }

.page-h { margin-bottom: 26px; }
.page-h h1 { font-size: 26px; font-weight: 700; letter-spacing: -.015em; }
.page-h .sub { color: var(--dim); font-size: 14px; margin-top: 2px; }
.page-h .h-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.north-star {
  font-size: 13px; color: var(--dim); display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
}
.north-star b { color: var(--ink); font-weight: 600; }
.north-star .ns-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: 0 0 7px; }

/* ---------- cards ---------- */
.cards { display: grid; gap: 14px; }
.cards.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .cards.c4 { grid-template-columns: repeat(2, 1fr); } .cards.c3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .cards.c4, .cards.c3, .cards.c2 { grid-template-columns: 1fr; } #shell { flex-direction: column; } .rail { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; } .nav { display: flex; } main#page { padding: 20px; } }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow);
}
.card h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); font-weight: 600; margin-bottom: 10px; }
.card .big-num { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.card .kpi-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.card.clickable { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.card.clickable:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(20,20,30,.1); }

.delta { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--bad); }

.spark { color: var(--dim); opacity: .9; }

/* ---------- buttons / forms ---------- */
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.primary {
  background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px;
  padding: 9px 18px; border-radius: 9px; transition: opacity .12s, transform .12s;
}
.primary:hover { opacity: .88; }
.primary:active { transform: scale(.985); }
.primary.wide { width: 100%; }
.ghost {
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 14px;
  font-size: 13px; font-weight: 500; color: var(--ink); background: var(--surface);
  transition: background .12s;
}
.ghost:hover { background: var(--surface-2); }
.ghost.danger { color: var(--bad); }
.icon-btn { padding: 5px 8px; font-size: 14px; line-height: 1; }

input, textarea, select {
  font: inherit; color: var(--ink); width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 12px; outline: none; transition: border-color .12s, box-shadow .12s;
}
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
textarea { resize: vertical; }
.f-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--dim); margin: 12px 0 0; }
.f-label input, .f-label textarea { margin-top: 5px; font-weight: 400; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; width: 100%; }
.login-card { width: 380px; max-width: 100%; padding: 38px 34px 30px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.login-card .brand-name { font-size: 22px; letter-spacing: .12em; }
.login-sub { text-align: center; color: var(--dim); font-size: 13.5px; margin: 6px 0 16px; }
.login-card .hint { text-align: center; font-size: 12px; color: var(--dim); margin-top: 12px; }
.login-card .primary { margin-top: 18px; }
.err { color: var(--bad); font-size: 13px; text-align: center; min-height: 1.2em; margin: 8px 0 0; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tab {
  padding: 9px 16px; font-size: 13.5px; font-weight: 500; color: var(--dim);
  border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 6px 6px 0 0;
  transition: color .12s;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }

/* ---------- pills / status ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; }
.st-active .dot, .h-green .dot { background: var(--ok); }
.st-scheduled .dot, .h-yellow .dot { background: var(--warn); }
.st-idle .dot { background: var(--dim); }
.h-red .dot { background: var(--bad); }
.demo-note { font-size: 11.5px; color: var(--dim); font-style: italic; }

/* ---------- feed / messages ---------- */
.feed { display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 11px; align-items: flex-start; }
.msg .avatar { width: 30px; height: 30px; font-size: 12px; margin-top: 2px; }
.msg-body { min-width: 0; flex: 1; }
.msg-meta { font-size: 12px; color: var(--dim); display: flex; gap: 8px; align-items: baseline; }
.msg-meta b { color: var(--ink); font-size: 13px; }
.msg-text { font-size: 14px; margin-top: 1px; overflow-wrap: break-word; }
.msg.human .avatar { border-radius: 8px; }
.post-box { display: flex; gap: 8px; margin-top: 16px; }
.post-box input { flex: 1; }

/* ---------- kanban ---------- */
.kanban { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding-bottom: 12px; }
.kcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); width: 252px; flex: 0 0 252px; padding: 10px; }
.kcol-h { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 8px; font-size: 13px; }
.kcol-title { font-weight: 600; cursor: pointer; }
.kcol-title:hover { color: var(--accent); }
.kcount { font-size: 11px; color: var(--dim); background: var(--surface); border: 1px solid var(--line); padding: 1px 7px; border-radius: 999px; }
.kcards { display: flex; flex-direction: column; gap: 8px; min-height: 14px; border-radius: 8px; transition: background .12s; }
.kcards.over { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: grab; box-shadow: 0 1px 2px rgba(20,20,30,.04); transition: box-shadow .12s, transform .12s; }
.kcard:hover { box-shadow: 0 3px 10px rgba(20,20,30,.09); }
.kcard.dragging { opacity: .45; transform: rotate(1.5deg); }
.kcard-t { font-size: 13.5px; font-weight: 500; }
.kcard-d { font-size: 12px; color: var(--dim); margin-top: 3px; }
.ktag { display: inline-block; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; margin-top: 7px; }
.ktag.t-win { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.k-add { width: 100%; text-align: left; color: var(--dim); font-size: 12.5px; padding: 7px 8px 3px; border-radius: 6px; }
.k-add:hover { color: var(--ink); }
.k-addcol { flex: 0 0 36px; height: 36px; border: 1px dashed var(--line); border-radius: 9px; color: var(--dim); font-size: 17px; }
.k-addcol:hover { color: var(--ink); border-color: var(--dim); }

/* ---------- graph ---------- */
.graph-wrap { position: relative; height: calc(100vh - 250px); min-height: 420px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.graph-canvas { display: block; cursor: grab; }
.graph-legend { position: absolute; left: 14px; bottom: 12px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--dim); pointer-events: none; }
.graph-legend span { display: inline-flex; align-items: center; gap: 5px; }
.graph-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.graph-side {
  position: absolute; right: 14px; top: 14px; width: 270px; max-height: calc(100% - 28px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px;
}
.graph-side h4 { margin-bottom: 2px; }
.graph-side .x { position: absolute; right: 10px; top: 8px; color: var(--dim); }

/* ---------- charts ---------- */
.area-chart { width: 100%; height: auto; display: block; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-labels text { font-size: 9px; fill: var(--dim); }
.bar-row-wrap { display: flex; flex-direction: column; gap: 7px; }
.bar-row { display: grid; grid-template-columns: 92px 1fr 38px; gap: 10px; align-items: center; font-size: 12.5px; }
.bar-label { color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 7px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 4px; }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--dim); }
.hp-label { font-size: 8.5px; fill: var(--dim); }

/* ---------- heat map ---------- */
.hm-wrap { display: flex; flex-direction: column; gap: 10px; }
.hm-grid { display: flex; gap: 4px; }
.hm-week { display: flex; flex-direction: column; gap: 4px; }
.hm-cell { width: 17px; height: 17px; border-radius: 4px; background: var(--surface-2); }
.hm-legend { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--dim); }
.hm-legend .hm-cell { width: 11px; height: 11px; }
.hm-legend span { margin: 0 4px; }

/* ---------- markdown ---------- */
.md { font-size: 14.5px; line-height: 1.65; }
.md h2 { font-size: 21px; margin-top: .6em; }
.md h3 { font-size: 17px; margin-top: 1em; }
.md h4 { font-size: 15px; margin-top: 1em; }
.md blockquote { border-left: 3px solid var(--accent); margin: .6em 0; padding: 2px 14px; color: var(--dim); }
.md code { font-family: var(--font-mono); font-size: .88em; background: var(--surface-2); border-radius: 4px; padding: 1px 5px; }
.md table { border-collapse: collapse; margin: .6em 0; }
.md td { border: 1px solid var(--line); padding: 5px 12px; font-size: 13.5px; }
.md ul { padding-left: 22px; margin: .4em 0; }
.wikilink { color: var(--accent); cursor: pointer; border-bottom: 1px dashed color-mix(in srgb, var(--accent) 50%, transparent); }
.wikilink:hover { border-bottom-style: solid; }

/* ---------- modal / toast ---------- */
.modal-wrap { position: fixed; inset: 0; background: rgba(15, 15, 22, .42); display: grid; place-items: center; z-index: 90; animation: fadein .15s ease; }
@keyframes fadein { from { opacity: 0; } }
.modal { width: 430px; max-width: calc(100vw - 40px); max-height: 86vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 60px rgba(10,10,20,.25); }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 0; }
.modal-h .x { color: var(--dim); font-size: 14px; padding: 4px 8px; }
.modal-b { padding: 4px 20px 8px; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; }
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 16px); opacity: 0; z-index: 99;
  background: var(--ink); color: var(--bg); font-size: 13.5px; font-weight: 500;
  padding: 10px 20px; border-radius: 999px; box-shadow: 0 8px 30px rgba(10,10,20,.3);
  transition: opacity .25s, transform .25s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--bad); color: #fff; }

/* ---------- help dock ---------- */
#helpdock { position: fixed; right: 26px; bottom: 26px; z-index: 80; }
.hd-fab {
  width: 46px; height: 46px; border-radius: 50%; font-size: 19px; font-weight: 700;
  background: var(--ink); color: var(--bg); box-shadow: 0 6px 24px rgba(10,10,20,.28);
  transition: transform .15s;
}
.hd-fab:hover { transform: scale(1.07); }
.hd-panel {
  position: absolute; right: 0; bottom: 58px; width: 350px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 50px rgba(10,10,20,.22); padding: 16px;
  transition: opacity .18s, transform .18s;
}
.hd-panel.hidden { opacity: 0; transform: translateY(8px); pointer-events: none; }
.hd-h { display: flex; flex-direction: column; gap: 1px; margin-bottom: 10px; }
.hd-h .dim { font-size: 11.5px; }
.hd-results { max-height: 290px; overflow-y: auto; margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.hd-hint { font-size: 12.5px; padding: 4px 2px; }
.hd-hit { display: block; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; transition: background .12s; }
.hd-hit:hover { background: var(--surface-2); }
.hd-hit b { font-size: 13px; display: block; }
.hd-hit span { font-size: 12px; color: var(--dim); display: block; margin-top: 1px; }
.hd-f { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.hd-escal { font-size: 12.5px; color: var(--accent); font-weight: 500; }

/* ---------- glass (Aura turns this real; elsewhere it's just a surface) ---------- */
.glass { background: var(--surface); }

/* ---------- chat page ---------- */
.chat-layout { display: flex; gap: 0; height: calc(100vh - 150px); min-height: 480px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.chat-side { width: 250px; flex: 0 0 250px; border-right: 1px solid var(--line); display: flex; flex-direction: column; background: var(--surface-2); }
.chat-side-h { padding: 14px 14px 8px; }
.chat-sessions { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.chat-proj { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); padding: 12px 8px 4px; }
.chat-sess { display: flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 7px; font-size: 13px; cursor: pointer; color: var(--dim); }
.chat-sess:hover { background: var(--surface); color: var(--ink); }
.chat-sess.active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(20,20,30,.06); }
.chat-sess .t { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-sess .icon-btn { opacity: 0; font-size: 11px; padding: 2px 4px; color: var(--dim); }
.chat-sess:hover .icon-btn { opacity: 1; }
.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-thread { flex: 1; overflow-y: auto; padding: 26px 8%; display: flex; flex-direction: column; gap: 20px; }
.chat-empty { margin: auto; text-align: center; color: var(--dim); }
.chat-empty h2 { color: var(--ink); }
.cmsg { max-width: 92%; }
.cmsg.user { align-self: flex-end; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px 14px 4px 14px; padding: 10px 16px; }
.cmsg.assistant { align-self: flex-start; }
.cmsg .md p:first-child { margin-top: 0; }
.cmsg .md p:last-child { margin-bottom: 0; }
.chat-status { font-size: 12.5px; color: var(--dim); padding: 0 8% 6px; display: flex; align-items: center; gap: 8px; }
.chat-status .spin { width: 11px; height: 11px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.composer { border-top: 1px solid var(--line); padding: 14px 8% 16px; position: relative; }
.composer textarea { min-height: 52px; max-height: 180px; padding-right: 84px; }
.composer .send { position: absolute; right: calc(8% + 8px); bottom: 24px; padding: 7px 14px; border-radius: 8px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 13px; }
.composer .hint-row { font-size: 11.5px; color: var(--dim); margin-top: 6px; }
.at-pop { position: absolute; bottom: calc(100% - 8px); left: 8%; width: 340px; max-height: 230px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); z-index: 10; }
.at-item { padding: 7px 12px; font-size: 12.5px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.at-item:hover, .at-item.sel { background: var(--surface-2); }
.at-item .p { color: var(--dim); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- brain ---------- */
.brain-layout { display: flex; gap: 18px; min-height: 540px; }
.brain-tree { width: 260px; flex: 0 0 260px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 12px; overflow-y: auto; max-height: calc(100vh - 230px); }
.bt-dir > .bt-row { font-weight: 600; }
.bt-row { display: flex; align-items: center; gap: 6px; padding: 4px 7px; border-radius: 6px; font-size: 13px; cursor: pointer; color: var(--ink); }
.bt-row:hover { background: var(--surface-2); }
.bt-row.active { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
.bt-kids { margin-left: 14px; border-left: 1px solid var(--line); padding-left: 4px; }
.bt-ic { font-size: 11px; width: 14px; color: var(--dim); }
.brain-view { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 26px 32px; max-height: calc(100vh - 230px); overflow-y: auto; }
.brain-view.dropzone-over { outline: 2px dashed var(--accent); outline-offset: -8px; }
.bv-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.bv-path { font-size: 12px; color: var(--dim); font-family: var(--font-mono); }
.brain-search { margin-bottom: 14px; position: relative; }
.bs-results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); z-index: 20; max-height: 300px; overflow-y: auto; }
.bv-editor { width: 100%; min-height: 420px; font-family: var(--font-mono); font-size: 13px; line-height: 1.6; }

/* ---------- agent cards ---------- */
.agent-card { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid var(--line); }
.agent-card:last-child { border-bottom: none; }
.agent-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; flex: 0 0 34px; }
.agent-meta { flex: 1; min-width: 0; }
.agent-meta b { font-size: 14px; }
.agent-meta .role { font-size: 12px; color: var(--dim); }
.agent-meta .task { font-size: 12.5px; margin-top: 3px; color: var(--dim); font-style: italic; }
.agent-actions { display: flex; gap: 6px; align-items: center; }

/* ---------- clients ---------- */
.client-card .ch-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.client-card .mrr { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
.client-card .mrr:hover { color: var(--accent); }
.proj-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; padding: 7px 0; border-top: 1px solid var(--line); cursor: pointer; }
.proj-row:hover .pname { color: var(--accent); }
.proj-status { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 5px; border: 1px solid var(--line); color: var(--dim); }
.proj-status.live { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.proj-status.review { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.health-strip { display: flex; gap: 10px; flex-wrap: wrap; }
.health-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.health-chip .dot { width: 8px; height: 8px; border-radius: 50%; }

/* ---------- onboarding ---------- */
.ob-wrap { max-width: 620px; margin: 6vh auto 0; }
.ob-progress { height: 4px; background: var(--surface-2); border-radius: 2px; margin-bottom: 34px; overflow: hidden; }
.ob-progress i { display: block; height: 100%; background: var(--accent); border-radius: 2px; transition: width .35s ease; }
.ob-q { font-size: 24px; font-weight: 700; letter-spacing: -.015em; font-family: var(--font-display); }
.ob-hint { color: var(--dim); font-size: 13.5px; margin: 6px 0 18px; }
.ob-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.ob-count { font-size: 12px; color: var(--dim); }

/* ---------- settings ---------- */
.integ-card { display: flex; align-items: center; gap: 14px; }
.integ-meta { flex: 1; min-width: 0; }
.integ-meta b { display: block; font-size: 14.5px; }
.integ-meta span { font-size: 12.5px; color: var(--dim); }
.key-mask { font-family: var(--font-mono); font-size: 12px; color: var(--dim); }

/* ---------- misc ---------- */
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.mt { margin-top: 18px; }
.mt-s { margin-top: 10px; }
.sec-title { font-size: 15px; font-weight: 700; margin: 30px 0 12px; }
.empty { color: var(--dim); font-size: 13.5px; padding: 18px 0; text-align: center; }
.list-plain { list-style: none; margin: 0; padding: 0; }
