:root {
   --bg-dark: #0a192f;
   --bg-gradient: radial-gradient(circle at 50% 50%, #2f6fd6 0%, #0b1538 100%);
   --accent-green: #70af2a;
   --accent-blue: #00d2ff;
   --gap-size: 20px;
}

body,
html {
   min-height: 100%;
   margin: 0;
   font-family: 'Roboto', sans-serif;
   color: white;
   overflow-x: hidden;
}

/* Capas de Fondo */
.bg-image {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background-image: url('../../images/index/background.avif');
   background-size: cover;
   background-position: center;
   z-index: -3;
}

.bg-overlay {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background: var(--bg-gradient);
   opacity: 0.9;
   z-index: -2;
}

.circuit-bg {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   z-index: -1;
}

.circuit-bg::after {
   content: '';
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   /* background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 10h10v10H10zM50 10h10v10H50zM90 10h10v10H90zM30 30h10v10H30zM70 30h10v10H70zM10 50h10v10H10zM50 50h10v10H50zM90 50h10v10H90z' fill='%23ffffff' fill-opacity='0.03'/%3E%3Cpath d='M20 15h30M60 15h30' stroke='%23ffffff' stroke-opacity='0.03' fill='none'/%3E%3C/svg%3E"); */
   opacity: 0.5;
}

.bottom-accent {
   position: fixed;
   bottom: -50px;
   right: -50px;
   width: 400px;
   height: 200px;
   transform: rotate(-15deg);
   border-radius: 50% 50% 0 0;
   filter: blur(40px);
   background: var(--accent-green);
   opacity: 0.2;
   z-index: -1;
}

/* Layout Principal */
.main-wrapper {
   min-height: 100vh;
   display: flex;
   flex-direction: column;
   padding: var(--gap-size);
}

header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin-bottom: var(--gap-size);
   flex-shrink: 0;
}

.logo img {
   height: 50px;
}

/* Contenedor centralizado para el Login */
.login-container {
   flex-grow: 1;
   display: flex;
   flex-direction: column;
   justify-content: center;
   align-items: center;
   padding: 20px 0;
   width: 100%;
}

/* Tarjeta de Login (Diseño oscuro original) */
.login-card {
   background: rgba(255, 255, 255, 0.05);
   backdrop-filter: blur(15px);
   border: 1px solid rgba(255, 255, 255, 0.1);
   border-radius: 20px;
   padding: 50px 40px;
   width: 100%;
   max-width: 420px;
   box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
   position: relative;
   overflow: hidden;
   animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
   from {
      opacity: 0;
      transform: translateY(20px);
   }

   to {
      opacity: 1;
      transform: translateY(0);
   }
}

/* Acento superior de la tarjeta */
.login-card::before {
   content: '';
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 3px;
   background: linear-gradient(
      90deg,
      transparent,
      var(--accent-green),
      var(--accent-blue),
      transparent
   );

   background-size: 200% auto;
   animation: borderFlow 3s linear infinite;
}

@keyframes borderFlow {
   0% {
      background-position: 200% center;
   }
   100% {
      background-position: -200% center;
   }
}

.login-icon {
   font-size: 3.5rem;
   color: var(--accent-green);
   margin-bottom: 15px;
   text-align: center;
   display: block;
   text-shadow: 0 0 15px rgba(112, 175, 42, 0.4);
}

.login-title {
   text-align: center;
   font-family: 'Montserrat', sans-serif;
   font-weight: 700;
   font-size: 1.4rem;
   margin-bottom: 35px;
   letter-spacing: 1px;
   text-transform: uppercase;
   color: white;
}

/* Estilos de los inputs (Fondo Oscuro Original) */
.input-group-tech {
   position: relative;
   margin-bottom: 25px;
}

.input-group-tech .left-icon {
   position: absolute;
   left: 18px;
   top: 50%;
   transform: translateY(-50%);
   color: rgba(255, 255, 255, 0.5);
   font-size: 1.2rem;
   transition: 0.3s ease;
   z-index: 2;
}

