/* Reset básico e configurações globais */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: #f0f4f8; /* Azul acinzentado claro para o fundo */
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  color: #333;
  line-height: 1.6;
  padding: 20px; /* Adiciona padding para evitar que o container toque as bordas em telas pequenas */
}

.login-container {
  background-color: #ffffff;
  padding: 40px 50px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 420px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.login-header {
  margin-bottom: 35px;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #0056b3; /* Azul mais escuro e vibrante */
  margin-bottom: 10px;
}

.logo .fa-bolt {
  font-size: 3.5em; /* Ícone maior e mais destacado */
  margin-bottom: 12px;
  text-shadow: 0 2px 4px rgba(0, 86, 179, 0.2);
}

.logo h1 {
  font-size: 2em;
  font-weight: 700;
  margin: 0;
}

.logo p {
  font-size: 0.95em;
  color: #555;
  font-weight: 300;
}

.login-form .input-group {
  margin-bottom: 25px;
  position: relative;
}

.login-form .input-group i {
  position: absolute;
  left: 18px; /* Posição do ícone à esquerda */
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  transition: color 0.3s ease;
  font-size: 1.1em;
  pointer-events: none; /* Para o ícone não interferir no clique do input */
}

.login-form .input-group input {
  width: 100%;
  padding: 15px 15px 15px 50px; /* Padding esquerdo aumentado para não sobrepor o ícone */
  border: 1px solid #dde2e7;
  border-radius: 8px;
  font-family: "Poppins", sans-serif;
  font-size: 1em;
  color: #333;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.login-form .input-group input:focus {
  outline: none;
  border-color: #0056b3;
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
}

/* Quando o input dentro do grupo está focado, o ícone também muda de cor */
.login-form .input-group input:focus + i {
  color: #0056b3;
}

.login-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(to right, #0069d9, #0056b3); /* Gradiente azul */
  color: white;
  border: none;
  border-radius: 8px;
  font-family: "Poppins", sans-serif;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px; /* Espaço entre texto e ícone */
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 105, 217, 0.2);
}

.login-btn:hover:not(:disabled) {
  /* Só aplicar hover se não estiver desabilitado */
  background: linear-gradient(to right, #0056b3, #004085);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 86, 179, 0.3);
}

.login-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 86, 179, 0.2);
}

.login-btn:disabled {
  background: #cccccc;
  color: #666666;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.login-btn .fa-arrow-right {
  transition: transform 0.3s ease;
}

.login-btn:hover:not(:disabled) .fa-arrow-right {
  transform: translateX(3px);
}

#login-message {
  margin-top: 25px;
  padding: 12px 15px;
  border-width: 1px;
  border-style: solid;
  border-radius: 8px;
  text-align: center;
  font-size: 0.9em;
  display: none;
  line-height: 1.4;
}

#login-message.login-message-active {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estilos para o Card Flutuante de Boas-Vindas */
.welcome-card {
  position: fixed;
  top: 20px;
  right: -400px; /* Começa fora da tela */
  width: 350px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border-left: 5px solid #28a745; /* Verde para sucesso */
  padding: 20px;
  z-index: 1000;
  transition: right 0.5s ease-in-out, opacity 0.5s ease-in-out;
  opacity: 0;
  visibility: hidden;
}

.welcome-card.show {
  right: 20px;
  opacity: 1;
  visibility: visible;
}

.welcome-card-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  color: #28a745;
}

.welcome-card-header .fa-check-circle {
  font-size: 1.8em;
  margin-right: 10px;
}

#welcomeCardTitle {
  font-size: 1.2em;
  font-weight: 600;
}

.welcome-card-body p {
  margin: 5px 0;
  font-size: 0.95em;
  color: #333;
}

.welcome-card-body .last-access {
  font-size: 0.85em;
  color: #666;
  margin-top: 10px;
}

.close-welcome-card-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.8em;
  color: #aaa;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.close-welcome-card-btn:hover {
  color: #333;
}

/* Responsividade */
@media (max-width: 480px) {
  .login-container {
    padding: 30px 25px;
    margin: 0 15px;
  }

  .logo h1 {
    font-size: 1.8em;
  }

  .logo .fa-bolt {
    font-size: 3em;
  }

  .login-form .input-group input {
    padding: 14px 14px 14px 45px;
    font-size: 0.95em;
  }

  .login-btn {
    padding: 14px;
    font-size: 1em;
  }

  #login-message {
    font-size: 0.85em;
  }

  .welcome-card {
    width: calc(100% - 40px);
    max-width: 350px;
    top: 10px;
    right: -100%;
    left: auto;
  }

  .welcome-card.show {
    right: 10px;
    left: 10px;
    margin: 0 auto;
  }
}
