/* Estilos de los módulos: tickets, sorteos, landing pública */
a.btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px
}

.nb {
    position: relative
}

.bdg {
    position: absolute;
    top: 0;
    right: -2px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 99px;
    background: #ee4d5f;
    color: #fff;
    font: 700 11px/19px var(--font);
    text-align: center;
    box-shadow: 0 3px 10px rgba(238, 77, 95, .5);
    animation: pp 2s infinite
}

.bdg[hidden] {
    display: none
}

@keyframes pp {
    50% {
        transform: scale(1.15)
    }
}

.live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: #1fb67a;
    background: color-mix(in srgb, #1fb67a 14%, white);
    padding: 3px 10px;
    border-radius: 99px;
    margin-left: 8px;
    vertical-align: middle
}

.live i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #1fb67a;
    animation: pp 1.4s infinite
}

.seg {
    display: inline-flex;
    padding: 4px;
    border-radius: calc(var(--r) * .6);
    background: rgba(255, 255, 255, .6)
}

.seg button {
    border: 0;
    background: none;
    padding: 8px 14px;
    border-radius: calc(var(--r) * .45);
    font: 600 13px var(--font);
    color: var(--mu);
    cursor: pointer
}

.seg button.on {
    background: #fff;
    color: var(--a);
    box-shadow: 0 3px 10px rgba(60, 50, 120, .15)
}

.btn.sm {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: calc(var(--r) * .5);
    box-shadow: none
}

.btn.danger {
    color: #c43a4a
}

tr.nw td {
    animation: nwf 2.4s ease
}

@keyframes nwf {
    from {
        background: color-mix(in srgb, var(--a) 22%, transparent)
    }
}

.modal.wide {
    width: min(780px, 100%)
}

.dh {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px
}

.dcols {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 18px;
    margin: 10px 0 6px
}

.dg {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.dr {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 13.5px
}

.dr small {
    display: block;
    color: var(--mu);
    font-size: 11.5px
}

.dr a {
    color: var(--a);
    font-weight: 600;
    text-decoration: none
}

.di {
    width: 32px;
    height: 32px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    flex: none;
    font-size: 13px;
    color: var(--a);
    background: color-mix(in srgb, var(--a) 12%, white)
}

.vp {
    position: relative;
    display: block;
    border-radius: calc(var(--r) * .7);
    overflow: hidden;
    background: rgba(255, 255, 255, .6);
    min-height: 200px;
    max-height: 340px
}

.vp img {
    width: 100%;
    height: 100%;
    max-height: 340px;
    object-fit: contain;
    display: block
}

.vp span {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(255, 255, 255, .88);
    padding: 5px 10px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
    color: var(--tx)
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px
}

.chips b {
    padding: 4px 11px;
    border-radius: 99px;
    background: linear-gradient(135deg, var(--a), var(--b));
    color: #fff;
    font-size: 12.5px
}

textarea {
    resize: vertical;
    min-height: 70px
}

@media(max-width:640px) {
    .dcols {
        grid-template-columns: 1fr
    }
}

/* ---- Landing pública ---- */
.lp {
    position: relative;
    z-index: 1;
    max-width: 980px;
    margin: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 18px
}

.lp-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    flex-wrap: wrap
}

.lp-top .logo {
    width: 40px;
    height: 40px;
    margin: 0;
    font-size: 18px;
    border-radius: 14px
}

.hero {
    padding: 34px 30px
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: #1fb67a;
    background: color-mix(in srgb, #1fb67a 14%, white);
    padding: 5px 12px;
    border-radius: 99px
}

.chip i {
    font-size: 8px
}

.hero h1 {
    font-size: clamp(28px, 5vw, 46px);
    letter-spacing: -.03em;
    margin: 14px 0 20px;
    line-height: 1.1
}

.hm3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px
}

.hm3>div {
    padding: 14px 16px;
    border-radius: calc(var(--r) * .7);
    background: rgba(255, 255, 255, .55);
    box-shadow: inset 0 1px 0 #fff
}

.hm3 small {
    display: block;
    color: var(--mu);
    font-size: 12px;
    margin-bottom: 2px
}

.hm3 b {
    font-size: 22px;
    font-variant-numeric: tabular-nums
}

.cta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px
}

.pay {
    padding: 22px 26px
}

.pay h3 {
    margin: 0 0 8px;
    font-size: 16px
}

.pay p {
    margin: 0;
    color: var(--mu);
    font-size: 14.5px;
    line-height: 1.6
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px
}

