/* Normal page flow, with the reference's detached heading and bottom rail. */
#page-products .content-container { max-width:none; }
.products-ledger { min-width:0; }
#skuTableWorkspace { position:relative; height:auto; max-height:none; border:0; border-radius:0; box-shadow:none; background:transparent; overflow:visible; }
#skuTableWorkspace > .card-header { padding:0 0 14px; border-bottom:1px solid var(--border); }
#skuTableWorkspace > .card-body:last-child { display:block; padding:14px 0 0!important; overflow:visible; }
#productsTableStage { position:relative; overflow-x:auto; overflow-y:hidden; width:100%; max-height:none; border:0; border-radius:0; scrollbar-width:auto; scrollbar-color:auto; }
.products-ledger-table { border-collapse:separate; border-spacing:0; width:max-content; min-width:100%; table-layout:fixed; }
.products-ledger-table th,.products-ledger-table td { text-align:right; white-space:nowrap; min-width:116px; padding:14px; border-right:0; }
.products-ledger-table thead { position:static; box-shadow:none; }
.products-ledger-table th { height:78px; background:var(--panel); color:var(--text); font-size:13px; font-weight:500; cursor:pointer; }
.products-ledger-table td { height:92px; font-size:14px; background:var(--panel); border-bottom:1px solid var(--border-light); }
.products-ledger-table th:first-child,.products-ledger-table td:first-child { position:sticky; left:0; z-index:2; width:420px; min-width:420px; max-width:420px; text-align:left; background:var(--panel); }
.products-ledger-table th:first-child { z-index:3; }
.products-ledger-table tbody tr:hover td { background:var(--surface-hover); }
.products-ledger-table .products-sum-row td { height:48px; font-weight:600; background:var(--panel-2); }
.products-ledger-table th[aria-sort="ascending"]::after { content:' \2191'; color:var(--blue); }
.products-ledger-table th[aria-sort="descending"]::after { content:' \2193'; color:var(--blue); }
.products-ledger-identity { display:flex; align-items:center; gap:14px; min-width:0; }
.products-ledger-photo { width:58px; height:58px; flex:0 0 58px; display:grid; place-items:center; }
.products-ledger-photo img { width:58px!important; height:58px!important; object-fit:contain; }
.products-ledger-copy { min-width:0; line-height:1.4; }
.products-ledger-copy strong,.products-ledger-copy span,.products-ledger-copy small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.products-ledger-copy strong { font-size:14px; font-weight:500; }
.products-ledger-copy span,.products-ledger-copy small { font-size:12px; color:var(--text-dim); }
.products-pinned-heading { position:fixed; z-index:24; overflow:clip; background:var(--panel); border-bottom:1px solid var(--border); box-shadow:0 2px 5px #0000000a; }
.products-pinned-track { position:absolute; inset:0 auto auto 0; }
.products-pinned-cover { position:absolute; inset:0 auto 0 0; z-index:4; overflow:hidden; background:var(--panel); }
.products-pinned-heading .products-ledger-table { min-width:0; }
.products-pinned-heading th { position:static!important; }
.products-bottom-scroll { position:fixed; bottom:0; height:17px; overflow-x:auto; overflow-y:hidden; z-index:24; border-top:1px solid var(--border); background:var(--panel-2); scrollbar-width:auto; scrollbar-color:auto; }
.products-bottom-scroll > div { height:1px; }
.products-pinned-heading[hidden],.products-bottom-scroll[hidden] { display:none; }
#productsTableStage::-webkit-scrollbar,.products-bottom-scroll::-webkit-scrollbar { height:15px; }
#productsTableStage::-webkit-scrollbar-track,.products-bottom-scroll::-webkit-scrollbar-track { background:var(--panel-2); }
#productsTableStage::-webkit-scrollbar-thumb,.products-bottom-scroll::-webkit-scrollbar-thumb { background:#9299a3; border:3px solid var(--panel-2); border-radius:8px; }
@media(max-width:720px) {
  .products-ledger-table th:first-child,.products-ledger-table td:first-child { width:210px; min-width:210px; max-width:210px; }
  .products-ledger-photo,.products-ledger-photo img { width:40px!important; height:40px!important; flex-basis:40px; }
  .products-ledger-identity { gap:8px; }
  .products-ledger-table th,.products-ledger-table td { padding:12px 10px; }
}

/* COGS shares the detached heading/rail, not the old fixed-height report box. */
#page-cogs .content-container { max-width:none; }
.cogs-ledger { min-width:0; }
#cogsCatalogTableWorkspace { position:relative; height:auto; max-height:none; border:0; border-radius:0; box-shadow:none; background:transparent; overflow:visible; }
#cogsCatalogTableWorkspace > .card-header { padding:0 0 14px; border-bottom:1px solid var(--border); flex-wrap:wrap; gap:12px; }
#cogsCatalogTableWorkspace > .card-header > div { min-width:0; }
#cogsCatalogTableWorkspace > .card-body { display:block; padding:14px 0 0!important; overflow:visible; }
#cogsTableStage { position:relative; width:100%; max-height:none; overflow-x:auto; overflow-y:hidden; border:0; border-radius:0; scrollbar-width:auto; scrollbar-color:auto; }
.cogs-ledger-table { width:100%; min-width:1080px; border-collapse:separate; border-spacing:0; table-layout:fixed; }
.cogs-ledger-table > thead { position:static; box-shadow:none; }
.cogs-ledger-table > thead > tr > th { height:78px; background:var(--panel); color:var(--text); font-size:13px; font-weight:500; }
.cogs-ledger-table > thead > tr > th,.cogs-ledger-table > tbody > tr > td:not([colspan]) { padding:14px; width:150px; text-align:left; white-space:normal; overflow-wrap:anywhere; }
.cogs-ledger-table > tbody > tr > td:not([colspan]) { height:92px; background:var(--panel); border-bottom:1px solid var(--border-light); font-size:14px; }
.cogs-ledger-table > thead > tr > th:first-child,.cogs-ledger-table > tbody > tr > td:first-child:not([colspan]) { position:sticky; left:0; z-index:2; width:220px; background:var(--panel); }
.cogs-ledger-table > thead > tr > th:nth-child(2) { width:260px; }
.cogs-ledger-table > thead > tr > th:last-child { width:90px; }
.cogs-ledger-table > tbody > tr:hover > td:not([colspan]) { background:var(--surface-hover); }
.cogs-ledger-table > tbody > tr > td[colspan] { position:static; white-space:normal; height:auto; }
#cogsCatalogTable .cogs-demo-shell { max-width:100%; white-space:normal; }
.products-pinned-heading .cogs-ledger-table { min-width:0; }
#cogsTableStage::-webkit-scrollbar { height:15px; }
#cogsTableStage::-webkit-scrollbar-track { background:var(--panel-2); }
#cogsTableStage::-webkit-scrollbar-thumb { background:#9299a3; border:3px solid var(--panel-2); border-radius:8px; }
@media(max-width:720px) {
  .cogs-ledger-table { min-width:940px; }
  .cogs-ledger-table > thead > tr > th:first-child,.cogs-ledger-table > tbody > tr > td:first-child:not([colspan]) { width:160px; }
  .cogs-ledger-table > thead > tr > th:nth-child(2) { width:200px; }
  #cogsCatalogTableWorkspace > .card-header .search-input { width:100%!important; }
}
