/* =========================================================
   COMPRAS | XPERTECH DARK UI
   Basado visualmente en pedidos.css
========================================================= */

.x-compras-admin {
    min-height: 100vh;
    /* background:
        radial-gradient(circle at top, rgba(59, 130, 246, .08), transparent 30%),
        linear-gradient(180deg, #070b16 0%, #0b1220 100%); */
    color: #eef4ff;
    padding: 18px;
}

/* HEADER */
.x-compras-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 18px 20px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: linear-gradient(180deg, rgba(10, 20, 40, .94), rgba(8, 16, 32, .96));
    box-shadow: 0 16px 36px rgba(0, 0, 0, .28);
}

.x-compras-head__title {
    margin: 0;
    font-size: 28px;
    font-weight: 900;
    color: #fff;
}

.x-compras-head__text {
    margin: 6px 0 0;
    color: #93a8c9;
    font-size: 14px;
}

.x-compras-head__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* BOTONES */
.x-btn-dark {
    height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .05);
    color: #eef4ff;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: .2s ease;
}

.x-btn-dark:hover {
    color: #fff;
    background: rgba(255, 255, 255, .08);
    border-color: rgba(59, 130, 246, .28);
}

.x-btn-primary-dark {
    height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    border: 1px solid rgba(80, 220, 170, .18);
    background: linear-gradient(135deg, rgba(10, 108, 85, .96), rgba(6, 82, 65, .96));
    color: #d8fff0;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: .2s ease;
}

.x-btn-primary-dark:hover {
    color: #fff;
    filter: brightness(1.06);
    transform: translateY(-1px);
}

/* KPIS */
.x-compras-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.x-compra-stat {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: linear-gradient(180deg, rgba(10, 20, 40, .94), rgba(8, 16, 32, .96));
    box-shadow: 0 14px 30px rgba(0, 0, 0, .22);
    padding: 18px;
}

.x-compra-stat span {
    display: block;
    color: #93a8c9;
    font-size: 13px;
    margin-bottom: 8px;
}

.x-compra-stat strong {
    font-size: 30px;
    line-height: 1;
    color: #fff;
    font-weight: 900;
}

/* TOOLBAR */
.x-compras-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    align-items: center;
    flex-wrap: wrap;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: linear-gradient(180deg, rgba(10, 20, 40, .94), rgba(8, 16, 32, .96));
    box-shadow: 0 14px 30px rgba(0, 0, 0, .22);
}

.x-compras-search,
.x-compras-select,
.x-compras-date {
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .04);
    color: #eef4ff;
    padding: 0 14px;
    outline: none;
    box-shadow: none;
}

.x-compras-search {
    flex: 1;
    min-width: 260px;
}

.x-compras-select,
.x-compras-date {
    min-width: 160px;
}

.x-compras-search::placeholder {
    color: #8ea2c8;
}

/* TABLA WRAP */
.x-compras-table-wrap {
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .08);
    background: linear-gradient(180deg, rgba(10, 20, 40, .94), rgba(8, 16, 32, .96));

}

.x-compras-table-head {
    padding: 10px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    background: rgba(255, 255, 255, .02);
    border-radius: 18px;
}

.x-compras-table-head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
    color: #fff;
}

.x-compras-table-head p {
    margin: 6px 0 0;
    color: #8ea2c8;
    font-size: 13px;
}

.x-compras-table-wrap .table {
    margin-bottom: 0;
    color: #eef4ff;
}

.x-compras-table-wrap .table thead th {
    border-top: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .025);
    color: #93a8c9;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
}

.x-compras-table-wrap .table td {
    vertical-align: middle;
    border-top: 1px solid rgba(255, 255, 255, .06);
    color: #eaf2ff;
}

.x-compras-table-wrap .table-hover tbody tr:hover {
    background: rgba(255, 255, 255, .03);
}

/* BADGES */
.x-compra-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.x-compra-badge--recibida {
    background: rgba(16, 185, 129, .15);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, .24);
}

.x-compra-badge--pendiente {
    background: rgba(245, 158, 11, .15);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, .24);
}

.x-compra-badge--cancelada {
    background: rgba(239, 68, 68, .15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, .24);
}

.x-chip-pay {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(59, 130, 246, .14);
    border: 1px solid rgba(59, 130, 246, .22);
    color: #bfdbfe;
}

