.auth-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 48px 20px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 360px 420px at 10% 14%, rgba(255, 255, 255, 0.15), transparent 72%),
    radial-gradient(ellipse 380px 330px at 82% 72%, rgba(255, 255, 255, 0.11), transparent 76%),
    #000000;
}

.auth-page::before,
.auth-page::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

.auth-page::before {
  inset: -30%;
  background:
    radial-gradient(circle at 20% 22%, rgba(255, 255, 255, 0.1), transparent 34%),
    radial-gradient(circle at 76% 70%, rgba(255, 255, 255, 0.06), transparent 36%);
  filter: blur(46px);
  opacity: 0.8;
  animation: auth-bg-float 20s ease-in-out infinite alternate;
}

.auth-page::after {
  inset: -50%;
  background:
    repeating-linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.026) 0px,
      rgba(255, 255, 255, 0.026) 1px,
      transparent 1px,
      transparent 18px
    );
  opacity: 0.16;
  animation: auth-bg-lines 26s linear infinite;
}

.auth-card-wrap {
  width: min(459px, calc(100vw - 36px));
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 18px;
  --bako-hide-delay: 0ms;
  --rbai-hide-delay: 0ms;
}

.auth-brand {
  margin: 0 0 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.auth-brand__logo {
  width: 47px;
  height: 47px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.auth-card {
  width: 100%;
  min-height: 428px;
  position: relative;
  z-index: 2;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 29px 25px 15px;
  border: 0.5px solid #282828;
  border-radius: 30px;
  background: rgba(16, 16, 16, 0.94);
  color: #ffffff;
  overflow: visible;
  isolation: isolate;
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  transition: box-shadow 3000ms ease, border-color 3000ms ease;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.015;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.08), transparent 62%);
  transition: opacity 3000ms ease, background 3000ms ease;
}

.auth-card:hover {
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.1),
    0 16px 34px rgba(0, 0, 0, 0.4),
    0 0 42px rgba(255, 255, 255, 0.16);
}

.auth-card:hover::before {
  opacity: 0.14;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.16), transparent 62%);
}

.auth-card > * {
  position: relative;
  z-index: 2;
}

.auth-card__head {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.auth-card__title {
  margin: 0;
  color: #ffffff;
  font-size: 36px;
  font-weight: 900;
  line-height: 1.2;
}

.auth-card-wrap[data-auth-mode="reset"] .auth-card__title {
  font-size: 24px;
  margin-top: 4px;
}

.auth-card__subtitle {
  margin: 0;
  color: #827878;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.2;
}

.auth-form {
  display: grid;
  gap: 11px;
}

.auth-section {
  display: grid;
  gap: 12px;
}

.auth-section--fields {
  gap: 13px;
}

.auth-form--login {
  margin-top: 2px;
}

.auth-form--register {
  margin-top: 30px;
}

.auth-form--reset {
  margin-top: 2px;
  gap: 14px;
}

.auth-form--register .auth-section--fields {
  grid-template-columns: 1fr;
}

.auth-form--verify .auth-register-fields,
.auth-form--verify #register-submit-btn {
  display: none;
}

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-label {
  margin: 0;
  color: #a4a4a4;
  font-size: 12px;
  line-height: 1.2;
  text-transform: uppercase;
  font-weight: 800;
}

