:root {
  color-scheme: dark;
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1f2430;
  --text: #e9edf5;
  --muted: #9aa4b2;
  --primary: #6ea8fe;
  --danger: #ff6b6b;
  --ok: #39d98a;
  --border: #2b3240;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}
h1 { margin: 0 0 8px; }
.sub { margin: 0 0 20px; color: var(--muted); }
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
label { display: flex; flex-direction: column; gap: 8px; }
label span { color: var(--muted); font-size: 14px; }
input, textarea, button {
  font: inherit;
}
input, textarea {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
}
textarea { resize: vertical; }
.actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
  align-items: end;
}
.inline-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
}
button {
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  background: #323848;
  color: var(--text);
}
button.primary { background: var(--primary); color: #08111f; font-weight: 700; }
button.danger { background: var(--danger); color: #220909; font-weight: 700; }
button:disabled { opacity: .5; cursor: not-allowed; }
.status {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
}
.status.idle { background: rgba(154,164,178,.12); color: var(--muted); }
.status.running { background: rgba(110,168,254,.14); color: var(--primary); }
.status.completed { background: rgba(57,217,138,.14); color: var(--ok); }
.status.failed, .status.stopped { background: rgba(255,107,107,.14); color: var(--danger); }
.logs {
  min-height: 360px;
  max-height: 560px;
  overflow: auto;
  background: #0c0f14;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
}
.results {
  display: grid;
  gap: 12px;
}
.results.empty {
  color: var(--muted);
}
.result-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #0c0f14;
}
.result-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}
.result-link:hover {
  text-decoration: underline;
}
.result-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}
