/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #374151;
  overflow-x: hidden;
}

/* Animated Background */
.animated-background {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.floating-shape {
  position: absolute;
  border-radius: 2rem;
  opacity: 0.7;
}

.shape-1 {
  top: 2.5rem;
  left: 2.5rem;
  width: 8rem;
  height: 8rem;
  background: linear-gradient(135deg, rgba(229, 231, 235, 0.6), rgba(209, 213, 219, 0.4));
  border-radius: 3rem;
  transform: rotate(12deg);
  animation: float-slow 8s ease-in-out infinite;
}

.shape-2 {
  top: 5rem;
  right: 5rem;
  width: 6rem;
  height: 6rem;
  background: linear-gradient(135deg, rgba(209, 213, 219, 0.5), rgba(156, 163, 175, 0.3));
  border-radius: 2rem;
  transform: rotate(-12deg);
  opacity: 0.6;
  animation: float-medium 6s ease-in-out infinite;
}

.shape-3 {
  bottom: 5rem;
  left: 8rem;
  width: 12rem;
  height: 12rem;
  background: linear-gradient(135deg, rgba(243, 244, 246, 0.7), rgba(229, 231, 235, 0.5));
  border-radius: 50%;
  opacity: 0.5;
  animation: float-fast 4s ease-in-out infinite;
}

.shape-4 {
  bottom: 2.5rem;
  right: 2.5rem;
  width: 7rem;
  height: 7rem;
  background: linear-gradient(135deg, rgba(229, 231, 235, 0.6), rgba(209, 213, 219, 0.4));
  border-radius: 2rem;
  transform: rotate(45deg);
  opacity: 0.6;
  animation: float-slow 8s ease-in-out infinite;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(3rem);
}

.orb-1 {
  top: 25%;
  left: 25%;
  width: 24rem;
  height: 24rem;
  background: radial-gradient(circle, rgba(229, 231, 235, 0.3) 0%, rgba(243, 244, 246, 0.2) 50%, transparent 100%);
  animation: pulse-slow 4s ease-in-out infinite;
}

.orb-2 {
  bottom: 25%;
  right: 25%;
  width: 20rem;
  height: 20rem;
  background: radial-gradient(circle, rgba(209, 213, 219, 0.4) 0%, rgba(229, 231, 235, 0.2) 50%, transparent 100%);
  animation: pulse-slow 4s ease-in-out infinite 3s;
}

.grid-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: linear-gradient(rgba(107, 114, 128, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(107, 114, 128, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
}

.floating-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.4;
  pointer-events: none;
}

/* Logo Styles */
.top-logo {
  position: absolute;
  top: 2rem;
  left: 2rem;
  z-index: 10;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.logo-icon:hover {
  transform: scale(1.1);
}

.logo-icon i {
  color: white;
  width: 1.5rem;
  height: 1.5rem;
  transition: transform 0.5s ease;
}

.logo-icon:hover i {
  transform: rotate(180deg);
}

.logo-text {
  font-size: 2.25rem;
  font-weight: bold;
  letter-spacing: -0.025em;
}

.logo-red {
  color: #1f2937;
}

.logo-bajas {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Login Container */
.login-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 50%, #e5e7eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
}

.login-card {
  width: 100%;
  max-width: 28rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(2rem);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(229, 231, 235, 0.5);
  border-radius: 1rem;
  position: relative;
  z-index: 10;
  overflow: hidden;
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255, 0.7) 50%,
    rgba(249, 250, 251, 0.5) 100%
  );
}

.card-header {
  text-align: center;
  padding: 2rem 2rem 1.5rem;
  position: relative;
}

.login-icon {
  width: 5rem;
  height: 5rem;
  background: linear-gradient(135deg, #ef4444, #dc2626, #b91c1c);
  border-radius: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  transition: transform 0.5s ease;
  position: relative;
  overflow: hidden;
}

.login-icon:hover {
  transform: scale(1.05);
}

.icon-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.login-icon:hover .icon-shine {
  opacity: 1;
}

.icon-slide {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: translateX(-100%) skewX(-12deg);
  transition: transform 0.7s ease;
}

.login-icon:hover .icon-slide {
  transform: translateX(100%) skewX(-12deg);
}

.card-title {
  font-size: 1.875rem;
  font-weight: bold;
  background: linear-gradient(135deg, #1f2937, #374151);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.card-subtitle {
  color: #6b7280;
  font-size: 0.875rem;
}

.card-content {
  padding: 0 2rem 2rem;
  position: relative;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.75rem;
}

.label-dot {
  width: 1rem;
  height: 1rem;
  background: linear-gradient(135deg, #6b7280, #4b5563);
  border-radius: 50%;
}

.form-input {
  width: 100%;
  height: 3rem;
  padding: 0 1rem;
  border: 1px solid rgba(156, 163, 175, 0.6);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(0.5rem);
  font-size: 1rem;
  color: #1f2937;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: #6b7280;
  background: white;
  box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.2);
}

.form-input::placeholder {
  color: #6b7280;
}

.login-button {
  width: 100%;
  height: 3.5rem;
  background: linear-gradient(135deg, #ef4444, #dc2626, #b91c1c);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.5s ease;
  box-shadow: 0 25px 50px rgba(239, 68, 68, 0.25);
}

.login-button:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c, #991b1b);
  transform: scale(1.02);
}

.button-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.2));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.login-button:hover .button-overlay {
  opacity: 1;
}

.button-slide {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%) skewX(-12deg);
  transition: transform 0.7s ease;
}

.login-button:hover .button-slide {
  transform: translateX(100%) skewX(-12deg);
}

.button-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  position: relative;
  z-index: 10;
}

.button-arrow {
  transition: transform 0.3s ease;
}

.login-button:hover .button-arrow {
  transform: translateX(0.25rem);
}

.loading-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  position: relative;
  z-index: 10;
}

.spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid white;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Animations */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes float-slow {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

@keyframes float-medium {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-15px) rotate(-3deg);
  }
}

@keyframes float-fast {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-25px) rotate(2deg);
  }
}

@keyframes float-particle {
  0%,
  100% {
    transform: translateY(0px) translateX(0px);
    opacity: 0.4;
  }
  25% {
    transform: translateY(-10px) translateX(5px);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-20px) translateX(-5px);
    opacity: 0.5;
  }
  75% {
    transform: translateY(-15px) translateX(10px);
    opacity: 0.8;
  }
}

@keyframes pulse-slow {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .logo-text {
    font-size: 1.5rem;
  }

  .top-logo {
    top: 1rem;
    left: 1rem;
  }

  .logo-icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .logo-icon i {
    width: 1.25rem;
    height: 1.25rem;
  }

  .login-card {
    margin: 1rem;
  }

  .card-header,
  .card-content {
    padding: 1.5rem;
  }
}