.input-tech {
   width: 100%;
   background: rgba(0, 0, 0, 0.2);
   border: 1px solid rgba(255, 255, 255, 0.1);
   border-radius: 12px;
   padding: 16px 15px 16px 50px;
   color: white;
   font-family: 'Roboto', sans-serif;
   font-size: 1rem;
   transition: all 0.3s ease;
   position: relative;
   z-index: 1;
}

.input-tech::placeholder {
   color: rgba(255, 255, 255, 0.6);
}

/* Efecto al enfocar el input */
.input-tech:focus {
   outline: none;
   border-color: var(--accent-green);
   box-shadow: 0 0 10px rgba(112, 175, 42, 0.4);
   background: rgba(0, 0, 0, 0.4);
}

/* Iluminar icono izquierdo cuando el input tiene foco */
.input-group-tech:focus-within .left-icon {
   color: var(--accent-green);
}

/* --- CORRECCIÓN PARA EL AUTOCOMPLETADO (AUTOFILL) DEL NAVEGADOR --- */
.input-tech:-webkit-autofill,
.input-tech:-webkit-autofill:hover,
.input-tech:-webkit-autofill:focus,
.input-tech:-webkit-autofill:active {
   -webkit-transition:
      color 9999s ease-out,
      background-color 9999s ease-out;
   -webkit-transition-delay: 9999s;
   -webkit-text-fill-color: white !important;
   caret-color: white;
}

/* Botón de mostrar/ocultar contraseña */
.toggle-password {
   position: absolute;
   right: 18px;
   top: 50%;
   transform: translateY(-50%);
   color: rgba(255, 255, 255, 0.5);
   font-size: 1.2rem;
   cursor: pointer;
   z-index: 3;
   transition: 0.3s ease;
}

.toggle-password:hover {
   color: white;
}

/* Ajuste de padding para que el texto no se superponga con el icono del ojo */
.input-tech.has-right-icon {
   padding-right: 50px;
}

/* Botón de ingreso */
.btn-login {
   width: 100%;
   background: rgba(112, 175, 42, 0.6);
   border: 1px solid var(--accent-green);
   color: white;
   padding: 16px;
   border-radius: 12px;
   font-family: 'Montserrat', sans-serif;
   font-weight: 700;
   font-size: 1.1rem;
   letter-spacing: 2px;
   text-transform: uppercase;
   cursor: pointer;
   transition: all 0.3s ease;
   margin-top: 10px;
   display: flex;
   justify-content: center;
   align-items: center;
}

.btn-login i {
   margin-left: 10px;
   transition: transform 0.3s;
}

.btn-login:hover {
   background: var(--accent-green);
   box-shadow: 0 0 20px rgba(112, 175, 42, 0.4);
   transform: translateY(-2px);
   color: white;
   text-decoration: none;
}

.btn-login:hover i {
   transform: translateX(5px);
}

/* Enlaces extra (olvidé mi clave) */
.login-links {
   text-align: center;
   margin-top: 25px;
}

.login-links a {
   color: rgba(255, 255, 255, 0.6);
   font-size: 0.9rem;
   text-decoration: none;
   transition: 0.3s;
}

.login-links a:hover {
   color: var(--accent-green);
   text-decoration: underline;
}

/* Footer */
footer {
   display: flex;
   justify-content: center;
   align-items: center;
   margin-top: var(--gap-size);
   font-size: 0.9rem;
   color: rgba(255, 255, 255, 0.5);
   flex-shrink: 0;
}

/* Responsive */
@media (max-width: 767px) {
   :root {
      --gap-size: 30px;
   }

   .main-wrapper {
      padding: 30px 20px;
   }

   .login-card {
      padding: 40px 25px;
   }

   .logo img {
      height: 35px;
   }
}
