/* ========================================
   ARCHIVO CSS UNIFICADO - SISTEMA DE AUTENTICACIÓN
   Archivo: auth_styles.css
   Descripción: Estilos compartidos para login, recuperar contraseña y restablecer contraseña aqui debe cambiar solo los colores requeridos 
   para su empresa los logos eh iconos se cambairran en cada uno de los archvios mencionados.
======================================== */

/* ========================================
   VARIABLES CSS - COLORES Y TOKENS DE DISEÑO
======================================== */
:root {
  /* Colores Principales */
  --color-primary: #5170ff;
  --color-secondary: #ff66c4;
  --primary-dark: #002b4b;
  --white: #ffffff;

  /* Escala de Grises */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Colores de Estado */
  --red-50: #fef2f2;
  --red-500: #ef4444;
  --green-50: #f0fdf4;
  --green-500: #10b981;
  --yellow-500: #f59e0b;

  /* Gradientes */
  --gradient-primary: linear-gradient(135deg, #5170ff 0%, #3d5acc 100%);
  --gradient-space: linear-gradient(
    135deg,
    #f8f9ff 0%,
    #ffffff 50%,
    #f5f7ff 100%
  );

  /* Sombras */
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Radio de Bordes */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;

  /* Transiciones */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Colores de Fondo Espacial */
  --space-bg-1: #ffffff;
  --space-bg-2: #f8f9ff;
  --space-bg-3: #f0f2ff;
  --space-bg-4: #e8ebff;
  --space-bg-5: #f5f7ff;
}

/* ========================================
   RESET Y CONFIGURACIÓN BASE
   ======================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  height: 100%;
  font-family: "Exo 2", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  color: var(--gray-900);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #ffffff;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

*:focus {
  outline: none !important;
}

/* ========================================
   FONDO ESPACIAL Y EFECTOS
   ======================================== */
.bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: linear-gradient(
    135deg,
    var(--space-bg-1) 0%,
    var(--space-bg-2) 12%,
    var(--space-bg-3) 25%,
    var(--space-bg-4) 37%,
    var(--space-bg-5) 50%,
    var(--space-bg-4) 63%,
    var(--space-bg-3) 75%,
    var(--space-bg-2) 88%,
    var(--space-bg-1) 100%
  );
}

.bg-canvas::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  background: radial-gradient(
      ellipse at 25% 75%,
      rgba(81, 112, 255, 0.06) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse at 75% 25%,
      rgba(255, 102, 196, 0.05) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 50% 50%,
      rgba(81, 112, 255, 0.08) 0%,
      transparent 70%
    );
  animation: starField 40s linear infinite;
}

@keyframes starField {
  0% {
    transform: translateY(0px);
  }
  100% {
    transform: translateY(-50px);
  }
}

/* ========================================
   ESTRELLAS DECORATIVAS - MINIMALISTAS
======================================== */
.geometric-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.shape {
  position: absolute;
  background: rgba(255, 255, 255, 0.85);
}

/* Estrellas grandes de 4 puntas */
.shape-1,
.shape-2,
.shape-3 {
  width: 12px;
  height: 12px;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8)) 
          drop-shadow(0 0 12px rgba(255, 255, 255, 0.4));
}

/* Estrellas medianas de 4 puntas */
.shape-4,
.shape-5,
.shape-6,
.shape-7 {
  width: 9px;
  height: 9px;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.7)) 
          drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

/* Estrellas pequeñas de 4 puntas */
.shape-8,
.shape-9,
.shape-10,
.shape-11,
.shape-12,
.shape-13,
.shape-14,
.shape-15 {
  width: 6px;
  height: 6px;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6)) 
          drop-shadow(0 0 8px rgba(255, 255, 255, 0.25));
}

