.shelf-management { padding: 20px; min-width: 0; }
.shelf-management-toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.shelf-management-toolbar > select { width: 260px; min-width: 180px; max-width: 50%; height: 36px; }
.shelf-management-toolbar > span { color: #667085; font-size: 13px; white-space: nowrap; }
.shelf-management-toolbar > .actions { margin-left: auto; display: flex; gap: 8px; }
.shelf-management button { height: 36px; white-space: nowrap; border-radius: 6px; }
.shelf-management-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 16px; }
.shelf-management-card { min-width: 0; padding: 16px 16px 10px; background: #edf1f6; border: 1px solid #d3dce7; border-radius: 8px; box-shadow: none; color: #253245; touch-action: none; user-select: none; -webkit-touch-callout: none; cursor: grab; }
.shelf-management-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; min-height: 28px; margin-bottom: 14px; }
.shelf-management-card-title { min-width: 0; flex: 1; display: flex; align-items: baseline; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; }
.shelf-management-card h3 { margin: 0; color: #1d2939; font-size: 17px; font-weight: 650; line-height: 24px; overflow-wrap: anywhere; }
.shelf-management-card-title > span { font-size: 12px; color: #667085; }
.shelf-management-card-title strong { color: #344054; font-weight: 600; font-variant-numeric: tabular-nums; }
.shelf-drag-grip { flex: 0 0 12px; height: 20px; margin-top: 3px; background: radial-gradient(circle, #8593a6 1.5px, transparent 1.8px) 0 0 / 6px 6px; }
.shelf-management-order { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.shelf-management-order label { display: flex; align-items: center; gap: 10px; color: #475467; font-size: 12px; cursor: default; }
#shelfManagement .shelf-management-order input, .shelf-sort-ghost .shelf-management-order input { box-sizing: border-box; width: 64px; height: 36px; min-width: 0; padding: 0 8px; border: 1px solid #bdc9d8; border-radius: 6px; background: #fff; color: #1d2939; font-size: 15px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; appearance: textfield; }
.shelf-management-order input::-webkit-inner-spin-button, .shelf-management-order input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.shelf-order-arrows { display: flex; gap: 6px; }
.shelf-order-arrows button { display: grid; place-items: center; width: 36px; padding: 0; background: #fff; border: 1px solid #cbd5e1; color: #344054; }
.shelf-arrow { position: relative; display: block; width: 16px; height: 18px; }
.shelf-arrow::before { content: ''; position: absolute; left: 7px; top: 3px; width: 2px; height: 13px; background: currentColor; border-radius: 1px; }
.shelf-arrow::after { content: ''; position: absolute; top: 3px; left: 4px; width: 6px; height: 6px; border-left: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg); }
.shelf-arrow-down { transform: rotate(180deg); }
.shelf-management-card-actions { display: flex; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid #d3dce7; }
.shelf-management-card-actions > button { padding: 0 10px; min-width: 56px; background: transparent; box-shadow: none; }
.shelf-management-card button, .shelf-management-card input, .shelf-management-card label { touch-action: pan-y; cursor: pointer; }
.shelf-management-card input { cursor: text; user-select: text; }
.shelf-management button:disabled { opacity: .4; cursor: not-allowed; }
.shelf-management button:focus-visible, .shelf-management input:focus-visible { outline: 2px solid #155eef; outline-offset: 3px; }
.shelf-order-arrows button:hover:not(:disabled) { background: #e0eaff; border-color: #8daee8; color: #155eef; }
.shelf-management-card.is-dragging { opacity: .45; border: 2px dashed #155eef; padding: 15px 15px 9px; background: #dde8fb; }
.shelf-management-grid.is-sorting { cursor: grabbing; }
.shelf-sort-ghost { position: fixed; z-index: 10000; pointer-events: none; margin: 0; box-sizing: border-box; background: #e7eefb; border-color: #8daee8; box-shadow: 0 12px 28px #1d29392e; cursor: grabbing; }
.shelf-sort-ghost input { width: 64px; height: 36px; }
.shelf-sort-ghost .shelf-management-card-actions > button { height: 36px; }
.shelf-sort-ghost .shelf-order-arrows button { height: 36px; }
.shelf-order-status { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.shelf-name-dialog input { width: 100%; }
@media (max-width: 600px) {
  .shelf-management { padding: 12px; }
  .shelf-management-toolbar { flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
  .shelf-management-toolbar > select { min-width: 0; max-width: none; flex: 1; }
  .shelf-management-toolbar > .actions { width: 100%; justify-content: flex-end; }
  .shelf-management-grid { grid-template-columns: 1fr; gap: 12px; }
}
@media (pointer: coarse) {
  .shelf-management button, .shelf-management-toolbar > select, .shelf-management-order input { height: 44px; }
  .shelf-order-arrows button { width: 44px; }
}
