/**
 * =====================================================
 * EDUCONTROL IA - LOGIN MODERNO
 * =====================================================
 * Archivo: login_moderno.css
 * Fecha: 07 de noviembre de 2025
 * Propósito: Estilos para login moderno con animaciones
 * =====================================================
 */

/* ==========================================
   VARIABLES CSS
   ========================================== */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --text-dark: #2d3748;
  --text-light: #718096;
  --bg-light: #f7fafc;
  --white: #ffffff;
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
  
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   RESET Y BASE
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ==========================================
   FONDO ANIMADO
   ========================================== */
.background-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Íconos flotantes educativos */
.floating-icon {
  position: absolute;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.15);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-30px) rotate(10deg);
  }
}

/* Círculos decorativos */
.circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: pulse 4s ease-in-out infinite;
}

.circle-1 {
  width: 300px;
  height: 300px;
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.circle-2 {
  width: 200px;
  height: 200px;
  bottom: -50px;
  right: -50px;
  animation-delay: 2s;
}

.circle-3 {
  width: 150px;
  height: 150px;
  top: 50%;
  right: 10%;
  animation-delay: 4s;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.5;
  }
}

/* ==========================================
   CONTENEDOR PRINCIPAL
   ========================================== */
.login-container {
  position: relative;
  z-index: 1;
  padding: 2rem 1rem;
}

/* ==========================================
   CARD DE LOGIN
   ========================================== */
.login-card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transition: var(--transition);
  animation-duration: 1s;
}

.login-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

/* ==========================================
   PANEL IZQUIERDO
   ========================================== */
.login-left-panel {
  background: var(--primary-gradient);
  color: var(--white);
  padding: 3rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-left-panel::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 30px 30px;
  animation: moveGrid 20s linear infinite;
}

@keyframes moveGrid {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(30px, 30px);
  }
}

.left-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.logo-container {
  margin-bottom: 2rem;
}

.logo-main {
  max-width: 150px;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  animation-duration: 1.5s;
}

.welcome-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  animation-duration: 1s;
}

.welcome-subtitle {
  font-size: 1rem;
  font-weight: 300;
  opacity: 0.9;
  margin-bottom: 2rem;
  animation-duration: 1s;
}

/* Features List */
.features-list {
  text-align: left;
  max-width: 300px;
  margin: 0 auto 2rem;
}

.feature-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.feature-item i {
  margin-right: 0.75rem;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
}

/* Ilustración SVG */
.illustration {
  max-width: 250px;
  margin: 0 auto;
  animation: floatSVG 4s ease-in-out infinite;
}

@keyframes floatSVG {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ==========================================
   PANEL DERECHO - FORMULARIO
   ========================================== */
.login-right-panel {
  padding: 3rem 2.5rem;
  background: var(--white);
  position: relative;
}

.right-content {
  max-width: 400px;
  margin: 0 auto;
}

/* Header del Formulario */
.form-header {
  margin-bottom: 2rem;
}

.icon-circle {
  width: 80px;
  height: 80px;
  background: var(--primary-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
  animation: pulseCircle 2s ease-in-out infinite;
}

@keyframes pulseCircle {
  0%, 100% {
    transform: scale(1);
    box-shadow: var(--shadow-lg);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
  }
}

.icon-circle i {
  font-size: 2.5rem;
  color: var(--white);
}

.form-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.form-subtitle {
  font-size: 0.95rem;
  color: var(--text-light);
  font-weight: 400;
}

/* ==========================================
   INPUTS MODERNOS CON FLOATING LABELS
   ========================================== */
.form-group-modern {
  position: relative;
  margin-bottom: 1.5rem;
}

.input-group-modern {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 45px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 1.1rem;
  z-index: 2;
  transition: var(--transition);
}

.form-control-modern {
  width: 100%;
  padding: 1rem 3rem 1rem 3.5rem;
  border: none;
  border-bottom: 2px solid #e2e8f0;
  background: transparent;
  font-size: 1rem;
  color: var(--text-dark);
  outline: none;
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.form-control-modern:focus {
  border-bottom-color: var(--primary-color);
}

.form-control-modern:focus ~ .input-icon {
  color: var(--primary-color);
}

/* Floating Label */
.floating-label {
  position: absolute;
  left: 3.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--text-light);
  pointer-events: none;
  transition: var(--transition);
  z-index: 0;
}

.form-control-modern:focus ~ .floating-label,
.form-control-modern:not(:placeholder-shown) ~ .floating-label,
.form-group-modern.focused .floating-label {
  top: -10px;
  font-size: 0.75rem;
  color: var(--primary-color);
  font-weight: 500;
  left: 0;
}

/* Underline animado */
.input-underline {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: width 0.4s ease;
}

.form-group-modern.focused .input-underline,
.form-control-modern:focus ~ .input-underline {
  width: 100%;
}

/* Toggle Password Button */
.toggle-password {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-light);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 2;
  transition: var(--transition);
}

.toggle-password:hover {
  color: var(--primary-color);
}

/* Validación Visual */
.form-control-modern.valid {
  border-bottom-color: #48bb78;
}

.form-control-modern.valid ~ .input-icon {
  color: #48bb78;
}

.form-control-modern.invalid {
  border-bottom-color: #f56565;
}

.form-control-modern.invalid ~ .input-icon {
  color: #f56565;
}

/* ==========================================
   CHECKBOX MODERNO
   ========================================== */
.form-check-modern {
  display: flex;
  align-items: center;
}

.form-check-input-modern {
  width: 18px;
  height: 18px;
  border: 2px solid #cbd5e0;
  border-radius: 4px;
  cursor: pointer;
  appearance: none;
  transition: var(--transition);
  position: relative;
}

.form-check-input-modern:checked {
  background: var(--primary-gradient);
  border-color: var(--primary-color);
}

.form-check-input-modern:checked::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 10px;
}

