/* ============================================================
   ShortRex — Screen-specific styles
   (Links, Login, Billing, Settings, Admin, Music)
   ============================================================ */

/* ============================================================
   Links page
   ============================================================ */

.linksbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.linksbar__search {
  position: relative;
  width: 320px;
}
.linksbar__search input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 8px 12px 8px 34px;
  outline: none;
  color: var(--text);
  font-size: 13px;
  transition: border-color 120ms;
}
.linksbar__search input:focus { border-color: var(--border-2); }
.linksbar__search svg {
  position: absolute;
  left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--text-4);
}
.linksbar__filter {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.linksbar__f {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  color: var(--text-3);
  transition: background 120ms, color 120ms;
}
.linksbar__f:hover { color: var(--text); }
.linksbar__f.is-active {
  background: var(--surface-2);
  color: var(--text);
}

/* Table */
.ltable {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.ltable__head {
  display: grid;
  grid-template-columns: 1.4fr 2fr 0.7fr 1.2fr 64px;
  gap: 18px;
  padding: 12px 18px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-4);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.lrow {
  display: grid;
  grid-template-columns: 1.4fr 2fr 0.7fr 1.2fr 64px;
  gap: 18px;
  padding: 16px 18px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  transition: background 120ms;
}
.lrow:last-child { border-bottom: 0; }
.lrow:hover { background: var(--bg-2); }

.lrow__slug {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.lrow__slug-host {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  flex-shrink: 0;
}
.lrow__slug-key {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lrow__copy {
  width: 26px; height: 26px;
  border-radius: 6px;
  display: grid; place-items: center;
  color: var(--text-3);
  opacity: 0;
  transition: opacity 120ms, background 120ms;
  flex-shrink: 0;
}
.lrow:hover .lrow__copy { opacity: 1; }
.lrow__copy:hover { background: var(--surface-2); color: var(--text); }
.lrow__copy.is-copied { color: var(--ok); opacity: 1; }

.lrow__dest {
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lrow__fav {
  width: 18px; height: 18px;
  border-radius: 4px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  color: white;
}

.lrow__visits {
  font-family: var(--font-mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
}
.lrow__visits--locked {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.lrow__visits--locked .lrow__visits-val {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
}

.lrow__date { font-size: 12px; color: var(--text-3); }

.lrow__actions { display: flex; gap: 4px; }
.icon-btn {
  width: 30px; height: 30px;
  border-radius: 7px;
  display: grid; place-items: center;
  color: var(--text-3);
  transition: background 120ms, color 120ms;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn--danger:hover { background: oklch(0.65 0.22 25 / 0.12); color: var(--danger); }

/* Empty state */
.empty {
  padding: 64px 24px;
  text-align: center;
  color: var(--text-3);
}
.empty h3 { font-family: var(--font-display); font-size: 28px; font-weight: 400; margin: 8px 0; color: var(--text); }
.empty p { margin: 0 0 16px; }

/* Stats modal — wider than the default 480px */
.modal--wide { max-width: 600px; }

/* ============================================================
   Login screen
   ============================================================ */

.login {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  background: var(--bg);
}
.login__pane {
  display: grid;
  place-items: center;
  padding: 40px;
  position: relative;
  overflow-y: auto;
}
.login__art {
  position: relative;
  background: linear-gradient(135deg, oklch(0.20 0.04 350), oklch(0.16 0.02 285));
  overflow: hidden;
}
.login__art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(40% 50% at 70% 30%, var(--accent-glow), transparent 60%),
    radial-gradient(50% 60% at 20% 80%, oklch(0.5 0.2 320 / 0.4), transparent 60%);
}
.login__art-content {
  position: relative;
  z-index: 1;
  padding: 60px;
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--text);
}
.login__brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: 28px;
}
.login__brand-mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), oklch(0.6 0.21 5));
  border-radius: 10px;
  color: white;
  box-shadow: 0 0 0 1px oklch(1 0 0 / 0.06) inset, 0 6px 16px -6px var(--accent-glow);
}
.login__brand em { color: var(--accent); font-style: normal; }
.login__pitch {
  margin-top: auto;
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 580px;
  text-wrap: balance;
}
.login__pitch em { font-style: italic; color: var(--accent); }
.login__quote {
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-2);
  max-width: 520px;
  line-height: 1.6;
}
.login__chips {
  display: flex;
  gap: 8px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.login__form {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.login__form h2 {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.05;
}
.login__form > p { color: var(--text-3); margin: 0; }
.login__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-4);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.login__divider::before, .login__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.login__social {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.login__discord {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px;
  background: oklch(0.5 0.15 270);
  border-radius: var(--r);
  font-weight: 600;
  font-size: 14px;
  color: white;
  border: 0;
  transition: background 120ms;
  text-decoration: none;
}
.login__discord:hover { background: oklch(0.55 0.15 270); color: white; }
.login__foot {
  font-size: 12px;
  color: var(--text-4);
  text-align: center;
  margin-top: 4px;
}
.login__foot a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }

/* Login error banner */
.login__error {
  padding: 10px 14px;
  background: oklch(0.65 0.22 25 / 0.12);
  border: 1px solid oklch(0.65 0.22 25 / 0.3);
  border-radius: var(--r);
  color: var(--danger);
  font-size: 13px;
}

/* ============================================================
   Billing
   ============================================================ */

.billing {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}
.billing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 22px;
}
.billing-current {
  background:
    radial-gradient(80% 100% at 100% 0%, var(--accent-soft), transparent 60%),
    var(--surface);
  border-color: oklch(0.66 0.22 18 / 0.3);
  position: relative;
  overflow: hidden;
}
.billing-current__plan {
  font-family: var(--font-display);
  font-size: 36px;
  margin: 12px 0 4px;
}
.billing-current__plan em { color: var(--accent); font-style: italic; }
.billing-current__price {
  font-size: 13px;
  color: var(--text-3);
}
.billing-current__price b { color: var(--text); font-size: 22px; font-family: var(--font-display); font-weight: 400; }
.billing-current__perks {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.billing-current__perks li {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
  color: var(--text-2);
}
.billing-current__perks li svg { color: var(--ok); flex: 0 0 auto; }

.billing__period {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-2);
  border-radius: var(--r);
  margin-top: 18px;
  font-size: 12.5px;
}
.billing__period b { font-family: var(--font-mono); font-weight: 600; font-size: 12px; }

/* Plan grid */
.plans {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 8px;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}
.plan--featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 24px 60px -30px var(--accent-glow);
}
.plan__name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  margin: 0;
}
.plan__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-display);
}
.plan__price b { font-size: 44px; font-weight: 400; letter-spacing: -0.02em; }
.plan__price span { font-size: 13px; color: var(--text-3); font-family: var(--font-sans); }
.plan__perks {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  flex: 1;
}
.plan__perks li { display: flex; align-items: center; gap: 8px; }
.plan__perks li svg { color: var(--text-3); flex: 0 0 auto; }
.plan--featured .plan__perks li svg { color: var(--accent); }
.plan__badge {
  position: absolute;
  top: -10px;
  right: 18px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 99px;
  text-transform: uppercase;
}

