/* Creator Dashboard — stat cards, bar chart, recipe breakdown. */

.dashboard-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.dashboard-stat-card {
  background: var(--white);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  text-align: center;
}

.dashboard-stat-card__value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-colour);
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.dashboard-stat-card__value--small {
  font-size: 1.1rem;
}

.dashboard-stat-card__value a {
  color: var(--primary-colour);
  text-decoration: none;
}

.dashboard-stat-card__value a:hover {
  text-decoration: underline;
}

.dashboard-stat-card__label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* Bar Chart */
.dashboard-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  height: 180px;
  padding: 1rem 0;
}

.dashboard-chart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.dashboard-chart__count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.dashboard-chart__bar-track {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
}

.dashboard-chart__bar {
  width: 100%;
  min-height: 4px;
  background: var(--neutral-colour);
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
}

.dashboard-chart__bar--current {
  background: var(--primary-colour);
}

.dashboard-chart__col:hover .dashboard-chart__bar {
  background: var(--highlight-colour);
}

.dashboard-chart__label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.dashboard-chart__label--current {
  color: var(--primary-colour);
  font-weight: 800;
}

/* Recipe Breakdown */
.dashboard-recipes {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.5rem 0;
}

.dashboard-recipe-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
}

.dashboard-recipe-row__rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--neutral-colour);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-colour);
  flex-shrink: 0;
}

.dashboard-recipe-row:first-child .dashboard-recipe-row__rank {
  background: var(--primary-colour);
  color: var(--white);
}

.dashboard-recipe-row__info {
  flex: 1;
  min-width: 0;
}

.dashboard-recipe-row__title {
  margin-bottom: 0.35rem;
}

.dashboard-recipe-row__title a {
  color: var(--text-colour);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.dashboard-recipe-row__title a:hover {
  color: var(--primary-colour);
}

.dashboard-recipe-row__bar-track {
  height: 6px;
  background: var(--neutral-colour);
  border-radius: 3px;
  overflow: hidden;
}

.dashboard-recipe-row__bar {
  height: 100%;
  background: var(--primary-colour);
  border-radius: 3px;
  transition: width 0.3s ease;
  min-width: 4px;
}

.dashboard-recipe-row__count {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-colour);
  min-width: 48px;
  text-align: right;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .dashboard-stats-row {
    grid-template-columns: 1fr;
  }

  .dashboard-chart {
    height: 140px;
  }
}