.steps .glass {
    padding: 18px 20px;
    font-size: 13.5px;
    color: var(--mu)
}

.steps b {
    display: block;
    color: var(--tx);
    font-size: 15px;
    margin: 8px 0 2px
}

.steps .n {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--a), var(--b))
}

.reg {
    padding: 30px
}

.reg h2 {
    margin: 0 0 4px;
    font-size: 24px
}

.reg>p {
    margin: 0 0 14px;
    color: var(--mu);
    font-size: 14px
}

.fg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px
}

.fg .full {
    grid-column: 1/-1
}

.hp {
    position: absolute;
    left: -9999px;
    opacity: 0
}

.drop {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 2px dashed color-mix(in srgb, var(--a) 40%, transparent);
    border-radius: calc(var(--r) * .6);
    cursor: pointer;
    background: rgba(255, 255, 255, .4);
    transition: .2s
}

.drop:hover {
    background: rgba(255, 255, 255, .7)
}

.drop input {
    display: none
}

.drop .ic {
    font-size: 26px;
    color: var(--a)
}

.drop small {
    display: block;
    color: var(--mu)
}

#pv {
    max-width: 100%;
    max-height: 220px;
    border-radius: 14px;
    margin-top: 10px;
    display: block
}

.tot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: calc(var(--r) * .6);
    background: rgba(255, 255, 255, .55);
    font-size: 15px
}

.tot b {
    font-size: 22px
}

.okc {
    text-align: center;
    padding: 10px 0
}

.okc .big {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    font-size: 30px;
    color: #fff;
    background: linear-gradient(135deg, #1fb67a, var(--c))
}

.lp-foot {
    text-align: center;
    color: var(--mu);
    font-size: 12.5px;
    padding: 6px 0 20px
}

.lp-foot a {
    color: var(--mu)
}

@media(max-width:700px) {

    .hm3,
    .steps,
    .fg {
        grid-template-columns: 1fr
    }

    .hero {
        padding: 26px 20px
    }

    .reg {
        padding: 22px 18px
    }
}

/* ---- Premios / ganadores (admin) ---- */
.pgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 6px
}

.pc {
    overflow: hidden;
    padding: 0
}

.pc img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block
}

.pc .b {
    padding: 14px 16px
}

.pc .ia form {
    display: inline
}

/* ---- Landing: navegación, carrusel, ganadores, consulta ---- */
.lp-nav {
    display: flex;
    gap: 4px;
    margin-left: 10px
}

.lp-nav a {
    padding: 8px 12px;
    border-radius: 12px;
    color: var(--mu);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    transition: .2s
}

.lp-nav a:hover {
    background: rgba(255, 255, 255, .7);
    color: var(--a)
}

.sec-t {
    margin: 0 0 4px;
    font-size: 22px
}

.sec-s {
    margin: 0 0 16px;
    color: var(--mu);
    font-size: 14px
}

.car {
    position: relative;
    overflow: hidden;
    padding: 0
}

.ctrack {
    display: flex;
    transition: transform .7s cubic-bezier(.2, .8, .2, 1)
}

.cs {
    min-width: 100%;
    position: relative;
    aspect-ratio: 16/8;
    max-height: 480px;
    background: rgba(255, 255, 255, .5)
}

.cs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 70px 28px 34px;
    background: linear-gradient(transparent, rgba(20, 15, 50, .72));
    color: #fff
}

.cap b {
    font-size: clamp(18px, 3vw, 28px);
    display: block
}

.cap span {
    display: block;
    opacity: .92;
    font-size: 14px;
    margin-top: 4px
}

.cnav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(8px);
    cursor: pointer;
    font-size: 16px;
    color: var(--tx);
    z-index: 2;
    transition: .2s
}

.cnav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.08)
}

.cnav.l {
    left: 14px
}

.cnav.r {
    right: 14px
}

.cdots {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 7px;
    z-index: 2
}

.cdots i {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .6);
    cursor: pointer;
    transition: .3s
}

.cdots i.on {
    width: 26px;
    background: #fff
}

.wg {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px
}

.wc {
    overflow: hidden;
    padding: 0;
    transition: .3s
}

.wc:hover {
    transform: translateY(-4px)
}

.wc img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block
}

.wc .b {
    padding: 14px 16px
}

.wc .b b {
    display: block;
    font-size: 15px
}

.wc .pz {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    margin-top: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--a);
    background: color-mix(in srgb, var(--a) 12%, white);
    padding: 4px 10px;
    border-radius: 99px
}

