* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.header__compras {
    /* background: #fff; */
    padding: 25px 15px;
    border-radius: 8px;
    margin-top: 20px;
    margin-bottom: 20px;
    /* box-shadow: 0 4px 15px rgba(68, 20, 78, 0.1); */
    animation: sladeIn 0.5s ease-out;
}

.header__compras h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--main-color), var(--second-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.header__compras p {
    color: #777;
    font-size: 1.8rem;
    margin: 0;
    padding: 0 6px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    animation: sladeIn 0.5s ease-out;
}

.stat-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(68, 20, 78, 0.1);
    border-left: 3px solid var(--main-color);
}

.stat-card h3 {
    font-size: 1.8rem;
    color: var(--second-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--main-color);
}

    .stat-card p.stat-info {
        font-size: 1.7rem;
        font-weight: 500;
        color: #333;
    }

.compras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 30px;
}

.compra-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(68, 20, 78, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.compra-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.compra-header {
    background: linear-gradient(135deg, var(--main-color), var(--second-color));
    color: white;
    position: relative;
    height: 150px;
}

.compra-header>img {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 8px 8px 0 0;
    object-fit: cover;
}

.compra-header .text-overlay {
    height: 100%;
    width: 100%;
    padding: 20px;
    font-size: 2rem;
    font-weight: 700;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    align-content: center;
    color: white;
    text-overflow: ellipsis;
    overflow: hidden;
    background: #3333339d;
    border-radius: 8px 8px 0 0;
}

.compra-festival {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.compra-type {
    opacity: 0.9;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.compra-body {
    padding: 1.5rem;
    padding-top: 2rem;
}

.compra-info {
    margin-bottom: 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #999;
    font-weight: 500;
}

.info-value {
    font-weight: 600;
    text-align: right;
}

.compra-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-upcoming {
    background: #dbeafe;
    color: #1e40af;
}

.status-completed {
    background: #e5e7eb;
    color: #374151;
}

.status-danger {
    background: #fef2f2;
    color: #dc3545;
}

.compra-actions {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
}

.btn_ticket {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn_ticket.large {
    padding: 1rem 1.5rem;
    font-size: 2rem;
}

.btn_ticket.primary {
    background: var(--main-color);
    color: white;
    border: 1px solid #e2e8f0;
}

.btn_ticket.primary:hover {
    background: #e2e8f0;
    color: var(--main-color);
}

.btn_ticket.secondary {
    background: #f8fafc;
    color: var(--main-color);
    border: 1px solid #e2e8f0;
}

.btn_ticket.secondary:hover {
    background: #e2e8f0;
}

.btn_ticket.danger {
    background: #fef2f2;
    color: #dc3545;
    border: 1px solid #fecaca;
}

.btn_ticket.danger:hover {
    background: #fecaca;
    border: 1px solid #dc3545;
}

/* EMPTY STATE STYLES */
.empty-state {
    padding: 4rem 2rem;
    border-radius: 8px;
    text-align: center;
    animation: sladeIn 0.5s ease-out;
}

.empty-state-icon {
    font-size: 6rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
    background: linear-gradient(135deg, var(--main-color), var(--second-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.empty-state h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--main-color);
    font-weight: 700;
}

.empty-state p {
    color: var(--second-color);
    font-size: 1.6rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.empty-state-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--main-color), var(--second-color));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.6rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(96, 125, 139, 0.3);
}

.empty-state-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(96, 125, 139, 0.4);
}

.empty-state-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    text-align: left;
}

.empty-state-feature {
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid var(--main-color);
}

.empty-state-feature-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--main-color);
}

.empty-state-feature h3 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    color: var(--main-color);
}

.empty-state-feature p {
    font-size: 1.3rem;
    margin: 0;
    color: var(--second-color);
}

/* LOADING SKELETON STYLES */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Header Skeleton */
.skeleton-header {
    background: #fff;
    padding: 25px 15px;
    border-radius: 8px;
    margin-top: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(68, 20, 78, 0.1);
}

.skeleton-header .skeleton-title {
    height: 48px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-header .skeleton-subtitle {
    height: 32px;
    width: 80%;
}

/* Stats Skeleton */
.skeleton-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.skeleton-stat-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(68, 20, 78, 0.1);
    border-left: 4px solid #e0e0e0;
}

.skeleton-stat-card .skeleton-label {
    height: 24px;
    width: 70%;
    margin-bottom: 12px;
}

.skeleton-stat-card .skeleton-value {
    height: 32px;
    width: 40%;
}

/* Ticket Card Skeleton */
.skeleton-compra-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(68, 20, 78, 0.1);
}

.skeleton-compra-header {
    height: 150px;
    background: linear-gradient(90deg, #e0e0e0 25%, #d0d0d0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.skeleton-compra-body {
    padding: 1.5rem;
    padding-top: 2rem;
}

.skeleton-info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.skeleton-info-row:last-of-type {
    border-bottom: none;
}

.skeleton-info-label {
    height: 20px;
    width: 35%;
}

.skeleton-info-value {
    height: 20px;
    width: 45%;
}

.skeleton-compra-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.skeleton-btn {
    flex: 1;
    height: 42px;
    border-radius: 8px;
}

/* Hide loading state when content is loaded - use this class on body or container */
.content-loaded .loading-placeholder {
    display: none;
}

/* Show loading state by default - remove .loading-placeholder class when content loads */
.loading-placeholder {
    display: block;
}

@keyframes sladeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    text-decoration: none;
    color: var(--main-color);
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(68, 20, 78, 0.1);
    background: #fff;
}

