/* "Credits" page. Everything shared lives in tokens.css / components.css / account.css. */

/* ---------- summary strip ---------- */
.credits-stats { display: flex; align-items: center; gap: 18px; padding: 10px 12px; margin-bottom: 18px; }
.credits-balance-stat { display: flex; align-items: center; gap: 12px; margin: 0; padding: 8px 20px 8px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-strong); }
.credits-stat__icon { display: grid; place-items: center; width: 30px; height: 30px; flex: none; }
.credits-stat__icon .icon { width: 24px; height: 24px; }
.credits-stat__icon--quiet { width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink-secondary); }
.credits-stat__icon--quiet .icon { width: 18px; height: 18px; }
.credits-stat__value { font-size: 28px; line-height: 1; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.credits-stat__unit { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.credits-unlocked { display: flex; align-items: center; gap: 10px; margin: 0; padding-left: 18px; border-left: 1px solid var(--stroke); font-size: 14px; font-weight: 600; }
.credits-buy-link { margin-left: auto; width: auto; flex: none; }

/* ---------- history ---------- */
.credits-table-wrap { overflow: hidden; }
.credits-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.credits-table th { padding: 11px 16px; text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-tertiary); background: var(--surface-2); border-bottom: 1px solid var(--stroke); }
.credits-table td { padding: 13px 16px; border-bottom: 1px solid var(--stroke); vertical-align: middle; }
.credits-table tbody tr:last-child td { border-bottom: 0; }
.credits-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.credits-date { display: grid; gap: 1px; white-space: nowrap; font-weight: 600; }
.credits-date__clock { font-size: 12px; font-weight: 400; color: var(--ink-tertiary); }

.credits-activity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.credits-activity__text { display: grid; gap: 1px; min-width: 0; }
.credits-activity__label { font-weight: 600; }
.credits-activity__song { font-size: 13px; color: var(--ink-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 36ch; }
.credits-activity__song:hover { color: var(--accent-strong); }

.credits-badge { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--surface-2); color: var(--ink-secondary); }
.credits-badge .icon { width: 16px; height: 16px; }
.credits-badge--in { background: var(--positive-soft); color: var(--positive-strong); }
.credits-badge--out { background: var(--accent-soft); color: var(--accent-strong); }

.credits-delta { font-weight: 700; }
.credits-delta.is-in { color: var(--positive-strong); }
.credits-delta.is-out { color: var(--accent-strong); }
.credits-balance { font-weight: 600; color: var(--ink); }

.credits-empty { border: 0; }
.credits-empty .icon-xl { color: var(--accent); }
.credits-more { margin-top: 16px; }

/* ---------- loading ---------- */
.stats-skeleton { height: 72px; margin-bottom: 18px; border-radius: var(--radius-md); }
.table-skeleton { height: 280px; border-radius: var(--radius-md); }

@media (max-width: 560px) {
  .credits-stats { flex-wrap: wrap; gap: 10px; }
  .credits-balance-stat { flex: 1 1 100%; }
  .credits-buy-link { margin-left: 0; width: 100%; justify-content: center; }
  .credits-table th, .credits-table td { padding: 11px 10px; }
  .credits-activity { gap: 9px; }
  .credits-badge { display: none; }
  .credits-activity__song { max-width: 18ch; }
}
