/* ═══════════════════════════════════════════════
   BandApp — Style Sheet
   Dark industrial / stage monitor aesthetic
   ═══════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────── */
:root {
  --bg:      #080808;
  --s1:      #0f0f0f;
  --s2:      #161616;
  --s3:      #1d1d1d;
  --bdr:     #222222;
  --bdr-l:   #2e2e2e;

  --accent:  #ff5500;
  --acc-bg:  rgba(255,85,0,.10);
  --acc-bdr: rgba(255,85,0,.30);

  --t1:  #f0ede7;
  --t2:  #888380;
  --t3:  #434040;

  --green: #4ade80;
  --blue:  #60a5fa;
  --red:   #f87171;
  --amber: #fbbf24;

  --font-d: 'Bebas Neue', cursive;
  --font-s: 'IBM Plex Sans', sans-serif;
  --font-m: 'IBM Plex Mono', monospace;

  --radius:  9px;
  --radius-l: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ── Reset ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  background: var(--bg);
  color: var(--t1);
  font-family: var(--font-s);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select {
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-thumb { background: var(--bdr-l); border-radius: 2px; }
select option { background: var(--s2); }
::placeholder { color: var(--t3); }

/* ══════════════════════════════════════════════
   LAYOUT — Mobile first, desktop sidebar
   ══════════════════════════════════════════════ */

/* ── Mobile base ────────────────────────────── */
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
#content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: calc(66px + var(--safe-b));
}

/* ── Page Header ────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--s1);
  border-bottom: 1px solid var(--bdr);
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 56px;
}
.page-title {
  font-family: var(--font-d);
  font-size: 24px;
  letter-spacing: 0.04em;
  line-height: 1;
}
.page-back {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--t2);
  font-size: 13px;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.page-back::before { content: '←'; font-size: 16px; }

/* ── Bottom Nav (mobile) ─────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: var(--s1);
  border-top: 1px solid var(--bdr);
  padding-bottom: var(--safe-b);
  z-index: 20;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 0 12px;
  color: var(--t3);
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}
.nav-item.active, .nav-item:active { color: var(--accent); }
.nav-icon  { font-size: 22px; line-height: 1; }
.nav-label { font-size: 10px; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; }

/* ══════════════════════════════════════════════
   DESKTOP layout (>= 768px)
   Sidebar left + content right, full window
   ══════════════════════════════════════════════ */
@media (min-width: 768px) {
  body { overflow: hidden; height: 100vh; }

  #app {
    flex-direction: row;
    height: 100vh;
    overflow: hidden;
  }

  /* Sidebar */
  .bottom-nav {
    position: static;
    flex-direction: column;
    width: 220px;
    min-width: 220px;
    max-width: 220px;
    height: 100vh;
    border-top: none;
    border-right: 1px solid var(--bdr);
    padding-bottom: 0;
    justify-content: flex-start;
    background: var(--s1);
    overflow-y: auto;
    flex-shrink: 0;
    gap: 0;
  }

  /* Brand in sidebar */
  .bottom-nav::before {
    content: 'BandApp';
    display: block;
    font-family: var(--font-d);
    font-size: 20px;
    letter-spacing: 0.14em;
    color: var(--accent);
    padding: 22px 20px 18px;
    border-bottom: 1px solid var(--bdr);
    width: 100%;
    flex-shrink: 0;
  }

  .nav-item {
    flex: none;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 13px 20px;
    width: 100%;
    border-left: 3px solid transparent;
    transition: color .15s, background .15s, border-color .15s;
  }
  .nav-item.active {
    color: var(--accent);
    background: var(--acc-bg);
    border-left-color: var(--accent);
  }
  .nav-item:hover:not(.active) {
    background: var(--s2);
    color: var(--t1);
  }
  .nav-icon  { font-size: 18px; }
  .nav-label {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: none;
  }

  /* Sidebar footer */
  .nav-footer {
    margin-top: auto;
    border-top: 1px solid var(--bdr);
    padding: 10px 0;
  }
  .nav-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    font-size: 12px;
    color: var(--t3);
    transition: color .15s;
    text-decoration: none;
  }
  .nav-footer a:hover { color: var(--t1); }
  .nav-footer .band-slug {
    padding: 10px 20px 4px;
    font-size: 10px;
    color: var(--t3);
    font-family: var(--font-m);
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  /* Content area */
  #content {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    padding-bottom: 0;
    min-width: 0;
  }

  /* Page header */
  .page-header {
    padding: 16px 28px;
    min-height: 62px;
  }
  .page-title { font-size: 28px; }

  /* Content spacing */
  .list-wrap     { padding: 20px 28px; }
  .detail-hero   { padding: 22px 28px 18px; }
  .detail-body   { padding: 20px 28px; }
  .audio-section { padding: 0 28px 24px; }
  .section-pad   { padding: 18px 28px; }

  /* Dashboard */
  .dash-grid {
    grid-template-columns: repeat(4, 1fr);
    padding: 20px 28px;
    gap: 14px;
  }
  .dash-next  { margin: 20px 28px 0; }
  .dash-stat-num { font-size: 52px; }

  /* Cards */
  .card { padding: 15px 18px; }

  /* Modal — centred overlay */
  .modal-bg {
    align-items: center;
    justify-content: center;
    padding: 20px;
  }
  .modal-sheet {
    border-radius: var(--radius-l);
    border: 1px solid var(--bdr);
    max-width: 560px;
    width: 100%;
    max-height: 86vh;
    padding: 24px 26px 28px;
    animation: fadeIn .18s ease;
  }

  /* Pick list */
  .pick-list { max-height: 60vh; }

  /* Forms */
  .field textarea { min-height: 220px; }

  /* Auth */
  .auth-wrap { padding: 40px 20px; }
  .auth-card { max-width: 420px; padding: 30px; }

  /* Stage overlay full screen */
  #stage-overlay { max-width: 100%; }
}

