/* =========================================================================
   LITORAL OSCURO RADIO — panel de operador (/admin)
   Look de aplicación de escritorio tipo RadioBOSS: denso, bordes finos,
   tipografía 11–13px, paleta negra + rojo aprobada por el usuario.
   Encaja en 1366×768 y resoluciones superiores.
   ========================================================================= */

.admin-body {
  min-height: 100vh;
  font-size: 12.5px;
  line-height: 1.35;
  background: #0a0a0a;
  background-image: none;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* la app ocupa la ventana: header arriba, transport abajo */
.app {
  height: 100vh;
  display: grid;
  grid-template-rows: 34px minmax(0, 1fr) 64px;
}

/* --------------------------------------------------------------- login --- */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  width: min(360px, 100%);
  padding: 1.6rem 1.5rem 1.3rem;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6);
}

.brand-block {
  text-align: center;
  margin-bottom: 1.2rem;
}

.brand-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.brand-title b {
  color: #e11d2e;
}

.login-card .field-label {
  margin-top: 0.2rem;
}

.login-card input[type="password"] {
  letter-spacing: 0.15em;
}

.login-error {
  margin: 0.7rem 0 0;
  padding: 0.45rem 0.6rem;
  border-radius: 3px;
  background: rgba(225, 29, 46, 0.1);
  border: 1px solid rgba(225, 29, 46, 0.4);
  color: #ff8a95;
  font-size: 0.8rem;
}

.login-foot {
  margin: 0.9rem 0 0;
  text-align: center;
  color: #8a8a8a;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ------------------------------------------- login con Authenticator --- */

.field-wrap {
  margin-top: 0.2rem;
}

.field-hint {
  margin: 0.3rem 0 0;
  color: #6f6f6f;
  font-size: 0.68rem;
}

.totp-card {
  width: min(440px, 100%);
}

.totp-steps {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
  color: #b5b5b5;
  font-size: 0.8rem;
  line-height: 1.75;
}

.totp-steps b {
  color: #eee;
}

.totp-secret-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0.3rem 0 0.9rem;
}

.totp-secret-row.totp-center {
  justify-content: center;
  margin: 0.6rem 0 1rem;
}

.totp-secret {
  flex: 1 1 auto;
  padding: 8px 10px;
  background: #0d0d0d;
  border: 1px dashed #8b0f1a;
  border-radius: 4px;
  color: #ff97a2;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  word-break: break-all;
  user-select: all;
}

.totp-recovery {
  display: block;
  text-align: center;
  font-size: 16px;
}

.totp-note {
  margin: 0 0 0.8rem;
  color: #9a9a9a;
  font-size: 0.78rem;
  line-height: 1.65;
}

.totp-note b {
  color: #ddd;
}

/* ---------------------------------------------------------- densidad UI -- */

.admin-body .btn {
  padding: 4px 9px;
  border-radius: 3px;
  font-size: 11.5px;
  font-weight: 700;
  gap: 0.3rem;
}

.admin-body .btn-sm {
  padding: 3px 7px;
  font-size: 11px;
}

.admin-body .btn-block {
  width: 100%;
  margin-top: 0.4rem;
  padding-top: 6px;
  padding-bottom: 6px;
}

.admin-body input[type="text"],
.admin-body input[type="password"],
.admin-body input[type="search"],
.admin-body input[type="time"],
.admin-body .input {
  padding: 5px 7px;
  border-radius: 3px;
  font-size: 12px;
}

.admin-body select {
  padding: 5px 20px 5px 7px;
  border-radius: 3px;
  font-size: 12px;
  background-position: right 0.45rem center;
}

.admin-body input[type="range"] {
  height: 6px;
  border-radius: 3px;
}

.admin-body input[type="range"]::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  border-width: 2px;
  box-shadow: 0 0 6px rgba(225, 29, 46, 0.7);
}

.admin-body input[type="range"]::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border-width: 2px;
  box-shadow: 0 0 6px rgba(225, 29, 46, 0.7);
}

.admin-body .pill {
  padding: 2px 7px;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  border-radius: 3px;
}

.admin-body .badge {
  padding: 1px 5px;
  font-size: 9.5px;
  border-radius: 3px;
  letter-spacing: 0.06em;
}

.admin-body .empty {
  padding: 0.8rem 0.5rem;
  font-size: 11.5px;
  border-radius: 3px;
}

