body {
  margin: 0;
  padding: 0;
  background: url('../img/fondo.jpg') no-repeat center center fixed;
  background-size: cover;
  font-family: 'Segoe UI', sans-serif;
}

body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: -1;
  animation: fadeInBackground 1s ease forwards;
  opacity: 0;
}

@keyframes fadeInBackground {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 20px;
  box-sizing: border-box;
}

form {
  background-color: #fff;
  padding: 30px;
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.logo-container {
  text-align: center;
  margin-bottom: 20px;
}

.logo-container img {
  max-width: 250px;
  height: auto;
}

h2 {
  text-align: center;
  color: #6c1d45;
  margin-bottom: 20px;
}

label {
  display: block;
  margin: 10px 0 5px;
  color: #6c1d45;
  font-weight: bold;
}

.input-icon {
  display: flex;
  align-items: center;
  border: 2px solid #6c1d45;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 15px;
  background-color: #fff;
}

.input-icon i {
  margin-right: 10px;
  color: #6c1d45;
  font-size: 16px;
}

.input-icon input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 16px;
  background-color: transparent;
  color: #333;
  padding: 5px 0;
}

.input-icon input:focus {
  background-color: #fff8ef;
  transition: background-color 0.2s ease;
}

button {
  width: 100%;
  padding: 12px;
  background-color: #cba65d;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #b18e48;
}

.boton-secundario {
  display: inline-block;
  padding: 12px;
  background-color: #a7a4a4;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  width: 90%;
  text-align: center;
}

.boton-secundario:hover {
  background-color: #8c8989;
}

.mensaje-exito {
  background-color: #d4edda;
  color: #155724;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #c3e6cb;
  border-radius: 5px;
  text-align: center;
}

.mensaje-error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #f5c6cb;
  border-radius: 5px;
  text-align: center;
}

/* -------------------------
   ✅ RESPONSIVE AJUSTES
-------------------------- */

@media (max-width: 480px) {
  form {
    max-width: 95%;
    padding: 20px;
  }

  h2 {
    font-size: 18px;
  }

  .logo-container img {
    max-width: 180px;
  }

  .input-icon input {
    font-size: 15px;
  }

  .input-icon i {
    font-size: 14px;
  }

  button {
    font-size: 15px;
    padding: 10px;
  }
}