/* ── Btn ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-s);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.01em;
  transition: opacity .12s, background .12s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { opacity: 0.7; }
.btn-ghost  { background: var(--s2); color: var(--t2); padding: 8px 14px; border: 1px solid var(--bdr); }
.btn-accent { background: var(--accent); color: #fff; padding: 10px 20px; font-weight: 600; }
.btn-danger { background: transparent; color: var(--red); padding: 8px 12px; border: 1px solid rgba(248,113,113,.2); }
.btn-icon   { background: var(--s2); color: var(--t2); width: 36px; height: 36px; border-radius: var(--radius); border: 1px solid var(--bdr); padding: 0; font-size: 15px; flex-shrink: 0; }
.btn-fab    { background: var(--accent); color: #fff; width: 38px; height: 38px; border-radius: 10px; padding: 0; font-size: 24px; font-weight: 300; flex-shrink: 0; border: none; }
.btn-stage  { background: var(--accent); color: #fff; padding: 12px 22px; font-weight: 700; font-size: 15px; border-radius: var(--radius); letter-spacing: 0.04em; }
.btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── Card ────────────────────────────────────── */
.card {
  background: var(--s1);
  border: 1px solid var(--bdr);
  border-radius: var(--radius);
  padding: 13px 15px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.card:active, .card:hover { border-color: var(--bdr-l); background: var(--s2); }
.card-title  { font-size: 15px; font-weight: 600; color: var(--t1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-sub    { font-size: 12px; color: var(--t3); margin-top: 2px; }
.card-row    { display: flex; align-items: center; gap: 10px; }
.card-badges { display: flex; gap: 5px; flex-shrink: 0; flex-wrap: wrap; }

/* ── Badge ───────────────────────────────────── */
.badge {
  font-family: var(--font-m);
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
.badge-accent { color: var(--accent); background: var(--acc-bg); }
.badge-blue   { color: var(--blue);   background: rgba(96,165,250,.10); }
.badge-green  { color: var(--green);  background: rgba(74,222,128,.10); }
.badge-amber  { color: var(--amber);  background: rgba(251,191,36,.10); }
.badge-muted  { color: var(--t3);     background: rgba(255,255,255,.04); }

/* ── List Page ───────────────────────────────── */
.list-wrap { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.list-section-label {
  font-size: 10px;
  color: var(--t3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 6px;
  margin-top: 4px;
}
.empty-state {
  text-align: center;
  color: var(--t3);
  font-size: 14px;
  line-height: 2.4;
  padding: 60px 20px;
}
.empty-state strong { color: var(--accent); font-weight: 600; }

/* ── Detail Page ─────────────────────────────── */
.detail-hero {
  padding: 18px 16px 16px;
  background: var(--s1);
  border-bottom: 1px solid var(--bdr);
}
.detail-title {
  font-family: var(--font-d);
  font-size: 36px;
  letter-spacing: 0.03em;
  line-height: 1.05;
}
.detail-meta {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.detail-sub  { font-size: 13px; color: var(--t3); margin-top: 5px; }
.detail-body { padding: 16px; }
.detail-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

/* ── Lyrics / Chords ──────────────────────────── */
.lyrics {
  font-family: var(--font-m);
  font-size: 14px;
  line-height: 1.9;
  color: var(--t1);
  white-space: pre-wrap;
  word-break: break-word;
  tab-size: 4;
}
.lyrics-placeholder {
  font-size: 14px;
  color: var(--t3);
  font-style: italic;
}

/* ── Setlist Song Row ────────────────────────── */
.set-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.set-row-num {
  font-family: var(--font-m);
  font-size: 11px;
  color: var(--t3);
  width: 22px;
  text-align: right;
  flex-shrink: 0;
}
.set-row-move {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
}
.set-row-move button {
  background: var(--s2);
  border: 1px solid var(--bdr);
  color: var(--t3);
  border-radius: 5px;
  width: 28px;
  height: 24px;
  cursor: pointer;
  font-size: 9px;
  line-height: 1;
  transition: opacity .12s;
}
.set-row-move button:disabled { opacity: 0.2; cursor: default; }
.set-row-del {
  background: none;
  border: none;
  color: var(--t3);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 0 2px;
  flex-shrink: 0;
  transition: color .12s;
}
.set-row-del:hover { color: var(--red); }

/* ── Form ────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label {
  font-size: 11px;
  color: var(--t3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--s3);
  border: 1px solid var(--bdr);
  border-radius: var(--radius);
  color: var(--t1);
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.5;
  outline: none;
  transition: border-color .15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--accent); }
.field textarea {
  font-family: var(--font-m);
  font-size: 13px;
  line-height: 1.75;
  resize: vertical;
  min-height: 180px;
}
.field-row { display: grid; gap: 10px; }
.field-row-2 { grid-template-columns: 1fr 1fr; }

/* ── Modal / Sheet ───────────────────────────── */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  z-index: 50;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  animation: fadeIn .15s ease;
}
.modal-bg.hidden { display: none; }
.modal-sheet {
  background: var(--s1);
  border-radius: var(--radius-l) var(--radius-l) 0 0;
  padding: 20px 16px calc(28px + var(--safe-b));
  max-height: 92vh;
  overflow-y: auto;
  animation: slideUp .2s ease;
  border: 1px solid var(--bdr);
  border-bottom: none;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.modal-title {
  font-family: var(--font-d);
  font-size: 26px;
  letter-spacing: 0.03em;
}
.form-body { display: flex; flex-direction: column; gap: 14px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }

/* ── Pick Songs Modal ────────────────────────── */
.pick-list { display: flex; flex-direction: column; gap: 7px; max-height: 55vh; overflow-y: auto; margin-bottom: 16px; }
.pick-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  background: var(--s2);
  border: 1px solid var(--bdr);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .14s;
  -webkit-tap-highlight-color: transparent;
}
.pick-item.selected {
  background: var(--acc-bg);
  border-color: var(--accent);
}
.pick-checkbox {
  width: 20px; height: 20px;
  border-radius: 5px;
  border: 2px solid var(--t3);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #fff;
  flex-shrink: 0;
  transition: all .14s;
}
.pick-item.selected .pick-checkbox { background: var(--accent); border-color: var(--accent); }
.pick-info { flex: 1; min-width: 0; }
.pick-name { font-size: 14px; color: var(--t2); font-weight: 400; }
.pick-item.selected .pick-name { color: var(--t1); font-weight: 600; }
.pick-meta { font-size: 11px; color: var(--t3); margin-top: 2px; font-family: var(--font-m); }

/* ── Show Date ───────────────────────────────── */
.show-date-badge {
  display: inline-block;
  font-family: var(--font-m);
  font-size: 13px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 5px;
  margin-bottom: 8px;
}
.show-future { color: var(--green); background: rgba(74,222,128,.10); }
.show-past   { color: var(--t3);   background: rgba(255,255,255,.04); }

/* ── Inline header actions ───────────────────── */
.header-actions { display: flex; gap: 7px; align-items: center; }

/* ── Login Page ──────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: var(--bg);
}
.login-logo {
  font-family: var(--font-d);
  font-size: 52px;
  letter-spacing: 2px;
  color: var(--t1);
  text-align: center;
  line-height: 1;
}
.login-band {
  font-size: 13px;
  color: var(--t3);
  text-align: center;
  margin-bottom: 36px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.login-card {
  width: 100%;
  max-width: 340px;
  background: var(--s1);
  border: 1px solid var(--bdr);
  border-radius: var(--radius-l);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-error {
  background: rgba(248,113,113,.10);
  border: 1px solid rgba(248,113,113,.25);
  color: var(--red);
  border-radius: var(--radius);
  padding: 10px 13px;
  font-size: 13px;
}

/* ── Dashboard ───────────────────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px;
}
.dash-stat {
  background: var(--s1);
  border: 1px solid var(--bdr);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-stat-num {
  font-family: var(--font-d);
  font-size: 44px;
  line-height: 1;
  color: var(--accent);
}
.dash-stat-label {
  font-size: 12px;
  color: var(--t3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dash-next {
  margin: 0 14px 14px;
  background: var(--s1);
  border: 1px solid var(--bdr);
  border-radius: var(--radius);
  overflow: hidden;
}
.dash-next-label {
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 13px;
}
.dash-next-body { padding: 13px 15px; }
.dash-next-title { font-size: 18px; font-weight: 600; }
.dash-next-meta  { font-size: 12px; color: var(--t3); margin-top: 4px; }

/* ── Stage Mode ──────────────────────────────── */
#stage-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 100;
  display: flex;
  flex-direction: column;
}
#stage-overlay.hidden { display: none; }

.stage-topbar {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: #040404;
  border-bottom: 1px solid #111;
  gap: 10px;
  flex-shrink: 0;
}
.stage-progress-wrap { flex: 1; display: flex; gap: 4px; }
.stage-progress-dot {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: #1a1a1a;
  cursor: pointer;
  transition: background .2s;
}
.stage-progress-dot.done    { background: #333; }
.stage-progress-dot.current { background: var(--accent); }
.stage-exit {
  background: none;
  border: 1px solid #1e1e1e;
  color: #444;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font-s);
  flex-shrink: 0;
  transition: color .12s;
}
.stage-exit:active { color: var(--t2); }

.stage-hero {
  padding: 16px 16px 12px;
  background: #030303;
  border-bottom: 1px solid #111;
  flex-shrink: 0;
}
.stage-title {
  font-family: var(--font-d);
  font-size: clamp(28px, 8vw, 42px);
  letter-spacing: 0.03em;
  line-height: 1;
}
.stage-meta {
  display: flex;
  gap: 8px;
  margin-top: 9px;
  flex-wrap: wrap;
  align-items: center;
}
.stage-counter {
  font-family: var(--font-m);
  font-size: 11px;
  color: #333;
  align-self: center;
  margin-left: auto;
}

.stage-lyrics-wrap { flex: 1; overflow-y: auto; padding: 16px; -webkit-overflow-scrolling: touch; }
.stage-lyrics {
  font-family: var(--font-m);
  font-size: clamp(13px, 3.5vw, 16px);
  line-height: 1.95;
  color: #e0ddd8;
  white-space: pre-wrap;
  word-break: break-word;
}
.stage-no-lyrics { color: #2a2a2a; font-style: italic; font-size: 14px; text-align: center; padding: 40px 0; }

.stage-nav {
  display: flex;
  border-top: 1px solid #111;
  background: #030303;
  flex-shrink: 0;
  padding-bottom: var(--safe-b);
}
.stage-nav-btn {
  flex: 1;
  padding: 18px 0;
  background: none;
  border: none;
  color: #3a3a3a;
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font-s);
  letter-spacing: 0.04em;
  transition: color .15s;
}
.stage-nav-btn:not(:disabled) { color: var(--t2); }
.stage-nav-btn:disabled { cursor: default; }
.stage-nav-btn:not(:disabled):active { color: var(--t1); }
.stage-nav-sep { width: 1px; background: #111; flex-shrink: 0; }

/* ── Animations ──────────────────────────────── */
@keyframes slideUp {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Offline Banner ──────────────────────────── */
#app-status {
  position: fixed;
  top: 8px; right: 8px;
  display: flex;
  gap: 4px;
  align-items: center;
  z-index: 998;
  pointer-events: none;
}
.app-status-dot {
  display: none;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-m);
  padding: 2px 7px;
  border-radius: 20px;
  line-height: 1.5;
  letter-spacing: .04em;
}
#status-offline.visible {
  display: inline-block;
  background: rgba(0,0,0,.75);
  color: #fbbf24;
}
#status-ms.visible {
  display: inline-block;
}
#status-ms.ms-ok  { background: rgba(74,222,128,.18); color: var(--green); border: 1px solid rgba(74,222,128,.35); }
#status-ms.ms-err { background: rgba(239,68,68,.18);  color: var(--red);   border: 1px solid rgba(239,68,68,.35); }

/* ── Toasts ──────────────────────────────────── */
#toast-area {
  position: fixed;
  bottom: calc(72px + var(--safe-b));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  z-index: 200;
  pointer-events: none;
}
.toast {
  background: var(--s3);
  border: 1px solid var(--bdr-l);
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 13px;
  color: var(--t1);
  animation: slideUp .2s ease;
  text-align: center;
}
.toast.error { border-color: rgba(248,113,113,.3); color: var(--red); }
.toast.ok    { border-color: rgba(74,222,128,.3);  color: var(--green); }

/* ── Misc ────────────────────────────────────── */
.divider { height: 1px; background: var(--bdr); margin: 0 16px; }
.section-pad { padding: 14px 16px; }
.notes-text { font-size: 14px; color: var(--t2); line-height: 1.7; }
hr { border: none; border-top: 1px solid var(--bdr); margin: 14px 0; }
/* Append to style.css — Auth + Trial banner styles */

/* ── Auth pages ──────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: var(--bg);
}
.auth-logo {
  font-family: var(--font-d);
  font-size: 48px;
  letter-spacing: 2px;
  text-align: center;
  line-height: 1.1;
  margin-bottom: 4px;
}
.auth-sub {
  font-size: 13px;
  color: var(--t3);
  text-align: center;
  margin-bottom: 28px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.auth-card {
  width: 100%;
  max-width: 360px;
  background: var(--s1);
  border: 1px solid var(--bdr);
  border-radius: var(--radius-l);
  padding: 24px;
}
.auth-error {
  background: rgba(248,113,113,.10);
  border: 1px solid rgba(248,113,113,.25);
  color: var(--red);
  border-radius: var(--radius);
  padding: 10px 13px;
  font-size: 13px;
  margin-bottom: 14px;
}

/* ── Trial banner ────────────────────────────── */
.trial-banner {
  background: linear-gradient(90deg, #1a1200, #1a0d00);
  border-bottom: 1px solid rgba(255,85,0,.25);
  padding: 8px 16px;
  font-size: 12px;
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  flex-wrap: wrap;
}
.trial-banner-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}

/* ══════════════════════════════════════════════
   Mixing Station Integration
   ══════════════════════════════════════════════ */

/* Settings panel */
.ms-settings-row {
  margin-bottom: 12px;
}
.ms-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.ms-toggle-label input[type=checkbox] {
  width: 18px; height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.ms-toggle-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--t1);
}
.ms-note {
  font-size: 12px;
  color: var(--t3);
  line-height: 1.6;
  padding: 10px 13px;
  background: var(--s3);
  border-radius: var(--radius);
  border: 1px solid var(--bdr);
  margin-bottom: 12px;
}
.ms-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.ms-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ms-test-result {
  font-size: 13px;
  padding: 9px 13px;
  border-radius: var(--radius);
  margin-top: 10px;
  line-height: 1.5;
}
.ms-test-result.ok      { color: var(--green); background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.2); }
.ms-test-result.error   { color: var(--red);   background: rgba(248,113,113,.08); border: 1px solid rgba(248,113,113,.2); }
.ms-test-result.testing { color: var(--t2);    background: var(--s3); border: 1px solid var(--bdr); }

/* Song snapshot section */
.ms-snapshot-section {
  padding: 0 16px 20px;
}
.ms-snapshot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
.ms-snapshot-label {
  font-size: 10px;
  color: var(--t3);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ms-badge {
  font-size: 10px;
  background: rgba(96,165,250,.12);
  color: var(--blue);
  border: 1px solid rgba(96,165,250,.25);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: var(--font-m);
  font-weight: 600;
}
.ms-snapshot-card {
  background: var(--s2);
  border: 1px solid var(--bdr);
  border-radius: var(--radius);
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ms-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ms-select {
  flex: 1;
  background: var(--s3);
  border: 1px solid var(--bdr);
  border-radius: var(--radius);
  color: var(--t1);
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
  font-family: var(--font-s);
  transition: border-color .15s;
}
.ms-select:focus { border-color: var(--blue); }

.ms-auto-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid var(--bdr);
}
.ms-auto-label {
  font-size: 13px;
  color: var(--t2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ms-auto-sub {
  font-size: 11px;
  color: var(--t3);
}
.ms-auto-toggle {
  display: block;
  width: 42px; height: 24px;
  position: relative;
  flex-shrink: 0;
}
.ms-auto-toggle input { display: none; }
.ms-auto-toggle .track {
  position: absolute; inset: 0;
  background: var(--s3);
  border: 1px solid var(--bdr);
  border-radius: 12px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.ms-auto-toggle input:checked ~ .track {
  background: var(--accent);
  border-color: var(--accent);
}
.ms-auto-toggle .thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  pointer-events: none;
}
.ms-auto-toggle input:checked ~ .thumb { transform: translateX(18px); }

.ms-status {
  font-size: 12px;
  padding: 7px 11px;
  border-radius: 6px;
  font-family: var(--font-m);
}
.ms-status.ok    { color: var(--green); background: rgba(74,222,128,.08); }
.ms-status.error { color: var(--red);   background: rgba(248,113,113,.08); }

/* Settings page nav link indicator */
.nav-settings-badge {
  font-size: 9px;
  background: var(--blue);
  color: #fff;
  border-radius: 3px;
  padding: 1px 4px;
  font-weight: 700;
  margin-left: auto;
}

/* Stage mode snapshot flash */
.stage-ms-toast {
  position: fixed;
  top: 60px; left: 50%; transform: translateX(-50%);
  background: rgba(96,165,250,.18);
  border: 1px solid rgba(96,165,250,.4);
  color: var(--blue);
  font-family: var(--font-m);
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 8px;
  z-index: 200;
  pointer-events: none;
  animation: fadeIn .2s ease;
}

/* ══════════════════════════════════════════════
   Anagram MIDI Integration
   ══════════════════════════════════════════════ */
.anagram-section {
  padding: 0 16px 20px;
}
.anagram-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.anagram-badge {
  font-size: 10px;
  background: rgba(251,191,36,.12);
  color: var(--amber);
  border: 1px solid rgba(251,191,36,.25);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: var(--font-m);
  font-weight: 600;
}
.anagram-card {
  background: var(--s2);
  border: 1px solid var(--bdr);
  border-radius: var(--radius);
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.anagram-preset-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 8px;
  align-items: end;
}
.anagram-preset-num {
  background: var(--s3);
  border: 1px solid var(--bdr);
  border-radius: var(--radius);
  color: var(--t1);
  padding: 9px 12px;
  font-size: 22px;
  font-family: var(--font-d);
  letter-spacing: 0.04em;
  outline: none;
  width: 100%;
  text-align: center;
  transition: border-color .15s;
}
.anagram-preset-num:focus { border-color: var(--amber); }
.anagram-preset-name {
  background: var(--s3);
  border: 1px solid var(--bdr);
  border-radius: var(--radius);
  color: var(--t2);
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
  width: 100%;
  font-family: var(--font-s);
  transition: border-color .15s;
}
.anagram-preset-name:focus { border-color: var(--amber); }
.anagram-scene-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.anagram-scene-label {
  font-size: 11px;
  color: var(--t3);
  font-family: var(--font-m);
  text-transform: uppercase;
  letter-spacing: .07em;
  flex-shrink: 0;
}
.anagram-scene-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--bdr);
  background: var(--s3);
  color: var(--t3);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all .12s;
  font-family: var(--font-m);
}
.anagram-scene-btn.active {
  background: var(--amber);
  border-color: var(--amber);
  color: #000;
}
.anagram-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid var(--bdr);
  gap: 8px;
}

/* ══════════════════════════════════════════════
   Sidebar branding (replaces CSS ::before)
   ══════════════════════════════════════════════ */
.sidebar-brand {
  display: none; /* hidden on mobile */
  text-decoration: none;
  color: inherit;
}
.sidebar-brand-text {
  font-family: var(--font-d);
  font-size: 20px;
  letter-spacing: 0.14em;
  color: var(--accent);
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--bdr);
  width: 100%;
  flex-shrink: 0;
  display: none;
}
.sidebar-logo-img {
  width: 100%;
  max-width: 140px;
  height: auto;
  object-fit: contain;
  display: block;
}

