/* ============================================
   LOGIN — Kenko Healthy Software
   Estilos dedicados para index.php
   ============================================ */

/* ---- Canvas de fondo ---- */
#login-pixel-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---- Fondo gradiente animado ---- */
.auth-main .auth-wrapper.v3 {
  background: linear-gradient(
    135deg,
    #020b1a 0%,
    #051633 15%,
    #0A2F6C 30%,
    #0A6CFF 50%,
    #3D9BFF 65%,
    #9BD3FF 80%,
    #0A6CFF 90%,
    #020b1a 100%
  );
  background-size: 300% 300%;
  animation: gradientShift 12s ease infinite;
  position: relative;
  overflow: hidden;
}

@keyframes gradientShift {
  0%   { background-position: 0% 0%; }
  25%  { background-position: 50% 100%; }
  50%  { background-position: 100% 50%; }
  75%  { background-position: 50% 0%; }
  100% { background-position: 0% 0%; }
}

/* ---- Overlay sutil para profundidad ---- */
.auth-main .auth-wrapper.v3::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    ellipse at 30% 20%,
    rgba(10, 108, 255, 0.15) 0%,
    transparent 60%
  ),
  radial-gradient(
    ellipse at 70% 80%,
    rgba(155, 211, 255, 0.1) 0%,
    transparent 50%
  );
  z-index: 0;
  pointer-events: none;
}

/* ---- Card del formulario (glassmorphism) ---- */
.auth-main .auth-wrapper .auth-form {
  position: relative;
  z-index: 2;
}

.auth-main .auth-wrapper .auth-form .card {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.25),
    0 0 80px rgba(10, 108, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.auth-main .auth-wrapper .auth-form .card .card-body {
  padding: 44px 40px 36px;
}

/* ---- Logo centrado ---- */
.login-brand-logo {
  max-width: 160px;
  padding-right: 0 !important;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 8px rgba(10, 108, 255, 0.15));
}

/* ---- Encabezado ---- */
.auth-header h2 {
  color: #0f172a;
  font-weight: 700;
  font-size: 1.55rem;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.auth-header p {
  color: #64748b;
  font-size: 0.925rem;
  margin-bottom: 0;
}

/* ---- Inputs ---- */
.auth-main .auth-wrapper .auth-form .form-floating .form-control {
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 0.85rem;
  font-size: 0.95rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  background-color: #f8fafc;
  color: #0f172a;
}

.auth-main .auth-wrapper .auth-form .form-floating .form-control:focus {
  border-color: #0A6CFF;
  box-shadow: 0 0 0 4px rgba(10, 108, 255, 0.1);
  background-color: #fff;
}

.auth-main .auth-wrapper .auth-form .form-floating label {
  color: #94a3b8;
  font-size: 0.9rem;
}

/* ---- Botón de ingreso ---- */
.auth-main .auth-wrapper .auth-form .btn-secondary {
  background: linear-gradient(135deg, #0A6CFF 0%, #0856d4 50%, #0643b0 100%);
  border: none;
  border-radius: 12px;
  padding: 13px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.3px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 4px 16px rgba(10, 108, 255, 0.35);
  position: relative;
  overflow: hidden;
}

.auth-main .auth-wrapper .auth-form .btn-secondary::after {
  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;
}

.auth-main .auth-wrapper .auth-form .btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10, 108, 255, 0.45);
  filter: brightness(1.08);
}

.auth-main .auth-wrapper .auth-form .btn-secondary:hover::after {
  left: 100%;
}

.auth-main .auth-wrapper .auth-form .btn-secondary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(10, 108, 255, 0.3);
}

/* ---- Checkbox y enlace ---- */
.auth-main .auth-wrapper .auth-form .form-check-label {
  font-size: 0.85rem;
  color: #64748b;
}

.auth-main .auth-wrapper .auth-form h5.text-secondary {
  font-size: 0.85rem;
  color: #0A6CFF !important;
  cursor: pointer;
  font-weight: 500;
  transition: color 0.15s ease;
}

.auth-main .auth-wrapper .auth-form h5.text-secondary:hover {
  color: #0856d4 !important;
  text-decoration: underline;
}

/* ---- Footer con autor ---- */
.login-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.2px;
}

/* ---- Alerta de error (SweetAlert) ---- */
.swal2-popup {
  border-radius: 16px !important;
}

/* ---- Responsive ---- */
@media (max-width: 575.98px) {
  .auth-main .auth-wrapper .auth-form .card .card-body {
    padding: 32px 22px 28px;
  }

  .login-brand-logo {
    max-width: 130px;
  }

  .auth-header h2 {
    font-size: 1.3rem;
  }

  .auth-main .auth-wrapper .auth-form .card {
    border-radius: 16px;
  }
}
