.x-modal-detail-sale {
    border-radius: 22px;
    overflow: hidden;
    animation: xModalFadeScale .22s ease;
}

.x-modal-detail-sale__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.x-modal-detail-sale__title-wrap {
    display: flex;
    flex-direction: column;
}

.x-modal-detail-sale__subtitle {
    font-size: 13px;
    opacity: .72;
    margin-top: 4px;
}

.x-modal-detail-sale__header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.x-detail-panel {
    border: 1px solid rgba(255, 255, 255, .06);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}

.x-detail-panel--products {
    min-height: 100%;
}

.x-detail-box {
    min-height: 78px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .05);
    padding: 16px;
    color: rgba(255, 255, 255, .88);
}

.x-detail-sale-total--hero {
    border-radius: 20px;
    padding: 18px 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, .15), rgba(16, 185, 129, .10));
    border: 1px solid rgba(255, 255, 255, .06);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .18);
}

.x-detail-sale-total__label {
    display: block;
    font-size: 13px;
    letter-spacing: .08em;
    opacity: .72;
    margin-bottom: 4px;
}

.x-detail-sale-total__value {
    font-size: 42px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #fff;
}

.x-serial-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.x-serial-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(59, 130, 246, .12);
    border: 1px solid rgba(59, 130, 246, .22);
    color: #a8c7ff;
    font-size: 12px;
    font-weight: 600;
}

#tablaDetalleVentaProductos tbody tr {
    transition: all .18s ease;
}

#tablaDetalleVentaProductos tbody tr:hover {
    background: rgba(255, 255, 255, .03);
    transform: translateX(2px);
}

@keyframes xModalFadeScale {
    from {
        opacity: 0;
        transform: scale(.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.x-vta-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .48rem .85rem;
    border-radius: 999px;
    font-size: .80rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid transparent;
}

.x-vta-badge i {
    font-size: .78rem;
}

/* PAGADO */
.x-vta-badge--success {
    color: #34d399;
    background: rgba(16, 185, 129, .14);
    border-color: rgba(16, 185, 129, .30);
}

/* ABONADO */
.x-vta-badge--warning {
    color: #f6ad55;
    background: rgba(249, 115, 22, .12);
    border-color: rgba(249, 115, 22, .26);
}

/* PENDIENTE */
.x-vta-badge--pending {
    color: #f6d365;
    background: rgba(245, 158, 11, .12);
    border-color: rgba(245, 158, 11, .28);
}

/* ANULADO */
.x-vta-badge--danger {
    color: #fca5a5;
    background: rgba(239, 68, 68, .12);
    border-color: rgba(239, 68, 68, .28);
}

.x-detail-panel--hero {
    padding-bottom: 10px;
}

.x-detail-panel--products {
    min-height: 320px;
}

.x-detail-box {
    min-height: 120px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .05);
    padding: 16px;
    color: rgba(255, 255, 255, .88);
}

.x-serial-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 120px;
    align-items: flex-start;
}

.x-modal-detail-sale__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.x-modal-detail-sale__title-wrap {
    display: flex;
    flex-direction: column;
}

.x-modal-detail-sale__subtitle {
    margin-top: 4px;
    font-size: 13px;
    opacity: .72;
}

.x-detail-sale-total--hero {
    border-radius: 20px;
    padding: 20px 24px;
    text-align: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, .12), rgba(16, 185, 129, .08));
    border: 1px solid rgba(255, 255, 255, .06);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .18);
}

.x-detail-sale-total__label {
    display: block;
    font-size: 13px;
    letter-spacing: .08em;
    opacity: .72;
    margin-bottom: 4px;
}

.x-detail-sale-total__value {
    font-size: 42px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #fff;
}

.x-total-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.x-total-label {
    font-size: 12px;
    letter-spacing: .08em;
    opacity: .6;
}

.x-total-value {
    font-size: 26px;
    font-weight: 700;
}

/* colores */
.x-total-item--success .x-total-value {
    color: #10b981;
}

.x-total-item--danger .x-total-value {
    color: #ef4444;
}

.x-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, .06);
    border-radius: 999px;
    overflow: hidden;
}

.x-progress-fill {
    height: 100%;
    background: #10b981;
    width: 0%;
    transition: all .4s ease;
}

.x-detail-sale-total--hero {
    border-radius: 22px;
    padding: 22px 24px;
    background: linear-gradient(135deg, rgba(59, 130, 246, .12), rgba(16, 185, 129, .07));
    border: 1px solid rgba(255, 255, 255, .06);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .18);
}

.x-total-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.x-total-label {
    font-size: 12px;
    letter-spacing: .08em;
    opacity: .68;
    font-weight: 700;
}

.x-total-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.05;
    color: #fff;
}

.x-total-item--success .x-total-value {
    color: #10b981;
}

