﻿/* ================================
   Estadísticas — estilo PRIME (como Ranking)
   ================================ */

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url('ChatGPT Image 7 jul 2025, 03_29_05 p.m..png') center/cover no-repeat fixed;
    opacity: .07;
    pointer-events: none;
    filter: blur(1px) saturate(1.02) contrast(1.03);
    transform: scale(1.03);
}

/* hero tweaks */
.hero-stats .hero-inner {
    padding-bottom: 18px;
}

.hero-stats .hero-sub {
    max-width: 70ch;
}

.text-muted-ol {
    color: var(--muted) !important;
}

.filters-card {
    background: rgba(15,27,46,.72);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: calc(var(--radius) - 2px);
    padding: 12px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 991px) {
    .filters-card {
        min-width: 100%;
    }
}

.ol-select {
    background: rgba(11,18,32,.55) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
}

    .ol-select:focus {
        box-shadow: 0 0 0 .2rem rgba(74,163,255,.15) !important;
    }

.btn-ol {
    background: linear-gradient(135deg, rgba(74,163,255,.95), rgba(124,92,255,.95));
    border: 0;
    color: #081120;
    font-weight: 800;
}

    .btn-ol:hover {
        filter: brightness(1.02);
        transform: translateY(-1px);
    }

.btn-ol-soft {
    background: rgba(74,163,255,.10);
    border: 1px solid rgba(74,163,255,.22);
    color: var(--text);
}

    .btn-ol-soft:hover {
        background: rgba(74,163,255,.14);
    }

