[hidden] {
  display: none !important;
}

#settings_person.auth-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  line-height: 40px;
  white-space: nowrap;
}

#settings_person .auth-top-link {
  display: inline-block;
  height: 40px;
  padding: 0 4px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

#settings_person .auth-top-link:hover,
#settings_person .auth-top-link:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.auth-actions-divider {
  color: rgba(255, 255, 255, 0.42);
}

body.auth-modal-open {
  overflow: hidden;
}

.auth-modal,
.auth-modal * {
  box-sizing: border-box;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 20px;
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 27, 0.72);
  backdrop-filter: blur(5px);
}

.auth-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 30px 34px 28px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  color: #243036;
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #7b858a;
  font-size: 29px;
  line-height: 31px;
  cursor: pointer;
}

.auth-close:hover,
.auth-close:focus-visible {
  background: #edf1f2;
  color: #25353b;
  outline: none;
}

.auth-brand {
  width: max-content;
  margin: 0 auto 13px;
  padding: 6px 13px;
  border-radius: 999px;
  background: #334348;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.auth-title {
  margin: 0;
  color: #1e2d33;
  font-size: 26px;
  line-height: 1.3;
  text-align: center;
}

.auth-subtitle {
  margin: 7px 0 24px;
  color: #7a858a;
  font-size: 13px;
  text-align: center;
}

.auth-form {
  margin: 0;
}

.auth-field {
  display: block;
  margin: 0 0 15px;
  color: #334348;
  font-size: 13px;
  font-weight: 700;
}

.auth-field > span,
.auth-field > label {
  display: block;
  margin: 0 0 7px;
}

.auth-field input {
  display: block;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0 13px;
  border: 1px solid #cbd2d5;
  border-radius: 8px;
  background: #fbfcfc;
  box-shadow: none;
  color: #243036;
  font: 14px Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.auth-field input:focus {
  border-color: #4791d0;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(71, 145, 208, 0.16);
}

.auth-field input.is-invalid {
  border-color: #d84b4b;
  background: #fffafa;
}

.auth-field small {
  display: block;
  margin-top: 6px;
  color: #929a9e;
  font-size: 11px;
  font-weight: 400;
}

.auth-captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
}

.auth-captcha {
  width: 120px;
  height: 44px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #bfc7ca;
  border-radius: 8px;
  background: #eef2f3;
  cursor: pointer;
}

.auth-captcha:hover,
.auth-captcha:focus-visible {
  border-color: #4791d0;
  outline: 2px solid rgba(71, 145, 208, 0.16);
}

.auth-captcha-code {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 120px;
  height: 44px;
  overflow: hidden;
  background:
    linear-gradient(24deg, transparent 46%, rgba(51, 67, 72, 0.2) 47%, transparent 49%),
    linear-gradient(156deg, transparent 48%, rgba(71, 145, 208, 0.24) 49%, transparent 51%),
    linear-gradient(135deg, #e9f2f2, #d9e3e6);
}

.auth-captcha-code::before,
.auth-captcha-code::after {
  content: "";
  position: absolute;
  left: -8px;
  width: 140px;
  height: 1px;
  background: rgba(41, 91, 101, 0.28);
  transform: rotate(11deg);
}

.auth-captcha-code::before {
  top: 13px;
}

.auth-captcha-code::after {
  bottom: 11px;
  transform: rotate(-8deg);
}

.auth-captcha-code span {
  position: relative;
  z-index: 1;
  display: inline-block;
  color: #245963;
  font: 700 23px/1 Arial, sans-serif;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.75);
}

.auth-captcha-code span:nth-child(even) {
  color: #386b91;
  transform: translateY(2px) rotate(7deg);
}

.auth-captcha-code span:nth-child(odd) {
  transform: translateY(-1px) rotate(-6deg);
}

.auth-message {
  min-height: 20px;
  margin: -2px 0 9px;
  color: #d33d3d;
  font-size: 13px;
  line-height: 20px;
  text-align: center;
}

.auth-submit {
  width: 100%;
  height: 45px;
  margin: 0;
  border: 1px solid #2a747f;
  border-radius: 8px;
  background: linear-gradient(#3e8b96, #327984);
  box-shadow: 0 2px 6px rgba(41, 101, 111, 0.22);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.auth-submit:hover,
.auth-submit:focus-visible {
  background: linear-gradient(#4899a5, #347e89);
  outline: 3px solid rgba(52, 126, 137, 0.18);
}

.auth-submit:active {
  transform: translateY(1px);
}

.auth-switch-text {
  margin: 18px 0 0;
  color: #78858a;
  font-size: 13px;
  text-align: center;
}

.auth-switch-text button {
  margin: 0;
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: #327fba;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.auth-switch-text button:hover,
.auth-switch-text button:focus-visible {
  text-decoration: underline;
  outline: none;
}

@media (max-width: 560px) {
  .auth-modal {
    align-items: end;
    padding: 10px;
  }

  .auth-dialog {
    width: 100%;
    max-height: calc(100dvh - 20px);
    padding: 27px 22px 23px;
    border-radius: 18px;
  }

  .auth-title {
    font-size: 23px;
  }
}

@media (max-width: 390px) {
  .auth-captcha-row {
    grid-template-columns: minmax(0, 1fr) 104px;
  }

  .auth-captcha,
  .auth-captcha-code {
    width: 104px;
  }
}
