/* Statistik-Seite */

.stats-page {
  background: var(--bg-1);
  min-height: 100vh;
}

.stats-page .brand-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.stats-page .checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--fg-1);
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 16px;
  max-width: 1700px;
  margin: 0 auto;
}

.stat-summary {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.big-stat {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.big-stat-value {
  font-size: 28px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.1;
}

.big-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-2);
}

.stats-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stats-block canvas {
  max-height: 220px !important;
}

/* Heatmap */
.heatmap {
  font-family: var(--font-mono);
  font-size: 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 12px;
  overflow-x: auto;
}

.hm-row {
  display: grid;
  grid-template-columns: 32px repeat(24, 1fr);
  gap: 1px;
}

.hm-cell {
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  color: var(--fg-1);
  font-size: 10px;
  background: rgba(148, 163, 184, 0.06);
}

.hm-cell.hm-corner {
  background: transparent;
}

.hm-cell.hm-hour,
.hm-cell.hm-dow {
  background: transparent;
  color: var(--fg-2);
  font-weight: 500;
}

.hm-cell.hm-data {
  font-size: 10px;
  color: #0a0e14;
  font-weight: 600;
}

/* Rank-Tabelle */
.rank-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.rank-table th,
.rank-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.rank-table th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-2);
  font-weight: 500;
  background: rgba(148, 163, 184, 0.04);
}

.rank-table .num {
  text-align: right;
}

.rank-table tr:hover {
  background: rgba(148, 163, 184, 0.06);
}

.export-row {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
}

.btn-export {
  display: inline-block;
  background: var(--accent);
  color: #001b41;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
}

.btn-export:hover {
  filter: brightness(1.1);
}

@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .stat-summary {
    grid-template-columns: repeat(2, 1fr);
  }
}