/* Posiciones */
.shape-1 { top: 15%; left: 12%; animation: starFade1 5s ease-in-out infinite; }
.shape-2 { top: 25%; right: 15%; animation: starFade2 4.5s ease-in-out infinite; }
.shape-3 { bottom: 30%; left: 18%; animation: starFade3 6s ease-in-out infinite; }
.shape-4 { top: 45%; right: 20%; animation: starFade1 5.5s ease-in-out infinite 1s; }
.shape-5 { bottom: 15%; right: 12%; animation: starFade2 4.8s ease-in-out infinite 2s; }
.shape-6 { top: 60%; left: 10%; animation: starFade3 5.2s ease-in-out infinite 1.5s; }
.shape-7 { top: 35%; left: 25%; animation: starFade1 4s ease-in-out infinite 2.5s; }
.shape-8 { top: 70%; left: 30%; animation: starFade2 4.5s ease-in-out infinite 0.5s; }
.shape-9 { top: 20%; right: 35%; animation: starFade3 5s ease-in-out infinite 1.2s; }
.shape-10 { bottom: 25%; right: 28%; animation: starFade1 4.2s ease-in-out infinite 1.8s; }
.shape-11 { top: 10%; left: 40%; animation: starFade2 3.5s ease-in-out infinite 0.8s; }
.shape-12 { top: 80%; left: 15%; animation: starFade3 3.8s ease-in-out infinite 2.2s; }
.shape-13 { top: 40%; right: 8%; animation: starFade1 4.1s ease-in-out infinite 2.8s; }
.shape-14 { bottom: 40%; right: 40%; animation: starFade2 3.7s ease-in-out infinite 1.5s; }
.shape-15 { top: 55%; left: 35%; animation: starFade3 3.9s ease-in-out infinite 2s; }

/* Animaciones de aparecer/desaparecer con rotación sutil */
@keyframes starFade1 {
  0%, 100% {
    opacity: 0;
    transform: scale(0.8) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.1) rotate(20deg);
  }
}

@keyframes starFade2 {
  0%, 100% {
    opacity: 0;
    transform: scale(0.8) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.08) rotate(-20deg);
  }
}

@keyframes starFade3 {
  0%, 100% {
    opacity: 0;
    transform: scale(0.8) rotate(0deg);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.12) rotate(20deg);
  }
}

/* ========================================
   CONTENEDOR PRINCIPAL
   ======================================== */
.main-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  z-index: 10;
}

/* ========================================
   TARJETAS PRINCIPALES (LOGIN, RECOVERY, RESET)
   ======================================== */
.login-card,
.recovery-card,
.reset-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-2xl);
  box-shadow: 0 32px 64px rgba(81, 112, 255, 0.15), 
              0 16px 32px rgba(255, 102, 196, 0.08),
              0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reset-card {
  max-width: 900px;
  margin: 0 auto;
}

/* ========================================
   PANEL VISUAL IZQUIERDO
   ======================================== */
.visual-panel {
  background: var(--gradient-primary);
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 40px 40px;
  overflow: hidden;
}

.visual-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 102, 196, 0.15) 0%, transparent 40%),
    linear-gradient(45deg, transparent 20%, rgba(255, 255, 255, 0.12) 40%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(81, 112, 255, 0.15) 0%, transparent 50%);
  animation: crystalFlow 10s ease-in-out infinite;
}

@keyframes crystalFlow {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.02) rotate(1deg);
  }
}

.visual-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
}

/* ========================================
   LOGO Y BRANDING
   ======================================== */
.brand-logo {
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(255, 102, 196, 0.2);
}

.brand-logo::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: rotate 4s linear infinite;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.logo-image {
  width: 80px;
  height: 80px;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.brand-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 8px;
  letter-spacing: -0.03em;
  text-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
  line-height: 1.1;
}

.brand-subtitle {
  font-family: "Exo 2", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
  max-width: 300px;
  margin: 0 auto 32px;
  text-align: center;
}

/* ========================================
   SECCIONES ESPECÍFICAS DEL PANEL VISUAL
   ======================================== */
/* Terms section - Solo para login */
.terms-section {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 40px;
}

.terms-text {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  margin-bottom: 8px;
}

.terms-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.terms-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
  padding: 2px 0;
}

.terms-link:hover {
  color: var(--white);
  border-bottom-color: rgba(255, 255, 255, 0.5);
}

.footer-links-section {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
  margin-top: 8px;
}

.footer-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-link {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 400;
  transition: var(--transition);
}

