:root { --bg:#0d1117; --panel:#161b22; --panel2:#1f2630; --line:#30363d; --text:#e6edf3; --muted:#8b949e; --accent:#22d3ee; --danger:#f87171; --ok:#34d399; }
* { box-sizing: border-box; }
html, body { margin:0; background:var(--bg); color:var(--text); font:15px/1.45 system-ui, sans-serif; }
[hidden] { display:none !important; }
a { color:var(--accent); }
.muted { color:var(--muted); } .small { font-size:.8rem; } .error { color:var(--danger); }
input, select, textarea { background:var(--bg); color:var(--text); border:1px solid var(--line); border-radius:8px; padding:8px 10px; font:inherit; min-width:0; }
textarea { width:100%; min-height:70px; }
input[type=checkbox] { width:auto; }
.btn { background:var(--panel2); color:var(--text); border:1px solid var(--line); border-radius:8px; padding:8px 14px; font:inherit; cursor:pointer; text-decoration:none; display:inline-block; }
.btn:hover { border-color:var(--accent); }
.btn.primary { background:#0e7490; border-color:#22d3ee; font-weight:700; }
.btn.danger { color:var(--danger); }
.btn.small { padding:4px 10px; font-size:.85rem; }
.btn.icon { padding:4px 10px; display:none; }
.btn:disabled { opacity:.5; cursor:default; }
.login { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:16px; }
.login-card { background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:24px; width:100%; max-width:360px; display:flex; flex-direction:column; gap:12px; }
.login-card h1 { margin:0; font-size:1.3rem; } .login-card p { margin:0; }
.app { display:grid; grid-template-columns:240px 1fr; grid-template-rows:auto 1fr; min-height:100vh; }
.topbar { grid-column:1/3; display:flex; align-items:center; gap:10px; padding:10px 16px; background:var(--panel); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:5; }
.spacer { flex:1; }
.sidebar { background:var(--panel); border-right:1px solid var(--line); padding:12px 8px; overflow-y:auto; position:sticky; top:49px; align-self:start; height:calc(100vh - 49px); }
.sidebar h4 { cursor:pointer; user-select:none; margin:10px 10px 4px; font-size:.72rem; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); }
.sidebar button { display:block; width:100%; text-align:left; background:none; border:0; color:var(--text); padding:9px 12px; border-radius:8px; font:inherit; cursor:pointer; }
.sidebar button:hover { background:var(--panel2); }
.sidebar button.active { background:#0e7490; font-weight:700; }
.content { padding:20px; max-width:980px; width:100%; }
.card { background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:14px 16px; margin-bottom:14px; }
.card h3 { margin:0 0 8px; font-size:1.05rem; }
.row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin:6px 0; }
.row > label { min-width:150px; color:var(--muted); font-size:.9rem; }
.row > input[type=text], .row > input[type=password], .row > input[type=number], .row > select { flex:1; min-width:140px; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.tag { display:inline-block; font-size:.72rem; padding:1px 8px; border:1px solid var(--line); border-radius:10px; color:var(--muted); }
.tag.ok { color:var(--ok); border-color:var(--ok); } .tag.bad { color:var(--danger); border-color:var(--danger); }
table { width:100%; border-collapse:collapse; font-size:.88rem; }
th, td { text-align:left; padding:6px 8px; border-bottom:1px solid var(--line); vertical-align:top; }
.toast { position:fixed; bottom:20px; left:50%; transform:translateX(-50%); background:var(--panel2); border:1px solid var(--line); padding:10px 18px; border-radius:10px; z-index:20; max-width:90vw; }
.toast.err { border-color:var(--danger); color:var(--danger); }
code { background:var(--panel2); padding:1px 6px; border-radius:5px; }
@media (max-width: 760px) {
  .app { grid-template-columns:1fr; }
  .topbar { grid-column:1; }
  .btn.icon { display:inline-block; }
  .sidebar { display:none; position:fixed; top:49px; left:0; bottom:0; width:260px; z-index:6; box-shadow:4px 0 20px #000a; }
  .sidebar.open { display:block; }
  .content { padding:14px 16px; }
  .grid2 { grid-template-columns:1fr; }
  .row > label { min-width:100%; }
}
.check { display:inline-flex; align-items:center; gap:4px; margin-right:12px; cursor:pointer; }

/* Admin music rows: name left (ellipsized), buttons right */
.music-row { display: flex; align-items: center; gap: 8px; }
.music-row .music-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-row .music-btns { display: flex; gap: 6px; flex-shrink: 0; margin-left: auto; }
.music-row select { flex: 1; min-width: 0; }