/* Section */
.section {
    margin-top: 18px;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.section-title {
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: .2px;
}

.section-sub {
    color: var(--muted);
    font-size: .92rem;
    margin-top: 2px;
}

.card-ol {
    background: rgba(15,27,46,.72);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.card-ol-title {
    font-weight: 900;
    letter-spacing: .2px;
}

/* KPI row */
.kpi-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

@media (max-width: 991px) {
    .kpi-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 420px) {
    .kpi-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.kpi {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(11,18,32,.45);
}

    .kpi .k {
        color: var(--muted);
        font-size: .78rem;
    }

    .kpi .v {
        font-size: 1.2rem;
        font-weight: 900;
        margin-top: 2px;
    }

    .kpi .s {
        color: var(--muted);
        font-size: .8rem;
        margin-top: 2px;
    }

/* split grid: result + home/away */
.split-grid {
    display: grid;
    grid-template-columns: 1.35fr .65fr;
    gap: 12px;
}

@media(max-width: 991px) {
    .split-grid {
        grid-template-columns: 1fr;
    }
}

/* WDL */
.wdl {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.wdl-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    background: rgba(11,18,32,.40);
}

    .wdl-card .t {
        color: var(--muted);
        font-size: .82rem;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .wdl-card .n {
        font-size: 1.65rem;
        font-weight: 900;
        margin-top: 4px;
    }

    .wdl-card .bar {
        height: 8px;
        border-radius: 99px;
        background: rgba(231,238,252,.08);
        overflow: hidden;
        margin-top: 10px;
    }

        .wdl-card .bar > span {
            display: block;
            height: 100%;
            width: 0%;
            border-radius: 99px;
            background: rgba(74,163,255,.85);
        }

    .wdl-card.win .bar > span {
        background: rgba(45,212,191,.85);
    }

    .wdl-card.draw .bar > span {
        background: rgba(251,191,36,.85);
    }

    .wdl-card.lose .bar > span {
        background: rgba(251,113,133,.85);
    }

/* side stats */
.sidegrid {
    display: grid;
    gap: 10px;
}

.pill {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(11,18,32,.40);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

    .pill .l {
        color: var(--muted);
        font-size: .82rem;
    }

    .pill .r {
        font-weight: 900;
        font-size: 1.05rem;
    }

        .pill .r small {
            color: var(--muted);
            font-weight: 700;
        }

/* Goals & disc */
.gd {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.gline {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    background: rgba(11,18,32,.40);
}

    .gline .top {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        align-items: center;
    }

        .gline .top .name {
            color: var(--muted);
            font-size: .82rem;
        }

        .gline .top .val {
            font-weight: 900;
            font-size: 1.2rem;
        }

    .gline .meter {
        height: 10px;
        border-radius: 99px;
        overflow: hidden;
        background: rgba(231,238,252,.08);
        margin-top: 10px;
    }

        .gline .meter > span {
            display: block;
            height: 100%;
            width: 0%;
            background: rgba(74,163,255,.85);
            border-radius: 99px;
        }

    .gline.good .meter > span {
        background: rgba(45,212,191,.85);
    }

    .gline.bad .meter > span {
        background: rgba(251,113,133,.85);
    }

/* season cards */
.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.lg-item {
    color: var(--muted);
    font-size: .85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lg-dot {
    width: 10px;
    height: 10px;
    border-radius: 99px;
    display: inline-block;
}

    .lg-dot.d1 {
        background: rgba(74,163,255,.9);
    }

    .lg-dot.d2 {
        background: rgba(124,92,255,.9);
    }

    .lg-dot.d3 {
        background: rgba(45,212,191,.9);
    }

    .lg-dot.d4 {
        background: rgba(251,191,36,.9);
    }

.season-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

@media(max-width: 991px) {
    .season-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

.season-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px;
    background: rgba(11,18,32,.40);
    cursor: pointer;
    transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

    .season-card:hover {
        transform: translateY(-1px);
        border-color: rgba(74,163,255,.28);
        background: rgba(11,18,32,.50);
    }

    .season-card.active {
        border-color: rgba(74,163,255,.45);
        box-shadow: 0 0 0 1px rgba(74,163,255,.08) inset;
    }

    .season-card .y {
        font-weight: 900;
        font-size: 1.05rem;
    }

    .season-card .t {
        color: var(--muted);
        font-size: .82rem;
        margin-top: 2px;
    }

    .season-card .sum {
        display: flex;
        align-items: baseline;
        gap: 8px;
        margin-top: 8px;
    }

        .season-card .sum .p {
            font-weight: 900;
            font-size: 1.4rem;
        }

        .season-card .sum .lbl {
            color: var(--muted);
            font-size: .82rem;
        }

/* Table */
.table-ol {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(255,255,255,.03);
    --bs-table-color: var(--text);
    --bs-table-border-color: rgba(231,238,252,.10);
}

    .table-ol td, .table-ol th {
        border-color: rgba(231,238,252,.10) !important;
    }

.cellbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

    .cellbar .num {
        font-weight: 900;
    }

    .cellbar .bar {
        flex: 1;
        height: 8px;
        border-radius: 99px;
        background: rgba(231,238,252,.08);
        overflow: hidden;
    }

        .cellbar .bar > span {
            display: block;
            height: 100%;
            width: 0%;
            border-radius: 99px;
            background: rgba(74,163,255,.85);
        }

    .cellbar.c2 .bar > span {
        background: rgba(124,92,255,.85);
    }

    .cellbar.c3 .bar > span {
        background: rgba(45,212,191,.85);
    }

    .cellbar.c4 .bar > span {
        background: rgba(251,191,36,.85);
    }

    .cellbar.total .bar > span {
        background: rgba(231,238,252,.75);
    }

/* list */
.list-ol {
    display: grid;
    gap: 10px;
}

.list-item {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(11,18,32,.40);
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

    .list-item .name {
        font-weight: 800;
    }

    .list-item .meta {
        color: var(--muted);
        font-size: .85rem;
    }

/* records */
.records-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, 1fr);
}

@media(max-width: 480px) {
    .records-grid {
        grid-template-columns: 1fr;
    }
}

.record-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px;
    background: rgba(11,18,32,.40);
}

    .record-card .t {
        font-weight: 900;
    }

    .record-card .v {
        font-size: 1.35rem;
        font-weight: 900;
        margin-top: 6px;
    }

    .record-card .s {
        color: var(--muted);
        font-size: .85rem;
        margin-top: 4px;
    }

/* matches */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media(max-width: 991px) {
    .matches-grid {
        grid-template-columns: 1fr;
    }
}

.match-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 12px;
    background: rgba(11,18,32,.40);
}

.match-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.match-date {
    color: var(--muted);
    font-size: .85rem;
}

.badge-res {
    font-weight: 900;
    border-radius: 999px;
    padding: 6px 10px;
    border: 1px solid rgba(231,238,252,.12);
    background: rgba(231,238,252,.06);
}

    .badge-res.w {
        border-color: rgba(45,212,191,.35);
        background: rgba(45,212,191,.10);
    }

    .badge-res.d {
        border-color: rgba(251,191,36,.35);
        background: rgba(251,191,36,.10);
    }

    .badge-res.l {
        border-color: rgba(251,113,133,.35);
        background: rgba(251,113,133,.10);
    }

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.team {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

    .team .dot {
        width: 10px;
        height: 10px;
        border-radius: 99px;
        background: rgba(231,238,252,.35);
    }

    .team.ol .dot {
        background: rgba(74,163,255,.95);
    }

.score {
    font-weight: 900;
    font-size: 1.25rem;
}

.match-sub {
    margin-top: 8px;
    color: var(--muted);
    font-size: .85rem;
}

.mini-note {
    color: var(--muted);
    font-size: .85rem;
}

/* skeletons */
.sk {
    border-radius: 14px;
    background: rgba(231,238,252,.07);
    position: relative;
    overflow: hidden;
}

    .sk::after {
        content: "";
        position: absolute;
        inset: 0;
        transform: translateX(-100%);
        background: linear-gradient(90deg, transparent, rgba(231,238,252,.10), transparent);
        animation: sk 1.1s infinite;
    }

@keyframes sk {
    to {
        transform: translateX(100%);
    }
}


/* active row highlight */
.table-active-ol {
    background: rgba(74,163,255,.10) !important;
}


/* ---- Page head (like Jugadores) ---- */
.page-head .page-title {
    font-weight: 800;
    letter-spacing: -.02em;
}

.page-head .page-sub {
    color: rgba(226,232,240,.82);
    max-width: 68ch;
}


/* ---- Overlay spinner: centrado + PRIME ---- */
#overlaySpinner {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(2,6,23,.58);
    backdrop-filter: blur(6px);
    z-index: 1090;
}

    #overlaySpinner.d-none {
        display: none !important;
    }

    #overlaySpinner .ol-overlay-card {
        width: min(420px, 92vw);
        border-radius: 18px;
        border: 1px solid rgba(148,163,184,.18);
        background: rgba(15,23,42,.72);
        box-shadow: 0 18px 54px rgba(0,0,0,.35);
        padding: 18px 18px 16px;
        display: flex;
        gap: 14px;
        align-items: center;
    }

    #overlaySpinner .spinner-border {
        width: 2.15rem;
        height: 2.15rem;
        border-width: .28rem;
        opacity: .95;
    }

    #overlaySpinner .ol-overlay-txt .t1 {
        font-weight: 800;
        letter-spacing: -.01em;
    }

    #overlaySpinner .ol-overlay-txt .t2 {
        color: rgba(226,232,240,.78);
        font-size: .92rem;
    }

