:root {
  --bg: #0f1419;
  --panel: #1a2332;
  --line: #2a3548;
  --text: #e7ecf3;
  --muted: #8b9bb4;
  --accent: #3b82f6;
  --ok: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --side: #121a24;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
.layout { display: flex; min-height: 100vh; }
.side {
  width: 240px;
  background: var(--side);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px; }
.logo {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  display: grid; place-items: center; font-weight: 800;
}
.title { font-weight: 700; }
.sub { color: var(--muted); font-size: 12px; }
nav { display: flex; flex-direction: column; gap: 6px; }
.nav {
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
.nav:hover { background: #1c2736; color: var(--text); }
.nav.active { background: #1e3a5f; color: #fff; }
.side-foot { margin-top: auto; font-size: 12px; color: var(--muted); padding: 8px; }
main { flex: 1; padding: 24px 28px; overflow: auto; }
.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.top h1 { margin: 0; font-size: 22px; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.badge {
  background: #1e3a5f; color: #93c5fd; padding: 4px 10px;
  border-radius: 999px; font-size: 12px;
}
.btn {
  background: #243044; color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 12px; cursor: pointer; text-decoration: none;
  display: inline-block; font-size: 13px;
}
.btn:hover { border-color: #3d4f6a; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.warn { background: #78350f; border-color: #b45309; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px;
}
.card .k { color: var(--muted); font-size: 12px; }
.card .v { font-size: 24px; font-weight: 700; margin-top: 6px; }
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; margin-bottom: 14px;
}
.panel h3 { margin: 0 0 12px; font-size: 15px; }
.row { display: flex; gap: 14px; }
.grow { flex: 1; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
.form-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.form-row.wrap { gap: 12px; }
label { font-size: 13px; color: var(--muted); }
input[type=number], select {
  background: #0f1419; border: 1px solid var(--line); color: var(--text);
  border-radius: 6px; padding: 6px 8px; margin-left: 6px;
}
.check { display: flex; gap: 8px; align-items: center; margin: 8px 0; color: var(--text); font-size: 13px; }
.kv { font-size: 13px; line-height: 1.7; margin-bottom: 10px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
.pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px;
  background: #243044;
}
.pill.success { background: #14532d; color: #86efac; }
.pill.running { background: #1e3a5f; color: #93c5fd; }
.pill.failed { background: #7f1d1d; color: #fca5a5; }
.pill.queued { background: #374151; color: #d1d5db; }
.list { font-size: 13px; color: var(--muted); max-height: 280px; overflow: auto; }
.list div { padding: 6px 0; border-bottom: 1px solid var(--line); }
.hint { line-height: 1.6; font-size: 14px; }
.prose ul { line-height: 1.8; color: var(--muted); }
.bar {
  height: 6px; background: #0f1419; border-radius: 99px; overflow: hidden; min-width: 80px;
}
.bar > i { display: block; height: 100%; background: var(--accent); }
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .side { width: 100%; }
  .row { flex-direction: column; }
}