.auth-input {
  width: 100%;
  min-height: 47px;
  border: 0;
  border-radius: 15px;
  background: #282828;
  color: rgba(255, 255, 255, 0.92);
  padding: 14px 15px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  outline: none;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.auth-input::placeholder {
  color: #737373;
}

.auth-input:hover {
  background: #303030;
}

.auth-input:focus {
  background: #333333;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 0 3px rgba(255, 255, 255, 0.1);
}

.auth-input:not(:placeholder-shown):focus {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
  -webkit-text-fill-color: rgba(255, 255, 255, 0.92);
  caret-color: #ffffff;
  box-shadow: 0 0 0 1000px #333333 inset, inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: background-color 9999s ease-out;
}

.auth-link,
.auth-switch-link {
  border: 0;
  background: transparent;
  color: #737373;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  padding: 0;
  margin: 0;
  cursor: pointer;
  transition: color 0.18s ease;
}

.auth-link {
  width: max-content;
  text-align: left;
}

.auth-switch-link {
  text-align: center;
}

.auth-switch-link span {
  color: #878787;
}

.auth-link:hover,
.auth-switch-link:hover,
.auth-switch-link:hover span {
  color: #d7d7d7;
}

.auth-section--actions {
  gap: 12px;
}

.auth-form-rule {
  width: 100%;
  height: 1px;
  margin: 1px 0 8px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.auth-submit,
.auth-card .btn--primary.auth-submit {
  width: 100%;
  min-height: 48px;
  border: 1px solid #453f3f;
  border-radius: 15px;
  background: #282828;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: none;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.auth-submit:hover,
.auth-card .btn--primary.auth-submit:hover {
  background: #303030;
  border-color: #585151;
  transform: translateY(-1px);
}

.auth-submit:active,
.auth-card .btn--primary.auth-submit:active {
  transform: translateY(0) scale(0.99);
}

.auth-submit:disabled,
.auth-card .btn--primary.auth-submit:disabled,
.auth-action-btn:disabled {
  opacity: 0.62;
  cursor: progress;
  transform: none;
}

.auth-inline {
  display: grid;
  gap: 11px;
}

.auth-step-note {
  margin: 0;
  color: #8d8d8d;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.auth-action-btn,
.auth-card .btn--ghost.auth-action-btn {
  min-height: 48px;
  border: 1px solid #453f3f;
  border-radius: 15px;
  background: #282828;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: none;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.auth-action-btn:hover,
.auth-card .btn--ghost.auth-action-btn:hover {
  background: #303030;
  border-color: #585151;
  transform: translateY(-1px);
}

.auth-social {
  width: 410px;
  max-width: 100%;
  display: grid;
  gap: 14px;
  margin-top: 0;
  position: relative;
  z-index: 2;
}

.auth-card-wrap.reset-active .auth-social {
  display: none;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09), transparent);
}

.auth-divider span {
  color: #4d4b4b;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

.auth-oauth-btn {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 15px;
  padding: 12px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  background: #282828;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  transition: background 0.18s ease, transform 0.18s ease;
}

.auth-oauth-btn img {
  width: 20px;
  height: 20px;
}

.auth-oauth-btn:hover {
  background: #303030;
  transform: translateY(-1px);
}

.auth-reset-note {
  min-height: 85px;
  display: flex;
  align-items: center;
  padding: 14px 17px;
  border-radius: 15px;
  background: rgba(233, 144, 0, 0.1);
  color: #737373;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.28;
}

.auth-reset-shell {
  display: grid;
  gap: 12px;
}

.auth-reset-tabs {
  display: none;
}

.auth-stage {
  display: grid;
  gap: 12px;
}

.auth-stage--compact {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.auth-sticker {
  position: absolute;
  top: 88px;
  right: -45px;
  rotate: 60grad;
  width: 144px;
  max-width: 42vw;
  pointer-events: none;
  user-select: none;
  z-index: 1;
  opacity: 0;
  transform: translate3d(0, 30px, 0) rotate(10deg) scale(0.6);
  transform-origin: 50% 100%;
  filter: blur(3px) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.22));
  transition:
    opacity 240ms ease var(--bako-hide-delay),
    transform 620ms cubic-bezier(0.18, 1.15, 0.3, 1) var(--bako-hide-delay),
    filter 620ms ease var(--bako-hide-delay);
}

.auth-card-wrap:hover .auth-sticker {
  opacity: 1;
  transform: translate3d(0, -2px, 0) rotate(0deg) scale(1);
  filter: blur(0) drop-shadow(0 10px 20px rgba(0, 0, 0, 0.25));
  transition-delay: 0s, 0s, 0s;
}

.auth-sticker--rbai {
  top: 268px;
  left: -35px;
  right: auto;
  rotate: -50grad;
  transform: translate3d(26px, 34px, 0) rotate(-14deg) scale(-0.6, 0.6);
  transform-origin: 50% 100%;
  transition:
    opacity 240ms ease var(--rbai-hide-delay),
    transform 620ms cubic-bezier(0.18, 1.15, 0.3, 1) var(--rbai-hide-delay),
    filter 620ms ease var(--rbai-hide-delay);
}

.auth-card-wrap:hover .auth-sticker--rbai {
  transform: translate3d(-12px, -8px, 0) rotate(-4deg) scale(-1, 1);
  transition-delay: 2s, 2s, 2s;
}

.auth-card-wrap.reset-active .auth-sticker--rbai {
  top: 138px;
}

@keyframes auth-bg-float {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  100% {
    transform: translate3d(2.5vmax, -2vmax, 0) scale(1.05);
  }
}

@keyframes auth-bg-lines {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(-90px, 70px, 0);
  }
}

@media (max-width: 560px) {
  .auth-page {
    padding: 32px 18px;
    align-items: start;
  }

  .auth-card-wrap {
    width: 100%;
    gap: 14px;
  }

  .auth-brand {
    font-size: 22px;
  }

  .auth-brand__logo {
    width: 42px;
    height: 42px;
  }

  .auth-card {
    min-height: 0;
    border-radius: 24px;
    padding: 25px 18px 18px;
  }

  .auth-card__title {
    font-size: 30px;
  }

  .auth-card-wrap[data-auth-mode="reset"] .auth-card__title {
    font-size: 22px;
  }

  .auth-card__subtitle {
    font-size: 14px;
  }

  .auth-form--register {
    margin-top: 10px;
  }

  .auth-form--register .auth-section--fields {
    grid-template-columns: 1fr;
  }

  .auth-input,
  .auth-submit,
  .auth-card .btn--primary.auth-submit,
  .auth-action-btn,
  .auth-card .btn--ghost.auth-action-btn,
  .auth-oauth-btn {
    min-height: 46px;
    font-size: 14px;
  }

  .auth-social {
    width: 100%;
  }

  .auth-sticker {
    right: -30px;
    width: 104px;
  }

  .auth-sticker--rbai {
    left: -30px;
    width: 112px;
  }
}

.auth-code-shell {
  position: relative;
  width: min(100%, 330px);
  min-height: 56px;
  margin: 0 auto;
}

.auth-code-input {
  position: relative;
  z-index: 2;
  min-height: 56px;
  border: 0;
  border-radius: 0;
  padding: 0 10px;
  background: transparent;
  color: transparent;
  text-align: center;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 16px;
  font-variant-numeric: tabular-nums;
  caret-color: transparent;
  box-shadow: none;
}

.auth-code-input:hover,
.auth-code-input:focus,
.auth-code-input:not(:placeholder-shown):focus {
  background: transparent;
  box-shadow: none;
}

.auth-code-input::placeholder {
  color: transparent;
}

.auth-code-boxes {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  pointer-events: none;
}

.auth-code-boxes span {
  min-width: 0;
  border: 1px solid #453f3f;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #282828;
  color: #ffffff;
  font-size: 25px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.auth-code-input:focus + .auth-code-boxes span {
  border-color: rgba(255, 255, 255, 0.2);
  background: #303030;
}

.auth-code-boxes span.is-filled {
  border-color: rgba(255, 255, 255, 0.24);
  background: #333333;
}

.auth-code-boxes span.is-active {
  transform: translateY(-1px);
}

.auth-card-wrap[data-auth-mode="twoFactor"] .auth-card {
  grid-template-rows: auto 1fr;
  min-height: 428px;
}

.auth-card-wrap[data-auth-mode="twoFactor"] .auth-card__subtitle {
  display: none;
}

.auth-form--login-2fa {
  min-height: 282px;
  height: 100%;
  position: static;
  display: grid;
  grid-template-rows: 1fr;
  gap: 0;
}

.auth-form--login-2fa .auth-section--fields {
  position: absolute;
  left: 25px;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  padding-top: 0;
}

.auth-form--login-2fa .auth-field {
  justify-items: center;
  gap: 14px;
}

.auth-form--login-2fa .auth-label {
  width: min(100%, 330px);
  justify-self: center;
  text-align: center;
  line-height: 1;
}

.auth-form--login-2fa .auth-section--actions {
  position: absolute;
  left: 25px;
  right: 25px;
  bottom: 15px;
  margin-top: 0;
  padding-top: 0;
}

.auth-form--login-2fa .auth-form-rule {
  order: 0;
}

.auth-form--login-2fa .auth-submit {
  order: 1;
}

.auth-form--login-2fa #login-2fa-back-btn {
  order: 2;
}

/* Figma auth redesign */
.auth-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 42px 20px;
  overflow: hidden;
  isolation: isolate;
  background: #000000;
}

.auth-page::before {
  content: "";
  position: fixed;
  inset: -3%;
  z-index: -2;
  pointer-events: none;
  background: url("/sprites/auth-bg.webp") center / cover no-repeat;
  filter: blur(2px);
  transform: scale(1.055);
  animation: none;
}

.auth-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(102, 102, 102, 0) 0%, rgba(51, 51, 51, 0.2) 38%, rgba(26, 26, 26, 0.45) 66%, rgba(0, 0, 0, 0.82) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.08) 44%, rgba(0, 0, 0, 0.58));
  opacity: 1;
  animation: none;
}