/* ACCIONES */
.x-actions-mini {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* .x-action-mini {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .05);
    color: #eef4ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: .2s ease;
} */

.x-action-mini:hover {
    color: #fff;
    background: rgba(255, 255, 255, .08);
    transform: translateY(-1px);
}

/* MODAL */
.x-modal-dark-buy .modal-content {
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(180deg, #07152e 0%, #031022 100%);
    border: 1px solid rgba(98, 152, 255, 0.16);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
}

.x-modal-dark-buy .modal-header {
    background: linear-gradient(180deg, #1b3971 0%, #132c59 100%);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    color: #fff;
    padding: 18px 22px;
}

.x-modal-dark-buy .modal-title {
    font-weight: 800;
    font-size: 18px;
    margin: 0;
}

.x-modal-dark-buy .modal-body {
    padding: 22px;
    background:
        radial-gradient(circle at top right, rgba(52, 152, 219, .10), transparent 28%),
        radial-gradient(circle at bottom left, rgba(52, 152, 219, .08), transparent 25%),
        linear-gradient(180deg, #051226 0%, #04101f 100%);
    color: #fff;
}

.x-modal-dark-buy .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, .06);
    background: rgba(255, 255, 255, .02);
    padding: 16px 22px;
}

.x-buy-card {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .03);
    padding: 16px;
    margin-bottom: 16px;
}

.x-buy-card__title {
    margin: 0 0 14px;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.x-modal-dark-buy .form-control,
.x-modal-dark-buy select,
.x-modal-dark-buy textarea {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    color: #fff;
    border-radius: 12px;
    box-shadow: none;
}

.x-modal-dark-buy .form-control:focus,
.x-modal-dark-buy select:focus,
.x-modal-dark-buy textarea:focus {
    background: rgba(255, 255, 255, .08);
    color: #fff;
    border-color: rgba(110, 170, 255, .4);
    box-shadow: none;
}

.x-modal-dark-buy label {
    color: rgba(220, 230, 245, .88);
    font-weight: 700;
    font-size: 13px;
}

.x-buy-summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    color: #dbe7fb;
}

.x-buy-summary-line strong {
    color: #fff;
    font-size: 15px;
    font-weight: 900;
}

.x-buy-summary-line--total strong {
    color: #8fd0ff;
    font-size: 20px;
}

.x-buy-detail-table {
    width: 100%;
}

.x-buy-detail-table thead th {
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    color: #93a8c9;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    padding: 10px 8px;
}

.x-buy-detail-table td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    vertical-align: middle;
}

.x-buy-empty {
    padding: 18px;
    border-radius: 14px;
    text-align: center;
    color: rgba(219, 229, 245, .72);
    background: rgba(255, 255, 255, .03);
    border: 1px dashed rgba(255, 255, 255, .10);
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .x-compras-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .x-compras-admin {
        padding: 12px;
    }

    .x-compras-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .x-compras-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .x-compras-search,
    .x-compras-select,
    .x-compras-date {
        width: 100%;
        min-width: 100%;
    }

    .x-compras-head__actions {
        width: 100%;
    }

    .x-compras-head__actions .x-btn-dark,
    .x-compras-head__actions .x-btn-primary-dark {
        flex: 1;
        justify-content: center;
    }
}

#tablaDetalleCompra .x-action-mini {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .05);
    color: #eef4ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: .2s ease;
}

#tablaDetalleCompra .x-action-mini:hover {
    color: #fff;
    background: rgba(239, 68, 68, .16);
    border-color: rgba(239, 68, 68, .24);
}

#modalVerCompra .form-control {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    color: #fff;
    border-radius: 12px;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.x-actions-mini--compras {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.x-actions-mini--compras .x-action-mini {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .05);
    color: #eef4ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: .2s ease;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
}

.x-actions-mini--compras .x-action-mini i {
    font-size: 17px;
}

.x-actions-mini--compras .x-action-mini:hover {
    color: #fff;
    transform: translateY(-1px);
}

.x-actions-mini--compras .btnVerCompra:hover {
    background: rgba(59, 130, 246, .16);
    border-color: rgba(59, 130, 246, .28);
}

.x-actions-mini--compras .btnEditarCompra:hover {
    background: rgba(245, 158, 11, .16);
    border-color: rgba(245, 158, 11, .28);
}