/* Invoices */
.invoices {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin-top: 12px;
}
.invoice {
  display: grid;
  grid-template-columns: 1fr 90px 90px 70px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  font-size: 13px;
}
.invoice__date { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.invoice__amt { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.invoice__link { color: var(--accent); font-size: 12px; font-weight: 600; text-align: right; }

/* Payment method */
.pm {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--bg-2);
  border-radius: var(--r);
  margin-top: 12px;
}
.pm__card {
  width: 48px; height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, oklch(0.3 0.06 285), oklch(0.2 0.04 285));
  display: grid; place-items: center;
  font-size: 9px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.04em;
  flex: 0 0 auto;
}
.pm__info { flex: 1; }
.pm__num { font-family: var(--font-mono); font-size: 13px; }
.pm__exp { font-size: 11.5px; color: var(--text-3); }

/* Billing coming-soon card */
.billing-coming-soon {
  background: radial-gradient(80% 100% at 60% 0%, var(--accent-soft), transparent 70%), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 48px 40px;
  text-align: center;
  margin-bottom: 24px;
}
.billing-coming-soon h2 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  margin: 16px 0 8px;
}
.billing-coming-soon p { color: var(--text-3); font-size: 14px; max-width: 400px; margin: 0 auto; }

#billing-msg { font-size: 13px; margin-top: 12px; display: none; }

