@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700&display=swap');

/* ==========================
   ESTILOS GENERALES
========================== */
body{
    margin:0;
    min-height:100vh;
    font-family:Arial, sans-serif;
    background:linear-gradient(180deg,#0a0f14,#000);
    color:white;
    text-align:center;
}

/* ==========================
   MENÚ LATERAL
========================== */
.menu-btn {
    position: fixed;
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
}

.menu-btn i {
    color: #00ff88;
    font-size: 18px;
    transition: all 0.3s ease;
}

.menu-btn:hover {
    background: #00ff88;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0,255,136,0.5);
}

.menu-btn:hover i {
    color: black;
}

.menu {
    position: fixed;
    top: 0;
    left: -260px;
    width: 260px;
    height: 100%;
    background: #0a0f14;
    transition: 0.3s;
    padding: 20px;
    z-index: 1002;
}

.menu.activo {
    left: 0;
}

#overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    z-index: 1000;
}

#overlay.activo {
    display: block;
}

.titulo{
    color:#00ffa6;
}

.item{
    padding:15px;
    border-bottom:1px solid #222;
    cursor:pointer;
}

.item:hover{
    background:#111;
}

/* ==========================
   CARDS
========================== */
.card{
    background:#111;
    margin:80px 20px;
    padding:20px;
    border-radius:15px;
    box-shadow:0 0 20px rgba(0,255,150,0.2);
}

img{
    width:100%;
    border-radius:10px;
}

/* ==========================
   BARRA DE PROGRESO
========================== */
.barra{
    width:100%;
    height:10px;
    background:#222;
    border-radius:10px;
    margin:10px 0;
}

.barra-interna{
    height:100%;
    width:0%;
    background:#00ffa6;
    border-radius:10px;
}

/* ==========================
   BOTONES
========================== */
button{
    padding:12px 20px;
    border:none;
    border-radius:10px;
    margin:5px;
    cursor:pointer;
}

#btnJugar{
    background:#00ffa6;
    color:black;
}

#btnBuscar{
    background:#222;
    color:white;
}

/* ==========================
   MODALES
========================== */
#modal, #modalBuscar, #modalVerificar{
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.8);
    justify-content:center;
    align-items:center;
    z-index:9999;
}

.box{
    background:#1a1a2e;
    padding:20px;
    border-radius:10px;
    width:300px;
}

/* SELECTOR DE CANTIDAD */
.selector{
    display:flex;
    justify-content:center;
    gap:10px;
    margin:10px 0;
}

/* ==========================
   WHATSAPP FLOTANTE
========================== */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
    text-decoration: none;
}

.wa-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: 0 0 15px rgba(37,211,102,0.6);
    position: relative;
    z-index: 2;
    transition: 0.3s;
}

.wa-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(37,211,102,1);
}

.wa-glow {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(37,211,102,0.3);
    animation: pulse 2s infinite;
    top: 0;
    left: 0;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.6; }
    70% { transform: scale(1.6); opacity: 0; }
    100% { opacity: 0; }
}

.wa-particle {
    position: absolute;
    bottom: 10px;
    left: 50%;
    width: 6px;
    height: 6px;
    background: #25D366;
    border-radius: 50%;
    opacity: 0.8;
    animation: rise 3s infinite;
}

@keyframes rise {
    0% { transform: translateX(0) translateY(0) scale(1); opacity: 1; }
    100% { transform: translateX(var(--drift)) translateY(-60px) scale(0.3); opacity: 0; }
}

.wa-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: black;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 12px;
    opacity: 0;
    white-space: nowrap;
    transition: 0.3s;
}

.whatsapp-float:hover .wa-tooltip {
    opacity: 1;
}

