/* Keep the same viewport-sized backdrop across login, registration and scrolling. */
html:has(.auth-page) {
  scrollbar-gutter: stable;
}
.auth-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: #e7f1ff url('/assets/auth-background.png') center center / cover no-repeat;
}
.auth-page {
  min-height: 100svh;
  position: relative;
  isolation: isolate;
  color: #071543;
  display: flex;
  flex-direction: column;
  font-family: Inter, 'Microsoft YaHei', 'PingFang SC', sans-serif;
  padding: 36px 4.2% 26px;
  box-sizing: border-box;
}
.auth-tagline {
  text-align: right;
  font-size: 14px;
  letter-spacing: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}
.auth-tagline span {
  height: 2px;
  width: 30px;
  background: linear-gradient(90deg, #0759ff, transparent);
}
.auth-layout {
  width: 100%;
  max-width: 1250px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8%;
  align-items: center;
  flex: 1;
  padding: 40px 0;
}
.auth-brand {
  align-self: start;
  padding-top: 45px;
}
.auth-wordmark {
  font-size: clamp(30px, 3vw, 46px);
  font-weight: 750;
  letter-spacing: 1px;
}
.auth-rule {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, #095aff, #b6d0ff);
  margin: 16px 0 22px;
}
.auth-brand h1 {
  font-size: clamp(28px, 3.1vw, 49px);
  line-height: 1.3;
  letter-spacing: -1px;
  margin: 0 0 16px;
  white-space: nowrap;
  font-weight: 750;
}
.auth-brand h1 em {
  font-style: normal;
  color: #175bff;
}
.auth-brand > p {
  font-size: clamp(15px, 1.5vw, 23px);
  color: #5e73a1;
  line-height: 1.8;
  margin: 0;
}
.auth-features {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  max-width: 480px;
}
.auth-features > div {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 12px;
  font-size: 15px;
  color: #405783;
}
.auth-features span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #f2f7ffb3;
  color: #075bff;
}
.auth-features svg {
  width: 30px;
  height: 30px;
}
.auth-card {
  background: linear-gradient(135deg, #ffffffd9, #f5f9ff9c);
  border: 2px solid #fff;
  border-radius: 30px;
  padding: 52px;
  box-shadow:
    0 20px 65px #538bdd28,
    inset 0 1px 8px #fff;
  min-width: 0;
}
.auth-card h2 {
  font-size: 36px;
  line-height: 1.3;
  margin: 0 0 10px;
  font-weight: 750;
  color: #071543;
}
.auth-card header > p {
  font-size: 18px;
  color: #6075a1;
  margin: 0 0 32px;
}
.auth-fields {
  display: grid;
  gap: 20px;
}
.auth-field {
  display: block;
  min-width: 0;
}
.auth-label {
  font-size: 15px;
  color: #142756;
}
.auth-login .auth-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.auth-input {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #cddcf5;
  border-radius: 12px;
  background: #ecf2ff65;
  padding: 0 16px;
  min-height: 58px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.auth-input:focus-within {
  border-color: #306fff;
  box-shadow: 0 0 0 3px #2775ff14;
}
.auth-input > svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: #53689a;
}
.auth-input input {
  min-width: 0;
  width: 100%;
  border: 0 !important;
  box-shadow: none !important;
  outline: none;
  background: transparent !important;
  padding: 14px 0 !important;
  font: inherit;
  font-size: 15px;
  color: #152a56;
  height: auto;
}
.auth-input input::placeholder {
  color: #8092b7;
}
.auth-eye {
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  color: #526997;
  padding: 5px;
  cursor: pointer;
}
.auth-eye svg {
  width: 20px;
  height: 20px;
}
.auth-eye[aria-pressed='true'] {
  color: #125cff;
}
.auth-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 22px 0 12px;
  font-size: 14px;
}
.auth-options label {
  display: flex;
  align-items: center;
  gap: 9px;
}
.auth-options input {
  width: 17px;
  height: 17px;
  accent-color: #1769ff;
}
.auth-options button {
  border: 0;
  background: none;
  color: #075bff;
  font: inherit;
  cursor: pointer;
}
.auth-error {
  color: #c0354a;
  font-size: 14px;
  line-height: 1.6;
  margin: 10px 0;
}
.auth-error:empty {
  display: none;
}
.auth-submit {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  width: 100%;
  min-height: 58px;
  border: 1px solid #4596ff;
  border-radius: 12px;
  background: linear-gradient(110deg, #27b3fa, #1476ff 52%, #4a4bff);
  color: white;
  font: inherit;
  font-size: 19px;
  box-shadow: 0 7px 15px #2e74ee30;
  cursor: pointer;
  margin-top: 22px;
}
.auth-submit:hover {
  filter: brightness(1.05);
}
.auth-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}
.auth-submit svg {
  width: 25px;
  height: 25px;
}
.auth-switch {
  border-top: 1px solid #ccdbf1;
  padding-top: 30px;
  margin-top: 36px;
  text-align: center;
  color: #5b6e99;
  font-size: 16px;
}
.auth-switch a {
  color: #075bff;
  font-weight: 600;
  text-decoration: none;
}
.auth-footer {
  display: flex;
  justify-content: space-between;
  color: #617fae;
  font-size: 13px;
  letter-spacing: 1px;
  gap: 16px;
}
.auth-hint {
  font-size: 12px;
  line-height: 1.6;
  color: #6a7fa5;
  margin: 16px 0 0;
}
.auth-register .auth-card {
  padding: 30px 40px;
  border-radius: 24px;
}
.auth-register .auth-layout {
  padding: 24px 0;
}
.auth-register .auth-card h2 {
  font-size: 32px;
}
.auth-register .auth-card header > p {
  margin-bottom: 24px;
  font-size: 17px;
}
.auth-register .auth-fields {
  gap: 12px;
}
.auth-register .auth-field {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}
.auth-register .auth-input {
  min-height: 46px;
  border-radius: 9px;
  gap: 10px;
  padding: 0 12px;
}
.auth-register .auth-input input {
  font-size: 14px;
  padding: 11px 0 !important;
}
.auth-register .auth-submit {
  min-height: 52px;
  margin-top: 18px;
}
.auth-register .auth-switch {
  border: 0;
  margin-top: 20px;
  padding: 0;
}
.auth-page button:focus-visible,
.auth-page a:focus-visible {
  outline: 3px solid #527fff;
  outline-offset: 4px;
}
@media (min-width: 1450px) {
  .auth-layout {
    max-width: 1250px;
    gap: 10%;
  }
  .auth-brand {
    padding-top: 32px;
  }
  .auth-login .auth-card {
    padding: 62px 58px;
  }
  .auth-login .auth-layout {
    padding: 60px 0;
  }
  .auth-login .auth-card header > p {
    margin-bottom: 36px;
  }
}
@media (max-width: 1100px) {
  .auth-layout {
    gap: 5%;
    padding: 25px 0;
  }
  .auth-card {
    padding: 32px;
  }
  .auth-brand {
    padding-top: 35px;
  }
  .auth-brand h1 {
    font-size: 29px;
  }
  .auth-features > div {
    font-size: 13px;
  }
  .auth-register .auth-card {
    padding: 26px;
  }
  .auth-register .auth-field {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 8px;
  }
  .auth-register .auth-label {
    font-size: 13px;
  }
  .auth-page {
    padding: 25px 4%;
  }
  .auth-card h2 {
    font-size: 30px;
  }
  .auth-card header > p {
    font-size: 16px;
  }
}
@media (max-width: 760px) {
  .auth-page {
    padding: 24px 20px;
  }
  .auth-tagline {
    font-size: 11px;
    letter-spacing: 2px;
  }
  .auth-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 480px;
    padding: 28px 0;
  }
  .auth-brand {
    padding: 0;
    align-self: stretch;
  }
  .auth-wordmark {
    font-size: 28px;
  }
  .auth-rule {
    margin: 10px 0 14px;
  }
  .auth-brand h1 {
    font-size: 28px;
    white-space: normal;
  }
  .auth-brand > p {
    font-size: 14px;
  }
  .auth-features {
    display: none;
  }
  .auth-card {
    width: 100%;
    padding: 28px 24px;
    box-sizing: border-box;
    background: #ffffffeb;
  }
  .auth-register .auth-card {
    padding: 26px 20px;
  }
  .auth-card h2 {
    font-size: 29px;
  }
  .auth-footer {
    font-size: 11px;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }
  .auth-switch {
    padding-top: 22px;
    margin-top: 26px;
  }
  .auth-register .auth-input input {
    font-size: 13px;
  }
}
@media (min-width: 761px) and (max-height: 800px) {
  .auth-page {
    padding-top: 22px;
    padding-bottom: 18px;
  }
  .auth-layout,
  .auth-login .auth-layout {
    padding: 24px 0;
  }
  .auth-login .auth-card {
    padding: 34px 40px;
  }
  .auth-login .auth-switch {
    margin-top: 26px;
    padding-top: 24px;
  }
  .auth-brand {
    padding-top: 25px;
  }
  .auth-register .auth-card {
    padding: 24px 30px;
  }
  .auth-register .auth-card header > p {
    margin-bottom: 18px;
  }
  .auth-register .auth-fields {
    gap: 9px;
  }
}
/* Show the complete registration form without an inner scrollbar. */
.auth-register .auth-card {
  box-sizing: border-box;
  max-height: none;
  overflow: visible;
}
.auth-register #member-register-form {
  overflow: visible;
  padding-right: 0;
}
@media (min-width: 761px) {
  .auth-register .auth-layout {
    padding: 4px 0;
  }
  .auth-register .auth-brand {
    margin-top: 20px;
  }
  .auth-register .auth-switch {
    margin-top: 14px;
  }
}

.login-captcha { display:flex; flex-wrap:wrap; align-items:end; gap:12px; margin:12px 0; }
.login-captcha label { flex:1; min-width:140px; font-weight:600; }
.login-captcha input:not([type=hidden]) { display:block; box-sizing:border-box; width:100%; padding:14px; margin-top:8px; border:1px solid #cddcff; border-radius:10px; }
.login-captcha button { border:1px solid #dbe5ff; background:#f5f8ff; border-radius:10px; cursor:pointer; padding:4px 8px; color:#315cb5; }
.login-captcha img { display:block; max-width:100%; object-fit:contain; }
.login-captcha button span { display:block; font-size:12px; }
.login-captcha small { flex-basis:100%; color:#cc3030; }
