/* Clientes e Reativacao (Fase 5). Reaproveita .cp-tabs/.cp-table (campaigns.css) e .tk-* (tasks.css). */

.cu-subtitle { margin: 2px 0 0; color: var(--color-muted); font-size: 0.9rem; }

.cu-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 4px 0 14px; }
.cu-card {
  appearance: none; text-align: left; font: inherit;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px;
  padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; min-height: 60px; min-width: 0; cursor: pointer;
}
div.cu-card { cursor: default; }
.cu-card strong { font-size: 22px; line-height: 1.15; overflow-wrap: anywhere; }
.cu-card span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.02em; color: var(--color-muted); }
.cu-card:hover { border-color: var(--color-border-strong, #cbd5e1); }
.cu-card.is-selected { border-color: var(--color-accent, #0e7c86); box-shadow: 0 0 0 2px var(--color-accent-ring); }
.cu-card.is-alert { background: #FFF6E5; border-color: #F5C26B; }
.cu-card.is-alert strong { color: #B54708; }
.cu-card--note { background: #F9FAFB; }
.cu-cards--queue { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.cu-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.cu-chip {
  appearance: none; font: inherit; font-size: 0.85rem; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--color-border-strong, #cbd5e1); background: var(--color-surface); color: var(--color-text-soft); min-height: 34px;
}
.cu-chip:hover { background: var(--color-surface-soft); }
.cu-chip.is-active { background: var(--color-accent, #0e7c86); border-color: var(--color-accent, #0e7c86); color: #fff; font-weight: 700; }

.cu-view.is-hidden { display: none; }
.cu-queue-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.cu-queue-item { border-left-color: #7A5AF8; }
.cu-table td, .cu-table th { vertical-align: top; }

.cu-form-card { width: min(820px, 96vw); max-height: 92vh; overflow-y: auto; }
.cu-detail-card, .cu-import-card { width: min(820px, 96vw); max-height: 92vh; overflow-y: auto; }
.cu-warning { background: #FFF6E5; border: 1px solid #F5C26B; color: #93370D; border-radius: 8px; padding: 8px 10px; font-size: 0.88rem; margin: 6px 0; }
.cu-warning.is-hidden { display: none; }
.cu-tags-pick { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 12px; }
.cu-import-table { max-height: 280px; overflow: auto; margin-top: 10px; }

#cu-detail-body .tk-history { max-height: 260px; overflow-y: auto; }

@media (max-width: 768px) {
  .cu-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cu-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .cu-chip { flex: 0 0 auto; }
  .cu-form-card, .cu-detail-card, .cu-import-card { width: 100vw; max-height: 100vh; border-radius: 0; }
  #cu-detail-actions { flex-wrap: wrap; }
  #cu-detail-actions .primary-action, #cu-detail-actions .secondary-action { min-height: 44px; flex: 1 1 45%; }

  #cu-list .table-wrap, #cu-report .table-wrap { overflow: visible; border: none; }
  #cu-list .cu-table, #cu-list .cu-table tbody, #cu-report .cu-table, #cu-report .cu-table tbody { display: block; width: 100%; }
  #cu-list .cu-table thead, #cu-report .cu-table thead { display: none; }
  #cu-list .cu-table tr, #cu-report .cu-table tr { display: block; border: 1px solid var(--color-border); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: var(--color-surface); }
  #cu-list .cu-table td, #cu-report .cu-table td { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border: none; padding: 5px 0; text-align: right; min-width: 0; }
  #cu-list .cu-table td::before, #cu-report .cu-table td::before { content: attr(data-label); flex: 0 0 34%; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--color-muted); }
  #cu-list .cu-table td[data-label="Cliente"] { display: block; text-align: left; }
  #cu-list .cu-table td[data-label="Cliente"]::before { display: none; }
  #cu-list .cu-table td.cp-actions { justify-content: flex-start; flex-wrap: wrap; padding-top: 10px; }
  #cu-list .cu-table td.cp-actions::before { display: none; }
  #cu-list .cu-table td.cp-actions .primary-action, #cu-list .cu-table td.cp-actions .secondary-action { min-height: 44px; flex: 1 1 auto; }
  #cu-list .cu-table td.cp-actions .ev-row-menu-trigger { min-height: 44px; width: 52px; }
}
/* Barra de progresso da importacao */
.cu-progress { margin: 10px 0 14px; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); }
.cu-progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 14px; }
.cu-progress-head span { font-variant-numeric: tabular-nums; font-weight: 600; }
.cu-progress-track { height: 12px; border-radius: 999px; background: #E5E7EB; overflow: hidden; }
.cu-progress-bar { height: 100%; width: 0; border-radius: 999px; background: var(--color-accent, #0e7c86); transition: width 0.3s ease; }
.cu-progress.is-indeterminate .cu-progress-bar { width: 35%; animation: cu-progress-slide 1.2s ease-in-out infinite; }
.cu-progress.is-done .cu-progress-bar { background: #1A7F4B; }
.cu-progress.is-error .cu-progress-bar { background: #C0392B; }
.cu-progress-detail { margin: 8px 0 0; font-size: 12.5px; color: var(--color-muted); font-variant-numeric: tabular-nums; }
@keyframes cu-progress-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
@media (prefers-reduced-motion: reduce) { .cu-progress-bar { transition: none; } .cu-progress.is-indeterminate .cu-progress-bar { animation: none; width: 100%; opacity: 0.5; } }
