/*
 * KPI Bar (Legacy)
 *
 * This file replaces the previous inline <style> block shipped inside
 * app/templates/partials/kpi_bar.html.
 *
 * IMPORTANT:
 * - Selectors are scoped under the legacy root (.metricas-barra) to avoid
 *   leaking into DS V2 or unrelated views.
 * - Do not remove selectors/classes here unless the legacy template branch is
 *   removed as well.
 */

/* ===== STANDARDIZED LEGACY KPI BAR ===== */
.metricas-barra {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #dee2e6;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.metricas-barra::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
}

.metricas-barra .metrica-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: 8px;
  border: 1px solid #dee2e6;
  transition: all 0.2s ease;
  min-width: 120px;
  justify-content: center;
  cursor: help;
}

/* Gastronomy variant helpers (legacy) */
.metricas-barra .metrica-item-danger {
  border-color: #dc3545;
  background: linear-gradient(135deg, #fff5f5, #ffe5e5);
}

.metricas-barra .metrica-item-warning {
  border-color: #ffc107;
  background: linear-gradient(135deg, #fffbf0, #fff8e5);
}

.metricas-barra a.metrica-item {
  text-decoration: none;
  color: inherit;
}

.metricas-barra .metrica-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.15);
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  border-color: #1976d2;
}

.metricas-barra .metrica-icon {
  font-size: 18px;
  opacity: 0.8;
  flex-shrink: 0;
}

.metricas-barra .metrica-label {
  font-size: 13px;
  font-weight: 600;
  color: #495057;
  white-space: nowrap;
}

.metricas-barra .metrica-valor {
  font-size: 16px;
  font-weight: 700;
  color: #1976d2;
  white-space: nowrap;
}

/* Value color variants */
.metricas-barra .metrica-valor.success {
  color: #28a745;
}

.metricas-barra .metrica-valor.warning {
  color: #ffc107;
}

.metricas-barra .metrica-valor.danger {
  color: #dc3545;
}

.metricas-barra .metrica-valor.info {
  color: #17a2b8;
}

/* Responsive */
@media (max-width: 768px) {
  .metricas-barra {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .metricas-barra .metrica-item {
    width: 100%;
    justify-content: center;
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .metricas-barra {
    padding: 12px;
  }

  .metricas-barra .metrica-item {
    padding: 10px 12px;
  }

  .metricas-barra .metrica-label {
    font-size: 12px;
  }

  .metricas-barra .metrica-valor {
    font-size: 14px;
  }
}
