/* ─── Íconos SVG de marca (reemplazan bi-* donde Bootstrap Icons no trae el logo) ─── */
.platform-icon-svg {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  fill: currentColor;
}

/* ─── Variables (Guacha Records brand) ──────────────────── */
:root {
  --negro:      #0A0A0A;
  --gris:       #1C1C1C;
  --gris-2:     #222222;
  --border:     rgba(192, 38, 211, 0.1);
  --border-hover: rgba(192, 38, 211, 0.28);
  --rosa:       #C026D3;
  --vinotinto:  #7C3AED;
  --texto:      #CFCFCF;
  --texto-muted:#666666;
  --blanco:     #FFFFFF;
  --up:         #4ade80;
  --down:       #f87171;

  --font-display: 'Space Grotesk', sans-serif;
  --font-heading: 'Syne', sans-serif;
  --font-brand:   'Fredoka', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --radius:    8px;
  --radius-sm: 3px;
}

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  background: var(--negro);
  color: var(--texto);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* ─── Topnav ─────────────────────────────────────────────── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 56px;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(192, 38, 211, 0.12);
}
.topnav__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.topnav__brand {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--blanco);
}
.topnav__brand span { color: var(--rosa); }
.topnav__right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
/* ─── Profile dropdown ───────────────────────────────────── */
.profile-dropdown {
  position: relative;
}
.profile-trigger {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.profile-trigger:hover { background: rgba(255,255,255,0.06); }

.profile-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--texto);
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.profile-trigger:hover .profile-avatar {
  border-color: rgba(255, 255, 255, 0.45);
}
.profile-username {
  font-family: var(--font-brand);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--texto);
  letter-spacing: 0.04em;
}
.profile-chevron {
  font-size: 0.65rem;
  color: var(--texto-muted);
  transition: transform 0.2s;
}
.profile-dropdown.open .profile-chevron { transform: rotate(180deg); }

.profile-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 180px;
  overflow: hidden;
  z-index: 400;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.profile-dropdown.open .profile-menu { display: block; }

.profile-menu__header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.profile-menu__username {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--blanco);
  letter-spacing: 0.04em;
}
.profile-menu__item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1rem;
  font-size: 0.8rem;
  color: var(--texto-muted);
  transition: color 0.15s, background 0.15s;
}
.profile-menu__item:hover {
  color: var(--rosa);
  background: rgba(192, 38, 211, 0.06);
}
.profile-menu__divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 0.25rem 0;
}

/* ─── App shell (sidebar + content) ─────────────────────── */
.app-shell {
  display: flex;
  min-height: calc(100vh - 56px);
}

/* ─── Sidebar ────────────────────────────────────────────── */
.sidebar {
  width: 200px;
  flex-shrink: 0;
  background: #110E1A;
  border-right: 1px solid rgba(124, 58, 237, 0.25);
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: width 0.22s ease;
}

.sidebar__nav {
  padding: 0.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  /* padding-left: 16px centra el ícono (1rem) en los 48px colapsados */
  padding: 0.65rem 1rem 0.65rem 16px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--texto-muted);
  border-left: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s, gap 0.22s ease;
}
.sidebar__link i {
  font-size: 1rem;
  flex-shrink: 0;
  line-height: 1;
  width: 1rem;
  text-align: center;
}
.sidebar__link span {
  overflow: hidden;
  max-width: 160px;
  opacity: 1;
  transition: max-width 0.22s ease, opacity 0.18s ease;
}

/* Botón colapsar */
.sidebar__collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem;
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  color: var(--texto-muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: color 0.15s, background 0.15s;
  margin-top: auto;
}
.sidebar__collapse-btn:hover {
  color: var(--blanco);
  background: rgba(255,255,255,0.04);
}

/* Icon-only al colapsar (también aplica desde <html> para evitar flash) */
.sidebar-collapsed-init .app-shell .sidebar,
.sidebar-collapsed .sidebar {
  width: 48px;
}
.sidebar-collapsed-init .sidebar__link span,
.sidebar-collapsed .sidebar__link span {
  max-width: 0;
  opacity: 0;
}
.sidebar-collapsed-init .sidebar__link,
.sidebar-collapsed .sidebar__link {
  gap: 0;
}
.sidebar-collapsed-init .sidebar__collapse-btn i,
.sidebar-collapsed .sidebar__collapse-btn i {
  transform: rotate(180deg);
}

/* Tooltip en modo colapsado */
.sidebar-collapsed .sidebar__link {
  position: relative;
}
.sidebar-collapsed .sidebar__link::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: #2a2a2a;
  color: var(--blanco);
  padding: 0.28rem 0.65rem;
  border-radius: 4px;
  font-size: 0.73rem;
  white-space: nowrap;
  border: 1px solid var(--border);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 999;
}
.sidebar-collapsed .sidebar__link:hover::after {
  opacity: 1;
}
.sidebar__link:hover {
  color: var(--blanco);
  background: rgba(255,255,255,0.04);
}
.sidebar__link--active {
  color: var(--blanco);
  border-left-color: var(--rosa);
  background: rgba(192, 38, 211, 0.07);
}



