/* Studio Analytics — dark theme tokens mirror studio-home.css. */
.analytics-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 32px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  position: sticky;
  top: 0;
  background: rgba(8,8,14,0.95);
  backdrop-filter: blur(8px);
  z-index: 10;
}
.back-link {
  font-size: 0.85rem;
  color: #94a3b8;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 6px 12px;
  transition: color 0.15s, border-color 0.15s;
}
.back-link:hover { color: var(--accent); border-color: rgba(200,71,244,0.4); }
.analytics-title-wrap { flex: 1; min-width: 0; }
.analytics-header h1 {
  font-family: 'Syne', 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
}
.analytics-header .subtitle { color: #94a3b8; font-size: 0.8rem; margin: 2px 0 0; }

.range-toggle {
  display: inline-flex;
  gap: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 999px;
  padding: 4px;
}
.range-chip {
  background: transparent;
  border: 0;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.range-chip:hover { color: #f1f5f9; }
.range-chip.active {
  background: linear-gradient(135deg, var(--accent, #c847f4), #4ecaff);
  color: #fff;
}

.analytics-main {
  max-width: 880px;
  margin: 0 auto;
  padding: 20px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.analytics-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 20px 22px;
}
.analytics-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.analytics-card-header h2 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4ecaff;
  margin: 0;
}
.analytics-card-hint { color: #64748b; font-size: 0.72rem; }

/* Song list */
.song-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.song-row {
  display: grid;
  grid-template-columns: minmax(0,1.4fr) minmax(0,2fr) 70px 110px;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
}
.song-row-title { color: #f1f5f9; font-weight: 600; font-size: 0.92rem; }
.song-row-sub { color: #64748b; font-size: 0.72rem; margin-top: 2px; display: flex; gap: 8px; }
.song-genre {
  background: rgba(200,71,244,0.12);
  color: #c847f4;
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: 600;
  text-transform: capitalize;
}
.song-slug { color: #475569; font-family: monospace; }
.song-row-bars {
  height: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
}
.song-bar {
  height: 100%;
  background: linear-gradient(90deg, #4ecaff, #c847f4);
  border-radius: 4px;
  transition: width 0.4s ease-out;
}
.song-spark { display: block; width: 60px; height: 22px; }
.song-spark-line {
  fill: none;
  stroke: #fb923c;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.song-row-stats {
  display: flex;
  gap: 6px;
  align-items: baseline;
  font-size: 0.78rem;
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
  justify-content: flex-end;
}
.stat-delim { color: #475569; }
.stat-count { color: #4ecaff; font-weight: 600; }
.stat-share { color: #c847f4; font-weight: 600; }
.stat-save { color: #fb923c; font-weight: 600; }

/* Trend svg */
.trend-svg-wrap {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 10px;
  position: relative;
}
.trend-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-size: 0.78rem;
  pointer-events: none;
}

/* Geo table */
.geo-table { width: 100%; border-collapse: collapse; }
.geo-table thead th {
  text-align: left;
  padding: 8px 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.geo-table thead th.num { text-align: right; }
.geo-table td {
  padding: 9px 4px;
  font-size: 0.85rem;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-variant-numeric: tabular-nums;
}
.geo-table td.num { text-align: right; color: #4ecaff; font-weight: 600; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 36px 16px;
  color: #94a3b8;
  font-size: 0.92rem;
}
.empty-state.small { padding: 16px 8px; font-size: 0.85rem; }
.empty-state-cta {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent, #c847f4);
  text-decoration: none;
  border: 1px solid rgba(200,71,244,0.35);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 600;
}
.empty-state-cta:hover { background: rgba(200,71,244,0.08); }

/* Mobile */
@media (max-width: 720px) {
  .analytics-header { flex-wrap: wrap; padding: 18px 16px; gap: 12px; }
  .analytics-title-wrap { order: 2; flex: 1 0 100%; }
  .range-toggle { order: 3; margin-left: auto; }
  .analytics-main { padding: 14px 14px 80px; }
  .song-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .song-row-bars { width: 100%; }
  .song-row-spark { display: none; }
  .song-row-stats { justify-content: flex-start; }
}