@media (min-width: 768px) {
  /* Hide the CSS ::before brand since we now have a real element */
  .bottom-nav::before { display: none; content: none; }

  .sidebar-brand {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--bdr);
    width: 100%;
    flex-shrink: 0;
    transition: background .15s;
  }
  .sidebar-brand:hover { background: var(--s2); }
  .sidebar-brand-text {
    display: block;
    padding: 0;
    border-bottom: none;
  }
  .sidebar-logo-img {
    width: 100%;
    max-width: none;
    height: auto;
    max-height: 56px;
    object-fit: contain;
    object-position: center;
  }
}

/* ── Branding config page ─────────────────────── */
.brand-section {
  background: var(--s1);
  border: 1px solid var(--bdr);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}
.brand-section-title {
  font-size: 11px;
  color: var(--t3);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 12px 15px 8px;
  border-bottom: 1px solid var(--bdr);
  background: var(--s2);
}
.brand-section-body { padding: 14px 15px; }

.color-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.color-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.color-field label {
  font-size: 11px;
  color: var(--t3);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 500;
}
.color-pick-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--s3);
  border: 1px solid var(--bdr);
  border-radius: var(--radius);
  padding: 6px 10px;
  cursor: pointer;
  transition: border-color .15s;
}
.color-pick-wrap:focus-within { border-color: var(--accent); }
.color-swatch {
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 2px solid rgba(255,255,255,.1);
  flex-shrink: 0;
  cursor: pointer;
}
input[type=color] {
  opacity: 0;
  position: absolute;
  width: 0; height: 0;
}
.color-hex {
  font-family: var(--font-m);
  font-size: 13px;
  color: var(--t1);
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 0;
  cursor: text;
}

