/* Anula o min-height: max(884px, …) do common.css — ele impede centralizar. */
html:has(body.auth-page) {
  height: auto;
  min-height: 100%;
}

body.auth-page {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 100dvh !important;
  height: auto !important;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: visible;
}

/* Fundo em tela cheia, fixo (não rola com o conteúdo) */
.auth-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 85% 15%, rgba(247, 218, 195, 0.55), transparent 45%),
    radial-gradient(circle at 10% 80%, rgba(255, 219, 210, 0.45), transparent 40%),
    #faf9f8;
}

/*
  Shell cresce e preenche a viewport (acima do footer).
  safe center: centraliza quando cabe; se o card for alto demais, alinha no topo
  (evita cortar o topo do formulário).
*/
.auth-shell {
  box-sizing: border-box;
  flex: 1 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* Em telas muito baixas: alinha no topo para não cortar o formulário */
@media (max-height: 580px) {
  .auth-shell {
    align-items: flex-start;
  }
}

.auth-shell__inner {
  width: 100%;
  max-width: 28rem;
}

.auth-card {
  width: 100%;
  max-width: 28rem;
  padding: 1.25rem 1.5rem !important;
}

.auth-card.space-y-lg > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0.85rem !important;
}

.auth-card .space-y-xs > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0.25rem !important;
}

.auth-card .space-y-md > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0.65rem !important;
}

.auth-card .space-y-sm > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0.4rem !important;
}

.auth-card .w-14 {
  width: 2.5rem !important;
  height: 2.5rem !important;
}

.auth-card .mb-sm {
  margin-bottom: 0.25rem !important;
}

.auth-card .text-3xl {
  font-size: 1.5rem !important;
}

.auth-card .font-headline-md,
.auth-card h1 {
  font-size: 1.35rem !important;
  line-height: 1.35 !important;
}

/* Footer do site fora do fluxo na auth — evita conflito com o card centralizado */
.auth-page .beauty-footer {
  display: none;
}

.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"] {
  min-height: 2.4rem;
}

.auth-card button[type="submit"] {
  min-height: 2.5rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(154, 64, 40, 0.22);
}

.auth-card button[type="submit"]:hover {
  filter: brightness(1.03);
}

.auth-card code {
  font-size: 0.8125rem;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  background: rgba(154, 64, 40, 0.08);
}

.auth-password-wrap {
  position: relative;
}

.auth-password-wrap input {
  padding-right: 2.75rem;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: #89726c;
  cursor: pointer;
}

.auth-password-toggle:hover {
  background: rgba(154, 64, 40, 0.08);
  color: #9a4028;
}

.auth-password-toggle .material-symbols-outlined {
  font-size: 1.25rem;
  line-height: 1;
}

.auth-form-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #56423d;
  cursor: pointer;
  user-select: none;
}

.auth-remember__input {
  width: 1rem;
  height: 1rem;
  accent-color: #9a4028;
  cursor: pointer;
}

.auth-link {
  color: #9a4028;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-links {
  border-top: 1px solid rgba(220, 192, 186, 0.35);
  padding-top: 1rem;
}
