/**
 * pages.css
 * Styles für die eigenständigen Router-Seiten aus dem Burger-Menü
 * (Statistiken, Aktivitäten). Nutzt bewusst dieselben Bausteine wie
 * dashboard.css (tk-dashboard, tk-section, tk-chart-block, ...), ergänzt
 * aber größere bzw. andere Darstellungen für die ausführlichere Ansicht.
 */

.tk-brand-link {
  transition: opacity var(--transition-fast);
}
.tk-brand-link:hover { opacity: 0.8; }

.tk-page-title-row { margin-bottom: var(--space-6); }
.tk-page-title { font-size: 28px; }

.tk-page-intro {
  color: var(--mist);
  margin-bottom: var(--space-4);
  max-width: 60ch;
}

.tk-page-chart-block {
  background: var(--void-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

/* Größere Balken für die Kategorie-Verteilung */
.tk-bar-chart-lg .tk-bar-row { gap: var(--space-2); }
.tk-bar-chart-lg .tk-bar-label { font-size: 14px; }
.tk-bar-track-lg { height: 14px; }

/* Aufgeteiltes Ringdiagramm: zwei eigenständige Kreise nebeneinander,
   jeweils mit Zahl bzw. Smiley in der Mitte statt zweier ineinander
   verschachtelter Ringe (siehe tk-ring-chart-wrap in dashboard.css für
   die kompakte Variante im Dashboard). */
.tk-split-ring-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  flex-wrap: wrap;
  padding: var(--space-2) 0;
}
.tk-split-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}
.tk-ring-center-label {
  fill: var(--moon);
  font-family: var(--font-display);
  font-weight: 500;
}
.tk-split-ring-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--mist);
}

@media (max-width: 480px) {
  .tk-split-ring-wrap { gap: var(--space-4); }
  .tk-split-ring svg { width: 156px; height: 156px; }
}

/* Kategorie-Zeitverlauf: gestapelte Wochen-Balken der letzten 8 Wochen */
.tk-history-chart {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: var(--space-2);
  height: 180px;
  align-items: end;
}
.tk-history-col {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: var(--space-2);
  justify-items: center;
}
.tk-history-bar {
  width: 100%;
  max-width: 34px;
  display: flex;
  flex-direction: column-reverse;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--void-4);
}
.tk-history-segment { width: 100%; background: var(--cat-color); }
.tk-history-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--mist-dim);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .tk-history-chart {
    grid-template-columns: repeat(8, minmax(28px, 1fr));
    overflow-x: auto;
  }
}

/* Wochenvergleich */
.tk-compare-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.tk-compare-list:last-child { margin-bottom: 0; }
.tk-compare-row {
  display: grid;
  grid-template-columns: 24px 1fr auto auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--void-3);
  border-radius: var(--radius-sm);
}
.tk-compare-icon { color: var(--cat-color, var(--dusk)); display: flex; }
.tk-compare-label { font-size: 13.5px; font-weight: 600; color: var(--moon); }
.tk-compare-count {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--moon);
  font-variant-numeric: tabular-nums;
}
.tk-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}
.tk-delta.is-up { color: var(--meadow); background: rgba(95, 217, 160, 0.14); }
.tk-delta.is-down { color: var(--rose); background: rgba(255, 107, 139, 0.14); }
.tk-delta.is-flat { color: var(--mist); background: var(--void-4); }

/* Aktivitäten-Seite */
.tk-activity-list { display: flex; flex-direction: column; gap: var(--space-3); }
.tk-activity-card {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  background: var(--void-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}
.tk-activity-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--cat-color) 16%, transparent);
  color: var(--cat-color);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tk-activity-body { flex: 1; min-width: 0; }
.tk-activity-body h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.tk-activity-body p { font-size: 13.5px; color: var(--mist); line-height: 1.5; margin-bottom: var(--space-2); }
.tk-activity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 12px;
  color: var(--mist-dim);
  font-weight: 600;
}
