/* Đăng nhập · Đăng ký · Xác thực OTP — một khối giữa màn hình */

.auth-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 52px 20px 8px;
  /* viewport trừ header (64px) + footer ước chừng; màn thấp thì padding giữ nhịp */
  min-height: calc(100vh - 560px);
  min-height: calc(100svh - 560px);
}
.page-auth .site-footer {
  margin-top: 56px;
}

.auth-box {
  position: relative;
  width: 100%;
  max-width: 460px;
  padding: 28px 22px 26px;
}

/* Mèo ló đầu qua mép khung — trang auth không có mascot đi dạo */
.auth-peek {
  position: absolute;
  top: -42px;
  right: 12px;
  width: 72px;
  height: auto;
  transform: rotate(7deg);
  filter: drop-shadow(0 6px 14px rgba(167, 139, 201, 0.3));
  pointer-events: none;
}

.auth-head {
  text-align: center;
  margin-bottom: 22px;
}
.auth-logo {
  margin: 0 auto 10px;
  filter: drop-shadow(0 2px 8px rgba(167, 139, 201, 0.35));
}
.auth-head h1 {
  font-size: 1.45rem;
  margin-bottom: 6px;
}
.auth-lead {
  font-size: 0.95rem;
  margin: 0;
}
.auth-email {
  color: var(--primary-deep);
  word-break: break-all;
}

/* ---------- thông báo lỗi / tin vui ---------- */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.93rem;
  line-height: 1.5;
}
.auth-alert .icon {
  margin-top: 3px;
}
.auth-alert-error {
  background: var(--pink-soft);
  color: #a04c6e;
}
.auth-alert-info {
  background: var(--mint);
  color: var(--mint-deep);
}

/* ---------- form ---------- */
.auth-form {
  display: grid;
  gap: 16px;
}
.auth-field {
  display: grid;
  gap: 7px;
}
.auth-field label {
  font-size: 0.95rem;
}
.auth-hint {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink-soft);
}
.auth-submit {
  width: 100%;
  margin-top: 2px;
}

/* ô nhập mã 6 số */
.auth-otp {
  font-family: var(--font-head);
  font-size: 1.85rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.42em;
  padding-top: 10px;
  padding-bottom: 10px;
  /* bù khoảng letter-spacing thừa sau ký tự cuối cho cân giữa */
  padding-left: calc(18px + 0.42em);
}

.auth-resend {
  margin-top: 12px;
}
.auth-resend .btn {
  width: 100%;
}

/* ---------- quyền lợi khi có tài khoản ---------- */
.auth-perks {
  margin-top: 22px;
  padding: 16px 18px 18px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
}
.auth-perks h2 {
  font-size: 0.98rem;
  margin-bottom: 10px;
}
.auth-perks ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}
.auth-perks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.auth-perks li .icon {
  margin-top: 3px;
  color: var(--primary-deep);
}
.auth-perks li:nth-child(2) .icon {
  color: #a04c6e;
}
.auth-perks li:nth-child(3) .icon {
  color: var(--butter-deep);
}
.auth-perks li:nth-child(4) .icon {
  color: var(--mint-deep);
}

/* ---------- link đổi trang dưới cùng ---------- */
.auth-alt {
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  text-align: center;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.auth-alt a {
  font-weight: 700;
}

/* ---------- responsive ---------- */
@media (min-width: 720px) {
  .auth-wrap {
    padding: 60px 20px 12px;
  }
  .auth-box {
    padding: 34px 32px 30px;
  }
  .auth-peek {
    top: -48px;
    right: 16px;
    width: 88px;
  }
  .auth-head h1 {
    font-size: 1.62rem;
  }
}
