:root {
  --bg: #0f172a;
  --card: #111827;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --ok: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #1f2937;
}

.header h1 { margin: 0; font-size: 20px; }

.sub { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.btn {
  background: #1d4ed8;
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.btn.loading {
  opacity: 0.7;
  cursor: progress;
}

.actions-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.run-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #0b1220;
  border: 1px solid #1f2937;
  color: var(--muted);
  font-size: 12px;
}

.run-status.active {
  color: #38bdf8;
  border-color: #1d4ed8;
  background: rgba(29, 78, 216, 0.15);
}

.run-status.error {
  color: #f59e0b;
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
}

.run-status.success {
  color: #22c55e;
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
}

.spinner {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, 0.3);
  border-top-color: #38bdf8;
  animation: spin 1s linear infinite;
  display: none;
}

.run-status.active .spinner {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  padding: 16px 20px;
}

.card {
  background: var(--card);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #1f2937;
}

.label { color: var(--muted); font-size: 12px; }

.value { font-size: 16px; margin-top: 4px; }

.list {
  display: grid;
  gap: 12px;
  padding: 0 20px 24px;
}

.item {
  background: var(--card);
  border: 1px solid #1f2937;
  border-radius: 14px;
  padding: 16px;
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.name { margin: 0; font-size: 16px; }

.status { font-weight: 600; }

.meta { margin-top: 8px; color: var(--muted); font-size: 13px; }

.row { display: flex; gap: 6px; margin-top: 6px; }

.actions { margin-top: 10px; }

.open {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
}

.status.ok { color: var(--ok); }
.status.warn { color: var(--warn); }
.status.missing { color: var(--bad); }

@media (min-width: 768px) {
  .header h1 { font-size: 24px; }
}
