/* ── MODALS ── */
.mo-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(0,0,0,.72);
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.mo-overlay.open { display: flex; }

.mo-box {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r3);
  padding: 20px;
  width: 100%;
  max-width: 380px;
  max-height: 92vh;
  overflow-y: auto;
}
.mo-box.wide { max-width: 440px; }

.mo-title { font-family: 'Satoshi', sans-serif; font-size: 16px; font-weight: 500; margin-bottom: 2px; }
.mo-sub { font-size: 12px; color: var(--muted); margin-bottom: 12px; line-height: 1.4; }
.mo-section {
  font-size: 11px; font-weight: 500;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px; margin-top: 12px;
}
.mo-actions {
  display: flex; gap: 6px;
  justify-content: flex-end;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* ── FORM ELEMENTS ── */
.mi {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border2);
  border-radius: var(--r);
  background: var(--bg3);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
  margin-bottom: 5px;
}
.mi:focus { border-color: var(--gold); }
.mi::placeholder { color: var(--muted); }

.msel {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border2);
  border-radius: var(--r);
  background: var(--bg3);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  outline: none;
  margin-bottom: 5px;
}

.mta {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border2);
  border-radius: var(--r);
  background: var(--bg3);
  color: var(--text);
  font-size: 13px;
  outline: none;
  resize: vertical;
  min-height: 52px;
  margin-bottom: 5px;
}
.mta:focus { border-color: var(--gold); }

/* ── FORMAT SELECTOR ── */
.fmt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 4px;
}
.fmt-opt {
  padding: 9px 5px;
  border: 1px solid var(--border2);
  border-radius: var(--r);
  text-align: center;
  cursor: pointer;
  transition: all .12s;
  background: var(--bg3);
}
.fmt-opt:hover { border-color: var(--gold); }
.fmt-opt.sel { border-color: var(--gold); background: rgba(200,169,110,.1); }
.fmt-opt .fmt-icon { font-size: 18px; margin-bottom: 2px; }
.fmt-opt .fmt-label { font-size: 11px; font-weight: 500; }

/* ── EDITION CHIPS ── */
.ecs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.ec {
  padding: 3px 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  color: var(--muted);
  transition: all .12s;
}
.ec:hover { border-color: var(--gold); color: var(--gold); }

