@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700&display=swap');

* {
  box-sizing: border-box;
  padding: 0px;
  margin: 0px;
}

html,
body {
  height: 100vh;
  overflow: hidden;
}

body {
  color: #2D3748;
  font-size: 14px;
  font-family: 'Nunito', sans-serif;
  background: #f8fafc;
}

/* Fondo con animación sutil */
.background-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.login-wrapper {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.login-wrapper .box-col {
  width: 50%;
  height: 100vh;
  position: relative;
}

/* ===== LADO IZQUIERDO CON FONDO SÚPER DINÁMICO ===== */
.login-wrapper .box-image {
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 50%, #06b6d4 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* PARTÍCULAS ANIMADAS */
.animated-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 15% 25%, rgba(255, 255, 255, 0.15) 0%, transparent 1%),
    radial-gradient(circle at 85% 75%, rgba(255, 255, 255, 0.1) 0%, transparent 1%),
    radial-gradient(circle at 45% 15%, rgba(255, 255, 255, 0.08) 0%, transparent 1%),
    radial-gradient(circle at 75% 45%, rgba(255, 255, 255, 0.12) 0%, transparent 1%),
    radial-gradient(circle at 25% 85%, rgba(255, 255, 255, 0.1) 0%, transparent 1%),
    radial-gradient(circle at 95% 25%, rgba(255, 255, 255, 0.08) 0%, transparent 1%);
  animation: particlesFloat 25s ease-in-out infinite;
}

@keyframes particlesFloat {

  0%,
  100% {
    transform: translateX(0px) translateY(0px) scale(1);
    opacity: 1;
  }

  25% {
    transform: translateX(30px) translateY(-20px) scale(1.1);
    opacity: 0.8;
  }

  50% {
    transform: translateX(-20px) translateY(30px) scale(0.9);
    opacity: 1;
  }

  75% {
    transform: translateX(25px) translateY(-15px) scale(1.05);
    opacity: 0.9;
  }
}

/* ONDAS ANIMADAS */
.animated-waves {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at bottom, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: wavesMove 15s ease-in-out infinite;
}

@keyframes wavesMove {

  0%,
  100% {
    transform: scaleX(1) scaleY(1);
    opacity: 0.6;
  }

  50% {
    transform: scaleX(1.1) scaleY(1.2);
    opacity: 0.8;
  }
}

.image-overlay {
  text-align: center;
  color: white;
  z-index: 3;
  position: relative;
  padding: 2rem;
}

.sisris-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sisris-logo i {
  font-size: 4.5rem;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.25);
  padding: 1.5rem;
  border-radius: 50%;
  backdrop-filter: blur(20px);
  animation: logoFloat 6s ease-in-out infinite;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

