*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; max-width: 100vw; }

:root {
  --bg: #030303;
  --sidebar-bg: #000000;
  --sidebar-active: rgba(255, 255, 255, 0.12);
  --separator: rgba(255, 255, 255, 0.06);
  --text: #ffffff;
  --text-secondary: #aaaaaa;
  --text-tertiary: #606060;
  --accent: #ffffff;
  --accent-hover: #e0e0e0;
  --link: #aaaaaa;
  --orange: #ff9500;
  --packs-green: #34c759;
  --green: #34c759;
  --red: #ff4444;
  --pink: #ff2d55;
  --surface: #1a1a1a;
  --surface2: #272727;
  --surface3: #3a3a3a;
  --sidebar-width: 240px;
}

html { font-size: 16px; }
body {
  font-family: -apple-system, "system-ui", "Apple Color Emoji", "SF Pro", "SF Pro Icons", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--link); text-decoration: none; }
a:hover { opacity: 0.85; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ===== LAYOUT: Sidebar + Main ===== */
.app { min-height: 100vh; }

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

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--separator);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 12px;
  z-index: 50;
  overflow-y: auto;
}

.sidebar-logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  padding: 8px 12px 24px;
  letter-spacing: -0.02em;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: inherit;
  width: 100%;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.sidebar-item.active {
  background: var(--sidebar-active);
  color: #ffffff;
  font-weight: 600;
}

.sidebar-item svg {
  flex-shrink: 0;
  color: var(--text-tertiary);
}

.sidebar-item.active svg {
  color: #ffffff;
}

.sidebar-bottom {
  padding-top: 16px;
  border-top: 1px solid var(--separator);
  margin-top: auto;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-logout-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  transition: color 0.15s;
}
.sidebar-logout-btn:hover { color: var(--text); }

.sidebar-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Main content area */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 32px 40px 120px;
  min-height: 100vh;
  max-width: 100%;
}

.section-title {
  font-size: 34px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}
.btn:hover { opacity: 0.85; }
.btn:active { transform: scale(0.97); }

.btn-primary, .btn-save, .btn-secondary {
  background: #34c759;
  color: #000;
  border-radius: 6px;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
}
.btn-ghost:hover { color: var(--text); }

.btn-danger {
  background: transparent;
  color: var(--red);
  border: none;
}

.btn-success {
  background: rgba(48, 209, 88, 0.15);
  color: var(--green);
}

.btn-sm { padding: 6px 14px; font-size: 13px; }

/* ===== Cards ===== */
.card {
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

/* ===== Forms ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.2);
}
.form-group input::placeholder, .form-group textarea::placeholder {
  color: var(--text-tertiary);
}
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

/* ===== Beat list (Apple Music song rows) ===== */
.beat-list {
  border-top: 1px solid var(--separator);
}

.beat-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--separator);
  background: transparent;
  transition: background 0.1s;
  margin: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  box-shadow: none;
}

.beat-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.beat-artwork {
  width: 50px;
  height: 50px;
  border-radius: 5px;
  background: var(--surface);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.beat-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
}

.beat-artwork .icon { font-size: 1.2rem; opacity: 0.4; }
.beat-artwork-text {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.beat-info { flex: 1; min-width: 0; }
.beat-title { font-weight: 600; font-size: 15px; color: var(--text); }
.beat-meta { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.beat-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.beat-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  align-items: center;
}

.beat-actions .btn {
  padding: 6px 10px;
  border-radius: 6px;
}

/* ===== Audio Player (bottom bar) ===== */
.player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: none;
  padding: 0;
  display: none;
  z-index: 100;
  flex-direction: column;
}

.player.active { display: flex; }

/* Progress bar spanning full width at top of player */
.player-progress {
  width: 100%;
  height: 3px;
  background: var(--surface3);
  cursor: pointer;
  flex-shrink: 0;
}

.player-progress-fill {
  height: 100%;
  background: #34c759;
  width: 0%;
  transition: width 0.15s linear;
}

.player-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 24px;
  cursor: pointer;
}

.player-artwork {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: var(--surface2);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-info {
  min-width: 0;
  max-width: 200px;
}

.player-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-time {
  font-size: 12px;
  font-family: inherit;
  color: var(--text-secondary);
  white-space: nowrap;
  margin-top: 2px;
}

/* Play button — filled triangle, no circle */
.play-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.15s;
  border-radius: 0;
}

