/* ==================== SALES PAGE LAYOUT ==================== */

/* Sales page wrapper - debe tener margen para el sidebar */
#sales-page {
  margin-left: calc(80px + 60px); /* icon-sidebar + nav-sidebar colapsado */
  transition: margin-left 0.2s ease;
}

/* Cuando el sidebar está expandido */
.nav-sidebar:not(.collapsed) ~ * #sales-page,
body:has(.nav-sidebar:not(.collapsed)) #sales-page {
  margin-left: calc(80px + 240px);
}

/* Toast notifications */
@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.sales-container {
  display: flex;
  height: calc(100vh - 60px);
  background: #fafafa;
  width: 100%;
}

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

.header-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 24px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.stat-label {
  color: #737373;
  font-weight: 400;
}

.stat-value {
  color: #171717;
  font-weight: 450;
}

.stat-value-hot {
  color: #171717;
  font-weight: 450;
}

.user-email {
  font-size: 11px;
  color: #737373;
  padding: 0 8px;
}

/* ==================== QUICK ACTIONS ==================== */

.quick-actions {
  display: flex;
  gap: 4px;
  margin-left: 16px;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #e5e5e5;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #737373;
}

.quick-action-btn:hover {
  background: #f5f5f5;
  color: #171717;
  border-color: #d4d4d4;
}

.quick-action-btn svg {
  width: 14px;
  height: 14px;
}

/* ==================== VIEW TOGGLE ==================== */

.view-toggle {
  display: flex;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  overflow: hidden;
  margin-left: 8px;
}

.view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: white;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #737373;
}

.view-btn:first-child {
  border-right: 1px solid #e5e5e5;
}

.view-btn:hover {
  background: #f5f5f5;
}

.view-btn.active {
  background: #171717;
  color: white;
}

.view-btn svg {
  width: 14px;
  height: 14px;
}

/* ==================== BULK ACTIONS ==================== */

.bulk-actions {
  position: relative;
  margin-left: 8px;
}

.bulk-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #e5e5e5;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 400;
  color: #737373;
  transition: all 0.15s ease;
}

.bulk-btn:hover {
  background: #f5f5f5;
  color: #171717;
}

.bulk-btn svg {
  width: 12px;
  height: 12px;
}

.bulk-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  min-width: 160px;
  display: none;
  z-index: 100;
}

.bulk-dropdown.show {
  display: block;
}

.bulk-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  color: #171717;
  text-align: left;
  transition: background 0.15s ease;
}

.bulk-dropdown-item:hover {
  background: #f5f5f5;
}

.bulk-dropdown-item:first-child {
  border-radius: 8px 8px 0 0;
}

.bulk-dropdown-item:last-child {
  border-radius: 0 0 8px 8px;
}

.bulk-dropdown-item svg {
  width: 14px;
  height: 14px;
  color: #737373;
}

.bulk-dropdown-divider {
  height: 1px;
  background: #e5e5e5;
  margin: 4px 0;
}

.bulk-dropdown-item.danger {
  color: #dc2626;
}

.bulk-dropdown-item.danger:hover {
  background: #fef2f2;
}

.bulk-dropdown-item.danger svg {
  color: #dc2626;
}

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

.header-divider {
  width: 1px;
  height: 24px;
  background: #e5e5e5;
  margin: 0 8px;
}

/* ==================== TIMELINE ==================== */

.timeline-section {
  background: white;
  border-bottom: 1px solid #e9ecef;
  padding: 8px 16px;
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.timeline-header h4 {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  color: #737373;
  letter-spacing: 0.3px;
  margin: 0;
}

.timeline-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid #e5e5e5;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  color: #737373;
  transition: all 0.15s ease;
}

.timeline-nav-btn:hover {
  background: #f5f5f5;
  color: #171717;
}

.timeline-range {
  font-size: 12px;
  font-weight: 400;
  color: #171717;
  min-width: 100px;
  text-align: center;
}

.timeline-days {
  display: flex;
  gap: 4px;
}

.timeline-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: white;
  min-width: 0;
}

.timeline-day:hover {
  border-color: #d4d4d4;
  background: #fafafa;
}

.timeline-day.active {
  border-color: #171717;
  background: #171717;
}

.timeline-day.active .timeline-day-name,
.timeline-day.active .timeline-day-num,
.timeline-day.active .timeline-day-count {
  color: white;
}

.timeline-day.today {
  border-color: #171717;
}

.timeline-day-name {
  font-size: 10px;
  font-weight: 400;
  color: #737373;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.timeline-day-num {
  font-size: 14px;
  font-weight: 500;
  color: #171717;
  line-height: 1.2;
}

.timeline-day-count {
  font-size: 9px;
  font-weight: 400;
  color: #737373;
  margin-top: 2px;
}

.timeline-day-indicator {
  display: flex;
  gap: 2px;
  margin-top: 4px;
}

