.admin-analytics-page { display: grid; gap: 16px; padding: 16px; max-width: 1100px; margin: 0 auto; }
.toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.toolbar-actions { display: flex; gap: 8px; }
.ranges { display: flex; gap: 6px; }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border-color, #d3dad9); }
.tab {
  border: none;
  background: transparent;
  padding: 10px 14px;
  font-size: var(--font-size-sm, 0.8125rem);
  font-weight: var(--font-weight-semibold, 600);
  color: var(--text-secondary, #6b7280);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--text-primary, #1e3c38); }
.tab:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.tab--active { color: var(--primary-color); border-bottom-color: var(--primary-color); }

.panel { display: grid; gap: 16px; }

.summary-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.summary-card { border: 1px solid var(--border-color, #d3dad9); border-radius: var(--radius-md); padding: 12px; display: grid; gap: 4px; background: var(--bg-primary, #fff); }
.summary-card span { font-size: var(--font-size-xs, 0.75rem); color: var(--text-secondary, #6b7280); }
.summary-card strong { font-size: var(--font-size-xl, 1.125rem); }

.card { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--border-color, #d3dad9); border-radius: var(--radius-md); background: var(--bg-primary, #fff); }
.card-head { display: flex; justify-content: space-between; align-items: center; }
.card h2 { margin: 0; font-size: var(--font-size-xl, 1.125rem); }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 140px; }
.chart .bar { flex: 1; background: var(--primary-color); border-radius: 3px 3px 0 0; min-height: 2px; }
.pending-section p { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text-secondary, #6b7280); }
.skeleton-rows { display: grid; gap: 8px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.activity-list, .warning-list, .recommendation-list, .health-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: var(--font-size-sm, 0.8125rem); }
.activity-list li { display: flex; justify-content: space-between; gap: 8px; }
.warning-list li, .recommendation-list li, .health-checks li { display: flex; align-items: center; gap: 10px; }
.recommendation-list a, .health-checks a { color: var(--text-primary, #1e3c38); text-decoration: underline; }
.recommendation-list a:focus-visible, .health-checks a:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.muted { color: var(--text-secondary, #6b7280); font-size: var(--font-size-sm, 0.8125rem); }

.health-widget__bar { height: 8px; border-radius: var(--radius-full, 999px); background: var(--bg-tertiary); overflow: hidden; }
.health-widget__bar-fill { height: 100%; background: var(--primary-color); transition: width 0.3s ease; }
.health-percent { margin: 0; font-size: var(--font-size-sm, 0.8125rem); color: var(--text-secondary, #6b7280); }

@media (max-width: 900px) {
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .summary-grid { grid-template-columns: 1fr; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; }
}

// scope="row" on the product-name cell (a11y row header) must render
// identically to a plain <td> - only the semantics change, not the visuals.
tbody th[scope='row'] { font-weight: inherit; color: inherit; text-align: left; vertical-align: middle; }
tbody tr:last-child th[scope='row'] { border-bottom: none; }
