/* ================================================================
   StepSynced Admin Dashboard — Modern CSS
   Uses same design system vars as main site
   ================================================================ */

:root {
  --maroon: #500000;
  --maroon-light: #8B3A3A;
  --maroon-dark: #2B0000;
  --maroon-mid: #6B1A1A;
  --bg: #F8F8F8;
  --bg-card: #FFFFFF;
  --text-primary: #1A1A1A;
  --text-secondary: #757575;
  --text-muted: #AAAAAA;
  --gold: #FFD700;
  --beginner: #2E7D32;
  --intermediate: #E65100;
  --advanced: #C62828;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 240px;
  --topbar-height: 60px;
  --danger: #dc3545;
  --success: #28a745;
  --info: #17a2b8;
  --warning: #ffc107;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
}

/* ─── Layout ─────────────────────────────────── */

.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────── */

.sidebar {
  width: var(--sidebar-width);
  background: var(--maroon-dark);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition);
}

.sidebar-brand {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand .brand-icon {
  color: var(--gold);
  font-size: 1.3rem;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  list-style: none;
}

.sidebar-nav li {
  list-style: none;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
  background: rgba(255,255,255,0.08);
  color: white;
}

.sidebar-nav a.active {
  background: rgba(255,255,255,0.12);
  color: white;
  border-left-color: var(--gold);
}

.sidebar-nav a .nav-icon {
  width: 20px;
  text-align: center;
  font-size: 1.1rem;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* ─── Main area ──────────────────────────────── */

.main-area {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── Top bar ────────────────────────────────── */

.topbar {
  height: var(--topbar-height);
  background: var(--bg-card);
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--maroon);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-user {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.topbar-user strong {
  color: var(--text-primary);
}

.btn-logout {
  background: none;
  border: 1px solid var(--maroon);
  color: var(--maroon);
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
}

.btn-logout:hover {
  background: var(--maroon);
  color: white;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--maroon);
  padding: 4px;
}

/* ─── Content ────────────────────────────────── */

.content {
  flex: 1;
  padding: 24px;
  max-width: 1400px;
  width: 100%;
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

/* ─── KPI Cards ──────────────────────────────── */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: transform var(--transition), box-shadow var(--transition);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.kpi-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.kpi-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--maroon);
}

.kpi-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ─── Section headers ────────────────────────── */

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ─── Data Tables ────────────────────────────── */

.data-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  overflow: hidden;
  margin-bottom: 24px;
}

.data-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #fafafa;
  border-bottom: 2px solid #eee;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f2f2f2;
  vertical-align: middle;
}

.data-table tr:hover td {
  background: #fafafa;
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* ─── Badges ─────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-active {
  background: #e6f7ee;
  color: var(--success);
}

.badge-inactive {
  background: #fde8ea;
  color: var(--danger);
}

.badge-admin {
  background: #fff3cd;
  color: #856404;
}

.badge-beginner {
  background: #e6f7ee;
  color: var(--beginner);
}

.badge-intermediate {
  background: #fff3e0;
  color: var(--intermediate);
}

.badge-advanced {
  background: #fde8ea;
  color: var(--advanced);
}

.badge-trending {
  background: #fff3cd;
  color: #d63384;
}

.badge-action {
  background: #e8eaf6;
  color: #3949ab;
}

/* ─── Buttons ────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--maroon);
  color: white;
}

.btn-primary:hover {
  background: var(--maroon-mid);
}

.btn-secondary {
  background: #f0f0f0;
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: #e0e0e0;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #c82333;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 0.78rem;
}

.btn-icon-only {
  padding: 6px;
  background: none;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: all var(--transition);
}

.btn-icon-only:hover {
  background: #f5f5f5;
  color: var(--text-primary);
}

.btn-icon-only.danger:hover {
  background: #fde8ea;
  color: var(--danger);
  border-color: var(--danger);
}

/* ─── Search & Filters ───────────────────────── */

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  flex: 1;
  max-width: 400px;
}

.search-bar input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 0.9rem;
  font-family: inherit;
  background: transparent;
  color: var(--text-primary);
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #ddd;
  background: white;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
}

.filter-pill:hover {
  border-color: var(--maroon);
  color: var(--maroon);
}

