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

[data-auth-open].is-authenticated {
  background: #edf5f0 !important;
  color: #11130f !important;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #11130f;
  font-family: "Inter", "Source Han Sans CN", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 9, 7, 0.66);
  backdrop-filter: blur(12px);
}

.auth-dialog {
  position: relative;
  width: min(920px, calc(100vw - 48px));
  min-height: 540px;
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-columns: minmax(300px, 38%) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  transform: translateY(14px) scale(0.985);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-modal.is-open .auth-dialog {
  transform: translateY(0) scale(1);
}

.auth-visual {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  background: #10120f;
}

.auth-visual-video,
.auth-visual-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.auth-visual-video {
  object-fit: cover;
  object-position: 42% center;
  filter: brightness(0.72) saturate(0.72) contrast(1.08);
  transform: scale(1.05);
}

.auth-visual-shade {
  background: rgba(3, 5, 3, 0.18);
}

.auth-visual-copy {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
}

.auth-visual-kicker {
  width: max-content;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
  font-family: "Schibsted Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  backdrop-filter: blur(14px);
}

.auth-visual-message {
  max-width: 260px;
}

.auth-visual-message strong {
  display: block;
  font-family: "Fustat", "Source Han Sans CN", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: 0;
}

.auth-visual-message span {
  display: block;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.7;
}

.auth-visual-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Schibsted Grotesk", "Source Han Sans CN", "Noto Sans SC", "Microsoft YaHei",
    sans-serif;
  font-size: 18px;
  font-weight: 600;
}

.auth-visual-brand i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #d7ff3f;
  color: #11130f;
  font-style: normal;
  font-size: 13px;
}

.auth-content {
  position: relative;
  min-width: 0;
  min-height: 540px;
  padding: 48px 58px 38px;
  display: grid;
  place-items: center;
  background: #fff;
}

.auth-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #e2e4de;
  border-radius: 50%;
  background: #fff;
  color: #3d403a;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.auth-close:hover {
  background: #11130f;
  color: #fff;
  transform: rotate(4deg);
}

.auth-close svg,
.auth-method-button svg,
.auth-field-icon svg,
.auth-account-check svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.auth-panel,
.auth-account {
  width: min(100%, 430px);
}

.auth-panel[hidden],
.auth-account[hidden] {
  display: none;
}

.auth-heading {
  margin-bottom: 28px;
}

.auth-heading.centered {
  text-align: center;
}

