/* SDR: configuração, ficha do lead e chip do card */

/* Configurações → Inteligência artificial → SDR */
.sdr-cfg { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.sdr-cfg .block-head h2 { display: inline-flex; align-items: center; flex-wrap: wrap; gap: var(--s2); }
.sdr-nome { min-width: 0; }
.sdr-bloco { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; padding-top: var(--s4); border-top: 1px solid var(--line-soft); }
.sdr-bloco h3 { margin: 0; font-size: var(--fs-lg); line-height: 22px; font-weight: 600; }
.sdr-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s2); min-width: 0; }
.sdr-checks .check { min-width: 0; overflow-wrap: anywhere; }
.sdr-dias { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s2); }
.sdr-dia { display: inline-flex; align-items: center; gap: 2px; min-height: 32px; padding: 0 4px 0 10px; border-radius: var(--r-sm) 0 var(--r-sm) 0; background: var(--surface-high); font-weight: 600; font-size: var(--fs-md); }
.sdr-dia button { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 0; background: none; color: var(--ink-muted); cursor: pointer; border-radius: 6px; }
.sdr-dia button:hover { color: var(--ink); }
.sdr-dia button svg { width: 16px; height: 16px; }
.sdr-add { display: flex; gap: var(--s2); flex-wrap: wrap; min-width: 0; }
.sdr-add input { flex: 0 1 120px; min-width: 0; }
.sdr-num input { max-width: 160px; }
.sdr-2 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.sdr-opts { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.sdr-opt { align-items: flex-start; min-height: 0; padding: var(--s3); min-width: 0; }
.sdr-opt input { margin-top: 2px; flex: none; }
.sdr-opt > span { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.sdr-opt small { font-weight: 400; color: var(--ink-muted); font-size: var(--fs-md); line-height: 20px; }
.sdr-regra { margin: 0; font-size: var(--fs-base); line-height: 22px; overflow-wrap: anywhere; }
.sdr-regra .linkbtn { display: inline; }
.sdr-rot { padding: var(--s3) var(--s4); border: 1px solid var(--line-soft); border-radius: var(--r-sm) 0 var(--r-sm) 0; background: var(--surface-raised); font-size: var(--fs-base); line-height: 22px; min-width: 0; overflow-wrap: anywhere; }
.sdr-rot ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: var(--s2); }
.sdr-rot p { margin: var(--s3) 0 0; color: var(--ink-muted); font-size: var(--fs-md); line-height: 20px; }
.sdr-rot-ta { min-height: 320px; width: 100%; font-size: var(--fs-base); line-height: 22px; }
.sdr-rot-bts { display: flex; flex-wrap: wrap; gap: var(--s2); min-width: 0; }
.sdr-rot-bts .btn { max-width: 100%; white-space: normal; }
.sdr-arq { display: flex; align-items: center; gap: var(--s3); min-width: 0; padding: var(--s2) var(--s3); border: 1px solid var(--line-soft); border-radius: var(--r-sm) 0 var(--r-sm) 0; }
.sdr-arq > svg, .sdr-arq > i { width: 20px; height: 20px; flex: none; }
.sdr-arq-tx { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.sdr-arq-tx b { font-size: var(--fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdr-arq-tx span { font-size: var(--fs-sm); color: var(--ink-muted); overflow-wrap: anywhere; }
.sdr-salvar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2) var(--s3); padding-top: var(--s4); border-top: 1px solid var(--line-soft); }
.sdr-salvar[hidden] { display: none; }
.sdr-salvar span { flex: 1 1 160px; color: var(--ink-muted); font-size: var(--fs-md); }

/* Ficha do lead, aba Atendimento */
.sdr-quem { display: flex; align-items: center; gap: var(--s3); min-width: 0; min-height: 52px; }
.sdr-quem .fx-tx { min-width: 0; }
.sdr-resumo { margin: 0 0 var(--s2); color: var(--ink-muted); font-size: var(--fs-md); line-height: 20px; overflow-wrap: anywhere; }
.sdr-bts { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s3); }
.sdr-bts .btn { max-width: 100%; white-space: normal; }
.sdr-q-head { margin-top: var(--s2); }
.sdr-q { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s2) var(--s4); }
.sdr-q li { display: flex; align-items: flex-start; gap: var(--s2); min-width: 0; }
.sdr-q-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 1.5px dashed var(--line); color: var(--surface); }
.sdr-q li.ok .sdr-q-ic { border: 0; background: var(--ink); }
.sdr-q-ic svg { width: 12px; height: 12px; }
.sdr-q-tx { display: flex; flex-direction: column; min-width: 0; }
.sdr-q-tx b { font-size: var(--fs-md); line-height: 20px; font-weight: 600; }
.sdr-q-tx span { font-size: var(--fs-md); line-height: 20px; color: var(--ink-muted); overflow-wrap: anywhere; }
.sdr-q li:not(.ok) .sdr-q-tx span { font-style: italic; }