/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0.5rem 1.1rem;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.15s;
}
.btn--primary {
  background: var(--rosa);
  color: var(--blanco);
  border-color: var(--rosa);
}
.btn--primary:hover { background: var(--vinotinto); border-color: var(--vinotinto); transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--texto);
  border-color: rgba(255, 255, 255, 0.18);
}
.btn--ghost:hover { border-color: var(--rosa); color: var(--rosa); }
.btn--sm { padding: 0.35rem 0.8rem; font-size: 0.75rem; }
.btn--full { width: 100%; }
.btn--danger { background: #EF4444; border-color: #EF4444; color: #fff; }
.btn--danger:hover { background: #dc2626; border-color: #dc2626; }

/* ─── Modal de confirmación ──────────────────────────────── */
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}
.confirm-modal.open { visibility: visible; opacity: 1; }
.confirm-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(2px);
}
.confirm-modal__box {
  position: relative;
  width: min(360px, calc(100vw - 2.5rem));
  background: var(--gris);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  transform: translateY(8px) scale(0.98);
  transition: transform 0.15s ease;
}
.confirm-modal.open .confirm-modal__box { transform: translateY(0) scale(1); }
.confirm-modal__message {
  color: var(--texto);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 1.2rem;
}
.confirm-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

/* ─── Content area ───────────────────────────────────────── */
.content {
  flex: 1;
  min-width: 0;
  padding: 2.5rem 2.5rem 5rem;
}

/* Login / OTP — centrado, sin sidebar */
.main {
  flex: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}


.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
  margin-bottom: 2rem;
}
@media (max-width: 800px) { .settings-grid { grid-template-columns: 1fr; } }

.settings-card {
  --p-color: var(--rosa);
  background: #0e0b16;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.settings-card--spotify    { --p-color: #1DB954; }
.settings-card--youtube    { --p-color: #FF4444; }
.settings-card--instagram  { --p-color: #C13584; }
.settings-card--tiktok     { --p-color: #69C9D0; }
.settings-card--soundcloud { --p-color: #FF5500; }
.settings-card { border-color: color-mix(in srgb, var(--p-color) 30%, transparent); }

.settings-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid color-mix(in srgb, var(--p-color) 20%, transparent);
  background: color-mix(in srgb, var(--p-color) 6%, transparent);
}
.settings-card__icon { font-size: 1.2rem; color: var(--p-color); }
.settings-card__title {
  flex: 1;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--blanco);
}
.settings-card__fields { padding: 1.2rem; display: flex; flex-direction: column; gap: 1rem; }

.settings-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}
.settings-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.settings-switch__track {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 20px;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  transition: background 0.2s ease;
}
.settings-switch__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}
.settings-switch input:checked + .settings-switch__track {
  background: var(--p-color, var(--rosa));
}
.settings-switch input:checked + .settings-switch__track::after {
  transform: translateX(16px);
}
.settings-switch__label {
  font-size: 0.72rem;
  color: var(--texto-muted);
  white-space: nowrap;
}

/* ─── Configuración por artista — foto + tabla de plataformas ───── */
.artist-config-avatar {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}
.artist-config-avatar__img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(192, 38, 211, 0.35);
  color: rgba(255,255,255,0.3);
  font-size: 1.4rem;
  background: linear-gradient(135deg, var(--vinotinto) 0%, #0A0A0A 100%);
}
.artist-config-avatar__upload-btn {
  position: absolute;
  bottom: -2px;
  right: -2px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--rosa);
  color: #fff;
  font-size: 0.65rem;
  border: 2px solid var(--negro);
  cursor: pointer;
  transition: background 0.15s;
}
.artist-config-avatar__upload-btn:hover { background: var(--vinotinto); }

.artist-config-avatar--lg {
  width: 110px;
  height: 110px;
}
.artist-config-avatar--lg .artist-config-avatar__img { font-size: 2.6rem; border-width: 3px; }
.artist-config-avatar--lg .artist-config-avatar__upload-btn {
  width: 34px;
  height: 34px;
  font-size: 1rem;
}

.artist-config-field-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.artist-config-field-form { min-width: 0; flex: 1; }
.artist-config-field-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(224, 26, 138, 0.55);
  padding: 0 0 1px;
  color: #FFFFFF;
  font-family: inherit;
}
.artist-config-field-input:focus { outline: none; }
.artist-config-field-input--name { font-size: 1.6rem; font-weight: 800; font-family: var(--font-heading); }
.artist-config-field-input--genre { font-size: 0.85rem; }

.artist-config-genre {
  font-size: 0.85rem;
  color: var(--texto-muted);
}

.artist-config-edit-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: transparent;
  border: none;
  color: #8E8E93;
  font-size: 0.7rem;
  cursor: pointer;
  transition: color 0.15s;
}
.artist-config-edit-btn:hover { color: var(--rosa); }

.platform-config-panel {
  max-width: 700px;
  margin: 0 auto;
}

.platform-config-table {
  width: 100%;
  border-collapse: collapse;
  background: #0e0b16;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 2rem;
}
.platform-config-table th {
  text-align: left;
  vertical-align: middle;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--texto-muted);
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}
.platform-config-table__col--toggle   { width: 130px; }
.platform-config-table__col--platform { width: 160px; }

.platform-config-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.platform-config-table tbody tr:last-child td { border-bottom: none; }

