/* #1128 · Pipeline — tokens do cockpit (nunca cor literal); 3 larguras; fundo sem vazar. */
.pl { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; max-width: 100%; background: var(--bg, transparent); }
.pl > * { min-width: 0; max-width: 100%; }
.pl-cab { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.pl-cab h2 { margin: 0; }
.pl-cab p { margin: 2px 0 0; }
.pl-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.pl-sus { color: var(--muted); font-size: 12px; }
.pl-num { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 4px; }
.pl-bt { background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); border-radius: var(--ds-r-sm, 6px);
         padding: 6px 12px; min-height: 36px; cursor: pointer; font: inherit; }
.pl-bt:hover:not(:disabled) { border-color: var(--ink-accent); }
.pl-bt:disabled { opacity: .5; cursor: default; }
.pl-bt:focus-visible, .pl-card:focus-visible, .pl-chip:focus-visible { outline: 2px solid var(--ink-accent); outline-offset: 2px; }
.pl-primario { background: var(--ds-accent, var(--ink-accent)); color: var(--ds-accent-ink, var(--bg)); border-color: transparent; }
.pl-funis { display: flex; gap: 8px; flex-wrap: wrap; }
.pl-chip { background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: var(--ds-r-pill, 999px);
           padding: 6px 14px; min-height: 36px; cursor: pointer; font: inherit; }
.pl-chip.ativo { border-color: var(--ink-accent); color: var(--ink-accent); }
.pl-aviso { margin: 0; font-size: 13px; color: var(--ink-info); }
.pl-erro { color: var(--ink-err); font-size: 13px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.pl-vazio { border: 1px dashed var(--line); border-radius: var(--ds-r, 10px); padding: 24px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.pl-vazio p { margin: 0; color: var(--muted); }

.pl-corpo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.pl-corpo.com-lado { grid-template-columns: minmax(0, 1fr) 340px; }
.pl-quadro { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; overscroll-behavior-x: contain; }
.pl-col { flex: 0 0 248px; width: 248px; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--ds-r, 10px);
          display: flex; flex-direction: column; max-height: calc(100vh - 220px); transition: border-color var(--ds-dur-fast, .12s); }
.pl-col.alvo { border-color: var(--ink-accent); }
.pl-col-cab { padding: 10px 12px; overflow-wrap: anywhere; border-top: 3px solid var(--line); border-radius: var(--ds-r, 10px) var(--ds-r, 10px) 0 0;
              border-bottom: 1px solid var(--line-soft, var(--line)); display: flex; flex-direction: column; gap: 2px; }
.pl-evento { font-size: 12px; color: var(--ink-info); }
.pl-cards { padding: 8px; min-width: 0; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.pl-col-vazia { padding: 8px 4px; margin: 0; }

.pl-card { background: var(--panel-2); border: 1px solid var(--line); border-top: 3px solid var(--line); border-radius: var(--ds-r-sm, 6px);
           padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; }
.pl-card:hover { border-color: var(--ink-accent); }
.pl-card.t-quente { border-top-color: var(--ds-warn, var(--ink-warn)); }
.pl-card.t-morno  { border-top-color: var(--ds-ok, var(--ink-ok)); }
.pl-card.t-frio   { border-top-color: var(--ds-info, var(--ink-info)); border-color: var(--ink-warn); }
.pl-card.t-sem, .pl-card.t-fechado { border-top-color: var(--ds-none, var(--line)); }
.pl-card-tit { font-weight: 600; overflow-wrap: anywhere; }
.pl-trunca { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-parado { color: var(--ink-warn); }
.pl-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.pl-tag { font-size: 11px; border: 1px solid var(--line); border-radius: var(--ds-r-pill, 999px); padding: 0 6px; color: var(--muted); }
.pl-card-pe { display: flex; justify-content: space-between; align-items: center; margin-top: 2px; }
.pl-valor { font-variant-numeric: tabular-nums; }
.pl-dono { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700;
           background: var(--ink-accent); color: var(--bg); }

.pl-lado { background: var(--panel); border: 1px solid var(--line); border-radius: var(--ds-r, 10px); padding: 12px;
           display: flex; flex-direction: column; gap: 10px; position: sticky; top: 12px; max-height: calc(100vh - 40px); overflow-y: auto; }
.pl-lado-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pl-lado h3 { margin: 4px 0 0; font-weight: 600; }
.pl-ficha { display: grid; grid-template-columns: 96px 1fr; gap: 4px 8px; margin: 0; font-size: 13px; }
.pl-ficha dt { color: var(--muted); }
.pl-ficha dd { margin: 0; overflow-wrap: anywhere; }
.pl-mover, .pl-nova { display: flex; flex-direction: column; gap: 6px; }
.pl-mover label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.pl-lado select, .pl-lado input { background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); border-radius: var(--ds-r-sm, 6px);
                                  padding: 6px 8px; min-height: 36px; font: inherit; min-width: 0; }
.pl-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.pl-hist li { display: flex; flex-direction: column; gap: 2px; border-left: 2px solid var(--line); padding-left: 8px; }
.pl-etapas-ed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pl-etapas-ed li { display: grid; grid-template-columns: auto 1fr; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft, var(--line)); }
.pl-etapas-ed li > :nth-child(n+3) { grid-column: 2; }
.pl-ord { display: flex; flex-direction: column; gap: 2px; grid-row: span 4; }
.pl-ord .pl-bt { min-height: 28px; padding: 0 8px; }

.pl-esqueleto { min-height: 240px; padding: 12px; gap: 10px; }
.pl-esqueleto div { height: 56px; border-radius: var(--ds-r-sm, 6px); background: var(--panel-2); animation: pl-shimmer 1.4s ease-in-out infinite; }
@keyframes pl-shimmer { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .pl-esqueleto div { animation: none; } .pl-col { transition: none; } }

/* tablet: o painel lateral desce para baixo do quadro */
@media (max-width: 1100px) { .pl-corpo.com-lado { grid-template-columns: minmax(0, 1fr); } .pl-lado { position: static; max-height: none; } }
/* celular: uma etapa por vez (rolagem com encaixe), mover pelo painel, alvo ≥ 44 px */
@media (max-width: 720px) {
  .pl { padding: 12px; }
  .pl-quadro { scroll-snap-type: x mandatory; }
  .pl-col { flex-basis: 86vw; width: 86vw; scroll-snap-align: start; max-height: none; }
  .pl-bt, .pl-chip, .pl-lado select, .pl-lado input { min-height: 44px; }
}
