:root {
  --bg: #0d1117;
  --panel: #161b22;
  --panel-2: #1c2330;
  --line: #2a3240;
  --text: #e6edf3;
  --muted: #8b98a8;
  --accent: #3fb950;
  --accent-2: #2ea043;
  --warn: #d29922;
  --error: #f85149;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(900px 500px at 50% -200px, #18222f, var(--bg)) no-repeat, var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}
.wrap { width: 100%; max-width: 880px; margin: 0 auto; padding: 0 16px; }
header { border-bottom: 1px solid var(--line); background: #0b0f14cc; backdrop-filter: blur(6px); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { font-weight: 700; letter-spacing: .04em; color: var(--accent); }
.who { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.who form { margin: 0; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 14px; }
.link:hover { color: var(--text); }
main { padding: 24px 16px 8px; }
footer { color: var(--muted); font-size: 13px; padding: 24px 16px 40px; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px; margin-bottom: 18px;
}
.login { max-width: 460px; margin: 48px auto; text-align: center; }
.login h1 { margin: 0 0 8px; font-size: 22px; }
.login p { color: var(--muted); }

label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
label small { font-weight: 400; color: var(--muted); }
textarea, select {
  width: 100%; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
  font: inherit; font-size: 15px;
}
textarea { resize: vertical; font-family: ui-monospace, "Cascadia Mono", monospace; font-size: 14px; }
textarea:focus, select:focus { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.field { flex: 1 1 180px; }
.field.grow { display: flex; align-items: flex-end; }
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none; text-align: center;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent-2); border-color: var(--accent); color: #06220c; width: 100%; }
.btn.primary:hover { background: var(--accent); }
.btn.small { padding: 5px 11px; font-size: 13px; font-weight: 500; }
.btn[disabled] { opacity: .55; cursor: default; }
.hint { min-height: 20px; margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.hint.ok { color: var(--accent); }
.hint.bad { color: var(--error); }
.error { color: var(--error); }

.meta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; font-size: 14px; color: var(--muted); }
.quota { flex: 1 1 260px; }
.bar-outer { height: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.bar-inner { height: 100%; width: 0; background: var(--accent-2); transition: width .4s; }
.bar-inner.warn { background: var(--warn); }
.bar-inner.full { background: var(--error); }
.queue { white-space: nowrap; }

#batches { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.batch {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 12px 14px;
}
.batch .title { font-weight: 600; }
.batch .sub { color: var(--muted); font-size: 13px; }

.jobs { display: flex; flex-direction: column; gap: 10px; }
.job {
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line);
  border-radius: 10px; padding: 12px 14px;
}
.job.running { border-left-color: var(--accent); }
.job.done { border-left-color: #2f5f8f; }
.job.error { border-left-color: var(--error); }
.job.queued { border-left-color: var(--warn); }
.job .head { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; }
.job .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job .tags { color: var(--muted); font-size: 13px; white-space: nowrap; }
.job .line { display: flex; gap: 10px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.job .line .grow { flex: 1 1 120px; }
.job .msg { font-size: 13px; color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; }
.job.error .msg { color: var(--error); }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.pill.cloud { border-color: #2f5f8f; color: #79b8ff; }
.actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.empty { color: var(--muted); text-align: center; padding: 24px; }
.note { color: var(--muted); font-size: 13px; margin-top: 22px; }
.note a { color: #79b8ff; }

@media (max-width: 560px) {
  .field { flex: 1 1 100%; }
  .job .head { flex-direction: column; gap: 2px; }
}
