/* Panel del DJ */

#dj-panel {
  max-width: 1100px;
  margin: 28px auto;
  padding: 24px;
  background: #fff;
  border: 1px solid #ddd3e4;
  border-radius: 16px;
  color: #282431;
  font-family: system-ui,sans-serif;
  box-sizing: border-box;
}
#dj-panel h2 {
  margin: 0 0 8px;
}
#dj-panel p {
  line-height: 1.5;
}
#dj-panel button,
#dj-panel select {
  font: inherit;
  border: 1px solid #cfc2d8;
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 44px;
  background: #f4eff7;
  color: #45334f;
  cursor: pointer;
}
#dj-panel button:focus-visible,
#dj-panel a:focus-visible {
  outline: 3px solid #794c99;
  outline-offset: 3px;
}
#dj-panel [role=tablist] {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0;
}
#dj-panel [aria-selected=true],
#dj-panel .primary {
  background: #63437a;
  color: white;
}
#dj-panel .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,300px),1fr));
  gap: 16px;
}
#dj-panel article {
  border: 1px solid #ded5e4;
  border-radius: 12px;
  padding: 16px;
  overflow-wrap: anywhere;
}
#dj-panel h3 {
  margin: 0 0 8px;
}
#dj-panel .component {
  border-top: 1px solid #e4dce9;
  margin-top: 16px;
  padding-top: 12px;
}
#dj-panel img {
  max-width: 100%;
  height: 160px;
  object-fit: contain;
  background: #eee;
  display: block;
  margin-bottom: 12px;
}
#dj-panel .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}
#dj-panel .destinations {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 12px 0;
}
#dj-panel input {
  width: 20px;
  height: 20px;
  vertical-align: middle;
}
#dj-panel .muted {
  font-size: 14px;
  color: #665c6d;
}
#dj-panel .badge {
  font-size: 13px;
  display: inline-block;
  background: #eee7f3;
  padding: 5px 8px;
  border-radius: 20px;
}
#dj-panel [hidden] {
  display: none!important;
}
#dj-panel .screen {
  width: 100%;
  aspect-ratio: 16/9;
  background: #1e1925;
  border: 0;
  border-radius: 10px;
}
#dj-panel .note {
  padding: 12px;
  background: #f5f0e8;
  border-radius: 10px;
}
#dj-panel .panel-status {
  min-height: 24px;
  color: #38583c;
}
#dj-panel a {
  color: #63437a;
}
#dj-panel button.danger,
#dpe-create .event-bar button.danger {
  border-color: #d9a3aa;
  background: #fbeef0;
  color: #9c2433;
}
#dj-panel button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* Proyección: tres bloques (abrir, rotación, diseño) */
#dj-panel .screen-group {
  border: 1px solid #e4dce9;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 14px;
}
#dj-panel .screen-group h3 {
  margin: 0 0 12px;
  font-size: 16px;
}
#dj-panel .screen-group > .muted:last-child {
  margin-bottom: 0;
}
#dj-panel .fields {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px 20px;
}
#dj-panel .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #4b4052;
}
#dj-panel .background-pick {
  margin-top: 14px;
  align-items: center;
}
#dj-panel .tv-open,
#dj-panel .file-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  box-sizing: border-box;
  text-decoration: none;
  cursor: pointer;
}
#dj-panel .tv-open {
  background: #63437a;
  color: #fff;
}
#dj-panel .file-button {
  border: 1px solid #cfc2d8;
  background: #f4eff7;
  color: #45334f;
}
/* El selector de archivo del navegador queda invisible encima del botón. */
#dj-panel .file-button input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Tarjeta QR */
#dj-panel .card-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  gap: 28px;
  align-items: start;
}
#dj-panel .card-layout label {
  display: block;
  margin-bottom: 16px;
}
#dj-panel .card-layout select {
  display: block;
  width: 100%;
  margin-top: 6px;
}
#dj-panel #card-preview {
  width: 100%;
  height: auto;
  background: none;
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(40, 30, 50, .18);
}
#dj-panel code {
  font-size: 12px;
  overflow-wrap: anywhere;
}

@media (max-width: 580px) {
  #dj-panel {
    padding: 16px;
  }
  #dj-panel [role=tablist] button {
    flex: 1;
  }
  #dj-panel .card-layout {
    grid-template-columns: 1fr;
  }
}

/* Canciones: el estado se ve de un vistazo */
#dj-panel .song-aprobada { border-color: #7fae8e; background: #f1f8f3; }
#dj-panel .song-aprobada .badge { background: #cfe8d6; color: #24583a; }
#dj-panel .song-reproducida { opacity: .6; }
#dj-panel .song-reproducida .badge { background: #ddd; color: #444; }
#dj-panel .song-descartada { opacity: .6; }
