/* Estilos globais do sistema (Ads Monitor)
   Padrão visual unificado entre as páginas */

/* Body e containers */
body {
  background: #f5f7fb;
  padding: 20px;
}

.container-fluid {
  padding-left: 12px;
  padding-right: 12px;
}

/* Home: títulos de seção e ícones dos cards */
.section-title {
  font-size: 14px;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 28px 0 12px;
}

.horizontal-cards {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.card.hoverable:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.i-blue { background: #e9f2ff; color: #0d6efd; }
.i-purple { background: #efe7ff; color: #6f42c1; }
.i-green { background: #e8faef; color: #198754; }
.i-orange { background: #fff1e6; color: #fd7e14; }
.i-teal { background: #e6fffb; color: #20c997; }

/* Cards */
.card {
  border: 1px solid #eaecef;
  border-radius: 12px;
}

/* Metric cards reutilizáveis (estilo dashboard) */
.metrics-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.metric-card {
  background: #fff;
  border: 1px solid #eaecef;
  border-radius: 12px;
  padding: 16px 18px;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.04);
  transition: transform .2s ease, box-shadow .2s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.06);
}

.metric-value {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #2c3e50;
  line-height: 1.1;
}

.metric-label {
  text-transform: uppercase;
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 2px;
  letter-spacing: .06em;
}

/* Cards de vendedores - proporção igual aos cards principais */
#leadsVendedoresGrid .stat-card {
  flex: 1;
  min-width: 0;
}

#leadsVendedoresGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

#leadsVendedoresGrid .stat-label {
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#leadsVendedoresGrid .stat-details small {
  font-size: 0.7rem;
  line-height: 1.2;
}

/* Skeleton loading para métricas */
.metric-value.loading {
  position: relative;
  color: transparent;
}

.metric-value.loading::after {
  content: '';
  display: block;
  height: 1.2em;
  width: 120px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f0f3f6 0%, #e9ecef 50%, #f0f3f6 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Badges suaves para IDs e rótulos auxiliares */
.badge-soft {
  background: #eef2ff;
  color: #495057;
  border: 1px solid #e0e7ff;
}

.badge-soft-muted {
  background: #ecf0f1;
  border: 1px solid #d0d7de;
  color: #495057;
}

/* Tabelas com header fixo */
.sticky-header th {
  background: #f9fafb;
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Altura padrão de áreas com rolagem de tabela */
.table-wrapper {
  max-height: 55vh;
  overflow-y: auto;
}

/* Utilidades de progresso (evitar inline styles) */
.progress-sm {
  height: 16px;
}

.progress-md {
  height: 18px;
}

/* Toolbar: largura mínima para selects/inputs */
.toolbar .form-select, .toolbar .form-control {
  min-width: 140px;
}

/* Estilos para detalhes adicionais nos cards de vendedores */
.stat-details {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #eaecef;
}

.stat-details small {
  color: #6c757d;
  font-size: 0.75rem;
}
