/* ==========================================================================
   Tela de entrada (login e criar conta): fundo verde e um cartao branco no centro.
   Sem estilo inline: o CSP do servidor so aceita arquivos do proprio site.
   ========================================================================== */

/* Na entrada nao ha menu lateral nem margens: a tela ocupa tudo (ver menu.css). */
body.tela-entrada { background: var(--cor-marca); }
body.tela-entrada main { max-width: none; margin: 0; padding: 0; }
body.tela-entrada .aviso { margin: 0; border-radius: 0; text-align: center; }

.entrada {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center; padding: 32px 16px;
  background: var(--cor-marca);
}

/* ---------------------------------------------------------------- cartao */
.entrada-caixa {
  width: 100%; max-width: 400px; padding: 36px 32px; border-radius: 10px; background: #fff;
  box-shadow: 0 24px 60px -24px rgba(3, 40, 36, .6);
}
.entrada-marca { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 22px; font-size: 1.4rem; font-weight: 600; color: var(--cor-texto); }
.entrada-caixa h1 { margin: 0; text-align: center; font-size: 1.3rem; font-weight: 500; letter-spacing: -.015em; color: #18181b; }
.entrada-sub { margin: 6px 0 22px; text-align: center; font-size: .9rem; line-height: 1.5; color: #52525b; }

.entrada-caixa label { margin-bottom: 16px; font-size: .8rem; font-weight: 500; color: #52525b; }
.entrada-caixa input {
  height: 42px; padding: 0 12px; border: 1px solid #d4d4d8; border-radius: 8px;
  font-size: .9rem; color: #18181b; transition: border-color .15s, box-shadow .15s;
}
.entrada-caixa input::placeholder { color: #a1a1aa; }
.entrada-caixa input:hover { border-color: #a1a1aa; }
.entrada-caixa input:focus { outline: none; border-color: var(--cor-primaria); box-shadow: 0 0 0 4px rgba(24, 24, 27, .08); }

/* campo de senha com o "olho" de mostrar/esconder */
.campo-senha { position: relative; display: block; }
.campo-senha input { width: 100%; padding-right: 44px; }
.olho {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
  border-radius: 6px; background: none; color: #a1a1aa;
}
.olho { min-height: 0; border: 0; }
.olho:hover { background: #f4f4f5; color: #18181b; }
.olho .ic-esconder { display: none; }
.olho[aria-pressed="true"] .ic-ver { display: none; }
.olho[aria-pressed="true"] .ic-esconder { display: block; }

/* botao principal, com o giro de "carregando" */
.botao-entrada { width: 100%; height: 40px; }
.botao-entrada:disabled { cursor: wait; opacity: .85; }
.giro { display: none; width: 15px; height: 15px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: girar .7s linear infinite; }
.botao-entrada.carregando .giro { display: inline-block; }
@keyframes girar { to { transform: rotate(360deg); } }

/* aviso de erro */
.entrada-caixa .alerta {
  display: flex; align-items: flex-start; gap: 8px; margin: 0 0 16px; padding: 10px 12px;
  border: 1px solid #f3c9c9; border-radius: 8px; background: #fdf1f1; color: #b42a30; font-size: .82rem; line-height: 1.4;
}
.entrada-caixa .alerta::before {
  content: "!"; flex: none; display: grid; place-items: center; width: 16px; height: 16px; margin-top: 1px;
  border-radius: 50%; background: #b42a30; color: #fff; font-size: .7rem; font-weight: 800;
}

/* requisitos da senha (criar conta) */
.regras { display: grid; gap: 4px; margin: -4px 0 18px; padding: 0; list-style: none; font-size: .78rem; color: #71717a; }
.regras li { display: flex; align-items: center; gap: 8px; }
.regras li::before {
  content: ""; flex: none; display: grid; place-items: center; box-sizing: border-box; width: 14px; height: 14px;
  border: 1.5px solid #d4d4d8; border-radius: 50%; line-height: 1;
}
.regras li.ok { color: var(--cor-ok); }
.regras li.ok::before { content: "✓"; border-color: var(--cor-ok); background: var(--cor-ok); color: #fff; font-size: 9px; font-weight: 800; }

.entrada-troca { margin: 22px 0 0; text-align: center; font-size: .85rem; color: #52525b; }
.link { padding: 0; background: none; color: var(--cor-primaria); font-size: inherit; font-weight: 600; }
.link { min-height: 0; text-decoration: underline; }
.link:hover { background: none; color: var(--cor-primaria-escura); }

/* ---------------------------------------------------------------- celular */
@media (max-width: 640px) {
  .entrada { padding: 20px 14px; }
  .entrada-caixa { padding: 28px 20px; }
  /* 16px evita o zoom automatico do iOS ao tocar no campo */
  .entrada-caixa input { font-size: 16px; }
  .botao-entrada, .entrada-caixa input { height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .giro { animation-duration: 2s; }
}

/* botoes "fantasma" da entrada: sem a caixa dos botoes comuns */
.olho, .link { border: 0; box-shadow: none; }
.link { display: inline; }