.x-actions-mini--compras .btnCambiarEstadoCompra:hover {
    background: rgba(139, 92, 246, .16);
    border-color: rgba(139, 92, 246, .28);
}

.x-actions-mini--compras .btnImprimirCompra:hover {
    background: rgba(16, 185, 129, .16);
    border-color: rgba(16, 185, 129, .28);
}

/* =========================================================
   EDITAR COMPRA | PREMIUM STYLE
========================================================= */

#modalEditarCompra .modal-dialog {
    max-width: 1280px;
}

#modalEditarCompra .modal-content {
    border-radius: 26px;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, .08), transparent 26%),
        linear-gradient(180deg, #07152e 0%, #031022 100%);
    border: 1px solid rgba(98, 152, 255, 0.16);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

#modalEditarCompra .modal-header {
    background: linear-gradient(180deg, #1b3971 0%, #132c59 100%);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    color: #fff;
    padding: 18px 24px;
}

#modalEditarCompra .modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    margin: 0;
}

#modalEditarCompra .modal-body {
    padding: 22px;
    color: #fff;
}

#modalEditarCompra .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, .06);
    background: rgba(255, 255, 255, .02);
    padding: 16px 24px 18px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* HERO */
.x-edit-compra-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 18px 20px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(8, 20, 48, .90) 0%, rgba(6, 15, 34, .92) 100%);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 12px 26px rgba(0, 0, 0, .16);
}

.x-edit-compra-hero__code {
    font-size: 30px;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}

.x-edit-compra-hero__meta {
    margin-top: 8px;
    color: #8ea2c8;
    font-size: 14px;
}

.x-edit-compra-hero__right {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* GRID */
.x-edit-compra-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(320px, .9fr);
    gap: 18px;
}

.x-edit-compra-stack {
    display: grid;
    gap: 18px;
}

/* CARDS */
.x-edit-compra-card {
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(8, 20, 48, .90) 0%, rgba(6, 15, 34, .92) 100%);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .18);
    overflow: hidden;
}

.x-edit-compra-card__head {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.x-edit-compra-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff;
}

.x-edit-compra-card__body {
    padding: 18px;
}

/* FORM */
.x-edit-compra-form-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px 18px;
}

.x-col-12 {
    grid-column: span 12;
}

.x-col-6 {
    grid-column: span 6;
}

.x-col-4 {
    grid-column: span 4;
}

.x-col-3 {
    grid-column: span 3;
}

.x-edit-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: rgba(220, 230, 245, .78);
}

.x-input-icon {
    position: relative;
}

.x-input-icon__icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 54px;
    height: 100%;
    border-right: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c6d4ee;
    pointer-events: none;
}

.x-input-icon .form-control,
.x-input-icon select,
.x-input-icon textarea {
    padding-left: 68px;
}

#modalEditarCompra .form-control,
#modalEditarCompra select,
#modalEditarCompra textarea {
    min-height: 54px;
    border-radius: 18px;
    background: rgba(0, 0, 0, .18);
    border: 1px solid rgba(59, 130, 246, .45);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .02);
}

#modalEditarCompra textarea.form-control {
    min-height: 92px;
    resize: vertical;
    padding-top: 14px;
}

#modalEditarCompra .form-control:focus,
#modalEditarCompra select:focus,
#modalEditarCompra textarea:focus {
    background: rgba(0, 0, 0, .22);
    border-color: rgba(110, 170, 255, .55);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
    color: #fff;
}

/* DETALLE COMO CARDS */
.x-edit-compra-items {
    display: grid;
    gap: 14px;
}

.x-edit-compra-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .06);
}

.x-edit-compra-item__main {
    min-width: 220px;
    flex: 1;
}

.x-edit-compra-item__title {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 6px;
}

.x-edit-compra-item__meta {
    color: #8ea2c8;
    font-size: 13px;
}

.x-edit-compra-item__fields {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.x-edit-compra-mini {
    min-width: 130px;
}

.x-edit-compra-mini label {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: #8ea2c8;
    letter-spacing: .04em;
}

.x-edit-compra-mini .form-control {
    min-height: 46px !important;
    border-radius: 14px !important;
    font-size: 15px !important;
}

.x-edit-compra-subtotal {
    min-height: 46px;
    border-radius: 14px;
    background: rgba(0, 0, 0, .18);
    border: 1px solid rgba(255, 255, 255, .06);
    display: flex;
    align-items: center;
    padding: 0 14px;
    font-size: 17px;
    font-weight: 900;
    color: #fff;
}

/* RESUMEN */
.x-edit-compra-summary {
    display: grid;
    gap: 14px;
}

.x-edit-compra-summary__line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    color: #dbe7fb;
}