/* ============================================================
   Admin
   ============================================================ */

.admin-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
.atable {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.atable__head, .arow {
  display: grid;
  grid-template-columns: 2fr 1fr 0.8fr 0.8fr 0.5fr;
  gap: 14px;
  padding: 12px 18px;
  align-items: center;
}
.atable__head {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-4);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.arow {
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  transition: background 120ms;
}
.arow:last-child { border: 0; }
.arow:hover { background: var(--bg-2); }
.arow__user {
  display: flex; align-items: center; gap: 10px;
  min-width: 0;
}
.arow__av {
  width: 32px; height: 32px;
  border-radius: 99px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 11px;
  color: white;
}
.arow__name { font-weight: 600; }
.arow__email { font-size: 11.5px; color: var(--text-3); font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arow__count { font-variant-numeric: tabular-nums; font-family: var(--font-mono); font-size: 13px; }
.arow__date { font-size: 12px; color: var(--text-3); }

/* Payments table */
.ptable {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.ptable__head {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr;
  gap: 14px;
  padding: 12px 18px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-4);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.prow {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr;
  gap: 14px;
  padding: 12px 18px;
  align-items: center;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.prow:last-child { border: 0; }

/* ============================================================
   Music page
   ============================================================ */

.music {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  padding: 8px 32px 80px;
  max-width: 1440px;
  position: relative;
}

/* Ambient backdrop bloom */
.music__bloom {
  position: absolute;
  inset: -80px 0 auto 0;
  height: 560px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 80% at 18% 0%, var(--bloom-1, oklch(0.6 0.22 18 / 0.28)), transparent 60%),
    radial-gradient(50% 70% at 78% 12%, var(--bloom-2, oklch(0.55 0.20 320 / 0.22)), transparent 65%);
  filter: blur(20px);
  transition: background 1.2s ease;
}

.music > *:not(.music__bloom) { position: relative; z-index: 1; }

/* Player column */
.player {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.player__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 2px;
  flex-wrap: wrap;
}
.player__server {
  display: flex;
  align-items: center;
  gap: 10px;
}
.player__server-pick {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  min-width: 220px;
  transition: background 120ms;
}
.player__server-pick:hover { background: var(--surface-2); }
.player__server-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), oklch(0.5 0.22 350));
  color: white;
  font-weight: 700;
  font-size: 11px;
  flex: 0 0 auto;
}
.player__server-name { font-weight: 600; font-size: 13.5px; text-align: left; }
.player__server-meta { font-size: 11px; color: var(--text-3); text-align: left; }
.player__server-chevron { margin-left: auto; color: var(--text-3); transition: transform 160ms; }
.player__server-pick[aria-expanded="true"] .player__server-chevron { transform: rotate(180deg); }

/* Live dot */
.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.live-dot::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 99px;
  background: var(--accent);
  animation: pulse 1.6s ease-out infinite;
}

/* Server dropdown menu */
.menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  padding: 6px;
  z-index: 30;
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: pop 140ms ease;
}
.menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13px;
  cursor: pointer;
  transition: background 120ms;
  width: 100%;
  text-align: left;
}
.menu__item:hover { background: var(--surface-2); }
.menu__item.is-active { background: var(--accent-soft); color: var(--accent-h); }
.menu__item-icon {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--surface-3);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  color: white;
  flex: 0 0 auto;
}

/* Now playing hero card */
.np {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  padding: 28px;
  background: linear-gradient(180deg, oklch(1 0 0 / 0.03), oklch(0 0 0 / 0.2)), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
}
.np--idle {
  grid-template-columns: 1fr;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-3);
}
.np__cover {
  width: 240px; height: 240px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, oklch(0.65 0.18 28), oklch(0.42 0.18 5), oklch(0.30 0.14 320));
  background-size: cover;
  background-position: center;
  position: relative;
  box-shadow: 0 24px 60px -20px oklch(0 0 0 / 0.6), 0 0 0 1px oklch(1 0 0 / 0.05) inset;
  flex-shrink: 0;
}
.np__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--r-md);
  background: linear-gradient(180deg, transparent 60%, oklch(0 0 0 / 0.45));
}
.np__cover-blur {
  position: absolute;
  inset: 16px;
  border-radius: var(--r-md);
  z-index: -1;
  filter: blur(40px) saturate(1.4);
  opacity: 0.8;
  transform: translateY(20px) scale(1.05);
  background: inherit;
}
.np__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  justify-content: space-between;
}
.np__source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.np__title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.05;
  margin: 10px 0 6px;
  letter-spacing: -0.01em;
  text-wrap: balance;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.np__title a { color: inherit; }