@keyframes logoFloat {

  0%,
  100% {
    transform: translateY(0px) scale(1) rotateY(0deg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  }

  50% {
    transform: translateY(-12px) scale(1.05) rotateY(5deg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
  }
}

.sisris-logo h1 {
  font-size: 4.2rem;
  font-weight: 800;
  letter-spacing: 4px;
  margin-bottom: 1rem;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  animation: titlePulse 8s ease-in-out infinite;
}

@keyframes titlePulse {

  0%,
  100% {
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transform: scale(1);
  }

  50% {
    text-shadow: 0 4px 30px rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
  }
}

.sisris-logo h2 {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.4;
  opacity: 0.95;
  max-width: 300px;
  animation: subtleTextFloat 10s ease-in-out infinite;
}

@keyframes subtleTextFloat {

  0%,
  100% {
    transform: translateY(0px);
    opacity: 0.95;
  }

  50% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

/* ===== LADO DERECHO - FORMULARIO OPTIMIZADO ===== */
.login-wrapper .box-form {
  padding: 1rem 2rem;
  /* Padding reducido */
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  position: relative;
  box-shadow: -8px 0 25px rgba(0, 0, 0, 0.08);
  height: 100vh;
  overflow: hidden;
}

.login-wrapper .inner {
  max-width: 400px;
  width: 100%;
  height: auto;
}

/* ===== LOGO PIDE MÁS GRANDE ===== */
.logo-header {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  /* Margen reducido */
  padding-bottom: 1rem;
  /* Padding reducido */
  border-bottom: 2px solid #f1f5f9;
}

.logo-pide-solo {
  width: 280px;
  /* Más grande! */
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 15px rgba(59, 130, 246, 0.2));
  transition: all 0.3s ease;
}

.logo-pide-solo:hover {
  transform: scale(1.03);
  filter: drop-shadow(0 6px 20px rgba(59, 130, 246, 0.3));
}

/* Campos del formulario - espaciado optimizado */
.form-group {
  margin-bottom: 1.5rem;
  /* Espaciado consistente */
  position: relative;
}

.form-group .form-control {
  width: 100%;
  height: 56px;
  padding: 1rem 1.2rem 1rem 3.2rem;
  outline: none;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: #f8fafc;
  font-weight: 500;
}

.form-group .form-control:focus {
  border-color: #3b82f6;
  background: white;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

.form-control-feedback {
  position: absolute;
  left: 1rem;
  top: 1rem;
  color: #94a3b8;
  pointer-events: none;
  font-size: 1.3rem;
  transition: all 0.3s ease;
}

.form-group .form-control:focus+.form-control-feedback {
  color: #3b82f6;
  transform: scale(1.1);
}

/* Botón principal */
.actions {
  margin-top: 2rem;
}

.actions .btn {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.actions .btn-submit {
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  color: white;
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.actions .btn-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(59, 130, 246, 0.4);
}

.actions .btn-submit i {
  font-size: 1.2rem;
}

/* Footer minimalista */
.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  /* Padding reducido */
  border-top: 1px solid #e2e8f0;
}

.login-footer p {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0;
  font-weight: 600;
}

.error-alert {
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  color: white;
  padding: 12px 15px;
  border-radius: 8px;
  margin: 10px 0;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
  border-left: 4px solid #ff4757;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.error-alert i {
  margin-right: 8px;
  font-size: 16px;
}

/* ===== RESPONSIVE OPTIMIZADO ===== */
@media(max-width: 768px) {
  .login-wrapper {
    flex-direction: column;
  }

  .login-wrapper .box-col {
    width: 100%;
    height: 50vh;
  }

  .login-wrapper .box-form {
    height: 50vh;
    padding: 0.8rem 1.5rem;
    overflow-y: auto;
  }

  .sisris-logo h1 {
    font-size: 3.2rem;
  }

  .sisris-logo h2 {
    font-size: 1.1rem;
  }

  .sisris-logo i {
    font-size: 3.5rem;
    padding: 1rem;
  }

  .logo-pide-solo {
    width: 220px;
  }

  .form-group {
    margin-bottom: 1.3rem;
  }

  .form-group .form-control {
    height: 52px;
    font-size: 0.9rem;
  }
}

@media(max-width: 480px) {
  .login-wrapper .box-form {
    padding: 0.6rem 1rem;
  }

  .logo-pide-solo {
    width: 200px;
  }

  .sisris-logo h1 {
    font-size: 2.8rem;
    letter-spacing: 2px;
  }

  .sisris-logo i {
    font-size: 3rem;
  }

  .form-group .form-control {
    height: 50px;
    padding: 0.9rem 1rem 0.9rem 3rem;
  }

  .form-control-feedback {
    left: 0.9rem;
    top: 0.9rem;
    font-size: 1.2rem;
  }

  .actions .btn-submit {
    padding: 0.9rem 1.3rem;
    font-size: 0.9rem;
  }
}

/* ===== LANDSCAPE MÓVIL ===== */
@media(max-width: 768px) and (orientation: landscape) {
  .login-wrapper .box-col {
    width: 50%;
    height: 100vh;
  }

  .login-wrapper {
    flex-direction: row;
  }

  .login-wrapper .box-form {
    height: 100vh;
    overflow-y: auto;
  }
}