/* Responsividade para tablets e laptops */
@media (max-width: 900px) {
  .login-container {
    max-width: 90vw;
    padding: 0 16px;
  }
  .login-box {
    padding: 1.8rem;
    border-radius: 0.9rem;
    width: 100%;
    min-width: unset;
  }
  .logo {
    width: 64px;
    height: 64px;
  }
  h1 {
    font-size: 1.4rem;
  }
}
/* Responsividade aprimorada para o formulário */
@media (max-width: 600px) {
  .login-container {
    max-width: 100vw;
    padding: 0 8px;
  }
  .login-box {
    padding: 1.2rem;
    border-radius: 0.7rem;
    min-width: unset;
    width: 100%;
    box-shadow: 0 4px 16px 0 rgba(10, 34, 64, 0.18);
  }
  .logo {
    width: 56px;
    height: 56px;
  }
  h1 {
    font-size: 1.2rem;
  }
  .form-group input,
  .form-group select {
    font-size: 0.95rem;
    padding: 0.6rem;
  }
}
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

:root {
  --primary-color: #2563eb;
  --secondary-color: #1d4ed8;
  --text-color: #333;
  --error-color: #ef4444;
  --success-color: #22c55e;
  --z-back: -10; /* Alterado para um valor mais baixo */
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #0a2240 0%, #193a5e 100%);
}

/* Particles.js */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-back);
  opacity: 0.9;
}

.wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  z-index: 1; /* Acima das partículas */
}

.login-container {
  width: 100%;
  max-width: 370px;
  position: relative;
  z-index: 2; /* Acima do wrapper e partículas */
}
@media (max-width: 900px) {
  .login-container {
    max-width: 320px;
  }
}
@media (max-width: 600px) {
  .login-container {
    max-width: 98vw;
  }
}

.login-box {
  background: #f7fafc;
  padding: 2.5rem;
  border-radius: 1rem;
  box-shadow: 0 8px 32px 0 rgba(10, 34, 64, 0.25),
    0 1.5px 8px 0 rgba(25, 58, 94, 0.1);
  position: relative;
  transition: opacity 0.5s ease;
  z-index: 3; /* Acima de tudo */
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.25rem;
}

.logo {
  width: 72px;
  height: 72px;
  border-radius: 10%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.logo:hover {
  transform: scale(1.05);
}

h1 {
  color: var(--text-color);
  text-align: center;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

p {
  color: #666;
  text-align: center;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group i {
  position: absolute;
  left: 1rem;
  color: #94a3b8;
  font-size: 1.2rem;
  z-index: 1;
}

.input-group .toggle-password {
  left: auto;
  right: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  background-color: white;
  padding: 2px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 0.75rem 2.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

/* Remover controle nativo de mostrar/ocultar senha do navegador */
input[type="password"]::-ms-reveal {
  display: none;
}

input[type="password"]::-ms-clear {
  display: none;
}

input[type="password"]::-webkit-credentials-auto-fill-button {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  right: 0;
}

input:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

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

.remember-me input[type="checkbox"] {
  accent-color: var(--primary-color);
}

.remember-me span {
  font-size: 0.9rem;
  color: #666;
}

.forgot-password {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.forgot-password:hover {
  color: var(--secondary-color);
}

.btn {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover {
  background-color: var(--secondary-color);
  transform: translateY(-1px);
}

.btn i {
  font-size: 1.2rem;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.alert.error {
  background-color: #fee2e2;
  color: var(--error-color);
  border: 1px solid #fecaca;
}

.alert.success {
  background-color: #dcfce7;
  color: var(--success-color);
  border: 1px solid #bbf7d0;
}

.loader {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(37, 99, 235, 0.1);
  border-top: 5px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsividade */
@media (max-width: 480px) {
  .login-box {
    padding: 2rem;
  }

  .form-options {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}
