.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 34px;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(10px);
}

.auth-overlay.visible {
  display: flex;
}

.auth-shell {
  width: min(620px, 100%);
  display: grid;
  gap: 22px;
}

.auth-card,
.auth-safe {
  border: 2px solid rgba(255, 23, 23, .92);
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 23, 23, .16), transparent 42%),
    rgba(7, 7, 9, .96);
  box-shadow: 0 0 38px rgba(255, 0, 0, .32), inset 0 0 44px rgba(255, 0, 0, .05);
}

.auth-card {
  position: relative;
  padding: 38px 44px 36px;
}

.auth-close {
  position: absolute;
  top: 24px;
  right: 26px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #e8e8ee;
  cursor: pointer;
}

.auth-close::before,
.auth-close::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 16px;
  width: 20px;
  height: 2px;
  background: currentColor;
}

.auth-close::before { transform: rotate(45deg); }
.auth-close::after { transform: rotate(-45deg); }

.auth-logo {
  width: 190px;
  height: 170px;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
}

.auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(255, 0, 0, .48));
}

.auth-title {
  color: #fff;
  font-size: 1.72rem;
  font-weight: 900;
  letter-spacing: .02em;
  text-align: center;
  text-transform: uppercase;
}

.auth-subtitle {
  margin-top: 10px;
  color: #cfcfd5;
  font-size: 1rem;
  text-align: center;
}

.auth-form {
  display: grid;
  gap: 18px;
  margin-top: 34px;
}

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

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field label {
  color: #cfcfd5;
  font-size: .84rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap svg {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 22px;
  height: 22px;
  color: #d6d6dc;
  pointer-events: none;
  transform: translateY(-50%);
}

.auth-input {
  width: 100%;
  height: 58px;
  padding: 0 54px;
  border: 1px solid rgba(255, 23, 23, .72);
  border-radius: 6px;
  background: rgba(0, 0, 0, .38);
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.auth-input:focus {
  border-color: #ff1717;
  box-shadow: 0 0 22px rgba(255, 0, 0, .26);
}

.auth-eye {
  position: absolute;
  right: 13px;
  top: 50%;
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: #e1e1e6;
  cursor: pointer;
  transform: translateY(-50%);
}

.auth-eye svg {
  position: static;
  transform: none;
  pointer-events: auto;
}

.auth-forgot {
  justify-self: end;
  margin-top: -4px;
  color: #ff1717;
  font-size: .95rem;
  text-decoration: underline;
}

.auth-submit,
.auth-secondary {
  width: 100%;
  height: 58px;
  border-radius: 6px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
  cursor: pointer;
}

.auth-submit {
  border: 1px solid rgba(255, 23, 23, .9);
  background: linear-gradient(180deg, #ff1222, #b90008);
  color: #fff;
  box-shadow: 0 0 24px rgba(255, 0, 0, .24);
}

.auth-secondary {
  border: 1px solid rgba(255, 23, 23, .82);
  background: rgba(0, 0, 0, .22);
  color: #ff1717;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  color: #cfcfd5;
  font-size: .92rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: rgba(255, 255, 255, .14);
}

.auth-back {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: #ececf1;
  font-size: 1rem;
  cursor: pointer;
}

.auth-back {
  color: #ff1717;
  font-weight: 800;
}

.auth-message {
  min-height: 22px;
  color: #ff7070;
  font-size: .92rem;
  text-align: center;
}

.auth-message.success {
  color: #74ff9b;
}

.auth-safe {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  align-items: center;
  padding: 20px 28px;
  border-color: rgba(255, 255, 255, .18);
}

.auth-safe svg {
  width: 42px;
  height: 42px;
  color: #ff1717;
}

.auth-safe strong {
  display: block;
  color: #fff;
  font-size: 1rem;
}

.auth-safe span {
  display: block;
  margin-top: 4px;
  color: #c5c5cb;
  font-size: .94rem;
}

.auth-account {
  display: none;
  gap: 18px;
  margin-top: 30px;
  text-align: center;
}

.auth-account.visible {
  display: grid;
}

.auth-account strong {
  color: #fff;
  font-size: 1.35rem;
}

.auth-account span {
  color: #cfcfd5;
}

@media (max-width: 620px) {
  .auth-overlay { padding: 16px; }
  .auth-card { padding: 30px 22px 28px; }
  .auth-logo { width: 150px; height: 135px; }
  .auth-safe { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}
