/*
 * Paginas de acesso (entrar, esqueci a senha, nova senha): coluna do formulario
 * e fotografia. Moldura em components/entrada.php.
 *
 * Cores da FAR: verde do logotipo, verde-escuro dos textos sobre a fotografia
 * e o lima do logotipo so como remate. A frase da fotografia fica no espaco
 * livre da parede, para onde o polegar aponta.
 */
:root {
  --en-verde: #007531;
  --en-verde-escuro: #00592a;
  --en-floresta: #0b3d24;
  --en-lima: #91bf24;
  --en-texto: #1f2a24;
  --en-suave: #5b6760;
  --en-linha: #d3dbd6;
  --en-parede: #cdccc7;
}

html, body.sg-entrada-corpo { height: 100%; }
body.sg-entrada-corpo {
  margin: 0; background: #fff; color: var(--en-texto);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.sg-entrada {
  min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-columns: minmax(440px, 42fr) 58fr;
}

/* ---------- coluna do formulario ---------- */
.sg-entrada-coluna {
  display: flex; flex-direction: column; min-width: 0;
  padding: 36px clamp(28px, 5vw, 76px) 28px; background: #fff;
}
/* Logotipo, formulario e rodape alinhados na mesma coluna, centrada. */
.sg-entrada-topo, .sg-entrada-conteudo, .sg-entrada-rodape { width: 100%; max-width: 420px; margin-left: auto; margin-right: auto; }
.sg-entrada-topo img { display: block; width: 190px; height: auto; }
.sg-entrada-conteudo { margin-top: auto; margin-bottom: auto; padding: 44px 0; }

.sg-entrada h1 {
  margin: 0 0 6px; font-size: clamp(28px, 2.3vw, 34px); line-height: 1.15; font-weight: 800;
  letter-spacing: -0.015em; color: var(--en-texto);
}
.sg-entrada-produto { margin: 0 0 32px; color: var(--en-suave); font-size: 15px; }
.sg-entrada .sg-texto { color: var(--en-suave); margin-bottom: 22px; }

.sg-grupo { margin-bottom: 20px; }
.sg-rotulo-linha { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.sg-entrada label { display: block; margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--en-texto); }
.sg-rotulo-linha label { margin: 0; }

.sg-campo {
  display: block; width: 100%; height: 50px; padding: 0 16px; margin: 0;
  font: inherit; font-size: 16px; color: var(--en-texto); background: #fff;
  border: 1.5px solid var(--en-linha); border-radius: 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.sg-campo:hover { border-color: #b4c2ba; }
.sg-campo:focus { outline: none; border-color: var(--en-verde); box-shadow: 0 0 0 4px rgba(0, 117, 49, .14); }
/* O preenchimento automatico do browser pintava os campos de amarelo. */
.sg-campo:-webkit-autofill, .sg-campo:-webkit-autofill:hover {
  -webkit-text-fill-color: var(--en-texto); -webkit-box-shadow: 0 0 0 60px #fff inset; caret-color: var(--en-texto);
}
.sg-campo:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 60px #fff inset, 0 0 0 4px rgba(0, 117, 49, .14); }
.sg-campo-codigo { font-size: 26px; font-weight: 700; letter-spacing: .45em; text-align: center; padding-left: calc(16px + .45em);
  font-variant-numeric: tabular-nums; }

.sg-botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 52px; margin-top: 6px; padding: 0 20px;
  font: inherit; font-size: 16px; font-weight: 700; color: #fff; text-decoration: none;
  background: var(--en-verde); border: 0; border-radius: 10px; cursor: pointer;
  transition: background-color .15s ease;
}
.sg-botao:hover { background: var(--en-verde-escuro); color: #fff; text-decoration: none; }
.sg-botao:focus-visible, .sg-ligacao:focus-visible, .sg-entrada-manual:focus-visible, .sg-entrada-topo a:focus-visible {
  outline: 3px solid rgba(0, 117, 49, .4); outline-offset: 2px; border-radius: 6px;
}
.sg-botao[disabled] { opacity: .6; cursor: default; }
.sg-botao-secundario { background: #fff; color: var(--en-texto); border: 1.5px solid var(--en-linha); }
.sg-botao-secundario:hover { background: #f4f7f5; color: var(--en-texto); border-color: #b4c2ba; }
.sg-botao + .sg-botao { margin-top: 10px; }

.sg-ligacao { color: var(--en-verde-escuro); font-weight: 700; text-decoration: none; }
.sg-ligacao:hover { color: var(--en-verde); text-decoration: underline; }
.sg-centro { text-align: center; }
.sg-entrada .sg-mais { margin-top: 22px; text-align: center; }
.sg-entrada .sg-ajuda { margin: -12px 0 16px; color: var(--en-suave); font-size: 13.5px; }
.sg-entrada .sg-nota { margin-top: 22px; color: var(--en-suave); font-size: 14px; text-align: center; }
.sg-regras { margin: 8px 0 0; padding-left: 18px; color: var(--en-suave); font-size: 13px; }
.sg-regras li { margin: 1px 0; }

.sg-entrada .sigeca-alerta { margin: 4px 0 14px; border-radius: 10px; }
.sg-entrada .alert { border-radius: 10px; }

.sg-entrada-rodape {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px;
  font-size: 13.5px; color: var(--en-suave);
}
.sg-entrada-manual { display: inline-flex; align-items: center; gap: 8px; color: var(--en-verde-escuro); font-weight: 700; text-decoration: none; }
.sg-entrada-manual:hover { color: var(--en-verde); text-decoration: underline; }

/* ---------- fotografia ---------- */
.sg-entrada-foto { position: relative; overflow: hidden; background: var(--en-parede); }
.sg-entrada-foto img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 28% 40%;
}
/* Por baixo do polegar e a direita dos dedos: parede livre em todos os tamanhos. */
.sg-entrada-frase {
  position: absolute; bottom: clamp(36px, 8vh, 96px); right: clamp(28px, 4.5vw, 88px); width: 11ch; margin: 0;
  font-size: clamp(30px, 3vw, 52px); line-height: 1.06; font-weight: 800; letter-spacing: -0.02em;
  color: var(--en-floresta);
}
.sg-entrada-frase::before { content: ""; display: block; width: 56px; height: 5px; margin-bottom: 20px; border-radius: 3px; background: var(--en-lima); }

/* ---------- ecras mais pequenos ---------- */
@media (max-width: 1199.98px) {
  .sg-entrada { grid-template-columns: minmax(420px, 1fr) 1fr; }
  /* Com a fotografia estreita a frase caia sobre os dedos: a imagem fica sozinha. */
  .sg-entrada-frase { display: none; }
}
@media (max-height: 720px) {
  .sg-entrada-conteudo { padding: 24px 0; }
  .sg-entrada-produto { margin-bottom: 22px; }
}
@media (max-width: 991.98px) {
  .sg-entrada { grid-template-columns: 1fr; }
  .sg-entrada-foto { display: none; }
  .sg-entrada-coluna { padding: 24px 20px 20px; }
  .sg-entrada-topo, .sg-entrada-conteudo, .sg-entrada-rodape { max-width: 440px; }
  .sg-entrada-conteudo { margin-top: 28px; padding: 16px 0 36px; }
  .sg-entrada-topo img { width: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  .sg-campo, .sg-botao { transition: none; }
}
