/* ============================================================================
   Tema oscuro "CQ La Plata" para el dashboard del reflector XLX
   Reemplaza css/layout.css de XLX_Dark_Dashboard (PP5PK). Mantiene todos los
   ids/clases que usan las paginas PHP. Inspirado en https://cqlaplata.ddns.net/ysf
   ============================================================================ */
:root {
    --bg-page          : #0a0e16;
    --bg-panel         : #111826;
    --bg-panel2        : #151f31;
    --bg-input         : #0d121c;
    --color-line       : #1f2b40;
    --color-line2      : #2a3a55;
    --color-text       : #dbe4f3;
    --color-muted      : #7f8da6;
    --color-link       : #38bdf8;
    --color-link-hover : #7dd3fc;
    --color-ok         : #34d399;
    --color-warn       : #fbbf24;
    --color-bad        : #f87171;
    --radius           : 14px;
    --font             : system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
    /* compatibilidad con el tema original */
    --bg-top: var(--bg-page); --bg-btn: var(--bg-panel2); --bg-btn-active: #0ea5e9; --bg-table: var(--bg-panel);
    --bg-tooltip: var(--bg-panel2); --bg-error: var(--bg-panel2); --color-error: var(--color-bad);
    --color-border: var(--color-line); --color-border-btn: var(--color-line2); --color-smalllink: var(--color-bad);
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg-page); }

body {
    margin: 0;
    padding: 0;
    min-width: 0;
    background: radial-gradient(1100px 520px at 85% -8%, #122038 0%, transparent 62%), var(--bg-page);
    color: var(--color-text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a img { border: 0; }
h1 { font-size: 24px; color: var(--color-text); }

/* ── Cabecera / hero ─────────────────────────────────────────────────────── */
#top {
    position: static !important;
    height: auto !important;
    min-width: 0 !important;
    width: 100% !important;
    background: none !important;
    order: 1;
    text-align: left !important;
}
#top .hero {
    max-width: 1180px;
    margin: 0 auto;
    padding: 34px 24px 8px;
}
#top .hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--color-link); background: rgba(56,189,248,.1);
    border: 1px solid rgba(56,189,248,.28); border-radius: 999px; padding: 4px 12px;
}
#top .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-ok); box-shadow: 0 0 10px var(--color-ok); animation: livePulse 1.6s ease-in-out infinite; }
#top .hero-title { margin: 14px 0 2px; font-size: 38px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; color: #fff; }
#top .hero-title span { color: var(--color-muted); font-weight: 500; font-size: 26px; }
#top .hero-sub { margin: 0 0 18px; color: var(--color-muted); }
#top .hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
#top .hstat { background: linear-gradient(180deg, var(--bg-panel2), var(--bg-panel)); border: 1px solid var(--color-line); border-radius: var(--radius); padding: 12px 16px; }
#top .hstat b { display: block; font-size: 26px; font-weight: 700; color: #fff; }
#top .hstat span { font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--color-muted); }
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ── Menu ────────────────────────────────────────────────────────────────── */
#menubar {
    position: sticky !important;
    top: 0 !important;
    left: auto !important;
    transform: none !important;
    height: auto !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    display: block !important;
    background: rgba(10,14,22,.86) !important;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-line);
    z-index: 20;
    order: 2;
    margin-top: 14px;
    overflow-x: auto;
    white-space: nowrap;
}
#menu { margin: 0 auto !important; float: none !important; height: auto !important; max-width: 1180px; padding: 8px 18px; }
#menu table { border-collapse: separate; border-spacing: 4px 0; }
#menu td { padding: 0; }
.menulink, .menulinkactive {
    display: inline-block;
    font-size: 14px !important;
    font-weight: 500;
    text-decoration: none !important;
    white-space: nowrap;
    border: 0 !important;
    border-radius: 999px;
    padding: 7px 16px !important;
    margin: 0 !important;
    color: var(--color-muted) !important;
    background: transparent !important;
    transition: background-color .2s, color .2s;
}
.menulink:hover { background: var(--bg-panel) !important; color: var(--color-text) !important; font-weight: 500; }
.menulinkactive { color: var(--color-text) !important; background: var(--bg-panel2) !important; box-shadow: inset 0 0 0 1px var(--color-line2); }

/* ── Contenido ───────────────────────────────────────────────────────────── */
#content {
    position: static !important;
    transform: none !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 1180px !important;
    margin: 0 auto;
    padding: 20px 24px 10px;
    color: var(--color-text);
    order: 3;
    flex: 1;
    overflow-x: auto;
    text-align: left;
}
#content > table, #content > table > tbody > tr > td > table { width: 100%; }
#content table[border="0"] { border-spacing: 0; }

