/* Spreadsheet-like nomenclature. Groups share the table with their items. */
.page[data-page=items] .nomenclature-toolbar { margin-bottom: 12px; }
.nomenclature-toolbar .toolbar-actions { flex-wrap: wrap; }
.nomenclature-toolbar button, .nomenclature-toolbar .button-link { font-size: 12px; min-height: 38px; padding: 9px 14px; }
.page[data-page=items] .materials-filter-bar { display: grid; grid-template-columns: minmax(240px,1fr) 170px 190px; gap: 10px; }
.page[data-page=items] .materials-filter-bar label { min-width: 0; }
.page[data-page=items] .materials-filter-bar input,
.page[data-page=items] .materials-filter-bar select { width: 100%; min-width: 0; height: 40px; border: 1px solid #d9e3dd; border-radius: 9px; background: white; color: var(--ink); font-size: 12px; outline: none; }
.page[data-page=items] .materials-filter-bar input:focus,
.page[data-page=items] .materials-filter-bar select:focus { border-color: var(--green2); box-shadow: 0 0 0 3px #24956b16; }
.nomenclature-panel.panel { padding: 0; border-radius: 12px; overflow: hidden; }
.nomenclature-view-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.nomenclature-view-bar > span { color: #74837b; font-size: 11px; }
.nomenclature-view-bar > div { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nomenclature-view-bar button { border: 0; padding: 4px 0; background: transparent; color: var(--green); font-size: 11px; cursor: pointer; }
.nomenclature-view-bar button:disabled { color: #8d9a93; cursor: default; }
.nomenclature-view-bar label { display: flex; align-items: center; gap: 6px; color: #677b6d; font-size: 11px; white-space: nowrap; }
.nomenclature-view-bar input { margin: 0; width: 14px; height: 14px; accent-color: var(--green); }
.nomenclature-scroll { overflow: auto; max-height: max(320px,calc(100vh - 325px)); scrollbar-width: thin; scrollbar-color: #c6d3cc #f7faf8; }
#items-table .nomenclature-table { min-width: 958px; width: 100%; table-layout: fixed; font-size: 12px; border-collapse: separate; border-spacing: 0; }
#items-table .nomenclature-table th { position: sticky; top: 0; z-index: 2; background: #f5f8f6; text-transform: none; letter-spacing: 0; height: 38px; font-size: 11px; color: #5c7064; padding: 3px 5px; white-space: nowrap; border-bottom: 1px solid #dce5df; }
#items-table .nomenclature-table td { height: 37px; padding: 7px 8px; border-bottom: 1px solid #eaf0ec; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#items-table .nomenclature-table th:first-child,
#items-table .nomenclature-table td:first-child { width: 34px; text-align: center; }
#items-table .nomenclature-table th:nth-child(3) { width: 96px; }
#items-table .nomenclature-table th:nth-child(4) { width: 72px; }
#items-table .nomenclature-table th:nth-child(5) { width: 100px; }
#items-table .nomenclature-table th:nth-child(6) { width: 56px; }
#items-table .nomenclature-table th:nth-child(7) { width: 80px; }
#items-table .nomenclature-table th:nth-child(8) { width: 120px; }
#items-table .nomenclature-table th:nth-child(9) { width: 80px; }
#items-table .nomenclature-table th:nth-child(10) { width: 100px; }
#items-table .nomenclature-table .document-column-filter { padding: 5px 2px; gap: 3px; min-height: 28px; border-radius: 5px; }
#items-table .nomenclature-table .document-column-filter i { width: 14px; height: 16px; flex-basis: 14px; }
#items-table .nomenclature-table .document-column-filter svg { width: 12px; height: 12px; }
#items-table .nomenclature-table .document-column-label { padding: 5px 2px; }
#items-table .nomenclature-table input[type=checkbox] { margin: 0; width: 15px; height: 15px; vertical-align: middle; accent-color: var(--green); cursor: pointer; }
#items-table .nomenclature-table input:disabled { cursor: default; }
#items-table .nomenclature-table .numeric { text-align: right; font-variant-numeric: tabular-nums; }
#items-table .nomenclature-table .negative-stock { color: #b3443d; }
.nomenclature-sku { color: #718078; font-variant-numeric: tabular-nums; font-size: 11px; }
.nomenclature-folder, #items-table .nomenclature-table .item-name-button { display: flex; align-items: center; gap: 7px; width: 100%; min-width: 0; padding: 0 0 0 calc(var(--tree-depth,0) * 18px); border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--ink); line-height: 1.3; font-size: 12px; overflow: hidden; }
.nomenclature-folder { font-weight: 650; }
#items-table .nomenclature-table .item-name-button { font-weight: 500; }
.tree-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree-chevron { flex: 0 0 12px; color: #70877a; text-align: center; }
.tree-folder-icon { flex: 0 0 16px; width: 16px; height: 14px; }
.nomenclature-folder small { color: #8b9991; font-weight: 400; font-size: 10px; margin-left: 3px; }
.nomenclature-item-row .type-dot { flex: 0 0 7px; width: 7px; height: 7px; }
#items-table .nomenclature-group-row td { background: #f3f6f4; }
#items-table .nomenclature-group-row { cursor: pointer; }
#items-table .nomenclature-group-row td:first-child { cursor: default; }
#items-table .nomenclature-group-row td:nth-child(2) { padding: 0; }
#items-table .nomenclature-group-row .nomenclature-folder { min-height: 38px; padding: 8px 8px 8px calc(8px + var(--tree-depth,0) * 18px); }
#items-table .nomenclature-group-row:hover td { background: #e6f1ea; }
#items-table .nomenclature-item-row:nth-child(even) td { background: #fafcfb; }
#items-table .nomenclature-item-row:hover td { background: #eef6f1; }
#items-table .nomenclature-item-row.selected td { background: #e6f2eb; }
.nomenclature-auto { display: inline-flex; gap: 4px; align-items: center; color: var(--green); }
.nomenclature-auto:before { content: '●'; font-size: 6px; }
#items-table .materials-list-footer { padding: 10px 12px; font-size: 11px; background: #fbfcfb; }
.page[data-page=items] .item-bulk-bar { margin-bottom: 10px; border: 1px solid #d5e8dc; font-size: 12px; }
.page[data-page=items] button:focus-visible, .nomenclature-scroll:focus-visible { outline: 2px solid var(--green2); outline-offset: -2px; }
@media (max-width: 720px) {
 .page[data-page=items] .materials-filter-bar { grid-template-columns: 1fr 1fr; }
 .page[data-page=items] .materials-filter-bar .materials-search { grid-column: 1/-1; }
 .nomenclature-toolbar .toolbar-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
 .nomenclature-toolbar button, .nomenclature-toolbar .button-link { justify-content: center; min-height: 42px; }
 .nomenclature-view-bar { align-items: flex-start; flex-direction: column; gap: 6px; }
 .nomenclature-view-bar > div { justify-content: space-between; width: 100%; gap: 8px; }
 .nomenclature-view-bar button { min-height: 32px; }
 .nomenclature-scroll { max-height: 60vh; }
 /* This register stays a tree table; do not turn each group/item into a card. */
 #items-table .nomenclature-table { display: table; min-width: 900px; }
 #items-table .nomenclature-table thead { display: table-header-group; }
 #items-table .nomenclature-table tbody { display: table-row-group; }
 #items-table .nomenclature-table tr { display: table-row; width: auto; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
 #items-table .nomenclature-table th, #items-table .nomenclature-table td { display: table-cell; min-width: 0; width: auto; text-align: left; overflow-wrap: normal; }
 #items-table .nomenclature-table td:before { display: none; }
 #items-table .nomenclature-table td:first-child:before { display: none; }
 #items-table .nomenclature-table th:first-child, #items-table .nomenclature-table td:first-child { display: table-cell; width: 34px; position: sticky; left: 0; z-index: 1; background: #f7faf8; text-align: center; }
 #items-table .nomenclature-table th:nth-child(2), #items-table .nomenclature-table td:nth-child(2) { width: 200px; position: sticky; left: 34px; z-index: 1; background: #fff; border-right: 1px solid #e2e9e5; }
 #items-table .nomenclature-table th:first-child, #items-table .nomenclature-table th:nth-child(2) { z-index: 3; background: #f5f8f6; }
 #items-table .nomenclature-group-row td:nth-child(2) { background: #f3f6f4; }
 #items-table .nomenclature-item-row.selected td:nth-child(2) { background: #e6f2eb; }
 #items-table .nomenclature-table td { height: 44px; padding: 0 8px; }
 #items-table .nomenclature-group-row td:nth-child(2) { padding: 0; }
 #items-table .nomenclature-group-row .nomenclature-folder { min-height: 44px; padding-left: calc(8px + var(--tree-depth,0) * 14px); }
 #items-table .nomenclature-table .item-name-button { display: flex; padding-left: calc(var(--tree-depth,0) * 14px); overflow-wrap: normal; }
 #items-table .document-mobile-filter-bar { display: none; }
}
