/* app/assets/stylesheets/components/data_visualizations.css */

/* ===== KPI Cards ===== */
.kpi-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--size-4);
  width: 100%;
}

.kpi-card {
  background-color: var(--layer-surface);
  border-radius: var(--radius-medium);
  padding: var(--size-4);
  flex: 1;
  min-width: 280px;
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--size-3);
}

.kpi-title {
  color: var(--on-layer-widget);
  font-size: var(--font-size-body-medium);
  font-weight: var(--font-weight-4);
}

.kpi-menu {
  color: var(--on-layer-widget);
  cursor: pointer;
  opacity: 0.7;
}

.kpi-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-data {
  display: flex;
  flex-direction: column;
  gap: var(--size-2);
}

.kpi-value {
  font-size: var(--font-size-headline-medium);
  font-weight: var(--font-weight-7);
  color: var(--on-layer-background);
  line-height: 1.1;
}

.kpi-chart {
  width: 80px;
  height: 80px;
  position: relative;
}

.circular-chart {
  width: 100%;
  height: auto;
}

.chart-background {
  stroke: var(--outline-variant, rgba(200, 200, 200, 0.2));
  stroke-width: 12px;
}

.chart-progress {
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  stroke-width: 12px;
}

.chart-percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: var(--font-size-body-small);
  font-weight: var(--font-weight-6);
  color: var(--on-layer-background);
}

.kpi-change {
  display: flex;
  align-items: center;
  gap: var(--size-1);
  font-size: var(--font-size-body-small);
  font-weight: var(--font-weight-5);
  white-space: nowrap;
}

.kpi-change.positive {
  color: rgb(var(--success));
}

.kpi-change.negative {
  color: rgb(var(--error));
}

.kpi-change-icon {
  font-size: 10px;
}

.kpi-change-value {
  font-weight: var(--font-weight-6);
}

.kpi-change-label {
  opacity: 0.7;
}






/* ===== Responsive Styles ===== */
@media (max-width: 768px) {
  .kpi-card,
  .progress-list-card {
    min-width: 100%;
  }
  
  .stats-row {
    padding: var(--size-4) var(--size-2);
  }
  
  .stat-item {
    min-width: 40%;
    margin-bottom: var(--size-4);
  }
}