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

:root {
  --bg: #0f0f23;
  --bg2: #1a1a2e;
  --bg3: #252542;
  --text: #e0e0e0;
  --text2: #8888aa;
  --accent: #90caf9;
  --accent2: #1565c0;
  --hover: #2a2a4a;
  --border: #333355;
  --player-h: 80px;
  --header-h: 56px;
  --sidebar-w: 200px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

.hidden { display: none !important; }
.error { color: #ef5350; margin-top: 8px; font-size: 14px; }

/* Login */
#login-screen {
  display: flex; align-items: center; justify-content: center;
  height: 100vh;
}
.login-box {
  background: var(--bg2);
  padding: 40px;
  border-radius: 16px;
  text-align: center;
  min-width: 320px;
}
.login-box h1 { margin-bottom: 24px; font-size: 28px; }
.login-box input {
  display: block;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg3);
  color: var(--text);
  font-size: 16px;
}
.login-box button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: var(--accent2);
  color: white;
  font-size: 16px;
  cursor: pointer;
}
.login-box button:hover { background: #1976d2; }

/* Header */
header {
  height: var(--header-h);
  background: var(--bg2);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}
header h1 { font-size: 18px; white-space: nowrap; }
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}
.search-box { flex: 1; max-width: 400px; }
.search-box input {
  width: 100%;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg3);
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.search-box input:focus { border-color: var(--accent); }
#scan-btn {
  background: none; border: 1px solid var(--border);
  color: var(--text); font-size: 18px; padding: 4px 10px;
  border-radius: 8px; cursor: pointer;
}
#scan-btn:hover { background: var(--hover); }
#stats-label { font-size: 13px; color: var(--text2); white-space: nowrap; }

/* Layout */
.main-layout {
  display: flex;
  height: calc(100vh - var(--header-h));
}
.main-layout.has-player { height: calc(100vh - var(--header-h) - var(--player-h)); }

/* Sidebar */
#sidebar {
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 12px 0;
  flex-shrink: 0;
}
.nav-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 20px;
  border: none;
  background: none;
  color: var(--text2);
  font-size: 14px;
  cursor: pointer;
}
.nav-btn:hover { background: var(--hover); color: var(--text); }
.nav-btn.active { color: var(--accent); background: var(--hover); }

/* Content */
#content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}
.view { padding: 16px; }

/* Track list */
.track-list { list-style: none; }
.track-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  gap: 12px;
}
.track-item:hover { background: var(--hover); }
.track-item.playing { background: var(--bg3); color: var(--accent); }
.track-cover {
  width: 40px; height: 40px;
  border-radius: 4px;
  background: var(--bg3);
  object-fit: cover;
  flex-shrink: 0;
}
.track-info { flex: 1; min-width: 0; }
.track-title {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-meta {
  font-size: 12px;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-folder { opacity: 0.6; font-size: 11px; }
.track-duration {
  font-size: 12px;
  color: var(--text2);
  flex-shrink: 0;
}

/* Artist / Album cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.card {
  background: var(--bg2);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  text-align: center;
  transition: background .15s;
}
.card:hover { background: var(--bg3); }
.card-icon { font-size: 32px; margin-bottom: 8px; }
.card-artist-photo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; margin-bottom: 8px; }
.card-name {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-count { font-size: 12px; color: var(--text2); }

/* Section header */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.section-header h2 { font-size: 20px; }
.back-btn {
  background: none; border: none; color: var(--accent);
  font-size: 16px; cursor: pointer;
}

/* Player bar */
#player-bar {
  height: var(--player-h);
  background: var(--bg2);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  position: fixed;
  bottom: 0; left: 0; right: 0;
}
.player-cover img {
  width: 56px; height: 56px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg3);
}
.player-info {
  min-width: 0;
  flex: 0 1 200px;
}
.player-fav-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text2);
  padding: 4px 6px;
  flex-shrink: 0;
  transition: color 0.15s;
}
.player-fav-btn:hover { color: #e91e63; }
.player-fav-btn.is-fav { color: #e91e63; }
#player-title {
  display: block;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#player-artist {
  display: block;
  font-size: 12px;
  color: var(--text2);
}
.player-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.player-controls button {
  background: none; border: none;
  color: var(--text); font-size: 20px;
  cursor: pointer; padding: 4px 8px;
}
.player-controls button:hover { color: var(--accent); }
#btn-play { font-size: 28px; }
.player-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.player-progress span { font-size: 12px; color: var(--text2); min-width: 36px; }
#player-seek {
  flex: 1;
  accent-color: var(--accent);
  height: 4px;
}
.player-volume {
  display: flex;
  align-items: center;
  gap: 6px;
}
#player-volume {
  width: 80px;
  accent-color: var(--accent);
  height: 4px;
}

