/* HIPPO OPS — "control room" theme. Dark by default, light via [data-theme=light]. */
:root, [data-theme="dark"] {
  --bg: #070b12; --bg-2: #0b111b; --panel: #0f1622; --panel-2: #141d2b; --panel-3: #1a2536;
  --line: #1f2b3d; --line-2: #2a3a52;
  --text: #e6edf7; --text-2: #b4c0d3; --muted: #7d8aa0;
  --accent: #2ef2b0; --accent-ink: #04241a; --accent-dim: rgba(46, 242, 176, .14);
  --brand: #ff8a3d; --brand-dim: rgba(255, 138, 61, .14);
  --info: #5aa9ff; --info-dim: rgba(90, 169, 255, .14);
  --ok: #2ef2b0; --bad: #ff5d6c; --bad-dim: rgba(255, 93, 108, .14); --warn: #ffc24b; --warn-dim: rgba(255, 194, 75, .14);
  --s-draft: #8b97ab; --s-approved: #5aa9ff; --s-published: #2ef2b0; --s-failed: #ff5d6c; --s-publishing: #ffc24b; --s-rejected: #59657a;
  --c-claude: #ff8a3d; --c-hermes: #5aa9ff;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px rgba(0, 0, 0, .35);
  --glow: 0 0 0 1px rgba(46, 242, 176, .35), 0 0 22px rgba(46, 242, 176, .18);
  --grid: rgba(90, 169, 255, .045);
  --radius: 14px; --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #eef2f7; --bg-2: #e6ebf2; --panel: #ffffff; --panel-2: #f6f8fb; --panel-3: #edf1f6;
  --line: #dde3ec; --line-2: #c9d2df;
  --text: #0e1726; --text-2: #34425a; --muted: #6a778c;
  --accent: #00a874; --accent-ink: #ffffff; --accent-dim: rgba(0, 168, 116, .1);
  --brand: #e2621b; --brand-dim: rgba(226, 98, 27, .1);
  --info: #1f6fe0; --info-dim: rgba(31, 111, 224, .1);
  --ok: #00a874; --bad: #d92d3f; --bad-dim: rgba(217, 45, 63, .08); --warn: #b7791f; --warn-dim: rgba(183, 121, 31, .1);
  --s-draft: #6a778c; --s-approved: #1f6fe0; --s-published: #00a874; --s-failed: #d92d3f; --s-publishing: #b7791f; --s-rejected: #9aa5b6;
  --c-claude: #e2621b; --c-hermes: #1f6fe0;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 14px rgba(16, 24, 40, .06);
  --glow: 0 0 0 1px rgba(0, 168, 116, .45), 0 0 18px rgba(0, 168, 116, .15);
  --grid: rgba(31, 111, 224, .04);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 14.5px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text);
  background: var(--bg);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px; background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