.listingtable {
    width: 100%;
    margin-top: 8px !important;
    border: 1px solid var(--color-line) !important;
    border-collapse: separate !important;
    border-spacing: 0;
    background: var(--bg-panel) !important;
    color: var(--color-text);
    font-size: 14px !important;
    border-radius: var(--radius);
}
.listingtable th {
    height: auto !important;
    padding: 11px 10px;
    text-align: left;
    background: var(--bg-panel2) !important;
    background-image: none !important;
    color: var(--color-muted) !important;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--color-line2);
}
.listingtable th[align="center"], .listingtable td[align="center"] { text-align: center; }
.listingtable tr:first-child th:first-child { border-top-left-radius: var(--radius); }
.listingtable tr:first-child th:last-child { border-top-right-radius: var(--radius); }
.listingtable td {
    padding: 9px 10px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--color-line) !important;
    color: var(--color-text);
}
.listingtable tr[bgcolor] { background: transparent !important; }
.listingtable tr[bgcolor]:nth-child(even) { background: rgba(255,255,255,.018) !important; }
.listingtable tr[bgcolor]:hover { background: rgba(56,189,248,.07) !important; }
.listingtable tr:last-child td { border-bottom: 0 !important; }
.listingtable tr:last-child td:first-child { border-bottom-left-radius: var(--radius); }
.listingtable tr:last-child td:last-child { border-bottom-right-radius: var(--radius); }

/* Transmision en vivo */
@keyframes txPulse {
    0%   { background-color: rgba(251,191,36,.10); }
    50%  { background-color: rgba(251,191,36,.22); }
    100% { background-color: rgba(251,191,36,.10); }
}
tr.tx-active, .listingtable tr.tx-active[bgcolor] { animation: txPulse 1.4s ease-in-out infinite; background: rgba(251,191,36,.12) !important; }
tr.tx-active td { color: #fde68a !important; font-weight: 600; }
.tx-timer { color: var(--color-warn) !important; font-weight: 700; }

/* ── Enlaces y controles ─────────────────────────────────────────────────── */
a.tip { text-decoration: none; color: var(--color-link); }
a.tip:hover { position: relative; color: var(--color-link-hover); }
a.tip span { display: none; }
a.tip:hover span {
    background: var(--bg-panel2); border: 1px solid var(--color-line2); border-radius: 8px;
    font-size: 12px; white-space: nowrap; color: var(--color-text);
    padding: 5px 9px; margin: 8px; display: block; z-index: 50; position: absolute; top: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.45);
}
.pl, .listinglink { font-size: 14px; text-decoration: none; color: var(--color-link); }
.pl:hover, .listinglink:hover { color: var(--color-link-hover); text-decoration: underline; }
.smalllink { font-size: 12px; text-decoration: none; color: var(--color-bad); }
.smalllink:hover { text-decoration: underline; }

.FilterField {
    font: inherit; font-size: 13px;
    color: var(--color-text); background: var(--bg-input);
    width: 150px; height: 32px; padding: 0 10px;
    border: 1px solid var(--color-line2); border-radius: 9px;
}
.FilterField:focus { outline: 2px solid rgba(56,189,248,.4); border-color: var(--color-link); }
.FilterSubmit {
    font: inherit; font-size: 13px; color: var(--color-text);
    background: var(--bg-panel2); height: 32px; width: auto; padding: 0 14px;
    border: 1px solid var(--color-line2); border-radius: 9px; cursor: pointer;
}
.FilterSubmit:hover { border-color: var(--color-link); background: var(--bg-panel2); color: #fff; font-weight: 500; }
.error {
    font-size: 14px; font-weight: 600; color: var(--color-bad); background: rgba(248,113,113,.08);
    border: 1px solid rgba(248,113,113,.35); border-radius: 10px; width: 100%; padding: 12px 16px; margin: 8px 0;
}

/* ── Pie ─────────────────────────────────────────────────────────────────── */
.xfooter { width: 100%; text-align: center; margin-top: 40px; color: var(--color-muted); font-size: 12.5px; padding-bottom: 14px; }
.xfooter a { color: inherit; text-decoration: none; }
.xfooter b { color: var(--color-text); }
.xfooter img { opacity: .55; }

/* ── Movil ───────────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
    body { font-size: 14px; }
    #top .hero { padding: 22px 14px 4px; }
    #top .hero-title { font-size: 28px; }
    #top .hero-title span { font-size: 19px; }
    #content { padding: 14px 10px; }
    .listingtable { min-width: 700px; font-size: 13px !important; }
    #menu { padding: 6px 8px; }
}
