/* ====== LOGIN GENERAL ====== */
body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(
      rgba(240, 226, 220, 0.5),
      rgba(190, 164, 156, 0.7)
    ),
    url("../assets/img/fondologin.jpg") center center / cover no-repeat;
  min-height: 100dvh; /* ✅ mejor que 100vh en móviles */
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden; /* 👈 solo oculta el desborde horizontal */
  overflow-y: auto;   /* 👈 permite desplazarse si se necesita */
}

/* ====== CARD CONTAINER ====== */
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 1100px;
  min-height: 600px;
  position: relative;
}

/* ====== CARD LOGIN ====== */
.card {
  width: 450px;
  padding: 45px;
  border-radius: 20px;
  position: relative;
  text-align: center;
  background: linear-gradient(145deg, rgba(255,255,255,0.25), rgba(255,255,255,0.15));
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 10px 25px rgba(0,0,0,0.25), 0 0 15px rgba(255,255,255,0.1) inset;
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
  overflow: hidden;
  animation: fadeUp 0.8s ease forwards;
}

/* ====== PARTICLE EFFECTS ====== */
.card::before, .card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  width: 15px;
  height: 15px;
  animation: floatParticle 8s infinite;
  opacity: 0.6;
}

.card::after {
  width: 10px;
  height: 10px;
  top: 50%;
  left: 70%;
  animation-delay: 3s;
}

@keyframes floatParticle {
  0% { transform: translateY(0px) translateX(0px); opacity: 0.5; }
  25% { transform: translateY(-20px) translateX(10px); opacity: 0.7; }
  50% { transform: translateY(-40px) translateX(-10px); opacity: 0.6; }
  75% { transform: translateY(-60px) translateX(5px); opacity: 0.8; }
  100% { transform: translateY(-80px) translateX(0px); opacity: 0.5; }
}

/* ====== CARD SHIMMER ====== */
.card::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(120deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0.1) 100%);
  transform: rotate(25deg);
  pointer-events: none;
  transition: all 0.5s ease;
}

.card:hover::after {
  top: -20%;
  left: -20%;
  background: linear-gradient(120deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.35) 50%, rgba(255,255,255,0.15) 100%);
}

/* ====== CARD HOVER ====== */
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.35), 0 0 25px rgba(255,255,255,0.2) inset;
  backdrop-filter: blur(15px) saturate(180%) brightness(115%);
}

/* ====== CARD HEADER ====== */
.card-header {
  font-size: 24px;
  font-weight: 600;
  border-radius: 20px !important;
  color: #4a2f2b;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

/* ====== INPUTS ====== */
.form-control {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 2px solid #b78e82;
  background: linear-gradient(145deg, #fffdfb, #f5eae5);
  color: #3e2723;
  box-shadow: inset 2px 2px 5px rgba(0,0,0,0.05);
  margin-bottom: 20px;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease forwards;
}

.form-control:nth-child(1) { animation-delay: 0.2s; }
.form-control:nth-child(2) { animation-delay: 0.4s; }

.form-control:focus,
.form-control:hover {
  border-color: #a46b5c;
  box-shadow: 0 0 12px rgba(164,107,92,0.4);
  transform: scale(1.03);
}

/* ====== BUTTON ====== */
.btn-primary {
  background: linear-gradient(90deg, #a46b5c, #c49485);
  border: none;
  border-radius: 10px;
  font-weight: 600;
  padding: 12px;
  width: 100%;
  color: #fff;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.6s;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0.15), rgba(255,255,255,0.4), rgba(255,255,255,0.15));
  transform: skewX(-20deg);
  transition: all 0.5s ease;
}

.btn-primary:hover::after {
  left: 125%;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 12px rgba(0,0,0,0.25);
  background: linear-gradient(90deg, #8b584b, #b48071);
}

/* ====== ALERT ====== */
.alert {
  background: rgba(255, 230, 230, 0.9);
  border: 1px solid #b84b4b;
  color: #7b2424;
  font-size: 14px;
  border-radius: 8px;
  margin-top: 10px;
}

/* ====== FOOTER LINKS ====== */
.text-center a {
  color: #a46b5c;
  text-decoration: none;
  font-weight: 600;
}

.text-center a:hover {
  text-decoration: underline;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 480px) {
  .card {
    width: 90%;
    padding: 20px;
  }
}

/* ====== ANIMATIONS ====== */
@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(30px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