.auth-card-wrap {
  width: min(454px, calc(100vw - 36px));
  gap: 18px;
}

.auth-brand {
  margin: 0;
  gap: 12px;
  color: #ffffff;
  font-size: 25px;
  font-weight: 900;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.58);
}

.auth-brand__logo {
  width: 48px;
  height: 48px;
  filter: brightness(0) invert(1) drop-shadow(0 10px 24px rgba(0, 0, 0, 0.46));
}

.auth-card {
  min-height: 428px;
  gap: 18px;
  padding: 30px 25px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(20, 20, 20, 0.76), rgba(8, 8, 8, 0.72)),
    rgba(0, 0, 0, 0.48);
  color: #ffffff;
  overflow: hidden;
  backdrop-filter: blur(22px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 30px 90px rgba(0, 0, 0, 0.52);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.auth-card::before {
  inset: 0;
  border-radius: inherit;
  opacity: 1;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.13), transparent 54%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 28%);
}

.auth-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 34px 100px rgba(0, 0, 0, 0.58);
  transform: translateY(-1px);
}

.auth-card:hover::before {
  opacity: 1;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.15), transparent 54%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 28%);
}

.auth-card__head {
  gap: 5px;
}

.auth-card__title {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 0;
}

.auth-card__subtitle {
  color: rgba(255, 255, 255, 0.56);
  font-size: 15px;
  font-weight: 500;
}