.form-check-label-modern {
  margin-left: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
  cursor: pointer;
  user-select: none;
}

/* ==========================================
   ENLACES
   ========================================== */
.forgot-link {
  font-size: 0.9rem;
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
}

.forgot-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* ==========================================
   BOTÓN DE LOGIN MODERNO
   ========================================== */
.btn-login {
  position: relative;
  width: 100%;
  padding: 1rem 2rem;
  background: var(--primary-gradient);
  border: none;
  border-radius: var(--border-radius);
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.btn-login::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.btn-login:hover::before {
  left: 100%;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(102, 126, 234, 0.4);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-text {
  margin-right: 0.5rem;
}

.btn-icon {
  transition: transform 0.3s ease;
}

.btn-login:hover .btn-icon {
  transform: translateX(5px);
}

/* ==========================================
   ALERTAS MODERNAS
   ========================================== */
.alert-modern {
  padding: 1rem;
  border-radius: var(--border-radius);
  border: none;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  margin-top: 1rem;
  animation-duration: 0.5s;
}

.alert-modern.alert-danger {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: var(--white);
}

.alert-modern.alert-success {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: var(--white);
}

.alert-modern.alert-warning {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  color: var(--white);
}

/* ==========================================
   DIVIDER MODERNO
   ========================================== */
.divider-modern {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
}

.divider-modern::before,
.divider-modern::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.divider-modern span {
  padding: 0 1rem;
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
}

/* ==========================================
   SECURITY BADGES
   ========================================== */
.security-badges {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.badge-security {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  background: var(--bg-light);
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
}

.badge-security i {
  margin-right: 0.4rem;
  color: var(--primary-color);
}

/* ==========================================
   COPYRIGHT FOOTER
   ========================================== */
.copyright-footer {
  color: var(--white);
  font-size: 0.9rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.copyright-footer a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.copyright-footer a:hover {
  text-decoration: underline;
}

.version-text {
  font-size: 0.8rem;
  opacity: 0.9;
  margin: 0;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

/* Tablets */
@media (max-width: 991px) {
  .login-left-panel {
    padding: 2rem 1.5rem;
  }
  
  .login-right-panel {
    padding: 2rem 1.5rem;
  }
  
  .welcome-title {
    font-size: 1.5rem;
  }
  
  .logo-main {
    max-width: 120px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .login-card {
    border-radius: 15px;
  }
  
  .login-left-panel {
    padding: 2rem 1rem;
    text-align: center;
  }
  
  .login-right-panel {
    padding: 2rem 1.5rem;
  }
  
  .welcome-title {
    font-size: 1.3rem;
  }
  
  .welcome-subtitle {
    font-size: 0.9rem;
  }
  
  .features-list {
    max-width: 100%;
    margin-bottom: 1.5rem;
  }
  
  .illustration {
    max-width: 180px;
  }
  
  .form-title {
    font-size: 1.5rem;
  }
  
  .icon-circle {
    width: 60px;
    height: 60px;
  }
  
  .icon-circle i {
    font-size: 2rem;
  }
  
  .floating-icon {
    font-size: 1.5rem;
  }
  
  .circle-1 {
    width: 200px;
    height: 200px;
  }
  
  .circle-2 {
    width: 150px;
    height: 150px;
  }
  
  .circle-3 {
    width: 100px;
    height: 100px;
  }
}

/* Small Mobile */
@media (max-width: 575px) {
  body {
    font-size: 14px;
  }
  
  .login-container {
    padding: 1rem 0.5rem;
  }
  
  .login-left-panel,
  .login-right-panel {
    padding: 1.5rem 1rem;
  }
  
  .form-control-modern {
    padding: 0.9rem 3rem 0.9rem 3rem;
  }
  
  .btn-login {
    padding: 0.9rem 1.5rem;
  }
}

/* ==========================================
   ANIMACIONES ADICIONALES
   ========================================== */

/* Loading spinner para el botón */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.btn-login.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn-login.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Animación de éxito */
@keyframes success {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.form-control-modern.success {
  animation: success 0.3s ease;
}

/* ==========================================
   MODO OSCURO (Opcional para futuro)
   ========================================== */
@media (prefers-color-scheme: dark) {
  /* Se puede implementar modo oscuro aquí */
}