.platform-config-row { --p-color: var(--rosa); transition: background-color 0.2s ease; }
.platform-config-row--spotify    { --p-color: #1DB954; }
.platform-config-row--youtube    { --p-color: #FF4444; }
.platform-config-row--instagram  { --p-color: #C13584; }
.platform-config-row--tiktok     { --p-color: #69C9D0; }
.platform-config-row--soundcloud { --p-color: #FF5500; }
.platform-config-row--error { background-color: rgba(239,68,68,0.06); }

.platform-config-row__platform {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--blanco);
}
.platform-config-row__icon { font-size: 1.1rem; }
.platform-config-row__icon--spotify    { color: #1DB954; }
.platform-config-row__icon--youtube    { color: #FF4444; }
.platform-config-row__icon--instagram  { color: #C13584; }
.platform-config-row__icon--tiktok     { color: #69C9D0; }
.platform-config-row__icon--soundcloud { color: #FF5500; }

.platform-config-row__account-input { width: 100%; }
.platform-config-row__account--hidden { visibility: hidden; }

.platform-config-row__help {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  color: var(--texto-muted);
}

.platform-config-row__error {
  margin: 0.35rem 0 0;
  font-size: 0.76rem;
  color: #EF4444;
}

@media (max-width: 640px) {
  .platform-config-table, .platform-config-table thead, .platform-config-table tbody,
  .platform-config-table th, .platform-config-table td, .platform-config-table tr {
    display: block;
  }
  .platform-config-table thead { display: none; }
  .platform-config-row { padding: 0.9rem 1rem; border-bottom: 1px solid var(--border); }
  .platform-config-table td { border: none; padding: 0.3rem 0; }
}

.settings-field { display: flex; flex-direction: column; gap: 0.3rem; }
.settings-field__label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--texto-muted);
}
.settings-field__badge {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.45rem;
  border-radius: 99px;
  text-transform: none;
}
.settings-field__badge--ok    { background: rgba(29,185,84,0.15); color: #1DB954; }
.settings-field__badge--empty { background: rgba(255,255,255,0.06); color: var(--texto-muted); }

.settings-field__input {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.55rem 0.8rem;
  color: var(--texto);
  font-size: 0.85rem;
  font-family: var(--font-body);
  width: 100%;
  transition: border-color 0.15s;
}
.settings-field__input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--p-color) 60%, transparent);
}
.settings-field__help {
  font-size: 0.68rem;
  color: var(--texto-muted);
  margin: 0;
}

.settings-actions { display: flex; justify-content: flex-end; }
.btn-save {
  background: linear-gradient(135deg, var(--vinotinto), var(--rosa));
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.65rem 1.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-save:hover { opacity: 0.85; }

.btn-unlink {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  color: var(--texto-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.btn-unlink:hover { color: #f87171; border-color: rgba(248,113,113,0.4); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--texto-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.back-link:hover { color: var(--rosa); }

/* ─── Page header ────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.page-header__artist {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.35rem;
}
.avatar-config-wrap { position: relative; width: 56px; height: 56px; flex-shrink: 0; }
.avatar-config-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.75rem;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease;
}
.avatar-config-wrap:hover .avatar-config-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.avatar-config-btn:hover { color: var(--rosa); }

.artist-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(192, 38, 211, 0.35);
}
.artist-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.artist-avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 58, 237, 0.15);
  color: var(--texto-muted);
  font-size: 1.5rem;
}
.page-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--rosa);
  margin-bottom: 0.5rem;
}
.page-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--blanco);
  letter-spacing: -0.01em;
}
.page-header__genre {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--texto-muted);
  margin-top: 0.3rem;
}
.page-subtitle {
  font-size: 0.78rem;
  color: var(--texto-muted);
  margin-top: 0.4rem;
  letter-spacing: 0.05em;
}

/* ─── Artist switcher ────────────────────────────────────── */
.switcher { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.switcher__item {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--texto-muted);
  transition: all 0.18s;
}
.switcher__item:hover { border-color: var(--rosa); color: var(--rosa); }
.switcher__item--active {
  background: var(--rosa);
  border-color: var(--rosa);
  color: var(--blanco);
}

/* ─── Artist switcher (dropdown) ─────────────────────────── */
.artist-switcher { position: relative; }
.artist-switcher__trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  cursor: pointer;
  padding: 0.3rem 0.9rem 0.3rem 0.3rem;
  transition: border-color 0.15s, background 0.15s;
}
.artist-switcher__trigger:hover {
  border-color: var(--rosa);
  background: rgba(255, 255, 255, 0.04);
}
.artist-switcher__avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--texto);
  font-size: 0.75rem;
}
.artist-switcher__avatar img { width: 100%; height: 100%; object-fit: cover; }
.artist-switcher__name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--texto);
  letter-spacing: 0.02em;
}
.artist-switcher__chevron {
  font-size: 0.65rem;
  color: var(--texto-muted);
  transition: transform 0.2s;
}
.artist-switcher.open .artist-switcher__chevron { transform: rotate(180deg); }

.artist-switcher__menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 220px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 400;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.artist-switcher.open .artist-switcher__menu { display: block; }

.artist-switcher__item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  color: var(--texto-muted);
  transition: color 0.15s, background 0.15s;
}
.artist-switcher__item:hover { color: var(--rosa); background: rgba(192, 38, 211, 0.06); }
.artist-switcher__item--active { color: var(--blanco); background: rgba(192, 38, 211, 0.1); }

/* ─── Section ────────────────────────────────────────────── */
.section { margin-bottom: 3rem; }
.section--summary { margin-bottom: 4rem; }
.section__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--rosa);
  margin-bottom: 1rem;
}

/* ─── Grid ───────────────────────────────────────────────── */
.grid { display: grid; gap: 1.5px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; }
}

