/* Navegación compartida y catálogo: solo presentación, sin cambiar consultas. */
body:has(.app-view:not(.hidden)){background:#f3f6fa}
body:has(.app-view:not(.hidden)) .shell{width:100%;max-width:none}
.app-view:not(.hidden){--side-width:224px;display:grid;grid-template-columns:var(--side-width) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);column-gap:0;align-items:start;padding:0!important;min-height:100dvh}
.app-view.nav-collapsed{--side-width:66px}
.sidebar-symbols{position:absolute;width:0;height:0;overflow:hidden}
.mobile-sidebar{grid-column:1;grid-row:1 / span 30;position:sticky;top:0;display:flex;flex-direction:column;min-width:0;height:100dvh;padding:18px 10px 14px;background:#fff;border-right:1px solid #e1e8f1;z-index:5}
.mobile-sidebar-brand{display:flex;align-items:center;gap:10px;padding:4px 8px 22px;min-height:62px;color:#0e1c41}
.mobile-brand-mark{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:9px;color:#fff;background:linear-gradient(150deg,#59aeff,#145ae3);font-weight:900;font-size:22px}
.mobile-sidebar-brand strong,.sidebar-user strong{display:block;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mobile-sidebar-brand small,.sidebar-user small{display:block;color:#687995;font-size:11px;white-space:nowrap}
#sidebarToggle{margin-left:auto;min-width:28px;min-height:28px;padding:0;border:0;background:transparent;color:#284a80;font-size:22px;line-height:1}
.sidebar-nav{display:grid;gap:4px}
.nav-group{display:grid;gap:3px;min-width:0}
.mobile-sidebar .nav-group-toggle{position:relative;display:flex;align-items:center;justify-content:flex-start;gap:13px;width:100%;height:40px;min-height:40px;padding:0 12px;border:0;border-radius:7px;background:transparent;color:#263d66;font-size:13px;font-weight:500;text-align:left;white-space:nowrap;cursor:pointer}
.mobile-sidebar .nav-group-toggle:hover{background:#f1f6fd}
.mobile-sidebar .nav-group-toggle.current{color:#075bea;font-weight:700}
.mobile-sidebar .nav-group-chevron{margin-left:auto;font-size:18px;line-height:1;transition:transform .15s ease}
.mobile-sidebar .nav-group-toggle[aria-expanded="true"] .nav-group-chevron{transform:rotate(180deg)}
.nav-submenu{display:grid;gap:3px;margin:0 0 3px 17px;padding-left:10px;border-left:1px solid #dce7f5}
.nav-submenu[hidden]{display:none}
.mobile-sidebar .nav-subitem{height:36px;min-height:36px}
.mobile-sidebar .nav-subitem svg{width:16px;height:16px;flex-basis:16px}
.mobile-sidebar .nav-subitem.active::before{left:-11px}
.mobile-sidebar .nav-item,.mobile-sidebar .sidebar-utility{position:relative;display:flex;align-items:center;justify-content:flex-start;gap:13px;width:100%;height:40px;min-height:40px;padding:0 12px;border:0;border-radius:7px;background:transparent;color:#263d66;font-size:13px;font-weight:500;text-align:left;white-space:nowrap}
.mobile-sidebar .nav-item:hover,.mobile-sidebar .sidebar-utility:hover:not(:disabled){background:#f1f6fd}
.mobile-sidebar .nav-item.active{background:#eaf3ff;color:#075bea;font-weight:700}
.mobile-sidebar .nav-item.active::before{content:"";position:absolute;left:-10px;top:4px;bottom:4px;width:3px;border-radius:4px;background:#0d67f6}
.mobile-sidebar svg{width:19px;height:19px;flex:0 0 19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.sidebar-footer{margin-top:auto;padding-top:10px;border-top:1px solid #e8edf4;display:grid;gap:7px}
.sidebar-footer .sidebar-utility:disabled{opacity:.55;cursor:not-allowed}
.sidebar-user{display:flex;gap:10px;align-items:center;min-height:52px;padding:4px 12px;min-width:0}
.sidebar-avatar{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:50%;background:#dce9fb;color:#315585;font-size:12px;font-weight:800}
.app-view.nav-collapsed .mobile-sidebar-text{display:none}
.app-view.nav-collapsed .mobile-sidebar{padding-inline:8px}
.app-view.nav-collapsed .mobile-sidebar-brand{padding-inline:5px;flex-wrap:wrap;justify-content:center;gap:2px}
.app-view.nav-collapsed #sidebarToggle{margin:0;transform:rotate(180deg)}
.app-view.nav-collapsed .mobile-sidebar .nav-item,.app-view.nav-collapsed .sidebar-utility,.app-view.nav-collapsed .sidebar-user{justify-content:center;padding-inline:0}
.app-view.nav-collapsed .mobile-sidebar .nav-item.active::before{left:-8px}
.app-view.nav-collapsed .mobile-sidebar .nav-group-toggle{justify-content:center;padding-inline:0}
.app-view.nav-collapsed .nav-submenu{display:none}
.app-view .topbar{grid-column:2;grid-row:1;min-width:0;min-height:62px;margin:0 0 16px;padding:9px 24px;border:0;border-bottom:1px solid #e3eaf2;border-radius:0;background:#fff;box-shadow:none;gap:12px;flex-wrap:wrap}
.app-view .topbar-title h2{font-size:18px;line-height:1.2}
.app-view .topbar-date{margin:0;font-size:11px;font-weight:600}
.app-view .session-context-badge{max-width:min(44vw,380px);padding:4px 10px;border:0;background:transparent;gap:0}
.app-view .session-context-badge strong{font-size:13px}
.app-view .session-context-badge>span:last-child{font-size:11px}
.app-view .pos-header-user{font-size:11px;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.app-view>.section{grid-column:2;grid-row:2;min-width:0;margin:0 24px 24px}
.app-view>.section:not(.active){display:none!important}
.app-view .commerce-section{padding:0!important}
#productsSection{gap:14px}
#productsSection .commerce-heading{min-width:0;align-items:center;flex-wrap:wrap;gap:12px}
#productsSection .commerce-heading h2{font-size:30px;line-height:1.15;color:#0b1b44}
#productsSection .commerce-heading p{font-size:14px;margin:4px 0 0}
#commerceNewProduct,#productsSection .commerce-search .primary-button{background:#0962e9;color:white;border-color:#0962e9;box-shadow:0 3px 8px #0e65e52a;font-weight:700;white-space:nowrap}
#commerceNewProduct{margin-left:auto}
#productsSection .commerce-toolbar{margin:0;padding:16px;background:#fff;border:1px solid #e1e8f2;border-radius:10px;box-shadow:0 3px 12px #17345a08}
#productsSection .commerce-search{display:grid;grid-template-columns:minmax(240px,2fr) minmax(190px,1.2fr) minmax(110px,.55fr) auto;gap:10px;width:100%;align-items:end;flex:1;min-width:0}
#productsSection .commerce-search label:first-child{min-width:0}
#productsSection .commerce-search label{min-width:0;font-size:11px;font-weight:700;color:#18345e;gap:5px}
#productsSection .commerce-search input,#productsSection .commerce-search select{min-height:39px;height:39px;padding:7px 10px;border-radius:6px;font-size:12px}
#productsSection .commerce-search button{height:39px;min-height:39px;padding:0 18px}
#productsSection .commerce-table{min-width:0;overflow-x:auto;border:1px solid #e1e8f2;border-radius:9px;background:#fff}
#productsSection .commerce-table table{min-width:710px;table-layout:auto;font-size:12px}
#productsSection .commerce-table th{background:#f3f7fc;color:#4c6284;font-size:11px;font-weight:800;text-transform:uppercase}
#productsSection .commerce-table th,#productsSection .commerce-table td{padding:11px 14px;border-bottom:1px solid #eaf0f6;vertical-align:middle}
#productsSection .commerce-table th:nth-child(2),#productsSection .commerce-table td:nth-child(2){width:40%;min-width:220px;white-space:normal;overflow-wrap:anywhere}
#productsSection .commerce-table th:nth-child(4),#productsSection .commerce-table th:nth-child(5){text-align:right}
#productsSection .commerce-table tbody tr:nth-child(even){background:#f8fbff}
#productsSection .commerce-table tbody tr:hover{background:#edf5ff}
#productsSection .commerce-table td:nth-child(6) .product-state{display:inline-block;padding:5px 9px;border-radius:999px;background:#dff7e8;color:#177b48;font-size:11px;font-weight:700;white-space:nowrap}
#productsSection .commerce-table td:nth-child(6) .product-state.inactive{background:#f1f3f7;color:#64748b}
#productsSection .commerce-edit-button{min-height:33px!important;padding:5px 11px!important;border-radius:6px!important}
#productsSection .commerce-pager{margin:0;padding:10px 14px;background:#fff;border:1px solid #e1e8f2;border-radius:8px;flex-wrap:wrap;gap:10px;font-size:12px}
#productsSection .commerce-pager button{min-height:34px;padding:5px 10px;font-size:12px}
@media(max-width:1050px){.app-view .topbar{padding-inline:14px}.app-view>.section{margin-inline:14px}.app-view .session-context-badge{max-width:240px}#productsSection .commerce-search{grid-template-columns:minmax(180px,2fr) minmax(160px,1fr) minmax(100px,.55fr) auto}}
@media(max-width:1250px){#productsSection .commerce-search{grid-template-columns:minmax(0,1.5fr) minmax(120px,.6fr) auto}#productsSection .commerce-search label:first-child{grid-column:1/-1}#productsSection .commerce-search select{overflow:hidden;text-overflow:ellipsis}}
@media(max-width:760px){.app-view .topbar{align-items:flex-start}.app-view .topbar-title{width:100%}.app-view .session-context-badge{margin-left:0;max-width:100%}.app-view>.section{margin-inline:10px}#productsSection .commerce-search{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}#productsSection .commerce-search label:first-child{grid-column:1/-1}#productsSection .commerce-search button{align-self:end}#productsSection .commerce-heading h2{font-size:25px}}
@media(max-width:470px){#productsSection .commerce-search{grid-template-columns:1fr}#productsSection .commerce-search label:first-child{grid-column:auto}#productsSection .commerce-search button{width:100%}}
@media print{.mobile-sidebar{display:none!important}.app-view:not(.hidden){display:block!important}.app-view>.section{margin:0!important}}
@media print {
  .mobile-skip-link, .mobile-nav-toggle, .mobile-nav-close, .sidebar-scrim { display: none !important; }
}
