/* =====================================================
   LOGIN - VARIABLES Y RESET
===================================================== */
:root {
  --primary: #2F5468;
  --primary-dark: #203A47;
  --accent: #E83837;
  --accent-light: #ff6d6b;
  --bg: #f4f5fb;
  --card-bg: #ffffff;
  --border: #dde1f0;
  --text: #111827;
  --muted: #6b7280;
  --success: #10b981;
}

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  color: var(--text);
  overflow-x: hidden;
}

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

/* =====================================================
   LADO IZQUIERDO - BRANDING
===================================================== */
.login-left {
  background: linear-gradient(135deg, #1e3a47 0%, #2f5468 50%, #4a7c8b 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

/* Patrón de fondo sutil */
.login-left::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.05) 1px, transparent 1px),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.5;
}

.login-left-content {
  position: relative;
  z-index: 1;
  max-width: 500px;
  width: 100%;
}

.login-logo {
  display: inline-block;
  margin-bottom: 48px;
  transition: transform 0.3s ease;
}

.login-logo .logo-img {
  height: 101px;
  width: auto;
  filter: brightness(0) invert(1); /* Convierte el logo a blanco */
}

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

.login-message h1 {
  font-size: 42px;
  color: #ffffff;
  margin-bottom: 16px;
  line-height: 1.2;
  text-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.login-message p {
  font-size: 17px;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
  margin-bottom: 48px;
}

/* Tarjetas flotantes animadas */
.login-illustration {
  position: relative;
  height: 200px;
  margin-bottom: 48px;
}

.floating-card {
  position: absolute;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: float 3s ease-in-out infinite;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.floating-card .card-icon {
  font-size: 24px;
}

.floating-card .card-text {
  font-size: 13px;
  color: rgba(255,255,255,0.95);
  font-weight: 500;
}

.card-1 {
  top: 0;
  left: 0;
  animation-delay: 0s;
}

.card-2 {
  top: 60px;
  right: 20px;
  animation-delay: 0.5s;
}

.card-3 {
  bottom: 20px;
  left: 40px;
  animation-delay: 1s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

/* Stats */
.login-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}

/* =====================================================
   LADO DERECHO - FORMULARIO
===================================================== */
.login-right {
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.login-form-container {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(15,23,42,0.1);
  border: 1px solid var(--border);
}

.form-header h2 {
  font-size: 28px;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.form-header p {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 32px;
}

/* Social Login */
.social-login {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.social-btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: #ffffff;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.social-btn:hover {
  background: #f9fafb;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(47,84,104,0.1);
}

/* Divider */
.divider {
  text-align: center;
  position: relative;
  margin: 24px 0;
}

.divider span {
  background: #ffffff;
  padding: 0 12px;
  font-size: 13px;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

/* Form Groups */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.forgot-link {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.forgot-link:hover {
  opacity: 0.8;
}

.input-wrapper {
  position: relative;
}

.form-input {
  width: 100%;
  padding: 12px 44px 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  color: var(--text);
  background: #ffffff;
  transition: all 0.2s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47,84,104,0.08);
}

.form-input::placeholder {
  color: #9ca3af;
}

.input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  transition: color 0.2s ease;
}

.input-wrapper.focused .input-icon {
  color: var(--primary);
}

.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s ease;
}

.toggle-password:hover {
  color: var(--primary);
}

/* Checkbox */
.form-group-checkbox {
  margin: 20px 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  content: "✓";
  color: #ffffff;
  font-size: 14px;
}

/* Botón principal */
.btn-login {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--accent), #d72f2f);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(232,56,55,0.25);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232,56,55,0.35);
}

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

/* Footer del formulario */
.form-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.form-footer p {
  font-size: 14px;
  color: var(--muted);
}

.register-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.register-link:hover {
  opacity: 0.8;
}

/* Volver al home */
.back-home {
  text-align: center;
  margin-top: 20px;
}

.back-home a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-home a:hover {
  color: var(--primary);
}

/* =====================================================
   BENEFICIOS (REGISTRO)
===================================================== */
.benefits-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}

.benefit-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.benefit-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.benefit-content h3 {
  font-size: 15px;
  color: #ffffff;
  margin-bottom: 4px;
  font-weight: 600;
}

.benefit-content p {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
}

/* Testimonial en registro */
.register-testimonial {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  padding: 20px;
  margin-top: 32px;
}

.testimonial-quote {
  font-size: 14px;
  color: rgba(255,255,255,0.95);
  font-style: italic;
  margin-bottom: 16px;
  line-height: 1.6;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #d72f2f);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
}

.testimonial-name {
  font-size: 14px;
  color: #ffffff;
  font-weight: 600;
}

.testimonial-role {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}

/* =====================================================
   FORMULARIO DE REGISTRO - EXTENSIONES
===================================================== */
.register-form {
  /* Estilos específicos para registro si se necesitan */
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 0;
}

/* Password strength indicator */
.password-strength {
  margin-top: 8px;
}

.strength-bar {
  height: 4px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 6px;
}

.strength-fill {
  height: 100%;
  width: 0;
  background: #e5e7eb;
  transition: all 0.3s ease;
  border-radius: 999px;
}

.strength-text {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

/* Checkbox con links */
.checkbox-text {
  font-size: 13px;
  line-height: 1.5;
}

.checkbox-text a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.checkbox-text a:hover {
  text-decoration: underline;
}

/* =====================================================
   RESPONSIVE - REGISTRO
===================================================== */
@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .benefits-list {
    gap: 16px;
  }

  .benefit-item {
    gap: 12px;
  }

  .benefit-icon {
    width: 36px;
    height: 36px;
  }

  .benefit-content h3 {
    font-size: 14px;
  }

  .benefit-content p {
    font-size: 12px;
  }
}
@media (max-width: 1024px) {
  .login-container {
    grid-template-columns: 1fr;
  }

  .login-left {
    min-height: 40vh;
    padding: 32px;
  }

  .login-message h1 {
    font-size: 32px;
  }

  .login-illustration {
    display: none;
  }

  .login-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .stat-value {
    font-size: 20px;
  }
}

@media (max-width: 640px) {
  .login-right {
    padding: 24px;
  }

  .login-form-container {
    padding: 28px 24px;
  }

  .form-header h2 {
    font-size: 24px;
  }

  .social-btn {
    font-size: 13px;
    padding: 11px 14px;
  }

  .login-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}