/* ==========================================================================
   KHAPIA · Panel del Locutor — hoja de estilo base
   Mismos tokens de color que el resto de sitios KHAPIA (gold #D4A94A),
   con el bg propio de Radio Broadcaster (#0B0B0F, ligeramente más frío que
   el #0A0A0A del reproductor).
   ========================================================================== */
:root {
  --bg: #0B0B0F;
  --surface: #111114;
  --card: #16161D;
  --card-elevated: #1E1E27;

  --gold: #D4A94A;
  --gold-light: #E8C878;
  --gold-dark: #B8892E;
  --accent-rgb: 212, 169, 74;
  --gold-border: rgba(var(--accent-rgb), 0.20);
  --gold-12: rgba(var(--accent-rgb), 0.12);

  --live: #EF4444;
  --positive: #22C55E;
  --info-blue: #3B82F6;

  --text-primary: #FFFFFF;
  --text-secondary: #B3B3B3;
  --text-tertiary: #8C8C8C;
  --hairline: rgba(255, 255, 255, 0.08);

  --font: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Cinzel', 'Times New Roman', serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-secondary);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }
[hidden] { display: none !important; }

.ico { width: 1em; height: 1em; flex: none; fill: currentColor; stroke: none; }

.app {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  overflow: hidden;
}
.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  color: var(--text-primary);
}

/* ------------------------------- estado/spinner -------------------------- */
.state-page { flex: 1; display: grid; place-items: center; }
.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2.5px solid var(--gold-border);
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state { padding: 32px 20px; text-align: center; color: var(--text-tertiary); }
.empty-state p { margin: 0; font-size: 13px; }
.empty-state__hint { margin-top: 6px !important; font-size: 12px !important; color: var(--text-tertiary); }

/* --------------------------------- toast ---------------------------------- */
.toast {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(8px);
  z-index: 50;
  max-width: 86%;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--card-elevated);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------------------------- auth ----------------------------------- */
.auth-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 32px 24px; overflow-y: auto; }
.auth-top { position: absolute; top: 12px; left: 8px; }
.auth-brand { text-align: center; margin-bottom: 28px; }
.auth-brand .ico { font-size: 44px; color: var(--gold); }
.auth-brand__title {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 1.2px;
  color: var(--text-primary);
}
.auth-brand__sub { margin: 4px 0 0; font-size: 12.5px; color: var(--text-tertiary); }

.auth-form { display: flex; flex-direction: column; gap: 12px; }
.field {
  width: 100%;
  padding: 13px 14px;
  background: var(--card);
  border: 0.8px solid var(--gold-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
}
.field::placeholder { color: var(--text-tertiary); }
.field:focus { outline: none; border-color: var(--gold); }
.field-pass { position: relative; }
.field-pass .field { padding-right: 44px; }
.field-pass__toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: none;
  border: 0;
  color: var(--text-tertiary);
  display: grid;
  place-items: center;
}
.field-pass__toggle .ico { font-size: 18px; }

.auth-error, .field-error {
  margin: 0;
  font-size: 12.5px;
  color: #FCA5A5;
  line-height: 1.4;
}
.auth-resend {
  align-self: flex-start;
  background: none;
  border: 0;
  color: var(--gold);
  font-size: 12.5px;
  font-weight: 600;
  padding: 2px 0;
}
.auth-link {
  margin-top: 4px;
  background: none;
  border: 0;
  color: var(--text-secondary);
  font-size: 13px;
  text-align: center;
}

.btn-primary {
  width: 100%;
  margin-top: 4px;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: var(--gold);
  color: #0B0B0F;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
}
.btn-primary:disabled { opacity: 0.55; }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--gold-border);
  background: none;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
}
.btn-ghost--sm { padding: 7px 12px; font-size: 11px; }
.btn-ghost--sm .ico { font-size: 13px; }

