@import url("/workbench/legacy-layout-01.css?v=20261118-s5-b1");
@import url("/workbench/legacy-layout-02.css?v=20261118-s5-b1");
@import url("/workbench/legacy-layout-03.css?v=20261118-s5-b1");
@import url("/workbench/legacy-layout-04.css?v=20261118-s5-b1");
@import url("/workbench/legacy-layout-05.css?v=20261118-s5-b1");
@import url("/workbench/legacy-layout-06.css?v=20261118-s5-b1");
@import url("/workbench/legacy-layout-07.css?v=20261118-s5-b1");
@import url("/workbench/legacy-layout-08.css?v=20261118-s5-b1");
@import url("/workbench/legacy-layout-09.css?v=20261118-s5-b1");
@import url("/workbench/legacy-layout-10.css?v=20261118-s5-b1");
@import url("/workbench/legacy-layout-11.css?v=20261118-s5-b1");
@import url("/workbench/legacy-layout-12.css?v=20261118-s5-b1");
@import url("/workbench/legacy-layout-13.css?v=20261118-s5-b1");
@import url("/workbench/controls.css?v=20261118-s5-b1");
@import url("/workbench/tables.css?v=20261118-s5-b1");
@import url("/workbench/tools.css?v=20261118-s5-b1");

/* Older views use these aliases in both the assembled shell and the fallback page. */
:root {
  --page-bg: var(--wb-canvas, Canvas);
  --surface: var(--wb-surface, Canvas);
  --surface-soft: var(--wb-table-head, Canvas);
  --surface-muted: var(--wb-table-head, Canvas);
  --line: var(--wb-border, color-mix(in srgb, CanvasText 24%, Canvas));
  --line-soft: var(--line);
  --line-strong: var(--wb-control-border, GrayText);
  --text-main: var(--wb-text, CanvasText);
  --text-muted: var(--wb-placeholder, CanvasText);
  --text: var(--text-main);
  --muted: var(--text-muted);
  --accent: var(--wb-primary, Highlight);
  --accent-soft: var(--surface-soft);
  --accent-blue: var(--wb-primary, LinkText);
  --primary: var(--accent);
  --danger: var(--wb-danger, LinkText);
  --shadow-soft: 0 1px 3px rgb(31 41 51 / 5%);
}

*, *::before, *::after {
  box-sizing: border-box;
  animation: none !important;
  transition: none !important;
}
body {
  margin: 0;
  font: 14px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page-bg);
  color: var(--text-main);
}
.view:not(.active), .hidden-controls, button[hidden], [hidden] { display: none !important; }
.view.active { display: block; }
.workspace-shell, .workbench-stage, .view, .table-wrap, table, input, select, textarea, img {
  max-width: 100%;
  min-width: 0;
}
.workbench-stage { overflow-x: auto; }
#invCode { font-size: 13px; }
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  height: auto;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 8px 13px;
  background: var(--surface);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
}
button.mini { min-height: 28px; padding: 5px 9px; font-size: 12px; }
button:disabled, button[aria-disabled="true"] {
  background: var(--wb-disabled-bg, ButtonFace);
  color: var(--wb-secondary, ButtonText);
  border-color: var(--wb-disabled-border, GrayText);
  opacity: 1;
  cursor: not-allowed;
}
@media (max-width: 1000px) {
  .knowledge-grid { grid-template-columns: minmax(0, 1fr); }
}

.table-wrap {
  overflow: auto;
  width: 100%;
  min-width: 0;
  max-height: min(58vh, 620px);
  border: 1px solid var(--line);
  border-radius: 8px;
  position: relative;
  background: var(--surface);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.knowledge-body {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.selection-plan-items-wrap {
  max-height: 360px;
}

.selection-plan-items-wrap table {
  width: 100%;
  min-width: 3300px;
  table-layout: fixed;
}

.selection-plan-items-wrap th:nth-child(3),
.selection-plan-items-wrap td:nth-child(3) {
  width: 6%;
}

.selection-plan-items-wrap th:nth-child(4),
.selection-plan-items-wrap td:nth-child(4) {
  width: 14%;
}

.inventory-workspace {
  min-width: 0;
}

.tool-drawer {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.danger-zone {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--wb-danger-border, LinkText);
  border-radius: 6px;
  background: var(--wb-danger-bg, Canvas);
}

.orders-workspace,
.finance-workspace,
.order-page,
.finance-page {
  min-width: 0;
}

.selection-workspace-page,
.auction-prep-workspace,
.uploader-workspace {
  min-width: 0;
}

.uploader-platform-card {
  min-height: 0;
  align-content: start;
  border-top: 3px solid #277255;
  background: #fff;
}

.knowledge-workspace,
.system-workspace,
.knowledge-page,
.system-page {
  min-width: 0;
}

.selection-plan-operation-column {
  position: sticky;
  right: 0;
  z-index: 2;
  width: 260px;
  min-width: 260px;
  overflow: visible !important;
  white-space: normal !important;
  background: var(--surface, #fff);
}

.inventory-primary-task,
.inventory-primary-task-card {
  border-left: 3px solid #277255;
  background: #fbfdfc;
}

.selection-plan-items-wrap table th:last-child {
  position: sticky;
  right: 0;
  z-index: 3;
}