/* Chip no card do funil */
.lc .lc-sdr { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; max-width: 100%; padding: 1px 8px; border-radius: var(--r-xs) 0 var(--r-xs) 0; background: var(--surface-high); color: var(--ink); font-size: var(--fs-xs); line-height: 16px; font-weight: 600; overflow: hidden; }
.lc .lc-sdr > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lc .lc-sdr svg, .lc .lc-sdr i { width: 13px; height: 13px; flex: none; }
.lc .lc-sdr.off { color: var(--ink-muted); }

/* Equipe → Regras: distribuição de leads (fila, peso e ordem) */
.dist-card { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.dist-grupo { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; padding-top: var(--s3); border-top: 1px solid var(--line-soft); }
.dist-grupo h3 { margin: 0; font-size: var(--fs-lg); line-height: 22px; font-weight: 600; }
.dist-fila { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.dist-item { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2) var(--s3); min-width: 0; padding: var(--s2) var(--s3); border: 1px solid var(--line-soft); border-radius: var(--r-sm) 0 var(--r-sm) 0; background: var(--surface); }
.dist-item.arrastando { opacity: .5; }
.dist-item.alvo { border-color: var(--ink); }
.dist-alca { display: inline-flex; color: var(--ink-muted); cursor: grab; flex: none; }
.dist-alca svg, .dist-alca i { width: 18px; height: 18px; }
.dist-pos { flex: none; min-width: 26px; font-weight: 600; font-size: var(--fs-md); color: var(--ink-muted); }
.dist-item .av { flex: none; }
.dist-tx { display: flex; flex-direction: column; flex: 1 1 140px; min-width: 0; }
.dist-tx b { font-size: var(--fs-base); line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dist-tx span { font-size: var(--fs-md); line-height: 20px; color: var(--ink-muted); overflow-wrap: anywhere; }
.dist-ctl { display: flex; align-items: center; gap: var(--s3); flex: none; margin-left: auto; }
.dist-peso, .dist-mover { display: inline-flex; align-items: center; gap: 4px; }
.dist-peso b { min-width: 28px; text-align: center; font-size: var(--fs-base); }
.dist-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--surface-raised); color: var(--ink); font: inherit; font-size: var(--fs-xl); font-weight: 600; cursor: pointer; }
.dist-btn:hover:not([disabled]) { border-color: var(--line); }
.dist-btn[disabled] { opacity: .4; cursor: default; }
.dist-btn svg, .dist-btn i { width: 18px; height: 18px; }

@media (max-width: 860px) {
  .dist-alca { display: none; }
  .dist-ctl { width: 100%; justify-content: space-between; margin-left: 0; }
  .sdr-q { grid-template-columns: 1fr; }
  .sdr-bts .btn { flex: 1 1 auto; }
  .sdr-salvar .btn { flex: 1 1 auto; }
}
