/* ============================================================================
   DRW Music — tampilan modern, gelap, profesional. Responsif desktop + mobile.
   ============================================================================ */
:root {
  --bg: #0a0a0f;
  --bg-2: #101018;
  --panel: #14141d;
  --panel-2: #1b1b27;
  --elev: #202030;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f4f4f8;
  --muted: #a2a2b5;
  --muted-2: #6f6f83;
  --accent: #8b5cf6;
  --accent-2: #ec4899;
  --accent-3: #22d3ee;
  --grad: linear-gradient(135deg, #8b5cf6, #ec4899 60%, #f59e0b);
  --grad-btn: linear-gradient(135deg, #a78bfa, #ec4899);
  --ok: #22c55e;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .5);
  --player-h: 92px;
  --topbar-h: 64px;
  --sidebar-w: 248px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  font-synthesis: none;
}

* { box-sizing: border-box; }
/* PENTING: elemen dengan atribut [hidden] HARUS tetap tersembunyi walau class-nya
   menyetel display (mis. .nowplaying/.sidepanel/.player). Tanpa ini, overlay
   Now Playing (background gelap) menutupi beranda. */
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
}
::selection { background: rgba(139, 92, 246, .4); }
a { color: inherit; text-decoration: none; }
img { display: block; }
button { font-family: inherit; cursor: pointer; }
input, button { color: inherit; }

/* Scrollbar */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 20px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .22); background-clip: padding-box; }

/* ── Layout grid ─────────────────────────────────────────────────────────── */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: 1fr var(--player-h);
  grid-template-areas: "side main" "player player";
  height: 100vh;
  height: 100dvh;
  gap: 8px;
  padding: 8px;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  grid-area: side;
  background: var(--bg-2);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 20px 20px 14px; }