.wc small {
    display: block;
    margin-top: 8px;
    color: var(--mu);
    font-size: 12px
}

.cq {
    display: flex;
    gap: 10px;
    flex-wrap: wrap
}

.cq input {
    flex: 1;
    min-width: 180px
}

.cq .btn {
    justify-content: center
}

.cr {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px
}

.ci {
    padding: 16px 18px;
    border-radius: calc(var(--r) * .7);
    background: rgba(255, 255, 255, .6);
    box-shadow: inset 0 1px 0 #fff
}

.ci .h {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap
}

.ci small {
    color: var(--mu)
}

@media(max-width:700px) {
    .lp-nav {
        display: none
    }

    .cs {
        aspect-ratio: 4/3
    }

    .cap {
        padding: 50px 18px 32px
    }
}

/* ---- Tooltip global ---- */
#tip {
    position: fixed;
    z-index: 90;
    pointer-events: none;
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 12.5px;
    line-height: 1.6;
    opacity: 0;
    transition: opacity .15s;
    left: 0;
    top: 0;
    white-space: nowrap
}

/* ---- Dashboard con datos reales ---- */
@keyframes gr {
    from {
        transform: scaleY(0)
    }
}

.fbar {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 22px
}

.fbar .fl label {
    margin: 0 0 5px
}

.fbar select {
    width: auto;
    min-width: 200px
}

.fbar .seg {
    display: inline-flex
}

.fbar .live {
    margin: 0 0 6px
}

.fbar .sub {
    margin: 0 0 8px !important
}

.fbar .btn {
    margin-bottom: 2px
}

.wh {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px
}

.legend .lg {
    cursor: pointer;
    user-select: none
}

.sbar {
    display: flex;
    height: 12px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .7);
    overflow: hidden;
    margin: 7px 0 4px;
    box-shadow: inset 0 1px 3px rgba(60, 50, 120, .12)
}

.sbar b {
    display: block;
    height: 100%;
    width: 0;
    transition: width 1.3s cubic-bezier(.2, .8, .2, 1)
}

.sbar.big {
    height: 26px;
    border-radius: 14px;
    margin: 6px 0 16px
}

.invg {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    text-align: center
}

.invg div {
    padding: 10px 4px;
    border-radius: calc(var(--r) * .5);
    background: rgba(255, 255, 255, .5)
}

.invg i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px
}

.invg b {
    display: block;
    font-size: 20px;
    margin: 2px 0
}

.invg span {
    font-size: 12px;
    color: var(--mu)
}

.avp {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
    flex: none
}

tr.clk {
    cursor: pointer
}

.mp {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
    gap: 5px;
    max-height: 400px;
    overflow: auto;
    padding: 4px
}

.mp.sm {
    grid-template-columns: repeat(auto-fill, minmax(20px, 1fr))
}

.tc {
    aspect-ratio: 1;
    border: 0;
    border-radius: 9px;
    font: 600 10.5px var(--font);
    cursor: pointer;
    background: rgba(255, 255, 255, .7);
    color: var(--mu);
    transition: transform .15s;
    padding: 0
}

.tc:hover {
    transform: scale(1.18)
}

.tc.s {
    background: linear-gradient(135deg, var(--a), var(--b));
    color: #fff
}

.tc.hit {
    outline: 3px solid var(--c);
    transform: scale(1.25);
    z-index: 2;
    position: relative
}

.rg2 {
    cursor: default
}

.kpi .d {
    cursor: help
}


/* ---- Tarjetas de Tickets ---- */
.kst{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-bottom:18px}
.kc{padding:18px 22px}
.kc small{display:block;color:var(--mu);font-size:13px;margin-bottom:4px}
.kc b{font-size:30px;font-weight:700;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
@media(max-width:640px){.kst{grid-template-columns:1fr}}


/* ---- Paginación ---- */
.pg{display:flex;justify-content:center;align-items:center;gap:14px;margin-top:16px;font-size:13px;color:var(--mu)}
.pg button:disabled{opacity:.4;cursor:default;transform:none}

[hidden]{display:none!important}
#pv{max-width:100%;max-height:220px;border-radius:14px;margin-top:10px;display:block}
#pv[hidden]{display:none!important}


/* Celular y WhatsApp en negrita */
.modal .dr a,
.modal .dr a[href^="tel"],
.modal .dr a[href*="wa.me"] {
    font-weight: 800 !important;
    color: var(--tx) !important;
}