/* Player button states */
.shuffle-on, .repeat-all, .repeat-one {
  color: var(--accent) !important;
}

#btn-repeat {
  position: relative;
}

.repeat-one::after {
  content: "1";
  position: absolute;
  top: -2px;
  right: -2px;
  font-size: 10px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 50%;
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Track numbers */
.track-number {
  font-size: 12px;
  color: var(--text2);
  min-width: 24px;
  text-align: right;
  flex-shrink: 0;
}

/* Artist links */
.artist-link {
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
}
.artist-link:hover {
  text-decoration: underline;
}

/* Queue panel */
#queue-panel {
  width: 300px;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.main-layout.has-queue {
  /* Adjust main content when queue is open */
}

.queue-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.queue-header h3 {
  font-size: 16px;
  color: var(--text);
}

.queue-header-btns {
  display: flex;
  gap: 4px;
  align-items: center;
}

#queue-locate {
  background: none;
  border: none;
  color: var(--text2);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
#queue-locate:hover { background: var(--hover); color: var(--accent); }

#queue-close {
  background: none;
  border: none;
  color: var(--text2);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

#queue-close:hover {
  background: var(--hover);
  color: var(--text);
}

.queue-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.queue-track-list {
  list-style: none;
}

.queue-item {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  gap: 8px;
  margin-bottom: 2px;
}

.queue-item:hover {
  background: var(--hover);
}

.queue-item.current {
  background: var(--bg3);
  color: var(--accent);
}

.queue-number {
  font-size: 11px;
  color: var(--text2);
  min-width: 20px;
  text-align: right;
  flex-shrink: 0;
}

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

.queue-title {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-meta {
  font-size: 11px;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-duration {
  font-size: 11px;
  color: var(--text2);
  flex-shrink: 0;
}

/* Responsive */
/* Mobile tabs (top, under header) */
#mobile-tabs {
  display: none;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
  padding: 0 4px;
}
.mob-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text2);
  padding: 10px 16px;
  font-size: 20px;
  cursor: pointer;
  display: inline-block;
}
.mob-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

@media (max-width: 1024px) {
  #sidebar { display: none; }
  #mobile-tabs { display: block; }
  .main-layout { flex-direction: column; }
  .player-volume { display: none; }
  .player-progress { display: none; }
  .player-info { flex: 1; }
  #content { padding-bottom: 52px; }
  #queue-panel { width: 250px; }
  .main-layout.has-queue #content {
    display: none;
  }
  .np-body { flex-direction: column; }
  .np-left { padding: 16px; max-height: 40vh; }
  .np-right { padding: 12px 16px; align-items: center; }
  .np-right .np-info { text-align: center; }
  .np-right .np-meta { justify-content: center; }
  .np-cover-wrap { max-width: 280px; max-height: 280px; }
  .np-queue { width: 100%; border-left: none; border-top: 1px solid var(--border); max-height: 40vh; }
}

/* Folder view */
.card { position: relative; }
.card-folder-btns {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}
.card:hover .card-folder-btns { opacity: 1; }
.folder-action-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.folder-action-btn:hover { background: var(--accent); color: white; }

.play-all-btn.enqueue {
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
}
.play-all-btn.enqueue:hover { background: var(--accent); color: white; }

.folder-tracks-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
  font-size: 14px;
}
.play-all-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 6px 16px;
  cursor: pointer;
  font-size: 13px;
}
.play-all-btn.shuffle {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.play-all-btn:hover { opacity: 0.85; }

/* Now Playing expanded view */
#now-playing {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg, #121212);
  display: flex;
  flex-direction: column;
  animation: np-slide-up 0.3s ease;
}
#now-playing.hidden { display: none; }

@keyframes np-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.np-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.np-header button {
  background: none;
  border: none;
  color: var(--text, #fff);
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
}
.np-header span {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text2, #aaa);
}

.np-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.np-left {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  flex-shrink: 0;
  min-width: 0;
}

.np-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 24px 20px 0;
  overflow-y: auto;
  min-width: 0;
}