.np__title a:hover { color: var(--accent); }
.np__artist {
  font-size: 15px;
  color: var(--text-2);
  font-weight: 500;
}
.np__requested {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.np__requested-av {
  width: 18px; height: 18px;
  border-radius: 99px;
  background: linear-gradient(135deg, oklch(0.7 0.16 280), oklch(0.6 0.22 15));
  display: grid; place-items: center;
  font-size: 9px;
  font-weight: 700;
  color: white;
}

/* EQ visualizer */
.eq {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 24px;
  margin-top: 14px;
}
.eq__bar {
  width: 3px;
  background: linear-gradient(180deg, var(--accent), oklch(0.5 0.18 320));
  border-radius: 2px;
  animation: eq 0.9s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes eq {
  0%, 100% { height: 20%; }
  50%      { height: 100%; }
}

/* Progress + transport */
.transport {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.progress {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
}
.progress__bar {
  position: relative;
  height: 6px;
  flex: 1;
  background: var(--surface-3);
  border-radius: 99px;
  cursor: pointer;
  overflow: visible;
}
.progress__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), oklch(0.65 0.22 350));
  border-radius: 99px;
  box-shadow: 0 0 8px var(--accent-glow);
  transition: width 0.9s linear;
}
.progress__head {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 12px; height: 12px;
  background: white;
  border-radius: 99px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px oklch(1 0 0 / 0.1), 0 2px 4px oklch(0 0 0 / 0.4);
  pointer-events: none;
}

.controls {
  display: flex;
  align-items: center;
  gap: 4px;
}
.controls__btn {
  width: 38px; height: 38px;
  border-radius: 99px;
  display: grid; place-items: center;
  color: var(--text-2);
  transition: background 120ms, color 120ms;
  flex-shrink: 0;
}
.controls__btn:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.controls__btn--play {
  width: 52px; height: 52px;
  background: var(--accent);
  color: white;
  margin: 0 6px;
  box-shadow: 0 8px 20px -6px var(--accent-glow);
}
.controls__btn--play:hover:not(:disabled) { background: var(--accent-h); }
.controls__btn.is-active { color: var(--accent); }
.controls__btn:disabled { opacity: 0.35; cursor: not-allowed; }
.controls__stop { margin-left: auto; color: var(--danger); }
.controls__stop:hover:not(:disabled) { background: oklch(0.65 0.22 25 / 0.12) !important; color: var(--danger) !important; }

.volume {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
}
.volume__slider {
  position: relative;
  height: 4px;
  flex: 1;
  background: var(--surface-3);
  border-radius: 99px;
  cursor: pointer;
}
.volume__fill {
  position: absolute; inset: 0 auto 0 0;
  background: var(--text-2);
  border-radius: 99px;
}
.volume__head {
  position: absolute;
  top: 50%;
  width: 10px; height: 10px;
  background: white;
  border-radius: 99px;
  transform: translate(-50%, -50%);
}
.volume__num { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); min-width: 32px; text-align: right; }

/* Tabs (queue / lyrics) */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  width: max-content;
}
.tabs__t {
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 7px;
  color: var(--text-3);
  transition: background 120ms, color 120ms;
}
.tabs__t.is-active {
  background: var(--surface-2);
  color: var(--text);
}

