.eb-bar{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:12px 14px;border:1px solid var(--erp-line,#d9e4ec);border-radius:6px 6px 0 0;background:var(--erp-primary-soft,#e5f5f1);color:var(--erp-ink,#1b293c);margin-top:12px}.eb-all{display:flex;align-items:center;gap:7px;white-space:nowrap;font-size:13px}.eb-bar strong{font-size:14px;white-space:nowrap}.eb-actions{display:flex;gap:8px;flex-wrap:wrap;margin-left:auto}.eb-bar button,.eb-dialog button{font:inherit;min-height:36px;padding:6px 12px;border:1px solid #cbdce4;border-radius:5px;background:#fff;color:#24384a;cursor:pointer}.eb-bar button:disabled{opacity:.5;cursor:not-allowed}.eb-bar .eb-link{border-color:transparent;background:transparent;color:#006d62}.eb-bar .eb-danger,.eb-dialog .eb-danger{color:#a53040;border-color:#dfb7bf}.eb-note{font-size:12px;color:#526577;margin:0;padding:8px 14px;border:1px solid #d9e4ec;border-top:0;background:#fff}.eb-hit{display:inline-flex;align-items:center;justify-content:center;min-width:36px;min-height:40px;cursor:pointer}.eb-bar input[type=checkbox],.eb-hit input{width:18px;height:18px;accent-color:#008779}.view table[data-eb-table] .eb-check{position:sticky!important;left:0!important;z-index:3!important;width:48px!important;min-width:48px!important;max-width:48px!important;padding:2px 4px!important;text-align:center!important;background:#f0f6f9!important;border-right:1px solid #d9e4ec!important;overflow:visible!important}.view table[data-eb-table] td.eb-check{background:#fff!important;z-index:2!important}.view table[data-eb-table] tr.eb-selected>td{background:#e5f5f1!important}.view table[data-eb-table] tr.eb-selected>td.eb-check{background:#d4eee5!important}.eb-card-row{position:relative}.eb-card-check{position:absolute;left:0;top:6px;z-index:2;background:#fff;font-size:11px;gap:3px;padding:2px}.eb-card-row:has(.eb-card-check){padding-left:62px!important}.eb-card-row.eb-selected{background:#e5f5f1!important}.eb-bar button:focus-visible,.eb-hit input:focus-visible,.eb-dialog button:focus-visible{outline:3px solid #087fba;outline-offset:2px}.eb-dialog{inset:0;margin:auto;width:min(920px,calc(100vw - 24px));max-height:88dvh;border:1px solid #ccdce5;border-radius:8px;padding:22px;color:#1b293c;background:#fff;box-shadow:0 16px 48px #19334633}.eb-dialog::backdrop{background:#172d3d88}.eb-dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:15px}.eb-dialog-heading h2{font-size:21px;margin:0}.eb-dialog-heading button{font-size:24px;border:0}.eb-dialog-message{line-height:1.7;color:#526577;margin:12px 0}.eb-dialog-content{overflow:auto;max-height:55dvh}.eb-dialog-content table{border-collapse:collapse;width:100%;min-width:520px;font-size:13px}.eb-dialog-content td,.eb-dialog-content th{padding:11px;border-bottom:1px solid #d9e4ec;text-align:left}.eb-dialog-footer{display:flex;justify-content:flex-end;gap:9px;margin-top:18px}.eb-work-queue article{padding:14px 0;border-bottom:1px solid #d9e4ec}.eb-work-queue article>div{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.eb-work-queue article strong{font-size:14px}.eb-work-queue span{color:#526577;font-size:12px}@media(max-width:640px){.eb-bar{padding:10px;gap:8px}.eb-actions{margin-left:0;flex-basis:100%}.eb-bar button{font-size:12px;padding:6px 9px}.eb-dialog{padding:15px}.eb-dialog-heading h2{font-size:18px}.eb-note{padding:8px 10px}.eb-bar .eb-link{white-space:normal;text-align:left}}

/* Separate selection rail preserves legacy nth-child column/permission rules. */
.eb-layout{display:flex;align-items:flex-start;position:relative;min-width:0;width:100%}.eb-layout>table{flex:1 0 auto}.eb-rail{position:sticky;left:0;z-index:8;flex:0 0 48px;width:48px;background:#fff;border-right:1px solid #d9e4ec;align-self:flex-start}.eb-rail-head,.eb-rail-cell{display:flex!important;width:48px;min-width:48px;min-height:0;padding:0;margin:0;box-sizing:border-box;border-bottom:1px solid #d9e4ec;background:#fff}.eb-rail-head{position:sticky;top:0;z-index:9;background:#f0f6f9}.eb-rail input{width:18px;height:18px;accent-color:#008779}.eb-rail:has(input:checked){background:#f5fbf9}.eb-layout tr.eb-selected>td{background:#e5f5f1!important}

.eb-workspace{display:grid;grid-template-rows:auto auto minmax(0,1fr);min-width:0;min-height:0;height:100%;width:100%}.eb-workspace>.eb-bar{margin-top:0}.eb-workspace>.table-wrap{min-height:0;min-width:0}

/* The plan01 customer grid owns !important padding. Reserve the selection
   gutter in that same layer so the absolutely positioned checkbox never
   covers the first customer cell. Header and records keep identical widths. */
@layer plan01 {
  body.erp-plan01 #customerCards {
    --eb-customer-selection-width: 64px;
  }

  body.erp-plan01 #customerCards:has(> .customer-profile-card > .eb-card-check) > .plan01-customer-columns,
  body.erp-plan01 #customerCards > .customer-profile-card.eb-card-row:has(> .eb-card-check) {
    box-sizing: border-box;
    min-width: calc(1030px + var(--eb-customer-selection-width)) !important;
    padding-left: var(--eb-customer-selection-width) !important;
  }

  body.erp-plan01 #customerCards > .customer-profile-card > .eb-card-check {
    box-sizing: border-box;
    width: var(--eb-customer-selection-width);
    min-width: var(--eb-customer-selection-width);
    margin: 0;
    white-space: nowrap;
  }

  body.erp-plan01 #customerCards .plan01-customer-identity {
    min-width: 0;
  }

  body.erp-plan01 #customerCards .plan01-customer-identity :is(button, small) {
    max-width: 100%;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
  }
}

/* A hidden header must not retain its flex box. Only rendered page rows get slots. */
.eb-rail-head[hidden], .eb-rail-cell[hidden] { display: none !important; }
#productsArchiveSection > .eb-workspace { height: auto; grid-template-rows: auto auto auto; }
#productsArchiveSection .eb-bar { margin-top: 0; }
#productCards > .eb-card-row > .eb-card-check { top: 12px; left: 12px; gap: 0; }
#productCards > .eb-card-row > .eb-card-check input { margin: 0; }
@layer plan01 {
  body.erp-plan01 #productsView #productCards > .module-card.eb-card-row {
    padding-inline-start: 58px !important;
  }
  body.erp-plan01 #productsView #productCards > .module-card.eb-selected {
    background: #e5f5f1 !important;
  }
}
@layer plan01 {
  body.erp-plan01 #inventoryView [data-plan01-inventory] .eb-rail input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 0 0 18px;
  }
  body.erp-plan01 #inventoryView [data-plan01-inventory] .eb-rail-head,
  body.erp-plan01 #inventoryView [data-plan01-inventory] .eb-rail-cell {
    align-items: center;
    justify-content: center;
  }
  body.erp-plan01 #inventoryView [data-plan01-inventory] .eb-workspace {
    height: auto !important;
    grid-template-rows: auto auto auto !important;
  }
}
