:root {
  --bg: #101114;
  --bg-2: #17181c;
  --card: #1d1f26;
  --line: #2e323c;
  --text: #f0f1f4;
  --muted: #8d93a1;
  --accent: #e11d2e;
  --accent-2: #ff4d5a;
  --ok: #3ecf8e;
  --wait: #c9b458;
  --run: #6aa6ff;
  --err: #ff6b6b;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  background:
    radial-gradient(1200px 500px at 10% -10%, #3a1014 0%, transparent 55%),
    var(--bg);
  color: var(--text);
}

a { color: inherit; }
.shell { max-width: 1100px; margin: 0 auto; padding: 28px 20px 64px; }
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.brand.big { font-size: 22px; margin-bottom: 8px; }
.mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--accent);
  border-radius: 8px;
  font-size: 12px;
}
nav { display: flex; align-items: center; gap: 18px; color: var(--muted); }
nav a.on, nav a:hover { color: var(--text); text-decoration: none; }
nav a { text-decoration: none; }
.linkish, .btn, .primary {
  font: inherit;
  cursor: pointer;
}
.linkish {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 0;
}
.linkish:hover { color: var(--text); }

.flash {
  background: #2a1c14;
  border: 1px solid #5a2e24;
  color: #ffd0c8;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 18px;
  align-items: start;
}
.narrow { max-width: 520px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
h1 { font-size: 18px; margin: 0 0 4px; font-weight: 600; }
.muted { color: var(--muted); margin: 0; }
.empty { padding: 20px 0; }

label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
input[type="url"], input[type="password"], select {
  font: inherit;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
input:focus, select:focus { outline: 2px solid #5a1a22; border-color: var(--accent); }

.primary {
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 10px;
  padding: 11px 14px;
  font-weight: 600;
}
.primary:hover { background: var(--accent-2); }

.auth { min-height: 70vh; display: grid; place-items: center; }
.auth .card { width: min(420px, 100%); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 8px; vertical-align: top; }
th { color: var(--muted); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
tr + tr td { border-top: 1px solid var(--line); }
.title { font-weight: 500; }
.meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; }
.chip {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.status { font-size: 13px; font-weight: 500; }
.status.wait { color: var(--wait); }
.status.run { color: var(--run); }
.status.ok { color: var(--ok); }
.status.err { color: var(--err); }
.err-text { max-width: 280px; white-space: pre-wrap; word-break: break-word; }
.bar {
  margin-top: 6px;
  height: 6px;
  background: #2a2d36;
  border-radius: 99px;
  overflow: hidden;
  width: 140px;
}
.bar i { display: block; height: 100%; background: var(--run); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn {
  display: inline-block;
  text-decoration: none;
  background: #2a2e38;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
}
.btn.ghost { background: transparent; color: var(--muted); }
.btn:hover { border-color: #4a5160; }

.choice {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
}
.choice input { margin-top: 4px; }
.choice em { display: block; color: var(--muted); font-style: normal; font-size: 13px; }

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .top { flex-wrap: wrap; }
}
