.container {
  min-height: 100vh;
  background: radial-gradient(circle at top right, hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.08), transparent 45%),
              var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  transition: background var(--transition-slow);
  padding-bottom: var(--space-12);
}

.main {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
  animation: fadeIn var(--transition-normal) ease-out;
}

.titleSection {
  margin-bottom: var(--space-8);
}

.title {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--foreground);
  margin: 0;
}

/* Metric widgets grid */
.metricsGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

@media (min-width: 640px) {
  .metricsGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .metricsGrid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Glassmorphic Metric Card */
.metricCard {
  background: hsla(0, 0%, 97%, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

[data-theme='dark'] .metricCard {
  background: hsla(220, 30%, 11%, 0.85);
}

.metricCard:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.metricInfo {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.metricLabel {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  color: var(--foreground);
  opacity: 0.7;
}

.metricValue {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--foreground);
}

/* Circular progress visual for KPI */
.progressCircleWrapper {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.progressSvg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.circleBackground {
  fill: none;
  stroke: var(--border);
  stroke-width: 6;
}

.circleFill {
  fill: none;
  stroke: var(--primary);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease-in-out;
}

.progressText {
  position: absolute;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--foreground);
}

/* Charts layout grid */
.chartsGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 1024px) {
  .chartsGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Premium Chart Card */
.chartCard {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
}

.chartTitle {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  margin-top: 0;
  margin-bottom: var(--space-1);
}

.chartDesc {
  font-size: var(--text-xs);
  color: var(--foreground);
  opacity: 0.6;
  margin-bottom: var(--space-6);
}

.loading {
  text-align: center;
  padding: var(--space-12) 0;
  font-size: var(--text-base);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