.x-edit-compra-summary__line strong {
    color: #fff;
    font-size: 17px;
    font-weight: 900;
}

.x-edit-compra-summary__total {
    margin-top: 6px;
    padding-top: 12px;
}

.x-edit-compra-summary__total strong {
    font-size: 34px;
    color: #7cc4ff;
    letter-spacing: -.03em;
}

.x-edit-compra-summary__saldo strong {
    color: #facc15;
}

.x-edit-compra-alert {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .06);
    color: #dbe7fb;
    font-size: 13px;
    line-height: 1.5;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    .x-edit-compra-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .x-edit-compra-form-grid {
        grid-template-columns: 1fr;
    }

    .x-col-12,
    .x-col-6,
    .x-col-4,
    .x-col-3 {
        grid-column: span 1;
    }

    .x-edit-compra-item {
        flex-direction: column;
    }

    .x-edit-compra-item__fields {
        width: 100%;
    }

    .x-edit-compra-mini {
        width: 100%;
        min-width: 100%;
    }

    .x-edit-compra-hero__code {
        font-size: 24px;
    }
}


/* =========================================
   EDITAR COMPRA - PRODUCTOS PREMIUM
========================================= */

.x-product-list-scroll {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 4px;
}

.x-product-list-detail {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.x-product-detail-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .06);
}

.x-product-detail-card__main {
    flex: 1;
    min-width: 220px;
}

.x-product-detail-card__title {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 6px;
}

.x-product-detail-card__meta {
    color: #8ea2c8;
    font-size: 13px;
}

.x-product-detail-card__side {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    flex-wrap: nowrap;
}

.x-product-detail-card__mini {
    min-width: 130px;
}

.x-product-detail-card__mini span {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: #8ea2c8;
    letter-spacing: .04em;
}

.x-product-detail-card__mini strong {
    min-height: 48px;
    border-radius: 16px;
    background: rgba(0, 0, 0, .18);
    border: 1px solid rgba(255, 255, 255, .06);
    display: flex;
    align-items: center;
    padding: 0 14px;
    font-size: 17px;
    font-weight: 900;
    color: #fff;
}

.x-products-count-chip {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
    color: #dbe7fb;
}

.x-empty-lite {
    padding: 18px;
    border-radius: 14px;
    text-align: center;
    color: rgba(219, 229, 245, .72);
    background: rgba(255, 255, 255, .03);
    border: 1px dashed rgba(255, 255, 255, .10);
}

.x-compra-layout {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

.x-compra-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.x-compra-right {
    width: 340px;
    display: flex;
}

.x-compra-right .x-abono-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.x-compra-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 16px;
    align-items: start;
}

.x-compra-left,
.x-compra-right {
    min-width: 0;
}

.x-compra-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.x-sticky-summary {
    position: sticky;
    top: 12px;
}

.x-form-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
    padding: 12px;
}

.x-col-4 {
    grid-column: span 4;
    min-width: 0;
}

.x-col-6 {
    grid-column: span 6;
    min-width: 0;
}

.x-col-12 {
    grid-column: span 12;
    min-width: 0;
}

.x-form-grid .x-input-group,
.x-form-grid .x-input,
.x-form-grid select,
.x-form-grid textarea {
    width: 100%;
}

.x-detail-panel--products {
    overflow: hidden;
}

.x-product-list-scroll {
    max-height: 220px;
    overflow: auto;
    padding: 0 10px 10px;
}

@media (max-width: 1199.98px) {
    .x-compra-grid {
        grid-template-columns: minmax(0, 1fr) 320px;
    }
}

@media (max-width: 991.98px) {
    .x-compra-grid {
        grid-template-columns: 1fr;
    }

    .x-sticky-summary {
        position: relative;
        top: auto;
    }
}

@media (max-width: 767.98px) {
    .x-form-grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: 12px;
    }

    .x-col-4,
    .x-col-6 {
        grid-column: span 12;
    }
}