/* Navegación común Tienda + ERP. No modifica los estilos de los módulos. */
.vm-sidebar.cx-sidebar { z-index: 1045 !important; }
.cx-sidebar .cx-sidebar-header { min-height: 90px; padding: 16px; flex-shrink: 0; }
.cx-sidebar .cx-menu-tools { padding: 0 16px 14px; flex-shrink: 0; border-bottom: 1px solid #ffffff12; }
.cx-menu-level { display: inline-flex; margin-bottom: 10px; padding: 4px 9px; border-radius: 6px; background: #1d355a; color: #c5dcff; font-size: .68rem; font-weight: 700; letter-spacing: .04em; }
.cx-menu-search { display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #ffffff24; background: #ffffff08; border-radius: 9px; color: #a8bad3; }
.cx-menu-search input { width: 100%; min-width: 0; min-height: 40px; background: transparent; border: 0; outline: 0; color: #fff; font-size: .83rem; }
.cx-menu-search:focus-within { border-color: #72a5fb; box-shadow: 0 0 0 2px #3b82f633; }
.cx-menu-search input::placeholder { color: #a7b5c8; }
.cx-menu-shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.cx-menu-shortcuts button { padding: 7px 8px; border-radius: 7px; border: 1px solid #ffffff24; color: #d3e0f3; background: #ffffff08; font-weight: 650; font-size: .78rem; }
.cx-menu-shortcuts button:hover { background: #ffffff18; }
.cx-sidebar .cx-sidebar-scroll { min-height: 0; flex: 1 1 auto; padding: 12px 10px 24px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.cx-menu-section + .cx-menu-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid #ffffff20; }
.cx-menu-section-heading { display: flex; flex-direction: column; gap: 3px; padding: 0 10px 10px; }
.cx-menu-section-heading > span { color: #cbd9ef; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.cx-menu-section-heading small { color: #8c9db5; font-size: .69rem; }
#cx-nav-erp .cx-menu-section-heading > span { color: #75ddc9; }
.cx-menu-home, .cx-menu-group > summary, .cx-menu-link { border-radius: 8px; color: #cbd5e3; text-decoration: none; font-size: .84rem; line-height: 1.4; }
.cx-menu-home { display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 6px; font-weight: 700; }
.cx-menu-home > span { width: 20px; text-align: center; color: #95b7ee; }
.cx-menu-group { margin: 3px 0; }
.cx-menu-group > summary { display: flex; gap: 10px; align-items: center; padding: 11px 10px; cursor: pointer; list-style: none; font-weight: 650; }
.cx-menu-group > summary::-webkit-details-marker { display: none; }
.cx-menu-icon { width: 20px; flex-shrink: 0; text-align: center; color: #829cbe; font-size: 1rem; }
.cx-menu-chevron { margin-left: auto; color: #8191a8; transition: transform .15s; }
.cx-menu-group[open] > summary { color: #f0f5ff; background: #ffffff0a; }
.cx-menu-group[open] > summary .cx-menu-chevron { transform: rotate(90deg); }
.cx-menu-items { display: grid; gap: 2px; margin: 3px 0 8px 19px; padding-left: 10px; border-left: 1px solid #ffffff20; }
.cx-menu-link { display: block; padding: 9px 10px; overflow-wrap: anywhere; font-size: .79rem; }
.cx-menu-home:hover, .cx-menu-group > summary:hover, .cx-menu-link:hover { color: #fff; background: #ffffff0d; }
.cx-menu-home.active, .cx-menu-link.active { color: #fff; background: #234a85; box-shadow: inset 3px 0 #78b3ff; }
.cx-unified-nav [hidden] { display: none !important; }
.cx-menu-empty { padding: 14px 10px; color: #a9b8cc; font-size: .82rem; }
.cx-sidebar .cx-sidebar-footer { padding: 12px 16px; flex-shrink: 0; }
.cx-unified-nav :is(a, summary):focus-visible, .cx-menu-shortcuts button:focus-visible { outline: 2px solid #8abdff; outline-offset: -2px; }
.erp-workspaces { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.erp-workspace { min-width: 0; padding: 22px; border: 1px solid #dfe7f1; border-radius: 16px; background: #fff; }
.erp-workspace h3 { display: flex; gap: 10px; align-items: center; margin: 0 0 8px; font-size: 1.05rem; color: #162c49; }
.erp-workspace h3 > span { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: #edf4ff; color: #2453a6; }
.erp-workspace p { color: #66758b; font-size: .86rem; line-height: 1.55; }
.erp-workspace-links { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.erp-workspace-links a { padding: 8px 10px; border: 1px solid #dde6f4; border-radius: 8px; color: #274d83; background: #f7faff; font-size: .8rem; text-decoration: none; }
.erp-workspace-links a:hover { background: #eaf2ff; border-color: #7da6e7; }
.erp-shared-context { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 16px 20px; background: #eef7f4; border: 1px solid #d4e9e1; border-radius: 12px; color: #28564b; }
.erp-shared-context p { margin: 0; flex: 1 1 260px; font-size: .88rem; }
@media screen and (max-width: 991.98px) {
    .vm-sidebar.cx-sidebar { width: min(86vw, 300px) !important; min-width: 0 !important; max-width: calc(100vw - 44px) !important; transform: translateX(-105%); visibility: hidden; pointer-events: none; height: 100dvh !important; min-height: 0 !important; max-height: 100dvh !important; transition: transform .2s ease, visibility .2s; }
    .vm-sidebar.cx-sidebar.is-open { transform: translateX(0); visibility: visible; pointer-events: auto; }
    .vm-main.cx-main { width: 100% !important; margin-left: 0 !important; }
    .cx-sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 1040 !important; background: rgb(15 23 42 / 50%); opacity: 0; visibility: hidden; pointer-events: none; }
    .cx-sidebar-backdrop.is-visible { opacity: 1; visibility: visible; pointer-events: auto; }
    .cx-sidebar-close, .cx-menu-button { display: inline-grid; }
    body.cx-sidebar-open { overflow: hidden; }
    .cx-menu-search input { font-size: 16px; }
    .cx-menu-link, .cx-menu-group > summary, .cx-menu-home, .cx-menu-shortcuts button, .erp-workspace-links a { min-height: 44px; }
    .cx-sidebar-scroll { touch-action: pan-y; }
}
@media (prefers-reduced-motion: reduce) {
    .vm-sidebar.cx-sidebar, .cx-sidebar-backdrop, .cx-menu-chevron { transition: none !important; }
}
