body { background: #f5f6f8; }
/* 側邊選單固定寬度：內容區很寬時不被擠壓、選單文字不換行 */
.sidebar { width: 230px; min-height: calc(100vh - 56px); flex-shrink: 0; }
.sidebar .nav-link, .sidebar-heading { white-space: nowrap; }
.sidebar .nav-link { color: #333; border-radius: .375rem; padding: .45rem .75rem; }
.sidebar .nav-link:hover { background: #e9ecef; }
.sidebar .nav-link.active { background: #0d6efd; color: #fff; }
.sidebar .nav-link.disabled { color: #adb5bd; }
.sidebar .nav-link i { margin-right: .4rem; }
.sidebar-heading { font-size: .75rem; color: #6c757d; text-transform: uppercase; padding: 1rem .75rem .25rem; }
.main-content { min-width: 0; }
.login-page { min-height: 100vh; background: linear-gradient(135deg, #1e3c72, #2a5298); }
.dept-tree .tree-toggle, .dept-tree .tree-spacer { display: inline-block; width: 1.25rem; text-align: center; }
.dept-tree .tree-toggle { color: #6c757d; text-decoration: none; }
.formset-table .form-control, .formset-table .form-select { min-width: 7rem; }
.formset-table td { vertical-align: top; }
.product-image-tile img { width: 160px; height: 160px; object-fit: contain; background: #fff; }
/* 表格標題不換行；資料太多時由 .table-responsive 左右捲動 */
.table > thead th { white-space: nowrap; }
.product-table .col-name { min-width: 12rem; }
.product-thumb { width: 40px; }
.product-thumb img { width: 32px; height: 32px; object-fit: cover; border-radius: .25rem; cursor: zoom-in; }
.product-thumb i { font-size: 1.25rem; }
.product-image-mini { width: 72px; height: 72px; object-fit: contain; background: #fff; }
.column-picker { min-width: 16rem; max-height: 70vh; overflow-y: auto; }
.sort-link { color: inherit; text-decoration: none; }
.sort-link:hover, .sort-link.active { color: var(--bs-primary); }
/* 滑鼠移到縮圖時的放大預覽（static/js/image-preview.js） */
.image-hover-preview {
  position: fixed; z-index: 1080; pointer-events: none; display: none;
  padding: .25rem; background: #fff; border: 1px solid #dee2e6; border-radius: .375rem;
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
}
.image-hover-preview img { display: block; max-width: 320px; max-height: 320px; object-fit: contain; }
