/* 选品工作台布局。只覆盖主站业务页与独立捡漏页，不修改旧LR或管理页面规则。 */
.workspace-nav { background: #fff; border-bottom: 1px solid #dbe3ed; color: #334155; }
.workspace-nav-inner { max-width: 1280px; margin: 0 auto; padding: 10px 16px; }
.workspace-nav-top, .workspace-account, .workspace-nav-primary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; min-width: 0; }
.workspace-nav-top { justify-content: space-between; }
.workspace-brand { color: #1d4ed8; font-size: 16px; font-weight: 700; }
.workspace-account { font-size: 13px; }
.workspace-user { max-width: 160px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #64748b; }
.workspace-logout { padding: 6px 4px; }
.workspace-nav-primary { margin-top: 8px; }
.workspace-nav-primary > a, .workspace-nav-primary > button { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; border-radius: 6px; font-size: 14px; text-decoration: none; }
.workspace-nav-primary > .router-link-exact-active { color: #1d4ed8; background: #eff6ff; font-weight: 600; }
.workspace-nav-primary > button { border: 1px solid #cbd5e1; margin-left: auto; gap: 4px; }
.workspace-nav a:hover, .workspace-nav button:hover { color: #1d4ed8; background: #f1f5f9; }
.workspace-nav :focus-visible, .workspace-shell [role="region"]:focus-visible, .pickup-workspace [role="region"]:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.workspace-nav-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; padding: 14px 0 4px; margin-top: 8px; border-top: 1px solid #e2e8f0; }
.workspace-nav-groups section { display: flex; gap: 6px; flex-wrap: wrap; align-content: start; }
.workspace-nav-groups h2 { flex-basis: 100%; font-size: 12px; color: #64748b; font-weight: 600; }
.workspace-nav-groups a, .workspace-nav-groups button { padding: 6px 8px; font-size: 13px; border-radius: 4px; }
.workspace-shell, .workspace-shell > .workspace-page { min-width: 0; width: 100%; }
.workspace-shell .breadcrumb-trail { position: static; top: auto; z-index: auto; }
.workspace-shell .sel-form-sticky, .workspace-shell .sourcing-panel .sourcing-scope { position: static; top: auto; z-index: auto; }
/* 单一表格滚动容器：不再clip数据，也不与整页吸顶头部争夺位置。 */
.workspace-shell .table-wrap, .pickup-workspace .table-wrap {
  width: 100%; max-width: 100%; min-width: 0; overflow: auto;
  max-height: min(68vh, 860px); isolation: isolate; overscroll-behavior-inline: contain;
  scrollbar-width: auto; border: 1px solid #e2e8f0; border-radius: 8px;
}
.workspace-shell .table-wrap > table { min-width: 1080px; }
.workspace-shell .table-wrap > table th, .pickup-workspace .table-wrap > table th { white-space: nowrap; }
.workspace-shell .table-wrap > table thead, .pickup-workspace .table-wrap > table thead { position: sticky; top: 0; z-index: 2; }
.workspace-shell .table-wrap > table thead th, .pickup-workspace .table-wrap > table thead th { background: #f8fafc; border-bottom: 1px solid #cbd5e1; }
.workspace-shell .table-wrap > table td { vertical-align: top; }
.workspace-shell .table-wrap > table td:first-child { min-width: 310px; }
.workspace-shell .table-wrap > table td:first-child > .flex > .min-w-0 { min-width: 190px; }
.workspace-table-hint { font-size: 12px; color: #64748b; margin: 6px 0; line-height: 1.6; }
.workspace-shell .workspace-page input, .workspace-shell .workspace-page select, .workspace-shell .workspace-page textarea { max-width: 100%; }
.workspace-shell .workspace-filters { min-width: 0; }
.workspace-shell .workspace-filters > .flex > div { flex-shrink: 0; }
.workspace-shell .workspace-filters > .flex > .flex-1 { flex-basis: 200px; min-width: 180px; }
.workspace-shell .workspace-filters select { min-width: 0; }
.workspace-shell .workspace-product-header { align-items: flex-start; }
.workspace-shell .workspace-product-header h1 { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.workspace-shell .workspace-product-header > .flex-1 { min-width: 0; }
.workspace-shell .workspace-page > .bg-white { min-width: 0; }
.workspace-shell .evidence-list .product-image img { width: 100%; height: 100%; }
/* 普通表单弹层只滚动自身；图片悬停预览不接管鼠标点击。 */
.workspace-shell .modal-overlay, .workspace-shell .fixed.inset-0, .workspace-modal { padding: 12px; overflow-y: auto; }
.workspace-shell .modal-overlay > div, .workspace-shell .fixed.inset-0 > div, .workspace-modal > div { max-width: 100%; max-height: calc(100dvh - 24px); overflow-y: auto; }
/* 捡漏是独立页面：单独声明边界，不依赖Vue根节点。 */
.pickup-workspace nav { position: static; }
.pickup-workspace nav > div { height: auto; min-height: 56px; flex-wrap: wrap; padding-block: 10px; gap: 10px; }
.pickup-workspace nav > div > div { flex-wrap: wrap; gap: 10px 16px; min-width: 0; }
.pickup-workspace nav a, .pickup-workspace nav button { padding-block: 5px; }
.pickup-workspace .table-wrap > table { min-width: 1200px; }
.pickup-workspace #statsBar { flex-wrap: wrap; }
.pickup-workspace #q { max-width: 100%; }
@media (max-width: 760px) {
  .workspace-nav-inner { padding-inline: 12px; }
  .workspace-nav-top { align-items: flex-start; gap: 6px; }
  .workspace-account { width: 100%; gap: 8px; }
  .workspace-user { margin-left: auto; max-width: 104px; }
  .workspace-nav-primary { gap: 4px; }
  .workspace-nav-primary > a, .workspace-nav-primary > button { font-size: 13px; padding-inline: 8px; }
  .workspace-nav-primary > button { margin-left: 0; }
  .workspace-shell .workspace-product-header { flex-direction: column; gap: 14px; }
  .workspace-shell .workspace-product-header > .text-right { text-align: left; }
  .workspace-shell .workspace-page .grid.grid-cols-2, .workspace-shell .workspace-page .grid.grid-cols-3, .workspace-shell .workspace-page .grid.grid-cols-4 { grid-template-columns: minmax(0, 1fr); }
  .workspace-shell .workspace-page .p-6 { padding: 16px; }
  .workspace-shell .workspace-filters > .flex { gap: 10px; }
}
@media (max-width: 480px) {
  .workspace-shell > .workspace-page { padding-inline: 12px; }
  .workspace-shell .workspace-filters > .flex { display: grid; grid-template-columns: minmax(0, 1fr); }
  .workspace-shell .workspace-filters > .flex > div { width: 100%; min-width: 0; }
  .workspace-shell .workspace-filters > .flex > .flex-1 { min-width: 0; }
  .workspace-shell .workspace-filters > .flex > div > .flex { flex-wrap: wrap; }
  .workspace-shell .workspace-filters select, .workspace-shell .workspace-filters input:not([type="checkbox"]) { width: 100%; max-width: 100%; }
  .workspace-shell .workspace-filters label { white-space: normal; }
  .workspace-shell .workspace-product-header { overflow-wrap: anywhere; }
}
/* 矮视口/放大显示不保留狭窄的嵌套竖向滚动窗，仍保留横向可达性。 */
@media (max-height: 620px) {
  .workspace-shell .table-wrap, .pickup-workspace .table-wrap { max-height: none; }
  .workspace-shell .table-wrap > table thead, .pickup-workspace .table-wrap > table thead { position: static; }
}

/* 详情月表/品牌商标表等普通明细只横滚，不制造新的竖向吸顶区。 */
.workspace-shell .workspace-table-scroll { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; }
.workspace-shell .workspace-table-history > table { min-width: 760px; }
.workspace-shell .workspace-table-scroll th { white-space: nowrap; }

/* 用户选品习惯：品牌下附公司，图片本身承担图搜和悬停预览；桌面尽量整行同屏。 */
.workspace-shell .workspace-compact .table-wrap > table { table-layout: fixed; font-size: 13px; }
.workspace-shell .workspace-compact-list .table-wrap > table { min-width: 1156px; }
.workspace-shell .workspace-compact-all .table-wrap > table { min-width: 1216px; }
.workspace-shell .workspace-compact .table-wrap > table th { padding: 7px 8px; white-space: normal; line-height: 16px; overflow-wrap: anywhere; }
.workspace-shell .workspace-compact .table-wrap > table td { padding: 6px 8px; vertical-align: middle; }
.workspace-shell .workspace-compact .table-wrap > table td:first-child { min-width: 0; }
.workspace-shell .workspace-compact .table-wrap > table td:first-child > .flex > .min-w-0 { min-width: 0; flex: 1; }
.workspace-shell .workspace-compact .table-wrap td:first-child a.truncate { max-width: 100%; }
.workspace-shell .workspace-compact .table-wrap td:nth-child(2) > a,
.workspace-shell .workspace-compact .table-wrap td:nth-child(2) > button { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.workspace-shell .workspace-brand-company { display: block; margin-top: 2px; font-size: 11px; line-height: 14px; color: #64748b; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-shell .workspace-compact .table-wrap td.font-mono { font-size: 12px; white-space: nowrap; }
.workspace-shell .workspace-compact .table-wrap td:last-child { white-space: nowrap; }
.workspace-shell .workspace-compact .table-wrap td:last-child > .flex { flex-wrap: nowrap; }
