#login-section {
  background: #fff;
  overflow: hidden;
  display: none;
  min-height: 0;
  padding: 0;
  align-items: initial;
  justify-content: initial;
}

body.login-active {
  overflow: hidden;
  height: 100vh;
}

body.login-active #login-section {
  display: block;
}

body.login-active .app-shell {
  display: none;
}

body.app-authenticated #login-section {
  display: none;
}

#login-section .login-page {
  height: 100vh;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px 24px;
  box-sizing: border-box;
  width: 100%;
}

/* ALTO (reauditoria externa, 22/07/2026, achado TEST-06): encontrado por um
   teste E2E real -- o banner de consentimento de cookies (position:fixed,
   bottom:0, ver js/services/ga-init.js) cobria por completo o botão
   principal (ATIVAR ACESSO/ENTRAR/CRIAR CONTA) em qualquer viewport de
   altura comum, já que .login-page centraliza o painel verticalmente sem
   reservar espaço nenhum pro banner. Enquanto o banner está visível
   (body.has-cookie-banner), reserva a altura aproximada dele no rodapé --
   o painel centralizado sobe o suficiente pra não ficar embaixo dele. */
body.has-cookie-banner #login-section .login-page {
  padding-bottom: 96px;
}

#login-section .login-shell-reference {
  width: min(100%, 980px);
  display: grid;
  grid-template-columns: 430px minmax(340px, 1fr);
  gap: 84px;
  align-items: center;
  height: auto;
  max-height: none;
}

#login-section .promo-card {
  position: relative;
  height: min(82vh, 590px);
  border-radius: 20px;
  overflow: hidden;
  background: #0d3f75;
  box-shadow: 0 8px 24px rgba(14, 42, 74, 0.08);
}

#login-section .promo-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#login-section .login-panel {
  padding-top: 0;
  height: min(82vh, 590px);
  display: flex;
  align-items: center;
}

#login-section .form-shell {
  width: min(100%, 402px);
  margin: 0 auto;
  box-sizing: border-box;
}

#login-section .panel-view {
  width: 100%;
}

#login-section #createView,
#login-section #activateView {
  max-height: min(82vh, 590px);
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
}

#login-section .panel-view[hidden] {
  display: none;
}

/* Médio (auditoria manual, 19/07/2026, achado "idioma não pode ser
   escolhido claramente antes do login"): antes o único seletor de idioma
   ficava dentro do perfil, só acessível depois de já ter entrado (em
   português, forçosamente, até então). Compacto, no topo do painel,
   visível em login/cadastro/ativação/redefinição de senha (fica fora de
   cada .panel-view individual, dentro do .form-shell que os envolve). */
#login-section .login-locale-picker {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

#login-section .login-locale-picker .field-label {
  margin: 0;
  font-size: 0.78rem;
  color: var(--color-text-muted, #5b6b7d);
  white-space: nowrap;
}

#login-section .login-locale-picker select {
  width: auto;
  min-width: 120px;
  height: 34px;
  padding: 2px 8px;
  font-size: 0.85rem;
}

#login-section .login-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 28px;
  text-align: center;
}

#login-section .login-brand picture {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

#login-section .login-brand img {
  display: block;
  width: min(100%, 128px);
  height: auto;
}

#login-section .access-title {
  margin: 0 0 14px;
  font-family: "Open Sans", sans-serif;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 800;
  color: #355d2f;
}

#login-section .access-divider {
  width: 100%;
  height: 2px;
  margin-bottom: 18px;
  background: #9fb17d;
}

#login-section .field-wrap {
  margin-bottom: 12px;
}

#login-section .field-label {
  display: block;
  margin: 0 0 7px;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 700;
  color: #355d2f;
}

#login-section .field-control {
  position: relative;
}

#login-section .input {
  width: 100%;
  height: 56px;
  border: 1px solid #b7c4b4;
  border-radius: 12px;
  padding: 0 52px 0 16px;
  box-sizing: border-box;
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
  color: #355d2f;
  background: #fcfcfa;
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

#login-section select.input {
  padding-right: 16px;
}

#login-section .input--textarea {
  height: auto;
  min-height: 84px;
  padding-top: 12px;
  padding-bottom: 12px;
  resize: vertical;
}

#login-section .input::placeholder {
  color: #8a9785;
}

#login-section .input:focus {
  outline: none;
  border-color: #6b8738;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(107, 135, 56, 0.12);
}

#login-section .password-field .input {
  padding-right: 58px;
}

#login-section .password-field {
  position: relative;
}

/* Médio (auditoria manual, 19/07/2026, achado "controles de 28-42px são
   pouco robustos"): alvo de toque de 28px sobe pra 40px (a imagem/ícone
   interno continua do mesmo tamanho visual -- só a área clicável cresce). */
#login-section .eye {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#login-section .eye img {
  width: 22px;
  height: 22px;
  display: block;
  filter: invert(36%) sepia(24%) saturate(787%) hue-rotate(48deg) brightness(90%) contrast(88%);
}

#login-section .eye .eye-off {
  display: block;
}

#login-section .eye .eye-on {
  display: none;
}

#login-section .eye.is-visible .eye-off {
  display: none;
}

#login-section .eye.is-visible .eye-on {
  display: block;
}

#login-section .password-meta {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 14px;
}

#login-section .password-meta a {
  color: #6b7530;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#login-section .terms {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 4px 0 22px;
  color: #284c2a;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 700;
}

#login-section .terms input {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: #5c7631;
}

#login-section .terms a {
  color: #355d2f;
  text-decoration: none;
}

#login-section .button-row,
#login-section .create-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

