:root {
  --navy-deep: #1e3a8a;
  --navy-medium: #2563eb;
  --teal: #0891b2;
  --teal-light: #06b6d4;
  --gold: #f59e0b;
  --gold-light: #fbbf24;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --gray-800: #1f2937;
  --success: #10b981;
  --error: #ef4444;
}

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

body {
  font-family: 'Work Sans', sans-serif;
  background: var(--white);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Main Container */
.login-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* LEFT SIDE - Form */
.login-form-side {
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.login-form-side::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.03) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-30px, -30px) scale(1.05);
  }
}

.login-wrapper {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
  animation: slideInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-40px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Logo */
.brand-logo {
  margin-bottom: 3rem;
  animation: fadeIn 0.8s ease 0.2s backwards;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand-logo-img {
  width: 50px;
  height: auto;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.75rem;
}

.brand-logo img {
  width: 60px;
  height: auto;
  margin-bottom: 1rem;
}

.brand-text {
  display: inline-block;
  vertical-align: middle;
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: #041d72;
  letter-spacing: -0.02em;
  margin-bottom: 0;
}

.brand-tagline {
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0;
  padding-left: 0;
}

/* Page Header */
.page-header {
  margin-bottom: 2.5rem;
  animation: fadeIn 0.8s ease 0.3s backwards;
}

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* Form */
form {
  animation: fadeIn 0.8s ease 0.4s backwards;
}

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

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

.password-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.forgot-password {
  font-size: 0.8rem;
  color: var(--teal);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.forgot-password:hover {
  color: var(--navy-medium);
  text-decoration: underline;
}

.input-wrapper {
  position: relative;
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  padding-left: 3rem;
  font-size: 0.95rem;
  font-family: 'Work Sans', sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  border: 2px solid transparent;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

/* Espacio adicional para el input de contraseña que tiene el ícono del ojo a la derecha */
#password {
  padding-right: 3rem;
}

.form-control::placeholder {
  color: var(--gray-400);
}

.form-control:focus {
  background: var(--white);
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1);
  transform: translateY(-1px);
}

.form-control:focus+.input-icon {
  color: var(--teal);
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 1.1rem;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-password {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 1.1rem;
  cursor: pointer;
  pointer-events: all;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  padding: 0.25rem;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password:hover {
  color: var(--teal);
  transform: translateY(-50%) scale(1.15);
}

/* Submit Button */
.btn-submit {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Work Sans', sans-serif;
  color: var(--white);
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy-medium) 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.25);
}

.btn-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-light) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30, 58, 138, 0.35);
}

.btn-submit:hover::before {
  opacity: 1;
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit span {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-submit i {
  font-size: 0.9em;
  transition: transform 0.3s ease;
}

.btn-submit:hover i {
  transform: translateX(4px);
}

/* Messages */
#mensaje_comprobacion {
  margin-top: 1.5rem;
  animation: slideDown 0.3s ease;
}

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

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-box {
  padding: 0.875rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.5;
}

.error-message {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border-left: 3px solid var(--error);
}

.success-message {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-left: 3px solid var(--success);
}

.info-message {
  background: rgba(8, 145, 178, 0.1);
  color: var(--teal);
  border-left: 3px solid var(--teal);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-message i {
  font-size: 1.1em;
  flex-shrink: 0;
}

.loading-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--navy-deep);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(30, 58, 138, 0.2);
  border-top-color: var(--navy-deep);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Copyright */
.copyright {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-100);
  font-size: 0.8rem;
  color: var(--gray-600);
  text-align: center;
  line-height: 1.6;
  animation: fadeIn 0.8s ease 0.5s backwards;
}

.logo-alfa {
  height: 22px;
  width: auto;
  vertical-align: middle;
  margin-left: 0.25rem;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.logo-alfa:hover {
  opacity: 1;
}

/* RIGHT SIDE - Hero */
.login-image-side {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Animated Background Elements */
.bg-decoration {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0.15;
}

.circle {
  position: absolute;
  border: 2px solid var(--teal-light);
  border-radius: 50%;
  animation: pulse 8s ease-in-out infinite;
}

.circle-1 {
  width: 400px;
  height: 400px;
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.circle-2 {
  width: 300px;
  height: 300px;
  bottom: -80px;
  left: -80px;
  animation-delay: 2s;
}

.circle-3 {
  width: 200px;
  height: 200px;
  top: 50%;
  left: 10%;
  animation-delay: 4s;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.15;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.25;
  }
}

/* Gradient Orbs */
.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  animation: float 15s ease-in-out infinite;
}

.orb-1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--teal) 0%, transparent 70%);
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, var(--navy-medium) 0%, transparent 70%);
  bottom: 15%;
  right: 15%;
  animation-delay: 3s;
}

/* Hero Content */
.image-overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  padding: 3rem;
  animation: slideInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
  0% {
    opacity: 0;
    transform: translateX(40px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-text {
  color: var(--white);
}

.hero-logo {
  width: 80px;
  height: auto;
  margin-bottom: 2.5rem;
  filter: brightness(0) invert(1);
  opacity: 0.9;
  animation: fadeIn 0.8s ease 0.4s backwards;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  animation: fadeIn 0.8s ease 0.5s backwards;
}

.hero-highlight {
  background: linear-gradient(135deg, var(--teal-light) 0%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.hero-description {
  font-size: 1.125rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2.5rem;
  animation: fadeIn 0.8s ease 0.6s backwards;
}

.hero-features {
  display: grid;
  gap: 1.25rem;
  animation: fadeIn 0.8s ease 0.7s backwards;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--teal-light);
  flex-shrink: 0;
}

.feature-text {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Responsive */
@media (max-width: 1024px) {
  .login-container {
    grid-template-columns: 1fr;
  }

  .login-image-side {
    display: none;
  }

  .login-form-side {
    padding: 2rem;
  }
}

@media (max-width: 640px) {
  .brand-text {
    font-size: 2rem;
  }

  .page-title {
    font-size: 1.75rem;
  }
}
