/* CRM Kanban - Trello-style board */

.kb-board {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 6px 4px 16px;
  scrollbar-width: thin;
}
.kb-board::-webkit-scrollbar { height: 8px; }
.kb-board::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.kb-col {
  flex: 0 0 280px;
  display: flex; flex-direction: column;
  background: rgba(20, 22, 30, 0.55);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 12px 12px 12px;
  min-height: 200px;
}
.kb-col-hdr {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 4px 10px;
  border-bottom: 2px solid var(--stage-color, #7c3aed);
  margin-bottom: 12px;
}
.kb-col-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: #f1f5f9;
}
.kb-col-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--stage-color, #7c3aed);
}
.kb-col-count {
  font-size: 11px; font-weight: 700;
  color: var(--stage-color, #a78bfa);
  background: rgba(255,255,255,0.04);
  padding: 3px 8px;
  border-radius: 999px;
  min-width: 22px; text-align: center;
}
.kb-col-body {
  display: flex; flex-direction: column; gap: 8px;
  flex: 1;
  min-height: 80px;
  padding: 4px 2px;
  border-radius: 8px;
  transition: background 150ms ease;
}
.kb-col-body--over {
  background: rgba(167,139,250,0.08);
  outline: 2px dashed rgba(167,139,250,0.4);
  outline-offset: -4px;
}
.kb-col-empty {
  padding: 18px 10px;
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: 8px;
  color: #64748b;
  font-size: 12px;
  text-align: center;
}

/* Card */
.kb-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01) 80%),
              rgba(20,22,30,0.85);
  border: 1px solid rgba(255,255,255,0.07);
  border-left: 3px solid var(--stage-color, #7c3aed);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: grab;
  position: relative;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.kb-card:hover {
  border-color: rgba(167,139,250,0.4);
  box-shadow: 0 4px 16px -8px rgba(0,0,0,0.5);
}
.kb-card.kb-dragging { opacity: 0.5; cursor: grabbing; }
.kb-card-hdr {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 8px; margin-bottom: 4px;
}
.kb-card-name {
  font-size: 13px; font-weight: 700;
  color: #f1f5f9;
  display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.kb-card-meta {
  font-size: 11px; color: #94a3b8;
  font-family: ui-monospace, Menlo, monospace;
  margin-bottom: 4px;
}
.kb-card-note {
  font-size: 12px; color: #cbd5e1;
  line-height: 1.4;
  margin: 4px 0 6px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.kb-card-foot {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: #94a3b8;
  margin-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 6px;
}
.kb-card-resp { font-weight: 600; color: #a78bfa; }
.kb-card-next { font-variant-numeric: tabular-nums; }

.kb-pill {
  font-size: 9px; font-weight: 700; padding: 2px 7px;
  border-radius: 999px; letter-spacing: 0.04em; text-transform: uppercase;
  flex-shrink: 0;
}
.kb-pill--hot  { background: rgba(244,63,94,0.18); color: #f87171; }
.kb-pill--warn { background: rgba(251,191,36,0.18); color: #fbbf24; }

.kb-card-actions {
  display: none;
  position: absolute; top: 6px; right: 6px;
  gap: 2px;
}
.kb-card:hover .kb-card-actions { display: flex; }
.kb-icon-btn {
  width: 24px; height: 24px; border-radius: 5px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #cbd5e1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.kb-icon-btn svg { width: 12px; height: 12px; }
.kb-icon-btn:hover { background: rgba(167,139,250,0.2); color: #fff; border-color: rgba(167,139,250,0.4); }
.kb-icon-btn--primary:hover { background: rgba(124,58,237,0.4); border-color: rgba(124,58,237,0.6); }
.kb-icon-btn--danger:hover  { background: rgba(244,63,94,0.2); color: #f87171; border-color: rgba(244,63,94,0.5); }

/* Botao Ocupado (amarelo) */
.call-btn-big--busy {
  background: rgba(217, 119, 6, 0.10);
  border-color: rgba(217, 119, 6, 0.35);
  color: #fbbf24;
}
.call-btn-big--busy:hover,
.call-btn-big--busy:focus-visible {
  background: rgba(217, 119, 6, 0.22);
  border-color: #d97706;
  color: #fde68a;
  box-shadow: 0 0 28px rgba(217, 119, 6, 0.28), inset 0 0 24px rgba(217, 119, 6, 0.06);
  transform: translateY(-1px);
  outline: none;
}

/* Batch card - ja contatado (cinza + check) */
.batch-card--contacted {
  opacity: 0.45;
  filter: grayscale(0.6);
  position: relative;
}
.batch-card--contacted.active {
  opacity: 0.7;
  filter: grayscale(0.3);
}
.batch-card-check {
  position: absolute;
  top: 6px; right: 8px;
  width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #16a34a;
  color: #fff;
  border-radius: 50%;
  font-size: 10px; font-weight: 700;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(22, 163, 74, 0.4);
  z-index: 2;
}

/* Socio / Admin badge in sidebar */
.socio-badge {
  display: inline-block;
  flex-shrink: 0;
  font-size: 9px; font-weight: 700;
  padding: 2px 7px; border-radius: 4px;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #fff;
  margin: 0 6px;
  vertical-align: middle;
  white-space: nowrap;
}

/* Make the CRM view fit the wider Kanban board */
#crmList { padding: 0; }
@media (max-width: 1000px) {
  .kb-col { flex: 0 0 240px; }
}