/* -------------------------------- topbar/shell ------------------------------ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 16px;
  flex: none;
  border-bottom: 0.6px solid var(--hairline);
}
.topbar__brand { display: flex; align-items: center; gap: 10px; }
.topbar__logo { width: 26px; height: 26px; object-fit: contain; }
.topbar__brand span { font-size: 11.5px; font-weight: 700; letter-spacing: 0.8px; color: var(--text-primary); }
.topbar__actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 0.8px solid var(--gold-border);
  background: var(--card);
  color: var(--gold);
  display: grid;
  place-items: center;
}
.icon-btn .ico { font-size: 17px; }
.icon-btn--sm { width: 30px; height: 30px; border: 0; background: none; color: var(--text-tertiary); }
.icon-btn--sm .ico { font-size: 16px; }

.shell-tabs { display: flex; gap: 20px; padding: 12px 20px 0; flex: none; border-bottom: 0.6px solid var(--hairline); }
.shell-tab {
  background: none;
  border: 0;
  padding: 0 0 12px;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-bottom: 2px solid transparent;
}
.shell-tab.is-active { color: var(--gold); border-bottom-color: var(--gold); }

.scroll { flex: 1; overflow-y: auto; padding: 18px 20px 40px; }

.section-label {
  margin: 18px 0 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--text-tertiary);
}
.section-label:first-child { margin-top: 0; }

/* --------------------------------- perfil ---------------------------------- */
.trial-banner {
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--gold-12);
  border: 1px solid var(--gold-border);
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 600;
}
.trial-banner.is-warning { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.35); color: #FCA5A5; }

.icon-row { display: flex; align-items: center; gap: 16px; }
.icon-preview {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--gold);
  flex: none;
}
.icon-preview img { width: 100%; height: 100%; object-fit: cover; }
.icon-preview__spinner {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
}
.icon-row__btn { cursor: pointer; }
#profile-form, #password-form { display: flex; flex-direction: column; }

/* ------------------------------ programación -------------------------------- */
.prog-note {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--gold-border);
  margin-bottom: 16px;
}
.prog-note .ico { font-size: 16px; color: var(--gold); flex: none; margin-top: 1px; }
.prog-note p { margin: 0; font-size: 11.5px; line-height: 1.4; color: var(--text-tertiary); }

.day-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.day-chip {
  flex: none;
  min-width: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 0.8px solid var(--gold-border);
  background: var(--card);
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
}
.day-chip.is-active { background: var(--gold); border-color: var(--gold); color: #0B0B0F; }

.prog-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 10px; }

.block-list { display: flex; flex-direction: column; gap: 8px; }
.block-row {
  display: grid;
  grid-template-columns: 44px 44px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: var(--card);
  border: 0.8px solid var(--gold-border);
}
.block-row__time { font-size: 10.5px; font-weight: 600; color: var(--text-tertiary); line-height: 1.3; text-align: center; }
.block-row__art {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--gold-12);
  display: grid;
  place-items: center;
  color: var(--gold);
}
.block-row__art img { width: 100%; height: 100%; object-fit: cover; }
.block-row__art .ico { font-size: 20px; }
.block-row__meta { min-width: 0; }
.block-row__meta b { display: block; font-size: 13.5px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.block-row__meta small { font-size: 11px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.block-row__badge {
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 9.5px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
}
.block-row__badge.type-autoDjPlaylist { background: var(--positive); }
.block-row__badge.type-recordedProgram { background: var(--info-blue); }
.block-row__badge.type-live { background: var(--live); }

/* -------------------------------- sheet ------------------------------------- */
.sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-end;
}
.sheet {
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--card-elevated);
  border-radius: 20px 20px 0 0;
  padding: 14px 20px calc(20px + env(safe-area-inset-bottom));
  animation: sheet-up 200ms ease;
}
@keyframes sheet-up { from { transform: translateY(100%); } }
.sheet__grip { display: block; width: 36px; height: 4px; margin: 0 auto 14px; border-radius: 2px; background: rgba(255, 255, 255, 0.18); }
.sheet__title { margin: 0 0 16px; font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--text-primary); }

.time-row { display: flex; gap: 12px; }
.time-field { flex: 1; }
.time-field label { display: block; margin-bottom: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.5px; color: var(--text-tertiary); }

.type-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.type-chips .chip {
  padding: 8px 14px;
  border-radius: 20px;
  border: 0.8px solid var(--gold-border);
  background: var(--card);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}
.type-chips .chip.is-active { background: var(--gold-12); border-color: var(--gold); color: var(--gold); }

.cover-row { display: flex; align-items: center; gap: 12px; }
.cover-preview {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--hairline);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--text-tertiary);
}
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.cover-preview .ico { font-size: 22px; }

