/* ── Stock tab ────────────────────────────────────────────────────────────── */
.stk-wrap { padding: 20px 24px 48px; width: 100%; box-sizing: border-box; }

.stk-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.stk-title { font-size: 20px; font-weight: 700; color: var(--text); margin: 0 0 3px; }
.stk-sub   { font-size: 12px; color: var(--text4); margin: 0; }

.stk-actions { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.stk-action-btn {
  flex: 1; min-width: 140px; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); cursor: pointer; font-family: inherit;
  font-size: 15px; font-weight: 700; padding: 18px 14px; text-align: center;
  transition: border-color .12s, background .12s;
}
.stk-action-btn:hover { border-color: var(--accent); background: var(--bg3); }
.stk-action-btn.stk-receive { border-left: 4px solid var(--live); }
.stk-action-btn.stk-pull    { border-left: 4px solid var(--accent); }

.stk-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.stk-tab-btn { background: var(--bg2); border: 1px solid var(--border); border-radius: 6px;
  color: var(--text3); cursor: pointer; font-size: 12px; font-family: inherit; padding: 6px 14px;
  transition: color .12s, border-color .12s, background .12s; display: flex; align-items: center; gap: 5px; }
.stk-tab-btn:hover { color: var(--text); border-color: var(--text3); }
.stk-tab-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.stk-tab-cnt { font-size: 10px; background: rgba(255,255,255,.2); border-radius: 8px; padding: 0 5px; min-width: 16px; text-align: center; }
.stk-tab-btn:not(.active) .stk-tab-cnt { background: var(--border2); color: var(--text4); }

.stk-search { width: 100%; box-sizing: border-box; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 14px; padding: 12px 14px; margin-bottom: 14px; }

.stk-list { display: flex; flex-direction: column; gap: 8px; }
.stk-empty { padding: 40px 0; text-align: center; color: var(--text4); font-size: 13px; }

.stk-item { display: flex; align-items: center; gap: 12px; background: var(--bg2);
  border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; cursor: pointer; }
.stk-item:hover { border-color: var(--text3); }
.stk-item-body { flex: 1; min-width: 0; }
.stk-item-name { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.stk-item-meta { font-size: 11px; color: var(--text4); display: flex; gap: 4px; flex-wrap: wrap; }
.stk-item-qty  { font-size: 15px; font-weight: 700; color: var(--text); flex-shrink: 0; text-align: right; }
.stk-item-qty-label { font-size: 10px; color: var(--text4); font-weight: 400; }
.stk-item-low { color: #ef4444; }

.stk-form { display: flex; flex-direction: column; gap: 12px; max-width: 480px; }
.stk-field { display: flex; flex-direction: column; gap: 5px; }
.stk-field label { font-size: 12px; color: var(--text3); font-weight: 600; }
.stk-field input, .stk-field select, .stk-field textarea {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-family: inherit; font-size: 15px; padding: 12px 14px; box-sizing: border-box;
}
.stk-field textarea { min-height: 70px; resize: vertical; }
.stk-toggle-row { display: flex; gap: 8px; }
.stk-toggle-btn { flex: 1; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text3); cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; padding: 14px 10px; }
.stk-toggle-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.stk-submit-btn { background: var(--accent); border: none; border-radius: 8px; color: #fff;
  cursor: pointer; font-family: inherit; font-size: 15px; font-weight: 700; padding: 14px; }
.stk-submit-btn:disabled { opacity: .5; cursor: default; }

.stk-file-btn { background: var(--bg2); border: 1px dashed var(--border); border-radius: 8px;
  color: var(--text3); cursor: pointer; font-family: inherit; font-size: 13px; padding: 12px; text-align: center; }
.stk-file-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.stk-file-chip { background: var(--border2); border-radius: 4px; color: var(--text3); font-size: 11px; padding: 3px 8px; }

/* ── Catalog toolbar: search / sort / view toggle ─────────────────────────── */
.stk-cat-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.stk-cat-toolbar .stk-search { flex: 1; min-width: 160px; margin-bottom: 0; }
.stk-sort-select { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-family: inherit; font-size: 13px; padding: 10px 12px; }
.stk-view-toggle { display: flex; gap: 4px; flex-shrink: 0; }
.stk-view-btn { background: var(--bg2); border: 1px solid var(--border); border-radius: 6px;
  color: var(--text3); cursor: pointer; font-size: 14px; padding: 8px 12px; }
.stk-view-btn:hover { color: var(--text); }
.stk-view-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.stk-chip-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.stk-chip { background: var(--bg2); border: 1px solid var(--border); border-radius: 20px;
  color: var(--text3); cursor: pointer; font-family: inherit; font-size: 11px; padding: 5px 12px; }
.stk-chip:hover { color: var(--text); border-color: var(--text3); }
.stk-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Favorites ─────────────────────────────────────────────────────────────── */
.stk-cat-section-hdr { font-size: 12px; font-weight: 700; color: var(--text3); margin: 4px 0 8px;
  display: flex; align-items: center; gap: 6px; }
.stk-hint { font-weight: 400; color: var(--text4); font-size: 11px; }
.stk-fav-zone { margin-bottom: 20px; border-radius: 10px; }
.stk-fav-zone:empty, .stk-fav-zone .stk-empty { border: 1px dashed var(--border); border-radius: 8px; }

.stk-fav-btn { background: none; border: none; color: var(--text4); cursor: pointer; font-size: 18px;
  flex-shrink: 0; line-height: 1; padding: 4px; }
.stk-fav-btn:hover { color: var(--text3); }
.stk-fav-btn.active { color: #f59e0b; }

.stk-quickpull-btn { background: var(--bg3); border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); cursor: pointer; flex-shrink: 0; font-family: inherit; font-size: 13px;
  font-weight: 700; padding: 6px 10px; }
.stk-quickpull-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── Item thumbnails ──────────────────────────────────────────────────────── */
.stk-item-thumb { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.stk-thumb-empty { display: flex; align-items: center; justify-content: center; background: var(--bg3);
  color: var(--text4); font-size: 18px; }

/* ── Grid / card view ─────────────────────────────────────────────────────── */
.stk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.stk-card { position: relative; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; overflow: hidden; transition: border-color .12s; }
.stk-card:hover { border-color: var(--text3); }
.stk-card-img { width: 100%; aspect-ratio: 1.3; overflow: hidden; }
.stk-card-thumb { width: 100%; height: 100%; object-fit: cover; }
.stk-card-thumb.stk-thumb-empty { font-size: 32px; }
.stk-card-body { padding: 10px 12px; }
.stk-card-qty { font-size: 12px; font-weight: 700; color: var(--text); margin-top: 6px; }
.stk-card-fav { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.4); border-radius: 50%; }
.stk-card-fav.active { color: #f59e0b; }
.stk-card-quickpull { position: absolute; bottom: 8px; right: 8px; }

/* ── Photo gallery (item detail) ──────────────────────────────────────────── */
.stk-photo-gallery { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stk-photo-thumb-wrap { position: relative; display: inline-block; }
.stk-photo-thumb { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; display: block; }
.stk-photo-remove { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%;
  background: #ef4444; border: none; color: #fff; cursor: pointer; font-size: 12px; line-height: 1; padding: 0; }
.stk-photo-add { width: 64px; height: 64px; padding: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; }
