:root {
  --fg: #1a1a1a;
  --bg: #f7f7f8;
  --card-bg: #ffffff;
  --border: #ddd;
  --accent: #2b6cb0;
  --error: #b00020;
  --warn: #8a5a00;
  --muted: #666;
}
* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  margin: 0;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 600; text-decoration: none; color: var(--fg); }
.container { max-width: 760px; margin: 0 auto; padding: 1.5rem; }
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.card.narrow { max-width: 360px; margin: 2rem auto; }
label { display: block; margin-bottom: 0.75rem; font-size: 0.9rem; }
input, textarea { width: 100%; padding: 0.5rem; margin-top: 0.25rem; border: 1px solid var(--border); border-radius: 4px; font-size: 1rem; }
button, .button-link {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:disabled, .button-link.disabled { background: #aac; cursor: not-allowed; pointer-events: none; }
.link-button { background: none; color: var(--accent); border: none; cursor: pointer; text-decoration: underline; padding: 0; font-size: 0.9rem; }
.button-row { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.error { color: var(--error); font-weight: 600; }
.warn { color: var(--warn); font-weight: 600; }
.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #eee;
  text-transform: capitalize;
}
.badge.state-done { background: #d4f7dc; color: #176b2a; }
.badge.state-error { background: #fbd4d4; color: #8a0f0f; }
.badge.state-queued { background: #eee; color: #444; }
.jobs-table { width: 100%; border-collapse: collapse; }
.jobs-table th, .jobs-table td { text-align: left; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.media-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.media-row > div { flex: 1 1 280px; }
video { width: 100%; max-width: 360px; background: #000; border-radius: 4px; }
.logout-form { display: flex; align-items: center; gap: 0.5rem; }
.inline-form { display: inline; }

.stepper { display: flex; list-style: none; padding: 0; margin: 0.5rem 0 1rem; gap: 0.25rem; }
.stepper li {
  flex: 1;
  text-align: center;
  padding: 0.4rem 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
  background: #eee;
  border-radius: 4px;
}
.stepper li.complete { background: #d4f7dc; color: #176b2a; }
.stepper li.active { background: var(--accent); color: #fff; font-weight: 600; }
.stepper.stepper-error li.active { background: var(--error); }