.timeline-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #e5e5e5;
}

.timeline-dot.hot {
  background: #ef4444;
}

.timeline-dot.warm {
  background: #f59e0b;
}

.timeline-dot.cold {
  background: #3b82f6;
}

.timeline-day.active .timeline-dot {
  opacity: 0.8;
}

/* Mini Chart in Timeline Day */
.timeline-mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 1px;
  height: 16px;
  margin-top: 4px;
  padding: 0 2px;
  width: 100%;
  justify-content: center;
}

.mini-bar {
  width: 4px;
  min-height: 2px;
  border-radius: 1px 1px 0 0;
  transition: height 0.3s ease;
}

.mini-bar.hot {
  background: linear-gradient(to top, #ef4444, #f87171);
}

.mini-bar.warm {
  background: linear-gradient(to top, #f59e0b, #fbbf24);
}

.mini-bar.cold {
  background: linear-gradient(to top, #3b82f6, #60a5fa);
}

.mini-bar.new {
  background: linear-gradient(to top, #22c55e, #4ade80);
}

.timeline-day.active .mini-bar {
  opacity: 0.9;
}

.timeline-day.active .mini-bar.hot {
  background: linear-gradient(to top, rgba(239,68,68,0.8), rgba(248,113,113,0.9));
}

.timeline-day.active .mini-bar.warm {
  background: linear-gradient(to top, rgba(245,158,11,0.8), rgba(251,191,36,0.9));
}

.timeline-day.active .mini-bar.cold {
  background: linear-gradient(to top, rgba(59,130,246,0.8), rgba(96,165,250,0.9));
}

.timeline-day.active .mini-bar.new {
  background: linear-gradient(to top, rgba(34,197,94,0.8), rgba(74,222,128,0.9));
}

/* Empty state for mini chart */
.mini-chart-empty {
  width: 100%;
  height: 2px;
  background: #e5e5e5;
  border-radius: 1px;
  margin-top: 4px;
}

.timeline-day.active .mini-chart-empty {
  background: rgba(255,255,255,0.3);
}

/* Timeline Legend */
.timeline-legend {
  display: flex;
  gap: 12px;
  margin-left: auto;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 400;
  color: #737373;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.legend-dot.new {
  background: linear-gradient(to top, #22c55e, #4ade80);
}

.legend-dot.hot {
  background: linear-gradient(to top, #ef4444, #f87171);
}

.legend-dot.warm {
  background: linear-gradient(to top, #f59e0b, #fbbf24);
}

.legend-dot.cold {
  background: linear-gradient(to top, #3b82f6, #60a5fa);
}

/* ==================== DAY ACTIVITY PANEL ==================== */

.day-activity-panel {
  background: #fafafa;
  border-bottom: 1px solid #e9ecef;
  padding: 10px 16px;
  animation: slideDown 0.2s ease;
}

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

.day-activity-panel.hidden {
  display: none;
}

.day-activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.day-activity-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #525252;
  flex-wrap: wrap;
}

#day-activity-title {
  font-weight: 600;
  color: #171717;
}

.day-activity-counts {
  font-size: 12px;
  color: #737373;
}

.day-activity-counts span {
  font-weight: 600;
  color: #404040;
}

.day-activity-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  color: #a3a3a3;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.day-activity-close:hover {
  background: #e5e5e5;
  color: #171717;
}

.day-activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.activity-item:hover {
  border-color: #d4d4d4;
  background: #fafafa;
}

.activity-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f5f5f5;
  color: #737373;
  flex-shrink: 0;
}

.activity-icon.new-lead {
  background: #dcfce7;
  color: #16a34a;
}

.activity-icon.interaction {
  background: #dbeafe;
  color: #2563eb;
}

.activity-icon.hot {
  background: #fee2e2;
  color: #dc2626;
}

.activity-icon.closed {
  background: #171717;
  color: white;
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-title {
  font-size: 13px;
  font-weight: 450;
  color: #171717;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-meta {
  font-size: 11px;
  font-weight: 400;
  color: #737373;
  margin: 0;
}

.activity-time {
  font-size: 11px;
  font-weight: 400;
  color: #a3a3a3;
  flex-shrink: 0;
}

.activity-empty {
  text-align: center;
  padding: 24px;
  color: #737373;
  font-size: 13px;
}

/* ==================== SIDEBAR ==================== */

.sales-sidebar {
  width: 250px;
  background: #fafafa;
  border-right: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-header {
  padding: 18px 16px 14px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.sidebar-header h3 {
  font-size: 13px;
  font-weight: 600;
  color: #171717;
  letter-spacing: -0.01em;
  margin: 0;
}

.sidebar-subtitle {
  font-size: 11px;
  font-weight: 400;
  color: #a3a3a3;
}

.sales-nav {
  padding: 8px 8px 16px;
}

/* Section dividers */
.nav-section-divider {
  padding: 14px 12px 6px;
  margin-top: 2px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a3a3a3;
}

/* Nav items */
.nav-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 1px;
  position: relative;
}

.nav-item:hover {
  background: #f0f0f0;
}

.nav-item.active {
  background: #f5f5f5;
  border-left-color: transparent;
}

.nav-item.active .nav-label {
  font-weight: 500;
  color: #171717;
}

/* Icon containers with color theming */
.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 10px;
  flex-shrink: 0;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.nav-icon svg {
  width: 15px;
  height: 15px;
}

/* Icon color variants */
.icon-default { background: #f5f5f5; color: #525252; }
.icon-success { background: #ecfdf5; color: #059669; }
.icon-danger  { background: #fef2f2; color: #dc2626; }
.icon-money   { background: #ecfdf5; color: #16a34a; }
.icon-hot     { background: #fff7ed; color: #ea580c; }
.icon-info    { background: #eff6ff; color: #2563eb; }
.icon-warning { background: #fffbeb; color: #d97706; }
.icon-alert   { background: #fef2f2; color: #dc2626; }
.icon-bank    { background: #f5f3ff; color: #7c3aed; }
.icon-star    { background: #fffbeb; color: #f59e0b; }
.icon-new     { background: #eff6ff; color: #3b82f6; }
.icon-calendar{ background: #f0fdf4; color: #22c55e; }

.nav-item:hover .icon-default { background: #ebebeb; }
.nav-item.active .icon-default { background: #e5e5e5; color: #404040; }

.nav-label {
  font-size: 13px;
  font-weight: 400;
  flex: 1;
  text-align: left;
  color: #404040;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badge variants */
.nav-badge {
  background: #f0f0f0;
  color: #737373;
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  transition: all 0.15s ease;
}

.nav-badge.badge-success,
.nav-badge.badge-danger,
.nav-badge.badge-money,
.nav-badge.badge-hot,
.nav-badge.badge-info,
.nav-badge.badge-warning,
.nav-badge.badge-alert,
.nav-badge.badge-bank,
.nav-badge.badge-star,
.nav-badge.badge-new,
.nav-badge.badge-calendar {
  background: #f0f0f0;
  color: #737373;
}

.nav-badge.hot {
  background: #171717;
  color: #fff;
}

/* ==================== MAIN CONTENT ==================== */

.sales-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ==================== FILTERS BAR ==================== */

.filters-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: white;
  border-bottom: 1px solid #e9ecef;
}

.search-input {
  flex: 1;
  padding: 6px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease;
}

.search-input:focus {
  border-color: #737373;
}

.filter-select {
  padding: 6px 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 13px;
  background: white;
  cursor: pointer;
  outline: none;
  min-width: 140px;
}

.filter-select:focus {
  border-color: #737373;
}

/* ==================== FILTER INDICATOR ==================== */

.filter-indicator {
  display: none;
  padding: 8px 16px;
  background: #fafafa;
  border-bottom: 1px solid #e5e5e5;
  animation: slideDown 0.2s ease;
}

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

.filter-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 10px;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  font-size: 12px;
  color: #404040;
  transition: all 0.15s ease;
}

.filter-chip:hover {
  border-color: #d4d4d4;
  background: #f5f5f5;
}

.chip-icon {
  display: flex;
  align-items: center;
  color: #737373;
}

.chip-label {
  font-weight: 500;
  color: #262626;
}

.chip-remove {
  background: none;
  border: none;
  color: #a3a3a3;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.chip-remove:hover {
  background: #fee2e2;
  color: #dc2626;
}

.clear-all-filters {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: transparent;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  font-size: 12px;
  color: #737373;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-left: auto;
}

.clear-all-filters:hover {
  background: #fee2e2;
  border-color: #fecaca;
  color: #dc2626;
}

/* ==================== BREADCRUMBS ==================== */

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: white;
  border-bottom: 1px solid #e5e7eb;
  font-size: 13px;
}

.breadcrumb-item {
  padding: 4px 10px;
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  white-space: nowrap;
}

.breadcrumb-item:hover {
  background: #f3f4f6;
  color: #111827;
}

.breadcrumb-item.active {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
  font-weight: 500;
  cursor: default;
}

.breadcrumb-separator {
  color: #d1d5db;
  font-size: 12px;
  user-select: none;
}

/* ==================== LEADS TABLE ==================== */

.leads-table-container {
  flex: 1;
  overflow-y: auto;
  background: white;
  position: relative;
}

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

.leads-table thead {
  position: sticky;
  top: 0;
  background: #f8f9fa;
  z-index: 10;
  border-bottom: 2px solid #dee2e6;
}

.leads-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  color: #737373;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.leads-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.leads-table tbody tr:hover {
  background: #f8f9fa;
}

.leads-table td {
  padding: 12px;
  font-size: 13px;
  color: #171717;
  vertical-align: middle;
  font-weight: 400;
}

/* Table Columns */
.col-score {
  width: 80px;
}

.col-name {
  width: 220px;
}

.col-service {
  width: 150px;
}

.col-stage {
  width: 130px;
}

.col-date {
  width: 130px;
}

.col-messages {
  width: 80px;
  text-align: center;
}

.col-urgency {
  width: 110px;
}

.col-summary {
  min-width: 300px;
}

.col-actions {
  width: 120px;
  text-align: center;
}

/* Date Value */
.date-value {
  font-size: 13px;
  color: #6c757d;
  font-weight: 500;
}

/* Message Count */
.message-count {
  font-size: 13px;
  color: #495057;
  background: #f8f9fa;
  padding: 3px 8px;
  border-radius: 10px;
  display: inline-block;
  font-weight: 500;
}

/* Score Badge */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  position: relative;
}

.score-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  opacity: 0.15;
}

.score-badge.hot {
  color: #dc3545;
}

.score-badge.hot::before {
  background: #dc3545;
}

.score-badge.warm {
  color: #fd7e14;
}

.score-badge.warm::before {
  background: #fd7e14;
}

.score-badge.cold {
  color: #6c757d;
}

.score-badge.cold::before {
  background: #6c757d;
}

/* Lead Name Cell */
.lead-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lead-initial {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #171717;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
}

.lead-name-info h4 {
  font-size: 13px;
  font-weight: 450;
  color: #171717;
  margin: 0 0 2px 0;
}

.lead-name-info p {
  font-size: 10px;
  color: #737373;
  margin: 0;
}

/* Stage Badge */
.stage-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 450;
  background: #f5f5f5;
  color: #737373;
}

.stage-badge.awareness { background: #f5f5f5; color: #737373; }
.stage-badge.interest { background: #f5f5f5; color: #525252; }
.stage-badge.consideration { background: #e5e5e5; color: #525252; }
.stage-badge.intention { background: #d4d4d4; color: #171717; }
.stage-badge.evaluation { background: #a3a3a3; color: #171717; }
.stage-badge.purchase { background: #171717; color: #fff; }

/* Urgency Badge */
.urgency-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
}

.urgency-badge.high { color: #dc3545; }
.urgency-badge.medium { color: #fd7e14; }
.urgency-badge.low { color: #28a745; }

/* Summary Text */
.summary-text {
  font-size: 13px;
  color: #6c757d;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Action Button */
.action-btn {
  padding: 4px 10px;
  border: 1px solid #dee2e6;
  background: white;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  color: #495057;
  cursor: pointer;
  transition: all 0.15s ease;
}

.action-btn:hover {
  background: #171717;
  border-color: #171717;
  color: #fff;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #6c757d;
}

.empty-state p {
  margin-top: 16px;
  font-size: 13px;
}

/* ==================== LEAD DETAIL MODAL ==================== */

.modal-large {
  max-width: 700px;
  width: 90%;
}

.lead-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lead-info-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e9ecef;
}

.lead-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #171717;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  font-weight: 500;
  flex-shrink: 0;
}

.lead-info-main {
  flex: 1;
}

.lead-info-main h3 {
  font-size: 16px;
  font-weight: 450;
  color: #171717;
  margin: 0 0 4px 0;
}

.lead-phone {
  font-size: 12px;
  color: #737373;
  margin: 0;
}

.lead-score-badge {
  text-align: center;
}

.score-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  position: relative;
  margin: 0 auto 8px;
}

.score-circle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  opacity: 0.15;
}

.score-circle.hot {
  color: #dc3545;
}

.score-circle.hot::before {
  background: #dc3545;
}

.score-circle.warm {
  color: #fd7e14;
}

.score-circle.warm::before {
  background: #fd7e14;
}

.score-circle.cold {
  color: #6c757d;
}

.score-circle.cold::before {
  background: #6c757d;
}

.score-label {
  font-size: 9px;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

/* Executive Summary */
.executive-summary {
  padding: 16px;
  background: #f8f9fa;
  border-radius: 6px;
}

.executive-summary h4 {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: #6c757d;
  margin: 0 0 8px 0;
  letter-spacing: 0.5px;
}

.executive-summary p {
  font-size: 13px;
  color: #495057;
  line-height: 1.5;
  margin: 0;
}

/* Key Metrics */
.lead-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.metric-item {
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 9px;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-value {
  font-size: 13px;
  font-weight: 600;
  color: #212529;
}

/* Recommendation Box */
.recommendation-box {
  padding: 14px;
  background: #f5f5f5;
  border-left: 3px solid #171717;
  border-radius: 4px;
}

.recommendation-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 11px;
  color: #171717;
  font-weight: 500;
}

.recommendation-icon {
  font-size: 14px;
}

.recommendation-box p {
  font-size: 13px;
  color: #495057;
  line-height: 1.5;
  margin: 0;
}

/* Objections and Questions */
.objections-section,
.questions-section {
  padding-top: 16px;
  border-top: 1px solid #e9ecef;
}

.objections-section h4,
.questions-section h4 {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: #6c757d;
  margin: 0 0 12px 0;
  letter-spacing: 0.5px;
}

.objections-section ul,
.questions-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.objections-section li,
.questions-section li {
  padding: 10px 14px;
  background: #f5f5f5;
  border-radius: 6px;
  font-size: 13px;
  color: #171717;
  font-weight: 400;
}

.questions-section li {
  background: #e5e5e5;
  color: #171717;
}

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

@media (max-width: 1200px) {
  .sales-sidebar {
    width: 210px;
  }

  .nav-section-divider {
    padding: 10px 12px 4px;
  }

  .col-summary {
    min-width: 200px;
  }
}

@media (max-width: 768px) {
  .sales-container {
    flex-direction: column;
  }

  .sales-sidebar {
    width: 100%;
    max-height: 220px;
    border-right: none;
    border-bottom: 1px solid #e9ecef;
  }

  .sales-sidebar .nav-section-divider {
    display: none;
  }

  .sales-sidebar .sales-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
  }

  .sales-sidebar .nav-item {
    width: auto;
    padding: 6px 10px;
    border-left: none;
    border-radius: 20px;
    border: 1px solid #e5e5e5;
  }

  .sales-sidebar .nav-item.active {
    border-color: #171717;
    background: #f0f0f0;
  }

  .sales-sidebar .nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 6px;
  }

  .filters-bar {
    flex-wrap: wrap;
  }

  .filter-select {
    min-width: 0;
    flex: 1;
  }

  .leads-table {
    font-size: 9px;
  }

  .col-summary {
    display: none;
  }
}

/* ==================== UTILITIES ==================== */

.hidden {
  display: none !important;
}

/* ==================== LEAD DETAIL MODAL - MINIMALIST ==================== */

.modal-lead-detail {
  max-width: 800px;
  width: 95%;
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: white;
}

.modal-lead-detail .modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
}

.modal-lead-detail .modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 500;
  color: #171717;
}

.modal-lead-detail .modal-title svg {
  color: #525252;
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  background: white;
  color: #737373;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #f5f5f5;
  color: #171717;
  border-color: #d4d4d4;
}

.modal-lead-detail .modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  background: white;
}

/* Lead Info Header */
.lead-info-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e5e5;
}

.lead-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: #171717;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: 500;
  flex-shrink: 0;
}

.lead-info-main h3 {
  font-size: 20px;
  font-weight: 500;
  color: #171717;
  margin: 0 0 6px 0;
}

.lead-phone-lg {
  font-size: 15px;
  color: #525252;
  margin: 0 0 4px 0;
  font-weight: 400;
}

.lead-email-lg {
  font-size: 14px;
  color: #737373;
  margin: 4px 0 0 0;
}

.lead-company-lg {
  font-size: 14px;
  color: #525252;
  font-weight: 500;
  margin: 4px 0 0 0;
}

/* Score Badge - Minimalist */
.lead-score-badge-lg {
  text-align: center;
  margin-left: auto;
}

.score-circle-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 600;
  position: relative;
  margin: 0 auto 8px;
  background: #f5f5f5;
  color: #171717;
  border: 2px solid #e5e5e5;
}

.score-circle-lg.hot { 
  border-color: #171717;
  background: #171717;
  color: white;
}

.score-circle-lg.warm { 
  border-color: #a3a3a3;
  background: #f5f5f5;
  color: #171717;
}

.score-circle-lg.cold { 
  border-color: #e5e5e5;
  background: white;
  color: #737373;
}

.score-label-lg {
  font-size: 10px;
  color: #737373;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
  font-weight: 500;
}

/* Executive Summary - Minimalist */
.executive-summary-lg {
  padding: 20px;
  background: #fafafa;
  border-radius: 8px;
  margin-top: 24px;
  border: 1px solid #e5e5e5;
}

.executive-summary-lg h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #737373;
  margin: 0 0 12px 0;
  letter-spacing: 0.5px;
}

.executive-summary-lg h4 svg {
  color: #a3a3a3;
}

.executive-summary-lg p {
  font-size: 15px;
  color: #171717;
  line-height: 1.6;
  margin: 0;
}

/* Key Metrics - Minimalist */
.lead-metrics-lg {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.metric-item-lg {
  padding: 16px;
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metric-label-lg {
  font-size: 11px;
  color: #737373;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.metric-value-lg {
  font-size: 16px;
  font-weight: 500;
  color: #171717;
}

/* Strategic Data - Minimalist */
.strategic-data-lg {
  margin: 24px 0;
  padding: 20px;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
}

.strategic-data-lg h4 {
  font-size: 11px;
  font-weight: 600;
  color: #737373;
  margin: 0 0 16px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.strategic-grid-lg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.strategic-item-lg {
  display: flex;
  flex-direction: column;
  text-align: center;
  padding: 14px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
}

.strategic-label-lg {
  font-size: 11px;
  color: #737373;
  font-weight: 500;
  margin-bottom: 6px;
}

.strategic-value-lg {
  font-size: 16px;
  font-weight: 500;
  color: #171717;
}

/* Products, Competitors, Requests - Minimalist */
.products-section-lg,
.competitors-section-lg,
.requests-section-lg,
.pain-section-lg {
  margin: 20px 0;
}

.products-section-lg h4,
.competitors-section-lg h4,
.requests-section-lg h4,
.pain-section-lg h4 {
  font-size: 11px;
  font-weight: 600;
  color: #737373;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.products-tags-lg,
.competitors-tags-lg,
.requests-tags-lg {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.products-tags-lg .tag,
.competitors-tags-lg .tag,
.requests-tags-lg .tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: #f5f5f5;
  color: #171717;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 450;
  border: 1px solid #e5e5e5;
}

/* Recommendation Box - Minimalist sin franja */
.recommendation-box-lg {
  padding: 16px 20px;
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  margin: 20px 0;
}

.recommendation-box-lg h4 {
  font-size: 11px;
  font-weight: 600;
  color: #737373;
  margin: 0 0 10px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.recommendation-box-lg p {
  font-size: 14px;
  color: #525252;
  line-height: 1.6;
  margin: 0;
}

/* Pain Points - Minimalist sin franja */
.pain-section-lg ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.pain-section-lg li {
  font-size: 14px;
  color: #171717;
  margin-bottom: 8px;
  padding: 12px 16px;
  background: #fafafa;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
}

/* Objections and Questions - Minimalist sin franjas */
.objections-section-lg,
.questions-section-lg {
  padding-top: 20px;
  border-top: 1px solid #e5e5e5;
  margin-top: 20px;
}

.objections-section-lg h4,
.questions-section-lg h4 {
  font-size: 11px;
  font-weight: 600;
  color: #737373;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.objections-section-lg ul,
.questions-section-lg ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.objections-section-lg li,
.questions-section-lg li {
  padding: 12px 16px;
  background: #fafafa;
  border-radius: 6px;
  font-size: 14px;
  color: #171717;
  font-weight: 400;
  border: 1px solid #e5e5e5;
}

/* Modal Footer - Minimalist */
.modal-footer-lg {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #e5e5e5;
  background: white;
}

.btn-secondary-lg,
.btn-primary-lg {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary-lg {
  background: white;
  border: 1px solid #e5e5e5;
  color: #525252;
}

.btn-secondary-lg:hover {
  background: #f5f5f5;
  border-color: #d4d4d4;
  color: #171717;
}

.btn-primary-lg {
  background: #171717;
  border: none;
  color: white;
}

.btn-primary-lg:hover {
  background: #404040;
}

/* Responsive */
@media (max-width: 768px) {
  .modal-lead-detail {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .lead-metrics-lg {
    grid-template-columns: 1fr;
  }
  
  .strategic-grid-lg {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .lead-info-header {
    flex-wrap: wrap;
  }
  
  .lead-score-badge-lg {
    margin-left: 0;
    margin-top: 16px;
    width: 100%;
  }
}

/* ==================== STRATEGIC DATA SECTION ==================== */

.strategic-data {
  margin: 20px 0;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
}

.strategic-data h4 {
  font-size: 11px;
  font-weight: 500;
  color: #737373;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.strategic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.strategic-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.strategic-label {
  font-size: 11px;
  color: #6c757d;
}

.strategic-value {
  font-size: 13px;
  font-weight: 500;
  color: #171717;
}

/* Tags for products, competitors, requests */
.products-section,
.competitors-section,
.requests-section,
.pain-section {
  margin: 16px 0;
}

.products-section h4,
.competitors-section h4,
.requests-section h4,
.pain-section h4 {
  font-size: 13px;
  font-weight: 600;
  color: #171717;
  margin: 0 0 8px 0;
}

.products-tags,
.competitors-tags,
.requests-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  background: #f5f5f5;
  color: #525252;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 450;
}

.tag-warning {
  background: #e5e5e5;
  color: #171717;
}

.tag-success {
  background: #171717;
  color: #fff;
}

/* Lead email and company */
.lead-email {
  font-size: 12px;
  color: #6c757d;
  margin: 4px 0 0 0;
}

.lead-company {
  font-size: 12px;
  color: #10b981;
  font-weight: 500;
  margin: 2px 0 0 0;
}

/* Pain points list */
.pain-section ul {
  margin: 0;
  padding-left: 20px;
}

.pain-section li {
  font-size: 13px;
  color: #495057;
  margin-bottom: 6px;
}

@media (max-width: 768px) {
  .strategic-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* ==================== DARK MODE OVERRIDES ==================== */

[data-theme="dark"] .sales-container {
  background: var(--color-bg);
}

[data-theme="dark"] .leads-sidebar {
  background: var(--color-bg-secondary);
  border-color: var(--color-border);
}

[data-theme="dark"] .lead-item {
  background: var(--color-bg);
  border-color: var(--color-border);
}

[data-theme="dark"] .lead-item:hover {
  background: var(--color-bg-tertiary);
}

[data-theme="dark"] .lead-item.active {
  background: var(--color-bg-tertiary);
  border-color: var(--color-text-tertiary);
}

[data-theme="dark"] .lead-detail-panel {
  background: var(--color-bg);
  border-color: var(--color-border);
}

[data-theme="dark"] .stat-value,
[data-theme="dark"] .stat-value-hot {
  color: var(--color-text);
}

[data-theme="dark"] .stat-label,
[data-theme="dark"] .user-email {
  color: var(--color-text-secondary);
}

[data-theme="dark"] .funnel-stage {
  background: var(--color-bg-tertiary);
}

[data-theme="dark"] .stage-label,
[data-theme="dark"] .stage-count {
  color: var(--color-text);
}

[data-theme="dark"] .search-box {
  background: var(--color-bg-tertiary);
  border-color: var(--color-border);
  color: var(--color-text);
}

[data-theme="dark"] .search-box::placeholder {
  color: var(--color-text-tertiary);
}

[data-theme="dark"] .filter-btn {
  background: var(--color-bg-tertiary);
  color: var(--color-text);
  border-color: var(--color-border);
}

[data-theme="dark"] .filter-btn:hover,
[data-theme="dark"] .filter-btn.active {
  background: var(--color-bg-secondary);
  border-color: var(--color-text-tertiary);
}

[data-theme="dark"] .detail-section {
  background: var(--color-bg-secondary);
  border-color: var(--color-border);
}

[data-theme="dark"] .section-title {
  color: var(--color-text);
}

[data-theme="dark"] .conversation-item {
  background: var(--color-bg);
  border-color: var(--color-border);
}

[data-theme="dark"] .conversation-item:hover {
  background: var(--color-bg-tertiary);
}

[data-theme="dark"] .info-label {
  color: var(--color-text-secondary);
}

[data-theme="dark"] .info-value {
  color: var(--color-text);
}

[data-theme="dark"] .sales-tab {
  color: var(--color-text-secondary);
  background: transparent;
}

[data-theme="dark"] .sales-tab:hover {
  color: var(--color-text);
  background: var(--color-bg-tertiary);
}

[data-theme="dark"] .sales-tab.active {
  color: var(--color-text);
  background: var(--color-bg-secondary);
}

[data-theme="dark"] .timeline-card,
[data-theme="dark"] .chart-container {
  background: var(--color-bg-secondary);
  border-color: var(--color-border);
}

[data-theme="dark"] .empty-state {
  color: var(--color-text-secondary);
}

[data-theme="dark"] .pain-section li {
  color: var(--color-text-secondary);
}

[data-theme="dark"] .stage-badge {
  background: var(--color-bg-tertiary);
  color: var(--color-text);
}

[data-theme="dark"] .lead-name {
  color: var(--color-text);
}

[data-theme="dark"] .lead-phone {
  color: var(--color-text-secondary);
}

[data-theme="dark"] .lead-time {
  color: var(--color-text-tertiary);
}

[data-theme="dark"] .lead-score {
  background: var(--color-bg-tertiary);
  color: var(--color-text);
}

[data-theme="dark"] .modal-content {
  background: var(--color-bg);
  border-color: var(--color-border);
}

[data-theme="dark"] .modal-header {
  border-color: var(--color-border);
}

[data-theme="dark"] .modal-title {
  color: var(--color-text);
}

/* Transición suave entre temas */
.theme-transition,
.theme-transition *,
.theme-transition *::before,
.theme-transition *::after {
  transition: background-color 300ms ease, 
              color 300ms ease, 
              border-color 300ms ease,
              box-shadow 300ms ease !important;
}

/* Theme Toggle Button (for sales page) */
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 200ms ease;
}

[data-theme="dark"] .theme-toggle {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.theme-toggle:hover {
  transform: scale(1.05);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--color-text);
}

/* Estilos globales para iconos de tema */
.icon-sun {
  display: none;
}

.icon-moon {
  display: block;
}

[data-theme="dark"] .icon-sun {
  display: block;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

/* Botón de tema integrado en header */
#theme-toggle.btn-config {
  position: static;
  width: auto;
  height: auto;
  border-radius: var(--space-sm, 8px);
  box-shadow: none;
  z-index: auto;
  background: transparent;
}

#theme-toggle.btn-config:hover {
  transform: none;
  box-shadow: none;
  background: var(--color-bg-tertiary);
}

/* ==================== VIEW TOGGLE ==================== */

.view-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-md, 8px);
  padding: 2px;
  margin-left: auto;
  flex-shrink: 0;
}

.view-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--color-text-tertiary);
  border-radius: var(--radius-sm, 4px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-toggle-btn:hover {
  color: var(--color-text);
  background: var(--color-bg-hover);
}

.view-toggle-btn.active {
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ==================== KANBAN PIPELINE ==================== */

.kanban-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0 16px;
  min-height: 400px;
  align-items: flex-start;
}

.kanban-container.hidden {
  display: none;
}

.kanban-column {
  flex: 1;
  min-width: 200px;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg, 12px);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-light);
  overflow: hidden;
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border-light);
}

.kanban-column-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.kanban-column-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.kanban-column-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-tertiary);
  background: var(--color-bg-tertiary);
  padding: 2px 8px;
  border-radius: 10px;
}

.kanban-column-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  min-height: 80px;
  transition: background 0.2s ease;
}

.kanban-column-body.kanban-column-over {
  background: color-mix(in srgb, var(--color-primary) 5%, transparent);
  border-radius: 0 0 var(--radius-lg, 12px) var(--radius-lg, 12px);
}

.kanban-empty {
  text-align: center;
  font-size: 12px;
  color: var(--color-text-tertiary);
  padding: 24px 8px;
  font-style: italic;
}

/* ---- Kanban Card ---- */

.kanban-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md, 8px);
  padding: 12px;
  cursor: grab;
  transition: box-shadow 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
  user-select: none;
}

.kanban-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border-color: var(--color-border);
}

.kanban-card:active {
  cursor: grabbing;
}

.kanban-card-dragging {
  opacity: 0.4;
  transform: rotate(2deg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.kanban-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.kanban-card-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.kanban-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.kanban-card-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kanban-card-phone {
  font-size: 11px;
  color: var(--color-text-tertiary);
}

.kanban-card-score {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
}

.kanban-card-score.score-high {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
}

.kanban-card-score.score-medium {
  background: rgba(234, 179, 8, 0.1);
  color: #ca8a04;
}

.kanban-card-score.score-low {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.kanban-card-summary {
  font-size: 11px;
  color: var(--color-text-secondary);
  line-height: 1.4;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kanban-card-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.kanban-card-class {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid;
  line-height: 1.3;
}

.kanban-card-urgent {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid #ef4444;
  line-height: 1.3;
}

.kanban-card-meta {
  font-size: 10px;
  color: var(--color-text-tertiary);
  margin-left: auto;
}

/* ---- Responsive ---- */

@media (max-width: 1100px) {
  .kanban-container {
    gap: 8px;
  }
  .kanban-column {
    min-width: 170px;
  }
}

@media (max-width: 768px) {
  .kanban-container {
    flex-direction: column;
  }
  .kanban-column {
    max-width: 100%;
    min-width: 100%;
  }
}

/* ==================== STATS CARDS ==================== */

/* ==================== STATS BAR (compact single row) ==================== */

.stats-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 12px;
  color: var(--color-text-tertiary);
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.stats-bar-item {
  white-space: nowrap;
}

.stats-bar-value {
  font-weight: 600;
  color: var(--color-text-primary);
  font-size: 13px;
}

.stats-bar-sep {
  color: var(--color-text-tertiary);
  opacity: 0.4;
  user-select: none;
}

/* ==================== SORTABLE TABLE HEADERS ==================== */

.leads-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
  position: relative;
}

.leads-table th.sortable:hover {
  color: var(--color-primary, #3b82f6);
}

.leads-table th .sort-arrow {
  display: inline-block;
  width: 12px;
  margin-left: 2px;
  opacity: 0.3;
  font-size: 10px;
  vertical-align: middle;
}

.leads-table th .sort-arrow::after {
  content: '⇅';
}

.leads-table th.sort-asc .sort-arrow {
  opacity: 1;
}

.leads-table th.sort-asc .sort-arrow::after {
  content: '↑';
}

.leads-table th.sort-desc .sort-arrow {
  opacity: 1;
}

.leads-table th.sort-desc .sort-arrow::after {
  content: '↓';
}

/* ==================== MODAL ACTION BUTTONS ==================== */

.modal-footer-lg {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
}

.modal-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-action-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-action-label {
  font-size: 12px;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.modal-action-select {
  font-size: 12px;
  padding: 5px 8px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg-secondary, #f8f9fa);
  color: var(--color-text-primary);
  cursor: pointer;
  outline: none;
}

.modal-action-select:focus {
  border-color: var(--color-primary, #3b82f6);
}

.btn-action-sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg-secondary, #f8f9fa);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-action-sm:hover {
  border-color: var(--color-text-tertiary);
  color: var(--color-text-primary);
  background: var(--color-bg-tertiary, #eee);
}

.btn-action-sm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-reanalyze:hover {
  border-color: #3b82f6;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.06);
}

.btn-delete-lead:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.06);
}

.modal-primary-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}