/* ═══════════════════════════════════════════════════════════════
   Playloudr · product chrome v3
   Navy full-colour anchored sidebar · indigo→periwinkle accent
   Revised type system — modern, confident, professional (not cutesy):
   Space Grotesk (display/logo) + Geist (UI/text) + JetBrains Mono
   (data). Typeface pairing is swappable via the Tweaks panel.
   ═══════════════════════════════════════════════════════════════ */
:root {
  /* ── Accent: clean blue (selected default) ── */
  --blue-700:  #2059A1;
  --blue-600:  #276DC6;
  --blue-500:  #2D7FE6;   /* primary */
  --blue-400:  #5B9BEC;
  --blue-300:  #85B5F1;   /* highlight */
  --blue-grad: linear-gradient(135deg, #2D7FE6 0%, #85B5F1 100%);
  --blue-soft: rgba(45,127,230,0.10);
  --blue-tint: #ECF3FD;

  /* warm secondary — used ONLY in album-art + pulse moments for lift */
  --warm:      #FF9A52;
  --warm-2:    #FF6FA0;

  /* ── Sidebar theme (swappable via Tweaks) ── */
  --navy-grad: linear-gradient(185deg, #103658 0%, #0C2742 46%, #07182C 100%);
  --navy-line: rgba(255,255,255,0.09);
  --side-glow-1: rgba(77,150,236,0.24);
  --side-glow-2: rgba(133,181,241,0.10);

  /* ── Cool neutrals (anchored off-white, not airy) ── */
  --ink:       #11142B;
  --ink-2:     #2A2F4A;
  --ink-3:     #474D6B;
  --gray-500:  #6B7191;
  --gray-400:  #9197B6;
  --gray-300:  #C5C9DE;
  --gray-200:  #DFE2F0;
  --gray-100:  #ECEEF7;
  --gray-50:   #F4F5FB;
  --line:      #E4E7F4;
  --bg:        #EFF1F9;

  --green:      #14935A;
  --green-soft: #E1F5EA;
  --green-text: #0E6B41;

  /* type — swappable via Tweaks (defaults set here) */
  --display: "Geist", system-ui, -apple-system, sans-serif;
  --ui:      "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, monospace;

  --r-sm: 9px;
  --r-md: 13px;
  --r-lg: 18px;
  --r-full: 999px;

  --sh-card: 0 1px 2px rgba(17,20,43,.04), 0 4px 16px rgba(17,20,43,.05);
  --sh-blue: 0 6px 18px rgba(45,127,230,.32);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--ui);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.006em;
}
a { color: inherit; }
button { font: inherit; cursor: pointer; }

/* ───── App layout ───── */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 248px; flex-shrink: 0;
  background: var(--navy-grad);
  color: #fff;
  padding: 20px 14px 16px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  align-self: flex-start;
  isolation: isolate;
}
/* subtle grain + glow for richness */
.sidebar::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(420px 280px at 18% -6%, var(--side-glow-1), transparent 70%),
    radial-gradient(360px 300px at 110% 108%, var(--side-glow-2), transparent 70%);
}
.sidebar::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.05) .8px, transparent .8px);
  background-size: 3px 3px; opacity: .5;
}

.main {
  flex: 1; min-width: 0;
  padding: 30px 40px 64px;
}

/* ───── Logo lockup (filled by JS) ───── */
.logo-lockup {
  display: inline-flex; align-items: center; gap: 11px;
  padding: 6px 8px 4px; margin-bottom: 8px;
  text-decoration: none; min-height: 40px;
}
.logo-word {
  font-family: var(--display);
  font-weight: 700; font-size: 22px;
  letter-spacing: -0.035em; color: #fff;
  line-height: 1;
}
.logo-word .dot { color: var(--blue-300); }

