/* 乔联OA后台 · 网页版
 *
 * 配色与安卓端一致：主色 #367C2B（Theme.kt 的 BrandTeal）。
 * 出入库方向色也沿用同一套：入库蓝 / 出库绿 / 制造橙。
 */
:root {
  --brand: #367C2B;
  --brand-dark: #2A6021;
  --brand-light: #E8F2E5;
  --in: #1565C0;      /* 入库 */
  --out: #2E7D32;     /* 出库 */
  --make: #EF6C00;    /* 制造 */
  --danger: #C62828;
  --warn: #EF6C00;
  --text: #1F2421;
  --muted: #6B7269;
  --line: #E2E6E0;
  --bg: #F5F7F4;
  --card: #FFFFFF;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .07);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
  font-size: 14px; color: var(--text); background: var(--bg);
}

button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ---------------------------------------------------------------- 登录 */
#login {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-dark) 100%);
}
.login-card {
  width: 360px; background: #fff; border-radius: 14px; padding: 30px 28px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .22);
}
.login-card h1 { margin: 0 0 4px; font-size: 21px; text-align: center; color: var(--brand); }
.login-card .sub { text-align: center; color: var(--muted); font-size: 12px; margin-bottom: 22px; }
.login-logo {
  width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 20px;
  background: var(--brand); display: flex; align-items: center; justify-content: center;
  color: #F5C518; font-weight: 800; font-size: 27px; letter-spacing: 1px;
}

/* ---------------------------------------------------------------- 布局 */
#app { display: none; height: 100vh; }
#app.on { display: flex; }

.side {
  width: 186px; flex: 0 0 186px; background: var(--brand); color: #fff;
  display: flex; flex-direction: column;
}
.side .brand {
  padding: 16px 14px; font-weight: 700; font-size: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
}
.side nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.side nav a {
  display: block; padding: 10px 16px; color: rgba(255, 255, 255, .88);
  text-decoration: none; cursor: pointer; border-left: 3px solid transparent;
}
.side nav a:hover { background: rgba(255, 255, 255, .1); }
.side nav a.on {
  background: rgba(255, 255, 255, .17); border-left-color: #F5C518;
  color: #fff; font-weight: 600;
}
.side .who {
  padding: 12px 14px; border-top: 1px solid rgba(255, 255, 255, .16);
  font-size: 12px; color: rgba(255, 255, 255, .8);
}
.side .who .who-label {
  font-size: 11px; color: rgba(255, 255, 255, .65); margin-bottom: 5px;
}
/* 左侧菜单里的品类下拉（用户要求：左边菜单下拉选择品类） */
.side .who select {
  width: 100%; padding: 6px 8px; border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .1); color: #fff; outline: none;
  font-size: 12px; cursor: pointer;
}
.side .who select:hover { background: rgba(255, 255, 255, .18); }
/* 下拉弹出项在 Windows 上跟随系统配色，白底黑字才看得清 */
.side .who select option { color: #1F2421; background: #fff; }
.side .who button {
  margin-top: 8px; width: 100%; padding: 6px; border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .45); background: transparent;
  color: #fff; cursor: pointer;
}
.side .who button:hover { background: rgba(255, 255, 255, .14); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 52px; flex: 0 0 52px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
}
.topbar h2 { margin: 0; font-size: 16px; font-weight: 600; }
.topbar .grow { flex: 1; }
.content { flex: 1; overflow-y: auto; padding: 16px; }

/* ---------------------------------------------------------------- 组件 */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px; margin-bottom: 14px;
}
.card h3 { margin: 0 0 10px; font-size: 15px; }

.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid.c4 { grid-template-columns: repeat(2, 1fr); } }

.stat { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.stat .k { color: var(--muted); font-size: 12px; }
.stat .v { font-size: 22px; font-weight: 700; margin-top: 4px; }
.stat .v.brand { color: var(--brand); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap; }
tbody tr:hover { background: #FAFCF9; }
td.num, th.num { text-align: right; }
td.right { text-align: right; }

input[type=text], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); }

