/* custom.css — complemento ao Tailwind CDN */

/* Scrollbar discreta */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* Tabela zebrada */
tbody tr:nth-child(even) { background-color: #f8fafc; }
tbody tr:hover { background-color: #f1f5f9; }

/* Badge de status */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-danger  { background: #fee2e2; color: #b91c1c; }
.badge-warning { background: #fef9c3; color: #92400e; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-info    { background: #dbeafe; color: #1d4ed8; }
.badge-gray    { background: #f1f5f9; color: #475569; }
.badge-orange  { background: #ffedd5; color: #c2410c; }
.badge-purple  { background: #f3e8ff; color: #7e22ce; }

/* ── Faixas de atraso (dashboard) ─────────────────── */
.badge-faixa {
  display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 9999px;
  font-size: 0.72rem; font-weight: 600;
  white-space: nowrap;
}
.badge-faixa-180plus { background: #fee2e2; color: #7f1d1d; border: 1px solid #fca5a5; }
.badge-faixa-90a180  { background: #ffedd5; color: #9a3412; border: 1px solid #fdba74; }
.badge-faixa-60a90   { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }
.badge-faixa-30a60   { background: #fefce8; color: #713f12; border: 1px solid #fef08a; }
.badge-faixa-ate30   { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* Filtros de ação da régua (dentro do detalhe do cliente) */
.filtro-regua-btn { cursor: pointer; transition: all 0.15s; font-size: 0.72rem; font-weight: 600; }
.filtro-regua-ativo { background: #1d4ed8 !important; color: #fff !important; border-color: #1d4ed8 !important; }

/* Card de indicador no topo */
.kpi-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.kpi-card .kpi-label { font-size: 0.8rem; color: #64748b; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.kpi-card .kpi-value { font-size: 1.6rem; font-weight: 700; color: #0f172a; line-height: 1.2; }
.kpi-card .kpi-sub   { font-size: 0.78rem; color: #94a3b8; }


/* Botão primário */
.btn-primary {
  background: #2563eb;
  color: white;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover { background: #1d4ed8; }

/* Botão secundário */
.btn-secondary {
  background: white;
  color: #374151;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-secondary:hover { background: #f9fafb; }

/* Botão danger */
.btn-danger {
  background: #fee2e2;
  color: #b91c1c;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.8rem;
  border: 1px solid #fca5a5;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-danger:hover { background: #fecaca; }

/* Flash messages */
.flash-success { background: #dcfce7; border: 1px solid #bbf7d0; color: #166534; border-radius: 8px; padding: 12px 16px; }
.flash-error   { background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; border-radius: 8px; padding: 12px 16px; }
.flash-info    { background: #dbeafe; border: 1px solid #bfdbfe; color: #1e40af; border-radius: 8px; padding: 12px 16px; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #94a3b8;
}
.empty-state svg { width: 48px; height: 48px; margin: 0 auto 12px; opacity: 0.4; }
.empty-state h3  { font-size: 1rem; font-weight: 600; color: #64748b; margin-bottom: 4px; }
.empty-state p   { font-size: 0.875rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   MÓDULO: RÉGUA DE COBRANÇA
   ═══════════════════════════════════════════════════════════════════════════ */

/* Navbar links */
.nav-link {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  cursor: pointer;
  background: none;
  border: none;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover    { background: #f1f5f9; color: #1d4ed8; }
.nav-link-ativo    { background: #eff6ff; color: #1d4ed8; font-weight: 600; }

/* Dropdown do menu */
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.875rem;
  color: #374151;
  transition: background 0.12s;
}
.dropdown-item:hover    { background: #f1f5f9; color: #1d4ed8; }
.dropdown-item-ativo    { background: #eff6ff; color: #1d4ed8; font-weight: 600; }

/* D-label: referência ao vencimento */
.d-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  white-space: nowrap;
}
.d-label-pre  { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }  /* azul — antes */
.d-label-zero { background: #fef9c3; color: #92400e; border: 1px solid #fde68a; }  /* amarelo — no dia */
.d-label-pos  { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }  /* vermelho — depois */
.d-label-gray { background: #ffffff; color: #6b7280; border: 1px solid #d1d5db; font-weight: 700; }  /* cinza — contorno visível */

/* Canal badge */
.canal-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}
.canal-email          { background: #f3f4f6; color: #6b7280; }
.canal-whatsapp       { background: #f3f4f6; color: #6b7280; }
.canal-ligacao        { background: #f3f4f6; color: #6b7280; }
.canal-tarefa_interna { background: #f3f4f6; color: #6b7280; }
.canal-observacao     { background: #f3f4f6; color: #6b7280; }
.canal-gray           { background: #f3f4f6; color: #6b7280; }

/* Linha vencida na tabela do painel — sem borda colorida lateral */
tr.execucao-vencida td:first-child { border-left: none; }
tr.execucao-hoje    td:first-child  { border-left: none; }

/* Seção da régua na tela do cliente */
.secao-regua { border-left: 3px solid #6366f1; }
.secao-interacoes { border-left: 3px solid #3b82f6; }
.secao-titulos { border-left: 3px solid #ef4444; }
