#stockAlertsPanel { display:flex; flex-direction:column; gap:8px; min-height:0; height:auto; padding:12px; }
#stockAlertsPanel.hidden { display:none; }
#stockAlertsPanel .stock-alert-row, #stockAlertDetail .stock-alert-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
#stockAlertsPanel .stock-alert-push, #stockAlertDetail .stock-alert-push { margin-left:auto; }
#stockAlertsPanel .stock-alert-types button { font-size:var(--ui-font-size-section-title); font-weight:var(--ui-font-weight-semibold); }
#stockAlertsPanel .stock-alert-types button span { font-size:var(--ui-font-size-body); font-weight:var(--ui-font-weight-medium); }
#stockAlertsPanel button.active { color:var(--ui-color-primary); background:var(--ui-color-primary-soft); border-color:var(--ui-color-primary); }
#stockAlertsPanel .stock-alert-stages { background:var(--ui-color-detail); padding:6px; border:1px solid var(--ui-color-border); border-radius:8px; }
/* 筛选按内容收紧；宽窗口共用一行，空间不足自然换行。 */
#stockAlertsPanel .stock-alert-filters { display:flex; flex-direction:row; flex-wrap:wrap; align-items:center; gap:6px 8px; min-width:0; }
#stockAlertsPanel .stock-alert-filter-fields { display:contents; }
#stockAlertsPanel :is(.stock-alert-filter-actions,.stock-alert-selection-tools) { display:flex; align-items:center; flex-wrap:wrap; gap:8px; min-width:0; }
#stockAlertsPanel .stock-alert-filter-fields select { flex:0 0 auto; width:140px; min-width:0; max-width:100%; }
#stockAlertsPanel .stock-alert-filter-fields [data-sa-filter="platform"] { width:110px; }
#stockAlertsPanel .stock-alert-filter-fields [data-sa-filter="owner"] { width:126px; }
#stockAlertsPanel .stock-alert-filter-fields [data-sa-filter="history"] { width:176px; }
#stockAlertsPanel .stock-alert-filter-actions { flex:0 1 510px; max-width:100%; }
#stockAlertsPanel .stock-alert-filter-actions input { flex:1 1 180px; width:180px; min-width:0; max-width:320px; }
#stockAlertsPanel .stock-alert-selection-tools { margin-left:0; flex:0 0 auto; flex-wrap:nowrap; }
/* 预留勾选数量的位置，避免文字变化触发换行、挤动表格。 */
#stockAlertsPanel [data-sa-selected] { flex:0 0 120px; width:120px; white-space:nowrap; font-variant-numeric:tabular-nums; }
#stockAlertsPanel .stock-alert-filters :is(select,input,button,summary) { box-sizing:border-box; height:auto; min-height:34px; padding:5px 10px; line-height:var(--ui-line-height); font-size:var(--ui-font-size-body); font-weight:var(--ui-font-weight-medium); }
#stockAlertsPanel .stock-alert-filters summary { display:flex; align-items:center; gap:4px; }