/* ── SCORE ── */
.score-row { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.score-box {
  width: 34px; height: 34px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 500; color: #fff;
  flex-shrink: 0;
  transition: background .15s;
}
.score-num {
  width: 48px;
  padding: 4px 5px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  color: var(--text);
  font-size: 13px;
  text-align: center;
  outline: none;
}

/* ── COLLAPSIBLE OPT ── */
.opt-toggle { font-size: 12px; color: var(--gold); cursor: pointer; margin-top: 4px; display: inline-block; user-select: none; }
.opt-section { display: none; }
.opt-section.open { display: block; }

/* ── TIP BOX ── */
.tip-box {
  background: rgba(200,169,110,.04);
  border: 1px solid rgba(200,169,110,.12);
  border-radius: var(--r);
  padding: 8px 10px;
  display: flex; gap: 7px; align-items: flex-start;
  margin-top: 9px;
}
.tip-text { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ── DUP WARNING ── */
.dup-warn {
  background: rgba(200,169,110,.08);
  border: 1px solid rgba(200,169,110,.2);
  border-radius: var(--r);
  padding: 7px 10px;
  font-size: 12px; line-height: 1.5;
  margin-bottom: 7px;
  color: var(--gold);
}

/* ── COVER EDIT ── */
.cov-row { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 5px; }
.cov-preview {
  width: 58px; height: 58px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.cov-preview img { width: 100%; height: 100%; object-fit: cover; }
.cov-status { font-size: 11px; margin-top: 3px; min-height: 13px; }
.cov-status.ok { color: #66bb6a; }
.cov-status.err { color: #ef5350; }

/* ── TRACKLIST ── */
.tl-warn {
  font-size: 12px; color: var(--muted);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 8px 10px;
  margin-bottom: 7px;
  line-height: 1.5;
}
.trk-item {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 3px;
  cursor: grab;
  transition: opacity .15s;
}
.trk-item.dragging { opacity: .4; }
.trk-item.ro { cursor: default; }
.trk-name-ro { flex: 1; font-size: 12px; color: var(--text); }
.trk-handle { color: var(--muted2); font-size: 10px; cursor: grab; flex-shrink: 0; }
.trk-num { color: var(--muted2); min-width: 18px; text-align: right; font-size: 11px; flex-shrink: 0; }
.trk-input {
  flex: 1; outline: none; background: transparent; border: none;
  color: var(--text); font-size: 12px; padding: 0;
}
.trk-dur { font-size: 11px; color: var(--muted2); flex-shrink: 0; }
.trk-del {
  background: transparent; border: none;
  color: var(--muted2); cursor: pointer;
  font-size: 14px; padding: 0 2px; flex-shrink: 0; line-height: 1;
}
.trk-del:hover { color: #ef5350; }
.trk-add {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 9px;
  background: transparent;
  border: 1px dashed var(--border2);
  border-radius: var(--r);
  color: var(--muted); font-size: 12px; cursor: pointer;
  width: 100%; margin-top: 3px;
  transition: all .15s;
}
.trk-add:hover { border-color: var(--gold); color: var(--gold); }
.trk-save {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  background: rgba(200,169,110,.1);
  border: 1px solid rgba(200,169,100,.28);
  border-radius: var(--r);
  color: var(--gold); font-size: 12px; font-weight: 500;
  cursor: pointer; width: 100%; margin-top: 8px;
  transition: all .15s;
}
.trk-save:hover { background: rgba(200,169,110,.18); }
.trk-save.saved { background: rgba(56,142,60,.1); border-color: rgba(56,142,60,.3); color: #66bb6a; }

/* ── MANUAL COVER PREVIEW ── */
.man-cover {
  width: 100%; aspect-ratio: 1; max-height: 155px;
  border-radius: var(--r2);
  background: var(--bg3);
  border: 1px dashed var(--border2);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; margin-bottom: 7px;
}
.man-cover img { width: 100%; height: 100%; object-fit: cover; }

/* ── TWO COL GRID ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

/* ── WISH DETAIL COVER ── */
.wd-cover {
  width: 100%; aspect-ratio: 1;
  border-radius: var(--r2);
  overflow: hidden;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 42px; margin-bottom: 12px;
}
.wd-cover img { width: 100%; height: 100%; object-fit: cover; }

/* ── DETAIL CARD ── */
.detail-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  overflow: hidden;
  margin-bottom: 11px;
}
.detail-row {
  display: flex; justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--muted); }
.detail-value { font-weight: 500; text-align: right; max-width: 60%; }

/* ── GRAMMY BOX ── */
.grammy-box {
  background: rgba(200,169,110,.07);
  border: 1px solid rgba(200,169,110,.22);
  border-radius: var(--r);
  padding: 9px 13px;
  display: flex; gap: 10px; align-items: flex-start;
  margin-bottom: 11px;
}
.grammy-text { font-size: 13px; line-height: 1.5; color: var(--gold); }

/* ── CONFIRM MODAL BOX ── */
.confirm-box {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r3);
  padding: 20px;
  width: 100%;
  max-width: 310px;
}

/* ── LIST CHECK ITEM ── */
.list-check-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 9px;
  border-radius: var(--r);
  cursor: pointer;
  transition: background .12s;
}
.list-check-item:hover { background: var(--bg3); }

/* ── COLL SEARCH ITEM (in add-from-coll modal) ── */
.coll-src-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px;
  border-radius: var(--r);
  cursor: pointer;
  transition: background .12s;
}
.coll-src-item:hover { background: var(--bg3); }
.coll-src-thumb {
  width: 28px; height: 28px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg3);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
}
.coll-src-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── FILTER PILLS ── */
.filter-pills { display: flex; gap: 5px; margin-bottom: 10px; flex-wrap: wrap; }
.fpill {
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  font-size: 12px; color: var(--muted);
  cursor: pointer;
  transition: all .12s;
}
.fpill.active { background: var(--gold); border-color: var(--gold); color: var(--bg); }

/* ── SEGMENT GROUPS (search filters) ── */
.seg-group {
  display: flex;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.seg-btn {
  padding: 6px 11px;
  border: none;
  background: transparent;
  font-size: 12px; color: var(--muted);
  cursor: pointer;
  transition: all .12s;
  border-right: 1px solid var(--border);
}
.seg-btn:last-child { border-right: none; }
.seg-btn.active { background: var(--gold); color: var(--bg); font-weight: 500; }

/* ── SEARCH RESULT ITEM ── */
.result-item {
  display: flex; gap: 10px; align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 9px 12px;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
  will-change: transform;
}
.result-item:hover { border-color: var(--border2); transform: translateX(2px); }
.result-item.in-col { border-color: rgba(200,169,110,.35); }

.result-thumb {
  width: 44px; height: 44px;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg3);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.result-thumb img { width: 100%; height: 100%; object-fit: cover; }
.result-info { flex: 1; min-width: 0; }
.result-title { font-size: 14px; font-weight: 500; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.result-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.result-right { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }

.type-badge { padding: 1px 6px; border-radius: 10px; font-size: 10px; font-weight: 500; }
.type-album { background: rgba(74,127,165,.2); color: #7ab0d4; }
.type-single { background: rgba(196,98,45,.2); color: #e07a4a; }
.type-ep { background: rgba(200,169,110,.2); color: var(--gold); }
.in-col-badge { background: rgba(200,169,110,.15); color: var(--gold); font-size: 10px; padding: 2px 7px; border-radius: 10px; font-weight: 500; }

/* ── ARTIST HERO CARD ── */
.artist-hero-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg3);
  border: 1px solid rgba(200,169,110,.25);
  border-radius: var(--r2);
  padding: 12px 14px;
  margin-bottom: 9px;
  cursor: pointer;
  transition: border-color .15s;
}
.artist-hero-card:hover { border-color: var(--gold); }
.artist-photo-sm {
  width: 42px; height: 42px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.artist-photo-sm img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ── STAT CHIPS ── */
.stat-chips { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.stat-chip {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 11px;
  font-size: 12px; color: var(--muted);
  display: flex; align-items: center; gap: 4px;
}
.stat-chip strong { color: var(--text); font-weight: 500; }
.stat-dot { width: 6px; height: 6px; border-radius: 50%; }

/* ── NOT FOUND BUTTON ── */
.not-found-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px;
  border: 1px dashed var(--border2);
  border-radius: var(--r2);
  cursor: pointer; background: transparent; width: 100%;
  color: var(--muted); font-size: 13px;
  margin-top: 11px;
  transition: all .15s;
}
.not-found-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ── UTILITY ─────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── AUTH ─────────────────────────────────────────────────────────────────── */

/* Botão "Entrar com Google" */
.btn-login {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: #fff; color: #3c4043;
  border: 1px solid #dadce0; border-radius: 50px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .15s, box-shadow .15s, transform .1s;
  white-space: nowrap;
}
.btn-login:hover  { background: #f8f9fa; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.btn-login:active { transform: scale(.97); }

/* Wrapper auth no header desktop */
.hdr-auth {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
@media (max-width: 900px) {
  .hdr-auth { display: none; }
}

/* Chip de usuário logado */
.user-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--border2);
  border-radius: 50px; padding: 4px 12px 4px 4px;
  font-size: 13px;
}
.user-chip.hidden { display: none; }

.usr-av {
  width: 26px; height: 26px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.usr-av-ph {
  width: 26px; height: 26px; border-radius: 50%;
  background: #1DB954; color: #000;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.usr-name { color: var(--text); font-weight: 500; }
.usr-out {
  background: transparent; border: none; cursor: pointer;
  color: var(--muted); font-size: 12px; padding: 0 0 0 4px;
  transition: color .15s;
}
.usr-out:hover { color: var(--text); }

/* Botão Dashboard (admin only, header desktop) */
.btn-admin {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: transparent; color: var(--muted);
  border: 1px solid var(--border); border-radius: 50px;
  font-size: 12px; font-weight: 500; cursor: pointer;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.btn-admin:hover { color: var(--text); border-color: var(--border2); }
.btn-admin.hidden { display: none; }

/* Versão mobile do chip (no drawer) */
.mob-btn-login {
  display: flex; align-items: center; gap: 10px;
  width: calc(100% - 32px); margin: 12px 16px 0;
  padding: 12px 16px; border-radius: 50px;
  font-size: 14px; justify-content: center;
}
.mob-user-chip {
  margin: 12px 16px 0; padding: 8px 14px;
  border-radius: 50px; font-size: 14px;
}

/* Banner de migração localStorage → Supabase */
.import-banner {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  z-index: 1000; width: min(480px, calc(100vw - 32px));
  background: var(--card); border: 1px solid var(--border2);
  border-radius: var(--r2); box-shadow: 0 8px 32px rgba(0,0,0,.4);
  animation: slideUp .25s ease;
}
.import-banner-inner {
  padding: 16px 20px; display: flex; flex-direction: column; gap: 12px;
}
.import-banner-inner p { margin: 0; font-size: 14px; color: var(--text); }
.import-banner-actions {
  display: flex; gap: 8px; justify-content: flex-end;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