/* ------------------------------------------------ 开单弹窗的一行明细
 *
 * 2026-10-29 用户要求：「新增销售单页面再宽一点  同一个产品信息放到一行里」。
 * 一行放：图片 / 商品·参考号码 / 数量 / 单价 / 备注 / 删除。
 */
.oc-form .grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ocRow {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}
.ocRow .ocImg { width: 40px; flex: 0 0 40px; }
.ocRow .ocMain { flex: 2 1 280px; min-width: 220px; }
.ocRow .ocQty { width: 86px; flex: 0 0 86px; }
.ocRow .ocPrice { width: 104px; flex: 0 0 104px; }
.ocRow .ocAmt {
  flex: 0 0 108px;
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.ocRow .ocRowRemark { flex: 1 1 180px; min-width: 120px; margin: 0; }
.ocRow .ocPicked { min-height: 15px; line-height: 15px; margin-top: 2px; }
/* 窄屏（笔记本缩放 / 小窗口）自动折成两行，别把输入框挤没 */
@media (max-width: 1100px) {
  .ocRow { flex-wrap: wrap; }
  .ocRow .ocMain { flex: 1 1 100%; }
  .ocRow .ocRowRemark { flex: 1 1 100%; }
}

/* 2026-10-29 用户要求「取消这个」：数字输入框右侧的上下小箭头（原生 spinner）
   太占地方、也容易误点，全部去掉；需要微调用键盘上下键即可。 */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}
label.f { display: block; margin-bottom: 12px; }
label.f > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; }