.auth-heading h2 {
  margin: 0;
  color: #0d0f0c;
  font-family: "Fustat", "Source Han Sans CN", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.auth-heading p {
  margin: 9px 0 0;
  color: #777b73;
  font-size: 15px;
  line-height: 1.6;
}

.auth-qr-shell {
  display: grid;
  justify-items: center;
}

.auth-qr-button {
  position: relative;
  width: 216px;
  height: 216px;
  padding: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e3e5df;
  border-radius: 8px;
  background: #fff;
  cursor: default;
}

.auth-qr-button.is-demo {
  cursor: pointer;
}

.auth-qr-canvas,
.auth-qr-image {
  width: 196px;
  height: 196px;
  display: block;
  object-fit: contain;
  image-rendering: pixelated;
}

.auth-qr-image[hidden] {
  display: none;
}

.auth-qr-hover,
.auth-qr-expired {
  position: absolute;
  inset: 10px;
  display: grid;
  place-items: center;
  background: rgba(14, 17, 13, 0.84);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.auth-qr-button.is-demo:hover .auth-qr-hover {
  opacity: 1;
}

.auth-qr-button.is-expired .auth-qr-expired {
  opacity: 1;
  pointer-events: auto;
}

.auth-qr-button.is-expired .auth-qr-hover {
  display: none;
}

.auth-qr-status {
  min-height: 22px;
  margin: 13px 0 0;
  color: #6e726a;
  font-size: 12px;
  text-align: center;
}

.auth-qr-status.is-success {
  color: #258324;
}

.auth-demo-hint {
  min-height: 20px;
  margin: 4px 0 0;
  color: #9a9d96;
  font-size: 11px;
  text-align: center;
}

.auth-legal {
  margin: 20px 0 0;
  color: #686c65;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.auth-link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #1565ff;
  font: inherit;
  cursor: pointer;
}

.auth-divider {
  margin: 26px 0 15px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #9a9d96;
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  flex: 1;
  background: #eceee9;
  content: "";
}

.auth-methods {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.auth-method-button {
  min-width: 108px;
  min-height: 46px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #dedfdc;
  border-radius: 8px;
  background: #fff;
  color: #4a4e47;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.auth-method-button:hover {
  border-color: #11130f;
  background: #f6f7f3;
  color: #11130f;
}

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

.auth-field {
  min-height: 50px;
  display: flex;
  align-items: center;
  border: 1px solid #dfe1dc;
  border-radius: 8px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auth-field:focus-within {
  border-color: #11130f;
  box-shadow: 0 0 0 3px rgba(215, 255, 63, 0.36);
}

.auth-field-prefix {
  padding-left: 17px;
  color: #11130f;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
}

.auth-field-icon {
  width: 46px;
  display: grid;
  place-items: center;
  color: #74786f;
}

.auth-field input {
  min-width: 0;
  height: 48px;
  flex: 1;
  padding: 0 16px 0 10px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #11130f;
  font: 500 15px/1 "Inter", "Source Han Sans CN", "Noto Sans SC", "Microsoft YaHei",
    sans-serif;
}

.auth-field input::placeholder {
  color: #b0b4ac;
}

.auth-send-code {
  min-width: 108px;
  min-height: 30px;
  margin-right: 8px;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid #e6e8e3;
  background: transparent;
  color: #1565ff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.auth-send-code:disabled {
  color: #a4a8a0;
  cursor: not-allowed;
}

.auth-form-message {
  min-height: 20px;
  margin: -2px 0 0;
  color: #8a3d32;
  font-size: 12px;
  line-height: 1.5;
}

.auth-form-message.is-success {
  color: #258324;
}

.auth-submit {
  min-height: 56px;
  margin-top: 8px;
  border: 0;
  border-radius: 8px;
  background: #11130f;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}

.auth-submit:hover {
  background: #2d312b;
}

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

.auth-submit:disabled {
  background: #a8aba5;
  cursor: wait;
}

.auth-account {
  text-align: center;
}

.auth-account-check {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #d7ff3f;
  color: #11130f;
}

.auth-account-check svg {
  width: 32px;
  height: 32px;
  stroke-width: 2.2;
}

.auth-account h2 {
  margin: 0;
  font-family: "Fustat", "Source Han Sans CN", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 30px;
  letter-spacing: 0;
}

.auth-account-name {
  margin: 10px 0 4px;
  color: #11130f;
  font-size: 17px;
  font-weight: 600;
}

.auth-account-meta {
  margin: 0 0 30px;
  color: #858980;
  font-size: 13px;
}

.auth-account-actions {
  display: grid;
  gap: 10px;
}

.auth-account-actions button {
  min-height: 48px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.auth-account-primary {
  border: 0;
  background: #11130f;
  color: #fff;
}

.auth-account-logout {
  border: 1px solid #dfe1dc;
  background: #fff;
  color: #5d6159;
}

.auth-account-logout:hover {
  border-color: #b9bdb4;
  background: #f7f8f5;
}

@media (max-width: 760px) {
  .auth-modal {
    padding: 14px;
  }

  .auth-dialog {
    width: min(520px, calc(100vw - 28px));
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .auth-visual {
    display: none;
  }

  .auth-content {
    min-height: min(620px, calc(100vh - 28px));
    padding: 58px 28px 30px;
  }

  .auth-heading h2,
  .auth-account h2 {
    font-size: 27px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-modal,
  .auth-dialog,
  .auth-close,
  .auth-qr-hover,
  .auth-qr-expired,
  .auth-method-button,
  .auth-field,
  .auth-submit {
    transition-duration: 0.01ms !important;
  }
}