.brand-logo {
  width: 36px; height: 36px; border-radius: 11px; background: var(--grad);
  box-shadow: 0 6px 18px rgba(139, 92, 246, .45);
  position: relative; flex: none; display: grid; place-items: center;
}
.brand-logo::after {
  content: ""; position: absolute; inset: 0; border-radius: 11px;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .5), transparent 55%);
}
.brand-logo svg { position: relative; z-index: 1; width: 20px; height: 20px; }
.brand-name { font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.brand-name b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav { padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 14px; border-radius: 10px; border: none; background: none;
  color: var(--muted); font-size: 15px; font-weight: 600; width: 100%; text-align: left;
  transition: background .15s, color .15s;
}
.nav-item svg { width: 22px; height: 22px; flex: none; }
.nav-item:hover { color: var(--text); background: var(--panel); }
.nav-item.active { color: var(--text); background: var(--panel-2); }
.nav-item.active svg { color: var(--accent); }

.sidebar-playlists { flex: 1; overflow-y: auto; padding: 10px; margin-top: 4px; border-top: 1px solid var(--line); }
.spl-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 10px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.spl-head button { background: none; border: none; color: var(--muted); width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; }
.spl-head button:hover { background: var(--panel); color: var(--text); }
.spl-head button svg { width: 18px; height: 18px; }
.spl-item { display: flex; align-items: center; gap: 11px; padding: 8px; border-radius: 9px; color: var(--muted); font-size: 14px; width: 100%; border: none; background: none; text-align: left; }
.spl-item:hover { background: var(--panel); color: var(--text); }
.spl-item.active { background: var(--panel-2); color: var(--text); }
.spl-cover { width: 40px; height: 40px; border-radius: 7px; flex: none; display: grid; place-items: center; background: var(--panel-2); overflow: hidden; }
.spl-cover svg { width: 20px; height: 20px; color: var(--accent); }
.spl-cover img { width: 100%; height: 100%; object-fit: cover; }
.spl-meta { min-width: 0; }
.spl-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spl-sub { font-size: 12px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-foot { padding: 10px 12px 14px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.install-btn { width: 36px; height: 36px; flex: none; padding: 0; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); display: grid; place-items: center; transition: transform .12s, background .15s, color .15s, border-color .15s; }
.install-btn svg { width: 18px; height: 18px; }
.install-btn:hover { background: var(--panel-2); border-color: var(--accent); color: var(--accent); }
.install-btn:active { transform: scale(.9); }
.foot-meta { font-size: 10.5px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ver { font-weight: 600; }

/* ── Main ───────────────────────────────────────────────────────────────── */
.main {
  grid-area: main;
  background: linear-gradient(180deg, var(--bg-2), var(--bg) 240px);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.topbar {
  height: var(--topbar-h); flex: none;
  display: flex; align-items: center; gap: 14px;
  padding: 0 18px;
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 10, 15, .55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: background .2s, border-color .2s;
}
.topbar.scrolled { background: rgba(10, 10, 15, .8); border-color: var(--line); }
.topbar-nav { display: flex; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: none; background: rgba(0, 0, 0, .3);
  color: var(--muted); display: grid; place-items: center; transition: transform .12s, color .15s, background .15s;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { color: var(--text); }
.icon-btn:active { transform: scale(.9); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.topbar-nav .icon-btn { background: rgba(0, 0, 0, .4); }

.search-wrap { position: relative; flex: 1; max-width: 460px; display: none; }
.search-wrap.show { display: block; }
.search-ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search-ico::before { content: ""; position: absolute; width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 50%; }
.search-ico::after { content: ""; position: absolute; left: 11px; top: 11px; width: 6px; height: 2px; background: currentColor; transform: rotate(45deg); border-radius: 2px; }
.search-input {
  width: 100%; height: 44px; border-radius: 22px; border: 1px solid var(--line);
  background: var(--panel); padding: 0 42px; font-size: 14.5px; outline: none; transition: border-color .15s, background .15s;
}
.search-input:focus { border-color: var(--line-2); background: var(--panel-2); }
.search-input::placeholder { color: var(--muted-2); }
.search-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; border: none; background: none; color: var(--muted); font-size: 20px; line-height: 1; }
.search-clear:hover { color: var(--text); background: var(--panel-2); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pill-btn { padding: 8px 14px; border-radius: 20px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.pill-btn.warn { border-color: #b45309; color: #fbbf24; }
/* Avatar profil di topbar (mobile) → buka drawer menu */
.topbar-avatar { display: none; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line-2); padding: 0; overflow: hidden; background: var(--grad); place-items: center; flex: none; }
.topbar-avatar:active { transform: scale(.92); }
.topbar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.topbar-avatar span { color: #fff; font-weight: 800; text-transform: uppercase; font-size: 15px; display: grid; place-items: center; }
.topbar-avatar span svg { width: 18px; height: 18px; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 290; opacity: 0; visibility: hidden; transition: opacity .28s; }
.drawer-backdrop.show { opacity: 1; visibility: visible; }
@media (max-width: 820px) { .topbar-avatar { display: grid; } }

.view { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 22px 28px; scroll-behavior: smooth; }

/* ── Hero / header halaman ──────────────────────────────────────────────── */
.page-hero { padding: 20px 0 8px; }
.page-hero h1 { margin: 0 0 4px; font-size: clamp(26px, 5vw, 40px); font-weight: 850; letter-spacing: -1px; }
.page-hero p { margin: 0; color: var(--muted); font-size: 14.5px; }
.greeting { font-size: clamp(24px, 4.5vw, 34px); font-weight: 850; letter-spacing: -.8px; margin: 22px 0 16px; }

/* ── Logo animasi beranda ───────────────────────────────────────────────── */
.home-hero { display: flex; align-items: center; gap: 18px; padding: 26px 0 16px; animation: heroIn .6s cubic-bezier(.2, .8, .2, 1); }
@keyframes heroIn { from { opacity: 0; transform: translateY(14px); } }
.hl-mark { position: relative; width: 68px; height: 68px; border-radius: 19px; flex: none; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(135deg, #a78bfa, #ec4899 55%, #f59e0b); background-size: 220% 220%;
  box-shadow: 0 12px 32px rgba(236, 72, 153, .45); animation: gradShift 6s ease infinite, markPulse 3s ease-in-out infinite; }
.hl-mark::after { content: ""; position: absolute; inset: 0; border-radius: 19px; background: radial-gradient(circle at 30% 26%, rgba(255, 255, 255, .5), transparent 55%); }
@keyframes gradShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes markPulse { 0%, 100% { box-shadow: 0 12px 32px rgba(236, 72, 153, .4); } 50% { box-shadow: 0 16px 44px rgba(139, 92, 246, .7); } }
.hl-note { position: relative; z-index: 1; color: #fff; animation: noteBob 3s ease-in-out infinite; }
.hl-note svg { width: 34px; height: 34px; }
@keyframes noteBob { 0%, 100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-4px) rotate(5deg); } }
.hl-shine { position: absolute; top: -60%; left: -40%; width: 36%; height: 220%; z-index: 2; transform: rotate(20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent); animation: shineSweep 4.5s ease-in-out infinite; }
@keyframes shineSweep { 0%, 55% { left: -40%; } 100% { left: 135%; } }
.hl-words { min-width: 0; }
.hl-name { font-size: clamp(28px, 5.5vw, 42px); font-weight: 850; letter-spacing: -1.2px; line-height: 1; }
.hl-name b { background: linear-gradient(90deg, #a78bfa, #ec4899, #f59e0b, #a78bfa); background-size: 220% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sweep 4s linear infinite; }
@keyframes sweep { to { background-position: 220% center; } }
.hl-tag { margin-top: 7px; font-size: 13px; font-weight: 700; letter-spacing: .3px; background: linear-gradient(90deg, #ec4899, #a78bfa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hl-eq { margin-left: auto; display: flex; align-items: flex-end; gap: 4px; height: 36px; }
.hl-eq i { width: 5px; height: 30%; border-radius: 3px; background: linear-gradient(180deg, #a78bfa, #ec4899); animation: eq 900ms ease-in-out infinite; }
.hl-eq i:nth-child(1) { animation-delay: -.60s; }
.hl-eq i:nth-child(2) { animation-delay: -.20s; }
.hl-eq i:nth-child(3) { animation-delay: -.45s; }
.hl-eq i:nth-child(4) { animation-delay: -.10s; }
.hl-eq i:nth-child(5) { animation-delay: -.35s; }
@media (max-width: 560px) { .hl-eq { display: none; } .hl-mark { width: 58px; height: 58px; border-radius: 16px; } .hl-note svg { width: 28px; height: 28px; } }

/* Detail hero (album/artist/playlist) */
.detail-hero {
  display: flex; align-items: flex-end; gap: 26px; padding: 30px 0 22px;
  position: relative;
}
.detail-hero .dh-art {
  width: 216px; height: 216px; border-radius: 12px; object-fit: cover; flex: none;
  box-shadow: var(--shadow); background: var(--panel-2);
}
.detail-hero.artist .dh-art { border-radius: 50%; }
.dh-info { min-width: 0; padding-bottom: 6px; }
.dh-kind { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.dh-title { font-size: clamp(30px, 6vw, 68px); font-weight: 850; letter-spacing: -2px; line-height: 1.02; margin: 8px 0 14px; }
.dh-sub { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dh-sub b { color: var(--text); }
.dh-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); }
.hero-bg { position: absolute; inset: -8px -22px auto; height: 360px; z-index: -1; opacity: .5; filter: saturate(1.3); background-size: cover; background-position: center; -webkit-mask-image: linear-gradient(180deg, #000, transparent); mask-image: linear-gradient(180deg, #000, transparent); }

/* Action bar */
.action-bar { display: flex; align-items: center; gap: 20px; padding: 18px 0 8px; }
.play-lg {
  width: 58px; height: 58px; border-radius: 50%; border: none; background: var(--grad-btn);
  color: #fff; display: grid; place-items: center; box-shadow: 0 10px 26px rgba(236, 72, 153, .4);
  transition: transform .12s;
}
.play-lg svg { width: 26px; height: 26px; }
.play-lg:hover { transform: scale(1.06); }
.play-lg:active { transform: scale(.96); }
.act-icon { width: 44px; height: 44px; border-radius: 50%; border: none; background: none; color: var(--muted); display: grid; place-items: center; }
.act-icon svg { width: 26px; height: 26px; }
.act-icon:hover { color: var(--text); }
.act-icon.liked { color: var(--accent-2); }
.act-icon.saved { color: var(--accent-3); }

/* ── Rows (carousel kartu) ─────────────────────────────────────────────── */
.row { margin: 26px 0 6px; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 14px; }
.row-head h2 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.4px; }
.row-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.row-head .see-all { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; background: none; border: none; }
.row-head .see-all:hover { color: var(--text); text-decoration: underline; }
.row-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: 172px; gap: 16px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.row-scroll::-webkit-scrollbar { height: 8px; }

/* Kartu */
.card {
  background: var(--panel); border-radius: var(--radius); padding: 12px; border: 1px solid transparent;
  transition: background .2s, border-color .2s, transform .15s; scroll-snap-align: start; text-align: left; width: 100%;
  display: block; position: relative; cursor: pointer; color: inherit; font: inherit;
}
.card:hover { background: var(--panel-2); border-color: var(--line); }
.card-art { position: relative; width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden; margin-bottom: 12px; background: var(--panel-2); box-shadow: 0 8px 20px rgba(0, 0, 0, .3); }
.card-art img { width: 100%; height: 100%; object-fit: cover; }
.card.round .card-art { border-radius: 50%; }
.card-title { font-size: 14.5px; font-weight: 700; line-height: 1.25; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-sub { font-size: 12.5px; color: var(--muted); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-play {
  position: absolute; right: 10px; bottom: 10px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--grad-btn); color: #fff; border: none; display: grid; place-items: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .5); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s;
}
.card-play svg { width: 22px; height: 22px; }
.card:hover .card-play { opacity: 1; transform: translateY(0); }
.card-play:hover { transform: scale(1.08); }
.card-badge { position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 20px; background: rgba(0, 0, 0, .65); font-size: 11px; font-weight: 700; backdrop-filter: blur(6px); }

/* Genre tiles */
.genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 15px; margin-top: 10px; }
.genre-tile { position: relative; aspect-ratio: 1.7; border-radius: var(--radius); overflow: hidden; border: none; padding: 15px; text-align: left; color: #fff; font-size: 18px; font-weight: 800; letter-spacing: -.3px; display: block; }
.genre-tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(0, 0, 0, .12), transparent 60%); }
.gt-name { position: relative; z-index: 2; }
.gt-emoji { position: absolute; right: -6px; bottom: -12px; z-index: 1; font-size: 54px; line-height: 1; transform: rotate(22deg); filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .4)); transition: transform .2s; }
.genre-tile:hover { filter: brightness(1.08); }
.genre-tile:hover .gt-emoji { transform: rotate(14deg) scale(1.08); }

/* ── Track list ─────────────────────────────────────────────────────────── */
.tracklist { margin-top: 8px; }
.tl-head, .tl-row {
  display: grid; grid-template-columns: 36px 1fr 1.1fr 44px 96px; align-items: center; gap: 14px;
  padding: 0 14px; border-radius: 8px;
}
.tl-head { height: 36px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.tl-head .tl-al { text-align: left; }
.tl-head > span:last-child { display: flex; justify-content: flex-end; align-items: center; }
.tl-head svg { width: 15px; height: 15px; }
.tl-row { height: 58px; transition: background .12s; position: relative; }
.tl-row:hover { background: var(--panel); }
.tl-row.playing { background: rgba(139, 92, 246, .1); }
.tl-idx { display: grid; place-items: center; color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; position: relative; }
.tl-row:hover .tl-idx .n { display: none; }
.tl-idx .go { display: none; }
.tl-row:hover .tl-idx .go { display: grid; place-items: center; }
.tl-idx .go svg { width: 16px; height: 16px; color: var(--text); }
.tl-row.playing .tl-idx .n { display: none; }
.tl-idx .eq { display: none; }
.tl-row.playing .tl-idx .eq { display: flex; }
.tl-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tl-art { width: 42px; height: 42px; border-radius: 6px; object-fit: cover; flex: none; background: var(--panel-2); }
.tl-txt { min-width: 0; }
.tl-name { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 7px; }
.tl-row.playing .tl-name { color: var(--accent); }
.tl-name .exp { font-size: 9px; font-weight: 700; background: var(--muted-2); color: var(--bg); padding: 1px 4px; border-radius: 3px; flex: none; }
.tl-name .off { color: var(--accent-3); display: inline-grid; }
.tl-name .off svg { width: 14px; height: 14px; }
.tl-artist { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-artist a:hover { text-decoration: underline; color: var(--text); }
.tl-al { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-al a:hover { text-decoration: underline; color: var(--text); }
.tl-like { display: grid; place-items: center; }
.tl-like button { width: 34px; height: 34px; border-radius: 50%; border: none; background: none; color: var(--muted); display: grid; place-items: center; opacity: 0; }
.tl-row:hover .tl-like button, .tl-like button.on { opacity: 1; }
.tl-like button.on { color: var(--accent-2); }
.tl-like button svg { width: 17px; height: 17px; }
.tl-end { display: flex; align-items: center; justify-content: flex-end; gap: 6px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.tl-end .more { width: 32px; height: 32px; border-radius: 50%; border: none; background: none; color: var(--muted); display: grid; place-items: center; opacity: 0; }
.tl-row:hover .tl-end .more { opacity: 1; }
.tl-end .more:hover { color: var(--text); background: var(--panel-2); }
.tl-end .more svg { width: 18px; height: 18px; }

/* Equalizer bars (animasi "musik mengalun") */
.eq { display: flex; align-items: flex-end; gap: 2px; height: 15px; }
.eq span { width: 3px; background: var(--accent); border-radius: 2px; animation: eq 900ms ease-in-out infinite; }
.eq span:nth-child(1) { animation-delay: -600ms; }
.eq span:nth-child(2) { animation-delay: -200ms; }
.eq span:nth-child(3) { animation-delay: -450ms; }
.eq span:nth-child(4) { animation-delay: -100ms; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.paused .eq span, .eq.paused span { animation-play-state: paused; }

/* ── Player bar ─────────────────────────────────────────────────────────── */
.player {
  grid-area: player;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid; grid-template-columns: 1fr 2fr 1fr; align-items: center;
  padding: 0 16px; gap: 16px; position: relative; overflow: hidden;
}
.player::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--grad); opacity: .5; }
.np { display: flex; align-items: center; gap: 13px; min-width: 0; }
.np-art { position: relative; width: 58px; height: 58px; border-radius: 9px; overflow: hidden; flex: none; background: var(--panel-2); box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
.np-art img { width: 100%; height: 100%; object-fit: cover; }
.np-art-eq { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding-bottom: 9px; background: rgba(0, 0, 0, .4); }
.np-art-eq span { width: 3.5px; background: #fff; border-radius: 2px; animation: eqLow 900ms ease-in-out infinite; height: 22%; }
@keyframes eqLow { 0%, 100% { height: 16%; } 50% { height: 52%; } }
.np-art-eq span:nth-child(2) { animation-delay: -200ms; }
.np-art-eq span:nth-child(3) { animation-delay: -450ms; }
.np-art-eq span:nth-child(4) { animation-delay: -100ms; }
.np-meta { min-width: 0; }
.np-title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist a:hover { color: var(--text); text-decoration: underline; }
.np-like { flex: none; }
.np-like.on { color: var(--accent-2); }
.np-like svg { width: 18px; height: 18px; }
.np-close { flex: none; }
.np-close svg { width: 18px; height: 18px; }
.np-close:hover { color: #f87171; }

.pc { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.pc-btns { display: flex; align-items: center; gap: 6px; }
.pc-play { width: 42px; height: 42px; border-radius: 50%; border: none; background: #fff; color: #0a0a0f; display: grid; place-items: center; transition: transform .12s; }
.pc-play svg { width: 22px; height: 22px; }
.pc-play:hover { transform: scale(1.07); }
.pc-play:active { transform: scale(.94); }
.pc-btns .icon-btn { width: 34px; height: 34px; background: none; }
.pc-btns .icon-btn svg { width: 19px; height: 19px; }
.pc-btns .icon-btn.on { color: var(--accent); }
.pc-btns .icon-btn.on::after { content: ""; position: absolute; bottom: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.pc-btns .icon-btn { position: relative; }

.pc-seek { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 560px; }
.t-cur, .t-dur { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 36px; }
.t-dur { text-align: left; }
.seek { position: relative; flex: 1; height: 16px; display: flex; align-items: center; cursor: pointer; }
.seek::before { content: ""; position: absolute; left: 0; right: 0; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .16); }
.seek-buf { position: absolute; left: 0; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .28); width: 0; }
.seek-fill { position: absolute; left: 0; height: 5px; border-radius: 3px; background: var(--grad-btn); width: 0%; }
.seek-knob { position: absolute; right: -6px; top: 50%; transform: translateY(-50%) scale(0); width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); transition: transform .12s; }
.seek:hover .seek-knob { transform: translateY(-50%) scale(1); }
.seek:hover .seek-fill { background: var(--accent-2); }
/* Waveform animasi saat memutar */
.seek-wave { position: absolute; left: 0; right: 0; height: 16px; display: none; align-items: center; gap: 2px; pointer-events: none; opacity: .0; }
.seek.wave .seek-wave { display: flex; opacity: .5; }
.seek.wave::before, .seek.wave .seek-fill, .seek.wave .seek-buf { opacity: 0; }
.seek-wave i { flex: 1; height: 20%; background: var(--muted); border-radius: 2px; }
.seek-wave i.on { background: var(--accent); }

.px { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.px .icon-btn { width: 34px; height: 34px; background: none; }
.px .icon-btn svg { width: 18px; height: 18px; }
.px .icon-btn.on { color: var(--accent); }
.px-save.saved { color: var(--accent-3); }
.vol { display: flex; align-items: center; gap: 6px; }
.vol-track { width: 92px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .16); position: relative; cursor: pointer; }
.vol-fill { height: 100%; border-radius: 3px; background: #fff; width: 100%; position: relative; }
.vol-fill::after { content: ""; position: absolute; right: -5px; top: 50%; transform: translateY(-50%) scale(0); width: 11px; height: 11px; border-radius: 50%; background: #fff; transition: transform .12s; }
.vol-track:hover .vol-fill { background: var(--accent-2); }
.vol-track:hover .vol-fill::after { transform: translateY(-50%) scale(1); }

/* Pemutar YouTube tersembunyi (audio saja; harus tetap di DOM & berukuran agar main) */
#ytwrap { position: fixed; left: -9999px; top: 0; width: 320px; height: 180px; opacity: .01; pointer-events: none; z-index: -1; }

/* Progress ringkas mini-player (mobile) */
.mini-progress { display: none; }

/* ── Now Playing layar penuh ────────────────────────────────────────────── */
.nowplaying {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; flex-direction: column;
  animation: slideUp .32s cubic-bezier(.2, .8, .2, 1);
  overflow: hidden;
}
.nowplaying .np-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(60px) saturate(1.6) brightness(.5); transform: scale(1.2); z-index: 0; }
.nowplaying .np-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 10, 15, .3), rgba(10, 10, 15, .85)); }
.np-full { position: relative; z-index: 1; display: flex; flex-direction: column; height: 100%; padding: 18px clamp(18px, 5vw, 60px) calc(24px + var(--safe-b)); }
.np-full-top { display: flex; align-items: center; justify-content: space-between; }
.np-full-top .lbl { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.np-full-body { flex: 1; display: flex; gap: clamp(24px, 5vw, 64px); align-items: center; justify-content: center; min-height: 0; padding: 20px 0; }
.np-full-art { width: min(48vh, 440px); aspect-ratio: 1; border-radius: 18px; object-fit: cover; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); flex: none; }
.np-full.playing .np-full-art { animation: bob 5s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.np-full-side { flex: 1; max-width: 460px; min-width: 0; }
.np-full-title { font-size: clamp(26px, 4vw, 44px); font-weight: 850; letter-spacing: -1px; line-height: 1.08; }
.np-full-artist { font-size: 18px; color: var(--muted); margin-top: 8px; }
.np-full-artist a:hover { color: var(--text); text-decoration: underline; }
.np-lyrics-box { margin-top: 22px; max-height: 30vh; overflow-y: auto; font-size: 17px; line-height: 1.9; color: var(--muted); white-space: pre-wrap; padding-right: 10px; }
.np-lyrics-box .lyr-empty { color: var(--muted-2); font-style: italic; }
.np-full-foot { position: relative; z-index: 1; }
.np-full-seek { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.np-full-ctrls { display: flex; align-items: center; justify-content: center; gap: 18px; }
.np-full-ctrls .pc-play { width: 66px; height: 66px; }
.np-full-ctrls .pc-play svg { width: 30px; height: 30px; }
.np-full-ctrls .icon-btn { width: 46px; height: 46px; background: none; }
.np-full-ctrls .icon-btn svg { width: 26px; height: 26px; }
.np-full-ctrls .icon-btn.on { color: var(--accent); }
.np-full-actions { display: flex; align-items: center; gap: 6px; }

/* ── Side panel (antrean / lirik) ───────────────────────────────────────── */
.sidepanel { position: fixed; top: 8px; right: 8px; bottom: calc(var(--player-h) + 12px); width: 360px; max-width: calc(100vw - 16px); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); z-index: 150; display: flex; flex-direction: column; box-shadow: var(--shadow); animation: slideRight .28s cubic-bezier(.2, .8, .2, 1); overflow: hidden; }
.sp-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.sp-head h3 { margin: 0; font-size: 16px; font-weight: 800; }
.sp-body { flex: 1; overflow-y: auto; padding: 12px; }
.sp-lyrics { padding: 8px 18px 24px; font-size: 15.5px; line-height: 1.95; white-space: pre-wrap; color: var(--text); }
.sp-sec-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 10px 8px 8px; }
.q-item { display: flex; align-items: center; gap: 11px; padding: 8px; border-radius: 9px; cursor: pointer; }
.q-item:hover { background: var(--panel-2); }
.q-item.now { background: rgba(139, 92, 246, .12); }
.q-art { width: 42px; height: 42px; border-radius: 6px; object-fit: cover; flex: none; }
.q-txt { min-width: 0; flex: 1; }
.q-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-name.hl { color: var(--accent); }
.q-artist { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Panel cache offline (ring disk) ────────────────────────────────────── */
.cache-panel { display: flex; gap: 24px; align-items: center; padding: 22px; margin: 6px 0 16px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(135deg, var(--panel), var(--panel-2)); flex-wrap: wrap; }
.cache-ring { position: relative; width: 128px; height: 128px; flex: none; }
.cring { width: 128px; height: 128px; display: block; }
.cring circle { fill: none; stroke-width: 12; transform: rotate(-90deg); transform-origin: 60px 60px; }
.cr-bg { stroke: rgba(255, 255, 255, .08); }
.cr-pinned { stroke: var(--accent-3); transition: stroke-dasharray .7s cubic-bezier(.2, .8, .2, 1); }
.cr-auto { stroke: var(--accent); transition: stroke-dasharray .7s cubic-bezier(.2, .8, .2, 1); }
.cache-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cache-ring-center b { font-size: 24px; font-weight: 850; letter-spacing: -.5px; }
.cache-ring-center span { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.cache-info { flex: 1; min-width: 210px; }
.cache-head { display: flex; align-items: center; justify-content: space-between; }
.cache-head h3 { margin: 0; font-size: 17px; font-weight: 800; }
.cache-menu-btn { width: 34px; height: 34px; border-radius: 50%; border: none; background: none; color: var(--muted); display: grid; place-items: center; }
.cache-menu-btn:hover { background: var(--panel); color: var(--text); }
.cache-menu-btn svg { width: 20px; height: 20px; }
.cache-legend { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 10px; }
.cache-legend span { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); }
.cache-legend b { color: var(--text); font-weight: 700; }
.cache-legend .dot { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.cache-legend .dot.pinned { background: var(--accent-3); }
.cache-legend .dot.auto { background: var(--accent); }
.cache-legend .dot.free { background: rgba(255, 255, 255, .14); }
.cache-quota { font-size: 12px; color: var(--muted-2); }
@media (max-width: 560px) { .cache-panel { justify-content: center; text-align: left; } .cache-ring { width: 112px; height: 112px; } .cring { width: 112px; height: 112px; } }

/* ── Empty / loader ─────────────────────────────────────────────────────── */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty svg { width: 54px; height: 54px; color: var(--muted-2); margin-bottom: 14px; }
.empty h3 { margin: 0 0 6px; font-size: 20px; color: var(--text); }
.empty p { margin: 0; font-size: 14px; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; margin: 60px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--panel) 25%, var(--panel-2) 37%, var(--panel) 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; border-radius: 10px; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ── Recognize (Shazam) ─────────────────────────────────────────────────── */
.shazam-wrap { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 20px; }
.shazam-btn { width: 150px; height: 150px; border-radius: 50%; border: none; background: var(--grad-btn); color: #fff; display: grid; place-items: center; box-shadow: 0 16px 44px rgba(236, 72, 153, .45); position: relative; transition: transform .15s; }
.shazam-btn svg { width: 60px; height: 60px; }
.shazam-btn:active { transform: scale(.95); }
.shazam-btn.listening { animation: pulse 1.4s ease-out infinite; }
.shazam-btn.listening::before, .shazam-btn.listening::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent-2); animation: ripple 1.8s ease-out infinite; }
.shazam-btn.listening::after { animation-delay: .9s; }
@keyframes ripple { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 16px 44px rgba(236, 72, 153, .45); } 50% { box-shadow: 0 16px 60px rgba(236, 72, 153, .8); } }
.shazam-status { margin-top: 22px; font-size: 16px; font-weight: 600; }
.shazam-hint { margin-top: 8px; color: var(--muted); font-size: 13.5px; max-width: 340px; }

/* ── Toast ──────────────────────────────────────────────────────────────── */
.toasts { position: fixed; left: 50%; bottom: calc(var(--player-h) + 20px); transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--elev); border: 1px solid var(--line-2); color: var(--text); padding: 12px 18px; border-radius: 30px; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow); animation: toastIn .25s ease, toastOut .25s ease 2.4s forwards; display: flex; align-items: center; gap: 8px; }
.toast .ok { color: var(--ok); display: grid; }
.toast svg { width: 17px; height: 17px; }
@keyframes toastIn { from { transform: translateY(14px); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(14px); opacity: 0; } }

/* ── Modal (buat playlist / tambah ke playlist) ─────────────────────────── */
.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 500; display: grid; place-items: center; padding: 20px; animation: fade .2s; backdrop-filter: blur(4px); }
.modal { background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; width: 100%; max-width: 420px; box-shadow: var(--shadow); overflow: hidden; animation: slideUp .28s cubic-bezier(.2, .8, .2, 1); }
.modal-head { padding: 20px 22px 8px; font-size: 20px; font-weight: 800; }
.modal-body { padding: 8px 22px 22px; }
.modal-body label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; font-weight: 600; }
.modal-body input { width: 100%; height: 46px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); padding: 0 14px; font-size: 15px; outline: none; }
.modal-body input:focus { border-color: var(--accent); }
.modal-list { max-height: 300px; overflow-y: auto; margin: 6px -8px 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 6px 22px 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 18px; border-radius: 22px; border: 1px solid var(--line-2); background: none; color: var(--text); font-size: 14px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn:hover { background: var(--panel-2); }
/* Baris tombol simetris (lebar sama, rata tengah) */
.btn-row { display: flex; gap: 10px; margin-top: 12px; }
.btn-row > .btn { flex: 1 1 0; min-width: 0; }
@media (max-width: 400px) { .btn-row { flex-wrap: wrap; } .btn-row > .btn { flex: 1 1 46%; } }
.btn.primary { background: var(--grad-btn); border: none; color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }

/* Context menu */
.ctx { position: fixed; z-index: 600; background: var(--elev); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; min-width: 210px; animation: fade .12s; }
.ctx button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; border: none; background: none; color: var(--text); font-size: 14px; border-radius: 8px; text-align: left; }
.ctx button:hover { background: var(--panel-2); }
.ctx button svg { width: 18px; height: 18px; color: var(--muted); }
.ctx button.danger { color: #f87171; }
.ctx button.danger svg { color: #f87171; }
.ctx .sep { height: 1px; background: var(--line); margin: 4px 6px; }

@keyframes fade { from { opacity: 0; } }
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } }
@keyframes slideRight { from { transform: translateX(24px); opacity: 0; } }

/* ── Mobile nav (bottom) ────────────────────────────────────────────────── */
.mobile-nav { display: none; }

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 1100px) {
  .tl-head, .tl-row { grid-template-columns: 32px 1fr 44px 84px; }
  .tl-al { display: none; }
}
@media (max-width: 1000px) {
  .search-wrap { display: block; }
}

/* Tablet & mobile */
@media (max-width: 820px) {
  :root { --player-h: 66px; }
  body { overflow: auto; }
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    grid-template-areas: "main" "player";
    gap: 0; padding: 0; height: 100dvh;
  }
  /* Sidebar jadi DRAWER geser (semua menu, admin, playlist, profil, logout, install) */
  .sidebar {
    display: flex; position: fixed; left: 0; top: 0; bottom: 0; z-index: 300;
    width: min(300px, 85vw); border-radius: 0 16px 16px 0;
    transform: translateX(-102%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  }
  .sidebar.open { transform: none; box-shadow: 0 0 70px rgba(0, 0, 0, .7); }
  .ident { display: block; }
  .main { border-radius: 0; border: none; }
  .view { padding: 6px 16px calc(var(--player-h) + 78px); }
  .topbar { padding: 0 14px; gap: 10px; height: 56px; }
  .topbar-nav .nav-fwd { display: none; }
  .search-wrap { display: block; max-width: none; }

  /* Player jadi mini bar; klik → buka Now Playing */
  .player {
    grid-area: player;
    position: fixed; left: 8px; right: 8px; bottom: calc(62px + var(--safe-b));
    height: var(--player-h); z-index: 120;
    grid-template-columns: 1fr auto; gap: 10px; padding: 0 10px 0 10px;
    border-radius: 12px;
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
  }
  .player .pc, .player .px { display: none; }
  .np { gap: 11px; }
  .np-art { width: 46px; height: 46px; }
  .np-mini-play { display: grid !important; }

  /* Progress + durasi ringkas di mini-player */
  :root { --player-h: 76px; }
  .player { align-items: flex-start; padding-top: 9px; }
  .mini-progress { display: flex; align-items: center; gap: 8px; position: absolute; left: 12px; right: 12px; bottom: 8px; }
  .mp-cur, .mp-dur { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 28px; flex: none; }
  .mp-dur { text-align: right; }
  .mp-track { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .18); overflow: hidden; cursor: pointer; }
  .mp-fill { height: 100%; border-radius: 2px; background: var(--grad-btn); width: 0%; }

  /* Bottom nav muncul */
  .mobile-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 130;
    height: calc(58px + var(--safe-b)); padding-bottom: var(--safe-b);
    background: rgba(16, 16, 24, .96); backdrop-filter: blur(20px);
    border-top: 1px solid var(--line); justify-content: space-around; align-items: stretch;
  }
  .mn-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: none; background: none; color: var(--muted-2); font-size: 10.5px; font-weight: 600; }
  .mn-item svg { width: 23px; height: 23px; }
  .mn-item.active { color: var(--text); }

  .detail-hero { flex-direction: column; align-items: center; text-align: center; padding-top: 20px; gap: 16px; }
  .detail-hero .dh-art { width: 180px; height: 180px; }
  .dh-title { font-size: clamp(26px, 8vw, 40px); }
  .dh-sub { justify-content: center; }
  .row-scroll { grid-auto-columns: 148px; gap: 12px; }
  .genre-grid { grid-template-columns: repeat(2, 1fr); }

  .np-full-body { flex-direction: column; }
  .np-lyrics-box { max-height: 22vh; }
  .sidepanel { top: auto; right: 0; left: 0; bottom: 0; width: 100%; max-width: none; border-radius: 16px 16px 0 0; height: 78vh; animation: slideUp .3s; }
}
@media (max-width: 420px) {
  .row-scroll { grid-auto-columns: 132px; }
  .tl-head, .tl-row { grid-template-columns: 28px 1fr 40px 62px; gap: 10px; padding: 0 8px; }
  .tl-end .more { display: none; }
  .genre-tile { font-size: 16px; }
}

/* Mini play button (mobile only, injected) */
.np-mini-play { display: none; width: 40px; height: 40px; border-radius: 50%; border: none; background: #fff; color: #0a0a0f; place-items: center; flex: none; }
.np-mini-play svg { width: 22px; height: 22px; }

/* ── Login screen ───────────────────────────────────────────────────────── */
.login-screen { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; place-content: center; padding: 24px; background: radial-gradient(circle at 30% 20%, #1a1030, #0a0a0f 60%); overflow: hidden; animation: fade .3s; }
.login-orbs { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.login-orbs span { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; animation: float 12s ease-in-out infinite; }
.login-orbs span:nth-child(1) { width: 360px; height: 360px; background: #8b5cf6; top: -80px; left: -60px; }
.login-orbs span:nth-child(2) { width: 320px; height: 320px; background: #ec4899; bottom: -90px; right: -40px; animation-delay: -4s; }
.login-orbs span:nth-child(3) { width: 260px; height: 260px; background: #f59e0b; top: 40%; right: 20%; animation-delay: -8s; opacity: .3; }
@keyframes float { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, -30px) scale(1.1); } }
.login-card { position: relative; z-index: 1; width: 100%; max-width: 400px; text-align: center; background: rgba(20, 20, 29, .6); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid var(--line-2); border-radius: 24px; padding: 48px 36px 30px; box-shadow: var(--shadow); }
.login-logo { width: 92px; height: 92px; margin: 0 auto 18px; border-radius: 24px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 16px 44px rgba(139, 92, 246, .5); animation: logoPulse 2.6s ease-in-out infinite; position: relative; }
.login-logo::after { content: ""; position: absolute; inset: 0; border-radius: 24px; background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .5), transparent 55%); }
.login-logo-inner { color: #fff; animation: spinNote 6s ease-in-out infinite; }
.login-logo-inner svg { width: 46px; height: 46px; }
@keyframes logoPulse { 0%, 100% { transform: scale(1); box-shadow: 0 16px 44px rgba(139, 92, 246, .5); } 50% { transform: scale(1.05); box-shadow: 0 20px 60px rgba(236, 72, 153, .7); } }
@keyframes spinNote { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.login-title { font-size: 32px; font-weight: 850; letter-spacing: -1px; margin: 0; }
.login-title b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-slogan { margin: 6px 0 0; font-size: 14px; font-weight: 700; letter-spacing: .3px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-desc { margin: 14px 0 22px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.login-err { background: rgba(239, 68, 68, .15); border: 1px solid rgba(239, 68, 68, .4); color: #fca5a5; padding: 10px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; }
.login-google { width: 100%; height: 50px; border-radius: 25px; border: none; background: #fff; color: #1f1f1f; font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 11px; transition: transform .12s, box-shadow .2s; }
.login-google:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0, 0, 0, .4); }
.login-google:active { transform: scale(.98); }
.login-guest { width: 100%; height: 46px; margin-top: 12px; border-radius: 23px; border: 1px solid var(--line-2); background: none; color: var(--text); font-size: 14px; font-weight: 600; }
.login-guest:hover { background: var(--panel); }
.login-feats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-top: 24px; }
.login-feats span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted-2); font-size: 12px; font-weight: 600; }
.login-feats svg { width: 15px; height: 15px; color: var(--accent); }
.login-foot { margin-top: 22px; color: var(--muted-2); font-size: 12px; font-weight: 500; letter-spacing: .2px; }

/* ── Identitas / avatar ─────────────────────────────────────────────────── */
.ident { padding: 10px 12px 0; }
.ident-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px; border-radius: 10px; border: none; background: none; color: var(--text); }
.ident-btn:hover { background: var(--panel); }
.ident-btn img, .ident-ph { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; }
.ident-ph { display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; text-transform: uppercase; }
.ident-ph svg { width: 18px; height: 18px; }
.ident-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; line-height: 1.25; }
.ident-name { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ident-role { font-size: 11px; font-weight: 600; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ident-role.admin { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── Admin tables ───────────────────────────────────────────────────────── */
.admin-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.admin-table th { text-align: left; padding: 10px 12px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:hover td { background: var(--panel); }
.admin-user { display: flex; align-items: center; gap: 10px; }
.admin-user img, .admin-user .ph { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--grad); display: grid; place-items: center; color: #fff; font-weight: 800; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 12px; font-size: 12px; font-weight: 700; }
.tag.ok { background: rgba(34, 197, 94, .15); color: #4ade80; }
.tag.no { background: rgba(239, 68, 68, .15); color: #f87171; }
.tag.role { background: var(--panel-2); color: var(--text); border: 1px solid var(--line-2); }
.admin-table select { background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); border-radius: 8px; padding: 6px 8px; font-size: 13px; }
.table-scroll { overflow-x: auto; }
.mod-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin: 10px 0; }
.mod-check { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 10px; font-size: 13.5px; cursor: pointer; }
.mod-check input { accent-color: var(--accent); width: 17px; height: 17px; }
.role-card { border: 1px solid var(--line-2); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.role-card .rc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.role-mods { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.role-mods .chip { font-size: 11.5px; padding: 3px 9px; border-radius: 10px; background: var(--panel-2); color: var(--muted); }

@media (max-width: 820px) {
  .login-card { padding: 32px 22px 24px; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .eq span, .np-art-eq span { animation: none; height: 60%; }
}