/* logo "wave" mark — bars ascend; climb plays twice on load, then settles full */
.lg-wave-bar {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: lgWaveClimb 1.05s cubic-bezier(.4,0,.3,1) 2 both;
}
.lg-wave-bar.b2 { animation-delay: .12s; }
.lg-wave-bar.b3 { animation-delay: .24s; }
.lg-wave-bar.b4 { animation-delay: .36s; }
@keyframes lgWaveClimb {
  0%   { transform: scaleY(.5);  }
  55%  { transform: scaleY(1);   }
  78%  { transform: scaleY(.86); }
  100% { transform: scaleY(1);   }
}
@media (prefers-reduced-motion: reduce){ .lg-wave-bar{ animation: none; } }
.sidebar-collapse {
  margin-left: auto;
  width: 26px; height: 26px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5); background: rgba(255,255,255,.05);
  border: 1px solid var(--navy-line);
}
.sidebar-collapse:hover { color: #fff; background: rgba(255,255,255,.1); }

.sidebar-head {
  display: flex; align-items: center;
  padding-bottom: 16px; margin-bottom: 14px;
  border-bottom: 1px solid var(--navy-line);
}

/* ───── Nav ───── */
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-family: var(--ui);
  font-size: 14px; font-weight: 500;
  color: rgba(255,255,255,.74);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: background .12s, color .12s;
}
.nav a svg { flex-shrink: 0; opacity: .85; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.active {
  background: var(--blue-grad);
  color: #fff; font-weight: 600;
  box-shadow: var(--sh-blue);
}
.nav a.active svg { opacity: 1; }
.nav-divider { height: 1px; background: var(--navy-line); margin: 14px 6px; }

/* ───── Sidebar bottom ───── */
.sidebar-bottom {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 8px;
  padding-top: 14px;
}
.now-playing {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 12px; margin-bottom: 2px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--navy-line);
}
.now-playing .np-label {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.55);
}
.now-playing .np-track {
  font-size: 12px; font-weight: 600; color: #fff;
  letter-spacing: -0.01em; flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.eq { display: inline-flex; align-items: flex-end; gap: 2.5px; height: 16px; }
.eq i {
  width: 3px; border-radius: 2px; background: var(--blue-300);
  transform-origin: bottom;
  animation: eqClimb 1.15s cubic-bezier(.4,0,.3,1) infinite;
}
/* ascending staircase = "stats going up"; a shimmer climbs across it */
.eq i:nth-child(1){ height: 7px;  animation-delay: 0s;    }
.eq i:nth-child(2){ height: 10px; animation-delay: .13s; background: #fff; }
.eq i:nth-child(3){ height: 13px; animation-delay: .26s; }
.eq i:nth-child(4){ height: 16px; animation-delay: .39s; background: #fff; }
/* energetic rise, gentle settle — never collapses to a sad baseline */
@keyframes eqClimb {
  0%   { transform: scaleY(.78); }
  35%  { transform: scaleY(1);   }
  100% { transform: scaleY(.78); }
}
@media (prefers-reduced-motion: reduce){ .eq i{ animation: none; transform: scaleY(1);} }

.artist-switcher {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: var(--r-md);
  background: rgba(255,255,255,.06);
  border: 1px solid var(--navy-line);
  cursor: pointer; transition: background .12s;
}
.artist-switcher:hover { background: rgba(255,255,255,.1); }
.artist-cover {
  width: 38px; height: 38px; border-radius: 9px; flex-shrink: 0;
  background:
    radial-gradient(circle at 65% 30%, var(--blue-300) 0%, transparent 50%),
    linear-gradient(150deg, var(--blue-500) 0%, var(--warm-2) 130%);
}
.artist-label {
  font-family: var(--mono);
  font-size: 9.5px; font-weight: 600; color: rgba(255,255,255,.5);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.artist-name {
  font-size: 13.5px; font-weight: 700; letter-spacing: -0.01em; color: #fff;
  display: flex; align-items: center; gap: 5px; margin-top: 1px;
}
.chevrons { color: rgba(255,255,255,.4); font-size: 11px; }
.admin-row {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 10px;
}
.admin-avatar {
  width: 28px; height: 28px; border-radius: 999px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue-400), var(--warm));
}
.admin-name { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.85); }
.version {
  font-family: var(--mono); font-size: 10px;
  color: rgba(255,255,255,.32);
  padding: 6px 10px 0;
}

/* ───── Page header ───── */
.page-head { margin-bottom: 0; }
.page-title {
  font-family: var(--display);
  font-size: 30px; font-weight: 700; letter-spacing: -0.022em;
  margin: 0 0 6px; line-height: 1.08; color: var(--ink);
}
.page-sub {
  font-size: 14.5px; color: var(--gray-500); margin: 0;
  line-height: 1.5; max-width: 56ch;
}
.fp-page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 26px; gap: 24px;
}
.fp-preview-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: var(--r-full);
  border: 1px solid var(--gray-200); background: #fff;
  font-family: var(--ui); font-weight: 600; font-size: 14px; color: var(--ink);
  box-shadow: var(--sh-card);
}
.fp-preview-btn:hover { border-color: var(--gray-300); background: var(--gray-50); }

