:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f3ee;
  color: #1f2933;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(253, 186, 116, 0.35), transparent 34rem),
    linear-gradient(135deg, #fffaf2 0%, #edf6f9 100%);
}

button, input, textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  padding: 0.8rem 1.15rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 25px rgba(17, 24, 39, 0.18);
}

button:hover { transform: translateY(-1px); }

.shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 2rem;
  border-radius: 2rem;
  background: rgba(255,255,255,0.82);
  box-shadow: 0 24px 80px rgba(31, 41, 51, 0.12);
  backdrop-filter: blur(18px);
}

h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 5rem); line-height: 0.95; margin-bottom: 1rem; }
h2 { margin-bottom: 0.5rem; }
.lede { max-width: 56rem; color: #52606d; font-size: 1.1rem; margin-bottom: 0; }
.eyebrow { color: #b45309; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; margin-bottom: 0.6rem; }

.card {
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 1.5rem;
  padding: 1.4rem;
  box-shadow: 0 18px 45px rgba(31, 41, 51, 0.08);
}

.auth-card { margin: 1rem 0; }
.token-row { display: flex; gap: 0.75rem; }
.token-row input { flex: 1; }
.hint, .muted { color: #697586; font-size: 0.92rem; }

.grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.4fr);
  gap: 1rem;
  align-items: start;
}

label { display: block; font-weight: 700; margin: 1rem 0 0.4rem; }
input, textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  background: #fff;
  color: #111827;
}
textarea { resize: vertical; font-family: "SFMono-Regular", Consolas, monospace; }
form button { margin-top: 1rem; width: 100%; }

.split { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
#status { color: #047857; font-weight: 800; }
#status.error { color: #b91c1c; }

.jobs { display: grid; gap: 0.85rem; max-height: 70vh; overflow: auto; padding-right: 0.2rem; }
.empty { color: #697586; padding: 1rem; border: 1px dashed #cbd5e1; border-radius: 1rem; }
.job { border: 1px solid #e2e8f0; border-radius: 1rem; padding: 1rem; background: #fff; }
.job-topline { display: flex; justify-content: space-between; gap: 0.75rem; align-items: center; }
.pill { border-radius: 999px; padding: 0.25rem 0.65rem; font-size: 0.8rem; font-weight: 800; background: #e2e8f0; color: #334155; }
.pill.queued { background: #fef3c7; color: #92400e; }
.pill.in_progress { background: #dbeafe; color: #1d4ed8; }
.pill.completed { background: #dcfce7; color: #166534; }
.pill.failed { background: #fee2e2; color: #991b1b; }

dl { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0.65rem; }
dt { color: #697586; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }
dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
pre { white-space: pre-wrap; overflow: auto; max-height: 24rem; background: #0f172a; color: #dbeafe; border-radius: 0.85rem; padding: 1rem; }
.job-error { color: #b91c1c; font-weight: 700; }

@media (max-width: 820px) {
  .hero, .token-row, .split { flex-direction: column; align-items: stretch; }
  .grid { grid-template-columns: 1fr; }
  h1 { font-size: 2.6rem; }
}