/* ---- Evitar scroll horizontal de página (la tabla scrollea adentro) ---- */
html, body {
    overflow-x: hidden;
}

.ol-table-scroll {
    max-width: 100%;
}

    .ol-table-scroll > table {
        min-width: 680px;
    }
/* fuerza scroll dentro del wrapper */
@media (max-width: 576px) {
    .ol-table-scroll > table {
        min-width: 740px;
    }
}

/* ---- Chips: marcar seleccionado claramente ---- */
.chips-wrap .chip {
    user-select: none;
}

    .chips-wrap .chip.active {
        border-color: rgba(56,189,248,.55) !important;
        box-shadow: 0 0 0 2px rgba(56,189,248,.12);
        background: rgba(14,165,233,.14) !important;
    }

        .chips-wrap .chip.active i {
            opacity: 1;
        }

/* ---- Season cards: no rompen mobile ---- */
.season-cards {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}

    .season-cards::-webkit-scrollbar {
        height: 8px;
    }

    .season-cards::-webkit-scrollbar-thumb {
        background: rgba(148,163,184,.22);
        border-radius: 999px;
    }


/* ---- Institución grid ---- */
.inst-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 992px) {
    .inst-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media (max-width: 420px) {
    .inst-grid {
        grid-template-columns: 1fr;
    }
}

.inst-card {
    border: 1px solid rgba(148,163,184,.16);
    background: rgba(2,6,23,.32);
    border-radius: 16px;
    padding: 12px 12px 10px;
    overflow: hidden;
}

    .inst-card .k {
        color: rgba(226,232,240,.78);
        font-size: .86rem;
    }

    .inst-card .v {
        font-weight: 900;
        letter-spacing: -.02em;
        font-size: 1.45rem;
        margin-top: 4px;
    }

    .inst-card .s {
        color: rgba(226,232,240,.70);
        font-size: .86rem;
        margin-top: 2px;
    }

.inst-trend .trend {
    margin-top: 8px;
    color: rgba(56,189,248,.9);
}

.spark {
    display: block;
}


/* Club header */
.club-logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0,0,0,.25);
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.06);
}