/* Queue list */
.queue {
  display: flex;
  flex-direction: column;
  max-height: 340px;
  overflow-y: auto;
}
.qitem {
  display: grid;
  grid-template-columns: 24px 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 16px;
  transition: background 120ms;
}
.qitem:hover { background: var(--surface-2); }
.qitem__n { font-family: var(--font-mono); font-size: 11px; color: var(--text-4); }
.qitem__cover {
  width: 36px; height: 36px;
  border-radius: 6px;
  background: var(--surface-3);
  background-size: cover;
  background-position: center;
  flex: 0 0 auto;
}
.qitem__info { min-width: 0; }
.qitem__title {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qitem__artist {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qitem__time { font-family: var(--font-mono); font-size: 11px; color: var(--text-4); }

/* Side panel */
.sidepanel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.listeners {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 10px 16px 14px;
  flex-wrap: wrap;
}
.lis-av {
  width: 28px; height: 28px;
  border-radius: 99px;
  background: var(--surface-3);
  border: 2px solid var(--surface);
  display: grid; place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  margin-left: -6px;
}
.lis-av:first-child { margin-left: 0; }

/* Session card in side panel */
.session-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  background: var(--bg-2);
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: background 120ms, border-color 120ms;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.session-card.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.session-card__icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  color: white;
  flex: 0 0 auto;
}

/* Ctrl message */
#ctrl-msg {
  font-size: 13px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: var(--r);
  display: none;
}
#ctrl-msg.is-error { background: oklch(0.65 0.22 25 / 0.12); color: var(--danger); }
#ctrl-msg.is-ok { background: oklch(0.74 0.16 155 / 0.12); color: var(--ok); }

/* ── Queue row interactive controls ─────────────────────────────────────────── */

.qitem { position: relative; }

/* Grip handle — hides the number on hover and shows the drag icon */
.qitem__grip { display: none; cursor: grab; color: var(--text-4); flex-shrink: 0; }
.qitem:hover .qitem__grip { display: flex; }
.qitem:hover .qitem__n-num { display: none; }
.qitem__n { display: flex; align-items: center; justify-content: center; }

/* Trailing action cluster — fades in on row hover */
.qitem__acts {
  display: flex; gap: 2px; align-items: center;
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, var(--surface-2) 28px);
  padding-left: 28px;
  opacity: 0; transition: opacity 100ms;
}
.qitem:hover .qitem__acts { opacity: 1; }
.qitem__act {
  width: 26px; height: 26px;
  border-radius: 6px;
  display: grid; place-items: center;
  color: var(--text-3);
  transition: background 100ms, color 100ms;
  flex-shrink: 0;
}
.qitem__act:hover { background: var(--surface-3); color: var(--text); }
.qitem__act--danger:hover { background: oklch(0.65 0.22 25 / 0.14); color: var(--danger); }

/* Drag-and-drop visual states */
.qitem--dragging { opacity: 0.35; }
.qitem--drag-over { box-shadow: inset 0 -2px 0 var(--accent); }

/* ── Kebab dropdown ──────────────────────────────────────────────────────────── */
.qkebab {
  position: fixed;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  padding: 5px;
  min-width: 178px;
  box-shadow: var(--shadow-2);
  z-index: 500;
  animation: pop 130ms cubic-bezier(.2,.8,.2,1);
}
.qkebab__item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px;
  font-size: 12.5px; color: var(--text-2);
  border-radius: 7px;
  transition: background 100ms, color 100ms;
  width: 100%; text-align: left;
}
.qkebab__item:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.qkebab__item:disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
.qkebab__item--danger { color: oklch(0.65 0.22 25); }
.qkebab__item--danger:hover:not(:disabled) { background: oklch(0.65 0.22 25 / 0.12); color: oklch(0.65 0.22 25); }
.qkebab__sep { height: 1px; background: var(--border); margin: 4px 0; }