.auth-label {
  color: rgba(255, 255, 255, 0.64);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.auth-input {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.38);
  color: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.34);
}

.auth-input:hover {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(0, 0, 0, 0.46);
}

.auth-input:focus,
.auth-input:not(:placeholder-shown):focus {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(0, 0, 0, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 3px rgba(255, 255, 255, 0.08);
}

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
  -webkit-text-fill-color: rgba(255, 255, 255, 0.94);
  caret-color: #ffffff;
  box-shadow: 0 0 0 1000px rgba(18, 18, 18, 0.96) inset, inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.auth-link,
.auth-switch-link {
  color: rgba(255, 255, 255, 0.5);
}

.auth-switch-link span {
  color: rgba(255, 255, 255, 0.72);
}

.auth-link:hover,
.auth-switch-link:hover,
.auth-switch-link:hover span {
  color: #ffffff;
}

.auth-form-rule {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.13), transparent);
}

.auth-submit,
.auth-card .btn--primary.auth-submit,
.auth-action-btn,
.auth-card .btn--ghost.auth-action-btn,
.auth-oauth-btn {
  min-height: 49px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-submit:hover,
.auth-card .btn--primary.auth-submit:hover,
.auth-action-btn:hover,
.auth-card .btn--ghost.auth-action-btn:hover,
.auth-oauth-btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.auth-reset-note {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.3);
  color: rgba(255, 255, 255, 0.62);
}

.auth-code-boxes span {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(0, 0, 0, 0.42);
}

.auth-code-input:focus + .auth-code-boxes span,
.auth-code-boxes span.is-filled {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
}

.auth-sticker {
  display: none;
}

@media (min-width: 980px) {
  .auth-card-wrap {
    justify-self: center;
    transform: none;
  }
}

@media (max-width: 560px) {
  .auth-page {
    padding: 28px 16px;
  }

  .auth-page::before {
    background-position: 52% center;
  }

  .auth-card {
    border-radius: 22px;
    padding: 25px 18px 18px;
  }

  .auth-card-wrap {
    width: 100%;
    transform: none;
  }
}

/* Keep the Figma background, but preserve the original centered auth composition. */
.auth-page {
  place-items: center;
}

.auth-card-wrap {
  justify-self: center;
  align-self: center;
  transform: none !important;
}

.auth-sticker {
  display: block;
  z-index: 1;
}

.auth-card-wrap:hover .auth-sticker {
  opacity: 1;
  transform: translate3d(0, -2px, 0) rotate(0deg) scale(1);
  filter: blur(0) drop-shadow(0 10px 20px rgba(0, 0, 0, 0.25));
}

.auth-card-wrap:hover .auth-sticker--rbai {
  transform: translate3d(-12px, -8px, 0) rotate(-4deg) scale(-1, 1);
}

/* Figma login/register parity pass */
.auth-page {
  min-height: 100dvh;
  padding: 0;
}

.auth-page::before {
  inset: 0;
  background: url("/sprites/auth-bg.webp") center / cover no-repeat;
  filter: blur(2px);
  transform: none;
}

