/* Login / Cadastro — reaproveita os tokens de style.css (carregado antes). */

.auth-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(1.5rem + env(safe-area-inset-top)) 1.1rem calc(1.5rem + env(safe-area-inset-bottom));
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 2.25rem 2rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--glass-soft);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.auth-brand {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.auth-logo {
  /* A imagem-fonte tem bastante glow/respiro ao redor do símbolo — em 64px
     o "A" ficava minúsculo. 112px deixa o símbolo com peso visual real. */
  width: 112px;
  height: 112px;
  object-fit: contain;
  margin-bottom: -0.5rem;
}

.auth-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 6vw, 2.4rem);
  letter-spacing: -0.01em;
  line-height: 1.1;
  background: linear-gradient(120deg, var(--dawn-hot), var(--dawn) 45%, var(--mist));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-tagline {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-weight: 400;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-card);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.75rem 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.field input::placeholder { color: var(--ink-soft); opacity: 0.7; }

.field input:hover { background: var(--bg-hover); }

.field input:focus {
  border-color: var(--dawn);
  box-shadow: 0 0 0 3px rgba(241, 185, 135, 0.16);
}

.field input:disabled { opacity: 0.6; cursor: not-allowed; }

.field-hint {
  margin: 0;
  font-size: 0.72rem;
  color: var(--ink-soft);
  opacity: 0.8;
}

.field-with-action { position: relative; }

.field-with-action input { padding-right: 2.6rem; }

.field-action {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}

.field-action:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.field-action.is-visible { color: var(--dawn); }

.auth-error {
  margin: 0;
  font-size: 0.82rem;
  color: #f4a7a7;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  background: rgba(244, 167, 167, 0.08);
  border: 1px solid rgba(244, 167, 167, 0.25);
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s, max-height 0.2s, padding 0.2s, border-width 0.2s;
}

.auth-error.is-visible {
  opacity: 1;
  max-height: 4rem;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  border-width: 1px;
}

.auth-success {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ok);
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  background: rgba(125, 219, 163, 0.08);
  border: 1px solid rgba(125, 219, 163, 0.25);
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s, max-height 0.2s, padding 0.2s, border-width 0.2s;
}

.auth-success.is-visible {
  opacity: 1;
  max-height: 6rem;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  border-width: 1px;
}

.auth-submit {
  position: relative;
  border: 0;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  background: linear-gradient(120deg, var(--dawn), var(--mist));
  color: var(--bg-deep);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.15s;
}

.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(241, 185, 135, 0.3); }
.auth-submit:active { transform: translateY(0); }
.auth-submit:disabled { cursor: default; opacity: 0.75; transform: none; }

.auth-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-deep);
  opacity: 0.5;
}

.auth-submit.is-loading .auth-submit-label { opacity: 0.6; }
.auth-submit.is-loading .auth-spinner {
  display: inline-block;
  animation: auth-pulse 1.1s ease-in-out infinite;
}

@keyframes auth-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 0.9; transform: scale(1); }
}

.auth-link {
  color: var(--dawn);
  text-decoration: none;
  font-size: 0.85rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
  align-self: center;
}

.auth-link:hover { border-bottom-color: var(--dawn); }

.auth-link-muted { color: var(--ink-soft); }
.auth-link-muted:hover { color: var(--dawn); }

.auth-switch {
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.auth-switch a {
  color: var(--dawn);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.auth-switch a:hover { border-bottom-color: var(--dawn); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

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

.auth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  cursor: not-allowed;
  opacity: 0.55;
}

.auth-google-btn .google-icon { flex: none; }

/* Foco visível — teclado */
.auth-submit:focus-visible,
.auth-google-btn:focus-visible,
.field-action:focus-visible,
.auth-link:focus-visible,
.auth-switch a:focus-visible {
  outline: 2px solid var(--dawn);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .auth-spinner { animation: none; }
  .auth-submit { transition: none; }
}

@media (max-width: 480px) {
  .auth-card { padding: 1.75rem 1.35rem; border-radius: 16px; }
  .auth-stage { padding-left: 0.9rem; padding-right: 0.9rem; }
}
