/* =====================================================
   RESET
   ===================================================== */
* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* =====================================================
   FONDO CON IMAGEN INTESOLTI
   ===================================================== */
body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
}





/* =====================================================
   FONDO INTESOLTI – IMAGEN COMPLETA (NO RECORTA)
   ===================================================== */
.login-background {
  position: fixed;
  inset: 0;

  background-image: url("../img/LOGO_INTESOLTI.png");
  background-repeat: no-repeat;
  background-position: center center;

  /* 🔑 CLAVE: mostrar imagen completa */
  background-size: contain;

  /* Color de relleno alrededor de la imagen */
  background-color: #0b122400;

 

  z-index: 0;
}





/* Overlay para contraste */
.login-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(
      circle at center,
      rgba(15, 23, 42, 0.305),
      rgba(2, 6, 23, 0.337)
  );
  z-index: 1;
}

/* =====================================================
   CONTENEDOR
   ===================================================== */
.login-wrapper {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  place-items: center;
  animation: fadeIn 1.2s ease forwards;
}

/* =====================================================
   CARD (FORMULARIO)
   ===================================================== */
.login-card {
  position: relative;
  width: 380px;
  padding: 42px 34px;
  border-radius: 22px;

  background: linear-gradient(
    145deg,
    rgba(18, 43, 109, 0.75),
    rgba(15, 23, 42, 0.921)
  );

  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  animation: scaleIn 0.8s ease forwards;
}

/* Glow suave */
.login-card .glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(
    120deg,
    rgba(79,70,229,0.6),
    rgba(56,189,248,0.6),
    rgba(79,70,229,0.6)
  );
  opacity: 0.35;
  filter: blur(22px);
  z-index: -1;
}

/* =====================================================
   TEXTO
   ===================================================== */
.login-form h2 {
  margin: 0;
  color: #ffffff;
  font-weight: 600;
}

.subtitle {
  margin-top: 6px;
  margin-bottom: 30px;
  color: #c7d2fe;
  font-size: 14px;
}

/* =====================================================
   INPUTS (TRANSPARENTES)
   ===================================================== */
.field {
  position: relative;
  margin-bottom: 22px;
}

.field input {
  width: 100%;
  padding: 12px 4px;
  background: transparent !important;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.35);
  outline: none;

  color: #e5e7eb !important;
  font-size: 15px;
  -webkit-text-fill-color: #e5e7eb !important;
  caret-color: #60a5fa;
}

.field label {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #c7d2fe;
  font-size: 14px;
  pointer-events: none;
  transition: 0.3s ease;
}

/* label flotante */
.field input:focus + label,
.field input:valid + label {
  top: -8px;
  font-size: 12px;
  color: #93c5fd;
}

.field input:focus {
  border-bottom-color: #60a5fa;
}

/* Autofill Chrome */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus,
.field input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px rgba(15,23,42,0.9) inset !important;
          box-shadow: 0 0 0 1000px rgba(15,23,42,0.9) inset !important;
  -webkit-text-fill-color: #e5e7eb !important;
  transition: background-color 9999s ease-in-out 0s;
}

/* =====================================================
   BOTÓN
   ===================================================== */
.login-btn {
  width: 100%;
  margin-top: 10px;
  padding: 13px;
  border-radius: 12px;
  border: none;
   letter-spacing: 0.9px;
  font-weight: 600;

  background: linear-gradient(
    135deg,
    #2563eb,
    #4f46e5
   
  );

  color: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;

  transition: transform .2s ease, box-shadow .2s ease, opacity .2s;
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(37,99,235,0.45);
  
}

.login-btn:active {
  transform: translateY(0);
  opacity: .95;
}


.login-context {
  animation: fadeIn 1.4s ease forwards;
}


/* =====================================================
   ANIMACIONES
   ===================================================== */
@keyframes fadeIn {
  from { opacity: 0 }
  to   { opacity: 1 }
}

@keyframes scaleIn {
  from { transform: scale(0.93) }
  to   { transform: scale(1) }
}

/* ===========================
   MODAL ERROR LOGIN
   =========================== */

.error-modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.65);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.error-modal.hidden {
  display: none;
}

.error-card {
  background: linear-gradient(
    145deg,
    rgba(30, 58, 138, 0.8),
    rgba(15, 23, 42, 0.95)
  );
  border-radius: 18px;
  padding: 32px 26px;
  width: 320px;
  text-align: center;
  box-shadow: 0 25px 70px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.08);
  animation: slideUp 0.4s ease;
}

.error-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.15);
  color: #f87171;
  font-size: 28px;
  display: grid;
  place-items: center;
  font-weight: bold;
}

.error-card h3 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 18px;
}

.error-card p {
  margin: 0 0 20px;
  color: #c7d2fe;
  font-size: 14px;
}

.error-card button {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: 14px;
  transition: transform .2s ease, box-shadow .2s ease;
}

.error-card button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(239,68,68,0.45);
}

/* Animaciones */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


/* ===========================
LAYOUT ENTERPRISE
=========================== */

.login-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 80px;
  align-items: center;
  max-width: 1100px;
  padding: 0 40px;
}

/* Contexto izquierdo */
.login-context {
  max-width: 420px;
  color: #e5e7eb;
}

.login-context h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.login-context h3 {
  margin: 6px 0 18px;
  font-size: 18px;
  color: #051358;
  font-weight: 500;
}

.context-description {
  font-size: 15px;
  color: #f3f4f7;
  line-height: 1.6;
  margin-bottom: 20px;
}

.context-features {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
}

.context-features li {
  font-size: 14px;
  margin-bottom: 8px;
  color: #dbeafe;
}

.back-to-site {
  font-size: 14px;
  color: #051358;
  text-decoration: none;
}

.back-to-site:hover {
  text-decoration: underline;
}

/* Texto legal bajo el botón */
.login-disclaimer {
  margin-top: 14px;
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
}

/* Responsive */
@media (max-width: 900px) {
  .login-layout {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .login-context {
    margin: 0 auto;
  }
}




.login-overlay {
  background:
    radial-gradient(
      circle at 90% 50%,
      rgba(56, 189, 248, 0.18),
      rgba(2, 6, 23, 0.65) 60%
    );
}


.login-context {
  border-left: 4px solid #e2e9f31c;
  padding-left: 20px;
}



 
/* ===========================
BOTÓN LOGIN - ESTADO CARGA
=========================== */

.login-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Spinner */
.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  display: none;
  animation: spin 0.8s linear infinite;
}

/* Estado loading */
.login-btn.loading {
  pointer-events: none;
  opacity: 0.9;
}

.login-btn.loading .btn-text {
  font-size: 14px;
}

.login-btn.loading .btn-spinner {
  display: inline-block;
}

/* Animación */
@keyframes spin {
  to { transform: rotate(360deg); }
}