.play-btn:hover { opacity: 0.7; }
.play-btn svg { fill: var(--text); stroke: none; }

/* Volume toggle + vertical popup */
.volume-toggle-wrap {
  position: relative;
  flex-shrink: 0;
}

.player-ctrl-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.15s;
}
.player-ctrl-btn:hover { color: var(--text); }

.loop-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.15s;
}
.loop-btn:hover { color: var(--text); }
.loop-btn.active { color: var(--text); }

.vol-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.15s;
}
.vol-btn:hover { color: var(--text); }

.volume-popup {
  display: none;
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface2);
  border: 1px solid var(--separator);
  border-radius: 8px;
  padding: 16px 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  z-index: 110;
}
.volume-popup.show { display: block; }

.volume-slider-v {
  -webkit-appearance: slider-vertical;
  appearance: auto;
  writing-mode: vertical-lr;
  direction: rtl;
  width: 6px;
  height: 100px;
  accent-color: var(--accent);
  outline: none;
}

/* ===== Fullscreen Player ===== */
.full-player-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
}
.full-player-overlay.show { display: flex; }

.full-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 40px;
  max-width: 420px;
  width: 100%;
}

.full-player-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
}
.full-player-close:hover { color: var(--text); }

.full-player-artwork {
  width: 280px;
  height: 280px;
  border-radius: 12px;
  background: var(--surface2);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.full-player-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.full-player-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.full-player-progress-wrap {
  width: 100%;
  height: 4px;
  background: var(--surface3);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}
.full-player-progress-fill {
  height: 100%;
  background: var(--text);
  border-radius: 2px;
  width: 0%;
  transition: width 0.15s linear;
}

.full-player-time {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 12px;
  color: var(--text-secondary);
}

.full-player-controls {
  display: flex;
  align-items: center;
  gap: 24px;
}

.full-play-btn {
  width: 64px;
  height: 64px;
  border-radius: 0;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s;
}
.full-play-btn:hover { opacity: 0.7; }
.full-play-btn svg { fill: var(--text); stroke: none; }

.full-loop-btn, .full-ctrl-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}
.full-loop-btn:hover, .full-ctrl-btn:hover { color: var(--text); }

.full-player-volume {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  color: var(--text-secondary);
}
.full-volume-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--surface3);
  border-radius: 2px;
  outline: none;
  accent-color: #ffffff;
}
.full-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 50%;
  cursor: pointer;
}

/* ===== Auth screens ===== */
.auth-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 380px;
  border: none;
  box-shadow: none;
  background: transparent;
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 32px;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.auth-card .btn-save {
  background: #34c759;
  color: #000000;
  border-radius: 6px;
  font-size: 16px;
  padding: 12px;
  text-align: center;
  justify-content: center;
  width: 100%;
}

.auth-toggle {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ===== Table ===== */
.log-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.log-table th { text-align: left; color: var(--text-secondary); padding: 8px; border-bottom: 1px solid var(--separator); font-weight: 500; }
.log-table td { padding: 8px; border-bottom: 1px solid var(--separator); }

/* ===== Permission badges ===== */
.perm-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}
.perm-listen { background: rgba(255,0,0,0.12); color: var(--accent); }
.perm-download { background: rgba(48,209,88,0.15); color: var(--green); }
.perm-stems { background: rgba(255,159,10,0.15); color: var(--orange); }

/* ===== Empty state ===== */
.empty { text-align: center; padding: 48px; color: var(--text-secondary); }
.empty .icon { font-size: 2rem; margin-bottom: 12px; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: #323232;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  color: #ffffff;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s;
}
.toast.show { opacity: 1; }

