/* CleanForm chart engine — filter bar styles */
.cf-analytics-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 1rem;
  box-shadow: 0 2px 12px rgba(15, 39, 68, 0.06);
}

.cf-analytics-filters label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cf-analytics-filters select {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  min-width: 130px;
}

.cf-filter-apply,
.cf-filter-reset {
  border: none;
  border-radius: 8px;
  padding: 0.48rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.cf-filter-apply {
  background: var(--pc-navy, #0f2744);
  color: #fff;
}

.cf-filter-reset {
  background: #f1f5f9;
  color: #475569;
}

.cf-chart-svg,
.cf-donut-svg {
  width: 100%;
  height: auto;
  display: block;
}

.cf-chart-empty {
  color: #94a3b8;
  font-size: 0.85rem;
  padding: 1.5rem 0;
  text-align: center;
}

.cf-donut-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.cf-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: #475569;
  margin-right: 0.5rem;
}

.cf-legend-item i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.cf-report-modal {
  border: none;
  border-radius: 16px;
  padding: 0;
  width: min(960px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  background: #f1f5f9;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.cf-report-modal::backdrop {
  background: rgba(2, 6, 23, 0.6);
}

.cf-report-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: #0f2744;
  color: #fff;
  border-radius: 16px 16px 0 0;
}

.cf-report-modal__body {
  padding: 1rem 1.25rem 1.25rem;
  overflow: auto;
  max-height: calc(100vh - 8rem);
}

.cf-report-modal__actions {
  display: flex;
  gap: 0.5rem;
}

.cf-report-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.cf-report-kpi {
  background: #fff;
  border-radius: 12px;
  padding: 0.85rem;
  border-top: 3px solid var(--kpi-color, #2563eb);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.cf-report-kpi strong {
  display: block;
  font-size: 1.5rem;
  color: #0f172a;
}

.cf-report-kpi span {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}

.cf-report-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
}

.cf-report-chart-card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.cf-report-chart-card h4 {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: #475569;
}

.pc-analytics-filters-wrap {
  margin-bottom: 0.5rem;
}

html[data-theme='dark'] .cf-analytics-filters {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.2);
}

html[data-theme='dark'] .cf-analytics-filters select {
  background: #0f172a;
  border-color: #475569;
  color: #f8fafc;
}

html[data-theme='dark'] .cf-report-chart-card,
html[data-theme='dark'] .cf-report-kpi {
  background: rgba(15, 23, 42, 0.85);
}

html[data-theme='dark'] .cf-report-kpi strong {
  color: #f8fafc;
}
