/* ============================================
   LUCIA LEADS PANEL - ESTILOS
   Colores inspirados en lucialopezpsi.com
   ============================================ */

:root {
  /* Colores principales de la web */
  --primary: #8B5CF6;        /* Morado vibrante */
  --primary-dark: #7C3AED;   /* Morado oscuro */
  --primary-light: #A78BFA;  /* Lila claro */
  --secondary: #EC4899;      /* Rosa accent */
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-900: #111827;
  
  /* Gradientes */
  --gradient-primary: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
  --gradient-light: linear-gradient(135deg, #A78BFA 0%, #F0ABFC 100%);
}

* {
  box-sizing: border-box;
}

/* ============================================
   CONTENEDOR PRINCIPAL
   ============================================ */

.lucia-leads-panel {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--gray-900);
}

.lucia-error {
  background: #FEE2E2;
  border-left: 4px solid var(--danger);
  padding: 16px 20px;
  border-radius: 8px;
  color: var(--danger);
  font-weight: 500;
}

/* ============================================
   HEADER
   ============================================ */

.panel-header {
  background: var(--gradient-primary);
  border-radius: 16px;
  padding: 32px 40px;
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 40px rgba(139, 92, 246, 0.3);
}

.panel-header h1 {
  color: white;
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.header-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.user-info {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
}

.btn-logout {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* ============================================
   ESTADÍSTICAS
   ============================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.15);
  border-color: var(--primary-light);
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.stat-label {
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   FILTROS RÁPIDOS
   ============================================ */

.quick-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-btn {
  background: white;
  border: 2px solid var(--gray-200);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--gray-700);
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* ============================================
   PANEL DE FILTROS
   ============================================ */

.panel-filters {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--gray-200);
}

.filters-form {
  margin-bottom: 16px;
}

.filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.search-input,
.filter-select,
.filter-date {
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  flex: 1;
  min-width: 200px;
}

.search-input {
  flex: 2;
}

.search-input:focus,
.filter-select:focus,
.filter-date:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
}

.btn-secondary:hover {
  background: var(--gray-200);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #059669;
  transform: translateY(-2px);
}

.export-actions {
  display: flex;
  justify-content: flex-end;
}

/* ============================================
   TABLA DE LEADS
   ============================================ */

.leads-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.leads-table {
  width: 100%;
  border-collapse: collapse;
}

.leads-table thead {
  background: var(--gradient-light);
}

.leads-table th {
  padding: 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--primary-light);
}

.leads-table tbody tr {
  border-bottom: 1px solid var(--gray-200);
  transition: all 0.2s ease;
}

.leads-table tbody tr:hover {
  background: var(--gray-50);
}

.leads-table td {
  padding: 16px;
  font-size: 14px;
  color: var(--gray-700);
}

.badge-tipo {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: var(--primary-light);
  color: white;
}

.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-nuevo {
  background: #DBEAFE;
  color: #1E40AF;
}

.status-contactado {
  background: #D1FAE5;
  color: #065F46;
}

.status-en_proceso {
  background: #FEF3C7;
  color: #92400E;
}

.status-cerrado {
  background: #D1D5DB;
  color: #374151;
}

.status-descartado {
  background: #FEE2E2;
  color: #991B1B;
}

.actions-cell {
  display: flex;
  gap: 8px;
}

.btn-action {
  padding: 8px 12px;
  border: none;
  background: var(--gray-100);
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}

.btn-action:hover {
  transform: scale(1.1);
}

.btn-edit:hover {
  background: #DBEAFE;
}

.btn-delete:hover {
  background: #FEE2E2;
}

/* ============================================
   PAGINACIÓN
   ============================================ */

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 24px;
}

.page-link {
  padding: 10px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  text-decoration: none;
  color: var(--gray-700);
  font-weight: 600;
  transition: all 0.2s ease;
}

.page-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.page-link.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
}

/* ============================================
   SIN RESULTADOS
   ============================================ */

.no-results {
  padding: 60px 20px;
  text-align: center;
  color: var(--gray-600);
}

.no-results p {
  font-size: 16px;
  margin: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .panel-header {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .filter-row {
    flex-direction: column;
  }
  
  .search-input,
  .filter-select,
  .filter-date {
    width: 100%;
  }
  
  .leads-table-container {
    overflow-x: auto;
  }
  
  .leads-table {
    min-width: 800px;
  }
}