/* ─── Summary cards (Resumen) ───────────────────────────── */
.summary-grid {
  display: flex;
  gap: 1.4rem;
  margin-bottom: 0;
}
.summary-grid > .summary-card { flex: 1 1 0; min-width: 0; }
@media (max-width: 900px) { .summary-grid { flex-wrap: wrap; } .summary-grid > .summary-card { flex-basis: calc(50% - 0.7rem); } }
@media (max-width: 540px) { .summary-grid > .summary-card { flex-basis: 100%; } }

/* Platform color vars */
.summary-card--spotify    { --p-color: #1DB954; }
.summary-card--instagram  { --p-color: #C13584; }
.summary-card--tiktok     { --p-color: #69C9D0; }
.summary-card--youtube    { --p-color: #FF4444; }
.summary-card--soundcloud { --p-color: #FF5500; }

.summary-card {
  background: #0e0b16;
  border: 1px solid color-mix(in srgb, var(--p-color) 45%, var(--border));
  border-radius: 16px;
  padding: 1.4rem 1.3rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  position: relative;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
}
.summary-card:hover {
  border-color: color-mix(in srgb, var(--p-color) 75%, transparent);
  box-shadow: 0 0 22px -6px color-mix(in srgb, var(--p-color) 35%, transparent);
  transform: translateY(-2px);
}

.summary-card__icon {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--p-color) 16%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--p-color);
  margin-bottom: 0.9rem;
}

.summary-card__metric {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--texto-muted);
  margin-bottom: 0.35rem;
}
.summary-card__value {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--blanco);
}
.summary-card__change {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 0.4rem;
}
.summary-card__change--up   { color: var(--up); }
.summary-card__change--down { color: var(--down); }

.summary-card__submetric {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--texto-muted);
  margin-top: 0.5rem;
}

.summary-card__spark {
  width: 100%;
  height: 34px;
  margin: 0.9rem 0 0.3rem;
  overflow: visible;
}
.summary-card__spark polyline {
  fill: none;
  stroke: var(--p-color);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}

.summary-card__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: auto;
  width: 100%;
  font-size: 0.75rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--p-color) 75%, white);
  border: 1px solid color-mix(in srgb, var(--p-color) 40%, transparent);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  box-sizing: border-box;
}
.summary-card__cta:hover {
  background: color-mix(in srgb, var(--p-color) 15%, transparent);
  color: var(--p-color);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Story reel (resumen narrado de la semana) ─────────── */
.reel {
  position: relative;
  width: 100%;
  height: clamp(380px, 28vw, 440px);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  overflow: hidden;
  background: #0e0b16;
  outline: none;
}
.reel:focus-visible { border-color: var(--rosa); }

.reel__progress {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 3;
  display: flex;
  gap: 6px;
  padding: 16px 20px 0;
}
.reel__seg { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,0.22); overflow: hidden; }
.reel__seg-fill { display: block; height: 100%; width: 0%; background: var(--blanco); border-radius: 3px; }
.reel__seg-fill.animating { transition: width linear; }

.reel__dots {
  display: none;
  position: absolute;
  left: 0; right: 0; bottom: 14px;
  z-index: 3;
  justify-content: center;
  gap: 8px;
}
.reel__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  border: 0; padding: 0;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.reel__dot:hover { background: rgba(255,255,255,0.55); }
.reel__dot.is-active { background: var(--blanco); transform: scale(1.35); }

/* Pantallas angostas (celular): barra de progreso tipo stories arriba.
   Pantallas anchas (escritorio): puntitos centrados abajo. */
@media (min-width: 700px) {
  .reel__progress { display: none; }
  .reel__dots { display: flex; }
  .reel__slide { padding-bottom: 2.8rem; }
}

.reel__slides { position: relative; width: 100%; height: 100%; }
.reel__slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 2.6rem 3.4rem 1.8rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
  background:
    radial-gradient(120% 140% at 84% 6%, var(--slide-glow, transparent), transparent 58%),
    linear-gradient(165deg, #141420, #0e0b16);
}
.reel__slide.is-active { opacity: 1; pointer-events: auto; }

.reel__kicker {
  position: absolute;
  top: 2.6rem;
  left: 3.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem 0.3rem 0.5rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
}
.reel__headline {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  line-height: 1.25;
  color: var(--blanco);
  max-width: 26ch;
  margin-top: 2rem;
  min-height: 2.5em;
}
.reel__stat-row { display: flex; align-items: baseline; gap: 0.5rem; margin-top: 0.6rem; flex-wrap: wrap; min-height: 1.2em; }
.reel__stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 4.5vw, 3rem);
  color: var(--up);
}
.reel__stat-unit { font-size: 0.85rem; color: var(--texto-muted); }
.reel__caption { margin-top: 0.4rem; max-width: 32ch; color: var(--texto); font-size: 0.85rem; line-height: 1.4; min-height: 2.8em; }

