/* Kanban — Columns and cards */

/* Metrics bar */
.metrics {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg);
  overflow-x: auto;
}

.metrics__card {
  flex: 1;
  min-width: 160px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
}

.metrics__label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

.metrics__value {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
}

.metrics__value--accent { color: var(--accent); }
.metrics__value--warning { color: var(--priority-high); }
.metrics__value--danger { color: var(--deal-lost); }

/* Filter bar */
.filters {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 0 var(--space-lg) var(--space-md);
}

.filters__search {
  flex: 1;
  max-width: 320px;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: var(--text-sm);
  outline: none;
  transition: border-color var(--transition-fast);
}

.filters__search::placeholder { color: var(--text-muted); }
.filters__search:focus { border-color: var(--accent); }

.filters__count {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Kanban grid */
.kanban {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  padding: 0 var(--space-lg);
  min-height: calc(100vh - var(--header-height) - 160px);
}

/* Column */
.kanban__column {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.kanban__column-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
}

.kanban__column-title {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.kanban__column-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.kanban__column-dot--active { background: var(--status-active); }
.kanban__column-dot--paused { background: var(--status-paused); }
.kanban__column-dot--completed { background: var(--status-completed); }
.kanban__column-dot--archived { background: var(--status-archived); }

.kanban__column-count {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-left: auto;
}

.kanban__cards {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  overflow-y: auto;
}

/* Card */
.kanban__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.kanban__card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.kanban__card-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.kanban__card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.kanban__card-deal {
  font-size: var(--text-xs);
  color: var(--text-accent);
  font-weight: 500;
}

.kanban__card-contacts {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.kanban__card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.kanban__card-agent {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-xs);
  color: var(--text-muted);
  padding: 2px var(--space-sm);
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
}

.kanban__card-agent-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--text-muted);
}

.kanban__card-due {
  color: var(--priority-high);
}

.kanban__card-due.overdue {
  color: var(--deal-lost);
  font-weight: 600;
}

/* Empty column */
.kanban__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-style: italic;
}
