/* Basado en el look del módulo anterior (mismo estilo) :contentReference[oaicite:3]{index=3} */

.je-wrap {
    padding: 20px 24px;
}

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

.je-title {
    font-size: 28px;
    font-weight: 600;
    color: #ff3b30;
    margin: 0;
}

.je-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.je-btn {
    border: 0;
    padding: 10px 14px;
    border-radius: 999px;
    background: #1f1f1f;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}

.je-btn:hover {
    filter: brightness(1.1);
}

.je-btn-primary {
    background: #ff3b30;
}

.je-btn-sm {
    padding: 8px 12px;
    font-size: 12px;
}

.je-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 14px;
}

.je-tab {
    border: 0;
    background: transparent;
    padding: 12px 14px;
    cursor: pointer;
    font-weight: 700;
    color: #333;
    border-bottom: 3px solid transparent;
}

.je-tab.active {
    color: #ff3b30;
    border-bottom-color: #ff3b30;
}

.je-hidden {
    display: none;
}

.je-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 14px;
}

.je-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.je-card-title {
    font-size: 18px;
    font-weight: 800;
    color: #111;
}

.je-muted {
    color: #666;
}

.je-hint {
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

.je-table-wrap {
    overflow-x: auto;
}

.je-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1150px;
}

.je-table thead th {
    text-align: left;
    font-size: 12px;
    color: #444;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.je-table tbody td {
    padding: 10px;
    border-bottom: 1px solid #f2f2f2;
    vertical-align: middle;
}

.je-row.je-new {
    background: #fff7f6;
}

.je-center {
    text-align: center;
}

.je-input,
.je-select {
    width: 100%;
    height: 38px;
    border-radius: 10px;
    border: 1px solid #ddd;
    padding: 8px 10px;
    outline: none;
    background: #fff;

    color: #111;
    /* 👈 texto negro */
    font-weight: 600;
    /* 👈 un poco más fuerte */
}

.je-input:not(:placeholder-shown) {
    font-weight: 700;
    color: #111;
}


.je-num {
    text-align: center;
}

.je-input:focus,
.je-select:focus {
    border-color: #ff3b30;
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.12);
}

.je-actions-cell {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.je-icon-btn {
    border: 0;
    background: #ff3b30;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
}

.je-icon-btn:hover {
    filter: brightness(1.05);
}

.je-icon-btn.danger {
    background: #111;
}

.je-toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    background: #111;
    color: #fff;
    padding: 12px 14px;
    border-radius: 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: all .2s ease;
    z-index: 99999;
    max-width: 460px;
    font-weight: 700;
}

.je-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.je-toast.ok {
    background: #16a34a;
}

.je-toast.bad {
    background: #dc2626;
}


.je-input::placeholder {
    color: #b0b0b0;
    font-weight: 400;
}


/* ===== MODAL ELIMINAR (BA) ===== */
.je-modal-hidden {
    display: none;
}

.je-modal-show {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: rgba(0, 0, 0, .45) !important;
    z-index: 2147483647 !important;
    /* arriba de voyager */
}

.je-modal-box {
    width: 420px;
    max-width: 92%;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
    animation: jePop .18s ease;
}

.je-modal-box h3 {
    margin: 0 0 8px;
    color: #ff3b30;
    font-weight: 900;
}

.je-modal-box p {
    margin: 0 0 16px;
    color: #444;
    font-weight: 600;
}

.je-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