.sheet__actions { display: flex; gap: 10px; margin-top: 20px; }
.sheet__actions .btn-ghost { color: #FCA5A5; border-color: rgba(239, 68, 68, 0.3); }
.sheet__actions .btn-primary { margin-top: 0; }

.field-hint { margin: 6px 0 0; font-size: 11px; color: var(--text-tertiary); line-height: 1.4; }

/* -------------------------------- transmitir --------------------------------- */
@keyframes bc-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  50% { opacity: 0.55; box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
}
@keyframes bc-ring {
  0% { transform: scale(0.72); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}

.bc-hero { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 0 6px; }
.bc-hero__circle { position: relative; width: 140px; height: 140px; display: grid; place-items: center; }
.bc-hero__circle::before, .bc-hero__circle::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent;
  animation: bc-ring 2.2s ease-out infinite;
}
.bc-hero__circle.is-live::before, .bc-hero__circle.is-live::after { border-color: rgba(239, 68, 68, 0.35); }
.bc-hero__circle.is-live::after { animation-delay: 0.7s; }
.bc-hero__circle.is-autodj::before { border-color: rgba(168, 85, 247, 0.35); }
.bc-hero__circle.is-autodj::after { border-color: rgba(45, 212, 191, 0.35); animation-delay: 0.7s; }
.bc-hero__core {
  position: relative; z-index: 1; width: 92px; height: 92px; border-radius: 50%;
  display: grid; place-items: center; background: var(--card-elevated);
  border: 2.5px solid var(--hairline); transition: border-color 200ms ease, box-shadow 200ms ease;
}
.bc-hero__core.is-live { border-color: var(--live); box-shadow: 0 0 26px rgba(239, 68, 68, 0.5); }
.bc-hero__core.is-autodj { border-color: var(--gold); box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.35); }
.bc-hero__core .ico { font-size: 38px; color: var(--live); }
.bc-hero__core.is-autodj .ico { display: none; }
.bc-hero__robot { width: 60%; height: 60%; object-fit: contain; border-radius: 50%; }

.bc-hero__badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 24px;
  font-weight: 800; font-size: 12.5px; letter-spacing: 0.5px; color: #fff;
  background: var(--card); border: 1px solid var(--hairline);
}
.bc-hero__badge.is-live { background: #DC2626; border-color: transparent; }
.bc-hero__badge.is-autodj { background: rgba(34, 197, 94, 0.15); border-color: rgba(34, 197, 94, 0.55); }
.bc-hero__dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.bc-hero__timer { margin-left: 2px; font-variant-numeric: tabular-nums; }
.bc-hero__title { margin: 2px 0 0; font-weight: 800; font-size: 17px; color: var(--text-primary); }
.bc-hero__sub { margin: 0; font-size: 12.5px; color: var(--text-tertiary); text-align: center; max-width: 280px; line-height: 1.4; }

/* VU meter — barras degradadas violeta→cian→verde, mismo criterio que VuMeter de la app */
.bc-vu { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.bc-vu__row { display: flex; align-items: center; gap: 8px; }
.bc-vu__ch { width: 14px; font-size: 11px; font-weight: 700; color: var(--text-tertiary); }
.bc-vu__bar {
  flex: 1; height: 16px; border-radius: 4px; overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}
.bc-vu__fill {
  height: 100%; width: 100%; transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, #C084FC, #818CF8, #22D3EE, #4ADE80);
  transition: transform 90ms linear;
}

.bc-row-card {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 16px;
  border-radius: 14px; background: var(--card); border: 1px solid var(--hairline);
}
.bc-row-card .ico { font-size: 20px; color: var(--text-tertiary); flex: none; }
.bc-row-card .ico.is-on { color: var(--gold); }

.bc-source { margin-bottom: 16px; }
.bc-source-card {
  padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--gold-border);
}
.bc-source-live__row { display: flex; align-items: center; gap: 10px; }
.bc-source-live__label { flex: 1; font-size: 14px; color: var(--text-primary); }
.bc-mic-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(var(--accent-rgb), 0.22); color: var(--gold-light); flex: none;
}
.bc-mic-btn .ico { font-size: 20px; }
.bc-mic-btn.is-muted { background: rgba(239, 68, 68, 0.22); color: var(--live); }
.bc-source-live__bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); margin-top: 8px; overflow: hidden; }
.bc-source-live__bar div { height: 100%; width: 0%; background: var(--positive); transition: width 90ms linear; }

.bc-source-autodj { display: flex; align-items: center; gap: 12px; }
.bc-source-autodj img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; }
.bc-badge-playing {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 3px 8px;
  border-radius: 6px; background: rgba(var(--accent-rgb), 0.22); color: var(--gold);
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.3px;
}