.admin-body .pane-note {
  color: #8a8a8a;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-body .nav-link {
  font-size: 10.5px;
  letter-spacing: 0.1em;
}

/* switch compacto (header) */
.switch-xs {
  width: 30px;
  height: 16px;
}

.switch-xs .track::before {
  width: 10px;
  height: 10px;
  left: 2px;
  top: 2px;
}

.switch-xs input:checked + .track::before {
  transform: translateX(14px);
}

/* ------------------------------------------------------------- header --- */

.hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 8px;
  background: #121212;
  border-bottom: 1px solid #2a2a2a;
  box-shadow: 0 1px 0 #000 inset;
  min-width: 0;
}

.hdr-brand {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #e6e6e6;
}

.hdr-brand b {
  color: #e11d2e;
}

.hdr-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.hdr-auto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hdr-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a8a8a;
  white-space: nowrap;
}

/* ------------------------------------------------------------- layout --- */

.body3 {
  display: grid;
  grid-template-columns: 30fr 46fr 22fr;
  gap: 5px;
  padding: 5px;
  min-height: 0;
  min-width: 0;
}

.col {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  min-height: 0;
}

.col-right {
  overflow-y: auto;
  overflow-x: hidden;
}

.pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  overflow: hidden;
}

.pane-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 7px;
  background: #141414;
  border-bottom: 1px solid #2a2a2a;
  flex: 0 0 auto;
}

.pane-head h2 {
  margin: 0;
  position: relative;
  padding-left: 8px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9a9a9a;
  white-space: nowrap;
}

.pane-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0.9em;
  background: #e11d2e;
}

.pane-head .queue-next {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
  color: #8a8a8a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pane-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px;
  background: #141414;
  border-top: 1px solid #2a2a2a;
  flex: 0 0 auto;
  flex-wrap: wrap;
}

/* ================================================== A. BIBLIOTECA ====== */

.pane-lib {
  flex: 1 1 auto;
}

.chips {
  display: flex;
  gap: 3px;
  padding: 5px 6px 0;
  flex: 0 0 auto;
  flex-wrap: wrap;
}

.chip {
  flex: 1 1 auto;
  padding: 3px 4px;
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  background: #141414;
  color: #8a8a8a;
  font: inherit;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
}

.chip:hover {
  color: #e6e6e6;
  border-color: #3a3a3a;
}

.chip.active {
  background: rgba(225, 29, 46, 0.18);
  border-color: #e11d2e;
  color: #ff8a95;
}

/* chips de ESTILO (carpetas): Pop, Rock, Lentos, Películas… */
.chips-folders {
  padding: 3px 6px 0;
}

.chips-folders .chip {
  flex: 0 1 auto;
}

.chips-tag {
  align-self: center;
  color: #6f6f6f;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-right: 2px;
}

.chip-add {
  color: #ff97a2;
  border-style: dashed;
}

.chip-n {
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
  margin-left: 3px;
}

.lib-search-row {
  padding: 5px 6px;
  flex: 0 0 auto;
}

.lib-search {
  width: 100%;
}

.lib-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border-top: 1px solid #222;
  position: relative;
}

.tbl {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.tbl thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #151515;
  color: #8a8a8a;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  padding: 4px 6px;
  border-bottom: 1px solid #2a2a2a;
  white-space: nowrap;
}

.tbl .c-num {
  width: 26px;
  text-align: right;
}

.tbl .c-artist {
  width: 28%;
}

.tbl .c-dur {
  width: 44px;
}

.tbl .c-kind {
  width: 74px;
}

.tbl .c-act {
  width: 92px;
}

.tbl td {
  padding: 3px 6px;
  border-bottom: 1px solid #202020;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.tbl tbody tr:nth-child(even) {
  background: #161616;
}

.tbl tbody tr:nth-child(odd) {
  background: #131313;
}

.tbl tbody tr:hover {
  background: #232323;
}

.tbl tbody tr.selected {
  background: #b8121f;
  color: #fff;
}

.tbl tbody tr.selected td {
  border-color: #8b0f1a;
}

