:root {
  --bg: #05080d;
  --panel: #0a111c;
  --panel-2: #101a2a;
  --hover: #14223a;
  --active: #1b2b46;
  --text: #f8fafc;
  --muted: #94a3b8;
  --dim: #5b6b82;
  --accent: #00b4ff;
  --accent-2: #40c8ff;
  --radius: 8px;
  --player-h: 80px;
  --side-w: 280px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input { font: inherit; }
svg { width: 24px; height: 24px; fill: currentColor; flex-shrink: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* ---------- Login ---------- */
.login {
  position: fixed; inset: 0; display: grid; place-items: center;
  background: linear-gradient(180deg, #0a1b2e 0%, #000 70%);
  padding: 16px;
}
.login-card {
  width: 100%; max-width: 360px; background: var(--panel); border-radius: 12px;
  padding: 40px 32px; display: flex; flex-direction: column; gap: 14px; text-align: center;
}
.login-logo { width: 64px; height: 64px; margin: 0 auto; border-radius: 16px; }
.login-card h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.login-card p { margin: 0 0 10px; }
.login-card input {
  background: #0f1a2c; border: 1px solid #22324c; color: var(--text);
  border-radius: 6px; padding: 14px; outline: none;
}
.login-card input:focus { border-color: #fff; }
.err { color: #f3727f; min-height: 1em; }

.btn-primary {
  background: var(--accent); color: #000; font-weight: 700; border-radius: 999px;
  padding: 14px 32px; transition: transform .1s, background .1s;
}
.btn-primary:hover { background: var(--accent-2); transform: scale(1.03); }
.btn-ghost {
  border: 1px solid #3a4a66; border-radius: 999px; padding: 8px 18px; font-weight: 700; font-size: 13px;
}
.btn-ghost:hover { border-color: #fff; transform: scale(1.03); }

/* ---------- Layout ---------- */
.app {
  display: grid; height: 100dvh; padding: 8px; gap: 8px;
  grid-template-columns: var(--side-w) 1fr;
  grid-template-rows: 1fr var(--player-h);
  grid-template-areas: "side main" "player player";
}
.sidebar { grid-area: side; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.side-box { background: var(--panel); border-radius: var(--radius); padding: 8px 12px; }
.side-box > a {
  display: flex; align-items: center; gap: 18px; padding: 10px 12px; color: var(--muted);
  font-weight: 700; font-size: 15px; border-radius: 6px; transition: color .15s;
}
.side-box > a:hover, .side-box > a.active { color: var(--text); }
.brand { color: var(--text) !important; margin-bottom: 4px; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.side-albums { flex: 1; overflow-y: auto; min-height: 0; }
.side-title { color: var(--muted); font-weight: 700; padding: 10px 8px; }
.side-album { display: flex; gap: 12px; align-items: center; padding: 6px 8px; border-radius: 6px; }
.side-album:hover { background: var(--panel-2); }
.side-album img { width: 48px; height: 48px; border-radius: 4px; object-fit: cover; }
.side-album .t { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-album .a { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-album > div { min-width: 0; }

.main {
  grid-area: main; background: var(--panel); border-radius: var(--radius);
  overflow-y: auto; overflow-x: hidden; position: relative; min-height: 0;
}
.offline-bar {
  position: sticky; top: 0; z-index: 5; background: #3d2c00; color: #ffd166;
  text-align: center; padding: 8px; font-weight: 600; font-size: 13px;
}

/* ---------- Views ---------- */
.view-pad { padding: 16px 24px 32px; }
.hero-grad { position: relative; }
.hero-grad::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 330px;
  background: linear-gradient(180deg, var(--tint, #2a4a38) 0%, transparent 100%); opacity: .7; pointer-events: none;
}
.hero-grad > * { position: relative; }
h1.page { font-size: 32px; font-weight: 800; letter-spacing: -.02em; margin: 16px 0 20px; }
h2.sec { font-size: 22px; font-weight: 800; margin: 28px 0 12px; letter-spacing: -.01em; display: flex; justify-content: space-between; align-items: baseline; }
h2.sec a { font-size: 13px; color: var(--muted); font-weight: 700; }
h2.sec a:hover { text-decoration: underline; }

.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.quick {
  display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.08);
  border-radius: 4px; overflow: hidden; height: 56px; position: relative; transition: background .2s;
}
.quick:hover { background: rgba(255,255,255,.18); }
.quick img { width: 56px; height: 56px; object-fit: cover; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.quick span { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 56px; }
.quick .card-play { right: 8px; bottom: 8px; width: 38px; height: 38px; }
.quick .card-play svg { width: 18px; height: 18px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 0 -12px; }
.card { padding: 12px; border-radius: 8px; transition: background .25s; position: relative; min-width: 0; }
.card:hover { background: var(--panel-2); }
.card .img-wrap { position: relative; margin-bottom: 10px; }
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; box-shadow: 0 8px 24px rgba(0,0,0,.5); background: #12203a; }
.card.round img { border-radius: 50%; }
.card .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.card .a { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-play {
  position: absolute; right: 8px; bottom: 8px; width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: #000; display: grid; place-items: center;
  box-shadow: 0 8px 16px rgba(0,0,0,.3); opacity: 0; transform: translateY(8px); transition: all .25s;
}
.card-play:hover { transform: scale(1.05) !important; background: var(--accent-2); }
.card:hover .card-play, .quick:hover .card-play, .card-play.on { opacity: 1; transform: none; }

/* Header de álbum / artista */
.header {
  display: flex; align-items: flex-end; gap: 24px; padding: 60px 24px 24px;
  background: linear-gradient(180deg, var(--tint, #12325a) 0%, color-mix(in srgb, var(--tint, #12325a) 45%, #0a111c) 100%);
}
.header img { width: 232px; height: 232px; object-fit: cover; border-radius: 6px; box-shadow: 0 8px 40px rgba(0,0,0,.6); flex-shrink: 0; background: #12203a; }
.header.round img { border-radius: 50%; }
.header .kind { font-size: 13px; font-weight: 600; }
.header h1 { font-size: clamp(32px, 6vw, 88px); font-weight: 900; letter-spacing: -.04em; line-height: 1; margin: 8px 0 16px; word-break: break-word; }
.header .info { font-size: 14px; color: rgba(255,255,255,.85); }
.header .info b a:hover { text-decoration: underline; }
.actions-bar {
  display: flex; align-items: center; gap: 24px; padding: 24px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tint, #12325a) 25%, #0a111c) 0%, #0a111c 230px);
}
.big-play {
  width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #000;
  display: grid; place-items: center; transition: transform .1s;
}
.big-play:hover { transform: scale(1.05); background: var(--accent-2); }
.big-play svg { width: 26px; height: 26px; }
.act-icon { color: var(--muted); transition: color .15s, transform .1s; display: grid; place-items: center; }
.act-icon:hover { color: #fff; transform: scale(1.05); }
.act-icon svg { width: 32px; height: 32px; }
.act-icon.on { color: var(--accent); }

/* Lista de faixas */
.tracklist { padding: 0 24px 24px; }
.tl-head, .row {
  display: grid; grid-template-columns: 40px minmax(0, 4fr) minmax(0, 3fr) 48px 60px;
  align-items: center; gap: 16px; padding: 0 16px;
}
.tracklist.no-album .tl-head, .tracklist.no-album .row { grid-template-columns: 40px minmax(0, 1fr) 48px 60px; }
.tracklist.no-album .c-album { display: none; }
.tl-head { color: var(--muted); font-size: 13px; border-bottom: 1px solid #14223a; height: 36px; margin-bottom: 12px; position: sticky; top: 0; background: var(--panel); z-index: 2; }
.row { height: 56px; border-radius: 4px; cursor: default; user-select: none; }
.row:hover { background: rgba(255,255,255,.1); }
.row.selected { background: rgba(255,255,255,.2); }
.row.unavailable { opacity: .35; }
.c-num { color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; font-size: 15px; position: relative; }
.c-num .row-play { display: none; color: #fff; margin: 0 auto; }
.c-num .row-play svg { width: 18px; height: 18px; }
.row:hover .c-num .n { display: none; }
.row:hover .c-num .row-play { display: block; }
.row.playing .c-num .n, .row.playing .t { color: var(--accent); }
.eq { display: none; gap: 2px; height: 14px; align-items: flex-end; justify-content: center; }
.eq i { width: 3px; background: var(--accent); animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%,100% { height: 30%; } 50% { height: 100%; } }
.row.playing.is-playing .c-num .n { display: none; }
.row.playing.is-playing .eq { display: flex; }
.row.playing.is-playing:hover .eq { display: none; }
.c-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.c-title img { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; background: #12203a; flex-shrink: 0; }
.c-title > div { min-width: 0; }
.row .t { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .a, .c-album { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .a a:hover, .c-album a:hover { color: #fff; text-decoration: underline; }
.row:hover .a, .row:hover .c-album { color: #fff; }
.c-dur { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.c-dl { display: flex; justify-content: center; }

/* Botão de download (círculo) */
.dl { width: 28px; height: 28px; display: grid; place-items: center; color: var(--muted); border-radius: 50%; position: relative; }
.dl:hover { color: #fff; transform: scale(1.06); }
.dl svg { width: 22px; height: 22px; }
.dl.done { color: var(--accent); }
.dl.busy::before {
  content: ""; position: absolute; inset: 2px; border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p, 0) * 1turn), #22324c 0);
  -webkit-mask: radial-gradient(circle, transparent 8px, #000 8.5px); mask: radial-gradient(circle, transparent 8px, #000 8.5px);
}
.dl.busy svg { width: 10px; height: 10px; }
.row .dl:not(.done):not(.busy) { opacity: 0; }
.row:hover .dl, .row .dl.done, .row .dl.busy { opacity: 1 !important; }

/* Busca */
.search-box {
  position: sticky; top: 0; z-index: 3; background: var(--panel); padding: 16px 24px 8px;
}
.search-box label {
  display: flex; align-items: center; gap: 10px; background: #0f1a2c; border-radius: 999px;
  padding: 0 16px; height: 48px; max-width: 480px; border: 2px solid transparent; transition: border .15s;
}
.search-box label:focus-within { border-color: #fff; background: #14223a; }
.search-box svg { color: var(--muted); }
.search-box input { background: none; border: 0; outline: none; color: #fff; flex: 1; font-size: 16px; }
.genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.genre {
  aspect-ratio: 1.6; border-radius: 8px; padding: 16px; font-size: 22px; font-weight: 800;
  overflow: hidden; position: relative; word-break: break-word;
}
.genre img { position: absolute; width: 90px; height: 90px; right: -14px; bottom: -6px; transform: rotate(25deg); box-shadow: 0 4px 16px rgba(0,0,0,.4); border-radius: 4px; }

.tabs { display: flex; gap: 8px; margin: 0 0 20px; flex-wrap: wrap; }
.chip { background: rgba(255,255,255,.07); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 14px; }
.chip:hover { background: rgba(255,255,255,.12); }
.chip.on { background: #fff; color: #000; }

.empty { text-align: center; padding: 80px 24px; color: var(--muted); }
.empty h2 { color: #fff; font-size: 24px; margin-bottom: 8px; }
.empty .btn-primary { display: inline-block; margin-top: 20px; }

.bleed { margin: 0 -24px; }
@media (max-width: 800px) { .bleed { margin: 0 -16px; } }

.stat-line { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: -8px 0 24px; color: var(--muted); }

/* Upload */
.drop {
  border: 2px dashed #22324c; border-radius: 12px; padding: 60px 24px; text-align: center;
  transition: border-color .2s, background .2s; cursor: pointer;
}
.drop.over, .drop:hover { border-color: var(--accent); background: rgba(0,180,255,.07); }
.drop svg { width: 48px; height: 48px; color: var(--accent); }
.drop h3 { font-size: 20px; margin: 12px 0 6px; }
.up-list { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.up-item { display: grid; grid-template-columns: 1fr 120px 50px; gap: 12px; align-items: center; background: var(--panel-2); padding: 10px 14px; border-radius: 6px; }
.up-item .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 4px; background: #22324c; border-radius: 2px; overflow: hidden; }
.bar > div { height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.up-item .pct { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Player ---------- */
.player {
  grid-area: player; display: grid; grid-template-columns: minmax(180px, 1fr) minmax(300px, 2fr) minmax(180px, 1fr);
  align-items: center; padding: 0 8px; position: relative;
}
.p-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.p-cover { width: 56px; height: 56px; border-radius: 4px; object-fit: cover; background: #12203a; }
.p-cover:not([src]) { visibility: hidden; }
.p-meta { min-width: 0; }
.p-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-artist { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.p-center { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 720px; width: 100%; justify-self: center; }
.p-controls { display: flex; align-items: center; gap: 16px; }
.icon-btn { color: var(--muted); width: 32px; height: 32px; display: grid; place-items: center; position: relative; transition: color .1s, transform .1s; }
.icon-btn:hover { color: #fff; transform: scale(1.05); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.toggle.on { color: var(--accent); }
.icon-btn.toggle.on::after { content: ""; position: absolute; bottom: -2px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.play-btn { width: 32px; height: 32px; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center; transition: transform .1s; }
.play-btn:hover { transform: scale(1.06); }
.play-btn svg { width: 18px; height: 18px; }
.p-progress { display: flex; align-items: center; gap: 8px; width: 100%; }
.time { color: var(--muted); font-size: 12px; min-width: 40px; text-align: center; font-variant-numeric: tabular-nums; }
.p-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-right: 8px; }
.vol { width: 100px; }
.p-mini-progress { display: none; }

/* Range estilo Spotify */
.range {
  --p: 0%;
  -webkit-appearance: none; appearance: none; flex: 1; height: 12px; background: transparent; cursor: pointer; margin: 0;
}
.range::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, #fff var(--p), #26364f var(--p));
}
.range:hover::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--accent) var(--p), #26364f var(--p)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; margin-top: -4px; opacity: 0; box-shadow: 0 2px 4px rgba(0,0,0,.5); }
.range:hover::-webkit-slider-thumb, .range:active::-webkit-slider-thumb { opacity: 1; }
.range::-moz-range-track { height: 4px; border-radius: 2px; background: #26364f; }
.range::-moz-range-progress { height: 4px; border-radius: 2px; background: #fff; }
.range:hover::-moz-range-progress { background: var(--accent); }
.range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; opacity: 0; }
.range:hover::-moz-range-thumb { opacity: 1; }

/* ---------- Tela "tocando agora" (mobile) ---------- */
.np { position: fixed; inset: 0; z-index: 50; background: #0a111c; animation: up .25s ease-out; }
@keyframes up { from { transform: translateY(100%); } }
.np-bg { position: absolute; inset: 0; background: linear-gradient(180deg, var(--tint, #12325a) 0%, #0a111c 85%); }
.np-inner {
  position: relative; height: 100%; display: flex; flex-direction: column; gap: 16px;
  padding: max(16px, env(safe-area-inset-top)) 24px calc(24px + var(--safe-b)); max-width: 520px; margin: 0 auto;
}
.np-top { display: flex; align-items: center; justify-content: space-between; }
.np-top .icon-btn { color: #fff; width: 40px; height: 40px; }
.np-top .icon-btn svg { width: 26px; height: 26px; }
.np-from { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.np-cover { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; box-shadow: 0 16px 48px rgba(0,0,0,.5); margin: auto 0; background: #12203a; }
.np-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.np-meta > div { min-width: 0; }
.np-title { font-size: 22px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { color: rgba(255,255,255,.7); font-size: 16px; margin-top: 4px; }
.np .range { flex: none; width: 100%; }
.np .range::-webkit-slider-thumb { opacity: 1; }
.np-times { display: flex; justify-content: space-between; color: rgba(255,255,255,.7); font-size: 12px; margin-top: -10px; font-variant-numeric: tabular-nums; }
.np-controls { display: flex; align-items: center; justify-content: space-between; }
.np-controls .icon-btn { color: #fff; }
.np-controls .icon-btn svg { width: 24px; height: 24px; }
.np-controls .icon-btn.big svg { width: 34px; height: 34px; }
.np-controls .icon-btn.toggle:not(.on) { color: rgba(255,255,255,.7); }
.play-btn.big { width: 68px; height: 68px; }
.play-btn.big svg { width: 30px; height: 30px; }
.np .dl svg { width: 28px; height: 28px; }
.np .dl { width: 36px; height: 36px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--player-h) + 32px); transform: translate(-50%, 20px);
  background: #fff; color: #000; padding: 10px 18px; border-radius: 8px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 100; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.main::-webkit-scrollbar, .side-albums::-webkit-scrollbar { width: 12px; }
.main::-webkit-scrollbar-thumb, .side-albums::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border: 3px solid transparent; background-clip: padding-box; border-radius: 8px; }

/* ---------- Mobile ---------- */
@media (max-width: 800px) {
  :root { --player-h: 60px; }
  .desk-only { display: none !important; }
  .app {
    padding: 0; gap: 0;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto auto;
    grid-template-areas: "main" "player" "side";
  }
  .main { border-radius: 0; }
  .sidebar { flex-direction: row; background: linear-gradient(0deg, #000 40%, rgba(0,0,0,.92)); padding-bottom: var(--safe-b); }
  .sidebar .side-box { flex: 1; display: flex; justify-content: space-around; background: none; padding: 4px 0 2px; }
  .sidebar .side-box > a { flex-direction: column; gap: 3px; font-size: 11px; font-weight: 500; padding: 8px 4px; }
  .sidebar .brand { display: none; }
  .player {
    margin: 0 8px 4px; background: #10223c; border-radius: 8px; height: 56px;
    grid-template-columns: 1fr auto; padding: 0 8px; background: var(--tint-player, #0d1d33);
    transition: background .4s;
  }
  .player.empty { display: none; }
  .p-cover { width: 40px; height: 40px; }
  .p-left { gap: 10px; cursor: pointer; }
  .p-artist { color: rgba(255,255,255,.7); }
  .p-center { width: auto; }
  .p-controls { gap: 4px; }
  .p-controls .play-btn { background: none; color: #fff; width: 40px; height: 40px; }
  .p-controls .play-btn svg { width: 24px; height: 24px; }
  .p-controls .icon-btn { color: #fff; width: 40px; height: 40px; }
  .p-controls .icon-btn svg { width: 22px; height: 22px; }
  .p-mini-progress { display: block; position: absolute; left: 8px; right: 8px; bottom: 0; height: 2px; background: rgba(255,255,255,.2); border-radius: 1px; overflow: hidden; }
  .p-mini-progress > div { height: 100%; background: #fff; width: 0; }

  .view-pad { padding: 12px 16px 24px; }
  h1.page { font-size: 24px; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .quick { height: 48px; }
  .quick img { width: 48px; height: 48px; }
  .quick span { font-size: 12px; padding-right: 8px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .quick .card-play { display: none; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); margin: 0 -8px; }
  .card { padding: 8px; }
  .card-play { display: none; }
  .header { flex-direction: column; align-items: flex-start; padding: 48px 16px 16px; }
  .header img { width: min(240px, 60vw); height: min(240px, 60vw); align-self: center; }
  .header h1 { font-size: 28px; margin: 4px 0 8px; }
  .header .kind { display: none; }
  .actions-bar { padding: 8px 16px 16px; gap: 20px; }
  .actions-bar .big-play { margin-left: auto; order: 9; }
  .tracklist { padding: 0 8px 16px; }
  .tl-head { display: none; }
  .row, .tracklist.no-album .row { grid-template-columns: minmax(0, 1fr) 36px; padding: 0 8px; gap: 8px; }
  .c-num, .c-album, .c-dur { display: none; }
  .row .t { font-size: 15px; }
  .row .a { font-size: 13px; }
  .row .dl { opacity: 1 !important; }
  .row:hover { background: none; }
  .row:active { background: rgba(255,255,255,.08); }
  .row.playing .t { color: var(--accent); }
  .search-box { padding: 12px 16px 8px; }
  .genre-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .genre { font-size: 16px; }
  .toast { bottom: 140px; }
}

/* ---------- Identidade Wave by WCore ---------- */
:root { --glow: 0 0 24px rgba(0, 180, 255, .35); --brand-font: 'Exo 2', 'Figtree', system-ui, sans-serif; }
.btn-primary, .big-play, .card-play { color: #02111f; box-shadow: var(--glow); }
.big-play:hover, .btn-primary:hover { box-shadow: 0 0 32px rgba(0, 180, 255, .55); }
.row.playing .t, .row.playing .c-num .n { text-shadow: 0 0 12px rgba(0, 180, 255, .45); }
.icon-btn.toggle.on::after { box-shadow: 0 0 6px var(--accent); }

.wlogo { display: block; overflow: visible; }
.wlogo .sq { transform-box: fill-box; transform-origin: center; }
body.is-playing .brand .wlogo .sq { animation: wbeat 1.1s ease-in-out infinite; }
body.is-playing .brand .wlogo .sq:nth-of-type(2) { animation-delay: -.2s; }
body.is-playing .brand .wlogo .sq:nth-of-type(3) { animation-delay: -.45s; }
body.is-playing .brand .wlogo .sq:nth-of-type(4) { animation-delay: -.7s; }
body.is-playing .brand .wlogo .sq:nth-of-type(5) { animation-delay: -.9s; }
@keyframes wbeat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9%); } }
@media (prefers-reduced-motion: reduce) { body.is-playing .brand .wlogo .sq { animation: none; } }

.brand { gap: 12px !important; align-items: center; }
.brand .wlogo { width: 44px; height: auto; }
.wordmark { display: flex; flex-direction: column; line-height: 1; }
.wordmark b { font-family: var(--brand-font); font-weight: 800; font-size: 22px; letter-spacing: .01em; color: var(--text); }
.wordmark small { font-size: 8.5px; letter-spacing: .38em; color: var(--accent); margin-top: 4px; font-weight: 600; }

.login { background: radial-gradient(120% 70% at 50% 0%, #0a2a4f 0%, #05080d 60%); }
.login-card { background: rgba(10, 17, 28, .85); border: 1px solid #16304f; box-shadow: 0 30px 80px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.03); }
.login-card .wlogo { width: 120px; margin: 0 auto 4px; }
.login-card h1 { font-family: var(--brand-font); font-size: 40px; letter-spacing: .02em; }
.login-card .by { font-size: 10px; letter-spacing: .5em; color: var(--accent); font-weight: 600; margin: -6px 0 6px; padding-left: .5em; }
.login-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 180, 255, .15); }

.m-brand { display: none; }
.foot-brand { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--dim); font-size: 12px; padding: 24px 0 8px; }
.foot-brand .wlogo { width: 22px; }
.foot-brand b { color: var(--muted); font-weight: 600; }

@media (max-width: 800px) {
  .m-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
  .m-brand .wlogo { width: 38px; }
  .m-brand .wordmark b { font-size: 20px; }
  .sidebar .side-box > a.active { color: var(--accent); }
  .sidebar .side-box > a.active svg { filter: drop-shadow(0 0 6px rgba(0, 180, 255, .6)); }
}

/* ---------- Playlists geradas ---------- */
.mix-cover { position: relative; width: 100%; aspect-ratio: 1; max-width: 100%; border-radius: 6px; overflow: hidden; background: #0f1a2c; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.mix-cover .mosaic { display: grid; grid-template-columns: 1fr 1fr; width: 100%; height: 100%; }
.mix-cover .mosaic img { width: 100%; height: 100%; border-radius: 0; box-shadow: none; object-fit: cover; display: block; }
.mix-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, color-mix(in srgb, var(--mc) 55%, #02060c) 100%); }
.mix-cover::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--mc); z-index: 2; box-shadow: 0 0 18px var(--mc); }
.mix-name { position: absolute; left: 10px; right: 10px; bottom: 14px; z-index: 2; font-family: var(--brand-font); font-weight: 800; font-size: 18px; line-height: 1.05; text-shadow: 0 2px 10px rgba(0,0,0,.6); text-wrap: balance; }
.header .mix-cover { width: 232px; height: 232px; flex-shrink: 0; }
.header .mix-name { font-size: 30px; left: 16px; bottom: 20px; }
.hint { color: var(--muted); margin: -4px 0 14px; }
.np-actions { display: flex; align-items: center; gap: 10px; }
.np-actions .dl { color: rgba(255,255,255,.75); }
@media (max-width: 800px) {
  .header .mix-cover { width: min(240px, 60vw); height: auto; align-self: center; }
  .mix-name { font-size: 15px; bottom: 12px; }
  .header .mix-name { font-size: 26px; }
}

/* ---------- IA: capas, relatório, status ---------- */
.mix-cover.ai > svg { width: 100%; height: 100%; display: block; }
.mix-cover.ai::after { background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.55) 100%); }

.report-banner {
  display: flex; align-items: center; gap: 14px; margin: 20px 0 4px; padding: 14px 16px; border-radius: 10px;
  background: linear-gradient(100deg, rgba(0,180,255,.16), rgba(0,102,204,.08)); border: 1px solid rgba(0,180,255,.35);
  box-shadow: 0 0 24px rgba(0,180,255,.08);
}
.report-banner .wlogo { width: 34px; flex-shrink: 0; }
.report-banner span { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.report-banner small { color: var(--accent); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.report-banner b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-banner em { font-style: normal; font-weight: 700; font-size: 13px; color: var(--muted); }

.report-period { color: var(--muted); margin: -12px 0 16px; font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tile { background: rgba(255,255,255,.04); border: 1px solid #16304f; border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile span { color: var(--muted); font-size: 12px; font-weight: 600; }
.tile b { font-family: var(--brand-font); font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile small { color: var(--dim); font-size: 11px; min-height: 1em; }

.ai-card {
  margin: 20px 0 8px; padding: 20px; border-radius: 12px; position: relative;
  background: linear-gradient(160deg, rgba(0,180,255,.10), rgba(10,27,46,.6) 60%); border: 1px solid rgba(0,180,255,.3);
}
.ai-card h2 { font-family: var(--brand-font); font-size: 24px; margin: 8px 0 10px; text-wrap: balance; }
.ai-card h3 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 18px 0 8px; }
.ai-card p { line-height: 1.6; color: #dbe4ef; margin: 0 0 10px; max-width: 65ch; }
.ai-card ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; line-height: 1.5; color: #dbe4ef; }
.ai-by { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.ai-by .wlogo { width: 22px; }

.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 64px; gap: 10px; align-items: center; font-size: 13px; }
.bar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 6px; background: #16233a; border-radius: 3px; overflow: hidden; }
.bar-track i { display: block; height: 100%; background: linear-gradient(90deg, #0066cc, var(--accent)); border-radius: 3px; box-shadow: 0 0 8px rgba(0,180,255,.5); }
.bar-val { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

.ai-status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.ai-status > div { background: rgba(255,255,255,.04); border: 1px solid #16304f; border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.ai-status span { color: var(--muted); font-size: 12px; }
.ai-status b { font-size: 16px; }
.ai-status small { color: var(--dim); font-weight: 500; }
.ai-status .warn { grid-column: 1 / -1; color: #ffd166; background: #2a2100; border-color: #4a3b00; font-size: 13px; }
.btn-ghost:disabled { opacity: .5; cursor: default; transform: none; }

@media (max-width: 800px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile b { font-size: 24px; }
  .report-grid, .ai-status { grid-template-columns: 1fr; }
  .sidebar .side-box > a span { font-size: 10px; }
}

/* ---------- Playlists importadas ---------- */
details.missing { background: rgba(255,255,255,.03); border: 1px solid #16304f; border-radius: 10px; padding: 12px 16px; }
details.missing summary { cursor: pointer; font-weight: 600; color: var(--muted); }
details.missing ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.7; columns: 2; column-gap: 32px; }
.actions-bar .btn-ghost { margin-left: auto; }
.actions-bar .btn-ghost + .btn-ghost { margin-left: 0; }
@media (max-width: 800px) {
  details.missing ul { columns: 1; }
  .actions-bar .btn-ghost { padding: 6px 12px; font-size: 12px; }
}
