/* ===== Tabla moderna (estilo X3 unificado) ===== */
.table-x3 {
    border-collapse: separate !important;
    border-spacing: 0 10px;
    /* filas flotantes */
    width: 100%;

    /* anular colores de Bootstrap para que no “aclare” celdas */
    --bs-table-bg: transparent;
    --bs-table-color: #f1f3f5;
    --bs-table-striped-bg: transparent;
    --bs-table-hover-bg: transparent;
}

.table-x3 thead th {
    background: #121212;
    /* más oscuro para header */
    color: #bad829;
    font-weight: 700;
    border: none;
    position: sticky;
    top: 0;
    z-index: 1;
    text-transform: uppercase;
    font-size: .85rem;
    letter-spacing: .5px;
}

.table-x3 tbody tr {
    background: #181818;
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(186, 216, 41, .12) inset,
        0 6px 18px rgba(0, 0, 0, .25);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.table-x3 tbody tr:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 0 1px rgba(186, 216, 41, .35) inset,
        0 10px 22px rgba(0, 0, 0, .35);
}

/* celdas transparentes para que se vea el fondo del <tr> */
.table-x3 thead th,
.table-x3 tbody>tr>* {
    border: 0 !important;
    background: transparent !important;
    color: #f1f3f5;
}

.table-x3 tbody td:first-child {
    border-radius: 14px 0 0 14px;
}

.table-x3 tbody td:last-child {
    border-radius: 0 14px 14px 0;
}

/* Chips oscuros con acento X3 */
.chip {
    display: inline-block;
    padding: .2rem .55rem;
    border-radius: 9999px;
    font-size: .78rem;
    line-height: 1;
    background: rgba(0, 0, 0, .5);
    /* fondo dark sólido/translúcido */
    border: 1px solid rgba(186, 216, 41, .2);
    /* borde verde sutil */
    color: #f1f3f5;
    /* texto claro */
}

.chip-cancha {
    background: rgba(186, 216, 41, .15);
    /* verde lima translúcido */
    border-color: rgba(186, 216, 41, .35);
    color: #bad829;
}

.chip-fecha,
.chip-hora {
    background: rgba(0, 0, 0, .5);
    border-color: rgba(255, 255, 255, .06);
    color: #f1f3f5;
}

/* Badges oscuros */
.badge-estado {
    display: inline-block;
    padding: .18rem .5rem;
    border-radius: .5rem;
    font-size: .72rem;
    margin-right: .35rem;
    vertical-align: middle;
}

.badge-final {
    background: rgba(76, 175, 80, .15);
    color: #9be49d;
    border: 1px solid rgba(76, 175, 80, .35);
}

.badge-pend {
    background: rgba(255, 193, 7, .15);
    color: #ffd666;
    border: 1px solid rgba(255, 193, 7, .35);
}

/* Resultado en modo dark */
.res {
    font-weight: 600;
    letter-spacing: .3px;
    color: #f1f3f5;
}

/* Partidos pendientes resaltados */
.table-x3 tbody tr[data-pendiente="1"] {
    box-shadow:
        0 0 0 1px rgba(255, 193, 7, .18) inset,
        0 6px 18px rgba(0, 0, 0, .25);
}

/* ===== Modo cards en mobile ===== */
@media (max-width: 768px) {
    .table-x3 thead {
        display: none;
    }

    .table-x3 tbody tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .35rem .75rem;
        padding: .75rem;
    }

    .table-x3 tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: .25rem .5rem !important;
        border: 0 !important;
        font-size: .95rem;
    }

    .table-x3 tbody td::before {
        content: attr(data-label);
        color: #9aa0a6;
        font-size: .78rem;
        margin-right: .75rem;
    }

    /* Campos que ocupan ancho completo */
    .table-x3 tbody td[data-label="Pareja 1"],
    .table-x3 tbody td[data-label="Pareja 2"],
    .table-x3 tbody td[data-label="Resultado"],
    .table-x3 tbody td[data-label="Ganadores"],
    .table-x3 tbody td[data-label="Detalle"] {
        grid-column: 1 / -1;
    }
}

/* —— Tabla moderna (estilo X3 unificado) —— */
.table-x3 {
    border-collapse: separate !important;
    border-spacing: 0 10px;
    /* filas flotantes */
    width: 100%;
}

.table-x3 thead th {
    background: #121212;
    /* más oscuro para header */
    color: #bad829;
    font-weight: 700;
    border: none;
    position: sticky;
    top: 0;
    z-index: 1;
    text-transform: uppercase;
    font-size: .85rem;
    letter-spacing: .5px;
}

