:root {
  --bg: #f5f6f8;
  --text: #111111;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #111111;
  --accent-soft: #f3f4f6;
  --brand: #2b7dff;
  --ok: #047857;
  --danger: #dc2626;
  --shadow: 0 16px 40px rgba(17, 17, 17, 0.08);
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 50% -8%, #eef2ff 0%, transparent 58%),
    #f5f6f8;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 6vw 0;
  flex-shrink: 0;
}
.brand { display: flex; align-items: center; gap: 8px; }
.logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
  background: transparent;
}
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: 0.02em; }
.pill {
  border: 1px solid #111;
  background: #111;
  color: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
}
.pill:hover { background: #333; }
.stage {
  max-width: 760px;
  margin: 12px auto 0;
  padding: 0 20px 8px;
  text-align: center;
  flex: 1;
}
.kicker {
  margin: 0 0 10px;
  color: #6b7280;
  font-size: 12px;
  letter-spacing: 0.16em;
  font-weight: 600;
}
.stage h1 {
  margin: 0 0 20px;
  font-size: 26px;
  line-height: 1.4;
}

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0 auto 16px;
  padding: 0;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 17px;
  height: 2px;
  background: var(--line);
  z-index: 0;
}
.steps li {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}
.steps i {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff;
  border: 2px solid var(--line);
  font-style: normal;
  font-weight: 700;
  font-size: 13px;
}
.steps b { font-size: 13px; color: var(--text); font-weight: 650; }
.steps span { font-size: 12px; }
.steps li.is-current i {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.steps li.is-current b { color: var(--accent); }
.steps li.is-done i {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.steps.compact {
  max-width: 720px;
  margin: 0 auto 22px;
}
.steps.compact span { display: none; }

.auth-card {
  width: min(420px, 100%);
  margin: 0 auto;
  text-align: left;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 22px 22px 18px;
  border-top: 4px solid #111;
}
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f3f7f6;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 16px;
}
.tabs button {
  border: 0;
  background: transparent;
  padding: 9px;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
}
.tabs button.on {
  background: #fff;
  color: var(--text);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(15, 61, 51, 0.08);
}
label { display: block; margin-bottom: 12px; color: var(--muted); font-size: 13px; }
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"] {
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}
.auth-card input:focus { border-color: var(--accent); }
.pwd-wrap { position: relative; display: block; }
.pwd-wrap input { padding-right: 52px; }
.code-row { display: flex; gap: 8px; margin-top: 6px; }
.code-row input { flex: 1; margin: 0 !important; }
.ghost-btn {
  flex-shrink: 0;
  border: 1px solid #111;
  background: #fff;
  color: #111;
  border-radius: 8px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 13px;
}
.ghost-btn:disabled { color: var(--muted); border-color: var(--line); cursor: not-allowed; }
.eye {
  position: absolute;
  right: 8px;
  top: 16px;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}
.agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 14px;
}
.agree input { margin-top: 2px; }
.submit {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}
.submit:hover { filter: brightness(1.05); }
.switch { text-align: center; color: var(--muted); font-size: 13px; }
.switch a { color: var(--brand); text-decoration: none; }

.dash { max-width: 880px; margin: 12px auto 0; padding: 0 20px 16px; flex: 1; }
.grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 16px; }
.panel {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 20px 22px;
}
.stat em { display: block; font-style: normal; font-size: 48px; margin: 6px 0; color: var(--accent); }
.hint, .stat span, .stat small { color: var(--muted); }
.key-row { display: flex; gap: 8px; align-items: center; }
code {
  flex: 1;
  overflow: auto;
  padding: 10px 12px;
  background: #f6f7f9;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}
.text-btn {
  margin-top: 12px;
  border: 0;
  background: none;
  color: var(--danger);
  cursor: pointer;
  padding: 0;
}
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pack {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px;
}
.pack b { display: block; font-size: 28px; margin: 8px 0; }
.pack p { color: var(--muted); margin: 0 0 14px; }
.pack button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 10px;
  background: #111;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.pack button:hover { background: #333; color: #fff; }
h2 { font-size: 18px; margin: 28px 0 12px; }
h3 { margin: 0 0 6px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 4px; border-bottom: 1px solid var(--line); color: var(--muted); }
.plus { color: var(--ok); }
.minus { color: var(--danger); }
.msg { min-height: 18px; color: #b45309; font-size: 13px; }
.hidden { display: none !important; }
footer {
  text-align: center;
  padding: 10px 16px 14px;
  color: #8a9a95;
  font-size: 12px;
  margin-top: auto;
  flex-shrink: 0;
}
footer a { color: #8a9a95; text-decoration: none; margin-left: 12px; }
footer a:hover { color: var(--brand); }
@media (max-width: 800px) {
  .steps { grid-template-columns: 1fr 1fr; gap: 16px 8px; }
  .steps::before { display: none; }
  .grid, .packs { grid-template-columns: 1fr; }
  .stage h1 { font-size: 22px; }
}