.image-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.image-preview {
  width: 56px; height: 56px;
  border-radius: 8px;
  background: var(--s3);
  border: 1px solid var(--bdr);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 22px;
}
.image-preview img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.image-upload-info { flex: 1; min-width: 0; }
.image-upload-name {
  font-size: 13px;
  color: var(--t2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.image-upload-sub { font-size: 11px; color: var(--t3); margin-top: 2px; }

.brand-preview-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  background: var(--s2);
  border-radius: var(--radius);
  margin-top: 4px;
}
.brand-preview-swatch {
  width: 22px; height: 22px;
  border-radius: 5px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   Desktop — larger fonts for tablet/desktop
   ══════════════════════════════════════════════ */
@media (min-width: 768px) {
  /* Cards */
  .card-title  { font-size: 17px; }
  .card-sub    { font-size: 13px; }

  /* Badges — bigger on tablet/desktop */
  .badge       { font-size: 13px; padding: 3px 10px; border-radius: 5px; }

  /* Detail hero */
  .detail-title { font-size: 48px; }
  .detail-meta span { font-size: 15px; }
  .detail-sub   { font-size: 15px; }

  /* Lyrics */
  .lyrics       { font-size: 16px; line-height: 2; }

  /* Stage mode — bigger on tablet */
  .stage-title  { font-size: clamp(36px, 6vw, 60px); }
  .stage-lyrics { font-size: clamp(16px, 2.5vw, 22px); line-height: 2; }
  .stage-meta .badge { font-size: 15px; padding: 4px 12px; }
  .stage-nav-btn { font-size: 16px; padding: 22px 0; }
}

/* ══════════════════════════════════════════════
   Setlist Audio Player Bar
   Fixed bar at bottom of setlist page
   ══════════════════════════════════════════════ */
#setlist-player-bar {
  position: fixed;
  bottom: 66px; /* above bottom nav */
  left: 0; right: 0;
  background: #0a0a0a;
  border-top: 1px solid var(--bdr-l);
  z-index: 30;
  display: none;
  flex-direction: column;
  max-width: 520px;
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  box-shadow: 0 -4px 20px rgba(0,0,0,.5);
}
#setlist-player-bar.visible { display: flex; }

.slp-seek-row {
  padding: 8px 14px 0;
}
.slp-seek {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--bdr-l);
  outline: none;
  cursor: pointer;
  padding: 8px 0;
  box-sizing: content-box;
  margin: -8px 0;
}
.slp-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #000;
  cursor: pointer;
}
.slp-seek::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #000;
}

