/* entrar.css — página de login / cadastro.
   Header e footer: components.css. Mobile-first. */

.auth-page {
  display: flex;
  justify-content: center;
  padding: clamp(28px, 6vw, 72px) 16px clamp(48px, 8vw, 96px);
  color: #2d223c;
  background: #f8f4ef;
  font-family: var(--font-sans, 'DM Sans', system-ui, sans-serif);
}
.auth-page:focus { outline: none; }

.auth-card {
  width: 100%;
  max-width: 480px;
  padding: clamp(24px, 5vw, 44px);
  background: #fcfbfa;
  border: 1px solid rgba(45, 34, 60, 0.08);
  border-radius: 28px;
  box-shadow: 0 18px 50px -24px rgba(45, 34, 60, 0.28);
}

.auth-eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  color: #d32436;
}
.auth-title {
  margin: 0 0 10px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(30px, 6vw, 40px);
  line-height: 1.1;
  text-align: center;
}
.auth-lead {
  max-width: 36ch;
  margin: 0 auto 26px;
  font-size: 15px;
  line-height: 1.55;
  text-align: center;
  color: #5f586b;
}

/* ---- avisos e estado de carregamento ---- */
.auth-aviso,
.auth-carregando {
  margin: 0 0 20px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  border-radius: 14px;
}
.auth-aviso { color: #8a1c28; background: #fdf0f1; border: 1px solid #f3c7cc; }
.auth-aviso--info { color: #3b2f7a; background: #f1edf9; border: 1px solid #d9d0f0; }
.auth-carregando { color: #5f586b; }
.auth-aviso[hidden], .auth-carregando[hidden] { display: none; }

/* ---- abas Entrar / Criar conta ---- */
.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  padding: 4px;
  background: #eee8e1;
  border-radius: 999px;
}
.auth-tab {
  flex: 1 1 0;
  min-height: 44px;
  padding: 0 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #5f586b;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.auth-tab:hover { color: #2d223c; }
.auth-tab[aria-selected="true"] {
  color: #2d223c;
  background: #fff;
  box-shadow: 0 2px 8px rgba(45, 34, 60, 0.12);
}
.auth-tab:focus-visible,
.auth-input:focus-visible,
.auth-pw__toggle:focus-visible,
.auth-submit:focus-visible,
.auth-secondary:focus-visible,
.auth-check input:focus-visible,
.auth-card a:focus-visible {
  outline: 2px solid #7460c6;
  outline-offset: 2px;
}

/* ---- campos ---- */
.auth-field { margin-bottom: 18px; }
.auth-field > label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
}
.auth-input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px; /* 16px evita o zoom automático do iOS ao focar */
  color: #2d223c;
  background: #fff;
  border: 1.5px solid #d9d0c6;
  border-radius: 14px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.auth-input[aria-invalid="true"] { background: #fdf3f3; border-color: #b4202f; }

.auth-pw { position: relative; }
.auth-pw .auth-input { padding-right: 88px; }
/* sem transform: o CSS global aplica scale() em button:active e deslocaria o botão */
.auth-pw__toggle {
  position: absolute;
  top: 6px;
  right: 6px;
  height: 36px;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #4d3c99;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 10px;
}
.auth-pw__toggle:hover { background: #f1edf9; }

.auth-hint { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: #5f586b; }
.auth-error { margin: 6px 0 0; font-size: 13px; font-weight: 500; line-height: 1.4; color: #b4202f; }
.auth-error:empty { display: none; }

.auth-check { display: flex; align-items: flex-start; gap: 12px; }
.auth-check input {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: #dc3545;
  cursor: pointer;
}
.auth-check label { font-size: 14px; line-height: 1.5; cursor: pointer; }
.auth-card a { color: #4d3c99; text-decoration: underline; text-underline-offset: 2px; }

/* ---- botões ---- */
.auth-submit,
.auth-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 0 20px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border-radius: 999px;
}
.auth-card a.auth-submit { color: #fff; text-decoration: none; }
.auth-submit { color: #fff; background: #dc3545; border: 0; box-shadow: 0 8px 20px -10px rgba(220, 53, 69, 0.6); }
.auth-submit:hover { background: #c62839; }
.auth-secondary { margin-top: 12px; color: #2d223c; background: transparent; border: 1.5px solid rgba(45, 34, 60, 0.3); }
.auth-secondary:hover { color: #d32436; border-color: #dc3545; }

.auth-status { min-height: 1.4em; margin: 14px 0 0; font-size: 14px; line-height: 1.4; text-align: center; }
.auth-status--error { color: #b4202f; }
.auth-status--ok { color: #15803d; }
.auth-footnote { margin: 16px 0 0; font-size: 13px; line-height: 1.5; text-align: center; color: #5f586b; }

/* ---- estado "logado" ---- */
.auth-usuario[hidden], #authVisitante[hidden], [role="tabpanel"][hidden] { display: none; }
.auth-usuario { text-align: center; }
.auth-avatar {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 4px auto 14px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 34px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #fc136a, #7460c6);
  border-radius: 50%;
}
.auth-usuario__titulo {
  margin: 0 0 8px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(26px, 5vw, 32px);
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.auth-usuario__titulo:focus { outline: none; }