.cmpbar, .goalbar { margin-top: 0.75rem; max-width: 280px; min-height: 3.4rem; }
.cmpbar__row { display: grid; grid-template-columns: 78px 1fr 44px; align-items: center; gap: 0.5rem; margin-bottom: 0.3rem; }
.cmpbar__label { font-size: 0.63rem; color: var(--texto-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.cmpbar__track, .goalbar__track { height: 7px; border-radius: 4px; background: rgba(255,255,255,0.1); overflow: hidden; position: relative; }
.goalbar__track { height: 10px; }
.cmpbar__fill { height: 100%; border-radius: 4px; }
.cmpbar__fill--muted { background: rgba(255,255,255,0.35); }
.cmpbar__fill--accent { background: var(--fill-color, var(--rosa)); }
.cmpbar__value { font-family: var(--font-display); font-size: 0.78rem; text-align: right; color: var(--blanco); }
.goalbar__fill { position: absolute; inset: 0; width: 0; border-radius: 4px; }
.goalbar__target { position: absolute; top: -5px; bottom: -5px; right: 0; width: 2px; background: rgba(255,255,255,0.55); }
.goalbar__labels { display: flex; justify-content: space-between; margin-top: 0.4rem; font-size: 0.68rem; color: var(--texto-muted); }
.goalbar__labels b { color: var(--blanco); font-family: var(--font-display); font-weight: 700; }

.reel__nav { position: absolute; top: 0; bottom: 0; width: 34%; z-index: 2; background: transparent; border: 0; padding: 0; cursor: pointer; }
.reel__nav--prev { left: 0; }
.reel__nav--next { right: 0; }
.reel__chevron {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.14);
  color: var(--blanco); opacity: 0; transition: opacity 0.2s ease; z-index: 2;
  pointer-events: none;
}
.reel__chevron--prev { left: 10px; }
.reel__chevron--next { right: 10px; }
.reel:hover .reel__chevron, .reel:focus-within .reel__chevron { opacity: 1; }

.reel__pause-flag {
  position: absolute; top: 14px; right: 16px; z-index: 3;
  display: flex; align-items: center; gap: 0.3rem;
  padding: 0.3rem 0.6rem; border-radius: 999px;
  background: rgba(0,0,0,0.5); font-size: 0.62rem;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--blanco);
  opacity: 0; transition: opacity 0.2s ease;
}
.reel__pause-flag.is-visible { opacity: 1; }

.reel--empty { display: flex; }
.reel__empty {
  margin: auto; text-align: center; padding: 2rem;
  color: var(--texto-muted);
}
.reel__empty-icon { font-size: 1.6rem; color: var(--rosa); display: block; margin-bottom: 0.8rem; }
.reel__empty-sub { font-size: 0.78rem; margin-top: 0.3rem; }

@media (prefers-reduced-motion: reduce) {
  .reel__slide, .reel__seg-fill, .goalbar__fill { transition: none !important; }
}

/* ─── Stat card ──────────────────────────────────────────── */
.stat-card {
  background: var(--gris);
  border: 1px solid var(--border);
  padding: 1.8rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.18s;
}
.stat-card:hover { border-color: var(--border-hover); }

/* Línea gradiente arriba en el primero de cada sección */
.stat-card--featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--vinotinto), var(--rosa));
}

.stat-card__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--texto-muted);
}
.stat-card__value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--blanco);
  margin-top: 0.4rem;
}
.stat-card__change {
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 0.2rem;
}
.stat-card__change--up   { color: var(--up); }
.stat-card__change--down { color: var(--down); }
.stat-card__source {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(207,207,207,0.25);
  margin-top: auto;
  padding-top: 0.75rem;
}
.stat-card__date {
  font-size: 0.7rem;
  color: var(--texto-muted);
  margin-top: 0.15rem;
}

/* ─── Grid de stat cards con separadores ─────────────────── */
.stat-grid-wrap {
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  gap: 1.5px;
}
.stat-grid-wrap .stat-card { border: none; border-radius: 0; }

/* ─── Detail section ────────────────────────────────────── */
.detail-section {
  margin-top: 1rem;
  margin-bottom: 3rem;
  background: #0e0b16;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 1.6rem;
}
.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.detail-header__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.detail-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.detail-icon--spotify    { background: rgba(29,185,84,0.15);  color: #1DB954; }
.detail-icon--instagram  { background: rgba(193,53,132,0.15); color: #C13584; }
.detail-icon--tiktok     { background: rgba(105,201,208,0.15);color: #69C9D0; }
.detail-icon--youtube    { background: rgba(255,68,68,0.15);  color: #FF4444; }
.detail-icon--soundcloud { background: rgba(255,85,0,0.15);   color: #FF5500; }
.detail-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--blanco);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.detail-header__right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.range-quick {
  display: flex;
  gap: 0.35rem;
}
.range-quick__btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  color: var(--texto-muted);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.range-quick__btn:hover {
  color: var(--texto);
  border-color: rgba(255,255,255,0.2);
}
.range-quick__btn--active {
  color: #fff;
  background: var(--rosa);
  border-color: var(--rosa);
}
.date-range {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.date-range__sep {
  color: var(--texto-muted);
  font-size: 0.8rem;
}
.date-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  color: var(--texto);
  font-size: 0.8rem;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  color-scheme: dark;
}
.date-input:focus {
  outline: none;
  border-color: var(--vinotinto);
}
.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--texto-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.35rem 0.85rem;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}
.btn-export:hover { color: var(--texto); border-color: rgba(255,255,255,0.2); }
.detail-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--texto-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.detail-close-btn:hover { color: var(--texto); border-color: rgba(255,255,255,0.2); }
.detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
}
.detail-body--youtube {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.detail-body--full {
  grid-template-columns: 1fr;
}
@media (max-width: 960px) {
  .detail-body,
  .detail-body--youtube { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .detail-section { padding: 1.2rem 1rem; }
  .detail-header__right { width: 100%; }
  .range-quick, .date-range { flex-wrap: wrap; }
  .btn-export { flex: 1 1 auto; justify-content: center; }
}
.detail-chart-wrap {
  position: relative;
  width: 100%;
  height: 320px;
  max-width: 100%;
}
.detail-chart-wrap canvas {
  max-width: 100%;
}
.detail-body--full .detail-chart-wrap {
  max-width: 900px;
  margin: 0 auto;
}
@media (max-width: 540px) {
  .detail-chart-wrap { height: 220px; }
}
.summary-card--active {
  border-color: color-mix(in srgb, var(--p-color) 80%, transparent) !important;
  box-shadow: 0 0 32px -4px color-mix(in srgb, var(--p-color) 40%, transparent) !important;
}

/* ─── Platform block (redes sociales) ───────────────────── */
.platform-block {
  background: var(--gris);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  position: relative;
  overflow: hidden;
}
.platform-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--vinotinto), var(--rosa));
}
.platform-block__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--blanco);
  margin-bottom: 1.2rem;
}