.footer-link:hover {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

/* Recovery/Reset section - Para recovery y reset */
.recovery-section,
.reset-section {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: auto;
  padding-top: 40px;
}

.recovery-icon-container,
.reset-icon-container {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.recovery-icon-container i,
.reset-icon-container i {
  font-size: 2rem;
  color: var(--white);
}

.recovery-text,
.reset-text {
  font-family: "Exo 2", sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  max-width: 280px;
}

/* ========================================
   PANEL DE FORMULARIO DERECHO
   ======================================== */
.form-panel {
  background: var(--white);
  padding: 40px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.form-header {
  text-align: center;
  margin-bottom: 32px;
}

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto;
  display: block;
}

.form-title {
  font-family: "Exo 2", sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.form-subtitle {
  font-family: "Exo 2", sans-serif;
  color: var(--gray-600);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  max-width: 380px;
  margin: 0 auto;
}

/* ========================================
   ESTILOS DE FORMULARIO
   ======================================== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  font-family: "Exo 2", sans-serif;
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.input-wrapper {
  position: relative;
}

.form-input {
  font-family: "Exo 2", sans-serif;
  width: 100%;
  height: 56px;
  padding: 0 16px 0 48px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--gray-900);
  background: var(--white);
  transition: var(--transition);
}

.form-input::placeholder {
  color: var(--gray-400);
  font-weight: 400;
}

.form-input:hover {
  border-color: var(--gray-400);
}

.password-toggle:hover {
  color: var(--color-primary);
  background: rgba(81, 112, 255, 0.1);
}

.form-input.error {
  border-color: var(--red-500);
  background-color: var(--red-50);
}

.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(81, 112, 255, 0.1);
  transform: translateY(-1px);
}

.form-input.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input.success {
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 1rem;
  pointer-events: none;
  transition: var(--transition);
}

.input-wrapper:focus-within .input-icon {
  color: var(--color-primary);
}

.form-input.error + .input-icon {
  color: var(--red-500);
}

.password-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0.5rem;
  transition: var(--transition);
  border-radius: var(--radius-sm);
}

.password-toggle:hover {
  color: var(--color-primary);
  background: rgba(0, 130, 150, 0.1);
}

/* ========================================
   MENSAJES DE VALIDACIÓN Y ERROR
   ======================================== */
/* Error messages - Inician con display: none */
.error-message {
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--red-500);
  font-weight: 400;
  display: none; /* Inician ocultos */
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translateY(-3px);
  transition: all 0.2s ease;
  background: rgba(239, 68, 68, 0.03);
  padding: 4px 8px;
  border-radius: 4px;
  border-left: 2px solid rgba(239, 68, 68, 0.3);
}

.error-message.show {
  display: flex; /* Se muestran cuando tienen la clase show */
  opacity: 1;
  transform: translateY(0);
}

.error-icon {
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Alert messages from PHP */
.alert-danger {
  background: rgba(239, 68, 68, 0.08) !important;
  border: 1px solid rgba(239, 68, 68, 0.2) !important;
  color: #dc2626 !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  margin-bottom: 16px !important;
  font-size: 0.85rem !important;
  text-align: center !important;
  position: relative !important;
  animation: slideInError 0.3s ease-out !important;
}

@keyframes slideInError {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-danger::before {
  content: "⚠️";
  margin-right: 6px;
  font-size: 0.8rem;
}

/* Validation messages - Inician con display: none */
.validation-message {
  margin-top: 4px;
  font-size: 0.75rem;
  display: none; /* Inician ocultos */
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.2s ease;
  padding: 4px 8px;
  border-radius: 4px;
}

.validation-message.show {
  display: flex; /* Se muestran cuando tienen la clase show */
  opacity: 1;
  transform: translateY(0);
}

.validation-message.error {
  color: var(--red-500);
  background: rgba(239, 68, 68, 0.05);
}

.validation-message.success {
  color: var(--green-500);
  background: rgba(16, 185, 129, 0.05);
}

/* Messages específicos para reset password */
.error-message-reset,
.success-message,
.info-message {
  margin: 20px 0;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  display: flex; /* Estos sí inician visibles */
  align-items: center;
  gap: 8px;
  animation: slideDown 0.4s ease-out;
}

.error-message-reset {
  background: var(--red-50);
  border: 1px solid #fecaca;
  color: #dc2626;
}

.success-message {
  background: var(--green-50);
  border: 1px solid #bbf7d0;
  color: #166534;
}

.info-message {
  background: rgba(81, 112, 255, 0.1);
  border: 1px solid rgba(81, 112, 255, 0.2); 
  color: #3d5acc;
}

/* Field messages */
.field-message {
  margin-top: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: slideInField 0.2s ease-out;
}

.field-message-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #dc2626;
}

.field-message-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #065f46;
}

.field-message i {
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Subtle messages */
.subtle-message {
  margin: 20px 0;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s ease;
  animation: slideInMessage 0.3s ease-out;
}

.subtle-message-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid var(--red-500);
  color: #dc2626;
}

.subtle-message-success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid var(--green-500);
  color: #065f46;
}

.subtle-message-info {
  background: rgba(0, 130, 150, 0.08);
  border: 1px solid var(--color-primary);
  color: #065f73;
}

.subtle-message-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.subtle-message-content i {
  font-size: 1rem;
  flex-shrink: 0;
}

/* ========================================
   MEDIDOR DE FORTALEZA DE CONTRASEÑA
   ======================================== */
.strength-meter {
  margin-top: 8px;
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  transition: all 0.3s ease;
  width: 0%;
}

.strength-weak {
  background: var(--red-500);
  width: 25%;
}

.strength-fair {
  background: var(--yellow-500);
  width: 50%;
}

.strength-good {
  background: var(--green-500);
  width: 75%;
}

.strength-strong {
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  width: 100%;
}

.strength-text {
  font-size: 0.75rem;
  margin-top: 4px;
  color: var(--gray-500);
  font-family: "Exo 2", sans-serif;
}

/* ========================================
   BOTONES
   ======================================== */
.btn-group {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn {
  font-family: "Exo 2", sans-serif;
  height: 56px;
  padding: 0 24px;
  border-radius: 28px;
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  letter-spacing: 0.025em;
  position: relative;
  overflow: hidden;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(0, 130, 150, 0.3);
}

.btn-primary::before {
  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;
}

.btn-primary:hover:not(:disabled)::before {
  left: 100%;
}

/* Para btn-primary hover */
.btn-primary:hover:not(:disabled) {
  background: #3d5acc;
  box-shadow: 0 6px 20px rgba(81, 112, 255, 0.4);
  transform: translateY(-2px);
}

/* Botones específicos de login con bordes especiales */
.btn-group > .btn-group:not(:last-child) > .btn,
.btn-group > .btn:not(:last-child):not(.dropdown-toggle) {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 28px;
}

.btn-group > .btn-group:not(:first-child) > .btn,
.btn-group > .btn:not(:first-child) {
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 0;
}

/* Botones específicos de reset con bordes especiales */
.reset-card .btn {
  border-top-right-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

.btn-secondary {
  background: var(--gray-800);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(31, 41, 55, 0.2);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--gray-700);
  box-shadow: 0 4px 12px rgba(31, 41, 55, 0.3), 0 2px 8px rgba(255, 102, 196, 0.15);
  transform: translateY(-1px);
  color: var(--white);
  text-decoration: none;
}

.offline-icon {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

/* ========================================
   ENLACES DE NAVEGACIÓN
   ======================================== */
/* Forgot password link */
.forgot-password {
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-200);
}

.forgot-link {
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  display: inline-block;
}

.forgot-link:hover {
  color: var(--color-secondary);
  text-decoration: underline;
}

/* Back to login link */
.back-to-login {
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-200);
}

.back-link {
  font-family: "Exo 2", sans-serif;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.back-link:hover {
  color: var(--color-secondary);
  text-decoration: underline;
}

/* ========================================
   TEXTO ESPACIAL OVERLAY
   ======================================== */
.space-text {
  position: fixed;
  bottom: 0.5%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  pointer-events: none;
  color: #ff66c4;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  text-shadow: 0 0 10px rgba(255, 102, 196, 0.9),
    0 0 20px rgba(255, 102, 196, 0.7),
    0 0 30px rgba(255, 102, 196, 0.5),
    0 0 40px rgba(255, 102, 196, 0.3);
  animation: textGlow 3s ease-in-out infinite alternate;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

@keyframes textGlow {
  0% {
    opacity: 0.8;
    text-shadow: 0 0 10px rgba(255, 102, 196, 0.7),
      0 0 20px rgba(255, 102, 196, 0.5),
      0 0 30px rgba(255, 102, 196, 0.3);
  }
  100% {
    opacity: 1;
    text-shadow: 0 0 15px rgba(255, 102, 196, 1),
      0 0 25px rgba(255, 102, 196, 0.9),
      0 0 35px rgba(255, 102, 196, 0.7),
      0 0 45px rgba(255, 102, 196, 0.5);
  }
}

/* ========================================
   ELEMENTOS DE FONDO - LÍNEAS DIAGONALES
   ======================================== */
.bg-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
}

.diagonal-line {
  position: absolute;
  background: linear-gradient(135deg, #5170ff 0%, #ff66c4 100%);
  opacity: 0.15;
  border-radius: 2px;
}

.diagonal-line-1 {
  width: 3px;
  height: 200px;
  top: 10%;
  left: 8%;
  transform: rotate(65deg);
  animation: lineFloat1 6s ease-in-out infinite;
}

.diagonal-line-2 {
  width: 2px;
  height: 150px;
  top: 15%;
  left: 12%;
  transform: rotate(60deg);
  animation: lineFloat2 8s ease-in-out infinite reverse;
}

.diagonal-line-3 {
  width: 3px;
  height: 180px;
  bottom: 12%;
  right: 8%;
  transform: rotate(-65deg);
  animation: lineFloat3 7s ease-in-out infinite;
}

.diagonal-line-4 {
  width: 2px;
  height: 120px;
  bottom: 18%;
  right: 12%;
  transform: rotate(-60deg);
  animation: lineFloat4 9s ease-in-out infinite reverse;
}

@keyframes lineFloat1 {
  0%,
  100% {
    transform: rotate(65deg) translateY(0px);
    opacity: 0.8;
  }
  50% {
    transform: rotate(65deg) translateY(-15px);
    opacity: 1;
  }
}

@keyframes lineFloat2 {
  0%,
  100% {
    transform: rotate(60deg) translateY(0px);
    opacity: 0.6;
  }
  50% {
    transform: rotate(60deg) translateY(10px);
    opacity: 0.9;
  }
}

@keyframes lineFloat3 {
  0%,
  100% {
    transform: rotate(-65deg) translateY(0px);
    opacity: 0.8;
  }
  50% {
    transform: rotate(-65deg) translateY(-12px);
    opacity: 1;
  }
}

@keyframes lineFloat4 {
  0%,
  100% {
    transform: rotate(-60deg) translateY(0px);
    opacity: 0.7;
  }
  50% {
    transform: rotate(-60deg) translateY(8px);
    opacity: 0.9;
  }
}

/* ========================================
   MODALES SUTILES
   ======================================== */
.subtle-modal {
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  background: var(--white);
  border: 1px solid var(--gray-200);
}

.modal-sm {
  max-width: 280px;
}

.subtle-body {
  padding: 20px;
  text-align: center;
}

.company-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.company-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.install-text h5 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray-900);
  margin: 0 0 4px 0;
}

.install-text p {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin: 0 0 16px 0;
}

.action-buttons {
  display: flex;
  gap: 8px;
}

.btn-dismiss,
.btn-accept {
  flex: 1;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-dismiss {
  background: var(--gray-100);
  color: var(--gray-600);
}

.btn-dismiss:hover {
  background: var(--gray-200);
}

.btn-accept {
  background: var(--color-primary);
  color: var(--white);
}


/* Para btn-accept hover */
.btn-accept:hover {
  background: #3d5acc;
}

.btn-accept:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========================================
   ANIMACIONES GENERALES
   ======================================== */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInMessage {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInField {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   ESTILOS ESPECÍFICOS RESPONSIVOS
   ======================================== */

/* Posicionamiento responsivo del texto espacial */
@media (min-width: 1800px) {
  .space-text {
    bottom: 6%;
    font-size: 1rem;
  }
}

@media (max-width: 1400px) {
  .space-text {
    bottom: 0.5%;
    font-size: 1rem;
  }
}

@media (max-width: 1200px) {
  .space-text {
    bottom: 5%;
    font-size: 1rem;
    letter-spacing: 0.25em;
  }
}

@media (max-width: 1100px) {
  .space-text {
    bottom: 1%;
    font-size: 1rem;
    letter-spacing: 0.2em;
  }
}

@media (max-width: 1024px) {
  .login-card,
  .recovery-card,
  .reset-card {
    max-width: 900px;
    margin: 0 auto;
  }

  .reset-card {
    max-width: 900px;
    margin: 0 auto;
  }
}

/* ========================================
   RESPONSIVE DESIGN - TABLET Y MÓVIL
   ======================================== */
@media (max-width: 768px) {
  .main-container {
    padding: 0;
    min-height: 100vh;
    align-items: flex-start;
  }

  .login-card,
  .recovery-card,
  .reset-card {
    grid-template-columns: 1fr;
    width: 100vw;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
    border: none;
    backdrop-filter: none;
    background: var(--white);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }

  .visual-panel {
    padding: 30px 24px 20px;
    min-height: auto;
    flex-shrink: 0;
  }

  .form-panel {
    padding: 30px 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
  }

  .form-input {
    max-width: 100%;
  }

  .btn {
    width: 100%;
    max-width: none;
  }

  .brand-title {
    font-size: 2rem;
    margin-bottom: 12px;
  }

  .brand-subtitle {
    font-size: 1rem;
    margin-bottom: 16px;
  }

  .brand-logo {
    width: 100px;
    height: 100px;
    margin-bottom: 24px;
  }

  .logo-image {
    width: 70px;
    height: 70px;
  }

  .space-text {
    display: none;
  }

  .diagonal-line {
    display: none;
  }

  .terms-section,
  .recovery-section,
  .reset-section {
    display: none;
  }

  /* Ocultar fondo espacial en mobile */
  .bg-canvas,
  .geometric-shapes,
  .bg-elements {
    display: none;
  }

  body {
    background: var(--white);
  }

  /* Ajustes específicos para reset */
  .reset-card .brand-title {
    font-size: 1.8rem;
    margin-bottom: 8px;
  }
}

@media (max-width: 480px) {
  .visual-panel {
    padding: 20px 20px 16px;
    min-height: auto;
  }

  .brand-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
  }

  .logo-image {
    width: 60px;
    height: 60px;
  }

  .brand-title {
    font-size: 1.6rem;
    margin-bottom: 8px;
  }

  .brand-subtitle {
    font-size: 0.9rem;
    margin-bottom: 12px;
  }

  .form-panel {
    padding: 20px 30px;
    max-width: 400px;
    margin: 0 auto;
  }

  .form-title {
    font-size: 1.4rem;
  }

  .user-avatar {
    width: 50px;
    height: 50px;
    margin-bottom: 12px;
  }

  .form-header {
    margin-bottom: 20px;
  }

  .form-input {
    height: 48px;
    padding: 0 14px 0 40px;
    font-size: 16px; /* Evita zoom en iOS */
  }

  /* Ajuste específico para reset password con doble padding */
  .reset-card .form-input {
    padding: 0 40px 0 40px;
  }

  .input-icon {
    left: 12px;
  }

  .password-toggle {
    right: 12px;
  }

  .btn {
    height: 48px;
    padding: 0 20px;
    font-size: 0.9rem;
    width: 100%;
    max-width: none;
  }

  .form-group {
    margin-bottom: 16px;
  }

  .btn-group {
    margin-top: 16px;
    gap: 10px;
  }

  .forgot-password,
  .back-to-login {
    margin-top: 12px;
    padding-top: 12px;
  }

  /* Asegurar scroll suave */
  .login-card,
  .recovery-card,
  .reset-card {
    min-height: auto;
    height: auto;
    overflow-y: visible;
  }

  .main-container {
    min-height: 100vh;
    height: auto;
    overflow-y: auto;
  }

  body {
    height: auto;
    min-height: 100vh;
  }
}

/* ========================================
   ACCESIBILIDAD
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
