/* ==========================================================================
   W-Music Studio: Modern Glassmorphic Dashboard Design System
   ========================================================================== */

/* Hero Banner */
.dashboard-hero-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(20, 29, 51, 0.85) 0%, rgba(13, 19, 36, 0.95) 100%);
  border: 1px solid var(--border-medium, rgba(255, 255, 255, 0.12));
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.dashboard-hero-banner::after {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.dashboard-hero-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.dashboard-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 700;
  color: #a5b4fc;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.dashboard-hero-banner h2 {
  margin: 4px 0 2px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #ffffff;
}

.dashboard-hero-banner p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-secondary, #cbd5e1);
  line-height: 1.5;
}

.dashboard-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.dashboard-live-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: #6ee7b7;
  white-space: nowrap;
}

.btn-dashboard-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
}

/* KPI Stat Cards Grid */
.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: rgba(19, 28, 49, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg, 16px);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--kpi-accent, var(--primary-gradient));
  opacity: 0.9;
  transition: height 0.2s ease;
}

.kpi-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.5), 0 0 20px var(--kpi-glow, rgba(99, 102, 241, 0.25));
}

.kpi-card:hover::before {
  height: 4px;
}

.kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kpi-icon-bubble {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.kpi-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted, #8492a6);
}

.kpi-value {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.kpi-sub {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted, #8492a6);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Individual Card Accent Themes */
.kpi-songs {
  --kpi-accent: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --kpi-glow: rgba(99, 102, 241, 0.3);
}
.kpi-songs .kpi-icon-bubble {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
}

.kpi-rights {
  --kpi-accent: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  --kpi-glow: rgba(6, 182, 212, 0.3);
}
.kpi-rights .kpi-icon-bubble {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.3);
}

.kpi-fingerprints {
  --kpi-accent: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --kpi-glow: rgba(16, 185, 129, 0.3);
}
.kpi-fingerprints .kpi-icon-bubble {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
}

.kpi-active {
  --kpi-accent: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  --kpi-glow: rgba(168, 85, 247, 0.3);
}
.kpi-active .kpi-icon-bubble {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.3);
}

.kpi-queued {
  --kpi-accent: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --kpi-glow: rgba(245, 158, 11, 0.3);
}
.kpi-queued .kpi-icon-bubble {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
}

.kpi-failed {
  --kpi-accent: linear-gradient(135deg, #f43f5e 0%, #dc2626 100%);
  --kpi-glow: rgba(244, 63, 94, 0.3);
}
.kpi-failed .kpi-icon-bubble {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.3);
}

/* Quick Action Shortcuts Bar */
.dashboard-shortcuts-panel {
  background: rgba(16, 24, 43, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg, 16px);
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.3);
}

.shortcuts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.shortcuts-header h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary, #cbd5e1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.shortcut-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--text-main, #f8fafc);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: none;
}

.shortcut-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.shortcut-icon {
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.shortcut-btn.btn-primary-action {
  background: var(--primary-gradient);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.shortcut-btn.btn-primary-action:hover {
  background: var(--primary-gradient-hover);
  box-shadow: var(--glow-primary);
}

/* Two-Column Main Content Grid */
.dashboard-content-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
  align-items: start;
}

.dashboard-panel-card {
  background: rgba(19, 28, 49, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg, 16px);
  padding: 22px;
  box-shadow: 0 6px 24px -4px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dashboard-panel-card h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.dashboard-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-panel-head-link {
  font-size: 12px;
  font-weight: 600;
  color: #a5b4fc;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  box-shadow: none;
  transition: all 0.15s ease;
}

.dashboard-panel-head-link:hover {
  color: #ffffff;
  background: rgba(99, 102, 241, 0.15);
  transform: none;
}

/* Recent Songs Table & Rows */
.recent-songs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recent-song-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  transition: all 0.18s ease;
}

.recent-song-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateX(3px);
}

.recent-song-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.recent-song-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.recent-song-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.recent-song-titles strong {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-song-titles small {
  font-size: 12px;
  color: var(--text-muted, #8492a6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-song-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.recent-song-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.recent-song-badge.status-active {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.recent-song-badge.status-pending {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde047;
}

.recent-song-badge.status-not_submitted {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
}

.recent-song-badge.status-blocked,
.recent-song-badge.status-rejected {
  background: rgba(244, 63, 94, 0.18);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fda4af;
}

.btn-open-song {
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary, #cbd5e1);
  box-shadow: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-open-song:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
  color: #ffffff;
  transform: translateY(-1px);
}

.dashboard-empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted, #8492a6);
}
.dashboard-empty-state p {
  margin: 0 0 12px;
  font-size: 13px;
}

/* Scrollable Container for Recent Activity */
.dashboard-audit-container {
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .dashboard-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard-hero-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .dashboard-hero-actions {
    width: 100%;
    justify-content: space-between;
  }
  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .shortcuts-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }
  .shortcuts-grid {
    grid-template-columns: 1fr;
  }
  .recent-song-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .recent-song-meta {
    width: 100%;
    justify-content: space-between;
  }
}