/* ==========================
   ICONOS FLOTANTES DE FONDO
========================== */
.bg-icons-container {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.bg-icon {
    position: absolute;
    font-size: 35px;
    color: #00ff88;
    opacity: 0.07;
    animation: floatIcon linear infinite;
    filter: drop-shadow(0 0 6px rgba(0,255,136,0.5));
}

@keyframes floatIcon {
    0% { transform: translateY(110vh) rotate(0deg) scale(0.8); opacity: 0; }
    10% { opacity: 0.12; }
    50% { transform: translateY(50vh) rotate(180deg) scale(1.1); }
    100% { transform: translateY(-10vh) rotate(360deg) scale(0.9); opacity: 0; }
}
.submenu {
    display: none;
    margin-top: 10px;
    padding-left: 10px;
}

.submenu-toggle:hover {
    background: #111;
}

.submenu-toggle.active .submenu {
    display: block;
}

.submenu input, .submenu select, .submenu button {
    width: 90%;
    margin: 5px 0;
    padding: 8px;
    border-radius: 5px;
    border: none;
}

.submenu button {
    background: #00ffa6;
    color: black;
    cursor: pointer;
}
/* MODAL VERIFICAR BOLÉTO */
.modal-verificar {
    display: none;
    position: fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-verificar .box {
    background:#1a1a2e;
    padding:20px;
    border-radius:10px;
    width: 300px;
}

.modal-verificar input, .modal-verificar select, .modal-verificar button {
    width: 90%;
    margin: 5px 0;
    padding: 8px;
    border-radius: 5px;
    border: none;
}

.modal-verificar button {
    background: #00ffa6;
    color: black;
    cursor: pointer;
}
/* BANNER SUPERIOR */
.banner-suerte {
    width: 100%;
    padding: 20px 0;
    background: linear-gradient(90deg, #0a0f14, #111);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

/* ICONOS AL PRINCIPIO Y FINAL */
.banner-suerte i {
    color: #00ff88;
    font-size: 2.5rem;
}

/* LETRAS GRANDES Y ESTILO FUTURISTA */
.letra {
    font-family: 'Orbitron', sans-serif; /* misma fuente futurista de la página */
    font-size: 3rem;
    color: #00ffa6; /* color de la suerte */
    display: inline-block;
    animation: latigo 10s infinite ease-in-out;
}

/* ANIMACIÓN LÁTIGO */
@keyframes latigo {
    0%, 100% { transform: translateY(0); }
    10% { transform: translateY(-20px); }
    20% { transform: translateY(0); }
    30% { transform: translateY(20px); }
    40% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
    60% { transform: translateY(0); }
    70% { transform: translateY(15px); }
    80% { transform: translateY(0); }
    90% { transform: translateY(-10px); }
}

/* RETRASO PARA EFECTO ONDA */
.letra:nth-child(2) { animation-delay: 0s; }
.letra:nth-child(3) { animation-delay: 0.1s; }
.letra:nth-child(4) { animation-delay: 0.2s; }
.letra:nth-child(5) { animation-delay: 0.3s; }
.letra:nth-child(6) { animation-delay: 0.4s; }
.letra:nth-child(7) { animation-delay: 0.5s; }
.letra:nth-child(8) { animation-delay: 0.6s; }
.letra:nth-child(9) { animation-delay: 0.7s; }
.letra:nth-child(10) { animation-delay: 0.8s; }
.letra:nth-child(11) { animation-delay: 0.9s; }
.letra:nth-child(12) { animation-delay: 1s; }
.letra:nth-child(13) { animation-delay: 1.1s; }
.letra:nth-child(14) { animation-delay: 1.2s; }
.letra:nth-child(15) { animation-delay: 1.3s; }
.letra:nth-child(16) { animation-delay: 1.4s; }
/* PANEL DE ADMINISTRADOR */
.admin-menu {
    position: fixed;
    top:0;
    left:0;
    width: 220px;
    height: 100%;
    background: #0a0f14;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admin-menu .titulo {
    color: #00ffa6;
    margin-bottom: 20px;
}

.admin-menu .item {
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
}

.admin-menu .item:hover {
    background: #111;
}

.admin-contenido {
    margin-left: 240px;
    padding: 20px;
    color: white;
    font-family: Arial, sans-serif;
}

.admin-contenido h1 {
    color: #00ffa6;
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.admin-box {
    background: #111;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0,255,150,0.2);
}

.admin-box table {
    width: 100%;
    border-collapse: collapse;
}

.admin-box th, .admin-box td {
    padding: 10px;
    border: 1px solid #222;
    text-align: left;
}

.admin-box th {
    background: #222;
}

.admin-box button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: #00ffa6;
    color: black;
    cursor: pointer;
}
/* ADMINISTRADOR COMPLETO */

.cerrar-sesion {
    margin-top: auto;
    color: #ff5555;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cerrar-sesion:hover {
    background: #222;
}

/* CARDS DE ADMIN */
.card-admin {
    background:#111;
    margin:20px 0;
    padding:20px;
    border-radius:15px;
    box-shadow:0 0 20px rgba(0,255,150,0.2);
}

.card-admin img {
    width: 100%;
    border-radius:10px;
    margin-bottom:10px;
}

.card-admin button {
    margin-right:10px;
    padding:8px 12px;
    border:none;
    border-radius:8px;
    background:#00ffa6;
    color:black;
    cursor:pointer;
}

/* BARRA DE PROGRESO */
.card-admin .barra {
    width:100%;
    height:10px;
    background:#222;
    border-radius:10px;
    margin:5px 0;
}

.card-admin .barra-interna {
    height:100%;
    background:#00ffa6;
    border-radius:10px;
}

/* FORMULARIO CREAR RIFA */
.admin-box input, .admin-box file {
    display:block;
    width:90%;
    margin:5px 0;
    padding:8px;
    border-radius:5px;
    border:none;
}

.admin-box button {
    background:#00ffa6;
    color:black;
    cursor:pointer;
    border-radius:8px;
    padding:10px 15px;
    margin-top:5px;
}

/* TABLA DE BOLETOS */
.admin-box table {
    width:100%;
    border-collapse: collapse;
    margin-top:10px;
}

.admin-box th, .admin-box td {
    padding:10px;
    border:1px solid #222;
    text-align:left;
}

.admin-box th {
    background:#222;
}
/* LOGIN VISUAL */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(180deg,#0a0f14,#000);
}

.login-box {
    background:#111;
    padding:30px;
    border-radius:15px;
    text-align:center;
    box-shadow:0 0 20px rgba(0,255,150,0.2);
}

.login-box input {
    display:block;
    width:80%;
    margin:10px auto;
    padding:10px;
    border-radius:8px;
    border:none;
}

.login-box button {
    margin-top:10px;
    padding:10px 20px;
    border:none;
    border-radius:8px;
    background:#00ffa6;
    color:black;
    cursor:pointer;
}
/* ESTADOS DE BOLETO */
td {
    color:white;
}

td:nth-child(5) {
    font-weight:bold;
    color:#ffcc00; /* amarillo para pendiente */
}
/* ESTILOS PARA ESTADÍSTICAS */
.estadisticas-cards {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.estad-card {
    background: #111;
    padding: 20px;
    border-radius: 15px;
    flex: 1;
    min-width: 250px;
    box-shadow: 0 0 20px rgba(0,255,150,0.2);
    color: white;
}

.estad-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #00ffa6;
}

.numero-promedio {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin-top: 20px;
    color: #00ffa6;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.auth-page,
.admin-page {
    position: relative;
    overflow-x: hidden;
}

.auth-banner {
    position: relative;
    z-index: 1;
}

.login-container,
.admin-shell {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 104px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px 48px;
    box-sizing: border-box;
}

.login-box,
.admin-box-wide {
    width: min(100%, 430px);
    background: rgba(17, 17, 17, 0.92);
    border: 1px solid rgba(0, 255, 166, 0.2);
    box-shadow: 0 0 25px rgba(0,255,150,0.18);
    backdrop-filter: blur(10px);
}

.admin-box-wide {
    width: min(100%, 920px);
    text-align: left;
}

.auth-kicker {
    margin: 0 0 10px;
    color: #00ffa6;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.18rem;
}

.login-box h1,
.admin-header h1 {
    margin: 0 0 10px;
    font-family: 'Orbitron', sans-serif;
    color: #00ffa6;
}

.auth-subtitle {
    margin: 0 0 20px;
    color: rgba(255,255,255,0.78);
    line-height: 1.5;
}

.login-box input {
    width: calc(100% - 24px);
    background: #0b1117;
    border: 1px solid rgba(0,255,166,0.18);
    color: white;
    box-sizing: border-box;
}

.login-box input:focus {
    outline: none;
    border-color: #00ffa6;
    box-shadow: 0 0 0 3px rgba(0,255,166,0.12);
}

.login-box button:disabled {
    opacity: 0.7;
    cursor: wait;
}

.secondary-link-button {
    display: block;
    margin-top: 10px;
    padding: 10px 20px;
    border-radius: 8px;
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.15);
    text-decoration: none;
    transition: 0.3s ease;
}

.secondary-link-button:hover {
    background: rgba(255,255,255,0.07);
}

.auth-message {
    min-height: 24px;
    margin: 14px 0 0;
    font-size: 0.95rem;
}

.auth-message-error {
    color: #ff7b7b;
}

.auth-message-success {
    color: #00ffa6;
}

.auth-message-info {
    color: #8bd9ff;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.logout-button {
    background: #ff5555;
    color: white;
}

.logout-button:hover {
    background: #ff6d6d;
}

@media (max-width: 768px) {
    .banner-suerte {
        gap: 8px;
        padding: 16px 8px;
    }

    .banner-suerte i {
        font-size: 1.5rem;
    }

    .letra {
        font-size: 1.8rem;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .login-box,
    .admin-box-wide {
        padding: 24px 18px;
    }
}

.public-page,
.admin-page {
    position: relative;
    overflow-x: hidden;
}

.public-hero,
.public-main {
    position: relative;
    z-index: 1;
}

.public-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto 0;
    padding: 28px;
    border-radius: 28px;
    border: 1px solid rgba(0, 255, 166, 0.14);
    background:
        radial-gradient(circle at top left, rgba(0, 255, 166, 0.12), transparent 35%),
        rgba(7, 10, 18, 0.92);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-sizing: border-box;
    text-align: left;
}

.public-title {
    margin: 0 0 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 5vw, 3.7rem);
    color: #f5fffd;
}

.public-copy {
    margin: 0;
    max-width: 720px;
    color: rgba(255,255,255,0.72);
    line-height: 1.6;
}

.public-hero-actions,
.admin-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.hero-secondary-button,
.raffle-action-button,
.admin-form-card button,
#enviarBtn {
    background: linear-gradient(135deg, #00ffa6, #10d7ff);
    color: #041117;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.05rem;
    box-shadow: 0 0 22px rgba(0, 255, 166, 0.18);
}

.hero-secondary-button {
    border: 1px solid rgba(0, 255, 166, 0.3);
}

.public-main {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 70px;
}

.site-footer {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 90px;
    padding: 26px 8px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
    text-align: left;
}

.site-footer-copy {
    margin: 0;
    color: rgba(255,255,255,0.42);
    font-size: 0.92rem;
}

.site-footer-links {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-link-button {
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.58);
    padding: 0;
    margin: 0;
    font-size: 0.92rem;
    cursor: pointer;
}

.footer-link-button:hover {
    color: #86ffca;
}

.rifas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
    gap: 24px;
    justify-content: center;
}

.raffle-card,
.empty-state-card,
.admin-form-card,
.admin-preview-card {
    border-radius: 28px;
    border: 1px solid rgba(0, 255, 166, 0.12);
    background:
        linear-gradient(180deg, rgba(12, 17, 28, 0.98), rgba(8, 10, 18, 0.98)),
        #0b1117;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.raffle-card,
.empty-state-card {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.raffle-image-wrap {
    position: relative;
    aspect-ratio: 1 / 0.8;
    overflow: hidden;
}

.raffle-image-wrap img,
.admin-raffle-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.raffle-tag {
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(16, 215, 255, 0.92);
    color: #041117;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.raffle-card-soldout .raffle-image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 10, 16, 0.14), rgba(6, 10, 16, 0.72));
}

.soldout-stamp {
    position: absolute;
    inset: 18% 8% auto;
    transform: rotate(-10deg);
    padding: 18px 12px;
    border: 10px solid rgba(190, 43, 43, 0.52);
    color: rgba(210, 55, 55, 0.85);
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.4rem, 6vw, 4.4rem);
    text-align: center;
    z-index: 2;
}

.soldout-copy {
    position: absolute;
    bottom: 22px;
    left: 22px;
    right: 22px;
    z-index: 2;
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255,255,255,0.88);
}

.raffle-card-body {
    padding: 24px;
    text-align: left;
}

.raffle-card-body h2 {
    margin: 0 0 10px;
    font-family: 'Orbitron', sans-serif;
    color: #f5fffd;
    font-size: 1.6rem;
}

.raffle-description,
.raffle-date {
    color: rgba(255,255,255,0.72);
    line-height: 1.6;
}

.raffle-date-muted {
    text-transform: uppercase;
    letter-spacing: 0.04rem;
}

.raffle-date-highlight {
    color: #2cf773;
    font-weight: 700;
}

.raffle-progress-label {
    margin: 18px 0 10px;
    color: #00ffa6;
    font-family: 'Orbitron', sans-serif;
}

.raffle-progress {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(23, 34, 49, 0.92);
    overflow: hidden;
}

.raffle-progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #00ffa6, #10d7ff);
}

.countdown-box {
    margin-top: 18px;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 14px 12px;
    border-radius: 22px;
    border: 1px solid rgba(188, 164, 22, 0.4);
    background: linear-gradient(180deg, rgba(56, 48, 12, 0.5), rgba(14, 16, 18, 0.82));
    overflow: hidden;
}

.countdown-box p {
    margin: 0 0 10px;
    color: #d8bc1a;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 0.08rem;
    line-height: 1.3;
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    align-items: stretch;
}

.countdown-grid div {
    min-width: 0;
    padding: 10px 4px 8px;
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
    text-align: center;
}

.countdown-grid strong {
    display: block;
    font-size: clamp(1.55rem, 5vw, 2rem);
    font-family: 'Orbitron', sans-serif;
    color: #f1d218;
    text-shadow: 0 0 14px rgba(241, 210, 24, 0.35);
    line-height: 1;
    overflow-wrap: anywhere;
}

.countdown-grid span {
    display: block;
    margin-top: 6px;
    color: rgba(255,255,255,0.42);
    text-transform: uppercase;
    font-size: 0.66rem;
    letter-spacing: 0.12rem;
    white-space: nowrap;
}

.soldout-status {
    margin: 12px 0 0;
    text-align: right;
    color: #ff5f5f;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
}

.raffle-meta {
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.raffle-meta strong {
    display: block;
    font-size: 2rem;
    font-family: 'Orbitron', sans-serif;
    color: white;
}

.raffle-meta span {
    color: rgba(255,255,255,0.65);
    font-size: 0.95rem;
}

.raffle-action-button[disabled] {
    cursor: not-allowed;
    opacity: 0.45;
}

.raffle-action-button-disabled {
    background: rgba(112, 19, 19, 0.75);
    color: #ff8b8b;
    box-shadow: none;
}

.empty-state-card {
    padding: 40px 24px;
}

.empty-state-card.compact {
    padding: 22px 18px;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    gap: 24px;
    margin-top: 18px;
}

.admin-form-card,
.admin-preview-card {
    padding: 24px;
    text-align: left;
}

.admin-form-card h2,
.admin-preview-card h2 {
    margin-top: 0;
    font-family: 'Orbitron', sans-serif;
    color: #00ffa6;
}

.admin-form-card label {
    display: block;
    margin: 14px 0 8px;
    color: rgba(255,255,255,0.8);
}

.admin-form-card input,
.admin-form-card textarea,
.public-modal-box input,
.public-modal-box select,
.public-modal-box textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(0,255,166,0.16);
    background: rgba(20, 28, 42, 0.94);
    color: white;
    box-sizing: border-box;
}

.admin-form-card textarea {
    resize: vertical;
    min-height: 110px;
}

.admin-form-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.admin-section-copy {
    color: rgba(255,255,255,0.72);
    margin-top: -6px;
}

.admin-rifas-list {
    display: grid;
    gap: 16px;
}

.admin-rifas-group {
    display: grid;
    gap: 16px;
}

.admin-rifas-group-title {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: #9fffe0;
}

.admin-raffle-item {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 16px;
    align-items: stretch;
    border-radius: 22px;
    overflow: hidden;
    background: rgba(15, 22, 34, 0.94);
    border: 1px solid rgba(255,255,255,0.06);
}

.admin-raffle-item-archived {
    opacity: 0.82;
    border-color: rgba(255, 193, 7, 0.22);
}

.admin-raffle-item-hidden {
    opacity: 0.74;
    border-color: rgba(120, 180, 255, 0.2);
}

.admin-raffle-content {
    padding: 18px 18px 18px 0;
    text-align: left;
}

.admin-raffle-content h3 {
    margin: 0 0 8px;
    font-family: 'Orbitron', sans-serif;
}

.admin-raffle-content p {
    margin: 0 0 12px;
    color: rgba(255,255,255,0.68);
}

.admin-raffle-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-raffle-stats span {
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(0,255,166,0.08);
    color: #9fffe0;
    font-size: 0.9rem;
}

.status-chip-archived {
    background: rgba(255, 193, 7, 0.12) !important;
    color: #ffd970 !important;
}

.admin-raffle-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mini-danger-button {
    border-color: rgba(255, 87, 87, 0.45);
    color: #ff8a8a;
    background: rgba(100, 12, 24, 0.28);
}

.mini-danger-button:hover {
    border-color: rgba(255, 87, 87, 0.75);
    color: #ffd4d4;
    box-shadow: 0 0 18px rgba(255, 69, 69, 0.18);
}

.mini-archive-button {
    border-color: rgba(255, 193, 7, 0.4);
    color: #ffd970;
    background: rgba(111, 80, 8, 0.22);
}

.mini-archive-button:hover {
    border-color: rgba(255, 193, 7, 0.75);
    color: #fff2b2;
    box-shadow: 0 0 18px rgba(255, 193, 7, 0.16);
}

.mini-hide-button {
    border-color: rgba(120, 180, 255, 0.4);
    color: #b9d8ff;
    background: rgba(28, 55, 102, 0.24);
}

.mini-hide-button:hover {
    border-color: rgba(120, 180, 255, 0.7);
    color: #e0eeff;
    box-shadow: 0 0 18px rgba(120, 180, 255, 0.16);
}

.admin-inline-edit {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.mini-date-input {
    min-width: 180px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(20, 28, 42, 0.94);
    color: white;
}

.mini-toggle-button {
    background: rgba(255,255,255,0.06);
    color: white;
    border: 1px solid rgba(255,255,255,0.08);
}

.mini-toggle-button.is-on {
    background: rgba(0,255,166,0.12);
    color: #8effcf;
}

.modal-shell {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(2, 6, 12, 0.86);
    padding: 16px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
}

.public-modal-box {
    width: min(100%, 520px);
    border-radius: 26px;
    border: 1px solid rgba(0,255,166,0.14);
    background: rgba(9, 13, 22, 0.98);
    text-align: left;
    max-height: calc(100vh - 48px);
    overflow: auto;
}

.public-modal-box-wide {
    width: min(100%, 760px);
}

.modal-close-button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255,255,255,0.08);
    color: #f2f7ff;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
}