.table-x3 tbody tr {
    background: #181818;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(186, 216, 41, .12) inset,
        0 6px 18px rgba(0, 0, 0, .25);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.table-x3 tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px rgba(186, 216, 41, .35) inset,
        0 10px 22px rgba(0, 0, 0, .35);
}

.table-x3 tbody td,
.table-x3 thead th {
    border: 0 !important;
}

.table-x3 tbody td:first-child {
    border-radius: 14px 0 0 14px;
}

.table-x3 tbody td:last-child {
    border-radius: 0 14px 14px 0;
}

/* Chips oscuros con acento X3 */
.chip {
    display: inline-block;
    padding: .2rem .55rem;
    border-radius: 9999px;
    font-size: .78rem;
    line-height: 1;
    background: rgba(0, 0, 0, .5);
    /* fondo dark sólido/translúcido */
    border: 1px solid rgba(186, 216, 41, .2);
    /* borde verde sutil */
    color: #f1f3f5;
    /* texto claro */
}

.chip-cancha {
    background: rgba(186, 216, 41, .15);
    /* verde lima translúcido */
    border-color: rgba(186, 216, 41, .35);
    color: #bad829;
}

.chip-fecha,
.chip-hora {
    background: rgba(0, 0, 0, .5);
    border-color: rgba(255, 255, 255, .06);
    color: #f1f3f5;
}

/* Badges oscuros */
.badge-estado {
    display: inline-block;
    padding: .18rem .5rem;
    border-radius: .5rem;
    font-size: .72rem;
    margin-right: .35rem;
    vertical-align: middle;
}

.badge-final {
    background: rgba(76, 175, 80, .15);
    color: #9be49d;
    border: 1px solid rgba(76, 175, 80, .35);
}

.badge-pend {
    background: rgba(255, 193, 7, .15);
    color: #ffd666;
    border: 1px solid rgba(255, 193, 7, .35);
}

/* Resultado en modo dark */
.res {
    font-weight: 600;
    letter-spacing: .3px;
    color: #f1f3f5;
    /* texto claro */
}

/* Resultado */
.res {
    font-weight: 600;
    letter-spacing: .3px;
    color: #e2dbdbff;
}

/* Partidos pendientes resaltados */
.table-x3 tbody tr[data-pendiente="1"] {
    box-shadow: 0 0 0 1px rgba(255, 193, 7, .18) inset,
        0 6px 18px rgba(0, 0, 0, .25);
}

/* Modo cards en mobile */
@media (max-width: 768px) {
    .table-x3 thead {
        display: none;
    }

    .table-x3 tbody tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .35rem .75rem;
        padding: .75rem;
    }

    .table-x3 tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: .25rem .5rem !important;
        border: 0 !important;
        font-size: .95rem;
    }

    .table-x3 tbody td::before {
        content: attr(data-label);
        color: #9aa0a6;
        font-size: .78rem;
        margin-right: .75rem;
    }

    .table-x3 tbody td[data-label="Pareja 1"],
    .table-x3 tbody td[data-label="Pareja 2"],
    .table-x3 tbody td[data-label="Resultado"] {
        grid-column: 1 / -1;
    }
}

/* —— Lista de Parejas ————————————————————— */
.parejas-list {
    display: grid;
    gap: .5rem;
}

.pareja-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .75rem;
    border-radius: 12px;
    background: #121212;
    /* dark sólido (mejor lectura) */
    border: 1px solid rgba(186, 216, 41, .18);
    /* #bad829 sutil */
    box-shadow: 0 2px 10px rgba(0, 0, 0, .22);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.pareja-item:hover {
    transform: translateY(-1px);
    border-color: rgba(186, 216, 41, .35);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .32);
}

.pareja-item .jugador {
    color: #f1f3f5;
    font-weight: 500;
}

.pareja-item .jugador-2 {
    color: #bad829;
    font-weight: 600;
}

/* acento X3 */
.pareja-item .sep {
    color: #9aa0a6;
    opacity: .85;
}

/* Compacto en mobile */
@media (max-width: 576px) {
    .pareja-item {
        padding: .5rem .65rem;
        border-radius: 10px;
    }

    .pareja-item .jugador,
    .pareja-item .jugador-2 {
        font-size: .95rem;
    }
}

/* Opcional: separar visualmente los ítems como “cards” sin que parezcan pills */
.parejas-list .pareja-item:nth-child(odd) {
    background: #151515;
}

