/* AgeniusDesk — clickable demo. Static mockup, nothing wired.
   Matches the real app: dark void + coral, Geist + Geist Mono. */

:root {
  --void: #0a0a0f;
  --panel: #101019;
  --panel-2: #15151f;
  --panel-3: #1a1a26;
  --sidebar: #0c0c12;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.06);

  --text: #e8e8f0;
  --text-2: #9a9ab0;
  --dim: #62626f;

  --coral: #ff6d5a;
  --coral-soft: rgba(255, 109, 90, 0.12);
  --coral-soft-2: rgba(255, 109, 90, 0.18);
  --coral-border: rgba(255, 109, 90, 0.35);

  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.14);
  --red: #f87171;
  --amber: #fbbf24;
  --blue: #60a5fa;
  --n8n: #ea4b71;

  --sans: 'Geist', system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--sans);
  background: var(--void);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--coral-soft-2); }

/* scrollbars */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.09); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.16); }

/* ── Demo banner ───────────────────────────────────────── */
.demo-banner {
  flex: 0 0 auto;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  background: linear-gradient(90deg, rgba(255, 109, 90, 0.10), rgba(255, 109, 90, 0.02));
  border-bottom: 1px solid var(--coral-border);
  font-size: 12.5px;
  color: var(--text-2);
  z-index: 50;
}
.demo-banner .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 0 rgba(255, 109, 90, 0.5);
  animation: pulse 2.4s infinite;
  flex: 0 0 auto;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 109, 90, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(255, 109, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 109, 90, 0); }
}
.demo-banner b { color: var(--text); font-weight: 600; }
.demo-banner .spacer { flex: 1; }
.demo-banner a {
  color: var(--text-2);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  transition: 0.15s;
  white-space: nowrap;
}
.demo-banner a:hover { color: var(--text); border-color: var(--coral-border); background: var(--coral-soft); }
.demo-banner a.primary { color: var(--coral); border-color: var(--coral-border); }
.demo-banner a.primary:hover { background: var(--coral-soft-2); }

/* ── App shell ─────────────────────────────────────────── */
.app {
  flex: 1;
  display: flex;
  min-height: 0;
}

/* ── Sidebar ───────────────────────────────────────────── */
.sidebar {
  flex: 0 0 248px;
  width: 248px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}
.sb-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 20px 18px 18px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.sb-brand .mark { width: 22px; height: 22px; flex: 0 0 auto; }
.sb-brand .a { color: #fff; }
.sb-brand .d { color: var(--coral); }

.sb-section { padding: 6px 12px; }
.sb-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 10px 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  color: var(--dim);
  text-transform: uppercase;
}
.sb-head svg { width: 13px; height: 13px; opacity: 0.6; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  border-left: 2px solid transparent;
  transition: 0.13s;
  position: relative;
}
.nav-item svg { width: 17px; height: 17px; flex: 0 0 auto; stroke-width: 1.9; }
.nav-item:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.nav-item.active {
  background: var(--coral-soft);
  color: var(--coral);
  border-left-color: var(--coral);
  font-weight: 600;
}
.nav-item .badge {
  margin-left: auto;
  background: var(--coral);
  color: #1a0a08;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 19px;
  padding: 0 6px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-item.active .badge { background: var(--coral); color: #1a0a08; }

.sb-divider { height: 1px; background: var(--line); margin: 10px 16px; }

.sb-vibe {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 22px;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
}
.sb-vibe svg { width: 17px; height: 17px; }

.sb-label {
  padding: 12px 22px 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  color: var(--dim);
  text-transform: uppercase;
}
.sb-theme { padding: 0 18px 6px; }
.select {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text);
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239a9ab0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

.sb-instances { padding: 0 18px 8px; display: flex; flex-direction: column; gap: 8px; }
.inst {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  border-left: 2px solid transparent;
  background: var(--panel-2);
  font-size: 13px;
  font-weight: 600;
  transition: 0.13s;
  text-align: left;
}
.inst:hover { border-color: var(--coral-border); }
.inst.active { border-left-color: var(--coral); color: var(--coral); background: var(--coral-soft); }
.inst .dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.inst .dot.on { background: var(--coral); }
.inst .name { flex: 1; }
.inst .open {
  font-size: 11px; font-weight: 500; color: var(--text-2);
  border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px;
}
.inst .open:hover { color: var(--text); border-color: var(--coral-border); }
.inst-add {
  border: 1px dashed var(--line);
  border-radius: var(--r-sm);
  padding: 9px;
  color: var(--dim);
  font-size: 12.5px;
  text-align: center;
  background: transparent;
}
.inst-add:hover { color: var(--text-2); border-color: rgba(255, 255, 255, 0.18); }

.sb-foot { margin-top: auto; }
.sb-user {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--text-2);
}
.sb-user .logout { color: var(--text); font-weight: 600; }
.sb-status {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px 16px;
  font-size: 12.5px;
  color: var(--text-2);
}
.sb-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }

/* ── Main ──────────────────────────────────────────────── */
.main { flex: 1; overflow-y: auto; min-width: 0; }
.screen { display: none; padding: 28px 36px 64px; max-width: 1280px; }
.screen.active { display: block; animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 22px;
}
.page-head h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.page-head h1.big { font-size: 34px; }
.page-head .sub { color: var(--text-2); font-size: 13px; margin-top: 4px; }
.page-head .tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* card */
.card {
  background: var(--panel);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  padding: 22px;
}
.card-head {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 16px;
}
.card-head .grip { color: var(--dim); font-size: 13px; letter-spacing: -2px; cursor: grab; }
.card-head h2 { font-size: 15px; font-weight: 600; }
.card-head .right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.card-head .right a, .card-head .right button { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.card-head .right a:hover { color: var(--coral); }

/* generic small controls */
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 2px; }
.seg button { padding: 5px 12px; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.seg button.on { background: var(--panel-3); color: var(--text); }
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: var(--r-sm);
  font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--line); color: var(--text-2);
  transition: 0.13s;
}
.btn:hover { color: var(--text); border-color: var(--coral-border); }
.btn.coral { background: var(--coral); color: #1a0a08; border-color: var(--coral); }
.btn.coral:hover { background: #ff8270; color: #1a0a08; }
.btn.ghost-coral { color: var(--coral); border-color: var(--coral-border); }
.btn.ghost-coral:hover { background: var(--coral-soft); }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; color: var(--text-2);
  background: var(--panel-2); border: 1px solid var(--line);
  padding: 3px 9px; border-radius: 20px;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stack { display: flex; flex-direction: column; gap: 18px; }

/* ── Overview: stats ───────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: var(--r);
  padding: 16px 18px;
}
.stat.green { border-left-color: var(--green); }
.stat.red { border-left-color: var(--red); }
.stat.amber { border-left-color: var(--amber); }
.stat .v { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.stat .l { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; color: var(--text-2); text-transform: uppercase; margin: 4px 0 8px; }
.stat .s { font-size: 12px; color: var(--dim); }
.stat .s.ok { color: var(--green); }
.stat .s.bad { color: var(--coral); }

/* timeline squares */
.tl-squares { display: flex; gap: 4px; flex-wrap: wrap; margin: 6px 0 12px; }
.tl-sq { width: 17px; height: 17px; border-radius: 4px; background: var(--green); }
.tl-sq.is-err { background: var(--coral); }
.tl-sq.is-run { background: var(--amber); }
.tl-sq.is-dim { opacity: 0.4; }
.legend { display: flex; gap: 18px; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.legend .g { background: var(--green); }
.legend .e { background: var(--coral); }
.legend .r { background: var(--amber); }

/* error list (overview + executions) */
.err-list { display: flex; flex-direction: column; gap: 10px; }
.err {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--coral);
  border-radius: var(--r);
  padding: 13px 15px;
  cursor: pointer;
  transition: 0.13s;
}
.err:hover { border-color: var(--coral-border); background: var(--panel-3); }
.err.open { background: var(--panel-3); border-color: var(--coral-border); }
.err-top { display: flex; align-items: center; gap: 10px; }
.tag {
  font-size: 11px; font-weight: 600; color: var(--text-2);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
  padding: 2px 8px; border-radius: 6px;
  display: inline-flex; align-items: center; gap: 5px;
}
.tag .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--coral); }
.err-name { font-weight: 600; font-size: 14px; }
.err-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.count {
  font-size: 11px; font-weight: 700; color: var(--text-2);
  background: rgba(255, 255, 255, 0.06); border-radius: 6px; padding: 2px 7px;
}
.err-time { font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.err-msg { font-size: 13px; color: var(--text-2); margin-top: 7px; }
.err-msg b { color: var(--text); font-weight: 600; }
.err-cta {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 11px; font-size: 12px; font-weight: 600; color: var(--coral);
}
.err-cta svg { width: 14px; height: 14px; }
.chev { transition: 0.2s; color: var(--coral); }
.err.open .chev { transform: rotate(90deg); }

/* AI diagnosis panel */
.ai {
  margin-top: 13px;
  border: 1px solid var(--coral-border);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255, 109, 90, 0.05), rgba(255, 109, 90, 0.01));
  overflow: hidden;
}
.ai-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 15px; border-bottom: 1px solid var(--line);
}
.ai-head .spark { color: var(--coral); width: 16px; height: 16px; }
.ai-head .title { font-weight: 600; font-size: 13.5px; }
.ai-head .model {
  font-size: 11px; color: var(--text-2); font-family: var(--mono);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  padding: 2px 8px; border-radius: 6px;
}
.ai-head .conf { margin-left: auto; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.conf.high { color: var(--green); background: var(--green-soft); }
.conf.med { color: var(--amber); background: rgba(251, 191, 36, 0.14); }
.ai-body { padding: 14px 16px; }
.ai-loading { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 13px; padding: 6px 0; }
.spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255, 109, 90, 0.25); border-top-color: var(--coral);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ai-sec { margin-bottom: 14px; }
.ai-sec:last-child { margin-bottom: 0; }
.ai-sec h4 {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--coral); margin-bottom: 6px;
}
.ai-sec p { font-size: 13px; color: var(--text); line-height: 1.6; }
.ai-sec ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.ai-sec li { font-size: 13px; color: var(--text-2); padding-left: 16px; position: relative; line-height: 1.5; }
.ai-sec li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--coral); }
.ai-sec li b, .ai-sec p b { color: var(--text); }
.code {
  font-family: var(--mono); font-size: 12px; line-height: 1.7;
  background: #0a0a10; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 12px 14px; margin-top: 8px; overflow-x: auto;
  color: #d6d6e2; white-space: pre;
}
.code .c { color: var(--dim); font-style: italic; }
.code .k { color: var(--coral); }
.code .s { color: #7dd3a8; }
.code .del { color: var(--red); }
.code .add { color: var(--green); }
.ai-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }

/* health bar */
.health { display: flex; align-items: center; gap: 14px; }
.health .bar { flex: 1; height: 8px; border-radius: 6px; background: var(--panel-3); overflow: hidden; }
.health .fill { height: 100%; background: var(--green); border-radius: 6px; }
.health .txt { font-size: 13px; color: var(--text-2); white-space: nowrap; }

/* ── Code Lab ──────────────────────────────────────────── */
.lab { display: grid; grid-template-columns: 1fr 360px; gap: 0; border: 1px solid var(--card-border); border-radius: var(--r-lg); overflow: hidden; min-height: 560px; }
.lab-main { display: flex; flex-direction: column; background: var(--panel); border-right: 1px solid var(--line); }
.lab-bar { display: flex; align-items: center; gap: 8px; padding: 11px 13px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.lab-bar .tabs { display: inline-flex; gap: 4px; }
.lab-tab { padding: 6px 13px; border-radius: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); border: 1px solid transparent; }
.lab-tab.on { background: var(--coral); color: #1a0a08; }
.lab-tab:not(.on):hover { color: var(--text); }
.lab-sel { background: var(--panel-2); border: 1px solid var(--line); color: var(--text-2); padding: 6px 10px; border-radius: 6px; font-size: 12px; appearance: none; }
.lab-toolbar { display: flex; gap: 8px; padding: 9px 13px; border-bottom: 1px solid var(--line); }
.code-editor { flex: 1; display: flex; font-family: var(--mono); font-size: 13px; line-height: 1.7; overflow: auto; }
.gutter { padding: 14px 0 14px; text-align: right; color: var(--dim); user-select: none; background: rgba(0,0,0,0.2); }
.gutter span { display: block; padding: 0 14px; }
.code-area { padding: 14px 16px; color: #d6d6e2; white-space: pre; flex: 1; }
.lab-output { border-top: 1px solid var(--line); padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; font-size: 11px; letter-spacing: 0.08em; color: var(--dim); text-transform: uppercase; font-weight: 600; }

.assistant { display: flex; flex-direction: column; background: var(--panel-2); min-width: 0; }
.as-head { display: flex; align-items: center; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.as-head .title { font-weight: 600; font-size: 14px; }
.as-head .right { margin-left: auto; display: flex; gap: 12px; font-size: 12px; color: var(--text-2); }
.as-head .right .add { color: var(--coral); }
.as-cfg { padding: 13px 15px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 9px; }
.as-row { display: flex; align-items: center; gap: 10px; }
.as-row label { font-size: 12px; color: var(--text-2); width: 56px; flex: 0 0 auto; }
.as-row .select { flex: 1; font-size: 12px; padding: 6px 9px; }
.as-synced { font-size: 11px; color: var(--dim); }
.as-test { width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.as-test:hover { border-color: var(--coral-border); color: var(--text); }
.as-body { flex: 1; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.as-intro { color: var(--text-2); font-size: 13px; line-height: 1.6; text-align: center; padding: 10px 0; }
.as-intro b { color: var(--text); }
.as-tip { font-size: 12px; color: var(--dim); line-height: 1.6; text-align: center; }
.as-tip .n8n { color: var(--n8n); font-weight: 600; }
.as-msg { font-size: 13px; line-height: 1.65; }
.as-msg.user { color: var(--text-2); align-self: flex-end; background: var(--panel-3); border: 1px solid var(--line); padding: 8px 12px; border-radius: 12px 12px 2px 12px; max-width: 85%; }
.as-msg.ai { color: var(--text); }
.as-msg.ai .who { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; color: var(--coral); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 7px; }
.as-msg.ai .who svg { width: 13px; height: 13px; }
.as-quick { padding: 11px 15px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 16px; }
.as-quick button { font-size: 12.5px; font-weight: 600; color: var(--text); }
.as-quick button:hover { color: var(--coral); }
.as-input { display: flex; gap: 8px; padding: 12px 15px; border-top: 1px solid var(--line); }
.as-input input { flex: 1; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 12px; color: var(--text); font-family: inherit; font-size: 13px; }
.as-input input::placeholder { color: var(--dim); }
.as-input input:focus { outline: none; border-color: var(--coral-border); }

/* ── Secrets ───────────────────────────────────────────── */
.sec-row {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 4px; border-bottom: 1px solid var(--line-2);
}
.sec-row:last-child { border-bottom: none; }
.sec-name { font-family: var(--mono); font-weight: 600; font-size: 13px; flex: 0 0 auto; min-width: 160px; }
.sec-val { font-family: var(--mono); font-size: 12.5px; color: var(--dim); flex: 1; }
.sec-row .copy, .sec-row .sync { font-size: 12.5px; color: var(--text-2); font-weight: 500; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; flex-shrink: 0; }
.sec-name { white-space: nowrap; }
.sec-row .copy:hover, .sec-row .sync:hover { color: var(--coral); }
.sec-row .copy svg { width: 13px; height: 13px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input, .field .select { width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px; color: var(--text); font-family: inherit; font-size: 13px; }
.field input::placeholder { color: var(--dim); }
.field input:focus { outline: none; border-color: var(--coral-border); }
.field .hint { font-size: 11.5px; color: var(--dim); margin-top: 6px; }
.field .hint code, .sec-sub code { font-family: var(--mono); color: var(--text-2); }
.sec-sub { color: var(--text-2); font-size: 13px; }

/* ── Insights ──────────────────────────────────────────── */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--card-border); border-radius: var(--r-lg); padding: 18px 20px; }
.kpi .l { font-size: 11px; font-weight: 600; letter-spacing: 0.07em; color: var(--text-2); text-transform: uppercase; }
.kpi .v { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; margin: 8px 0 6px; }
.kpi .v.green { color: var(--green); }
.kpi .v.coral { color: var(--coral); }
.kpi .s { font-size: 12px; color: var(--dim); }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 150px; margin: 10px 0 14px; }
.bars .b { flex: 1; border-radius: 3px 3px 0 0; background: var(--green); min-height: 3px; }
.bars .b.err { background: var(--coral); }
.itable { width: 100%; border-collapse: collapse; font-size: 13px; }
.itable th { text-align: left; font-size: 10.5px; font-weight: 600; letter-spacing: 0.07em; color: var(--dim); text-transform: uppercase; padding: 8px 0; border-bottom: 1px solid var(--line); }
.itable th.r, .itable td.r { text-align: right; }
.itable td { padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.itable tr:last-child td { border-bottom: none; }
.itable .wf { color: var(--coral); font-weight: 600; }
.itable .traces { color: var(--dim); font-weight: 400; font-size: 11px; margin-left: 6px; }
.itable .num { font-weight: 700; }
.itable .ok { color: var(--green); }
.itable .er { color: var(--coral); }

/* placeholder screen */
.placeholder { text-align: center; padding: 80px 20px; }
.placeholder .ic { width: 56px; height: 56px; margin: 0 auto 18px; color: var(--coral); opacity: 0.8; }
.placeholder h2 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.placeholder p { color: var(--text-2); max-width: 420px; margin: 0 auto 22px; }

/* toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--panel-3); border: 1px solid var(--coral-border); color: var(--text);
  padding: 11px 18px; border-radius: 10px; font-size: 13px; font-weight: 500;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  opacity: 0; pointer-events: none; transition: 0.25s; z-index: 100;
  display: flex; align-items: center; gap: 9px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }

/* mobile */
.menu-btn { display: none; }
@media (max-width: 900px) {
  .menu-btn {
    display: inline-flex; align-items: center; gap: 7px;
    position: fixed; top: 46px; left: 12px; z-index: 60;
    background: var(--panel-3); border: 1px solid var(--coral-border); color: var(--coral);
    padding: 8px 12px; border-radius: var(--r-sm); font-size: 13px; font-weight: 600;
  }
  .sidebar {
    position: fixed; top: 38px; bottom: 0; left: 0; z-index: 55;
    transform: translateX(-100%); transition: transform 0.22s;
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.5);
  }
  .sidebar.show { transform: translateX(0); }
  .screen { padding: 64px 16px 48px; }
  .stats-row, .kpi-row { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .lab { grid-template-columns: 1fr; }
  .lab-main { border-right: none; border-bottom: 1px solid var(--line); }
  .demo-banner { font-size: 11px; gap: 8px; }
  .demo-banner .hide-sm { display: none; }
}