/* Now Playing queue sidebar */
.np-queue {
  width: 320px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--bg2);
}
.np-queue-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.np-queue-header h3 { font-size: 15px; }
.np-queue-btns {
  display: flex;
  gap: 4px;
  align-items: center;
}
#np-queue-clear {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--text2);
  opacity: 0.6;
}
#np-queue-clear:hover { opacity: 1; color: #f44; }
#np-queue-locate {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--text2);
}
#np-queue-locate:hover { background: var(--hover); color: var(--accent); }
.np-queue-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}
.np-queue-item {
  display: flex;
  align-items: center;
  padding: 7px 12px;
  cursor: pointer;
  gap: 10px;
  border-left: 3px solid transparent;
}
.np-queue-item:hover { background: var(--hover); }
.np-queue-item.current {
  background: var(--bg3);
  border-left-color: var(--accent);
  color: var(--accent);
}
.np-queue-item.past { opacity: 0.45; }
.np-queue-idx {
  font-size: 11px;
  color: var(--text2);
  min-width: 22px;
  text-align: right;
  flex-shrink: 0;
}
.np-queue-item.current .np-queue-idx { color: var(--accent); }
.np-queue-info { flex: 1; min-width: 0; }
.np-queue-title {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.np-queue-meta {
  font-size: 11px;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.np-queue-dur {
  font-size: 11px;
  color: var(--text2);
  flex-shrink: 0;
}

.np-cover-wrap {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1;
  min-height: 280px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg3, #1e1e1e);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.np-cover-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.np-cover-wrap img[src=""] { display: none; }
.np-cover-placeholder {
  font-size: 96px;
  color: var(--text2);
  user-select: none;
}

.np-info {
  text-align: left;
  width: 100%;
  margin-bottom: 20px;
}
.np-info h2 {
  margin: 0 0 4px;
  font-size: 22px;
  color: var(--text, #fff);
}
.np-info h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--accent, #1db954);
  font-weight: 500;
}
.np-info p {
  margin: 0;
  font-size: 14px;
  color: var(--text2, #aaa);
}
.np-meta {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text2, #aaa);
}
.np-meta span {
  background: var(--surface, #1e1e1e);
  padding: 3px 10px;
  border-radius: 12px;
}
.np-meta-path {
  display: block;
  width: 100%;
  font-size: 11px;
  opacity: 0.7;
  word-break: break-all;
  cursor: pointer;
}

.np-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--text2, #aaa);
}
.np-progress input[type="range"] { flex: 1; }

.np-controls {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}
.np-controls button {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  color: var(--text, #fff);
}
.np-controls #np-play {
  font-size: 36px;
  background: var(--accent, #1db954);
  border-radius: 50%;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.np-lyrics-section {
  width: 100%;
  margin-top: 8px;
}
.np-lyrics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.np-translate-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 14px;
  border-radius: 16px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}
.np-translate-btn:hover { background: var(--accent); color: white; }
.np-translate-btn:disabled { opacity: 0.5; cursor: wait; }
.np-lyrics-section h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text2, #aaa);
  margin: 0;
}
.np-lyrics {
  background: var(--surface, #1e1e1e);
  border-radius: 12px;
  padding: 20px;
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text, #fff);
}
.np-lyrics-placeholder {
  color: var(--text2, #aaa);
  font-style: italic;
}
.np-lyrics-editor {
  width: 100%;
  min-height: 260px;
  box-sizing: border-box;
  background: var(--bg, #141414);
  color: var(--text, #fff);
  border: 1px solid var(--border, #333);
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  line-height: 1.6;
  font-family: inherit;
  resize: vertical;
}
.np-lyrics-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
/* Completar canción (modal) */
.cs-modal { max-width: 640px; width: 92%; }
.cs-field { margin-bottom: 12px; }
.cs-field label { display: block; font-size: 12px; color: var(--text2, #aaa); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .04em; }
.cs-field input { width: 100%; box-sizing: border-box; background: var(--bg, #141414); color: var(--text, #fff); border: 1px solid var(--border, #333); border-radius: 8px; padding: 9px 11px; font-size: 15px; }
.cs-static { color: var(--text, #fff); font-size: 15px; padding: 4px 0; }
.cs-field textarea.np-lyrics-editor { min-height: 160px; }
.cs-actions { display: flex; gap: 8px; margin: 6px 0 14px; flex-wrap: wrap; }
.cs-actions .cs-save { background: var(--accent); color: #fff; }
.cs-none { color: var(--text2, #aaa); font-style: italic; }
.cs-sug-title { font-size: 13px; color: var(--text2, #aaa); margin: 8px 0 6px; }
.cs-sug { border: 1px solid var(--border, #333); border-radius: 8px; padding: 10px; margin-bottom: 8px; }
.cs-sug-head { font-size: 14px; margin-bottom: 6px; }
.cs-sug-lyr { white-space: pre-wrap; font-size: 12px; color: var(--text2, #bbb); max-height: 90px; overflow: hidden; margin-bottom: 8px; }
.cs-dur { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: #333; color: #ddd; margin-left: 4px; }
.cs-dur.ok { background: #1f7a3d; color: #fff; }
.cs-dur.warn { background: #8a6d1f; color: #fff; }
.cs-dur.bad { background: #8a2f2f; color: #fff; }
.lyrics-bilingual {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.lyrics-line-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 1px 0;
}
.lyrics-line-empty {
  height: 1.2em;
}
.lyrics-line-orig {
  color: var(--text, #fff);
}
.lyrics-line-trans {
  color: var(--accent, #4fc3f7);
  font-style: italic;
  opacity: 0.85;
}

/* Queue improvements */
.queue-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border, #333);
}
.queue-count { font-size: 12px; color: var(--text2, #aaa); }
.queue-clear-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  opacity: 0.6;
}
.queue-clear-btn:hover { opacity: 1; }

.queue-grip {
  cursor: grab;
  color: var(--text2, #666);
  font-size: 14px;
  padding: 0 4px;
  flex-shrink: 0;
}
.queue-item { display: flex; align-items: center; gap: 8px; }
.queue-item.dragging { opacity: 0.4; }
.queue-remove {
  background: none;
  border: none;
  color: var(--text2, #666);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s;
}
.queue-item:hover .queue-remove { opacity: 1; }
.queue-remove:hover { color: #f44; }

/* Track action buttons */
.track-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.track-item:hover .track-actions { opacity: 1; }
.track-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 6px;
  border-radius: 4px;
  color: var(--text2, #aaa);
}
.track-actions button:hover {
  background: var(--surface, #2a2a2a);
  color: var(--text, #fff);
}

.lyrics-badge { font-size: 12px; vertical-align: middle; }
.lyrics-badge.none { opacity: 0.28; filter: grayscale(1); }
.lyrics-match-badge { font-size: 11px; color: #fff; background: #7c4dff; border-radius: 4px; padding: 1px 5px; vertical-align: middle; white-space: nowrap; }
.cover-badge { font-size: 11px; color: #fff; background: #b5651d; border-radius: 4px; padding: 1px 5px; vertical-align: middle; white-space: nowrap; }

/* Toast */
#mh-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface, #333);
  color: var(--text, #fff);
  padding: 10px 24px;
  border-radius: 24px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 2000;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
#mh-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Autoplay prompt overlay */
#autoplay-prompt {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
#autoplay-btn {
  background: var(--accent, #ff6b35);
  color: #fff;
  border: none;
  padding: 16px 32px;
  font-size: 1.2em;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(255,107,53,0.4);
}
#autoplay-btn:hover { opacity: 0.9; }

/* Artist modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-content {
  background: var(--bg2);
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.modal-header h2 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-header-btns { display: flex; gap: 8px; flex-shrink: 0; }
.modal-header-btns button {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 13px;
  cursor: pointer;
}
.modal-header-btns button:hover { background: var(--accent); color: white; }
.modal-header-btns button:last-child { background: none; border: none; font-size: 20px; padding: 4px 8px; }
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
}
.modal-track-list .track-item { padding: 6px 8px; }

/* NP artist clickable */
#np-artist { cursor: pointer; }
#np-artist:hover { text-decoration: underline; }

/* NP layout stability */
.np-left { min-width: 300px; max-width: 500px; }
.np-right { min-width: 300px; }

/* Queue clear played button */
.queue-actions-btns { display: flex; gap: 4px; align-items: center; }
.queue-clear-played-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  opacity: 0.6;
}
.queue-clear-played-btn:hover { opacity: 1; }
#np-clear-played {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--text2);
  opacity: 0.6;
}
#np-clear-played:hover { opacity: 1; color: var(--accent); }

/* YouTube download section */
.yt-download-section {
  margin-top: 24px;
  padding: 20px;
  background: var(--bg2);
  border-radius: 12px;
  text-align: center;
}
.yt-download-section p { margin-bottom: 12px; color: var(--text); font-size: 15px; }
.yt-download-form {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}
.yt-download-form input {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg3);
  color: var(--text);
  font-size: 14px;
  flex: 1;
  max-width: 400px;
}
.yt-download-form button {
  padding: 8px 18px;
  border: none;
  border-radius: 8px;
  background: var(--accent2);
  color: white;
  font-size: 14px;
  cursor: pointer;
}
.yt-download-form button:hover { background: #1976d2; }
.yt-download-form button:disabled { opacity: 0.5; cursor: wait; }
.yt-status { font-size: 14px; color: var(--text2); min-height: 20px; }
.yt-status.error { color: #ef5350; }
.yt-status.success { color: #66bb6a; }
.yt-enqueue-btn {
  margin: 8px 4px 0;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg3);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
.yt-enqueue-btn:hover { background: var(--accent); color: white; }

/* Inbox */
.inbox-badge {
  background: #ef5350;
  color: white;
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 11px;
  margin-left: 4px;
  font-weight: bold;
}
.inbox-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.inbox-item {
  background: var(--bg2);
  border-radius: 12px;
  padding: 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px 16px;
  align-items: start;
}
.inbox-preview { display: flex; align-items: flex-start; padding-top: 4px; }
.inbox-play-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 18px;
  cursor: pointer;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.inbox-play-btn:hover { background: var(--accent); color: white; }
.inbox-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.inbox-field-row label {
  display: block;
  font-size: 11px;
  color: var(--text2);
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.inbox-field-row input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg3);
  color: var(--text);
  font-size: 13px;
}
.inbox-field-row input:focus { border-color: var(--accent); outline: none; }
.inbox-folder-select {
  display: flex;
  gap: 6px;
  align-items: center;
}
.inbox-folder-display {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg3);
  color: var(--text2);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inbox-folder-display[data-folder] { color: var(--text); }
.inbox-folder-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
}
.inbox-folder-btn:hover { background: var(--hover); }
.inbox-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.inbox-classify-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: #2e7d32;
  color: white;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.inbox-classify-btn:hover { background: #388e3c; }
.inbox-discard-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: none;
  color: var(--text2);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.inbox-discard-btn:hover { background: #c62828; color: white; border-color: #c62828; }

/* Folder Picker Modal */
.folder-picker { max-width: 500px; }
.folder-picker-path {
  padding: 8px 12px;
  background: var(--bg);
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 13px;
}
.fp-crumb { cursor: pointer; color: var(--accent); }
.fp-crumb:hover { text-decoration: underline; }
.folder-picker-body {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 12px;
}
.fp-folder-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 6px;
}
.fp-folder-item:hover { background: var(--hover); }
.folder-picker-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.folder-picker-new {
  display: flex;
  gap: 6px;
}
.folder-picker-new input {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg3);
  color: var(--text);
  font-size: 13px;
}
.folder-picker-new button {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg3);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
}
.folder-picker-new button:hover { background: var(--hover); }
.fp-select-btn {
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: var(--accent2);
  color: white;
  font-size: 14px;
  cursor: pointer;
}
.fp-select-btn:hover { background: var(--accent); color: var(--bg); }

@media (max-width: 768px) {
  .inbox-item {
    grid-template-columns: 1fr;
  }
  .inbox-fields { grid-template-columns: 1fr; }
  .inbox-actions { flex-direction: row; }
}

/* === Library (Biblioteca) === */
.library-breadcrumb {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.lib-crumb {
  cursor: pointer;
  color: var(--accent);
}
.lib-crumb:hover { text-decoration: underline; }

.library-card {
  border-left: 3px solid #7c4dff;
}
.library-card:hover { border-left-color: #b388ff; }

.library-track-item {
  border-left: 3px solid transparent;
}
.library-track-item:hover {
  border-left-color: #7c4dff;
}

.library-track-header {
  padding: 12px 16px 8px;
  font-size: 13px;
  color: var(--text2);
}

/* Library badge in queue */
.lib-queue-badge {
  font-size: 11px;
  margin-right: 2px;
}

/* Library badge in Now Playing */
.np-library-badge {
  margin-top: 8px;
}
.lib-in-selection {
  color: #66bb6a;
  font-size: 13px;
  padding: 4px 12px;
  background: rgba(102, 187, 106, 0.1);
  border-radius: 16px;
  display: inline-block;
}
.lib-add-btn {
  background: var(--bg3);
  border: 1px solid #7c4dff;
  color: #b388ff;
  padding: 6px 16px;
  border-radius: 16px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}
.lib-add-btn:hover { background: #7c4dff; color: white; }
.lib-checking { color: var(--text2); font-size: 13px; }
.lib-badge-source {
  color: #b388ff;
  font-size: 13px;
  padding: 4px 12px;
  background: rgba(124, 77, 255, 0.1);
  border-radius: 16px;
  display: inline-block;
}

/* Library search in main search */
.library-search-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.lib-search-btn {
  background: var(--bg3);
  border: 1px solid #7c4dff;
  color: #b388ff;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
}
.lib-search-btn:hover { background: #7c4dff; color: white; }

/* YouTube results */
.yt-result-list { list-style: none; padding: 0; margin: 8px 0; }
.yt-result-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.yt-result-info { flex: 1; min-width: 0; }
.yt-result-title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-result-meta { font-size: 12px; color: var(--text2); }
.yt-dl-btn { background: var(--accent); color: white; border: none; border-radius: 6px; padding: 6px 12px; cursor: pointer; font-size: 16px; }
.yt-dl-btn:disabled { opacity: 0.5; }
.yt-open-btn { background: #cc0000; color: white; border: none; border-radius: 6px; padding: 6px 12px; cursor: pointer; font-size: 16px; text-decoration: none; display: inline-flex; align-items: center; line-height: 1; }
.yt-open-btn:hover { background: #ff0000; }
.yt-post-actions { display: inline-flex; gap: 4px; }
.yt-enqueue-btn { background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 4px; padding: 4px 8px; cursor: pointer; font-size: 13px; }
.yt-search-section { padding: 8px 12px; }
.yt-download-form { display: flex; gap: 8px; margin-bottom: 8px; }
.yt-download-form input { flex: 1; padding: 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.library-track { border-left: 3px solid #7c4dff; }

/* === Now Playing action buttons (enrich + report) === */
.np-action-btns {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.np-action-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}
.np-action-btn:hover { background: var(--accent); color: white; }
.np-action-btn:disabled { opacity: 0.5; cursor: wait; }

/* Favorite button */
.np-fav-btn.is-fav {
  background: #e91e6320;
  border-color: #e91e63;
  color: #e91e63;
}
.np-fav-btn.is-fav:hover { background: #e91e63; color: white; }
.np-delete-btn { color: var(--text2); }
.np-delete-btn:hover { background: #c62828 !important; color: white; }

/* Artist info in now playing */
.np-artist-info {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 13px;
  color: var(--text2, #aaa);
}
.np-artist-info span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Report dropdown */
.np-report-dropdown {
  margin-top: 8px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: 100%;
}
.report-option {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.report-option:hover { background: #c62828; color: white; border-color: #c62828; }

/* Issues indicator in Now Playing */
.np-issues-indicator {
  margin-top: 8px;
}
.issues-indicator {
  color: #ef5350;
  font-size: 13px;
  padding: 4px 12px;
  background: rgba(239, 83, 80, 0.1);
  border-radius: 16px;
  display: inline-block;
}

/* === Issues view === */
.issues-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.issue-filter-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 6px 16px;
  border-radius: 16px;
  font-size: 13px;
  cursor: pointer;
}
.issue-filter-btn.active { background: var(--accent2); color: white; border-color: var(--accent2); }
.issue-filter-btn:hover { background: var(--hover); color: var(--text); }

.issues-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.issue-item {
  background: var(--bg2);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-left: 3px solid #ef5350;
}
.issue-track-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.issue-track-title {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.issue-type-badge {
  background: rgba(239, 83, 80, 0.15);
  color: #ef5350;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 12px;
  white-space: nowrap;
}
.issue-note {
  font-size: 12px;
  color: var(--text2);
  width: 100%;
}
.issue-date {
  font-size: 11px;
  color: var(--text2);
  white-space: nowrap;
}
.issue-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.issue-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 6px;
  opacity: 0.6;
}
.issue-actions button:hover { opacity: 1; background: var(--hover); }

/* Festivales */
.festival-grid .festival-card { position: relative; }
.festival-poster {
  width: 100%; height: 80px; border-radius: 8px; margin-bottom: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 32px;
  background: var(--bg3);
}
.festival-detail { padding: 0 4px; }
.festival-info-row {
  display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px;
}
.festival-poster-img {
  width: 120px; height: 120px; object-fit: cover; border-radius: 12px; cursor: pointer;
  flex-shrink: 0;
}
.festival-poster-placeholder {
  width: 120px; height: 120px; background: var(--bg3); border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 32px; cursor: pointer; color: var(--text2); flex-shrink: 0;
}
.festival-poster-placeholder small { font-size: 11px; margin-top: 4px; }
.festival-info { flex: 1; }
.festival-meta { color: var(--text2); font-size: 14px; margin-bottom: 8px; }
.festival-notes { color: var(--text2); font-size: 13px; margin-bottom: 8px; font-style: italic; }
.festival-edit-btns { display: flex; gap: 8px; }
.small-btn {
  background: var(--bg3); border: none; color: var(--text); padding: 4px 10px;
  border-radius: 6px; font-size: 12px; cursor: pointer;
}
.small-btn:hover { background: var(--hover); }
.small-btn.danger:hover { background: #c62828; }

.festival-artist-list { list-style: none; padding: 0; margin: 0; }
.festival-artist-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-bottom: 1px solid var(--border);
}
.festival-artist-item:hover { background: var(--bg3); }
.fest-artist-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; }
.fest-artist-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.fest-artist-name { font-size: 14px; }
.fest-artist-count { font-size: 12px; color: var(--accent); }
.fest-artist-count.none { color: var(--text2); }
.fest-artist-day, .fest-artist-stage, .fest-artist-time {
  font-size: 11px; color: var(--text2); background: var(--bg3);
  padding: 1px 6px; border-radius: 4px;
}
.fest-artist-actions { display: flex; gap: 4px; }
.fest-artist-actions button {
  background: none; border: none; color: var(--text2); cursor: pointer;
  font-size: 16px; padding: 2px 6px;
}
.fest-artist-actions button:hover { color: var(--accent); }

.festival-form {
  max-width: 500px; display: flex; flex-direction: column; gap: 10px;
}
.fest-input {
  background: var(--bg3); border: 1px solid var(--border); color: var(--text);
  padding: 8px 12px; border-radius: 8px; font-size: 14px; font-family: inherit;
  width: 100%; box-sizing: border-box;
}
.fest-input:focus { border-color: var(--accent); outline: none; }
.fest-dates { display: flex; align-items: center; gap: 8px; }
.fest-dates .fest-input { flex: 1; }

#add-artists-area { margin-top: 12px; }

/* Festival filter bar */
.fest-filter-bar { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.fest-filter-btn {
  background: var(--bg3); border: 1px solid var(--border); color: var(--text2);
  padding: 4px 10px; border-radius: 16px; font-size: 12px; cursor: pointer;
}
.fest-filter-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
.fest-filter-btn:hover { border-color: var(--accent); }

/* Like/dislike buttons */
.like-btn, .dislike-btn { opacity: 0.4; transition: opacity 0.15s; }
.like-btn.active { opacity: 1; }
.dislike-btn.active { opacity: 1; }
.like-btn:hover, .dislike-btn:hover { opacity: 0.8; }
.festival-artist-item.liked { background: rgba(76, 175, 80, 0.05); }
.festival-artist-item.disliked { background: rgba(158, 158, 158, 0.05); opacity: 0.7; }
.fest-artist-country { font-size: 16px; }

/* Artist info modal */
.artist-info-modal { max-width: 500px; }
.artist-detail { display: flex; flex-direction: column; gap: 12px; }
.artist-detail-header { display: flex; gap: 16px; align-items: flex-start; }
.artist-detail-photo { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; }
.artist-detail-meta { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--text2); }
.artist-detail-bio { font-size: 13px; color: var(--text2); line-height: 1.5; max-height: 200px; overflow-y: auto; }
.artist-detail-section { font-size: 13px; }
.artist-detail-section strong { color: var(--text); }
.artist-discography { list-style: none; padding: 0; margin: 4px 0 0 0; }
.artist-discography li { padding: 2px 0; color: var(--text2); font-size: 12px; }
.artist-album-link { cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 6px 8px !important; border-radius: 6px; transition: background 0.15s; }
.artist-album-link:hover { background: var(--bg3, #333); color: var(--text); }
.disc-owned { color: var(--text) !important; }
.disc-not-owned { color: var(--text2); opacity: 0.4; font-size: 12px; padding: 3px 8px !important; }
.disc-type { color: var(--text2); opacity: 0.6; font-size: 11px; }
.artist-detail-actions { display: flex; gap: 8px; margin-top: 8px; }

/* --- Asistente de nuevo festival (buscar cartel → confirmar → crear) --- */
.disc-loading, .disc-error {
  margin-top: 16px; padding: 16px; border-radius: 10px;
  background: var(--bg2); color: var(--text2); text-align: center;
}
.disc-error { color: #ef9a9a; }

.disc-panel {
  margin-top: 16px; padding: 16px; border-radius: 12px;
  background: var(--bg2); border: 1px solid var(--border);
  max-width: 640px; display: flex; flex-direction: column; gap: 10px;
}
.disc-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.disc-head h3 { margin: 0; }
.disc-status { font-size: 12px; color: var(--text2); }
.disc-warn {
  font-size: 13px; color: #ffcc80; background: rgba(255, 152, 0, 0.08);
  border-radius: 8px; padding: 6px 10px;
}
.disc-sources { font-size: 12px; color: var(--text2); }
.disc-sources a { color: var(--accent); text-decoration: none; margin-right: 2px; }

.disc-artist-list {
  list-style: none; padding: 0; margin: 0;
  max-height: 45vh; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 8px;
}
.disc-artist { border-bottom: 1px solid var(--border); }
.disc-artist:last-child { border-bottom: none; }
.disc-artist label {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; cursor: pointer; font-size: 14px;
}
.disc-artist:hover { background: var(--bg3); }
.disc-artist.off { opacity: 0.45; }
.disc-artist-name { flex: 1; }
.disc-artist-meta { font-size: 11px; color: var(--text2); }

.disc-empty {
  padding: 14px; border-radius: 8px; background: var(--bg3);
  font-size: 14px; color: var(--text2); line-height: 1.5;
}
.disc-empty strong { color: var(--text); display: block; margin-bottom: 4px; }

.disc-manual summary { cursor: pointer; font-size: 13px; color: var(--text2); padding: 4px 0; }
.disc-manual-body { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.disc-file-btn {
  display: inline-block; align-self: flex-start; cursor: pointer;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 12px; font-size: 13px;
}
.disc-file-btn:hover { border-color: var(--accent); }
.disc-file-name { font-size: 12px; color: var(--text2); }

.disc-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.disc-dl-opt { display: flex; align-items: center; gap: 6px; cursor: pointer; }

/* Canciones por grupo en la vista del festival */
.fest-per-artist {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text2);
}
.fest-per-artist input {
  width: 56px; background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); border-radius: 6px; padding: 4px 6px; font-size: 13px;
}

/* --- Historial de búsquedas (desplegable del buscador) --- */
.search-box { position: relative; }
#search-suggest {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45); overflow: hidden; min-width: 260px;
}
.suggest-head, .suggest-foot {
  padding: 6px 10px; font-size: 11px; color: var(--text2);
  background: var(--bg3); display: flex; gap: 8px; justify-content: space-between;
}
.suggest-foot button {
  background: none; border: none; color: var(--accent); cursor: pointer; font-size: 11px; padding: 0;
}
.suggest-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  cursor: pointer; font-size: 13px;
}
.suggest-item:hover { background: var(--hover); }
.suggest-q { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-meta { font-size: 11px; color: var(--text2); }
.suggest-del { background: none; border: none; color: var(--text2); cursor: pointer; padding: 0 2px; }
.suggest-del:hover { color: #ef9a9a; }

/* --- Ajustes --- */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.settings-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 16px;
}
.settings-card.wide { grid-column: 1 / -1; }
.settings-card h3 { margin: 0 0 4px; }
.settings-card h4 { margin: 16px 0 8px; font-size: 14px; color: var(--text2); }
.settings-sub { margin: 0 0 12px; color: var(--text2); font-size: 13px; }
.settings-note { margin: 10px 0 0; color: var(--text2); font-size: 12px; }
.settings-form { display: flex; flex-direction: column; gap: 8px; max-width: 340px; }
.settings-form.row { flex-direction: row; flex-wrap: wrap; align-items: center; max-width: none; }
.settings-form.row .fest-input { width: auto; flex: 1; min-width: 140px; }

.history-list { list-style: none; padding: 0; margin: 0 0 12px; max-height: 45vh; overflow-y: auto; }
.history-list li {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.history-q {
  background: none; border: none; color: var(--text); cursor: pointer;
  font-size: 13px; text-align: left; padding: 0; flex: 1;
}
.history-q:hover { color: var(--accent); }
.history-meta { font-size: 11px; color: var(--text2); white-space: nowrap; }

.users-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.users-table th {
  text-align: left; font-weight: normal; color: var(--text2);
  font-size: 11px; padding: 4px 6px; border-bottom: 1px solid var(--border);
}
.users-table td { padding: 7px 6px; border-bottom: 1px solid var(--border); }
.users-table tr.user-off { opacity: 0.5; }
.user-date { color: var(--text2); font-size: 12px; }
.user-actions { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 700px) {
  .users-table .user-date { display: none; }
  .users-table th:nth-child(4) { display: none; }
}

/* Barra de acciones sobre una lista de canciones */
.list-tools { display: flex; gap: 8px; margin: 0 0 8px; flex-wrap: wrap; }

/* Icono de cola de reproducción con contador */
#btn-queue { position: relative; }
.queue-glyph { font-size: 20px; line-height: 1; }
.queue-badge {
  position: absolute; top: -2px; right: -6px;
  background: var(--accent); color: #0f0f23;
  border-radius: 10px; padding: 0 5px;
  font-size: 10px; font-weight: bold; line-height: 15px; min-width: 15px; text-align: center;
}
.unify-list { font-size: 12px; color: var(--text2); margin: 8px 0; padding-left: 18px; }
.unify-list li { margin-bottom: 2px; }
.card { position: relative; }
.card-rename {
  position: absolute; top: 6px; right: 6px; opacity: 0;
  background: rgba(0,0,0,0.5); border: none; color: var(--text);
  border-radius: 6px; padding: 2px 6px; cursor: pointer; font-size: 12px;
}
.card:hover .card-rename { opacity: 1; }
.card-count.variants { color: #ffcc80; font-size: 11px; }

/* --- Revisión de nombres (antes → después) --- */
.review-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.review-table th {
  text-align: left; font-weight: normal; color: var(--text2); font-size: 11px;
  padding: 4px 6px; border-bottom: 1px solid var(--border);
}
.review-table td { padding: 5px 6px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.review-table tr.sel { background: rgba(144, 202, 249, 0.06); }
.review-table tr.undone { opacity: 0.45; }
.rev-now { color: var(--text2); }
.rev-artist { white-space: nowrap; }
.rev-count { color: var(--text2); font-size: 11px; white-space: nowrap; }
.rev-warn { color: #ffcc80; font-size: 11px; margin-left: 6px; }
.rev-variant { display: inline-block; margin-right: 8px; }
.rev-variant em { color: var(--text2); font-style: normal; font-size: 11px; }
.rev-input { padding: 4px 8px; font-size: 13px; }
.review-actions { display: flex; align-items: center; gap: 12px; margin: 16px 0; flex-wrap: wrap; }