/* Añadí ESTO al final de tu CSS */
.table-x3 {
    /* Anula colores de Bootstrap para esta tabla */
    --bs-table-bg: transparent;
    --bs-table-color: #f1f3f5;
    --bs-table-striped-bg: transparent;
    --bs-table-hover-bg: transparent;
}

/* Los cells no deben pintar fondo */
.table-x3 tbody>tr>* {
    background-color: transparent !important;
    color: #f1f3f5;
    /* texto claro */
    border: 0 !important;
    /* sin líneas de planilla */
}

/* Por si algún tema mete background en thead/tfoot */
.table-x3 thead>tr>* {
    background-color: #121212 !important;
    color: #bad829 !important;
    border: 0 !important;
}

/* Mantener esquinas redondeadas visibles */
.table-x3 tbody td:first-child {
    border-radius: 14px 0 0 14px;
}

.table-x3 tbody td:last-child {
    border-radius: 0 14px 14px 0;
}

/* Añadí ESTO al final de tu CSS */
.table-x3 {
    /* Anula colores de Bootstrap para esta tabla */
    --bs-table-bg: transparent;
    --bs-table-color: #f1f3f5;
    --bs-table-striped-bg: transparent;
    --bs-table-hover-bg: transparent;
}

/* Los cells no deben pintar fondo */
.table-x3 tbody>tr>* {
    background-color: transparent !important;
    color: #f1f3f5;
    /* texto claro */
    border: 0 !important;
    /* sin líneas de planilla */
}

/* Por si algún tema mete background en thead/tfoot */
.table-x3 thead>tr>* {
    background-color: #121212 !important;
    color: #bad829 !important;
    border: 0 !important;
}

/* Mantener esquinas redondeadas visibles */
.table-x3 tbody td:first-child {
    border-radius: 14px 0 0 14px;
}

.table-x3 tbody td:last-child {
    border-radius: 0 14px 14px 0;
}

/* ===== Edge-to-edge en móviles (aprovecha toda la pantalla) ===== */
@media (max-width: 576px) {

    /* quita márgenes/padding laterales “bootstrap” en mobile */
    .edge-mobile .container,
    .edge-mobile .container>.card-x3 {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .edge-mobile .accordion-body,
    .edge-mobile .card-x3 {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    /* empuja la tabla hasta los bordes */
    .edge-mobile .table-responsive {
        margin-left: -8px;
        margin-right: -8px;
    }
}

/* ===== Mejora de legibilidad “card” en tablas table-x3 (mobile) ===== */
@media (max-width: 576px) {

    /* usamos una columna fija para la etiqueta y otra flexible para el valor */
    .table-x3 tbody tr {
        display: grid;
        grid-template-columns: 94px 1fr;
        /* 94px para el “label”, resto contenido */
        gap: .4rem .8rem;
        padding: .85rem .9rem;
        margin-bottom: .6rem;
        /* separa “cards” */
        border-radius: 12px;
        /* ya viene del tema */
    }

    .table-x3 tbody td {
        display: flex;
        align-items: center;
        padding: .2rem 0 !important;
        /* más compacto, sin bordes de celdas */
        border: 0 !important;
        min-width: 0;
        /* evita overflow */
    }

    .table-x3 tbody td::before {
        content: attr(data-label);
        flex: 0 0 94px;
        /* ancho fijo = 1ª columna */
        color: #9aa0a6;
        font-size: .78rem;
        text-transform: uppercase;
        letter-spacing: .3px;
        opacity: .9;
    }

    /* estas filas suelen ser más largas: que usen todo el ancho */
    .table-x3 tbody td[data-label="Pareja 1"],
    .table-x3 tbody td[data-label="Pareja 2"],
    .table-x3 tbody td[data-label="Resultado"] {
        grid-column: 1 / -1;
        /* ocupan ambas columnas */
    }

    /* tipografía un poco más grande y aireada para leer mejor */
    .table-x3 tbody td {
        font-size: 0.95rem;
        line-height: 1.25;
    }

    .table-x3 .res {
        font-size: 1.02rem;
    }

    /* chips/badges no tan “píldora pequeña” en mobile */
    .chip {
        padding: .24rem .6rem;
        font-size: .82rem;
    }

    .badge-estado {
        padding: .22rem .55rem;
        font-size: .75rem;
    }

    @media (max-width: 768px) {

        /* Día ocupa toda la fila */
        .table-x3 tbody td[data-label="Día"] {
            grid-column: 1 / -1;
        }

        /* Fecha ocupa toda la fila debajo del Día */
        .table-x3 tbody td[data-label="Fecha"] {
            grid-column: 1 / -1;
        }
    }

}