.proof-viewer-box {
    width: min(100%, 860px);
    display: grid;
    gap: 16px;
}

.proof-viewer-header {
    gap: 18px;
    align-items: flex-start;
}

.proof-viewer-content {
    min-height: 360px;
    max-height: min(68vh, 720px);
    overflow: auto;
    display: grid;
    place-items: center;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(4, 8, 16, 0.72);
}

.proof-viewer-content img,
.proof-viewer-content iframe {
    width: 100%;
    height: 100%;
    min-height: 360px;
    border: 0;
    border-radius: 18px;
}

.proof-viewer-content img {
    height: auto;
    max-height: 68vh;
    object-fit: contain;
}

.proof-viewer-loading,
.proof-viewer-fallback {
    padding: 28px;
    color: rgba(255,255,255,0.72);
    text-align: center;
}

.proof-viewer-fallback.is-error {
    color: #ff8f9a;
}

.proof-viewer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.modal-subtitle {
    margin: 6px 0 0;
    color: rgba(255,255,255,0.64);
}

.purchase-panel {
    display: grid;
    gap: 12px;
}

.purchase-quantity-box {
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(28, 36, 52, 0.96);
    border: 1px solid rgba(255,255,255,0.06);
}

.purchase-section-title {
    margin: 0 0 14px;
    font-family: 'Orbitron', sans-serif;
    color: #f3fffb;
    font-size: 1.05rem;
}