.tbl tbody tr.selected .badge {
  background: rgba(0, 0, 0, 0.32);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.tbl .num {
  text-align: right;
  color: #8a8a8a;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.tbl tr.selected .num {
  color: rgba(255, 255, 255, 0.75);
}

.tbl .dur {
  font-family: var(--mono);
  color: #8a8a8a;
  font-variant-numeric: tabular-nums;
}

.tbl tr.selected .dur {
  color: rgba(255, 255, 255, 0.8);
}

.tbl .title {
  font-weight: 650;
}

/* ── biblioteca: título a dos líneas (arriba grande, abajo artista+estilo) */
.pane-lib .tbl .title {
  padding: 4px 6px;
}

.pane-lib .tbl .l-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pane-lib .tbl .l-meta {
  display: block;
  margin-top: 1px;
  font-size: 10.5px;
  color: #9a9a9a;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pane-lib .tbl .l-fold {
  display: inline-block;
  margin-left: 6px;
  padding: 0 5px;
  border: 1px solid #3a3a3a;
  border-radius: 3px;
  color: #b9b9b9;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.pane-lib .tbl .l-fold:first-child {
  margin-left: 0;
}

.pane-lib .tbl tr.selected .l-meta {
  color: rgba(255, 255, 255, 0.85);
}

.pane-lib .tbl tr.selected .l-fold {
  background: rgba(0, 0, 0, 0.28);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.row-act {
  display: flex;
  gap: 3px;
  justify-content: flex-end;
  opacity: 0;
}

.tbl tr:hover .row-act,
.tbl tr.selected .row-act {
  opacity: 1;
}

.act-btn {
  padding: 1px 5px;
  border: 1px solid #3a3a3a;
  border-radius: 2px;
  background: #0f0f0f;
  color: #e6e6e6;
  font: inherit;
  font-size: 10.5px;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
}

.act-btn:hover {
  border-color: #e11d2e;
  color: #ff8a95;
}

.act-btn.danger:hover {
  background: #2a1216;
}

.act-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

tr.selected .act-btn {
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

/* -------------------------------------------------------- subida -------- */

.upload-panel {
  flex: 0 0 auto;
  padding: 6px;
  background: #151515;
  border-top: 1px solid #2a2a2a;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dropzone {
  padding: 10px 8px;
  text-align: center;
  background: #101010;
  border: 1px dashed #3a3a3a;
  border-radius: 3px;
  cursor: pointer;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.drag {
  border-color: #e11d2e;
  background: rgba(225, 29, 46, 0.07);
}

.dz-title {
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
  color: #c9c9c9;
}

.dz-or {
  color: #e11d2e;
}

.up-row {
  display: grid;
  grid-template-columns: 84px 1fr 1fr;
  gap: 5px;
}

/* fila "Estilo" del panel de subida: etiqueta + selector de carpeta */
.up-folder-row {
  grid-template-columns: 46px 1fr;
  margin-top: 5px;
}

.up-lab {
  align-self: center;
  color: #8a8a8a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.up-progress {
  display: flex;
  align-items: center;
  gap: 6px;
}

.up-progress .progress {
  flex: 1;
  margin-top: 0;
  height: 7px;
}

.up-pct {
  min-width: 34px;
  text-align: right;
  font-family: var(--mono);
  font-size: 10.5px;
  color: #8a8a8a;
}

/* ======================================================== B. CENTRO ===== */

.pane-parrilla {
  flex: 0 1 auto;
  min-height: 130px;
}

#par-form .sch-row input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
}

/* ------------------------------------------------------- playlist ------- */

.pane-playlist {
  flex: 1 1 auto;
  min-height: 0;
}

.qlist {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.qlist li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  border-bottom: 1px solid #1e1e1e;
  font-size: 12px;
}

.qlist li:nth-child(even) {
  background: #161616;
}

.qlist li:hover {
  background: #232323;
}

.q-num {
  width: 22px;
  flex: 0 0 auto;
  text-align: right;
  font-family: var(--mono);
  font-size: 10.5px;
  color: #8a8a8a;
  font-variant-numeric: tabular-nums;
}

.q-title {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.q-artist {
  flex: 0 1 auto;
  max-width: 34%;
  color: #8a8a8a;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.q-dur {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 10.5px;
  color: #8a8a8a;
  font-variant-numeric: tabular-nums;
}

.q-x {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: #8a8a8a;
  font: inherit;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.q-x:hover {
  color: #ff8a95;
  border-color: #8b0f1a;
  background: #2a1216;
}

.q-x:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ================================================== C. DERECHA ========= */

.pane-sch {
  flex: 0 0 auto;
}

.pane-hist {
  flex: 1 1 auto;
  min-height: 90px;
}

.pane-stats {
  flex: 0 0 auto;
}

.sch-form {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-bottom: 1px solid #2a2a2a;
}

.days {
  display: flex;
  gap: 3px;
}

.day {
  flex: 1 1 auto;
  min-width: 0;
  padding: 4px 0;
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  background: #141414;
  color: #8a8a8a;
  font: inherit;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.day:hover {
  border-color: #3a3a3a;
  color: #e6e6e6;
}

.day.active {
  background: rgba(225, 29, 46, 0.2);
  border-color: #e11d2e;
  color: #ff8a95;
}

.sch-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.slist {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 168px;
  overflow-y: auto;
}

.slist li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  border-bottom: 1px solid #1e1e1e;
  font-size: 11.5px;
}

.slist li:nth-child(even) {
  background: #161616;
}

.slist li.row-off {
  opacity: 0.45;
}

.s-main {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.s-main b {
  color: #e11d2e;
  font-weight: 800;
}

.s-sub {
  color: #8a8a8a;
}

.s-x {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: #8a8a8a;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.s-x:hover {
  color: #ff8a95;
  border-color: #8b0f1a;
  background: #2a1216;
}

/* ✏️ editar programación: tinte morado (familia del pisador) */
.s-x.s-edit:hover {
  color: #c9a4ff;
  border-color: #5b2d8a;
  background: #1b0e28;
}

/* nota bajo el formulario (explica p. ej. qué hace un pisador) */
.sch-note {
  margin: 0;
  font-size: 10px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.5);
}

.sch-note[hidden] {
  display: none;
}

/* el formulario resaltado está EDITANDO una programación existente */
.sch-form.editing {
  background: rgba(168, 85, 247, 0.06);
  border-bottom-color: #5b2d8a;
}

/* 🎚️ vía única: botón del encabezado para agregar un pisador */
#sch-pisador {
  margin-left: auto;
}

/* helper "Subir pisador" (visible sólo si aún no hay ninguno) */
#sch-upis {
  border-color: #8b0f1a;
  color: #ff97a2;
}

#sch-upis:hover {
  background: #2a1216;
  border-color: #e11d2e;
}

/* switch compacto para filas */
.switch-xs-row {
  width: 28px;
  height: 15px;
  flex: 0 0 auto;
}

.switch-xs-row .track::before {
  width: 9px;
  height: 9px;
  left: 2px;
  top: 2px;
}

.switch-xs-row input:checked + .track::before {
  transform: translateX(13px);
}

/* ------------------------------------------------------ historial ------- */

.hlist {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.hlist li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 6px;
  border-bottom: 1px solid #1e1e1e;
  font-size: 11.5px;
}

.hlist li:nth-child(even) {
  background: #161616;
}

.h-title {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.h-artist {
  flex: 0 1 auto;
  max-width: 40%;
  color: #8a8a8a;
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.h-time {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 10.5px;
  color: #8a8a8a;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------- estadísticas ------- */

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.stat-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a8a8a;
}

.stat-value {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.stream-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px 6px;
}

.stream-url {
  flex: 1 1 auto;
  min-width: 0;
  padding: 3px 5px;
  background: #101010;
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  color: #8a8a8a;
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ================================================ TRANSPORT (inferior) == */

.tp {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  background: #0d0d0d;
  border-top: 1px solid #47151d;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.5);
  min-width: 0;
}

.tp-left {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}

.tp-btn {
  padding: 5px 9px;
  border: 1px solid #2f2f2f;
  border-radius: 3px;
  background: #161616;
  color: #e6e6e6;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  white-space: nowrap;
}

.tp-btn:hover {
  background: #202020;
  border-color: #3a3a3a;
}

.tp-btn:active {
  transform: translateY(1px);
}

.tp-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.tp-play {
  min-width: 74px;
  padding: 5px 12px;
  background: #e11d2e;
  border-color: #ff5c6a;
  color: #fff;
  font-size: 12px;
  box-shadow: 0 0 12px rgba(225, 29, 46, 0.35);
}

.tp-play:hover {
  background: #f2263a;
}

.tp-play.is-playing {
  background: #8b0f1a;
  border-color: #e11d2e;
  box-shadow: 0 0 14px rgba(225, 29, 46, 0.55);
}

.tp-play.is-playing:hover {
  background: #a5121f;
}

.tp-mini {
  padding: 4px 6px;
}

.tp-center {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tp-times {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: #8a8a8a;
  font-variant-numeric: tabular-nums;
}

.np-rem {
  color: #e11d2e;
}

.tp-progress {
  margin-top: 0;
  height: 7px;
  border-radius: 3px;
}

.tp-np {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.np-title {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 1 auto;
}

.np-artist {
  color: #a5a5a5;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
}

.tp-next {
  font-size: 10.5px;
  color: #8a8a8a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tp-next span {
  color: #c9c9c9;
}

.tp-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.tp-vol {
  display: flex;
  align-items: center;
  gap: 5px;
}

.tp-vol-icon {
  font-size: 12px;
}

.tp-vol input[type="range"] {
  width: 92px;
}

.vol-value {
  min-width: 24px;
  text-align: right;
  font-family: var(--mono);
  font-size: 10.5px;
  color: #8a8a8a;
  font-variant-numeric: tabular-nums;
}

.tp-fade {
  display: flex;
  align-items: center;
  gap: 5px;
}

.tp-fade-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a8a8a;
}

.tp-fade select {
  width: 66px;
}

/* ---------------------------------------------------------- mic -------- */

.tp-mic {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mic-btn {
  min-width: 54px;
  height: 40px;
  border: 2px solid #e11d2e;
  border-radius: 4px;
  background: #16090b;
  color: #ff8a95;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.mic-btn:hover {
  background: #241014;
}

.mic-btn.on {
  background: #e11d2e;
  border-color: #ff6b76;
  color: #fff;
  box-shadow: 0 0 16px rgba(225, 29, 46, 0.7);
}

.mic-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.mic-side {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 84px;
}

.mic-meter {
  height: 9px;
  background: #101010;
  border: 1px solid #2a2a2a;
  border-radius: 2px;
  overflow: hidden;
}

.mic-meter-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #35d07f, #f0b429 65%, #e11d2e);
  transition: width 0.08s linear;
}

.mic-live {
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #e11d2e;
  text-shadow: 0 0 8px rgba(225, 29, 46, 0.7);
}

/* ---------------------------------------------------------- toasts ----- */

.toasts {
  bottom: 74px;
}

/* --------------------------------------------------------- scrollbars -- */

.lib-table-wrap::-webkit-scrollbar,
.qlist::-webkit-scrollbar,
.hlist::-webkit-scrollbar,
.slist::-webkit-scrollbar,
.col-right::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.lib-table-wrap::-webkit-scrollbar-thumb,
.qlist::-webkit-scrollbar-thumb,
.hlist::-webkit-scrollbar-thumb,
.slist::-webkit-scrollbar-thumb,
.col-right::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 6px;
}

.lib-table-wrap::-webkit-scrollbar-track,
.qlist::-webkit-scrollbar-track,
.hlist::-webkit-scrollbar-track,
.slist::-webkit-scrollbar-track,
.col-right::-webkit-scrollbar-track {
  background: #111;
}

/* --------------------------------------------------------- responsive -- */

@media (max-width: 1100px) {
  .body3 {
    grid-template-columns: 32fr 44fr 24fr;
  }

  .tp-vol input[type="range"] {
    width: 64px;
  }
}

/* -- subidas por lote / zip / seleccion multipla --------------- */
.up-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: #8a8a8a; }
.btn.danger { border-color: #5a1218; color: #e11d2e; }
.btn.danger:not(:disabled):hover { background: #8b0f1a; color: #fff; border-color: #e11d2e; }
.up-row .pane-note { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* -- arrastrar biblioteca ? playlist ---------------------------- */
.lrow[draggable="true"] { cursor: grab; }
.lrow[draggable="true"]:active { cursor: grabbing; }
.pane.drop-hint { outline: 2px dashed #e11d2e; outline-offset: -3px; background: #1d1012; }
.pane.drop-hint .pane-head h2 { color: #e11d2e; }

.lib-table-wrap:focus { outline: none; }
.lib-table-wrap { scrollbar-width: thin; scrollbar-color: #3a3a3a #121212; }

/* -- pesta�as de playlist -------------------------------------- */
.pl-tabs { display: flex; gap: 4px; padding: 5px 6px 0; overflow-x: auto; overflow-y: hidden; flex: 0 0 auto; border-bottom: 1px solid #2a2a2a; scrollbar-width: thin; }
.pl-tab { display: flex; align-items: center; gap: 6px; padding: 4px 9px; background: #141414; border: 1px solid #2a2a2a; border-bottom: none; border-radius: 4px 4px 0 0; color: #8a8a8a; font-size: 11px; cursor: pointer; white-space: nowrap; user-select: none; }
.pl-tab:hover { color: #e6e6e6; background: #1d1d1d; }
.pl-tab.active { color: #fff; border-color: #e11d2e; background: #231416; box-shadow: inset 0 2px 0 #e11d2e; }
.pl-tab-x { font-size: 10px; opacity: .45; }
.pl-tab:hover .pl-tab-x { opacity: 1; }
.pl-tab-x:hover { color: #e11d2e; }
.pl-tab-add { border-style: dashed; color: #8a8a8a; }
.pl-tab-input { background: #0d0d0d; border: 1px solid #e11d2e; color: #fff; font-size: 11px; padding: 1px 4px; width: 120px; border-radius: 2px; }
.pl-tab.editing .pl-tab-name, .pl-tab.editing .pl-tab-x { display: none; }

/* -- playlist persistente: temas ya sonados ---------------------- */
.qrow.played { opacity: .45; }
.qrow.played .q-title { text-decoration: line-through; text-decoration-color: #8b0f1a; }
.q-done { width: 14px; text-align: center; color: #e11d2e; font-size: 11px; flex: 0 0 auto; }
.q-num { color: #666; }

/* fila marcada "parar al terminar" (clic derecho) */
.qrow.stop-at-end { background: rgba(225, 29, 46, 0.08); }

.q-stop {
  flex: 0 0 auto;
  padding: 1px 5px;
  border: 1px solid #8b0f1a;
  border-radius: 3px;
  background: #2a1216;
  color: #ff97a2;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* menú contextual de la playlist */
.ctx-menu {
  position: fixed;
  z-index: 900;
  min-width: 190px;
  padding: 3px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
}

.ctx-menu[hidden] {
  display: none;
}

.ctx-menu button {
  display: block;
  width: 100%;
  padding: 5px 8px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #ddd;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.ctx-menu button:hover {
  background: #2a1216;
  color: #ff97a2;
}

/* modal de gestión de estilos (✏️ Estilos) */
.modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 850;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.72);
}

.modal-wrap[hidden] {
  display: none;
}

.modal-card {
  width: min(430px, 100%);
  max-height: 82vh;
  overflow: auto;
  background: #1a1a1a;
  border: 1px solid #2f2f2f;
  border-top: 2px solid #e11d2e;
  border-radius: 4px;
  padding: 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.6);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.modal-head h3 {
  margin: 0;
  color: #e6e6e6;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.modal-row {
  display: flex;
  gap: 6px;
}

.modal-row input {
  flex: 1 1 auto;
}

.folders-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: 46vh;
  overflow: auto;
}

.folder-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  border-bottom: 1px solid #232323;
}

.folder-row input {
  flex: 1 1 auto;
  min-width: 0;
}

.folder-row .btn {
  flex: 0 0 auto;
}

/* -- micr�fono: selector de entrada + ecualizador ---------------- */
.tp-mic { position: relative; }
.mic-cfg { background: #1a1a1a; border: 1px solid #2a2a2a; color: #888; border-radius: 4px; width: 24px; height: 24px; cursor: pointer; font-size: 12px; line-height: 1; margin-top: 4px; }
.mic-cfg:hover { color: #fff; border-color: #e11d2e; }
.mic-panel { position: absolute; bottom: calc(100% + 8px); right: 0; width: 290px; background: #141414; border: 1px solid #2a2a2a; border-top: 2px solid #e11d2e; border-radius: 6px; padding: 10px; display: flex; flex-direction: column; gap: 7px; z-index: 60; box-shadow: 0 12px 30px rgba(0, 0, 0, .6); }
.mic-panel-head { font-size: 10px; letter-spacing: .12em; color: #e11d2e; font-weight: 700; }
.mic-row { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #aaa; }
.mic-row select { flex: 1; min-width: 0; background: #0d0d0d; border: 1px solid #2a2a2a; color: #ddd; border-radius: 4px; padding: 3px 6px; font-size: 11px; }
.mic-row input[type='range'] { flex: 1; min-width: 0; }
.mic-val { width: 46px; text-align: right; color: #ddd; font-size: 10px; font-variant-numeric: tabular-nums; }
.mic-check { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #bbb; cursor: pointer; user-select: none; }
.mic-presets { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 10px; color: #888; }
