/* Kanban de leads (aba #kanban) — visual baseado no modelo kanban-board (shadcn) */
.kb-board { align-items: flex-start; scroll-snap-type: x proximity; }
.kb-col {
  flex: 0 0 20rem; width: 20rem; scroll-snap-align: start;
  background: rgba(255,255,255,0.6); border: 1px solid #e2e8f0; border-radius: 1.5rem;
  padding: 1.25rem; display: flex; flex-direction: column;
  height: calc(100vh - 230px); min-height: 420px;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.kb-col.kb-alvo { background: #eff6ff; border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.kb-lista { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; padding: 2px; margin: -2px; }
.kb-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: .75rem; padding: 1.1rem;
  display: flex; flex-direction: column; gap: .85rem; cursor: move;
  transition: box-shadow .2s, transform .2s, opacity .2s;
}
.kb-card:hover { box-shadow: 0 4px 14px -6px rgba(15,23,42,.18); }
.kb-card.kb-arrastando { opacity: .45; transform: scale(.98); }
.kb-badge {
  display: inline-flex; align-items: center; border-radius: 9999px; padding: .1rem .6rem;
  font-size: .72rem; font-weight: 600; background: rgba(241,245,249,.9); color: #1e293b;
  border: 1px solid rgba(226,232,240,.8);
}
.kb-avatar {
  width: 2rem; height: 2rem; border-radius: 9999px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #e2e8f0; color: #1e293b; font-size: .7rem; font-weight: 600;
  box-shadow: 0 0 0 2px rgba(255,255,255,.8);
}
.kb-resp { font-size: .72rem; font-weight: 500; color: #475569; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 9999px; padding: .1rem .55rem; max-width: 6.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Rodapé apertado: "Vídeo" vira só o ícone quando o card tem responsável */
.kb-card:has(.kb-resp) .kb-txt-video { display: none; }
.kb-foto { width: 2.5rem; height: 2.5rem; border-radius: 9999px; object-fit: cover; flex-shrink: 0; border: 1px solid #e2e8f0; }
.kb-foto-ini { display: inline-flex; align-items: center; justify-content: center; background: #f1f5f9; color: #475569; font-size: .72rem; font-weight: 600; }
.kb-foto-ini.hidden { display: none; }
.kb-vazio { border: 1.5px dashed #cbd5e1; border-radius: .75rem; padding: 1.5rem .75rem; text-align: center; font-size: .8rem; color: #94a3b8; }
.kb-skel { height: 7.5rem; border-radius: .75rem; background: linear-gradient(90deg,#f1f5f9 25%,#e2e8f0 50%,#f1f5f9 75%); background-size: 200% 100%; animation: kbSkel 1.2s infinite; }
@keyframes kbSkel { to { background-position: -200% 0; } }
.kb-mais { width: 100%; padding: .5rem; font-size: .8rem; font-weight: 500; color: #475569; border-radius: .6rem; background: rgba(255,255,255,.7); border: 1px solid #e2e8f0; cursor: pointer; }
.kb-mais:hover { background: #fff; color: #0f172a; }
.kb-mais:disabled { opacity: .6; cursor: default; }
.kb-col-recolhida { flex: 0 0 3.75rem; width: 3.75rem; padding: 1rem .5rem; align-items: center; gap: .75rem; cursor: pointer; }
.kb-col-recolhida:hover { background: #fff; }
.kb-vertical { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 600; color: #475569; font-size: .85rem; }
/* ---------- Cabeçalho e filtros ---------- */
.kb-controles { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.kb-linha-busca { display: flex; gap: .5rem; align-items: center; }
.kb-busca { width: 14rem; }
.kb-filtros { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.kb-btn-filtros { display: none; }
.kb-filtros-qtd { min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; border-radius: 9999px; background: #2563eb; color: #fff; font-size: .68rem; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.kb-so-mobile { display: none; }
.kb-abas { display: none; }

/* Botão "Mover" (toque) — no computador o card é arrastado */
.kb-btn-mover { display: none; align-items: center; gap: .15rem; font-size: .78rem; font-weight: 500; color: #0f172a; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: .5rem; padding: .3rem .55rem; cursor: pointer; }
@media (hover: none) { .kb-btn-mover { display: inline-flex; } .kb-card { cursor: default; } }

/* Folha de baixo para cima com os status */
.kb-sheet { position: fixed; inset: 0; z-index: 70; }
.kb-sheet-fundo { position: absolute; inset: 0; background: rgba(15,23,42,.45); animation: kbFade .15s ease-out; }
.kb-sheet-painel { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 1.25rem 1.25rem 0 0; padding: .6rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px)); animation: kbSobe .2s ease-out; max-width: 32rem; margin: 0 auto; }
.kb-sheet-alca { width: 2.25rem; height: .25rem; border-radius: 9999px; background: #cbd5e1; margin: 0 auto .75rem; }
.kb-sheet-titulo { font-size: .8rem; color: #64748b; margin-bottom: .25rem; }
.kb-sheet-opcao { display: flex; align-items: center; gap: .75rem; width: 100%; padding: .85rem .25rem; font-size: 1rem; color: #0f172a; background: none; border: 0; border-bottom: 1px solid #f1f5f9; text-align: left; cursor: pointer; }
.kb-sheet-opcao:last-child { border-bottom: 0; }
.kb-sheet-opcao:active { background: #f8fafc; }
.kb-sheet-opcao .kb-atual { margin-left: auto; font-size: .75rem; color: #94a3b8; }
@keyframes kbSobe { from { transform: translateY(100%); } to { transform: none; } }
@keyframes kbFade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Celular: filtros recolhidos, abas de status, uma coluna por vez ---------- */
@media (max-width: 767px) {
  .kb-dica, .kb-so-desktop { display: none; }
  .kb-so-mobile { display: inline; }
  .kb-controles { display: block; width: 100%; }
  .kb-linha-busca { width: 100%; }
  .kb-busca { flex: 1; width: auto; }
  .kb-busca input { padding-top: .55rem; padding-bottom: .55rem; }
  .kb-btn-filtros { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 500; color: #0f172a; background: #fff; border: 1px solid #e2e8f0; border-radius: .5rem; padding: .55rem .7rem; cursor: pointer; white-space: nowrap; }
  .kb-btn-filtros[aria-expanded="true"] { background: #f1f5f9; }
  .kb-filtros { display: none; margin-top: .6rem; padding: .75rem; background: #fff; border: 1px solid #e2e8f0; border-radius: .75rem; gap: .6rem; }
  .kb-filtros.aberto { display: grid; grid-template-columns: 1fr; }
  .kb-filtros select, .kb-seg-grupo { width: 100%; }
  .kb-seg-grupo { display: flex; }
  .kb-seg-grupo .kb-seg { flex: 1; padding-top: .45rem; padding-bottom: .45rem; font-size: .8rem; }
  .kb-atualizar { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font-size: .85rem; }

  .kb-abas { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; margin: 0 -1rem; padding: 0 1rem .1rem; }
  .kb-abas::-webkit-scrollbar { display: none; }
  .kb-aba { flex-shrink: 0; display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 500; color: #475569; background: #fff; border: 1px solid #e2e8f0; border-radius: 9999px; padding: .4rem .8rem; cursor: pointer; white-space: nowrap; }
  .kb-aba .kb-aba-n { font-size: .75rem; color: #94a3b8; font-variant-numeric: tabular-nums; }
  .kb-aba[aria-selected="true"] { background: #0f172a; color: #fff; border-color: #0f172a; }
  .kb-aba[aria-selected="true"] .kb-aba-n { color: #cbd5e1; }
  .kb-aba .kb-aba-cor { width: .5rem; height: .5rem; border-radius: 9999px; }

  .kb-board { display: block !important; overflow: visible !important; margin: 0 !important; padding: 0 !important; }
  .kb-col { width: 100% !important; }
  .kb-col { display: none; width: auto; height: auto; min-height: 0; background: none; border: 0; padding: 0; }
  .kb-board[data-col-mobile="novo"] .kb-col[data-col="novo"],
  .kb-board[data-col-mobile="contatado"] .kb-col[data-col="contatado"],
  .kb-board[data-col-mobile="respondeu"] .kb-col[data-col="respondeu"],
  .kb-board[data-col-mobile="negociando"] .kb-col[data-col="negociando"],
  .kb-board[data-col-mobile="fechado"] .kb-col[data-col="fechado"],
  .kb-board[data-col-mobile="descartado"] .kb-col[data-col="descartado"] { display: flex; }
  .kb-col > div:first-child { display: none; }
  .kb-lista { overflow: visible; gap: .75rem; }
  .kb-card { padding: 1rem; gap: .7rem; }
  .kb-card > div:first-child > svg { display: none; } /* alça de arrastar não serve no toque */
  .kb-btn-mover { display: inline-flex; }
}
