/* FarmTown public stats dashboard — page-scoped styles (brand.css provides tokens). */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
}

.stat-row {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border-top: 1px solid rgba(111, 69, 22, 0.16);
  font-family: var(--font-read);
  color: var(--ink);
}

.stat-row:first-child {
  border-top: 0;
}

.stat-label {
  font-family: var(--font-ui);
  font-size: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(43, 27, 12, 0.62);
  line-height: 1.5;
}

.stat-value {
  font-family: var(--font-ui);
  font-size: clamp(14px, 3vw, 18px);
  color: #3c2208;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.stat-value.is-hours {
  color: #6a3d0a;
}

.card-title .subtitle {
  font-family: var(--font-read);
  font-size: 13px;
  color: rgba(43, 27, 12, 0.68);
  margin: 4px 0 0;
  font-weight: 400;
  line-height: 1.45;
}

.card-title {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: flex-start;
}

.interval-tabs {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tab-btn {
  border: 1px solid rgba(111, 69, 22, 0.3);
  background: rgba(255, 244, 202, 0.95);
  color: #4d2e10;
  font-family: var(--font-ui);
  font-size: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 10px;
  cursor: pointer;
}

.tab-btn.active {
  background: #f6d976;
  border-color: rgba(111, 69, 22, 0.5);
}

.stats-state {
  padding: 28px 22px;
  text-align: center;
}

.stats-state.error .note {
  color: #7a2e12;
}

.stats-state.loading .note {
  animation: stats-pulse 1.4s ease-in-out infinite;
}

@keyframes stats-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@media (max-width: 520px) {
  .card-title {
    flex-direction: column;
    align-items: stretch;
  }

  .stat-row {
    padding: 14px 16px;
  }

  .stat-value {
    font-size: 15px;
  }
}