#login-section .create-actions {
  margin-top: 18px;
}

#login-section .submit {
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 16px;
  background: #627234;
  color: #fff;
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(98, 114, 52, 0.25);
}

#login-section .submit.submit-secondary,
#login-section .submit.submit-light {
  background: #fbfdf8;
  color: #355d2f;
  border: 2px solid #5c7631;
  box-shadow: none;
}

#login-section .create-heading {
  margin: 0 0 10px;
  color: #2c2118;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 700;
  text-align: left;
}

#login-section .create-copy {
  margin: 0 0 16px;
  color: #575a5e;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
}

#login-section .create-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#login-section .login-status {
  display: none;
  margin: 0 0 14px;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.9rem;
}

#login-section .login-status.error,
#login-section .login-status.success,
#login-section .login-status.neutral {
  display: block;
}

#login-section .login-status.error {
  background-color: #ffebee;
  color: #c62828;
}

#login-section .login-status.success {
  background-color: #e8f5e9;
  color: #2e7d32;
}

#login-section .login-status.neutral {
  background-color: #e3f2fd;
  color: #0d47a1;
}

@media (max-width: 980px) {
  #login-section .login-shell-reference {
    grid-template-columns: 1fr;
    gap: 28px;
    justify-items: center;
  }

  #login-section .promo-card {
    width: min(100%, 410px);
    height: min(52vh, 470px);
  }

  #login-section .login-panel {
    width: 100%;
    height: auto;
  }

  #login-section #createView,
  #login-section #activateView {
    max-height: calc(100vh - 40px);
    padding-right: 4px;
  }
}

@media (max-width: 560px) {
  #login-section .login-page {
    height: auto;
    min-height: 100vh;
    padding: 12px 16px;
    background:
      linear-gradient(180deg, rgba(9, 21, 26, 0.42), rgba(9, 21, 26, 0.52)),
      url("../img/login-rastro-bloco-mobile.png") center/cover no-repeat;
    align-items: center;
  }

  #login-section .login-shell-reference {
    width: 100%;
    min-height: calc(100vh - 24px);
    align-items: center;
  }

  #login-section .promo-card {
    display: none;
  }

  #login-section .login-panel {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    padding-top: 8px;
    height: auto;
    display: block;
  }

  #login-section .login-brand {
    margin-bottom: 12px;
  }

  #login-section .login-brand img {
    width: min(100%, 92px);
    filter: none;
  }

  /* Médio (auditoria manual, 19/07/2026, achado "tela móvel perde
     orientação"): título era escondido por completo (display:none) --
     provavelmente porque a cor escura do desktop ficava ilegível sobre o
     fundo fotográfico escuro do mobile, mas o efeito colateral era o
     usuário perder a referência de "que tela é essa". Mantido visível,
     em branco (mesmo tratamento já usado pros outros textos desta seção),
     só um pouco menor pra caber. */
  #login-section .access-title {
    display: block;
    font-size: 22px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  }

  #login-section .access-divider {
    display: none;
  }

  #login-section .field-wrap {
    margin-bottom: 12px;
  }

  #login-section .field-label,
  #login-section .password-meta a,
  #login-section .terms,
  #login-section .terms a,
  #login-section .login-locale-picker .field-label {
    color: #fff;
  }

  #login-section .login-locale-picker select {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
  }

  #login-section .field-label {
    font-size: 14px;
    margin: 0 0 4px;
  }

  #login-section .input {
    height: 48px;
    font-size: 15px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.72);
  }

  #login-section .input:focus {
    background: rgba(255, 255, 255, 0.16);
    border-color: #fff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
  }

  #login-section .input:-webkit-autofill,
  #login-section .input:-webkit-autofill:hover,
  #login-section .input:-webkit-autofill:focus,
  #login-section .input:-webkit-autofill:active {
    -webkit-text-fill-color: #fff !important;
    transition: background-color 5000s ease-in-out 0s;
  }

  #login-section textarea.input {
    height: auto !important;
    min-height: 60px;
    padding-top: 10px;
  }

  #login-section .input::placeholder {
    color: rgba(255, 255, 255, 0.85);
  }

  #login-section .eye img {
    filter: brightness(0) invert(1);
  }

  /* Médio (auditoria manual, 19/07/2026, achado "textos de 13-14px são
     pouco robustos para visão reduzida e uso no campo"): 13px subido pra
     14px -- pequeno o suficiente pra não quebrar o layout, grande o
     suficiente pra reduzir o esforço de leitura no público-alvo. */
  #login-section .terms {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.4;
  }

  #login-section .create-heading {
    font-size: 24px;
    margin-bottom: 8px;
    color: #fff;
  }

  #login-section .create-copy {
    font-size: 14px;
    margin-bottom: 14px;
    line-height: 1.4;
    color: #fff;
  }

  #login-section .button-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  #login-section .create-actions {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 4px;
  }

  /* Médio (auditoria manual, 19/07/2026, achado "controles de 28-42px são
     pouco robustos"): 42px sobe pra 48px -- alvo de toque mais confortável
     pra uso no campo (WCAG 2.5.8 recomenda pelo menos 24px; produtor rural
     tocando a tela com o dedo sujo/luva merece mais folga que o mínimo). */
  #login-section .submit {
    height: 48px;
    background: rgba(255, 255, 255, 0.24);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 14px;
  }

  #login-section .submit.submit-secondary,
  #login-section .submit.submit-light {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.82);
  }

  #login-section .create-card .field-label,
  #login-section .create-card .password-meta a {
    color: #fff;
  }

  #login-section .create-card .input {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.72) !important;
    color: #fff !important;
  }
}