/* ─── Metric list ────────────────────────────────────────── */
.metric-list { display: flex; flex-direction: column; gap: 0.6rem; }
.metric-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.metric-row:last-child { border-bottom: none; }
.metric-row__name { color: var(--texto-muted); flex: 1; font-size: 0.82rem; }
.metric-row__value { font-weight: 500; color: var(--blanco); }
.metric-row__change {
  font-size: 0.75rem;
  min-width: 5ch;
  text-align: right;
}
.metric-row__change--up   { color: var(--up); }
.metric-row__change--down { color: var(--down); }

/* ─── Platform tag ───────────────────────────────────────── */
.platform-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--texto-muted);
}

/* ─── Table ──────────────────────────────────────────────── */
.table-wrap {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.data-table th {
  text-align: left;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rosa);
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid var(--border);
  background: var(--gris);
  white-space: nowrap;
}
.data-table th.text-right { text-align: right; }
.data-table td {
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
  color: var(--texto);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(192,38,211,0.04); }
.track-cover {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  display: block;
}
.table-track {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  max-width: 100%;
}
.table-track__cover--sm {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.table-track__info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  overflow: hidden;
}
.table-track__title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.table-track__sub {
  font-size: 0.72rem;
  color: var(--texto-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.data-table--compact {
  table-layout: fixed;
}
.data-table--compact th,
.data-table--compact td {
  padding: 0.55rem 0.9rem;
  font-size: 0.8rem;
  overflow: hidden;
}
.track-cover--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 58, 237, 0.15);
  color: var(--texto-muted);
  font-size: 1.1rem;
}

/* ─── Metadata de canciones ──────────────────────────────── */
.track-meta-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.4rem;
  align-items: start;
}
@media (max-width: 800px) { .track-meta-layout { grid-template-columns: 1fr; } }

.track-list-wrap { display: flex; flex-direction: column; gap: 0.8rem; }

.track-new {
  background: #0e0b16;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.track-new__toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rosa);
  cursor: pointer;
  list-style: none;
}
.track-new__toggle::-webkit-details-marker { display: none; }
.track-new__form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 0 1rem 1rem;
}

.track-list {
  display: flex;
  flex-direction: column;
  background: #0e0b16;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  max-height: 60vh;
  overflow-y: auto;
}
.track-list__empty {
  padding: 1rem;
  font-size: 0.8rem;
  color: var(--texto-muted);
}
.track-list__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  border-left: 2px solid transparent;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.track-list__item:hover { background: rgba(192,38,211,0.04); }
.track-list__item--active {
  background: rgba(192,38,211,0.08);
  border-left-color: var(--rosa);
}
.track-list__info { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.track-list__title {
  font-size: 0.85rem;
  color: var(--texto);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-list__sub { font-size: 0.7rem; color: var(--texto-muted); }
.track-list__link-form { display: flex; gap: 0.5rem; margin-left: auto; }
.track-list__link-form .settings-field__input { width: 200px; }

/* ─── Canciones (lista horizontal) ──────────────────────── */
.song-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(600px, 680px));
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 5rem;
}
@media (max-width: 700px) {
  .song-list { grid-template-columns: 1fr; }
}
.song-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 150px;
  min-width: 0;
  background: #16161A;
  border: 1.5px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 1.1rem 1.3rem;
  cursor: default;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