.purchase-info-box {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(44, 247, 115, 0.22);
    background: rgba(17, 37, 32, 0.45);
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.purchase-info-box i {
    margin-top: 2px;
    color: #18eb79;
}

.purchase-info-box p {
    margin: 0;
    line-height: 1.45;
    font-size: 0.95rem;
}

.purchase-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.purchase-fields-grid.single-column {
    grid-template-columns: 1fr;
}

.payment-details.hidden {
    display: none;
}

.payment-details-card {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(17, 32, 43, 0.94);
    border: 1px solid rgba(16, 215, 255, 0.14);
}

.payment-details-card p {
    margin: 4px 0;
}

.payment-copy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.copy-account-button {
    border: 1px solid rgba(0, 245, 255, 0.45);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(0, 255, 166, 0.18), rgba(0, 218, 255, 0.24));
    color: #dffcff;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 7px 12px;
    text-transform: uppercase;
}

.copy-account-button:hover {
    box-shadow: 0 0 18px rgba(0, 245, 255, 0.28);
    transform: translateY(-1px);
}

.upload-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 96px;
    border: 2px dashed rgba(123, 142, 174, 0.35);
    border-radius: 18px;
    background: rgba(10, 12, 24, 0.85);
    cursor: pointer;
    text-align: center;
    padding: 14px;
    box-sizing: border-box;
}

