@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

html, body, input, button, textarea, select {
  font-family: 'Poppins', Arial, sans-serif !important;
}
body {
  margin: 0;
  background: #0c2a44;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.login-bg {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('../img/tela-login.jpg') no-repeat center center fixed;
  background-size: cover;
  background-color: #0c2a44;
  padding: 1rem;
  box-sizing: border-box;
}
.login-container {
  padding: 1.5rem;
  border-radius: 8px;
  width: 100%;
  max-width: 350px;
  box-sizing: border-box;
}
.login-container h1 {
  text-align: center;
  color: #1976d2;
}
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}
input[type="text"], input[type="password"] {
  padding: 0.75rem;
  border: 1px solid white;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
}
.input-icon input:focus {
  outline: none;
  box-shadow: 0 0 0 2px #1976d2;
  border-color: #1976d2;
  background: #f7faff;
}
button {
  background: #1976d2;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
  max-width: 200px;
  margin-top: 20px;
  min-height: 48px;
  box-sizing: border-box;
}
/* Spinner overlay reutilizável */
.saving-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.saving-box {
  background: transparent;
  padding: 0;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  box-shadow: none;
  color: #1976d2;
  font-weight: 600;
}
.spinner {
  width: 28px; height: 28px;
  border: 4px solid #e3eafc;
  border-top-color: #1976d2;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error {
 background: #ffebee;
 color: #f44336;
 padding: 0.75rem 1rem;
 border-radius: 8px;
 margin-top: 1rem;
 font-size: 0.9rem;
 border-left: 4px solid #f44336;
}
.input-icon {
  position: relative;
  width: 100%;
}
.input-icon i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: black;
  font-size: 1.1em;
  pointer-events: none;
}
.input-icon input {
  padding-left: 2.9em !important;
}

/* Media queries para responsividade */
@media (max-width: 480px) {
  body.login-bg {
    padding: 0.5rem;
  }
  
  .login-container {
    padding: 1rem;
    max-width: 100%;
  }
  
  input[type="text"], input[type="password"] {
    font-size: 16px; /* Evita zoom no iOS */
    padding: 0.875rem;
  }
  
  button {
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
  }
  
  .input-icon i {
    font-size: 1em;
    left: 12px;
  }
  
  .input-icon input {
    padding-left: 2.5em !important;
  }
}

@media (max-width: 360px) {
  .login-container {
    padding: 0.75rem;
  }
  
  input[type="text"], input[type="password"] {
    padding: 0.75rem;
    font-size: 15px;
  }
  
  button {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
  }
}