:root {
  --bg0: #0f1419;
  --bg1: #1a2332;
  --bg2: #243044;
  --ink: #e8eef6;
  --muted: #8b9bb0;
  --accent: #3d9a7a;
  --accent2: #e6a756;
  --danger: #d46a6a;
  --line: rgba(232, 238, 246, 0.12);
  --radius: 14px;
  --font: "DM Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Instrument Serif", "Songti SC", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(61, 154, 122, 0.22), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(230, 167, 86, 0.14), transparent 50%),
    linear-gradient(165deg, var(--bg0), var(--bg1) 45%, #121820);
  background-attachment: fixed;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: rgba(0,0,0,0.28);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 20, 25, 0.72);
}
.brand {
  font-family: var(--display);
  font-size: 1.55rem;
  color: var(--ink);
  letter-spacing: 0.02em;
  text-decoration: none;
}
.nav { display: flex; gap: 1rem; align-items: center; font-size: 0.95rem; }

.wrap {
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}
.wrap.narrow { width: min(420px, calc(100% - 2rem)); }

.hero {
  margin-bottom: 1.75rem;
  animation: rise 0.7s ease both;
}
.eyebrow {
  margin: 0 0 0.4rem;
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0 0 0.6rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  line-height: 1.1;
}
.lede {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 36em;
}

.panel {
  background: rgba(26, 35, 50, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.25rem;
  animation: rise 0.75s ease 0.08s both;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}
.section-head h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.9rem; }
.field span { font-size: 0.85rem; color: var(--muted); }
.field.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 0.75rem; flex-wrap: wrap; }

input, select, textarea, button {
  font: inherit;
  color: var(--ink);
}
input, select, textarea {
  width: 100%;
  background: var(--bg0);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(61, 154, 122, 0.65);
  box-shadow: 0 0 0 3px rgba(61, 154, 122, 0.18);
}
textarea { resize: vertical; min-height: 96px; }

.actions { display: flex; gap: 0.65rem; flex-wrap: wrap; margin-top: 0.4rem; }
.btn {
  border: 1px solid var(--line);
  background: var(--bg2);
  border-radius: 999px;
  padding: 0.65rem 1.2rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(135deg, #2f8f70, #3d9a7a 40%, #4bb08a);
  border-color: transparent;
  color: #06140f;
  font-weight: 700;
}
.btn.ghost { background: transparent; }
.btn.sm { padding: 0.35rem 0.75rem; font-size: 0.85rem; }

.adv { margin: 0.4rem 0 0.9rem; color: var(--muted); }
.adv summary { cursor: pointer; margin-bottom: 0.5rem; }
.hint { color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.muted { color: var(--muted); }
.err { color: var(--danger); }

.banner {
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  animation: rise 0.6s ease both;
}
.banner.warn {
  background: rgba(230, 167, 86, 0.12);
  border-color: rgba(230, 167, 86, 0.35);
  color: #f0d4a8;
}

.jobs { display: flex; flex-direction: column; gap: 0.75rem; }
.job {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: rgba(0,0,0,0.18);
  transition: border-color 0.2s ease;
}
.job.focus { border-color: rgba(61, 154, 122, 0.7); }
.job-title {
  font-weight: 700;
  margin: 0 0 0.25rem;
  word-break: break-word;
}
.job-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.55rem;
  word-break: break-all;
}
.bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #6bc4a4);
  border-radius: inherit;
  transition: width 0.35s ease;
}
.job.done .bar > i { background: linear-gradient(90deg, #3d9a7a, var(--accent2)); }
.job.error .bar > i { background: var(--danger); width: 100% !important; }
.job-foot {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.5rem;
  font-size: 0.88rem;
  flex-wrap: wrap;
}
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid var(--line);
}
.badge.queued { color: var(--muted); }
.badge.running { color: #7fd0b2; border-color: rgba(61,154,122,0.4); }
.badge.done { color: var(--accent2); border-color: rgba(230,167,86,0.4); }
.badge.error { color: var(--danger); border-color: rgba(212,106,106,0.45); }

.toast {
  position: sticky;
  top: 4.2rem;
  z-index: 20;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(61,154,122,0.95), rgba(47,120,95,0.95));
  color: #04140e;
  font-weight: 700;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  animation: slideIn 0.45s ease both;
}
.toast a { color: #062018; font-weight: 800; }

.foot {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0 1rem 2.5rem;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 560px) {
  .hero h1 { font-size: 2rem; }
  .row { flex-direction: column; }
}
