/* ===== Tela de login / autenticação ===== */
body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 18px;
}

.auth {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* ---- Marca ---- */
.auth-marca {
  text-align: center;
  display: grid;
  gap: 8px;
  justify-items: center;
}

#title {
  display: inline-block;
  text-decoration: none;
}

#title .logo-wordmark {
  width: min(280px, 74vw);
  height: auto;
  display: block;
  animation: floatY 6s ease-in-out infinite;
  transition: transform var(--dur-3) var(--spring);
}

#title:hover .logo-wordmark {
  transform: scale(1.03);
}

.marca-vertical {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-decoration: none;
}

.marca-vertical-ico {
  width: min(92px, 24vw);
  height: auto;
  animation: floatY 6s ease-in-out infinite;
  transition: transform var(--dur-3) var(--spring);
}

.marca-vertical:hover .marca-vertical-ico {
  transform: scale(1.05);
}

.marca-vertical-nome {
  font-size: clamp(1.9rem, 7vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}

.tagline {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}

.tagline-marca {
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ---- Card ---- */
.auth-card {
  position: relative;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 26px 24px;
  overflow: hidden;
  animation: riseIn 0.55s var(--ease-out) both;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--brand);
  background-size: 200% 100%;
  animation: shine 5s linear infinite;
}

/* ---- Abas ---- */
.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 5px;
  margin-bottom: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.auth-tab {
  flex: 1;
  background: transparent;
  background-image: none;
  color: var(--text-muted);
  box-shadow: none;
  padding: 9px 14px;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 999px;
  transition: color var(--dur-2) var(--ease), background var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}

.auth-tab:hover {
  background: transparent;
  color: var(--text);
  transform: none;
  box-shadow: none;
}

.auth-tab.ativo {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ---- Painéis ---- */
.auth-painel {
  display: grid;
  gap: 14px;
}

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

.auth-painel.entra-dir { animation: painelDir 0.42s var(--ease-out) both; }
.auth-painel.entra-esq { animation: painelEsq 0.42s var(--ease-out) both; }

@keyframes painelDir {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: none; }
}

@keyframes painelEsq {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: none; }
}

/* ---- Campos ---- */
.campo {
  display: grid;
  gap: 7px;
}

.campo label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.campo-input {
  position: relative;
  display: flex;
  align-items: center;
}

.campo-input input {
  padding-left: 42px;
}

.campo-input:has(.toggle-senha) input {
  padding-right: 46px;
}

.campo-ic {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--dur-2) var(--ease);
}

.campo-input input:focus ~ .campo-ic,
.campo-input:focus-within .campo-ic {
  color: var(--primary);
}

.toggle-senha {
  position: absolute;
  right: 6px;
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  background-image: none;
  color: var(--text-muted);
  border: none;
  box-shadow: none;
  border-radius: 50%;
}

.toggle-senha:hover {
  background: var(--surface-2);
  color: var(--primary);
  transform: none;
  box-shadow: none;
}

.toggle-senha svg {
  display: block;
}

/* ---- Linha: lembrar-me + esqueceu ---- */
.auth-linha {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: -2px;
}

.lembrar {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.86rem;
  color: var(--text-muted);
  cursor: pointer;
}

.lembrar input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.link-sutil {
  background: transparent;
  background-image: none;
  color: var(--primary);
  border: none;
  box-shadow: none;
  padding: 2px 0;
  font-size: 0.86rem;
  font-weight: 700;
}

.link-sutil:hover {
  background: transparent;
  color: var(--primary-hover);
  transform: none;
  box-shadow: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- Botão principal ---- */
.btn-principal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  font-size: 1rem;
  margin-top: 4px;
}

/* ---- Painel "esqueceu a senha" ---- */
.voltar-login {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.auth-reset-titulo {
  font-size: 1.2rem;
  color: var(--text);
}

.auth-reset-sub {
  margin: -6px 0 2px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.auth-rodape {
  display: grid;
  gap: 6px;
  justify-items: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.auth-legal-links {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.auth-legal-links a {
  color: var(--text-muted);
  font-weight: 800;
  text-decoration: none;
}

.auth-legal-links a:hover,
.auth-legal-links a:focus-visible {
  color: var(--primary);
  text-decoration: underline;
}

/* ---- Página redefinir senha ---- */
.reset-estado {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
  padding: 10px 0;
}

#reset-invalido {
  display: grid;
  gap: 14px;
  text-align: center;
}

/* ---- Modal: pedir e-mail (usuarios antigos) ---- */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 14, 28, 0.55);
  backdrop-filter: blur(5px);
}

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

.auth-modal-box {
  width: 100%;
  max-width: 380px;
  display: grid;
  gap: 12px;
  text-align: center;
  justify-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 26px 24px;
  animation: riseIn 0.4s var(--spring) both;
}

.auth-modal-ic {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  box-shadow: var(--shadow-primary);
}

.auth-modal-box h3 {
  font-size: 1.2rem;
  color: var(--text);
}

.auth-modal-box p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.auth-modal-box .campo {
  width: 100%;
}

.auth-modal-acoes {
  width: 100%;
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
