:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #15181d;
  --muted: #5d6573;
  --line: #dde1e7;
  --accent: #4f5bd5;
  --accent-ink: #ffffff;
  --good: #1c7c4a;
  --bad: #b3261e;
  --radius: 10px;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #181b21;
    --ink: #e8eaee;
    --muted: #9aa2b1;
    --line: #2a2f38;
    --accent: #8b93ff;
    --accent-ink: #0f1115;
    --good: #5fd08f;
    --bad: #ff8a80;
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--sans); background: var(--bg); color: var(--ink); line-height: 1.5; min-height: 100vh; }
a { color: var(--accent); }
.wrap { max-width: 820px; margin: 0 auto; padding: 0 16px; }

header.bar { border-bottom: 1px solid var(--line); background: var(--surface); }
header.bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { font-weight: 700; letter-spacing: .01em; text-decoration: none; color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; font-size: .9rem;
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .5; cursor: default; }
.btn:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.hero { padding: 72px 0 48px; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.15; margin-bottom: 12px; }
.hero p { color: var(--muted); max-width: 56ch; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.login { max-width: 380px; margin: 80px auto; }
.logos {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  background: #ffffff; border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 16px; margin-bottom: 18px;
}
.logo-arcium { width: auto; height: 36px; max-width: 70%; }
.logo-discord { width: 34px; height: 34px; flex: none; }
.logo-x { color: #6d7480; font-size: 1.1rem; }
.login h1 { font-size: 1.3rem; margin-bottom: 4px; }
.login p { color: var(--muted); font-size: .9rem; margin-bottom: 16px; }
label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
input[type=password], textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
textarea { min-height: 84px; resize: vertical; }
.login .btn { width: 100%; margin-top: 14px; }
.error { color: var(--bad); font-size: .88rem; min-height: 1.3em; margin-top: 10px; }

main.manager { padding: 28px 0 64px; }
.manager h1 { font-size: 1.4rem; }
.sub { color: var(--muted); font-size: .9rem; margin: 4px 0 20px; }
.add { margin-bottom: 24px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.count { color: var(--muted); font-size: .8rem; }
.status { font-size: .88rem; min-height: 1.3em; margin-bottom: 12px; }
.status.ok { color: var(--good); }
.status.bad { color: var(--bad); }

ul.tips { list-style: none; display: grid; gap: 10px; }
.tip { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.tip.off { opacity: .6; }
.tip .text { white-space: pre-wrap; word-break: break-word; }
.tip .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tip .meta .spacer { flex: 1; }
.tag { font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.tag.on { color: var(--good); border-color: currentColor; }
.empty { color: var(--muted); text-align: center; padding: 32px 0; }

.test { margin-bottom: 32px; }
.test h2 { font-size: 1.1rem; }
.test .sub { margin-bottom: 14px; }
.test-buttons { justify-content: flex-start; margin: 0 0 10px; }
ul.jobs { list-style: none; display: grid; gap: 8px; }
.job { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--bg); }
.job summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.job summary::-webkit-details-marker { display: none; }
.job .name { font-weight: 600; font-family: ui-monospace, Consolas, monospace; font-size: .9rem; }
.job .meta { color: var(--muted); font-size: .85rem; margin-left: auto; }
.job pre { margin-top: 10px; max-height: 260px; overflow: auto; font-size: .78rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; color: var(--muted); }
.tag.running { color: var(--accent); border-color: currentColor; }
.tag.failed { color: var(--bad); border-color: currentColor; }
.tag.empty { color: var(--muted); }
