/* ============================================
   GALIA DIGITAL - DESIGN SYSTEM 2.0
   Sistema de diseño profesional y moderno
   ============================================ */

/* ============================================
   VARIABLES CSS - PALETA GALIA DIGITAL
   ============================================ */
:root {
  /* Colores principales Galia */
  --galia-purple: #7B2CBF;
  --galia-purple-light: #9D4EDD;
  --galia-purple-dark: #5A189A;
  --galia-purple-ultra-light: #C77DFF;
  --galia-purple-pale: #F3E8FF;
  
  /* Colores de acento */
  --galia-green: #10B981;
  --galia-green-light: #06D6A0;
  --galia-yellow: #FFB703;
  --galia-yellow-dark: #F59E0B;
  --galia-red: #EF4444;
  --galia-red-dark: #DC2626;
  
  /* Grises neutros */
  --galia-gray-50: #F9FAFB;
  --galia-gray-100: #F3F4F6;
  --galia-gray-200: #E5E7EB;
  --galia-gray-300: #D1D5DB;
  --galia-gray-400: #9CA3AF;
  --galia-gray-500: #6B7280;
  --galia-gray-600: #4B5563;
  --galia-gray-700: #374151;
  --galia-gray-800: #1F2937;
  --galia-gray-900: #111827;
  
  /* Gradientes */
  --gradient-primary: linear-gradient(135deg, #7B2CBF 0%, #9D4EDD 100%);
  --gradient-primary-hover: linear-gradient(135deg, #6A1FAF 0%, #8C3DCC 100%);
  --gradient-secondary: linear-gradient(135deg, #10B981 0%, #06D6A0 100%);
  --gradient-warning: linear-gradient(90deg, #FFB703 0%, #F59E0B 100%);
  --gradient-dark: linear-gradient(180deg, #1F2937 0%, #111827 100%);
  
  /* Sombras */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(123, 44, 191, 0.08);
  --shadow-lg: 0 10px 25px rgba(123, 44, 191, 0.15);
  --shadow-xl: 0 20px 40px rgba(123, 44, 191, 0.2);
  --shadow-button: 0 4px 12px rgba(123, 44, 191, 0.25);
  --shadow-button-hover: 0 6px 16px rgba(123, 44, 191, 0.35);
  
  /* Transiciones */
  --transition-fast: all 0.2s ease;
  --transition-base: all 0.3s ease;
  --transition-slow: all 0.5s ease;
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes glow {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(157, 78, 221, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(157, 78, 221, 0.8));
  }
}

/* ============================================
   TARJETAS MÉTRICAS (KPIs)
   ============================================ */
.metric-card {
  background: white;
  border: 1px solid var(--galia-gray-200);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: var(--transition-base);
}

.metric-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--galia-purple-ultra-light);
  transform: translateY(-4px);
}

.metric-card:hover::before {
  transform: scaleX(1);
}

.metric-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-button);
}

.metric-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--galia-gray-900);
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 12px 0 8px 0;
}

.metric-label {
  font-size: 13px;
  color: var(--galia-gray-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 6px;
}

.metric-trend.positive {
  background: #D1FAE5;
  color: #059669;
}

.metric-trend.negative {
  background: #FEE2E2;
  color: #DC2626;
}

/* ============================================
   BOTONES PRINCIPALES
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  padding: 14px 24px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-button);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-button-hover);
  background: var(--gradient-primary-hover);
}

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

.btn-secondary {
  background: white;
  color: var(--galia-purple);
  border: 2px solid var(--galia-purple-light);
}

.btn-secondary:hover {
  background: var(--galia-purple-pale);
  border-color: var(--galia-purple);
}

.btn-tertiary {
  background: var(--gradient-secondary);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-tertiary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

.btn-danger {
  background: #FEE2E2;
  color: var(--galia-red-dark);
  border: 1px solid #FECACA;
}

.btn-danger:hover {
  background: var(--galia-red);
  color: white;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

/* ============================================
   BADGES DE PRIORIDAD
   ============================================ */
.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.priority-urgent {
  background: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

.priority-urgent::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #DC2626;
  animation: pulse 2s infinite;
}

.priority-high {
  background: #FFEDD5;
  color: #EA580C;
  border: 1px solid #FED7AA;
}

.priority-high::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #EA580C;
}

.priority-medium {
  background: #FEF3C7;
  color: #D97706;
  border: 1px solid #FDE68A;
}

.priority-medium::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #D97706;
}

.priority-low {
  background: #D1FAE5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

.priority-low::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #059669;
}

/* ============================================
   BADGES DE TEMPERATURA (LEADS)
   ============================================ */
.lead-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lead-hot {
  background: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

.lead-hot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #DC2626;
  animation: pulse 2s infinite;
}

.lead-warm {
  background: #FFEDD5;
  color: #EA580C;
  border: 1px solid #FED7AA;
}

.lead-warm::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #EA580C;
}

.lead-cold {
  background: #FEF3C7;
  color: #D97706;
  border: 1px solid #FDE68A;
}

.lead-cold::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #D97706;
}

.lead-qualified {
  background: #D1FAE5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

.lead-qualified::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #059669;
}

/* ============================================
   BARRAS DE PROGRESO
   ============================================ */
.progress-bar {
  height: 10px;
  background: var(--galia-gray-100);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 10px;
  transition: width 0.6s ease;
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 2s infinite;
}

.progress-warning .progress-fill {
  background: var(--gradient-warning);
}

.progress-success .progress-fill {
  background: var(--gradient-secondary);
}

.progress-danger .progress-fill {
  background: linear-gradient(90deg, #EF4444 0%, #DC2626 100%);
}

/* ============================================
   SIDEBAR / NAVEGACIÓN
   ============================================ */
.sidebar {
  background: var(--gradient-dark);
  border-right: 1px solid var(--galia-gray-700);
}

.sidebar-logo {
  padding: 24px;
  border-bottom: 1px solid var(--galia-gray-700);
  animation: glow 3s ease-in-out infinite;
}

.nav-item {
  color: var(--galia-gray-400);
  padding: 12px 16px;
  border-radius: 10px;
  margin: 4px 12px;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: rgba(157, 78, 221, 0.1);
  color: var(--galia-purple-ultra-light);
  border-color: rgba(157, 78, 221, 0.2);
}

.nav-item.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(123, 44, 191, 0.3);
  border-color: transparent;
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   ICONOS SVG (Sistema base)
   ============================================ */
.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.icon-lg {
  width: 24px;
  height: 24px;
}

.icon-xl {
  width: 32px;
  height: 32px;
}

/* ============================================
   TARJETAS GENÉRICAS
   ============================================ */
.card {
  background: white;
  border: 1px solid var(--galia-gray-200);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--galia-gray-300);
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--galia-gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--galia-gray-900);
}

.card-body {
  padding: 24px;
}

/* ============================================
   UTILIDADES
   ============================================ */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-glow {
  box-shadow: 0 0 20px rgba(157, 78, 221, 0.3);
}

.gradient-border {
  position: relative;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.gradient-border::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient-primary);
  border-radius: inherit;
  z-index: -1;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .metric-icon {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }
  
  .metric-value {
    font-size: 28px;
  }
  
  .btn {
    padding: 12px 20px;
    font-size: 14px;
  }
}
