﻿/* =========================================================
   ConsultaSorteosBanca.razor.css
   DISEÑO TOTAL (prefijo cb-)
========================================================= */

/* =========================================================
   SHELL
========================================================= */
.cb-shell {
    background: radial-gradient(1200px 600px at 20% -10%, rgba(99,102,241,.18), transparent 60%), radial-gradient(900px 500px at 90% 0%, rgba(14,165,233,.14), transparent 55%), linear-gradient(180deg, #fbfcff 0%, #f3f7ff 100%);
    border: 1px solid rgba(148,163,184,.35);
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(15,23,42,.10);
    padding: 18px;
    box-sizing: border-box;
    overflow: visible;
}

/* =========================================================
   HEADER
========================================================= */
.cb-header {
    border-radius: 20px;
    padding: 18px 18px;
    background: linear-gradient(135deg, #111827 0%, #1f2a44 45%, #0b1220 100%);
    box-shadow: 0 18px 36px rgba(0,0,0,.22);
    color: #fff;
    position: relative;
    overflow: hidden;
}

    .cb-header::after {
        content: "";
        position: absolute;
        inset: -40px;
        background: radial-gradient(600px 240px at 20% 20%, rgba(99,102,241,.35), transparent 60%), radial-gradient(500px 220px at 90% 30%, rgba(14,165,233,.30), transparent 55%);
        pointer-events: none;
    }

.cb-title {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 1000;
    letter-spacing: .3px;
    position: relative;
    z-index: 1;
}

/* =========================================================
   FILTERS (fila flexible — igual criterio que Consulta Totales)
========================================================= */
.cb-filters {
    margin-top: 14px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(148,163,184,.35);
    border-radius: 20px;
    padding: 14px 18px 12px;
    box-shadow: 0 14px 26px rgba(15,23,42,.08);
    overflow: visible;
    position: relative;
    z-index: 40;
}

.cb-filters-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px 16px;
    width: 100%;
    overflow: visible;
}

/* campo */
.cb-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.cb-label {
    font-size: .95rem;
    font-weight: 1000;
    color: #0f172a;
}

.cb-field-modo {
    flex: 0 1 175px;
    width: 175px;
    max-width: 100%;
    min-width: 140px;
}

.cb-field-juego {
    flex: 0 1 165px;
    width: 165px;
    max-width: 100%;
    min-width: 130px;
}

.cb-field-fecha {
    flex: 0 0 200px;
    width: 200px;
    max-width: 100%;
    min-width: 160px;
}

.cb-field-vend,
.cb-field-sorteos,
.cb-field-listero,
.cb-field-listero-vend {
    flex: 0 0 290px;
    width: 290px;
    max-width: 100%;
    min-width: 230px;
    position: relative;
}

.cb-field-juego .cb-select,
.cb-field-fecha .cb-date,
.cb-field-modo .cb-select {
    width: 100%;
    max-width: 100%;
}

.cb-select-juego {
    width: 100%;
}

/* inputs normales */
.cb-select,
.cb-date,
.cb-vend-input {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(148,163,184,.45);
    padding: 12px 12px;
    outline: none;
    background: #ffffff;
    font-weight: 950;
    color: #0b1220;
    transition: .15s ease;
    font-size: 1.05rem;
    box-shadow: 0 10px 18px rgba(15,23,42,.06);
    box-sizing: border-box;
}

    .cb-select:focus,
    .cb-date:focus,
    .cb-vend-input:focus {
        border-color: rgba(99,102,241,.85);
        box-shadow: 0 0 0 4px rgba(99,102,241,.18), 0 14px 24px rgba(15,23,42,.10);
    }

/* texto "Seleccionado" normal */
.cb-vend-hint {
    margin-top: 4px;
    font-size: .9rem;
    font-weight: 900;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* texto "Seleccionado" fuerte */
.cb-vend-hint-strong {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: linear-gradient(180deg, #e9f2ff, #ffffff);
    border: 1px solid rgba(59,130,246,.28);
    color: #0b3a78;
    font-size: 13.5px;
    font-weight: 950;
    box-shadow: 0 10px 18px rgba(15,23,42,.06);
}

/* =========================================================
   ACTIONS
========================================================= */
.cb-actions {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

@media (max-width: 1100px) {
    .cb-actions {
        flex: 1 1 100%;
    }
}

@media (max-width: 720px) {
    .cb-actions .cb-btn {
        flex: 1 1 auto;
    }
}

.cb-btn {
    border: 0;
    border-radius: 16px;
    padding: 12px 14px;
    font-weight: 1000;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: transform .08s ease, box-shadow .15s ease, filter .15s ease, opacity .15s ease;
    font-size: 1.05rem;
    user-select: none;
}

    .cb-btn:active {
        transform: translateY(1px);
    }

    .cb-btn:disabled {
        opacity: .55;
        cursor: not-allowed;
        box-shadow: none;
    }

.cb-btn-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.cb-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #6366f1 0%, #0ea5e9 100%);
    box-shadow: 0 16px 30px rgba(99,102,241,.22);
}

    .cb-btn-primary:hover {
        filter: brightness(1.02);
        box-shadow: 0 18px 34px rgba(99,102,241,.28);
    }

.cb-btn-soft {
    color: #0b1220;
    background: linear-gradient(180deg, #ffffff 0%, #f2f6ff 100%);
    border: 1px solid rgba(148,163,184,.35);
    box-shadow: 0 14px 22px rgba(15,23,42,.08);
}

    .cb-btn-soft:hover {
        filter: brightness(.99);
    }

/* =========================================================
   MESSAGES
========================================================= */
.cb-hint {
    margin-top: 14px;
    padding: 14px;
    border-radius: 18px;
    border: 1px dashed rgba(99,102,241,.45);
    background: linear-gradient(180deg, #ffffff 0%, #f4f7ff 100%);
    color: #0f172a;
    font-weight: 950;
    font-size: 1.02rem;
    box-shadow: 0 12px 20px rgba(15,23,42,.06);
}

.cb-alert {
    margin-top: 14px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(148,163,184,.35);
    background: #fff;
    box-shadow: 0 12px 22px rgba(15,23,42,.08);
}

.cb-alert-title {
    font-weight: 1000;
    color: #0b1220;
    margin-bottom: 6px;
    font-size: 1.05rem;
}

.cb-alert-msg {
    color: #1f2937;
    font-weight: 900;
    font-size: 1rem;
}

.cb-alert-danger {
    border-color: rgba(239,68,68,.35);
    background: linear-gradient(180deg, #fff5f5 0%, #ffffff 100%);
}

.cb-alert-soft {
    border-color: rgba(14,165,233,.25);
    background: linear-gradient(180deg, #f4fbff 0%, #ffffff 100%);
}

/* =========================================================
   SUMMARY CARD + TABLE
========================================================= */
.cb-card {
    margin-top: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
    border-radius: 22px;
    border: 1px solid rgba(148,163,184,.35);
    box-shadow: 0 18px 34px rgba(15,23,42,.10);
    padding: 14px;
}

.cb-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.cb-card-title {
    font-weight: 1000;
    color: #0b1220;
    font-size: 1.25rem;
}

.cb-card-sub {
    margin-top: 4px;
    color: #475569;
    font-weight: 950;
    font-size: 1.02rem;
}

/* chips */
.cb-totals {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: stretch;
}

.cb-total-chip {
    min-width: 155px;
    border-radius: 18px;
    padding: 10px 12px;
    border: 1px solid rgba(148,163,184,.35);
    background: radial-gradient(240px 80px at 20% 0%, rgba(99,102,241,.18), transparent 65%), linear-gradient(180deg, #ffffff 0%, #f4f7ff 100%);
    box-shadow: 0 12px 20px rgba(15,23,42,.07);
}

    .cb-total-chip .k {
        font-weight: 1000;
        font-size: .9rem;
        color: #475569;
        margin-bottom: 4px;
    }

    .cb-total-chip .v {
        font-weight: 1000;
        font-size: 1.3rem;
        color: #0b1220;
    }

.cb-total-chip-strong {
    border-color: rgba(14,165,233,.40);
    background: radial-gradient(240px 80px at 70% 0%, rgba(14,165,233,.20), transparent 65%), linear-gradient(180deg, #ffffff 0%, #f2fbff 100%);
}

/* main table */
.cb-table-wrap {
    margin-top: 12px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(148,163,184,.35);
    box-shadow: 0 14px 26px rgba(15,23,42,.08);
}

.cb-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
}

    .cb-table thead th {
        padding: 12px 12px;
        font-weight: 1000;
        text-align: left;
        font-size: 1rem;
        color: #0b1220;
        background: linear-gradient(135deg, #eef2ff 0%, #e0f2fe 60%, #f8fafc 100%);
        border-bottom: 1px solid rgba(148,163,184,.35);
    }

    .cb-table tbody td {
        padding: 12px 12px;
        border-bottom: 1px solid rgba(226,232,240,.9);
        color: #0f172a;
        font-weight: 950;
        background: #fff;
        font-size: 1.02rem;
    }

    .cb-table tbody tr:nth-child(2n) td {
        background: #fbfdff;
    }

    .cb-table tbody tr:hover td {
        background: #f1f5ff;
    }

    .cb-table tfoot td {
        padding: 12px 12px;
        font-weight: 1000;
        background: #0b1220;
        color: #fff;
        border-top: 1px solid rgba(255,255,255,.15);
        font-size: 1.05rem;
    }

    .cb-table .num {
        text-align: right;
        font-variant-numeric: tabular-nums;
    }

.cb-name {
    font-weight: 1000;
    color: #0b1220;
}

.venta {
    color: #4f46e5;
}

.comi {
    color: #0f766e;
}

.prem {
    color: #b91c1c;
}

.saldo {
    color: #0b1220;
}

.saldo-neg {
    color: #dc2626 !important;
    font-weight: 950;
}

.saldo-pos {
    color: #15803d !important;
    font-weight: 950;
}

.total-label {
    font-weight: 1000;
}

/* ganador pill */
.cb-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 70px;
    height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 18px;
    letter-spacing: .8px;
    color: #7a0f14;
    background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.9), rgba(255,255,255,0) 55%), linear-gradient(180deg, #ffd6d6, #ff9a9a);
    border: 1px solid rgba(122,15,20,.25);
    box-shadow: 0 14px 26px rgba(220,38,38,.25), 0 8px 16px rgba(15,23,42,.12);
    position: relative;
    overflow: hidden;
    animation: cbPulse 1.8s ease-in-out infinite;
}

    .cb-pill::after {
        content: "";
        position: absolute;
        top: -40%;
        left: -60%;
        width: 45%;
        height: 180%;
        transform: rotate(18deg);
        background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.45), rgba(255,255,255,0));
        animation: cbShine 3s ease-in-out infinite;
        pointer-events: none;
    }

@keyframes cbPulse {
    0%, 100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-1px) scale(1.04);
    }
}

@keyframes cbShine {
    0% {
        left: -55%;
        opacity: 0;
    }

    15% {
        opacity: .85;
    }

    55% {
        opacity: .35;
    }

    100% {
        left: 120%;
        opacity: 0;
    }
}

.cb-muted {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px dashed rgba(15,23,42,.25);
    background: rgba(15,23,42,.04);
    opacity: .7;
    font-weight: 900;
    color: #94a3b8;
}

/* bolitas */
.cb-bola {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    display: inline-block;
    flex: 0 0 16px;
    border: 1px solid rgba(15,23,42,.25);
    box-shadow: 0 10px 18px rgba(15,23,42,.18);
    position: relative;
    transform: translateZ(0);
    animation: cbBolaFloat 1.2s ease-in-out infinite;
}

    .cb-bola::after {
        content: "";
        position: absolute;
        inset: 2px auto auto 3px;
        width: 6px;
        height: 6px;
        border-radius: 999px;
        background: rgba(255,255,255,.85);
        filter: blur(.2px);
    }

.cb-bola-roja {
    background: radial-gradient(circle at 30% 30%, #fff, rgba(255,255,255,.15) 30%), linear-gradient(180deg, #ff4d4d, #b91c1c);
    border-color: rgba(185, 28, 28, .45);
}

.cb-bola-blanca {
    background: radial-gradient(circle at 30% 30%, #fff, rgba(255,255,255,.25) 30%), linear-gradient(180deg, #ffffff, #e5e7eb);
    border-color: rgba(148,163,184,.55);
}

.cb-bola-mix {
    background: linear-gradient(90deg, #b91c1c 0 50%, #e5e7eb 50% 100%);
    border-color: rgba(15,23,42,.28);
}

@keyframes cbBolaFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-2px) scale(1.06);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cb-pill,
    .cb-bola {
        animation: none !important;
    }
}

/* icon button lista */
.cb-icon {
    border: 1px solid rgba(148,163,184,.35);
    background: linear-gradient(180deg, #ffffff 0%, #f4f7ff 100%);
    color: #0b1220;
    border-radius: 14px;
    padding: 9px 10px;
    cursor: pointer;
    font-weight: 1000;
    transition: .15s ease;
    box-shadow: 0 10px 16px rgba(15,23,42,.08);
    font-size: 1rem;
}

    .cb-icon:hover {
        transform: translateY(-1px);
        background: #eef2ff;
    }

/* =========================================================
   MODAL LISTA (TIEMPOS / PARLEY)
========================================================= */
.cb-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 2300 !important;
}

/* Modal */
.cb-modal-lista {
    position: fixed;
    inset: 12px !important;
    transform: none !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    background: radial-gradient(1200px 600px at 20% -10%, rgba(99,102,241,.18), transparent 60%), radial-gradient(900px 500px at 90% 0%, rgba(14,165,233,.14), transparent 55%), linear-gradient(180deg, #fbfcff 0%, #f3f7ff 100%);
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(15,23,42,.40);
    border: 1px solid rgba(148,163,184,.35);
    z-index: 2310 !important;
    padding: 18px 14px 16px;
    backdrop-filter: blur(10px);
    overflow: auto !important;
    box-sizing: border-box;
}

/* cerrar */
.cb-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    font-size: 22px;
    font-weight: 900;
    cursor: pointer;
    color: #ef4444;
    z-index: 2400;
}

    .cb-modal-close:hover {
        filter: brightness(.9);
    }

.cb-modal-wrap {
    width: 100%;
    max-width: 1500px; /* 👈 límite para centrar contenido */
    margin: 0 auto; /* 👈 CENTRA TODO */
    padding: 0 10px;
    box-sizing: border-box;
}

/* =========================================================
   TOPBAR DEL MODAL
========================================================= */
.cb-modal-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 12px 12px;
    border-radius: 18px;
    background: rgba(255,255,255,.80);
    border: 1px solid rgba(15, 23, 42, .12);
    box-shadow: 0 18px 40px rgba(15, 23, 42, .12);
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.cb-modal-top-left {
    display: grid;
    gap: 6px;
}

.cb-modal-top-title {
    font-size: 24px;
    font-weight: 950;
    letter-spacing: .2px;
    color: #c2410c;
}

.cb-modal-sorteo {
    color: #0f172a;
    font-weight: 1000;
}

.cb-modal-top-total {
    font-size: 14px;
    font-weight: 900;
    color: #0f172a;
}

    .cb-modal-top-total .lbl {
        opacity: .75;
        margin-right: 6px;
    }

    .cb-modal-top-total .val {
        font-weight: 1000;
    }

/* chips del modal */
.cb-modal-top-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

    .cb-modal-top-chips .chip {
        min-width: 140px;
        padding: 10px 12px;
        border-radius: 16px;
        background: rgba(255,255,255,.90);
        border: 1px solid rgba(15,23,42,.10);
        box-shadow: 0 14px 28px rgba(15,23,42,.10);
        text-align: left;
    }

        .cb-modal-top-chips .chip .k {
            font-size: 12px;
            font-weight: 950;
            opacity: .65;
            letter-spacing: .2px;
        }

        .cb-modal-top-chips .chip .v {
            margin-top: 2px;
            font-size: 18px;
            font-weight: 950;
            letter-spacing: .2px;
        }

    .cb-modal-top-chips .chip-strong {
        border-color: rgba(34,197,94,.22);
        background: rgba(34,197,94,.10);
    }

/* =========================================================
   GANADOR (arriba del grid)
========================================================= */
.cb-fila-totales-normal {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .cb-fila-totales-normal .label {
        font-weight: 950;
        color: #0f172a;
    }

.cb-win-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 950;
    letter-spacing: .5px;
    line-height: 1;
    transform: translateZ(0);
}

    .cb-win-pill.cb-win-soft-red {
        font-size: 1.15rem;
        color: #8b1b1b;
        background: linear-gradient(180deg, #ffe9e9, #ffd0d0);
        border: 1px solid rgba(183, 28, 28, 0.28);
        box-shadow: 0 10px 22px rgba(183, 28, 28, 0.14);
        animation: cbWinGlow 1.2s ease-in-out infinite alternate;
    }

@keyframes cbWinGlow {
    from {
        transform: scale(1);
        filter: saturate(1);
    }

    to {
        transform: scale(1.04);
        filter: saturate(1.15);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cb-win-pill.cb-win-soft-red {
        animation: none !important;
    }
}

/* =========================================================
   LISTA TIEMPOS (00..99)
   BLOQUE LIMPIO Y ÚNICO
========================================================= */

.cb-modal-grid-zoom {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

/* ===== NORMAL ===== */

.cb-fila-cabecera,
.cb-fila-numeros,
.cb-fila-totales-f.cb-totales-normal-directo {
    display: grid;
    grid-template-columns: repeat(5, 104px 112px);
    column-gap: 4px;
    row-gap: 4px;
    justify-content: center;
    align-items: center;
}

    /* ===== REVENTADO ===== */

    .cb-fila-cabecera.cb-cabecera-reventado,
    .cb-fila-numeros.cb-fila-reventado,
    .cb-fila-totales-f.cb-totales-reventado {
        display: grid;
        grid-template-columns: repeat(5, 104px 112px 112px);
        column-gap: 4px;
        row-gap: 4px;
        justify-content: center;
        align-items: center;
    }

    /* ===== HEADERS ===== */

    .cb-fila-cabecera .h-num,
    .cb-fila-cabecera .h-monto,
    .cb-cabecera-reventado .h-r {
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 950;
        color: #fff;
    }

    .cb-fila-cabecera .h-num {
        background: linear-gradient(180deg,#2563eb,#1d4ed8);
    }

    .cb-fila-cabecera .h-monto {
        background: linear-gradient(180deg,#16a34a,#15803d);
    }

.cb-cabecera-reventado .h-r {
    background: linear-gradient(180deg,#ef4444,#dc2626);
}

/* ===== CELDAS ===== */

.cb-celda-num,
.cb-celda-monto,
.cb-celda-monto-r {
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    font-size: 15px;
    font-weight: 950;
    box-sizing: border-box;
    font-variant-numeric: tabular-nums;
}

/* NUMERO */

.cb-celda-num {
    justify-content: center;
    border: 1px solid rgba(37,99,235,.22);
    background: linear-gradient(180deg,rgba(37,99,235,.14),rgba(37,99,235,.08));
    color: #1d4ed8;
}

/* MONTO */

.cb-celda-monto {
    justify-content: flex-end;
    padding-right: 10px;
    border: 1px solid rgba(22,163,74,.22);
    background: linear-gradient(180deg,rgba(22,163,74,.14),rgba(22,163,74,.08));
    color: #15803d;
}

/* REVENTADO */

.cb-celda-monto-r {
    justify-content: flex-end;
    padding-right: 10px;
    border: 1px solid rgba(220,38,38,.22);
    background: linear-gradient(180deg,rgba(239,68,68,.16),rgba(239,68,68,.08));
    color: #991b1b;
}

/* ===== TOTALES ===== */

.cb-fila-totales-f .t-label,
.cb-fila-totales-f .t-base,
.cb-fila-totales-f .t-rev {
    height: 34px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-variant-numeric: tabular-nums;
}

/* LABEL */

.cb-fila-totales-f .t-label {
    border: 1px solid rgba(37,99,235,.35);
    background: linear-gradient(180deg, rgba(37,99,235,.16), rgba(226,232,240,.65));
    font-size: 13px;
    font-weight: 1000;
    color: #123a6c;
    box-shadow: 0 8px 16px rgba(15,23,42,.10);
}

/* BASE */

.cb-fila-totales-f .t-base {
    border: 1px solid rgba(22,163,74,.35);
    background: radial-gradient(240px 60px at 50% 0%, rgba(22,163,74,.22), transparent 65%),
        linear-gradient(180deg, rgba(22,163,74,.18), rgba(22,163,74,.10));
    font-size: 16px;
    font-weight: 1100;
    color: #052e16;
    box-shadow: 0 10px 18px rgba(22,163,74,.14), 0 10px 18px rgba(15,23,42,.10);
}

/* REVTA */

.cb-fila-totales-f .t-rev {
    border: 1px solid rgba(220,38,38,.35);
    background: radial-gradient(240px 60px at 50% 0%, rgba(239,68,68,.22), transparent 65%),
        linear-gradient(180deg, rgba(239,68,68,.20), rgba(239,68,68,.10));
    font-size: 16px;
    font-weight: 1100;
    color: #450a0a;
    box-shadow: 0 10px 18px rgba(239,68,68,.14), 0 10px 18px rgba(15,23,42,.10);
}
/* =========================================================
   PARLEY EN MODAL
========================================================= */
.cb-lista-parley {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

    .cb-lista-parley .cb-fila-cabecera.parley,
    .cb-lista-parley .cb-fila-numeros.parley {
        display: grid;
        grid-template-columns: repeat(5, 90px 95px);
        column-gap: 4px;
        row-gap: 4px;
        justify-content: center;
        align-items: center;
    }

    .cb-lista-parley .cb-celda-num.parley,
    .cb-lista-parley .cb-celda-monto.parley {
        font-size: 13px;
        font-weight: 900;
    }

/* =========================================================
   HISTÓRICOS MODAL
========================================================= */
.cb-modal-overlay-hist {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    /* Por encima del submenu-overlay de Banca (9998) */
    z-index: 10100 !important;
}

.cb-modal-hist {
    position: fixed;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: min(680px, calc(100vw - 28px));
    max-width: 680px;
    background: rgba(255,255,255,.96);
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(15,23,42,.40);
    border: 1px solid rgba(148,163,184,.35);
    z-index: 10110 !important;
    padding: 22px 24px 20px;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.cb-hist-title .t1 {
    font-size: 26px;
    font-weight: 950;
}

.cb-hist-title .t2 {
    margin-top: 4px;
    color: #64748b;
    font-size: 15px;
    font-weight: 800;
}

.cb-hist-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 120px;
    gap: 14px;
    align-items: end;
}


.cb-hist-field label {
    display: block;
    font-size: 13px;
    color: #475569;
    margin-bottom: 6px;
    font-weight: 800;
}

.cb-hist-field input {
    width: 100%;
    height: 52px;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 800;
    padding: 0 12px;
    border: 1px solid rgba(148,163,184,.55);
    outline: none;
    background: rgba(255,255,255,.92);
    box-sizing: border-box;
}

    .cb-hist-field input:focus {
        border-color: rgba(37, 99, 235, .55);
        box-shadow: 0 0 0 4px rgba(37,99,235,.14);
    }

.cb-hist-actions {
    display: flex;
    justify-content: stretch;
}

    .cb-hist-actions .cb-hist-btn {
        width: 100%;
    }

.cb-hist-btn {
    height: 48px;
    border-radius: 14px;
    font-size: 17px;
    padding: 0 22px;
}

/* =========================================================
   RESUMEN HISTÓRICO FULL SCREEN
========================================================= */
.cb-modal-hist.cb-modal-hist-wide {
    inset: 12px !important;
    transform: none !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: hidden;
    border-radius: 18px;
    padding: 18px 18px 14px;
}

.cb-modal-resumen-hist {
    position: fixed !important;
    inset: 12px !important;
    transform: none !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    overflow: hidden !important;
    border-radius: 18px !important;
}

.cb-modal-hist.cb-modal-hist-wide .cb-table-wrap {
    height: calc(100vh - 170px) !important;
    max-height: none !important;
    overflow: auto !important;
    border-radius: 14px;
    border: 1px solid rgba(148,163,184,.28);
    background: rgba(255,255,255,.72);
    box-shadow: inset 0 0 0 1px rgba(15,23,42,.03);
    padding: 0 !important;
    box-sizing: border-box;
    scrollbar-gutter: stable both-edges;
}

    /* scrollbars */
    .cb-modal-hist.cb-modal-hist-wide .cb-table-wrap::-webkit-scrollbar {
        width: 10px;
        height: 10px;
    }

    .cb-modal-hist.cb-modal-hist-wide .cb-table-wrap::-webkit-scrollbar-thumb {
        background: rgba(15,23,42,.22);
        border-radius: 999px;
        border: 2px solid rgba(255,255,255,.70);
    }

    .cb-modal-hist.cb-modal-hist-wide .cb-table-wrap::-webkit-scrollbar-track {
        background: rgba(15,23,42,.06);
        border-radius: 999px;
    }

/* alternado fuerte */
.cb-modal-hist-wide .cb-table tbody td {
    background: transparent !important;
}

.cb-modal-hist-wide .cb-table tbody tr:nth-child(odd) td {
    background: rgba(37, 99, 235, .18) !important;
}

.cb-modal-hist-wide .cb-table tbody tr:nth-child(even) td {
    background: rgba(37, 99, 235, .11) !important;
}

.cb-modal-hist-wide .cb-table tbody tr:hover td {
    background: rgba(59, 130, 246, .22) !important;
}

/* =========================================================
   FECHA MODAL
========================================================= */
.cb-fecha-modal {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 10120;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.82);
    border: 1px solid rgba(148,163,184,.35);
    box-shadow: 0 14px 24px rgba(15,23,42,.12);
    font-weight: 900;
    color: #0b1220;
}

/* =========================================================
   Franja de seleccionados debajo
========================================================= */
.cb-selected-strip {
    flex: 1 1 100%;
    display: flex;
    width: 100%;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 6px;
    padding: 8px 10px;
    border-radius: 16px;
    background: linear-gradient(180deg, #eef6ff 0%, #ffffff 100%);
    border: 1px solid rgba(59,130,246,.25);
    box-shadow: 0 12px 22px rgba(15,23,42,.08);
}

.cb-selected-pill {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 14px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(148,163,184,.30);
}

    .cb-selected-pill .k {
        font-weight: 950;
        color: #0b3a78;
        font-size: 13px;
    }

    .cb-selected-pill .v {
        font-weight: 1000;
        color: #0f172a;
        font-size: 13px;
        max-width: 520px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

/* =========================================================
   COMBO (input + flecha + panel)  ✅ SELECTOR FUNCIONAL
========================================================= */
.cb-combo {
    position: relative;
    width: 100%;
    max-width: 290px;
    z-index: 1;
}

.cb-field-vend:has(.cb-combo-dropdown),
.cb-field-sorteos:has(.cb-combo-dropdown),
.cb-field-listero:has(.cb-combo-dropdown),
.cb-field-listero-vend:has(.cb-combo-dropdown) {
    z-index: 120;
}

.cb-combo-input {
    width: 100%;
    height: 46px;
    border-radius: 16px;
    border: 1px solid rgba(148,163,184,.45);
    padding: 0 44px 0 12px; /* espacio flecha */
    outline: none;
    background: #fff;
    font-weight: 950;
    color: #0b1220;
    transition: .15s ease;
    font-size: 1.05rem;
    box-shadow: 0 10px 18px rgba(15,23,42,.06);
    box-sizing: border-box;
}

    .cb-combo-input::placeholder {
        color: rgba(15,23,42,.45);
        font-weight: 900;
    }

    .cb-combo-input:focus {
        border-color: rgba(99,102,241,.85);
        box-shadow: 0 0 0 4px rgba(99,102,241,.18), 0 14px 24px rgba(15,23,42,.10);
    }

.cb-combo-arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    height: 34px;
    width: 34px;
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,.35);
    background: linear-gradient(180deg,#ffffff 0%,#f2f6ff 100%);
    box-shadow: 0 10px 16px rgba(15,23,42,.08);
    cursor: pointer;
    font-weight: 1000;
    z-index: 3;
}

    .cb-combo-arrow:hover {
        filter: brightness(.99);
    }

.cb-multi-panel.cb-multi-panel-float,
.cb-combo-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    min-width: 100%;
    max-width: 300px;
    max-height: min(560px, calc(100dvh - 280px));
    z-index: 250;
    background: #ffffff;
    border: 1px solid rgba(148,163,184,.40);
    border-radius: 16px;
    box-shadow: 0 26px 60px rgba(15,23,42,.22);
    padding: 10px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
    contain: layout style;
}

.cb-combo-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147483646;
    background: transparent;
    cursor: default;
}

.cb-multi-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    font-weight: 900;
    color: #0f172a;
    transition: background .12s ease;
}

    .cb-multi-row span {
        min-width: 0;
        line-height: 1.25;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .cb-multi-row:hover {
        background: rgba(14,165,233,.10);
    }

    .cb-multi-row input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: #4f46e5;
    }

.cb-multi-row-top {
    background: rgba(99,102,241,.08);
    border: 1px solid rgba(99,102,241,.18);
    margin: 0 6px 8px;
    flex-shrink: 0;
}

.cb-multi-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: min(500px, calc(100dvh - 360px));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 6px 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
}

.cb-combo-dropdown .cb-multi-row {
    flex-shrink: 0;
}

    .cb-multi-list::-webkit-scrollbar {
        width: 10px;
    }

    .cb-multi-list::-webkit-scrollbar-thumb {
        background: rgba(15,23,42,.18);
        border-radius: 999px;
        border: 2px solid rgba(255,255,255,.75);
    }

    .cb-multi-list::-webkit-scrollbar-track {
        background: rgba(15,23,42,.06);
        border-radius: 999px;
    }


/* Celda R: IGUAL que .cb-celda-monto en tamaño, pero roja */
.cb-celda-monto-r {
    height: 26px;
    border-radius: 10px;
    border: 1px solid rgba(15,23,42,.18);
    background: rgba(255,229,229,.95); /* rojo suave */
    display: flex;
    align-items: center;
    justify-content: flex-end; /* igual que Monto */
    padding-right: 10px; /* igual que Monto */

    font-size: 13px; /* igual que Monto */
    font-weight: 900; /* igual que Monto */
    font-variant-numeric: tabular-nums;
    color: #7a0000;
}
/* Ganador en R */
.ganador-monto-r {
    background: #ffd0d0;
    border-color: #e35d5b;
    color: #7a0000;
}


@media (max-width: 700px) {
    /* =========================
       CONSULTA SORTEOS BANCA
       SOLO MÓVIL
       NO TOCA ESCRITORIO
       ========================= */

    .cb-shell {
        padding: 10px;
        border-radius: 16px;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    /* ===== Header ===== */
    .cb-header {
        padding: 14px;
        border-radius: 16px;
    }

    .cb-title {
        font-size: 1.18rem;
        line-height: 1.2;
    }

    /* ===== Filtros ===== */
    .cb-filters {
        margin-top: 12px;
        padding: 12px;
        border-radius: 16px;
        min-height: 0;
        gap: 10px;
    }

    .cb-filters-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .cb-field,
    .cb-field-juego,
    .cb-field-fecha,
    .cb-field-vend,
    .cb-field-sorteos {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .cb-label {
        font-size: 0.94rem;
        line-height: 1.2;
    }

    .cb-select,
    .cb-date,
    .cb-vend-input,
    .cb-combo-input {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        min-height: 46px;
        height: 46px;
        font-size: 16px;
        box-sizing: border-box;
    }

    .cb-select-juego {
        max-width: 100%;
    }

    /* ===== Combos vendedores / sorteos ===== */
    .cb-combo {
        width: 100%;
        min-width: 0;
    }

    .cb-combo-input {
        padding-right: 48px;
    }

    .cb-combo-arrow {
        position: absolute;
        top: 50%;
        right: 10px;
        transform: translateY(-50%);
        width: 34px;
        min-width: 34px;
        height: 34px;
        min-height: 34px;
        border-radius: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
        flex: 0 0 auto;
        font-size: 14px;
        line-height: 1;
    }

    .cb-combo-input {
        padding-right: 56px;
    }

    .cb-combo {
        position: relative;
    }

    .cb-combo-arrow svg,
    .cb-combo-arrow i,
    .cb-combo-arrow span {
        width: 14px;
        height: 14px;
        line-height: 14px;
        display: block;
    }

    .cb-combo-backdrop {
        background: rgba(15, 23, 42, 0.28);
        z-index: 99998;
    }

    .cb-multi-panel.cb-multi-panel-float.sl-dropdown-panel {
        border-radius: 16px;
    }

    .cb-multi-row-top {
        padding: 12px 14px;
        border-bottom: 1px solid rgba(226,232,240,.85);
        background: #f8fbff;
        flex-shrink: 0;
    }

    .cb-multi-list {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 8px 10px;
        background: #fff;
    }

    .cb-multi-row {
        display: grid;
        grid-template-columns: 26px 1fr;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        border-radius: 12px;
        min-height: 48px;
    }

        .cb-multi-row input {
            width: 20px;
            height: 20px;
            margin: 0;
        }

        .cb-multi-row span {
            min-width: 0;
            word-break: break-word;
            white-space: normal;
            line-height: 1.25;
            font-size: 0.98rem;
        }

    /* ===== Botones de acción ===== */
    .cb-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        width: 100%;
    }

    .cb-btn {
        width: 100%;
        min-height: 46px;
        justify-content: center;
        font-size: 0.96rem;
        padding: 10px 12px;
        border-radius: 14px;
        box-sizing: border-box;
    }

    /* ===== Franja de seleccionados ===== */
    .cb-selected-strip {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-top: 4px;
        padding: 10px;
        border-radius: 14px;
    }

    .cb-selected-pill {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

        .cb-selected-pill .k {
            font-size: 0.82rem;
            line-height: 1.1;
        }

        .cb-selected-pill .v {
            max-width: 100%;
            font-size: 0.92rem;
            line-height: 1.3;
            white-space: normal;
            overflow: visible;
            text-overflow: unset;
            word-break: break-word;
        }

    /* ===== Mensajes ===== */
    .cb-hint,
    .cb-alert {
        margin-top: 12px;
        padding: 12px;
        border-radius: 14px;
    }

    .cb-alert-title {
        font-size: 1rem;
    }

    .cb-alert-msg,
    .cb-hint {
        font-size: 0.94rem;
        line-height: 1.35;
    }

    /* ===== Card resumen ===== */
    .cb-card {
        margin-top: 12px;
        padding: 12px;
        border-radius: 16px;
    }

    .cb-card-top {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .cb-card-title {
        font-size: 1.08rem;
        line-height: 1.2;
    }

    .cb-card-sub {
        font-size: 0.94rem;
        line-height: 1.3;
    }

    .cb-totals {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .cb-total-chip {
        min-width: 0;
        width: 100%;
        border-radius: 14px;
        padding: 10px;
        box-sizing: border-box;
    }

        .cb-total-chip .k {
            font-size: 0.82rem;
        }

        .cb-total-chip .v {
            font-size: 1.02rem;
            line-height: 1.2;
            word-break: break-word;
        }

    /* ===== Tabla resumen ===== */
    .cb-table-wrap {
        margin-top: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        border-radius: 16px;
    }

    .cb-table {
        min-width: 760px;
        width: max-content;
    }

        .cb-table thead th,
        .cb-table tbody td,
        .cb-table tfoot td {
            padding: 10px;
            font-size: 0.94rem;
            line-height: 1.25;
        }

    .cb-pill {
        padding: 7px 10px;
        font-size: 0.9rem;
        gap: 8px;
    }

    .cb-icon {
        min-width: 40px;
        min-height: 40px;
        padding: 8px 9px;
    }

    /* ===== Modal lista ===== */
    .cb-modal-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.52);
        z-index: 2300 !important;
        overflow: hidden;
        overscroll-behavior: contain;
        touch-action: none;
    }

    body:has(.cb-modal-overlay),
    body:has(.cb-modal-overlay-hist) {
        overflow: hidden;
        touch-action: none;
        position: fixed;
        width: 100%;
    }

    .cb-modal-lista {
        inset: 10px !important;
        border-radius: 16px;
        padding: 14px 10px 12px;
        overflow: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
    }

    .cb-modal-close {
        top: 8px;
        right: 8px;
        width: 40px;
        height: 40px;
        font-size: 22px;
        border-radius: 12px;
        background: rgba(255,255,255,.88);
    }

    .cb-modal-topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px;
        border-radius: 16px;
    }

    .cb-modal-top-left {
        gap: 6px;
    }

    .cb-modal-top-title {
        font-size: 1.02rem;
        line-height: 1.25;
        word-break: break-word;
    }

    .cb-modal-top-total {
        font-size: 0.92rem;
        line-height: 1.35;
    }

    .cb-modal-top-chips {
        justify-content: stretch;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

        .cb-modal-top-chips .chip {
            min-width: 0;
            width: 100%;
            padding: 10px;
            border-radius: 14px;
            box-sizing: border-box;
        }

            .cb-modal-top-chips .chip .k {
                font-size: 0.76rem;
            }

            .cb-modal-top-chips .chip .v {
                font-size: 1rem;
                line-height: 1.2;
                word-break: break-word;
            }

    .cb-fila-totales-normal {
        margin-top: 10px;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 8px;
    }

    .cb-win-pill.cb-win-soft-red {
        font-size: 1rem;
        line-height: 1.2;
        padding: 8px 12px;
    }

    /* ===== Lista Tiempos / Reventado / Parley dentro del modal ===== */
    .cb-modal-grid-zoom,
    .cb-lista-parley {
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    .cb-fila-cabecera,
    .cb-fila-numeros,
    .cb-fila-totales-f {
        width: max-content;
        margin-left: 0;
        margin-right: 0;
    }

    .cb-fila-cabecera,
    .cb-fila-numeros {
        grid-template-columns: repeat(5, 72px 84px);
        column-gap: 4px;
    }

        .cb-fila-cabecera.cb-cabecera-reventado,
        .cb-fila-numeros.cb-fila-reventado,
        .cb-fila-totales-f.cb-totales-reventado {
            grid-template-columns: repeat(5, 72px 84px 84px) !important;
        }

    .cb-fila-totales-f {
        grid-template-columns: repeat(5, 72px 84px);
        column-gap: 4px;
    }

    .cb-fila-cabecera .h-num,
    .cb-fila-cabecera .h-monto,
    .cb-cabecera-reventado .h-r {
        font-size: 12px;
        height: 24px;
    }

    .cb-celda-num,
    .cb-celda-monto,
    .cb-celda-monto-r {
        font-size: 12px !important;
        min-height: 28px;
        padding: 6px 4px;
    }

    .cb-fila-totales-f .box {
        padding: 8px 6px;
        border-radius: 10px;
    }

    .cb-fila-totales-f .label {
        font-size: 11px;
    }

    .cb-fila-totales-f .valor {
        font-size: 13px;
    }

    .cb-lista-parley .cb-fila-cabecera.parley,
    .cb-lista-parley .cb-fila-numeros.parley {
        grid-template-columns: repeat(5, 72px 84px);
    }

    /* ===== Modal históricos ===== */
    .cb-modal-overlay-hist {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.52);
        z-index: 10100 !important;
        overflow: hidden;
        overscroll-behavior: contain;
        touch-action: none;
    }

    .cb-modal-hist {
        width: calc(100vw - 20px);
        max-width: calc(100vw - 20px);
        max-height: 88svh;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        border-radius: 16px;
        padding: 16px 12px 14px;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
    }

    .cb-modal-hist-wide,
    .cb-modal-resumen-hist {
        width: calc(100vw - 20px);
        max-width: calc(100vw - 20px);
    }

    .cb-hist-title .t1 {
        font-size: 1.05rem;
        line-height: 1.2;
    }

    .cb-hist-title .t2 {
        font-size: 0.9rem;
        line-height: 1.3;
    }

    .cb-hist-grid {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 12px;
    }

    .cb-hist-field {
        width: 100%;
        min-width: 0;
    }

        .cb-hist-field label {
            display: block;
            margin-bottom: 6px;
            font-size: 0.92rem;
            font-weight: 900;
        }

        .cb-hist-field input {
            width: 100%;
            min-height: 46px;
            font-size: 16px;
            box-sizing: border-box;
        }

    .cb-hist-actions {
        width: 100%;
    }

    .cb-hist-btn {
        width: 100%;
        min-height: 46px;
    }

    .cb-error {
        margin-top: 12px;
        padding: 12px;
        border-radius: 12px;
        font-size: 0.94rem;
        line-height: 1.35;
    }

    .cb-fecha-modal {
        left: 10px;
        right: 10px;
        bottom: 10px;
        width: auto;
        max-width: none;
        text-align: center;
        font-size: 0.9rem;
        line-height: 1.25;
        border-radius: 14px;
    }

    /* ===== Resumen histórico ===== */
    .cb-modal-resumen-hist .cb-table-wrap {
        margin-top: 12px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .cb-modal-resumen-hist .cb-table {
        min-width: 760px;
        width: max-content;
    }

    /* ===== Blindaje general ===== */
    html,
    body {
        overflow-x: hidden;
    }

    .cb-shell *,
    .cb-modal-lista *,
    .cb-modal-hist * {
        box-sizing: border-box;
        min-width: 0;
        max-width: 100%;
    }
}


/* =========================================================
   HISTÓRICO PRO: HEADER + TOTALES
========================================================= */
.cb-hist-top {
    margin-bottom: 12px;
    padding-right: 44px; /* espacio para la X */
}

.cb-hist-totals {
    justify-content: flex-end;
}

.cb-modal-resumen-hist .cb-total-chip {
    min-width: 170px;
}

    .cb-modal-resumen-hist .cb-total-chip .v {
        font-size: 1.22rem;
    }

@media (max-width: 900px) {
    .cb-hist-top {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding-right: 0;
    }

    .cb-hist-totals {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        justify-content: stretch;
    }

    .cb-modal-resumen-hist .cb-total-chip {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 560px) {
    .cb-hist-totals {
        grid-template-columns: 1fr;
    }
}

/* ===== Listeros en la misma fila ===== */
.cb-filters {
    grid-template-columns: 160px 160px 220px 260px 320px auto;
}

.cb-field-modo {
    max-width: 160px;
}

.cb-field-juego {
    max-width: 160px;
}

.cb-field-fecha {
    min-width: 220px;
    max-width: 220px;
}

.cb-field-vend {
    min-width: 0;
}

@media (max-width: 1400px) {
    .cb-filters {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .cb-filters {
        grid-template-columns: 1fr;
    }
}

/* ===== Modal lista más grande visualmente ===== */
.cb-modal-lista {
    inset: 6px !important;
    padding: 22px 18px 18px !important;
}

.cb-modal-wrap {
    zoom: 1.15;
    transform-origin: top center;
}

.cb-modal-top-title {
    font-size: 28px !important;
}

.cb-modal-top-total {
    font-size: 16px !important;
}

.cb-modal-top-chips .chip .v {
    font-size: 20px !important;
}


.cb-celda-num,
.cb-celda-monto,
.cb-celda-monto-r {
    height: 32px !important;
    font-size: 15px !important;
}

.cb-fila-cabecera .h-num,
.cb-fila-cabecera .h-monto,
.cb-cabecera-reventado .h-r {
    height: 30px !important;
    font-size: 14px !important;
}

@media (max-width: 1200px) {
    .cb-modal-wrap {
        zoom: 1.05;
    }
}

@media (max-width: 900px) {
    .cb-modal-wrap {
        zoom: 1;
    }
}

/* =========================
   CALENDARIO EN FECHAS
   ========================= */
.cb-date-wrap {
    position: relative;
    width: 100%;
}

    .cb-date-wrap .cb-date {
        width: 100%;
        padding-right: 56px;
        box-sizing: border-box;
    }

/* la franja derecha completa del input */
.cb-date-icon-box {
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
}

/* solo visual */
.cb-date-icon {
    font-size: 18px;
    line-height: 1;
    pointer-events: none;
    opacity: 0.95;
}

/* input invisible que ocupa toda la franja derecha */
.cb-date-native {
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 100%;
    opacity: 0.01;
    cursor: pointer;
    border: none;
    background: transparent;
    z-index: 31;
}

/* histórico */
.cb-hist-field .cb-date-wrap {
    position: relative;
    width: 100%;
}

    .cb-hist-field .cb-date-wrap .cb-date {
        width: 100%;
        padding-right: 56px;
        box-sizing: border-box;
    }

/* =========================
   AJUSTE SOLO FECHA PRINCIPAL
   ========================= */
.cb-field-fecha .cb-date-wrap {
    position: relative;
    width: 100%;
}

    .cb-field-fecha .cb-date-wrap .cb-date {
        width: 100%;
        min-width: 0;
        padding-right: 56px;
        box-sizing: border-box;
    }

.cb-field-fecha .cb-date-icon-box {
    top: 0;
    right: 0;
    width: 48px;
    height: 100%;
    z-index: 40;
}

.cb-field-fecha .cb-date-native {
    top: 0;
    right: 0;
    width: 48px;
    height: 100%;
    z-index: 41;
}


.cb-sub {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 900;
    color: #64748b;
    white-space: nowrap;
}


.cb-celda-num.ganador {
    background: linear-gradient(180deg, #fff0f0, #ffdede);
    border: 1px solid rgba(183,28,28,.35);
    color: #8b1b1b;
    font-weight: 950;
    font-size: 15px;
    box-shadow: 0 10px 22px rgba(183, 28, 28, 0.12);
    animation: cbCellPulse 1.1s ease-in-out infinite alternate;
}

.cb-celda-monto.ganador-monto {
    background: linear-gradient(180deg, #fff7e7, #ffe0a8);
    border: 1px solid rgba(198, 130, 0, 0.35);
    color: #7a3c00;
    font-weight: 950;
    font-size: 14px;
    box-shadow: 0 10px 22px rgba(198, 130, 0, 0.12);
    animation: cbCellPulse 1.1s ease-in-out infinite alternate;
}

.cb-celda-monto-r.ganador-monto-r {
    background: #ffd0d0;
    border-color: #e35d5b;
    color: #7a0000;
    font-weight: 950;
    font-size: 14px;
    box-shadow: 0 10px 22px rgba(220, 38, 38, 0.12);
    animation: cbCellPulse 1.1s ease-in-out infinite alternate;
}

@keyframes cbCellPulse {
    from {
        transform: scale(1);
        filter: brightness(1);
    }

    to {
        transform: scale(1.05);
        filter: brightness(1.05);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cb-celda-num.ganador,
    .cb-celda-monto.ganador-monto,
    .cb-celda-monto-r.ganador-monto-r {
        animation: none !important;
    }
}
