/* ============================================================================
   Tema "CQ La Plata" v3 para el dashboard XLX (overlay sobre layout.css)
   Basado en cqlaplata.ddns.net: casi negro, tarjetas redondeadas, titulares
   en negrita, etiquetas en mayúsculas espaciadas y acento verde "en vivo".
   Para cambiar colores, tocá solo las variables de este bloque.
   ========================================================================== */
:root {
    --bg-page          : #05080e;
    --bg-top           : transparent;
    --bg-menubar-from  : #05080e;
    --bg-menubar-to    : #05080e;
    --bg-btn           : transparent;
    --bg-btn-active    : transparent;
    --bg-table         : #080c14;
    --bg-th-from       : #0b101a;
    --bg-th-to         : #0b101a;
    --bg-th            : #0b101a;
    --bg-filter-btn    : #f2a72e;
    --bg-filter-field  : #e6ebf3;
    --bg-tooltip       : #121a29;
    --bg-error         : #2a1519;
    --color-text       : #e6ebf3;
    --color-link       : #7cc4ff;
    --color-link-hover : #bfe3ff;
    --color-error      : #ff8a80;
    --color-border     : #1d2535;
    --color-border-btn : #2a3447;
    --color-smalllink  : #ff6b6b;
    --color-filter-txt : #05080e;

    --cq-amber         : #f2a72e;   /* color de "ÚLTIMA TRANSMISIÓN" */
    --cq-amber-soft    : rgba(242,167,46,.35);
    --cq-live          : #34d399;
    --cq-muted         : #8591a5;
    --cq-row-a         : #080c14;
    --cq-row-b         : #0b101a;
    --cq-row-hover     : #131c2d;
    --cq-radius        : 22px;
}

body {
    font-family : Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background  : var(--bg-page);
    color       : var(--color-text);
    display     : flex;
    flex-direction: column;
    min-width   : 0;
}

/* ── Estructura: menú arriba, cabecera, contenido (flujo normal) ─────────── */
#menubar {
    order       : 1;
    position    : static;
    left        : auto;
    transform   : none;
    width       : calc(100% - 48px);
    max-width   : 1132px;
    min-width   : 0;
    height      : auto;
    margin      : 0 auto 6px;
    padding     : 0;
    box-sizing  : border-box;
    justify-content: flex-start;
    background  : transparent;
    border-top  : 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    box-shadow  : none;
}
#menu  { float: none; height: auto; margin-top: 0; }
#menu table { margin: 0; }
#top {
    order       : 0;
    position    : static;
    height      : auto;
    width       : 100%;
    min-width   : 0;
    background  : transparent;
    border      : 0;
    display     : block;
}
#content {
    order       : 2;
    position    : static;
    left        : auto;
    top         : auto;
    transform   : none;
    width       : 100%;
    max-width   : 1180px;
    margin      : 0 auto;
    padding     : 0 24px 48px;
    box-sizing  : border-box;
}
h1 { color: var(--color-text); }

/* ── Menú ────────────────────────────────────────────────────────────────── */
.menulink, .menulinkactive {
    font-size     : 11.5pt;
    font-weight   : 600;
    border        : 0;
    border-bottom : 2px solid transparent;
    border-radius : 0;
    padding       : 14px 4px 12px;
    margin        : 0 14px 0 0;
    letter-spacing: .1px;
    background    : transparent;
    box-shadow    : none;
    transition    : color .15s ease, border-color .15s ease;
}
.menulink { color: var(--cq-muted); }
.menulink:hover {
    background    : transparent;
    color         : var(--color-text);
    font-weight   : 600;
    border-bottom-color: var(--color-border-btn);
}
.menulinkactive {
    background    : transparent;
    color         : var(--cq-amber);
    border-bottom-color: var(--cq-amber);
}

