:root {
  --bg: #f4f6f8; --surface: #ffffff; --ink: #0e1a24; --muted: #4f5f6c; --subtle: #8a99a6;
  --line: #d5dde3; --primary: #245399; --primary-tint: #e8eff9; --ok: #17693a; --ok-tint: #ddf3e4;
  --bad: #a8261c; --bad-tint: #f9dedc; --warn-tint: #fff4d6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10171d; --surface: #182129; --ink: #e8edf1; --muted: #a5b2bd; --subtle: #7c8a96;
    --line: #2c3842; --primary: #8db4ec; --primary-tint: #1d2c40; --ok: #7fd6a0; --ok-tint: #17301f;
    --bad: #f0a097; --bad-tint: #3a1f1c; --warn-tint: #38300f;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--primary); }
h1 { font-size: 24px; line-height: 1.25; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 16px 0 6px; color: var(--muted); font-weight: 600; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

header.top { background: var(--surface); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 18px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; margin-right: auto; }
nav a { text-decoration: none; color: var(--muted); margin-right: 14px; }
nav a:hover { color: var(--primary); }
.wrap { max-width: 1080px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
main.wrap { padding-top: 22px; padding-bottom: 48px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin-bottom: 16px; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 13px; padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }

.badge { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--primary-tint); color: var(--primary); white-space: nowrap; }
.badge.done { background: var(--ok-tint); color: var(--ok); }
.badge.failed { background: var(--bad-tint); color: var(--bad); }
.bad { color: var(--bad); }

button, .btn { font: inherit; font-weight: 600; background: var(--primary); color: var(--surface); border: 0; border-radius: 8px; padding: 9px 16px; cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .btn:hover { opacity: .9; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
button.link { background: none; color: var(--muted); font-weight: 400; padding: 0; }

.upload { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
input[type=file] { font: inherit; max-width: 100%; color: var(--muted); }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 3px; }
input[type=text], select { width: 100%; font: inherit; color: var(--ink); background: var(--surface); padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 16px; margin-bottom: 16px; }

.notice { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; background: var(--primary-tint); }
.notice.bad { background: var(--bad-tint); color: var(--bad); }
.notice.ok { background: var(--ok-tint); color: var(--ok); }
.notice.warn { background: var(--warn-tint); color: var(--ink); }

.steps { list-style: none; padding: 0; margin: 0; }
.steps li { padding: 5px 0 5px 24px; position: relative; color: var(--subtle); }
.steps li::before { content: ""; position: absolute; left: 4px; top: 12px; width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.steps li.done { color: var(--muted); }
.steps li.done::before { background: var(--ok); }
.steps li.now { color: var(--ink); font-weight: 600; }
.steps li.now::before { background: var(--primary); }

.kv { display: grid; grid-template-columns: minmax(120px, 190px) 1fr; gap: 3px 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.files { display: flex; flex-wrap: wrap; gap: 10px; }

.login { max-width: 460px; margin: 10vh auto 0; }
@media (max-width: 560px) {
  .kv { grid-template-columns: 1fr; }
  .kv dd { margin-bottom: 8px; }
}