@media (max-width: 480px) {
  .song-row { gap: 0.85rem; padding: 0.9rem; }
  .song-row__cover, .song-row__cover--placeholder { width: 72px; height: 72px; }
  .song-row__side { width: auto; }
}
.song-row:hover {
  border-color: rgba(224, 26, 138, 0.55);
  box-shadow: 0 0 0 1px rgba(224, 26, 138, 0.2), 0 0 32px rgba(224, 26, 138, 0.25);
}
.song-row__cover-wrap { flex-shrink: 0; }
.song-row__cover {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}
.song-row__cover--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 58, 237, 0.15);
  color: #8E8E93;
  font-size: 2.2rem;
}
.song-row__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.song-row__title-wrap { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.song-row__title {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.song-row__title-form { min-width: 0; flex: 1; }
.song-row__title-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(224, 26, 138, 0.55);
  padding: 0 0 1px;
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: #FFFFFF;
}
.song-row__title-input:focus { outline: none; }
.song-row__edit-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: transparent;
  border: none;
  color: #8E8E93;
  font-size: 0.68rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
}
.song-row:hover .song-row__edit-btn { opacity: 1; }
.song-row__edit-btn:hover { color: var(--rosa); }
.song-row__subtitle {
  font-size: 0.85rem;
  color: #A1A1AA;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.song-row__tag {
  align-self: flex-start;
  font-size: 0.7rem;
  color: #A1A1AA;
  background: #1F1F23;
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
  letter-spacing: 0.02em;
}
.song-row__platforms { flex-shrink: 0; }
.song-row__side {
  flex-shrink: 0;
  width: 60px;
  height: 100%;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
}
.song-row__duration { font-size: 0.78rem; color: #A1A1AA; }
.song-row__delete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  color: #8E8E93;
  font-size: 0.85rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  margin-top: auto;
}
.song-row:hover .song-row__delete-btn { opacity: 1; }
.song-row__delete-btn:hover { color: #EF4444; }

/* ─── Botón flotante: nueva canción ──────────────────────── */
.new-song-fab { position: fixed; right: 2.5rem; bottom: 2.5rem; z-index: 60; }
.new-song-fab__toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--vinotinto), var(--rosa));
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  list-style: none;
  box-shadow: 0 10px 30px rgba(192,38,211,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}
.new-song-fab__toggle:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(192,38,211,0.45); }
.new-song-fab__toggle::-webkit-details-marker { display: none; }
.new-song-fab__toggle::marker { content: ''; }
.new-song-fab[open] .new-song-fab__toggle { border-radius: 12px 12px 0 0; }
.new-song-fab__form {
  position: absolute;
  bottom: calc(100% + 0.75rem);
  right: 0;
  width: 260px;
  background: var(--gris);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}

.platform-icons { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.platform-icons__form { display: contents; }
.platform-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  color: #fff;
  background: linear-gradient(135deg, var(--vinotinto), var(--rosa));
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.platform-icon:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(224, 26, 138, 0.4); }
.platform-icon--muted {
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  color: #8E8E93;
  opacity: 0.7;
}
.platform-icon--muted:hover { opacity: 1; box-shadow: none; }

/* ─── Utilities ──────────────────────────────────────────── */
.text-right  { text-align: right; }
.text-muted  { color: var(--texto-muted); }
.mono        { font-family: 'DM Mono', monospace; font-size: 0.88em; }
.d-flex      { display: flex; }
.gap-1       { gap: 0.5rem; }

/* ─── Login ──────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse 50% 60% at 70% 40%, rgba(124,58,237,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 70%, rgba(192,38,211,0.08) 0%, transparent 60%),
    var(--negro);
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--gris);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2.2rem;
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--vinotinto), var(--rosa));
}
.login-brand {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--blanco);
  margin-bottom: 0.3rem;
}
.login-brand span { color: var(--rosa); }
.login-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--rosa);
  margin-bottom: 0.4rem;
}
.login-title {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--blanco);
  margin-bottom: 2rem;
  line-height: 1.15;
}
.login-form { display: flex; flex-direction: column; gap: 1.2rem; }

/* ─── Form fields ────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rosa);
}
.field__input {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: var(--blanco);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.7rem 1rem;
  outline: none;
  transition: border-color 0.18s;
  width: 100%;
}
.field__input:focus { border-color: var(--rosa); }
.field__input--error { border-color: var(--down); }
.field__error { font-size: 0.75rem; color: var(--down); }
.form-error {
  font-size: 0.82rem;
  color: var(--down);
  background: rgba(248, 113, 113, 0.06);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
}

/* ─── Empty state ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--texto-muted);
  font-size: 0.9rem;
}
.empty-state a { color: var(--rosa); border-bottom: 1px solid rgba(192,38,211,0.4); padding-bottom: 1px; }

/* ─── Messages ───────────────────────────────────────────── */
.messages { margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.message {
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  border: 1px solid var(--border);
  max-height: 100px;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.4s ease, max-height 0.4s ease, padding 0.4s ease, margin 0.4s ease, border-width 0.4s ease;
}
.message--hide {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin: 0;
  border-width: 0;
}
.message--error   { color: var(--down); border-color: rgba(248,113,113,0.25); background: rgba(248,113,113,0.05); }
.message--success { color: var(--up);   border-color: rgba(74,222,128,0.25);  background: rgba(74,222,128,0.05); }

/* ─── Artists overview — filas horizontales, mismo patrón que .song-row ─── */
.artist-list {
    display: grid;
    grid-template-columns: minmax(0, 740px);
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 5rem;
}
@media (max-width: 700px) {
    .artist-list { grid-template-columns: 1fr; }
}

.artist-row {
    display: grid;
    grid-template-columns: 1.5fr 6fr;
    align-items: stretch;
    min-height: 150px;
    min-width: 0;
    background: #16161A;
    border: 1.5px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
@media (max-width: 480px) {
    .artist-row { grid-template-columns: 90px 1fr; }
}

.artist-row__link {
    display: flex;
    align-items: stretch;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}
.artist-row:hover {
    border-color: rgba(224, 26, 138, 0.55);
    box-shadow: 0 0 0 1px rgba(224, 26, 138, 0.2), 0 0 32px rgba(224, 26, 138, 0.25);
}

.artist-row__cover-wrap { position: relative; min-width: 0; }
.artist-row__cover-link { display: block; width: 100%; height: 100%; }
.artist-row__cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.artist-row__cover--placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--vinotinto) 0%, #0A0A0A 100%);
    color: rgba(255,255,255,0.3);
    font-size: 2.6rem;
}

