:root {
  --tt-accent: #f4b544;
  --tt-accent-dark: #ffd075;
  --tt-blue: #ffd075;
}

.page-header { background: var(--surface-strong); }

.dashboard-grid .table-wrap,
#tallies-panel .table-wrap,
.tallies-section {
  box-shadow: 0 22px 52px rgba(8, 38, 24, 0.09);
}

#songs-panel .songs-table thead tr,
#tallies-panel .songs-table thead tr,
.tallies-section .songs-table thead tr {
  background: #faf8f5;
}

.badge {
  border: 1px solid transparent;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.badge-gold {
  background: #f7efe1;
  color: var(--text);
  border-color: rgba(178, 111, 24, 0.14);
}

.badge-plat-1,
.badge-plat-2,
.badge-plat-3,
.badge-plat-4,
.badge-plat-5,
.badge-plat-6,
.badge-plat-7,
.badge-plat-8 {
  background: #f7f3ed;
  color: var(--text);
  border-color: rgba(72, 50, 33, 0.1);
}

.preview-rank {
  background: rgba(152, 39, 29, 0.08);
}

.detail-stat-item {
  background: var(--surface-strong);
}

.section-link {
  color: var(--tt-blue);
}

.section-link:hover {
  color: var(--tt-accent-dark);
}

/* Flat black refresh */
:root {
  --tt-accent: #ffffff;
  --tt-accent-dark: #ffffff;
  --tt-blue: #ffffff;
}

.dashboard-grid .table-wrap,
#tallies-panel .table-wrap,
.tallies-section {
  box-shadow: none;
}

#songs-panel .songs-table thead tr,
#tallies-panel .songs-table thead tr,
.tallies-section .songs-table thead tr {
  background: #0d0d0d;
}

.badge-gold {
  background: #1d1810;
  color: var(--accent-gold);
  border-color: rgba(224, 187, 98, 0.16);
}

.badge-plat-1,
.badge-plat-2,
.badge-plat-3,
.badge-plat-4,
.badge-plat-5,
.badge-plat-6,
.badge-plat-7,
.badge-plat-8,
.preview-rank {
  background: #171717;
  border-color: rgba(255, 255, 255, 0.1);
}

/* TurnTable Records table layout */
.dsp-page {
  display: grid;
  gap: 1rem;
}

.dsp-section {
  margin-top: 1rem;
}

.dsp-table-wrap {
  overflow-x: auto;
}

.dsp-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: fixed;
}

.dsp-table th,
.dsp-table td {
  padding: 0.7rem 0.85rem;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dsp-table th:nth-child(1),
.dsp-table td:nth-child(1) {
  width: 8%;
}

.dsp-table th:nth-child(2),
.dsp-table td:nth-child(2) {
  width: 20%;
}

.dsp-table th:nth-child(3),
.dsp-table td:nth-child(3) {
  width: 50%;
}

.dsp-table th:nth-child(4),
.dsp-table td:nth-child(4) {
  width: 22%;
  text-align: right;
  white-space: nowrap;
}

.dsp-table .song-cell {
  overflow-wrap: anywhere;
}

.dsp-table .rank-cell {
  white-space: nowrap;
}

@media (max-width: 720px) {
  .dsp-table {
    min-width: 680px;
  }

  .dsp-table th,
  .dsp-table td {
    padding: 0.58rem 0.62rem;
  }
}