.slp-main {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 12px;
}
.slp-info {
  flex: 1;
  min-width: 0;
}
.slp-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--t1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slp-time {
  font-size: 10px;
  color: var(--t3);
  font-family: var(--font-m);
  margin-top: 2px;
}
.slp-btn {
  background: none;
  border: none;
  color: var(--t2);
  cursor: pointer;
  font-size: 20px;
  padding: 6px;
  line-height: 1;
  flex-shrink: 0;
  transition: color .12s;
  -webkit-tap-highlight-color: transparent;
}
.slp-btn:active { color: var(--t1); transform: scale(.9); }
.slp-btn:disabled { color: var(--t3); cursor: default; }
.slp-play {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity .12s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.slp-play:active { transform: scale(.92); opacity: .85; }

/* ── No audio notice ───── */
.slp-no-audio {
  font-size: 11px;
  color: var(--t3);
  font-style: italic;
  padding: 0 14px 2px;
}

/* Desktop: setlist player bar wider */
@media (min-width: 768px) {
  #setlist-player-bar {
    bottom: 0;
    max-width: calc(100% - 220px);
    left: auto;
    right: 0;
    transform: none;
  }
}

/* ══════════════════════════════════════════════
   Stage Mode — Metronome Flash
   ══════════════════════════════════════════════ */
