/* Reset y configuración base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #050505; /* Black background */
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Background decorativo */
.background-decoration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.circle {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(191, 0, 255, 0.15), /* Purple */
    rgba(0, 212, 255, 0.1) /* Cyan */
  );
  animation: float 6s ease-in-out infinite;
  filter: blur(40px);
}

.circle-1 {
  width: 300px;
  height: 300px;
  top: -150px;
  right: -150px;
  animation-delay: 0s;
}

.circle-2 {
  width: 200px;
  height: 200px;
  bottom: -100px;
  left: -100px;
  animation-delay: 2s;
}

.circle-3 {
  width: 150px;
  height: 150px;
  top: 50%;
  left: 10%;
  animation-delay: 4s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

/* Container principal */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: transparent;
  margin: 0 auto;
  width: 100%;
}

/* Sección de branding (izquierda) */
.login-brand {
  background: linear-gradient(135deg, #0a0a0a 0%, #ffffff 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  position: relative;
  overflow: hidden;
  border-right: 1px solid #333;
}

.login-brand::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.03)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.brand-content {
  text-align: center;
  z-index: 1;
  position: relative;
}

.logo-container {
  margin-bottom: 30px;
}

.brand-logo {
  width: 120px;
  height: auto;
  filter: brightness(0) invert(1);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.brand-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  background: linear-gradient(90deg, #00d4ff, #410070);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.brand-subtitle {
  font-size: 1.2rem;
  color: #a0a0a0;
  margin-bottom: 40px;
  font-weight: 300;
}

.brand-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 40px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 15px;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.feature-item:hover {
  opacity: 1;
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Sección del formulario (derecha) */
.login-form-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  background: linear-gradient(#111, #111) padding-box, linear-gradient(135deg, #00d4ff, #bf00ff) border-box;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.4), 0 0 50px rgba(191, 0, 255, 0.3), inset 0 0 15px rgba(0, 0, 0, 0.8);
  border: 2px solid transparent;
  width: 100%;
  max-width: 450px;
  position: relative;
  z-index: 10;
}

.form-container {
  width: 100%;
  max-width: 400px;
}

.form-header {
  text-align: center;
  margin-bottom: 40px;
}

.form-title {
  font-size: 2rem;
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 10px;
}

.form-subtitle {
  color: #a0a0a0;
  font-size: 1rem;
  font-weight: 400;
}

/* Alertas */
.alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 25px;
  font-size: 0.9rem;
}

.alert-error {
  background-color: #fee;
  color: #c53030;
  border: 1px solid #fecaca;
}

.alert-icon {
  flex-shrink: 0;
}

/* Formulario */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-weight: 600;
  color: #e5e7eb;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 15px;
  color: #9ca3af;
  z-index: 1;
  pointer-events: none;
}

.form-input {
  width: 100%;
  padding: 15px 15px 15px 50px;
  border: 1px solid #444;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #222;
  color: #ffffff;
}

.form-input:focus {
  outline: none;
  border-color: #00d4ff;
  background: #222;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.form-input::placeholder {
  color: #9ca3af;
}

.password-toggle {
  position: absolute;
  right: 15px;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 5px;
  border-radius: 5px;
  transition: color 0.3s ease;
}

.password-toggle:hover {
  color: #00d4ff;
}

/* Opciones del formulario */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #d1d5db;
  position: relative;
}

