@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800;900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0d00 0%, #1a1f05 50%, #272b00 100%);
  height: 100vh;
  position: relative;
}

/* Partículas de fondo */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Grid futurista */
.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(156, 163, 38, 0.03) 2px,
      rgba(156, 163, 38, 0.03) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(156, 163, 38, 0.03) 2px,
      rgba(156, 163, 38, 0.03) 4px
    );
  z-index: 0;
}

.container-fluid {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* Contenedor principal */
.login-container {
  width: 95%;
  max-width: 1200px;
  height: 700px;
  display: flex;
  position: relative;
  background: rgba(10, 13, 0, 0.4);
  backdrop-filter: blur(20px);
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(156, 163, 38, 0.2);
  box-shadow:
    0 50px 100px rgba(0, 0, 0, 0.6),
    inset 0 0 100px rgba(39, 43, 0, 0.3);
}

/* Panel izquierdo - Branding con línea divisoria */
.brand-panel {
  flex: 0 0 55%;
  background: linear-gradient(
    165deg,
    rgba(39, 43, 0, 0.8) 0%,
    rgba(10, 13, 0, 0.9) 100%
  );
  padding: 80px 70px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

/* Línea divisoria diagonal semi-vertical */
.brand-panel::after {
  content: "";
  position: absolute;
  top: -20%;
  right: 0;
  width: 4px;
  height: 140%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(156, 163, 38, 0.3) 10%,
    rgba(156, 163, 38, 0.8) 50%,
    rgba(156, 163, 38, 0.3) 90%,
    transparent 100%
  );
  box-shadow:
    0 0 30px rgba(156, 163, 38, 0.6),
    0 0 60px rgba(156, 163, 38, 0.4);
  transform: rotate(-8deg);
  transform-origin: center;
  animation: pulse-line 3s ease-in-out infinite;
}

@keyframes pulse-line {
  0%,
  100% {
    opacity: 0.6;
    filter: blur(1px);
  }
  50% {
    opacity: 1;
    filter: blur(0px);
  }
}

/* Efecto de resplandor detrás de la línea */
.brand-panel::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -50px;
  width: 200px;
  height: 140%;
  background: radial-gradient(
    ellipse,
    rgba(156, 163, 38, 0.15) 0%,
    transparent 70%
  );
  transform: rotate(-8deg);
  animation: glow-pulse 4s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.8;
  }
}

/* Logo con anillos rotatorios */
.logo-container {
  position: relative;
  width: 270px;
  height: 270px;
  margin: 0 auto 50px;
}

.logo-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-radius: 50%;
  border-top-color: #9ca326;
  border-right-color: #9ca326;
  border-bottom-color: rgba(156, 163, 38, 0.3);
  border-left-color: rgba(156, 163, 38, 0.3);
  animation: rotate 6s linear infinite;
  filter: drop-shadow(0 0 20px rgba(156, 163, 38, 0.4));
}

.logo-ring:nth-child(2) {
  animation-duration: 8s;
  animation-direction: reverse;
  width: 85%;
  height: 85%;
  top: 7.5%;
  left: 7.5%;
  border-top-color: rgba(156, 163, 38, 0.6);
  border-right-color: rgba(156, 163, 38, 0.6);
}