/* ── Search / command-palette overlay ──────────────────────────────────────── */
.qpalette {
  position: fixed; inset: 0;
  display: flex; flex-direction: column; align-items: center;
  padding-top: 12vh;
  z-index: 400;
}
.qpalette__bd {
  position: fixed; inset: 0;
  background: oklch(0 0 0 / 0.55);
  backdrop-filter: blur(6px);
}
.qpalette__box {
  position: relative; z-index: 1;
  width: 100%; max-width: 600px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  animation: pop 160ms cubic-bezier(.2,.8,.2,1);
}
.qpalette__top {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.qpalette__inp {
  flex: 1; background: none; border: none; outline: none;
  font-size: 15px; color: var(--text);
}
.qpalette__inp::placeholder { color: var(--text-4); }
.qpalette__esc {
  font-size: 10px; padding: 2px 6px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 5px; color: var(--text-4);
  font-family: var(--font-mono); flex-shrink: 0;
}
.qpalette__chips {
  display: flex; gap: 4px; padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.qpalette__chip {
  padding: 4px 11px; font-size: 12px; font-weight: 600;
  border-radius: 99px; color: var(--text-3);
  border: 1px solid transparent;
  transition: background 100ms, color 100ms;
}
.qpalette__chip:hover { color: var(--text); background: var(--surface-2); }
.qpalette__chip.is-active { background: var(--accent-soft); color: var(--accent-h); border-color: oklch(0.66 0.22 18 / 0.3); }
.qpalette__results { max-height: 380px; overflow-y: auto; }
.qpalette__empty {
  padding: 36px; text-align: center; color: var(--text-4); font-size: 13px;
}
.qpalette__row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  cursor: pointer; transition: background 100ms;
  position: relative;
}
.qpalette__row:hover, .qpalette__row.is-sel { background: var(--surface-2); }
.qpalette__row-cover {
  width: 44px; height: 44px; border-radius: 6px; flex-shrink: 0;
  background: var(--surface-3); background-size: cover; background-position: center;
}
.qpalette__row-info { flex: 1; min-width: 0; }
.qpalette__row-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qpalette__row-meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.qpalette__row-dur { font-family: var(--font-mono); font-size: 11px; color: var(--text-4); }
.src-badge {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em;
  padding: 2px 6px; border-radius: 99px; text-transform: uppercase; flex-shrink: 0;
}
.src-badge--youtube    { background: oklch(0.6 0.22 25 / 0.14); color: oklch(0.72 0.2 25); }
.src-badge--spotify    { background: oklch(0.7 0.17 150 / 0.14); color: oklch(0.75 0.15 150); }
.src-badge--soundcloud { background: oklch(0.7 0.17 55 / 0.14);  color: oklch(0.78 0.15 55); }
.qpalette__row-acts {
  display: flex; gap: 4px; flex-shrink: 0;
  opacity: 0; transition: opacity 100ms;
}
.qpalette__row:hover .qpalette__row-acts,
.qpalette__row.is-sel .qpalette__row-acts { opacity: 1; }

/* Skeleton loader rows */
.qpalette__skel {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  animation: qskel 1.3s ease-in-out infinite;
}
@keyframes qskel { 0%,100% { opacity: 0.5; } 50% { opacity: 0.22; } }
.qpalette__skel-cover { width: 44px; height: 44px; border-radius: 6px; background: var(--surface-3); flex-shrink: 0; }
.qpalette__skel-lines { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.qpalette__skel-line { height: 11px; border-radius: 4px; background: var(--surface-3); }

/* URL confirm card */
.qpalette__url-card {
  margin: 12px 14px 14px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  display: flex; flex-direction: column; gap: 10px;
}
.qpalette__url-lbl { font-size: 10.5px; font-weight: 700; color: var(--text-3); letter-spacing: 0.08em; text-transform: uppercase; }
.qpalette__url-val { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2); word-break: break-all; }
.qpalette__url-acts { display: flex; gap: 8px; }

/* ── Undo toast ──────────────────────────────────────────────────────────────── */
#qtoast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--r);
  padding: 10px 14px;
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: var(--text);
  box-shadow: var(--shadow-2);
  z-index: 600;
  white-space: nowrap;
  animation: slideup 200ms ease;
}
#qtoast .qtoast__undo {
  font-size: 12px; font-weight: 700; color: var(--accent-h);
  padding: 3px 9px; border-radius: 6px;
  background: var(--accent-soft);
  transition: background 100ms; flex-shrink: 0;
}
#qtoast .qtoast__undo:hover { background: oklch(0.66 0.22 18 / 0.25); }
#qtoast .qtoast__close {
  color: var(--text-4); width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 4px; transition: color 100ms;
}
#qtoast .qtoast__close:hover { color: var(--text); }

/* ============================================================
   Pagination
   ============================================================ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}
.page-btn {
  min-width: 34px; height: 34px;
  padding: 0 10px;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background 120ms, color 120ms;
}
.page-btn:hover { background: var(--surface-2); color: var(--text); }
.page-btn.is-active {
  background: var(--accent-soft);
  color: var(--accent-h);
  border-color: var(--accent);
}
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
