/* ================================================================
   analytics.css — SITE STATS PAGE
   Self-hosted analytics dashboard. Big terminal readouts, a
   14-day bar chart, and a per-page breakdown.
================================================================ */

/* ── Header strip (matches clHeader / txHeader family) ────────── */
.anHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #2d0048;
  background: rgba(8,0,24,0.75);
  padding: 12px 16px;
  margin-bottom: 22px;
}

.anHeaderLabel {
  font-family: monospace;
  font-size: 9px;
  color: #7a00aa;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.anHeaderTitle {
  font-size: 14px;
  color: #d4c8ff;
  letter-spacing: 2px;
  margin-top: 4px;
  text-shadow: 0 0 10px #aa66ff;
}

.anLive {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: monospace;
  font-size: 10px;
  letter-spacing: 2px;
  color: #44ff99;
}

.anLiveDot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #44ff99;
  box-shadow: 0 0 8px #44ff99;
  animation: anPulse 2s ease-in-out infinite;
}

@keyframes anPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

/* ── Stat tiles ───────────────────────────────────────────────── */
.anGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.anTile {
  border: 1px solid #2d0048;
  background: rgba(8,0,24,0.6);
  padding: 14px 12px;
  text-align: center;
}

.anTile.anTileLive {
  border-color: #1f4d33;
  background: rgba(0,20,10,0.45);
}

.anTileLabel {
  font-family: monospace;
  font-size: 8px;
  color: #7a00aa;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.anTileLive .anTileLabel { color: #2e8055; }

.anTileValue {
  font-family: monospace;
  font-size: 26px;
  color: #cc99ff;
  text-shadow: 0 0 12px rgba(170,102,255,0.5);
  line-height: 1;
}

.anTileLive .anTileValue {
  color: #44ff99;
  text-shadow: 0 0 12px rgba(68,255,153,0.5);
}

.anTileSub {
  font-family: monospace;
  font-size: 9px;
  color: #5544aa;
  letter-spacing: 1px;
  margin-top: 7px;
}

/* ── 14-day chart ─────────────────────────────────────────────── */
.anChart {
  border: 1px solid #2d0048;
  background: rgba(8,0,24,0.6);
  padding: 16px;
  margin-bottom: 24px;
}

.anChartBars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 110px;
  margin-top: 12px;
}

.anBarCol {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  height: 100%;
  justify-content: flex-end;
}

.anBar {
  width: 100%;
  min-height: 2px;
  background: linear-gradient(to top, #4a0080, #aa44ff);
  box-shadow: 0 0 8px rgba(170,68,255,0.35);
  transition: height 0.5s ease-out;
}

.anBarCol:last-child .anBar {
  background: linear-gradient(to top, #1f6644, #44ff99);
  box-shadow: 0 0 8px rgba(68,255,153,0.35);
}

.anBarLabel {
  font-family: monospace;
  font-size: 7px;
  color: #5544aa;
  letter-spacing: 0;
  white-space: nowrap;
}

.anBarCount {
  font-family: monospace;
  font-size: 8px;
  color: #9b86c8;
}

/* ── Per-page table ───────────────────────────────────────────── */
.anPages {
  border: 1px solid #2d0048;
  background: rgba(8,0,24,0.6);
  padding: 16px;
  margin-bottom: 24px;
}

.anSectionLabel {
  font-family: monospace;
  font-size: 9px;
  color: #7a00aa;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.anPageRow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.anPageName {
  font-family: monospace;
  font-size: 10px;
  color: #b9a8e0;
  letter-spacing: 1px;
  width: 110px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.anPageTrack {
  flex: 1;
  height: 10px;
  background: rgba(45,0,72,0.4);
  overflow: hidden;
}

.anPageFill {
  height: 100%;
  background: linear-gradient(to right, #4a0080, #aa44ff);
  box-shadow: 0 0 6px rgba(170,68,255,0.4);
  transition: width 0.5s ease-out;
}

.anPageCount {
  font-family: monospace;
  font-size: 10px;
  color: #cc99ff;
  width: 52px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Privacy note + error state ───────────────────────────────── */
.anNote {
  font-family: monospace;
  font-size: 9px;
  color: #5544aa;
  letter-spacing: 1px;
  line-height: 1.8;
  border-left: 3px solid #2d0048;
  padding-left: 12px;
}

.anError {
  display: none;
  font-family: monospace;
  font-size: 11px;
  color: #ff6688;
  letter-spacing: 1px;
  border: 1px solid #660022;
  background: rgba(30,0,10,0.5);
  padding: 12px 16px;
  margin-bottom: 20px;
}

/* ── Narrow screens ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .anGrid { grid-template-columns: 1fr 1fr; }
  .anBarLabel { display: none; }
  .anPageName { width: 80px; }
}
