/* Sonora Panel — hoja de estilos
   Petróleo, grafito y terracota. Sin azul de plantilla. */

:root {
  --petrol:      #0d272c;
  --petrol-alto: #143a41;
  --petrol-bajo: #081b1f;
  --grafito:     #1b2224;
  --papel:       #f3f0ea;
  --papel-2:     #ffffff;
  --tinta:       #10191b;
  --apagado:     #6c7b7e;
  --linea:       rgba(13, 39, 44, .13);
  --terra:       #c2683f;
  --terra-suave: #e6a583;
  --teal:        #2f9c8c;
  --ambar:       #c9862f;
  --rojo:        #bf5548;

  --r: 3px;
  --sombra: 0 1px 2px rgba(13,39,44,.06), 0 4px 14px rgba(13,39,44,.05);
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --display: 'Space Grotesk', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--petrol); text-decoration: none; }
a:hover { color: var(--terra); }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--terra);
  color: #fff; padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--terra); outline-offset: 2px; }

/* ---------------------------------------------------------------- armazón */
.shell { display: flex; min-height: 100vh; }

.side {
  width: 230px; flex: 0 0 230px;
  background: var(--petrol);
  color: #cddcdd;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}

.brand {
  padding: 20px 20px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-mark {
  font-family: var(--display); font-weight: 700; font-size: 21px;
  letter-spacing: -.02em; color: #fff;
}

/* Medidor de señal: la firma de la casa. Late solo si hay radios al aire. */
.onair { display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.onair i {
  width: 3px; height: 4px; background: rgba(255,255,255,.22); border-radius: 1px;
}
.onair.live i { background: var(--terra); animation: vu 1.1s ease-in-out infinite; }
.onair.live i:nth-child(2) { animation-delay: .18s; }
.onair.live i:nth-child(3) { animation-delay: .36s; }
.onair.live i:nth-child(4) { animation-delay: .09s; }
@keyframes vu {
  0%, 100% { height: 4px; }
  50%      { height: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .onair.live i { animation: none; height: 10px; }
}

.side nav { padding: 14px 12px; flex: 1; }
.side nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; margin-bottom: 2px;
  color: #a9c0c2; border-radius: var(--r); font-size: 14px; font-weight: 500;
}
.side nav a svg { width: 17px; height: 17px; flex: 0 0 17px; opacity: .85; }
.side nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.side nav a.on {
  background: var(--petrol-alto); color: #fff;
  box-shadow: inset 2px 0 0 var(--terra);
}

.side-foot { padding: 14px 20px 18px; border-top: 1px solid rgba(255,255,255,.08); }
.who { display: flex; flex-direction: column; margin-bottom: 8px; }
.who strong { color: #fff; font-size: 14px; font-weight: 600; }
.who span { font-size: 11.5px; color: #7e999b; text-transform: uppercase; letter-spacing: .08em; }
.salir { font-size: 13px; color: #a9c0c2; }
.salir:hover { color: var(--terra-suave); }

main { flex: 1; min-width: 0; padding: 26px 34px 60px; max-width: 1180px; }

.top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; margin-bottom: 22px; padding-bottom: 18px;
  border-bottom: 1px solid var(--linea);
}
.top h1 {
  font-family: var(--display); font-size: 25px; font-weight: 600;
  letter-spacing: -.02em; margin: 0;
}
.lead { color: var(--apagado); margin: 4px 0 0; font-size: 14px; }
.lead code { font-family: var(--mono); font-size: 13px; color: var(--petrol); }
.back {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--apagado); margin-bottom: 6px;
}
.back svg { width: 14px; height: 14px; }
.top-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ---------------------------------------------------------------- avisos */
.aviso {
  padding: 11px 15px; margin-bottom: 16px; border-radius: var(--r);
  font-size: 14px; border-left: 3px solid;
}
.aviso.ok    { background: #e8f4f1; border-color: var(--teal); color: #1d5b52; }
.aviso.error { background: #fbeae7; border-color: var(--rojo); color: #8a3a30; }
.aviso.info  { background: #fdf1e8; border-color: var(--terra); color: #8b4726; }

/* ---------------------------------------------------------------- botones */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 8px 15px; border-radius: var(--r); border: 1px solid var(--linea);
  background: var(--papel-2); color: var(--petrol);
  font-family: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer;
  transition: background .12s, border-color .12s;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: #fff; border-color: rgba(13,39,44,.28); color: var(--petrol); }
.btn.pri { background: var(--petrol); border-color: var(--petrol); color: #fff; }
.btn.pri:hover { background: var(--petrol-alto); color: #fff; }
.btn.acc { background: var(--terra); border-color: var(--terra); color: #fff; }
.btn.acc:hover { background: #ad5b37; color: #fff; }
.btn.peligro { color: var(--rojo); border-color: rgba(191,85,72,.35); }
.btn.peligro:hover { background: #fbeae7; color: var(--rojo); }
.btn.chico { padding: 5px 10px; font-size: 12.5px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------------------------------------------------------------- tarjetas */
.tarjeta {
  background: var(--papel-2); border: 1px solid var(--linea);
  border-radius: var(--r); padding: 20px; margin-bottom: 18px;
  box-shadow: var(--sombra);
}
.tarjeta > h2, .bloque-tit {
  font-family: var(--display); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .11em; color: var(--apagado);
  margin: 0 0 14px;
}

.rejilla { display: grid; gap: 16px; }
.rejilla.c2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.rejilla.c3 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.rejilla.c4 { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }

/* cifras del resumen */
.cifra { background: var(--papel-2); border: 1px solid var(--linea); padding: 16px 18px; border-radius: var(--r); }
.cifra .n {
  font-family: var(--display); font-size: 30px; font-weight: 600;
  line-height: 1.1; letter-spacing: -.02em; color: var(--petrol);
}
.cifra .n.acento { color: var(--terra); }
.cifra .t { font-size: 12.5px; color: var(--apagado); margin-top: 2px; }

/* ---------------------------------------------------------------- radios */
.radio-fila {
  display: flex; align-items: center; gap: 14px;
  background: var(--papel-2); border: 1px solid var(--linea);
  border-left: 3px solid #cfcabf;
  padding: 13px 16px; margin-bottom: 7px; border-radius: var(--r);
}
.radio-fila.viva { border-left-color: var(--teal); }
.radio-fila.parada { border-left-color: #cfcabf; }
.radio-fila.suspendida { border-left-color: var(--ambar); background: #fdf8f0; }
.radio-fila .nom { flex: 1 1 200px; min-width: 0; }
.radio-fila .nom a { font-weight: 600; font-size: 15px; }
.radio-fila .nom small { display: block; color: var(--apagado); font-family: var(--mono); font-size: 11.5px; }
.radio-fila .oy { font-family: var(--mono); font-size: 13px; color: var(--petrol); min-width: 74px; text-align: right; }
.radio-fila .oy b { font-weight: 500; }
.radio-fila .sonando {
  flex: 2 1 220px; min-width: 0; color: var(--apagado); font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.radio-fila .acc { display: flex; gap: 6px; flex-shrink: 0; }

.estado { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; }
.estado::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #c3bdb2; }
.estado.viva::before { background: var(--teal); box-shadow: 0 0 0 3px rgba(47,156,140,.16); }
.estado.suspendida::before { background: var(--ambar); }
.estado.error::before { background: var(--rojo); }

/* ---------------------------------------------------------------- tablas */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--apagado); font-weight: 600; padding: 0 12px 9px; border-bottom: 1px solid var(--linea);
}
td { padding: 11px 12px; border-bottom: 1px solid var(--linea); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.mono, .mono { font-family: var(--mono); font-size: 12.5px; }
td.der, th.der { text-align: right; }

/* ---------------------------------------------------------------- formas */
.campo { margin-bottom: 15px; }
.campo label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 5px; }
.campo .pista { font-size: 12.5px; color: var(--apagado); margin-top: 4px; }
input[type=text], input[type=password], input[type=email], input[type=number],
input[type=url], select, textarea {
  width: 100%; padding: 8px 11px; font-family: inherit; font-size: 14px;
  border: 1px solid rgba(13,39,44,.22); border-radius: var(--r);
  background: var(--papel-2); color: var(--tinta);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--petrol); box-shadow: 0 0 0 3px rgba(13,39,44,.08);
}
textarea { resize: vertical; min-height: 76px; }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 14px; }
.check input { width: 16px; height: 16px; accent-color: var(--terra); }
.acciones-form { display: flex; gap: 8px; align-items: center; margin-top: 18px; }

/* credenciales */
.cred { display: grid; grid-template-columns: 150px 1fr auto; gap: 8px 14px; align-items: center; }
.cred dt { font-size: 13px; color: var(--apagado); display: flex; align-items: center; gap: 6px; }
.cred dt svg { width: 13px; height: 13px; flex: 0 0 auto; opacity: .7; }
.cred dd {
  margin: 0; font-family: var(--mono); font-size: 13px; color: var(--petrol);
  overflow-wrap: anywhere;
}
.copiar {
  border: 0; background: none; color: var(--apagado); cursor: pointer;
  font-size: 12px; font-family: inherit; padding: 3px 7px; border-radius: var(--r);
}
.copiar:hover { background: var(--papel); color: var(--terra); }

/* uso */
.uso { margin-bottom: 13px; }
.uso-lbl { font-size: 13px; font-weight: 500; }
.uso-val { float: right; font-family: var(--mono); font-size: 12px; color: var(--apagado); }
.uso-bar { clear: both; height: 5px; background: rgba(13,39,44,.09); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.uso-bar i { display: block; height: 100%; background: var(--teal); border-radius: 3px; transition: width .4s; }
.uso-bar i.medio { background: var(--ambar); }
.uso-bar i.alto  { background: var(--rojo); }

/* pestañas */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--linea); margin-bottom: 20px; }
.tabs a {
  padding: 9px 15px; font-size: 14px; font-weight: 500; color: var(--apagado);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--petrol); }
.tabs a.on { color: var(--petrol); border-bottom-color: var(--terra); }

/* vacíos */
.vacio {
  background: var(--papel-2); border: 1px dashed rgba(13,39,44,.2);
  padding: 38px 26px; text-align: center; border-radius: var(--r);
}
.vacio p { color: var(--apagado); margin: 0 0 16px; }
.vacio code {
  display: block; font-family: var(--mono); font-size: 13px;
  background: var(--papel); padding: 9px 12px; margin: 12px auto 0; max-width: 460px;
}

/* biblioteca */
.pista-fila {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px;
  background: var(--papel-2); border: 1px solid var(--linea);
  border-radius: var(--r); margin-bottom: 5px; cursor: grab;
}
.pista-fila:hover { border-color: rgba(13,39,44,.25); }
.pista-fila.arrastrando { opacity: .4; }
.pista-fila .idx { font-family: var(--mono); font-size: 12px; color: var(--apagado); width: 26px; }
.pista-fila .tit { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pista-fila .peso { font-family: var(--mono); font-size: 12px; color: var(--apagado); }

.soltar {
  border: 2px dashed rgba(13,39,44,.2); border-radius: var(--r);
  padding: 26px; text-align: center; color: var(--apagado);
  transition: border-color .15s, background .15s;
}
.soltar.encima { border-color: var(--terra); background: #fdf1e8; color: var(--terra); }
.subiendo { margin-top: 14px; }
.subiendo div { font-size: 13px; margin-bottom: 6px; }
.subiendo .barra { height: 4px; background: rgba(13,39,44,.1); border-radius: 2px; overflow: hidden; }
.subiendo .barra i { display: block; height: 100%; background: var(--terra); width: 0; transition: width .2s; }

/* entrar */
.entrar-envoltura {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--petrol); padding: 24px;
}
.entrar {
  width: 100%; max-width: 370px; background: var(--papel);
  padding: 34px 32px 30px; border-radius: var(--r);
}
.entrar h1 {
  font-family: var(--display); font-size: 27px; font-weight: 700;
  letter-spacing: -.02em; margin: 0 0 3px; color: var(--petrol);
}
.entrar .sub { color: var(--apagado); font-size: 13.5px; margin: 0 0 24px; }
.entrar .btn { width: 100%; padding: 10px; margin-top: 4px; }
.entrar-pie { text-align: center; margin-top: 20px; font-size: 12px; color: var(--apagado); }
.entrar-pie + .entrar-pie { margin-top: 6px; }
.entrar.registro { max-width: 480px; }
.entrar.registro .rejilla { margin-bottom: 4px; }

.planes { display: flex; flex-direction: column; gap: 8px; }
.plan {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 3px 10px;
  border: 1px solid var(--linea); border-radius: var(--r); padding: 10px 12px;
  cursor: pointer; transition: border-color .12s, background .12s;
}
.plan:hover { border-color: rgba(194,104,63,.4); }
.plan:has(input:checked) { border-color: var(--terra); background: #fdf6f2; }
.plan input { grid-row: 1 / 3; accent-color: var(--terra); }
.plan-nom { font-weight: 600; font-size: 13.5px; }
.plan-precio { grid-row: 1 / 3; font-family: var(--mono); font-size: 13px; color: var(--terra); font-weight: 500; white-space: nowrap; }
.plan-datos { grid-column: 2; font-size: 11.5px; color: var(--apagado); }

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .side { width: 100%; flex: none; height: auto; position: static; }
  .side nav { display: flex; overflow-x: auto; padding: 8px; }
  .side nav a { flex-direction: column; gap: 3px; font-size: 11.5px; padding: 8px 12px; white-space: nowrap; }
  .side nav a.on { box-shadow: inset 0 -2px 0 var(--terra); }
  .side-foot { display: flex; justify-content: space-between; align-items: center; }
  main { padding: 20px 16px 50px; }
  .radio-fila { flex-wrap: wrap; }
  .cred { grid-template-columns: 1fr; gap: 2px 0; }
  .cred dt { margin-top: 8px; }
}

/* ---------------------------------------------------------------- iconos */
svg { width: 1em; height: 1em; vertical-align: -2px; }

/* ---------------------------------------------------------------- primeros pasos */
.pasos { display: flex; gap: 12px; flex-wrap: wrap; }
.paso {
  display: flex; align-items: center; gap: 10px; flex: 1 1 180px;
  padding: 10px 12px; border: 1px solid var(--linea); border-radius: var(--r);
  color: var(--tinta); background: var(--papel-2); transition: border-color .12s;
}
.paso:hover { border-color: var(--terra); color: var(--tinta); }
.paso-check {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--papel); border: 1px solid var(--linea);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--apagado);
}
.paso-check svg { width: 13px; height: 13px; }
.paso.hecho { opacity: .6; }
.paso.hecho .paso-check { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ---------------------------------------------------------------- reproductor */
.reproductor {
  background: var(--papel); border: 1px solid var(--linea); border-radius: var(--r);
  padding: 14px 16px;
}
.rp-fila { display: flex; align-items: center; gap: 12px; }
.rp-play {
  flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%;
  background: var(--petrol); color: #fff; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  transition: background .15s;
}
.rp-play:hover { background: var(--petrol-alto); }
.rp-play svg { width: 16px; height: 16px; margin-left: 2px; }
.rp-play.tocando svg { margin-left: 0; }
.rp-info { flex: 1 1 auto; min-width: 0; }
.rp-est { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--apagado); text-transform: uppercase; letter-spacing: .06em; }
.reproductor .onair i { background: rgba(13,39,44,.18); }
.reproductor .onair.live i { background: var(--teal); }
.rp-sonando { font-size: 14px; font-weight: 500; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-oy { flex: 0 0 auto; text-align: center; font-size: 11px; color: var(--apagado); }
.rp-oy b { display: block; font-family: var(--display); font-size: 17px; color: var(--tinta); font-weight: 600; }
.rp-vol { flex: 0 0 74px; accent-color: var(--terra); }

.reproductor.compacto { padding: 10px 12px; }
.reproductor.compacto .rp-play { flex-basis: 34px; width: 34px; height: 34px; }
.reproductor.compacto .rp-play svg { width: 13px; height: 13px; }
.reproductor.compacto .rp-sonando { font-size: 12.5px; }
.reproductor.compacto .rp-est { font-size: 10.5px; }
.reproductor.compacto .rp-oy b { font-size: 14px; }
.reproductor.compacto .rp-vol { display: none; }

@media (max-width: 480px) {
  .rp-vol { display: none; }
}

/* ---------------------------------------------------------------- código embed */
.emb-code {
  display: flex; align-items: center; gap: 8px; background: var(--papel);
  border: 1px solid var(--linea); border-radius: var(--r); padding: 8px 10px;
}
.emb-code code {
  flex: 1 1 auto; min-width: 0; font-family: var(--mono); font-size: 11.5px;
  color: var(--petrol); white-space: nowrap; overflow-x: auto; padding-bottom: 2px;
}
.emb-code .copiar { flex: 0 0 auto; }

/* ---------------------------------------------------------------- página pública */
.escucha-shell {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 40px 18px;
}
.escucha-card {
  width: 100%; max-width: 460px; background: var(--papel-2); border: 1px solid var(--linea);
  border-radius: 6px; box-shadow: var(--sombra); padding: 30px 28px;
}
.escucha-portada {
  width: 100%; aspect-ratio: 1.9 / 1; object-fit: cover; border-radius: 4px;
  margin-bottom: 16px; display: block;
}
.escucha-cab { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.escucha-marca {
  font-family: var(--display); font-weight: 600; font-size: 12.5px; color: var(--terra);
  text-transform: uppercase; letter-spacing: .1em;
}
.escucha-genero {
  font-size: 11.5px; color: var(--apagado); background: var(--papel);
  padding: 3px 9px; border-radius: 20px; border: 1px solid var(--linea);
}
.escucha-card h1 {
  font-family: var(--display); font-size: 25px; font-weight: 700; letter-spacing: -.01em;
  margin: 0 0 8px; color: var(--petrol);
}
.escucha-desc { color: var(--apagado); font-size: 13.5px; margin: 0 0 20px; }
.escucha-pie { text-align: center; margin-top: 18px; font-size: 12px; color: var(--apagado); }

.embed-body { background: transparent !important; }
.escucha-embed { padding: 0; }
.rp-credito {
  display: block; margin-top: 6px; font-size: 11px; color: var(--apagado); text-align: right;
}
.rp-credito:hover { color: var(--terra); }