#stockAlertsPanel .stock-alert-grid { min-height:100px; flex:1; overflow:auto; }
#stockAlertsPanel table, #stockAlertDetail table { border-collapse:collapse; width:100%; }
#stockAlertsPanel th, #stockAlertDetail th { white-space:nowrap; background:var(--ui-color-table-head); position:sticky; top:0; z-index:1; }
#stockAlertsPanel td, #stockAlertDetail td { white-space:nowrap; }
#stockAlertsPanel td.stock-alert-name { white-space:normal; min-width:180px; }
#stockAlertsPanel .stock-alert-number, #stockAlertDetail .stock-alert-number { text-align:right; font-variant-numeric:tabular-nums; }
#stockAlertsPanel .stock-alert-status { min-width:132px; font-size:var(--ui-font-size-business-status)!important; font-weight:var(--ui-font-weight-semibold)!important; }
#stockAlertsPanel .stock-alert-status.new { color:var(--ui-color-warning)!important; }
#stockAlertsPanel .stock-alert-status.review { color:var(--ui-color-primary)!important; }
#stockAlertsPanel .stock-alert-note, #stockAlertDetail .stock-alert-note { font-size:var(--ui-font-size-note)!important; color:var(--ui-color-muted)!important; font-weight:var(--ui-font-weight-regular)!important; }
#stockAlertsPanel .stock-alert-footer { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
#stockAlertsPanel .stock-alert-copy, #stockAlertDetail .stock-alert-copy { border:0; background:transparent; padding:0; color:var(--ui-color-primary); text-align:left; font-weight:var(--ui-font-weight-regular); }
#stockAlertsPanel .stock-alert-tools, #stockAlertDetail .stock-alert-tools { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
#stockAlertsPanel .stock-alert-tools { border-bottom:1px solid var(--ui-color-border); padding-bottom:6px; }
#stockAlertDetail { padding:0; border:1px solid var(--ui-color-control-border); border-radius:10px; width:max-content; max-width:calc(100vw - 32px); max-height:calc(100dvh - 32px); background:var(--ui-color-surface); color:var(--ui-color-text); }
#stockAlertDetail[open] { display:flex; flex-direction:column; resize:both; overflow:hidden; }
#stockAlertDetail::backdrop { background:var(--ui-color-image-backdrop); }
#stockAlertDetail .stock-alert-dialog-head { flex:none; display:flex; align-items:center; gap:12px; padding:12px; border-bottom:1px solid var(--ui-color-border); }
#stockAlertDetail .stock-alert-dialog-content { min-height:0; overflow:auto; padding:12px; }
#stockAlertDetail .stock-alert-dialog-foot { padding:10px 12px; border-top:1px solid var(--ui-color-border); flex:none; }
#stockAlertDetail .stock-alert-dialog-head h2 { margin:0; font-size:var(--ui-font-size-section-title); font-weight:var(--ui-font-weight-semibold); }
#stockAlertDetail .stock-alert-detail-table { overflow:auto; max-width:calc(100vw - 58px); margin-top:8px; }
@media(max-width:700px) { #stockAlertsPanel .stock-alert-filters select { max-width:100%; } }

/* 商品任务已有强制角色覆盖；仅本栏目提升对应角色的优先级。 */
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-status { font-size:var(--ui-font-size-business-status)!important; font-weight:var(--ui-font-weight-semibold)!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-status.new { color:var(--ui-color-warning)!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-status.review { color:var(--ui-color-primary)!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-types button { font-size:var(--ui-font-size-section-title)!important; font-weight:var(--ui-font-weight-semibold)!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-types button span { font-size:var(--ui-font-size-body)!important; font-weight:var(--ui-font-weight-medium)!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-note, html.tasks-standard-active #stockAlertDetail .stock-alert-note { font-size:var(--ui-font-size-note)!important; color:var(--ui-color-muted)!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel button.active, html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-copy, html.tasks-standard-active #stockAlertDetail .stock-alert-copy { color:var(--ui-color-primary)!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel button.active { background:var(--ui-color-primary-soft)!important; border-color:var(--ui-color-primary)!important; }

html.tasks-standard-active #tasksPage #stockAlertsPanel [data-sa-table-title], html.tasks-standard-active #stockAlertDetail [data-sa-table-title] { margin-right:auto; font-size:var(--ui-font-size-body)!important; font-weight:var(--ui-font-weight-semibold)!important; }

/* 仓备预警独立表格布局；不套用旧商品任务网格。 */
html.tasks-standard-active #tasksPage #stockAlertsPanel { min-width:0; overflow:hidden; }
#stockAlertsPanel > * { flex-shrink:0; }
#stockAlertsPanel .stock-alert-grid { flex:1 1 auto; min-width:0; min-height:80px; border:1px solid var(--ui-color-border); scrollbar-gutter:stable; }
#stockAlertsPanel .stock-alert-grid > .table-preference-controls { display:none!important; }
#stockAlertsPanel [data-sa-summary]:empty, #stockAlertsPanel [data-sa-message]:empty, #stockAlertDetail .stock-alert-dialog-foot:empty { display:none; }
html.tasks-standard-active #tasksPage #stockAlertsPanel table,
html.tasks-standard-active #stockAlertDetail table { table-layout:fixed!important; width:max-content; min-width:100%; }
html.tasks-standard-active #tasksPage #stockAlertsPanel :is(th,td),
html.tasks-standard-active #stockAlertDetail :is(th,td) { padding:8px 10px!important; vertical-align:middle; white-space:nowrap!important; overflow-wrap:normal; word-break:normal; }
html.tasks-standard-active #tasksPage #stockAlertsPanel th,
html.tasks-standard-active #stockAlertDetail th { min-width:0!important; background:var(--ui-color-table-head)!important; }
#stockAlertsPanel .stock-alert-tools { display:flex; flex-wrap:wrap; align-items:center; gap:8px; min-width:0; }
#stockAlertsPanel .stock-alert-tools strong { font-size:var(--ui-font-size-body); font-weight:var(--ui-font-weight-semibold); }
#stockAlertsPanel .stock-alert-footer { border-top:1px solid var(--ui-color-border); padding-top:8px; }
#stockAlertsPanel .stock-alert-stages { padding:0; border:0; background:transparent; }
#stockAlertDetail .stock-alert-dialog-content { max-width:100%; }
#stockAlertDetail .stock-alert-detail-table { max-width:100%; }
#stockAlertDetail .table-preference-controls { position:sticky; left:0; }
html.tasks-standard-active #stockAlertDetail .table-preference-controls { display:flex; justify-content:flex-end; gap:8px; }
html.tasks-standard-active #stockAlertDetail .table-preference-controls [data-sa-table-title] { margin-right:auto; }
html.tasks-standard-active #tasksPage #stockAlertsPanel td.stock-alert-text,
html.tasks-standard-active #stockAlertDetail td.stock-alert-text { white-space:normal!important; overflow-wrap:anywhere; }
#stockAlertsPanel .stock-alert-text .stock-alert-copy, #stockAlertDetail .stock-alert-text .stock-alert-copy { white-space:normal; overflow-wrap:anywhere; max-width:100%; }

/* 整款分页，货品信息合并展示，尺码逐行对照。 */
html.tasks-standard-active #tasksPage #stockAlertsPanel td.stock-alert-merged-placeholder { display:none!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel td[data-sa-merge] { vertical-align:top; padding-top:10px!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel tr.stock-alert-group-start td { border-top:2px solid var(--ui-color-control-border)!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-status.normal { color:var(--ui-color-text)!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-status.pending { color:var(--ui-color-muted)!important; }
html.tasks-standard-active #stockAlertDetail { width:880px; max-width:calc(100vw - 48px); min-width:280px; }
#stockAlertDetail .stock-alert-dialog-content { min-width:0; flex:0 1 auto; }
#stockAlertDetail .stock-alert-detail-table { min-width:0; max-width:100%; overflow:auto; scrollbar-gutter:stable; }
@media(max-width:600px) { html.tasks-standard-active #stockAlertDetail { max-width:calc(100vw - 24px); min-width:0; } }
#stockAlertDetail .stock-alert-detail-table > .table-preference-controls { display:none!important; }
#stockAlertDetail .stock-alert-detail-tools { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:8px; }
#stockAlertDetail .stock-alert-detail-tools strong { font-size:var(--ui-font-size-body); font-weight:var(--ui-font-weight-semibold); }

/* 紧凑布局：业务栏目与进度共用一行，默认列宽按内容计算。 */
html.tasks-standard-active #tasksPage #stockAlertsPanel { gap:6px; padding:10px; }
#stockAlertsPanel .stock-alert-nav { display:flex; flex-wrap:wrap; align-items:center; gap:6px 16px; }
#stockAlertsPanel .stock-alert-nav .stock-alert-stages { gap:6px; }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-status { min-width:0; }
html.tasks-standard-active #tasksPage #stockAlertsPanel :is(th,td),
html.tasks-standard-active #stockAlertDetail :is(th,td) { padding:4px 8px!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel td[data-sa-merge] { padding-top:6px!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel table,
html.tasks-standard-active #stockAlertDetail table { min-width:0; }
#stockAlertsPanel .stock-alert-cell-content, #stockAlertDetail .stock-alert-cell-content { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; max-height:4.35em; overflow:hidden; overflow-wrap:anywhere; white-space:normal; }
#stockAlertsPanel .stock-alert-cell-content.expanded, #stockAlertDetail .stock-alert-cell-content.expanded { display:block; -webkit-line-clamp:unset; max-height:none; overflow:visible; }
html.tasks-standard-active #tasksPage #stockAlertsPanel button.stock-alert-expand,
html.tasks-standard-active #stockAlertDetail button.stock-alert-expand { min-height:0; height:auto; border:0; background:transparent; padding:2px 0; color:var(--ui-color-primary)!important; font-size:var(--ui-font-size-note)!important; font-weight:var(--ui-font-weight-regular)!important; }
#stockAlertsPanel .stock-alert-expand[hidden], #stockAlertDetail .stock-alert-expand[hidden] { display:none!important; }
html.tasks-standard-active #stockAlertDetail { max-height:min(560px,calc(100dvh - 64px)); }
#stockAlertDetail .stock-alert-dialog-head { padding:8px 10px; }
#stockAlertDetail .stock-alert-dialog-content { padding:8px 10px; }
#stockAlertDetail .stock-alert-detail-table { max-height:min(360px,calc(100dvh - 240px)); }

/* 商品任务入口等宽排列，容纳不下时整格换行。 */
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-grade-value,
html.tasks-standard-active #stockAlertDetail .stock-alert-grade-value {
  font-size:var(--ui-font-size-business-status)!important;
  font-weight:var(--ui-font-weight-semibold)!important;
  color:var(--ui-color-text)!important;
  white-space:nowrap;
}
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-grade-value.warning,
html.tasks-standard-active #stockAlertDetail .stock-alert-grade-value.warning { color:var(--ui-color-warning)!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-grade-value.danger,
html.tasks-standard-active #stockAlertDetail .stock-alert-grade-value.danger { color:var(--ui-color-danger)!important; }
#stockAlertsPanel .stock-alert-grade-history, #stockAlertDetail .stock-alert-grade-history {
  white-space:normal;
  overflow-wrap:anywhere;
  font-weight:var(--ui-font-weight-regular)!important;
}
#stockAlertDetail .stock-alert-detail-grade { display:flex; align-items:center; gap:8px; }

html.tasks-standard-active #tasksPage #taskWorkbar #taskWorkMetrics {
  grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));
  grid-auto-rows:1fr;
  gap:8px;
}
html.tasks-standard-active #tasksPage #taskWorkbar #taskWorkMetrics > .task-work-metric {
  grid-column:auto;
  width:100%;
  min-width:0;
  height:100%;
  min-height:48px;
  box-sizing:border-box;
  padding:10px 12px;
  margin:0;
}
html.tasks-standard-active #tasksPage #taskWorkbar #taskWorkMetrics .task-work-metric-label {
  min-width:0;
  white-space:normal;
}
html.tasks-standard-active #tasksPage #taskWorkbar #taskWorkMetrics > .task-work-metric > strong {
  flex-shrink:0;
}

