/* =================================
   LOGIN MODERNO ANDCAT - FONDO DINÁMICO
   ================================= */

/* Importar fuente elegante */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800&display=swap');

body {
  background: linear-gradient(135deg, #6A4C9C 0%, #8B6BB1 50%, #4E9F73 100%) !important;
  min-height: 100vh;
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
}

/* Fondo animado con formas geométricas */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(78, 159, 115, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(139, 107, 177, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  animation: backgroundMove 20s ease-in-out infinite;
  z-index: -2;
}

/* Formas flotantes animadas */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.3), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.2), transparent),
    radial-gradient(2px 2px at 160px 30px, rgba(255,255,255,0.3), transparent);
  background-repeat: repeat;
  background-size: 200px 150px;
  animation: sparkle 25s linear infinite;
  z-index: -1;
}

/* Círculos flotantes grandes */
.floating-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.floating-shapes::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(78, 159, 115, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  top: -150px;
  left: -150px;
  animation: float1 30s ease-in-out infinite;
}

.floating-shapes::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(139, 107, 177, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  bottom: -100px;
  right: -100px;
  animation: float2 25s ease-in-out infinite reverse;
}

/* Animaciones */
@keyframes backgroundMove {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes sparkle {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
  }
}

@keyframes float1 {
  0%, 100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  33% {
    transform: translate(100px, -50px) scale(1.1) rotate(120deg);
  }
  66% {
    transform: translate(-50px, 100px) scale(0.9) rotate(240deg);
  }
}

@keyframes float2 {
  0%, 100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  50% {
    transform: translate(-80px, -120px) scale(1.2) rotate(180deg);
  }
}

.material-half-bg {
  display: none;
}

.login-content {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 450px;
}

.logo {
  text-align: center;
  margin-bottom: 40px;
  width: 100%;
}

.logo h1 {
  color: white;
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 15px rgba(0,0,0,0.3);
  letter-spacing: 1px;
  text-transform: uppercase;
  background: linear-gradient(45deg, #ffffff, #f0f0f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  text-align: center;
}

.logo h1::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, #ffffff, #f0f0f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.3));
}

.login-box {
  background: white;
  border-radius: 15px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  width: 100%;
  position: relative;
  height: 500px;
  overflow: hidden;
  perspective: 1000px;
  margin: 0 auto;
}

.login-head {
  color: #333;
  font-size: 1.3rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.login-head i {
  color: #4E9F73;
  margin-right: 10px;
}

.form-group {
  margin-bottom: 20px;
}

.control-label {
  color: #555;
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
  background: #f8f9fa;
  box-sizing: border-box;
}

.form-control:focus {
  border-color: #6A4C9C;
  background: white;
  box-shadow: 0 0 0 3px rgba(106, 76, 156, 0.1);
}

.utility {
  text-align: center;
  margin: 15px 0;
}

.utility a {
  color: #6A4C9C;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.3s ease;
  cursor: pointer;
}

.utility a:hover {
  color: #4E9F73;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #6A4C9C 0%, #8B6BB1 100%);
  border: none;
  border-radius: 8px;
  padding: 12px 30px;
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  width: 100%;
  color: white;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(106, 76, 156, 0.4);
  background: linear-gradient(135deg, #8B6BB1 0%, #6A4C9C 100%);
}

#divLoading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(106, 76, 156, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#divLoading div {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  text-align: center;
}

#alertLogin {
  margin: 15px 0;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
}

/* ===========================
   ANIMACIÓN FLIP - VERSIÓN SIMPLIFICADA
   =========================== */

.login-form, .forget-form {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px;
  transition: opacity 0.5s ease, transform 0.5s ease;
  backface-visibility: hidden;
}

/* Estado inicial */
.login-form {
  opacity: 1;
  transform: translateX(0);
  z-index: 2;
}

.forget-form {
  opacity: 0;
  transform: translateX(100%);
  z-index: 1;
}

/* Estado flipped - ANIMACIÓN SLIDE */
.login-box.flipped .login-form {
  opacity: 0;
  transform: translateX(-100%);
  z-index: 1;
}

.login-box.flipped .forget-form {
  opacity: 1;
  transform: translateX(0);
  z-index: 2;
}

@media (max-width: 768px) {
  .logo h1 {
    font-size: 1.5rem;
  }
  
  .login-container {
    padding: 0 10px;
  }
  
  .login-box {
    margin: 20px auto;
    height: auto;
    min-height: 500px;
    max-width: 350px;
  }
  
  .logo {
    margin-bottom: 30px;
  }
}




