* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: #000; color: #fff; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
input, textarea, select { width: 100%; background: #282828; border: 1px solid #3a3a3a; color: #fff; font-size: 15px; padding: 12px 14px; border-radius: 8px; min-height: 46px; min-width: 0; }
input:focus, textarea:focus, select:focus { outline: 2px solid #1DB954; border-color: #1DB954; }
input[readonly] { color: #b3b3b3; }
a { color: #1DB954; }
.muted { color: #b3b3b3; }
.sub { color: #b3b3b3; font-size: 14px; line-height: 1.5; margin: 0 0 20px; }
.note { color: #b3b3b3; font-size: 13px; line-height: 1.5; margin: 0 0 16px; }
.hint { color: #b3b3b3; font-size: 12px; display: block; margin-top: 6px; }
.static { margin: 0; font-size: 15px; word-break: break-all; }
.empty { background: #181818; border-radius: 12px; padding: 28px 20px; text-align: center; color: #b3b3b3; font-size: 14px; }

/* Buttons */
.btn-green { background: #1DB954; color: #000; border: none; font-size: 14px; font-weight: 700; padding: 12px 24px; border-radius: 999px; min-height: 44px; }
.btn-green:hover { background: #1ed760; }
.btn-ghost { background: transparent; color: #fff; border: 1px solid #535353; font-size: 13px; font-weight: 600; padding: 10px 16px; border-radius: 999px; min-height: 44px; }
.btn-ghost:hover { border-color: #fff; }
.btn-danger { background: transparent; color: #ff5c5c; border: 1px solid #ff5c5c; font-size: 13px; font-weight: 700; padding: 10px 20px; border-radius: 999px; min-height: 44px; }
.btn-link { text-decoration: none; display: inline-flex; align-items: center; }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: 13px; }
.rowbtns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Login */
.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 400px; background: #121212; border-radius: 16px; padding: 28px 24px; }
.login-wordmark { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; text-align: center; }
.login-wordmark span, .wordmark span, .topbar-wordmark span { color: #1DB954; }
.login-sub { color: #b3b3b3; text-align: center; font-size: 14px; margin: 6px 0 22px; }
.login-error { background: #3d1212; border: 1px solid #ff5c5c; color: #ffb3b3; font-size: 14px; border-radius: 8px; padding: 10px 14px; margin: 0 0 16px; }

/* Layout */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 240px; flex-shrink: 0; background: #000; padding: 20px 12px; display: flex; flex-direction: column; gap: 6px; border-right: 1px solid #1a1a1a; position: sticky; top: 0; height: 100vh; }
.wordmark { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; padding: 4px 12px 16px; }
.sidenav { display: flex; flex-direction: column; gap: 6px; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid #1a1a1a; }
.navbtn { display: flex; align-items: center; gap: 12px; width: 100%; background: transparent; border: none; color: #b3b3b3; font-size: 15px; font-weight: 600; padding: 12px; border-radius: 8px; text-align: left; min-height: 46px; }
.navbtn:hover { background: #282828; color: #fff; }
.navbtn.active { background: #282828; color: #fff; }
.nav-ic { width: 20px; height: 20px; flex-shrink: 0; display: inline-flex; }
.nav-ic svg { width: 20px; height: 20px; fill: currentColor; }
.main { flex: 1; min-width: 0; background: #121212; padding: 24px; }
.topbar { display: none; }
.view { display: none; max-width: 820px; }
.view.active { display: block; }
.view h1 { font-size: 26px; margin: 0 0 4px; }
.view h2 { font-size: 18px; margin: 24px 0 12px; }
.bottomnav { display: none; }

/* Beranda */
.album-head { display: flex; gap: 20px; align-items: center; background: #181818; border-radius: 12px; padding: 20px; }
.album-cover { width: 160px; height: 160px; flex-shrink: 0; border-radius: 8px; object-fit: cover; background: #282828; }
.album-info { min-width: 0; }
.album-info h1 { font-size: 28px; line-height: 1.15; word-break: break-word; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { background: #181818; border-radius: 12px; padding: 16px; min-width: 0; }
.stat .num { font-size: 26px; font-weight: 800; word-break: break-all; }
.stat .lbl { color: #b3b3b3; font-size: 13px; margin-top: 4px; }
.track { display: flex; align-items: center; gap: 14px; background: #181818; border-radius: 10px; padding: 14px 16px; margin-bottom: 8px; }
.track .no { color: #b3b3b3; width: 20px; flex-shrink: 0; text-align: right; font-size: 14px; }
.track .nm { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; }
.track .tm { color: #b3b3b3; font-size: 14px; white-space: nowrap; }
.venue { color: #b3b3b3; font-size: 14px; margin-top: 10px; }

/* Cards, fields, groups */
.card { background: #181818; border-radius: 12px; padding: 20px; margin-bottom: 14px; }
.card-title { font-size: 17px; margin: 0 0 14px; }
.field { margin-bottom: 14px; min-width: 0; }
.field label { display: block; color: #b3b3b3; font-size: 13px; margin-bottom: 6px; }
.input-row { display: flex; gap: 10px; }
.input-row input { flex: 1; min-width: 0; }
.input-row .btn-ghost { flex-shrink: 0; }
.group { background: #181818; border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.group summary { cursor: pointer; font-weight: 700; font-size: 16px; padding: 16px 20px; list-style-position: inside; }
.group-body { padding: 4px 20px 20px; }
.upload-row { display: flex; gap: 10px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.upload-row .up-status { color: #b3b3b3; font-size: 13px; }
.save-bar { position: sticky; bottom: 0; background: linear-gradient(transparent, #121212 30%); padding: 16px 0 4px; display: flex; justify-content: flex-end; }
.preview { background: #181818; border-radius: 10px; padding: 14px 16px; word-break: break-all; font-size: 14px; margin: 12px 0; }
.preview b { color: #1DB954; }

/* Switch */
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #282828; cursor: pointer; }
.switch-row:last-child { border-bottom: none; }
.switch-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch { position: relative; flex-shrink: 0; width: 48px; height: 28px; background: #535353; border-radius: 999px; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; background: #fff; border-radius: 50%; transition: left .2s; }
.switch-row input:checked + .switch { background: #1DB954; }
.switch-row input:checked + .switch::after { left: 23px; }

/* Comments */
.cmt { background: #181818; border-radius: 12px; padding: 16px; margin-bottom: 10px; min-width: 0; }
.cmt.reply { margin-left: 20px; background: #1c1c1c; }
.cmt-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cmt-ava { width: 32px; height: 32px; border-radius: 50%; background: #1DB954; color: #000; font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cmt-name { font-weight: 700; font-size: 14px; }
.cmt-admin { color: #1DB954; font-size: 12px; font-weight: 700; }
.cmt-time { color: #b3b3b3; font-size: 12px; margin-left: auto; white-space: nowrap; }
.badge { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.badge.ok { background: #1DB954; color: #000; }
.badge.no { background: #535353; color: #fff; }
.badge.unsure { background: #b98a1e; color: #fff; }
.badge.pin { background: #fff; color: #000; display: inline-flex; align-items: center; gap: 4px; }
.badge.pin svg { width: 11px; height: 11px; fill: currentColor; }
.cmt-text { margin: 10px 0 12px; font-size: 15px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.cmt-text strong { color: #fff; }
.cmt-meta { color: #b3b3b3; font-size: 12px; word-break: break-all; margin-bottom: 12px; }
.cmt-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cmt-like { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: none; color: #b3b3b3; font-size: 13px; font-weight: 600; padding: 6px 4px; min-height: 36px; }
.cmt-like.liked { color: #ff5c5c; }
.cmt-like svg { width: 16px; height: 16px; fill: currentColor; }
.inline-form { margin-top: 12px; }
.inline-form textarea, .inline-form select { margin-bottom: 10px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 20px 0 40px; }
.pager-page { color: #b3b3b3; font-size: 14px; }

/* Toast, offline */
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: #fff; color: #000; font-size: 14px; font-weight: 600; padding: 12px 20px; border-radius: 999px; display: none; z-index: 60; max-width: calc(100vw - 32px); text-align: center; box-shadow: 0 4px 24px rgba(0,0,0,.6); }
.toast.show { display: block; }
.offline-banner { position: fixed; top: 0; left: 0; right: 0; background: #ff5c5c; color: #fff; text-align: center; font-size: 13px; font-weight: 600; padding: 8px; z-index: 70; }

/* Mobile */
@media (max-width: 899px) {
    .sidebar { display: none; }
    .main { padding: 16px 16px 96px; }
    .topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0 16px; }
    .topbar-wordmark { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; }
    .topbar-name { color: #b3b3b3; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .bottomnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; background: #000; border-top: 1px solid #282828; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 40; }
    .bottomnav .navbtn { flex-direction: column; gap: 2px; font-size: 11px; padding: 8px 2px; align-items: center; justify-content: center; text-align: center; }
    .bottomnav .navbtn .nav-ic { width: 20px; height: 20px; }
    .album-head { flex-direction: column; align-items: flex-start; }
    .album-cover { width: 128px; height: 128px; }
    .album-info h1 { font-size: 22px; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .toast { bottom: 92px; }
    .save-bar { bottom: 76px; }
    .cmt.reply { margin-left: 12px; }
}
@media (max-width: 360px) {
    .main { padding-left: 12px; padding-right: 12px; }
    .stats { gap: 8px; }
    .stat { padding: 12px; }
    .stat .num { font-size: 22px; }
    .album-cover { width: 112px; height: 112px; }
}