/* ===== Profile ===== */
.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--surface);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-placeholder {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.profile-info { flex: 1; }
.profile-username { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.profile-bio { font-size: 15px; color: var(--text-secondary); margin-top: 6px; line-height: 1.4; }

.profile-edit-header { display: flex; align-items: center; gap: 20px; }
.profile-avatar-large {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--surface);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-avatar-large img, .profile-edit-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.profile-edit-avatar-placeholder {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Producer card */
.producer-card { transition: background 0.15s; }
.producer-card:hover { background: rgba(255,255,255,0.06); }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal {
  background: #1a1a1a;
  border-radius: 8px;
  padding: 24px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  animation: fadeIn 0.2s ease;
}
.modal h3 { margin-bottom: 16px; font-size: 20px; font-weight: 700; }

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

/* ===== Permission toggles ===== */
.perm-artist-list { margin-top: 12px; }
.perm-artist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--separator);
  gap: 12px;
}
.perm-artist-row:last-child { border-bottom: none; }
.perm-artist-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.perm-artist-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--surface);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.perm-artist-avatar img { width: 100%; height: 100%; object-fit: cover; }
.perm-artist-name { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.perm-toggles { display: flex; gap: 6px; flex-shrink: 0; }
.perm-toggle {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  background: var(--surface2);
  color: var(--text-secondary);
  border: none;
  border-radius: 6px;
  transition: all 0.15s;
}
.perm-toggle:hover { opacity: 0.85; }
.perm-toggle.active {
  background: #34c759;
  color: #000;
}

/* ===== Profile view ===== */
.profile-view-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 20px;
}

.profile-view-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--surface);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.profile-view-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-view-initial { font-size: 3rem; font-weight: 700; color: var(--accent); }
.profile-view-name {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.profile-view-bio {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 400px;
  margin-top: 8px;
}

/* Role badges */
.role-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  background: var(--surface2);
  color: var(--text-secondary);
}
.role-badge-producer, .role-badge.producer { background: #34c759; color: #000; border: none; border-radius: 6px; padding: 2px 10px; font-size: 11px; font-weight: 600; }
.role-badge-artist, .role-badge.artist { background: #34c759; color: #000; border: none; border-radius: 6px; padding: 2px 10px; font-size: 11px; font-weight: 600; }

/* ===== Filter bar ===== */
.filter-bar { margin-bottom: 16px; }
.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 10px 14px;
  margin-bottom: 10px;
  border-radius: 6px;
}
.search-wrap svg { color: var(--text-secondary); flex-shrink: 0; }
.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  outline: none;
}
.search-input::placeholder { color: var(--text-tertiary); }
.tag-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-btn {
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  background: var(--surface2);
  color: var(--text-secondary);
  border: none;
  border-radius: 6px;
  transition: all 0.15s;
}
.tag-btn:hover { color: var(--text); }
.tag-btn.active { background: #34c759; color: #000; }

/* ===== Mood label ===== */
.mood-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface2);
  padding: 2px 8px;
  margin-left: 6px;
  border-radius: 6px;
  vertical-align: middle;
  text-transform: uppercase;
}

/* Last played */
.last-played { display: block; font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.last-played.no-plays { color: var(--text-tertiary); }

/* Email verification banner */
.verify-banner {
  background: rgba(255,159,10,0.12);
  border-radius: 6px;
  color: var(--orange);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
}
.verify-banner a { color: var(--orange); text-decoration: underline; }

/* ===== Feedback ===== */
.feedback-wrap { display: flex; gap: 4px; flex-shrink: 0; }
.fb-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.15s;
}
.fb-btn:hover { background: rgba(255,255,255,0.08); }
.fb-btn.fb-heart:hover { color: var(--pink); }
.fb-btn.fb-heart.active { color: var(--pink); }
.fb-indicators { font-size: 12px; margin-top: 2px; }
.fb-ind-heart { color: var(--pink); font-weight: 600; }
.access-btn.access-active {
  background: rgba(48,209,88,0.15) !important;
  color: var(--green) !important;
}
.fb-count-heart {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 14px;
  color: var(--pink);
  font-weight: 600;
  flex-shrink: 0;
  min-width: 36px;
  justify-content: flex-end;
}
.fb-stat { text-align: center; min-width: 80px; }
.fb-stat-num { font-size: 32px; font-weight: 700; }
.fb-stat-label { font-size: 13px; color: var(--text-secondary); }
.fb-stat-name { font-size: 15px; font-weight: 600; margin-top: 2px; }
.fb-details { margin-top: 12px; border-top: 1px solid var(--separator); padding-top: 8px; }
.fb-detail-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--separator);
}
.fb-detail-row:last-child { border-bottom: none; }
.fb-detail-name { font-size: 14px; font-weight: 500; flex: 1; }
.fb-detail-reaction { display: flex; align-items: center; }
.fb-detail-reaction.like { color: var(--green); }
.fb-detail-time { font-size: 12px; color: var(--text-secondary); }

