/* SF.inventoryTree — the Catalog (public/js/tree.js). Quiet rows, graphite glyphs, steel counts, teal selection. */
.sft { display: flex; flex-direction: column; min-height: 0; height: 100%; background: var(--paper); color: var(--graphite); font-size: 14px; }
.sft-top { display: flex; align-items: center; gap: 6px; padding: 10px 10px 8px; flex-shrink: 0; }
.sft-search { flex: 1; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; color: var(--steel); cursor: text; min-width: 0;
  background: var(--concrete); border: 1px solid transparent; border-radius: var(--r-ctl); }
.sft-search:hover { border-color: var(--rule); }
.sft-search:focus-within { background: var(--paper); border-color: var(--graphite); outline: 2px solid var(--gaffer); outline-offset: 0; }
.sft-search svg { flex-shrink: 0; }
.sft-search input { flex: 1; border: 0; border-radius: 0; padding: 0; height: 34px; font-size: 14px; background: transparent; outline: none; min-width: 0; }
.sft-search input:focus { outline: none; }
.sft-tools { display: flex; gap: 2px; }
.sft-tool { border: 0; background: none; color: var(--steel); width: 32px; height: 32px; border-radius: var(--r-ctl); cursor: pointer; display: grid; place-items: center; padding: 0; }
.sft-tool:hover { background: var(--concrete); color: var(--graphite); }

.sft-body { flex: 1; overflow: auto; padding: 2px 6px 14px; outline: none; min-height: 60px; }
.sft-body:focus-visible { box-shadow: inset 0 0 0 2px var(--gaffer); }
.sft-body.is-drop-root { background: var(--teal-wash); box-shadow: inset 0 0 0 2px var(--teal); }
.sft-msg { padding: 14px 10px; color: var(--steel); font-size: 13px; }
.sft-err { color: var(--bad); }

.sft-row { --d: 0; position: relative; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 calc(6px + var(--d) * 18px); cursor: default; user-select: none; white-space: nowrap; border-radius: var(--r-ctl); }
.sft-row:hover { background: var(--concrete); }
.sft-row.is-sel { background: var(--teal-wash); color: var(--teal-dark); font-weight: 600; }
.sft-row.is-sel::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--teal); }
.sft-row.is-sel .sft-ico { color: var(--teal-dark); }
.sft-body:focus .sft-row.is-focus { outline: 2px solid var(--gaffer); outline-offset: -2px; }
.sft-row.is-drop { background: var(--teal-wash); box-shadow: inset 0 0 0 2px var(--teal); }
.sft-row.is-dragging { opacity: .45; }
.sft-row.is-virtual .sft-name { font-style: italic; color: var(--steel); }

.sft-caret { width: 16px; height: 16px; display: grid; place-items: center; color: var(--steel); flex-shrink: 0; cursor: pointer; border-radius: 3px; }
.sft-caret:hover { background: var(--rule); color: var(--graphite); }
.sft-caret.is-empty { visibility: hidden; }
.sft-caret-svg { width: 9px; height: 9px; transition: transform .12s ease; }
.sft-folder.is-open > .sft-caret .sft-caret-svg { transform: rotate(90deg); }

.sft-ico { width: 18px; height: 18px; display: grid; place-items: center; flex-shrink: 0; color: var(--graphite); opacity: .8; }
.sft-ico .sft-svg { width: 17px; height: 17px; }
.sft-name { overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.sft-name mark { background: var(--gaffer-wash); color: inherit; border-radius: 2px; padding: 0 1px; box-shadow: inset 0 -2px 0 var(--gaffer); }
.sft-count { margin-left: auto; padding-left: 8px; font-size: 12px; color: var(--steel); font-weight: 400; font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.sft-manage .sft-folder:hover .sft-count, .sft-manage .sft-folder.is-sel .sft-count { display: none; }

.sft-actions { display: none; margin-left: auto; gap: 2px; align-items: center; }
.sft-folder:hover .sft-actions, .sft-folder.is-sel .sft-actions { display: inline-flex; }
.sft-act { border: 0; background: none; padding: 0; width: 26px; height: 26px; display: grid; place-items: center; cursor: pointer; color: var(--steel); border-radius: var(--r-ctl); }
.sft-act:hover { color: var(--graphite); background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule); }

.sft-leaf { font-size: 13px; color: var(--graphite); font-weight: 400; }
.sft-leaf .sft-name { flex: 1 1 auto; }
.sft-leaf[draggable="true"] { cursor: grab; }
/* tracking marks: shape, not color — serialized ▪, bulk ●, kit ◆ */
.sft-dot { width: 7px; height: 7px; border-radius: 1px; flex-shrink: 0; margin: 0 5px 0 6px; background: var(--steel); }
.sft-kind { display: inline-flex; flex-shrink: 0; margin: 0 5px 0 3px; color: var(--steel); }
.sft-row.is-sel .sft-kind { color: var(--teal); }
.sf-kind { display: inline-flex; align-items: center; gap: 4px; background: var(--concrete); color: var(--graphite); font-weight: 600; }
.sf-kind-glyph { flex-shrink: 0; vertical-align: -2px; }
.sft-dot-bulk { border-radius: 50%; }
.sft-dot-kit { transform: rotate(45deg); width: 6px; height: 6px; }
.sft-qty { margin-left: auto; padding-left: 8px; font-size: 12px; font-family: var(--font-display); font-variant-numeric: tabular-nums; color: var(--steel); }
.sft-av { font-weight: 700; color: var(--graphite); }
.sft-av.is-ok { color: var(--graphite); }
.sft-av.is-bad { color: var(--bad); }
.sft-av.is-wait { color: var(--rule); }

/* compact (side panes) */
.sft-compact { font-size: 13.5px; }
.sft-compact .sft-row { height: 30px; padding-left: calc(6px + var(--d) * 16px); }

/* popup menu */
.sft-menu { position: fixed; z-index: 200; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-panel); box-shadow: var(--float); padding: 4px; min-width: 200px; }
.sft-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 12px; font: inherit; font-size: 14px; border-radius: var(--r-ctl); cursor: pointer; color: var(--graphite); }
.sft-menu button:hover, .sft-menu button:focus { background: var(--concrete); outline: none; }
.sft-menu button:focus-visible { outline: 2px solid var(--gaffer); outline-offset: -2px; }
.sft-menu button.danger { color: var(--bad); }
.sft-menu-sep { height: 1px; background: var(--rule); margin: 4px 2px; }

/* icon dialog */
.sft-icon-help { margin: 0 0 10px; font-size: 13px; }
.sft-icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; margin-bottom: 12px; }
.sft-icon-pick { height: 44px; border: 1px solid var(--rule); background: var(--paper); border-radius: var(--r-ctl); cursor: pointer; display: grid; place-items: center; color: var(--graphite); }
.sft-icon-pick:hover { border-color: var(--steel); }
.sft-icon-pick .sft-svg { width: 22px; height: 22px; }
.sft-icon-pick.on { border-color: var(--teal); background: var(--teal-wash); color: var(--teal-dark); }
.sft-icon-preview { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--concrete); border-radius: var(--r-ctl); font-weight: 600; }