/* ── Cabecera (tarjeta del reflector) ────────────────────────────────────── */
.cq-hero {
    display       : grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap           : 28px 40px;
    align-items   : end;
    max-width     : 1180px;
    margin        : 0 auto;
    padding       : 52px 24px 30px;
    box-sizing    : border-box;
    text-align    : left;
}
.cq-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.cq-pill {
    display       : inline-flex;
    align-items   : center;
    gap           : 8px;
    font-size     : 9.5pt;
    font-weight   : 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding       : 5px 14px;
    border-radius : 999px;
    background    : #151b27;
    color         : #cbd5e1;
}
.cq-live { background: rgba(52,211,153,.10); color: var(--cq-live); text-transform: none; letter-spacing: .02em; }
.cq-live i {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--cq-live);
    box-shadow: 0 0 0 0 rgba(52,211,153,.6);
    animation: cqPing 1.8s ease-out infinite;
}
.cq-live .tx { display: none; }
body:has(tr.tx-active) .cq-live { background: rgba(248,113,113,.12); color: #fca5a5; }
body:has(tr.tx-active) .cq-live i { background: #f87171; }
body:has(tr.tx-active) .cq-live .idle { display: none; }
body:has(tr.tx-active) .cq-live .tx { display: inline; }
@keyframes cqPing {
    0%   { box-shadow: 0 0 0 0 rgba(52,211,153,.55); }
    80%  { box-shadow: 0 0 0 9px rgba(52,211,153,0); }
    100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}
.cq-hero-h1 {
    margin        : 0;
    font-size     : 58pt;
    font-weight   : 800;
    line-height   : 1.02;
    letter-spacing: -.02em;
    color         : var(--cq-amber);
}
.cq-hero-sub { margin: 14px 0 0; font-size: 14pt; color: var(--cq-muted); }
.cq-hero-sub b { color: var(--cq-amber); font-weight: 600; }

.cq-stats { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)); gap: 12px; }
.cq-stat {
    border        : 1px solid var(--color-border);
    border-radius : 18px;
    background    : var(--bg-table);
    padding       : 16px 18px;
    min-width     : 150px;
}
.cq-stat-l { font-size: 8.5pt; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cq-muted); }
.cq-stat-v { margin-top: 8px; font-size: 21pt; font-weight: 800; color: var(--cq-amber); line-height: 1.1; white-space: nowrap; }
.cq-stat-s { margin-top: 4px; font-size: 9pt; color: var(--cq-muted); }

/* ── Tablas como tarjetas ────────────────────────────────────────────────── */
.listingtable {
    border-collapse : separate;
    border-spacing  : 0;
    border          : 1px solid var(--color-border);
    border-radius   : var(--cq-radius);
    overflow        : hidden;
    background      : var(--bg-table);
    box-shadow      : none;
    margin-top      : 14px;
}
.listingtable th {
    background      : var(--bg-th);
    color           : var(--cq-muted);
    font-size       : 9pt;
    font-weight     : 700;
    text-transform  : uppercase;
    letter-spacing  : .14em;
    border-bottom   : 1px solid var(--color-border);
    background-image: none;
}
.listingtable td {
    border          : 0;
    border-bottom   : 1px solid var(--color-border);
    padding         : 5px 10px;
}
.listingtable tr:last-child td { border-bottom: 0; }

/* Las filas traen bgcolor="#252525"/"#2c2c2c" desde PHP; se re-pintan acá. */
.listingtable tr[bgcolor="#252525"] { background-color: var(--cq-row-a); }
.listingtable tr[bgcolor="#2c2c2c"] { background-color: var(--cq-row-b); }
.listingtable tr[bgcolor="#586553"],
.listingtable tr[bgcolor]:hover     { background-color: var(--cq-row-hover); }
.listingtable td[bgcolor="#2c2c2c"] { background-color: var(--cq-row-b); }

/* ── Transmisión en curso ────────────────────────────────────────────────── */
@keyframes txPulse {
    0%   { background-color: #062a22; }
    50%  { background-color: #0b4a3a; }
    100% { background-color: #062a22; }
}
tr.tx-active,
.listingtable tr[bgcolor="#4a2000"] { animation: txPulse 1.2s ease-in-out infinite; }
tr.tx-active td,
.listingtable tr[bgcolor="#4a2000"] td { color: #9ff5d3 !important; font-weight: 700; }

/* ── Enlaces, filtros, errores ───────────────────────────────────────────── */
a.tip, .pl, .listinglink { color: var(--color-link); }
a.tip:hover { color: var(--color-link-hover); }
a.tip:hover span { border: 1px solid var(--color-border-btn); border-radius: 8px; opacity: .97; }

.FilterField  { border-radius: 8px; border: 1px solid var(--color-border-btn); height: 24px; }
.FilterSubmit {
    border-radius: 999px; border: 0; cursor: pointer;
    background: var(--bg-filter-btn); color: #05080e; font-weight: 700;
}
.FilterSubmit:hover { background: #ffc25a; color: #05080e; }
.error { border-left: 4px solid var(--color-error); border-radius: 10px; }

/* ── Pie de página (el PHP trae color inline #c3dcba) ────────────────────── */
#content div[style*="c3dcba"] { color: var(--cq-muted) !important; }
#content div[style*="c3dcba"] b { color: var(--cq-amber); }

* { scrollbar-color: #24334f #05080e; scrollbar-width: thin; }

@media (max-width: 900px) {
    .cq-hero { grid-template-columns: 1fr; padding-top: 32px; }
    .cq-hero-h1 { font-size: 38pt; }
    .cq-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cq-stat-v { font-size: 16pt; }
    #content { padding: 0 10px 40px; }
    #menubar { width: calc(100% - 20px); overflow-x: auto; }
}