#stage-metronome {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 6px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.05s ease;
  pointer-events: none;
  border-radius: 0;
}
#stage-metronome.flash { opacity: 1; }

/* Subtle: wider flash bar on tablet */
@media (min-width: 768px) {
  #stage-metronome { height: 8px; }
}

/* Metronome BPM indicator in stage hero */
.stage-bpm-indicator {
  font-family: var(--font-m);
  font-size: 12px;
  color: #444;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.stage-bpm-indicator.active { color: var(--accent); }
.stage-metro-toggle {
  background: none;
  border: 1px solid #222;
  color: #444;
  border-radius: 5px;
  padding: 3px 8px;
  cursor: pointer;
  font-family: var(--font-m);
  font-size: 11px;
  transition: all .15s;
}
.stage-metro-toggle.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--acc-bg);
}

/* ══════════════════════════════════════════════
   Desktop / Tablet — typography scale up
   ══════════════════════════════════════════════ */
@media (min-width: 600px) {
  /* Badges — maiores em tablet/desktop */
  .badge          { font-size: 13px; padding: 3px 10px; }
  .badge-accent,
  .badge-blue,
  .badge-green,
  .badge-amber,
  .badge-muted    { font-size: 13px; padding: 3px 10px; }

  /* Card titles */
  .card-title     { font-size: 17px; }
  .card-sub       { font-size: 13px; }

  /* Detail page */
  .detail-title   { font-size: 44px; }
  .detail-sub     { font-size: 15px; }
  .detail-meta    { gap: 10px; margin-top: 12px; }

  /* Lyrics */
  .lyrics         { font-size: 16px; line-height: 2; }

  /* List section labels */
  .list-section-label { font-size: 11px; }

  /* Notes */
  .notes-text     { font-size: 16px; line-height: 1.8; }

  /* Buttons */
  .btn-ghost,
  .btn-accent     { font-size: 14px; padding: 10px 18px; }
  .btn-stage      { font-size: 17px; padding: 14px 26px; }

  /* Show date badge */
  .show-date-badge { font-size: 14px; padding: 5px 12px; }

  /* Stage mode — bigger on tablet */
  .stage-title    { font-size: clamp(36px, 10vw, 56px); }
  .stage-lyrics   { font-size: clamp(15px, 3.8vw, 20px); line-height: 2.1; }
  .stage-meta .badge { font-size: 16px; padding: 5px 14px; }
}