code, .code, pre { font-family: var(--mono); font-size: .92em; }
code { background: var(--panel-3); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; }
::selection { background: var(--accent-dim); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 10px;
  background: color-mix(in srgb, var(--bg-2) 92%, transparent); border-right: 1px solid var(--line);
  padding: 16px 12px; backdrop-filter: blur(8px); z-index: 30;
}
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; padding: 4px 8px; }
.logo-mark { color: var(--accent); font-size: 20px; text-shadow: 0 0 12px var(--accent); }
.logo-txt { font-weight: 800; letter-spacing: .14em; font-size: 15px; } .logo-txt b { color: var(--brand); font-weight: 800; margin-left: 3px; }
.livepill {
  display: flex; align-items: center; gap: 8px; margin: 2px 4px 6px; padding: 7px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); text-decoration: none; font-size: 12px; color: var(--muted); font-weight: 600;
}
.livepill i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.livepill.busy { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--glow); }
.livepill.busy i, .livepill.hermes i { background: currentColor; animation: pulse 1.2s infinite; box-shadow: 0 0 10px currentColor; }
.livepill.hermes { color: var(--info); border-color: color-mix(in srgb, var(--info) 45%, var(--line)); }
.livepill.err { color: var(--bad); }
@keyframes pulse { 50% { opacity: .35; } }
.side nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav-g { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 14px 10px 6px; font-weight: 700; }
.nav-i {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-decoration: none;
  color: var(--text-2); font-weight: 500; border: 1px solid transparent; transition: background .15s, color .15s;
}
.nav-i svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; opacity: .85; }
.nav-i:hover { background: var(--panel-2); color: var(--text); }
.nav-i.on { background: var(--accent-dim); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.nav-i.on svg { opacity: 1; }
.side-foot { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.theme-btn { all: unset; cursor: pointer; padding: 7px 10px; border-radius: 10px; color: var(--text-2); font-size: 13px; }
.theme-btn:hover { background: var(--panel-2); }
.who { display: flex; flex-direction: column; padding: 0 10px; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.who small { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.main-wrap { min-width: 0; }
.topbar { display: none; }
main { max-width: 1240px; margin: 0 auto; padding: 26px 28px 60px; }
.scrim { display: none; }

/* ---------- type ---------- */
h1 { font-size: 24px; font-weight: 800; letter-spacing: -.01em; margin: 4px 0 18px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
h1 small { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); margin: 0 0 12px; font-weight: 700; }
h2 small { text-transform: none; letter-spacing: 0; }
h3 { font-size: 13px; margin: 6px 0; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .small p { margin: 4px 0; }
.back { display: inline-flex; gap: 6px; margin-bottom: 6px; color: var(--muted); text-decoration: none; font-size: 13px; }
.back:hover { color: var(--accent); }

/* ---------- surfaces ---------- */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card.alert { border-color: color-mix(in srgb, var(--bad) 55%, var(--line)); background: linear-gradient(var(--bad-dim), var(--bad-dim)), var(--panel); }
.card.hint { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); background: linear-gradient(var(--warn-dim), var(--warn-dim)), var(--panel); }
.card.hint ul { margin: 0; padding-left: 18px; } .card.hint li { margin: 4px 0; }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat {
  position: relative; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; text-decoration: none; box-shadow: var(--shadow); transition: transform .15s, border-color .15s;
}
.stat::after { content: ""; position: absolute; inset: auto -20% -60% auto; width: 120px; height: 120px; border-radius: 50%; background: var(--accent-dim); filter: blur(10px); }
a.stat:hover { transform: translateY(-2px); border-color: var(--line-2); }
.stat b { display: block; font-size: 32px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat span { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stat small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.stat.alert b { color: var(--bad); } .stat.alert::after { background: var(--bad-dim); }
.stat.k-brand::after { background: var(--brand-dim); } .stat.k-info::after { background: var(--info-dim); }

/* rows / lists */
.row { display: flex; gap: 14px; align-items: center; padding: 11px 8px; border-top: 1px solid var(--line); text-decoration: none; border-radius: 8px; transition: background .12s; }
.card > .row:first-of-type, .card h2 + .row { border-top: 0; }
.row:hover { background: var(--panel-2); }
.r-when { width: 96px; flex: none; font-family: var(--mono); color: var(--muted); font-size: 12.5px; }
.r-main { flex: 1; min-width: 0; } .r-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.r-main small { color: var(--muted); font-size: 12.5px; }
.row-wrap .fb { display: inline-block; margin: 0 0 8px 118px; font-size: 13px; color: var(--info); }
.err { color: var(--bad); font-size: 13px; margin: 0 0 8px 118px; }
.more { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--accent); text-decoration: none; }

/* badges */
.badge { flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px;
  color: var(--s-draft); background: color-mix(in srgb, currentColor 14%, transparent); border: 1px solid color-mix(in srgb, currentColor 30%, transparent); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-approved { color: var(--s-approved); } .s-published { color: var(--s-published); } .s-failed { color: var(--s-failed); }
.s-publishing { color: var(--s-publishing); } .s-rejected { color: var(--s-rejected); } .s-draft { color: var(--s-draft); }
.sys { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; padding: 1px 7px; border-radius: 6px; margin-right: 4px;
  color: #fff; background: var(--c-claude); }
.sys-claude { background: var(--c-claude); } .sys-hermes { background: var(--c-hermes); }

/* flash */
.flash { padding: 11px 14px; border-radius: 12px; margin-bottom: 16px; border: 1px solid; font-weight: 500; }
.flash.ok { border-color: color-mix(in srgb, var(--ok) 50%, transparent); color: var(--ok); background: var(--accent-dim); }
.flash.bad { border-color: color-mix(in srgb, var(--bad) 50%, transparent); color: var(--bad); background: var(--bad-dim); }
.flash ul { margin: 6px 0 0; padding-left: 18px; }

/* forms / buttons */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
input, select, textarea, button {
  font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
textarea { width: 100%; font-family: var(--mono); font-size: 13.5px; }
.filters input[type=search] { flex: 1; min-width: 180px; }
button { cursor: pointer; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; padding: 8px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--panel); cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--text-2); transition: all .15s;
}
.btn:hover { border-color: var(--line-2); color: var(--text); background: var(--panel-2); }
.btn.ok { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 0 18px var(--accent-dim); }
.btn.ok:hover { filter: brightness(1.08); }
.btn.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.tabs .btn.on { background: var(--accent-dim); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 14px 0; } .actions form { margin: 0; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.meta > span:not(.badge) { padding: 2px 9px; border: 1px solid var(--line); border-radius: 99px; background: var(--panel); }
.edit label { display: block; margin-bottom: 14px; font-size: 13px; color: var(--muted); font-weight: 500; }
.edit label input, .edit label select, .edit label textarea { display: block; width: 100%; margin-top: 5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* post */
.post-body { line-height: 1.7; }
.post-body h2 { font-size: 12px; margin-top: 22px; color: var(--muted); }
.post-body blockquote { margin: 8px 0; padding: 4px 14px; border-left: 3px solid var(--accent); color: var(--text-2); background: var(--panel-2); border-radius: 0 8px 8px 0; }
.post-body table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.post-body td, .post-body th { border: 1px solid var(--line); padding: 7px; vertical-align: top; }
.post-body a { color: var(--info); }
.kv { font-size: 13px; border-collapse: collapse; } .kv th { text-align: left; color: var(--muted); padding: 4px 14px 4px 0; font-weight: 500; vertical-align: top; }
.kv td { word-break: break-all; font-family: var(--mono); font-size: 12.5px; }
.post-image img { max-width: 100%; max-height: 440px; border-radius: 12px; display: block; margin-bottom: 8px; border: 1px solid var(--line); }
.ai-cost summary { cursor: pointer; list-style: none; } .ai-cost summary::-webkit-details-marker { display: none; }
.ai-cost summary::before { content: "▸ "; color: var(--muted); } .ai-cost[open] summary::before { content: "▾ "; }
.ai-cost[open] summary { margin-bottom: 10px; }

/* tables */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 8px; border-bottom: 1px solid var(--line-2); white-space: nowrap; cursor: pointer; user-select: none; }
.tbl th:hover { color: var(--text); }
.tbl th[data-dir="asc"]::after { content: " ▲"; font-size: 9px; color: var(--accent); }
.tbl th[data-dir="desc"]::after { content: " ▼"; font-size: 9px; color: var(--accent); }
.tbl td { padding: 9px 8px; border-top: 1px solid var(--line); white-space: nowrap; }
.tbl tbody tr:hover { background: var(--panel-2); }
.tbl .n { text-align: right; font-family: var(--mono); font-size: 12.5px; }
.tbl td.wrap { white-space: normal; min-width: 200px; }
.tbl a { color: var(--info); text-decoration: none; }
.bar-col { width: 22%; min-width: 130px; } .bar-col small { color: var(--muted); font-size: 11.5px; }
.ubar { display: inline-block; width: calc(100% - 40px); height: 8px; background: var(--panel-3); border-radius: 99px; overflow: hidden; vertical-align: middle; }
.ubar i { display: block; height: 100%; border-radius: 99px; box-shadow: 0 0 10px currentColor; }

/* calendar */
.cal-head { display: flex; align-items: center; gap: 12px; }
.nav-btn { text-decoration: none; padding: 4px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.nav-btn:hover { border-color: var(--accent); color: var(--accent); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dow { text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 4px; font-weight: 600; }
.day { min-height: 104px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px; overflow: hidden; }
.day.other { opacity: .35; } .day.today { border-color: var(--accent); box-shadow: var(--glow); }
.day .num { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.chip { display: block; font-size: 11px; color: #fff; border-radius: 6px; padding: 2px 6px; margin-top: 3px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }

/* media */
.crumbs { margin: 0 0 12px; font-size: 14px; } .crumbs a { text-decoration: none; color: var(--info); }
.folders { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.folder { padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; background: var(--panel-2); font-weight: 500; }
.folder:hover { border-color: var(--accent); color: var(--accent); }
.newfolder { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; } .newfolder input { min-width: 180px; }
.upload { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0; }
.grid-img { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.card.img { padding: 8px; margin: 0; } .card.img img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.card.img figcaption b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 6px; }
.card.img figcaption small { color: var(--muted); font-size: 12px; } .card.img .actions { margin: 6px 0 0; }

/* A→Z flow map */
.flowmap { display: flex; flex-direction: column; align-items: stretch; }
.fb-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: stretch; }
.fb-arrow { text-align: center; color: var(--accent); font-size: 18px; line-height: 1; margin: 6px 0; text-shadow: 0 0 8px var(--accent); }
.fb-side-arrow { align-self: center; color: var(--accent); font-size: 22px; }
.fb-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.fb-card header { display: flex; align-items: center; gap: 10px; }
.fb-key { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: var(--accent-ink); background: var(--accent); box-shadow: 0 0 16px var(--accent-dim); }
.fb-head { flex: 1; min-width: 0; } .fb-head b { display: block; } .fb-head small { color: var(--muted); font-size: 12px; }
.fb-pct { font-weight: 800; font-family: var(--mono); color: var(--accent); }
.fb-bar { height: 6px; background: var(--panel-3); border-radius: 99px; margin: 12px 0 8px; overflow: hidden; }
.fb-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--info)); border-radius: 99px; }
.fb-card ul { list-style: none; margin: 0; padding: 0; }
.fb-card li { display: flex; gap: 8px; padding: 7px 0; border-top: 1px dashed var(--line); font-size: 13.5px; }
.fb-card li:first-child { border-top: 0; }
.fb-card li small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; word-break: break-word; }
.fb-card li code, .fb-orig { font-size: 12px; }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; background: var(--muted); display: inline-block; }
.st-done .dot { background: var(--ok); box-shadow: 0 0 8px var(--ok); } .st-part .dot { background: var(--warn); } .st-todo .dot { background: var(--line-2); } .st-drop .dot { background: var(--bad); }
.st-drop .nm { text-decoration: line-through; color: var(--muted); }
li.extra em, .extra-l em { font-style: normal; font-size: 10.5px; padding: 0 6px; border-radius: 5px; background: var(--info-dim); color: var(--info); margin-right: 4px; font-weight: 700; }
.fb-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.fb-legend span { display: inline-flex; align-items: center; gap: 6px; } .fb-legend .dot { margin-top: 0; }
.fb-orig { white-space: pre; overflow-x: auto; line-height: 1.35; margin: 10px 0 0; }

/* usage */
.u-stats { grid-template-columns: repeat(2, 1fr); }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.drow { display: flex; align-items: center; gap: 12px; padding: 5px 0; font-size: 13.5px; }
.dday { width: 48px; flex: none; color: var(--muted); font-family: var(--mono); font-size: 12.5px; }
.dbar { flex: 1; display: flex; height: 14px; background: var(--panel-3); border-radius: 6px; overflow: hidden; }
.dbar i { display: block; height: 100%; }
.dval { width: 130px; flex: none; text-align: right; font-family: var(--mono); font-size: 12.5px; }
.u-row .r-when { width: 104px; } .u-cost { flex: none; font-family: var(--mono); color: var(--brand); }

/* agents */
.flowline { font-size: 14px; line-height: 1.8; }
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(470px, 1fr)); gap: 16px; }
.agent-card { margin: 0; display: flex; flex-direction: column; }
.agent-card header { display: flex; align-items: center; gap: 10px; }
.ag-name { font-size: 17px; font-weight: 700; }
.ag-model { margin-left: auto; color: var(--info); }
.ag-desc { color: var(--text-2); font-size: 13.5px; margin: 8px 0 10px; }
.ag-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ag-stats b { font-family: var(--mono); color: var(--accent); }
.ag-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; flex: 1; }
.ag-cols h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.files { list-style: none; margin: 0; padding: 0; font-size: 12.5px; font-family: var(--mono); }
.files li { padding: 3px 0; word-break: break-all; } .files a { color: var(--info); text-decoration: none; } .files a:hover { text-decoration: underline; }
.cnt { display: inline-block; min-width: 24px; margin-right: 6px; text-align: center; font-size: 11px; border-radius: 5px; background: var(--accent-dim); color: var(--accent); font-weight: 700; }
.agent-card footer { margin: 12px 0 0; }
.run-row .r-when { width: 104px; }
.prewrap { white-space: pre-wrap; word-break: break-word; margin: 0; font-size: 14px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: grid; grid-template-columns: 72px 118px 1fr; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.timeline li:first-child { border-top: 0; }
.timeline .t { color: var(--muted); font-family: var(--mono); font-size: 12px; } .timeline .k { white-space: nowrap; font-weight: 600; color: var(--text-2); }
.timeline .d { word-break: break-word; font-family: var(--mono); font-size: 12.5px; } .timeline .d a { color: var(--info); }
.timeline .res { display: block; color: var(--muted); margin-top: 2px; font-family: Inter, sans-serif; }
.st-write .k, .st-edit .k { color: var(--accent); } .st-agent .k { color: var(--brand); }
.final { margin-top: 12px; padding: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; }
.final b { display: block; margin-bottom: 4px; font-size: 12px; color: var(--muted); }
pre.code { white-space: pre-wrap; word-break: break-word; font-size: 12.5px; margin: 0; }

/* agent map (top of /agents) */
.amap { display: flex; align-items: center; gap: 0; overflow-x: auto; padding: 6px 2px 10px; }
.amap .node { flex: none; min-width: 150px; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); text-align: center; }
.amap .node b { display: block; font-size: 14px; } .amap .node small { color: var(--muted); font-size: 11.5px; }
.amap .node .v { display: block; font-family: var(--mono); color: var(--accent); font-size: 12px; margin-top: 4px; }
.amap .node.h { border-color: color-mix(in srgb, var(--c-hermes) 50%, var(--line)); } .amap .node.c { border-color: color-mix(in srgb, var(--c-claude) 50%, var(--line)); }
.amap .wire { flex: none; width: 46px; height: 2px; background: linear-gradient(90deg, var(--line-2), var(--accent)); position: relative; }
.amap .wire::after { content: ""; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left-color: var(--accent); }
.amap .fan { display: flex; flex-direction: column; gap: 8px; }

/* ---------- LIVE board ---------- */
.live-status {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--radius); margin-bottom: 18px;
  border: 1px solid var(--line); background: var(--panel); font-size: 14px; font-weight: 600; box-shadow: var(--shadow); overflow: hidden;
}
.live-status .ls-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); flex: none; }
.live-status .ls-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-status .ls-time { font-family: var(--mono); color: var(--muted); font-weight: 500; font-size: 12.5px; }
.live-status.busy { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); box-shadow: var(--glow); color: var(--accent); }
.live-status.busy .ls-dot, .live-status.hermes .ls-dot { background: currentColor; animation: pulse 1.2s infinite; box-shadow: 0 0 12px currentColor; }
.live-status.hermes { color: var(--info); border-color: color-mix(in srgb, var(--info) 50%, var(--line)); }
.live-status.err { color: var(--bad); }
.lv-chain { padding: 16px 18px 18px; }
.lv-chain.running { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--glow); }
.lv-chain-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.lv-time { font-family: var(--mono); font-size: 12.5px; color: var(--muted); padding: 3px 8px; border: 1px solid var(--line); border-radius: 8px; }
.lv-label { flex: 1; min-width: 220px; font-size: 15px; }
.lv-meta { font-size: 12.5px; color: var(--muted); font-family: var(--mono); }
.lv-lane { display: flex; gap: 0; align-items: stretch; overflow-x: auto; padding: 4px 2px 6px; }
.lv-wire { flex: none; width: 54px; align-self: center; height: 2px; position: relative; background: var(--line-2); }
.lv-wire::after { content: ""; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left-color: var(--line-2); }
.lv-wire.on { background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 14px); background-size: 28px 2px; animation: flow .7s linear infinite; }
.lv-wire.on::after { border-left-color: var(--accent); }
@keyframes flow { to { background-position: 28px 0; } }
.lv-card { flex: 0 0 330px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--panel-2); display: flex; flex-direction: column; gap: 8px; }
.lv-card.run { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); box-shadow: var(--glow); background: linear-gradient(var(--accent-dim), transparent 60%), var(--panel-2); }
.lv-head { display: flex; align-items: center; gap: 10px; }
.lv-av { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; flex: none; background: var(--c-claude); }
.lv-av.h { background: var(--c-hermes); } .lv-av.sub { background: color-mix(in srgb, var(--c-claude) 70%, #000); }
.lv-name { flex: 1; min-width: 0; } .lv-name b { display: block; font-size: 14.5px; } .lv-name small { display: block; color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; padding: 3px 9px; border-radius: 99px; background: var(--panel-3); color: var(--muted); white-space: nowrap; }
.pill.run { background: var(--accent); color: var(--accent-ink); animation: pulse 1.4s infinite; } .pill.done { background: var(--info-dim); color: var(--info); }
.lv-now { font-size: 12.5px; padding: 7px 9px; border-radius: 8px; background: var(--panel); border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--line)); color: var(--text); word-break: break-word; }
.lv-now b { color: var(--accent); margin-right: 4px; }
.lv-prog { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.lv-prog .bar { flex: 1; height: 4px; background: var(--panel-3); border-radius: 99px; overflow: hidden; }
.lv-prog .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--info)); }
.lv-warn { font-size: 12px; color: var(--warn); }
.lv-steps { list-style: none; margin: 0; padding: 0; font-size: 12px; flex: 1; }
.lv-steps li { display: grid; grid-template-columns: 58px 84px 1fr; gap: 6px; padding: 4px 0; border-top: 1px solid var(--line); }
.lv-steps li:first-child { border-top: 0; }
.lv-steps li.more { display: block; color: var(--muted); font-style: italic; }
.lv-steps li.now { background: var(--accent-dim); border-radius: 6px; }
.lv-steps .t { color: var(--muted); font-family: var(--mono); font-size: 11px; } .lv-steps .k { white-space: nowrap; font-weight: 600; color: var(--text-2); }
.lv-steps .d { word-break: break-word; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; font-family: var(--mono); font-size: 11.5px; }
.lv-steps .res { display: block; color: var(--muted); font-family: Inter, sans-serif; }
.lv-steps .k-write .k, .lv-steps .k-edit .k { color: var(--accent); } .lv-steps .k-agent .k { color: var(--brand); }
.lv-final { font-size: 12.5px; padding: 8px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; max-height: 7em; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.lv-note { align-self: center; font-size: 13px; padding: 0 12px; }
.lv-empty { text-align: center; padding: 40px 10px; color: var(--muted); }
.lv-empty .radar { width: 70px; height: 70px; margin: 0 auto 12px; border-radius: 50%; border: 2px solid var(--line-2); position: relative; }
.lv-empty .radar::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 2px solid var(--accent); opacity: .5; animation: ping 2s infinite; }
@keyframes ping { 0% { transform: scale(.4); opacity: .8; } 100% { transform: scale(1.3); opacity: 0; } }

