:root {
  --bg: #0f1419;
  --card: #1a2332;
  --text: #e7ecf3;
  --muted: #8b9cb3;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --border: #2d3a4f;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; }
header { padding: 1rem; border-bottom: 1px solid var(--border); background: var(--card); }
h1 { margin: 0; font-size: 1.3rem; }
h2 { margin: 0 0 0.75rem; font-size: 1rem; }
.subtitle { margin: 0.2rem 0 0.75rem; color: var(--muted); font-size: 0.85rem; }
.tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tab { background: transparent; border: 1px solid var(--border); color: var(--text); padding: 0.4rem 0.75rem; border-radius: 8px; cursor: pointer; }
.tab.active { background: var(--accent); border-color: var(--accent); }
.tab-link { text-decoration: none; display: inline-flex; align-items: center; color: var(--text); }
main { max-width: 1000px; margin: 0 auto; padding: 1rem; }
.panel { display: none; gap: 1rem; }
.panel.active { display: grid; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }
.muted { color: var(--muted); }
.small { font-size: 0.8rem; }
.actions { display: grid; gap: 0.35rem; margin-bottom: 0.75rem; font-size: 0.9rem; }
.actions select {
  background: #121a28;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  margin-left: 0.35rem;
}
button.primary, button.secondary { border: none; border-radius: 8px; padding: 0.65rem 1rem; font-size: 0.9rem; cursor: pointer; }
button.primary { background: var(--accent); color: white; width: 100%; max-width: 360px; }
button.primary:hover { background: var(--accent-hover); }
button.secondary { background: #243044; color: var(--text); margin-top: 0.5rem; }
button:disabled { opacity: 0.6; cursor: wait; }
.output { margin-top: 0.75rem; background: #0b1020; border-radius: 8px; padding: 0.75rem; overflow: auto; font-size: 0.78rem; max-height: 220px; }
.output.small { max-height: 140px; }
.metrics-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.metric-box { border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem; }
.metric-box h3 { margin: 0 0 0.5rem; font-size: 0.9rem; color: var(--accent); }
.metric-box dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 0.5rem; font-size: 0.82rem; }
.metric-box dt { color: var(--muted); }
.metric-box dd { margin: 0; text-align: right; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.72rem; }
th, td { border-bottom: 1px solid var(--border); padding: 0.3rem 0.45rem; white-space: nowrap; }
th { color: var(--muted); }
@media (max-width: 600px) { main { padding: 0.75rem; } h1 { font-size: 1.1rem; } }