.checkbox-container input[type="checkbox"] {
  opacity: 0;
  position: absolute;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid #e5e7eb;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
  background-color: #00d4ff;
  border-color: #00d4ff;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
  content: "✓";
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.forgot-password {
  color: #00d4ff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.forgot-password:hover {
  color: #a70321;
  text-decoration: underline;
}

/* Botón de login */
.btn-login {
  background: linear-gradient(135deg, #00d4ff 0%, #410070 100%);
  color: white;
  border: none;
  padding: 16px 24px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-login::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-login:hover::before {
  left: 100%;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

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

.btn-text {
  flex: 1;
}

.btn-icon {
  transition: transform 0.3s ease;
}

.btn-login:hover .btn-icon {
  transform: translateX(5px);
}

/* Footer del formulario */
.form-footer {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.back-link a {
  color: #6b7280;
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s ease;
}

.back-link a:hover {
  color: #00d4ff;
}

/* Responsive Design */
@media (max-width: 768px) {
  .login-container {
    grid-template-columns: 1fr;
    max-width: 100%;
    margin: 0;
    min-height: 100vh;
  }

  .login-brand {
    padding: 40px 20px;
  }

  .brand-title {
    font-size: 2rem;
  }

  .brand-features {
    display: none;
  }

  .login-form-section {
    padding: 40px 20px;
  }

  .form-container {
    max-width: 100%;
  }

  .form-options {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .circle-1,
  .circle-2,
  .circle-3 {
    display: none;
  }
}

@media (max-width: 480px) {
  .login-brand {
    padding: 30px 15px;
  }

  .brand-title {
    font-size: 1.8rem;
  }

  .brand-subtitle {
    font-size: 1rem;
  }

  .login-form-section {
    padding: 30px 15px;
  }

  .form-title {
    font-size: 1.8rem;
  }

  .form-input {
    padding: 12px 12px 12px 45px;
  }

  .btn-login {
    padding: 14px 20px;
  }
}

/* Animaciones adicionales */
@keyframes slideInFromLeft {
  0% {
    opacity: 0;
    transform: translateX(-50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  0% {
    opacity: 0;
    transform: translateX(50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.login-brand {
  animation: slideInFromLeft 0.8s ease-out;
}

.login-form-section {
  animation: slideInFromRight 0.8s ease-out;
}

/* Estados de carga para el botón */
.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-login:disabled:hover {
  transform: none;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

/* Efectos de enfoque mejorados */
.form-input:focus + .input-icon {
  color: #00d4ff;
}

/* Estilo para navegadores webkit (Chrome, Safari) */
.form-input::-webkit-outer-spin-button,
.form-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Mejorar accesibilidad */
.form-input:focus-visible {
  outline: 2px solid #00d4ff;
  outline-offset: 2px;
}

.btn-login:focus-visible {
  outline: 2px solid #00d4ff;
  outline-offset: 2px;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}


/* ESTILOS FORZADOS PARA TEMA CLARO CON DETALLES NEON */
/* body { background-color: #f4f7f6 !important; color: #1a1a1a; } - REMOVED FOR LOGON DARK THEME */
.content, .container, .section-container, .tab-content, .card, .usuarios-dias-especiales-container, .panel-dias-especiales-global { background-color: #ffffff !important; border: 1px solid #e0e6ed !important; color: #1a1a1a !important; }
.tab-content h1, .tab-content h2, .tab-content h3, .section-container h3, .card h3, .panel-header h4 { color: #410070 !important; }
.tab-content p, .tab-content span, .tab-content td, .tab-content strong, .tab-content label { color: #333333 !important; }

.btn-nuevo span, .btn-agregar span, .btn-editar span, 

.btn-nuevo, .btn-agregar, .btn-editar, .btn-confirmar, .btn-eliminar, .btn-rechazar, .btn-cancelar { color: #ffffff !important; }
.btn-nuevo span, .btn-agregar span, .btn-editar span, .btn-confirmar span, .btn-eliminar span, .btn-rechazar span, .btn-cancelar span { color: #ffffff !important; }

/* RESTAURACIÓN DE FONDOS DE BOTONES */
.btn-nuevo, .btn-agregar { 
    background: linear-gradient(135deg, #00d4ff, #0096b4) !important; 
    border: none !important;
}
.btn-editar, .btn-confirmar { 
    background: linear-gradient(135deg, #7b00cc, #410070) !important; 
    border: none !important;
}
.btn-eliminar, .btn-rechazar { 
    background: linear-gradient(135deg, #ff3366, #b1002e) !important; 
    border: none !important;
}
.btn-cancelar { 
    background: linear-gradient(135deg, #a0a0a0, #6c757d) !important; 
    border: none !important;
}

/* FIX PARA TEXTO BLANCO EN BADGES Y ROLES - MAS ESPECIFICO PARA VENCER REGLAS DE TEMA CLARO */
.tab-content .codigo-badge, .tab-content .badge, .tab-content [class*="badge"], .tab-content .user-rol span, .tab-content .rol-badge, 
.section-container .codigo-badge, .section-container .badge, .section-container [class*="badge"], .section-container .user-rol span, .section-container .rol-badge { 
    color: #ffffff !important; 
}