/* dashboard live widget */
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.mini-live { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.mini-live .ls-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); flex: none; }
.mini-live.busy .ls-dot { background: var(--accent); animation: pulse 1.2s infinite; box-shadow: 0 0 12px var(--accent); }

.mobile-only { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); background: var(--bg-2); }
  .side.open { transform: none; }
  .scrim.on { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 20; }
  .topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 15; padding: 10px 16px; background: color-mix(in srgb, var(--bg-2) 92%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
  .menu-btn { font-size: 18px; padding: 4px 10px; }
  .top-clock { margin-left: auto; font-family: var(--mono); color: var(--muted); font-size: 13px; }
  main { padding: 18px 16px 50px; }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); } .u-stats { grid-template-columns: 1fr; }
  .desktop-only { display: none; } .mobile-only { display: block; }
  .grid2 { grid-template-columns: 1fr; }
  .fb-row { grid-template-columns: 1fr; } .fb-side-arrow { justify-self: center; transform: rotate(90deg); }
  .r-when { width: 74px; } .row-wrap .fb, .err { margin-left: 88px; }
  .agent-grid { grid-template-columns: 1fr; } .ag-cols { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 60px 1fr; } .timeline .d { grid-column: 1 / -1; }
  .lv-card { flex-basis: 84vw; } .lv-wire { width: 28px; }
  .dval { width: 100px; } .stat b { font-size: 26px; }
  h1 { font-size: 21px; }
}
/* settings */
.set-row { display: grid; grid-template-columns: 200px 1fr; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.set-row:first-of-type { border-top: 0; }
.set-label { font-weight: 600; font-size: 13.5px; } .set-label small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.daypick { display: flex; flex-wrap: wrap; gap: 8px; }
.chk { display: inline-flex !important; align-items: center; gap: 0; margin: 0 !important; cursor: pointer; }
.chk input { position: absolute; opacity: 0; width: 0; height: 0; }
.chk span { padding: 7px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); font-weight: 600; font-size: 13px; color: var(--text-2); transition: all .15s; }
.chk input:checked + span { background: var(--accent-dim); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.chk input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-dim); }
.mixgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mixbox { display: flex !important; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); margin: 0 !important; color: var(--text) !important; font-weight: 600; }
.mixin { display: flex; align-items: center; gap: 6px; } .mixin input { width: 100% !important; font-family: var(--mono); font-size: 18px; margin: 0 !important; }
.mixbar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--panel-3); margin: 14px 0 6px; }
.mixbar i { display: block; height: 100%; transition: width .2s; }
.autojob { display: grid; grid-template-columns: 1fr 90px 120px auto; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.autojob:first-of-type { border-top: 0; } .aj-main b { display: block; } .aj-main small { font-size: 12px; }
details.card summary { cursor: pointer; }
@media (max-width: 720px) { .set-row { grid-template-columns: 1fr; gap: 6px; } .mixgrid { grid-template-columns: 1fr; } .autojob { grid-template-columns: 1fr 1fr; } .aj-main { grid-column: 1 / -1; } }
/* fix: grid/flex children must be allowed to shrink, else long nowrap titles blow the layout */
.dash-grid > *, .stats > *, .agent-grid > *, .ag-cols > *, .grid2 > *, .mixgrid > * { min-width: 0; }
.dash-grid .card { overflow: hidden; }
.mini-live { min-width: 0; } .mini-live .r-main { min-width: 0; }
.mini-live .r-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row { min-width: 0; } .r-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
main { min-width: 0; overflow-x: clip; }
/* pager (server + client) */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.pg-info { font-family: var(--mono); }
.pg-per, .pg-nav { display: inline-flex; align-items: center; gap: 4px; }
.pg-nav { margin-left: auto; }
.pg-btn { display: inline-block; padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 12.5px; cursor: pointer; }
.pg-btn:hover { border-color: var(--line-2); color: var(--text); }
.pg-btn.on { background: var(--accent-dim); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.pg-btn.off { opacity: .4; cursor: default; }
.pg-cur { padding: 0 6px; font-family: var(--mono); }
.tbl-pager { margin: 10px 0 0; }
/* config proposals */
.pend { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 11px; text-align: center; }
details.prop summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; list-style: none; }
details.prop summary::-webkit-details-marker { display: none; }
details.prop summary small { flex-basis: 100%; }
.prop.st-pending { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); }
.prop-pending { color: var(--brand); } .prop-applied { color: var(--ok); } .prop-rejected, .prop-undone { color: var(--muted); }
pre.diff { margin: 12px 0 0; padding: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; font-size: 12.5px; white-space: pre-wrap; word-break: break-word; max-height: 420px; overflow: auto; }
pre.diff .add { color: var(--ok); background: var(--accent-dim); display: inline-block; width: 100%; }
pre.diff .del { color: var(--bad); background: var(--bad-dim); display: inline-block; width: 100%; }
pre.diff .hunk { color: var(--info); }
/* guides */
.guide-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.guide-card { margin: 0; text-decoration: none; display: flex; flex-direction: column; gap: 4px; transition: border-color .15s; }
.guide-card small { color: var(--muted); font-size: 12.5px; } .guide-card:hover { border-color: var(--line-2); }
.guide-card.on { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); box-shadow: var(--glow); }
.guide-wrap { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; }
.guide-wrap > * { min-width: 0; }
.guide-toc { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; font-size: 13px; }
.guide-toc ul { list-style: none; margin: 0; padding-left: 10px; } .guide-toc > div > ul { padding-left: 0; }
.guide-toc li { margin: 4px 0; } .guide-toc a { text-decoration: none; color: var(--text-2); } .guide-toc a:hover { color: var(--accent); }
.guide-body h1 { font-size: 22px; } .guide-body h2 { font-size: 15px; margin-top: 26px; color: var(--accent); text-transform: none; letter-spacing: 0; }
.guide-body h3 { font-size: 14px; margin-top: 18px; } .guide-body pre { white-space: pre-wrap; background: var(--bg-2); padding: 10px; border-radius: 8px; border: 1px solid var(--line); }
.guide-body table { font-size: 13px; } .guide-body hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
@media (max-width: 960px) { .guide-cards { grid-template-columns: repeat(2, 1fr); } .guide-wrap { grid-template-columns: 1fr; } .guide-toc { position: static; max-height: none; } }
/* harness editor */
.hz-row .hz-meta { flex: none; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.locked-block { margin: 6px 0 12px; padding: 12px; border: 1px dashed color-mix(in srgb, var(--warn) 60%, var(--line)); border-radius: 10px; background: var(--warn-dim); }
.locked-block b { font-size: 13px; } .locked-block pre { white-space: pre-wrap; font-size: 12.5px; margin: 8px 0 0; }


/* quota strip (top of content, every page) */
.qstrip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: -8px 0 16px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel); text-decoration: none; font-size: 12.5px; box-shadow: var(--shadow); }
.qstrip:hover { border-color: var(--line-2); }
.qtitle { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.qchip { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); white-space: nowrap; }
.qchip i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.qchip b { font-family: var(--mono); color: var(--text); }
.qchip.ok i { background: var(--accent); } .qchip.warn i { background: var(--warn); } .qchip.bad i { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.qchip.warn b { color: var(--warn); } .qchip.bad b { color: var(--bad); }
.qchip.openai i { background: var(--info); }
.qmini { width: 46px; height: 4px; border-radius: 99px; background: var(--panel-3); overflow: hidden; display: inline-block; }
.qmini em { display: block; height: 100%; border-radius: 99px; background: currentColor; }
.qchip.ok .qmini em { background: var(--accent); } .qchip.warn .qmini em { background: var(--warn); } .qchip.bad .qmini em { background: var(--bad); }
.qreset, .qrem { color: var(--muted); font-size: 11.5px; }
.qstrip .qchip.openai { margin-left: auto; }
@media (max-width: 720px) { .qstrip { margin-top: 0; gap: 6px 10px; } .qmini, .qreset { display: none; } .qstrip .qchip.openai { margin-left: 0; } }

/* Bàn làm việc — "Việc cần bạn" */
.card.todo { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.todo-row { display: flex; align-items: center; gap: 10px; }
.todo-row > .row { flex: 1; min-width: 0; }
.todo-row form { margin: 0; flex: none; }
/* Bàn làm việc — dải tuần */
.wk-wrap { overflow-x: auto; }
.wk { display: grid; grid-template-columns: repeat(7, minmax(96px, 1fr)); gap: 8px; min-width: 700px; }
.wk-day { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--panel-2); min-height: 84px; display: flex; flex-direction: column; gap: 4px; }
.wk-day.today { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: linear-gradient(var(--accent-dim), var(--accent-dim)), var(--panel-2); }
.wk-h { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.wk-day.today .wk-h { color: var(--accent); }
.wk-p { font-size: 12px; padding: 3px 6px; border-radius: 6px; text-decoration: none; color: var(--s-draft); background: color-mix(in srgb, currentColor 14%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-p.st-draft { color: var(--warn); } .wk-p.st-approved { color: var(--s-approved); } .wk-p.st-published { color: var(--s-published); } .wk-p.st-failed { color: var(--s-failed); }
/* Cài đặt nhanh (/setup) */
.setup { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.setup-steps { flex: 1 1 240px; max-width: 290px; padding: 14px; }
.setup-main { flex: 999 1 520px; min-width: 0; max-width: 820px; }
.setup-prog { height: 6px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.setup-prog span { display: block; height: 100%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.setup-step { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--text-2); border: 1px solid transparent; min-height: 48px; }
.setup-step:hover { background: var(--panel-2); }
.setup-step i { font-style: normal; flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--panel-3); color: var(--muted); display: flex; align-items: center; justify-content: center; font: 600 12px var(--mono); }
.setup-step b { display: block; font-size: 14px; font-weight: 600; } .setup-step small { color: var(--muted); font-size: 12px; }
.setup-step.done i { background: var(--accent); color: var(--accent-ink); }
.setup-step.on { background: var(--accent-dim); border-color: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--accent); }
.setup-step.on i { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); }
.setup-q { font-size: 26px; letter-spacing: -.02em; margin: 6px 0 4px; }
.chips { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { font-weight: 600; font-size: 13.5px; color: var(--text-2); margin-bottom: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text-2); font-weight: 600; cursor: pointer; }
.chip.day span { width: 50px; justify-content: center; padding: 0; font-family: var(--mono); }
.chip input:checked + span { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-dim); color: var(--accent); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.voices { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.voice { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.voice input { margin-top: 4px; accent-color: var(--accent); }
.voice q { display: block; margin-top: 8px; padding: 10px 12px; border-radius: 8px; background: var(--panel-2); color: var(--text-2); quotes: "“" "”"; }
.voice:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--glow); }
.conn { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.conn > div { flex: 1 1 260px; } .conn small { display: block; }
.card.conn { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.setup-hint { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
/* thanh bên: doanh nghiệp đang quản lý */
.logo-mark svg { display: block; filter: drop-shadow(0 0 6px var(--accent)); }
.logo-txt { letter-spacing: .02em; text-transform: none; } .logo-txt b { color: var(--accent); margin-left: 0; }
.biz { display: flex; align-items: center; gap: 10px; margin: 8px 4px 4px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); text-decoration: none; color: var(--text); }
.biz:hover { border-color: var(--line-2); }
.biz i { font-style: normal; width: 28px; height: 28px; border-radius: 8px; background: var(--brand-dim); color: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; flex: none; }
.biz b { display: block; font-size: 13.5px; } .biz small { color: var(--muted); font-size: 11.5px; }
/* Bàn làm việc — dòng thời gian đội AI */
.tl { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.tl li { display: grid; grid-template-columns: 44px auto 1fr; gap: 8px; align-items: baseline; padding: 5px 8px; border-radius: 8px; color: var(--text-2); }
.tl li .mono { color: var(--muted); font-size: 11.5px; } .tl li b { font-weight: 600; color: var(--text); white-space: nowrap; }
.tl li span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl li.now { background: var(--accent-dim); } .tl li.now .mono { color: var(--accent); }
/* Chiến dịch */
.camp { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.camp-step { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--panel-2); display: flex; flex-direction: column; gap: 6px; }
.camp-step.done { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.camp-step.wait { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
.camp-h { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; } .camp-h small { color: var(--muted); margin-left: auto; font-size: 12px; }
.camp-h i { font-style: normal; width: 24px; height: 24px; border-radius: 7px; background: var(--panel-3); color: var(--muted); display: flex; align-items: center; justify-content: center; font: 600 12px var(--mono); }
.camp-step.done .camp-h i { background: var(--accent); color: var(--accent-ink); }
.camp-f { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); text-decoration: none; color: var(--text); }
.camp-f:hover { border-color: var(--line-2); } .camp-f b { display: block; font-size: 13.5px; } .camp-f small { color: var(--muted); font-size: 12px; }
/* Cổng khách app.toila.io */
.app-top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.app-nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.app-nav a { padding: 8px 12px; border-radius: 10px; color: var(--text-2); text-decoration: none; font-weight: 500; }
.app-nav a:hover { background: var(--panel-2); color: var(--text); }
.app-main { max-width: 1100px; margin: 0 auto; padding: 24px 20px 48px; }
.auth { max-width: 560px; margin: 24px auto; }