.pagination a:hover {
    background: var(--main-color);
    color: white;
    border-color: var(--main-color);
    transform: translateY(-2px);
}

.pagination .active {
    background: var(--main-color);
    color: white;
}

.pagination .prev.active,
.pagination .next.active {
    background: #fff;
    color: var(--main-color);
    border-color: none;
}

.pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination .dots {
    border: none;
    background: none;
    box-shadow: none;
    cursor: default;
}

.pagination .prev,
.pagination .next {
    padding: 0 1rem;
    font-weight: 600;
}


iframe.entrada-iframe,
iframe.evento-iframe
{
    width: 100%;
    height: 630px;
    border: none;
}


iframe.entrada-iframe {
    transition: all 0.5s ease-out;
    margin-top: -30px;
}

iframe.evento-iframe {
}

.entrada-area {
    display: flex;
    gap: 20px;
}

.entrada-area .entrada-items {
    width: 65%;
}

.entrada-area .entrada-summary {
    width: 35%;
}

.entrada-items .stat-card.fixed-margin {
    margin: 0 28px;
}

.entrada-actions {
    display: flex;
    margin: 0 20px;
    flex-wrap: wrap;
    align-items: end;
    gap: 5px;
    justify-content: flex-end;
}

.entrada-actions .entrada-title {
    display: flex;
    align-self: center;
    align-items: center;
    gap: 10px;
    margin-right: auto;
    z-index: 1;
    font-weight: bold;
    font-size: 2rem;
}

.entrada-mobile {
    display: none;
}

@media (max-width: 480px) {

    .pagination {
        gap: 0.25rem;
    }

    .pagination a,
    .pagination span {
        font-size: 2rem;
    }

    .entrada-items .stat-card.fixed-margin {
        margin: 0;
    }

    .entrada-actions {
        margin: 0;
        margin-top: 20px;
        align-items: center;
        justify-content: space-around;
        border-bottom: 4px solid #e5e7eb;
    }
    .entrada-actions:last-child {
        border-bottom: none;
    }

    .entrada-actions .entrada-title {
        display: none;
    }
    .entrada-actions .entrada-title p{
        display: block;
        text-align: center;
    }

    .entrada-actions .button {
        width: 48%;
    }

    .entrada-actions button.medium {
        padding: 10px 15px;
    }

    iframe.entrada-iframe {
        position: absolute;
        opacity: 0;
        z-index: -1;
        pointer-events: none;
        /* make it untargetable */
        visibility: hidden;
        user-select: none;
    }

    .entrada-mobile {
        display: block;
        background: #fff;
        padding: 10px;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(68, 20, 78, 0.1);
        border-top: 3px solid var(--main-color);
    }
    .entrada-mobile .qr {
        border-radius: 8px;
        justify-content: center;
        display: flex
    }
    .entrada-mobile .qr img {
        width: 60%;
        height: auto;
        border-radius: 8px;
    }
    .entrada-mobile .details {
        background: #f9fafb;
        border-radius: 8px;
        padding: 20px;        
    }
    .entrada-mobile__header {
        padding-top: 15px;
    }
    .entrada-mobile__header h1 {
        font-size: 2.3rem;
        text-align: center;
        margin: 0;
    }

    .entrada-mobile .details div{
        margin-bottom: 10px;
    }
    .entrada-mobile .details h1 {
        font-size: 2.3rem;
        text-align: center;
        color: var(--main-color);
        margin: 0;
    }

    .entrada-mobile .details h2 {
        font-size: 1.8rem;
        color: var(--second-color);
        text-align: center;
        margin: 0;
    }

    .entrada-mobile .details h3 {
        font-size: 1.6rem;
        color: var(--second-color);
        text-align: center;
        margin: 0;
    }
    .entrada-mobile .details span.badged {
        background: var(--main-color);
        color: white;
        padding: 5px 10px;
        border-radius: 15px;
        display: inline-block;
    }
    

}


@media (max-width: 768px) {

    .header__compras h1 {
        font-size: 3rem;
        text-align: center;
    }

    .header__compras p {
        font-size: 1.7rem;
        text-align: center;
    }

    .compras-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .skeleton-stats {
        grid-template-columns: 1fr;
    }

    .empty-state h2 {
        font-size: 2rem;
    }

    .empty-state p {
        font-size: 1.4rem;
    }

    .empty-state-btn {
        font-size: 1.4rem;
        padding: 0.875rem 2rem;
    }

    .empty-state-features {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 992px) {
    /* 
  .dreamit-main-menu {
    display: none !important;
  } */

    .entrada-area {
        display: block;
    }


    .entrada-area .entrada-items {
        width: 100%;
    }

    .entrada-area .entrada-summary {
        width: 100%;
    }

    .entrada-items {
        margin-top: 20px;
    }
}


@media (max-width: 768px) {

    .header__compras h1 {
        font-size: 3rem;
        text-align: center;
    }

    .header__compras p {
        font-size: 1.7rem;
        text-align: center;
    }

    .compras-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .skeleton-stats {
        grid-template-columns: 1fr;
    }

    .empty-state h2 {
        font-size: 2rem;
    }

    .empty-state p {
        font-size: 1.4rem;
    }

    .empty-state-btn {
        font-size: 1.4rem;
        padding: 0.875rem 2rem;
    }

    .empty-state-features {
        grid-template-columns: 1fr;
    }
    .btn_ticket {
        font-size: 18px;
    }
}