:root {
  color-scheme: dark;
  --bg: #0a0d12;
  --panel: #111720;
  --panel-2: #151d28;
  --line: #283343;
  --text: #edf4ff;
  --muted: #8e9bad;
  --cyan: #48e5c2;
  --blue: #5b8cff;
  --red: #ff6577;
  --amber: #ffc857;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 85% 0%, rgba(91, 140, 255, .16), transparent 30rem),
    radial-gradient(circle at 10% 20%, rgba(72, 229, 194, .08), transparent 25rem),
    var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.shell { width: min(1040px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 80px; }
header, .tasks-head, .controls, .task-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(30px, 6vw, 54px); letter-spacing: -.04em; }
h2 { margin-bottom: 0; font-size: 28px; }
.eyebrow { margin-bottom: 8px; color: var(--cyan); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.subtitle, .meta, .notice, .empty { color: var(--muted); }
.status, .badge { border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.status.ready, [data-status="completed"] .badge { color: var(--cyan); border-color: rgba(72, 229, 194, .4); background: rgba(72, 229, 194, .08); }
.status.error, [data-status="failed"] .badge { color: var(--red); border-color: rgba(255, 101, 119, .4); background: rgba(255, 101, 119, .08); }
[data-status="running"] .badge { color: var(--blue); border-color: rgba(91, 140, 255, .4); background: rgba(91, 140, 255, .1); }
[data-status="queued"] .badge, [data-status="cancelled"] .badge { color: var(--amber); }
.panel { border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, rgba(21, 29, 40, .95), rgba(13, 18, 26, .95)); box-shadow: 0 22px 60px rgba(0, 0, 0, .2); }
.composer { margin: 34px 0 46px; padding: 22px; }
label { display: grid; gap: 8px; font-weight: 700; }
textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #0b1017; color: var(--text); font: inherit; outline: none;
}
input {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #0b1017; color: var(--text); padding: 12px; font: inherit; outline: none;
}
input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(91, 140, 255, .12); }
textarea { min-height: 180px; margin: 10px 0 16px; padding: 16px; resize: vertical; }
select { min-width: 190px; padding: 11px 38px 11px 12px; }
textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(91, 140, 255, .12); }
button { border: 0; border-radius: 12px; padding: 12px 18px; background: linear-gradient(135deg, var(--blue), #765bff); color: white; font: inherit; font-weight: 800; cursor: pointer; }
button:hover { filter: brightness(1.1); }
button:disabled { opacity: .5; cursor: wait; }
button.secondary { padding: 9px 13px; border: 1px solid var(--line); background: transparent; color: var(--muted); }
.controls { align-items: end; justify-content: flex-start; flex-wrap: wrap; }
.controls button { margin-left: auto; }
.notice { margin: 16px 0 0; font-size: 13px; }
.tasks-head { margin-bottom: 16px; }
.tasks { display: grid; gap: 14px; }
.task { padding: 18px; }
.task-top { margin-bottom: 13px; }
.badge { display: inline-block; margin-right: 9px; }
.task h3 { margin-bottom: 14px; font-size: 17px; line-height: 1.45; white-space: pre-wrap; }
.output { max-height: 420px; overflow: auto; margin: 0; padding: 14px; border: 1px solid #202a37; border-radius: 10px; background: #080c11; color: #cfe1ff; white-space: pre-wrap; word-break: break-word; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.task-error { margin: 12px 0 0; color: var(--red); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.auth-page { display: grid; min-height: 100vh; place-items: center; padding: 20px; }
.auth-card { width: min(460px, 100%); padding: 28px; }
.auth-card.wide { width: min(620px, 100%); }
.auth-card h1 { font-size: 38px; }
.auth-card form { display: grid; gap: 16px; margin-top: 24px; }
.auth-card form button { margin-top: 4px; }
.setup-steps { padding-left: 22px; color: var(--muted); }
.setup-steps li { margin-bottom: 8px; }
.secret-row { display: flex; align-items: center; gap: 10px; margin: 8px 0 20px; }
.secret-row code { flex: 1; overflow-wrap: anywhere; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #080c11; color: var(--cyan); letter-spacing: .08em; }

@media (max-width: 700px) {
  .shell { width: min(100% - 20px, 1040px); padding-top: 24px; }
  header, .tasks-head { align-items: flex-start; }
  header { flex-direction: column; }
  .controls { display: grid; grid-template-columns: 1fr; }
  .controls button { width: 100%; margin-left: 0; }
  select { min-width: 0; }
}
