/* ======== ESTILO GENERAL ======== */
body {
  font-family: 'Poppins', Arial, sans-serif;
  background: linear-gradient(135deg, #006400, #00aa44);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  color: #fff;
}

/* ======== FORMULARIO ======== */
form {
  background: white;
  color: #222;
  padding: 40px 35px;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  animation: fadeIn 0.6s ease;
}

/* ======== TÍTULO ======== */
form h2 {
  text-align: center;
  color: #006400;
  margin-bottom: 10px;
}

/* ======== CAMPOS DE TEXTO ======== */
input[type="text"],
input[type="password"] {
  padding: 12px;
  border: 2px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  transition: 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: #00994d;
  box-shadow: 0 0 5px rgba(0, 153, 77, 0.3);
}

/* ======== BOTÓN ======== */
.button {
  background: linear-gradient(135deg, #00994d, #00cc66);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.button:hover {
  background: linear-gradient(135deg, #00b359, #00e673);
  transform: scale(1.03);
}

.button-back {
  background: linear-gradient(135deg, #00994d, #00cc66);
  text-decoration: none ;
  text-align: center;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}
.button-back:hover {
  background: linear-gradient(135deg, #00b359, #00e673);
  transform: scale(1.03);
}
/* ======== MENSAJE DE ERROR ======== */
.error {
  background: #ffdddd;
  color: #b30000;
  border-left: 5px solid #b30000;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
}

/* ======== ANIMACIÓN DE ENTRADA ======== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ======== RESPONSIVE ======== */
@media (max-width: 480px) {
  form {
    padding: 30px 25px;
  }

  form h2 {
    font-size: 1.4em;
  }

  input, button {
    font-size: 14px;
  }
}
