/*  Estilos específicos da página de login  */

.login-wrapper {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #f1f1f1;
  z-index: 999;
}

.login-card {
  width: 520px;
  max-width: 96vw;
  background: var(--white);
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  padding: 26px;
}

.login-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 152, 0, 0.15);
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: 4px;
    margin-bottom: 8px;
    color: var(--brand-black-variant);
    font-size: 14px;
    font-weight: 500;
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 11px;
}

.login-logo img {
  height: 64px; /* aumentei o tamanho do logo */
}

.login-header {
  padding: 12px 0;
  text-align: center;
}

/* Estilo para o logo SVG dentro do login */
.login-header .logo {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.login-header .logo-inner {
  display: inline-block;
  pointer-events: none; /* Desabilitar link no login */
}

.login-header .logo svg {
  height: 32px;
  width: auto;
  fill: var(--brand-black);
}

.login-title {
  font-size: 32px; /* aumentado */
  margin: 0 !important;
  color: var(--brand-black);
  font-weight: 600;
}

/* Ajuste fino: mover título 1px para a esquerda para alinhar com o subtítulo */
.login-title {
  display: inline-block;
  transform: translateX(-1px);
}

/* Estilo para destacar ZAIT com font-weight 700 */
.login-title strong {
  font-weight: 700;
}

/* Estilo para mudar a cor do ponto para --icon-color */
.login-title strong::after {
  content: '.';
  color: var(--icon-color);
  margin-right: 2px;
}

.login-sub {
  margin: -4px 0 0 0 !important;
  color: #666;
  font-size: 13px;
  font-family: 'Poppins', sans-serif;
}

.login-card .form-group:has(input[type="text"]),
.login-card .form-group:has(input[type="email"]),
.login-card .form-group:has(input[type="password"]) {
  margin-bottom: 6px;
}

.login-card .form-group input {
  width: 100%;
  padding: 10px 16px; /* padding reduzido para combinar com botão menor */
  border-radius: 4px;
  border: 1px solid var(--white-gray);
  font-size: 13px;
  background: var(--white);
  box-sizing: border-box;
}

.login-card .form-group input:focus {
  border-color: var(--icon-color);
}

/* Remove autocomplete background color (blue background que o navegador adiciona) */
.login-card .form-group input:-webkit-autofill,
.login-card .form-group input:-webkit-autofill:hover,
.login-card .form-group input:-webkit-autofill:focus,
.login-card .form-group input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px white inset !important;
  box-shadow: 0 0 0 30px white inset !important;
}

/* Remove autocomplete text color if needed */
.login-card .form-group input:-webkit-autofill {
  -webkit-text-fill-color: var(--brand-black) !important;
}

/* Espaçamento entre o label (texto acima do campo) e o campo */
.form-group label {
  display: block;
  margin-bottom: 6px; /* espaço entre texto de label e input */
}

.login-errors {
  margin-bottom: 12px;
  color: #b00020;
  font-size: 13px;
}

.login-footer {
  margin-top: 8px;
  text-align: center;
  color: #666;
}

.link-muted {
  color: #4d88c6;
  text-decoration: none;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
}

.link-muted:hover {
  text-decoration: underline;
}

/* Estilo para a caixa 'manter conectado' */
.keep-connected {
  display: flex;
  align-items: center;
  padding: 8px 0;
}

.keep-connected label {
  font-size: 13px;
  color: var(--brand-black);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
}

.keep-connected input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-black);
}

@media (max-width: 600px) {
  .login-card {
    width: 92vw;
    padding: 20px;
  }

  .login-logo img {
    height: 36px;
  }

  .login-header .logo svg {
    height: 24px;
  }

  .login-title {
    font-size: 18px;
  }
}

.form-group:not(.keep-connected) {
  position: relative; /* para posicionar o botão do olho */
}

.login-card .form-group input[type="password"] {
  padding-right: 50px; /* espaço para o botão do olho com padding maior */
}

.toggle-password {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.50); /* leve escurecimento */
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Forçar paths/circles/lines do SVG a usar currentColor e aplicar opacidade */
.toggle-password svg,
.toggle-password svg * {
  fill: currentColor;
  opacity: 0.80; /* menos transparente (0.0 - 1.0) */
}

/* Hover: tornar um pouco mais visível ao passar o mouse */
.toggle-password:hover {
  color: rgba(0, 0, 0, 0.78);
}

.toggle-password svg {
  width: 20px;
  height: 20px;
}

#error-message {
  color: red;
  display: none;
  padding-bottom: 4px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
}

/* Pequenos ajustes específicos para a página de reset */
.note {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 12px;
}

.password-rules {
  font-size: 12px;
  color: #777;
  margin-top: 8px;
  margin-bottom: 16px; /* espaço entre o texto de requisitos e o botão */
}

.login-success {
  background: #e6ffed;
  border: 1px solid #b7f0c9;
  padding: 12px;
  border-radius: 4px;
  color: #0b7a3b;
  display: none;
  text-align: center;
  margin-bottom: 8px;
  font-size: 14px;
}

.login-errors {
  background: #ffecec;
  border: 1px solid #f5b2b2;
  padding: 10px 12px;
  border-radius: 4px;
  color: #a10b0b;
  display: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  line-height: 1.25;
  min-height: 44px;
}

/* Pagina Forgot-Password */

.grecaptcha-badge {
  visibility: hidden;
}

.login-success .link-timer {
  font-size: 14px; /* manter o mesmo tamanho do texto principal */
  margin-top: 8px;
  display: block;
  font-weight: 600;
}

.login-card .flag-selector {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* stacked layout: place child paragraphs/links vertically with spacing */
.login-errors.stacked {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

/* Remove default paragraph margins so centering is exact */
.login-errors.stacked p {
  margin: 0;
}