:root {
  color-scheme: light dark;
  --bg: #0e0f12;
  --fg: #e6e7ea;
  --muted: #8a8f99;
  --accent: #5cc8ff;
  --border: #2a2d33;
  --card: #16181d;
  --error: #ff6b6b;
  --ok: #58d68d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 14px/1.5 system-ui, -apple-system, "PingFang SC", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
}

header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header h1 { margin: 0; font-size: 18px; font-weight: 600; }
header nav a { margin-left: 16px; color: var(--muted); text-decoration: none; }
header nav a:hover { color: var(--accent); }

main { max-width: 880px; margin: 24px auto; padding: 0 24px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 0 0 auto; }
.grow { flex: 1 1 auto; }

label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }

input[type="text"], textarea, select {
  width: 100%;
  background: #0a0b0e;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}
textarea { min-height: 96px; resize: vertical; }

input[type="range"] { width: 100%; }

button {
  background: var(--accent);
  color: #001020;
  border: 0;
  border-radius: 6px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.error { color: var(--error); }
.ok { color: var(--ok); }
.muted { color: var(--muted); }
small.kbd { font-family: ui-monospace, monospace; }

.field { margin-bottom: 14px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.status-queued, .status-starting, .status-running, .status-publishing, .status-rendering { background: #2a2d33; color: var(--accent); }
.status-code_ready { background: #2a2d33; color: var(--ok); }
.status-rendered { background: var(--ok); color: #001a08; }
.status-failed, .status-cancelled { background: var(--error); color: #1a0008; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
tr:hover td { background: rgba(255,255,255,0.02); cursor: pointer; }

audio { width: 100%; margin-top: 8px; }

pre.log {
  background: #06070a;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  max-height: 480px;
  overflow: auto;
  font: 12px/1.55 ui-monospace, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}
