/* ====== RESET GENERAL ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', Arial, sans-serif;
  background: linear-gradient(135deg, #e0e7ff 0%, #f8fafc 100%);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: #333;
}

/* ====== CONTENEDOR PRINCIPAL ====== */
.main-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* ====== TÍTULO ====== */
.main-container h2 {
  font-size: 2rem;
  margin-bottom: 25px;
  color: #1e293b;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ====== FORMULARIO ====== */
form {
  background: #ffffff;
  padding: 40px 45px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 450px;
  transition: all 0.3s ease;
}

form:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

/* ====== CAMPOS DE ENTRADA ====== */
form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="tel"] {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 18px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  background-color: #f9fafb;
  transition: all 0.25s ease;
}

form input:focus {
  border-color: #2563eb;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: none;
}

/* ====== MENSAJE AJAX DEL CORREO ====== */
#mensaje-correo {
  font-size: 0.9rem;
  margin-top: -10px;
  margin-bottom: 12px;
  transition: color 0.3s ease;
}

/* ====== BOTÓN ====== */
form button[type="submit"] {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
}

form button[type="submit"]:hover {
  background: linear-gradient(135deg, #1e40af, #1d4ed8);
  transform: translateY(-2px);
}

/* ====== ERRORES ====== */
.errores {
  background-color: #fee2e2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 12px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  width: 100%;
  max-width: 450px;
  font-size: 0.95rem;
}

.errores ul {
  list-style: none;
  padding-left: 0;
}

/* ====== MENSAJES DE ESTADO ====== */
.registro-exito {
  background-color: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 14px;
  margin-top: 20px;
  text-align: center;
  border-radius: 8px;
}

/* ====== CAMPOS CON ERROR ====== */
input.error {
  border-color: #dc2626;
  background-color: #fff5f5;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 500px) {
  form {
    padding: 30px 25px;
    border-radius: 12px;
  }

  .main-container h2 {
    font-size: 1.6rem;
  }
}