.upload-title {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
}

.upload-copy,
.upload-file-name {
    color: rgba(255,255,255,0.48);
}

.consent-box {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(20, 24, 39, 0.96);
    border: 1px solid rgba(255,255,255,0.08);
    box-sizing: border-box;
    overflow: hidden;
}

.consent-box input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
}

.consent-box span {
    display: block;
    width: 100%;
    min-width: 0;
    line-height: 1.55;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.82);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.purchase-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(26, 31, 46, 0.96);
    border: 1px solid rgba(255,255,255,0.08);
    position: sticky;
    bottom: 0;
    z-index: 2;
}

#enviarBtn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.2);
    box-shadow: none;
}

.purchase-total-label {
    margin: 0 0 8px;
    color: rgba(255,255,255,0.52);
    text-transform: uppercase;
}

.purchase-total-amount {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: #10d7ff;
}

.purchase-note {
    margin: 0;
    color: rgba(255,255,255,0.52);
    text-align: center;
}

.modal-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(9, 13, 22, 0.98);
    padding-bottom: 10px;
}

.icon-button {
    background: rgba(255,255,255,0.08);
    color: white;
    width: 42px;
    height: 42px;
    padding: 0;
}

.selector-card {
    align-items: center;
}

.selector-card button,
.selector-card #cantidad {
    width: 78px;
    height: 62px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    background: rgba(19, 28, 42, 0.98);
    color: #00ffa6;
    border: 1px solid rgba(0,255,166,0.16);
}

.selector-helper,
.modal-total {
    text-align: center;
    margin: 8px 0 0;
    font-size: 0.95rem;
}

.verify-results {
    display: grid;
    gap: 10px;
}

.verify-result-item {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(18, 27, 39, 0.96);
}

.verify-modal-box {
    width: min(100%, 920px);
    padding: 10px 10px 24px;
    background:
        radial-gradient(circle at top center, rgba(16, 215, 255, 0.12), transparent 28%),
        rgba(9, 13, 22, 0.98);
}

.verify-modal-header {
    padding: 8px 12px 4px;
}

.verify-hero {
    padding: 28px 20px 22px;
    text-align: center;
}

.verify-icon-wrap {
    width: 82px;
    height: 82px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #18eb79;
    font-size: 2.5rem;
    background: radial-gradient(circle, rgba(24, 235, 121, 0.14), transparent 70%);
    box-shadow: 0 0 38px rgba(24, 235, 121, 0.12);
}

.verify-hero h2 {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.5rem, 7vw, 5rem);
    line-height: 0.95;
    text-transform: uppercase;
    background: linear-gradient(90deg, #00ffa6, #10d7ff, #e7ffdf);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.verify-hero p {
    margin: 8px 0 12px;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    text-transform: uppercase;
    color: #f5fffd;
}

.verify-hero span {
    display: block;
    max-width: 760px;
    margin: 0 auto;
    color: rgba(255,255,255,0.68);
    line-height: 1.6;
}

.verify-form-card {
    margin: 0 auto;
    width: min(100%, 880px);
    padding: 28px;
    border-radius: 28px;
    border: 1px solid rgba(83, 109, 173, 0.18);
    background: rgba(14, 20, 33, 0.96);
}

.verify-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-weight: 700;
    color: #e6f5ff;
}

.verify-form-card select,
.verify-form-card input {
    width: 100%;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(16, 215, 255, 0.28);
    background: rgba(27, 36, 53, 0.96);
    color: white;
    box-sizing: border-box;
    margin-bottom: 18px;
    box-shadow: inset 0 0 0 1px rgba(16, 215, 255, 0.08);
}

.verify-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 16px;
    align-items: center;
}

.verify-search-row input {
    margin-bottom: 0;
}