.artist-row__cover-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}
.artist-row__cover-wrap:hover::after { opacity: 1; }

.artist-row__config-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 1rem;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease;
}
.artist-row__cover-wrap:hover .artist-row__config-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.artist-row__config-btn:hover { color: var(--rosa); }

.artist-row__info {
    flex: 2.5;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    padding: 1.1rem 1.25rem;
}
.artist-row__name {
    font-size: 1.35rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: #FFFFFF;
}
.artist-row__genre {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rosa);
}
.artist-row__genre:empty::before {
    content: 'Agregar género';
    color: var(--texto-muted);
    text-transform: none;
    letter-spacing: normal;
    font-style: italic;
}

.artist-row__metrics {
    flex: 3.5;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.7rem;
    padding-right: 1.6rem;
}
.artist-row__metrics .dash-metric {
    display: grid;
    grid-template-columns: 1.3rem 1fr;
    column-gap: 0.35rem;
    align-items: center;
    width: 58px;
    min-width: 58px;
    flex-shrink: 0;
    font-size: 1.1rem;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--texto);
    overflow: hidden;
}
.artist-row__metrics .dash-metric i,
.artist-row__metrics .dash-metric svg { font-size: 1.2rem; justify-self: center; }
.artist-row__metrics .dash-metric--spotify    i { color: #1DB954; }
.artist-row__metrics .dash-metric--instagram  i { color: #C13584; }
.artist-row__metrics .dash-metric--tiktok     i { color: #69C9D0; }
.artist-row__metrics .dash-metric--youtube    i { color: #FF4444; }
.artist-row__metrics .dash-metric--soundcloud i,
.artist-row__metrics .dash-metric--soundcloud svg { color: #FF5500; }
.artist-row__metrics .dash-metric--empty {
    color: var(--texto-muted);
    font-weight: 400;
}
.artist-row__metrics .dash-metric--empty i,
.artist-row__metrics .dash-metric--empty svg { color: var(--texto-muted); opacity: 0.5; }

@media (max-width: 700px) {
    .artist-row { grid-template-columns: 1fr 2fr; }
    .artist-row__metrics { display: none; }
}
@media (max-width: 480px) {
    .artist-row { grid-template-columns: 90px 1fr; }
    .artist-row__info { padding: 1.1rem 0.9rem; }
}

.overview-no-data {
    font-size: 0.8rem;
    color: var(--texto-muted);
    font-style: italic;
}

/* ─── OTP ────────────────────────────────────────────────── */
.otp-card { max-width: 440px; }

.otp-steps {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin-bottom: 0.5rem;
}
.otp-step {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    font-size: 0.87rem;
    color: var(--texto);
    line-height: 1.55;
}
.otp-step p { margin: 0; }
.otp-step__num {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--vinotinto), var(--rosa));
    color: var(--blanco);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 0.1rem;
}

.qr-wrap {
    display: flex;
    justify-content: center;
    padding: 0.5rem 0;
}
.qr-img {
    width: 180px;
    height: 180px;
    border-radius: var(--radius);
    border: 2px solid var(--border-hover);
    display: block;
}

.secret-details {
    font-size: 0.82rem;
    color: var(--texto-muted);
}
.secret-details summary {
    cursor: pointer;
    color: var(--rosa);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}
.secret-details summary::-webkit-details-marker { display: none; }
.secret-label {
    font-size: 0.72rem;
    color: var(--texto-muted);
    margin-bottom: 0.4rem;
}
.secret-code {
    display: block;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.85rem;
    font-family: var(--font-display);
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    word-break: break-all;
    color: var(--blanco);
}

.otp-input {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 0.35em;
    text-align: center;
    padding: 0.7rem 1rem;
}

.otp-desc {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.87rem;
    color: var(--texto-muted);
    line-height: 1.55;
    margin-bottom: 1.5rem;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .main { padding: 1.5rem 1rem 4rem; }
  .content { padding: 1.25rem 1rem 4rem; }
  .topnav { padding: 0 1rem; }
  .page-title { font-size: 1.6rem; }
  .stat-card__value { font-size: 1.7rem; }

  /* Sidebar siempre en modo ícono para dejar más ancho al contenido */
  .app-shell .sidebar { width: 48px !important; }
  .sidebar__link span { max-width: 0 !important; opacity: 0 !important; }
  .sidebar__link { gap: 0 !important; }
  .sidebar__collapse-btn { display: none; }
}

@media (max-width: 540px) {
  .summary-card { padding: 1.2rem 1rem 1rem; }
  .stat-card { padding: 1.4rem 1.1rem; }
  .detail-section { padding: 1rem 0.85rem; }
}
