:root {
  --bg: #0b0b0f;
  --panel: #11111a;
  --text: #e8e8ee;
  --muted: #a6a6b3;
  --border: #2a2a3a;
  --brand: #ff2d7d;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 16px; }
.header {
  position: sticky;
  top: 0;
  background: rgba(11,11,15,0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.header .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand { font-weight: 700; }
.nav a { color: var(--muted); margin-left: 14px; }
.footer { border-top: 1px solid var(--border); margin-top: 28px; color: var(--muted); }

h1 { margin: 0 0 10px; font-size: 26px; }
h2 { margin: 0 0 10px; font-size: 18px; color: var(--text); }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; font-size: 12px; overflow-wrap: anywhere; }
details summary { cursor: pointer; }
pre.mono { white-space: pre-wrap; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 920px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.kv { display: grid; gap: 8px; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; }

label { display: block; margin: 10px 0; color: var(--muted); }
input[type="text"], input[type="number"], input[type="password"] {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0e0e16;
  color: var(--text);
}
select {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0e0e16;
  color: var(--text);
}
button, .btn {
  display: inline-block;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #151526;
  color: var(--text);
  cursor: pointer;
}
.btn.secondary { background: transparent; color: var(--muted); }
.checks { display: flex; flex-wrap: wrap; gap: 12px; }
.checks label { margin: 0; }

.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 10px;
}
.table th, .table td {
  border-bottom: 1px solid var(--border);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}
.table tr.row-selected td {
  background: rgba(255, 45, 125, 0.08);
}
.table tr.row-selected:hover td {
  background: rgba(255, 45, 125, 0.12);
}
.table tr.row-queued td {
  background: rgba(255, 255, 255, 0.03);
}
.table tr.row-running td {
  background: rgba(64, 154, 255, 0.12);
}
.table th { color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
  margin-left: 6px;
  white-space: nowrap;
}
.pill.queued {
  border-color: rgba(166, 166, 179, 0.35);
}
.pill.running {
  border-color: rgba(64, 154, 255, 0.55);
  background: rgba(64, 154, 255, 0.12);
  color: #bfe4ff;
}
.pill.ok {
  border-color: rgba(33, 90, 42, 0.65);
  background: rgba(33, 90, 42, 0.22);
  color: #b6f7c1;
}
.pill.bad {
  border-color: rgba(107, 35, 52, 0.75);
  background: rgba(107, 35, 52, 0.25);
  color: #ffb3c5;
}
.pill.na {
  border-color: rgba(166, 166, 179, 0.35);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

dialog {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  background: var(--panel);
  color: var(--text);
  max-width: min(1100px, 92vw);
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.pager { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.pager-jump { display: flex; align-items: center; gap: 8px; margin-left: 10px; }
.pager-jump label { margin: 0; display: flex; align-items: center; gap: 8px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.actions { display: flex; gap: 10px; }

.alert {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 12px 0;
}
.alert.ok { border-color: #215a2a; background: rgba(33,90,42,0.2); }
.alert.error { border-color: #6b2334; background: rgba(107,35,52,0.25); }
