.table-widget {
  width: 100%;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
}

.data-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--text-primary);
  font-size: 13px;
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 44px;
  border-bottom: 1px solid rgba(var(--rgb-accent-primary), 0.18);
  background: rgba(37, 36, 40, 0.98);
  backdrop-filter: blur(12px);
  color: var(--text-secondary);
  font-weight: 520;
  text-align: left;
  white-space: nowrap;
}

.data-table th,
.data-table td {
  padding: 9px 10px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.data-table tbody tr {
  background: rgba(255, 255, 255, 0.012);
}

.data-table tbody tr:hover {
  background: rgba(var(--rgb-accent-primary), 0.055);
}

.th-button {
  width: 100%;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  white-space: nowrap;
}

.th-button:hover { color: var(--text-primary); }

.sort-mark {
  display: inline-flex;
  width: 14px;
  color: var(--accent-secondary);
  font-size: 10px;
  opacity: 0.55;
}

.th-button.is-active .sort-mark { opacity: 1; }

.cover-cell {
  width: 52px;
}

.cover-thumb {
  width: 38px;
  height: 38px;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.20);
}

.primary-cell {
  min-width: 220px;
  max-width: 340px;
}

.secondary-cell {
  min-width: 170px;
  max-width: 280px;
}

.ellipsis {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-title {
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.22;
}

.item-subtitle {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.2;
}

.muted { color: var(--text-secondary); }
.faint { color: var(--text-faint); }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.center { text-align: center; }

.badge-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.badge.valid {
  color: var(--accent-secondary);
  border-color: var(--accent-secondary-border);
  background: var(--accent-secondary-bg);
}

.badge.checked {
  color: var(--accent-primary);
  border-color: var(--accent-primary-border-soft);
  background: var(--accent-primary-bg-soft);
}

.badge.rereleased {
  color: var(--status-success);
  border-color: rgba(100, 183, 67, 0.34);
  background: var(--status-success-bg);
}

.badge.unverified {
  color: var(--text-faint);
}

.spotify-link {
  color: var(--accent-primary);
  font-size: 12px;
  white-space: nowrap;
}

.table-error {
  padding: 18px;
  color: var(--status-danger);
}

.table-error strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text-primary);
}

@media (max-width: 980px) {
  .data-table { min-width: 980px; }
}

/* v8 table polish */
.data-table[data-entity="albums"] {
  min-width: 1220px;
}

.data-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.018);
}

.item-title[href] {
  color: var(--text-primary);
  text-decoration: none;
}

.item-title[href]:hover {
  color: var(--accent-primary);
  text-decoration: none;
}

.country-badge {
  min-width: 34px;
  justify-content: center;
  color: var(--text-primary);
  background: rgba(255,255,255,0.045);
}

.spotify-link {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(var(--rgb-accent-primary), 0.22);
  background: rgba(var(--rgb-accent-primary), 0.07);
  color: var(--accent-primary);
  text-decoration: none;
}

.spotify-link:hover {
  border-color: rgba(var(--rgb-accent-primary), 0.46);
  background: rgba(var(--rgb-accent-primary), 0.12);
  text-decoration: none;
}

.badge.not-ukrainian {
  color: var(--status-danger, #ff8b8b);
  border-color: rgba(255, 120, 120, 0.32);
  background: rgba(255, 120, 120, 0.10);
}
