/* Login.css - Redesign Moderno, Minimalista con temas Claro/Oscuro y Partículas */

/* Variables de Tema Claro (Pasteles) */
:root {
  --bg-gradient-1: #ffd1ff;
  --bg-gradient-2: #e0c3fc;
  --card-bg: rgba(255, 255, 255, 0.6);
  --card-border: rgba(255, 255, 255, 0.4);
  --text-main: #333333;
  --text-muted: #666666;
  --input-bg: rgba(255, 255, 255, 0.8);
  --input-border: rgba(255, 255, 255, 0.5);
  --btn-bg: #b8c6fb;
  --btn-hover: #a1b4fa;
  --btn-text: #fff;
  --particle-color: rgba(255, 255, 255, 0.8);
}

/* Variables de Tema Oscuro */
body.dark-version {
  --bg-gradient-1: #1a1a2e;
  --bg-gradient-2: #16213e;
  --card-bg: rgba(15, 15, 25, 0.7);
  --card-border: rgba(255, 255, 255, 0.1);
  --text-main: #f5f5f5;
  --text-muted: #aaaaaa;
  --input-bg: rgba(0, 0, 0, 0.5);
  --input-border: rgba(255, 255, 255, 0.2);
  --btn-bg: #4e5d94;
  --btn-hover: #5d6ea8;
  --btn-text: #fff;
  --particle-color: rgba(100, 150, 255, 0.5);
}

/* Reset y Base */
body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 100%);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: all 0.5s ease;
  overflow-x: hidden;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Fondo de partículas (Pure CSS) */
.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--particle-color);
  box-shadow: 0 0 10px var(--particle-color);
  animation: floatUp infinite linear;
}

@keyframes floatUp {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    transform: translateY(-10vh) scale(1.5);
    opacity: 0;
  }
}

/* Generando partículas con diferentes tamaños, posiciones y duraciones */
.particle:nth-child(1) {
  left: 10%;
  width: 10px;
  height: 10px;
  animation-duration: 12s;
  animation-delay: 0s;
}

.particle:nth-child(2) {
  left: 25%;
  width: 15px;
  height: 15px;
  animation-duration: 18s;
  animation-delay: 2s;
}

.particle:nth-child(3) {
  left: 40%;
  width: 8px;
  height: 8px;
  animation-duration: 15s;
  animation-delay: 4s;
}

.particle:nth-child(4) {
  left: 60%;
  width: 20px;
  height: 20px;
  animation-duration: 22s;
  animation-delay: 1s;
}

.particle:nth-child(5) {
  left: 75%;
  width: 12px;
  height: 12px;
  animation-duration: 14s;
  animation-delay: 5s;
}

.particle:nth-child(6) {
  left: 90%;
  width: 18px;
  height: 18px;
  animation-duration: 20s;
  animation-delay: 3s;
}

.particle:nth-child(7) {
  left: 50%;
  width: 10px;
  height: 10px;
  animation-duration: 16s;
  animation-delay: 6s;
}

.particle:nth-child(8) {
  left: 80%;
  width: 15px;
  height: 15px;
  animation-duration: 19s;
  animation-delay: 8s;
}

.particle:nth-child(9) {
  left: 5%;
  width: 25px;
  height: 25px;
  animation-duration: 25s;
  animation-delay: 0s;
}

.particle:nth-child(10) {
  left: 35%;
  width: 12px;
  height: 12px;
  animation-duration: 13s;
  animation-delay: 7s;
}

/* Navbar minimalista */
.navbar-minimal {
  position: absolute;
  top: 0;
  width: 100%;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-wrapper img {
  width: 40px;
  height: auto;
  border-radius: 8px;
}

.brand-text {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.brand-version {
  font-size: 0.75rem;
  color: var(--text-muted);
  align-self: flex-start;
  margin-top: 5px;
}

/* Switcher de tema */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-switch-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
}

.form-switch .form-check-input {
  width: 2.5rem;
  height: 1.25rem;
  background-color: rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

.form-switch .form-check-input:checked {
  background-color: var(--btn-bg);
}

/* Layour de Login */
.login-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  min-height: 100vh;
}

/* Contenedor de la Tarjeta */
.login-card-container {
  width: 100%;
  max-width: 900px;
  display: flex;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.5s ease;
}

/* Panel Izquierdo (Formulario) */
.login-form-panel {
  flex: 1;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header img {
  width: 80px;
  border-radius: 20px;
  margin-bottom: 1rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.login-header h3 {
  font-size: 2rem;
  font-weight: 800;
  margin: 0;
  color: var(--text-main);
}

.login-header p {
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Inputs */
.modern-input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  color: var(--text-main);
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

.modern-input:focus {
  outline: none;
  border-color: var(--btn-bg);
  box-shadow: 0 0 0 4px rgba(184, 198, 251, 0.2);
}

.modern-input::placeholder {
  color: var(--text-muted);
}

.input-group {
  margin-bottom: 1.5rem;
}

/* Checkbox */
.remember-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2rem;
}

/* Botón Moderno */
.modern-btn {
  width: 100%;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  border-radius: 12px;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s transform, 0.3s background;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.modern-btn:hover {
  background: var(--btn-hover);
  transform: translateY(-2px);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1);
}

.modern-btn:active {
  transform: translateY(0);
}

/* Panel Derecho (Imagen / Mensaje) */
.login-info-panel {
  flex: 1;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3)), url('https://cotener.com/wp-content/uploads/2025/02/esp_20240513-how-to-secure-a-network.webp') no-repeat center center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-info-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  /* Oscurecer imagen de fondo para leer texto */
}

.info-content {
  position: relative;
  z-index: 2;
  color: #fff;
}

.info-quote {
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 300;
  margin-bottom: 1rem;
}

.info-author {
  font-size: 1.2rem;
  font-weight: 700;
}

/* Responsividad */
@media (max-width: 768px) {
  .login-card-container {
    flex-direction: column;
  }

  .login-info-panel {
    display: none;
    /* Ocultar panel derecho en móviles */
  }

  .login-form-panel {
    padding: 2rem;
  }
}

/* Modales y Capas de Carga (Mantener compatibilidad con el JS actual) */
.LoadCapaBlack {
  position: fixed;
  z-index: 9999999999999;
  top: 0px;
  left: 0px;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.LoadCapaContenido {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  color: var(--text-main);
  border-radius: 20px;
  border: 1px solid var(--card-border);
}

.form-control {
  background-color: var(--input-bg) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--input-border) !important;
}