/* Interactive Chart Styles */

.chart-container {
  display: flex;
  gap: 16px;
  align-items: stretch;
  position: relative;
}

.chart-canvas {
  flex: 1;
  position: relative;
  height: 280px;
  transition: opacity 0.3s ease;
}

.line-chart {
  width: 100%;
  height: 100%;
}

#chart-line {
  transition: d 0.8s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.8s ease;
}

#chart-area {
  transition: d 0.8s cubic-bezier(0.4, 0, 0.2, 1), fill 0.8s ease;
}

#chart-points circle {
  transition: all 0.3s ease;
  cursor: pointer;
}

#chart-points circle:hover {
  r: 8;
}

.chart-x-labels {
  position: absolute;
  bottom: -30px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
}

.chart-x-labels span {
  font-size: 0.8rem;
  color: #6a6a6a;
  font-weight: 600;
}

.chart-value-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #fff;
  padding: 12px 20px;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  border: 2px solid #00d9ff;
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 6px 20px rgba(0, 217, 255, 0.2);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 8px 28px rgba(0, 217, 255, 0.3);
  }
}

.badge-value {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #00d9ff, #0077ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Metric Items as Buttons - Compact */
.metric-item {
  background: #fff;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1.5px solid #e5e5e5;
  transition: all .3s ease;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.metric-item:hover {
  border-color: #00d9ff;
  box-shadow: 0 6px 20px rgba(0, 217, 255, 0.15);
  transform: translateX(4px);
}

.metric-item.active {
  border-color: #00d9ff;
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.05), rgba(0, 119, 255, 0.02));
  box-shadow: 0 8px 24px rgba(0, 217, 255, 0.2);
}

.metric-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s ease;
}

.metric-icon svg {
  width: 14px;
  height: 14px;
}

.metric-icon.ca {
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(0, 119, 255, 0.08));
}

.metric-icon.ca svg {
  color: #00d9ff;
}

.metric-icon.productivite {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(168, 85, 247, 0.08));
}

.metric-icon.productivite svg {
  color: #7c3aed;
}

.metric-icon.leads {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.08));
}

.metric-icon.leads svg {
  color: #f59e0b;
}

.metric-icon.pertes {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(52, 211, 153, 0.08));
}

.metric-icon.pertes svg {
  color: #10b981;
}

.metric-bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
}

.metric-bar-fill.ca-color {
  background: linear-gradient(90deg, #00d9ff, #0077ff);
  width: 75%;
}

.metric-bar-fill.productivite-color {
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  width: 82%;
}

.metric-bar-fill.leads-color {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  width: 90%;
}

.metric-bar-fill.pertes-color {
  background: linear-gradient(90deg, #10b981, #34d399);
  width: 88%;
}

/* Chart colors per metric */
.chart-ca {
  --chart-color-start: #00d9ff;
  --chart-color-end: #0077ff;
}

.chart-productivite {
  --chart-color-start: #7c3aed;
  --chart-color-end: #a855f7;
}

.chart-leads {
  --chart-color-start: #f59e0b;
  --chart-color-end: #fbbf24;
}

.chart-pertes {
  --chart-color-start: #10b981;
  --chart-color-end: #34d399;
}

@media (max-width: 767px) {
  .chart-value-badge {
    top: 10px;
    right: 10px;
    padding: 8px 16px;
  }
  
  .badge-value {
    font-size: 1.2rem;
  }
}
