#page-cogs [hidden] { display:none!important; }
#cogsWorkbenchStatus { margin:0 0 16px; padding:10px 14px; border-left:3px solid var(--blue); background:var(--blue-dim); color:var(--text); overflow-wrap:anywhere; }
#cogsWorkbenchStatus.error,#costBulkStatus { color:var(--rose); }
.cost-actions,.cost-detail-top,.cost-period-title,.cost-editor-footer,.cost-bulk-head,.cost-bulk-tools,#cogsSelectionBar { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
#cogsSelectionBar { padding:12px 0; }
.cost-product,.cost-identity { display:flex; align-items:center; gap:12px; min-width:0; }
.cost-identity { border:0; padding:0; background:transparent; color:var(--text); text-align:left; cursor:pointer; font:inherit; }
.cost-product .product-thumb { flex:0 0 52px; width:52px; height:52px; }
.cost-product img,.cost-switch-item img { width:52px; height:52px; object-fit:contain; }
.cost-product .cogs-demo-product-image,.cost-switch-item .cogs-demo-product-image { width:52px; height:52px; flex:0 0 52px; display:grid; place-items:center; background:var(--panel); border:1px solid var(--border); border-radius:4px; overflow:hidden; }
.cost-product .cogs-demo-image-placeholder,.cost-switch-item .cogs-demo-image-placeholder { color:var(--blue); font-size:20px; font-weight:700; }
.cost-switch-item .cogs-demo-product-image { width:40px; height:40px; flex-basis:40px; }
.cost-identity>span,.cost-product>span { min-width:0; }
.cost-identity strong,.cost-product strong { display:block; font-size:14px; font-weight:600; overflow-wrap:anywhere; }
.cost-identity small,.cost-product small { display:block; margin-top:5px; color:var(--text-dim); font-size:12px; overflow-wrap:anywhere; }
.cost-link { background:transparent; border:0; color:var(--blue); font:inherit; cursor:pointer; text-decoration:underline; text-underline-offset:3px; }
#cogsCatalogTable.cogs-ledger-table > thead > tr > th:first-child,#cogsCatalogTable.cogs-ledger-table > tbody > tr > td:first-child:not([colspan]),.products-pinned-heading .cogs-ledger-table th:first-child { width:440px; }
#cogsCatalogTable.cogs-ledger-table { min-width:880px; }
.cost-detail-top { margin-bottom:18px; }
.cost-detail-top h2 { font-size:22px; margin:0; letter-spacing:0; }
.cost-detail-top .cost-actions { margin-left:auto; }
.cost-detail-grid { display:grid; grid-template-columns:280px minmax(0,1fr); gap:24px; align-items:start; }
.cost-switcher { position:sticky; top:88px; border:1px solid var(--border); border-radius:4px; background:var(--panel); min-width:0; }
.cost-switcher>input { margin:12px; width:calc(100% - 24px); }
#costProductList { overflow:auto; max-height:calc(100dvh - 210px); }
.cost-switch-item { width:100%; display:flex; align-items:center; gap:10px; text-align:left; border:0; border-bottom:1px solid var(--border-light); background:transparent; color:var(--text); padding:12px; cursor:pointer; font:inherit; }
.cost-switch-item.active { background:var(--blue-dim); box-shadow:inset 3px 0 var(--blue); }
.cost-switch-item>span { min-width:0; }
.cost-switch-item strong,.cost-switch-item small { display:block; overflow-wrap:anywhere; }
.cost-switch-item small { font-size:11px; color:var(--text-dim); margin-top:5px; }
.cost-switch-item .product-thumb { width:40px; height:40px; flex:0 0 40px; }
.cost-switch-item img { width:40px; height:40px; }
.cost-editor { min-width:0; }
.cost-product-head { display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; padding-bottom:18px; border-bottom:1px solid var(--border); }
.cost-product-head>div:last-child>strong { display:block; font-size:22px; margin-top:5px; }
.cost-name-label { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin:18px 0; }
.cost-name-label input { max-width:320px; }
.cost-period-title { margin:22px 0 14px; }
.cost-period-title h3 { margin:0; font-size:16px; letter-spacing:0; }
.cost-period-title button { margin-left:auto; }
.cost-method { color:var(--text-dim); font-size:12px; }
.cost-period-scroll,.cost-bulk-scroll { overflow-x:auto; }
.cost-periods { width:100%; border-collapse:collapse; min-width:580px; }
.cost-periods th,.cost-periods td { padding:10px 8px; text-align:left; border-bottom:1px solid var(--border); }
.cost-periods th { color:var(--text-dim); font-weight:500; font-size:12px; }
#cogsDetailView input,#cogsBulkDialog input { height:36px; padding:7px 9px; border:1px solid var(--border); background:var(--panel); color:var(--text); border-radius:4px; font:inherit; min-width:0; }
.cost-periods input { width:100%; min-width:120px!important; }
.cost-editor-footer { position:sticky; bottom:0; padding:14px 0; border-top:1px solid var(--border); background:var(--panel); z-index:10; margin-top:16px; }
.cost-editor-footer>span { margin-right:auto; font-size:12px; color:var(--text-dim); }
#cogsBulkDialog { width:min(1040px,calc(100vw - 32px)); max-height:90dvh; border:1px solid var(--border); border-radius:6px; background:var(--panel); color:var(--text); padding:20px; }
#cogsBulkDialog { margin:auto; }
#cogsBulkDialog::backdrop { background:#0b172866; }
.cost-bulk-head h2 { margin:0; font-size:20px; letter-spacing:0; }
.cost-bulk-head button { margin-left:auto; }
.cost-bulk-tools { margin:18px 0; align-items:end; }
.cost-bulk-tools label { display:grid; gap:6px; min-width:0; }
.cost-bulk-scroll { max-height:50dvh; }
#costBulkStatus { margin-top:12px; }
#page-cogs button:disabled { cursor:wait; opacity:.6; }
@media(max-width:900px) {
  .cost-detail-grid { grid-template-columns:minmax(0,1fr); }
  .cost-switcher { position:static; }
  #costProductList { max-height:180px; }
  #cogsCatalogTable.cogs-ledger-table > thead > tr > th:first-child,#cogsCatalogTable.cogs-ledger-table > tbody > tr > td:first-child:not([colspan]) { width:260px; }
  .cost-detail-top .cost-actions { margin-left:0; }
  .cost-bulk-tools label { flex:1 1 130px; }
  .cost-bulk-tools input { width:100%; }
}