/* Version list */
.version-list { margin-top: 8px; }
.version-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--separator);
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.version-item:hover { background: rgba(255,255,255,0.04); }
.version-item.selected { border-color: var(--text); background: rgba(255,255,255,0.06); }
.version-item-radio { font-size: 14px; color: var(--text-secondary); flex-shrink: 0; }
.version-item.selected .version-item-radio { color: var(--text); }
.version-item-info { display: flex; flex-direction: column; gap: 2px; }
.version-item-name { font-weight: 600; color: var(--text); font-size: 14px; }
.version-item-meta { font-size: 12px; color: var(--text-secondary); }

/* Edit modal close */
.edit-modal-close {
  background: none; border: none; color: var(--text-secondary);
  font-size: 28px; cursor: pointer; line-height: 1; padding: 0 4px;
}
.edit-modal-close:hover { color: var(--text); }

/* Save button states */
.btn-save-edit {
  width: 100%;
  padding: 12px;
  margin-top: 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface3);
  color: var(--text-secondary);
  transition: background 0.2s, color 0.2s;
}
.btn-save-edit:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-save-edit.dirty { background: #cc2222; color: #fff; opacity: 1; }
.btn-save-edit.dirty:hover { background: #ee3333; }

/* Selection */
::selection { background: rgba(255,255,255,0.3); color: #fff; }

/* Avatars — circular */
.profile-avatar, .profile-avatar img,
.profile-avatar-large, .profile-avatar-large img,
.profile-view-avatar, .profile-view-avatar img,
.perm-artist-avatar, .perm-artist-avatar img { border-radius: 50% !important; }

/* SVG icons */
.btn svg, .beat-actions svg, .icon svg, .empty .icon svg,
.sidebar-item svg {
  display: inline-block;
  vertical-align: middle;
}

/* ===== Category labels ===== */
.category-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .main-content {
    margin-left: 0;
    padding: 20px 16px 160px;
  }

  .player-inner {
    padding: 10px 12px;
    justify-content: flex-start;
  }
  .player-info {
    flex: 1;
    max-width: none;
  }

  .section-title {
    font-size: 28px;
  }

  /* Mobile bottom nav */
  .mobile-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #000000;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: 1px solid var(--separator);
    z-index: 90;
    padding: 8px 0 calc(env(safe-area-inset-bottom, 8px) + 4px);
    justify-content: space-around;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    font-size: 10px;
    color: var(--text-secondary);
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
  }

  .mobile-nav-item svg {
    width: 24px;
    height: 24px;
  }

  .mobile-nav-item.active {
    color: #ffffff;
  }

  .player.active {
    bottom: 64px;
  }

  .form-row { flex-direction: column; gap: 0; }
  .beat-actions { flex-wrap: wrap; }
  .perm-artist-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .perm-toggles { padding-left: 42px; }
}

.mobile-nav { display: none; }
.mobile-header { display: none; }

/* Mobile header + profile */
@media (max-width: 768px) {
  .mobile-header {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: var(--bg);
    border-bottom: 1px solid var(--separator);
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 80;
  }

  .mobile-header-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
  }

  .mobile-profile-btn {
    cursor: pointer;
    position: relative;
  }

  .mobile-profile-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--surface2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }
  .mobile-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .mobile-profile-menu {
    position: fixed;
    top: 48px;
    right: 8px;
    background: var(--surface2);
    border: 1px solid var(--separator);
    border-radius: 8px;
    padding: 4px 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    z-index: 85;
    display: none;
  }
  .mobile-profile-menu.show { display: block; }
  .mobile-profile-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    text-align: left;
  }
  .mobile-profile-menu button:hover { background: rgba(255,255,255,0.08); }

  .main-content {
    padding-top: 64px !important;
  }
}

/* Player when active with mobile nav */
@media (min-width: 769px) {
  .player.active ~ .mobile-nav { display: none; }
}

/* ===== ADMIN DASHBOARD ===== */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}
.admin-stat-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
}
.admin-stat-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.admin-stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.admin-role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.admin-role-producer { background: rgba(255,255,255,0.1); color: #ccc; }
.admin-role-artist { background: rgba(255,255,255,0.06); color: #999; }
.admin-role-admin { background: rgba(255,255,255,0.15); color: #fff; }
