:root {
  --ink: #172019;
  --muted: #6f7d75;
  --line: #dce3dd;
  --green: #1f6548;
  --green-dark: #164b36;
  --soft: #edf4ef;
  --danger: #a24b43;
}

* { box-sizing: border-box; }

html, body {
  min-height: 100%;
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 12%, rgba(75, 139, 103, .14), transparent 28rem),
    #f2f4f0;
}

button, input { font: inherit; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
}

.auth-card {
  width: min(100%, 460px);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 22px 60px rgba(31, 52, 39, .10);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 25px;
}

.auth-brand > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: #193c2b;
  font: 800 23px Georgia, serif;
}

.auth-brand b, .auth-brand small { display: block; }
.auth-brand b { font-size: 17px; }
.auth-brand small { margin-top: 3px; color: var(--muted); font-size: 10px; letter-spacing: .13em; }

.eyebrow { color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 6px 0 9px; font-size: 26px; letter-spacing: -.03em; }
.lead { margin: 0 0 22px; color: var(--muted); font-size: 12px; line-height: 1.7; }

.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; gap: 7px; }
.auth-form label > span { color: #4e5d54; font-size: 11px; font-weight: 700; }
.auth-form input {
  width: 100%;
  height: 43px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  outline: none;
}
.auth-form input:focus { border-color: #75a58a; box-shadow: 0 0 0 4px var(--soft); }

.auth-button {
  height: 44px;
  margin-top: 3px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--green);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 9px 22px rgba(31, 101, 72, .18);
}
.auth-button:hover { background: var(--green-dark); }
.auth-button:disabled { opacity: .55; cursor: wait; }

.message { min-height: 18px; margin: 13px 0 0; color: var(--danger); font-size: 11px; line-height: 1.55; }
.message.success { color: var(--green); }

.security-note, .setup-note {
  margin-top: 22px;
  padding: 13px 14px;
  border-radius: 11px;
  color: var(--muted);
  background: var(--soft);
  font-size: 10px;
  line-height: 1.65;
}
.security-note b, .setup-note b { color: var(--ink); }
.setup-note code { display: block; margin-top: 7px; color: #234c38; overflow-wrap: anywhere; }

.setup-result[hidden], .setup-form[hidden] { display: none; }
.setup-result { text-align: center; }
.setup-result h2 { margin: 8px 0; font-size: 21px; }
.setup-result > p { color: var(--muted); font-size: 11px; line-height: 1.6; }
.qr-frame {
  display: inline-grid;
  place-items: center;
  margin: 10px auto 15px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.qr-frame img { display: block; width: 220px; height: 220px; }
.secret-block { margin-bottom: 15px; padding: 11px; border-radius: 9px; background: #f3f5f2; }
.secret-block span, .secret-block code { display: block; }
.secret-block span { color: var(--muted); font-size: 9px; }
.secret-block code { margin-top: 5px; font-size: 13px; letter-spacing: .08em; overflow-wrap: anywhere; }

@media (max-width: 520px) {
  .auth-card { padding: 22px 18px; border-radius: 17px; }
}