.logo-ring:nth-child(3) {
  animation-duration: 10s;
  width: 70%;
  height: 70%;
  top: 15%;
  left: 15%;
  border-top-color: #272b00;
  border-right-color: #272b00;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

.logo-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 170px;
  height: 170px;
  background: linear-gradient(135deg, #272b00, #9ca326, #6b7019);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 25px 80px rgba(156, 163, 38, 0.5),
    inset 0 0 50px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.logo-center::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  animation: shine 4s infinite;
}

@keyframes shine {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.logo-center i {
  font-size: 100px;
  color: white;
  z-index: 1;
  filter: drop-shadow(0 5px 20px rgba(0, 0, 0, 0.5));
}

/* Título y subtítulos */
.brand-content {
  text-align: center;
}

.brand-title {
  font-size: 72px;
  font-weight: 900;
  background: linear-gradient(135deg, #ffffff 0%, #9ca326 50%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 16px;
  margin-bottom: 20px;
  text-shadow: 0 0 60px rgba(156, 163, 38, 0.5);
  filter: drop-shadow(0 0 30px rgba(156, 163, 38, 0.3));
}

.brand-subtitle {
  font-size: 16px;
  color: #9ca326;
  letter-spacing: 6px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.brand-description {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 3px;
  font-weight: 400;
  margin-bottom: 40px;
}

/* Panel derecho - Formulario */
.form-panel {
  flex: 0 0 45%;
  padding: 80px 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  background: rgba(0, 0, 0, 0.2);
}

.form-header {
  margin-bottom: 50px;
  position: relative;
}

.form-header h2 {
  font-size: 48px;
  font-weight: 900;
  color: white;
  margin-bottom: 12px;
  letter-spacing: 4px;
  position: relative;
}

.form-header h2::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #9ca326, transparent);
  border-radius: 2px;
}

.form-header p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  letter-spacing: 1px;
  margin-top: 25px;
}

/* Inputs modernos */
.input-group-modern {
  position: relative;
  margin-bottom: 30px;
}

.input-group-modern label {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.input-container {
  position: relative;
}

.input-container input {
  width: 100%;
  padding: 18px 20px 18px 55px;
  background: rgba(156, 163, 38, 0.05);
  border: 2px solid rgba(156, 163, 38, 0.2);
  border-radius: 16px;
  color: white;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.input-container input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.input-container input:focus {
  outline: none;
  background: rgba(156, 163, 38, 0.1);
  border-color: #9ca326;
  box-shadow:
    0 0 0 4px rgba(156, 163, 38, 0.1),
    0 0 30px rgba(156, 163, 38, 0.3);
}

.input-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca326;
  font-size: 20px;
  pointer-events: none;
  transition: all 0.3s ease;
}

.input-container input:focus ~ .input-icon {
  color: #ffffff;
  transform: translateY(-50%) scale(1.1);
}

/* Botón principal */
.btn-submit {
  width: 100% !important;
  padding: 18px 20px !important;
  background: linear-gradient(
    135deg,
    #9ca326 0%,
    #6b7019 50%,
    #9ca326 100%
  ) !important;
  background-size: 200% 200% !important;
  border: 2px solid rgba(156, 163, 38, 0.5) !important;
  border-radius: 16px !important;
  color: white !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 3px !important;
  cursor: pointer !important;
  transition: all 0.4s ease !important;
  margin-top: 30px !important;
  position: relative !important;
  overflow: hidden !important;
  z-index: 10 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  box-shadow:
    0 8px 25px rgba(156, 163, 38, 0.4),
    0 0 40px rgba(156, 163, 38, 0.2),
    inset 0 2px 10px rgba(255, 255, 255, 0.1),
    inset 0 -2px 10px rgba(0, 0, 0, 0.2) !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

#btnLogin {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.btn-submit::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.6s;
  z-index: 1;
}

.btn-submit::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transition:
    width 0.6s,
    height 0.6s;
  z-index: 0;
}

.btn-submit:hover {
  transform: translateY(-4px);
  background-position: 100% 50%;
  border-color: rgba(156, 163, 38, 0.8);
  box-shadow:
    0 15px 40px rgba(156, 163, 38, 0.6),
    0 0 60px rgba(156, 163, 38, 0.4),
    inset 0 2px 15px rgba(255, 255, 255, 0.2),
    inset 0 -2px 15px rgba(0, 0, 0, 0.3);
  filter: brightness(1.15) saturate(1.2);
}

.btn-submit:hover::before {
  left: 100%;
}

.btn-submit:hover::after {
  width: 300px;
  height: 300px;
}

.btn-submit:active {
  transform: translateY(-1px);
  box-shadow:
    0 5px 15px rgba(156, 163, 38, 0.5),
    0 0 30px rgba(156, 163, 38, 0.3),
    inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.btn-submit:focus {
  outline: none;
  box-shadow:
    0 8px 25px rgba(156, 163, 38, 0.4),
    0 0 0 4px rgba(156, 163, 38, 0.3),
    0 0 40px rgba(156, 163, 38, 0.2),
    inset 0 2px 10px rgba(255, 255, 255, 0.1);
}

/* Enlace de olvidó contraseña */
.forgot-password-container {
  text-align: center;
  margin-top: 25px;
}

.forgot-password {
  color: #9ca326;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
}

.forgot-password::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: #9ca326;
  transition: width 0.3s ease;
}

.forgot-password:hover {
  color: #ffffff;
}

.forgot-password:hover::after {
  width: 100%;
}

/* Versión del sistema */
.system-version {
  position: absolute;
  bottom: 30px;
  right: 70px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
}

/* Responsive para tablets */
@media (max-width: 1200px) {
  .login-container {
    max-width: 95%;
    height: 700px;
  }

  .brand-panel,
  .form-panel {
    padding: 60px 50px;
  }

  .brand-title {
    font-size: 60px;
    letter-spacing: 12px;
  }

  .logo-container {
    width: 230px;
    height: 230px;
    margin-bottom: 40px;
  }

  .logo-center {
    width: 150px;
    height: 150px;
  }

  .logo-center i {
    font-size: 90px;
  }
}

/* Responsive para móviles - SIN SCROLL */
@media (max-width: 768px) {
  .login-container {
    flex-direction: column;
    height: 100vh;
    max-width: 100%;
    border-radius: 0;
    margin: 0;
  }

  .brand-panel {
    flex: 0 0 auto;
    padding: 20px 20px 15px;
    order: 1;
    min-height: auto;
  }

  .brand-panel::after,
  .brand-panel::before {
    display: none;
  }

  .logo-container {
    width: 130px;
    height: 130px;
    margin: 0 auto 15px;
  }

  .logo-center {
    width: 90px;
    height: 90px;
  }

  .logo-center i {
    font-size: 50px;
  }

  /* Ocultar textos en móvil */
  .brand-title,
  .brand-subtitle,
  .brand-description {
    display: none;
  }

  .form-panel {
    flex: 1;
    padding: 20px 25px;
    order: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .form-header {
    margin-bottom: 25px;
  }

  .form-header h2 {
    font-size: 28px;
    letter-spacing: 2px;
    margin-bottom: 8px;
  }

  .form-header h2::after {
    width: 60px;
    height: 3px;
    bottom: -10px;
  }

  .form-header p {
    font-size: 13px;
    margin-top: 15px;
  }

  .input-group-modern {
    margin-bottom: 20px;
  }

  .input-group-modern label {
    font-size: 12px;
    margin-bottom: 10px;
  }

  .input-container input {
    padding: 15px 18px 15px 50px;
    font-size: 15px;
  }

  .btn-submit {
    padding: 15px 18px !important;
    font-size: 16px !important;
    letter-spacing: 2px !important;
    margin-top: 20px !important;
  }

  .forgot-password-container {
    margin-top: 15px;
  }

  .forgot-password {
    font-size: 13px;
  }

  .system-version {
    position: relative;
    bottom: auto;
    right: auto;
    text-align: center;
    margin-top: 20px;
    font-size: 10px;
  }
}

/* Móviles pequeños */
@media (max-width: 380px) {
  .form-panel {
    padding: 15px 20px;
  }

  .form-header h2 {
    font-size: 24px;
  }

  .input-container input {
    padding: 14px 16px 14px 48px;
    font-size: 14px;
  }

  .btn-submit {
    padding: 14px 16px !important;
    font-size: 15px !important;
    letter-spacing: 1.5px !important;
  }
}

/* Animación de carga */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse-button {
  0%,
  100% {
    box-shadow:
      0 8px 25px rgba(156, 163, 38, 0.4),
      0 0 40px rgba(156, 163, 38, 0.2);
  }
  50% {
    box-shadow:
      0 8px 25px rgba(156, 163, 38, 0.6),
      0 0 60px rgba(156, 163, 38, 0.4);
  }
}

.btn-submit.loading {
  pointer-events: none;
  opacity: 0.8;
  background: linear-gradient(135deg, #6b7019 0%, #9ca326 50%, #6b7019 100%);
  animation: pulse-button 1.5s ease-in-out infinite;
}

.btn-submit.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 10;
}
