:root {
  --bg: #0a0e14;
  --bg2: #0e141d;
  --glass: rgba(255, 255, 255, 0.045);
  --glass-border: rgba(255, 255, 255, 0.09);
  --text: #e8eef5;
  --muted: #8b98a9;
  --accent: #38e1c6;
  --accent-dim: rgba(56, 225, 198, 0.15);
  --green: #3ddc84;
  --red: #ff5d5d;
  --amber: #ffb454;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 80% -10%, #12202b 0%, var(--bg) 55%) fixed, var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  padding: 12px;
  line-height: 1.45;
}

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

/* ---------- header ---------- */
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark { font-size: 26px; color: var(--accent); }
.brand h1 { margin: 0; font-size: 20px; letter-spacing: 0.3px; }
.brand .sub { margin: 0; font-size: 12px; color: var(--muted); }

.status-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  font-size: 13px; white-space: nowrap;
}
.pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.pill.ok .dot { background: var(--green); box-shadow: 0 0 8px var(--green); }
.pill.bad .dot { background: var(--red); box-shadow: 0 0 8px var(--red); }
.pill.warn .dot { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.pill .lat { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.last-check { font-size: 12px; color: var(--muted); width: 100%; }

/* ---------- layout ---------- */
.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  max-width: 1200px;
  margin: 0 auto;
}
@media (min-width: 860px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .card.wide { grid-column: 1 / -1; }
}
.card { padding: 16px; }
.card h2 { margin: 0 0 10px; font-size: 16px; letter-spacing: 0.3px; }
.hint { font-size: 12.5px; color: var(--muted); margin: 0 0 10px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }

/* ---------- buttons / inputs ---------- */
.btn {
  appearance: none; border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.06); color: var(--text);
  border-radius: 10px; padding: 9px 14px; font-size: 14px; cursor: pointer;
}
.btn:hover { background: rgba(255,255,255,0.1); }
.btn.primary { background: var(--accent-dim); border-color: rgba(56,225,198,0.4); color: var(--accent); font-weight: 600; }
.btn.primary:hover { background: rgba(56,225,198,0.25); }
.btn.small { padding: 4px 9px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: 0.5; cursor: wait; }
input[type="text"] {
  flex: 1; min-width: 180px;
  background: rgba(0,0,0,0.35); border: 1px solid var(--glass-border);
  color: var(--text); border-radius: 10px; padding: 10px 12px; font-size: 14px;
  font-family: var(--mono);
}
input[type="text"]:focus { outline: 1px solid var(--accent); }

/* ---------- terminal ---------- */
.examples { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip {
  font-size: 12px; font-family: var(--mono); color: var(--muted);
  border: 1px dashed var(--glass-border); border-radius: 8px;
  padding: 5px 9px; background: none; cursor: pointer;
}
.chip:hover { color: var(--accent); border-color: var(--accent); }
.outbox { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; }
.outbox li {
  display: flex; gap: 8px; align-items: baseline;
  font-family: var(--mono); font-size: 13px;
  background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border);
  border-radius: 8px; padding: 8px 10px;
}
.outbox .ts { color: var(--muted); font-size: 11px; white-space: nowrap; }
.outbox .st { margin-left: auto; color: var(--amber); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.outbox .rm { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px; }
.outbox .rm:hover { color: var(--red); }
.empty { color: var(--muted); font-size: 13px; }

/* ---------- kanban ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.col { background: rgba(0,0,0,0.25); border: 1px solid var(--glass-border); border-radius: 10px; padding: 10px; min-height: 120px; }
.col h3 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); display: flex; justify-content: space-between; }
.col h3 .count { color: var(--accent); }
.deal {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 10px; padding: 9px 10px; margin-bottom: 8px; font-size: 13px;
}
.deal .t { font-weight: 600; margin-bottom: 3px; }
.deal .m { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.deal .mv { display: flex; gap: 6px; }
.deal .sample-tag {
  display: inline-block; font-size: 10px; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--amber); border: 1px solid rgba(255,180,84,0.4); border-radius: 6px; padding: 1px 6px; margin-left: 6px;
}

/* ---------- telemetry ---------- */
.uptime-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.uptime { font-size: 13px; color: var(--muted); }
.uptime b { display: block; font-size: 22px; color: var(--green); font-variant-numeric: tabular-nums; }
.uptime b.low { color: var(--amber); }
.chart-wrap { position: relative; height: 220px; }

/* ---------- scout / response ---------- */
.health-detail { font-family: var(--mono); font-size: 12.5px; background: rgba(0,0,0,0.35); border: 1px solid var(--glass-border); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; white-space: pre-wrap; word-break: break-word; }
.response { font-family: var(--mono); font-size: 12px; background: rgba(0,0,0,0.35); border: 1px solid var(--glass-border); border-radius: 10px; padding: 10px 12px; max-height: 200px; overflow: auto; white-space: pre-wrap; word-break: break-word; margin: 0; }
.response.err { border-color: rgba(255,93,93,0.5); }

/* ---------- checklist / links ---------- */
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; background: rgba(0,0,0,0.25); border: 1px solid var(--glass-border); border-radius: 10px; padding: 10px 12px; }
.checklist input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }
.checklist li.done span { text-decoration: line-through; color: var(--muted); }
.links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.links a { color: var(--accent); text-decoration: none; font-size: 14px; }
.links a:hover { text-decoration: underline; }

.foot { max-width: 1200px; margin: 14px auto 4px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
