/* app/spokes/leads/leads.css — Estilos para o módulo de Leads e Funil */

.leads-container {
  padding-bottom: calc(80px + var(--safe-bottom));
}

.leads-search-row {
  padding: 12px 16px;
  position: sticky;
  top: 44px;
  background-color: var(--bg-surface);
  z-index: 50;
  border-bottom: 1px solid var(--border-color);
}

.leads-search-input {
  width: 100%;
  height: 44px;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 14px 0 40px;
  color: var(--text-primary);
  font-size: 16px;
}

.leads-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.leads-search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

/* Grupos do Funil */
.leads-grupo {
  margin-top: 14px;
}

.leads-grupo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background-color: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.leads-grupo-contagem {
  background-color: var(--border-color);
  color: var(--text-primary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
}

/* Cards de Lead */
.lead-card {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lead-card:active {
  background-color: var(--bg-surface-active);
}

.lead-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.lead-card-nome {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.lead-card-tel {
  font-size: 13px;
  color: var(--text-secondary);
}

.lead-card-acao {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-elevated);
  color: var(--text-secondary);
  width: fit-content;
}

.lead-card-acao.vencida {
  background-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  font-weight: 600;
}

.lead-card-acao.hoje {
  background-color: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  font-weight: 600;
}

.lead-card-acao.amanha {
  background-color: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  font-weight: 600;
}

/* Temperatura Indicator */
.temp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.temp-dot.quente { background-color: #ef4444; }
.temp-dot.morno  { background-color: #f59e0b; }
.temp-dot.frio   { background-color: #3b82f6; }

/* FAB Botão Novo Lead */
.fab-novo-lead {
  position: fixed;
  right: 20px;
  bottom: calc(76px + var(--safe-bottom));
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background-color: var(--brand-accent);
  color: #ffffff;
  border: none;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  z-index: 150;
}

.fab-novo-lead:active {
  transform: scale(0.95);
}

/* Banner de Duplicidade */
.lead-dup-banner {
  background-color: rgba(245, 158, 11, 0.15);
  border: 1px solid #f59e0b;
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-primary);
}

.lead-dup-acoes {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* Formulário de Lead */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input, .form-textarea {
  width: 100%;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 16px;
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--brand-accent);
}

.pills-row {
  display: flex;
  gap: 8px;
}

/* Timeline */
.timeline-section {
  margin-top: 20px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.timeline-lista {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.timeline-item {
  background-color: var(--bg-surface-elevated);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  border-left: 3px solid var(--brand-accent);
}

.timeline-item-data {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.timeline-item-texto {
  white-space: pre-wrap;
  color: var(--text-primary);
}

/* Pills de Temperatura no Módulo de Leads */
.pills-row .filter-pill {
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.pills-row .filter-pill.active {
  background-color: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

/* Seletor / Autocomplete de Imóvel de Origem */
.imovel-origem-wrapper {
  position: relative;
}

.imovel-origem-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-primary);
}

.imovel-origem-badge .titulo {
  font-weight: 600;
  color: #38bdf8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 8px;
}

.imovel-origem-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 4px;
}

.imovel-origem-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 4px;
  max-height: 180px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.imovel-origem-item {
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.imovel-origem-item:active, .imovel-origem-item:hover {
  background-color: var(--bg-surface-active);
}

.imovel-origem-item .item-titulo {
  font-weight: 600;
  color: var(--text-primary);
}

.imovel-origem-item .item-bairro {
  font-size: 11px;
  color: var(--text-muted);
}