/* SKC任务：一条任务一行，沿用主模块批量菜单及全局表单。 */
html.tasks-standard-active #tasksPage #stockAlertsPanel tr.stock-alert-task-selected td { background:var(--ui-color-row-selected)!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-status.hold { color:var(--ui-color-muted)!important; }
#stockAlertsPanel .stock-alert-filters details { flex-shrink:0; }
#stockAlertsPanel .task-batch-menu-panel { z-index:300; }
#stockAlertDetail .stock-alert-dialog-foot:empty { display:none; }
#taskDialog .stock-alert-form-preview { max-height:180px; overflow:auto; border:1px solid var(--ui-color-border); margin-top:8px; }
#taskDialog .stock-alert-form-preview table { width:100%; border-collapse:collapse; font-size:var(--ui-font-size-body); }
#taskDialog .stock-alert-form-preview :is(th,td) { padding:6px 8px; border:1px solid var(--ui-color-border); text-align:left; }
#taskDialog .stock-alert-form-preview th { background:var(--ui-color-table-head); font-weight:var(--ui-font-weight-semibold); }

#stockAlertsPanel .stock-alert-status.repeated { color:var(--ui-color-danger)!important; }

/* 召回异常仅标记业务结果及异常尺码，不改变任务进度色。 */
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-recall,
html.tasks-standard-active #stockAlertDetail .stock-alert-recall { color:var(--ui-color-danger)!important; font-weight:var(--ui-font-weight-medium)!important; }
#stockAlertDetail > .global-keyword-tooltip { background:var(--ui-color-surface); color:var(--ui-color-text); border-color:var(--ui-color-control-border); font-size:var(--ui-font-size-note); }

