/* =============================================
   StrigLab Funil Page Styles
   ============================================= */

/* === Funil Visual Layout === */
.funil-visual-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--border-radius-xl);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.funil-visual-title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-6);
  color: var(--text-primary);
}

/* 
  Real Funnel Shape:
  We use a flex column, centering the bars, 
  with decreasing max-widths to simulate a funnel.
*/
.funil-visual-chart {
  display: flex;
  flex-direction: column;
  align-items: center; /* Center to make it a funnel shape */
  gap: var(--space-2);
  width: 100%;
}

.funil-visual-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  max-width: 800px;
}

/* Simulate the funnel shape by shrinking the width sequentially */
.funil-visual-row:nth-child(1) { width: 100%; }
.funil-visual-row:nth-child(2) { width: 95%; }
.funil-visual-row:nth-child(3) { width: 90%; }
.funil-visual-row:nth-child(4) { width: 85%; }
.funil-visual-row:nth-child(5) { width: 80%; }
.funil-visual-row:nth-child(6) { width: 75%; }
.funil-visual-row:nth-child(7) { width: 70%; }
.funil-visual-row:nth-child(8) { width: 65%; }
.funil-visual-row:nth-child(9) { width: 60%; }
.funil-visual-row:nth-child(10) { width: 55%; }


.funil-visual-label {
  width: 140px;
  text-align: right;
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.funil-visual-bar-wrapper {
  flex: 1;
  height: 36px;
  background: var(--bg-input);
  border-radius: var(--border-radius-full);
  overflow: hidden;
  position: relative;
}

.funil-visual-bar {
  height: 100%;
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 var(--space-3);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 40px;
}

.bar-count {
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.funil-visual-value {
  width: 120px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  flex-shrink: 0;
}

/* === Pipeline Section === */
.pipeline-section {
  margin-bottom: var(--space-6);
}

.pipeline-title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

.pipeline-cards {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  padding-bottom: var(--space-2);
}

.pipeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--border-radius-lg);
  padding: var(--space-4);
  min-width: 180px;
  border-top: 4px solid transparent;
  box-shadow: var(--shadow-sm);
}

.pipeline-card-label {
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.pipeline-card-value {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: 2px;
}

.pipeline-card-count {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* === Kanban Board === */
.kanban-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kanban-title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

.kanban-board {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  padding-bottom: var(--space-4);
  min-height: 400px;
}

.kanban-column {
  min-width: 280px;
  width: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 200px);
}

.kanban-column-header {
  padding: var(--space-3) var(--space-4);
  border-bottom: 2px solid transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kanban-column-title {
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
}

.kanban-column-count {
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--border-radius-full);
  font-weight: var(--font-weight-semibold);
}

.kanban-cards {
  padding: var(--space-3);
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 100px;
  transition: background var(--transition-fast);
}

.kanban-cards.drag-over {
  background: var(--bg-input);
  border-radius: var(--border-radius-sm);
}

.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--border-radius-md);
  padding: var(--space-3);
  cursor: grab;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-active);
}

.kanban-card.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.kanban-card-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: 2px;
}

.kanban-card-company {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.kanban-card-value {
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  color: #22c55e;
}