.btn {
  padding: 8px 16px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; color: var(--text);
}
.btn:hover { background: #F2F5F0; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.danger { color: var(--danger); border-color: #F0C6C6; }
.btn.danger:hover { background: #FDF0F0; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { padding: 4px 10px; font-size: 12px; }

/* 商品详情页的「入库 / 出库 / 制造」：加大 + 上色（2026-10-28 用户要求） */
.btn.op {
  padding: 10px 22px; font-size: 15px; font-weight: 600;
  border-radius: 10px; border: none; color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}
.btn.op:hover { filter: brightness(1.08); color: #fff; }
.btn.op-in   { background: var(--in); }     /* 入库：蓝 */
.btn.op-out  { background: var(--out); }    /* 出库：绿 */
.btn.op-make { background: var(--make); }   /* 制造：橙 */

.tag {
  display: inline-block; padding: 2px 8px; border-radius: 20px;
  font-size: 11px; background: var(--brand-light); color: var(--brand-dark);
  white-space: nowrap;
}
.tag.gray { background: #EEF1ED; color: var(--muted); }
.tag.in { background: #E3F0FB; color: var(--in); }
.tag.out { background: #E4F1E5; color: var(--out); }
.tag.make { background: #FDEEDD; color: var(--make); }
.tag.danger { background: #FBE9E9; color: var(--danger); }
.tag.warn { background: #FFF4E5; color: #8a5a00; }
.tag.ok { background: #E4F1E5; color: #1D6B2A; }

.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row .grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: Consolas, Menlo, monospace; }
.mt { margin-top: 12px; }
.nowrap { white-space: nowrap; }

.empty { padding: 30px; text-align: center; color: var(--muted); }

/* ---------------------------------------------------------------- 弹层 */
.mask {
  position: fixed; inset: 0; background: rgba(20, 26, 20, .45);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal {
  background: #fff; border-radius: 12px; width: 720px; max-width: 94vw;
  max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: 0 16px 50px rgba(0, 0, 0, .3);
}
.modal header {
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  font-weight: 600; display: flex; align-items: center;
}
.modal header .grow { flex: 1; }
.modal .body { padding: 16px; overflow-y: auto; }
/* 加宽弹窗（单据明细这类"图片 + 商品 + 编码 + 数量 + 单价 + 金额 + 备注"的表）。
   2026-10-27 用户要求「出库单入库单明细里面显示图片，版幅再宽一点」。 */
/* 2026-10-28 用户要求「出库单销售单明细的版幅应该放满页」：
   单据明细弹窗直接铺满可视宽度（留 24px 边），不再是固定 1060px。 */
.modal.wide { width: calc(100vw - 24px); max-width: 100vw; }
/* 单据明细表（2026-10-27）：固定列宽 + 上下居中。
   之前"编码"那列吃掉剩余宽度显得空，后面数量/REF/单价/金额/备注挤在一起。 */
.od-table { table-layout: fixed; width: 100%; }
.od-table th, .od-table td { vertical-align: middle; }
.od-table th { padding: 8px 10px; }
.od-table td { padding: 9px 10px; }
.od-table .odc-img { width: 64px; }
.od-table .odc-name { width: 25%; }
.od-table .odc-code { width: 104px; }
.od-table .odc-qty { width: 116px; }
.od-table .odc-ref { width: 132px; }
.od-table .odc-price { width: 88px; }
.od-table .odc-amt { width: 96px; }
.od-table .odc-remark { width: auto; }
/* 留底照片格：缩略图一行排开 + 上传按钮（2026-10-27） */
.od-table .odc-photos { width: 128px; }
.od-photos { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.od-photos .od-thumb {
  width: 34px; height: 34px; border-radius: 5px; object-fit: cover;
  border: 1px solid var(--line); background: #eef1ed; cursor: zoom-in;
}
.od-photos .btn.sm { padding: 2px 6px; font-size: 11px; }
/* 单元格里的小字（订单 x · 已出 y）跟着居中 */
.od-table td.num { line-height: 1.45; }
/* 单据明细里的商品缩略图：点一下放大 */
.ord-thumb {
  width: 44px; height: 44px; border-radius: 6px; object-fit: cover;
  background: #eef1ed; display: inline-block; cursor: zoom-in;
  border: 1px solid var(--line);
}
.ord-thumb.ph {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--muted); cursor: default;
}
.modal footer {
  padding: 12px 16px; border-top: 1px solid var(--line);
  display: flex; gap: 10px; justify-content: flex-end;
}

.msg {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  background: #26312A; color: #fff; padding: 10px 18px; border-radius: 8px;
  z-index: 90; box-shadow: 0 6px 24px rgba(0, 0, 0, .3); max-width: 80vw;
}
.msg.err { background: var(--danger); }

/* ---------------------------------------------------- 库存 / 商品卡片
 *
 * 与手机版对齐：左边一张缩略图，右边名称 + 编码/规格/库存，
 * 底部一行小字放成本/售价/库存金额/安全库存。
 */
.cardlist { display: flex; flex-direction: column; gap: 8px; }

.pcard {
  display: flex; gap: 12px; background: var(--card);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 11px;
}
.pcard .thumb {
  width: 78px; height: 78px; flex: 0 0 78px; border-radius: 8px;
  background: #EEF1ED; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: #B6BDB2; font-size: 22px;
}
.pcard .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard .body { flex: 1; min-width: 0; }
.pcard .title {
  font-size: 15px; font-weight: 600; margin-bottom: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pcard .meta { color: var(--muted); font-size: 12px; line-height: 1.65; }
.pcard .meta .k { color: #9AA396; }
.pcard .qty {
  font-size: 17px; font-weight: 700; text-align: right; white-space: nowrap;
}
.pcard .qty.ok { color: var(--out); }
.pcard .qty.low { color: var(--warn); }
.pcard .qty.zero { color: var(--danger); }
.pcard .stats {
  display: flex; gap: 14px; margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--line); flex-wrap: wrap;
}
.pcard .stats .s { min-width: 92px; }
.pcard .stats .s .k { color: var(--muted); font-size: 11px; }
.pcard .stats .s .v { font-weight: 600; font-size: 13px; }

.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.toolbar select, .toolbar input { width: auto; }

/* 可点卡片（商品卡片点进详情） */
.pcard.clickable:hover {
  box-shadow: 0 3px 12px rgba(54, 124, 43, .18);
  border-color: var(--brand);
}
.pcard.clickable { border: 1px solid transparent; transition: box-shadow .12s, border-color .12s; }

/* 商品详情大图 */
/* 2026-11-02 主图加宽后改成 contain：完整显示不裁切 */
#pdMain img { width: 100%; height: 100%; object-fit: contain;
  display: block; background: #f4f5f4; }
.card h3 { margin-top: 0; }

/* 可点的单据号（用户要求：点单据号弹出单据详情） */
a.ordlink {
  color: var(--brand); text-decoration: none; cursor: pointer;
  border-bottom: 1px dashed transparent;
}
a.ordlink:hover { border-bottom-color: var(--brand); text-decoration: none; }
a.ordlink:active { opacity: .7; }
/* 不能跳的单号（单据已删除）保持普通样子 */
span.docnolink { cursor: default; }

/* 可搜索下拉（客户/供应商/商品）：输入框 + 候选列表 + 「没找到就新建」
   用户要求：「网页版新增销售单里没有搜索客户的选项」。
   列表用**普通流式**展开（不是绝对定位），否则会被 .modal .body 的
   overflow 裁掉。 */
.sp { position: relative; }
.spList {
  display: none; margin-top: 4px; max-height: 220px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.spList.on { display: block; }
.spItem {
  padding: 7px 10px; cursor: pointer; font-size: 13px; line-height: 1.35;
  border-bottom: 1px solid var(--line);
}
.spItem:last-child { border-bottom: 0; }
.spItem:hover, .spItem.on { background: #f1f4ee; }
.spItem .sub { color: var(--muted); font-size: 11px; margin-left: 6px; }
.spItem { display: flex; align-items: center; gap: 8px; }
.spItem .spMain { flex: 1; min-width: 0; }
/* 候选项里的商品缩略图（用户要求：开单加产品时要显示产品图片） */
.spImg {
  width: 34px; height: 34px; flex: none; border-radius: 6px;
  object-fit: cover; background: #eef1ec;
}
.spImg.ph { display: inline-block; }
/* 已选中商品的缩略图（放在搜索框左边） */
.ocThumb {
  width: 40px; height: 40px; flex: none; border-radius: 8px;
  object-fit: cover; background: #eef1ec;
}
.ocThumb.ph { display: inline-block; }

/* 出入库记录里的商品缩略图（用户要求：这里也要显示产品图片） */
.movThumb {
  width: 36px; height: 36px; border-radius: 6px; object-fit: cover;
  background: #eef1ec; vertical-align: middle; margin-right: 8px;
  flex: none;
}
.movThumb.ph { display: inline-block; }
.spItem.miss { color: var(--muted); cursor: default; }
.spItem.miss:hover { background: #fff; }
.spItem.create { color: var(--brand); font-weight: 600; }
.spPicked {
  font-size: 12px; color: var(--brand); margin-top: 4px;
}


/* ---------------------------------------------------------------- 商品页
 * 2026-10-24 用户要求「网页版商品界面与 APP 一样采用左边品类 右边列表」。
 * 左边固定 132px 品类栏（全部商品 / 各品类+数量 / 未分类），右边自适应列表。
 * 窄屏（手机浏览器）自动改成「上边横向品类条 + 下面列表」。
 *
 * 2026-10-24 追加：用户要求「这里下滑的时候保持不动」—— 品类栏改成
 * **sticky**：滚动商品列表时它贴在内容区顶部不动，品类多时自己内部滚动。
 * 滚动容器是 .content（overflow-y:auto），sticky 相对它生效。
 */
.pwrap { display: flex; gap: 12px; align-items: flex-start; }
.pcat {
  width: 132px; flex: none; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden;
  /* 下滑时保持不动 */
  position: sticky;
  top: 0;
  align-self: flex-start;
  z-index: 2;
  max-height: calc(100vh - 88px);   /* 顶部工具条 + 内边距 */
  overflow-y: auto;                 /* 品类很多时自己滚，不顶出屏幕 */
}
.pcat .citem {
  display: flex; align-items: center; gap: 6px; padding: 10px 12px;
  font-size: 13px; cursor: pointer; border-bottom: 1px solid var(--line);
  color: var(--text);
}
.pcat .citem:last-child { border-bottom: 0; }
.pcat .citem:hover { background: #F5F8F4; }
.pcat .citem.on { background: var(--brand); color: #fff; font-weight: 600; }
.pcat .citem .cn {
  flex: 1; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.pcat .citem .cc { font-size: 11px; opacity: .75; }
.pmain { flex: 1; min-width: 0; }
@media (max-width: 720px) {
  .pwrap { flex-direction: column; }
  .pcat {
    width: 100%; display: flex; overflow-x: auto; border-radius: 10px;
  }
  .pcat .citem {
    border-bottom: 0; border-right: 1px solid var(--line); white-space: nowrap;
    flex: none;
  }
}

/* 商品详情页：右上角「返回商品列表」（2026-10-24 用户要求放到右上角并加大） */
.pd-back {
  font-size: 15px;
  padding: 9px 18px;
  font-weight: 600;
}

/* 套件组成里的配件名称/编码：可点击跳转到配件详情 */
.plink {
  color: var(--brand);
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
}
.plink:hover { border-bottom-color: var(--brand); }

/* 点小图放大：全屏遮罩（2026-10-25） */
.img-mask {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0, 0, 0, .82);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out;
}
.img-mask img {
  max-width: 92vw; max-height: 92vh;
  border-radius: 8px; box-shadow: 0 8px 40px rgba(0, 0, 0, .6);
  background: #fff;
}

/* 放大看图：左右箭头 + 张数（2026-10-25 用户要求"放大时能直接点上一张/下一张"） */
.img-mask .img-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .18); color: #fff;
  font-size: 34px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0 0 4px 0;
}
.img-mask .img-nav:hover { background: rgba(255, 255, 255, .32); }
.img-mask .img-nav.prev { left: 3vw; }
.img-mask .img-nav.next { right: 3vw; }
.img-mask .img-count {
  position: absolute; bottom: 3vh; left: 50%; transform: translateX(-50%);
  color: rgba(255, 255, 255, .85); font-size: 14px; letter-spacing: 1px;
  background: rgba(0, 0, 0, .35); padding: 3px 12px; border-radius: 12px;
}

/* 添加配件：输入即弹的自动补全下拉（2026-10-25 用户要求） */
.ac-wrap { position: relative; }
.ac-list {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 40;
  margin-top: 2px; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 10px 28px rgba(0, 0, 0, .14);
  max-height: 50vh; overflow-y: auto; display: none;
}
.ac-list.open { display: block; }
.ac-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; cursor: pointer; border-bottom: 1px solid #F1F4F0;
}
.ac-item:last-child { border-bottom: 0; }
.ac-item:hover, .ac-item.active { background: var(--brand-light); }
.ac-item b { font-weight: 600; }
.ac-item .mono { color: #666; }
.ac-item .small { margin-left: auto; }
.ac-empty { padding: 10px 12px; color: #888; font-size: 13px; }

/* BOM「添加配件」弹窗：加宽加高，给候选列表留出空间（2026-10-30） */
.modal.bom-dialog { width: calc(100vw - 24px); max-width: 100vw; }
.modal.bom-dialog .body { min-height: 0; }
/* 添加配件：左品类 / 右商品列表（和商品页同一套 .pcat 样式） */
.bompick {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 12px;
  min-height: 380px;
}
.bompick .pcat { max-height: 460px; overflow-y: auto; }
.bompick-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bompick-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-y: auto;
  max-height: 420px;
  flex: 1;
}
.bompick-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid #F1F4F0;
  cursor: pointer;
}
.bompick-item:last-child { border-bottom: 0; }
.bompick-item:hover { background: var(--brand-light); }
.bompick-item.on { background: var(--brand-light); outline: 1px solid var(--brand); }
.bompick-info { flex: 1; min-width: 0; }
@media (max-width: 900px) {
  .bompick { grid-template-columns: 1fr; }
  .bompick .pcat { max-height: 160px; display: flex; flex-wrap: wrap; gap: 6px; }
}

/* 候选商品缩略图（2026-10-25：用户要求弹出的商品选项要带图片） */
.ac-thumb {
  width: 36px; height: 36px; border-radius: 6px; object-fit: cover;
  flex: 0 0 36px; background: #F1F4F0;
}
.ac-thumb.ph {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; color: #9AA79A; border: 1px dashed #D8DED6;
}

/* BOM 清单里的配件缩略图（2026-10-25 用户要求每个配件带图） */
.bom-thumb {
  width: 38px; height: 38px; border-radius: 6px; object-fit: cover;
  background: #F1F4F0; display: block;
}
.bom-thumb.ph {
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #9AA79A; border: 1px dashed #D8DED6;
}

/* 商品页：右边「搜索栏」下滑时保持不动（2026-10-25 用户要求）
 * 滚动容器是 #content（.content 有 overflow-y:auto），sticky 相对它生效。
 * 品类栏 .pcat 早就 sticky 了，这里把搜索工具条也固定住。 */
.pmain > .card {
  position: sticky;
  top: 0;
  z-index: 3;
  margin-bottom: 10px;
}
/* 贴住后内容从下面穿过，加一点阴影边界，避免看不清 */
.pmain > .card::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -10px; height: 10px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .06), transparent);
  pointer-events: none;
}
/* #content 有 16px 上内边距，sticky 只能贴到父容器顶部（内边距下面），
 * 于是上面会露出 16px 高的缝隙看到卡片滚动 —— 用同色块盖住。 */
.pmain > .card::before {
  content: '';
  position: absolute; left: -14px; right: -14px; top: -16px; height: 16px;
  background: #EEF1ED;
  pointer-events: none;
}
@media (max-width: 720px) {
  /* 竖排时品类条在上面，搜索栏紧跟在下面也固定住 */
  .pmain > .card { top: 0; }
}

/* 2026-10-26 用户要求：卡片右下的空白用来放包装信息（单个净重/装箱数/内盒/外箱），
 * 这几格平分剩余宽度；价格类小格保持自然宽度不变。 */
.pcard .stats .s.pk { flex: 1 1 0; min-width: 104px; }
.pcard .stats .s.pk .v { font-weight: 500; }

/* 2026-11-01 用户要求：包装信息（标签/刻字/包装/其他）每个框加高到至少 4 行 */
.modal.oc-form textarea {
  min-height: 96px;
  line-height: 1.5;
  resize: vertical;
  font-family: inherit;
  padding: 8px 10px;
}
/* 明细里的包装信息按原样保留换行 */
.pack-multiline { white-space: pre-wrap; word-break: break-word; }

/* 2026-11-02 用户反馈「图片显示的宽度不够」→ 商品详情主图自适应放大 */
.pd-detail-row { flex-wrap: wrap; }
/* 2026-11-02 用户：「图片面积太大了 整体缩小一点」→ 440 收到 330 */
.pd-media-col {
  flex: 0 0 clamp(200px, 22vw, 330px);
  width: clamp(200px, 22vw, 330px);
  max-width: 100%;
}
.pd-media-main {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  font-size: 34px;
  overflow: hidden;
}
.pd-media-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #f4f5f4;
  cursor: zoom-in;
}
@media (max-width: 900px) {
  .pd-detail-row { flex-wrap: wrap; }
  .pd-media-col { flex: 0 0 100%; width: 100%; }
}

/* 2026-11-04 用户要求：单据明细里客户信息放左边显眼，状态只占小位置 */
.od-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.od-cust {
  flex: 1 1 380px; min-width: 260px;
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 12px 14px;
}
.od-cust .k { color: var(--muted); font-size: 12px; }
.od-cust-name { font-size: 20px; font-weight: 700; margin: 2px 0 6px; line-height: 1.35; }
.od-tags {
  display: flex; flex-direction: column; gap: 10px;
  align-items: flex-end; min-width: 150px; padding-top: 4px;
}
.od-tag { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.od-tag .k { color: var(--muted); font-size: 12px; }
@media (max-width: 760px) {
  .od-tags { flex-direction: row; align-items: center; gap: 16px; }
}

/* 2026-11-04 单据标题只显示「销售单」等，单据号在这里单独一行 */
.od-no {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  font-family: inherit;
}
.od-no b { font-size: 13px; color: var(--text); }
.od-no .mono { font-family: Consolas, monospace; letter-spacing: 0.3px; }

/* 2026-11-04 单据类弹窗标题：销售单 / 出库单 / 待出库单 居中加大 */
.modal header .doc-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 3px;
}
.doc-sub {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