/* 文字区域原生划选复制；选择列拖选不受影响。 */
html.tasks-standard-active #tasksPage #stockAlertsTable tbody td:not(:has(input[type="checkbox"])),
html.tasks-standard-active #stockAlertDetail table tbody td,
html.tasks-standard-active :is(#stockAlertsPanel,#stockAlertDetail) a.stock-alert-copy { user-select:text!important; -webkit-user-select:text!important; }
html.tasks-standard-active :is(#stockAlertsPanel,#stockAlertDetail) a.stock-alert-copy { cursor:pointer; text-decoration:none; }

/* 店长派发留言：约六字宽，首屏展示，沿用三行折叠。 */
html.tasks-standard-active #tasksPage #stockAlertsPanel td[data-sa-owner-note],
html.tasks-standard-active #tasksPage #stockAlertsPanel td[data-sa-owner-note] .stock-alert-cell-content { white-space:pre-wrap!important; overflow-wrap:anywhere; }

/* 超备程度仅用全局状态色显示单个灯，原因按需查看。 */
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-light { display:inline-flex; align-items:center; justify-content:center; width:1.2em; height:auto; min-height:0; padding:0; margin:0 0 2px; border:0; background:transparent; font-size:var(--ui-font-size-business-status)!important; font-weight:var(--ui-font-weight-semibold)!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-light.red { color:var(--ui-color-danger)!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-light.yellow { color:var(--ui-color-warning)!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-light.green { color:var(--ui-color-success)!important; }

/* 仅详情超备数字按数量分档，保持原计算及主表灯色。 */
html.tasks-standard-active #stockAlertDetail #stockAlertDetailTable .stock-alert-excess { color:var(--ui-color-text)!important; font-weight:var(--ui-font-weight-regular)!important; }
html.tasks-standard-active #stockAlertDetail #stockAlertDetailTable .stock-alert-excess.emphasis { font-weight:var(--ui-font-weight-semibold)!important; }
html.tasks-standard-active #stockAlertDetail #stockAlertDetailTable .stock-alert-excess.warning { color:var(--ui-color-warning)!important; }
html.tasks-standard-active #stockAlertDetail #stockAlertDetailTable .stock-alert-excess.danger { color:var(--ui-color-danger)!important; font-weight:var(--ui-font-weight-semibold)!important; }

#stockAlertDetail .stock-alert-selection-summary { flex-shrink:0; padding:4px 0; }
html.tasks-standard-active #stockAlertDetail #stockAlertDetailTable td.business-cell-selected { background:var(--ui-color-row-selected)!important; }
#stockAlertDetail .stock-alert-dialog-foot:has(.stock-alert-selection-summary):not(.stock-alert-has-selection) { display:none; }

/* 已确认方案2：业务栏目、处理进展、筛选及表格工具分层。 */
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-nav { flex-direction:column; align-items:stretch; gap:0; }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-nav .stock-alert-business-nav { gap:20px; padding:0 0 6px; border-bottom:1px solid var(--ui-color-border); }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-nav .stock-alert-business-nav button { position:relative; display:inline-flex; align-items:center; min-height:38px; padding:6px 12px; border:0; border-radius:0; background:transparent!important; color:var(--ui-color-muted)!important; font-size:var(--ui-font-size-section-title)!important; font-weight:var(--ui-font-weight-semibold)!important; line-height:var(--ui-line-height); }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-nav .stock-alert-business-nav button.active { color:var(--ui-color-title)!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-nav .stock-alert-business-nav button.active::before { content:""; position:absolute; left:0; top:9px; bottom:9px; width:3px; border-radius:2px; background:var(--ui-color-primary); }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-nav .stock-alert-progress-nav { gap:4px 8px; padding:6px 0; border:0; border-bottom:1px solid var(--ui-color-border); border-radius:0; background:transparent; }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-nav .stock-alert-progress-nav button { min-height:32px; padding:5px 12px; border:0; border-radius:6px; background:transparent!important; color:var(--ui-color-text)!important; font-size:var(--ui-font-size-body)!important; font-weight:var(--ui-font-weight-regular)!important; line-height:var(--ui-line-height); }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-nav .stock-alert-progress-nav button.active { background:var(--ui-color-primary-soft)!important; color:var(--ui-color-primary)!important; font-weight:var(--ui-font-weight-medium)!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-nav .stock-alert-progress-nav button span { font-size:var(--ui-font-size-body)!important; font-weight:var(--ui-font-weight-medium)!important; color:inherit!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-tools { padding:4px 0 6px; }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-tools strong { font-size:var(--ui-font-size-body)!important; font-weight:var(--ui-font-weight-semibold)!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel :is([data-sa-refresh],[data-sa-history],[data-sa-export],[data-sa-columns],[data-sa-save-columns]) { min-height:30px; padding:4px 8px; border:1px solid transparent!important; border-radius:6px; background:transparent!important; color:var(--ui-color-muted)!important; font-size:var(--ui-font-size-body)!important; font-weight:var(--ui-font-weight-medium)!important; line-height:var(--ui-line-height); }
html.tasks-standard-active #tasksPage #stockAlertsPanel :is([data-sa-refresh],[data-sa-history],[data-sa-export],[data-sa-columns],[data-sa-save-columns]):hover { background:var(--ui-color-hover)!important; color:var(--ui-color-text)!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel :is(.stock-alert-nav button,[data-sa-refresh],[data-sa-history],[data-sa-export],[data-sa-columns],[data-sa-save-columns]):focus-visible { outline:2px solid var(--ui-color-primary); outline-offset:2px; }

#stockAlertsPanel .stock-alert-nav .stock-alert-business-nav button span { font-size:var(--ui-font-size-body); font-weight:var(--ui-font-weight-medium); }

/* 本轮仅原版仓备预警中已确认的圣诞牵引项圈业务详情。 */
#stockAlertDetail.stock-alert-collar-detail { width:min(1040px,calc(100vw - 32px)); }
#stockAlertDetail.stock-alert-collar-detail .stock-alert-dialog-content { padding:10px 12px; }
#stockAlertDetail.stock-alert-collar-detail .stock-alert-dialog-foot:empty { display:none; }
#stockAlertDetail .collar-product-head { display:flex; align-items:center; gap:12px; padding-bottom:10px; border-bottom:1px solid var(--ui-color-border); flex-wrap:wrap; }
#stockAlertDetail .collar-image { display:flex; align-items:center; justify-content:center; width:64px; height:64px; flex:0 0 64px; padding:0; border:1px solid var(--ui-color-border); border-radius:6px; background:var(--ui-color-surface); overflow:hidden; cursor:pointer; }
#stockAlertDetail .collar-image img { display:block; width:64px; height:64px; object-fit:contain; flex:none; }
#stockAlertDetail .collar-image-empty, #stockAlertDetail .collar-image:disabled { cursor:default; color:var(--ui-color-muted); font-size:var(--ui-font-size-note); }
#stockAlertDetail .collar-product-identity { display:flex; flex-direction:column; gap:2px; min-width:0; }
#stockAlertDetail .collar-product-identity strong { font-size:var(--ui-font-size-section-title); font-weight:var(--ui-font-weight-semibold); }
#stockAlertDetail .collar-product-identity span { font-size:var(--ui-font-size-note); color:var(--ui-color-muted); }
#stockAlertDetail .collar-stock-facts { display:flex; flex-wrap:wrap; gap:6px 14px; margin-left:auto; font-size:var(--ui-font-size-body); }
#stockAlertDetail .collar-stock-facts b { font-weight:var(--ui-font-weight-medium); }
#stockAlertDetail .collar-section-heading { display:flex; align-items:center; gap:10px; margin:10px 0 6px; font-size:var(--ui-font-size-body); }
#stockAlertDetail .collar-section-heading strong { font-weight:var(--ui-font-weight-semibold); }
#stockAlertDetail .collar-section-heading span { margin-left:auto; font-weight:var(--ui-font-weight-medium); }
#stockAlertDetail .collar-shipment-scroll { overflow:auto; max-width:100%; border:1px solid var(--ui-color-border); border-radius:6px; }
#stockAlertDetail .collar-shipment-scroll table { width:100%; min-width:860px; table-layout:fixed; }
#stockAlertDetail .collar-col-order { width:180px; } #stockAlertDetail .collar-col-name { width:220px; } #stockAlertDetail .collar-col-quantity { width:70px; } #stockAlertDetail .collar-col-date { width:110px; } #stockAlertDetail .collar-col-person { width:110px; }
#stockAlertDetail .collar-shipment-scroll th, #stockAlertDetail .collar-shipment-scroll td { padding:7px 10px; font-size:var(--ui-font-size-body); line-height:1.4; font-weight:var(--ui-font-weight-regular); border-bottom:1px solid var(--ui-color-border); white-space:normal; overflow-wrap:anywhere; text-align:left; }
#stockAlertDetail .collar-shipment-scroll th { font-weight:var(--ui-font-weight-semibold); white-space:nowrap; }
#stockAlertDetail .collar-shipment-scroll tr:last-child td { border-bottom:0; }
#stockAlertDetail .collar-shipment-scroll th:nth-child(3), #stockAlertDetail .collar-shipment-scroll td:nth-child(3) { text-align:right; }
#stockAlertDetail .collar-number { font-weight:var(--ui-font-weight-medium); white-space:nowrap; }
#stockAlertDetail .collar-spec { display:block; color:var(--ui-color-muted); font-size:var(--ui-font-size-note); margin-top:2px; }
#stockAlertDetail .collar-evidence-note { margin-top:6px; }
#stockAlertDetail .collar-size-context { margin-top:6px; }
#stockAlertDetail .collar-size-context > summary { padding:6px 0; color:var(--ui-color-primary); font-size:var(--ui-font-size-body); font-weight:var(--ui-font-weight-medium); cursor:pointer; }
#stockAlertDetail .collar-detail-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; }
@media(max-width:760px) { #stockAlertDetail .collar-stock-facts { margin-left:76px; width:100%; gap:6px 12px; } #stockAlertDetail .collar-product-head { gap:8px 12px; } }

#stockAlertDetail .collar-order-more { display:block; border:0; padding:0; margin-top:2px; background:none; color:var(--ui-color-primary); font-size:var(--ui-font-size-note); font-weight:var(--ui-font-weight-regular); cursor:pointer; }
#stockAlertDetail .collar-order-extra[hidden] { display:none; }
#stockAlertDetail .collar-order-extra td { background:var(--ui-color-detail); }
#stockAlertDetail .collar-order-extra dl { display:flex; flex-wrap:wrap; gap:8px 24px; margin:0; }
#stockAlertDetail .collar-order-extra dt { color:var(--ui-color-muted); font-size:var(--ui-font-size-note); }
#stockAlertDetail .collar-order-extra dd { margin:2px 0 0; overflow-wrap:anywhere; }

#stockAlertDetail .collar-code-line { display:flex; align-items:center; flex-wrap:wrap; gap:4px; font-size:var(--ui-font-size-note); color:var(--ui-color-muted); }
#stockAlertDetail .collar-code-line .stock-alert-grade { display:inline-flex; align-items:center; gap:4px; }
#stockAlertDetail .collar-stock-facts { flex:0 0 auto; min-width:max-content; }

/* 仓备预警普通业务详情：身份信息按既定顺序合并展示。 */
#stockAlertDetail .stock-alert-detail-identity { display:flex; flex-wrap:wrap; align-items:center; gap:4px 0; color:var(--ui-color-text); font-size:var(--ui-font-size-body); font-weight:var(--ui-font-weight-regular); }
#stockAlertDetail .stock-alert-detail-identity > * { display:inline-flex; align-items:center; min-width:0; max-width:100%; overflow-wrap:anywhere; }
#stockAlertDetail .stock-alert-detail-identity > * + *::before { content:'｜'; margin:0 6px; color:var(--ui-color-muted); font-weight:var(--ui-font-weight-regular); }
#stockAlertDetail .stock-alert-detail-identity > strong { font-size:var(--ui-font-size-body); font-weight:var(--ui-font-weight-semibold); }
#stockAlertDetail .stock-alert-detail-identity .stock-alert-copy { white-space:normal; overflow-wrap:anywhere; }
#stockAlertDetail .stock-alert-identity-grade { gap:4px; }
#stockAlertDetail .stock-alert-detail-abnormal { display:inline-flex; align-items:center; flex-wrap:wrap; gap:4px; min-width:0; overflow-wrap:anywhere; }

/* 仓备预警商品层级：颜色与选项对应，全部使用全局角色变量。 */
html.tasks-standard-active :is(#stockAlertsPanel,#stockAlertDetail) .sa-grade-super { color:var(--ui-color-danger)!important; }
html.tasks-standard-active :is(#stockAlertsPanel,#stockAlertDetail) :is(.sa-grade-big,.sa-grade-downgraded) { color:var(--ui-color-warning)!important; }
html.tasks-standard-active :is(#stockAlertsPanel,#stockAlertDetail) .sa-grade-hot { color:var(--ui-color-primary)!important; }
html.tasks-standard-active :is(#stockAlertsPanel,#stockAlertDetail) :is(.sa-grade-normal,.sa-grade-ready) { color:var(--ui-color-text)!important; }
html.tasks-standard-active :is(#stockAlertsPanel,#stockAlertDetail) .sa-grade-unknown { color:var(--ui-color-muted)!important; }
html.tasks-standard-active :is(#stockAlertsPanel,#stockAlertDetail) .stock-alert-grade-attention.danger { color:var(--ui-color-danger)!important; }
html.tasks-standard-active :is(#stockAlertsPanel,#stockAlertDetail) .stock-alert-grade-attention.warning { color:var(--ui-color-warning)!important; }

/* 详情每款只显示一张64×64完整图片，逻辑占位兼容列设置和拖选。 */
#stockAlertDetail td.stock-alert-image-placeholder { display:none!important; }
#stockAlertDetail .stock-alert-style-image-cell { vertical-align:middle; text-align:center; }
html.tasks-standard-active #stockAlertDetail .stock-alert-style-image,
#stockAlertDetail .stock-alert-style-missing { display:inline-flex; flex:none; width:64px; min-width:64px; max-width:64px; height:64px; min-height:64px; padding:0; align-items:center; justify-content:center; box-sizing:border-box; }
#stockAlertDetail .stock-alert-style-image { border:0; background:transparent; cursor:pointer; }
#stockAlertDetail .stock-alert-style-image img { display:block; width:64px; min-width:64px; height:64px; object-fit:contain; }
#stockAlertDetail .stock-alert-style-missing { background:var(--ui-color-detail); color:var(--ui-color-muted); font-size:var(--ui-font-size-note); }
#stockAlertDetail #stockAlertDetailTable td.stock-alert-text,
#stockAlertDetail #stockAlertDetailTable td.stock-alert-text .stock-alert-copy { white-space:nowrap!important; overflow:visible; text-overflow:clip; }
#stockAlertDetail #stockAlertDetailTable .stock-alert-cell-content { display:block; max-height:none; overflow:visible; -webkit-line-clamp:unset; }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-light { width:auto; white-space:nowrap; font-size:var(--ui-font-size-body)!important; font-weight:var(--ui-font-weight-medium)!important; }
#stockAlertDetail.stock-alert-collar-detail .collar-product-head { grid-template-columns:minmax(0,1fr) auto; }

/* 仅仓备预警尺码明细：表头与帮助同行，建议补货数字使用关键数字角色。 */
#stockAlertDetail #stockAlertDetailTable .stock-alert-detail-head-label { display:inline-flex!important; align-items:center; gap:4px; width:max-content; max-width:none; white-space:nowrap!important; word-break:normal!important; overflow-wrap:normal!important; }
#stockAlertDetail #stockAlertDetailTable .stock-alert-detail-head-label .keyword-help { display:inline-flex!important; flex:0 0 auto; margin:0; }
#stockAlertDetail #stockAlertDetailTable td.stock-alert-suggested-quantity { font-size:var(--ui-font-size-body)!important; font-weight:var(--ui-font-weight-medium)!important; }

/* 2026-10-30确认：7天看平台真实备仓；14天看备仓＋在途，无圆点或胶囊。 */
html.tasks-standard-active #stockAlertsPanel .stock-alert-supply-risk { display:flex; flex-direction:column; gap:2px; white-space:nowrap; font-size:var(--ui-font-size-body); }
html.tasks-standard-active #stockAlertsPanel .stock-alert-supply-risk.urgent { border-left:3px solid var(--ui-color-danger); padding-left:10px; color:var(--ui-color-danger)!important; font-weight:var(--ui-font-weight-bold)!important; }
html.tasks-standard-active #stockAlertsPanel .stock-alert-supply-risk.warning { color:var(--ui-color-warning); font-weight:var(--ui-font-weight-medium); }
html.tasks-standard-active #stockAlertsPanel .stock-alert-supply-risk + .stock-alert-supply-risk { margin-top:6px; }
html.tasks-standard-active #stockAlertsPanel .stock-alert-supply-risk .stock-alert-note { color:var(--ui-color-muted); font-size:var(--ui-font-size-note); font-weight:var(--ui-font-weight-regular); }
html.tasks-standard-active :is(#stockAlertsPanel,#stockAlertDetail) .stock-alert-supply-quantity { display:block; text-align:right; white-space:nowrap; color:var(--ui-color-text); font-size:var(--ui-font-size-body)!important; font-weight:var(--ui-font-weight-bold)!important; }

/* 本次新增分配原因在长表和窄弹窗内完整换行，不缩小正文。 */
#stockAlertDetail .stock-alert-allocation-reason { display:block; max-width:28em; white-space:normal; overflow-wrap:anywhere; }

/* ERP核验进度沿用全局状态角色。 */
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-status.erp_paused { color:var(--ui-color-muted)!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-status.erp_handled { color:var(--ui-color-success)!important; }
html.tasks-standard-active #tasksPage #stockAlertsPanel .stock-alert-status.erp_processing { color:var(--ui-color-primary)!important; }

/* 已发货未入库沿用原列宽，窄列允许表头自然换行。 */
#stockAlertDetail #stockAlertDetailTable th[data-column-key="在途#1"] {
  white-space: normal !important;
  overflow-wrap: anywhere;
}
