/* KPI wrapper */

.kpi-analytics-wrapper {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-direction: column;/* відступ знизу */
}

.kpi-cards-container {
  display: flex;
  flex-wrap: nowrap;          /* 🔹 всі картки в одну лінію */
  gap: 12px;
  flex: 1 1 auto;

  padding: 10px;
  overflow-x: auto;           /* 🔹 горизонтальний скрол */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  transition: all 0.3s ease;
}

/* Коли shrink — тобто активна картка */
/* shrink — активна картка + графік */
.kpi-cards-container.shrink .kpi-card-wrapper {
  flex: 0 0 250px;            /* 🔹 ширші картки у shrink */
  max-width: 150px;

}
/* KPI Card base */
.kpi-card-wrapper {
  flex: 0 0 200px;            /* 🔹 ширина картки у звичайному режимі */
  max-width: 150px;
  scroll-snap-align: start;   /* 🔹 фіксація на початку */
}

.kpi-card {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  padding: 10px 8px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid rgba(142, 45, 226, 0.2);
}
.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}
.circle.teal {
  background: #009688; /* бірюзовий */
}

/* Active/inactive states */
.kpi-card.active {
  border: 2px solid #8e2de2;
  transform: scale(1.05);
}

.kpi-card.inactive {
  filter: grayscale(100%);
  opacity: 0.6;
}

/* Circle icon style */
.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  color: white;
}
.circle.orange { background: #ff5722; } /* Salary */
.circle.red { background: #f44336; }     /* Spend */
.circle.green { background: #4caf50; }  /* Revenue */
.circle.blue { background: #2196f3; }   /* Profit */
.circle.yellow { background: #ff9800; } /* ROI */
.circle.purple { background: #9c27b0; } /* Costs */
.circle.teal { background: #009688; }   /* Top-up */
.circle.indigo { background: #3f51b5; } /* Installs */
.circle.pink { background: #e91e63; }   /* Price */
.circle.brown { background: #795548; }  /* CPI */
.circle.gray {
  background: #607d8b; /* Fee */
}
.circle.cyan {
  background: #00bcd4; /* Slice */
}
.circle.black {
  background: #3e2723; /* Net Profit alt */
}
.circle.dark {
  background: #212121; /* Net Profit (рекомендовано) */
}

/* KPI Text */
.kpi-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 4px;
  letter-spacing: 0.6px;
}
.kpi-value {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(90deg, #8e2de2, #4a00e0, #ff4ecd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  min-height: 26px;
}

/* Chart panel */
.kpi-chart-panel {
  flex: 0 0 66%;
  padding: 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}
.kpi-chart-panel.d-none {
  display: none;
}
#kpiChart {
  width: 100% !important;
  height: 300px !important;
}


/* Chart header */
.chart-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chart-dimension-select {
  width: auto;
  min-width: 140px;
  max-width: 200px;
  display: inline-block;
}


