/*
 * SportShow v2.1.0
 * Diseño oficial: oscuro, deportivo, legible y responsive.
 */

:root {
    --bg: #050914;
    --bg-soft: #08101d;
    --surface: #0d1728;
    --surface-2: #121f33;
    --surface-3: #182840;
    --line: #23344f;
    --line-soft: rgba(148, 163, 184, .16);
    --text: #f8fafc;
    --muted: #9aa9bd;
    --muted-2: #718198;
    --red: #f22543;
    --red-2: #ff4d64;
    --blue: #3b82f6;
    --green: #22c997;
    --yellow: #f7b731;
    --danger: #ef4444;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --shadow: 0 20px 55px rgba(0, 0, 0, .28);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, .20);
    --container: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 9% 0%, rgba(242, 37, 67, .12), transparent 25rem),
        radial-gradient(circle at 92% 3%, rgba(59, 130, 246, .10), transparent 28rem),
        var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

main { min-height: calc(100vh - 220px); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.container {
    width: min(var(--container), calc(100% - 40px));
    margin-inline: auto;
}
.narrow { width: min(760px, calc(100% - 40px)); }
.section { padding: 42px 0 56px; }

/* Cabecera */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(5, 9, 20, .92);
    border-bottom: 1px solid var(--line-soft);
    backdrop-filter: blur(18px);
}
.header-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-weight: 950;
    letter-spacing: -.035em;
}
.brand-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    font-size: 1.25rem;
    font-style: italic;
    background: linear-gradient(135deg, var(--red), var(--red-2));
    box-shadow: 0 10px 28px rgba(242, 37, 67, .30);
}
.brand-text { font-size: 1.25rem; }
.brand-text span { color: var(--red-2); }
.nav {
    display: flex;
    align-items: center;
    gap: 23px;
    color: #b8c4d5;
    font-size: .93rem;
    font-weight: 700;
}
.nav a {
    position: relative;
    padding: 26px 0;
    transition: color .18s ease;
}
.nav a:hover { color: #fff; }
.nav a:hover::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 17px;
    left: 0;
    height: 2px;
    border-radius: 99px;
    background: var(--red);
}
.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #fff;
    background: var(--surface);
    cursor: pointer;
    font-size: 1.25rem;
}

