
*, *::before, *::after { box-sizing: border-box; }
:root {
  --paper: #F4F6F2;
  --surface: #FFFFFF;
  --ink: #17221D;
  --muted: #6F7973;
  --line: #E2E6DF;
  --green: #1F5B43;
  --green-deep: #173C2F;
  --mint: #DFF2E4;
  --lime: #D9F36A;
  --orange: #F28B4B;
  --orange-soft: #FFF0E5;
  --red: #B94738;
  --red-soft: #FBE9E6;
  --soft-gray: #EEF0EC;
  --radius-card: 12px;
  --radius-btn: 10px;
}
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }


.auth-page {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 28px 18px calc(28px + env(safe-area-inset-bottom, 0px));
}
.auth-wrap { width: 100%; max-width: 460px; }
.auth-head { margin-bottom: 22px; }
.auth-kicker {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--green);
}
.auth-title {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
  color: var(--ink);
}
.auth-sub { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
@media (max-width: 480px) {
  .auth-page { align-items: flex-start; padding-top: 24px; }
  .auth-title { font-size: 27px; }
}


.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 20px 18px;
}


.auth-field { margin-bottom: 16px; }
.auth-label { display: block; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.auth-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.auth-input-wrap:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(31, 91, 67, .1);
}
.auth-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
}
.auth-input::placeholder { color: var(--muted); }
.auth-input-wrap.is-invalid { border-color: var(--red); }
.auth-input-wrap.is-invalid:focus-within { box-shadow: 0 0 0 4px rgba(185, 71, 56, .1); }
.auth-code-btn {
  flex: 0 0 auto;
  height: 34px;
  margin-right: -7px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: var(--mint);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.auth-code-btn:hover { filter: brightness(.98); }
.auth-code-btn:disabled { opacity: .55; cursor: not-allowed; }


.auth-eye {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-right: -6px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
}
.auth-eye:hover { background: var(--soft-gray); color: var(--ink); }
.auth-eye svg { width: 18px; height: 18px; }
.auth-eye .icon-on { display: none; }
.auth-eye[aria-pressed="true"] .icon-off { display: none; }
.auth-eye[aria-pressed="true"] .icon-on { display: block; }


.auth-error {
  margin: 6px 0 0;
  min-height: 16px;
  font-size: 11.5px;
  color: var(--red);
}


.auth-alert {
  display: none;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-btn);
  font-size: 13px;
  line-height: 1.5;
}
.auth-alert.is-show { display: flex; }
.auth-alert.is-ok { background: var(--mint); color: var(--green); }
.auth-alert.is-err { background: var(--red-soft); color: var(--red); }


.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  margin-top: 4px;
  border: 0;
  border-radius: var(--radius-btn);
  background: var(--green);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .3px;
  cursor: pointer;
  transition: filter .16s ease, opacity .16s ease;
}
.auth-btn:hover { filter: brightness(1.07); }
.auth-btn:active { filter: brightness(.96); }
.auth-btn:disabled { opacity: .6; cursor: not-allowed; }
.auth-btn.is-loading { opacity: .85; }
.auth-btn.is-ok { background: var(--lime); color: var(--green-deep); }


.auth-foot { margin: 18px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.auth-foot a { color: var(--green); font-weight: 700; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }
.auth-note { margin: 14px 0 0; text-align: center; font-size: 11px; color: var(--muted); }


.auth-closed {
  padding: 30px 18px;
  text-align: center;
}
.auth-closed-title { margin: 0; font-size: 18px; font-weight: 700; color: var(--ink); }
.auth-closed-hint { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

@media (min-width: 900px) {
  .auth-page { align-items: center; padding: 40px; }
  .auth-wrap {
    max-width: 980px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(390px, 430px);
    column-gap: 46px;
    align-items: center;
  }
  .auth-head {
    grid-column: 1;
    grid-row: 1 / span 3;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 430px;
    margin: 0;
    padding: 46px;
    border-radius: 16px;
    background: var(--green-deep);
  }
  .auth-kicker { color: var(--lime); }
  .auth-title { color: #fff; font-size: 42px; line-height: 1.12; }
  .auth-sub { color: rgba(255, 255, 255, .68); font-size: 14px; max-width: 360px; }
  .auth-card {
    grid-column: 2;
    grid-row: 1;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 20px 55px rgba(23, 34, 29, .1);
  }
  .auth-foot { grid-column: 2; grid-row: 2; margin-top: 18px; }
  .auth-note { grid-column: 2; grid-row: 3; margin-top: 8px; }
}