@media (min-width: 768px) {
  /* Desktop sidebar — bigger nav labels */
  .nav-label      { font-size: 14px; }
  .page-title     { font-size: 30px; }

  /* Dash stats */
  .dash-stat-num  { font-size: 58px; }
  .dash-stat-label{ font-size: 13px; letter-spacing: .08em; }

  /* Cards */
  .card-title     { font-size: 18px; }
  .card-sub       { font-size: 14px; }

  /* Audio player */
  .audio-player-label { font-size: 15px; }
  .ap-speed-btn   { font-size: 13px; padding: 9px 10px; }
  .ap-skip        { font-size: 13px; padding: 9px 10px; }
  .ap-time        { font-size: 12px; }
}

/* ── Setlist player bar ──────────────────────── */
#setlist-player {
  position: fixed;
  bottom: calc(58px + var(--safe-b));
  left: 0; right: 0;
  z-index: 15;
  max-width: 520px;
  margin: 0 auto;
  background: var(--s1);
  border-top: 1px solid var(--bdr);
  border-bottom: 1px solid var(--bdr);
  display: none;
  flex-direction: column;
}
#setlist-player.visible { display: flex; }

@media (min-width: 768px) {
  #setlist-player {
    max-width: 100%;
    left: 220px;
    bottom: 0;
    border-top: 1px solid var(--bdr);
    border-bottom: none;
  }
}

