:root {
  --pink: #ff315c;
  --pink-soft: #ff6d91;
  --pink-deep: #f52f62;
  --wechat: #12c665;
  --text: #333333;
  --muted: #8f96a3;
  --line: #e8edf4;
  --link: #4c8ff7;
  --shadow-pink: 0 12px 24px rgba(255, 49, 92, 0.24);
  --shadow-green: 0 12px 24px rgba(18, 198, 101, 0.22);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
}

body {
  overflow-x: hidden;
  background: #ffffff;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.42;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: var(--link);
  text-decoration: none;
}

.login-page {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  background: #ffffff;
}

.login-navbar {
  position: relative;
  display: flex;
  height: 50px;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--pink) 0%, #ff4e7a 100%);
  color: #ffffff;
}

.login-navbar h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
}

.nav-back {
  position: absolute;
  left: 12px;
  top: 50%;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 50%;
  background: transparent;
  color: #ffffff;
}

.nav-back svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-back:active {
  opacity: .72;
}

.login-main {
  min-height: calc(100vh - 50px);
  padding: 54px 45px 32px;
}

.brand-panel {
  display: flex;
  justify-content: center;
  margin-bottom: 36px;
}

.brand-logo {
  display: block;
  width: 210px;
  max-width: 100%;
  height: auto;
}

.login-panel {
  display: grid;
  gap: 22px;
}

.wechat-login,
.primary-login {
  display: inline-flex;
  width: 100%;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.wechat-login {
  gap: 8px;
  background: var(--wechat);
  box-shadow: var(--shadow-green);
}

.wechat-login img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

.primary-login {
  margin-top: 16px;
  background: linear-gradient(135deg, #ff6b91 0%, #ff5a87 45%, var(--pink-deep) 100%);
  box-shadow: var(--shadow-pink);
}

.wechat-login:active,
.primary-login:active {
  transform: translateY(1px);
}

.primary-login[disabled],
.resend-code[disabled] {
  cursor: default;
  opacity: .58;
  transform: none;
}

.login-form {
  display: grid;
  gap: 14px;
}

.field-box {
  position: relative;
  display: flex;
  width: 100%;
  height: 48px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(35, 42, 55, 0.04);
}

.field-box:focus-within {
  border-color: rgba(255, 49, 92, 0.36);
  box-shadow: 0 0 0 3px rgba(255, 49, 92, 0.08);
}

.field-icon {
  flex: 0 0 auto;
  margin-left: 16px;
}

.phone-icon {
  width: 12px;
  height: 18px;
  border: 2px solid #c9d1df;
  border-radius: 3px;
}

.phone-icon::after {
  display: block;
  width: 3px;
  height: 3px;
  margin: 11px auto 0;
  border-radius: 50%;
  background: #c9d1df;
  content: "";
}

.code-icon {
  position: relative;
  width: 16px;
  height: 16px;
  border: 2px solid #c9d1df;
  border-radius: 50%;
}

.code-icon::before,
.code-icon::after {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  margin: 0;
  background: #c9d1df;
  content: "";
  transform: translate(-50%, -50%);
}

.code-icon::before {
  width: 8px;
  height: 2px;
}

.code-icon::after {
  width: 2px;
  height: 8px;
}

.lock-icon {
  width: 16px;
  height: 13px;
  margin-top: 5px;
  border: 2px solid #c9d1df;
  border-radius: 3px;
}

.lock-icon::before {
  display: block;
  width: 10px;
  height: 9px;
  margin: -11px auto 0;
  border: 2px solid #c9d1df;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  content: "";
}

.field-box input {
  min-width: 0;
  flex: 1 1 auto;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
}

.field-box input::placeholder {
  color: #a8afbc;
}

.plain-field-action,
.resend-code {
  flex: 0 0 auto;
  margin-right: 12px;
  padding: 0;
  background: transparent;
  color: var(--link);
  font-size: 13px;
}

.password-eye {
  display: inline-grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  margin-right: 3px;
  padding: 0;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: #a8afbc;
}

.password-eye svg {
  grid-area: 1 / 1;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.password-eye .eye-off,
.password-eye.is-visible .eye-open {
  display: none;
}

.password-eye.is-visible .eye-off {
  display: block;
}

.password-eye:focus-visible {
  outline: 2px solid rgba(255, 49, 92, 0.32);
  outline-offset: 2px;
}

.password-eye:active {
  color: var(--pink);
}

.code-box input {
  max-width: 118px;
}

.form-message {
  min-height: 18px;
  margin: -2px 0 0;
  color: var(--pink);
  font-size: 12px;
  text-align: center;
}

.form-message.success {
  color: #18a058;
}

.mode-links {
  display: flex;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 12px;
}

.mode-links button {
  padding: 0;
  background: transparent;
  color: var(--link);
  font-size: 14px;
}

.mode-links span {
  width: 1px;
  height: 14px;
  background: #d5dbe5;
}

.mode-links span:empty {
  display: none;
}

.agreement-area {
  margin-top: 34px;
  text-align: center;
}

.agreement-area p {
  margin: 0 0 7px;
  color: #7d8490;
  font-size: 12px;
}

.agreement-area a {
  margin: 0 3px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 70px;
  z-index: 50;
  max-width: min(320px, calc(100vw - 48px));
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(23, 26, 31, 0.88);
  color: #ffffff;
  font-size: 13px;
  line-height: 18px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity .18s ease, transform .18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.check-in-login-dialog {
  width: min(380px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(58, 30, 18, .32);
}

.check-in-login-dialog::backdrop {
  background: rgba(17, 20, 27, .58);
  backdrop-filter: blur(3px);
}

.check-in-login-card {
  position: relative;
  padding: 34px 24px 24px;
  text-align: center;
  background: linear-gradient(180deg, #fff7ed, #fff);
}

.check-in-login-card h2 {
  margin: 14px 0 8px;
  font-size: 22px;
}

.check-in-login-card > p {
  color: #777;
  line-height: 1.65;
}

.check-in-login-card strong {
  color: #ff6a2f;
}

.check-in-login-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .78);
  color: #777;
  cursor: pointer;
}

.check-in-login-close svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.check-in-login-icon {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, #ff6a2f, #ffb221);
  color: #fff;
  box-shadow: 0 12px 28px rgba(255, 106, 47, .28);
  font-size: 26px;
  font-weight: 800;
}

.check-in-primary {
  width: 100%;
  min-height: 54px;
  margin-top: 16px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(90deg, #ff6a2f, #ff9f1f);
  font-size: 18px;
  font-weight: 700;
}

.check-in-primary:disabled {
  background: #e8e8e8;
  color: #999;
}

@media (max-width: 390px) {
  .login-main {
    padding-right: 45px;
    padding-left: 45px;
  }
}

@media (max-width: 340px) {
  .login-main {
    padding-right: 28px;
    padding-left: 28px;
  }

  .brand-logo {
    width: 190px;
  }
}