.x-total-item--danger .x-total-value {
    color: #ff5c5c;
}

.x-payment-progress-wrap {
    padding: 10px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .05);
}

.x-payment-progress__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.x-payment-progress__label {
    font-size: 12px;
    letter-spacing: .08em;
    opacity: .68;
    font-weight: 700;
}

.x-payment-progress__percent {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
}

.x-progress-bar {
    height: 10px;
    background: rgba(255, 255, 255, .07);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.x-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #10b981, #34d399);
    box-shadow: 0 0 14px rgba(16, 185, 129, .28);
    transition: width .45s ease;
}

.x-payment-progress__meta {
    margin-top: 8px;
    font-size: 12px;
    opacity: .72;
}

.x-progress-fill.is-success {
    background: linear-gradient(90deg, #10b981, #34d399);
    box-shadow: 0 0 14px rgba(16, 185, 129, .28);
}

.x-progress-fill.is-warning {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    box-shadow: 0 0 14px rgba(245, 158, 11, .24);
}

.x-progress-fill.is-pending {
    background: linear-gradient(90deg, #ef4444, #fb7185);
    box-shadow: 0 0 14px rgba(239, 68, 68, .24);
}

.x-total-card {
    border-radius: 18px;
    padding: 18px 16px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .06);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all .2s ease;
}

.x-total-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .25);
}

.x-total-card__label {
    font-size: 12px;
    letter-spacing: .08em;
    opacity: .65;
    font-weight: 700;
}

.x-total-card__value {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
}

/* variantes */
.x-total-card--success .x-total-card__value {
    color: #10b981;
}

.x-total-card--danger .x-total-card__value {
    color: #ef4444;
}

.x-total-card--neutral .x-total-card__value {
    color: #fff;
}

.x-payment-progress-wrap {
    padding: 10px 14px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .05);
    margin-top: 6px;
}

.x-payment-progress__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.x-payment-progress__label {
    font-size: 12px;
    letter-spacing: .08em;
    opacity: .68;
    font-weight: 700;
    margin: 0;
}

.x-payment-progress__percent {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin: 0;
}

.x-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, .07);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    margin: 0;
}

.x-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    transition: width .4s ease;
}

.x-payment-progress__meta {
    margin-top: 6px;
    font-size: 12px;
    opacity: .72;
    line-height: 1.2;
}

.x-payment-progress-wrap {
    padding: 8px 12px 10px;
}

.x-detail-progress-block {
    margin-top: 8px !important;
}


.x-product-list-detail {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.x-product-detail-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .05);
    transition: all .18s ease;
}

.x-product-detail-card:hover {
    background: rgba(255, 255, 255, .045);
    transform: translateY(-1px);
}

.x-product-detail-card__media {
    width: 72px;
    height: 72px;
    min-width: 72px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.x-product-detail-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.x-product-detail-card__body {
    flex: 1;
    min-width: 0;
}

.x-product-detail-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.x-product-detail-card__name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.x-product-detail-card__line-total {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
}

.x-product-detail-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.x-product-meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .05);
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, .82);
}

.x-product-detail-card--inline {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
}

.x-product-detail-card__main {
    flex: 1;
    min-width: 0;
}

.x-product-detail-card__name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.x-product-detail-card__inline-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.x-meta-inline {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, .75);
}

.x-product-detail-card__total {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
}

.x-product-detail-card__inline-meta .x-sku-chip {
    font-size: 11px;
    padding: 4px 8px;
}

.x-product-detail-card--compact {
    display: grid;
    grid-template-columns: 72px minmax(220px, 1.8fr) minmax(110px, .9fr) minmax(90px, .7fr) minmax(130px, .9fr) minmax(110px, .8fr);
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .05);
    transition: all .18s ease;
}

.x-product-detail-card--compact:hover {
    background: rgba(255, 255, 255, .045);
    transform: translateY(-1px);
}

.x-product-detail-card__media {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.x-product-detail-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.x-product-col {
    min-width: 0;
}

.x-product-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.x-product-col--sku,
.x-product-col--qty,
.x-product-col--price {
    display: flex;
    align-items: center;
}

.x-product-col--total {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.x-product-col--total strong {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
}

.x-meta-inline {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, .78);
    white-space: nowrap;
}

.x-sku-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(59, 130, 246, .12);
    border: 1px solid rgba(59, 130, 246, .22);
    color: #9fc3ff;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    .x-product-detail-card--compact {
        grid-template-columns: 64px 1fr;
        gap: 12px;
    }

    .x-product-col--sku,
    .x-product-col--qty,
    .x-product-col--price,
    .x-product-col--total {
        grid-column: 2 / 3;
    }

    .x-product-col--total {
        justify-content: flex-start;
        margin-top: 2px;
    }

    .x-product-name {
        white-space: normal;
    }
}