/* ───── Section cards ───── */
.fp-section {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 26px 28px;
  margin-bottom: 18px; box-shadow: var(--sh-card);
}
.fp-section-head {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 20px;
}
.fp-section-icon {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue-tint); color: var(--blue-600);
}
.fp-section-head .txt { flex: 1; }
.fp-section-head h2 {
  font-family: var(--display);
  font-size: 19px; font-weight: 700; letter-spacing: -0.018em;
  margin: 0 0 4px; line-height: 1.1;
}
.fp-section-head p {
  font-size: 13.5px; color: var(--gray-500); margin: 0; line-height: 1.5;
}

/* ───── Form ───── */
.fp-field { margin-bottom: 16px; }
.fp-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.fp-field-row.solo { grid-template-columns: 2fr 1fr; align-items: end; }
.fp-field-row:last-child { margin-bottom: 0; }

.fp-label {
  font-family: var(--ui);
  font-size: 11px; font-weight: 700; color: var(--gray-500);
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 7px; display: block;
}
.fp-input {
  width: 100%; height: 44px; padding: 0 14px;
  border: 1px solid var(--gray-200); border-radius: var(--r-sm);
  background: #fff; font: 14px/1 var(--ui); color: var(--ink);
  letter-spacing: -0.006em; transition: border-color .12s, box-shadow .12s;
}
.fp-input::placeholder { color: var(--gray-400); }
.fp-input:focus {
  outline: none; border-color: var(--blue-500);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.fp-textarea {
  width: 100%; min-height: 150px; padding: 14px;
  border: 1px solid var(--gray-200); border-radius: var(--r-md);
  background: #fff; font: 14px/1.6 var(--ui); color: var(--ink);
  letter-spacing: -0.006em; resize: vertical;
}
.fp-textarea:focus {
  outline: none; border-color: var(--blue-500);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.fp-counter {
  font-family: var(--mono); font-size: 11.5px; color: var(--gray-400);
  margin-top: 9px;
}
.fp-section-footer {
  display: flex; justify-content: flex-end; margin-top: 18px;
  padding-top: 18px; border-top: 1px solid var(--line);
}

/* ───── Buttons ───── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px;
  border-radius: var(--r-full);
  font-family: var(--ui); font-weight: 600; font-size: 14px;
  letter-spacing: -0.006em; white-space: nowrap;
  border: 1px solid transparent; background: transparent;
  transition: filter .12s, background .12s, border-color .12s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--blue-grad); color: #fff;
  box-shadow: var(--sh-blue);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--gray-200); }
.btn-outline:hover { background: var(--gray-50); border-color: var(--gray-300); }
.btn-accent-outline {
  background: var(--blue-tint); color: var(--blue-600);
  border-color: transparent;
}
.btn-accent-outline:hover { background: #E3E7FE; }
