/* Estilos del panel (usa las variables de app.css) */
button { cursor: pointer; }
.caja {
  background: rgba(20, 16, 38, .85); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  backdrop-filter: blur(10px);
}
.login { max-width: 420px; margin: 30px auto; }
.login h2 { font-family: var(--font-display); margin: 0 0 6px; font-size: 22px; }
.login p { color: var(--muted); margin: 0 0 18px; }
.formu { display: flex; flex-direction: column; gap: 12px; }
.campo { display: flex; flex-direction: column; gap: 5px; font-size: 14px; color: var(--muted); font-weight: 500; }
.campo small { font-weight: 400; opacity: .8; }
.campo input, .campo select, .campo textarea {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; color: var(--txt); width: 100%; min-width: 0;
}
.campo textarea { resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: 2px solid var(--purple); outline-offset: 0; border-color: transparent; }
.etq { font-size: 14px; color: var(--muted); font-weight: 500; }
.etq small { font-weight: 400; }
.btn-pri {
  background: var(--grad); border: 0; color: #fff; font-weight: 700; padding: 12px 20px; border-radius: 14px;
  box-shadow: 0 6px 22px rgba(255, 46, 147, .3);
}
.btn-pri:disabled { opacity: .6; cursor: wait; }
.btn-sec { background: var(--card2); border: 1px solid var(--line); color: var(--txt); font-weight: 600; padding: 10px 14px; border-radius: 12px; white-space: nowrap; }
.btn-sec:hover { border-color: var(--purple); }
.btn-txt { background: none; border: 0; color: var(--cyan); font-weight: 600; padding: 4px 0; text-align: left; }
.peligro { color: #ff5d7a !important; }
.error { color: #ff6b8a; margin: 0; min-height: 1em; font-weight: 600; }
.nota { color: var(--muted); font-size: 13px; margin: 0; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.check input { width: 18px; height: 18px; accent-color: var(--pink); }
.con-btn { display: flex; gap: 6px; }

/* Pestañas del panel */
.ptabs { display: flex; gap: 6px; overflow-x: auto; margin: 6px 0 18px; scrollbar-width: none; }
.ptabs button {
  flex: none; background: var(--card); border: 1px solid var(--line); padding: 10px 16px; border-radius: 999px; font-weight: 600; color: var(--muted);
}
.ptabs button.on { background: #fff; color: #120d22; border-color: #fff; }
.ptabs .num { background: var(--pink); color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 7px; margin-left: 4px; }

.barra-p { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.barra-p .fila { gap: 8px; }
.barra-p select { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }

/* Filas de eventos / discos */
.lista { display: flex; flex-direction: column; gap: 10px; }
.item {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; background: var(--card);
  border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px;
}
.item.revision { border-color: rgba(255, 213, 74, .55); background: linear-gradient(90deg, rgba(255, 213, 74, .07), var(--card) 40%); }
.item.pasado { opacity: .55; }
.mini { width: 64px; height: 80px; border-radius: 10px; overflow: hidden; position: relative; background: var(--card2); }
.mini img { width: 100%; height: 100%; object-fit: cover; }
.mini .arte span { display: none; }
.mini .arte::before { inset: 4px; border-radius: 6px; border-width: 1px; }
.item h4 { margin: 0 0 3px; font-size: 16px; }
.item .meta { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.item .meta a { color: var(--cyan); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); }
.tag.ok { color: #4ade80; border-color: rgba(74, 222, 128, .4); }
.tag.rev { color: #ffd54a; border-color: rgba(255, 213, 74, .5); }
.tag.ig { color: #ff7bc0; border-color: rgba(255, 123, 192, .4); }
.btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.btns button, .btns a { background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; font-size: 13px; font-weight: 600; text-decoration: none; }
.btns button:hover, .btns a:hover { border-color: var(--purple); }
.btns .publicar { background: #16a34a; border-color: #16a34a; color: #fff; }
.av-disco { width: 64px; height: 64px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-weight: 800; font-size: 24px; overflow: hidden; }
.av-disco img { width: 100%; height: 100%; object-fit: cover; }
.vacio-p { text-align: center; color: var(--muted); padding: 40px 10px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* Ventanas */
.dlg {
  border: 1px solid var(--line); background: var(--bg2); color: var(--txt); border-radius: 24px; padding: 0;
  width: min(900px, 96vw); max-height: 94vh; box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
}
.dlg::backdrop { background: rgba(4, 3, 9, .75); backdrop-filter: blur(5px); }
.dlg .formu { padding: 20px 22px; }
.dlg-cab { display: flex; justify-content: space-between; align-items: center; }
.dlg-cab h3 { margin: 0; font-family: var(--font-display); font-size: 20px; }
.x { background: var(--card2); border: 0; width: 36px; height: 36px; border-radius: 50%; color: var(--txt); font-size: 16px; }
.dlg-pie { display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: -20px; background: var(--bg2); padding: 10px 0 0; }
.dos { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.dos-c { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tres { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; }
.subir {
  display: grid; place-items: center; aspect-ratio: 4 / 5; border: 2px dashed var(--line); border-radius: 16px; cursor: pointer;
  overflow: hidden; background: var(--card); transition: border-color .15s;
}
.subir:hover, .subir.arrastrando { border-color: var(--pink); }
.subir-vacio { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 34px; color: var(--muted); text-align: center; }
.subir-vacio b { font-size: 16px; color: var(--txt); }
.subir-vacio small { font-size: 13px; }
.subir img { width: 100%; height: 100%; object-fit: cover; }
.mapa-mini { height: 300px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.resultados { list-style: none; margin: -4px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.resultados li button { width: 100%; text-align: left; background: var(--card); border: 0; border-bottom: 1px solid var(--line); padding: 9px 12px; font-size: 13px; }
.resultados li button:hover { background: var(--card2); }
.acceso { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; margin: 0; }
.acceso legend { padding: 0 6px; font-weight: 700; }

/* Instagram / ajustes */
.tarjetas { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 16px; }
.estado-c { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.estado-c .t { color: var(--muted); font-size: 13px; }
.estado-c .v { font-size: 18px; font-weight: 700; margin-top: 4px; }
.verde { color: #4ade80; } .amarillo { color: #ffd54a; } .rojo { color: #ff6b8a; }
.seccion { margin-bottom: 18px; }
.seccion h3 { font-family: var(--font-display); font-size: 17px; margin: 0 0 12px; }
.log { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.log li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.log time { color: var(--muted); margin-right: 6px; }
details.ayuda { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; }
details.ayuda summary { cursor: pointer; font-weight: 700; }
details.ayuda ol { padding-left: 20px; color: #d8d2ee; }
details.ayuda li { margin: 8px 0; }
details.ayuda a { color: var(--cyan); }
.interruptor { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.interruptor input { width: 50px; height: 28px; accent-color: var(--pink); }

@media (max-width: 760px) {
  .dos, .dos-c { grid-template-columns: 1fr; }
  .tres { grid-template-columns: 1fr 1fr; }
  .tres .campo:first-child { grid-column: 1 / -1; }
  .item { grid-template-columns: 52px 1fr; }
  .mini, .av-disco { width: 52px; height: 64px; }
  .av-disco { height: 52px; }
  .btns { grid-column: 1 / -1; justify-content: flex-start; }
  .subir { aspect-ratio: 16 / 10; }
  .mapa-mini { height: 240px; }
}
.lista-datos { display: grid; gap: 10px; margin: 0; }
.lista-datos dd { margin: 0; font-weight: 600; }
button.link-panel { background: none; cursor: pointer; font: inherit; font-size: 13px; }

/* Aviso del token de Meta */
.aviso-top { border-radius: 16px; padding: 12px 16px; margin: 4px 0 12px; font-weight: 600; }
.aviso-top.amarillo { background: rgba(255, 213, 74, .12); border: 1px solid rgba(255, 213, 74, .5); color: #ffe08a; }
.aviso-top.rojo { background: rgba(255, 93, 122, .12); border: 1px solid rgba(255, 93, 122, .55); color: #ff9aad; }
.aviso-top .btn-txt { margin-left: 6px; }

/* ---------- Estadísticas ---------- */
.stats-ev { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.stats-ev b { color: var(--txt); }
.stats-ev.vacio { font-style: italic; }
.periodos { flex-wrap: wrap; }
.periodos .btn-sec.on { border-color: var(--pink); color: #fff; background: rgba(255, 46, 147, .18); }
.stats-tot { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stats-tot .v { font-size: 26px; font-weight: 800; }
.tabla-c { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.tabla th, .tabla td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tabla th:first-child, .tabla td:first-child { text-align: left; white-space: normal; min-width: 180px; }
.tabla th { color: var(--muted); font-weight: 600; font-size: 12.5px; background: var(--card); position: sticky; top: 0; }
.tabla tbody tr:last-child td { border-bottom: 0; }
.tabla small { color: var(--muted); }