.club-meta {
    font-size: .82rem;
    opacity: .75;
    margin-top: -2px;
}

/* Fortaleza */
.grid-2 {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 680px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.soft-card {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 16px;
    padding: 14px;
}

.soft-title {
    font-weight: 800;
    letter-spacing: -.01em;
    opacity: .92;
}

.metric-big {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 6px;
}

    .metric-big span {
        font-size: 1.8rem;
        font-weight: 900;
        letter-spacing: -.03em;
    }

    .metric-big small {
        opacity: .70;
        font-size: .9rem;
    }

.metric-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
    font-size: .92rem;
}

.mini-metrics {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    font-size: .92rem;
}

.muted {
    opacity: .72;
}

.bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    overflow: hidden;
    margin-top: 10px;
}

.bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(34,197,94,.90), rgba(59,130,246,.90));
    transition: width .55s ease;
}

.insight-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    opacity: .92;
}

/* Micro-animaciones PRIME */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(10px);
        transition: opacity .45s ease, transform .45s ease;
    }

        .reveal.in {
            opacity: 1;
            transform: none;
        }

    .tap {
        transition: transform .12s ease, box-shadow .12s ease;
    }

        .tap:active {
            transform: scale(.985);
        }
}

/* Guardrail: evitar scroll horizontal del body */
html, body {
    overflow-x: hidden;
}


.tiny-note {
    font-size: .82rem;
    opacity: .72;
}

.metric-row {
    display: flex;
    gap: 14px;
    margin-top: 6px;
}

.metric {
    flex: 1;
}

.metric-k {
    font-size: .78rem;
    opacity: .7;
}

.metric-v {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.gline.warn .meter > span {
    background: rgba(250,204,21,.85);
}


/* --- Minutos: mini bar chart --- */
.mini-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

    .mini-bar-row:last-child {
        border-bottom: 0;
    }

    .mini-bar-row .k {
        width: 74px;
        font-weight: 700;
        letter-spacing: .2px;
        opacity: .95;
    }

    .mini-bar-row .b {
        flex: 1;
        min-width: 0;
    }

    .mini-bar-row .v {
        width: 88px;
        text-align: right;
        font-weight: 700;
    }

.ol-progress {
    height: 10px;
    background: rgba(255,255,255,.08);
    border-radius: 999px;
    overflow: hidden;
}

/* --- Sub badges en filtros --- */
.filters-sub .chip {
    padding: 6px 10px;
    border-radius: 999px;
}

/* --- Canchas list tweak --- */
#secCanchas .list-item-ol .name {
    font-weight: 800;
}

#secCanchas .list-item-ol .meta {
    opacity: .8;
    font-size: .86rem;
}


/* --- Canchas: ultra pro row (mobile-first) --- */
.cancha-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
    justify-content: space-between;
    border: 1px solid rgba(148,163,184,.16);
    background: rgba(2,6,23,.28);
    border-radius: 16px;
    padding: 12px;
    overflow: hidden;
}

.cancha-main {
    flex: 1;
    min-width: 0;
}

.cancha-name {
    font-weight: 900;
    letter-spacing: -.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cancha-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    color: rgba(226,232,240,.78);
    font-size: .84rem;
}

.c-pill {
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.05);
    border-radius: 999px;
    padding: 4px 8px;
    line-height: 1;
    white-space: nowrap;
}

.cancha-bar {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255,255,255,.08);
    margin-top: 10px;
}

    .cancha-bar > span {
        display: block;
        height: 100%;
        width: 0%;
        border-radius: 999px;
        background: linear-gradient(90deg, rgba(45,212,191,.90), rgba(74,163,255,.90));
    }

.cancha-win {
    width: 72px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    text-align: right;
    border-left: 1px solid rgba(255,255,255,.08);
    padding-left: 10px;
    flex: 0 0 auto;
}

    .cancha-win .v {
        font-weight: 900;
        font-size: 1.15rem;
        letter-spacing: -.02em;
    }

    .cancha-win .s {
        color: rgba(226,232,240,.70);
        font-size: .78rem;
        margin-top: -2px;
    }

@media (max-width: 420px) {
    .cancha-win {
        width: 64px;
    }

    .cancha-meta {
        font-size: .82rem;
    }
}
