/* Visão kanban: colunas por etapa, cards compactos, arrastar e soltar. */

/* no kanban a página usa a largura toda da tela */
.modo-kanban .wrap { max-width: none; }

.kanban {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(212px, 1fr);
  gap: 12px; overflow-x: auto; padding-bottom: 24px;
}

.k-coluna {
  display: flex; flex-direction: column; min-width: 0;
  background: color-mix(in srgb, var(--line) 45%, var(--bg));
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, background .15s;
}
.k-coluna.alvo { border-color: var(--accent); background: var(--accent-soft); }
.k-coluna header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 12px 10px; font-size: 13px;
}
.k-coluna header b { font-weight: 600; }
.k-coluna header .c { color: var(--faint); font-size: 12px; font-weight: 500; }
.k-coluna header .soma { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

.k-cards {
  display: flex; flex-direction: column; gap: 8px;
  min-height: 120px; max-height: calc(100vh - 290px); overflow-y: auto;
  padding: 0 8px 10px;
}
.k-vazio { margin: 8px 4px; padding: 18px 8px; text-align: center; color: var(--faint); font-size: 12px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); }
.k-mais { height: 32px; font-size: 12.5px; }

.kcard {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: inset 3px 0 0 transparent;
  cursor: pointer; user-select: none;
}
.kcard:hover { border-color: var(--line-strong); }
.kcard:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.kcard.arrastando { opacity: .45; }
.kcard.e-aberto     { background: var(--e-aberto);     box-shadow: inset 3px 0 0 var(--e-aberto-l); }
.kcard.e-contatado  { background: var(--e-contatado);  box-shadow: inset 3px 0 0 var(--e-contatado-l); }
.kcard.e-negociando { background: var(--e-negociando); box-shadow: inset 3px 0 0 var(--e-negociando-l); }
.kcard.e-aguardando   { background: var(--e-aguardando);    box-shadow: inset 3px 0 0 var(--e-aguardando-l); }
.kcard.e-fechado    { background: var(--e-fechado);    box-shadow: inset 3px 0 0 var(--e-fechado-l); }
.kcard.e-descartado { background: var(--e-descartado); box-shadow: inset 3px 0 0 var(--e-descartado-l); opacity: .7; }

.k-topo { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.k-hora { position: relative; font-family: var(--mono); font-size: 13px; font-weight: 600; }
.k-hora small { margin-left: 6px; font-family: var(--font); font-size: 11px; font-weight: 400; color: var(--faint); }
.k-hora .novo { position: absolute; left: -8px; top: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--new); }
.k-valor { font-family: var(--mono); font-size: 13px; font-weight: 600; }
.k-valor.vazio { font-family: var(--font); font-size: 11px; font-weight: 500; color: var(--faint); }

.k-autor { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; font-weight: 600; line-height: 1.3; }
.k-autor .nome { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.k-reu { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }

.k-rodape { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.k-classe { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--faint); font-size: 11px; }
.k-abriu { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; }
.k-abriu .pilha { display: flex; }
.k-abriu .avatar { width: 20px; height: 20px; font-size: 9px; border: 2px solid var(--surface); }
.k-abriu .avatar + .avatar { margin-left: -6px; }
.k-acoes { display: flex; gap: 4px; flex: none; }
.k-acoes .btn-wpp { height: 28px; padding: 0 7px; }
.k-acoes .ico { width: 28px; height: 28px; }

@media (max-width: 560px) {
  .kanban { grid-auto-columns: 82vw; scroll-snap-type: x mandatory; }
  .k-coluna { scroll-snap-align: start; }
  .k-cards { max-height: none; }
}
