.dashboard-view {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 1180px;
}

.dashboard-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-8);
  padding: var(--space-2) 0 18px;
}

.dashboard-title {
  color: var(--color-text);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-emphasis);
}

.dashboard-asof {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  font-variant-numeric: tabular-nums;
}

.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: var(--border-width) solid var(--color-border);
  border-bottom: var(--border-width) solid var(--color-border);
}

.dashboard-metric {
  min-width: 0;
  padding: 18px var(--space-8) var(--space-8) 0;
}

.dashboard-metric + .dashboard-metric {
  border-left: var(--border-width) solid var(--color-border);
  padding-left: var(--space-8);
}

.dashboard-metric-label {
  color: var(--color-text-muted);
  font-size: var(--font-size-2xs);
  font-weight: var(--font-weight-emphasis);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-metric-value {
  margin-top: var(--space-4);
  color: var(--color-text);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-emphasis);
  line-height: var(--line-height-tight);
  font-variant-numeric: tabular-nums;
}

.dashboard-metric-detail {
  margin-top: 5px;
  color: var(--color-text-subtle);
  font-size: var(--font-size-sm);
}

.dashboard-section {
  padding: var(--space-9) 0;
  border-bottom: var(--border-width) solid var(--color-border);
}

.dashboard-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-7);
  margin-bottom: 18px;
}

.dashboard-section-title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-emphasis);
}

.dashboard-section-note {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}

.dashboard-leaderboard-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.dashboard-date-input {
  appearance: none;
  color-scheme: light;
  height: var(--control-height-sm);
  padding: 0 var(--control-padding-inline);
  border: var(--border-width) solid var(--color-control-border);
  border-radius: var(--radius-sm);
  background: var(--color-control-background);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--font-size-xs);
  font-variant-numeric: tabular-nums;
}

.dashboard-date-input:focus-visible {
  outline: var(--focus-ring-width) solid var(--color-focus);
  outline-offset: var(--focus-ring-offset);
}

.dashboard-live-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-success-text);
  font-size: var(--font-size-2xs);
  font-weight: var(--font-weight-emphasis);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dashboard-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: var(--shadow-success-ring);
}

.dashboard-rank {
  width: 42px;
  color: var(--color-text-muted) !important;
}

.dashboard-demo-count {
  color: var(--color-text) !important;
  font-weight: var(--font-weight-emphasis);
}

.dashboard-total-row td {
  border-top: var(--border-width) solid var(--color-border);
  border-bottom: 0 !important;
  color: var(--color-text);
  font-weight: var(--font-weight-emphasis);
}

.dashboard-leaderboard-note {
  color: var(--color-text-muted);
  font-size: var(--font-size-2xs);
  margin-top: 11px;
}

.collection-chart {
  height: 220px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--space-6);
  align-items: stretch;
}

.collection-day {
  min-width: 0;
  display: grid;
  grid-template-rows: 20px 1fr 34px;
  gap: 7px;
  text-align: center;
}

.collection-hours {
  color: var(--color-text-subtle);
  font-size: var(--font-size-2xs);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.collection-track {
  position: relative;
  background: var(--color-surface);
  border-bottom: var(--border-width) solid var(--color-border);
  min-height: 0;
}

.collection-fill {
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 0;
  height: var(--collection-height, 0%);
  min-height: 0;
  background: var(--color-accent);
}

.collection-day.latest .collection-fill {
  background: var(--color-success);
}

.collection-day-label {
  min-width: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-2xs);
  line-height: var(--line-height-compact);
}

.collection-day-label strong {
  display: block;
  color: var(--color-text);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
}

.dashboard-table-wrap {
  overflow-x: auto;
}

.dashboard-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  table-layout: fixed;
}

.dashboard-table th {
  color: var(--color-text-muted);
  font-size: var(--font-size-2xs);
  font-weight: var(--font-weight-emphasis);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: left;
  padding: 0 10px 8px 0;
  border-bottom: var(--border-width) solid var(--color-border);
}

.dashboard-table td {
  color: var(--color-text-subtle);
  font-size: var(--font-size-sm);
  padding: 10px 10px 10px 0;
  border-bottom: var(--border-width) solid var(--color-surface-subtle);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-table tr:last-child td {
  border-bottom: 0;
}

.dashboard-table .dashboard-dataset-cell {
  width: 46%;
}

.dashboard-table .dashboard-operator-cell {
  width: 26%;
  color: var(--color-text);
  font-weight: var(--font-weight-semibold);
}

.dashboard-table .dashboard-unattributed {
  color: var(--color-text-muted);
  font-weight: var(--font-weight-medium);
  font-style: italic;
}

.dashboard-dataset-link {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  color: var(--color-accent);
  font: inherit;
  font-family: var(--font-mono);
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-dataset-link:hover {
  text-decoration: underline;
}

.dashboard-empty {
  padding: var(--space-6) 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

@media (width <= 760px) {
  .dashboard-head {
    padding-top: 0;
  }

  .dashboard-summary {
    grid-template-columns: 1fr;
  }

  .dashboard-metric {
    padding: 14px 0;
  }

  .dashboard-metric + .dashboard-metric {
    border-left: 0;
    border-top: var(--border-width) solid var(--color-border);
    padding-left: 0;
  }

  .dashboard-metric-value {
    font-size: var(--font-size-2xl);
  }

  .dashboard-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-leaderboard-controls {
    width: 100%;
    justify-content: space-between;
  }

  .collection-chart {
    height: 190px;
    gap: 5px;
  }

  .collection-fill {
    left: 12%;
    right: 12%;
  }

  .collection-day-label {
    font-size: var(--font-size-3xs);
  }
}