.auth-page::after {
  background:
    radial-gradient(closest-side at 50% 50%, rgba(102, 102, 102, 0.3) 0%, rgba(0, 0, 0, 0.3) 100%),
    radial-gradient(closest-side at 50% 50%, rgba(102, 102, 102, 0.3) 22%, rgba(0, 0, 0, 0.3) 100%),
    radial-gradient(closest-side at 50% 50%, rgba(102, 102, 102, 0) 0%, rgba(0, 0, 0, 0.4) 100%);
}

.auth-card-wrap {
  width: 459px;
  max-width: calc(100vw - 36px);
  gap: 17px;
  padding-top: 0;
}

.auth-brand {
  position: relative;
  width: max-content;
  max-width: 100%;
  min-height: 75px;
  justify-content: center;
  gap: 15px;
  margin: 0 0 0;
  padding-right: 6px;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.2;
}

.auth-brand::before {
  content: "";
  width: 64px;
  height: 64px;
  border: 0.5px solid #282828;
  border-radius: 17px;
  background: rgba(22, 22, 22, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.auth-brand__logo {
  position: absolute;
  left: 6px;
  top: 11.5px;
  width: 52px;
  height: 52px;
  border-radius: 0;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.auth-brand span {
  min-width: 118px;
  color: #ffffff;
  text-align: left;
}

.auth-card {
  min-height: 428px;
  gap: 14px;
  padding: 24px 24px 20px;
  border: 0.5px solid #282828;
  border-radius: 30px;
  background: rgba(22, 22, 22, 0.92);
  backdrop-filter: none;
  box-shadow: none;
  overflow: visible;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  border-radius: inherit;
  background: rgba(22, 22, 22, 0.92);
  pointer-events: none;
}

.auth-card:hover {
  border-color: #282828;
  box-shadow: none;
  transform: none;
}

.auth-card:hover::before {
  opacity: 1;
  background: rgba(22, 22, 22, 0.92);
}

.auth-card__head {
  gap: 0;
  min-height: 76px;
  justify-items: center;
}

.auth-card__title {
  color: #ffffff;
  font-size: 36px;
  font-weight: 900;
  line-height: 1.2;
}

.auth-card__subtitle {
  margin-top: -1px;
  color: #827878;
  font-size: 15px;
  font-weight: 300;
}

.auth-form {
  gap: 10px;
}

.auth-section--fields {
  gap: 9px;
}

.auth-form--login,
.auth-form--reset {
  margin-top: 0;
}

.auth-form--register {
  margin-top: 0;
}

.auth-field {
  gap: 5px;
}

.auth-label {
  color: #a4a4a4;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.auth-input {
  min-height: 47px;
  border: 0;
  border-radius: 15px;
  background: #282828;
  color: rgba(255, 255, 255, 0.92);
  padding: 14px 15px;
  font-size: 15px;
  font-weight: 500;
  box-shadow: none;
}

.auth-input::placeholder {
  color: #737373;
}

.auth-input:hover,
.auth-input:focus,
.auth-input:not(:placeholder-shown):focus {
  border: 0;
  background: #303030;
  box-shadow: none;
}

.auth-link,
.auth-switch-link {
  color: #737373;
  font-size: 13px;
  font-weight: 500;
}

.auth-switch-link span {
  color: #737373;
}

.auth-link:hover,
.auth-switch-link:hover,
.auth-switch-link:hover span {
  color: #d7d7d7;
}

.auth-form-rule {
  width: 400px;
  max-width: 100%;
  height: 0;
  justify-self: center;
  margin: 4px 0 8px;
  border-top: 1px solid #282828;
  background: transparent;
}

.auth-section--actions {
  gap: 10px;
}

.auth-submit,
.auth-card .btn--primary.auth-submit,
.auth-action-btn,
.auth-card .btn--ghost.auth-action-btn,
.auth-oauth-btn {
  min-height: 48px;
  border: 1px solid #453f3f;
  border-radius: 15px;
  background: #282828;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  box-shadow: none;
}

.auth-submit:hover,
.auth-card .btn--primary.auth-submit:hover,
.auth-action-btn:hover,
.auth-card .btn--ghost.auth-action-btn:hover,
.auth-oauth-btn:hover {
  border-color: #585151;
  background: #303030;
  transform: none;
}

.auth-card-wrap[data-auth-mode="login"] .auth-card {
  min-height: 428px;
}

.auth-card-wrap[data-auth-mode="login"] .auth-card__head {
  margin-bottom: 4px;
}

.auth-card-wrap[data-auth-mode="login"] .auth-section--actions {
  padding-top: 0;
}

.auth-reset-note {
  border: 0;
  border-radius: 15px;
  background: rgba(233, 144, 0, 0.1);
  color: #737373;
}

.auth-card-wrap[data-auth-mode="register"] .auth-card {
  min-height: 520px;
}

.auth-card-wrap[data-auth-mode="reset"] .auth-card {
  min-height: 428px;
}

.auth-code-boxes span {
  border: 1px solid #453f3f;
  background: #282828;
}

.auth-code-input:focus + .auth-code-boxes span,
.auth-code-boxes span.is-filled {
  border-color: rgba(255, 255, 255, 0.24);
  background: #333333;
}

@media (max-width: 560px) {
  .auth-page {
    padding: 26px 18px;
  }

  .auth-card-wrap {
    width: 100%;
  }

  .auth-brand {
    width: 100%;
    min-height: 64px;
    gap: 12px;
  }

  .auth-brand::before,
  .auth-brand__logo {
    width: 64px;
    height: 64px;
    border-radius: 17px;
  }

  .auth-brand__logo {
    left: calc(50% - 96px);
  }

  .auth-card {
    min-height: 0;
    border-radius: 24px;
    padding: 24px 18px 18px;
  }
}

/* Final auth placement/logo tweak */
.auth-card-wrap {
  transform: translateY(-24px) !important;
}

.auth-brand {
  width: max-content;
  min-height: 52px;
}

.auth-brand::before {
  display: none !important;
}

.auth-brand__logo {
  position: static !important;
  width: 52px;
  height: 52px;
  border-radius: 0 !important;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

@media (max-width: 560px) {
  .auth-card-wrap {
    transform: none !important;
  }
}

/* Restore the original 2FA code layout on top of the Figma auth skin. */
.auth-card-wrap[data-auth-mode="twoFactor"] .auth-card {
  grid-template-rows: auto 1fr;
  min-height: 428px;
  padding: 29px 25px 15px;
}

.auth-card-wrap[data-auth-mode="twoFactor"] .auth-card__head {
  min-height: auto;
}

.auth-card-wrap[data-auth-mode="twoFactor"] .auth-card__subtitle {
  display: none;
}

.auth-form--login-2fa {
  min-height: 282px;
  height: 100%;
  position: static;
  display: grid;
  grid-template-rows: 1fr;
  gap: 0;
}

.auth-form--login-2fa .auth-section--fields {
  position: absolute;
  left: 25px;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  padding-top: 0;
}

.auth-form--login-2fa .auth-field {
  justify-items: center;
  gap: 14px;
}

.auth-form--login-2fa .auth-label {
  width: min(100%, 330px);
  justify-self: center;
  text-align: center;
  line-height: 1;
}

.auth-code-shell {
  position: relative;
  width: min(100%, 330px);
  min-height: 56px;
  margin: 0 auto;
}

.auth-code-input {
  position: relative;
  z-index: 2;
  min-height: 56px;
  border: 0;
  border-radius: 0;
  padding: 0 10px;
  background: transparent;
  color: transparent;
  text-align: center;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 16px;
  font-variant-numeric: tabular-nums;
  caret-color: transparent;
  box-shadow: none;
}

.auth-code-input:hover,
.auth-code-input:focus,
.auth-code-input:not(:placeholder-shown):focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.auth-code-input::placeholder {
  color: transparent;
}

.auth-code-boxes {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  pointer-events: none;
}

.auth-code-boxes span {
  min-width: 0;
  border: 1px solid #453f3f;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #282828;
  color: #ffffff;
  font-size: 25px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.auth-code-input:focus + .auth-code-boxes span {
  border-color: rgba(255, 255, 255, 0.2);
  background: #303030;
}

.auth-code-boxes span.is-filled {
  border-color: rgba(255, 255, 255, 0.24);
  background: #333333;
}

.auth-code-boxes span.is-active {
  transform: translateY(-1px);
}

.auth-form--login-2fa .auth-section--actions {
  position: absolute;
  left: 25px;
  right: 25px;
  bottom: 15px;
  margin-top: 0;
  padding-top: 0;
}

.auth-form--login-2fa .auth-form-rule {
  order: 0;
}

.auth-form--login-2fa .auth-submit {
  order: 1;
}

.auth-form--login-2fa #login-2fa-back-btn {
  order: 2;
}
