.auth-page {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 22px;
  min-height: 100svh;
  padding: 32px 20px;
  overflow-x: hidden;
  overflow-y: auto;
}

.auth-page .auth-card {
  margin-top: auto;
}

.auth-page .auth-footer {
  margin-bottom: auto;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: clamp(30px, 5vw, 44px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.auth-head {
  margin-bottom: 26px;
  text-align: center;
}

.auth-head .logo-mark {
  margin: 0 auto 18px;
}

.auth-head h1 {
  margin-bottom: 8px;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.auth-head p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.auth-form .btn-primary {
  width: 100%;
  margin-top: 4px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: #5b5b66;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}

.auth-row a {
  color: var(--muted);
  font-size: 0.8rem;
}

.auth-row a:hover {
  color: #fff;
}

.auth-switch {
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.auth-switch a {
  color: #c4b5fd;
  font-weight: 600;
}

.auth-switch a:hover {
  color: #ddd6fe;
}

.form-message {
  display: none;
  margin-top: 16px;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.45;
}

.form-message.show {
  display: block;
}

.form-message.error {
  border: 1px solid rgba(248, 113, 113, 0.25);
  background: rgba(248, 113, 113, 0.08);
  color: #fecaca;
}

.form-message.success {
  border: 1px solid rgba(52, 211, 153, 0.25);
  background: rgba(52, 211, 153, 0.08);
  color: #a7f3d0;
}

.auth-footer {
  position: relative;
  z-index: 1;
  color: #52525b;
  font-size: 0.75rem;
  text-align: center;
}

.auth-footer a:hover,
footer a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