.filter-pill.active {
  background: var(--maroon);
  color: white;
  border-color: var(--maroon);
}

/* ─── Pagination ─────────────────────────────── */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px;
}

.pagination button {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  background: white;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all var(--transition);
}

.pagination button:hover:not(:disabled) {
  border-color: var(--maroon);
  color: var(--maroon);
}

.pagination button.active {
  background: var(--maroon);
  color: white;
  border-color: var(--maroon);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: default;
}

.pagination-info {
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 0 8px;
}

/* ─── Modal ──────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transform: translateY(20px);
  transition: transform 0.25s;
}

.modal-overlay.open .modal-panel {
  transform: translateY(0);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--maroon);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ─── Forms ──────────────────────────────────── */

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color var(--transition);
  background: white;
  color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--maroon);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-check input[type="checkbox"] {
  width: auto;
}

/* ─── Activity Feed ──────────────────────────── */

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f2f2f2;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.activity-icon.saved { background: #e8eaf6; }
.activity-icon.started { background: #e6f7ee; }
.activity-icon.completed { background: #fff3cd; }
.activity-icon.downloaded { background: #e3f2fd; }

.activity-text {
  flex: 1;
  font-size: 0.88rem;
}

.activity-text strong {
  color: var(--maroon);
}

.activity-time {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ─── User Detail Panel ──────────────────────── */

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.detail-item {
  padding: 10px 14px;
  background: #fafafa;
  border-radius: var(--radius-sm);
}

.detail-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.detail-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-all;
}

/* ─── Chart Area ─────────────────────────────── */

.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.chart-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.chart-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.bar {
  width: 100%;
  max-width: 40px;
  background: var(--maroon);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height 0.4s ease;
}

.bar-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
}

.bar-value {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--maroon);
}
/* ─── User Overview ─────────────────────────── */

.user-overview {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 24px 12px;
  height: 100%;
  min-height: 160px;
}

.overview-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.overview-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--maroon);
  line-height: 1;
}

.overview-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}


.donut-chart {
  display: flex;
  align-items: center;
  gap: 20px;
}

