:root {
  color-scheme: light dark;
  --bg: #f7f6f3;
  --surface: #ffffff;
  --text: #1c1b19;
  --muted: #6b6860;
  --line: #e2dfd8;
  --accent: #1f5fbf;
  --accent-text: #ffffff;
  --ok: #1d7a46;
  --warn: #9a6200;
  --bad: #b3261e;
  --radius: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151514;
    --surface: #1f1f1d;
    --text: #ecebe7;
    --muted: #a09d94;
    --line: #34332f;
    --accent: #7fb0ff;
    --accent-text: #0e1726;
    --ok: #6fd29a;
    --warn: #e6b45c;
    --bad: #ff8a80;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: var(--accent); }

main {
  max-width: 60rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.125rem; margin: 2rem 0 0.75rem; }

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

.top {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.top .brand { font-weight: 650; color: var(--text); text-decoration: none; }
.top nav { display: flex; gap: 1rem; flex: 1; flex-wrap: wrap; }
.top nav a { color: var(--muted); text-decoration: none; padding: 0.25rem 0; }
.top nav a[aria-current="page"] { color: var(--text); border-bottom: 2px solid var(--accent); }
.top form { margin: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.narrow { max-width: 22rem; margin: 12vh auto 0; }

label { display: block; font-weight: 600; margin: 0.75rem 0 0.25rem; }

input[type="password"],
input[type="text"],
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
}

button {
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  min-height: 2.75rem;
  font: inherit;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
button.quiet {
  margin: 0;
  min-height: 0;
  padding: 0.25rem 0.5rem;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  font-weight: 500;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.notice {
  margin: 0 0 1rem;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.notice.error { color: var(--bad); border-color: var(--bad); }
.notice.ok { color: var(--ok); border-color: var(--ok); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { font-size: 0.8125rem; color: var(--muted); font-weight: 600; }

.status { font-weight: 600; white-space: nowrap; }
.status.done, .status.ready { color: var(--ok); }
.status.failed { color: var(--bad); }
.status.running, .status.queued, .status.missing { color: var(--warn); }
