/* Remove Stats Styles - Neutralize & hide all legacy statistics UI elements */
/* This file ensures any leftover markup or cached CSS does not show gradients or colored cards */

.client-stats-overview,
.client-stats-grid,
.client-stat-card,
.info-bar-stats,
.dynamic-info-bar,
.filter-stats-card,
.filter-stats-bar,
.info-bar,
.charts-stats-container,
[data-module="charts-statistics"],
#charts-statistics-root {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* If any gradient backgrounds leaked into table rows or cards */
.bitrix-main-content .card-stats, 
.bitrix-main-content .card-stats-inline,
.bitrix-main-content .client-stats-overview,
.bitrix-main-content .client-stat-card {
  background: #ffffff !important;
  box-shadow: none !important;
  border: 1px solid #e5e7eb !important;
}

/* Remove pseudo-element decorative circles */
.client-stats-overview::before,
.client-stats-overview::after {
  content: none !important;
}

/* Safety: neutralize any JS injected inline styles */
[style*="gradient"],
[style*="stats"],
[style*="purple"],
[style*="#4f46e5"],
[style*="#7c3aed"] {
  background: #ffffff !important;
}

/* Dark mode compatibility */
body.dark-mode .client-stats-overview,
body.dark-mode .client-stat-card {
  background: var(--bitrix-surface, #1f2937) !important;
  border-color: #374151 !important;
}

/* Prevent layout gaps after removal */
.client-stats-overview + * {
  margin-top: 0 !important;
}

/* Also cancel top spacing reserved for dynamic info bar if present in CSS */
.dynamic-info-bar + * {
  margin-top: 0 !important;
}

/* Extra safety: neutralize any gradient backgrounds used by stats bars */
.filter-stats-card {
  background: #ffffff !important;
  box-shadow: none !important;
  border: 1px solid #e5e7eb !important;
}

/* Log (only once if JS scans for element) */
/* No functional JS here; pure CSS cleanup */