:root {
  --primary: #257ed9;
  --primary-dark: #1e6fc0;
  --bg: #f0f5fb;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --ok: #16a34a;
  --err: #dc2626;
  --panel: #e6f0fc;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 10% -10%, #dbeafe 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #e0f2fe 0%, transparent 50%),
    var(--bg);
  min-height: 100%;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 36px 20px 48px;
}

.brand {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 22px;
}
.brand-mark {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(145deg, var(--primary), #0ea5e9);
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 18px;
  box-shadow: 0 8px 20px rgba(37, 126, 217, .28);
}
.brand h1 {
  margin: 0; font-size: 22px; letter-spacing: .02em;
}
.brand p {
  margin: 4px 0 0; color: var(--muted); font-size: 13px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
  overflow: hidden;
}

.steps {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 18px 22px;
  background: linear-gradient(90deg, #1e6fc0, var(--primary), #0ea5e9);
  color: #fff;
}
.step-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.12);
  font-size: 13px;
}
.step-pill.active { background: #fff; color: var(--primary); font-weight: 700; }
.step-pill.done { background: rgba(255,255,255,.28); }
.step-num {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.25); font-size: 12px; font-weight: 700;
}
.step-pill.active .step-num { background: var(--primary); color: #fff; }

.body { padding: 28px 26px 22px; }
.body h2 { margin: 0 0 8px; font-size: 20px; }
.body .sub { margin: 0 0 20px; color: var(--muted); line-height: 1.6; }

.check-list { list-style: none; padding: 0; margin: 0 0 18px; }
.check-list li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 14px; margin-bottom: 8px;
  border: 1px solid var(--border); border-radius: 10px;
  background: #f8fafc;
}
.badge {
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
}
.badge.ok { background: #dcfce7; color: var(--ok); }
.badge.err { background: #fee2e2; color: var(--err); }

label.field {
  display: block; margin-bottom: 14px;
}
label.field > span {
  display: block; margin-bottom: 6px; font-size: 13px; color: var(--muted);
}
input[type=text], input[type=password], input[type=number], textarea, select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  color: var(--text);
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,126,217,.15);
}

.dur-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}
.dur-grid label {
  display: flex; align-items: center; gap: 8px;
  padding: 12px; border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; background: #fff;
}
.dur-grid label:has(input:checked) {
  border-color: var(--primary);
  background: var(--panel);
}

.actions {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border);
}
.btn {
  border: none; border-radius: 10px; padding: 11px 18px;
  font: inherit; font-weight: 700; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary {
  background: #fff; color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-secondary:hover { background: var(--panel); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.alert {
  padding: 12px 14px; border-radius: 10px; margin-bottom: 16px;
  font-size: 14px; line-height: 1.5;
}
.alert.ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert.err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert.info { background: var(--panel); border: 1px solid #bfdbfe; color: #1e3a8a; }

.result-box {
  margin-top: 14px; padding: 14px 16px;
  background: #f8fafc; border: 1px dashed var(--primary);
  border-radius: 12px;
}
.result-box code {
  display: block; margin-top: 6px;
  font: 700 15px Consolas, Monaco, monospace;
  color: var(--primary); word-break: break-all; letter-spacing: .4px;
}

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.muted { color: var(--muted); font-size: 13px; }

@media (max-width: 640px) {
  .wrap { padding: 20px 12px 36px; }
  .body { padding: 20px 16px; }
  .actions { flex-direction: column-reverse; }
  .btn { justify-content: center; width: 100%; }
}
