/* ======== DASHBOARD LAYOUT ======== */

.dash-body {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ======== SIDEBAR ======== */

.dash-sidebar {
  width: 240px;
  min-height: 100vh;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
}

.dash-brand {
  margin-bottom: 3rem;
}

.dash-brand-link {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.dash-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.dash-nav-item:hover {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.04);
}

.dash-nav-item.active {
  color: var(--accent);
  background: var(--accent-glow);
}

.nav-icon {
  font-size: 1rem;
  opacity: 0.7;
}

.dash-sidebar-footer {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.artist-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.artist-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  flex-shrink: 0;
}

.artist-name-sm {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--fg);
}

.artist-plan {
  font-size: 0.75rem;
  color: var(--fg-muted);
}

/* ======== MOBILE HEADER ======== */

.dash-mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.mobile-menu-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}

.mobile-menu-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ======== MAIN CONTENT ======== */

.dash-main {
  margin-left: 240px;
  flex: 1;
  padding: 2.5rem 2.5rem;
  max-width: 1200px;
}

.dash-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
}

.dash-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.dash-subtitle {
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-top: 0.25rem;
}

/* ======== GENERATE BUTTON ======== */

.btn-generate {
  background: var(--accent);
  color: #0a0a0f;
  border: none;
  border-radius: 100px;
  padding: 0.65rem 1.5rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-generate:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.btn-generate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ======== STATS GRID ======== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  transition: border-color 0.2s;
}

.stat-card:hover {
  border-color: rgba(240, 160, 48, 0.3);
}

.accent-card {
  border-color: rgba(240, 160, 48, 0.25);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(240, 160, 48, 0.05) 100%);
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.accent-card .stat-value {
  color: var(--accent);
}

.stat-delta {
  font-size: 0.78rem;
  font-weight: 500;
}

.stat-delta.up { color: #4ade80; }
.stat-delta.down { color: #f87171; }
.stat-delta.flat { color: var(--fg-muted); }

/* ======== CARD ROWS ======== */

.dash-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg);
}

.card-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(240, 160, 48, 0.2);
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
  letter-spacing: 0.05em;
}

.card-badge.muted {
  color: var(--fg-muted);
  background: rgba(138, 136, 128, 0.08);
  border-color: var(--border);
}

/* ======== CHART ======== */

.chart-wrap {
  height: 220px;
  position: relative;
}

/* ======== TOP TRACKS ======== */

.tracks-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.track-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.track-row:last-child {
  border-bottom: none;
}

.track-row:hover {
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.track-rank {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--fg-muted);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.track-info {
  flex: 1;
  min-width: 0;
}

.track-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-streams {
  font-size: 0.75rem;
  color: var(--fg-muted);
  margin-top: 0.1rem;
}

.track-trend {
  font-size: 1rem;
  flex-shrink: 0;
  font-weight: 700;
}

.trend-up { color: #4ade80; }
.trend-down { color: #f87171; }
.trend-flat { color: var(--fg-muted); }

/* ======== UPCOMING RELEASES ======== */

.releases-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.release-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.release-date-block {
  background: var(--accent-glow);
  border: 1px solid rgba(240, 160, 48, 0.2);
  border-radius: 10px;
  padding: 0.4rem 0.75rem;
  text-align: center;
  min-width: 52px;
  flex-shrink: 0;
}

.release-month {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.release-day {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
}

.release-info {
  flex: 1;
  min-width: 0;
}

.release-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.release-type-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  margin-top: 0.2rem;
}

.release-status {
  font-size: 0.75rem;
  font-weight: 500;
  flex-shrink: 0;
}

.status-scheduled { color: #60a5fa; }
.status-live { color: #4ade80; }
.status-draft { color: var(--fg-muted); }

/* ======== AI REPORT ======== */

.report-summary {
  font-size: 0.95rem;
  color: var(--fg);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.report-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.report-actions-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.25rem;
}

.report-action-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(240, 160, 48, 0.04);
  border: 1px solid rgba(240, 160, 48, 0.12);
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--fg);
  line-height: 1.5;
}

.action-num {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.7;
  flex-shrink: 0;
  padding-top: 0.1rem;
}

.report-empty-text {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.7;
}

/* Loading animation */
.report-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem 0;
}

.loading-eq {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 40px;
}

.l-bar {
  width: 4px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.7;
  animation: eq-pulse 1.2s ease-in-out infinite;
}

.l-bar:nth-child(1) { height: 16px; animation-delay: 0s; }
.l-bar:nth-child(2) { height: 28px; animation-delay: 0.15s; }
.l-bar:nth-child(3) { height: 36px; animation-delay: 0.1s; }
.l-bar:nth-child(4) { height: 24px; animation-delay: 0.25s; }
.l-bar:nth-child(5) { height: 18px; animation-delay: 0.05s; }

.loading-text {
  font-size: 0.85rem;
  color: var(--fg-muted);
  font-style: italic;
}

/* Empty state */
.empty-state {
  font-size: 0.9rem;
  color: var(--fg-muted);
  padding: 1.5rem 0;
}

/* ======== RESPONSIVE ======== */

@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .chart-card { order: 1; }
  .tracks-card { order: 2; }
  .releases-card { order: 3; }
  .report-card { order: 4; }
}

@media (max-width: 768px) {
  .dash-mobile-header {
    display: flex;
  }

  .dash-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    top: 0;
  }

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

  .dash-main {
    margin-left: 0;
    padding: 1.5rem;
    padding-top: 5rem;
  }

  .dash-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-generate {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .stat-value {
    font-size: 1.35rem;
  }

  .stat-card {
    padding: 1.25rem;
  }

  .dash-card {
    padding: 1.25rem;
  }
}
