/* Lista de Leads - Estilo Tabela Interativa Futurista */

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

.leads-title {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.leads-actions {
  display: flex;
  gap: 1rem;
}

.search-box {
  position: relative;
  width: 300px;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1.5px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

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

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-secondary);
  width: 16px;
  height: 16px;
}

.filter-dropdown {
  position: relative;
}

.filter-btn {
  padding: 0.75rem 1.25rem;
  border: 1.5px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--accent-primary);
}

/* Tabela de Leads */
.leads-table-container {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(20px);
  border: 1.5px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 
    0 8px 32px 0 rgba(139, 92, 246, 0.15),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.8);
}

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

.leads-table thead {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(167, 139, 250, 0.15));
  position: sticky;
  top: 0;
  z-index: 10;
}

.leads-table th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-primary);
  border-bottom: 2px solid rgba(139, 92, 246, 0.2);
}

.leads-table tbody tr {
  background: rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(139, 92, 246, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
}

.leads-table tbody tr:hover {
  background: rgba(139, 92, 246, 0.08);
  transform: scale(1.005);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
}

.leads-table tbody tr.expanded {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(167, 139, 250, 0.12));
}

.leads-table td {
  padding: 1.25rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-primary);
}

/* Lead Avatar */
.lead-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.lead-avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-light), var(--accent-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 1.25rem;
}

/* Lead Info Cell */
.lead-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lead-details h4 {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.lead-details p {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.lead-details p i {
  width: 12px;
  height: 12px;
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1.5px solid;
  white-space: nowrap;
}

.status-badge.nao-contatado {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.3);
  color: #64748b;
}

.status-badge.mensagem-enviada {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

.status-badge.em-negociacao {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.status-badge.fechado {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
}

/* Temperatura Badge */
.temp-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
  border: 2px solid;
  text-transform: uppercase;
  position: relative;
}

.temp-badge::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: inherit;
  filter: blur(8px);
  opacity: 0.3;
}

.temp-badge.HOT {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-color: #fca5a5;
  color: white;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

.temp-badge.WARM {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #fcd34d;
  color: white;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.temp-badge.COLD {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-color: #93c5fd;
  color: white;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

/* Rating Stars */
.rating-display {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 600;
}

.stars {
  display: flex;
  gap: 2px;
}

.star {
  color: #fbbf24;
  font-size: 0.875rem;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.action-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  transform: scale(1.1);
}

.action-btn i {
  width: 16px;
  height: 16px;
  color: var(--accent-primary);
}

.action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

.action-btn.delete:hover i {
  color: #ef4444;
}

/* Expanded Row */
.expanded-row {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 247, 252, 0.9));
}

.expanded-content {
  padding: 2rem;
  border-top: 2px solid rgba(139, 92, 246, 0.2);
  animation: slideDown 0.3s ease-out;
}

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

.expanded-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.detail-group h5 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
  letter-spacing: 0.5px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0;
  font-size: 0.875rem;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(139, 92, 246, 0.08);
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-item i {
  width: 16px;
  height: 16px;
  color: var(--accent-secondary);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.social-link {
  padding: 0.5rem 0.875rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  color: var(--accent-primary);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.social-link:hover {
  background: rgba(139, 92, 246, 0.2);
  transform: translateY(-2px);
}

.social-link i {
  width: 14px;
  height: 14px;
}

/* Notes Section */
.notes-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid rgba(139, 92, 246, 0.15);
}

.notes-textarea {
  width: 100%;
  min-height: 100px;
  padding: 1rem;
  border: 1.5px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: inherit;
  resize: vertical;
  transition: all 0.3s ease;
}

.notes-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state i {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  color: var(--accent-light);
}

.empty-state h3 {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.875rem;
}

/* Owner Tag (Dono do Lead) */
.owner-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-top: 0.375rem;
}

.owner-tag i {
  width: 12px;
  height: 12px;
}

.owner-tag.owned-by-me {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
}

/* Claim Button (Reivindicar Lead) */
.claim-btn {
  background: rgba(139, 92, 246, 0.1) !important;
  border-color: rgba(139, 92, 246, 0.3) !important;
}

.claim-btn:hover {
  background: rgba(139, 92, 246, 0.25) !important;
  border-color: var(--accent-primary) !important;
  transform: scale(1.15) !important;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.claim-btn i {
  color: var(--accent-primary) !important;
}

/* Release Button (Soltar Lead) */
.release-btn {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

.release-btn:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
  transform: scale(1.15) !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.release-btn i {
  color: #ef4444 !important;
}

/* WhatsApp Button */
.whatsapp-btn:hover {
  background: rgba(37, 211, 102, 0.15);
  border-color: rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover i {
  color: #25d366;
}

/* Filters Bar */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.filter-select {
  padding: 0.5rem 1rem;
  border: 1.5px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  background: white;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 150px;
}

.filter-select:hover {
  border-color: var(--accent-primary);
}

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