.sp-seek-row {
  padding: 6px 14px 0;
}
.sp-seek {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--bdr-l);
  outline: none;
  cursor: pointer;
  padding: 8px 0;
  box-sizing: content-box;
  margin: -8px 0;
}
.sp-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}
.sp-seek::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
}

.sp-controls {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 6px 10px 8px;
}
.sp-btn {
  background: none;
  border: none;
  color: var(--t2);
  cursor: pointer;
  font-size: 20px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  transition: color .12s, background .12s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.sp-btn:active   { color: var(--t1); background: var(--s2); }
.sp-btn:disabled { opacity: .25; cursor: default; }
.sp-btn.play     { color: var(--accent); font-size: 22px; }

.sp-info {
  flex: 1;
  min-width: 0;
  padding: 0 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sp-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--t1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-meta {
  font-size: 11px;
  color: var(--t3);
  font-family: var(--font-m);
  display: flex;
  gap: 6px;
  align-items: center;
}
.sp-time {
  font-family: var(--font-m);
  font-size: 11px;
  color: var(--t3);
  flex-shrink: 0;
  white-space: nowrap;
}
.sp-close {
  background: none;
  border: none;
  color: var(--t3);
  cursor: pointer;
  font-size: 16px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── Stage metronome flash ───────────────────── */
#stage-metro-flash {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 20vh; /* overridden by JS from ba_metro_size */
  background: var(--accent);
  opacity: 0;
  pointer-events: none;
  z-index: 110;
  transition: opacity 0.04s ease;
}
#stage-metro-flash.beat { opacity: 1; }

.stage-metro-btn {
  background: none;
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.4);
  font-family: var(--font-m);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.stage-metro-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--acc-bg);
}

/* ══════════════════════════════════════════════
   SONG LOOKUP — pesquisa Spotify / deteção BPM
   ══════════════════════════════════════════════ */

/* Botão inline dentro de label */
.btn-inline-icon {
  background: none;
  border: 1px solid var(--bdr-l);
  color: var(--t2);
  font-size: 13px;
  padding: 2px 7px;
  border-radius: 5px;
  cursor: pointer;
  line-height: 1.4;
  transition: border-color .15s, color .15s;
}
.btn-inline-icon:hover { border-color: var(--accent); color: var(--accent); }
.btn-inline-icon:disabled { opacity: .45; cursor: default; }

/* Barra com botão + status */
.lookup-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Texto de estado */
.lookup-status {
  font-size: 12px;
  color: var(--t2);
  flex: 1;
  min-width: 0;
}
.lookup-status[data-type=ok]    { color: var(--green); }
.lookup-status[data-type=error] { color: var(--red);   }
.lookup-status[data-type=warn]  { color: var(--amber); }
.lookup-status[data-type=info]  { color: var(--blue);  }

/* Lista de resultados */
#lookup-results {
  border: 1px solid var(--bdr);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--s1);
}

.lookup-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--bdr);
  transition: background .12s;
}
.lookup-result:last-child { border-bottom: none; }
.lookup-result:hover { background: var(--s2); }

.lookup-thumb {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--s3);
}
.lookup-thumb-empty {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: var(--s3);
  flex-shrink: 0;
}

.lookup-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lookup-track-title {
  font-size: 13px;
  color: var(--t1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lookup-track-sub {
  font-size: 11px;
  color: var(--t2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lookup-track-sub em { font-style: normal; color: var(--t3); }

.lookup-pick {
  font-size: 12px;
  padding: 5px 10px;
  flex-shrink: 0;
}

/* ── Offline settings ─────────────────────────── */
.offline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  border-bottom: 1px solid var(--bdr);
  gap: 16px;
  transition: opacity .2s;
}
.offline-row:last-child { border-bottom: none; }
.offline-row-loading { opacity: .5; pointer-events: none; }
.offline-row-info { flex: 1; min-width: 0; }
.offline-row-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--t1);
  margin-bottom: 2px;
}
.offline-row-desc {
  font-size: 12px;
  color: var(--t3);
  line-height: 1.4;
}

/* Toggle nativo para offline — sem position:absolute, funciona em todos os Android */
.offline-toggle {
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  background: var(--s3);
  border: 1px solid var(--bdr);
  border-radius: 13px;
  cursor: pointer;
  position: relative;
  transition: background .2s, border-color .2s;
}
.offline-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.offline-toggle:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.offline-toggle:checked::after {
  transform: translateX(18px);
}