.x-product-detail-card--compact {
    display: grid;
    grid-template-columns: 72px minmax(220px, 2fr) 120px 100px 130px 120px;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}

.x-product-col--total strong {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}

.x-meta-inline {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, .72);
}


.x-detail-panel--products {
    padding-bottom: 16px;
}

.x-product-list-scroll {
    height: 360px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
    margin-top: 10px;
}

/* scrollbar */
.x-product-list-scroll::-webkit-scrollbar {
    width: 6px;
}

.x-product-list-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.x-product-list-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .18);
    border-radius: 999px;
}

.x-product-list-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, .28);
}

.x-abono-card__title--between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.x-products-count-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(59, 130, 246, .10);
    border: 1px solid rgba(59, 130, 246, .20);
    color: #a9c7ff;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.x-products-count-chip {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .75);
    font-weight: 600;
}

.x-product-detail-card--compact {
    padding: 12px 14px;
}

.x-product-col--total strong {
    font-size: 20px;
    letter-spacing: .3px;
}

.x-product-detail-card--compact {
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        background-color .18s ease,
        border-color .18s ease;
}

.x-product-detail-card--compact:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, .045);
    border-color: rgba(255, 255, 255, .09);
    box-shadow:
        0 10px 28px rgba(0, 0, 0, .18),
        inset 0 1px 0 rgba(255, 255, 255, .02);
}

#modalDetalleVenta .modal-dialog {
    transform: scale(.985) translateY(8px);
    opacity: 0;
    transition: transform .22s ease, opacity .22s ease;
}

#modalDetalleVenta.show .modal-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
}

#modalDetalleVenta .modal-content {
    overflow: hidden;
}

#modalDetalleVenta.fade .modal-dialog {
    transition: transform .22s ease, opacity .22s ease;
}


.x-skeleton {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, .05);
}

.x-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, .10),
            transparent);
    animation: xSkeletonShimmer 1.2s infinite;
}

@keyframes xSkeletonShimmer {
    100% {
        transform: translateX(100%);
    }
}

.x-product-skeleton-card {
    display: grid;
    grid-template-columns: 72px minmax(220px, 2fr) 120px 100px 130px 120px;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .05);
    margin-bottom: 14px;
}

.x-product-skeleton-media {
    width: 72px;
    height: 72px;
    border-radius: 16px;
}

.x-product-skeleton-line {
    height: 16px;
    border-radius: 10px;
}

.x-product-skeleton-line--name {
    width: 75%;
}

.x-product-skeleton-line--sku {
    width: 90px;
}

.x-product-skeleton-line--qty {
    width: 70px;
}

.x-product-skeleton-line--price {
    width: 95px;
}

.x-product-skeleton-line--total {
    width: 90px;
    margin-left: auto;
}

@keyframes xPulsePaid {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(16, 185, 129, 0);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 0 18px rgba(16, 185, 129, .28);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(16, 185, 129, 0);
    }
}

.x-paid-flash {
    animation: xPulsePaid .55s ease;
}

.x-input-paid {
    border-color: rgba(16, 185, 129, .45) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .10) !important;
}

.x-progress-fill.is-paid-hit {
    animation: xPulsePaid .55s ease;
}

.x-swal-toast-inside-modal {
    position: absolute !important;
    inset: 12px 12px auto auto !important;
    width: auto !important;
    height: auto !important;
    max-width: 380px !important;
    background: transparent !important;
    pointer-events: none !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}

.x-swal-toast-inside-modal.swal2-container {
    background: transparent !important;
}

.x-swal-toast-inside-modal .swal2-popup.swal2-toast {
    margin: 0 !important;
    pointer-events: auto !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .28);
}

.x-swal-toast-inside-modal::before,
.x-swal-toast-inside-modal::after {
    display: none !important;
    content: none !important;
}

.x-swal-toast-inside-modal.swal2-container {
    background: transparent !important;
    box-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
}

.x-swal-toast-inside-modal {
    box-shadow: none !important;
}

.x-swal-toast-inside-modal::before,
.x-swal-toast-inside-modal::after {
    display: none !important;
    content: none !important;
}

.x-swal-toast-inside-modal .swal2-popup {
    background: rgba(5, 15, 45, 0.95) !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .35) !important;
    backdrop-filter: blur(12px);
}

.x-swal-toast-inside-modal,
.x-swal-toast-inside-modal.swal2-container {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    left: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
    max-width: 360px !important;
    background: transparent !important;
    box-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    pointer-events: none !important;
    z-index: 9999 !important;
}

.x-swal-toast-inside-modal .swal2-popup.swal2-toast {
    pointer-events: auto !important;
    margin: 0 !important;
    transform: none !important;
}

#modalAbonoVenta .modal-content {
    overflow: hidden;
}

#modalAbonoVenta .modal-body {
    overflow-x: hidden;
}