.bc-console { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 20px; }
.bc-console-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  height: 76px; border-radius: 14px; background: var(--card); border: 1px solid var(--hairline); color: var(--text-secondary);
}
.bc-console-btn .ico { font-size: 20px; }
.bc-console-btn b { font-size: 11px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 4px; }
.bc-console-btn.is-active { border-color: var(--gold); color: var(--text-primary); background: rgba(var(--accent-rgb), 0.14); }
.bc-console-btn.is-muted { border-color: var(--live); color: #fff; background: rgba(239, 68, 68, 0.2); }
.bc-console-btn:disabled { opacity: 0.4; }

.bc-vol-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.bc-vol-head .ico { font-size: 16px; color: var(--text-tertiary); }
.bc-vol-pct { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.bc-range { width: 100%; accent-color: var(--gold); margin-bottom: 18px; }
.bc-range:disabled { opacity: 0.4; }

.bc-start-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 56px; }
.bc-start-btn.is-live { background: #DC2626; color: #fff; }

.bc-autodj-actions { display: flex; gap: 10px; margin-top: 12px; }
.bc-action-btn {
  flex: 1; height: 52px; border-radius: 14px; border: 1px solid var(--hairline); background: var(--card-elevated);
  color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; font-size: 12.5px; letter-spacing: 0.4px;
}
.bc-action-btn .ico { font-size: 16px; }
.bc-action-btn:disabled { opacity: 0.4; }
.bc-action-btn--stop { background: #DC2626; border-color: transparent; }

.bc-now-playing .adj-now__art { width: 44px; height: 44px; }

/* -------------------------------- biblioteca --------------------------------- */
.lib-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; margin-bottom: 18px; min-height: 40px; }
.lib-item {
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: var(--card);
  border: 0.8px solid var(--gold-border);
  cursor: pointer;
}
.lib-item__art {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--gold-12);
  display: grid;
  place-items: center;
  color: var(--gold);
  flex: none;
}
.lib-item__art .ico { font-size: 18px; }
.lib-item__meta { min-width: 0; }
.lib-item__meta b { display: block; font-size: 13px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-item__meta small { font-size: 11px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-item__dur { font-size: 11px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.lib-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}
.lib-upload-btn .ico { font-size: 16px; }

/* ---------------------------------- autodj ------------------------------------ */
.adj-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--gold-border);
}
.adj-status__icon { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: none; }
.adj-status__body { flex: 1; min-width: 0; }
.adj-status__row { display: flex; align-items: center; gap: 8px; }
.adj-status__title { font-weight: 800; color: var(--text-primary); font-size: 15px; }
.adj-status__badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  border: 1px solid currentColor;
  color: rgba(255, 255, 255, 0.35);
}
.adj-status__badge.is-autodj { color: var(--positive); background: rgba(34, 197, 94, 0.14); }
.adj-status__badge.is-live { color: var(--live); background: rgba(239, 68, 68, 0.14); }
.adj-status__sub { margin: 4px 0 0; font-size: 11.5px; line-height: 1.35; color: var(--text-tertiary); }

.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch__track {
  position: absolute; inset: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transition: background 150ms ease;
}
.switch__track::before {
  content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px;
  border-radius: 50%; background: #fff; transition: transform 150ms ease;
}
.switch input:checked + .switch__track { background: var(--gold); }
.switch input:checked + .switch__track::before { transform: translateX(18px); }
.switch input:disabled + .switch__track { opacity: 0.4; }
.switch-row { display: flex; align-items: center; justify-content: space-between; margin: 14px 0; color: var(--text-primary); font-size: 13px; font-weight: 600; }

.adj-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--hairline);
  margin-top: 8px;
  margin-bottom: 18px;
}
.adj-card__ico { font-size: 22px; color: var(--gold); margin-top: 2px; flex: none; }
.adj-card__body { min-width: 0; flex: 1; }
.adj-card__body b { display: block; font-size: 14px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adj-card__body small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.adj-now__art {
  width: 56px; height: 56px; border-radius: 12px; flex: none;
  background: var(--gold-12); color: var(--gold);
  display: grid; place-items: center; overflow: hidden;
}
.adj-now__art .ico { font-size: 24px; }
.adj-now__art img { width: 100%; height: 100%; object-fit: cover; }
.adj-now__progress-bar { width: 100%; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.12); margin-top: 8px; overflow: hidden; }
#adj-now-progress-fill { height: 100%; width: 0%; background: var(--gold); transition: width 400ms linear; }
.adj-now__time { margin-top: 5px !important; font-variant-numeric: tabular-nums; }

