/* Aba Pipeline (Kanban): colunas por temperatura, cartões e banner do motivo. */

/* ── Pipeline (Kanban): aba da página de Leads ───────────────────────────────── */
/* Colunas por temperatura; a cor do cartão (--c) é a temperatura do lead. */
.main.pl-mode #stageStrip {
  display: none !important;
}

.pl-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 2px 0 10px;
}

.pl-summary {
  font-size: 13px;
  color: var(--muted);
}

.pl-summary strong {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pl-summary .sep {
  display: inline-block;
  width: 1px;
  height: 14px;
  margin: 0 12px -2px;
  background: var(--line-strong, var(--border));
}

.pl-summary .none,
.pl-head .none {
  color: #a09c93;
}

.pl-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.pl-sum-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-ico);
  height: 30px;
  padding: 0 9px 0 11px;
  color: var(--ink-2);
}

.pl-sum-btn span {
  font-weight: 500;
  color: var(--muted);
}

.pl-sum-btn i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.pl-sum-btn em {
  font-style: normal;
  font-weight: 500;
  color: #a09c93;
}

.pl-sum-btn svg {
  width: var(--ico);
  height: var(--ico);
  margin-left: 2px;
  color: var(--muted);
}

.pl-sum-btn:hover {
  border-color: var(--primary);
}

.pl-sum-menu {
  min-width: 264px;
}

.pl-sum-menu .box {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-right: 9px;
  border: 1.5px solid #b9b4a9;
  border-radius: 4px;
  background: #fff;
  color: #fff;
}

.pl-sum-menu .box svg {
  width: 11px;
  height: 11px;
}

.pl-sum-menu [aria-checked="true"] .box {
  border-color: var(--primary);
  background: var(--primary);
}

.pl-sum-menu [data-sum-reset] {
  font-weight: 500;
  color: var(--muted);
}

.pl-head .l2.out,
.pl-head .l2.out strong {
  color: #a09c93;
  font-weight: 500;
}

.pl-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 100%;
}

.pl-toggle {
  appearance: none;
  white-space: nowrap;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-strong, var(--border));
  border-radius: 999px;
  background: #fff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.pl-toggle b {
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #efece6;
  font-size: 11.5px;
}

.pl-toggle.on {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

/* Quadro: seis colunas; em tela estreita rola de lado */
.pl-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(212px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  align-items: start;
}

.pl-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid #e4dfd5;
  border-top: 3px solid var(--c);
  border-radius: 12px;
  background: #f4f1eb;
  transition:
    background 0.12s,
    box-shadow 0.12s;
}

.pl-head {
  padding: 9px 12px 8px;
  border-bottom: 1px solid #e4dfd5;
}

.pl-head .l1 {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pl-head .l1 i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
  flex: none;
}

