/* Página de entrada — Santos Silva (segue o desenho "Aspecto.jpg") */
:root {
  --verde-botao: #6ad201;
  --verde-botao-escuro: #5cb800;
  --texto: #111111;
  --suave: #4a4a4a;
  --borda: #c4c4c4;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body.pagina-login {
  margin: 0;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--texto);
  background: #7ccb05 url("img/login-fundo.jpg") center / cover no-repeat fixed;
  -webkit-font-smoothing: antialiased;
}
.so-leitores { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Cartão: 1151 × 766 no desenho (ecrã 1920 × 1080) */
.login-cartao {
  position: relative;
  display: grid; grid-template-columns: 572fr 579fr;
  width: 100%; max-width: 1151px; aspect-ratio: 1151 / 766; min-height: 600px;
  border-radius: 64px; overflow: hidden;
  background: #fff;
  box-shadow: 0 40px 70px -30px rgba(30, 70, 0, .55), 0 12px 30px -10px rgba(30, 70, 0, .25);
}
.login-foto {
  background-size: cover; background-position: left center;
  margin-right: -90px; /* fica por baixo do painel branco arredondado */
}
.login-painel {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  background: #fff; border-radius: 72px;
  padding: 40px 68px 52px 68px;
}
.login-logo { width: 170px; height: auto; display: block; }

.login-conteudo { margin: auto; width: 100%; max-width: 348px; padding-top: 30px; }
.login-conteudo h1 {
  font-size: 2.8rem; font-weight: 400; letter-spacing: -.045em; line-height: 1;
  margin: 0 0 26px;
}

.login-campo { display: block; position: relative; margin-bottom: 16px; }
.login-campo input {
  width: 100%; height: 42px; padding: 0 16px;
  border: 1px solid var(--borda); border-radius: 999px; background: #fff;
  font: inherit; font-size: .8rem; color: var(--texto);
  transition: border-color .15s, box-shadow .15s;
}
.login-campo input::placeholder { color: #3c3c3c; opacity: 1; }
.login-campo input:focus { outline: none; border-color: var(--verde-botao); box-shadow: 0 0 0 4px rgba(106, 210, 1, .22); }
.com-olho input { padding-right: 46px; }
.login-olho {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 0; background: none; color: #222; cursor: pointer; border-radius: 50%;
}
.login-olho:hover { background: #f2f2f2; }
.login-olho .olho-aberto, .login-olho.visivel .olho-fechado { display: none; }
.login-olho.visivel .olho-aberto { display: block; }

.login-botao {
  width: 100%; height: 42px; margin-top: 0;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--verde-botao); color: #fff;
  font: inherit; font-size: .8rem; font-weight: 600; letter-spacing: -.01em;
  transition: background .15s, transform .1s;
}
.login-botao:hover { background: var(--verde-botao-escuro); }
.login-botao:active { transform: scale(.98); }
.login-botao:focus-visible, .login-olho:focus-visible { outline: 3px solid rgba(92, 184, 0, .55); outline-offset: 2px; }

.login-ajuda { font-size: .74rem; color: var(--suave); text-align: center; margin: 16px 0 0; line-height: 1.3; letter-spacing: -.025em; }
.login-rodape { font-size: .7rem; color: var(--suave); padding-left: 4px; letter-spacing: -.01em; }

.login-alerta { font-size: .8rem; padding: 10px 16px; border-radius: 14px; margin: 0 0 14px; }
.login-alerta-erro { background: #fdecea; color: #b42318; }
.login-alerta-sucesso { background: #eaf8d8; color: #3d7a00; }
.login-alerta-info { background: #f1f4f7; color: #34404c; }

/* Ecrãs médios: foto mais estreita */
@media (max-width: 980px) {
  .login-cartao { grid-template-columns: 40% 60%; aspect-ratio: auto; min-height: 600px; }
  .login-painel { padding: 40px 44px 44px; }
}

/* Telemóvel: foto em cima, formulário em baixo */
@media (max-width: 680px) {
  body.pagina-login { padding: 0; align-items: stretch; background-attachment: scroll; }
  .login-cartao { grid-template-columns: 1fr; grid-template-rows: 250px 1fr; border-radius: 0; min-height: 100vh; box-shadow: none; background: transparent; }
  .login-foto { margin: 0 0 -40px; background-position: 30% 30%; }
  .login-painel { border-radius: 36px 36px 0 0; padding: 30px 26px calc(28px + env(safe-area-inset-bottom)); }
  .login-logo { width: 140px; margin: 0 auto; }
  .login-conteudo { margin: 36px auto 28px; padding-top: 0; }
  .login-conteudo h1 { font-size: 2.3rem; text-align: center; }
  .login-campo input, .login-botao { height: 50px; font-size: 1rem; }
  .login-rodape { text-align: center; margin-top: auto; }
}
