/* =========================================
   VERIFICA AI
   login.css
   Estrutura e valores espelham o css do cadastro
   (../tela-cadastro/css/*.css) pra manter as duas telas
   de autenticação extremamente parecidas.
========================================= */

:root {
  --color-primary: #2c7444;
  --color-blue: #2962ff;
  --color-background: #f8f5ef;
  --color-white: #ffffff;
}

* {
  box-sizing: border-box;
  font-family: "Plus Jakarta Sans", sans-serif;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
}

body {
  overflow-x: hidden;
  background: var(--color-background);
}

img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* =====================================================
   CONTAINER
===================================================== */

.container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  align-items: stretch;
}

/* =====================================================
   LADO ESQUERDO (painel verde)
===================================================== */

.welcome {
  width: 38%;
  background: radial-gradient(circle, #c8d98c, #58a74b);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 60px 25px;
  color: var(--color-white);
  text-align: center;
}

.welcome h1 {
  font-family: "Outfit", sans-serif;
  font-size: 2.8rem;
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 90px;
}

.robot {
  width: min(320px, 80%);
  display: block;
}

.robot img {
  width: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  pointer-events: none;
}

.register {
  text-align: center;
  max-width: 250px;
}

.register p {
  font-size: 18px;
  margin-bottom: 8px;
}

.register a {
  font-family: "Outfit", sans-serif;
  color: var(--color-white);
  text-decoration: none;
  font-size: 2rem;
  font-weight: 800;
  transition: 0.3s ease;
}

.register a:hover {
  opacity: 0.9;
  text-decoration: underline;
}

/* =====================================================
   LADO DIREITO
===================================================== */

.right {
  width: 62%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: var(--color-background);
}

/* text-align:left sobrescreve o "text-align:center" global do
   style.css do site (o cadastro nem carrega esse arquivo, por isso
   não sofre com isso) — sem isso os labels/inputs do formulário
   ficariam centralizados por engano. O título tem seu próprio
   text-align:center logo abaixo, igual ao cadastro. */
.login {
  width: 100%;
  max-width: 560px;
  background: var(--color-white);
  border-radius: 24px;
  padding: 18px;
  margin: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
  transition: 0.3s ease;
  text-align: left;
}

.login header h2 {
  font-family: "Outfit", sans-serif;
  display: block;
  text-align: center;
  color: #000;
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.login header h2 span {
  font-family: "Outfit", sans-serif;
  display: block;
  text-align: center;
  color: var(--color-primary);
  font-size: 2.3rem;
  margin-bottom: 18px;
}

/* =====================================================
   LOGIN SOCIAL
===================================================== */

.social-login {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.social-login button {
  position: relative;
  width: 100%;
  height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  border: none;
  border-radius: 14px;
  font-family: "Outfit", sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transition: 0.25s;
}

.social-login button:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

/* O texto fica num <span> dentro do botão — o reset universal
   (* { font-family: PJS }) bate direto nele e vence a herança do
   botão, então precisa repetir a fonte aqui. */
.social-login button span {
  font-family: "Outfit", sans-serif;
}

.social-login .facebook {
  background: #1877f2;
  color: #fff;
}

.social-login .google {
  background: #fff;
  color: #444;
  border: 1px solid #e2e2e2;
}

.social-login button img {
  position: absolute;
  left: 18px;
  width: 32px;
  height: 32px;
}

/* =====================================================
   SEPARADOR
===================================================== */

.separator {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0;
}

.separator hr {
  flex: 1;
  border: none;
  height: 1px;
  background-color: #c4bbbb;
}

.separator span {
  color: #999;
  font-size: 0.875rem;
  font-weight: 500;
}

/* =====================================================
   CAMPOS
===================================================== */

.input-group {
  margin-bottom: 8px;
}

.input-group label {
  display: block;
  margin-bottom: 3px;
  color: #555;
  font-size: 14px;
  font-weight: 600;
}

.input-group input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 1px solid #e2e2e2;
  border-radius: 14px;
  outline: none;
  font-size: 14px;
  transition: 0.25s;
}

.input-group input:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(41, 98, 255, 0.08);
}

/* Campo de senha com botão semântico de mostrar/ocultar */
.password-field {
  position: relative;
}

.password-field input {
  padding-right: 55px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: 0.25s;
}

.password-toggle:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

.password-toggle img {
  display: block;
  width: 24px !important;
  height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  object-fit: contain;
  flex: 0 0 24px;
}

.password-toggle:hover img,
.password-toggle:focus-visible img {
  opacity: 0.85;
}

/* =====================================================
   OPÇÕES
===================================================== */

.options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0 12px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#remember {
  cursor: pointer;
  accent-color: var(--color-blue);
}

.remember label {
  font-size: 0.75rem;
  color: #555;
  cursor: pointer;
}

.options a {
  font-size: 0.75rem;
  color: #555;
  text-decoration: none;
}

.options a:hover {
  color: var(--color-blue);
  text-decoration: underline;
}

/* =====================================================
   MENSAGEM DE ERRO
===================================================== */

.login-erro {
  display: block;
  min-height: 14px;
  margin: 4px 0 8px;
  color: #e53935;
  font-size: 11px;
  line-height: 14px;
}

