/* ProChimps mission control — dark workspace with one orange accent. */
:root {
  --bg: #161616;
  --side: #1c1c1c;
  --top: #1f1f1f;
  --card: #1e1e1e;
  --card-2: #252525;
  --hover: #2a2a2a;
  --line: #2e2e2e;
  --line-2: #3b3b3b;
  --ink: #ededed;
  --ink-2: #a6a6a6;
  --ink-3: #707070;
  --accent: #f26a2e;
  --accent-2: #ff8248;
  --accent-tint: rgba(242, 106, 46, .13);
  --accent-line: rgba(242, 106, 46, .45);
  --good: #3fb27f;
  --bad: #e5574b;
  --warn: #e3a23b;
  --purple: #8b7cf6;
  --green: #35b58f;
  --amber: #e3a23b;
  --blue: #5b8def;
  --radius: 12px;
  --side-w: 248px;
  --top-h: 56px;
  --f-body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
h1, h2, h3 { font-weight: 700; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
a { color: var(--accent-2); }
.mono { font-family: var(--f-mono); font-feature-settings: "tnum"; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); font-size: 13px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; display: block; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: var(--side-w) 1fr; grid-template-rows: var(--top-h) 1fr; min-height: 100vh; }
.topbar { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 16px;
  background: var(--top); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-center { display: flex; align-items: center; gap: 10px; }
.top-mark svg { width: 26px; height: 26px; }
.top-name { font-weight: 700; font-size: 17px; padding-right: 14px; border-right: 1px solid var(--line-2); }
.top-tagline { color: var(--ink-3); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; padding-left: 4px; }
.topbar-right { justify-self: end; }
.clock { color: var(--ink-3); font-size: 12px; }
.icon-btn { background: transparent; border: 0; color: var(--ink-2); width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
#menu { display: none; }

.sidebar { background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 16px 12px 12px;
  position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 18px; }
.brand-mark { width: 44px; height: 44px; border-radius: 12px; background: #2a1d16; border: 1px solid #3a2a20; display: grid; place-items: center; }
.brand-mark svg { width: 26px; height: 26px; }
.brand b { display: block; font-size: 17px; line-height: 1.1; }
.brand small { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-top: 3px; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a svg { color: var(--ink-2); }
.nav a:hover { background: var(--hover); }
.nav a.active { background: #2c211b; color: #fff; box-shadow: inset 0 0 0 1px #3a2a20; }
.nav a.active svg { color: var(--accent); }
.badge { margin-left: auto; background: var(--accent); color: #fff; font: 700 11px var(--f-mono); border-radius: 999px; padding: 2px 8px; }
.side-sums { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.side-sum { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: var(--ink-2); font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; border-radius: 8px; }
.side-sum:hover { background: var(--hover); }
.side-sum svg { width: 16px; height: 16px; }
.side-sum .n { margin-left: auto; font: 600 11px var(--f-mono); letter-spacing: 0; background: var(--card-2); color: var(--ink); border-radius: 999px; padding: 2px 9px; }
.side-sum .n.hot { background: var(--accent); color: #fff; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.team-switch { flex: 1; font: 600 14px var(--f-body); border-radius: 10px; padding: 9px 12px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); cursor: pointer; display: flex; align-items: center; gap: 10px; }
.team-switch::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); }
.team-switch.running::before { background: var(--good); box-shadow: 0 0 0 3px rgba(63,178,127,.2); }
.team-switch.paused::before { background: var(--warn); }
.team-switch:hover { border-color: var(--ink-3); }

.view { padding: 30px 36px 60px; min-width: 0; outline: none; }
.screen-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.screen-head h1 { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.screen-head h1 .count { font-size: 17px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.screen-head p { margin: 6px 0 0; color: var(--ink-2); }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- panel (the "launchpad") ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px 26px 24px; }
.panel-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.panel-head b { font-size: 16px; }
.panel-head span { color: var(--ink-2); font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.tile { position: relative; background: var(--card-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 18px 12px 16px; text-align: center;
  color: var(--ink); text-decoration: none; display: grid; justify-items: center; gap: 4px; min-height: 152px; align-content: start; }
a.tile:hover { border-color: var(--ink-3); }
.tile .glyph { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 8px; }
.tile .glyph svg { width: 22px; height: 22px; }
.tile .t { font-weight: 700; font-size: 15.5px; line-height: 1.25; }
.tile .s { color: var(--ink-2); font-size: 13px; }
.tile .flag { position: absolute; top: 10px; right: 10px; font: 600 10.5px var(--f-mono); padding: 2px 7px; border-radius: 999px; }
.tile.done { opacity: .62; }
.tile.done .flag { background: rgba(63,178,127,.16); color: var(--good); }
.tile.late .flag { background: rgba(229,87,75,.16); color: var(--bad); }
.tile.next { border-color: var(--ink-3); }
.tile.next .flag { background: var(--hover); color: var(--ink); }
.tile.you { background: #2a1f19; border-color: var(--accent-line); }
.tile.you .flag { background: var(--accent); color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .tile.you .glyph { animation: beacon 1.8s ease-out infinite; }
  @keyframes beacon { 0% { box-shadow: 0 0 0 0 rgba(242,106,46,.55); } 100% { box-shadow: 0 0 0 12px rgba(242,106,46,0); } }
}
.g-lead, .g-owner { background: var(--accent-tint); color: var(--accent); }
.g-research { background: rgba(139,124,246,.15); color: var(--purple); }
.g-creative { background: rgba(227,162,59,.15); color: var(--amber); }
.g-customer { background: rgba(53,181,143,.15); color: var(--green); }

.section { margin-top: 34px; }
.section-title { font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 14px; }
.section-title .n { color: var(--ink-3); letter-spacing: 0; margin-left: 6px; }

/* ---------- cards / stats ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.grid { display: grid; gap: 14px; }
.grid-pulse { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-media { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.stat .k { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.stat .v { font: 700 30px/1.1 var(--f-body); margin-top: 8px; letter-spacing: -.02em; }
.stat .s { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.stat .v.unknown { color: var(--ink-3); font-size: 22px; }
.meter { height: 6px; border-radius: 999px; background: var(--hover); margin-top: 12px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.meter.over > i { background: var(--bad); }

/* ---------- buttons, chips ---------- */
.btn { font: 600 15px var(--f-body); border-radius: 8px; padding: 11px 20px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.btn svg { width: 18px; height: 18px; }
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); }
.btn-approve { background: var(--good); border-color: var(--good); color: #0b1f16; }
.btn-approve:hover { background: #4cc28e; }
.btn-reject { color: var(--bad); background: transparent; }
.btn-ghost { background: transparent; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: 600 12px var(--f-body); padding: 3px 10px; border-radius: 999px; background: var(--card-2); color: var(--ink-2); white-space: nowrap; border: 1px solid var(--line-2); }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.plain::before { display: none; }
.chip.working { color: var(--blue); border-color: rgba(91,141,239,.35); }
.chip.paused, .chip.changes, .chip.pending { color: var(--warn); border-color: rgba(227,162,59,.35); }
.chip.error, .chip.failed, .chip.offline, .chip.rejected { color: var(--bad); border-color: rgba(229,87,75,.35); }
.chip.missing { color: var(--ink-3); }
.chip.good, .chip.approved, .chip.live, .chip.done, .chip.ok { color: var(--good); border-color: rgba(63,178,127,.35); }
.chip.hot { color: #fff; background: var(--accent); border-color: var(--accent); }
.tag { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-3); }

/* ---------- callout ---------- */
.callout { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: #2a1f19; border: 1px solid var(--accent-line); border-radius: 16px; padding: 20px 24px; margin-bottom: 18px; }
.callout h2 { font-size: 20px; }
.callout .tag { color: var(--accent); }
.callout.calm { background: var(--card); border-color: var(--line); }
.callout.calm .tag { color: var(--good); }
.callout.alert { background: #2a1717; border-color: rgba(229,87,75,.45); }
.callout.alert .tag { color: var(--bad); }

/* ---------- filter layout (Team) ---------- */
.with-filters { display: grid; grid-template-columns: 250px 1fr; gap: 28px; align-items: start; }
.filters { position: sticky; top: calc(var(--top-h) + 20px); display: grid; gap: 4px; padding-right: 24px; border-right: 1px solid var(--line); }
.search { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; margin-bottom: 18px; color: var(--ink-3); }
.search input { flex: 1; background: transparent; border: 0; outline: 0; color: var(--ink); font: 15px var(--f-body); min-width: 0; }
.search:focus-within { border-color: var(--ink-3); }
.filter-label { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); margin: 14px 0 8px; }
.filter { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 8px; color: var(--ink); background: transparent; border: 0; font: 500 15px var(--f-body); cursor: pointer; text-align: left; }
.filter:hover { background: var(--hover); }
.filter.on { background: var(--card-2); font-weight: 700; }
.filter .n { color: var(--ink-3); font: 13px var(--f-mono); }
.reset { color: var(--accent); background: none; border: 0; font: 600 15px var(--f-body); padding: 18px 0 0; text-align: left; cursor: pointer; }

/* ---------- bot cards ---------- */
.bot { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 22px 24px; text-align: left; font: inherit; color: inherit; cursor: pointer; display: grid; gap: 14px; align-content: start; }
.bot:hover { border-color: var(--ink-3); background: #212121; }
.bot-top { display: flex; align-items: center; gap: 16px; }
.bot-top svg { width: 40px; height: 40px; stroke-width: 1.5; color: var(--ink); }
.bot-top b { font-size: 19px; }
.bot-top .chip { margin-left: auto; }
.bot .what { color: var(--ink-2); font-size: 15px; line-height: 1.55; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.facts { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 12px; }
.facts b { color: var(--ink); font-family: var(--f-mono); font-weight: 500; }

/* ---------- approvals ---------- */
.approval { display: grid; gap: 14px; }
.approval.urgent { border-color: rgba(229,87,75,.5); }
.approval .head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.approval h3 { font-size: 19px; }
.approval .details { background: var(--card-2); border-radius: 10px; padding: 4px 16px; max-height: 360px; overflow: auto; font-size: 14px; margin-top: 8px; }
.approval textarea { width: 100%; min-height: 64px; font: inherit; border-radius: 8px; border: 1px solid var(--line-2); padding: 12px; background: var(--bg); color: var(--ink); resize: vertical; }
.approval textarea:focus { border-color: var(--ink-3); outline: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.thumbs figure, .media figure { margin: 0; }
.thumbs img, .media img { width: 100%; border-radius: 10px; background: var(--card-2); display: block; aspect-ratio: 1; object-fit: cover; }
.thumbs video, .media video { width: 100%; border-radius: 10px; aspect-ratio: 9/16; max-height: 380px; object-fit: contain; background: #000; display: block; }
.thumbs figcaption { font-size: 12px; color: var(--ink-3); margin-top: 4px; word-break: break-all; }
.decided-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.decided-row:last-child { border-bottom: 0; }
details summary { cursor: pointer; color: var(--ink-3); font-size: 13px; }

/* ---------- tables, kanban, bars ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .12em; padding: 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.scroll-x { overflow-x: auto; }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; min-height: 140px; }
.col h3 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); display: flex; justify-content: space-between; margin-bottom: 12px; }
.ticket { background: var(--card-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; margin-bottom: 8px; font-size: 14px; }
.ticket .who { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 32px; gap: 12px; align-items: center; font-size: 14px; }
.bar-row .meter { margin: 0; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--accent); }
.checklist .done label { text-decoration: line-through; color: var(--ink-3); }
.report-body { font-size: 15px; line-height: 1.65; overflow-x: auto; }
.report-body table { border-collapse: collapse; font-size: 13px; margin: 12px 0; }
.report-body th, .report-body td { border: 1px solid var(--line-2); padding: 7px 10px; text-align: left; }
.report-body h1 { font-size: 24px; } .report-body h2 { font-size: 19px; margin-top: 22px; }
.report-list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.empty { text-align: center; padding: 48px 20px; color: var(--ink-2); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.error { color: var(--bad); font-size: 14px; min-height: 1em; margin: 0; }
select { font: inherit; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--ink); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(800px 400px at 50% 0%, #2a1d16 0%, var(--bg) 70%); }
.login-card { background: var(--card); border: 1px solid var(--line); width: min(380px, 100%); border-radius: 16px; padding: 28px; display: grid; gap: 10px; }
.login-card .brand { padding: 0 0 12px; }
.login-card label { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.login-card input { font: inherit; padding: 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); }

/* ---------- drawer, toast, scrim ---------- */
.drawer { border: 0; border-left: 1px solid var(--line); padding: 0; margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(560px, 100vw); background: var(--side); color: var(--ink); }
.drawer::backdrop { background: rgba(0,0,0,.55); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--side); }
#drawer-body { padding: 18px 22px 40px; }
#drawer-body h3 { margin-top: 24px; margin-bottom: 8px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 10px; font-weight: 700; opacity: 0; pointer-events: none; transition: .2s; z-index: 60; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 29; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) { .tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; }
  #menu { display: grid; }
  .sidebar { position: fixed; left: 0; top: var(--top-h); bottom: 0; width: 272px; z-index: 30; transform: translateX(-100%); transition: transform .2s; height: auto; }
  .sidebar.open { transform: none; }
  .with-filters { grid-template-columns: 1fr; }
  .filters { position: static; border-right: 0; padding-right: 0; display: block; }
  .filters .filter-group { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
  .filters .filter { flex: none; padding: 7px 12px; border: 1px solid var(--line-2); gap: 8px; }
  .filters .filter-label { margin: 10px 0 6px; }
  .reset { padding-top: 10px; }
}
@media (max-width: 640px) {
  .top-tagline, .clock { display: none; }
  .top-name { border-right: 0; padding-right: 0; }
  .view { padding: 20px 14px 60px; }
  h1 { font-size: 25px; }
  .panel { padding: 18px 14px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { min-height: 132px; padding: 16px 8px 12px; }
  .grid-pulse { grid-template-columns: 1fr 1fr; gap: 10px; }
  .grid-pulse .card { padding: 14px; }
  .stat .v { font-size: 24px; }
  .grid-cards { grid-template-columns: 1fr; }
  .head-actions .btn { padding: 9px 14px; font-size: 14px; }
}

.team-group + .team-group { margin-top: 30px; }
.admin-grid { display:grid; grid-template-columns:minmax(240px,320px) minmax(0,1fr); gap:16px; align-items:start; }
.admin-grid .card { min-width:0; }
.admin-grid h2 { font-size:19px; margin:0 0 14px; }
.admin-grid h3 { font-size:15px; margin:24px 0 10px; }
.admin-grid h4 { font-size:14px; margin:8px 0 0; }
.stack { display:grid; gap:10px; }
.stack input,.stack textarea,.chat-form textarea,.bot-picker { width:100%; font:inherit; padding:10px 12px; color:var(--ink); background:var(--bg); border:1px solid var(--line-2); border-radius:8px; }
.stack textarea,.chat-form textarea { resize:vertical; }
.stack input:focus,.stack textarea:focus,.chat-form textarea:focus { outline:1px solid var(--accent); }
.bot-picker { margin-bottom:18px; }
.field-label { display:block; color:var(--ink-2); font-size:13px; margin-bottom:6px; }
.member-pick { display:grid; grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); gap:8px; }
.check-row { display:flex; gap:8px; align-items:center; color:var(--ink-2); font-size:14px; }
.check-row input { width:auto; }
.skill-list { display:grid; gap:6px; margin-bottom:14px; max-height:320px; overflow:auto; }
.skill-row { display:flex; gap:10px; align-items:center; justify-content:space-between; border:1px solid var(--line); border-radius:8px; padding:9px 11px; }
.skill-row p { margin:3px 0 0; font-size:12px; overflow-wrap:anywhere; }
.chat-log { flex:1; height:min(54vh,540px); min-height:280px; overflow-y:auto; display:flex; flex-direction:column; gap:12px; padding:16px 8px; margin:14px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.chat-msg { max-width:min(760px,88%); border:1px solid var(--line-2); border-radius:12px; padding:12px 16px; background:var(--card-2); align-self:flex-start; }
.chat-msg.mine { align-self:flex-end; background:#2a211c; border-color:var(--accent-line); }
.chat-msg b { font-size:12.5px; color:var(--ink); }
.chat-msg p { margin:6px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.55; }
.chat-msg-head { display:flex; align-items:center; gap:10px; margin-bottom:4px; }
.chat-copy-btn { margin-left:auto; background:transparent; border:1px solid var(--line-2); color:var(--ink-3); font:600 11px var(--f-body); padding:2px 8px; border-radius:6px; cursor:pointer; }
.chat-copy-btn:hover { color:var(--ink); border-color:var(--ink-3); background:var(--hover); }
.chat-model-tag { display:inline-flex; align-items:center; gap:4px; background:#231b16; border:1px solid #4d3524; color:#ff9a6a; font-size:11px; font-weight:600; padding:1px 7px; border-radius:6px; }
.chip.model-chip { background:#241c17; border-color:#4d3524; color:#ff9a6a; font-weight:700; }
.chat-msg-body p:first-child { margin-top:4px; }
.chat-msg-body p:last-child { margin-bottom:0; }
.chat-msg-body pre { background:var(--bg); border:1px solid var(--line); border-radius:8px; padding:10px 12px; overflow-x:auto; font:13px var(--f-mono); margin:8px 0; }
.chat-msg-body code { font-family:var(--f-mono); font-size:13px; }
.chat-msg-body ul, .chat-msg-body ol { margin:6px 0; padding-left:20px; }
.chat-layout { display:grid; grid-template-columns:270px minmax(0,1fr); gap:18px; align-items:start; width:100%; }
.chat-sidebar { display:flex; flex-direction:column; gap:14px; min-width:0; width:270px; max-width:100%; overflow:hidden; }
.chat-side-card { padding:14px; min-width:0; width:100%; overflow:hidden; }
.chat-bot-list { display:flex; flex-direction:column; gap:4px; max-height:360px; overflow-y:auto; min-width:0; }
.chat-bot-item { display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:10px; text-decoration:none; color:var(--ink); border:1px solid transparent; min-width:0; }
.chat-bot-item:hover { background:var(--hover); }
.chat-bot-item.active { background:#2c211b; border-color:#3a2a20; }
.chat-bot-icon { width:34px; height:34px; border-radius:9px; display:grid; place-items:center; flex:none; }
.chat-bot-icon svg { width:18px; height:18px; }
.chat-bot-meta { display:grid; min-width:0; flex:1; }
.chat-bot-meta b { font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-bot-meta small { font-size:12px; color:var(--ink-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-thread-list { display:flex; flex-direction:column; gap:4px; max-height:190px; overflow-y:auto; min-width:0; }
.chat-thread-btn { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; min-width:0; padding:8px 10px; border-radius:8px; background:transparent; border:1px solid transparent; color:var(--ink-2); font:500 13px var(--f-body); cursor:pointer; text-align:left; overflow:hidden; }
.chat-thread-btn:hover { background:var(--hover); color:var(--ink); }
.chat-thread-btn.active { background:var(--card-2); border-color:var(--line-2); color:var(--ink); font-weight:700; }
.chat-thread-title { flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-main { display:flex; flex-direction:column; min-width:0; width:100%; overflow:visible; padding:20px 24px; position:relative; }
.chat-main.drag-over { outline:2px dashed var(--accent); background:#251d18; }
.chat-header { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.chat-header-left { display:flex; align-items:center; gap:12px; min-width:0; }
.chat-empty { margin:auto; text-align:center; padding:32px 16px; }
.chat-empty-icon { width:52px; height:52px; border-radius:14px; display:grid; place-items:center; margin:0 auto 12px; }
.chat-empty-icon svg { width:26px; height:26px; }
.chat-prompts { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; max-width:620px; margin:0 auto; }
.chat-prompt-chip { background:var(--card-2); border:1px solid var(--line-2); color:var(--ink); border-radius:10px; padding:9px 14px; font:500 13.5px var(--f-body); cursor:pointer; text-align:left; }
.chat-prompt-chip:hover { border-color:var(--accent-line); background:#2a211c; }
.chat-Prompts-bar { display:flex; gap:8px; overflow-x:auto; padding-bottom:8px; margin-bottom:6px; min-width:0; }
.chat-prompt-pill { flex:none; background:var(--card-2); border:1px solid var(--line-2); color:var(--ink-2); border-radius:999px; padding:6px 13px; font:500 12.5px var(--f-body); cursor:pointer; white-space:nowrap; }
.chat-prompt-pill:hover { color:var(--ink); border-color:var(--accent-line); background:#2a211c; }
.typing-dots { display:inline-flex; gap:4px; align-items:center; margin-right:6px; vertical-align:middle; }
.typing-dots i { width:6px; height:6px; border-radius:50%; background:var(--accent); display:inline-block; animation:tdot 1.2s infinite ease-in-out; }
.typing-dots i:nth-child(2) { animation-delay:.2s; }
.typing-dots i:nth-child(3) { animation-delay:.4s; }
@keyframes tdot { 0%,80%,100% { opacity:.25; transform:scale(.8); } 40% { opacity:1; transform:scale(1.1); } }
.chat-composer-wrap { display:flex; flex-direction:column; gap:8px; background:var(--card-2); border:1px solid var(--line-2); border-radius:12px; padding:10px 12px; position:relative; }
.chat-toolbar { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.chat-tool-btn { display:inline-flex; align-items:center; gap:6px; background:var(--bg); border:1px solid var(--line-2); color:var(--ink-2); border-radius:8px; padding:6px 11px; font:600 12.5px var(--f-body); cursor:pointer; transition:.15s; }
.chat-tool-btn:hover { color:var(--ink); border-color:var(--ink-3); background:var(--hover); }
.chat-tool-btn.active { background:#2e2119; border-color:var(--accent); color:var(--ink); }
.chat-tool-btn.ok { border-color:#264a34; color:#7ce29f; background:#17281e; }
.chat-tool-btn.warn { border-color:#5a371c; color:#f4b36c; background:#291d14; }
.chat-tool-count { background:var(--accent); color:#fff; border-radius:999px; padding:1px 6px; font-size:11px; font-weight:700; }
.chat-tool-select { display:inline-flex; align-items:center; gap:4px; background:var(--bg); border:1px solid var(--line-2); border-radius:8px; padding:2px 8px; margin-left:auto; }
.chat-tool-select select { border:0; background:transparent; padding:4px 4px; font:600 12px var(--f-body); color:var(--ink-2); outline:none; }
.chat-pop-anchor { position:relative; }
.chat-popover { position:absolute; bottom:calc(100% + 8px); left:0; width:min(360px, 84vw); max-height:360px; display:flex; flex-direction:column; background:var(--side); border:1px solid var(--line-2); border-radius:12px; box-shadow:0 16px 40px rgba(0,0,0,.65); z-index:45; padding:12px; }
.chat-popover-wide { width:min(520px, 88vw); }
.chat-popover[hidden] { display:none !important; }
.chat-pop-head { display:flex; flex-direction:column; gap:6px; padding-bottom:8px; border-bottom:1px solid var(--line); margin-bottom:8px; }
.chat-pop-head b { font-size:13px; color:var(--ink); }
.chat-pop-search { width:100%; font:inherit; font-size:12.5px; padding:6px 10px; border-radius:7px; border:1px solid var(--line-2); background:var(--bg); color:var(--ink); }
.chat-pop-list { overflow-y:auto; display:flex; flex-direction:column; gap:5px; max-height:260px; padding-right:2px; }
.chat-cap-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); gap:6px; }
.chat-cap-item { display:flex; flex-direction:column; gap:3px; text-align:left; background:var(--card-2); border:1px solid var(--line); border-radius:8px; padding:7px 10px; color:var(--ink); cursor:pointer; font:inherit; }
.chat-cap-item:hover { border-color:var(--line-2); background:var(--hover); }
.chat-cap-item.selected { background:#2e2119; border-color:var(--accent); }
.chat-cap-top { display:flex; align-items:center; justify-content:space-between; gap:6px; }
.chat-cap-top b { font-size:12.5px; }
.chat-cap-item small { font-size:11.5px; color:var(--ink-2); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.chat-staged-bar { display:flex; flex-wrap:wrap; gap:6px; padding:6px 8px; background:var(--bg); border:1px dashed var(--line-2); border-radius:8px; }
.chat-staged-bar[hidden] { display:none !important; }
.chat-staged-chip { display:inline-flex; align-items:center; gap:6px; background:var(--card-2); border:1px solid var(--line-2); border-radius:7px; padding:4px 8px; font-size:12px; color:var(--ink); }
.chat-staged-chip img { width:22px; height:22px; object-fit:cover; border-radius:4px; }
.chat-staged-chip.skill { border-color:#4c3525; background:#2a1f18; }
.chat-staged-chip.conn { border-color:#264552; background:#17272e; }
.chat-staged-chip.plug { border-color:#3b2e52; background:#211b2e; }
.chat-staged-chip button { background:transparent; border:0; color:var(--ink-2); font-size:14px; line-height:1; cursor:pointer; padding:0 2px; }
.chat-staged-chip button:hover { color:var(--bad); }
.chat-msg-attachments { display:flex; flex-direction:column; gap:8px; margin:6px 0 8px; }
.chat-att-images { display:flex; flex-wrap:wrap; gap:8px; }
.chat-att-thumb { display:flex; flex-direction:column; gap:4px; background:var(--bg); border:1px solid var(--line-2); border-radius:8px; padding:5px; text-decoration:none; color:var(--ink-2); max-width:180px; }
.chat-att-thumb img { width:100%; max-height:130px; object-fit:cover; border-radius:5px; }
.chat-att-thumb span { font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-att-docs { display:flex; flex-wrap:wrap; gap:6px; }
.chat-att-doc { display:inline-flex; align-items:center; gap:8px; background:var(--bg); border:1px solid var(--line-2); border-radius:8px; padding:6px 10px; text-decoration:none; color:var(--ink); font-size:12.5px; }
.chat-att-doc:hover { border-color:var(--accent); }
.chat-meta-chips { display:flex; flex-wrap:wrap; gap:5px; }
.chat-meta-badge { display:inline-flex; align-items:center; gap:4px; padding:2px 8px; border-radius:999px; font-size:11.5px; font-weight:600; background:var(--bg); border:1px solid var(--line-2); color:var(--ink-2); }
.chat-meta-badge.skill { border-color:#5a3b24; color:#f4a26c; }
.chat-meta-badge.conn { border-color:#264c5a; color:#7cd4f4; }
.chat-meta-badge.plug { border-color:#443266; color:#bfa5f8; }
.chat-meta-badge.warn { border-color:#5a371c; color:#f4b36c; }
.chat-ask-box { margin-top:12px; background:#231b16; border:1px solid var(--accent); border-radius:10px; padding:12px 14px; display:flex; flex-direction:column; gap:9px; }
.chat-ask-head { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.chat-ask-badge { display:inline-flex; align-items:center; gap:5px; background:var(--accent); color:#fff; font:700 11.5px var(--f-body); padding:3px 9px; border-radius:999px; }
.chat-ask-q { font-weight:700; color:var(--ink); font-size:14px; line-height:1.45; }
.chat-ask-opts { display:flex; flex-wrap:wrap; gap:7px; }
.chat-ask-opt { background:var(--card-2); border:1px solid var(--accent-line); color:var(--ink); border-radius:8px; padding:7px 12px; font:600 12.5px var(--f-body); cursor:pointer; text-align:left; transition:.15s; }
.chat-ask-opt:hover { background:var(--accent); color:#fff; border-color:var(--accent); }
.chat-ask-custom { display:flex; gap:8px; align-items:center; }
.chat-ask-input { flex:1; min-width:0; font:inherit; font-size:13px; padding:7px 11px; border-radius:8px; border:1px solid var(--line-2); background:var(--bg); color:var(--ink); }
.chat-pinned-ask { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; background:#281d16; border:1px solid var(--accent); border-radius:10px; padding:10px 14px; margin-bottom:8px; }
.chat-pinned-ask-left { display:flex; align-items:center; gap:10px; flex-wrap:wrap; min-width:0; }
.chat-pinned-ask-opts { display:flex; flex-wrap:wrap; gap:6px; }
.chat-form { display:flex; gap:10px; align-items:stretch; width:100%; }
.chat-form textarea { flex:1; min-width:0; min-height:54px; font:inherit; padding:12px 14px; color:var(--ink); background:var(--bg); border:1px solid var(--line-2); border-radius:10px; resize:vertical; }
.chat-form button { flex:none; padding:0 24px; }
@media (max-width:920px) { .chat-layout { grid-template-columns:1fr; } .chat-sidebar { width:100%; } }
@media (max-width:800px) { .admin-grid { grid-template-columns:1fr; } .chat-form { flex-direction:column; align-items:stretch; } }
.section > h2:not(.section-title) { margin-bottom: 12px; }
.app { background: linear-gradient(to right, var(--side) var(--side-w), var(--bg) var(--side-w)); }
.filters { min-width: 0; }
.filter-group { display: grid; gap: 2px; }
.filter { width: 100%; }
.search input { width: 100%; }
@media (max-width: 1000px) {
  .app { background: var(--bg); }
  .filters .filter-group { display: flex; }
  .filters .filter { width: auto; }
}

/* ---------- Polished Team Page ---------- */
.team-toolbar { display:flex; flex-direction:column; gap:14px; padding:16px 20px; margin-bottom:24px; background:var(--card); border:1px solid var(--line-2); border-radius:14px; }
.team-search-wrap { display:flex; align-items:center; gap:10px; background:var(--bg); border:1px solid var(--line-2); border-radius:10px; padding:9px 14px; color:var(--ink-3); }
.team-search-wrap:focus-within { border-color:var(--accent); }
.team-search-wrap input { flex:1; min-width:0; background:transparent; border:0; outline:0; color:var(--ink); font:14.5px var(--f-body); }
.team-filter-bar { display:flex; flex-wrap:wrap; gap:16px; align-items:center; justify-content:space-between; }
.team-filter-Cluster { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.team-filter-tag { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.14em; color:var(--ink-3); margin-right:4px; }
.team-filter-pill { display:inline-flex; align-items:center; gap:7px; padding:6px 12px; border-radius:999px; background:var(--card-2); border:1px solid var(--line-2); color:var(--ink-2); font:600 12.5px var(--f-body); cursor:pointer; transition:.15s; }
.team-filter-pill:hover { background:var(--hover); color:var(--ink); border-color:var(--ink-3); }
.team-filter-pill.on { background:#2e2119; border-color:var(--accent); color:#fff; }
.team-filter-pill b { font-size:11.5px; color:var(--ink-3); background:var(--bg); padding:1px 6px; border-radius:999px; }
.team-filter-pill.on b { background:var(--accent); color:#fff; }
.team-restore-banner { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:14px 18px; margin-bottom:18px; background:#231b16; border-color:var(--accent-line); }
.team-group-sec { margin-bottom:28px; }
.team-group-head { display:flex; align-items:center; gap:10px; margin-bottom:14px; padding-bottom:8px; border-bottom:1px solid var(--line); }
.team-group-head h3 { font-size:14px; font-weight:700; text-transform:uppercase; letter-spacing:.14em; color:var(--ink); margin:0; }
.team-group-count { font-size:12px; color:var(--ink-3); background:var(--card-2); border:1px solid var(--line); padding:2px 9px; border-radius:999px; }
.team-cards-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(330px, 1fr)); gap:16px; width:100%; }
.team-card { background:var(--card); border:1px solid var(--line-2); border-radius:14px; padding:20px; display:flex; flex-direction:column; gap:14px; min-width:0; overflow:hidden; cursor:pointer; transition:border-color .15s, transform .15s, background .15s; }
.team-card:hover { border-color:var(--accent-line); background:#22201f; transform:translateY(-1px); }
.team-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; min-width:0; }
.team-card-ident { display:flex; align-items:center; gap:12px; min-width:0; flex:1; }
.team-card-avatar { width:44px; height:44px; border-radius:12px; display:grid; place-items:center; flex:none; }
.team-card-avatar svg { width:22px; height:22px; }
.team-card-titles { display:flex; flex-direction:column; gap:2px; min-width:0; }
.team-card-titles b { font-size:18px; line-height:1.2; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.team-card-role { font-size:13px; font-weight:600; color:var(--ink-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.team-card-badges { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.team-card-desc { margin:0; color:var(--ink-2); font-size:14px; line-height:1.55; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:2.9em; }
.team-card-task { background:var(--bg); border:1px solid var(--line); border-radius:8px; padding:7px 10px; font-size:12.5px; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.team-card-stats { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:8px; background:var(--bg); border:1px solid var(--line); border-radius:10px; padding:10px 12px; }
.team-stat-box { display:flex; flex-direction:column; gap:2px; min-width:0; }
.team-stat-box small { font-size:11px; color:var(--ink-3); font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.team-stat-box b { font-size:13px; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.team-card-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding-top:4px; margin-top:auto; }
.team-rm-btn { margin-left:auto; border-color:rgba(229,87,75,.3); }
.team-rm-btn:hover { background:rgba(229,87,75,.12); border-color:var(--bad); }
@media (max-width: 640px) {
  .team-cards-grid { grid-template-columns: 1fr; }
  .team-card-stats { grid-template-columns: 1fr 1fr; }
}

/* ---------- Manage Bots Control Center ---------- */
.setup-main { display:flex; flex-direction:column; gap:16px; min-width:0; }
.setup-hero-card { background:var(--card); border:1px solid var(--line-2); border-radius:14px; padding:18px 20px; }
.setup-tabs-bar { display:flex; flex-wrap:wrap; gap:6px; background:var(--card); border:1px solid var(--line-2); border-radius:12px; padding:6px; }
.setup-tab-btn { display:inline-flex; align-items:center; gap:7px; padding:9px 14px; border-radius:9px; border:1px solid transparent; background:transparent; color:var(--ink-2); font:600 13px var(--f-body); cursor:pointer; transition:.15s; }
.setup-tab-btn:hover { background:var(--card-2); color:var(--ink); }
.setup-tab-btn.on, .setup-tab-btn.active { background:#2e2119; border-color:var(--accent); color:#fff; }
.setup-tab-btn small { font-size:11px; font-weight:700; padding:1px 7px; border-radius:999px; background:var(--bg); color:var(--ink-3); }
.setup-tab-btn.on small, .setup-tab-btn.active small { background:var(--accent); color:#fff; }
.setup-pane { display:flex; flex-direction:column; gap:16px; min-width:0; }
.setup-section-card { background:var(--card); border:1px solid var(--line-2); border-radius:14px; padding:20px; display:flex; flex-direction:column; gap:12px; min-width:0; }
.setup-sec-head { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.setup-sec-head h3, .setup-sec-head h4, .setup-section-card > h3 { margin:0; font-size:16px; font-weight:700; color:var(--ink); }
.setup-plugin-card { display:flex; flex-direction:column; justify-content:space-between; gap:6px; padding:12px 14px; border-radius:10px; background:var(--bg); border:1px solid var(--line); transition:.15s; }
.setup-plugin-card:hover { border-color:var(--line-2); background:var(--card-2); }
.setup-plugin-card.on { border-color:var(--accent-line); background:#231b16; }
.vault-secret-mask { background:var(--bg); border:1px solid var(--line); padding:2px 8px; border-radius:6px; font-size:12px; color:var(--ink-2); }

/* ---------- Live Dashboard (#today), Tasks (#tasks), Approvals (#approvals), Usage (#usage) ---------- */
.live-dot { width:9px; height:9px; border-radius:999px; background:var(--ink-3); display:inline-block; flex:none; }
.live-dot.on { background:var(--good); box-shadow:0 0 8px rgba(46,204,113,.65); }
.live-dot.hot { background:#ff4d4d; box-shadow:0 0 10px rgba(255,77,77,.85); animation:livePulse 1.2s infinite ease-in-out; }
@keyframes livePulse {
  0%, 100% { transform:scale(1); opacity:1; }
  50% { transform:scale(1.35); opacity:.65; }
}
.chip-on { background:#1e2b22; border-color:rgba(46,204,113,.45); color:#a3f7bf; }
.hot-text { color:var(--accent) !important; }
.kpi-link { text-decoration:none; color:inherit; transition:border-color .15s, transform .15s; cursor:pointer; }
.kpi-link:hover { border-color:var(--accent-line); transform:translateY(-1px); }

.live-ops-banner { margin-bottom:18px; background:linear-gradient(135deg, #271b16 0%, #1c1918 100%); border:1px solid var(--accent); box-shadow:0 8px 28px rgba(242,106,46,.15); }
.live-op-pill { background:var(--bg); border:1px solid var(--accent-line); border-radius:10px; padding:12px 14px; }

.live-dispatch-card { margin-bottom:20px; background:linear-gradient(180deg, #231d1a 0%, var(--card) 100%); border:1px solid var(--accent-line); }
.live-dispatch-form { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }

.live-agent-card { background:var(--card); border:1px solid var(--line-2); border-radius:14px; padding:18px; display:flex; flex-direction:column; gap:12px; min-width:0; transition:border-color .15s, box-shadow .15s; }
.live-agent-card:hover { border-color:var(--line-2); background:#21201f; }
.live-agent-card.is-working { border-color:var(--accent); background:linear-gradient(180deg, #281d17 0%, var(--card) 100%); box-shadow:0 0 22px rgba(242,106,46,.16); }

.live-activity-box { background:var(--bg); border:1px solid var(--line); border-radius:10px; padding:10px 12px; font-size:12.5px; display:flex; flex-direction:column; gap:5px; }
.live-activity-box.active { border-color:var(--accent-line); background:#1f1713; }
.live-act-label { display:inline-flex; align-items:center; gap:6px; color:var(--ink); font-size:12.5px; }
.live-output-snippet { color:var(--ink-2); font-size:12px; line-height:1.45; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; padding-top:4px; border-top:1px dashed var(--line); white-space:pre-wrap; }

.live-agent-tasks { display:flex; flex-direction:column; gap:5px; background:var(--bg); border:1px solid var(--line); border-radius:9px; padding:8px 10px; }
.live-mini-task { display:flex; align-items:center; gap:7px; font-size:12px; color:var(--ink-2); }

.live-stream-list { display:flex; flex-direction:column; gap:10px; max-height:620px; overflow-y:auto; padding-right:4px; }
.live-stream-item { background:var(--bg); border:1px solid var(--line); border-radius:11px; padding:12px 14px; transition:border-color .15s; }
.live-stream-item:hover { border-color:var(--line-2); }
.live-stream-item.running { border-color:var(--accent); background:#231914; }

/* ---------- Agent Tasks Kanban & Cards ---------- */
.task-kanban-grid { display:grid; grid-template-columns:repeat(4, minmax(280px, 1fr)); gap:14px; align-items:start; overflow-x:auto; }
.task-col { background:var(--card); border:1px solid var(--line-2); border-radius:14px; padding:14px; min-height:260px; }
.task-card { background:var(--bg); border:1px solid var(--line-2); border-radius:12px; padding:14px; display:flex; flex-direction:column; gap:8px; transition:border-color .15s; }
.task-card:hover { border-color:var(--accent-line); }
.task-card.is-running { border-color:var(--accent); background:#221813; box-shadow:0 0 16px rgba(242,106,46,.14); }
.task-card-title { margin:2px 0 0; font-size:14.5px; font-weight:700; color:var(--ink); line-height:1.35; }
.task-result-box { background:var(--card); border:1px solid rgba(46,204,113,.35); border-radius:9px; padding:9px 11px; margin-top:4px; }
.task-result-snippet { font-size:12px; color:var(--ink-2); line-height:1.45; white-space:pre-wrap; max-height:95px; overflow:hidden; }
.task-card-foot { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; margin-top:4px; padding-top:8px; border-top:1px solid var(--line); }
.task-status-sel { padding:4px 8px; font-size:12px; border-radius:7px; background:var(--card-2); border:1px solid var(--line-2); color:var(--ink); max-width:150px; }

/* ---------- Usage Analytics Chart ---------- */
.usage-chart-wrap { display:grid; grid-template-columns:repeat(auto-fit, minmax(38px, 1fr)); gap:8px; height:190px; align-items:end; padding:14px 10px 6px; background:var(--bg); border:1px solid var(--line); border-radius:12px; }
.usage-bar-col { display:flex; flex-direction:column; align-items:center; height:100%; justify-content:flex-end; gap:5px; min-width:0; }
.usage-bar-val { font-size:10px; color:var(--ink-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
.usage-bar-track { width:100%; max-width:34px; flex:1; background:var(--card-2); border-radius:6px; display:flex; align-items:flex-end; overflow:hidden; padding:2px; }
.usage-bar-fill { width:100%; background:var(--line-2); border-radius:4px; transition:height .25s ease; }
.usage-bar-fill.active { background:linear-gradient(180deg, #ff9a6a 0%, var(--accent) 100%); }
.usage-bar-date { font-size:10.5px; color:var(--ink-3); }

@media (max-width: 1100px) {
  .task-kanban-grid { grid-template-columns:repeat(2, minmax(280px, 1fr)); }
}
@media (max-width: 640px) {
  .task-kanban-grid { grid-template-columns:1fr; }
}
