/* ==========================================================================
   LOCK CAR CRM - LEADS & KANBAN STYLES
   Design System Oficial com Suporte a Mobile Touch & Chat Quick Action
   ========================================================================== */

.kanban-board-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: start;
  min-height: 480px;
  width: 100%;
}

@media (max-width: 1024px) {
  .kanban-board-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 14px;
    padding-bottom: 14px;
    -webkit-overflow-scrolling: touch;
  }

  .kanban-column {
    min-width: 270px;
    width: 270px;
    flex-shrink: 0;
    scroll-snap-align: start;
  }
}

.kanban-column {
  background: var(--color-bg-base);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 270px);
  overflow: hidden;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  background: #FFFFFF;
}

.col-title {
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-text-main);
}

.col-counter {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-text-light);
  background: var(--color-bg-hover);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.kanban-cards-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
  min-height: 120px;
  transition: background var(--transition-fast);
}

.kanban-cards-list::-webkit-scrollbar {
  width: 4px;
}

.kanban-cards-list::-webkit-scrollbar-thumb {
  background: var(--color-gray-light);
  border-radius: var(--radius-full);
}

/* Lead Card */
.lead-card {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  box-shadow: 0 1px 3px rgba(15, 17, 23, 0.03);
  position: relative;
}

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

.lead-card.dragging {
  opacity: 0.5;
  border: 2px dashed var(--color-primary);
}

.lead-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lead-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 11.5px;
  flex-shrink: 0;
}

.lead-title-area {
  flex: 1;
  min-width: 0;
}

.lead-name {
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.lead-chat-quick-btn {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid rgba(22, 163, 74, 0.2);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.lead-chat-quick-btn:hover {
  background: #16A34A;
  color: #FFFFFF;
  transform: scale(1.1);
}

.lead-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11.5px;
  color: var(--color-text-muted);
}

.lead-origin strong,
.lead-interest strong {
  color: var(--color-text-main);
  font-weight: 600;
}

.lead-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--color-border-subtle);
}

.btn-add-card-in-col {
  padding: 10px;
  background: transparent;
  border: none;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
}

.btn-add-card-in-col:hover {
  background: var(--color-bg-hover);
  color: var(--color-primary);
}

.lead-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 600;
}

.tag-novos {
  background: #EDE9FE;
  color: var(--color-primary);
}

.tag-contato {
  background: #E0E7FF;
  color: #4F46E5;
}

.tag-proposta {
  background: #FEF3C7;
  color: #D97706;
}

.tag-fechado {
  background: #D1FAE5;
  color: #059669;
}