.verify-search-button {
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 18px;
    background: linear-gradient(135deg, #00dd72, #12d5ff);
    color: #041117;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

.verify-help {
    margin: 16px 0 0;
    color: rgba(255,255,255,0.48);
}

.legal-modal-box {
    width: min(100%, 940px);
    max-height: calc(100vh - 36px);
    padding: 0;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(111, 130, 182, 0.24);
    background: rgba(15, 22, 36, 0.98);
}

.legal-modal-header {
    padding: 24px 28px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.legal-modal-body {
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding: 22px 28px 10px;
    text-align: left;
}

.legal-section + .legal-section {
    margin-top: 26px;
}

.legal-section h4 {
    margin: 0 0 12px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    text-transform: uppercase;
    color: #5dff94;
}

.legal-section p,
.legal-section li {
    color: rgba(255,255,255,0.68);
    line-height: 1.7;
}

.legal-section p {
    margin: 0 0 12px;
}

.legal-section ul {
    margin: 0;
    padding-left: 22px;
}

.legal-section li + li {
    margin-top: 10px;
}

.legal-modal-footer {
    padding: 18px 28px 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    justify-content: center;
}

.pending-purchases-list {
    display: grid;
    gap: 18px;
}

.admin-ticket-search {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.admin-ticket-results {
    display: grid;
    gap: 14px;
}

.analytics-filters {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
    align-items: end;
}

.analytics-filter-field {
    display: grid;
    gap: 8px;
    text-align: left;
}

.analytics-filter-field label {
    color: #8effcf;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.82rem;
    text-transform: uppercase;
}

.analytics-filter-field input,
.analytics-filter-field select {
    width: 100%;
    box-sizing: border-box;
}

.analytics-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.analytics-card {
    padding: 22px;
    border-radius: 24px;
    border: 1px solid rgba(0, 255, 166, 0.1);
    background:
        radial-gradient(circle at top right, rgba(16, 215, 255, 0.09), transparent 35%),
        rgba(14, 20, 33, 0.96);
    text-align: left;
}

.analytics-card-kicker {
    margin: 0 0 10px;
    color: #8effcf;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.analytics-card h3 {
    margin: 0 0 12px;
    font-family: 'Orbitron', sans-serif;
    color: #f5fffd;
    font-size: 1.45rem;
}

.analytics-card-metrics {
    display: grid;
    gap: 8px;
    color: rgba(255,255,255,0.72);
}

.analytics-visual-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.analytics-panel {
    padding: 22px;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.08);
    background:
        linear-gradient(180deg, rgba(21, 28, 45, 0.98), rgba(10, 15, 26, 0.96));
    grid-column: span 4;
}

.analytics-panel-large {
    grid-column: span 8;
}

.analytics-panel-wide {
    grid-column: span 6;
}

.analytics-panel h3 {
    margin: 0 0 16px;
    font-family: 'Orbitron', sans-serif;
    color: #f5fffd;
    font-size: 1.05rem;
}

.trend-chart-pro {
    width: 100%;
    min-height: 280px;
}

.trend-svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.trend-grid-line {
    stroke: rgba(255,255,255,0.08);
    stroke-width: 1;
}

.trend-area-fill {
    fill: rgba(16, 215, 255, 0.14);
}

.trend-line {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.trend-line-visitors {
    stroke: #10d7ff;
}

.trend-line-sales {
    stroke: #00ffa6;
}

.trend-point {
    stroke: rgba(9, 14, 24, 0.95);
    stroke-width: 2;
}

.trend-point-visitors {
    fill: #10d7ff;
}

.trend-point-sales {
    fill: #00ffa6;
}

.trend-axis-label {
    fill: rgba(255,255,255,0.52);
    font-size: 11px;
}

.chart-legend {
    margin-top: 14px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    color: rgba(255,255,255,0.68);
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

.legend-dot.visitors {
    background: #10d7ff;
}

.legend-dot.sales {
    background: #00ffa6;
}

.funnel-step {
    margin: 0 auto 10px;
    min-height: 72px;
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(0,255,166,0.2), rgba(16,215,255,0.12));
    border: 1px solid rgba(0,255,166,0.14);
    display: grid;
    place-items: center;
    text-align: center;
}

.funnel-step strong {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    color: #f5fffd;
}

.funnel-step span,
.funnel-step i {
    color: rgba(255,255,255,0.72);
}

.comparison-item + .comparison-item,
.heatmap-item + .heatmap-item {
    margin-top: 14px;
}

.comparison-item-card,
.ranking-card,
.conversion-rifa-card {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
}

.comparison-item-head,
.heatmap-meta,
.heatmap-label,
.ranking-card-head,
.ranking-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.comparison-item-head strong,
.heatmap-label strong,
.ranking-card-head strong {
    color: #f5fffd;
}

.comparison-item-head span,
.comparison-item p,
.heatmap-label span,
.heatmap-meta span,
.ranking-meta span,
.ranking-subtitle {
    color: rgba(255,255,255,0.68);
}

.ranking-subtitle {
    margin: 8px 0 10px;
}

.comparison-bar,
.heatmap-bar {
    margin: 8px 0;
    height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
}

.comparison-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ffc53d, #ff7b24);
}

.ranking-bar-fill {
    background: linear-gradient(90deg, #00ffa6, #18a0fb);
}

.buyer-bar-fill {
    background: linear-gradient(90deg, #ffd84d, #ff8f2d);
}

.heatmap-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #00ffa6, #10d7ff);
}

.ranking-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(16, 215, 255, 0.14);
    border: 1px solid rgba(16, 215, 255, 0.24);
    color: #8de4ff;
    font-family: 'Orbitron', sans-serif;
}

.conversion-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0;
}

.conversion-metrics-grid small {
    display: block;
    margin-bottom: 4px;
    color: rgba(255,255,255,0.52);
}

.conversion-metrics-grid strong {
    color: #f5fffd;
    font-family: 'Orbitron', sans-serif;
}

.conversion-track {
    position: relative;
    height: 12px;
    margin: 10px 0 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
}

.conversion-fill {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: inherit;
}

.conversion-fill-submitted {
    background: linear-gradient(90deg, rgba(16, 215, 255, 0.45), rgba(16, 215, 255, 0.9));
}

.conversion-fill-approved {
    background: linear-gradient(90deg, rgba(0, 255, 166, 0.5), rgba(0, 255, 166, 0.95));
    box-shadow: 0 0 18px rgba(0,255,166,0.35);
}

.admin-ticket-table-wrap {
    overflow: auto;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(14, 20, 33, 0.96);
}

.admin-ticket-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-ticket-table th,
.admin-ticket-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-align: left;
}

.admin-ticket-table td {
    vertical-align: top;
}

.admin-ticket-table th {
    color: #8effcf;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    background: rgba(0,255,166,0.05);
}

.pending-purchase-card {
    padding: 20px;
    border-radius: 22px;
    background: rgba(14, 20, 33, 0.96);
    border: 1px solid rgba(255,255,255,0.08);
}

.pending-purchase-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.pending-purchase-main h3 {
    margin-top: 0;
    font-family: 'Orbitron', sans-serif;
}

.pending-purchase-main p {
    margin: 6px 0;
}

.pending-review-box {
    margin-top: 16px;
    display: grid;
    gap: 12px;
}

.review-note-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(20, 28, 42, 0.94);
    color: white;
    box-sizing: border-box;
}

.reset-temp-password-input {
    min-height: auto;
}

