/* 库存管理（stock.js）。2026-12-03 第二版：负责人看了第一版说「这个前端，不好看，要调整」「库存总览麻烦你去看看其他页面的总览」「采购订单的前端，要调整，很丑」。
   产品库存、采购订单的列表照金蝶成交客户那一套（customer-directory.css 的 cd-*：上面筛选区、中间工具栏、下面一行一条，不放大数字块）；
   库存总览照客户概况（sales-overview.css 的 so-*）；字一律深色、13px 以上，主次靠字号粗细；颜色只用 logo 的蓝和金，金色只给「照金蝶标准该留意」的那几种。
   有没有货、低不低一律写字，旁边一个小圆点帮着扫，不只靠颜色。 */

/* ---------- 几页共用 ---------- */
.stk-thumb { flex: none; display: grid; place-items: center; width: 40px; height: 40px; overflow: hidden; border: 1px solid #e9ebef; border-radius: 10px; background: #fff; color: #b5b8bf; }
.stk-thumb img { width: 100%; height: 100%; object-fit: contain; }
.stk-thumb svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.stk-state { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; white-space: nowrap; }
.stk-state i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--blue); }
.stk-state.none i { background: #c9cdd4; }
.stk-state.warn { color: var(--ink); font-weight: 600; }
.stk-state.warn i { background: var(--accent); box-shadow: 0 0 0 3px rgba(232, 160, 40, .16); }
.stk-twin { margin-left: 10px; color: var(--blue); font-size: 14px; text-decoration: none; white-space: nowrap; }
.stk-twin:hover { text-decoration: underline; }
.stk-synced { margin-right: 4px; color: var(--text); font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stk-th { display: inline-flex; align-items: center; gap: 4px; }
.stk-th .cpc-tip { width: 18px; height: 18px; }
.stk-th .cpc-tip svg { width: 15px; height: 15px; }
/* 数量：件和零头各占一小栏、右对齐，上下几行的数对得齐；没有件的（桶、升）占满两栏靠右。 */
.stk-q { color: var(--text); font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stk-q b { margin-right: 1px; color: var(--ink); font-size: 15px; font-weight: 600; }
.workpage .ftable.cd-table td.stk-num.soft .stk-q b { font-weight: 500; }
.workpage .ftable.cd-table td.stk-num { font-size: 14.5px; }
.workpage .ftable.cd-table td[data-how] { cursor: default; }
.workpage .ftable.cd-table td[data-how]:hover .stk-q, .workpage .ftable.cd-table td[data-how]:hover .stk-q b { color: var(--blue); }
.workpage .ftable.cd-table td.stk-spec, .workpage .ftable.cd-table td.stk-transit-cell { color: var(--text); font-variant-numeric: tabular-nums; }
.workpage .ftable.cd-table td.stk-state-cell[data-std] { cursor: default; }
/* 名字那一格：小图加两行以内的名字（金蝶品名去掉了包装那一截，全名停上去看） */
.workpage .ftable.cd-table td.stk-name-cell a { display: flex; align-items: center; gap: 12px; }
.workpage .ftable.cd-table td.stk-name-cell .cd-clamp { min-width: 0; }
/* 停上去浮出来的说明（共用 pages.js 的 floatLayer） */
.float-card.stk-float { width: 300px; max-width: calc(100vw - 24px); padding: 14px 16px 12px; }
/* 小卡片里：上面一行标题（左）和范围（右），一个大数，下面一行一样、名字在左数在右，分段之间一条细线 */
.stk-tip-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.stk-tip-top span { color: var(--ink); font-size: 13.5px; font-weight: 600; }
.stk-tip-top em { color: var(--text); font-size: 13px; font-style: normal; white-space: nowrap; }
.stk-tip-big { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; font-variant-numeric: tabular-nums; }
.stk-tip-big span { color: var(--text); font-size: 15px; }
.stk-tip-big svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--blue); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stk-tip-big b { color: var(--ink); font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
.stk-tip-kv { margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid #eef0f3; list-style: none; }
.stk-tip-kv li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 3px 0; color: var(--text); font-size: 13.5px; line-height: 1.55; }
.stk-tip-kv li span { flex: none; }
.stk-tip-kv li b { min-width: 0; color: var(--ink); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.stk-tip-sec { margin-top: 10px; padding-top: 10px; border-top: 1px solid #eef0f3; color: var(--ink); font-size: 13px; font-weight: 600; }
.stk-tip-sec + .stk-tip-kv { margin-top: 2px; padding-top: 0; border-top: 0; }
.stk-tip-note { margin: 10px 0 0; color: var(--text); font-size: 13.5px; line-height: 1.6; }
.stk-tip-name { margin: 8px 0 0; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.5; }

/* ---------- 产品库存：产品、规格、库存情况，后面三个数（现有库存、近 90 天出库、在拿的客户），箭头 ----------
   2026-12-03 第三版（负责人：「这个前端看着太挤了，不工整，不美观」）：一格只放一个数，名字那一栏放宽，文字的几栏在前、数在后，数的几栏等宽靠右。 */
.workpage .ftable.stk-prod table { min-width: 960px; table-layout: fixed; }
.stk-prod col.cw-spec { width: 120px; }
.stk-prod col.cw-state { width: 220px; }
.stk-prod col.cw-stock { width: 140px; }
.stk-prod col.cw-sold { width: 150px; }
.stk-prod col.cw-cust { width: 120px; }
.stk-prod col.cw-go { width: 52px; }
.workpage .ftable.stk-prod td.stk-state-cell { padding-left: 18px; }
.workpage .ftable.stk-prod th:nth-child(3) { padding-left: 18px; }
@media (max-width: 1439px) {
  .workpage .ftable.stk-prod table { min-width: 880px; }
  .stk-prod col.cw-spec { width: 100px; }
  .stk-prod col.cw-state { width: 200px; }
  .stk-prod col.cw-stock { width: 124px; }
  .stk-prod col.cw-sold { width: 130px; }
  .stk-prod col.cw-cust { width: 104px; }
  .stk-prod col.cw-go { width: 36px; }
}

/* ---------- 采购订单：上面几个大数（全部、未全部入库、全部入库、已作废，点一下就按它筛），下面单号、下单日期、供应商、产品、入库情况、箭头（点一行出明细） ---------- */
.workpage .products-panel .stk-po-tabs { margin-bottom: 18px; }
.workpage .ftable.stk-po-list table { min-width: 900px; table-layout: fixed; }
.stk-po-list col.cw-doc { width: 168px; }
.stk-po-list col.cw-date { width: 118px; }
.stk-po-list col.cw-sup { width: 26%; }
.stk-po-list col.cw-st { width: 168px; }
.stk-po-list col.cw-go { width: 44px; }
.workpage .ftable.cd-table.stk-po-list tbody tr { cursor: pointer; }
.workpage .ftable.cd-table td.stk-doc { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.workpage .ftable.cd-table td.stk-date { font-variant-numeric: tabular-nums; }
.workpage .ftable.cd-table td.stk-sup, .workpage .ftable.cd-table td.stk-goods { white-space: normal; }
.stk-goods .stk-more { white-space: nowrap; }   /* 「等 3 款」不拆到两行 */
/* 搜不到完全对上的、给的是最接近的几款时，工具栏左边那句用深色字写明（平时的「共几款」照列表那一套） */
.cd-toolbar .stk-near { color: var(--ink); font-size: 14px; }
.cd-toolbar .stk-near b { color: var(--ink); font-weight: 700; }
@media (max-width: 1439px) {
  .stk-po-list col.cw-doc { width: 150px; }
  .stk-po-list col.cw-date { width: 108px; }
  .stk-po-list col.cw-st { width: 150px; }
  .stk-po-list col.cw-go { width: 34px; }
}
/* 停在入库情况上的进度卡片：每样货一行，已入库 / 订货数量，一根进度条，下面未入库多少、交货日期 */
.workpage .ftable.cd-table td.stk-po-state { cursor: default; }
.stk-po-prog { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px solid #eef0f3; list-style: none; }
.stk-po-prog li { min-width: 0; }
.stk-po-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
/* 同一张单上常是同一个系列的几种黏度，名字后半截才分得开，所以名字最多两行、不截成一行 */
.stk-po-line b { display: -webkit-box; min-width: 0; overflow: hidden; color: var(--ink); font-size: 13.5px; font-weight: 600; line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.stk-po-line span { line-height: 1.5; }
.stk-po-line span { flex: none; color: var(--ink); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.stk-po-prog .so-meter { display: block; width: 100%; max-width: none; height: 6px; margin-top: 6px; }
.stk-po-prog p { margin: 4px 0 0; color: var(--text); font-size: 13px; }
/* 点一行出的明细（抽屉，12-03 负责人：「这个页面前端不好看」）：入库情况、对齐的两栏单据信息（分隔线连成一整条）、
   每款产品一块入库进度。标签、单位都是深色字，主次靠字号粗细。抽屉的头是全站共用的，只在这张明细里把小标题调成深色、单号大一点。 */
.drawer:has(.stk-pod) .drawer-head small { color: var(--text); font-size: 13.5px; }
.drawer:has(.stk-pod) .drawer-head h3 { margin-top: 4px; font-size: 21px; font-weight: 700; letter-spacing: .01em; }
.drawer:has(.stk-pod) .drawer-head p:empty { display: none; }
.stk-pod { display: grid; gap: 24px; padding-top: 4px; }
.stk-pod-state .stk-state { font-size: 16px; font-weight: 600; color: var(--ink); }
.stk-pod-state .stk-state i { width: 10px; height: 10px; }
.stk-pod-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid #e9ebef; }
.stk-pod-facts div { display: grid; grid-template-columns: 4.6em minmax(0, 1fr); align-items: baseline; gap: 14px; min-width: 0; padding: 13px 18px 13px 0; border-bottom: 1px solid #e9ebef; }
.stk-pod-facts div.wide { grid-column: 1 / -1; }
.stk-pod-facts dt { color: var(--text); font-size: 14px; white-space: nowrap; }
.stk-pod-facts dd { min-width: 0; margin: 0; color: var(--ink); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stk-pod-sec header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid #e9ebef; }
.stk-pod-sec h3 { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--ink); font-size: 16px; font-weight: 600; }
.stk-pod-sec header > span { color: var(--text); font-size: 14px; white-space: nowrap; }
.stk-pod-lines { margin: 0; padding: 0; list-style: none; }
.stk-pod-lines li { padding: 16px 0; border-bottom: 1px solid #e9ebef; }
.stk-pod-line { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.stk-pod-line a { min-width: 0; color: var(--ink); text-decoration: none; }
.stk-pod-line a b { font-size: 15px; font-weight: 600; line-height: 1.55; }
.stk-pod-line a:hover b { color: var(--blue); }
.stk-pod-qty { flex: none; color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stk-pod-qty b { font-size: 17px; font-weight: 700; }
.stk-pod-meta { margin: 3px 0 0; color: var(--text); font-size: 14px; }
.stk-pod-lines .so-meter { display: block; width: 100%; max-width: none; height: 6px; margin-top: 12px; }
.stk-pod-note { margin: 8px 0 0; color: var(--text); font-size: 14px; }
.stk-pod-note.warn { color: var(--ink); font-weight: 600; }
@media (max-width: 560px) {
  .stk-pod-facts { grid-template-columns: minmax(0, 1fr); }
  .stk-pod-facts div { padding-right: 0; }
}

/* ---------- 产品详情的录入记录：照客户档案的录入记录（customer-profile.css 的 cpe-*）；介绍一项多半是一句话，一项一行，不挤在一行里 ---------- */
.stk-entries .cpe-items { flex-direction: column; gap: 6px; }
/* 项名一栏对齐，字从同一条线开始；「原来……」写在字下面 */
.stk-entries .cpe-it { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); align-items: baseline; gap: 2px 14px; }
.stk-entries .cpe-before { grid-column: 2; }

/* ---------- 产品介绍标准：一张卡片，一项一行（顺序、名字、写什么、写了几款、状态、停用），底下一条保存（和信息采集标准一个样子） ---------- */
.ist-page .workspace { margin: 0; }
.ist-form { display: grid; gap: 16px; }
.ist-card { padding: 22px 28px 14px; }
.ist-card > header { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.ist-card h2 { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ink); font-size: 17px; font-weight: 600; line-height: 26px; }
.ist-card > header .cd-btn { margin-left: auto; }
.ist-row { display: grid; grid-template-columns: 76px minmax(150px, .8fr) minmax(220px, 1.6fr) 104px 64px 56px; align-items: center; gap: 14px; min-height: 60px; border-top: 1px solid #f0f2f5; color: var(--text); font-size: 14.5px; transition: background-color .3s ease; }
.ist-row.head { min-height: 42px; border-top: 0; font-size: 13.5px; font-weight: 500; }
.ist-row.moved { background: #f5f9fc; }
.ist-row input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid #d8dde5; border-radius: 10px; color: var(--ink); background: #fff; font: inherit; font-size: 14.5px; }
.ist-row input[name="hint"] { color: var(--text); font-size: 14px; }
/* 点中时只让框线变蓝，不再外套一圈光（2026-12-03 负责人：「前端不要有这种框内方框，弄自然点。」） */
.ist-row input:focus { outline: 0; border-color: var(--blue); box-shadow: none; }
.ist-row input:disabled { padding-left: 0; border-color: transparent; background: none; color: var(--ink); -webkit-text-fill-color: var(--ink); opacity: 1; }
.ist-row.off input { text-decoration: line-through; text-decoration-color: #b6bbc3; }
.ist-row.off input[name="label"] { color: var(--text); -webkit-text-fill-color: var(--text); }
.ist-move { display: inline-flex; gap: 4px; }
.ist-move button { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 8px; color: var(--text); background: none; cursor: pointer; transition: background-color .12s ease, border-color .12s ease, color .12s ease; }
.ist-move button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ist-move button:hover:not(:disabled) { border-color: var(--blue-line); background: #fff; color: var(--blue); }
.ist-move button:disabled { opacity: .3; cursor: default; }
.ist-n { color: var(--text); font-size: 14px; white-space: nowrap; }
.ist-n b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.ist-state { color: var(--text); font-size: 14px; white-space: nowrap; }
.ist-row.off .ist-state { color: var(--ink); font-weight: 600; }
.ist-toggle { justify-self: end; padding: 6px 4px; border: 0; color: var(--blue); background: none; font: inherit; font-size: 14px; cursor: pointer; }
.ist-toggle:hover { text-decoration: underline; }
.ist-foot { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 14px; padding: 14px 28px; border: 1px solid var(--border); border-radius: 14px; background: rgb(255 255 255 / 94%); backdrop-filter: blur(8px); }
.ist-error { flex: 1; color: #b42318; font-size: 14px; }
.ist-foot .cd-btn { height: 40px; }
.ist-foot .cd-btn.primary { min-width: 112px; }
.ist-readonly { margin: 0; padding: 0 4px; color: var(--text); font-size: 14px; }

/* ---------- 库存总览（照客户概况：一排事实、一排照金蝶标准的数、几张卡片） ---------- */
.stk-ov-page .crm-actions { align-items: center; gap: 6px; padding-top: 0; }
.stk-ov-page .so-ico svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.stk-brands a { grid-template-columns: 22px minmax(4em, 7em) minmax(24px, 1fr) 76px 56px; min-height: 48px; }
.stk-top a { grid-template-columns: 22px minmax(0, 1.5fr) minmax(32px, 1fr) 104px 52px; }
.stk-top li:nth-child(-n+3) .so-no { color: var(--accent-deep); font-weight: 700; }
.stk-below a { grid-template-columns: minmax(0, 1.5fr) minmax(32px, 1fr) 96px 136px; }
.stk-of { color: var(--text); }
.stk-none-list a { grid-template-columns: minmax(0, 1fr) 50px 48px minmax(0, 100px); }
.stk-recv a { grid-template-columns: 46px minmax(0, 1fr) 92px minmax(0, 150px); }
.stk-recv time, .stk-none-list time { text-align: left; }
.stk-ov-note { color: var(--text); text-align: right; }
.stk-ov-empty { min-height: 200px; }
@media (max-width: 1439px) {
  .stk-top a { grid-template-columns: 22px minmax(0, 1.5fr) minmax(24px, .8fr) 96px 48px; }
  .stk-below a { grid-template-columns: minmax(0, 1.4fr) minmax(24px, .7fr) 88px 128px; }
  .stk-recv a { grid-template-columns: 46px minmax(0, 1fr) 88px minmax(0, 110px); }
}

/* ---------- 产品详情：上面照片、名字、几个数（参考金聚诚小程序的商品页） ---------- */
.stk-hero { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 30px; padding: 26px 28px; border: 1px solid var(--cdp-line); border-radius: 18px; background: #fff; }
.stk-gallery { display: grid; gap: 10px; align-content: start; }
.stk-main { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; padding: 0; border: 1px solid var(--cdp-line); border-radius: 16px; background: #fff; cursor: zoom-in; }
.stk-main img { width: 100%; height: 100%; object-fit: contain; transition: transform .25s var(--ease); }
.stk-main:hover img { transform: scale(1.02); }
.stk-gallery.empty .stk-main { gap: 10px; align-content: center; background: var(--fill-soft); color: #9aa0a9; cursor: default; }
.stk-gallery.empty .stk-main > svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.stk-gallery.empty .stk-main span { color: var(--text-regular); font-size: 14px; }
.stk-strip { display: flex; gap: 8px; overflow-x: auto; }
.stk-strip button { flex: none; width: 58px; height: 58px; padding: 0; overflow: hidden; border: 1.5px solid var(--cdp-line); border-radius: 10px; background: #fff; cursor: pointer; }
.stk-strip button.on { border-color: var(--blue); }
.stk-strip img { width: 100%; height: 100%; object-fit: contain; }
.stk-info { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.stk-info h1 { margin: 2px 0 0; color: var(--ink); font-size: 24px; font-weight: 650; line-height: 1.4; letter-spacing: -.01em; }
.stk-meta { display: flex; flex-wrap: wrap; gap: 6px 0; margin: -4px 0 0; color: var(--text-regular); font-size: 14px; }
.stk-meta span + span::before { content: "·"; margin: 0 9px; color: #c2c5cc; }
.stk-now { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin: 2px 0 0; }
.stk-now .stk-state { font-size: 16px; }
.stk-now .stk-state i { width: 10px; height: 10px; }
.stk-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--cdp-line); border-radius: 14px; background: #fafbfc; }
.stk-fig { min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-left: 1px solid #eef0f3; }
.stk-fig:first-child { border-left: 0; }
.stk-fig span { color: #5d616b; font-size: 13px; }
.stk-fig b { overflow: hidden; color: var(--ink); font-size: 21px; font-weight: 650; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stk-fig em { color: #5d616b; font-size: 13px; font-style: normal; }
.stk-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.stk-detail .cdp-tabs button small { margin-left: 6px; color: #5d616b; font-size: 13px; font-weight: 400; }

/* 介绍：一行一项，标签在左 */
.stk-intro { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.stk-intro div { min-width: 0; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; margin-bottom: -1px; padding: 13px 26px 13px 0; border-bottom: 1px solid var(--cdp-soft); }
.stk-intro dt { color: #5d616b; font-size: 13.5px; line-height: 1.7; }
.stk-intro dd { margin: 0; color: var(--ink); font-size: 14.5px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.stk-intro dd.blank { color: #9aa0a9; }
.stk-card-acts { display: flex; align-items: center; gap: 8px; }
.stk-icon-btn { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--border-strong); border-radius: 10px; background: #fff; color: var(--text); cursor: pointer; transition: background .12s ease, color .12s ease, border-color .12s ease; }
.stk-icon-btn:hover { border-color: var(--blue-line); background: var(--blue-tint); color: var(--blue); }
.stk-icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.stk-intro-form { display: grid; gap: 18px; }
.stk-intro-form[hidden] { display: none; }
.stk-intro-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; }
.stk-intro-grid label { display: grid; gap: 7px; }
.stk-intro-grid label > span { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; font-weight: 600; }
.stk-intro-form textarea { width: 100%; padding: 10px 12px; border: 1px solid #d8dde5; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; line-height: 1.65; resize: vertical; transition: border-color .15s ease, background-color .15s ease; }
.stk-intro-form textarea:focus { border-color: var(--blue); outline: 0; box-shadow: none; }
.stk-intro-grid label.ai textarea { border-color: var(--blue-line); background: #f5fafd; }
.stk-ai-tag { padding: 1px 7px; border-radius: 6px; color: var(--blue); background: #e4f3fb; font-size: 13px; font-style: normal; font-weight: 500; }
.stk-ai-tag[hidden] { display: none; }
.stk-also { grid-column: 1 / -1; display: grid; gap: 8px; margin: 0; padding: 12px 14px; border: 1px solid var(--cdp-line); border-radius: 12px; }
.stk-also legend { padding: 0 6px; color: var(--text); font-size: 13.5px; font-weight: 600; }
.stk-also label { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 13.5px; }
.stk-form-note { grid-column: 1 / -1; min-height: 0; margin: 0; color: var(--danger); font-size: 13.5px; }
.stk-form-note:empty { display: none; }
.stk-form-ops { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; }

/* 语音录入的框（在编辑里，表的最上面）：说一段或者打字，字放在框里，确认了 AI 按项填进下面 */
.stk-voice { display: grid; gap: 12px; padding: 16px 18px; border: 1px solid var(--blue-line); border-radius: 14px; background: #f7fbfe; }
.stk-voice-head { display: flex; align-items: center; gap: 12px; }
.stk-voice-ico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--blue); background: #e4f3fb; }
.stk-voice-ico svg, .stk-voice .cd-btn svg, .stk-card-acts .cd-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stk-voice-head b { display: block; color: var(--ink); font-size: 15px; font-weight: 600; }
.stk-voice-head div > span { display: block; margin-top: 2px; color: var(--text); font-size: 13.5px; }
.stk-voice .stk-voice-text { min-height: 84px; background: #fff; }
.stk-voice-ops { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.stk-voice-note { margin-right: auto; color: var(--text); font-size: 13.5px; }
.stk-voice-note:empty { display: none; }
.stk-voice-ops .cd-btn[hidden] { display: none; }

/* 改动记录 */

/* 库存、出货、市场 */
.stk-mini { width: 100%; border-collapse: collapse; font-size: 14px; }
.stk-mini th { height: 38px; padding: 0 10px 0 0; color: #5d616b; font-size: 13px; font-weight: 400; text-align: left; border-bottom: 1px solid var(--cdp-soft); }
.stk-mini td { height: 44px; padding: 0 10px 0 0; color: var(--ink); border-bottom: 1px solid var(--cdp-soft); white-space: nowrap; }
.stk-mini th + th, .stk-mini td + td { padding-left: 22px; }
.stk-mini th:first-child, .stk-mini td:first-child { width: 46%; }
.stk-mini .r { text-align: right; font-variant-numeric: tabular-nums; }
.stk-none { margin: 6px 0; color: var(--text-regular); font-size: 14px; line-height: 1.7; }
.stk-lead { margin: 0 0 12px; color: var(--text); font-size: 14.5px; line-height: 1.75; }
.stk-lead b { color: var(--ink); font-size: 16px; font-variant-numeric: tabular-nums; }
.stk-lines, .stk-sibs { margin: 0; padding: 0; list-style: none; }
.stk-lines li { display: grid; grid-template-columns: 58px 92px minmax(0, 1fr); align-items: center; gap: 14px; min-height: 42px; border-top: 1px solid #f0f2f5; font-size: 14px; }
.stk-lines li:first-child, .stk-sibs li:first-child { border-top: 0; }
.stk-lines b { color: var(--ink); }
.stk-lines span { overflow: hidden; color: var(--text-regular); text-overflow: ellipsis; white-space: nowrap; }
.stk-sibs li { border-top: 1px solid #f0f2f5; }
.stk-sibs a { display: grid; grid-template-columns: 40px 150px minmax(70px, 1fr) auto auto; align-items: center; gap: 14px; min-height: 58px; color: var(--text); text-decoration: none; font-size: 14px; }
.stk-sibs a:hover b { color: var(--blue); }
.stk-sibs b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.stk-sibs em { color: var(--ink); font-style: normal; font-weight: 600; }
.stk-plot { min-height: 220px; }
.stk-plot svg.so-chart { display: block; width: 100%; height: auto; overflow: visible; fill: none; }
.stk-plot .so-bar.gold { fill: var(--accent); }
.stk-rank li { grid-template-columns: 22px minmax(0, 1.3fr) minmax(40px, 1fr) 64px minmax(96px, auto); }
.stk-rank li.mine b, .stk-rank li.mine .so-n { color: var(--blue); }

/* 照片位：正面、背标、整箱各一张，更多可以很多张 */
.stk-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 26px; }
.stk-slot.more { grid-column: 1 / -1; }
.stk-slot header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.stk-slot h4 { margin: 0; color: var(--ink); font-size: 15px; font-weight: 600; }
.stk-slot header span { color: #5d616b; font-size: 13px; }
.stk-tiles { display: flex; flex-wrap: wrap; gap: 12px; }
.stk-tile { position: relative; width: 132px; margin: 0; }
.stk-tile-img { display: block; width: 132px; height: 132px; padding: 0; overflow: hidden; border: 1px solid var(--cdp-line); border-radius: 14px; background: #fff; cursor: zoom-in; }
.stk-tile-img img { width: 100%; height: 100%; object-fit: contain; }
.stk-tile figcaption { display: flex; justify-content: center; gap: 4px; margin-top: 6px; }
.stk-tile figcaption button { height: 28px; padding: 0 8px; border: 0; border-radius: 6px; background: none; color: var(--blue); font: inherit; font-size: 13px; cursor: pointer; }
.stk-tile figcaption button:hover { background: var(--blue-tint); }
.stk-tile figcaption button[data-remove] { color: var(--danger); }
.stk-tile.add { display: grid; place-items: center; align-content: center; gap: 6px; height: 132px; border: 1.5px dashed var(--border-deep); border-radius: 14px; background: #fafbfc; color: var(--text); font-size: 13.5px; cursor: pointer; transition: border-color .12s ease, background .12s ease, color .12s ease; }
.stk-tile.add:hover, .stk-tile.add.over { border-color: var(--blue); background: var(--blue-tint); color: var(--blue); }
.stk-tile.add svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.stk-upload-note { margin: 12px 0 0; color: var(--blue); font-size: 13.5px; }
.stk-upload-note:empty { display: none; }

.stk-lightbox { max-width: min(92vw, 1100px); max-height: 92vh; padding: 18px; border: 0; border-radius: 18px; background: #fff; }
.stk-lightbox::backdrop { background: rgba(20, 21, 28, .72); }
.stk-lightbox img { display: block; max-width: 100%; max-height: calc(92vh - 90px); margin: 0 auto; object-fit: contain; }
.stk-lightbox p { margin: 12px 0 0; color: var(--text); font-size: 14px; text-align: center; }
.stk-lb-close { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--fill); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }

/* 详情页上的几样小东西（第二版加的） */
.stk-count-h { margin-left: 10px; color: var(--text); font-size: 13.5px; font-weight: 400; }
.stk-card-side { color: var(--text); font-size: 13.5px; }
.stk-text-link { display: inline-flex; align-items: center; gap: 3px; margin-right: 8px; color: var(--blue); font-size: 14px; text-decoration: none; white-space: nowrap; }
.stk-text-link svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stk-card-acts .cd-btn[hidden] { display: none; }
.stk-text-link:hover { text-decoration: underline; }
.stk-fig[data-how], .stk-fig[data-std] { cursor: default; outline: 0; transition: background-color .15s ease; }
.stk-fig[data-how]:hover, .stk-fig[data-std]:hover, .stk-fig[data-how]:focus-visible, .stk-fig[data-std]:focus-visible { background: #f3f8fb; }
.stk-fig:first-child { border-radius: 14px 0 0 14px; }
.stk-fig:last-child { border-radius: 0 14px 14px 0; }
.stk-now .stk-twin { margin-left: 0; font-size: 14.5px; }
/* 「库存」页签的「金蝶里的数」：左边金蝶的原数换成库存单位，右边金蝶物料上设的标准，和停上去那张小卡片一个样子 */
.stk-kd { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 44px; }
.stk-kd-col { min-width: 0; }
.stk-kd-col + .stk-kd-col { padding-left: 44px; border-left: 1px solid #eef0f3; }
.stk-kd .stk-tip-kv li { font-size: 14px; padding: 5px 0; }

/* ---------- 手机、窄屏：列表换成卡片 ---------- */
@media (max-width: 1000px) {
  .stk-card { display: block; color: inherit; text-decoration: none; }
  .stk-card header { justify-content: flex-start; align-items: center; gap: 12px; }
  .stk-card header b { min-width: 0; }
  .stk-card footer { justify-content: flex-start; flex-wrap: wrap; gap: 6px 14px; }
  .stk-card-spec { margin-left: auto; color: var(--text); font-size: 14px; }
  .stk-hero { grid-template-columns: minmax(0, 1fr); padding: 18px; gap: 18px; }
  .stk-gallery { max-width: 420px; }
  .stk-gallery.empty .stk-main { aspect-ratio: auto; min-height: 150px; padding: 18px; }
  .stk-meta { gap: 4px 14px; }
  .stk-meta span + span::before { display: none; }
  .stk-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stk-tile, .stk-tile-img, .stk-tile.add { width: 112px; }
  .stk-tile-img, .stk-tile.add { height: 112px; }
  .stk-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stk-fig:nth-child(3) { border-left: 0; }
  .stk-fig:nth-child(n+3) { border-top: 1px solid #eef0f3; }
  .stk-fig:first-child, .stk-fig:last-child { border-radius: 0; }
  .stk-intro, .stk-intro-grid { grid-template-columns: minmax(0, 1fr); }
  .stk-kd { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .stk-kd-col + .stk-kd-col { padding: 18px 0 0; border-left: 0; border-top: 1px solid #eef0f3; }
  .stk-voice-ops { flex-wrap: wrap; }
  .stk-sibs a { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .stk-sibs a span, .stk-sibs a .stk-state { display: none; }
  .ist-card { padding: 16px 14px 8px; }
  .ist-row { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 8px 10px; padding: 12px 0; }
  .ist-row.head { display: none; }
  .ist-row > .ist-move { grid-row: 1 / span 2; }
  .ist-row > input[name="label"] { grid-column: 2 / -1; }
  .ist-row > input[name="hint"] { grid-column: 2 / -1; }
  .ist-row > .ist-n { grid-column: 2; }
  .ist-row > .ist-state { display: none; }
  .ist-foot { padding: 12px 96px 12px 14px; }
  .ist-foot .cd-btn.primary { flex: 1; }
  .ist-error:empty { display: none; }
}
@media (max-width: 760px) {
  .stk-brands a { grid-template-columns: 22px minmax(0, 1fr) 72px 50px; }
  .stk-top a { grid-template-columns: 20px minmax(0, 1fr) 92px; }
  .stk-top a > .so-n:last-child { display: none; }
  .stk-below a { grid-template-columns: minmax(0, 1fr) 84px; }
  .stk-below .stk-of { display: none; }
  .stk-none-list a { grid-template-columns: minmax(0, 1fr) 46px 46px; }
  .stk-none-list .stk-ov-note { display: none; }
  .stk-recv a { grid-template-columns: 46px minmax(0, 1fr) 88px; }
  .stk-recv .stk-ov-note { display: none; }
}