.pl-head h3 {
  margin: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-head .l1 b {
  margin-left: auto;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e4dfd5;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.pl-head .l2 {
  margin-top: 3px;
  padding-left: 16px;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-head .l2 strong {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pl-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  min-height: 240px;
  max-height: calc(100vh - 318px);
  overflow-y: auto;
}

.pl-empty {
  padding: 22px 8px;
  text-align: center;
  font-size: 12px;
  color: #a09c93;
}

.pl-drop {
  display: none;
  order: -1;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 6px 8px;
  border: 2px dashed color-mix(in srgb, var(--c) 55%, #fff);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--c);
  text-align: center;
  background: color-mix(in srgb, var(--c) 5%, #fff);
}

.pl-board.dragging .pl-col:not(.source) .pl-drop {
  display: flex;
}

.pl-board.dragging .pl-col:not(.source) .pl-empty {
  display: none;
}

.pl-board.dragging .pl-col.source {
  opacity: 0.6;
}

.pl-col.over {
  background: color-mix(in srgb, var(--c) 10%, #f4f1eb);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 45%, #fff);
}

.pl-col.over .pl-drop {
  background: color-mix(in srgb, var(--c) 14%, #fff);
  border-style: solid;
}

/* Cartão: a cor é a temperatura do lead */
.pl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 9px 9px 8px 11px;
  border: 1px solid color-mix(in srgb, var(--c) 26%, #fff);
  border-left: 4px solid var(--c);
  border-radius: 10px;
  background: color-mix(in srgb, var(--c) 7%, #fff);
  box-shadow: 0 1px 2px rgba(40, 30, 10, 0.05);
  cursor: grab;
  outline: none;
}

.pl-card:hover,
.pl-card:focus-visible {
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--c) 30%, #fff),
    0 2px 6px rgba(40, 30, 10, 0.08);
}

.pl-card.locked {
  cursor: pointer;
}

.pl-card.dragging {
  opacity: 0.35;
}

.pl-card.refused {
  background: #f6f4ef;
  border-color: #e4dfd5;
  border-left-color: #b9b4a9;
}

.pl-card.pending {
  cursor: default;
  border-style: dashed;
  border-left-style: solid;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 20%, #fff);
}

.pl-card.flash {
  animation: pl-flash 1.6s ease-out;
}

@keyframes pl-flash {
  0% {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 55%, #fff);
  }

  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.pl-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 22px;
}

.pl-top .c-tag.dev em {
  margin-right: 4px;
  font-style: normal;
  font-weight: 700;
}

.pl-top .c-tag {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pl-top .pl-sp {
  flex: 1;
}

.pl-tag {
  padding: 1px 6px;
  border-radius: 5px;
  background: #efe3e3;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--error);
}

.pl-val {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: var(--gap-ico-sm);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pl-val.sold {
  color: #2f6a14;
}

.pl-val svg {
  width: var(--ico-sm);
  height: var(--ico-sm);
}

.pl-more {
  appearance: none;
  flex: none;
  width: 20px;
  height: 20px;
  margin-right: -4px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: #8f8b82;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pl-more svg {
  width: var(--ico);
  height: var(--ico);
}

.pl-more:hover {
  background: rgba(0, 0, 0, 0.07);
  color: var(--ink);
}

.pl-line {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.pl-line .pl-mat {
  flex: 1;
  min-width: 0;
}

.pl-mat {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-id {
  margin-top: -3px;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-task {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
  margin-top: 2px;
  padding: 4px 7px;
  border: 1px solid rgba(60, 50, 30, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  font-family: inherit;
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--ink-2);
  text-align: left;
  cursor: pointer;
}

.pl-task:hover {
  background: #fff;
  border-color: rgba(60, 50, 30, 0.22);
}

.pl-task .ic {
  flex: none;
  display: inline-flex;
  color: var(--primary);
}

.pl-task .ic svg {
  width: var(--ico-sm);
  height: var(--ico-sm);
}

.pl-task .ty {
  flex: 0 1 auto;
  min-width: 34px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-task .tx {
  flex: 1 100 0;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-task .when {
  flex: none;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pl-task .when i {
  margin: 0 3px;
  font-style: normal;
  opacity: 0.5;
}

.pl-task .n {
  flex: none;
  padding: 0 5px;
  border-radius: 999px;
  background: #ebe7df;
  font-size: 10.5px;
  font-weight: 700;
}

.pl-task.late .when,
.pl-task.late .ic {
  color: var(--error);
}

.pl-task.today .when,
.pl-task.today .ic {
  color: var(--warning);
}

.pl-task.done {
  color: var(--muted);
}

.pl-task.done .ic {
  color: #437a22;
}

.pl-task.done .ty {
  color: var(--muted);
}

.pl-task.done .when {
  font-weight: 500;
}

.pl-task.empty {
  border-style: dashed;
  background: none;
  justify-content: flex-start;
  color: var(--muted);
}

span.pl-task {
  cursor: inherit;
}

span.pl-fc {
  cursor: inherit;
}

.pl-wait {
  margin-top: 2px;
  padding: 5px 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 11.5px;
  font-style: italic;
  color: var(--muted);
}

.pl-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 8px;
  min-width: 0;
  margin-top: 1px;
}

.pl-fc {
  appearance: none;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: var(--gap-ico-sm);
  padding: 2px 4px;
  margin-left: -4px;
  border: 0;
  border-radius: 6px;
  background: none;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-2);
  white-space: nowrap;
  cursor: pointer;
}

.pl-fc svg {
  width: var(--ico-sm);
  height: var(--ico-sm);
}

button.pl-fc:hover {
  background: rgba(0, 0, 0, 0.06);
}

.pl-fc.overdue {
  color: var(--error);
}

.pl-fc.none {
  font-weight: 500;
  color: #9a968d;
}

.pl-fc.sold {
  color: #2f6a14;
  cursor: inherit;
}

.pl-agent {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  margin-left: auto;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-agent i {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e7e2d8;
  font-size: 8.5px;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.02em;
  color: #5c584f;
}

.pl-foot-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.pl-foot-note svg {
  width: var(--ico-sm);
  height: var(--ico-sm);
  margin: 0 1px -2px;
}

.pl-foot-note .c-btn--link {
  font-size: 12px;
}

/* Banner do motivo: aparece ao soltar o cartão e fica preso no pé da tela até confirmar ou cancelar */
.pl-banner {
  position: sticky;
  bottom: 14px;
  z-index: 40;
  width: min(880px, 100%);
  margin: 12px auto 0;
  padding: 14px 16px 14px;
  border: 1px solid var(--line-strong, var(--border));
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 44px rgba(40, 30, 10, 0.24);
}

.pl-b-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.pl-b-head .ic {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary);
}

.pl-b-head .ic svg {
  width: var(--ico-only);
  height: var(--ico-only);
}

.pl-b-head>div {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pl-b-head strong {
  font-size: 14.5px;
}

.pl-b-head .path {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.pl-b-head .path i {
  font-style: normal;
  color: var(--muted);
}

.pl-b-head .c-close {
  position: static;
  flex: none;
}

.pl-b-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 11px;
}

.pl-b-row>label {
  flex: none;
  width: 150px;
  padding-top: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.pl-b-row .c-chips {
  flex: 1;
  gap: 6px;
}

.pl-b-row.last {
  align-items: center;
  padding-left: 162px;
}

.pl-b-row.last .c-input,
.pl-b-row.last .c-select {
  flex: 1;
  min-width: 0;
  height: var(--ctl-h-lg);
}

.pl-b-row.last .c-btn {
  flex: none;
  height: var(--ctl-h-lg);
}

.pl-banner .form-error {
  margin: 10px 0 0 162px;
}

.pl-menu {
  min-width: 216px;
}

.pl-menu-title {
  padding: 5px 10px 3px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.pl-menu button {
  justify-content: flex-start;
  gap: 0;
}

.pl-menu button i {
  flex: none;
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 50%;
}

.pl-menu hr {
  margin: 5px 0;
  border: 0;
  border-top: 1px solid #ece8df;
}

.pl-menu-note {
  display: flex;
  gap: var(--gap-ico-lg);
  max-width: 240px;
  padding: 7px 10px 4px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}

.pl-menu-note svg {
  flex: none;
  width: var(--ico);
  height: var(--ico);
  margin-top: 1px;
}

@media (max-width: 760px) {
  .pl-board {
    grid-template-columns: repeat(6, minmax(232px, 78vw));
    scroll-snap-type: x proximity;
  }

  .pl-col {
    scroll-snap-align: start;
  }

  .pl-list {
    max-height: none;
  }

  .pl-b-row {
    flex-direction: column;
    gap: 5px;
  }

  .pl-b-row>label {
    width: auto;
    padding-top: 0;
  }

  .pl-b-row.last {
    flex-direction: row;
    flex-wrap: wrap;
    padding-left: 0;
  }

  .pl-b-row.last .c-input,
  .pl-b-row.last .c-select,
  .pl-b-row.last .c-textarea {
    flex: 1 1 100%;
  }

  .pl-banner .form-error {
    margin-left: 0;
  }
}

.pl-board .pl-loading {
  grid-column: 1 / -1;
  min-height: 240px;
}