@media (max-width: 980px) {
    .public-hero,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .public-hero {
        text-align: left;
    }

    .admin-raffle-item {
        grid-template-columns: 1fr;
    }

    .admin-raffle-content {
        padding: 0 18px 18px;
    }

    .analytics-filters,
    .analytics-visual-grid {
        grid-template-columns: 1fr;
    }

    .analytics-panel,
    .analytics-panel-large,
    .analytics-panel-wide {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .public-hero {
        padding: 22px 18px;
    }

    .public-main {
        width: min(100%, calc(100% - 20px));
    }

    .raffle-card-body,
    .admin-form-card,
    .admin-preview-card {
        padding: 18px;
    }

    .admin-form-split,
    .public-hero-actions,
    .admin-actions,
    .raffle-meta,
    .admin-raffle-controls,
    .purchase-footer {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .countdown-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .raffle-action-button,
    .hero-secondary-button,
    .secondary-link-button,
    .logout-button {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }

    .purchase-fields-grid,
    .pending-purchase-main,
    .admin-ticket-search,
    .analytics-filters,
    .conversion-metrics-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .purchase-quantity-box {
        padding: 18px;
    }

    .purchase-total-amount {
        font-size: 1.85rem;
    }

    .public-modal-box {
        max-height: calc(100vh - 20px);
        border-radius: 20px;
    }

    .verify-form-card {
        padding: 18px;
    }

    .verify-search-row {
        grid-template-columns: 1fr;
    }

    .verify-search-button {
        width: 100%;
    }

    .site-footer {
        width: min(100%, calc(100% - 20px));
        padding-top: 22px;
        margin-bottom: 80px;
        flex-direction: column;
        align-items: flex-start;
    }

    .site-footer-links {
        gap: 12px;
        flex-direction: column;
        align-items: flex-start;
    }

    .legal-modal-header,
    .legal-modal-body,
    .legal-modal-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .legal-modal-body {
        max-height: calc(100vh - 200px);
    }

    .analytics-card,
    .analytics-panel {
        padding: 18px;
    }

    .trend-chart-pro {
        min-height: 220px;
    }
}

/* Optional anti-bot widget (Turnstile / hCaptcha) inside the purchase modal */
.captcha-container {
    display: flex;
    justify-content: center;
    margin: 12px 0;
    min-height: 65px;
}

.captcha-container.hidden {
    display: none;
}

.raffle-action-button[aria-busy="true"],
#enviarBtn[aria-busy="true"] {
    cursor: progress;
}

/* Respect users who ask the system for less motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .bg-icons-container {
        display: none;
    }
}

/* ==========================
   PANEL DEL VENDEDOR
   Solo presentación: no cambia datos, permisos ni endpoints.
========================== */
.vendedor-page .login-container {
    height: auto;
    min-height: 100vh;
    align-items: flex-start;
    padding: 24px 12px 48px;
    box-sizing: border-box;
}

.vendedor-panel {
    width: min(880px, 100%);
    margin: 0 auto;
    text-align: left;
    padding: 24px;
    box-sizing: border-box;
}

.vendedor-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 8px;
}

.vendedor-identidad {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

.vendedor-avatar {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,255,166,0.15);
    border: 1px solid rgba(0,255,166,0.4);
    color: #00ffa6;
    font-size: 22px;
}

.vendedor-panel-header h2 {
    margin: 2px 0 6px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    color: #00ffa6;
    text-align: left;
}

.vendedor-panel-header .admin-section-copy {
    margin: 0;
}

.vendedor-section {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.vendedor-section:last-of-type {
    border-bottom: none;
}

.vendedor-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.05rem;
    color: #8effcf;
    text-align: left;
}

.vendedor-section-num {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #00ffa6;
    color: #000;
    font-size: 0.9rem;
    font-weight: 700;
}

.vendedor-section .admin-section-copy {
    margin: 0 0 14px;
    text-align: left;
}

/* Tarjetas de resumen */
.vendedor-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.vendedor-stat {
    background: rgba(20, 28, 42, 0.94);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vendedor-stat.is-destacado {
    border-color: rgba(0,255,166,0.5);
    background: rgba(0,255,166,0.08);
}

.vendedor-stat-icon {
    color: #00ffa6;
    font-size: 18px;
}

.vendedor-stat-num {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.25rem;
    color: #fff;
    word-break: break-word;
}

.vendedor-stat-label {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.35;
}

/* Detalle de comisión por rifa */
.vendedor-detalle-card {
    background: rgba(20, 28, 42, 0.94);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 16px;
}

.vendedor-detalle-titulo {
    margin: 0 0 12px;
    font-family: 'Orbitron', sans-serif;
    color: #8effcf;
}

.vendedor-detalle-filas > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.vendedor-detalle-filas > div:first-child {
    border-top: none;
}

.vendedor-detalle-filas span {
    color: rgba(255,255,255,0.65);
}

.vendedor-detalle-filas .is-destacado strong {
    color: #00ffa6;
}

.vendedor-comision-rifa-label,
#vendedorComisiones label,
#vendedorLinks label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255,255,255,0.8);
    text-align: left;
}

#vendedorComisiones select,
#vendedorLinks select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(20, 28, 42, 0.94);
    color: #fff;
    margin-bottom: 12px;
}

/* Link para compartir */
.vendedor-link-box {
    background: rgba(20, 28, 42, 0.94);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 16px;
}

.vendedor-link-label {
    margin: 0 0 6px;
    color: rgba(255,255,255,0.65);
}

.vendedor-link-url {
    word-break: break-all;
    background: rgba(0,0,0,0.35);
    border: 1px dashed rgba(0,255,166,0.4);
    border-radius: 10px;
    padding: 10px 12px;
    margin: 0 0 12px;
    color: #8effcf;
}

.vendedor-copiar-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Filtro de ventas */
.vendedor-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.vendedor-filtro-btn {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.2);
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
}

.vendedor-filtro-btn.is-active {
    background: #00ffa6;
    border-color: #00ffa6;
    color: #000;
    font-weight: 700;
}

/* Tarjeta de cada venta */
#vendedorVentasList {
    display: grid;
    gap: 12px;
}

.vendedor-venta-card {
    padding: 18px;
}

.vendedor-venta-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.vendedor-venta-head h3 {
    margin: 0;
    text-align: left;
}

.vendedor-badge {
    flex: 0 0 auto;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.vendedor-badge.is-aprobado {
    background: rgba(0,255,166,0.15);
    color: #00ffa6;
    border: 1px solid rgba(0,255,166,0.5);
}

.vendedor-badge.is-pendiente {
    background: rgba(255,193,7,0.12);
    color: #ffc107;
    border: 1px solid rgba(255,193,7,0.5);
}

.vendedor-venta-datos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
}

