:root {
  color-scheme: light dark;
  --bg: #0f1419;
  --panel: #1a2332;
  --text: #e7ecf3;
  --muted: #9aa7b8;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --error: #f87171;
  --border: #2d3a4d;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6f9;
    --panel: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #1e293b 0%, var(--bg) 55%);
  color: var(--text);
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.panel {
  width: min(560px, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
}

h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
}

.subtitle {
  margin: 0 0 1.25rem;
  color: var(--muted);
  line-height: 1.45;
}

.hidden {
  display: none !important;
}

.state p {
  margin: 0.5rem 0;
}

button {
  font: inherit;
  cursor: pointer;
  border-radius: 8px;
  border: none;
  padding: 0.65rem 1rem;
}

button.primary {
  background: var(--accent);
  color: #fff;
}

button.primary:hover {
  background: var(--accent-hover);
}

button.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

button.link {
  background: none;
  color: var(--accent);
  padding: 0;
  text-decoration: underline;
}

.error {
  color: var(--error);
}

.hint {
  color: var(--muted);
  font-size: 0.95rem;
}

.user-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

form {
  display: grid;
  gap: 0.65rem;
}

label {
  font-weight: 600;
}

input[type="url"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: inherit;
}

#job-status {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

#job-status h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

#manifest-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

#manifest-list li {
  margin: 0.35rem 0;
}

#manifest-list a {
  color: var(--accent);
}