/* =====================================================
   BOTÃO LOGIN
===================================================== */

.login-button {
  width: 100%;
  height: 46px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border: none;
  border-radius: 14px;
  background: var(--color-blue);
  color: #fff;
  font-family: "Outfit", sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.25s;
}

.login-button:hover {
  background: #1f4de0;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(41, 98, 255, 0.28);
}

.login-button:disabled {
  background: #cfcfcf;
  color: #777;
  cursor: not-allowed;
  pointer-events: none;
}

/* =====================================================
   CRIAR CONTA
===================================================== */

/* Escondido por padrão (desktop): o CTA equivalente já aparece no
   painel verde (.register). Só volta a aparecer no mobile, onde
   o painel verde fica pequeno demais pra mostrar o link. */
.create-account {
  display: none;
  text-align: center;
  margin-top: 1.5rem;
}

.create-account a {
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  color: var(--color-primary);
  font-weight: 700;
}

.create-account a:hover {
  opacity: 0.9;
  text-decoration: underline;
}

/* =====================================================
   NOTEBOOK — telas até 900px de altura
   (mesmos valores do cadastro: ../tela-cadastro/css/responsive.css)
===================================================== */

@media (max-height: 900px) {
  .welcome {
    padding: 24px 18px;
  }

  .welcome h1 {
    font-size: 2.2rem;
    margin-bottom: 22px;
  }

  .robot {
    width: 220px;
  }

  .register p {
    font-size: 16px;
  }

  .register a {
    font-size: 1.6rem;
  }

  .right {
    padding: 16px;
  }

  .login {
    width: 92%;
    max-width: 540px;
    padding: 16px;
    border-radius: 22px;
  }

  .login header h2 {
    font-size: 1.6rem;
  }

  .login header h2 span {
    font-size: 2rem;
    margin-bottom: 10px;
  }

  .social-login button {
    height: 40px;
    font-size: 13px;
  }

  .social-login {
    gap: 8px;
  }

  .separator {
    margin: 10px 0;
  }

  .input-group {
    margin-bottom: 5px;
  }

  .input-group label {
    margin-bottom: 2px;
    font-size: 12px;
  }

  .input-group input {
    height: 38px;
    font-size: 13px;
  }

  .options {
    margin: 6px 0 10px;
  }

  .login-button {
    margin-top: 1.25rem;
    height: 40px;
    font-size: 14px;
  }

  .login-erro {
    font-size: 10px;
    min-height: 10px;
  }
}

@media (max-height: 768px) {
  .welcome {
    padding: 16px 18px;
  }

  .welcome h1 {
    font-size: 1.8rem;
    margin-bottom: 16px;
  }

  .robot {
    width: 180px;
  }

  .register p {
    font-size: 14px;
  }

  .register a {
    font-size: 1.3rem;
  }

  .right {
    padding: 12px;
  }

  .login {
    max-width: 500px;
    padding: 12px;
    border-radius: 18px;
  }

  .login header h2 {
    font-size: 1.3rem;
  }

  .login header h2 span {
    font-size: 1.7rem;
    margin-bottom: 6px;
  }

  .social-login button {
    height: 36px;
    font-size: 12px;
  }

  .social-login {
    gap: 6px;
  }

  .separator {
    margin: 6px 0;
  }

  .input-group {
    margin-bottom: 3px;
  }

  .input-group label {
    margin-bottom: 1px;
    font-size: 11px;
  }

  .input-group input {
    height: 34px;
    font-size: 12px;
  }

  .login-button {
    height: 34px;
    font-size: 13px;
  }

  .login-erro {
    font-size: 9px;
    min-height: 9px;
  }
}

/* =====================================================
   MOBILE — telas estreitas
===================================================== */

@media (max-width: 900px) {
  body {
    background: var(--color-background);
    overflow-x: hidden;
  }

  .container {
    flex-direction: column;
  }

  .welcome {
    width: 100%;
    min-height: 230px;
    padding: 20px;
    border-radius: 0 0 40px 40px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  .welcome h1 {
    width: 100%;
    margin-bottom: 0;
    font-size: 2rem;
  }

  .robot {
    width: 140px;
  }

  /* No mobile, o link de "criar conta" já aparece embaixo do
       formulário (.create-account), então o do painel verde fica
       escondido — ficaria espremido demais nessa faixa estreita. */
  .register {
    display: none;
  }

  .create-account {
    display: block;
  }

  .create-account a {
    color: var(--color-primary);
    font-size: 1.3rem;
    font-weight: 800;
  }

  .right {
    width: 100%;
    padding: 50px 20px 60px;
  }

  .login {
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
    border-radius: 25px;
    padding: 25px;
    max-width: 500px;
    margin: 0 auto;
  }

  .login header h2,
  .login header h2 span {
    text-align: center;
  }

  .social-login {
    flex-direction: row;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
  }

  .social-login button span {
    display: none;
  }

  .social-login button {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    margin: 0;
  }

  .social-login button img {
    position: static;
    width: 34px;
    height: 34px;
    margin: 0;
  }
}

/* Guardas finais de proporção para ícones funcionais. */
.password-toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
}

.password-toggle > img {
  display: block !important;
  width: 24px !important;
  height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  object-fit: contain !important;
}
