/* Scheme01 029 + targeted 036. Original boards, forms and visibility guards remain unchanged. */
@layer plan01 {
  body.erp-plan01 #inventoryView .p01-if {
    min-width: 0; padding: 20px 0; color: var(--plan01-ink); background: var(--plan01-surface);
    font: 400 13px/1.6 var(--erp-font); font-variant-numeric: tabular-nums;
  }
  body.erp-plan01 .p01-if [hidden] { display: none !important; }
  body.erp-plan01 .p01-if .p01-if-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 20px; }
  body.erp-plan01 .p01-if .p01-if-head h2 { margin: 0 0 5px; font-size: 29px; line-height: 1.3; font-weight: 740; }
  body.erp-plan01 .p01-if p { margin: 0; }
  body.erp-plan01 .p01-if .p01-if-head p,
  body.erp-plan01 .p01-if .p01-if-note { color: var(--plan01-muted); }
  body.erp-plan01 .p01-if button,
  body.erp-plan01 .p01-if input,
  body.erp-plan01 .p01-if select {
    min-height: 40px; margin: 0; padding: 8px 12px; border: 1px solid var(--plan01-control-line);
    border-radius: var(--plan01-radius); color: var(--plan01-ink); background: var(--plan01-surface); font: inherit;
  }
  body.erp-plan01 .p01-if button { cursor: pointer; white-space: nowrap; }
  body.erp-plan01 .p01-if button:hover:not(:disabled) { background: #edf8f5; border-color: var(--plan01-accent); }
  body.erp-plan01 .p01-if button:active:not(:disabled) { background: #d0f6eb; }
  body.erp-plan01 .p01-if button:disabled { color: #66768c; cursor: not-allowed; background: #f4f8fa; }
  body.erp-plan01 .p01-if .p01-if-primary { color: #fff; background: var(--plan01-accent); border-color: var(--plan01-accent); }
  body.erp-plan01 .p01-if .p01-if-primary:hover:not(:disabled) { color: #fff; background: #007568; }
  body.erp-plan01 .p01-if :is(button,input,select,[tabindex]):focus-visible { outline: 2px solid var(--plan01-accent); outline-offset: 3px; }
  body.erp-plan01 .p01-if ::selection { color: var(--plan01-ink); background: #d0f6eb; }
  body.erp-plan01 .p01-if input { caret-color: var(--plan01-accent); }
  body.erp-plan01 .p01-if .p01-if-scope { padding: 12px 16px; border: 1px solid var(--plan01-line); border-radius: var(--plan01-radius); background: var(--plan01-subtle); }
  body.erp-plan01 .p01-if .p01-if-readiness { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 0; margin: 18px 0; list-style: none; }
  body.erp-plan01 .p01-if .p01-if-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 18px 0; }
  body.erp-plan01 .p01-if .p01-if-filters label { display: grid; gap: 6px; flex: 1 1 180px; min-width: 0; margin: 0; }
  body.erp-plan01 .p01-if .p01-if-filters label:first-child { flex-grow: 2; }
  body.erp-plan01 .p01-if .p01-if-filters :is(input,select) { width: 100%; min-width: 0; }
  body.erp-plan01 .p01-if .p01-if-scroll { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--plan01-line); border-radius: var(--plan01-radius); scrollbar-color: #9aabb9 var(--plan01-subtle); }
  body.erp-plan01 #inventoryView .p01-if .p01-if-scroll:focus-visible {
    outline: 2px solid var(--plan01-accent) !important; outline-offset: -2px;
  }
  body.erp-plan01 .p01-if .p01-if-scroll-hint { margin: 0 0 8px; color: var(--plan01-muted); }
  body.erp-plan01 .p01-if .p01-if-head h2 { scroll-margin-top: 150px; }
  body.erp-plan01 .p01-if table { width: 100%; min-width: 1230px; table-layout: fixed; border-collapse: collapse; font-size: 13px; }
  body.erp-plan01 .p01-if caption { text-align: left; padding: 12px; color: var(--plan01-muted); }
  body.erp-plan01 .p01-if th,
  body.erp-plan01 .p01-if td { padding: 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--plan01-line); line-height: 1.5; overflow-wrap: anywhere; white-space: normal; }
  body.erp-plan01 .p01-if th { background: var(--plan01-head-bg); font-size: 12px; font-weight: 650; }
  body.erp-plan01 .p01-if th:nth-child(1) { width: 140px; }
  body.erp-plan01 .p01-if th:nth-child(2) { width: 265px; }
  body.erp-plan01 .p01-if th:nth-child(3) { width: 150px; }
  body.erp-plan01 .p01-if th:nth-child(4) { width: 130px; }
  body.erp-plan01 .p01-if th:nth-child(5) { width: 150px; }
  body.erp-plan01 .p01-if th:nth-child(6) { width: 150px; }
  body.erp-plan01 .p01-if th:nth-child(7) { width: 170px; }
  body.erp-plan01 .p01-if th:nth-child(8) { width: 130px; }
  body.erp-plan01 .p01-if td small { display: block; margin-top: 4px; color: var(--plan01-muted); font-size: 12px; }
  body.erp-plan01 .p01-if td.p01-if-number { text-align: right; }
  body.erp-plan01 .p01-if tr:hover td { background: #f6fcfa; }
  body.erp-plan01 .p01-if .p01-if-empty { padding: 24px 12px; color: var(--plan01-muted); }
  body.erp-plan01 .p01-if .p01-if-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
  body.erp-plan01 #inventoryView .p01-if .p01-if-pager > :is(select,button) {
    width: auto !important; min-width: 0 !important; max-width: 100% !important;
    flex: 0 0 auto !important; margin: 0 !important;
  }
  body.erp-plan01 .p01-if .p01-if-pager > span:first-child { margin-right: auto; }
  body.erp-plan01 .p01-if .p01-if-note { margin-top: 24px; font-size: 12px; }
  body.erp-plan01 .p01-if .p01-if-feedback { margin-top: 12px; color: #a9600b; }
  body.erp-plan01 .p01-if .p01-if-choice { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--plan01-line); }
  body.erp-plan01 .p01-if .p01-if-choice h3 { font-size: 18px; margin: 0 0 8px; }
  body.erp-plan01 .p01-if .p01-if-choice p { max-width: 72ch; }
  body.erp-plan01 .p01-if .p01-if-choice-action { display: grid; gap: 6px; align-content: start; text-align: right; }
  body.erp-plan01 .p01-if .p01-if-route-note { color: var(--plan01-muted); font-size: 12px; }
  @media (max-width: 760px) {
    body.erp-plan01 .p01-if .p01-if-head { flex-direction: column; }
    body.erp-plan01 .p01-if .p01-if-filters label { flex-basis: 100%; }
    body.erp-plan01 .p01-if :is(button,input,select) { min-height: 44px; }
    body.erp-plan01 .p01-if .p01-if-pager > span:first-child { flex-basis: 100%; }
    body.erp-plan01 .p01-if .p01-if-choice { grid-template-columns: minmax(0,1fr); gap: 14px; }
    body.erp-plan01 .p01-if .p01-if-choice-action { justify-items: start; text-align: left; }
    body.erp-plan01 .p01-if .p01-if-readiness { display: grid; }
  }
}

/* 036: only the two CURRENT authorized 029 pages may constrain their real workspace.
 * Marker is derived from original state and visibility; it does not reveal a page.
 * Do not change the shell/sidebar, inert behavior, modal locks or any original board.
 */
@layer plan01 {
  html:not(.mobile-nav-open):not([hidden]):not([inert]):not([aria-hidden="true"])
    > body.erp-plan01.erp-operate-ui[data-active-view="inventory"]:not(.mobile-nav-open):not([hidden]):not([inert]):not([aria-hidden="true"]):not(:has(dialog[open], .topbar details[open]))
    > .app-shell:not([hidden]):not([inert]):not([aria-hidden="true"])
    > .workspace:not([hidden]):not([inert]):not([aria-hidden="true"]):is(
      [data-plan01-inventory-flow-target="existing-flow"]:has(> #inventoryView.active[data-active-board="existing-flow"]:not([hidden]):not([inert]):not([aria-hidden="true"]) > #plan01InventoryExistingFlow:not([hidden]):not([inert]):not([aria-hidden="true"])),
      [data-plan01-inventory-flow-target="existing-actions"]:has(> #inventoryView.active[data-active-board="existing-actions"]:not([hidden]):not([inert]):not([aria-hidden="true"]) > #plan01InventoryExistingActions:not([hidden]):not([inert]):not([aria-hidden="true"]))
    ) {
    @media (max-width: 760px) {
      height: 100vh !important;
      height: 100dvh !important;
      min-height: 0 !important;
      overflow-y: auto !important;
    }
    > #inventoryView > .section-bar { display: none !important; }
  }
}