.adj-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 8px; }
.adj-head__meta { font-size: 11px; font-weight: 700; color: var(--text-tertiary); }

.adj-upcoming-list { display: flex; flex-direction: column; gap: 8px; }
.adj-upcoming-item {
  display: grid;
  grid-template-columns: 20px 1fr auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--card);
  border: 0.8px solid var(--gold-border);
}
.adj-upcoming-item.is-dragging { opacity: 0.4; }
.adj-upcoming-item__idx { font-size: 12px; font-weight: 700; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.adj-upcoming-item__meta { min-width: 0; }
.adj-upcoming-item__meta b { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adj-upcoming-item__meta small { font-size: 10.5px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adj-upcoming-item__dur { font-size: 11px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.adj-upcoming-item [data-drag] { cursor: grab; color: var(--text-tertiary); }
.adj-upcoming-item [data-remove] { color: var(--text-tertiary); background: none; border: 0; display: grid; place-items: center; width: 22px; height: 22px; }

.adj-config-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.adj-config-tile {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 4px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--hairline);
  color: var(--text-secondary);
}
.adj-config-tile .ico { font-size: 20px; }
.adj-config-tile b { font-size: 10px; font-weight: 700; color: inherit; }
.adj-config-tile small { font-size: 9px; color: var(--text-tertiary); }
.adj-config-tile.is-active { border-color: var(--gold); color: var(--text-primary); }

.adj-add-btn { width: 100%; height: 48px; margin-top: 16px; justify-content: center; gap: 8px; }

.adj-mini-player {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--gold-border);
}
.adj-mini-player__art {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  background: var(--gold-12); color: var(--gold);
  display: grid; place-items: center; overflow: hidden;
}
.adj-mini-player__art .ico { font-size: 18px; }
.adj-mini-player__art img { width: 100%; height: 100%; object-fit: cover; }

.volume-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.volume-row .ico { font-size: 18px; color: var(--text-tertiary); flex: none; }
.volume-row input[type="range"] { flex: 1; accent-color: var(--gold); }
.volume-row span { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }

/* --------------------------------- desktop ---------------------------------- */
@media (min-width: 700px) {
  .app { max-width: none; }
  .screen { background: var(--bg); }
  .auth-wrap { max-width: 400px; margin: 0 auto; }
  .topbar, .shell-tabs { max-width: 640px; margin-inline: auto; width: 100%; }
  .scroll > * { max-width: 640px; margin-inline: auto; }
  .sheet-backdrop { align-items: center; }
  .sheet { width: min(480px, calc(100% - 48px)); border-radius: 20px; border: 1px solid var(--gold-border); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); }
}

/* ---------------------------------- perfil ----------------------------------- */
.perfil-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.perfil-head span { font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: 0.6px; color: var(--text-primary); }

/* ---------------------------------- inicio ------------------------------------ */
.inicio-station { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.inicio-station__icon {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: var(--gold); color: #0B0B0F; display: grid; place-items: center; overflow: hidden;
}
.inicio-station__icon .ico { font-size: 20px; }
.inicio-station__icon img { width: 100%; height: 100%; object-fit: cover; }
.inicio-station__body small { display: block; margin-top: 2px; font-size: 12px; color: var(--text-tertiary); }
.inicio-station__row { display: flex; align-items: center; gap: 8px; }
.inicio-station__row span:first-child { font-weight: 800; font-size: 15px; letter-spacing: 0.4px; color: var(--text-primary); }
.inicio-station__badge {
  padding: 3px 8px; border-radius: 6px; font-size: 9.5px; font-weight: 800; letter-spacing: 0.4px;
  color: #fff; background: var(--text-tertiary);
}
.inicio-station__badge.is-live { background: var(--live); }
.inicio-station__badge.is-autodj { background: var(--positive); }

.inicio-hero {
  position: relative; overflow: hidden; padding: 18px; margin-bottom: 14px; border-radius: 20px;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.18), rgba(var(--accent-rgb), 0.08) 22%, var(--card) 50%, #101014);
  border: 1px solid var(--gold-border);
}
.inicio-hero__row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.inicio-hero__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-tertiary); }
.inicio-hero.is-live .inicio-hero__dot { background: var(--live); }
.inicio-hero.is-autodj .inicio-hero__dot { background: var(--positive); }
.inicio-hero__row span:last-child { font-weight: 800; font-size: 12px; letter-spacing: 0.6px; color: var(--text-tertiary); }
.inicio-hero.is-live .inicio-hero__row span:last-child { color: var(--live); }
.inicio-hero.is-autodj .inicio-hero__row span:last-child { color: var(--positive); }
.inicio-hero__main {
  margin: 0 0 12px; font-weight: 800; font-size: 20px; color: var(--text-primary);
  max-width: 78%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.inicio-hero.is-live .inicio-hero__main { font-size: 32px; font-variant-numeric: tabular-nums; }
.inicio-hero__meta { margin-top: 8px; max-width: 78%; }
.inicio-hero__meta small { display: block; font-size: 10.5px; color: var(--text-tertiary); }
.inicio-hero__meta b { display: block; margin-top: 1px; font-size: 13px; font-weight: 700; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.inicio-cta { display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; margin-bottom: 18px; }
.inicio-cta .ico { font-size: 17px; }

.inicio-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.inicio-quick-tile {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 14px 8px; border-radius: 14px; background: var(--card); border: 1px solid var(--hairline); color: var(--text-secondary);
}
.inicio-quick-tile .ico { font-size: 21px; color: var(--gold); }
.inicio-quick-tile b { font-size: 12px; font-weight: 700; color: var(--text-primary); }
.inicio-quick-tile small { font-size: 10px; color: var(--text-tertiary); }

.inicio-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inicio-mini-card { padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--gold-border); }
.inicio-mini-card__head {
  display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 800; letter-spacing: 0.4px; color: var(--text-tertiary);
}
.inicio-mini-card__head .ico { font-size: 14px; color: var(--gold-light); }
.inicio-mini-card__title { margin: 8px 0 10px; font-size: 12px; font-weight: 600; color: var(--text-primary); }
.inicio-mini-card__bar { height: 8px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); margin-bottom: 6px; overflow: hidden; }
.inicio-mini-card__bar div { height: 100%; width: 0%; background: var(--positive); transition: width 120ms linear; }
.inicio-mini-card small { font-size: 10px; color: var(--text-tertiary); }
.inicio-mini-card__badge {
  display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 10px; font-weight: 700;
  background: rgba(255, 255, 255, 0.08); color: var(--text-secondary);
}
.inicio-mini-card__badge.is-connected { background: rgba(34, 197, 94, 0.18); color: var(--positive); }
.inicio-mini-card__badge.is-connecting { background: rgba(245, 158, 11, 0.18); color: #F59E0B; }

/* -------------------------------- efectos de voz ------------------------------- */
.fx-sheet { max-height: 88vh; }
.fx-presets { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; }
.fx-preset-chip {
  flex: none; display: flex; align-items: center; gap: 6px; padding: 9px 14px;
  border-radius: 12px; background: var(--card-elevated); border: 0.8px solid var(--hairline);
  color: var(--text-primary); font-size: 12.5px; font-weight: 700;
}
.fx-preset-chip__emoji { font-size: 15px; }

.fx-card {
  margin-bottom: 12px; padding: 10px 14px; border-radius: 14px;
  background: var(--card-elevated); border: 0.8px solid var(--hairline);
}
.fx-card.is-on { border-color: rgba(var(--accent-rgb), 0.5); }
.fx-card__head { display: flex; align-items: center; gap: 10px; }
.fx-card__head-text { flex: 1; min-width: 0; }
.fx-card__head-text b { display: block; font-size: 14px; font-weight: 700; color: var(--text-primary); }
.fx-card__head-text small { display: block; margin-top: 2px; font-size: 11px; line-height: 1.35; color: var(--text-tertiary); }
.fx-card__body { margin-top: 8px; }
.fx-card__body[hidden] { display: none; }
.fx-slider-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.fx-slider-row label { flex: none; width: 58px; font-size: 11px; color: var(--text-tertiary); }
.fx-slider-row input[type="range"] { flex: 1; accent-color: var(--gold); }
.fx-slider-row span { flex: none; width: 40px; text-align: right; font-size: 11px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.fx-card__pending {
  margin-top: 6px; font-size: 10.5px; color: var(--text-tertiary); font-style: italic;
}

/* --------------------------- configuración del servidor ------------------------ */
.srv-setup { justify-content: flex-start; padding-top: 40px; }
.srv-setup__bar { width: 4px; height: 28px; border-radius: 2px; background: var(--gold); margin-bottom: 12px; }
.srv-setup__title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 24px; color: var(--text-primary); }
.srv-setup__card {
  margin-top: 24px; padding: 18px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--hairline);
  display: flex; flex-direction: column;
}
.srv-setup__card select.field { appearance: none; -webkit-appearance: none; }

