/* ============================================================
   Clientes — modelo Lista (4 seções verticais)
   ============================================================ */
.clients-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.list-section {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.list-section.drop-target {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(255,214,0,.18);
}

.list-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 2px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent);
}
.list-section-head h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-count {
  background: var(--bg);
  color: var(--text-dim);
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}
.list-section[data-type="trafego_video"] .list-section-head { border-bottom-color: var(--gold); }
.list-section[data-type="trafego_video"] .list-section-head h3 { color: var(--gold); }
.list-section[data-type="trafego"] .list-section-head { border-bottom-color: #3b82f6; }
.list-section[data-type="trafego"] .list-section-head h3 { color: #3b82f6; }
.list-section[data-type="video"] .list-section-head { border-bottom-color: #9B51E0; }
.list-section[data-type="video"] .list-section-head h3 { color: #9B51E0; }
.list-section[data-type="churn"] {
  background: #0a0a0a;
  border-color: #1a1a1a;
}
.list-section[data-type="churn"] .list-section-head { border-bottom-color: #3a3a3a; }
.list-section[data-type="churn"] .list-section-head h3 { color: #8a8a8a; }
.list-section[data-type="churn"] .client-row {
  filter: grayscale(40%) brightness(0.85);
}

.section-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.select-sm {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 9px;
  font-size: 12px;
}

/* ============================================================
   Tabela de clientes
   ============================================================ */
.list-table-wrap {
  overflow-x: auto;
}
.list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.list-table thead th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-muted);
  font-weight: 600;
  padding: 10px 12px;
  background: rgba(0,0,0,.2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.list-table thead th.col-num { text-align: right; }
.list-table thead th.col-nps,
.list-table thead th.col-flags,
.list-table thead th.col-wa,
.list-table thead th.col-churned { text-align: center; }

.client-row {
  cursor: pointer;
  transition: background .15s;
  border-bottom: 1px solid var(--border);
}
.client-row:hover {
  background: rgba(255,214,0,.04);
}
.client-row.dragging {
  opacity: 0.4;
}
.client-row td {
  padding: 10px 12px;
  vertical-align: middle;
}
.client-row td.col-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.client-row td.col-nps,
.client-row td.col-flags,
.client-row td.col-wa,
.client-row td.col-churned { text-align: center; }
.client-row td.col-drag {
  width: 28px;
  text-align: center;
  color: var(--text-muted);
  cursor: grab;
}
.client-row:active td.col-drag { cursor: grabbing; }
.drag-handle { font-size: 14px; opacity: .55; }
.client-row:hover .drag-handle { opacity: 1; color: var(--gold); }

.client-row td.col-photo { width: 44px; padding-right: 0; }
.client-row .row-name {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}
.client-row .row-prods {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.empty-row td {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  padding: 24px 8px;
}

/* ============================================================
   Foto, badges, chips (compartilhados com modal)
   ============================================================ */
.client-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 2px solid var(--border-strong);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-weight: 800;
  font-size: 20px;
  position: relative;
  flex-shrink: 0;
}
.client-photo.sm {
  width: 36px;
  height: 36px;
  font-size: 13px;
  border-width: 1px;
}
.client-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.prod-chip {
  font-size: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #000;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-ref {
  font-size: 13px;
}
.badge-nps {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 10px;
}
.wa-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  text-decoration: none;
  transition: transform .15s;
}
.wa-link:hover { transform: scale(1.15); }

.toolbar select { min-width: 130px; }