.vendedor-venta-datos > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.vendedor-venta-datos span {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.55);
}

.vendedor-venta-datos strong {
    font-weight: 600;
    word-break: break-word;
}

@media (max-width: 640px) {
    .vendedor-panel {
        padding: 18px 14px;
    }

    .vendedor-panel-header {
        flex-direction: column;
    }

    .vendedor-venta-datos {
        grid-template-columns: 1fr;
    }

    .vendedor-stats {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==========================
   PANEL DEL VENDEDOR — color por sección y lista con desplazamiento
========================== */
.vendedor-section.is-resumen .vendedor-section-num { background: #00ffa6; }
.vendedor-section.is-comisiones .vendedor-section-num { background: #ffc107; }
.vendedor-section.is-links .vendedor-section-num { background: #4fc3f7; }
.vendedor-section.is-ventas .vendedor-section-num { background: #b388ff; }

.vendedor-section.is-resumen .vendedor-section-title { color: #8effcf; }
.vendedor-section.is-comisiones .vendedor-section-title { color: #ffe082; }
.vendedor-section.is-links .vendedor-section-title { color: #b3e5fc; }
.vendedor-section.is-ventas .vendedor-section-title { color: #d1c4e9; }

.vendedor-stat-icon.is-verde { color: #00ffa6; }
.vendedor-stat-icon.is-dorado { color: #ffc107; }
.vendedor-stat-icon.is-morado { color: #b388ff; }
.vendedor-stat-icon.is-azul { color: #4fc3f7; }

/* Filtro por rifa */
.vendedor-filtros-rifa {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.vendedor-filtros-rifa label {
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
}

.vendedor-filtros-rifa select {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(20, 28, 42, 0.94);
    color: #fff;
}

.vendedor-ventas-conteo {
    margin: 0 0 10px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    text-align: left;
}

/* La lista de ventas es un cuadro con desplazamiento */
#vendedorVentasList {
    max-height: 560px;
    overflow-y: auto;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,255,166,0.5) rgba(255,255,255,0.06);
}

#vendedorVentasList::-webkit-scrollbar {
    width: 8px;
}

#vendedorVentasList::-webkit-scrollbar-thumb {
    background: rgba(0,255,166,0.5);
    border-radius: 999px;
}

#vendedorVentasList::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
}

.vendedor-venta-card.is-aprobada {
    border-left: 4px solid #00ffa6;
}

.vendedor-venta-card.is-pendiente {
    border-left: 4px solid #ffc107;
}

.vendedor-venta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.vendedor-badge.is-archivada {
    background: rgba(179,136,255,0.15);
    color: #d1c4e9;
    border: 1px solid rgba(179,136,255,0.55);
}

/* Los boletos van en su propio cuadro con desplazamiento */
.vendedor-boletos-box {
    margin-top: 12px;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 10px 12px;
    max-height: 84px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.vendedor-boletos-box span {
    display: block;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.55);
    margin-bottom: 2px;
}

.vendedor-boletos-box strong {
    font-weight: 500;
    word-break: break-word;
    line-height: 1.5;
}

/* ==========================
   AUDITORIA OCULTABLE (panel admin)
========================== */
.admin-header-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.audit-hidden-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #111;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 15px;
    padding: 14px 18px;
    margin-bottom: 20px;
    text-align: left;
    color: rgba(255,255,255,0.65);
}

/* ==========================
   COMO JUGAR (pagina publica)
========================== */
.how-to-play {
    margin-top: 28px;
    padding: 28px;
    border-radius: 28px;
    border: 1px solid rgba(0, 255, 166, 0.14);
    background:
        radial-gradient(circle at top left, rgba(0, 255, 166, 0.12), transparent 35%),
        rgba(7, 10, 18, 0.92);
    box-sizing: border-box;
    text-align: left;
}

.how-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.how-header-icon {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    border: 1px solid rgba(0, 255, 166, 0.35);
    background: rgba(0, 255, 166, 0.08);
    color: #00ffa6;
    font-size: 1.5rem;
}

.how-header h2 {
    margin: 0 0 4px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 0.08rem;
    color: #f5fffd;
}

.how-header p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.5;
}

.how-toggle {
    width: 100%;
    margin-top: 20px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 18px;
    border: 1px solid rgba(0, 255, 166, 0.25);
    background: rgba(0, 255, 166, 0.06);
    color: #00ffa6;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.18rem;
    cursor: pointer;
}

.how-toggle .fa-chevron-down {
    transition: transform 0.2s ease;
}

.how-toggle.open .fa-chevron-down {
    transform: rotate(180deg);
}

.how-steps {
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 36px;
    text-align: center;
}

.how-steps[hidden] {
    display: none;
}

.how-step-icon {
    position: relative;
    width: 96px;
    height: 96px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    border: 1px solid rgba(0, 255, 166, 0.35);
    background: rgba(0, 255, 166, 0.06);
    color: #00ffa6;
    font-size: 2.2rem;
}

.how-step-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(0, 255, 166, 0.5);
    background: #0a0f14;
    color: #00ffa6;
    font-size: 0.95rem;
    font-weight: 700;
}

.how-step h3 {
    margin: 18px 0 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.15rem;
    letter-spacing: 0.08rem;
    color: #f5fffd;
}

.how-step p {
    margin: 0 auto;
    max-width: 560px;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.6;
}

.how-step-highlight .how-step-icon {
    border-color: rgba(0, 255, 166, 0.65);
    background: rgba(0, 255, 166, 0.14);
    box-shadow: 0 0 30px rgba(0, 255, 166, 0.22);
}

.how-verify-link {
    border: none;
    background: transparent;
    padding: 0;
    color: #00ffa6;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.how-ig-handle {
    color: #ffd34d;
    font-weight: 700;
    text-decoration: none;
}

.how-ig-handle:hover {
    text-decoration: underline;
}

.how-ig-button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px auto 0;
    padding: 18px 24px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #fff7ae, #ffd34d 45%, #f0a500);
    color: #241a00;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.08rem;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(240, 165, 0, 0.35);
}

.how-ig-button .fa-instagram {
    font-size: 1.4rem;
}

@media (max-width: 560px) {
    .how-to-play {
        padding: 20px;
    }

    .how-ig-button {
        font-size: 0.8rem;
    }
}
