:root {
  --bg: #f4f3ef;
  --card: #ffffff;
  --text: #1c1c1a;
  --muted: #6b6a65;
  --line: #e3e1da;
  --accent: #185fa5;
  --accent-bg: #e6f1fb;
  --good: #3b6d11;
  --good-bg: #eaf3de;
  --warn: #854f0b;
  --warn-bg: #faeeda;
  --bad: #a32d2d;
  --bad-bg: #fcebeb;
  --gray-bg: #f1efe8;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161615;
    --card: #222220;
    --text: #f1efe8;
    --muted: #a3a29b;
    --line: #35342f;
    --accent: #85b7eb;
    --accent-bg: #0c447c;
    --good: #c0dd97;
    --good-bg: #27500a;
    --warn: #fac775;
    --warn-bg: #633806;
    --bad: #f7c1c1;
    --bad-bg: #791f1f;
    --gray-bg: #2c2c2a;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.hidden { display: none !important; }
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
h1 { font-size: 22px; font-weight: 600; margin: 0 0 16px; }
h2 { font-size: 17px; font-weight: 600; margin: 0 0 12px; }
h3 { font-size: 15px; font-weight: 600; margin: 18px 0 6px; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--bad); font-size: 14px; min-height: 0; margin: 8px 0 0; }
.error:empty { display: none; }

header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--card);
  position: sticky; top: 0; z-index: 5;
}
.brand { font-weight: 600; flex: 1; white-space: nowrap; }
@media (max-width: 600px) {
  header { flex-wrap: wrap; row-gap: 4px; }
  .worker { order: 3; flex-basis: 100%; font-size: 13px; }
}
.worker { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); display: inline-block; }
.worker.on .dot { background: #4a9e2f; }
.worker.off .dot { background: #d0453f; }
.worker.warn .dot { background: #e0a020; }
.worker.warn { color: var(--warn); }

main { max-width: 860px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.login-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 8px; }

input[type=password], textarea {
  width: 100%; font: inherit; color: inherit; background: transparent;
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
textarea { resize: vertical; min-height: 76px; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
button {
  font: inherit; color: inherit; background: transparent; cursor: pointer;
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px;
}
button:hover { background: var(--gray-bg); }
button.primary { background: var(--text); color: var(--card); border-color: var(--text); }
button.primary:hover { opacity: .88; background: var(--text); }
button.ghost { border-color: transparent; color: var(--muted); }
button:disabled { opacity: .5; cursor: default; }

.kinds { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; font-size: 15px; }
.kinds label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.attach { font-size: 14px; color: var(--accent); cursor: pointer; }
.attach input { display: none; }

.task {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-top: 1px solid var(--line); cursor: pointer;
}
.task:first-child { border-top: none; }
.task:hover .task-title { text-decoration: underline; }
.task-main { flex: 1; min-width: 0; }
.task-title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task.active { background: var(--gray-bg); margin: 0 -18px; padding: 12px 18px; }

.badge { font-size: 12px; padding: 3px 10px; border-radius: 8px; white-space: nowrap; background: var(--gray-bg); color: var(--muted); }
.badge.run { background: var(--accent-bg); color: var(--accent); }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }

.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.detail-head h2 { margin: 0; }
.request { background: var(--gray-bg); border-radius: 8px; padding: 10px 12px; font-size: 14px; white-space: pre-wrap; margin: 12px 0; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.metric { background: var(--gray-bg); border-radius: 8px; padding: 10px 12px; }
.metric .label { font-size: 13px; color: var(--muted); }
.metric .value { font-size: 22px; font-weight: 600; }

.checks { list-style: none; padding: 0; margin: 0; }
.checks li { display: flex; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 15px; }
.checks li:first-child { border-top: none; }
.mark { width: 22px; flex: none; font-weight: 700; text-align: center; }
.mark.pass { color: var(--good); }
.mark.fail { color: var(--bad); }
.mark.skip { color: var(--warn); }
.check-details { font-size: 13px; color: var(--muted); }
ul.plain { margin: 0; padding-left: 20px; font-size: 15px; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.actions a { color: inherit; text-decoration: none; }
.shot { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; display: block; }
.log { font-size: 13px; color: var(--muted); max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.log div { padding: 2px 0; white-space: pre-wrap; }
.log .t { color: var(--text); margin-right: 8px; font-variant-numeric: tabular-nums; }
.rework { margin-top: 12px; }