@keyframes jePop {
    from {
        transform: scale(.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}


.je-input:disabled,
.je-input.je-disabled {
    background: #e5e7eb !important;
    color: #6b7280 !important;
    border-color: #d1d5db !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}


.je-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.je-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.je-table thead th {
    font-size: 13px;
    font-weight: 700;
    color: #111827 !important;
    background: transparent !important;
    border: 0 !important;
    padding: 0 10px 8px;
    text-align: left;
}

.je-table tbody tr {
    background: #ffffff;
}

.je-table tbody td {
    padding: 0 10px;
    border: 0 !important;
    vertical-align: middle;
}

.je-row {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.je-row td:first-child {
    border-radius: 12px 0 0 12px;
}

.je-row td:last-child {
    border-radius: 0 12px 12px 0;
}

.je-new {
    background: #fff5f3 !important;
}

.je-input {
    width: 100%;
    height: 38px;
    border: 1px solid #d1d5db !important;
    border-radius: 12px;
    background: #ffffff !important;
    color: #111827 !important;
    padding: 0 12px;
    font-weight: 600;
}

.je-num {
    text-align: center;
    min-width: 70px;
}

.je-center {
    text-align: center;
}

.je-actions-cell {
    white-space: nowrap;
}

.je-actions-cell .je-icon-btn {
    margin: 0 4px;
}

.je-check,
.je-table input[type="checkbox"] {
    transform: scale(1.05);
}

.je-input:disabled,
.je-input.je-disabled {
    background: #e5e7eb !important;
    color: #6b7280 !important;
    border-color: #d1d5db !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}


.je-modal-box-lg {
    /* NUEVO */
    width: 560px;
    max-width: 92%;
    max-height: 90vh;
    overflow-y: auto;
}

.je-excel-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 14px;
}

#jeExcelFileName {
    margin-top: 10px;
    text-align: center;
}

/* =========================================================
   MODAL PARA ORDENAR LOS EXTRAS DE CADA GRUPO
   ========================================================= */
.je-order-extras-btn {
    min-height: 36px;
    border: 1px solid #0f766e;
    border-radius: 10px;
    padding: 7px 10px;
    background: #ecfdf5;
    color: #0f766e;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.je-order-extras-btn:hover {
    background: #d1fae5;
}

.je-extras-order-modal {
    width: min(720px, 94vw);
    max-width: 94vw;
    max-height: 90vh;
    padding: 0;
    overflow: hidden;
    text-align: left;
}

.je-extras-order-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px 14px;
    border-bottom: 1px solid #e5e7eb;
}

.je-extras-order-head h3 {
    margin: 3px 0 4px;
    color: #111827;
    font-size: 22px;
    font-weight: 900;
}

.je-extras-order-head p {
    margin: 0;
    color: #6b7280;
    font-weight: 600;
}

.je-modal-close {
    width: 38px;
    height: 38px;
    border: 1px solid #d1d5db;
    border-radius: 11px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    font-size: 16px;
    font-weight: 900;
}

.je-extras-order-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    max-height: 52vh;
    padding: 16px 22px;
    overflow-y: auto;
    background: #f8fafc;
}

.je-extra-sort-item {
    display: grid;
    grid-template-columns: 42px 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 9px 11px;
    border: 1px solid #dbe3ea;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}

.je-extra-drag-handle {
    width: 38px;
    height: 38px;
    border: 1px solid #99f6e4;
    border-radius: 10px;
    background: #ccfbf1;
    color: #0f766e;
    cursor: grab;
    font-size: 21px;
    line-height: 1;
}

.je-extra-drag-handle:active {
    cursor: grabbing;
}

.je-extra-position {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

.je-extra-sort-main {
    min-width: 0;
}

.je-extra-sort-main strong,
.je-extra-sort-main span {
    display: block;
}

.je-extra-sort-main strong {
    overflow: hidden;
    color: #111827;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.je-extra-sort-main span {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.je-extra-sort-fallback {
    display: flex;
    gap: 5px;
}

.je-extra-sort-fallback button {
    width: 32px;
    height: 32px;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    font-size: 12px;
}

.je-extra-sort-ghost {
    border: 2px dashed #14b8a6;
    background: #ccfbf1;
    opacity: .55;
}

.je-extra-sort-chosen,
.je-extra-sort-drag {
    box-shadow: 0 16px 30px rgba(15, 118, 110, .22);
}

.je-extras-order-help {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-top: 1px solid #e5e7eb;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.je-drag-handle-demo {
    color: #0f766e;
    font-size: 18px;
}

.je-extras-order-actions {
    justify-content: flex-end;
    padding: 0 22px 20px;
}

.je-extras-order-empty,
.je-extras-order-loading {
    margin: 16px 22px;
    padding: 24px;
    border: 1px dashed #cbd5e1;
    border-radius: 13px;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
    font-weight: 700;
}

.je-btn:disabled {
    cursor: not-allowed;
    opacity: .55;
}

@media (max-width: 720px) {
    .je-extra-sort-item {
        grid-template-columns: 38px 30px minmax(0, 1fr);
    }

    .je-extra-sort-fallback {
        grid-column: 2 / -1;
        justify-content: flex-end;
    }
}


/* =========================================================
   JERARQUÍA EXTRA · PREVISUALIZACIÓN DE CARGA EXCEL
   2026-08-13 · v3
========================================================= */
.je-bulk-preview {
    position: relative;
    z-index: 2;
    width: min(1120px, 96vw);
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .30);
}
.je-bulk-preview-head,
.je-bulk-preview-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    background: #fff;
}
.je-bulk-preview-head { border-bottom: 1px solid #e5e7eb; align-items: flex-start; }
.je-bulk-preview-head h3 { margin: 2px 0 3px; color: #111827; font-size: 22px; font-weight: 950; }
.je-bulk-preview-head p { margin: 0; color: #64748b; font-size: 12px; }
.je-bulk-preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 18px;
    border-bottom: 1px solid #edf0f4;
    background: #f8fafc;
}
.je-bulk-preview-toolbar > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.je-bulk-preview-toolbar small { color: #64748b; }
.je-bulk-validation { padding: 4px 8px; border-radius: 999px; background: #ecfdf3; color: #027a48; font-size: 11px; font-weight: 850; }
.je-bulk-validation.is-invalid { background: #fff1f3; color: #c01048; }
.je-bulk-table-wrap { min-height: 0; overflow: auto; padding: 0 18px 12px; background: #fff; }
.je-bulk-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 820px; }
.je-bulk-table th { position: sticky; top: 0; z-index: 1; padding: 10px 9px; border-bottom: 1px solid #dfe4ea; background: #f8fafc; color: #475467; font-size: 11px; text-align: left; }
.je-bulk-table td { padding: 8px 7px; border-bottom: 1px solid #eef2f6; vertical-align: top; }
.je-bulk-table tr.is-invalid td { background: #fff7f7; }
.je-bulk-input { width: 100%; min-height: 38px; padding: 7px 9px; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; color: #101828; }
.je-bulk-input:focus { outline: none; border-color: #7f56d9; box-shadow: 0 0 0 3px rgba(127,86,217,.12); }
.je-bulk-number { width: 90px; }
.je-bulk-row-number { width: 130px; }
.je-bulk-row-number strong,
.je-bulk-row-number small { display: block; }
.je-bulk-row-number small { margin-top: 3px; color: #b42318; font-size: 10px; line-height: 1.3; }
.je-bulk-remove { width: 32px; height: 32px; border: 1px solid #fda29b; border-radius: 8px; background: #fff5f4; color: #b42318; font-size: 18px; cursor: pointer; }
.je-bulk-empty { padding: 28px !important; color: #667085; text-align: center; }
.je-bulk-preview-foot { border-top: 1px solid #e5e7eb; }
.je-bulk-pagination,
.je-bulk-preview-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.je-bulk-pagination strong { color: #344054; font-size: 12px; }
.je-bulk-preview button:disabled { opacity: .45; cursor: not-allowed; }
#jeExcelPreviewModal.je-modal-show { z-index: 1205; }
@media (max-width: 760px) {
    .je-bulk-preview { width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; }
    .je-bulk-preview-head,
    .je-bulk-preview-toolbar,
    .je-bulk-preview-foot { align-items: stretch; flex-direction: column; }
    .je-bulk-preview-actions { justify-content: space-between; }
}

/* 2026-08-22 · Jerarquía extra: acciones ordenadas en pantallas medianas/pequeñas */
.je-header { align-items: flex-start; }
.je-actions { justify-content: flex-end; }
.je-actions .je-btn { white-space: nowrap !important; }
.je-actions-cell { min-width: 250px; }
.je-row-actions {
    display: grid;
    grid-template-columns: minmax(128px, 1fr) 38px 38px;
    align-items: center;
    justify-content: end;
    gap: 6px;
    width: 100%;
}
.je-row-actions .je-order-extras-btn,
.je-row-actions .je-icon-btn {
    margin: 0 !important;
    min-width: 0;
    white-space: nowrap !important;
}
.je-row-actions .je-order-extras-btn { width: 100%; }
.je-table .vase-sort-btn.is-active {
    background: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
}

@media (max-width: 1180px) {
    .je-header { flex-direction: column; }
    .je-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .je-actions .je-btn { width: 100%; }
}

@media (max-width: 760px) {
    .je-wrap { padding-left: 12px; padding-right: 12px; }
    .je-actions { grid-template-columns: 1fr; }
    .je-table-wrap {
        width: 100%;
        max-width: 100%;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    .je-table { min-width: 900px !important; }
}

/* 2026-08-22 · Jerarquía extra v6: columnas legibles y acciones compactas */
.je-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden;
}
.je-table {
    display: table !important;
    width: 100% !important;
    min-width: 980px !important;
    table-layout: fixed !important;
}
.je-table col.je-col-select { width: 52px; }
.je-table col.je-col-code { width: 160px; }
.je-table col.je-col-name { width: auto; }
.je-table col.je-col-visible { width: 125px; }
.je-table col.je-col-min { width: 90px; }
.je-table col.je-col-max { width: 90px; }
.je-table col.je-col-multi { width: 90px; }
.je-table col.je-col-actions { width: 215px; }
.je-table thead th,
.je-table thead th .vase-sort-btn,
.je-table thead th .vase-sort-btn > span:first-child {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    text-wrap: nowrap !important;
}
.je-table .vase-sort-btn {
    min-width: 0 !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    gap: 5px !important;
}
.je-table .vase-sort-btn > span:first-child {
    overflow: visible !important;
    text-overflow: clip !important;
}
.je-table tbody td {
    min-width: 0 !important;
}
.je-table td.je-actions-cell {
    display: table-cell !important;
    min-width: 0 !important;
    white-space: nowrap !important;
}
.je-row-actions {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 6px;
    width: 100%;
}
.je-row-actions .je-order-extras-btn {
    flex: 0 1 116px;
    width: auto !important;
    min-width: 104px !important;
    min-height: 36px !important;
    padding: 7px 9px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 9px !important;
    background: #f8fafc !important;
    color: #334155 !important;
    box-shadow: none !important;
    font-size: 11px !important;
    line-height: 1.1;
    white-space: nowrap !important;
}
.je-row-actions .je-order-extras-btn:hover {
    border-color: #94a3b8 !important;
    background: #f1f5f9 !important;
}
.je-row-actions .je-icon-btn {
    flex: 0 0 36px;
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    border-radius: 9px !important;
    margin: 0 !important;
    line-height: 1 !important;
}
@media (max-width: 1180px) {
    .je-table { min-width: 940px !important; }
    .je-table col.je-col-code { width: 145px; }
    .je-table col.je-col-visible { width: 112px; }
    .je-table col.je-col-min,
    .je-table col.je-col-max,
    .je-table col.je-col-multi { width: 82px; }
    .je-table col.je-col-actions { width: 205px; }
}
@media (max-width: 767.98px) {
    .je-table {
        display: table !important;
        width: 940px !important;
        min-width: 940px !important;
        max-width: none !important;
    }
    .je-table thead { display: table-header-group !important; }
    .je-table tbody { display: table-row-group !important; }
    .je-table tr { display: table-row !important; }
    .je-table th,
    .je-table td { display: table-cell !important; }
    .je-table td.je-actions-cell { display: table-cell !important; }
}



/* 2026-09-09 · Encabezado fijo completamente opaco, igual al listado de Extras */
.je-table-wrap.vase-ux-sticky-shell {
    position: relative;
    overflow: auto !important;
    isolation: isolate;
    background: #fff;
}
.je-table-wrap.vase-ux-sticky-shell .je-table {
    position: relative;
    z-index: 1;
}
.je-table-wrap.vase-ux-sticky-shell .je-table thead {
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    background: #f8fafc !important;
    box-shadow:
        0 -34px 0 34px #f8fafc,
        inset 0 -1px 0 #dfe7f1,
        0 6px 14px rgba(15, 23, 42, .08) !important;
    transform: translateZ(0);
}
.je-table-wrap.vase-ux-sticky-shell .je-table thead tr {
    position: relative;
    z-index: 2;
    background: #f8fafc !important;
}
.je-table-wrap.vase-ux-sticky-shell .je-table thead th {
    position: relative !important;
    top: auto !important;
    z-index: 3 !important;
    background: #f8fafc !important;
    background-clip: border-box !important;
    box-shadow: none !important;
}
.je-table-wrap.vase-ux-sticky-shell .je-table tbody {
    position: relative;
    z-index: 0;
}
.je-table-wrap.vase-ux-sticky-shell .je-table tbody td {
    position: relative;
    z-index: 0;
}