.donut-visual {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

.donut-legend {
  flex: 1;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.82rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ─── Trending Activity Chart ────────────────── */

.trending-chart {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.trending-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trending-bar-rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--maroon);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trending-bar-rank.gold { background: #d4a017; }
.trending-bar-rank.silver { background: #8a8a8a; }
.trending-bar-rank.bronze { background: #a0522d; }

.trending-bar-info {
  width: 160px;
  flex-shrink: 0;
  overflow: hidden;
}

.trending-bar-song {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trending-bar-artist {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trending-bar-track {
  flex: 1;
  height: 32px;
  background: #f2f2f2;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.trending-bar-fill {
  height: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  min-width: 40px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.trending-bar-fill.rank-1 {
  background: linear-gradient(90deg, var(--maroon) 0%, #C0604E 100%);
}
.trending-bar-fill.rank-2 {
  background: linear-gradient(90deg, var(--maroon-mid) 0%, #a05050 100%);
}
.trending-bar-fill.rank-3 {
  background: linear-gradient(90deg, var(--maroon-light) 0%, #b06060 100%);
}
.trending-bar-fill.rank-4 {
  background: linear-gradient(90deg, #8a6060 0%, #b08080 100%);
}
.trending-bar-fill.rank-5 {
  background: linear-gradient(90deg, #9a7a7a 0%, #c0a0a0 100%);
}

.trending-bar-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: white;
  white-space: nowrap;
}

.trending-bar-equation {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  min-width: 170px;
  justify-content: flex-end;
  font-family: 'Inter', monospace;
}

.eq-part {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.eq-part .eq-label {
  font-size: 0.58rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.eq-op {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0 1px;
}

.eq-result {
  font-size: 1rem;
  font-weight: 800;
  color: var(--maroon);
  background: rgba(128, 0, 0, 0.08);
  border-radius: 6px;
  padding: 2px 8px;
}

.trending-empty {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .trending-bar-info {
    width: 100px;
  }
  .trending-bar-equation {
    display: none;
  }
}

/* ─── Toast ──────────────────────────────────── */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--maroon-dark);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  animation: toastIn 0.3s ease;
  max-width: 360px;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Empty State ────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

/* ─── Confirm Dialog ─────────────────────────── */

.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 250;
}

.confirm-box {
  background: white;
  border-radius: var(--radius-md);
  padding: 24px;
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.confirm-box h3 {
  margin-bottom: 8px;
  color: var(--text-primary);
}

.confirm-box p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

/* ─── Responsive ─────────────────────────────── */

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-area {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: block;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .charts-row {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .content {
    padding: 16px;
  }

  .data-table {
    font-size: 0.82rem;
  }

  .data-table th, .data-table td {
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 0 12px;
  }

  .topbar-user {
    display: none;
  }
}

/* ─── Artificial Trending Badges ─────────────── */

.badge-artificial {
  background: #ede7f6;
  color: #6a1b9a;
  font-size: 0.72rem;
  font-weight: 700;
}

/* ─── Trending Bar Badges Row ────────────────── */

.trending-bar-badges {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 3px;
}

/* ─── Natural Rank Indicator ─────────────────── */

.trending-natural-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #7b6b00;
  background: #fff8e1;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid #ffe082;
  vertical-align: middle;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.trending-natural-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffc107;
  flex-shrink: 0;
}

/* ─── Bumped Label ───────────────────────────── */

.trending-bumped-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  color: var(--danger);
  background: #fde8ea;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid #f5c6cb;
  font-weight: 600;
  vertical-align: middle;
  white-space: nowrap;
}

.trending-bumped-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
  flex-shrink: 0;
}

/* Bumped row style — muted */
.trending-bar-row.bumped {
  opacity: 0.5;
}

.trending-bar-row.bumped .trending-bar-song {
  text-decoration: line-through;
  text-decoration-color: var(--text-muted);
}

/* Artificial rank badge color */
.trending-bar-rank.artificial {
  background: #6a1b9a;
}

/* ─── Trending Bar Info Override ──────────────── */

.trending-bar-info {
  width: 200px;
  overflow: visible;
}

/* ─── Trending Slot Timeline Radios ──────────── */

.trending-slot-radios {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  position: relative;
  padding: 4px 0;
  gap: 0;
}

/* Connecting line between dots */
.trending-slot-radios::after {
  content: '';
  position: absolute;
  bottom: 10px;
  left: calc(100% / 12);
  right: calc(100% / 12);
  height: 2px;
  background: #e0e0e0;
  z-index: 0;
}

.form-group .trending-slot-radios label.slot-radio {
  flex: 1;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
  z-index: 1;
  gap: 6px;
  margin-bottom: 0;
  padding: 0;
  border: none;
  background: none;
}

.slot-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.slot-radio .slot-radio-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.slot-radio .slot-radio-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #d0d0d0;
  background: white;
  transition: all 0.2s ease;
}

.slot-radio input[type="radio"]:checked ~ .slot-radio-dot {
  border-color: #6a1b9a;
  background: #6a1b9a;
  box-shadow: 0 0 0 4px rgba(106, 27, 154, 0.15);
}

.slot-radio input[type="radio"]:checked ~ .slot-radio-text {
  color: #6a1b9a;
  font-weight: 700;
}

.slot-radio:hover .slot-radio-dot {
  border-color: #9c27b0;
}

.slot-radio:hover .slot-radio-text {
  color: #9c27b0;
}

/* ─── Video Upload Grid ─────────────────────── */

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.video-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.video-upload-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--bg);
  transition: border-color 0.2s;
}

.video-upload-item:hover {
  border-color: var(--primary);
}

.video-upload-label {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  margin-bottom: 6px;
  border: none;
  background: none;
  padding: 0;
}

.video-upload-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
}

.video-upload-status {
  font-size: 0.75rem;
  font-weight: 600;
}

.video-upload-status.has-video {
  color: var(--success);
}

.video-upload-status.no-video {
  color: var(--text-muted);
}

.video-upload-item input[type="file"] {
  width: 100%;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.video-upload-item input[type="file"]::file-selector-button {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  margin-right: 8px;
}

.video-upload-item input[type="file"]::file-selector-button:hover {
  background: var(--primary-hover);
}

@media (max-width: 600px) {
  .video-upload-grid {
    grid-template-columns: 1fr;
  }
}
