:root {
  color-scheme: light dark;
  --bg: #0f172a;
  --card: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --danger: #f87171;
  --ok: #4ade80;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
}

.app {
  max-width: 560px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

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

.subtitle {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

textarea,
input[type="password"] {
  width: 100%;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 0.75rem;
  background: #0b1220;
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

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

button.primary {
  flex: 1;
  background: var(--accent);
  color: #0f172a;
  font-weight: 600;
}

button.secondary {
  background: #334155;
  color: var(--text);
}

button.secondary[aria-pressed="true"] {
  background: var(--danger);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.status.working {
  color: var(--accent);
  font-weight: 600;
}

.status.done {
  color: var(--ok);
}

.status.failed {
  color: var(--danger);
}

.detail {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  line-height: 1.45;
}

.files {
  margin: 0.75rem 0;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.button-link {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
}

.error {
  color: var(--danger);
  font-size: 0.95rem;
}

.hidden {
  display: none;
}