/* Tipografía y elementos comunes */
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.08; }
h1 {
    margin: 10px 0 16px;
    font-size: clamp(2.35rem, 5vw, 4.8rem);
    letter-spacing: -.055em;
}
h2 {
    margin: 8px 0 0;
    font-size: clamp(1.7rem, 3vw, 2.55rem);
    letter-spacing: -.04em;
}
h3 { letter-spacing: -.025em; }
.eyebrow,
.category {
    color: var(--red-2);
    font-size: .76rem;
    font-weight: 950;
    letter-spacing: .15em;
    text-transform: uppercase;
}
.text-link {
    color: #9ec1ff;
    font-weight: 850;
    white-space: nowrap;
}
.text-link:hover { color: #fff; }

.btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 17px;
    border: 0;
    border-radius: 11px;
    color: #fff;
    cursor: pointer;
    font-weight: 900;
    line-height: 1;
    transition: transform .16s ease, filter .16s ease, border-color .16s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn.primary { background: linear-gradient(135deg, var(--red), var(--red-2)); }
.btn.secondary { border: 1px solid var(--line); background: var(--surface-2); }
.btn.danger { background: #8b1d2c; }
.btn.tiny { min-height: 36px; padding: 8px 11px; font-size: .80rem; }
.btn.full { width: 100%; }

input, textarea, select {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 11px;
    outline: 0;
    color: #fff;
    background: #081120;
    transition: border-color .16s ease, box-shadow .16s ease;
}
textarea { min-height: 120px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #67778e; }
input:focus, textarea:focus, select:focus {
    border-color: rgba(242, 37, 67, .78);
    box-shadow: 0 0 0 3px rgba(242, 37, 67, .12);
}
select option { color: #fff; background: #081120; }

.panel {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(18, 31, 51, .96), rgba(13, 23, 40, .96));
    box-shadow: var(--shadow-soft);
}
.alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-weight: 700;
}
.alert.success { color: #93f5d4; border-color: rgba(34, 201, 151, .34); background: rgba(34, 201, 151, .11); }
.alert.danger { color: #fecaca; border-color: rgba(239, 68, 68, .34); background: rgba(239, 68, 68, .11); }
.empty {
    padding: 60px 26px;
    border: 1px dashed #31435f;
    border-radius: var(--radius-lg);
    text-align: center;
    color: var(--muted);
    background: rgba(13, 23, 40, .45);
}
.empty h1, .empty h2 { color: #fff; }

/* Portada */
.v2-hero {
    padding: 72px 0 48px;
    border-bottom: 1px solid var(--line-soft);
    background:
        radial-gradient(circle at 78% 18%, rgba(59, 130, 246, .19), transparent 24rem),
        linear-gradient(180deg, rgba(9, 17, 31, .96), rgba(5, 9, 20, .92));
}
.v2-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(330px, .82fr);
    gap: 48px;
    align-items: center;
}
.v2-hero h1 span { color: #83adff; }
.v2-hero p {
    max-width: 690px;
    margin: 0;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.75;
}
.hero-search {
    max-width: 680px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 25px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 13px; }
.live-console {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(13, 23, 40, .95);
    box-shadow: var(--shadow);
}
.console-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    font-size: .84rem;
    letter-spacing: .06em;
}
.pulse {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 0 7px rgba(242, 37, 67, .13);
}
.live-console a {
    display: grid;
    gap: 4px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line-soft);
    transition: background .16s ease;
}
.live-console a:last-child { border-bottom: 0; }
.live-console a:hover { background: rgba(255, 255, 255, .035); }
.live-console a span { color: #85aeff; font-size: .72rem; font-weight: 950; letter-spacing: .08em; }
.live-console a b { font-size: .98rem; }
.live-console a em { color: #fff; font-size: .72rem; font-style: normal; font-weight: 900; }
.console-empty { padding: 34px 20px; color: var(--muted); text-align: center; }

.stat-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: hidden;
    margin-top: -1px;
    border: 1px solid var(--line);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    background: var(--surface);
}
.stat-strip div {
    min-width: 0;
    padding: 22px 24px;
    border-right: 1px solid var(--line);
}
.stat-strip div:last-child { border-right: 0; }
.stat-strip b { display: block; font-size: clamp(1.55rem, 3vw, 2rem); line-height: 1; }
.stat-strip span { display: block; margin-top: 7px; color: var(--muted); font-size: .82rem; }
.state-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    margin-top: 24px;
}
.state-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    transition: transform .16s ease, border-color .16s ease;
}
.state-links a:hover { transform: translateY(-2px); border-color: #3b4e6d; }
.state-links b { font-size: 1rem; }
.state-links span { color: var(--muted); font-size: .82rem; }
.section-heading,
.league-v2-head,
.league-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}
.result-count { color: var(--muted); }

.league-v2, .league-block { margin-bottom: 40px; }
.league-v2-head small { color: #83adff; font-size: .72rem; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; }
.league-v2-head h3 { margin: 5px 0 0; font-size: 1.75rem; }
.league-v2-head > a { color: #a9c6ff; font-weight: 850; }
.match-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.match-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #121f33, #0c1626);
    box-shadow: var(--shadow-soft);
    transition: transform .18s ease, border-color .18s ease;
}
.match-card:hover { transform: translateY(-3px); border-color: #3b4e6d; }
.match-card.live { border-color: rgba(242, 37, 67, .58); box-shadow: 0 18px 42px rgba(242, 37, 67, .10); }
.match-top, .match-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.league-pill { color: #8fb5ff; font-size: .72rem; font-weight: 950; letter-spacing: .08em; }
.state-pill, .status, .event-state {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(148, 163, 184, .12);
    font-size: .68rem;
    font-style: normal;
    font-weight: 950;
    letter-spacing: .055em;
    text-transform: uppercase;
}
.state-pill.live, .status.live, .event-state.live {
    color: #fff;
    border-color: #ff3657;
    background: #d91435;
    box-shadow: 0 0 0 4px rgba(255, 54, 87, .12), 0 0 18px rgba(255, 54, 87, .28);
}
.state-pill.live::before, .status.live::before, .event-state.live::before {
    content: '';
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: sportshow-live-pulse 1.1s ease-in-out infinite;
}
@keyframes sportshow-live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .45; transform: scale(.72); }
}
.state-pill.scheduled, .status.scheduled, .event-state.scheduled,
.status.upcoming {
    color: #ffd47c;
    border-color: rgba(247, 183, 49, .28);
    background: rgba(247, 183, 49, .12);
}
.state-pill.finished, .status.finished, .event-state.finished,
.status.active {
    color: #7ce8c0;
    border-color: rgba(34, 201, 151, .28);
    background: rgba(34, 201, 151, .12);
}
.status.offline { color: #cbd5e1; }
.status.large { padding: 9px 12px; font-size: .76rem; }
.teams {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 24px 0;
    text-align: center;
}
.teams > div { min-width: 0; display: grid; justify-items: center; gap: 8px; }
.teams img, .teams i {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 50%;
}
.teams i {
    display: grid;
    place-items: center;
    color: #dbeafe;
    background: #1a2b45;
    font-style: normal;
    font-weight: 950;
}
.teams b { max-width: 100%; font-size: .92rem; line-height: 1.25; }
.teams strong { min-height: 26px; font-size: 1.55rem; }
.teams > span { color: var(--muted-2); font-size: .68rem; font-weight: 950; }
.match-bottom { padding-top: 14px; border-top: 1px solid var(--line-soft); }
.match-bottom time { font-size: .95rem; font-weight: 950; }
.match-bottom a {
    padding: 9px 12px;
    border-radius: 9px;
    color: #fff;
    background: var(--blue);
    font-size: .78rem;
    font-weight: 950;
}
.match-bottom span { color: var(--muted); font-size: .78rem; }

/* Páginas de cartelera */
.schedule-hero {
    padding: 58px 0 34px;
    border-bottom: 1px solid var(--line-soft);
    background: linear-gradient(180deg, rgba(13, 23, 40, .55), rgba(5, 9, 20, 0));
}
.schedule-hero h1 { margin-bottom: 9px; font-size: clamp(2.2rem, 4.8vw, 4.2rem); }
.schedule-hero p { margin: 0; color: var(--muted); font-size: 1rem; }
.date-selector {
    display: grid;
    grid-template-columns: minmax(210px, 1fr) minmax(210px, 1fr) auto;
    align-items: end;
    gap: 11px;
    max-width: 860px;
    margin-top: 22px;
}
.date-selector input:only-of-type { grid-column: auto; }
.event-list { display: grid; gap: 13px; }
.event-card {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr) 170px;
    align-items: center;
    gap: 20px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #111d30, #0d1727);
    box-shadow: var(--shadow-soft);
}
.event-time { display: grid; gap: 8px; }
.event-time strong { font-size: 1.3rem; }
.event-teams { display: grid; gap: 11px; }
.event-team {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    min-width: 0;
    font-weight: 850;
}
.event-team img { width: 38px; height: 38px; object-fit: contain; }
.event-team strong { font-size: 1.15rem; }
.event-actions { text-align: right; }
.no-stream { color: var(--muted); font-size: .84rem; }

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 13px;
}
.calendar-day {
    min-height: 132px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 5px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #111d30, #0d1727);
    box-shadow: var(--shadow-soft);
    transition: transform .16s ease, border-color .16s ease;
}
.calendar-day:hover { transform: translateY(-2px); border-color: #3b4e6d; }
.calendar-day.active { border-color: var(--red); background: rgba(242, 37, 67, .11); }
.calendar-day span, .calendar-day small { color: var(--muted); }
.calendar-day strong { font-size: 2rem; line-height: 1; }
.calendar-day small { font-size: .76rem; }

/* Partido / reproductor */
.watch-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; }
.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #000;
    box-shadow: var(--shadow);
}
.player-shell video, .source-iframe { width: 100%; height: 100%; display: block; border: 0; background: #000; }
.player-shell [hidden] { display: none !important; }
.player-message {
    position: absolute;
    right: 16px;
    bottom: 16px;
    left: 16px;
    padding: 12px 14px;
    border-radius: 11px;
    background: rgba(3, 7, 18, .84);
    backdrop-filter: blur(8px);
    font-weight: 800;
}
.player-message.error { border: 1px solid rgba(239, 68, 68, .55); }
.no-event-stream,
.pre-game-message {
    height: 100%;
    display: grid;
    place-content: center;
    padding: 34px;
    text-align: center;
}
.no-event-stream p, .pre-game-message p, .pre-game-message strong { color: var(--muted); }
.countdown {
    margin-top: 15px;
    color: #fff;
    font-size: clamp(2.2rem, 7vw, 4.5rem);
    font-weight: 950;
    letter-spacing: .04em;
}
.watch-info {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    padding: 24px 3px 0;
}
.watch-info h1 { margin-bottom: 9px; font-size: clamp(2rem, 4vw, 3.4rem); }
.watch-info p { margin: 0; color: var(--muted); }
.side-panel { position: sticky; top: 96px; align-self: start; }
.side-panel h2 { margin-top: 9px; font-size: 1.55rem; }
.side-panel dl { margin: 17px 0 0; }
.side-panel dl div { padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.side-panel dt { color: var(--muted); font-size: .78rem; }
.side-panel dd { margin: 4px 0 0; font-weight: 850; }
.scoreboard {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    margin-top: 18px;
    text-align: center;
}
.scoreboard > div { display: grid; gap: 7px; }
.scoreboard b { font-size: 2.6rem; }
.scoreboard em { color: var(--muted); font-style: normal; }

/* Formularios */
.form-grid { display: grid; gap: 17px; }
.form-grid label { display: grid; gap: 8px; color: #e2e8f0; font-weight: 850; }
.form-grid small { color: var(--muted); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.check { display: flex !important; align-items: center; gap: 9px; }
.check input { width: auto; min-height: auto; }
.field-note { margin: -8px 0 0; color: var(--muted); font-size: .86rem; }
.source-help { padding: 14px 15px; border: 1px solid rgba(59, 130, 246, .28); border-radius: 12px; background: rgba(59, 130, 246, .08); }
.source-help p { margin: 6px 0 0; color: var(--muted); }

/* Administración */
.admin-v2 { padding-top: 38px; }
.admin-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}
.admin-top h1 { margin: 8px 0 0; font-size: clamp(2.2rem, 4vw, 3.5rem); }
.admin-top p { max-width: 720px; margin: 9px 0 0; color: var(--muted); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.system-status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.system-card {
    min-width: 0;
    display: grid;
    gap: 7px;
    padding: 19px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}
.system-card span, .system-card small { color: var(--muted); }
.system-card span { font-size: .80rem; }
.system-card b { font-size: 1.05rem; }
.system-card.healthy b { color: #72e6bd; }
.system-card.warning b { color: #ffd071; }
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0;
}
.dashboard-cards > div {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #111d30, #0c1626);
    box-shadow: var(--shadow-soft);
}
.dashboard-cards > div.danger { border-color: rgba(239, 68, 68, .42); }
.dashboard-cards span { display: block; color: var(--muted); font-size: .78rem; }
.dashboard-cards b { display: block; margin-top: 7px; font-size: 2rem; line-height: 1; }
.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 18px 0; }
.league-stat-list, .quick-list, .top-events, .log-list, .backup-list { display: grid; }
.league-stat-list a, .top-events a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line-soft);
}
.league-stat-list span, .league-stat-list em, .top-events span { color: var(--muted); font-size: .78rem; font-style: normal; }
.top-events strong { color: #71e4bb; font-size: .82rem; }
.quick-list a {
    display: grid;
    grid-template-columns: 95px minmax(0, 1fr) 110px;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line-soft);
}
.quick-list span { color: #86afff; font-size: .75rem; font-weight: 900; }
.quick-list em { text-align: right; font-size: .74rem; font-style: normal; font-weight: 850; }
.quick-list em.ok { color: #71e4bb; }
.quick-list em.missing { color: #ff8a94; }
.admin-module-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-top: 18px; }
.admin-module-nav a {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    text-align: center;
    font-weight: 850;
    box-shadow: var(--shadow-soft);
}
.admin-module-nav a:hover { border-color: #3b4e6d; }

.admin-filter {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
    gap: 12px;
    margin-bottom: 18px;
}
.admin-filter.advanced { grid-template-columns: minmax(220px, 2fr) 1.05fr 1fr 1fr 1fr auto auto; }
.admin-filter label { min-width: 0; display: grid; gap: 7px; color: #dbeafe; font-size: .78rem; font-weight: 850; }
.list-summary {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 18px;
    margin-bottom: 13px;
}
.list-summary span { color: var(--muted); font-size: .78rem; }
.dot { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 50%; }
.dot.ok { background: var(--green); }
.dot.missing { background: var(--danger); }
.event-admin-list { display: grid; gap: 13px; }
.event-admin-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.05fr) minmax(300px, 1.65fr) auto minmax(235px, auto);
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #111d30, #0c1626);
    box-shadow: var(--shadow-soft);
}
.event-admin-meta { min-width: 0; display: grid; gap: 6px; }
.event-admin-meta > span { color: #86afff; font-size: .74rem; font-weight: 900; }
.event-admin-meta b { font-size: .98rem; line-height: 1.3; }
.status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.stream-indicator { font-size: .67rem; font-style: normal; font-weight: 950; }
.stream-indicator.configured { color: #72e6bd; }
.stream-indicator.missing { color: #ff8994; }
.stream-editor { min-width: 0; display: grid; gap: 6px; }
.stream-editor input { min-width: 0; }
.detected-type { color: #87b0ff; font-size: .67rem; font-weight: 950; }
.save-state { min-height: 16px; font-size: .72rem; }
.save-state.saving { color: #ffd071; }
.save-state.saved { color: #72e6bd; }
.save-state.error { color: #ff8994; }
.quick-flags { display: flex; gap: 7px; }
.flag-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: #718198;
    background: #081120;
    cursor: pointer;
    font-size: 1rem;
}
.flag-btn.active { color: #fff; border-color: var(--blue); background: rgba(59, 130, 246, .17); }
.row-actions { display: flex; flex-wrap: wrap; gap: 7px; }

.tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 18px; }
.tool-card { display: flex; flex-direction: column; gap: 12px; }
.tool-card b { font-size: 1.15rem; }
.tool-card p { flex: 1; margin: 0; color: var(--muted); line-height: 1.65; }
.backup-list a { padding: 11px 0; border-bottom: 1px solid var(--line-soft); color: #9fc0ff; }
.history-list article { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.history-list article > div { display: flex; justify-content: space-between; gap: 14px; }
.history-list span, .history-list p { color: var(--muted); word-break: break-word; }
.log-list > div { display: grid; gap: 5px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.log-list span, .log-list small { color: var(--muted); word-break: break-word; }
.log-list b.ok { color: #72e6bd; }
.log-list b.error { color: #ff8994; }
.user-list { display: grid; gap: 13px; }
.user-list form { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.user-list form > div { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 8px; }
.user-list form > div:last-child { display: flex; }

/* Tablas */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 15px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
td small { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Modal */
.modal-open { overflow: hidden; }
.iframe-modal[hidden], .preview-modal[hidden] { display: none; }
.iframe-modal, .preview-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, .78);
    backdrop-filter: blur(7px);
}
.iframe-modal-backdrop { position: absolute; inset: 0; }
.iframe-modal-card, .preview-card {
    position: relative;
    z-index: 1;
    width: min(900px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #0b1424;
    box-shadow: 0 35px 100px rgba(0, 0, 0, .65);
}
.iframe-modal-card { padding: 24px; }
.iframe-modal-head, .preview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}
.iframe-modal-head { padding: 0 0 18px; }
.iframe-modal-head h2 { margin-top: 7px; }
.iframe-modal-close, .preview-head button {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: #fff;
    background: var(--surface-2);
    cursor: pointer;
    font-size: 1.45rem;
}
.iframe-modal-card label, .embed-admin-box label { display: grid; gap: 8px; margin-bottom: 15px; font-weight: 850; }
.iframe-modal-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.copy-feedback { min-height: 22px; margin: 11px 0 0; color: #72e6bd; font-weight: 800; }
.embed-admin-box { margin-top: 8px; padding: 19px; border: 1px solid rgba(242, 37, 67, .24); border-radius: var(--radius); background: rgba(242, 37, 67, .06); }
.preview-head > div { display: grid; gap: 3px; }
.preview-head span { color: var(--muted); font-size: .78rem; }
.preview-head span.online { color: #72e6bd; }
.preview-head span.error { color: #ff8994; }
.preview-player { position: relative; aspect-ratio: 16 / 9; background: #000; }
.preview-player video, .preview-player iframe { width: 100%; height: 100%; border: 0; background: #000; }
.preview-player > div { position: absolute; right: 15px; bottom: 15px; left: 15px; padding: 12px; border-radius: 10px; background: rgba(0, 0, 0, .82); }

/* Footer */
.site-footer { margin-top: 30px; border-top: 1px solid var(--line-soft); background: rgba(3, 7, 15, .48); }
.footer-inner {
    min-height: 126px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
}
.footer-brand { color: #fff; }
.footer-inner p { margin: 0; font-size: .84rem; }

/* Responsive */
@media (max-width: 1120px) {
    .match-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .admin-filter.advanced { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .event-admin-row { grid-template-columns: 1fr; align-items: stretch; }
    .quick-flags { justify-content: flex-start; }
    .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .nav-toggle { display: grid; place-items: center; }
    .nav {
        display: none;
        position: absolute;
        top: 66px;
        right: 20px;
        left: 20px;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: #0b1424;
        box-shadow: var(--shadow);
    }
    .nav.open { display: flex; }
    .nav a { padding: 12px 13px; border-radius: 9px; }
    .nav a:hover { background: var(--surface-2); }
    .nav a:hover::after { display: none; }
    .v2-hero-grid, .watch-layout { grid-template-columns: 1fr; }
    .v2-hero-grid { gap: 30px; }
    .live-console { max-width: none; }
    .side-panel { position: static; }
    .stat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: var(--radius-lg); margin-top: 18px; }
    .stat-strip div { border-bottom: 1px solid var(--line); }
    .stat-strip div:nth-child(3n) { border-right: 0; }
    .system-status-grid, .admin-grid-2 { grid-template-columns: 1fr; }
    .admin-module-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .event-card { grid-template-columns: 115px minmax(0, 1fr) auto; }
    .calendar-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .container, .narrow { width: min(100% - 24px, var(--container)); }
    .section { padding: 30px 0 42px; }
    .header-inner { min-height: 66px; }
    .brand-icon { width: 40px; height: 40px; }
    .brand-text { font-size: 1.12rem; }
    .v2-hero { padding: 48px 0 34px; }
    .v2-hero h1, h1 { font-size: clamp(2.25rem, 12vw, 3.65rem); }
    .v2-hero p { font-size: .98rem; }
    .hero-search { grid-template-columns: 1fr; }
    .hero-search .btn { width: 100%; }
    .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .state-links { grid-template-columns: 1fr; }
    .match-grid { grid-template-columns: 1fr; }
    .section-heading, .league-v2-head, .league-heading, .admin-top, .watch-info, .footer-inner {
        align-items: stretch;
        flex-direction: column;
    }
    .section-heading, .league-v2-head, .league-heading { display: flex; }
    .text-link { white-space: normal; }
    .date-selector { grid-template-columns: 1fr; }
    .event-card { grid-template-columns: 1fr; gap: 14px; }
    .event-actions { text-align: left; }
    .event-actions .btn { width: 100%; }
    .calendar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .calendar-day { min-height: 112px; }
    .dashboard-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-filter.advanced, .admin-filter { grid-template-columns: 1fr; }
    .list-summary { align-items: flex-start; flex-direction: column; gap: 7px; }
    .row-actions .btn, .row-actions a { flex: 1 1 130px; }
    .league-stat-list a, .top-events a { grid-template-columns: 1fr auto; }
    .league-stat-list em, .top-events span { grid-column: 1; }
    .quick-list a { grid-template-columns: 72px minmax(0, 1fr); }
    .quick-list em { grid-column: 2; text-align: left; }
    .tool-grid { grid-template-columns: 1fr; }
    .user-list form > div { grid-template-columns: 1fr; }
    .iframe-modal-actions { flex-direction: column; }
    .iframe-modal-actions .btn { width: 100%; }
    .scoreboard b { font-size: 2rem; }
}

@media (max-width: 460px) {
    .hero-actions { grid-template-columns: 1fr; }
    .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-strip div:nth-child(3n) { border-right: 1px solid var(--line); }
    .stat-strip div:nth-child(2n) { border-right: 0; }
    .calendar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-cards, .admin-module-nav { grid-template-columns: 1fr; }
    .panel { padding: 18px; }
    .teams { grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr); }
    .teams b { font-size: .84rem; }
}

/* SportShow v2.1.0 English Edition */
:root { --container: 1280px; }
.compact-empty { padding: 36px 24px; min-height: 160px; display: grid; place-content: center; }
.compact-empty h2 { margin: 0 0 10px; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.console-empty { display: grid; gap: 5px; padding: 24px; color: var(--muted); }
.console-empty b { color: var(--text); }
.stream-expiry { display: inline-flex; width: fit-content; margin-top: 3px; font-size: .72rem; font-weight: 850; }
.stream-expiry.active { color: #72e6bd; }
.stream-expiry.expiring { color: #ffd071; }
.stream-expiry.expired { color: #ff8b96; }
.stream-expiry.unknown { color: var(--muted-2); }

@media (max-width: 760px) {
    .empty-actions { flex-direction: column; }
    .empty-actions .btn { width: 100%; }
}

/* SportShow v2.2.0 — Manual publishing and secured external player */
.manual-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border: 1px solid rgba(255, 208, 113, .34);
    border-radius: 999px;
    color: #ffd071;
    background: rgba(255, 191, 55, .08);
    font-size: .62rem;
    letter-spacing: .08em;
}
.manual-game-form { display: grid; gap: 20px; }
.manual-game-form > label { display: grid; gap: 8px; font-weight: 850; }
.manual-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.manual-form-grid label { display: grid; gap: 8px; font-weight: 850; }
.manual-form-grid label small { color: var(--muted); font-weight: 600; }
.manual-form-grid .span-2 { grid-column: 1 / -1; }
.manual-options { display: flex; flex-wrap: wrap; gap: 12px 22px; }
.manual-options .check { display: flex; align-items: center; gap: 9px; font-weight: 800; }
.form-actions, .publish-success-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.form-divider { width: 100%; margin: 0; border: 0; border-top: 1px solid var(--line); }
.publish-success { display: grid; gap: 18px; }
.publish-success > div:first-child p { color: var(--muted); }
.publish-success label { display: grid; gap: 8px; font-weight: 850; }
.copy-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.copy-line input { min-width: 0; }
.embed-admin-box > p { color: var(--muted); line-height: 1.65; }
.iframe-modal-card textarea,
.embed-admin-box textarea,
.publish-success textarea {
    width: 100%;
    resize: vertical;
    min-height: 118px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .78rem;
    line-height: 1.5;
}

@media (max-width: 760px) {
    .manual-form-grid { grid-template-columns: 1fr; }
    .manual-form-grid .span-2 { grid-column: auto; }
    .manual-options, .form-actions, .publish-success-actions { flex-direction: column; align-items: stretch; }
    .manual-options .check { width: 100%; }
    .form-actions .btn, .publish-success-actions .btn { width: 100%; }
    .copy-line { grid-template-columns: 1fr; }
    .copy-line .btn { width: 100%; }
}


.live-auto-note{min-height:48px;display:flex;align-items:center;gap:10px;padding:0 16px;border:1px solid var(--line,#22324b);border-radius:10px;background:rgba(8,18,34,.55);color:#aebbd0;font-size:14px;font-weight:750}.live-auto-note .pulse{width:9px;height:9px;border-radius:50%;background:#ff3657;box-shadow:0 0 0 6px rgba(255,54,87,.12)}
@media(max-width:760px){.live-auto-note{width:100%;min-height:44px}}


/* SportShow v2.2.3 — Monetization Edition */
.sportshow-ad-slot {
    width: min(calc(100% - 32px), var(--container));
    margin: 26px auto;
    display: grid;
    place-items: center;
    text-align: center;
    overflow: hidden;
    position: relative;
    z-index: 1;
}
.sportshow-ad-slot > div {
    max-width: 100%;
    margin-inline: auto;
}
.sportshow-ad-top,
.sportshow-ad-bottom {
    min-height: 90px;
}
.sportshow-ad-middle {
    min-height: 250px;
}
.match-grid > .sportshow-ad-slot {
    grid-column: 1 / -1;
    width: 100%;
    margin: 18px 0;
}
.site-footer + .sportshow-ad-slot {
    display: none;
}
@media (max-width: 760px) {
    .sportshow-ad-slot {
        width: min(calc(100% - 24px), var(--container));
        margin: 18px auto;
    }
    .match-grid > .sportshow-ad-slot {
        width: 100%;
        margin: 14px 0;
    }
    .sportshow-ad-top,
    .sportshow-ad-bottom {
        min-height: 100px;
    }
}

/* SportShow v2.2.14 — source-first special game states */
.state-pill.delayed, .status.delayed, .event-state.delayed {
    color: #ffd98f;
    border-color: rgba(245, 158, 11, .34);
    background: rgba(245, 158, 11, .14);
}
.state-pill.postponed, .status.postponed, .event-state.postponed {
    color: #f5c2ff;
    border-color: rgba(192, 132, 252, .34);
    background: rgba(168, 85, 247, .14);
}
.state-pill.suspended, .status.suspended, .event-state.suspended {
    color: #ffbd80;
    border-color: rgba(249, 115, 22, .34);
    background: rgba(249, 115, 22, .14);
}
.state-pill.cancelled, .status.cancelled, .event-state.cancelled {
    color: #d3d9e5;
    border-color: rgba(148, 163, 184, .30);
    background: rgba(100, 116, 139, .16);
}
.match-card.delayed, .match-card.postponed, .match-card.suspended, .match-card.cancelled {
    border-color: rgba(148, 163, 184, .28);
}
.status-override-control {
    display: grid;
    gap: 5px;
    margin-top: 10px;
    max-width: 260px;
}
.status-override-control > span,
.status-override-control small {
    color: #91a4bd;
    font-size: .68rem;
    font-weight: 800;
}
.status-override-control select {
    width: 100%;
    min-height: 38px;
    border: 1px solid #31435f;
    border-radius: 9px;
    padding: 7px 10px;
    color: #f8fafc;
    background: #0b1628;
    font-weight: 800;
}

/* SportShow v2.2.15 — visible final scores */
.match-card.finished.has-score {
    border-color: rgba(34, 201, 151, .34);
    background: linear-gradient(180deg, #13243a, #0c1727);
}
.final-score-label {
    width: fit-content;
    margin: 12px auto -4px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #93f5d4;
    background: rgba(34, 201, 151, .11);
    font-size: .66rem;
    font-weight: 950;
    letter-spacing: .12em;
}
.match-card.finished .teams {
    padding-top: 18px;
}
.match-card .team-score {
    min-width: 48px;
    min-height: 42px;
    display: grid;
    place-items: center;
    padding: 5px 10px;
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 12px;
    color: #fff;
    background: rgba(2, 6, 13, .42);
    font-size: clamp(1.65rem, 4vw, 2.25rem);
    line-height: 1;
}
.match-card .teams > div.winner .team-score {
    color: #07140f;
    border-color: rgba(110, 231, 183, .75);
    background: #6ee7b7;
    box-shadow: 0 8px 25px rgba(34, 201, 151, .2);
}
.match-card .teams > div.winner b::after {
    content: '  WINNER';
    color: #6ee7b7;
    font-size: .58rem;
    letter-spacing: .08em;
}
.match-card.finished .match-bottom a {
    background: #17314c;
}


/* SportShow v2.2.26 — SEO, local time and legal content */
.timezone-note { margin: 12px 0 0; color: #aebed4; font-size: .9rem; line-height: 1.5; }
.timezone-note strong { color: #dce8f8; }
.js-local-time { white-space: nowrap; }
.seo-copy, .legal-copy, .game-seo-copy { line-height: 1.8; }
.seo-copy { border-top: 1px solid var(--line-soft); }
.seo-copy h2, .legal-copy h2, .game-seo-copy h2 { color: #fff; }
.seo-copy p, .legal-copy p, .game-seo-copy p { max-width: 920px; color: var(--muted); }
.seo-copy a, .legal-copy a { color: #9dbdff; text-decoration: underline; text-underline-offset: 3px; }
.game-seo-copy { margin-top: 24px; padding: 24px; }
.game-facts { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px; margin: 20px 0; }
.game-facts div { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(8,16,30,.52); }
.game-facts dt { color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.game-facts dd { margin: 5px 0 0; color: #fff; font-weight: 800; }
.footer-grid { display: grid; grid-template-columns: minmax(220px,1fr) auto auto; gap: 24px; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-links a { color: #c4d2e5; text-decoration: none; font-weight: 700; }
.footer-links a:hover { color: #fff; }
.footer-copy { white-space: nowrap; }
.legal-copy { max-width: 940px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; text-align: left; } .footer-copy { white-space: normal; } }
