/* 凯德利ERP · 样式 */
* { box-sizing: border-box; margin: 0; padding: 0 }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #EDF2EC; color: #1c2333; font-size: 15px }
a { color: inherit; text-decoration: none }
.dim { color: #8a93a6; font-size: 13px }
.num { text-align: right }
.danger-text { color: #d64541 }

/* 布局 */
.side { position: fixed; left: 0; top: 0; bottom: 0; width: 200px; background: #16202f; color: #cfd8e6; display: flex; flex-direction: column; z-index: 10 }
.brand { padding: 18px 16px; font-size: 17px; font-weight: 700; color: #fff; border-bottom: 1px solid #243247 }
/* 品牌图标：与官网 favicon 同一枚「K 字母环」标 */
.brand-mark { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; object-fit: contain; vertical-align: middle }
.brand-mark.sm { width: 20px; height: 20px; margin-right: 6px }
.brand-mark.lg { display: block; width: 56px; height: 56px; margin: 0 auto 12px }
.side nav { flex: 1; overflow: auto; padding: 8px 0 }
/* 隐藏侧栏滚动条（仍可用滚轮/触摸滑动） */
.side, .side nav { scrollbar-width: none; -ms-overflow-style: none }
.side::-webkit-scrollbar, .side nav::-webkit-scrollbar { width: 0 !important; height: 0 !important; display: none }
.side nav a { display: flex; align-items: center; gap: 7px; padding: 9px 18px; color: #aeb9cc; font-size: 15.5px; position: relative }
.side nav a:hover { background: #1d2a3d; color: #fff }
.side nav a.on { background: #2456a6; color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 #ffd76e }
.side-foot { display: flex; flex-direction: column; border-top: 1px solid #243247; background: #16202f }
.foot-row1 { display: flex; align-items: stretch; min-width: 0 }
.foot-link { flex: 1 1 0; border-bottom: 0; padding: 10px 0; font-size: 15px }
.foot-link + .foot-link { border-left: 1px solid #243247 }
.foot-ico { flex: 0 0 42px; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; border-left: 1px solid #243247; color: #93a3bb; cursor: pointer; transition: background .15s, color .15s }
.foot-ico:hover { background: #1d2a3d; color: #fff }
.foot-me { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 7px 10px 7px 14px; border-top: 1px solid #243247 }
.me-name { color: #cfd8e6; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; cursor: pointer }
.me-name:hover { color: #fff; text-decoration: underline }
.me-role { display: inline-block; padding: 1px 9px; border-radius: 10px; background: #e8f0ff; color: #2456a6; font-size: 12px; font-weight: 600 }
.me-note { background: #F4F8F2; border-left: 3px solid #2456a6; border-radius: 8px; padding: 10px 14px; font-size: 13.5px; color: #59657a; line-height: 1.75 }
.me-acts { display: flex; gap: 2px; flex: 0 0 auto; padding: 0; border-top: 0 }
.me-acts .btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; font-size: 0; background: transparent; border: 0; color: #93a3bb; border-radius: 6px; transition: background .15s, color .15s }
.me-acts .btn:hover { background: #1d2a3d; color: #fff }
.main { margin-left: 200px; padding: 22px 26px; max-width: none }
/* 板块宽度自适应显示器：用满主内容区；极宽屏给一个较大上限并居中，避免右侧一大块空白或内容被拉得太散。
   侧栏收起时 .main 的 margin-left 由 200→58，可用宽度随之变化，auto-fill 栅格会自动重排。 */
#view { max-width: 2400px; margin: 0 auto }

.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap }
.page-head h2 { font-size: 20px }
/* 页头最右侧：在新标签打开当前页面（ui.js 自动挂到每个 .page-head）
   用 .btn.open-tab 提高优先级，压过后面 .btn.sm 的 padding:4px 10px，
   否则内容区只剩 10px 宽，图标会被 flex 挤成一小点。 */
.page-head .btn.open-tab { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; line-height: 1; white-space: nowrap; opacity: .88; flex: 0 0 auto; color: #8b98ac }
.page-head .btn.open-tab:hover { opacity: 1; color: #5f6d84 }
/* 外框 30px 不变，框内图标 20px（约为 13px 的 1.5 倍） */
.page-head .btn.open-tab svg { width: 20px; height: 20px; flex: none; display: block }
.search { padding: 7px 10px; border: 1px solid #D6DED4; border-radius: 6px; width: 260px; background: #fff; margin-bottom: 12px }

/* 悬停展开的分裂按钮：直接点主按钮走默认动作，悬停 2 秒（触摸长按 2 秒）出下拉 */
.hov-btn { position: relative; display: inline-flex }
.hov-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 176px;
  background: #fff; border: 1px solid #D6DED4; border-radius: 8px; box-shadow: 0 10px 26px rgba(20,40,80,.16); padding: 4px }
.hov-menu.on { display: block }
/* 按钮与菜单之间留的是 6px 视觉间隙，用透明区域补上，鼠标往下挪不会掉出去 */
.hov-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -8px; height: 8px }
.hov-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 6px;
  font: inherit; font-size: 14px; color: #22334D; padding: 8px 10px; cursor: pointer; white-space: nowrap }
.hov-menu button:hover { background: #EEF4FF }

/* 卡片/统计 */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 14px }
.stat { background: #fff; border-radius: 10px; padding: 16px; display: block; box-shadow: 0 1px 3px rgba(20,40,80,.08) }
.stat b { font-size: 25px; display: block }
.stat span { color: #8a93a6; font-size: 13.5px }
/* 备份与安全：顶部 5 个统计块等宽铺满，字数多或窗口变窄时自动降列、缩字 */
.stats.bk-stats { grid-template-columns: repeat(5, minmax(0, 1fr)) }
.stats.bk-stats .stat { min-width: 0; padding: 14px 16px }
.stats.bk-stats .stat b { font-size: clamp(15px, 1.5vw, 22px); line-height: 1.32; overflow-wrap: anywhere }
.stats.bk-stats .stat span { display: block; margin-top: 4px; font-size: 12.5px }
/* 备份结果：与其它数值同字号，用色点区分状态，避免小胶囊与数字大小打架 */
.stats.bk-stats .stat b .bk-dot { display: inline-block; width: .34em; height: .34em; border-radius: 50%; margin-right: .42em; vertical-align: .14em; background: #a7b1c2; font-style: normal }
.stats.bk-stats .stat b .bk-dot.green { background: #1d8a3c }
.stats.bk-stats .stat b .bk-dot.orange { background: #d98600 }
.stats.bk-stats .stat b .bk-dot.red { background: #c0392b }
@media (max-width: 1100px) { .stats.bk-stats { grid-template-columns: repeat(3, minmax(0, 1fr)) } }
@media (max-width: 680px) {
  .stats.bk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px }
  .stats.bk-stats .stat { padding: 12px 13px }
}
@media (max-width: 420px) { .stats.bk-stats { grid-template-columns: 1fr } }

/* 表格 */
.tbl-wrap { background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(20,40,80,.08); overflow: auto; margin-bottom: 14px }
table { width: 100%; border-collapse: collapse }
th { text-align: left; font-size: 13px; color: #8a93a6; padding: 9px 12px; border-bottom: 1px solid #E9EEE7; white-space: nowrap; background: #F7FAF5 }
td { padding: 9px 12px; border-bottom: 1px solid #f2f4f8; vertical-align: top }
tbody tr:hover { background: #F4F8F2 }
/* 作废单据：仍留在列表里，整行灰字 + 删除线（操作与徽章不划线） */
tr.tr-void > td { color: #a3aab8; text-decoration: line-through }
tr.tr-void > td b, tr.tr-void > td span:not(.badge) { text-decoration: line-through }
tr.tr-void > td .act, tr.tr-void > td .badge { text-decoration: none }
tr.tr-void > td .act { color: #2456a6 }
tr.tr-void:hover { background: #fafafa }
.empty { padding: 26px; text-align: center; color: #8a93a6; background: #fff; border-radius: 10px }

/* 多选组与客户附件 */
.chk-grid { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 4px 0 }
.chk-item { display: flex; align-items: center; gap: 5px; font-size: 14px; cursor: pointer; user-select: none; white-space: nowrap }
.chk-item input { width: 14px; height: 14px; accent-color: #2456a6; margin: 0 }
.file-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px }
.file-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; padding: 6px 10px; background: #F4F8F2; border-radius: 6px }
.file-actions { margin-bottom: 4px }

/* 徽章 */
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 13px; white-space: nowrap }
button.badge { font-family: inherit; line-height: 1.5 }
.badge.gray { background: #eef1f5; color: #667 }
.badge.blue { background: #e5efff; color: #2456a6 }
.badge.green { background: #e3f6e8; color: #1d8a3c }
.badge.orange { background: #fff1e0; color: #c07216 }
.badge.red { background: #fdeaea; color: #c0392b }
.badge.slate { background: #e9eef4; color: #4b5b70 }
.badge.sky { background: #e2f2fb; color: #14678f }
.badge.cyan { background: #dcf3f6; color: #0b6a74 }
.badge.teal { background: #e0f4ee; color: #0d7358 }
.badge.lime { background: #eef6df; color: #5a7612 }
.badge.brown { background: #f3ece4; color: #7a5533 }
.badge.violet { background: #efe9fd; color: #6440b8 }
.badge.emerald { background: #dcf3e6; color: #127a45 }
.badge.purple { background: #f7e9fb; color: #8a2f9e }
.badge.rose { background: #fdeaf0; color: #b0234f }
.badge.amber { background: #fff4d6; color: #94670a }
.badge.indigo { background: #e9ecfd; color: #3b4bb3 }
/* 状态后的小字日期：状态最后变化时间（灰色，不抢徽章的视觉） */
.st-at { display: inline-block; margin-left: 5px; font-size: 11.5px; color: #98a1b3; font-weight: 400; white-space: nowrap; vertical-align: 1px }
.m-head .st-at, .pi-prev .st-at { font-size: 12px }
.tag { display: inline-block; background: #f0f3f8; color: #4a5568; border-radius: 4px; padding: 1px 6px; font-size: 13px; margin-right: 4px }

/* 按钮 */
.btn { border: 1px solid #D6DED4; background: #fff; padding: 7px 14px; border-radius: 6px; cursor: pointer; font-size: 14.5px }
.btn:hover { background: #f2f5fa }
.btn.primary { background: #2456a6; border-color: #2456a6; color: #fff }
.btn.primary:hover { background: #1e4890 }
.btn.danger { background: #d64541; border-color: #d64541; color: #fff }
.btn.sm { padding: 4px 10px; font-size: 13.5px }
.btn.wide { width: 100% }
.btn:disabled { opacity: .5; cursor: not-allowed }
.act { color: #2456a6; cursor: pointer; font-size: 14px }
.act:hover { text-decoration: underline }
.act.danger { color: #d64541 }
.acts { white-space: nowrap }
.act.pass { color: #1e874b }
.act.pass:hover { color: #166b3a }
.act.warn { color: #b3730f }
/* 列表「其他」：低频 / 危险操作收进浮层，行内只留常用操作 */
.acts-more { display: none }
.act.act-more.open { color: #123c7d; font-weight: 600 }
.acts-more-layer {
  position: fixed; z-index: 90; min-width: 132px; padding: 4px;
  background: #fff; border: 1px solid #dfe4ec; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(20, 32, 54, .16);
  max-height: min(320px, 70vh); overflow: auto;
}
.acts-more-layer > a.act {
  display: block; padding: 7px 12px; border-radius: 6px;
  white-space: nowrap; font-size: 13.5px; text-decoration: none;
}
.acts-more-layer > a.act:hover { background: #f2f6fc; text-decoration: none }
.acts-more-layer > a.act.danger { color: #d64541 }
.acts-more-layer > a.act.danger:hover { background: #fdf1ef }
html[data-theme="dark"] .acts-more-layer { background: #1c2333; border-color: #2c3547 }
html[data-theme="dark"] .acts-more-layer > a.act { color: #cdd6e6 }
html[data-theme="dark"] .acts-more-layer > a.act:hover { background: #27314a }
html[data-theme="dark"] .acts-more-layer > a.act.danger { color: #ef7b76 }

/* 表单 */
.fld { margin-bottom: 12px }
.fld label { display: block; font-size: 13.5px; color: #5a6478; margin-bottom: 4px }
/* 产品编辑页输入框与产品中心搜索框共用同一条盒模型规则：padding / 字号 / 边框 / 圆角 / 字体 完全同源，
   保证任意主题、任意屏幕下两者高度一致（.pc-q 的 width / flex / margin 在文件后部单独覆盖） */
.fld input[type=text], .fld input[type=password], .fld input[type=number], .fld input[type=date], .fld select, .fld textarea, .pc-q {
  width: 100%; padding: 8px 10px; border: 1px solid #D6DED4; border-radius: 6px; font-size: 14.5px; font-family: inherit; background: #fff }
.fld input.bad { border-color: #d64541 }
/* 只读输入框（如一级目录：自动带出、不可改）：保留输入框外形，用浅底表示不可编辑 */
.fld input[readonly] { background: #f4f6f3; color: #4a5568; cursor: default }
html[data-theme="dark"] .fld input[readonly] { background: #1a2531; color: #a9b8c9; border-color: #34414f }
/* 禁用输入框（如只有一个尺码时自动带出的尺码起/止）：与只读同款浅底，明确「不可填」 */
.fld input:disabled, .fld input[disabled] { background: #f4f6f3; color: #8a93a6; cursor: not-allowed; -webkit-text-fill-color: #8a93a6; opacity: 1 }
html[data-theme="dark"] .fld input:disabled, html[data-theme="dark"] .fld input[disabled] { background: #1a2531; color: #8d99ab; border-color: #34414f; -webkit-text-fill-color: #8d99ab }
/* 色号 / 客户的可搜索下拉（PI 新建明细、明细编辑、导入订单）：输入框与表单字段同一盒模型 */
.pi-pick-in {
  width: 100%; height: 38px; box-sizing: border-box; padding: 0 22px 0 10px;
  border: 1px solid #D6DED4; border-radius: 6px; font-size: 14.5px;
  font-family: inherit; background: #fff; color: inherit;
}
.pi-pick-in:focus { outline: none; border-color: #2456a6; box-shadow: 0 0 0 2px rgba(36,86,166,.12) }
.pi-pick-in:disabled { background: #f4f6f3; color: #98a3b6; cursor: not-allowed }
html[data-theme="dark"] .pi-pick-in { background: #1a2531; border-color: #34414f; color: #dbe6f2 }
/* 报价 / MCQ / MOQ：不要数字框的上下箭头 */
#f_price, #f_mcq, #f_moq { -moz-appearance: textfield; appearance: textfield }
#f_price::-webkit-outer-spin-button, #f_price::-webkit-inner-spin-button,
#f_mcq::-webkit-outer-spin-button, #f_mcq::-webkit-inner-spin-button,
#f_moq::-webkit-outer-spin-button, #f_moq::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0 }
/* 报价输入框右侧显示表头币种（USD / CNY …） */
.price-cur-wrap { position: relative }
.price-cur-wrap input[type=number] { padding-right: 56px }
.price-cur { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 700; color: #7a8598; letter-spacing: .3px; pointer-events: none }
html[data-theme="dark"] .price-cur { color: #93a3b8 }
.fld .help { font-size: 13px; color: #8a93a6; margin-top: 3px }
.req { color: #d64541 }
.static-val { padding: 8px 0; font-weight: 600 }
.fld-inline { display: flex; align-items: center; gap: 8px; margin: 8px 0; flex-wrap: wrap }
.fld-inline input, .fld-inline select { padding: 6px 8px; border: 1px solid #D6DED4; border-radius: 6px }
/* 付款申请：核算对象 / 成本承担 / 代付 的控件与普通输入框同高同边，水平对齐 */
#pr-owner_type, #pr-bear_type, #pr-adv-type, #pr-adv-amount,
#pr-owner select, #pr-bear-obj select, #pr-adv-obj select {
  height: 38px; box-sizing: border-box; padding: 0 8px; font-size: 14.5px; font-family: inherit;
  border: 1px solid #D6DED4; border-radius: 6px; background: #fff }
#pr-owner_type, #pr-bear_type, #pr-adv-type { flex: 0 0 100px; width: 100px }
#pr-adv-amount { flex: 0 0 120px; width: 120px }
#pr-owner, #pr-bear-obj, #pr-adv-obj { flex: 1 1 auto; min-width: 0; display: flex }
#pr-owner select, #pr-bear-obj select, #pr-adv-obj select { width: 100%; min-width: 0 }
#pr-adv-box { margin: 0 }
#pr-adv-wrap { margin: 0 }
#pr-adv-wrap .pr-adv-chk { display: inline-flex; align-items: center; gap: 5px; height: 38px; margin: 0; font-size: 14px; color: #16202f; white-space: nowrap; flex: 0 0 auto }
#pr-adv-wrap .pr-adv-chk input { width: 15px; height: 15px; margin: 0; accent-color: #2456a6 }
.line-total { text-align: right; padding: 10px 4px; font-size: 16px }

/* 弹窗 */
/* 弹窗遮罩：桌面端从导航栏右缘开始，不覆盖左侧导航（≤820px 手机抽屉模式时全屏） */
/* 左右留白随屏宽伸缩：小屏 16px、宽屏最多 56px，弹窗不会贴边 */
/* 弹窗左右各留 2cm（宽弹窗按可用宽度自适应收窄，不再贴边或溢出）；≤820px 由移动端规则改为全屏 */
.overlay { position: fixed; inset: 0; background: rgba(15,25,45,.45); display: flex; align-items: flex-start; justify-content: center; padding: 40px 2cm; z-index: 100; overflow: auto }
@media (min-width: 821px) {
  .overlay { left: 200px }
  body.side-mini .overlay { left: 58px }
}
.modal { background: #fff; border-radius: 12px; width: 100%; max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); overflow: auto; box-shadow: 0 12px 40px rgba(0,0,0,.25); overscroll-behavior: contain }
/* 标题栏吸顶：弹窗内部滚动时永远停在最上面，右上角的保存 / 审核 / × 随时点得到 */
.m-head { display: flex; align-items: center; justify-content: flex-start; padding: 14px 18px; border-bottom: 1px solid #E9EEE7; position: sticky; top: 0; background: #fff; z-index: 6; border-radius: 12px 12px 0 0; box-shadow: 0 1px 0 #E9EEE7 }
.m-head h3 { font-size: 17px }
.m-head .m-hd-date { display: flex; align-items: center; gap: 6px; margin-left: 12px; margin-right: 0; font-size: 12px; color: #5a6478; white-space: nowrap }
/* 弹窗标题栏的日期：不带输入框底色和边框，直接当文字看 */
.m-head .m-hd-date > input { width: auto; min-width: 92px; height: 26px; padding: 0; font-size: 12.5px; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: inherit }
.m-head .m-hd-date > input:focus { outline: none; border: 0; box-shadow: none }
.m-head .m-hd-date > input.ro, .m-head .m-hd-date > input[readonly] { background: transparent; color: #40506a; cursor: default }
.m-head .m-hd-date > input.ro::-webkit-calendar-picker-indicator,
.m-head .m-hd-date > input[readonly]::-webkit-calendar-picker-indicator { display: none }
/* 日期后面的补充标注，如「一单一款」 */
.m-hd-tag { margin-left: 10px; font-size: 12px; font-weight: 400; color: #8a93a6; white-space: nowrap }
/* 关闭 × 与标题栏图标按钮同款：同尺寸、同边框、同悬停 */
.m-head .x { margin-left: auto; width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #dbe4f2; border-radius: 8px; background: #fff; color: #4a5a74; font-size: 19px; line-height: 1; cursor: pointer; transition: background .15s, border-color .15s, color .15s }
.m-head .x:hover { background: #f3f7fd; border-color: #b9cdea; color: #2456a6 }
.m-body { padding: 16px 18px }
.m-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; flex-wrap: wrap }
/* 导入订单：内容少，按钮压到弹窗底部并居中 */
.pi-imp-body { display: flex; flex-direction: column; min-height: 300px }
.pi-imp-foot { justify-content: center; margin-top: auto; padding-top: 18px }
/* 弹窗内的行内工具条（＋加一行 / 选产品 / 完成）：与底部操作栏分开，
   按钮留在表格旁边，不往右上角收 */
.m-tools { display: flex; justify-content: flex-start; gap: 8px; margin: 8px 0; flex-wrap: wrap; align-items: center }
/* PI 预览弹窗：列多，保底宽度让内容可读，装不下时在弹窗内部横向滚动；
   窄屏收紧单元格内边距，避免一个弹窗只放得下两三个字 */
.modal.pi-prev .tbl-wrap { overflow-x: auto }
.modal.pi-prev table { min-width: 920px }
.modal.pi-prev .tbl-wrap th, .modal.pi-prev .tbl-wrap td { padding: 8px 10px }
/* PI 明细预览：行间横线 + 隔行浅底，列多行多时不串行；
   报价不一致的红底行（.q-bad）与附加费用的浅黄行（.pi-chgrow）保持原底色 */
.modal.pi-prev .tbl-wrap tbody tr:not(.q-bad):not(.pi-chgrow) > td { border-bottom: 1px solid #e3e9f2 }
.modal.pi-prev .tbl-wrap tbody tr:nth-child(even):not(.q-bad):not(.pi-chgrow) > td { background: #f7f9fd }
.modal.pi-prev .tbl-wrap tbody tr:not(.q-bad):not(.pi-chgrow):hover > td { background: #edf3fc }
.modal.pi-prev .tbl-wrap tbody tr:last-child > td { border-bottom: 0 }
@media (max-width: 1100px) {
  .modal.pi-prev table { min-width: 820px }
  .modal.pi-prev .tbl-wrap th, .modal.pi-prev .tbl-wrap td { padding: 7px 7px; font-size: 12.5px }
}
/* ---------- 导入订单预览（#_pibody）：表格内输入框 / 下拉统一盒模型 ----------
   原来数量框、单价框、款号框、色号 / 尺码下拉各用浏览器默认样式，高度、边框、字号全不一样，
   一屏几十行看起来像拼起来的。这里统一成与 .fld 同源的一套：同高、同边框、同圆角、同聚焦环。 */
#_pibody .tbl-wrap td { vertical-align: middle }
#_pibody .tbl-wrap input:not([type=checkbox]),
#_pibody .tbl-wrap select {
  box-sizing: border-box; height: 30px; margin: 0; padding: 0 7px;
  border: 1px solid #d6ded4; border-radius: 6px; background: #fff;
  font-family: inherit; font-size: 13px; color: inherit; line-height: 28px; vertical-align: middle;
}
#_pibody .tbl-wrap select { padding-right: 2px }
#_pibody .tbl-wrap input:not([type=checkbox]):focus,
#_pibody .tbl-wrap select:focus { outline: none; border-color: #2456a6; box-shadow: 0 0 0 2px rgba(36,86,166,.12) }
/* 数字框去掉上下箭头：箭头会把行高撑得不一致 */
#_pibody .tbl-wrap input[type=number] { -moz-appearance: textfield; appearance: textfield }
#_pibody .tbl-wrap input[type=number]::-webkit-outer-spin-button,
#_pibody .tbl-wrap input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0 }
#_pibody .tbl-wrap input::placeholder { color: #98a3b6 }
#_pibody .tbl-wrap .pi-ck { width: 15px; height: 15px; margin: 0; vertical-align: middle; cursor: pointer }
#_pibody .pi-in-q { width: 84px; text-align: right }
#_pibody .pi-in-pr { width: 92px; text-align: right }
#_pibody .pi-in-art { width: 132px }
#_pibody .pi-in-c { width: 172px }
#_pibody .pi-in-s { width: 88px }
#_pibody .tbl-wrap .act { line-height: 30px }
/* 明细表固定列宽（.pi-imp-tbl）：Calzedonia 的 Cust Item Code 是「客户款号 + 客户色号/尺码」两行，
   列宽固定后不会再把别的列挤成一条缝；框内控件一律撑满单元格，预警文字在格内换行 */
#_pibody .pi-imp-tbl input:not([type=checkbox]),
#_pibody .pi-imp-tbl select { width: 100%; min-width: 0 }
#_pibody .pi-imp-tbl .pi-color-pick { min-width: 0 }
#_pibody .pi-imp-tbl th { white-space: normal; word-break: break-word; line-height: 1.25 }
#_pibody .pi-imp-tbl td { overflow-wrap: break-word }
#_pibody .pi-imp-tbl .pi-warn { white-space: normal; font-size: 11px; line-height: 1.35; margin-top: 2px }
#_pibody .pi-ckth { padding-left: 8px; padding-right: 4px }
#_pibody .pi-ckall { display: inline-flex; align-items: center; gap: 3px; font-weight: 400; font-size: 12px; white-space: nowrap; cursor: pointer }
#_pibody .pi-ckall input { width: 14px; height: 14px; margin: 0; cursor: pointer }
/* 导入预览的表头字段（客户 / 联系人 / PO / 日期 / 币种…）：input 与 select 盒模型同高，
   备注 textarea 不再把整行撑歪；只读框用统一的浅底，不再各自写 inline style */
#_pibody .fgrid .fld > input:not([type=checkbox]),
#_pibody .fgrid .fld > select {
  width: 100%; height: 38px; box-sizing: border-box; padding: 0 10px;
  border: 1px solid #D6DED4; border-radius: 6px; font-size: 14.5px;
  font-family: inherit; background: #fff; color: inherit;
}
#_pibody .fgrid .fld > input[type=date] { padding-right: 4px }
#_pibody .fgrid .fld > textarea {
  width: 100%; box-sizing: border-box; min-height: 38px; padding: 8px 10px;
  border: 1px solid #D6DED4; border-radius: 6px; font-size: 14.5px;
  font-family: inherit; background: #fff; color: inherit; resize: vertical;
}
/* 备注与同排输入框同高：默认不把整行撑歪，需要时自己往下拉 */
#_pibody .fgrid .fld > .pi-remark { height: 38px; min-height: 38px; line-height: 20px }
#_pibody .fgrid .fld > input:focus,
#_pibody .fgrid .fld > select:focus,
#_pibody .fgrid .fld > textarea:focus { outline: none; border-color: #2456a6; box-shadow: 0 0 0 2px rgba(36,86,166,.12) }
/* 只读（贸易条款 / 付款方式 / Transmission Date）：浅底表示不可改 */
#_pibody .fgrid .fld > input[readonly] { background: #f4f6f3; color: #4a5568; cursor: default }
html[data-theme="dark"] #_pibody .fgrid .fld > input[readonly] { background: #16202b; color: #a9b8c9; border-color: #34414f }
html[data-theme="dark"] #_pibody .fgrid .fld > input,
html[data-theme="dark"] #_pibody .fgrid .fld > select,
html[data-theme="dark"] #_pibody .fgrid .fld > textarea { background: #1a2531; border-color: #34414f; color: #dbe6f2 }
html[data-theme="dark"] #_pibody .tbl-wrap input:not([type=checkbox]),
html[data-theme="dark"] #_pibody .tbl-wrap select { background: #1a2531; border-color: #34414f; color: #dbe6f2 }
/* ---------- INV 新建 / 编辑表头（.inv-form）：input / select / textarea 同一盒模型 ----------
   表头原来只有 date、select 命中 .fld 的样式，几个没写 type 的文本框走浏览器默认样式
   （窄、无内边距、无边框），四列栅格里高低不齐。这里统一高度与聚焦环。 */
.inv-form .fgrid .fld > input,
.inv-form .fgrid .fld > select {
  width: 100%; height: 38px; box-sizing: border-box;
  padding: 0 10px; border: 1px solid #D6DED4; border-radius: 6px;
  font-size: 14.5px; font-family: inherit; background: #fff; color: inherit;
}
.inv-form .fgrid .fld > select { padding-right: 4px }
.inv-form .fgrid .fld > textarea { box-sizing: border-box; min-height: 60px; resize: vertical }
/* 客户装箱要求 / 备注上提到表头第四列：与同排输入框同高，可拖高但默认不把整行撑歪 */
.inv-form .fgrid .fld-note > textarea { height: 38px; min-height: 38px; padding: 8px 10px; line-height: 20px }
.inv-form .fgrid .fld-note { min-width: 0 }
/* INV 表头右上角：保存、打印两个独立按钮，与关闭按钮同高同一排 */
.inv-head .mh-btns { gap: 8px }
.inv-head .mh-btns > .btn.sm { height: 30px; box-sizing: border-box; padding: 0 14px; line-height: 28px; font-size: 13.5px }
html[data-theme="dark"] .inv-head .btn { background: #1e2a38; border-color: #33465c; color: #b7c6d8 }
html[data-theme="dark"] .inv-head .btn.primary { background: #2f62b5; border-color: #2f62b5; color: #fff }
.inv-form .fgrid .fld > input:focus,
.inv-form .fgrid .fld > select:focus,
.inv-form .fgrid .fld > textarea:focus { outline: none; border-color: #2456a6; box-shadow: 0 0 0 2px rgba(36,86,166,.12) }
.inv-form .fgrid .fld > input[readonly] { background: #f4f6f3; color: #4a5568; cursor: default }
html[data-theme="dark"] .inv-form .fgrid .fld > input,
html[data-theme="dark"] .inv-form .fgrid .fld > select,
html[data-theme="dark"] .inv-form .fgrid .fld > textarea { background: #1a2531; border-color: #34414f; color: #dbe6f2 }
html[data-theme="dark"] .inv-form .fgrid .fld > input[readonly] { background: #16202b; color: #a9b8c9 }
@media (max-width: 1100px) {
  #_pibody .tbl-wrap input:not([type=checkbox]),
  #_pibody .tbl-wrap select { height: 28px; font-size: 12.5px; line-height: 26px }
  #_pibody .pi-in-q { width: 74px }
  #_pibody .pi-in-pr { width: 82px }
  #_pibody .pi-in-art { width: 112px }
  #_pibody .pi-in-c { width: 150px }
  #_pibody .pi-in-s { width: 78px }
}
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px }
/* 同行分组：row 值相同的相邻字段合并到一行，列宽由 --cols 控制 */
.fgrid .frow { display: grid; grid-template-columns: var(--cols, 1fr 1fr); gap: 0 16px; grid-column: span 2; align-items: start; min-width: 0 }
.fgrid .frow > .fld { min-width: 0; margin-bottom: 12px }
/* 同一行里的输入框 / 下拉框统一盒高：select 自带内边距不同，不统一会差 1~3px，看着不齐 */
.fgrid .frow > .fld > input:not([type=checkbox]):not([type=radio]), .fgrid .frow > .fld > select { box-sizing: border-box; height: 38px }
.fgrid .frow > .fld > .art-wrap > input { box-sizing: border-box; height: 38px }
/* 产品表单（编辑 / 新增）：文本框、下拉、文本域统一浅底。
   原来文字框因为「聚焦前临时只读」的防自动填充处理显示浅灰，下拉和数字框是白底，看着一深一浅。 */
.prod-form .fld input:not([type=checkbox]):not([type=radio]),
.prod-form .fld select,
.prod-form .fld textarea { background: #f5f7f4 }
.prod-form .fld input[readonly] { background: #e9eee7 }
.prod-form .fld input:focus,
.prod-form .fld select:focus,
.prod-form .fld textarea:focus { background: #fbfcf9; border-color: #2456a6; box-shadow: 0 0 0 2px rgba(36,86,166,.12); outline: none }
/* 付款申请：四列栅格，短字段不再拉满整行（.fld 不写 span 时占 1/4） */
.fgrid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)) }
.fgrid.g4 > .fld { min-width: 0 }
.fgrid.g4 > .fld > label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
/* 右侧「备注」与左侧「发票 + 凭证」拉平：内容撑满整格 */
.fgrid.g4 > .fld-fill { display: flex; flex-direction: column; margin-bottom: 0 }
.fgrid.g4 > .fld-fill > textarea { flex: 1 1 auto; min-height: 128px; resize: vertical }
/* 付款申请明细行：下拉与输入框同高、同边框 */
#pr-lines-body td { vertical-align: middle; padding: 4px 8px }
#pr-lines-body td:first-child { padding-left: 12px; color: #8a93a6; font-size: 13px }
#pr-lines-body input, #pr-lines-body select {
  display: block; width: 100%; height: 34px; box-sizing: border-box; margin: 0; padding: 0 8px;
  border: 1px solid #D6DED4; border-radius: 6px; font-size: 14px; font-family: inherit;
  background: #fff; line-height: 32px; vertical-align: middle }
#pr-lines-body select { padding-right: 2px }
#pr-lines-body a.act { display: inline-block; line-height: 34px }
/* 行内复选：留出与同行标签同高的空间，使勾选框与输入框水平对齐 */
.chk-cell { display: flex; flex-direction: column; justify-content: flex-start; padding-top: 22px }
.chk-inline { display: flex; align-items: center; gap: 6px; height: 35px; font-size: 14.5px; color: #44506a; cursor: pointer; user-select: none; white-space: nowrap; overflow: hidden }
/* 表单里勾选框+说明：覆盖 .fld label 的块级样式，保持与输入框同高对齐 */
.fld .chk-inline { display: flex; margin: 0; height: 37px; font-weight: 400 }
.chk-inline input { width: 15px; height: 15px; accent-color: #2456a6; margin: 0; flex-shrink: 0 }
/* 详情小标题带按钮（如“附件 + 上传”） */
.hd-with-btn { display: flex; align-items: center; gap: 8px; flex-wrap: wrap }
.hd-with-btn .btn { margin-left: 4px }
/* 附件列表 */
.file-list { margin-bottom: 12px }
.file-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; font-size: 14px; flex-wrap: wrap }
.file-row:nth-child(odd) { background: #F4F8F2 }
.file-row .act { flex-shrink: 0; order: 0 }
.file-row .dim { font-size: 13px; order: 1 }
.file-row .act.danger { order: 2; margin-left: auto }

/* 信息栅格 */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 16px; background: #F4F8F2; border-radius: 8px; padding: 12px 14px; margin-bottom: 12px }
.info-grid span { display: block; font-size: 13.5px; color: #59657a; margin-bottom: 1px }
/* 详情分区标题：跨整行，首块无分隔线 */
.info-grid .ig-head { grid-column: 1 / -1; font-size: 13px; font-weight: 700; color: #2456a6; letter-spacing: 1px; margin: 6px 0 0; padding-top: 7px; border-top: 1px dashed #dde4ef }
.info-grid .ig-head:first-child { margin-top: 0; padding-top: 0; border-top: 0 }
.info-grid .ig-wide { grid-column: span 2 }
/* CAL 表头：固定五列等宽（每行 5 个字段） */
.info-grid.ig5 { grid-template-columns: repeat(5, minmax(0, 1fr)) }
.info-grid.ig5 > div { min-width: 0 }
.info-grid.ig5 b { font-size: 13px; word-break: break-all }
@media (max-width: 1180px) { .info-grid.ig5 { grid-template-columns: repeat(3, minmax(0, 1fr)) } }
@media (max-width: 700px) { .info-grid.ig5 { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
/* 产品详情：左侧信息+描述，右侧小图 */
.pd-top { display: flex; gap: 14px; align-items: stretch; margin-bottom: 12px }
.pd-left { flex: 1 1 auto; min-width: 0 }
.pd-info { margin-bottom: 0; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)) }
.pd-desc { margin-top: 10px; background: #F4F8F2; border-radius: 8px; padding: 10px 14px }
.pd-desc-item { display: flex; gap: 10px; padding: 3px 0; line-height: 1.65; font-size: 14px }
.pd-desc-item > span { flex: 0 0 66px; color: #59657a; font-size: 13.5px; padding-top: 2px }
.pd-desc-txt { flex: 1; min-width: 0; word-break: break-word; white-space: pre-wrap }
.pd-desc-edit { text-align: right; margin-top: 2px }
.pd-imgcol { flex: 0 0 184px; width: 184px; text-align: center; display: flex; flex-direction: column; align-items: center }
.pd-img { width: 184px; height: 184px; border: 1px dashed #c9d3e3; border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; color: #9aa6b8; font-size: 13px }
.pd-img.has { cursor: zoom-in; border-style: solid; border-color: #e2e8f2 }
.pd-img.has:hover { border-color: #2456a6 }
.pd-img img { width: 100%; height: 100%; object-fit: cover; display: block }
.pd-btns { display: flex; gap: 6px; justify-content: center; margin-top: auto; padding-top: 10px; width: 100% }
.pd-btns .btn { padding: 3px 12px; font-size: 13px }
.pd-btns .btn:disabled { opacity: .38; cursor: not-allowed }
.pd-imgcol #img-tip { display: block; margin-top: 6px; font-size: 12.5px; word-break: break-all }
/* 产品图放大预览 */
.pd-preview-wrap { position: relative; padding: 10px }
.pd-preview { display: block; width: 100%; max-height: 70vh; object-fit: contain; background: #fff; border-radius: 8px }
.pd-preview-x { position: fixed; right: 24px; top: 24px; z-index: 8; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; font-size: 20px; line-height: 1; cursor: pointer }

/* 目录树：颜色分类两列并排 */
.cat-tree { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start }
.cat-l1 { background: #fff; border-radius: 10px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(20,40,80,.08); min-width: 0 }
.cat-l1-h { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid #eef2f8; margin-bottom: 10px }
.cat-l1-h .acts { margin-left: auto }
.cat-l2s { margin-top: 8px; display: flex; flex-direction: column; gap: 6px }
.cat-l2 { border-left: 3px solid #2456a6; padding: 8px 12px; background: #f8fafd; border-radius: 0 8px 8px 0 }
/* 颜色分类表：一行一个分类，四列对齐，宽度跟随所在半栏 */
.cc-wrap { overflow-x: auto }
.cc-tbl { width: 100%; border-collapse: collapse; font-size: 14px }
.cc-tbl th { background: #f5f8fd; color: #59657a; font-weight: 600; font-size: 13.5px; text-align: left;
  padding: 7px 12px; white-space: nowrap; border-bottom: 1px solid #e6ecf5 }
.cc-tbl td { padding: 8px 12px; border-bottom: 1px solid #eef2f8; vertical-align: middle; word-break: break-word }
.cc-tbl tbody tr:hover { background: #f9fbfe }
.cc-tbl th:nth-child(1), .cc-tbl td:nth-child(1) { width: 34% }
.cc-tbl th:nth-child(3), .cc-tbl td:nth-child(3) { width: 68px; text-align: center; white-space: nowrap }
.cc-tbl td.acts { white-space: nowrap; width: 1% }
.cc-tbl td.acts .sort-btns { margin: 0 10px 0 0; vertical-align: middle }
.cc-tbl .tag { margin-left: 6px }
/* 拖动排序：⠿ 是抓手，整行 / 卡片标题都可拖；落点高亮 */
.drag-grip { display: inline-block; color: #9aa7bd; font-size: 13px; letter-spacing: -1px; margin-right: 6px; cursor: grab; user-select: none }
.drag-grip:active { cursor: grabbing }
.cat-l1-h[draggable="true"], .cc-tbl tr[draggable="true"] { cursor: grab }
.cat-l1-h[draggable="true"]:active, .cc-tbl tr[draggable="true"]:active { cursor: grabbing }
.cc-tbl tr.dragging td, .cat-l1-h.dragging { opacity: .4 }
.cat-l1.drag-over { outline: 2px dashed #2456a6; outline-offset: -2px }
.cc-tbl tr.drag-over td { background: #eaf1ff; box-shadow: inset 0 2px 0 #2456a6 }
html[data-theme="dark"] .drag-grip { color: #6d7c92 }
html[data-theme="dark"] .cc-tbl tr.drag-over td { background: #22334a }
.cat-empty { font-size: 13.5px; padding: 6px 0 2px }
@media (max-width: 820px) { .cat-tree { grid-template-columns: 1fr } }
.note-line { margin-top: 4px; font-size: 14px; white-space: pre-line }

/* 产品详情 / 笔记 */
.prod-detail h4 { margin: 16px 0 8px; font-size: 15px }
.notes { display: flex; flex-direction: column; gap: 8px }
.note { background: #F4F8F2; border-radius: 8px; padding: 8px 12px }
.note-meta { font-size: 13px; color: #8a93a6; margin-bottom: 3px }
.notes textarea { width: 100%; padding: 8px 10px; border: 1px solid #D6DED4; border-radius: 6px; margin: 6px 0 }

/* 分配 */
.alloc-line { background: #fff; border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(20,40,80,.08) }
.alloc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px }
.pick-row { padding: 8px 10px; border-bottom: 1px solid #f2f4f8; cursor: pointer; display: flex; gap: 8px; align-items: center }
.pick-row:hover { background: #f2f6fd }

/* 提示条 */
.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px); background: #1c2333; color: #fff; padding: 10px 18px; border-radius: 8px; opacity: 0; transition: all .25s; z-index: 200; max-width: 80vw }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0) }
.toast.err { background: #c0392b }

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #16202f 0%, #2456a6 100%) }
.login-card { background: #fff; border-radius: 14px; padding: 30px 32px; width: 380px }
.login-card h2 { text-align: center; margin-bottom: 18px }
.tabs { display: flex; gap: 6px; margin-bottom: 16px }
.tab { flex: 1; padding: 8px; border: 1px solid #D6DED4; background: #fff; border-radius: 6px; cursor: pointer }
.tab.on { background: #2456a6; color: #fff; border-color: #2456a6 }
.msg { color: #c0392b; font-size: 14px; margin-top: 10px; min-height: 18px }
.chk-row { display: flex; align-items: center; gap: 6px; margin: -2px 0 12px; font-size: 13.5px; color: #5a6478; cursor: pointer; user-select: none }
.chk-row input { width: 14px; height: 14px; accent-color: #2456a6; margin: 0 }
.twofa-tip { background: #f4f7fd; border: 1px solid #dbe5f5; border-radius: 8px; padding: 10px 12px; font-size: 13.5px; color: #44506a; line-height: 1.7; margin-bottom: 12px; word-break: break-all }
.twofa-tip b { color: #16202f }
.tf-code { letter-spacing: 6px; font-size: 20px; font-weight: 700; text-align: center }
.link { text-align: center; color: #2456a6; font-size: 14px; margin-top: 10px; cursor: pointer }

.loading { padding: 60px; text-align: center; color: #8a93a6 }

@media (max-width: 760px) {
  .side { width: 150px }
  .main { margin-left: 150px; padding: 14px }
  .fgrid { grid-template-columns: 1fr }
  .fgrid .frow { grid-template-columns: 1fr !important; grid-column: span 1 }
  .info-grid .ig-wide { grid-column: span 1 }
  .pd-top { flex-direction: column }
  .pd-imgcol { width: 100%; flex: none }
  .pd-img { margin: 0 auto }
}

/* 付款申请四列栅格：中等屏退两列，手机退单列 */
@media (max-width: 900px) {
  .fgrid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .fgrid.g4 > .fld[style] { grid-column: span 2 !important }
}
@media (max-width: 620px) {
  .fgrid.g4 { grid-template-columns: 1fr }
  .fgrid.g4 > .fld[style] { grid-column: span 1 !important }
}

/* 产品图缩略与颜色关联 */
.img-thumb { max-height: 90px; max-width: 140px; border: 1px solid #D6DED4; border-radius: 6px; vertical-align: middle; margin-right: 8px }

/* 侧栏二级导航 */
.nav-home { display: flex; align-items: center; gap: 7px; padding: 10px 18px; color: #aeb9cc; font-size: 15.5px; border-bottom: 1px solid #1d2a3d }
.nav-home:hover { background: #1d2a3d; color: #fff }
.nav-home.on { background: #2456a6; color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 #ffd76e }
.nav-g.open .nav-g-head { color: #fff; font-weight: 700 }
.nav-g-head { display: flex; justify-content: space-between; align-items: center; position: relative; padding: 10px 18px 6px; font-size: 15.5px; color: #7f8ea8; letter-spacing: 1px; cursor: pointer; user-select: none }
.nav-g-head:hover { color: #cfd8e6 }
/* 分组默认收起，点击标题展开；展开/收起不再显示三角箭头 */
.nav-g .nav-g-body { display: none }
.nav-g.open .nav-g-body { display: block }
/* 一级直达项（如「操作指南」）：没有分组标题，始终显示，缩进与一级菜单一致 */
.nav-g.nav-g-flat .nav-g-body { display: block }
.side nav .nav-g.nav-g-flat .nav-g-body a { padding-left: 18px }
/* 二级条目整体右移，图标比分组标题的图标再进一档（18px → 32px） */
.side nav .nav-g-body a { padding: 7px 18px 7px 32px; font-size: 15px }
.nav-ico { flex-shrink: 0; color: #5f7391 }
.gh-l { display: flex; align-items: center; gap: 6px }
.gh-l .nav-ico { color: #6d82a3 }
.side nav a:hover .nav-ico, .nav-home:hover .nav-ico { color: #cfd8e6 }
.side nav a.on .nav-ico, .nav-home.on .nav-ico { color: #ffd76e }

/* 产品中心三栏 */
.pc-wrap { display: flex; gap: 16px; align-items: flex-start }
.pc-cats { width: fit-content; min-width: 218px; max-width: min(428px, 44vw); flex-shrink: 0; background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(20,40,80,.08); padding: 10px }
.pc-main { flex: 1; min-width: 0 }
.pc-allrow { display: flex; align-items: center; gap: 2px }
.pc-allrow .pc-node { flex: 1 }
.pc-mode-btn { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; background: transparent; border: 0; color: #8a97ab; cursor: pointer; border-radius: 6px; transition: background .15s, color .15s }
.pc-mode-btn:hover { background: #eef2f8; color: #2456a6 }
.mode-btn { padding: 0; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; color: #7f8ea8; cursor: pointer; margin: 0 4px 0 auto; border-radius: 6px; transition: background .15s, color .15s }
.side .mode-btn:hover { background: #1d2a3d; color: #fff }
.pc-tree { max-height: calc(100vh - 210px); overflow: auto }
.pc-node { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 6px; cursor: pointer; font-size: 14px; color: #333 }
.pc-node:hover { background: #f2f6fd }
.pc-node.sel { background: #2456a6; color: #fff; font-weight: 700; box-shadow: 0 1px 4px rgba(36,86,166,.4) }
.pc-node.sel .dim { color: #d7e4ff }
.pc-node.sel b { color: #fff }
.pc-l1head.sel { font-size: 16.5px }
.pc-node .dim { margin-left: auto; font-size: 12.5px }
.pc-l1head { font-size: 15.5px; color: #16202f }
/* 二级与一级类别文字左对齐：节点内边距 8 + 圆点图标 7 + 间距 6 = 21px */
.pc-l2 { padding-left: 21px; font-size: 13.5px }
.pc-ico { flex-shrink: 0; color: #8aa8d8; display: inline-block; vertical-align: -1px }
.pc-node.sel .pc-ico { color: #fff }
/* 目录名不换行，列宽按最长名称自适应（fit-content），过长时横向滚动 */
.pc-cats .pc-node { font-size: 15.5px; white-space: nowrap }
.pc-cats .pc-node b { white-space: nowrap }
.pc-cats .pc-node .dim { font-size: 12.5px }

/* 目录排序模式 */
.sort-btns { display: inline-flex; gap: 4px; margin-left: 8px; flex-shrink: 0 }
.sbtn { display: inline-block; width: 23px; height: 23px; line-height: 20px; text-align: center; border: 1px solid #D6DED4; border-radius: 5px; background: #fff; color: #2456a6; font-size: 14px; cursor: pointer; user-select: none }
.sbtn:hover { background: #eef4ff; border-color: #2456a6 }

/* 整行点击 */
tr.rowlink { cursor: pointer }
tr.rowlink:hover { background: #eef4ff !important }

/* 单选组 */
.radios { display: flex; gap: 18px; padding: 6px 0; flex-wrap: wrap }
.radio-item { display: flex; align-items: center; gap: 5px; font-size: 14.5px; cursor: pointer }

/* 产品目录行内布局：名称左，标签右 */
.cat-l2-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap }
.cat-tags { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end }
.cat-name { cursor: pointer }
.cat-name h3 { font-size: 18px }

/* 颜色分类页：上下移动按钮 */
.sort-btns { display: inline-flex; gap: 4px; align-items: center; margin-left: 4px }
.sbtn { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border: 1px solid #c9d3e3; border-radius: 6px; background: #fff; color: #2456a6;
  font-size: 12px; font-weight: 400; line-height: 1; cursor: pointer; user-select: none; text-decoration: none }
.sbtn:hover { background: #e8f0fb; border-color: #2456a6 }
.sbtn:active { transform: scale(.94) }
html[data-theme="dark"] .sbtn { background: #22303f; border-color: #33445a; color: #9dc0ef }
html[data-theme="dark"] .sbtn:hover { background: #2b3c4f }

/* 产品目录：拖动排序 */
.pc-node[draggable="true"], .cat-l2[draggable="true"] { cursor: grab }
.pc-node[draggable="true"]:active, .cat-l2[draggable="true"]:active { cursor: grabbing }
.dragging { opacity: .4 }
.pc-node.drop-before, .cat-l2.drop-before { box-shadow: inset 0 3px 0 0 #2456a6 }
.pc-node.drop-after, .cat-l2.drop-after { box-shadow: inset 0 -3px 0 0 #2456a6 }
html[data-theme="dark"] .pc-node.drop-before, html[data-theme="dark"] .cat-l2.drop-before { box-shadow: inset 0 3px 0 0 #5b8fd6 }
html[data-theme="dark"] .pc-node.drop-after, html[data-theme="dark"] .cat-l2.drop-after { box-shadow: inset 0 -3px 0 0 #5b8fd6 }
/* 产品图裁剪器 */
.crop-stage { position: relative; width: 100%; max-width: min(420px, 58vh); margin: 4px auto 0; aspect-ratio: 1 / 1; border: 1px solid #c9d3e3; border-radius: 8px; overflow: hidden;
  background-color: #fff;
  background-image: linear-gradient(45deg, #eef1f6 25%, transparent 25%), linear-gradient(-45deg, #eef1f6 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef1f6 75%), linear-gradient(-45deg, transparent 75%, #eef1f6 75%);
  background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0 }
.crop-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none }
.crop-tools { display: flex; align-items: center; gap: 8px; max-width: 420px; margin: 12px auto 0 }
.crop-tools input[type=range] { flex: 1; min-width: 0; accent-color: #2456a6 }
.crop-hint { max-width: 420px; margin: 8px auto 0; font-size: 13.5px; color: #6b7a90; line-height: 1.6 }

/* 语言切换 */
.me-ico { flex-shrink: 0; width: 18px; height: 18px }

/* ---------- 侧栏收起（图标窄栏 58px） ---------- */
.side-top { display: flex; align-items: center; border-bottom: 1px solid #243247 }
.side-top .brand { flex: 0 1 auto; min-width: 0; border-bottom: 0; padding: 18px 4px 18px 16px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: flex; align-items: center; gap: 9px }
.side-toggle { display: flex; align-items: center; justify-content: center; background: transparent; border: 0; color: #7f8ea8; cursor: pointer; padding: 6px; margin-left: auto; margin-right: 8px; border-radius: 6px; transition: background .15s, color .15s }
.side-toggle:hover { background: #1d2a3d; color: #fff }
body.side-mini .side { width: 58px !important; min-width: 58px !important; max-width: 58px !important; overflow: hidden }
body.side-mini .main { margin-left: 58px; padding-left: 18px; padding-right: 18px }
body.side-mini .side-top { justify-content: center }
body.side-mini .side-top .brand { display: none }
body.side-mini .mode-btn { display: none }
body.side-mini .side-toggle { margin: 6px 0; padding: 10px 0; width: 100%; border-radius: 0 }
body.side-mini .nav-g-head { display: none }
body.side-mini .nav-g-body { display: flex !important; flex-direction: column }
body.side-mini .nav-g { border-top: 1px solid #1d2a3d; padding-top: 3px; margin-top: 3px }
body.side-mini .nav-g:first-child { border-top: 0; padding-top: 0; margin-top: 0 }
body.side-mini .side nav a, body.side-mini .nav-home { justify-content: center; padding: 9px 0; gap: 0 }
body.side-mini nav a > span, body.side-mini .nav-home > span { display: none }
body.side-mini .nav-ico { width: 16px; height: 16px }
body.side-mini .side-foot { flex-direction: column; align-items: stretch }
body.side-mini .foot-row1 { flex-direction: column; align-items: stretch }
body.side-mini .foot-link { justify-content: center; padding: 9px 0 }
body.side-mini .foot-ico { flex: 0 0 auto; width: 100%; height: 38px; border-left: 0; border-top: 1px solid #243247 }
body.side-mini .foot-me { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0 !important }
body.side-mini .me-acts { flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 58px !important; max-width: 58px !important; margin: 0 auto !important; padding: 8px 0 !important }
body.side-mini .me-acts .btn,
body.side-mini #lang-switch,
body.side-mini #btn-logout {
  flex: 0 0 auto; width: 34px !important; height: 34px !important; min-width: 0 !important; max-width: 34px !important;
  padding: 0 !important; margin: 0 !important; gap: 0; font-size: 0; line-height: 0;
  border: 0 !important; background: transparent !important; box-shadow: none !important; outline: 0;
  color: #93a3bb !important; border-radius: 7px; transition: background .15s, color .15s }
body.side-mini .me-acts .btn:hover,
body.side-mini #lang-switch:hover,
body.side-mini #btn-logout:hover { background: #1d2a3d !important; color: #fff !important }
body.side-mini .me-acts .btn > span { display: none }
body.side-mini .me-ico { display: block; width: 20px; height: 20px }

/* 客户集团：旗下客户汇总卡片 */
.sec-title { font-size: 16px; color: #16202f; margin: 18px 0 10px }
.grp-sum { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px }
.grp-card { background: #fff; border-radius: 10px; padding: 12px 14px; box-shadow: 0 1px 3px rgba(20,40,80,.08); min-width: 0 }
.grp-card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px }
.grp-card-h b { font-size: 15.5px; color: #16202f }
.grp-card .tbl-wrap { margin-bottom: 0; box-shadow: none; background: transparent }
.grp-card th { background: #F4F8F2 }
.grp-card td, .grp-card th { padding: 7px 10px; font-size: 14px }
.grp-card .empty { padding: 10px 0 }

/* 表单分段标题 */
.fgrid .f-sec { grid-column: 1 / -1; font-size: 13.5px; font-weight: 700; color: #2456a6; letter-spacing: 1px;
  border-top: 1px dashed #dde4ef; padding-top: 9px; margin: 4px 0 2px }
.fgrid .f-sec:first-child { border-top: 0; padding-top: 0; margin-top: 0 }

/* 色样上传控件 */
.swatch-up { margin-top: 6px }
.swatch-up input { font-size: 13px; color: #59657a; max-width: 100% }
/* 打色记录：色样输入框与「选择文件」同一排各占一半 */
.sw-inline { display: flex; gap: 8px; align-items: center }
.sw-inline > input { flex: 1 1 0; min-width: 0 }
.sw-inline > .swatch-up { flex: 1 1 0; min-width: 0; margin-top: 0; display: flex; align-items: center }
.sw-inline > .swatch-up > input { width: 100%; min-width: 0 }

/* 只读字段（自动编号等） */
input.ro-in, input.ro-in:focus { background: #f2f5fa; color: #55627a; cursor: default }
select.ro-in, select.ro-in:focus, select.ro-in:disabled { background: #f2f5fa; color: #7b869b; cursor: not-allowed; opacity: 1 }
html[data-theme="dark"] input.ro-in, html[data-theme="dark"] input.ro-in:focus { background: #1e2a3c; color: #93a4bd }
html[data-theme="dark"] select.ro-in, html[data-theme="dark"] select.ro-in:disabled { background: #1e2a3c; color: #93a4bd }

/* 客户编号：PI 同款下拉（编号 · 简称 · 全称） */
.cust-pick { position: relative }
.cust-pick input { width: 100%; padding-right: 24px }
.cust-arrow { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none;
  cursor: pointer; font-size: 17px; font-weight: 700; color: #6b7891; padding: 3px 5px; line-height: 1 }
.cust-list { left: 0; right: 0; min-width: 100%; max-height: 260px; overflow: auto }
.cust-list .combo-opt b { display: inline-block; min-width: 66px }
.cust-list .combo-opt > span { margin-left: 6px }

/* 云表 CAL 导出：客户（编号 + 全称）/ INV 两级模糊筛选 */
.yb-bar { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin: 4px 0 6px }
.yb-bar .fld { margin-bottom: 0 }
.yb-cust { flex: 0 1 360px; min-width: 280px }
.yb-inv { flex: 0 1 420px; min-width: 280px }
.yb-btns { display: flex; gap: 8px; align-items: center; padding-bottom: 1px }
.yb-cust .cust-list, .yb-inv .cust-list { max-height: 320px }
.yb-inv .cust-list b { min-width: 104px }
@media (max-width: 720px) {
  .yb-cust, .yb-inv, .yb-btns { flex: 1 1 100%; min-width: 0 }
}

/* 颜色档案：色样 + 注销 同处第三列 */
.sw-cell { margin-top: 2px }
.sw-line { display: flex; align-items: center; gap: 10px }
.sw-thumb { width: 56px; height: 56px; flex: 0 0 56px; border: 1px dashed #cdd6e4; border-radius: 6px;
  background: #f7f9fc; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer }
.sw-thumb img { width: 100%; height: 100%; object-fit: cover }
.sw-thumb .dim { font-size: 12px }
.sw-acts { display: flex; flex-direction: column; gap: 5px; min-width: 0 }
.sw-acts .btn { margin: 0; align-self: flex-start }
.sw-tip { font-size: 12px; line-height: 1.3 }
.fld .help:empty { display: none }

/* 上传色样 + 注销 同一行 */
.sw-btnline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap }
.sw-void { display: inline-flex; align-items: center }
.sw-void .fld { margin: 0; height: auto; padding-top: 0 }
.sw-void .chk-inline { height: auto; margin: 0; white-space: nowrap; gap: 4px; font-size: 14px }
html[data-theme="dark"] .sw-thumb { background: #1e2a3c; border-color: #33425a }

/* 光源设置弹窗 */
.lg-row { display: flex; align-items: center; gap: 6px; padding: 5px 0; border-bottom: 1px dashed #e6ecf5 }
.lg-row:last-child { border-bottom: 0 }
.lg-no { flex: 0 0 22px; text-align: right; font-size: 13px; color: #8a94a6 }
.lg-name { flex: 1; min-width: 0; padding: 6px 9px; border: 1px solid #D6DED4; border-radius: 6px; font-size: 14px }
html[data-theme="dark"] .lg-row { border-bottom-color: #2b3950 }
html[data-theme="dark"] .lg-name { background: #16202e; border-color: #33425a; color: #dbe4f0 }

/* 公司 LOGO / 签章上传：预览 + 选择按钮 */
.brand-up { margin-top: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap }
.brand-up .btn { margin: 0; display: inline-flex; align-items: center; gap: 4px }
.brand-prev { width: 110px; height: 44px; border: 1px dashed #cdd6e4; border-radius: 5px; background: #f7f9fc;
  display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0 }
.brand-prev img { max-width: 100%; max-height: 100%; object-fit: contain }
.brand-prev.seal { width: 58px; height: 58px }
.brand-prev.seal img { transform: rotate(-6deg) }
.brand-tip { font-size: 12.5px; line-height: 1.5; flex: 1; min-width: 160px }

/* 经销商经营汇总卡片 */
.sum-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 10px }
.sum-card { border: 1px solid #e3e8f0; border-radius: 6px; padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; background: #F7FAF5 }
.sum-card span { font-size: 13px; color: #59657a }
.sum-card b { font-size: 15px }

/* 表格不换行（列宽紧凑，超出横向滚动） */
.tbl-wrap.nowrap th, .tbl-wrap.nowrap td { white-space: nowrap }
/* 列表页统一排版（与采购单 / 品检入库一致）：行内容单行、垂直居中；弹窗内表格不受影响 */
.main .tbl-wrap th, .main .tbl-wrap td { white-space: nowrap }
.main .tbl-wrap td { vertical-align: middle }
/* 自适应列表：列宽按内容自动分配、铺满可视宽度，长内容换行不再横向撑破 */
.main .tbl-wrap.fit th, .main .tbl-wrap.fit td { white-space: normal; word-break: break-word }
.tbl-wrap.fit table { table-layout: auto; width: 100% }
.main .tbl-wrap.fit th { white-space: nowrap }

/* 文件名等等宽显示 */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px }

/* CAL 列表自适应：铺满可视宽度；客户 / INV / 装箱单号可折行，单号与数字保持单行，操作列不被挤走 */.main .tbl-wrap.cal-tbl td { white-space: normal; word-break: break-word }
.main .tbl-wrap.cal-tbl td:nth-child(1),
.main .tbl-wrap.cal-tbl td:nth-child(2),
.main .tbl-wrap.cal-tbl td:nth-child(6),
.main .tbl-wrap.cal-tbl td:nth-child(7),
.main .tbl-wrap.cal-tbl td:nth-child(8),
.main .tbl-wrap.cal-tbl td:nth-child(9) { white-space: nowrap }
.main .tbl-wrap.cal-tbl td:nth-child(3) { min-width: 110px }
/* 操作列：编辑 / 箱唛 / 导出 / 删除 四个动作必须并排一行，不许换行把「删除」挤到第二行 */
.main .tbl-wrap.cal-tbl td:last-child { min-width: 186px; width: 186px }
.main .tbl-wrap.cal-tbl th:last-child { width: 186px }
.main .tbl-wrap.cal-tbl .acts { white-space: nowrap; display: inline-flex; flex-wrap: nowrap; gap: 10px; align-items: center }
@media (max-width: 1180px) {
  .main .tbl-wrap.cal-tbl th, .main .tbl-wrap.cal-tbl td { padding: 8px 9px; font-size: 13.5px }
  .main .tbl-wrap.cal-tbl .act { font-size: 13.5px }
}

/* 模杯资料 / 模杯生产单列表自适应：铺满可视宽度、内容折行不撑破；窄屏依次收起次要列
   （tableHTML 的 hide:'md' → .col-hide-md，hide:'sm' → .col-hide-sm） */
.main .tbl-wrap.mb-tbl { overflow-x: auto }
.main .tbl-wrap.mb-tbl table { table-layout: auto; width: 100% }
.main .tbl-wrap.mb-tbl th { white-space: nowrap }
.main .tbl-wrap.mb-tbl td { white-space: normal; word-break: break-word }
.main .tbl-wrap.mb-tbl .acts { display: inline-flex; flex-wrap: nowrap; gap: 10px; align-items: center }
/* 打印下拉的箭头比正文小半号，四个动作在同一基线上 */
.main .tbl-wrap.mb-tbl .act .cr { font-size: 10px; margin-left: 2px; display: inline-block; line-height: 1 }
.main .tbl-wrap.mb-tbl .doc-no { color: #1d3a6b }
.main .tbl-wrap.mb-tbl td:last-child { min-width: 150px }
@media (max-width: 960px) {
  .main .tbl-wrap.mb-tbl th, .main .tbl-wrap.mb-tbl td { padding: 7px 8px; font-size: 13px }
  .main .tbl-wrap.mb-tbl .col-hide-md { display: none }
}
@media (max-width: 680px) {
  .main .tbl-wrap.mb-tbl th, .main .tbl-wrap.mb-tbl td { padding: 6px 6px; font-size: 12.5px }
  .main .tbl-wrap.mb-tbl .col-hide-sm { display: none }
  .main .tbl-wrap.mb-tbl td:last-child { min-width: 120px }
  .m-head .m-hd-date > label { display: none }
}

/* 付款申请：凭证上传与金额试算 */
.vch-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px; border: 1px dashed #ccd6e6; border-radius: 8px; background: #F7FAF5 }
.vch-grid { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 34px }
.vch-thumb { position: relative; width: 74px; height: 74px; border: 1px solid #dde4ef; border-radius: 6px; overflow: hidden; background: #fff; cursor: zoom-in; flex: 0 0 auto }
.vch-thumb img { width: 100%; height: 100%; object-fit: cover; display: block }
.vch-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #9aa3b5 }
.vch-x { position: absolute; top: 0; right: 0; width: 18px; height: 18px; line-height: 16px; text-align: center; background: rgba(15,25,45,.6); color: #fff; border-radius: 0 0 0 6px; font-size: 14px; cursor: pointer }
.vch-x:hover { background: #d64541 }
.vch-add { display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px; border: 1px solid #D6DED4; border-radius: 6px; background: #fff; font-size: 14px; color: #2456a6; cursor: pointer }
.vch-add:hover { background: #f2f5fa }
/* 付款申请⑤：发票 / 凭证 / 备注 三个 1/4 并排，只占一行正常高度 */
.fgrid.g4 .fld-inline { margin: 0 }
.vch-one { padding: 0; border: 0; background: none; gap: 6px; height: 38px; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden }
.vch-one .vch-grid { min-height: 0; height: 38px; flex-wrap: nowrap; gap: 6px; flex: 0 0 auto }
.vch-one .vch-thumb { width: 38px; height: 38px }
.vch-one .vch-x { width: 14px; height: 14px; line-height: 12px; font-size: 11px; border-radius: 0 0 0 4px }
.vch-one .vch-ph { font-size: 10px }
.vch-one .vch-add { display: inline-flex; align-items: center; justify-content: center; margin: 0; flex: 0 0 auto; font-size: 21px; line-height: 1; color: #2456a6 }
.vch-sq { width: 38px; height: 38px; padding: 0; justify-content: center; font-size: 21px; line-height: 1; flex: 0 0 auto }
/* 付款申请③：收款人选人框 + 右侧窄「＋新增」按钮 */
.payee-row { display: flex; align-items: flex-start; gap: 6px; min-width: 0 }
.payee-pick { position: relative; flex: 1 1 auto; min-width: 0 }
.payee-pick > input { width: 100%; height: 38px; box-sizing: border-box; padding: 0 24px 0 10px; border: 1px solid #D6DED4; border-radius: 6px; font-size: 14.5px; font-family: inherit; background: #fff }
.payee-pick > #pr-payee-arrow { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); cursor: pointer; color: #8a93a6; font-size: 13px; line-height: 1 }
.payee-pick > #pr-payee-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 60; max-height: 240px; overflow: auto; background: #fff; border: 1px solid #d8d8d8; border-radius: 6px; box-shadow: 0 8px 22px rgba(0,0,0,.14); text-align: left }
.payee-add { flex: 0 0 38px; width: 38px; height: 38px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #D6DED4; border-radius: 6px; background: #fff; color: #2456a6; font-size: 20px; line-height: 1; text-decoration: none }
.payee-add:hover { background: #f2f5fa; text-decoration: none }
.pr-remark-one { margin-bottom: 0 }
.pr-remark-one > textarea, .fgrid.g4 > .pr-remark-one > textarea { height: 38px; min-height: 38px; padding: 8px 10px; resize: vertical }
.pr-calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 16px; background: #F4F8F2; border-radius: 8px; padding: 10px 14px; margin-top: 4px }
.pr-calc > div { font-size: 14px; color: #44506a }
.pr-calc span { display: block; font-size: 13px; color: #59657a }
.pr-calc b { font-size: 15px }

/* 公司内账：凭证分录、汇总、报表 */
.acc-lines { margin: 6px 0 0 }
.acc-entry-tbl { width: 100%; border-collapse: collapse; font-size: 14px }
.acc-entry-tbl th { background: #f4f6fa; color: #4a566e; font-weight: 600; text-align: left; padding: 6px 6px; border-bottom: 1px solid #e2e8f2; white-space: nowrap }
.acc-entry-tbl td { padding: 3px 4px; border-bottom: 1px solid #eef2f8; vertical-align: middle }
.acc-entry-tbl input, .acc-entry-tbl select { width: 100%; box-sizing: border-box; padding: 5px 6px; border: 1px solid #D6DED4; border-radius: 5px; font-size: 13.5px; background: #fff }
.acc-entry-tbl input:focus, .acc-entry-tbl select:focus { border-color: #2456a6; outline: none }
.acc-entry-tbl input:disabled, .acc-entry-tbl select:disabled { background: #F4F8F2; color: #59657a }
.acc-entry-tbl input[type=number] { text-align: right }
.acc-lines-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 2px 2px }
.acc-total { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 16px; background: #F4F8F2; border-radius: 8px; padding: 10px 14px; margin: 8px 0 }
.acc-total > div { font-size: 14px; color: #44506a }
.acc-total span { display: block; font-size: 13px; color: #59657a }
.acc-total b { font-size: 15px }
.acc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start }
@media (max-width: 1100px) { .acc-two { grid-template-columns: 1fr } }
.acc-two h4 { margin: 4px 0 8px }
.acc-rpt-wrap { overflow-x: auto }
.acc-rpt { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff }
.acc-rpt th, .acc-rpt td { border: 1px solid #e2e8f2; padding: 7px 10px }
.acc-rpt th { background: #f4f6fa; color: #4a566e; font-weight: 600 }
.acc-rpt .num { text-align: right; font-variant-numeric: tabular-nums }
.acc-rpt-sum td { background: #F4F8F2; font-weight: 600 }
.acc-rpt-total td { background: #eef3fb; font-weight: 700; color: #1e3f74 }
.acc-sum-line { margin: 8px 0 14px; padding: 8px 12px; background: #F4F8F2; border-radius: 6px; font-size: 14px; color: #33405a }
.acc-ind { padding-left: 14px; color: #59657a }
.acc-cand-wrap, .acc-op-wrap { max-height: 54vh; overflow: auto; margin: 8px 0 }
.acc-op-wrap .acc-entry-tbl input { max-width: 140px; text-align: right }

.acc-guide { border: 1px solid #dbe6f6; background: linear-gradient(180deg,#f7faff,#fff); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px }
.acc-guide-t { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px }
.acc-guide-t b { color: #1e3f74; font-size: 15px }
.acc-guide-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px }
.acc-guide-steps > div { background: #fff; border: 1px solid #e6ecf6; border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; position: relative }
.acc-guide-steps em { font-style: normal; width: 20px; height: 20px; border-radius: 50%; background: #2456a6; color: #fff; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 2px }
.acc-guide-steps b { font-size: 14px }
.acc-guide-steps span { font-size: 13px; color: #59657a; line-height: 1.5 }
.acc-guide-steps a { margin-top: 4px; font-size: 13.5px }

/* 可搜索下拉（客户/供应商/产品） */
.ssel { position: relative; width: 100% }
.ssel .ssel-native { position: absolute; left: 0; top: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; pointer-events: none }
.ssel .ssel-input { width: 100%; padding-right: 26px; box-sizing: border-box }
.ssel::after { content: '▾'; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 16px; font-weight: 700; color: #7a8598; pointer-events: none; line-height: 1 }
.ssel-menu { position: fixed; z-index: 200; background: #fff; border: 1px solid #D6DED4; border-radius: 7px; box-shadow: 0 8px 22px rgba(15,25,45,.16); max-height: 260px; overflow: auto; padding: 4px }
.ssel-item { padding: 6px 9px; border-radius: 5px; font-size: 14px; color: #2f3b52; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.ssel-item.hi { background: #eef3fb; color: #1e3f74 }
.ssel-item.dis { color: #b6bdcb; cursor: not-allowed }
.ssel-empty { padding: 8px 9px; font-size: 13.5px; color: #8a93a6 }
.ssel:has(.bad) .ssel-input { border-color: #d64541 }
.fld-inline .ssel { width: auto; min-width: 180px }
.ssel-item .ssel-code { float: right; margin-left: 12px; color: #98a2b6; font-size: 13px; font-family: ui-monospace, Menlo, monospace }

/* 款号输入：前缀提示 + 同类最新款号联想 */
.art-wrap { position: relative }
.art-wrap input.bad { border-color: #d64541; background: #fff7f7 }
.art-tip { margin: 3px 0 0; font-size: 12.5px; color: #8a93a6; min-height: 0; line-height: 1.4 }
.art-tip.bad { color: #c0392b }
.art-tip b { color: #2456a6; font-weight: 600 }
html[data-theme="dark"] .art-wrap input.bad { background: #3a2020 }
html[data-theme="dark"] .art-tip.bad { color: #ff8b82 }

/* 共享知识库 */
.kb-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 14px }
.kb-chips .chip { border: 1px solid #D6DED4; background: #fff; border-radius: 16px; padding: 5px 12px; font-size: 14px; color: #44506a; cursor: pointer }
.kb-chips .chip.on { background: #2456a6; border-color: #2456a6; color: #fff }
.kb-chips .chip i { font-style: normal; opacity: .65; font-size: 13px; margin-left: 2px }
.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px }
.kb-card { border: 1px solid #e4e9f2; border-radius: 10px; padding: 12px 14px; cursor: pointer; background: #fff; display: flex; flex-direction: column; gap: 6px; transition: box-shadow .15s }
.kb-card:hover { box-shadow: 0 6px 16px rgba(15,25,45,.1) }
.kb-card.pinned { border-color: #f0b37e; background: #fffdf8 }
.kb-card-t b { font-size: 15.5px; color: #22314e }
.kb-card-x { font-size: 13.8px; color: #5a6478; line-height: 1.55; min-height: 38px }
.kb-card-m { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: #8a93a6 }
.kb-card-m .acts a { font-size: 13px }
.kb-article { line-height: 1.75; font-size: 15px; color: #2c3852; word-break: break-word }
.kb-article h1, .kb-article h2, .kb-article h3 { margin: 14px 0 8px; color: #1e3f74 }
.kb-article h1 { font-size: 21px } .kb-article h2 { font-size: 18px } .kb-article h3 { font-size: 16px }
.kb-article p { margin: 8px 0 }
.kb-article ul, .kb-article ol { padding-left: 22px; margin: 8px 0 }
.kb-article img { max-width: 100%; border-radius: 8px }
.kb-article table { border-collapse: collapse; margin: 10px 0 }
.kb-article table td, .kb-article table th { border: 1px solid #D6DED4; padding: 6px 9px; font-size: 14px }
.kb-article blockquote { border-left: 3px solid #b9c8e4; margin: 10px 0; padding: 4px 12px; color: #5a6478; background: #F4F8F2 }
.kb-article a { color: #2456a6 }
.kb-toolbar { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px }
.kb-toolbar button { border: 1px solid #D6DED4; background: #fff; border-radius: 6px; padding: 5px 9px; font-size: 13.5px; cursor: pointer; color: #44506a }
.kb-toolbar button:hover { border-color: #2456a6; color: #2456a6 }
.kb-editor { min-height: 320px; max-height: 52vh; overflow: auto; border: 1px solid #D6DED4; border-radius: 8px; padding: 12px 14px; font-size: 15px; line-height: 1.7; outline: none; background: #fff }
.kb-editor:focus { border-color: #2456a6 }
.kb-editor h2 { font-size: 18px } .kb-editor h3 { font-size: 16px }
.kb-editor img { max-width: 100% }
.kb-ai-out { border: 1px solid #dbe6f6; background: #f7faff; border-radius: 10px; padding: 12px 14px; margin: 10px 0 }
.kb-ai-ans { line-height: 1.8; font-size: 14.8px; color: #22314e; white-space: normal }
.kb-ai-src .tag { margin: 0 6px 6px 0 }
.kb-ai-ans p { margin: 0 0 9px }
.kb-ai-ans ul, .kb-ai-ans ol { margin: 4px 0 10px; padding-left: 22px }
.kb-ai-ans li { margin: 3px 0 }
.kb-ai-ans .kb-h { font-weight: 600; color: #1b3357; margin: 12px 0 6px; font-size: 15px }
.kb-ai-ans code { background: #eaf1fd; border-radius: 4px; padding: 1px 5px; font-size: 13px }
.kb-ai-ans .kb-cite { color: #2456a6; background: #e8f0fe; border-radius: 4px; padding: 0 4px; font-size: 12.5px; margin: 0 2px; white-space: nowrap }
.kb-ask { display: flex; gap: 8px; align-items: stretch }
.kb-ask textarea { flex: 1; resize: vertical; min-height: 54px; border: 1px solid #D6DED4; border-radius: 8px; padding: 9px 11px; font-size: 14.5px; font-family: inherit; line-height: 1.6; outline: none }
.kb-ask textarea:focus { border-color: #2456a6 }
.kb-ask .btn { align-self: flex-start; height: 38px }
.kb-ai-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px }
.kb-chip { cursor: pointer; font-size: 12.5px; color: #4a5a76; background: #f1f5fb; border: 1px solid #e2eaf6; border-radius: 20px; padding: 3px 10px }
.kb-chip:hover { color: #2456a6; border-color: #b9cdf0; background: #eaf2ff }
.kb-ai-none { color: #7a8395; font-size: 14px; line-height: 1.75 }
.kb-src-t { font-size: 12.5px; color: #8a94a6; margin: 10px 0 6px }
.kb-src { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: #fff; border: 1px solid #e2eaf6; border-radius: 8px; padding: 7px 10px; margin-bottom: 6px; cursor: pointer; font-size: 13.5px; color: #2f3b52; font-family: inherit }
.kb-src:hover { border-color: #9dbbe8; background: #f7fbff }
.kb-src b { color: #2456a6; font-weight: 600; white-space: nowrap; font-size: 12.5px }
.kb-src i { margin-left: auto; font-style: normal; color: #9aa4b6; font-size: 12px; white-space: nowrap }
.kb-hl { background: #fff6d8; box-shadow: 0 0 0 3px #fff6d8; border-radius: 2px; transition: background .4s }
.btn.ai { color: #2456a6; border-color: #c3d6f2; background: #f2f7ff }
.btn.ai:hover { background: #e6f0ff }

/* 知识库编辑器内表格样式（与正文展示一致） */
.kb-editor table { border-collapse: collapse; margin: 10px 0; width: auto; min-width: 200px }
.kb-editor table td, .kb-editor table th { border: 1px solid #c9d2e0; padding: 6px 10px; font-size: 14px; min-width: 48px }
.kb-editor table th { background: #f0f4fb; color: #1e3f74; text-align: left }
.kb-editor table.kb-tbl th { background: #f0f4fb }

/* 侧栏红点提醒（审批中心 / 工单） */
.tab-dot { display: inline-block; margin-left: 5px; background: #e5484d; color: #fff; font-style: normal; font-size: 12px; line-height: 1; padding: 3px 7px; border-radius: 10px; font-weight: 700; min-width: 14px; text-align: center; vertical-align: 1px; white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.25) }
.tab-dot.green { background: #2f9e44; margin-left: 4px }
.tab-dot.orange { background: #e8890c; margin-left: 4px }
.tab-dot.purple { background: #9b51e0; margin-left: 4px }
.tab-dot.blue { background: #1a6fdb }
.nav-dot { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: #2f9e44; color: #fff; font-style: normal; font-size: 12px; line-height: 1; padding: 3px 6px; border-radius: 9px; font-weight: 700; min-width: 14px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.35) }
.nav-home { position: relative }
.nav-g-head .nav-dot { right: 12px; top: 50%; transform: translateY(-50%); font-size: 11px; padding: 2px 5px }
body.side-mini .nav-dot { right: 8px; top: 6px; transform: none; padding: 2px 4px; font-size: 11px }

/* ---------- 跨境电商（亚马逊周报） ---------- */
.amz-card { background:#fff; border:1px solid #e5e9f0; border-radius:12px; padding:18px; margin-bottom:18px }
.amz-card h3 { font-size:16px; margin-bottom:14px }
.amz-filters { display:flex; gap:10px; flex-wrap:wrap; align-items:center }
.amz-filters label { color:#6b7280; font-size:14px }
.amz-kpis { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:12px; margin-bottom:18px }
.amz-kpi { background:#fff; border:1px solid #e5e9f0; border-radius:12px; padding:14px 16px }
.amz-klabel { color:#6b7280; font-size:13px; margin-bottom:6px }
.amz-kvalue { font-size:21px; font-weight:700 }
.amz-ksub { font-size:13px; margin-top:4px }
.amz-up { color:#16a34a } .amz-down { color:#dc2626 }
.amz-tbl { width:100%; border-collapse:collapse }
.amz-tbl th, .amz-tbl td { text-align:right; padding:9px 10px; border-bottom:1px solid #e5e9f0; white-space:nowrap }
.amz-tbl th:first-child, .amz-tbl td:first-child { text-align:left }
.amz-tbl th { color:#6b7280; font-weight:500; font-size:13px }
.amz-tbl td { font-size:14px }
/* 产品名称列：适当缩短不撑表，鼠标指向浮现完整名称 */
.amz-tbl td.amz-pcell { position: relative; text-align: left }
.amz-pname { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; cursor: help }
.amz-pcell:hover::after {
  content: attr(data-tip); position: absolute; left: 10px; top: calc(100% + 4px); z-index: 60;
  max-width: 400px; width: max-content; white-space: normal; word-break: break-word; text-align: left;
  background: #16202f; color: #f1f5fb; font-size: 12.5px; line-height: 1.55;
  padding: 7px 10px; border-radius: 6px; box-shadow: 0 6px 18px rgba(15,30,55,.3); pointer-events: none;
}
.amz-tag { display:inline-block; padding:2px 8px; border-radius:10px; font-size:13px; background:#eaf1fe; color:#2f6fed }
.amz-tag.amz-red { background:#fee2e2; color:#dc2626 }
.amz-tag.amz-green { background:#dcfce7; color:#16a34a }
.amz-tag.amz-amber { background:#fef3c7; color:#b45309 }
/* 报表导入 */
.amz-imp-tip { font-size:13px; line-height:1.7; color:#4b5563; background:#f6f9fe; border:1px solid #e3ecfa; border-radius:8px; padding:10px 12px }
.amz-imp-tip code { background:#e8effb; padding:1px 5px; border-radius:4px; font-size:12px }
.amz-imp-drop { margin-top:14px; border:1.5px dashed #b9cbe8; border-radius:10px; padding:26px 16px; text-align:center; cursor:pointer; background:#fbfdff }
.amz-imp-drop:hover, .amz-imp-drop.on { border-color:#2f6fed; background:#f2f7ff }
.amz-imp-drop-t { font-size:15px; color:#2456a6; margin-bottom:6px }
.amz-imp-err { color:#dc2626 }
.amz-imp-file { margin:14px 0 10px; font-weight:600; color:#334155; display:flex; align-items:center; gap:8px; flex-wrap:wrap }
.amz-imp-b { display:inline-block; padding:2px 8px; border-radius:10px; font-size:12px; font-weight:400; background:#eef3fb; color:#4b5563 }
.amz-imp-b.ok { background:#dcfce7; color:#15803d }
.amz-imp-b.warn { background:#fef3c7; color:#b45309 }
.amz-imp-b.off { background:#eef1f5; color:#8a93a6 }
.amz-imp-map { display:flex; align-items:center; gap:16px; flex-wrap:wrap; padding:10px 12px; background:#f8fafd; border-radius:8px; font-size:13px }
.amz-imp-map select { width:180px; margin-left:6px }
.amz-imp-cb { display:flex; align-items:center; gap:6px; color:#4b5563 }
.amz-imp-stat { margin:12px 0 6px; font-size:13px; color:#4b5563; display:flex; gap:8px; align-items:center; flex-wrap:wrap }
.amz-imp-tbl { max-height:46vh; overflow:auto; border:1px solid #e8edf5; border-radius:8px }
.amz-fgrid { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:12px }
.amz-fitem label { display:block; color:#6b7280; font-size:13px; margin-bottom:5px }
.amz-fitem input { width:100% }
.amz-gtitle { font-size:14px; font-weight:600; color:#2456a6; margin:20px 0 10px; padding-left:8px; border-left:3px solid #2456a6 }
.amz-derived { display:flex; gap:16px; flex-wrap:wrap; background:#f8fafd; border-radius:8px; padding:12px 14px; margin-top:14px }
.amz-derived span { color:#6b7280; font-size:13px } .amz-derived b { color:#1c2333 }
.amz-actions { display:flex; gap:10px; margin-top:20px; align-items:center }
.amz-chart { overflow-x:auto }
.amz-legend { display:flex; gap:16px; font-size:13px; color:#6b7280; margin-top:8px }
.amz-legend i { display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:4px }

/* 亚马逊运营管理：页签 */
.amz-tabbar { display: flex; gap: 2px; margin-bottom: 16px; border-bottom: 2px solid #e5e9f0; flex-wrap: wrap }
/* 亚马逊独立端（8081）：页签已拆成左侧菜单，不再显示页签条 */
.amz-standalone .amz-tabbar { display: none }
.amz-tab { padding: 9px 18px; border: 0; background: transparent; color: #6b7280; font-size: 15px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; border-radius: 6px 6px 0 0 }
.amz-tab:hover { color: #2456a6; background: #f2f6fd }
.amz-tab.on { color: #2456a6; font-weight: 700; border-bottom-color: #2456a6; background: #f2f6fd }
/* 进销存内部页签：属于页面内分区，独立端也要显示（只隐藏外层 amz-tabbar） */
.amz-stabs { display: flex; gap: 2px; margin-bottom: 16px; border-bottom: 2px solid #e5e9f0; flex-wrap: wrap }
html[data-theme="dark"] .amz-stabs { border-bottom-color: #2c3848 }
/* 数据明细：周报页大标题后面的入口，不做成页签 */
.amz-sublink { display: inline-flex; align-items: center; padding: 4px 12px; font-size: 13px; color: #2456a6; background: #e8effb; border-radius: 12px; cursor: pointer; white-space: nowrap; align-self: center }
.amz-sublink:hover { color: #1b4a94; background: #dbe7fb }

/* ---------- 亚马逊：本周分析报告 ---------- */
.amz-rpt-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 14px; border: 1px solid #e5e9f0; border-left: 4px solid #94a3b8; border-radius: 8px; background: #f8fafc }
.amz-rpt-banner-tag { flex: none; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #e2e8f0; color: #475569 }
.amz-rpt-banner-txt { flex: 1; font-size: 13.5px; line-height: 1.6; color: #334155 }
.amz-rpt-bad { border-left-color: #dc2626 }
.amz-rpt-bad .amz-rpt-banner-tag { background: #fee2e2; color: #b91c1c }
.amz-rpt-warn { border-left-color: #d97706 }
.amz-rpt-warn .amz-rpt-banner-tag { background: #fef3c7; color: #b45309 }
.amz-rpt-ok { border-left-color: #16a34a }
.amz-rpt-ok .amz-rpt-banner-tag { background: #dcfce7; color: #15803d }
.amz-rpt-up { color: #16a34a }
.amz-rpt-down { color: #dc2626 }

.amz-rpt-sum { border-left: 4px solid #94a3b8 }
.amz-rpt-sum.amz-rpt-bad { border-left-color: #dc2626; background: linear-gradient(90deg, #fef2f2 0%, #fff 45%) }
.amz-rpt-sum.amz-rpt-warn { border-left-color: #d97706; background: linear-gradient(90deg, #fffbeb 0%, #fff 45%) }
.amz-rpt-sum.amz-rpt-ok { border-left-color: #16a34a; background: linear-gradient(90deg, #f0fdf4 0%, #fff 45%) }
.amz-rpt-sum-h { font-size: 13px; color: #64748b; margin-bottom: 8px }
.amz-rpt-sum-t { font-size: 16px; line-height: 1.75; color: #1e293b; font-weight: 600 }
.amz-rpt-sum-k { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 14px; font-size: 13px; color: #64748b }
.amz-rpt-sum-k b { color: #1e293b; font-size: 15px; margin-left: 4px }
.amz-rpt-flag { display: inline-block; margin-left: 6px; padding: 0 6px; font-size: 11px; font-style: normal; color: #b45309; background: #fef3c7; border-radius: 8px }
.amz-rpt-miss { margin-bottom: 12px; padding: 8px 12px; font-size: 13px; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px }
.amz-rpt-note { font-size: 12px; line-height: 1.6; margin-top: 10px }
.amz-rpt-scroll { overflow-x: auto }
.amz-rpt-tbl td, .amz-rpt-tbl th { white-space: nowrap }
.amz-rpt-tbl td:first-child { color: #475569 }

/* ---------- 亚马逊：广告与流量分析页 ---------- */
.amz-loading { padding: 40px 0; text-align: center; color: #64748b; font-size: 14px }
.amz-ads-kpi { display: flex; flex-wrap: wrap; gap: 8px 28px; padding: 10px 14px; margin-bottom: 12px; border: 1px solid #e5e9f0; border-radius: 8px; background: #f8fafc; font-size: 13.5px; color: #475569 }
.amz-ads-kpi b { color: #1e293b; font-size: 15px; margin-left: 4px }
.amz-ads-sub { margin: 16px 0 8px; padding-left: 10px; border-left: 3px solid #2456a6; font-size: 14px; font-weight: 600; color: #1e293b }
.amz-ads-title { max-width: 320px; white-space: normal !important; text-align: left; line-height: 1.4; font-size: 12.5px; color: #475569 }

/* 归因条 */
.amz-rpt-bd { margin-top: 4px }
.amz-rpt-bd-total { font-size: 15px; color: #334155; margin-bottom: 12px }
.amz-rpt-bd-total b { font-size: 20px; margin: 0 4px }
.amz-rpt-bd-row { display: grid; grid-template-columns: 120px 1fr 110px 210px; align-items: center; gap: 10px; padding: 6px 0; font-size: 13.5px }
.amz-rpt-bd-l { color: #475569 }
.amz-rpt-bd-bar { height: 12px; background: #f1f5f9; border-radius: 6px; overflow: hidden }
.amz-rpt-bd-bar i { display: block; height: 100%; border-radius: 6px }
.amz-rpt-bd-bar i.pos { background: #34d399 }
.amz-rpt-bd-bar i.neg { background: #f87171 }
.amz-rpt-bd-r { text-align: right }
@media (max-width: 820px) { .amz-rpt-bd-row { grid-template-columns: 90px 1fr 90px; } .amz-rpt-bd-r { display: none } }

/* 问题清单 */
.amz-rpt-list { display: flex; flex-direction: column; gap: 12px }
.amz-rpt-item { border: 1px solid #e5e9f0; border-left: 3px solid #cbd5e1; border-radius: 8px; padding: 12px 14px; background: #fff }
.amz-rpt-item.lv-high { border-left-color: #dc2626; background: #fffafa }
.amz-rpt-item.lv-mid { border-left-color: #d97706; background: #fffdf7 }
.amz-rpt-item-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14.5px; color: #1e293b }
.amz-rpt-item-h b { font-weight: 600 }
.amz-rpt-lv { flex: none; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 9px; background: #e2e8f0; color: #475569 }
.lv-high .amz-rpt-lv { background: #fee2e2; color: #b91c1c }
.lv-mid .amz-rpt-lv { background: #fef3c7; color: #b45309 }
.amz-rpt-dim { flex: none; font-size: 12px; color: #64748b; background: #f1f5f9; padding: 1px 7px; border-radius: 9px }
.amz-rpt-fact { margin-top: 8px; font-size: 13px; line-height: 1.7; color: #475569 }
.amz-rpt-do { margin-top: 9px; padding: 9px 12px; font-size: 13px; line-height: 1.75; color: #1e3a5f; background: #f2f7ff; border-radius: 6px }
.amz-rpt-do span { display: inline-block; margin-right: 8px; font-size: 11px; font-weight: 700; color: #2456a6; background: #e0ebff; padding: 1px 7px; border-radius: 9px }
.amz-rpt-none { padding: 12px 0; font-size: 14px; color: #16a34a }

/* 行动清单 */
.amz-rpt-act ol { margin: 0; padding-left: 0; list-style: none; counter-reset: act }
.amz-rpt-act li { counter-increment: act; display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; font-size: 14px; line-height: 1.6; color: #1e293b; border-bottom: 1px dashed #eef0f4 }
.amz-rpt-act li:last-child { border-bottom: 0 }
.amz-rpt-act li::before { content: counter(act); flex: none; width: 20px; height: 20px; margin-top: 2px; font-size: 12px; line-height: 20px; text-align: center; color: #fff; background: #2456a6; border-radius: 50% }
.amz-rpt-box { display: none }

/* ASIN 结构 */
.amz-rpt-cap { margin: 14px 0 8px; font-size: 13px; font-weight: 600; color: #475569; padding-left: 8px; border-left: 3px solid #cbd5e1 }
.amz-rpt-cap:first-of-type { margin-top: 4px }
.amz-rpt-sub { font-size: 13px; color: #64748b }
.amz-rpt-good { margin: 0; padding-left: 18px }
.amz-rpt-good li { font-size: 13.5px; line-height: 1.7; color: #475569; margin-bottom: 8px }
.amz-rpt-good li b { color: #15803d; margin-right: 8px }

@media print {
  .amz-tabbar, .amz-filters, .amz-rpt-banner, #rPrint, .side, .topbar { display: none !important }
  .amz-card, .amz-rpt-item, .amz-rpt-sum { break-inside: avoid; box-shadow: none !important }
  .amz-rpt-item { border-color: #ddd }
}

/* 多选人员列表（供应商跟单等） */
.pick-list { border: 1px solid #e5e9f0; border-radius: 8px; padding: 2px 10px }
.pick-row { display: flex; align-items: center; gap: 8px; padding: 7px 4px; border-bottom: 1px solid #eef0f4; cursor: pointer; font-size: 14px }
.pick-row:last-child { border-bottom: 0 }
.pick-row:hover { background: #F4F8F2 }
.pick-row input { margin: 0 }

/* 新建报价 / PI：签约公司 + 结算币种（同一弹窗，卡片式、整行可点；字号与表单一致，靠留白保证好点） */
.st-sub { font-size: 13.5px; color: #6b7280; margin: 0 0 2px }
.st-lbl { font-size: 13px; font-weight: 600; color: #4b5563; margin: 15px 0 8px; letter-spacing: .3px }
/* 公司、币种都完整列出，不折叠；一行一个卡片 */
.st-list { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 8px; max-height: 40vh; overflow: auto; padding: 1px }
.st-opt { display: flex; flex-direction: row; align-items: center; gap: 10px; width: 100%; box-sizing: border-box;
  min-height: 42px; padding: 10px 12px; border: 1px solid #D6DED4; border-radius: 8px;
  background: #fff; cursor: pointer; font-size: 15.5px; line-height: 1.35; -webkit-tap-highlight-color: transparent;
  transition: border-color .12s, background .12s, box-shadow .12s }
.st-opt:hover { border-color: #9db2cd; background: #f7fafd }
.st-opt.on { border-color: #2456a6; background: #f2f7fd; box-shadow: 0 0 0 2px rgba(36,86,166,.12) }
.st-opt input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: #2456a6 }
.st-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left }
.st-name { font-size: 15.5px; font-weight: 600; letter-spacing: .2px; word-break: break-word }
.st-empty { padding: 10px 4px; color: #9aa3ad; font-size: 13.5px }
.st-pid { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #e3e8ef; min-height: 18px; font-size: 13.5px; color: #5b6470 }
html[data-theme="dark"] .st-sub,
html[data-theme="dark"] .st-lbl,
html[data-theme="dark"] .st-pid { color: #93a3b8 }
html[data-theme="dark"] .st-opt { background: #1a2330; border-color: #2c3848; color: #e4ebf4 }
html[data-theme="dark"] .st-opt:hover { background: #24303f; border-color: #3b4b60 }
html[data-theme="dark"] .st-opt.on { background: #1e3050; border-color: #4a7ac0; box-shadow: 0 0 0 2px rgba(74,122,192,.2) }
html[data-theme="dark"] .st-empty { color: #7b8794 }
html[data-theme="dark"] .st-pid { border-top-color: #2c3848 }
@media (max-width: 640px) {
  .st-opt { min-height: 46px; padding: 11px 12px; font-size: 16px; gap: 10px }
  .st-name { font-size: 16px }
  .st-opt input { width: 19px; height: 19px }
  .st-list { gap: 8px; max-height: 36vh }
  .st-lbl { margin: 18px 0 10px; font-size: 15px }
}


/* 打印：单据底色一律全白 */
@media print {
  html, body { background: #fff !important }
  .main, .page, .tbl-wrap, .stat, .cat-l1, .grp-card, .info-grid, .note,
  .alloc-line, .sum-card, .vch-box, .pr-calc, .acc-total, .acc-sum-line { background: #fff !important; box-shadow: none !important }
  .side, .side-foot, .no-print { display: none !important }
}


/* 组合框（可输入模糊搜索 + 下拉选择） */
.combo-in { padding: 4px 8px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 14px; box-sizing: border-box }
.combo-in:focus { outline: none; border-color: #1a56db; box-shadow: 0 0 0 2px rgba(26,86,219,.12) }
/* 筛选栏输入控件：高度对齐产品中心 .search 标准（padding 7px 10px） */
.fb-bar input, .fb-bar select { padding: 7px 10px; border: 1px solid #D6DED4; border-radius: 6px; font-size: 14px; background: #fff; color: inherit; box-sizing: border-box }
.fb-bar .combo-in { padding: 7px 10px }
.combo-list { position: absolute; top: 100%; left: 0; z-index: 60; background: #fff; border: 1px solid #d9d9d9; border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.14); max-height: 240px; overflow: auto; min-width: 100%; }
.combo-opt { padding: 6px 10px; cursor: pointer; font-size: 14px; white-space: nowrap }
.combo-opt:hover { background: #eef3ff }
.combo-opt.active { color: #1a56db; font-weight: 600 }

/* 单号蓝色（同 .act 链接色，不可点的单号用） */
.doc-no { color: #2456a6 }

/* 页面标题下一行的灰色提示 */
.page-sub { margin: -8px 0 10px }

/* ---------- 暗色主题（html[data-theme="dark"] 时生效，浅色默认值不变） ---------- */
html[data-theme="dark"] { color-scheme: dark }
html[data-theme="dark"] body { background: #111822; color: #e4ebf4 }

/* 卡片 / 容器 */
html[data-theme="dark"] .search,
html[data-theme="dark"] .stat,
html[data-theme="dark"] .tbl-wrap,
html[data-theme="dark"] .empty,
html[data-theme="dark"] .cat-l1,
html[data-theme="dark"] .alloc-line,
html[data-theme="dark"] .pc-cats,
html[data-theme="dark"] .grp-card,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .m-head,
html[data-theme="dark"] .amz-card,
html[data-theme="dark"] .amz-kpi,
html[data-theme="dark"] .kb-card,
html[data-theme="dark"] .kb-editor,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .acc-rpt,
html[data-theme="dark"] .vch-thumb,
html[data-theme="dark"] .vch-add,
html[data-theme="dark"] .sbtn,
html[data-theme="dark"] .tab,
html[data-theme="dark"] .btn,
html[data-theme="dark"] .combo-list,
html[data-theme="dark"] .ssel-menu,
html[data-theme="dark"] .kb-chips .chip,
html[data-theme="dark"] .kb-toolbar button,
html[data-theme="dark"] .pd-img { background: #1a2330; border-color: #2c3848; color: #e4ebf4 }
html[data-theme="dark"] .grp-card .tbl-wrap,
html[data-theme="dark"] .acc-rpt-wrap .acc-rpt { background: transparent }
html[data-theme="dark"] .login-card { border: 1px solid #2c3848 }
html[data-theme="dark"] .pd-preview { background: #0e151d }

/* 次级底色块 */
html[data-theme="dark"] .info-grid,
html[data-theme="dark"] .pd-desc,
html[data-theme="dark"] .note,
html[data-theme="dark"] .pr-calc,
html[data-theme="dark"] .acc-total,
html[data-theme="dark"] .acc-sum-line,
html[data-theme="dark"] .file-row:nth-child(odd),
html[data-theme="dark"] .sum-card,
html[data-theme="dark"] .vch-box,
html[data-theme="dark"] .amz-derived,
html[data-theme="dark"] .kb-ai-out,
html[data-theme="dark"] .acc-guide,
html[data-theme="dark"] .acc-guide-steps > div,
html[data-theme="dark"] .twofa-tip,
html[data-theme="dark"] .cat-l2,
html[data-theme="dark"] .pick-list { background: #1f2937; border-color: #2c3848 }
html[data-theme="dark"] .acc-guide { background: #1a2330 }
html[data-theme="dark"] .cat-l2 { background: #1c2634 }
html[data-theme="dark"] .kb-card.pinned { background: #2a2416; border-color: #7a5a22 }

/* 表格 */
html[data-theme="dark"] th { background: #212c3a; border-bottom-color: #2c3848 }
html[data-theme="dark"] td { border-bottom-color: #232e3c }
html[data-theme="dark"] tbody tr:hover,
html[data-theme="dark"] .cc-tbl tbody tr:hover,
html[data-theme="dark"] .pick-row:hover,
html[data-theme="dark"] .pc-node:hover { background: #24303f }
html[data-theme="dark"] tr.rowlink:hover { background: #24303f !important }
html[data-theme="dark"] .grp-card th,
html[data-theme="dark"] .cc-tbl th,
html[data-theme="dark"] .acc-entry-tbl th,
html[data-theme="dark"] .acc-rpt th,
html[data-theme="dark"] .kb-editor table th { background: #212c3a; color: #a9b6c8 }
html[data-theme="dark"] .acc-rpt-sum td { background: #212c3a }
html[data-theme="dark"] .acc-rpt-total td { background: #1e3050; color: #cfe0ff }

/* 表单控件 */
html[data-theme="dark"] .fld input[type=text],
html[data-theme="dark"] .fld input[type=password],
html[data-theme="dark"] .fld input[type=number],
html[data-theme="dark"] .fld input[type=date],
html[data-theme="dark"] .fld select,
html[data-theme="dark"] .fld textarea,
html[data-theme="dark"] .fld-inline input,
html[data-theme="dark"] .fld-inline select,
html[data-theme="dark"] .acc-entry-tbl input,
html[data-theme="dark"] .acc-entry-tbl select,
html[data-theme="dark"] .notes textarea,
html[data-theme="dark"] .combo-in,
html[data-theme="dark"] .search,
html[data-theme="dark"] .fb-bar input,
html[data-theme="dark"] .fb-bar select { background: #151e28; border-color: #34414f; color: #e4ebf4 }
html[data-theme="dark"] .acc-entry-tbl input:disabled,
html[data-theme="dark"] .acc-entry-tbl select:disabled { background: #1f2937; color: #93a1b5 }
html[data-theme="dark"] #pr-lines-body input,
html[data-theme="dark"] #pr-lines-body select { background: #151e28; border-color: #34414f; color: #e4ebf4 }
html[data-theme="dark"] .btn:hover,
html[data-theme="dark"] .vch-add:hover { background: #232f3d }
html[data-theme="dark"] .payee-add,
html[data-theme="dark"] .payee-pick > input,
html[data-theme="dark"] .payee-pick > #pr-payee-list { background: #1a2330; border-color: #2c3848; color: #e4ebf4 }
html[data-theme="dark"] .payee-add:hover { background: #232f3d }
html[data-theme="dark"] tr.tr-void > td { color: #6c7789 }
html[data-theme="dark"] tr.tr-void > td .act { color: #6f9de0 }
html[data-theme="dark"] .btn.primary { background: #2f6bd0; border-color: #2f6bd0; color: #fff }
html[data-theme="dark"] .btn.primary:hover { background: #3b7ae0 }
html[data-theme="dark"] .btn.danger { background: #c9473f; border-color: #c9473f; color: #fff }
html[data-theme="dark"] .tab.on,
html[data-theme="dark"] .kb-chips .chip.on { background: #2f6bd0; border-color: #2f6bd0; color: #fff }
html[data-theme="dark"] .me-acts .btn { background: transparent; border-color: transparent; color: #93a3bb }
html[data-theme="dark"] .me-acts .btn:hover { background: #1d2a3d; color: #fff }

/* 下拉菜单 */
html[data-theme="dark"] .ssel-item { color: #d5dde8 }
html[data-theme="dark"] .ssel-item.hi,
html[data-theme="dark"] .combo-opt:hover { background: #24324a; color: #cfe0ff }
html[data-theme="dark"] .ssel-item.dis { color: #5c6a7d }
html[data-theme="dark"] .combo-opt.active { color: #7db0ff }

/* 文字层级 */
html[data-theme="dark"] .dim,
html[data-theme="dark"] .stat span,
html[data-theme="dark"] .fld label,
html[data-theme="dark"] .fld .help,
html[data-theme="dark"] th,
html[data-theme="dark"] .amz-klabel,
html[data-theme="dark"] .amz-filters label,
html[data-theme="dark"] .amz-tbl th,
html[data-theme="dark"] .sum-card span,
html[data-theme="dark"] .info-grid span,
html[data-theme="dark"] .pd-desc-item > span,
html[data-theme="dark"] .pr-calc span,
html[data-theme="dark"] .acc-total span,
html[data-theme="dark"] .acc-ind,
html[data-theme="dark"] .kb-card-m,
html[data-theme="dark"] .ssel-empty,
html[data-theme="dark"] .amz-derived span,
html[data-theme="dark"] .loading,
html[data-theme="dark"] .m-head .x,
html[data-theme="dark"] .cc-tbl th,
html[data-theme="dark"] .kb-article blockquote { color: #93a1b5 }
html[data-theme="dark"] .chk-inline,
html[data-theme="dark"] .pr-calc > div,
html[data-theme="dark"] .acc-total > div,
html[data-theme="dark"] .acc-sum-line,
html[data-theme="dark"] .kb-article,
html[data-theme="dark"] .kb-card-x,
html[data-theme="dark"] .kb-ai-ans,
html[data-theme="dark"] .pc-node { color: #cdd8e6 }
html[data-theme="dark"] .kb-ai-ans .kb-h { color: #cdd8e6 }
html[data-theme="dark"] .kb-src { background: #1f2937; border-color: #2c3848; color: #cdd8e6 }
html[data-theme="dark"] .kb-src:hover { background: #243040; border-color: #3b4b60 }
html[data-theme="dark"] .kb-chip { background: #1f2937; border-color: #2c3848; color: #9aa7bb }
html[data-theme="dark"] .kb-ask textarea { background: #1a2330; border-color: #2c3848; color: #cdd8e6 }
html[data-theme="dark"] .kb-ai-ans code, html[data-theme="dark"] .kb-ai-ans .kb-cite { background: #243040; color: #8fb4ee }
html[data-theme="dark"] .btn.ai { background: #1f2937; border-color: #2c3848; color: #8fb4ee }
html[data-theme="dark"] .kb-hl { background: #4a3f1d; box-shadow: 0 0 0 3px #4a3f1d }
html[data-theme="dark"] .amz-derived b,
html[data-theme="dark"] .kb-card-t b,
html[data-theme="dark"] .pc-l1head,
html[data-theme="dark"] .sec-title,
html[data-theme="dark"] .grp-card-h b,
html[data-theme="dark"] .acc-guide-t b,
html[data-theme="dark"] .twofa-tip b { color: #eaf1fa }

/* 强调色 */
html[data-theme="dark"] .act,
html[data-theme="dark"] .doc-no,
html[data-theme="dark"] .link,
html[data-theme="dark"] .info-grid .ig-head,
html[data-theme="dark"] .fgrid .f-sec,
html[data-theme="dark"] .amz-gtitle,
html[data-theme="dark"] .kb-article a,
html[data-theme="dark"] .kb-article h1,
html[data-theme="dark"] .kb-article h2,
html[data-theme="dark"] .kb-article h3,
html[data-theme="dark"] .sbtn,
html[data-theme="dark"] .pc-mode-btn:hover { color: #7db0ff }
html[data-theme="dark"] .act.danger { color: #ff8b84 }
html[data-theme="dark"] .act.pass { color: #4ade80 }
html[data-theme="dark"] .amz-gtitle { border-left-color: #7db0ff }
html[data-theme="dark"] .info-grid .ig-head,
html[data-theme="dark"] .fgrid .f-sec { border-top-color: #2c3848 }
html[data-theme="dark"] .kb-article blockquote { background: #1f2937; border-left-color: #3d5a86 }
html[data-theme="dark"] .kb-editor table td,
html[data-theme="dark"] .kb-editor table th,
html[data-theme="dark"] .kb-article table td,
html[data-theme="dark"] .kb-article table th { border-color: #34414f }
html[data-theme="dark"] .pd-img { border-color: #34414f }
html[data-theme="dark"] .pd-img.has { border-color: #3a4a5e }

/* 徽章 / 标签 */
html[data-theme="dark"] .badge.gray { background: #263241; color: #b9c6d8 }
html[data-theme="dark"] .badge.blue { background: #1d3357; color: #8eb8ff }
html[data-theme="dark"] .badge.green { background: #16351f; color: #7fd39a }
html[data-theme="dark"] .badge.orange { background: #3a2a12; color: #f0b46a }
html[data-theme="dark"] .badge.red { background: #3d1f1f; color: #f08a84 }
html[data-theme="dark"] .badge.slate { background: #23303f; color: #a9bbd1 }
html[data-theme="dark"] .badge.sky { background: #12313f; color: #7fcdee }
html[data-theme="dark"] .badge.cyan { background: #103135; color: #6fd6de }
html[data-theme="dark"] .badge.teal { background: #0f2f2a; color: #6fd3b8 }
html[data-theme="dark"] .badge.lime { background: #26330f; color: #bcd97a }
html[data-theme="dark"] .badge.brown { background: #322a20; color: #d3b28c }
html[data-theme="dark"] .badge.violet { background: #2a2140; color: #b9a3f2 }
html[data-theme="dark"] .badge.emerald { background: #0f2e1f; color: #6fd3a1 }
html[data-theme="dark"] .badge.purple { background: #331c3d; color: #dda3f0 }
html[data-theme="dark"] .badge.rose { background: #3c1b26; color: #f28aa8 }
html[data-theme="dark"] .badge.amber { background: #3a2f10; color: #f0c96a }
html[data-theme="dark"] .badge.indigo { background: #222848; color: #9fa8f2 }
html[data-theme="dark"] .tag { background: #26313f; color: #b9c6d8 }
html[data-theme="dark"] .amz-tag { background: #1d3357; color: #8eb8ff }
html[data-theme="dark"] .amz-tag.amz-red { background: #3d1f1f; color: #f08a84 }
html[data-theme="dark"] .amz-tag.amz-amber { background: #3a2a12; color: #f0b46a }
html[data-theme="dark"] .amz-tag.amz-green { background: #16351f; color: #7fd39a }
html[data-theme="dark"] .amz-tab { color: #93a1b5 }
html[data-theme="dark"] .amz-tab:hover,
html[data-theme="dark"] .amz-tab.on { background: #1f2f45; color: #7db0ff }
html[data-theme="dark"] .amz-tabbar { border-bottom-color: #2c3848 }
html[data-theme="dark"] .pc-node.sel { background: #2f6bd0 }
html[data-theme="dark"] .brand-prev { background: #e8edf4; border-color: #4a5a6e }

/* 打印时强制回浅色，避免白纸黑底 */
@media print {
  html[data-theme="dark"] { color-scheme: light }
  html[data-theme="dark"] .amz-card,
  html[data-theme="dark"] .amz-kpi,
  html[data-theme="dark"] .modal,
  html[data-theme="dark"] .m-head,
  html[data-theme="dark"] .kb-card,
  html[data-theme="dark"] .kb-editor,
  html[data-theme="dark"] .acc-rpt,
  html[data-theme="dark"] .pc-cats,
  html[data-theme="dark"] .info-grid,
  html[data-theme="dark"] .pd-desc,
  html[data-theme="dark"] .note { background: #fff !important; border-color: #ddd !important }
  html[data-theme="dark"] body,
  html[data-theme="dark"] .main,
  html[data-theme="dark"] td,
  html[data-theme="dark"] th,
  html[data-theme="dark"] .dim,
  html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3, html[data-theme="dark"] h4,
  html[data-theme="dark"] b,
  html[data-theme="dark"] .stat span,
  html[data-theme="dark"] .info-grid span,
  html[data-theme="dark"] .fld label { color: #111 !important }
}

/* ---------- 手机 / 平板（<=820px）：侧栏抽屉 + 单列布局 ---------- */
.m-bar { display: none }
.side-mask { display: none }

@media (max-width: 820px) {
  /* 顶部固定条（仅手机显示） */
  .m-bar { display: flex; position: fixed; top: 0; left: 0; right: 0; height: 50px; align-items: center; gap: 8px; padding: 0 8px;
    background: #16202f; color: #fff; z-index: 95; box-shadow: 0 1px 6px rgba(0,0,0,.3) }
  .m-menu { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; background: transparent;
    color: #cfd8e6; border-radius: 8px; cursor: pointer }
  .m-menu:active { background: #1d2a3d }
  .m-title { font-size: 15px; font-weight: 700; letter-spacing: .5px; display: inline-flex; align-items: center }

  /* 抽屉与遮罩 */
  .side-mask { display: block; position: fixed; inset: 0; background: rgba(8,14,22,.55); z-index: 94; opacity: 0; pointer-events: none; transition: opacity .2s }
  .side-mask.show { opacity: 1; pointer-events: auto }
  .side { width: 232px !important; min-width: 232px !important; max-width: 232px !important; transform: translateX(-100%);
    transition: transform .22s ease; z-index: 96; box-shadow: 4px 0 24px rgba(0,0,0,.45) }
  .side.open { transform: none }
  .side-toggle { display: none !important }

  /* 主区铺满，顶部让出固定条 */
  .main { margin-left: 0 !important; padding: 62px 12px 28px; max-width: none }
  .page-head { gap: 8px; margin-bottom: 10px }
  .page-head h2 { font-size: 18px }
  .search { width: 100%; margin-bottom: 10px }

  /* 统计卡 */
  .stats { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px }
  .stat { padding: 12px }
  .stat b { font-size: 21px }

  /* 表格横向滚动，不挤压列宽 */
  .tbl-wrap { border-radius: 8px; -webkit-overflow-scrolling: touch }
  .main .tbl-wrap th, .main .tbl-wrap td { padding: 8px 10px }

  /* 弹窗全屏：让 .modal 自己当滚动容器（而不是让 .overlay 滚），
     否则标题栏的 sticky 没有滚动空间，长表单往下滑按钮就看不见了 */
  .overlay { padding: 0; align-items: stretch; overflow: hidden }
  .modal { height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; min-height: 0; border-radius: 0; box-shadow: none; overflow: auto }
  .m-head { position: sticky; top: 0; border-radius: 0 }
  .m-body { padding: 12px 12px 22px }
  /* 居中弹窗（确认框、看图、裁剪）：仍然按内容高度居中，不铺满整屏 */
  .overlay.center { overflow: auto; padding: 18px 12px; align-items: center }
  .overlay.center .modal { height: auto; max-height: 86dvh; border-radius: 12px }
  .overlay.center .m-head { border-radius: 12px 12px 0 0 }

  /* 表单单列；输入框 16px 防止 iOS 自动放大 */
  .fgrid, .fgrid .frow { grid-template-columns: 1fr !important }
  .fgrid .frow { grid-column: span 1 }
  /* 17px 防 iOS/鸿蒙聚焦缩放；搜索框必须与 .fld 输入框同步，否则真机上会矮一截 */
  .fld input[type=text], .fld input[type=password], .fld input[type=number], .fld input[type=date],
  .fld select, .fld textarea, .fld-inline input, .fld-inline select, .pc-q { font-size: 17px }
  .info-grid { grid-template-columns: 1fr 1fr }
  .info-grid .ig-wide { grid-column: span 2 }

  /* 产品 / 目录 / 报表布局 */
  .pd-top { flex-direction: column }
  .pd-imgcol { width: 100%; flex: none }
  .pd-img { width: 100%; max-width: 260px; height: auto; aspect-ratio: 1 / 1 }
  .pc-wrap { flex-direction: column }
  .pc-cats { width: 100%; max-width: none }
  .pc-tree { max-height: 42vh }
  .cat-tree { grid-template-columns: 1fr }
  .sum-cards { grid-template-columns: 1fr 1fr }
  .grp-sum, .kb-grid { grid-template-columns: 1fr }
  .acc-two { grid-template-columns: 1fr }
  .amz-kpis { grid-template-columns: 1fr 1fr; gap: 8px }
  .amz-card { padding: 12px }
  .amz-fgrid { grid-template-columns: 1fr }

  /* 行内操作加大点击区 */
  .act { padding: 3px 0 }

  /* 核价单头在窄屏回退成两列 */
  .al-head { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .al-head.mb-head { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .al-head.cols7 { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .al-head.cols4 { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .al-head .sp2, .al-head .sp3, .al-head .sp4, .al-head .sp5 { grid-column: span 2 }
  .al-sum { grid-template-columns: repeat(2, minmax(0, 1fr)) }
}

/* ---------- 表单顶部提示（替代占一整行的说明字段） ---------- */
.form-hint {
  font-size: 13.5px;
  line-height: 1.65;
  color: #5d6b82;
  background: #f4f7fc;
  border-left: 3px solid #b9c8e0;
  border-radius: 4px;
  padding: 8px 11px;
  margin-bottom: 14px;
}
/* 密码框：右侧显示 / 隐藏切换 */
.pwd-box { position: relative; display: flex; align-items: center; }
.pwd-box > input { flex: 1; padding-right: 52px; }
.pwd-eye {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: #2456a6;
  font-size: 13.5px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.pwd-eye:hover { background: #eaf1fb; }
html[data-theme="dark"] .form-hint { color: #9fb0c8; background: #1b2635; border-left-color: #3d5573; }
html[data-theme="dark"] .pwd-eye { color: #7fb0f0; }
html[data-theme="dark"] .pwd-eye:hover { background: #22304a; }

/* 集团专用字段区（PI 等单据：客户属于特定集团时才出现） */
.cz-block { margin: 10px 0 12px; border: 1px solid #cfe0f5; background: #f6faff; border-radius: 8px; padding: 10px 12px; }
.cz-title { font-weight: 600; color: #2456a6; margin-bottom: 8px; font-size: 13.5px; }
.cz-title .dim { font-weight: 400; }
.cz-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
.cz-grid .fld label { font-size: 12.5px; }
/* CAL 表头：不常用字段折叠，默认收起，主字段保持一屏可见 */
.cz-fold { margin: 10px 0 12px; border: 1px dashed #d5e3f5; border-radius: 8px; background: #fbfdff; }
.cz-fold > summary { cursor: pointer; padding: 8px 12px; font-size: 13px; font-weight: 600; color: #2456a6; list-style: none; }
.cz-fold > summary::-webkit-details-marker { display: none; }
.cz-fold > summary::before { content: '▸ '; font-weight: 400; }
.cz-fold[open] > summary::before { content: '▾ '; }
.cz-fold[open] > summary { border-bottom: 1px dashed #d5e3f5; }
.cz-fold .cz-grid { padding: 10px 12px; }
html[data-theme="dark"] .cz-fold { background: #172334; border-color: #2c4460; }
html[data-theme="dark"] .cz-fold > summary { color: #8db8f2; }
html[data-theme="dark"] .cz-fold[open] > summary { border-bottom-color: #2c4460; }
/* PI 录入明细：CALZEDONIA 集团专用字段每格缩为原来 1/2（3 列→6 列）；Notations 也随之只占 1 格，与 Order Date 同宽。
   仅 PI editor 使用（带 cz-6），CAL 单据的 .cz-grid 仍是 3 列，不受影响 */
.cz-grid.cz-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) { .cz-grid.cz-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .cz-grid.cz-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
html[data-theme="dark"] .cz-block { background: #172334; border-color: #2c4460; }
html[data-theme="dark"] .cz-title { color: #8db8f2; }

/* 云表 CAL 导出：客户 / Invoice / 按钮 一条线对齐，高度统一 */
.yb-bar { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; max-width: 920px; margin: 14px 0 6px; }
.yb-bar .fld { margin: 0; }
.yb-bar .fld.yb-src { flex: 0 0 104px; }
.yb-bar .fld.yb-cust { flex: 0 0 220px; }
.yb-bar .fld.yb-inv { flex: 1 1 320px; min-width: 260px; }
.yb-bar select { height: 38px; padding: 0 10px; }
.yb-bar .yb-btns { display: flex; gap: 6px; flex: 0 0 auto; }
.yb-bar .yb-btns .btn { height: 38px; padding: 0 16px; white-space: nowrap; }
#yb-hint { font-size: 12.5px; margin-bottom: 16px; }

/* ---- 价格核算 · 合金核价 ---- */
.al-tabs { display: flex; gap: 4px; margin: 14px 0 10px; border-bottom: 1px solid #dfe6de; }
.al-tab { padding: 7px 16px; font-size: 13.5px; color: #6b7688; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.al-tab:hover { color: #2456a6; }
.al-tab.on { color: #2456a6; border-bottom-color: #2456a6; font-weight: 600; }
.al-blue { color: #2456a6; }
.al-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: #eef2ec; }
.al-bar span { display: block; height: 100%; }
.al-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; margin-top: 6px; color: #5b6577; }
.al-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.al-tbl { margin-bottom: 4px; }
.al-tbl th { font-size: 12px; white-space: nowrap; padding: 7px 6px; }
.al-tbl td { padding: 3px 5px; }
.al-tbl .al-u { display: block; font-weight: 400; font-size: 11px; color: #9aa3b2; }
/* 表头单位独立一行，各列高度一致，不再被两行标题撑高 */
.al-tbl .al-un th { height: 14px; padding: 0 5px 4px; font-size: 10.5px; font-weight: 400; color: #9aa3b2; background: #F7FAF5; border-bottom: 1px solid #E9EEE7; }
.al-tbl thead tr:first-child th { border-bottom: 0; padding-bottom: 2px; }
/* 核价单头：行内标签 + 固定栅格，两行收口 */
.al-head { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px 12px; margin: 0 0 10px }
.al-head .al-hf { display: flex; align-items: center; gap: 6px; min-width: 0 }
.al-head .al-hf > label { flex: 0 0 auto; font-size: 12px; color: #5a6478; white-space: nowrap }
.al-head .al-hf > input, .al-head .al-hf > select { flex: 1 1 auto; min-width: 0; height: 28px; padding: 2px 6px; font-size: 13px; border: 1px solid #D6DED4; border-radius: 6px; background: #fff; color: inherit }
.al-head .al-hf > input:focus, .al-head .al-hf > select:focus { outline: none; border-color: #2456a6; box-shadow: 0 0 0 2px rgba(36,86,166,.12) }
.al-head .al-hf .static-val { flex: 1 1 auto; padding: 0; font-size: 13px }
.al-head .al-hf > .ssel { flex: 1 1 auto; min-width: 0 }
.al-head .al-hf .ssel-input { height: 28px; padding: 2px 24px 2px 6px; font-size: 13px; border: 1px solid #D6DED4; border-radius: 6px; background: #fff; color: inherit }
.al-head .al-hf .ssel::after { right: 7px }
.al-head .sp2 { grid-column: span 2 }
.al-head .sp3 { grid-column: span 3 }
.al-head .sp4 { grid-column: span 4 }
/* 样板开发单表头：七等分，标签定宽，上下两行列对齐 */
.al-head.cols7 { grid-template-columns: repeat(7, minmax(0, 1fr)) }
.al-head.cols7 .al-hf > label { flex: 0 0 58px }
.al-head.cols4 { grid-template-columns: repeat(4, minmax(0, 1fr)) }
.al-head .sp5 { grid-column: span 5 }
/* 只读字段（单号、人民币汇率）灰底，提示不可改 */
.al-head .al-hf > input.ro, .al-head .al-hf > input[readonly] { background: #F1F5EF; color: #7a8496; cursor: default }
/* 样板开发单 / 投诉单：整行字段（textarea）与分区标题 */
.al-head .al-hf.full { grid-column: 1 / -1; align-items: flex-start }
.al-head .al-hf.full > label { padding-top: 5px }
.al-head .al-hf > textarea { flex: 1 1 auto; min-width: 0; padding: 5px 8px; font-size: 13px; line-height: 1.5; border: 1px solid #D6DED4; border-radius: 6px; background: #fff; color: inherit; resize: vertical; font-family: inherit }
.al-head .al-hf > textarea:focus { outline: none; border-color: #2456a6; box-shadow: 0 0 0 2px rgba(36,86,166,.14) }
/* 样板要求：多选客供物品 */
.al-head .al-hf > .ds-chks { flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: 4px 18px; min-width: 0; padding: 2px 0 }
.al-head .al-hf .ds-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #33405a; cursor: pointer; white-space: nowrap }
.al-head .al-hf .ds-chk input { width: 14px; height: 14px; margin: 0; accent-color: #2456a6; flex: 0 0 auto }
.dev-sec { display: flex; gap: 10px; align-items: center; margin: 14px 0 6px; flex-wrap: wrap }
.dev-sec .dim { font-size: 12px }
/* 寄批轮次条：当前轮次 + 通过 / 拒绝 / 打印 */
.rd-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 9px 12px; background: #F7F9FC; border: 1px solid #E3E9F2; border-radius: 8px; margin-bottom: 8px }
.rd-cur { font-size: 13px; font-weight: 600; color: #33415c }
.rd-cur em { font-style: normal; font-weight: 400; color: #7a8496; margin-left: 8px }
.rd-cur.ok { color: #177245 }
.rd-cur.no { color: #b42318 }
.rd-cur.dim { color: #8a93a6; font-weight: 400 }
.rd-hist { margin-top: 2px }
html[data-theme="dark"] .rd-bar { background: #1b2534; border-color: #2c3a4e }
html[data-theme="dark"] .rd-cur { color: #cdd8e8 }
html[data-theme="dark"] .rd-cur.ok { color: #6fd39b }
html[data-theme="dark"] .rd-cur.no { color: #f08b84 }
.dev-spec-head { display: flex; gap: 10px; align-items: baseline; margin: 12px 0 6px }
.dev-spec-head .dim { font-size: 12px }
html[data-theme="dark"] .al-head .al-hf > input.ro,
html[data-theme="dark"] .al-head .al-hf > input[readonly] { background: #182130; color: #8d99ab }
/* 模杯核价 · 尺码组表：表头与数值统一居中 */
.mb-gtbl th, .mb-gtbl td { text-align: center }
.mb-gtbl td .al-in { text-align: center }
/* 核价明细表：字段名与输入框垂直居中对齐 */
.al-tbl th, .al-tbl td { vertical-align: middle }
.al-sum { grid-template-columns: repeat(6, minmax(0, 1fr)) }
.al-in { border: 1px solid #d5ddd4; border-radius: 5px; padding: 3px 6px; font-size: 12.5px; background: #fff; height: 28px; color: inherit; }
.al-in:focus { outline: none; border-color: #2456a6; box-shadow: 0 0 0 2px rgba(36,86,166,.12); }
.al-ov { border-color: #c98b22; background: #fffaf0; }
.al-n { text-align: right; }
.al-i { text-align: center; font-size: 12px; color: #9aa3b2; }
.al-c { font-size: 12.5px; white-space: nowrap; }
.al-exw { font-weight: 600; }
.al-sale { font-weight: 600; color: #2456a6; }
.al-retail { font-weight: 600; color: #8a5a12; }
.al-warn { background: #fff8f5; }
.al-warn .al-c { color: #c0392b; }
.al-bulk { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; font-size: 12.5px; }
.al-bulk input { height: 30px; padding: 0 8px; border: 1px solid #d5ddd4; border-radius: 5px; }
.al-price-tbl td { padding: 3px 5px; }
html[data-theme="dark"] .al-tabs { border-bottom-color: #2b3648; }
html[data-theme="dark"] .al-tab { color: #93a3bb; }
html[data-theme="dark"] .al-tab.on { color: #7fb0f0; border-bottom-color: #7fb0f0; }
html[data-theme="dark"] .al-blue { color: #7fb0f0; }
html[data-theme="dark"] .al-bar { background: #22304a; }
html[data-theme="dark"] .al-legend { color: #9fb0c8; }
html[data-theme="dark"] .al-in { background: #1b2635; border-color: #2f3d52; color: #dfe7f2; }
html[data-theme="dark"] .al-ov { background: #2a2318; border-color: #8a6a2a; }
html[data-theme="dark"] .al-head .al-hf > label { color: #9aa6b8 }
html[data-theme="dark"] .al-head .al-hf > input,
html[data-theme="dark"] .al-head .al-hf > select,
html[data-theme="dark"] .al-head .al-hf .ssel-input { background: #1b2635; border-color: #2f3d52; color: #dfe7f2 }
html[data-theme="dark"] .al-tbl .al-un th { background: #212c3a; border-bottom-color: #2c3848; color: #7f8b9c }
html[data-theme="dark"] .al-retail { color: #d8a860 }
html[data-theme="dark"] .al-bulk input { background: #1b2635; border-color: #2f3d52; color: #dfe7f2; }
html[data-theme="dark"] .al-warn { background: #2a1d1b; }

/* ---- 通用：页内标签页 ---- */
.tabs-line { display: flex; gap: 2px; border-bottom: 1px solid #dfe6de; margin: 14px 0 14px }
.tabbtn { border: 0; background: none; padding: 8px 16px; font-size: 14px; color: #6b7688; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; font-family: inherit }
.tabbtn:hover { color: #2456a6 }
.tabbtn.on { color: #2456a6; border-bottom-color: #2456a6; font-weight: 600 }
.tabbtn i { font-style: normal; font-size: 12px; opacity: .6; margin-left: 3px }
/* 扣款页（应收 / 应付）内嵌标签视图：标题由外层给，内层只留靠右的操作按钮 */
.dd-embed > .acts { display: flex; justify-content: flex-end; gap: 8px; margin: 0 0 10px }
html[data-theme="dark"] .tabbtn { color: #93a1b8 }
html[data-theme="dark"] .tabbtn:hover { color: #7db1ff }
html[data-theme="dark"] .tabbtn.on { color: #7db1ff; border-bottom-color: #7db1ff }

/* ---- 员工与角色 · 组织架构 ---- */
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 12px }
.org-card { border: 1px solid #e4e9f2; border-radius: 10px; background: #fff; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px }
.org-card.add { align-items: center; justify-content: center; min-height: 118px; border-style: dashed; color: #8a93a6; cursor: pointer; font-size: 14px; gap: 4px }
.org-card.add:hover { border-color: #2456a6; color: #2456a6 }
.org-card.add span { font-size: 22px; line-height: 1 }
.org-solo { margin-top: 12px }
.org-h { display: flex; align-items: center; gap: 8px }
.org-h b { font-size: 15.5px; color: #1e3f74 }
.org-lead { font-size: 12.5px; color: #8a93a6 }
.org-lead-n { color: #2c3852; font-weight: 600; margin-right: 4px }
.org-mem { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; font-size: 12.5px }
.org-chip { background: #f1f5fb; color: #33405c; border-radius: 12px; padding: 2px 9px; cursor: pointer; border: 1px solid #e2e9f6 }
.org-chip:hover { border-color: #2456a6; color: #2456a6 }
.org-chip.off { opacity: .55; text-decoration: line-through }
.org-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px dashed #e8edf5; padding-top: 8px; font-size: 12.5px }
.org-foot .acts a { margin-left: 10px }

/* ---- 组织架构（一级部门 → 二级部门 → …，纯部门树，左树右详情） ---- */
.org2-wrap { display: flex; gap: 14px; align-items: flex-start }
.org2-side { flex: 0 0 320px; width: 320px; border: 1px solid #e4e9f2; border-radius: 10px; background: #fff; overflow: hidden }
.org2-tools { padding: 10px; border-bottom: 1px solid #eef1f6 }
.org2-q { width: 100%; height: 32px; border: 1px solid #d5ddd4; border-radius: 6px; padding: 0 9px; font-size: 13px; font-family: inherit; box-sizing: border-box }
.org2-q:focus { outline: none; border-color: #2456a6 }
.org2-trow { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; font-size: 12px; gap: 6px }
.org2-chk { color: #6b7688; cursor: pointer; white-space: nowrap }
.org2-chk input { vertical-align: -1px; margin-right: 3px }
.org2-links { display: flex; gap: 10px }
.org2-links a { color: #2456a6; cursor: pointer; font-size: 12px }
.org2-links a:hover { text-decoration: underline }
.org2-tree { padding: 8px 6px 12px; max-height: calc(100vh - 220px); overflow: auto }
.org2-group { margin-bottom: 4px }
.org2-gh { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 6px; cursor: pointer; font-size: 13.5px; background: #f5f8fd; color: #1e3f74 }
.org2-gh:hover { background: #ecf3fc }
.org2-gh.sel { background: #e3eefc; box-shadow: inset 2px 0 0 #2456a6 }
.org2-gh b { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.org2-gico { color: #2f6db5; font-size: 13px }
.org2-gico.big { font-size: 22px }
.org2-gbody { padding: 2px 0 2px 12px }
.org2-empty { color: #9aa3b2; font-size: 12.5px; padding: 8px 10px }
.org2-kids { border-left: 1px dashed #d9e2f0; margin-left: 11px; padding-left: 6px }
.org2-node { display: flex; align-items: center; gap: 5px; padding: 5px 7px; border-radius: 6px; cursor: pointer; font-size: 13px; color: #33405c }
.org2-node:hover { background: #f3f7fc }
.org2-node.sel { background: #e8f0fc; color: #2456a6; font-weight: 600 }
.org2-node.off { opacity: .6 }
.org2-node .tag, .org2-gh .tag { font-size: 10.5px; padding: 0 5px; line-height: 16px }
.org2-caret { width: 12px; text-align: center; color: #9aa3b2; font-size: 10px; transition: transform .12s; flex: none }
.org2-caret.closed { transform: rotate(-90deg) }
.org2-caret.none { visibility: hidden }
.org2-tico { width: 7px; height: 7px; border-radius: 2px; background: #9db8e0; flex: none }
.org2-tico.big { width: 12px; height: 12px; border-radius: 3px }
.org2-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.org2-mem { color: #9aa3b2; font-size: 11px; flex: none }
.org2-res-main { flex: 1; min-width: 0 }
.org2-path { font-size: 11px; color: #9aa3b2; font-weight: 400; margin-top: 2px }
.org2-main { flex: 1; min-width: 0; border: 1px solid #e4e9f2; border-radius: 10px; background: #fff; padding: 18px 22px 22px; min-height: 62vh }
.org2-ul { margin: 8px 0 8px 18px; line-height: 1.9; font-size: 13px; color: #44506a }
.org2-crumb { font-size: 12.5px; color: #9aa3b2; margin-bottom: 12px }
.org2-crumb b { color: #44506a }
.org2-dhead { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #eef1f6; padding-bottom: 14px; margin-bottom: 14px }
.org2-dhead h3 { margin: 0; font-size: 19px; color: #1e3f74 }
.org2-dhead .dim { font-size: 12px; margin-top: 2px }
.org2-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; margin-bottom: 14px }
.org2-kv > div { display: flex; align-items: baseline; gap: 8px; font-size: 13px; border-bottom: 1px dashed #f0f3f8; padding-bottom: 7px }
.org2-kv span { color: #9aa3b2; flex: 0 0 88px; font-size: 12px }
.org2-kv b { color: #2c3852; font-weight: 600 }
.org2-remark { margin-bottom: 14px }
.org2-remark > span { display: block; color: #9aa3b2; font-size: 12px; margin-bottom: 4px }
.org2-remark > div { font-size: 13px; color: #44506a; line-height: 1.7; background: #f7f9fc; border-radius: 6px; padding: 8px 12px }
.org2-memlist { margin-bottom: 16px }
.org2-sub { font-size: 12px; color: #9aa3b2; letter-spacing: .05em; margin-bottom: 8px }
.org2-tip { font-size: 12.5px; line-height: 1.75; background: #f7f9fc; border-radius: 6px; padding: 9px 12px; margin: 0 0 14px }
.org2-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid #eef1f6; padding-top: 14px }
.org2-sep { width: 1px; height: 20px; background: #e4e9f2; margin: 0 2px }
.org2-wico { font-size: 34px; color: #c7d8ef; margin-bottom: 6px }
.org2-welcome h3 { margin: 0 0 4px; font-size: 20px; color: #1e3f74 }
.org2-stat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 20px 0 }
.org2-stat > div { background: #f7f9fc; border-radius: 8px; padding: 12px 8px; text-align: center }
.org2-stat b { display: block; font-size: 22px; color: #2456a6 }
.org2-stat span { font-size: 11.5px; color: #8a93a6 }
.org2-how { background: #fbfcfe; border: 1px solid #eef1f6; border-radius: 8px; padding: 12px 16px }
.org2-how ol { margin: 6px 0 0; padding-left: 20px; font-size: 12.8px; color: #55627a; line-height: 1.9 }
.org2-golink { margin-top: 10px; font-size: 12.5px }
.org2-golink a { color: #2456a6; cursor: pointer }
.org2-golink a:hover { text-decoration: underline }
@media (max-width: 1000px) { .org2-wrap { flex-direction: column } .org2-side { width: 100%; flex: none } .org2-tree { max-height: 46vh } .org2-kv { grid-template-columns: 1fr } .org2-stat { grid-template-columns: repeat(3, 1fr) } }
html[data-theme="dark"] .org2-side, html[data-theme="dark"] .org2-main { background: #16202e; border-color: #26344a }
html[data-theme="dark"] .org2-tools, html[data-theme="dark"] .org2-dhead, html[data-theme="dark"] .org2-acts { border-color: #26344a }
html[data-theme="dark"] .org2-q { background: #1b2635; border-color: #2f3d52; color: #dfe7f2 }
html[data-theme="dark"] .org2-gh { background: #1b2838; color: #cfe0f7 }
html[data-theme="dark"] .org2-gh:hover { background: #20304a }
html[data-theme="dark"] .org2-gh.sel { background: #1e3450 }
html[data-theme="dark"] .org2-node { color: #b9c9de }
html[data-theme="dark"] .org2-node:hover { background: #1d2b3c }
html[data-theme="dark"] .org2-node.sel { background: #1e3450; color: #7fb0f0 }
html[data-theme="dark"] .org2-kv > div, html[data-theme="dark"] .org2-dhead { border-color: #26344a }
html[data-theme="dark"] .org2-kv b { color: #dfe7f2 }
html[data-theme="dark"] .org2-dhead h3 { color: #cfe0f7 }
html[data-theme="dark"] .org2-kids { border-color: #2b3b52 }
html[data-theme="dark"] .org2-remark > div, html[data-theme="dark"] .org2-tip, html[data-theme="dark"] .org2-stat > div { background: #1b2635 }
html[data-theme="dark"] .org2-how { background: #17212f; border-color: #26344a }
html[data-theme="dark"] .org2-how ol { color: #a9bacf }
html[data-theme="dark"] .org2-golink a { color: #7fb0f0 }
html[data-theme="dark"] .org2-crumb { color: #7d8ca3 }

/* ---- 知识库 · 觅思文档式三栏 ---- */
.kb-shell { display: flex; gap: 16px; align-items: flex-start }
.kb-side { flex: 0 0 232px; width: 232px; position: sticky; top: 12px; border: 1px solid #e4e9f2; border-radius: 10px; background: #fff; padding: 10px 8px; max-height: calc(100vh - 90px); overflow: auto }
.kb-search { display: flex; gap: 6px; padding: 0 4px 8px }
.kb-search input { flex: 1; min-width: 0; height: 32px; border: 1px solid #d5ddd4; border-radius: 6px; padding: 0 8px; font-size: 13px; font-family: inherit }
.kb-search input:focus { outline: none; border-color: #2456a6 }
.kb-side-sec { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: #9aa3b2; letter-spacing: .06em; padding: 8px 8px 4px; border-top: 1px solid #f0f3f8; margin-top: 4px }
.kb-side-sec:first-of-type { border-top: 0; margin-top: 0 }
.kb-mini { color: #2456a6; cursor: pointer; font-size: 11.5px }
.kb-tree { padding-bottom: 4px }
.kb-node { display: flex; align-items: center; gap: 4px; padding: 5px 8px; border-radius: 6px; font-size: 13.5px; color: #44506a; cursor: pointer; line-height: 1.35 }
.kb-node:hover { background: #f3f7fc }
.kb-node.on { background: #e8f0fc; color: #2456a6; font-weight: 600 }
.kb-node-n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.kb-node i { font-style: normal; font-size: 11.5px; color: #9aa3b2 }
.kb-caret { width: 12px; font-size: 10px; color: #9aa3b2; text-align: center; transition: transform .12s }
.kb-caret.closed { transform: rotate(-90deg) }
.kb-caret.none { visibility: hidden }
.kb-tagcloud { display: flex; flex-wrap: wrap; gap: 5px; padding: 2px 6px 6px }
.kb-tag { display: inline-block; font-size: 12px; color: #5b6577; background: #f2f5f9; border: 1px solid #e4e9f2; border-radius: 11px; padding: 2px 9px; cursor: pointer; white-space: nowrap }
.kb-tag:hover { border-color: #9db8e0; color: #2456a6 }
.kb-tag.on { background: #2456a6; border-color: #2456a6; color: #fff }
.kb-tag i { font-style: normal; opacity: .55; font-size: 11px; margin-left: 3px }
.kb-tag.sm { font-size: 11.5px; padding: 1px 7px }
.kb-main { flex: 1; min-width: 0; background: #fff; border: 1px solid #e4e9f2; border-radius: 10px; padding: 18px 24px 22px; min-height: 60vh }
.kb-listhead { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid #eef1f6; padding-bottom: 10px; margin-bottom: 6px }
.kb-listhead-t { font-size: 16px; font-weight: 600; color: #1e3f74 }
.kb-row { padding: 12px 4px 12px; border-bottom: 1px dashed #eef1f6; cursor: pointer }
.kb-row:hover { background: #f8fbff }
.kb-row-t b { font-size: 15px; color: #22314e }
.kb-row-t { display: flex; align-items: center; gap: 6px; margin-bottom: 3px }
.kb-row-x { font-size: 13.5px; color: #6b7688; line-height: 1.6; margin-bottom: 6px }
.kb-row-m { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: #9aa3b2 }
.kb-row-m .tag { margin: 0 }
.kb-crumb { font-size: 12.5px; color: #9aa3b2; margin-bottom: 10px }
.kb-crumb a { color: #2456a6; cursor: pointer }
.kb-title { font-size: 22px; color: #1b2f52; margin: 0 0 10px; line-height: 1.35; display: flex; align-items: center; gap: 8px; flex-wrap: wrap }
.kb-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: #9aa3b2; border-bottom: 1px solid #eef1f6; padding-bottom: 10px }
.kb-tagline { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 2px }
.kb-pager { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid #eef1f6; margin-top: 26px; padding-top: 12px; font-size: 13px }
.kb-pager a { color: #2456a6; cursor: pointer }
.kb-toc { flex: 0 0 172px; width: 172px; position: sticky; top: 12px; font-size: 12.5px; max-height: calc(100vh - 90px); overflow: auto; padding-left: 4px }
.kb-toc-t { font-size: 11.5px; color: #9aa3b2; letter-spacing: .06em; margin-bottom: 8px }
.kb-toc-l { display: block; color: #6b7688; padding: 3px 0 3px 9px; border-left: 2px solid #eef1f6; cursor: pointer; line-height: 1.45 }
.kb-toc-l:hover { color: #2456a6; border-left-color: #2456a6 }
.kb-toc-l.d1 { padding-left: 18px }
.kb-toc-l.d2 { padding-left: 28px; font-size: 12px; color: #8a93a6 }
@media (max-width: 1080px) { .kb-toc { display: none } }
@media (max-width: 860px) {
  .kb-shell { flex-direction: column }
  .kb-side { position: static; width: 100%; flex: none; max-height: none }
  .kb-main { padding: 14px 14px 18px }
}
html[data-theme="dark"] .tabs-line { border-bottom-color: #2b3648 }
html[data-theme="dark"] .tabbtn { color: #93a3bb }
html[data-theme="dark"] .tabbtn.on { color: #7fb0f0; border-bottom-color: #7fb0f0 }
html[data-theme="dark"] .org-card { background: #16202e; border-color: #26344a }
html[data-theme="dark"] .org-h b { color: #cfe0f7 }
html[data-theme="dark"] .org-chip { background: #1d2b3c; border-color: #2b3b52; color: #b9c9de }
html[data-theme="dark"] .org-foot { border-top-color: #26344a }
html[data-theme="dark"] .kb-side,
html[data-theme="dark"] .kb-main { background: #16202e; border-color: #26344a }
html[data-theme="dark"] .kb-search input { background: #1b2635; border-color: #2f3d52; color: #dfe7f2 }
html[data-theme="dark"] .kb-side-sec { border-top-color: #22304a; color: #7d8ca3 }
html[data-theme="dark"] .kb-node { color: #b9c9de }
html[data-theme="dark"] .kb-node:hover { background: #1d2b3c }
html[data-theme="dark"] .kb-node.on { background: #1e3450; color: #7fb0f0 }
html[data-theme="dark"] .kb-tag { background: #1b2635; border-color: #2f3d52; color: #b9c9de }
html[data-theme="dark"] .kb-listhead { border-bottom-color: #22304a }
html[data-theme="dark"] .kb-listhead-t { color: #cfe0f7 }
html[data-theme="dark"] .kb-row { border-bottom-color: #22304a }
html[data-theme="dark"] .kb-row:hover { background: #182534 }
html[data-theme="dark"] .kb-row-t b { color: #dfe7f2 }
html[data-theme="dark"] .kb-title { color: #e6eefa }
html[data-theme="dark"] .kb-meta,
html[data-theme="dark"] .kb-pager { border-color: #22304a }
html[data-theme="dark"] .kb-toc-l { border-left-color: #22304a; color: #93a3bb }

/* ---- HS 编码库 ---- */
.hs-bar { display: flex; align-items: center; gap: 12px; margin: 12px 0; flex-wrap: wrap }
.hs-tabs { display: flex; gap: 2px; border-bottom: 1px solid #dfe6de }
.hs-bar .search { flex: 1; min-width: 220px }
.hs-kv { display: flex; gap: 10px; padding: 6px 0; font-size: 13.5px; border-bottom: 1px dashed #eef1f6 }
.hs-kv span { color: #8a93a6; min-width: 68px; flex: none }
.hs-note { margin-top: 12px; background: #fff8f5; border-left: 3px solid #e6a23c; padding: 8px 12px; font-size: 13px; color: #8a5a1a; border-radius: 0 6px 6px 0 }
.hs-form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 12px; margin-bottom: 10px }
.hs-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: #6b7688 }
.hs-form select, .hs-form input { height: 32px; border: 1px solid #d5ddd4; border-radius: 6px; padding: 0 8px; font-family: inherit; font-size: 13px; background: #fff; color: inherit }
.hs-form select:focus, .hs-form input:focus { outline: none; border-color: #2456a6 }
.hs-out { max-height: 44vh; overflow: auto; border-top: 1px solid #eef1f6; padding-top: 8px }
.hs-cand { padding: 8px 10px; border: 1px solid #e4e9f2; border-radius: 8px; margin-bottom: 6px; cursor: pointer; font-size: 13px }
.hs-cand:hover { border-color: #2456a6; background: #f8fbff }
.hs-cand b { color: #2456a6 }
.hs-cand .dim { font-size: 12px; margin-top: 2px }
.hs-pickbar { display: flex; gap: 6px; margin-top: 6px }
@media (max-width: 760px) { .hs-form { grid-template-columns: repeat(2, 1fr) } }
html[data-theme="dark"] .hs-tabs { border-bottom-color: #2b3648 }
html[data-theme="dark"] .hs-kv { border-bottom-color: #22304a }
html[data-theme="dark"] .hs-form select,
html[data-theme="dark"] .hs-form input { background: #1b2635; border-color: #2f3d52; color: #dfe7f2 }
html[data-theme="dark"] .hs-cand { border-color: #26344a }
html[data-theme="dark"] .hs-cand:hover { background: #182534; border-color: #3f6fb5 }
html[data-theme="dark"] .hs-out { border-top-color: #22304a }
html[data-theme="dark"] .hs-note { background: #2a2118; color: #e0b877 }

/* ---------- 拍照入账 ---------- */
.scan-lead { font-size: 15px; font-weight: 600; margin-bottom: 12px }
.scan-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px }
.scan-book { text-align: left; background: #fff; border: 1px solid #d9e2ef; border-radius: 10px; padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; font-family: inherit; color: inherit; transition: border-color .15s, box-shadow .15s }
.scan-book b { font-size: 15px }
.scan-book span { font-size: 12.5px; color: #8a93a6 }
.scan-book:hover { border-color: #2456a6 }
.scan-book.on { border-color: #2456a6; box-shadow: 0 0 0 3px rgba(36, 86, 166, .12) }
.scan-hint { margin-top: 12px; font-size: 12.5px; color: #8a93a6; line-height: 1.7 }
.scan-bookbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: #f4f7fb; border-radius: 8px; font-size: 13.5px; margin-bottom: 14px }
.scan-bookbar em { color: #8a93a6; font-style: normal }
.scan-shot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 240px; border: 2px dashed #b9c8dd; border-radius: 14px; background: #fbfdff; color: #2456a6; cursor: pointer; text-align: center; padding: 24px }
.scan-shot:hover { border-color: #2456a6; background: #f4f9ff }
.scan-shot b { font-size: 16px }
.scan-shot span { font-size: 12.5px; color: #8a93a6 }
.scan-busy { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 260px }
.scan-busy b { font-size: 15px }
.scan-busy span { font-size: 12.5px; color: #8a93a6 }
.scan-spin { width: 34px; height: 34px; border: 3px solid #dbe6f5; border-top-color: #2456a6; border-radius: 50%; animation: scan-spin .9s linear infinite }
@keyframes scan-spin { to { transform: rotate(360deg) } }
.scan-confirm { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start }
.scan-side { position: sticky; top: 0 }
.scan-pic { border: 1px solid #e0e7f1; border-radius: 10px; overflow: hidden; background: #f6f8fb }
.scan-pic img { width: 100%; max-height: 360px; object-fit: contain; display: block }
.scan-pic-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 12.5px }
.scan-badge { background: #eaf2ff; color: #2456a6; border-radius: 20px; padding: 2px 10px; font-size: 12px }
.scan-badge.warn { background: #fff4e5; color: #b26a00 }
.scan-lines { margin-top: 14px }
.scan-lines-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 13.5px; flex-wrap: wrap }
.scan-lines-head .dim { flex: 1 }
.scan-tbl { width: 100%; border-collapse: collapse; font-size: 13px }
.scan-tbl th { text-align: left; padding: 6px 8px; background: #f6f8fb; color: #6b7688; font-weight: 600; font-size: 12.5px; border-bottom: 1px solid #e6ecf5 }
.scan-tbl td { padding: 4px 6px; border-bottom: 1px solid #f0f3f8 }
.scan-tbl input, .scan-tbl select { width: 100%; height: 30px; border: 1px solid #dbe3ee; border-radius: 5px; padding: 0 6px; font-family: inherit; font-size: 13px; background: #fff; color: inherit }
.scan-tbl input:focus, .scan-tbl select:focus { outline: none; border-color: #2456a6 }
.scan-sum { display: flex; gap: 16px; justify-content: flex-end; padding: 8px 4px; font-size: 13px; font-weight: 600 }
.scan-warn { color: #d64541 }
.scan-ok { color: #2e9e5b }
.scan-zoom { position: relative; width: 100%; display: flex; align-items: center; justify-content: center }
.scan-zoom img { max-width: 100%; max-height: 86vh; object-fit: contain; display: block }
.scan-zoom .x { position: fixed; top: 24px; right: 24px; z-index: 8; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 20px; line-height: 1; cursor: pointer }

/* HS 款号色号对照 */
.hs-seg { display: inline-flex; background: #eef2f8; border-radius: 7px; padding: 2px }
.hs-seg .tabbtn { border: 0; background: transparent; border-radius: 5px; padding: 6px 12px; font-size: 13px; color: #5a6678; cursor: pointer; font-family: inherit }
.hs-seg .tabbtn.on { background: #fff; color: #2456a6; font-weight: 600; box-shadow: 0 1px 3px rgba(20, 40, 80, .12) }
.hs-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #5a6678; cursor: pointer; white-space: nowrap }
.hs-src { display: inline-block; font-size: 11.5px; padding: 1px 7px; border-radius: 10px; background: #eef2f8; color: #5a6678 }
.hs-src.manual { background: #e6f4ea; color: #1e7a43 }
.hs-src.manual-all { background: #e8f0ff; color: #2456a6 }
.hs-src.auto { background: #fff4e5; color: #a86500 }
.hs-src.ambiguous { background: #fdf0e3; color: #b25f00 }
/* 产品表单里的编码预览条：算出来的编码，不是填出来的 */
.hs-preview { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 0 10px; padding: 9px 12px; border-radius: 8px; background: #f6f8fb; border: 1px solid #e3e9f2; font-size: 13px }
/* 行内变体：嵌在「海关编码」section 文字后 */
.hs-preview.hs-inline { grid-column: auto; display: inline-flex; margin: 0 0 0 6px; padding: 0 8px; background: transparent; border: 0; font-size: 13px; font-weight: 400; letter-spacing: 0; vertical-align: baseline }
.hs-preview .hs-ok { font-weight: 700; color: #1e7a43 }
.hs-preview .hs-amb { font-weight: 700; color: #b25f00 }
.hs-preview .hs-miss { font-weight: 700; color: #c0392b }
html[data-theme="dark"] .hs-preview { background: #1a2433; border-color: #2b3a52 }
html[data-theme="dark"] .hs-preview .hs-ok { color: #6fce97 }
html[data-theme="dark"] .hs-preview .hs-amb { color: #e5b06a }
html[data-theme="dark"] .hs-preview .hs-miss { color: #f08a7f }
html[data-theme="dark"] .hs-seg { background: #1a2330 }
html[data-theme="dark"] .hs-seg .tabbtn.on { background: #243247; color: #cfe0ff; box-shadow: none }

@media (max-width: 760px) {
  .scan-books { grid-template-columns: 1fr }
  .scan-confirm { grid-template-columns: 1fr }
  .scan-side { position: static }
  .scan-pic img { max-height: 220px }
  .scan-shot { min-height: 180px }
  .scan-tbl input, .scan-tbl select { font-size: 16px; height: 36px }
  .scan-lines-head .dim { flex: 1 0 100% }
}
html[data-theme="dark"] .scan-book,
html[data-theme="dark"] .scan-shot,
html[data-theme="dark"] .scan-tbl input,
html[data-theme="dark"] .scan-tbl select { background: #1a2330; border-color: #2c3848; color: #e4ebf4 }
html[data-theme="dark"] .scan-bookbar { background: #1a2330 }
html[data-theme="dark"] .scan-tbl th { background: #182231; color: #93a4bd; border-bottom-color: #2c3848 }
html[data-theme="dark"] .scan-tbl td { border-bottom-color: #243044 }
html[data-theme="dark"] .scan-pic { border-color: #2c3848; background: #141d29 }
html[data-theme="dark"] .me-role { background: #22304a; color: #9dc0ff }
html[data-theme="dark"] .me-note { background: #1b2637; color: #93a3bb; border-left-color: #4b7bd0 }
html[data-theme="dark"] .amz-sublink { color: #7db0ff; background: #22304a }
html[data-theme="dark"] .amz-sublink:hover { color: #a8c8ff; background: #28395a }
html[data-theme="dark"] .amz-imp-tip { background: #16202d; border-color: #2c3848; color: #a9b7c9 }
html[data-theme="dark"] .amz-imp-tip code { background: #22304a; color: #a8c8ff }
html[data-theme="dark"] .amz-imp-drop { background: #141d29; border-color: #33445c }
html[data-theme="dark"] .amz-imp-drop:hover { background: #182634; border-color: #4b7bd0 }
html[data-theme="dark"] .amz-imp-map { background: #16202d }
html[data-theme="dark"] .amz-imp-tbl { border-color: #2c3848 }
html[data-theme="dark"] .amz-imp-b { background: #22304a; color: #a9b7c9 }
html[data-theme="dark"] .amz-imp-b.ok { background: #16351f; color: #7fd39a }
html[data-theme="dark"] .amz-imp-b.warn { background: #3a2a12; color: #f0b46a }

/* 本周分析报告 · 暗色 */
html[data-theme="dark"] .amz-rpt-banner { background: #16202d; border-color: #2c3848 }
html[data-theme="dark"] .amz-rpt-banner-tag { background: #22304a; color: #a9b7c9 }
html[data-theme="dark"] .amz-rpt-bad .amz-rpt-banner-tag { background: #3d1f1f; color: #f08a84 }
html[data-theme="dark"] .amz-rpt-warn .amz-rpt-banner-tag { background: #3a2a12; color: #f0b46a }
html[data-theme="dark"] .amz-rpt-ok .amz-rpt-banner-tag { background: #16351f; color: #7fd39a }
html[data-theme="dark"] .amz-rpt-banner-txt { color: #c8d4e4 }
html[data-theme="dark"] .amz-rpt-sum.amz-rpt-bad { background: #1c1416 }
html[data-theme="dark"] .amz-rpt-sum.amz-rpt-warn { background: #1c1813 }
html[data-theme="dark"] .amz-rpt-sum.amz-rpt-ok { background: #131c17 }
html[data-theme="dark"] .amz-rpt-sum-h { color: #93a3bb }
html[data-theme="dark"] .amz-rpt-sum-t { color: #e4ebf4 }
html[data-theme="dark"] .amz-rpt-sum-k { color: #93a3bb }
html[data-theme="dark"] .amz-rpt-sum-k b { color: #e4ebf4 }
html[data-theme="dark"] .amz-rpt-flag { background: #3a2a12; color: #f0b46a }
html[data-theme="dark"] .amz-rpt-miss { background: #241d10; border-color: #4a3a1a; color: #f0b46a }
html[data-theme="dark"] .amz-rpt-bd-total { color: #c8d4e4 }
html[data-theme="dark"] .amz-rpt-bd-l { color: #a9b7c9 }
html[data-theme="dark"] .amz-rpt-bd-bar { background: #22304a }
html[data-theme="dark"] .amz-rpt-bd-bar i.pos { background: #2f9e68 }
html[data-theme="dark"] .amz-rpt-bd-bar i.neg { background: #c0504d }
html[data-theme="dark"] .amz-rpt-item { background: #16202d; border-color: #2c3848 }
html[data-theme="dark"] .amz-rpt-item.lv-high { background: #1c1416; border-left-color: #c0504d }
html[data-theme="dark"] .amz-rpt-item.lv-mid { background: #1c1813; border-left-color: #c08a3e }
html[data-theme="dark"] .amz-rpt-item-h { color: #e4ebf4 }
html[data-theme="dark"] .amz-rpt-lv { background: #22304a; color: #a9b7c9 }
html[data-theme="dark"] .lv-high .amz-rpt-lv { background: #3d1f1f; color: #f08a84 }
html[data-theme="dark"] .lv-mid .amz-rpt-lv { background: #3a2a12; color: #f0b46a }
html[data-theme="dark"] .amz-rpt-dim { background: #22304a; color: #a9b7c9 }
html[data-theme="dark"] .amz-rpt-fact { color: #a9b7c9 }
html[data-theme="dark"] .amz-rpt-do { background: #172236; color: #c6d6ea }
html[data-theme="dark"] .amz-rpt-do span { background: #22304a; color: #8eb8ff }
html[data-theme="dark"] .amz-rpt-act li { color: #dbe5f0; border-bottom-color: #243044 }
html[data-theme="dark"] .amz-rpt-cap { color: #a9b7c9; border-left-color: #33445c }
html[data-theme="dark"] .amz-rpt-tbl td:first-child { color: #a9b7c9 }
html[data-theme="dark"] .amz-rpt-good li { color: #a9b7c9 }
html[data-theme="dark"] .amz-rpt-up { color: #7fd39a }
html[data-theme="dark"] .amz-rpt-down { color: #f08a84 }

/* 投诉单 · 问题图片（直传 NAS，缩略图网格） */
.cm-imgs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 6px }
.cm-img { position: relative; aspect-ratio: 1 / 1; border: 1px dashed #cfd8d2; border-radius: 8px; background: #F7F9F7; overflow: hidden; display: flex; align-items: center; justify-content: center }
.cm-img img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block }
.cm-img-add { width: 100%; height: 100%; border: 0; background: transparent; color: #6b7a86; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px }
.cm-img-add b { font-size: 22px; font-weight: 400; line-height: 1 }
.cm-img-add:hover { background: #EDF3EF; color: #2F6B4F }
.cm-img-x { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; line-height: 20px; text-align: center; cursor: pointer; text-decoration: none }
.cm-img-x:hover { background: rgba(0,0,0,.78) }
html[data-theme="dark"] .cm-img { border-color: #2c3a4d; background: #131c28 }
html[data-theme="dark"] .cm-img-add { color: #8d99ab }
html[data-theme="dark"] .cm-img-add:hover { background: #1b2736; color: #7fd0a5 }

/* 客户对应资料 */
.cm-block { border: 1px solid #E3E9E4; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; background: #fff }
.cm-block-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px }
.cm-block-head .dim { font-size: 12px }
.cm-add { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap }
.cm-sep { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; font-size: 13px; color: #4a5568 }
input.cm-outlet { border-color: #d99a2b; background: #FFF8E8; color: #8a5a00; font-weight: 600 }
html[data-theme="dark"] input.cm-outlet { background: #2a2313; border-color: #6b5320; color: #e8c477 }
html[data-theme="dark"] .cm-block { background: #131c28; border-color: #2c3a4d }
html[data-theme="dark"] .cm-sep { color: #8d99ab }

/* ── 客户对应资料：顶部控件 / 四类页签 / 统一控件高度 ───────────────── */
.cm-view > .page-head { margin-bottom: 10px }
/* 范围选择在前、客户/集团搜索框在后，单独一行；搜索框约占 1/3 宽，不铺满整行 */
.cm-topbar { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; flex-wrap: wrap }
.cm-topbar .cm-mode { width: 120px; flex: 0 0 auto }
.cm-pick-wrap { display: block; flex: 0 0 auto; width: 33.333%; min-width: 240px; max-width: 380px }
.cm-pick-wrap .ssel { width: 100% }
/* 四个页签：紧接搜索框下方切换，四类资料一次只显示一页 */
.cm-tabs { display: flex; gap: 6px; border-bottom: 2px solid #E3E9E4; margin: 0 0 14px; flex-wrap: wrap }
.cm-tab { border: 1px solid transparent; border-bottom: 0; background: transparent; color: #59657a;
  font-size: 14.5px; font-family: inherit; padding: 8px 16px; border-radius: 8px 8px 0 0;
  cursor: pointer; margin-bottom: -2px }
.cm-tab:hover { color: #2456a6; background: #f4f7fb }
.cm-tab.on { color: #2456a6; font-weight: 700; background: #fff; border-color: #E3E9E4; border-bottom: 2px solid #fff }
.cm-cnt { font-size: 12px; color: #8a93a6; font-weight: 400; margin-left: 5px }
.cm-view .page-sub { margin: 0 0 12px }
/* 单行控件统一到产品中心的标准高度 38px */
.cm-view input, .cm-view select {
  height: 38px; box-sizing: border-box; padding: 0 10px; border: 1px solid #D6DED4; border-radius: 6px;
  font-size: 14px; font-family: inherit; background: #fff; color: inherit; line-height: 36px }
.cm-view input:focus, .cm-view select:focus { outline: none; border-color: #2456a6; box-shadow: 0 0 0 2px rgba(36,86,166,.12) }
.cm-view .ssel-input { padding-right: 26px }
.cm-view .ssel-native { padding: 0 }
.cm-view input.cm-outlet { border-color: #d99a2b; background: #FFF8E8; color: #8a5a00; font-weight: 600 }
.cm-view span.cm-outlet { color: #8a5a00; font-weight: 600 }
html[data-theme="dark"] .cm-view span.cm-outlet { color: #e8c477 }
html[data-theme="dark"] .cm-view input, html[data-theme="dark"] .cm-view select { background: #1f2937; border-color: #34414f; color: #dfe7f2 }
html[data-theme="dark"] .cm-view input.cm-outlet { background: #2a2313; border-color: #6b5320; color: #e8c477 }
html[data-theme="dark"] .cm-tabs { border-bottom-color: #2c3a4d }
html[data-theme="dark"] .cm-tab { color: #8d99ab }
html[data-theme="dark"] .cm-tab:hover { background: #1b2736; color: #8ab4f8 }
html[data-theme="dark"] .cm-tab.on { background: #131c28; border-color: #2c3a4d; border-bottom-color: #131c28; color: #8ab4f8 }

/* 销售对账：按币种分账套 */
.stmt-blk { border: 1px solid #E3E9E4; border-radius: 10px; padding: 14px 16px; margin: 16px 0; background: #fff }
.stmt-hd { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #EEF1F6 }
.stmt-hd b { font-size: 15px }
.stmt-blk .stats { margin-top: 0; margin-bottom: 12px }
.stmt-blk h4 { margin: 14px 0 6px }
html[data-theme="dark"] .stmt-blk { background: #131c28; border-color: #2c3a4d }
html[data-theme="dark"] .stmt-hd { border-bottom-color: #2c3a4d }

/* 产品中心 · 尺码 / 颜色 / 变体 三页工作区
   页签视觉统一复用「客户对应资料」的 .cm-tabs / .cm-tab / .cm-cnt（定义见上）；
   pw-tabs 仅作 JS 事件选择器保留，不再单独定义 .tab / .pw-cnt。 */
.pw-tabs { margin: 0 0 14px }
.pw-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px }
.pw-tools .dim { font-size: 12px }
.pw-table table { width: 100% }
.pw-table th, .pw-table td { padding: 8px 10px }
.pw-idx { color: #8a93a6; text-align: center; width: 52px }
input.pw-sz, input.pw-sz-new {
  height: 38px; box-sizing: border-box; width: 100%; max-width: 200px; padding: 0 10px;
  border: 1px solid #D6DED4; border-radius: 6px; font-size: 14px; font-family: inherit;
  background: #fff; color: inherit }
input.pw-sz[readonly] { background: transparent; border-color: transparent; color: inherit; cursor: default }
input.pw-sz:focus, input.pw-sz-new:focus { outline: none; border-color: #2456a6; box-shadow: 0 0 0 2px rgba(36,86,166,.12) }
.pw-newrow td { background: #f4f8ff }
html[data-theme="dark"] input.pw-sz, html[data-theme="dark"] input.pw-sz-new { background: #131c28; border-color: #2c3a4d; color: #dfe7f2 }
html[data-theme="dark"] input.pw-sz[readonly] { background: transparent; border-color: transparent }
html[data-theme="dark"] .pw-newrow td { background: #16233a }

/* 产品中心 · 批量编辑（工具条控件 + 字段弹窗）；工具条已并入 .pc-bar 同一行 */
.be-all { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; white-space: nowrap }
.pc-ck { width: 15px; height: 15px; cursor: pointer; vertical-align: middle }
.be-scope { display: flex; gap: 18px; flex-wrap: wrap; padding: 8px 10px; margin: 0 0 12px; border-radius: 8px; background: #F2F6FC; font-size: 13px }
.be-scope label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer }
.be-rows { max-height: 46vh; overflow: auto; border: 1px solid #E6EBF2; border-radius: 8px }
.be-row { display: grid; grid-template-columns: 74px 130px 1fr; gap: 10px; align-items: center; padding: 7px 10px; border-bottom: 1px solid #EEF1F6 }
.be-row:last-child { border-bottom: 0 }
.be-en { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #5b6b82; cursor: pointer; white-space: nowrap }
.be-lb { font-size: 13px; font-weight: 600 }
.be-in input[type="text"], .be-in input[type="number"], .be-in select, .be-in textarea { width: 100%; box-sizing: border-box; padding: 6px 9px; border: 1px solid #D6DED4; border-radius: 6px; font-size: 13px; font-family: inherit; background: #fff; color: inherit }
.be-in :disabled { background: #F2F4F7 !important; color: #9aa4b2 !important; cursor: not-allowed }
html[data-theme="dark"] .be-scope { background: #16233a }
html[data-theme="dark"] .be-rows, html[data-theme="dark"] .be-row { border-color: #2c3a4d }
html[data-theme="dark"] .be-in input, html[data-theme="dark"] .be-in select, html[data-theme="dark"] .be-in textarea { background: #131c28; border-color: #2c3a4d; color: #dfe7f2 }
html[data-theme="dark"] .be-in :disabled { background: #101825 !important }

/* 通用分页条（产品中心 / 颜色档案等大数据列表按需渲染） */
.pager { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; padding: 8px 10px; border: 1px solid #E6EBF2; border-radius: 8px; background: #F7F9FC; font-size: 13px }
.pager .pg-cur { margin: 0 4px; white-space: nowrap }
/* 分页按钮（首页/上一页/下一页/末页）与「每页条数」下拉：同一条规则锁定相同高度，
   避免 button 与 select 在不同浏览器下盒模型不一致导致下拉比按钮矮 */
.pager .btn.sm, .pager .pg-size { height: 30px; box-sizing: border-box; padding: 0 10px; line-height: 28px; font-size: 13.5px; vertical-align: middle }
.pager .pg-size { border: 1px solid #D6DED4; border-radius: 6px; font-family: inherit; background: #fff; color: inherit; cursor: pointer }
.pager .btn.sm[disabled] { opacity: .45; cursor: default }
.pager .pg-tip { margin-left: auto; font-size: 12px }
html[data-theme="dark"] .pager { background: #131c28; border-color: #2c3a4d }
html[data-theme="dark"] .pager .pg-size { background: #131c28; border-color: #2c3a4d; color: #dfe7f2 }

/* 产品中心工具条（同一行）：全选/已选/批量编辑/清空选择 → 搜索框 → 统计/分页信息 */
.pc-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px }
/* 模杯资料列表工具条：搜索框在前，分页信息紧随其后，同一行（内部输入框沿用 .fld-inline 样式） */
.ms-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px }
.ms-bar .pager { margin: 0; padding: 0; border: 0; background: transparent }
/* 盒模型已与 .fld 输入框共用同一条规则（见文件前部），此处只保留工具条差异化属性 */
.pc-q { width: 230px; flex: 0 0 auto; color: inherit; margin-bottom: 0 }
.pc-q:focus { outline: none; border-color: #2456a6; box-shadow: 0 0 0 2px rgba(36,86,166,.12) }
/* 搜索框 + 分页信息绑成一组：宽屏跟全选按钮同一行，窄屏整组换行，
   不会出现「搜索框在上面、分页掉到下一行」的错位 */
.pc-tools { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0 }
.pc-tools #pc-pager-top { flex: 1 1 0; min-width: 0 }
.pc-pager-top .pager { margin: 0; flex: 1 1 auto; min-width: 0 }
.pc-pager-bottom .pager { margin: 10px 0 0 }
html[data-theme="dark"] .pc-q { background: #151e28; border-color: #34414f; color: #e4ebf4 }

/* 报价「尺码范围」：鼠标指向浮现该范围包含的全部尺码（title 浮层，范围外的悬停无提示） */
.szr { cursor: help; text-decoration: underline dotted; text-decoration-color: rgba(120,140,165,.65); text-underline-offset: 2px }

/* 客户对应维护（颜色档案 / 产品中心 / 单位字典共用）：
   归属 + 客户色号 并排等宽，输入框 38px 高，输入即模糊过滤，下拉用 fixed 定位避开弹窗裁剪 */
.ca-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; margin-bottom: 12px }
/* 单位行多两个输入：换算系数 + 默认单位 */
.ca-form.ca-form-unit { grid-template-columns: 1fr 1fr 1.1fr auto auto }
.ca-form .ca-cell { min-width: 0 }
.ca-form .ca-row2 { grid-column: 1 / span 2; display: grid; grid-template-columns: 1fr 1fr; gap: 8px }
.ca-form .ca-add { height: 38px; white-space: nowrap }
.ca-cb { position: relative; min-width: 0 }
.ca-in { display: block; width: 100%; height: 38px; box-sizing: border-box; padding: 0 30px 0 11px;
  border: 1px solid #D6DED4; border-radius: 7px; font-size: 14px; font-family: inherit;
  background: #fff; color: inherit; line-height: 36px }
.ca-in:focus { border-color: #2456a6; outline: none; box-shadow: 0 0 0 3px rgba(36,86,166,.12) }
.ca-in::placeholder { color: #9aa6b8 }
.ca-arrow { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 11px; color: #8a93a6; pointer-events: none }
.ca-pop { position: fixed; z-index: 400; max-height: 260px; overflow: auto; box-sizing: border-box;
  background: #fff; border: 1px solid #D6DED4; border-radius: 8px; box-shadow: 0 12px 30px rgba(16,30,60,.18); padding: 4px }
.ca-opt { display: flex; align-items: baseline; gap: 8px; padding: 8px 10px; border-radius: 6px; font-size: 14px; cursor: pointer; white-space: nowrap }
.ca-opt.on, .ca-opt:hover { background: #EEF4FF }
.ca-opt-l { overflow: hidden; text-overflow: ellipsis }
.ca-opt-s { margin-left: auto; font-size: 12.5px; color: #8a93a6; flex-shrink: 0 }
.ca-none { padding: 9px 10px; font-size: 13.5px; color: #8a93a6 }
html[data-theme="dark"] .ca-in { background: #151e28; border-color: #34414f; color: #e4ebf4 }
html[data-theme="dark"] .ca-pop { background: #182231; border-color: #2c3848; box-shadow: 0 12px 30px rgba(0,0,0,.45) }
html[data-theme="dark"] .ca-opt.on, html[data-theme="dark"] .ca-opt:hover { background: #1e2c3d }
@media (max-width: 760px) {
  .ca-form { grid-template-columns: 1fr }
  .ca-form.ca-form-unit { grid-template-columns: 1fr }
  .ca-form .ca-row2 { grid-column: 1; grid-template-columns: 1fr }
}

/* 颜色预览：信息栅格固定四列（色号/中英色名/品牌｜客户/集团/调用范围｜三光源/对色方法｜色样/备注/注销｜录入审核） */
.info-grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)) }
.info-grid.g4 > div { min-width: 0; word-break: break-word }
.info-grid .ig-multi { font-size: 14px; line-height: 1.5; white-space: pre-wrap; max-height: 62px; overflow: auto }
.btn:disabled { opacity: .42; cursor: not-allowed }
@media (max-width: 980px) { .info-grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
@media (max-width: 620px) { .info-grid.g4 { grid-template-columns: 1fr } }

/* 产品预览标题栏：款号 + 尺码/颜色/变体 + 客户款号，同一基线，窄屏自动换行 */
.m-head h3.pd-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; margin: 0 12px 0 0 }
.m-head h3.pd-head > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.m-head h3.pd-head .btn { white-space: nowrap; flex-shrink: 0 }
/* 产品详情：款号后面的「新建 日期」，纯文字、无底色，只做弱化 */
.m-head h3.pd-head .pd-created { flex: 0 0 auto; font-size: 12.5px; font-weight: 400; color: #8a93a6; background: none; border: 0; padding: 0; white-space: nowrap }

/* 等码设置：输入框与表格同高（原来用浏览器默认高度，只有 20px 左右） */
#eq-body td { padding: 5px 8px; vertical-align: middle }
#eq-body input { display: block; width: 100%; height: 36px; box-sizing: border-box; margin: 0; padding: 0 9px;
  border: 1px solid #D6DED4; border-radius: 6px; font-size: 14px; font-family: inherit; background: #fff; line-height: 34px; color: inherit }
#eq-body input:focus { border-color: #2456a6; outline: none; box-shadow: 0 0 0 3px rgba(36,86,166,.12) }
#eq-body a.act { display: inline-block; line-height: 36px }
html[data-theme="dark"] #eq-body input { background: #151e28; border-color: #34414f; color: #e4ebf4 }

/* 销售对账统计卡：一行六等分，容器变窄自动降列 */
.stats.stmt-stats { grid-template-columns: repeat(var(--sc, 6), minmax(0, 1fr)); gap: 10px; margin-top: 12px }
.stats.stmt-stats .stat { padding: 12px 14px; min-width: 0 }
.stats.stmt-stats .stat b { font-size: 17px; line-height: 1.35; white-space: normal; overflow-wrap: anywhere }
.stats.stmt-stats .stat span { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.4 }
@media (max-width: 1180px) { .stats.stmt-stats { grid-template-columns: repeat(3, minmax(0, 1fr)) } }
@media (max-width: 680px) { .stats.stmt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
@media (max-width: 420px) { .stats.stmt-stats { grid-template-columns: 1fr } }

/* ---------- 工作台待办 ---------- */
.td-wrap { background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(20,40,80,.08); margin: 14px 0 2px; overflow: hidden }
.td-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 11px 16px; border-bottom: 1px solid #E9EEE7; background: #F7FAF5 }
.td-h-l { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap }
.td-h-t { font-size: 15.5px }
.td-h-n { color: #8a93a6; font-size: 13px }
.td-tabs { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap }
.td-tab { background: transparent; border: 0; padding: 5px 10px; border-radius: 6px; cursor: pointer; font-size: 13.5px; color: #59657a; font-family: inherit }
.td-tab:hover { background: #EEF3EC }
.td-tab.on { background: #2456a6; color: #fff }
.td-tab i { font-style: normal; margin-left: 5px; opacity: .78; font-size: 12px }
.td-h-acts { display: flex; gap: 6px; align-items: center }
/* 左右分栏：左「我的待办」/ 右「跟我相关的」，已完成收在底部折叠 */
.td-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start }
.td-col { min-width: 0 }
.td-col + .td-col { border-left: 1px solid #EEF1EE }
.td-col-h { display: flex; align-items: center; gap: 8px; padding: 9px 16px 7px; font-size: 13px; font-weight: 600; color: #3f4a5c; background: #FBFCFA; border-bottom: 1px solid #F2F4F8 }
.td-col-h > i, .td-sub-h > i { font-style: normal; font-weight: 400; color: #8a93a6; font-size: 12px }
.td-col-h > em { font-style: normal; font-weight: 400; color: #a3aab8; font-size: 11.5px; margin-left: auto }
.td-sub-h { display: flex; align-items: center; gap: 6px; padding: 7px 16px 5px; font-size: 12px; color: #8a93a6; background: #FCFDFB; border-bottom: 1px dashed #EEF1EE }
.td-done-fold { border-top: 1px solid #EEF1EE; background: #FCFDFB }
.td-done-fold > button { display: flex; align-items: center; gap: 6px; width: 100%; padding: 9px 16px; background: transparent; border: 0; cursor: pointer; font-family: inherit; font-size: 12.5px; color: #59657a; text-align: left }
.td-done-fold > button:hover { background: #F5F8F4 }
.td-done-fold > button i { font-style: normal; color: #8a93a6; font-size: 12px }
.td-done-fold > button b { margin-left: auto; font-weight: 400; color: #2456a6; font-size: 12px }
.td-done-fold .td-list { border-top: 1px solid #F2F4F8 }
@media (max-width: 1040px) {
  .td-cols { grid-template-columns: 1fr }
  .td-col + .td-col { border-left: 0; border-top: 1px solid #EEF1EE }
}
.td-notif-on { color: #1d8a3c; font-size: 12.5px; background: #e3f6e8; padding: 3px 8px; border-radius: 10px; white-space: nowrap }
/* 「要做什么」自然语言识别结果 */
.nl-tip { margin-top: 6px; padding: 6px 9px; border-radius: 6px; background: #F1F7EE; border: 1px solid #DDE9D6; color: #3f5a34; font-size: 12.5px; line-height: 1.6; word-break: break-word }
.nl-tip b { color: #1d8a3c; font-weight: 600 }
html[data-theme="dark"] .nl-tip { background: #1d2b22; border-color: #2c4436; color: #b6cbb9 }
html[data-theme="dark"] .nl-tip b { color: #62c47c }
/* 页内提醒卡片：http 局域网下浏览器不给系统通知，用它兜底（响铃 + 浮窗 + 标题闪烁） */
.td-alert-box { position: fixed; right: 22px; bottom: 22px; z-index: 9000; display: flex; align-items: flex-start; gap: 10px; width: min(380px, calc(100vw - 32px)); padding: 13px 14px 13px 12px; background: #fff; border: 1px solid rgba(217,119,6,.45); border-left: 4px solid #d98600; border-radius: 10px; box-shadow: 0 10px 30px rgba(20,40,80,.18); opacity: 0; transform: translateY(12px) scale(.98); transition: opacity .24s, transform .24s; pointer-events: none }
.td-alert-box.on { opacity: 1; transform: none; pointer-events: auto }
.td-alert-i { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; background: #d98600; color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; margin-top: 1px }
.td-alert-c { flex: 1 1 auto; min-width: 0 }
.td-alert-c > b { display: block; font-size: 14px; color: #1c2333; line-height: 1.55 }
.td-alert-c > span { display: block; margin-top: 3px; font-size: 12.5px; color: #8a93a6; line-height: 1.6 }
.td-alert-x { position: absolute; top: 5px; right: 7px; background: transparent; border: 0; color: #a3aab8; font-size: 17px; line-height: 1; cursor: pointer; padding: 0 2px }
.td-alert-x:hover { color: #d64541 }
.td-alert-box > a { flex: 0 0 auto; align-self: center; white-space: nowrap }
html[data-theme="dark"] .td-alert-box { background: #1f2937; border-color: rgba(217,119,6,.5); box-shadow: 0 10px 30px rgba(0,0,0,.4) }
html[data-theme="dark"] .td-alert-c > b { color: #e6edf5 }
.td-item { display: flex; align-items: flex-start; gap: 10px; padding: 11px 16px; border-bottom: 1px solid #f2f4f8 }
.td-item:last-child { border-bottom: 0 }
.td-item:hover { background: #F9FBF8 }
.td-ck { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; border: 1.5px solid #C9D3C6; border-radius: 50%; background: #fff; color: #fff; font-size: 11px; line-height: 1; cursor: pointer; padding: 0 }
.td-ck:hover { border-color: #2456a6 }
.td-item.td-done .td-ck { background: #1d8a3c; border-color: #1d8a3c }
.td-main { flex: 1 1 auto; min-width: 0; cursor: pointer }
.td-t { font-size: 14.5px; font-weight: 600; color: #1c2333; line-height: 1.55 }
.td-m { font-size: 12.5px; color: #8a93a6; margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap }
.td-ops { flex: 0 0 auto; display: flex; gap: 10px; padding-top: 2px }
.td-warn { color: #c07216 }
.td-item.td-over { box-shadow: inset 3px 0 0 #d64541 }
.td-item.td-today { box-shadow: inset 3px 0 0 #e8a33d }
.td-item.td-done .td-t { color: #8a93a6; text-decoration: line-through; font-weight: 500 }
.td-empty { padding: 22px 16px; color: #8a93a6; font-size: 13.5px; text-align: center }
.td-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 9px 14px; border-radius: 8px; border: 1px solid rgba(214,69,65,.35); background: #FDF3F2; font-size: 13.5px; line-height: 1.6 }
.td-bar-ico { flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%; background: #d64541; color: #fff; font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center }
.td-bar-txt { flex: 1 1 auto; min-width: 0 }
.td-bar-x { flex: 0 0 auto; background: transparent; border: 0; font-size: 18px; line-height: 1; color: #8a93a6; cursor: pointer; padding: 0 2px }
.td-dt-t { font-size: 17px; font-weight: 700; line-height: 1.55; margin-bottom: 12px }
.td-dt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; font-size: 13.5px }
.td-dt-grid > div > span { color: #8a93a6; display: block; font-size: 12.5px }
.td-dt-grid > div > b { font-weight: 600 }
.td-dt-grid > div > em { font-style: normal; color: #c07216; margin-left: 6px; font-size: 12.5px }
.td-dt-sec { margin-top: 16px; padding-top: 12px; border-top: 1px solid #EEF1EE }
.td-dt-lbl { font-size: 13px; color: #8a93a6; margin-bottom: 8px; display: flex; align-items: center; gap: 10px }
.td-chips { display: flex; flex-wrap: wrap; gap: 6px }
.td-chip { display: inline-flex; align-items: center; gap: 5px; background: #F2F6F0; border: 1px solid #E1E8DE; border-radius: 14px; padding: 2px 10px; font-size: 13px }
.td-chip i { font-style: normal; font-size: 11px; color: #2456a6; background: #e5efff; border-radius: 8px; padding: 0 5px }
.td-chip b { font-weight: 400; color: #a3aab8; cursor: pointer; font-size: 14px; line-height: 1 }
.td-chip b:hover { color: #d64541 }
.td-desc { font-size: 13.5px; line-height: 1.85; color: #4a5568 }
.td-sublabel { flex: 0 0 100%; width: 100%; font-size: 12px; color: #8a93a6; margin: 2px 0 4px; padding-top: 5px; border-top: 1px dashed #E1E8DE }

/* ---- 每人各自完成 / 评论 / 附件（20261116-1300） ---- */
.td-ck.on { background: #1d8a3c; border-color: #1d8a3c }
.td-item.td-done .td-ck { background: #1d8a3c; border-color: #1d8a3c }
.td-ck-na { border-style: dashed; border-color: #DDE4DA; cursor: default }
.td-prog { color: #2456a6; font-size: 12.5px; font-weight: 600 }
.td-item.td-done .td-prog { color: #8a93a6 }
.td-prog-wrap { margin: 0 0 14px }
.td-prog-bar { height: 6px; border-radius: 3px; background: #edf1ec; overflow: hidden }
.td-prog-bar > i { display: block; height: 100%; background: linear-gradient(90deg,#3f9d5a,#1d8a3c); transition: width .2s }
.td-prog-txt { font-size: 12.5px; color: #8a93a6; margin-top: 6px }
.td-prog-txt b { color: #1c2333; font-size: 13.5px }
.td-hint { margin-top: 8px; font-size: 12px; color: #97a0b0; line-height: 1.7 }
.td-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px }
.td-file { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; background: #f5f8f4; border: 1px solid #e4eae1; border-radius: 6px; padding: 3px 8px; font-size: 12.5px }
.td-file a, .td-file > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px }
.td-file em { font-style: normal; color: #97a0b0; font-size: 11.5px }
.td-file b { font-weight: 400; color: #b3bac6; cursor: pointer; font-size: 14px; line-height: 1 }
.td-file b:hover { color: #d64541 }
.td-cmts { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px }
.td-cmt { display: flex; gap: 9px }
.td-cmt-av { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; background: #e5efff; color: #2456a6; font-size: 12.5px; font-weight: 600; display: flex; align-items: center; justify-content: center }
.td-cmt-b { flex: 1 1 auto; min-width: 0 }
.td-cmt-h { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #8a93a6 }
.td-cmt-h b { color: #1c2333; font-size: 13px; font-weight: 600 }
.td-cmt-h .act { margin-left: auto; font-size: 12px }
.td-cmt-t { font-size: 13.5px; line-height: 1.8; color: #3f4a5c; margin-top: 3px; word-break: break-word }
.td-cmt-new textarea { width: 100%; box-sizing: border-box; border: 1px solid #dfe6dc; border-radius: 8px; padding: 8px 10px; font-family: inherit; font-size: 13.5px; line-height: 1.7; resize: vertical; background: #fff; color: #1c2333 }
.td-cmt-new textarea:focus { outline: none; border-color: #7fa8e0 }
.td-cmt-bar { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap }
.td-cmt-bar #td-cmt-msg { flex: 1 1 auto; font-size: 12px }
.td-actions { position: sticky; bottom: 0; background: #fff; border-top: 1px solid #EEF1EE; z-index: 2 }
@media (max-width: 760px) {
  .td-tabs { order: 3; width: 100%; margin-left: 0 }
  .td-h-acts { margin-left: auto }
  .td-dt-grid { grid-template-columns: 1fr }
  .td-ops .act:first-child { display: none }
}
html[data-theme="dark"] .td-wrap { background: #1b2530; box-shadow: none }
html[data-theme="dark"] .td-head { background: #202b36; border-color: #2b3a49 }
html[data-theme="dark"] .td-item { border-color: #26313f }
html[data-theme="dark"] .td-item:hover { background: #202b36 }
html[data-theme="dark"] .td-col-h { background: #202b36; color: #cfdaea; border-color: #2b3a49 }
html[data-theme="dark"] .td-col-h > em { color: #8fa0b5 }
html[data-theme="dark"] .td-col + .td-col { border-color: #2b3a49 }
html[data-theme="dark"] .td-sub-h { background: #1e2833; border-color: #2b3a49; color: #8fa0b5 }
html[data-theme="dark"] .td-done-fold { background: #1e2833; border-color: #2b3a49 }
html[data-theme="dark"] .td-done-fold > button { color: #a9b8c9 }
html[data-theme="dark"] .td-done-fold > button:hover { background: #202b36 }
html[data-theme="dark"] .td-done-fold .td-list { border-color: #26313f }
html[data-theme="dark"] .td-t { color: #e4ebf4 }
html[data-theme="dark"] .td-ck { background: #1b2530; border-color: #3c4b5c }
html[data-theme="dark"] .td-tab { color: #a9b8c9 }
html[data-theme="dark"] .td-tab:hover { background: #26313f }
html[data-theme="dark"] .td-bar { background: #2a1d1d; border-color: #5a3333 }
html[data-theme="dark"] .td-chip { background: #202b36; border-color: #2f3e4e }
html[data-theme="dark"] .td-desc { color: #b9c6d8 }
html[data-theme="dark"] .td-dt-grid > div > span { color: #8fa0b5 }
html[data-theme="dark"] .td-dt-sec { border-color: #2b3a49 }
html[data-theme="dark"] .td-sublabel { border-color: #2f3e4e }
html[data-theme="dark"] .td-prog-bar { background: #26313f }
html[data-theme="dark"] .td-prog-txt b { color: #e4ebf4 }
html[data-theme="dark"] .td-file { background: #202b36; border-color: #2f3e4e }
html[data-theme="dark"] .td-file a { color: #8fb8f0 }
html[data-theme="dark"] .td-cmt-av { background: #24384f; color: #9dc2f5 }
html[data-theme="dark"] .td-cmt-h b { color: #e4ebf4 }
html[data-theme="dark"] .td-cmt-t { color: #c3d0e0 }
html[data-theme="dark"] .td-cmt-new textarea { background: #1b2530; border-color: #2f3e4e; color: #e4ebf4 }
html[data-theme="dark"] .td-ck-na { border-color: #3c4b5c }
html[data-theme="dark"] .td-actions { background: #1b2530; border-color: #2b3a49 }

/* ---------- INV 发邮件 ---------- */
.ml-body .ml-grid { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start }
.ml-main { min-width: 0 }
.ml-side { border-left: 1px solid #eef2f9; padding-left: 14px }
.ml-chks { max-height: 168px; overflow: auto; border: 1px solid #e3e9f2; border-radius: 6px; padding: 5px; background: #fbfcfe }
.ml-chk { display: flex; gap: 8px; align-items: flex-start; padding: 5px 6px; border-radius: 4px; cursor: pointer }
.ml-chk:hover { background: #f1f6fd }
.ml-chk input { margin-top: 3px; flex: 0 0 auto }
.ml-chk > span { display: flex; flex-direction: column; min-width: 0 }
.ml-chk b { font-size: 12.5px; font-weight: 600; color: #1b2430 }
.ml-chk em { font-style: normal; font-size: 11.5px; color: #8a93a6; word-break: break-all }
.ml-chk i.badge { margin: 2px 0 0; align-self: flex-start }
.ml-chk-line { border: 1px solid #e3e9f2; border-radius: 6px; padding: 8px 10px; background: #fbfcfe }
.ml-atts { display: flex; flex-direction: column; gap: 6px }
.ml-att { display: flex; gap: 8px; align-items: flex-start; border: 1px solid #e3e9f2; border-radius: 6px; padding: 7px 9px; cursor: pointer; background: #fff }
.ml-att:hover { border-color: #b9cde8 }
.ml-att > span { display: flex; flex-direction: column; min-width: 0 }
.ml-att b { font-size: 12.5px; font-weight: 600 }
.ml-att em { font-style: normal; font-size: 11px; color: #8a93a6; word-break: break-all }
.ml-att i.ml-size { font-style: normal; font-size: 11px; color: #2d7ff9; margin-top: 2px }
.ml-preview { margin-top: 6px; font-size: 12px }
.ml-cust { font-size: 13px; font-weight: 600 }
.ml-cust em { font-style: normal; color: #8a93a6; margin-left: 6px; font-weight: 400 }
.ml-cust-sub { color: #8a93a6; font-size: 11.5px; margin-top: 2px; line-height: 1.6 }
.ml-hint { font-size: 11.5px; color: #8a93a6; line-height: 1.7; margin-top: 8px }
.ml-test { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap }
.ml-test #ms-msg, .ml-test #rs-msg { font-size: 12px }
/* 邮件设置 / 发送邮件弹窗：文本输入框与下拉统一 38px 高、满宽、同边框。
   浏览器给没写 type 的 input 用自带内阴影边框，高度和多行间距都会跟别人不一样，这里统一盖掉 */
.ms-form .fld input:not([type=checkbox]):not([type=radio]),
.ms-form .fld select,
.ml-body .fld input:not([type=checkbox]):not([type=radio]),
.ml-body .fld select {
  width: 100%; height: 38px; box-sizing: border-box; padding: 0 10px;
  font-size: 14.5px; font-family: inherit; line-height: normal;
  border: 1px solid #D6DED4; border-radius: 6px; background: #fff; color: inherit }
.ms-form .fld select, .ml-body .fld select { padding-right: 6px }
.ml-test .combo-in { flex: 0 0 240px; height: 38px; box-sizing: border-box; padding: 0 10px; font-size: 14.5px; max-width: 100% }
html[data-theme="dark"] .ms-form .fld input, html[data-theme="dark"] .ms-form .fld select,
html[data-theme="dark"] .ml-body .fld input, html[data-theme="dark"] .ml-body .fld select,
html[data-theme="dark"] .ml-test .combo-in { background: #1b2530; border-color: #34414f; color: #e4ebf4 }
.ml-body .fgrid .fld input[readonly] { background: #f5f7fa }
html[data-theme="dark"] .ml-side { border-color: #2a3849 }
html[data-theme="dark"] .ml-chks, html[data-theme="dark"] .ml-chk-line, html[data-theme="dark"] .ml-att { background: #1b2735; border-color: #2f3e4e }
html[data-theme="dark"] .ml-chk b, html[data-theme="dark"] .ml-att b, html[data-theme="dark"] .ml-cust { color: #e6edf5 }
html[data-theme="dark"] .ml-chk:hover { background: #223143 }
@media (max-width: 760px) {
  .ml-body .ml-grid { grid-template-columns: 1fr }
  .ml-side { border-left: 0; border-top: 1px solid #eef2f9; padding: 12px 0 0 }
}

/* ---------- 员工与角色 · 发件邮箱状态条（管理员统一配置，员工不可改） ---------- */
.st-mailbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff; border: 1px solid #E3EBE1; border-radius: 10px; padding: 10px 14px; margin: 0 0 14px }
.st-mailbar b { font-size: 13.5px }
.st-mailbar .btn { margin-left: auto }
html[data-theme="dark"] .st-mailbar { background: #1b2533; border-color: #2b3950 }
html[data-theme="dark"] .st-mailbar b { color: #e6edf5 }

/* ---------- 模杯资料：云表图片与附件 ---------- */
.mb-files { margin: 14px 0 4px; border: 1px solid #e6ecf6; border-radius: 10px; padding: 10px 12px; background: #fafcff }
.mb-files-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px }
.mb-files-h b { font-size: 13px }
.mb-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px }
.mb-img { margin: 0; border: 1px solid #e6ecf6; border-radius: 8px; overflow: hidden; background: #fff; cursor: zoom-in }
.mb-img-box { height: 104px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #9aa7bd }
.mb-img-box img { width: 100%; height: 104px; object-fit: contain; display: block }
.mb-img figcaption { padding: 4px 6px; font-size: 12px; color: #5a6b85; border-top: 1px solid #eef2f9; text-align: center }
.mb-atts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px }
.mb-att { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid #dfe7f3; border-radius: 16px; font-size: 12px; color: #2b6bd8; background: #fff; text-decoration: none }
.mb-att em { font-style: normal; color: #8a99b3 }
html[data-theme="dark"] .mb-files { background: #1b2735; border-color: #2f3e4e }
html[data-theme="dark"] .mb-img { background: #223143; border-color: #2f3e4e }
html[data-theme="dark"] .mb-img figcaption { color: #a9b8cc; border-color: #2f3e4e }
html[data-theme="dark"] .mb-att { background: #223143; border-color: #36475a; color: #8fb8ff }

/* ---------- 模杯资料：客户与款号 ---------- */
/* 资料表表头：一行 4 个字段，第二行 技术员 / 制表人 */
.al-head.mb-head { grid-template-columns: repeat(4, minmax(0, 1fr)) }
@media (max-width: 900px) { .al-head.mb-head { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
.ms-custs-sec { margin: 14px 0 4px; border: 1px solid #e6ecf6; border-radius: 10px; padding: 10px 12px; background: #fafcff }
.ms-custs-sec .ms-imgs-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px }
.ms-custs-sec .ms-imgs-h .dim { flex: 1 1 320px; min-width: 0 }
.ms-custs-sec .ms-imgs-h .btn { margin-left: auto }
.ms-custs-sec.collapsed { padding-bottom: 2px }
.ms-custs-sec.collapsed .ms-imgs-h { margin-bottom: 4px }
.ms-custs-sec.collapsed .ms-fold-b { display: none }
.ms-fold-h { cursor: pointer; user-select: none }
.ms-fold-ttl { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto }
.ms-fold-caret { color: #93a3ba; font-size: 22px; line-height: 1; transition: transform .15s; display: inline-block; transform-origin: 50% 50% }
.ms-custs-sec:not(.collapsed) .ms-fold-caret { transform: rotate(90deg) }
.ms-fold-sum { flex: 1 1 320px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.ms-custs-note { margin: 0 0 8px; line-height: 1.65; font-size: 12px }
.ms-custs { width: 100% }
.ms-custs th { white-space: nowrap }
.ms-custs td { padding: 3px 4px }
html[data-theme="dark"] .ms-custs-sec { background: #1e2a38; border-color: #2f3e4e }

/* ---------- 打印设置弹窗：打印内容 / 语言 / 客户 ---------- */
.pf-row { margin-bottom: 14px }
.pf-row > label { display: block; font-size: 12px; color: #8b95a6; font-weight: 600; margin-bottom: 6px }
.pf-opts { display: flex; gap: 10px; flex-wrap: wrap }
.pf-rd { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; border: 1px solid #D6DED4; border-radius: 8px; padding: 8px 10px; cursor: pointer; background: #fff; font-size: 13px }
.pf-rd:has(input:checked) { border-color: #2456a6; box-shadow: 0 0 0 2px rgba(36,86,166,.12); background: #f6f9ff }
.pf-rd input { margin-right: 6px }
.pf-rd b { font-weight: 700 }
.pf-rd span { font-size: 11.5px; color: #8b95a6 }
html[data-theme="dark"] .pf-rd { background: #223143; border-color: #36475a }
html[data-theme="dark"] .pf-rd:has(input:checked) { background: #26374a; border-color: #3d7bd6 }
html[data-theme="dark"] .ms-custs-sec .ms-imgs-h .btn { background: #26374a }

/* ---------- 模杯资料：图片 5 + 5 两行图位 + 打印下拉 ---------- */
.ms-remark-sec { margin: 14px 0 4px; border: 1px solid #e6ecf6; border-radius: 10px; padding: 10px 12px; background: #fafcff }
.ms-remark-sec textarea { width: 100%; min-height: 64px; padding: 7px 9px; font-size: 13px; line-height: 1.6; font-family: inherit; border: 1px solid #D6DED4; border-radius: 8px; background: #fff; color: inherit; resize: vertical }
.ms-remark-sec textarea:focus { outline: none; border-color: #2456a6; box-shadow: 0 0 0 2px rgba(36,86,166,.12) }
.ms-remark-sec textarea:disabled { background: #f3f5f8; color: #7d8798 }
.ms-remark-sec .ren { font-weight: 400; color: #8b95a6 }
/* 打色要求 + 备注：两栏各占一半，左边打色要求、右边备注 */
.ms-remark-sec.ms-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start }
.ms-remark-sec.ms-two .ms-rm-col { min-width: 0 }
.ms-remark-sec.ms-two .ms-imgs-h { margin-bottom: 6px }
@media (max-width: 760px) { .ms-remark-sec.ms-two { grid-template-columns: 1fr } }
html[data-theme="dark"] .ms-remark-sec { background: #1e2a38; border-color: #2f3e4e }
html[data-theme="dark"] .ms-remark-sec textarea { background: #223143; border-color: #36475a }
.ms-imgs-sec { margin: 14px 0 4px; border: 1px solid #e6ecf6; border-radius: 10px; padding: 10px 12px; background: #fafcff }
.ms-imgs-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px }
.ms-imgs-h b { font-size: 13px }
/* 一行 5 格：裁片纹路×2、模杯纹路×2、尺寸示意图；第二行 生产示意图×5 */
.ms-imgs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px }
@media (max-width: 980px) { .ms-imgs { grid-template-columns: repeat(3, minmax(0, 1fr)) } }
@media (max-width: 640px) { .ms-imgs { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
.ms-img { border: 1px dashed #c8d4e6; border-radius: 8px; background: #f7faff; display: flex; flex-direction: column; overflow: hidden }
.ms-img.has { border-style: solid; background: #fff }
.ms-img-b { height: 104px; display: flex; align-items: center; justify-content: center; color: #93a3ba; font-size: 12px; background: #f1f6fd; overflow: hidden }
.ms-img-b img { width: 100%; height: 104px; object-fit: contain; background: #fff; display: block }
.ms-img-add { font-size: 24px; line-height: 1; color: #9fb0c8 }
/* 图片名称在图片上方居中 */
.ms-img-f { font-size: 11.5px; font-weight: 600; color: #3d4c63; padding: 4px 8px; border-bottom: 1px solid #eef2f9; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #f7faff }
.ms-img-d { width: 100%; min-height: 44px; border: 0; border-top: 1px dashed #e6ecf6; padding: 5px 8px; font: inherit; font-size: 11.5px; line-height: 1.55; color: inherit; background: #fff; resize: vertical; box-sizing: border-box }
.ms-img-d:focus { outline: none; background: #fbfdff; box-shadow: inset 0 0 0 1px #b9d0ee }
.ms-img-d::placeholder { color: #a7b3c6 }
.ms-img-a { display: flex; gap: 10px; justify-content: center; padding: 4px 6px 7px; font-size: 12px; flex-wrap: wrap }
.ms-img.legacy .ms-img-f { color: #8b95a6 }
/* 尺寸示意图只是第一行第 5 格，不再跨整行 */
.ms-img.primary { border-color: #9dbbdf; box-shadow: 0 0 0 1px #dbe7f6 inset }
.ms-img-hint { grid-column: 1 / -1; font-size: 12px; color: #8a6d3b; background: #fff8e6; border: 1px solid #f0dfae; border-radius: 6px; padding: 6px 9px; line-height: 1.7 }
/* 已审核只读提示（中性，不出现「锁定」字样） */
.lock-bar { margin: 0 0 12px; padding: 8px 12px; border: 1px solid #e7b4b0; background: #fdf3f2; color: #a32b22; border-radius: 6px; font-size: 13px; line-height: 1.7 }
.lock-bar b { display: inline-block; padding: 0 5px; margin-right: 6px; border: 1px solid #c0392b; border-radius: 3px; font-size: 11px; letter-spacing: .5px }
.lock-bar.info { border-color: #cfdcec; background: #f6f9fd; color: #33506f }
.lock-bar.info b { border-color: #7d9cbf; color: #33506f }
.locked .m-body input:disabled, .locked .m-body select:disabled { background: #f5f7fa; color: #6b7787; -webkit-text-fill-color: #6b7787; cursor: not-allowed }
.locked .m-body input[type="number"] { opacity: 1 }
/* 图片图位：空位整格可点上传，有图点图即修改 */
.ms-img.pickable { cursor: pointer }
.ms-img.pickable:hover { border-color: #7ba7d8; background: #f2f8ff }
/* 导入的尺寸表（图片形式）：列在尺寸矩阵下面 */
.ms-dimsets { margin: 10px 0 4px; padding: 8px 10px }
.ms-dimsets .mb-files-h { margin-bottom: 6px }
.mb-att a { color: inherit; text-decoration: none }
.mb-att a:hover { text-decoration: underline }
.mb-att .act { font-size: 12px; margin-left: 4px }
/* 物料用量：整表单位（新增按钮后面） */
.mx-unit { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #5b6b83 }
.mx-unit label { color: #8b95a6 }
.mx-unit select { height: 28px; padding: 0 6px; border: 1px solid #d7e0ee; border-radius: 6px; background: #fff; font-size: 12px }
html[data-theme="dark"] .mx-unit select { background: #223143; border-color: #36475a; color: #dbe6f5 }
.ms-img.has .ms-img-b { cursor: pointer }
html[data-theme="dark"] .ms-img-hint { background: #3a2f1c; border-color: #5a4a2a; color: #e3c88a }
html[data-theme="dark"] .ms-imgs-sec { background: #1b2735; border-color: #2f3e4e }
html[data-theme="dark"] .ms-img { background: #1f2c3d; border-color: #36475a }
html[data-theme="dark"] .ms-img-b { background: #223143 }
html[data-theme="dark"] .ms-img-f { color: #a9b8cc; border-color: #2f3e4e }
html[data-theme="dark"] .ms-img-d { background: #223143; border-color: #2f3e4e; color: #dbe6f5 }
/* 物料和工艺描述（尺码列下方） */
.ms-craft-sec { margin: 14px 0 4px; border: 1px solid #e6ecf6; border-radius: 10px; padding: 10px 12px; background: #fafcff }
.ms-craft-sec .ms-imgs-h { align-items: center; gap: 10px }
.ms-craft-sec .ms-imgs-h .dim { flex: 1 1 320px; min-width: 0; line-height: 1.6 }
.ms-craft-sec .ms-imgs-h .btn { margin-left: auto }
/* 物料和工艺：厚度自检提醒，跟在标题后 */
.craft-warn { color: #c0392b; font-weight: 600; font-size: 12px; white-space: nowrap }
.craft-szr { display: flex; align-items: center; gap: 4px }
.craft-szr select { flex: 1 1 0; min-width: 0; max-width: 96px; padding: 4px 6px }
.craft-szr span { color: #8b95a6; font-size: 12px; }
/* 尺码组：输入框右侧贴着「新增尺码」，同一行不换行 */
.al-head .al-hf.sz-hf { flex-wrap: nowrap }
.al-head .al-hf.sz-hf > input { flex: 1 1 auto; min-width: 60px }
.sz-new-warn { flex: 0 0 auto; margin-left: 2px; color: #9aa3b2; font-size: 12px; line-height: 1.4; white-space: nowrap; cursor: default; user-select: none }
.sz-new-warn.hot { color: #c0392b; cursor: pointer; text-decoration: underline; text-underline-offset: 2px }
.sz-new-warn.hot:hover { color: #96261f }
.sz-new-warn.fill { color: #9aa3b2; cursor: pointer }
html[data-theme="dark"] .sz-new-warn { color: #7f8b9e }
html[data-theme="dark"] .sz-new-warn.hot { color: #ff8b80 }
html[data-theme="dark"] .sz-new-warn.hot:hover { color: #ffb3aa }
.ms-szbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 14px 0 5px }
.ms-szbar label { color: #5b6577; font-size: 12px }
.ms-szbar select { max-width: 160px }
.ms-craft td { padding: 3px 4px }
html[data-theme="dark"] .ms-craft-sec { background: #1e2a38; border-color: #2f3e4e }
/* 弹窗标题里的 Rev 与日期（制单日期只读，默认当天） */
.m-head h3 .mh-date { height: 26px; line-height: 26px; padding: 0 4px; margin: 0 2px; font-size: 13px; font-weight: 400; color: #40506a; vertical-align: middle; white-space: nowrap }
.m-head h3 .mh-rev { white-space: nowrap }
/* 标题里的日期：贴在单号后面（左侧），不再占右上角 */
.m-head h3 > .m-hd-date { display: inline-flex; align-items: center; margin: 0 0 0 10px; vertical-align: middle; font-weight: 400 }
.m-head h3 > .m-hd-date > input { width: auto; min-width: 92px; height: 26px; color: #40506a }
/* 弹窗右上角图标按钮（历史版本 / 打印 / 保存 / 反审），排在关闭 × 左边 */
.m-head h3 { flex: 1 1 auto; min-width: 0 }
.mh-btns { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-left: 10px; flex: 0 0 auto }
.m-ico { width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #dbe4f2; border-radius: 8px; background: #fff; color: #4a5a74; cursor: pointer; transition: background .15s, border-color .15s, color .15s }
.m-ico svg { width: 17px; height: 17px; display: block }
.m-ico:hover { background: #f3f7fd; border-color: #b9cdea; color: #2456a6 }
.m-ico.primary { background: #2456a6; border-color: #2456a6; color: #fff }
.m-ico.primary:hover { background: #1d4789; border-color: #1d4789; color: #fff }
.m-ico.busy { opacity: .45; pointer-events: none }
.m-ico.en-ico { font-size: 11.5px; font-weight: 700; letter-spacing: .3px }
/* 标题栏常用按钮配色：审核蓝 / 保存绿 / 打印红，其余用紫、青、橙隔开；
   统一浅底 + 同色描边，颜色分明但不压深色。图标按钮（m-ico）与文字按钮（m-txt）都适用；
   data-mh-icon 让其它弹窗的审核 / 保存 / 打印也走同一套色。 */
.m-ico.c-blu, .m-txt.c-blu,
.m-ico[data-mh-icon="approve"], .m-ico[data-mh-icon="unapprove"],
.m-txt[data-mh-icon="approve"], .m-txt[data-mh-icon="unapprove"] { color: #3f86dd; border-color: #cfe2fb; background: #fff }
.m-ico.c-blu:not(:disabled):hover, .m-txt.c-blu:hover,
.m-ico[data-mh-icon="approve"]:not(:disabled):hover, .m-ico[data-mh-icon="unapprove"]:not(:disabled):hover,
.m-txt[data-mh-icon="approve"]:hover, .m-txt[data-mh-icon="unapprove"]:hover { color: #2e74c9; border-color: #a9cdf5; background: #eaf4ff }
.m-ico.c-grn, .m-txt.c-grn, .m-ico[data-mh-icon="save"], .m-txt[data-mh-icon="save"] { color: #3fa46c; border-color: #cbe9d8; background: #f3fbf6 }
.m-ico.c-grn:not(:disabled):hover, .m-txt.c-grn:hover,
.m-ico[data-mh-icon="save"]:not(:disabled):hover, .m-txt[data-mh-icon="save"]:hover { color: #328d5b; border-color: #a4d8b9; background: #eaf8f0 }
.m-ico.c-red, .m-txt.c-red, .m-ico[data-mh-icon="print"], .m-txt[data-mh-icon="print"] { color: #dd5f55; border-color: #f6d3cf; background: #fef6f5 }
.m-ico.c-red:not(:disabled):hover, .m-txt.c-red:hover,
.m-ico[data-mh-icon="print"]:not(:disabled):hover, .m-txt[data-mh-icon="print"]:hover { color: #c74c42; border-color: #efbdb8; background: #fdeceb }
.m-ico.c-org, .m-txt.c-org { color: #d9922f; border-color: #f3e0bd; background: #fffaf1 }
.m-ico.c-org:not(:disabled):hover, .m-txt.c-org:hover { color: #c07f1f; border-color: #e9cf9f; background: #fff4e2 }
.m-ico.c-teal, .m-txt.c-teal { color: #2fa3a0; border-color: #c6e7e5; background: #f2fbfa }
.m-ico.c-teal:not(:disabled):hover, .m-txt.c-teal:hover { color: #238a88; border-color: #a3d6d3; background: #e9f7f6 }
.m-ico.c-vio, .m-txt.c-vio { color: #8574d2; border-color: #dcd7f6; background: #f7f5fe }
.m-ico.c-vio:not(:disabled):hover, .m-txt.c-vio:hover { color: #6f5cc0; border-color: #c5bdee; background: #f0ecfd }
html[data-theme="dark"] .m-ico.c-blu, html[data-theme="dark"] .m-txt.c-blu,
html[data-theme="dark"] .m-ico[data-mh-icon="approve"], html[data-theme="dark"] .m-ico[data-mh-icon="unapprove"],
html[data-theme="dark"] .m-txt[data-mh-icon="approve"], html[data-theme="dark"] .m-txt[data-mh-icon="unapprove"] { color: #86b9f4; border-color: #33506f; background: #1b2837 }
html[data-theme="dark"] .m-ico.c-grn, html[data-theme="dark"] .m-txt.c-grn,
html[data-theme="dark"] .m-ico[data-mh-icon="save"], html[data-theme="dark"] .m-txt[data-mh-icon="save"] { color: #7fd0a1; border-color: #2f5842; background: #182c22 }
html[data-theme="dark"] .m-ico.c-red, html[data-theme="dark"] .m-txt.c-red,
html[data-theme="dark"] .m-ico[data-mh-icon="print"], html[data-theme="dark"] .m-txt[data-mh-icon="print"] { color: #f0968d; border-color: #6a3c38; background: #2d1f1e }
html[data-theme="dark"] .m-ico.c-org, html[data-theme="dark"] .m-txt.c-org { color: #e9bb6d; border-color: #5e4a2b; background: #2b2418 }
html[data-theme="dark"] .m-ico.c-teal, html[data-theme="dark"] .m-txt.c-teal { color: #7fd4d1; border-color: #2d5654; background: #182c2b }
html[data-theme="dark"] .m-ico.c-vio, html[data-theme="dark"] .m-txt.c-vio { color: #b3a6ec; border-color: #463d70; background: #241f36 }
/* 删除 / 作废 / 红冲：白底红字，与「打印」的浅红底区分，视觉更收敛 */
.m-ico.c-dgr, .m-txt.c-dgr { color: #c0392b; border-color: #e8c6c0; background: #fff }
.m-ico.c-dgr:not(:disabled):hover, .m-txt.c-dgr:hover { color: #b02a1d; border-color: #d9a79f; background: #fdeeee }
html[data-theme="dark"] .m-ico.c-dgr, html[data-theme="dark"] .m-txt.c-dgr { color: #e08a80; border-color: #5b3a38; background: #1e2a38 }
html[data-theme="dark"] .m-ico.c-dgr:not(:disabled):hover, html[data-theme="dark"] .m-txt.c-dgr:hover { color: #f0a79e; background: #3a2628 }
/* 新建 / 新增：与审核同一套浅色标准——白底、蓝字、蓝边，不用实心蓝底 */
.btn.btn-new { color: #3f86dd; border-color: #cfe2fb; background: #fff }
.btn.btn-new:hover { color: #2e74c9; border-color: #a9cdf5; background: #f4f9ff }
html[data-theme="dark"] .btn.btn-new { color: #86b9f4; border-color: #33506f; background: #1e2a38 }
html[data-theme="dark"] .btn.btn-new:hover { background: #26364a; border-color: #3d6b9e }

/* 不可用状态（已审核时的保存/审核、未审核时的反审）：保持同一套外观，只降透明度 */
.m-ico:disabled, .m-ico:disabled:hover { opacity: .38; cursor: not-allowed; background: #fff; border-color: #dbe4f2; color: #4a5a74 }
/* 关闭 × 与图标按钮同款：同尺寸、同边框、同悬停、同 6px 间距 */
.mh-btns > .x { margin-left: 0; width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #dbe4f2; border-radius: 8px; background: #fff; color: #4a5a74; font-size: 19px; line-height: 1; cursor: pointer; transition: background .15s, border-color .15s, color .15s }
.mh-btns > .x:hover { background: #f3f7fd; border-color: #b9cdea; color: #2456a6 }
html[data-theme="dark"] .m-ico { background: #1e2a38; border-color: #33465c; color: #b7c6d8 }
html[data-theme="dark"] .m-ico:hover { background: #26364a }
html[data-theme="dark"] .m-ico.primary { background: #2f62b5; border-color: #2f62b5; color: #fff }
html[data-theme="dark"] .m-ico:disabled, html[data-theme="dark"] .m-ico:disabled:hover { background: #1e2a38; border-color: #33465c; color: #6b7c92 }
html[data-theme="dark"] .mh-btns > .x { background: #1e2a38; border-color: #33465c; color: #b7c6d8 }
html[data-theme="dark"] .mh-btns > .x:hover { background: #26364a }
/* 弹窗标题栏的文字动作（历史版本 / 注销 / 编辑 / 审核 / 保存…）：与图标按钮同款有边框按钮，
   白底细边、圆角、悬停浅蓝；主按钮蓝底白字。不再是无边框的纯文字链接。 */
.m-txt { height: 30px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #dbe4f2; border-radius: 8px; background: #fff; color: #4a5a74; font-size: 13px; line-height: 1; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s, border-color .15s }
.m-txt:hover { background: #f3f7fd; border-color: #b9cdea; color: #2456a6 }
.m-txt.primary { background: #2456a6; border-color: #2456a6; color: #fff; font-weight: 600 }
.m-txt.primary:hover { background: #1d4789; border-color: #1d4789; color: #fff }
.m-txt.danger { color: #c0392b; border-color: #e8c6c0; background: #fff }
.m-txt.danger:hover { background: #fdeeee; border-color: #d9a79f; color: #b02a1d }
.m-txt:disabled, .m-txt:disabled:hover { background: #f7f9fc; border-color: #e6ecf5; color: #b6c0ce; cursor: not-allowed }
.m-txt.busy { opacity: .5; pointer-events: none }
html[data-theme="dark"] .m-txt { background: #1e2a38; border-color: #33465c; color: #b7c6d8 }
html[data-theme="dark"] .m-txt:hover { background: #26364a; border-color: #435970; color: #e6eefb }
html[data-theme="dark"] .m-txt:disabled, html[data-theme="dark"] .m-txt:disabled:hover { background: #1a2431; border-color: #2b3a4c; color: #63758b }
html[data-theme="dark"] .m-txt.primary { background: #2f62b5; border-color: #2f62b5; color: #fff }
/* 页头用 m-txt 做页签（品检入库等）：沿用弹窗右上角按钮的浅底描边，加图标与数字 */
.page-head .m-txt { font-weight: 600 }
.page-head .m-txt > svg { width: 15px; height: 15px; margin-right: 5px; flex: 0 0 auto }
.page-head .m-txt .tab-dot { margin-left: 6px; box-shadow: none }
.page-head .m-txt.primary .tab-dot { background: #fff; color: #2456a6 }
html[data-theme="dark"] .page-head .m-txt.primary .tab-dot { background: #0f1a26; color: #cfe0f7 }
html[data-theme="dark"] .m-txt.primary:hover { background: #3a72cc; border-color: #3a72cc }
html[data-theme="dark"] .m-txt.danger { background: #1e2a38; border-color: #5b3a38; color: #e08a80 }
html[data-theme="dark"] .m-txt.danger:hover { background: #3a2628; color: #f0a79e }
/* 整行可点：鼠标变手型（悬停底色沿用全站表格样式） */
tr[data-openrow] { cursor: pointer }
/* 尺码列与下方矩阵：表头、数值框一律垂直居中，两行尺码也居中 */
table.al-tbl.mp-sizes th, table.al-tbl.mp-sizes td,
table.al-tbl.mp-mx th, table.al-tbl.mp-mx td { vertical-align: middle }
table.al-tbl.mp-sizes th > *, table.al-tbl.mp-sizes td > *,
table.al-tbl.mp-mx th > *, table.al-tbl.mp-mx td > * { vertical-align: middle }
.mp-sizes th .ms-szdel { vertical-align: middle }
/* 模杯资料表头：款号 / 模头 / 尺码组 / 用途 / 技术员 一行五格 */
.al-head.mb-head { grid-template-columns: repeat(5, minmax(0, 1fr)) }
/* 尺码列表头：列名 + 删除列 */
.mp-sizes th .ms-szdel { margin-left: 4px; font-size: 12px; font-weight: 400; text-decoration: none }
.mp-sizes th .sz-h { white-space: nowrap }

.mb-custpick { position: fixed; z-index: 9999; max-height: 300px; overflow: auto; padding: 4px; background: #fff; border: 1px solid #d8e0ee; border-radius: 9px; box-shadow: 0 12px 30px rgba(18, 38, 66, .2) }
.mb-custpick button { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 6px; padding: 6px 9px; cursor: pointer; font: inherit }
.mb-custpick button:hover { background: #f1f6ff }
.mb-custpick b { font-size: 12.5px; color: #1d3a6b }
.mb-custpick span { font-size: 12.5px; color: #33415a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.mb-custpick i { grid-column: 2; font-size: 11px; font-style: normal; color: #8b95a6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.mb-custpick .none { padding: 8px 10px; font-size: 12px; color: #8b95a6 }
html[data-theme="dark"] .mb-custpick { background: #1d2738; border-color: #33415a }
html[data-theme="dark"] .mb-custpick b { color: #dbe6f7 }
html[data-theme="dark"] .mb-custpick span { color: #b9c7d8 }
html[data-theme="dark"] .mb-custpick button:hover { background: #25334a }
.pf-sel { width: 100%; height: 34px; padding: 5px 8px; font-size: 13px; line-height: 1.4; border: 1px solid #D6DED4; border-radius: 8px; background: #fff; color: inherit }
.pf-sel:focus { outline: none; border-color: #2456a6; box-shadow: 0 0 0 2px rgba(36, 86, 166, .12) }
html[data-theme="dark"] .pf-sel { background: #223143; border-color: #36475a }
/* 打印设置 · 尺码范围：起始码 — 结束码 */
.pf-szr { display: flex; align-items: center; gap: 10px }
.pf-szr .pf-sel { width: auto; flex: 0 0 150px }
.pf-szr-dash { color: #8b95a6 }

/* 模杯资料 · 英文版：左中文只读、右英文可改 */
.en-body { max-height: 70vh; overflow: auto }
.en-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; position: sticky; top: 0; z-index: 2; background: #fff; padding: 2px 0 8px }
.en-state { display: flex; align-items: center; gap: 8px; flex-wrap: wrap }
.en-tools { display: flex; gap: 6px; flex-wrap: wrap }
.en-tbl { width: 100%; table-layout: fixed }
.en-tbl th { font-size: 12px; text-align: left; color: #8b95a6; padding: 6px 8px; border-bottom: 1px solid #e6eaf1 }
.en-tbl td { padding: 4px 8px; border-bottom: 1px solid #f0f3f8; vertical-align: top; font-size: 13px; word-break: break-word }
.en-tbl tr.en-sec td { background: #f4f8ff; font-weight: 700; font-size: 12px; color: #2456a6; padding: 7px 8px }
.en-tbl .en-zh { color: #33415c }
.en-tbl .en-zh i { display: block; font-style: normal; font-size: 11px; color: #8b95a6; margin-top: 2px }
.en-tbl input, .en-tbl textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; padding: 5px 7px; border: 1px solid #D6DED4; border-radius: 6px; background: #fff; color: inherit }
.en-tbl textarea { resize: vertical; min-height: 34px }
.en-tbl input:focus, .en-tbl textarea:focus { outline: none; border-color: #2456a6; box-shadow: 0 0 0 2px rgba(36,86,166,.12) }
html[data-theme="dark"] .en-top { background: #1b2534 }
html[data-theme="dark"] .en-tbl tr.en-sec td { background: #223143; color: #8fb4ec }
html[data-theme="dark"] .en-tbl td { border-color: #2a3a4d }
html[data-theme="dark"] .en-tbl input, html[data-theme="dark"] .en-tbl textarea { background: #223143; border-color: #36475a }
/* 打印设置：只留「开始打印」，居中放，并与弹窗下边留出余地 */
.pf-body { padding-bottom: 6px }
.pf-actions { justify-content: center; align-items: center; margin: 16px 0 20px; padding: 0 18px }
.pf-actions .btn { min-height: 40px; padding: 0 34px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; line-height: 1.2 }


/* ---------- 模杯资料：矩阵表「项目」列 ---------- */
/* 项目名来自云表，最长 60 字符（英文测量说明）。项目列右侧让出「操作」栏，
   列宽由 300px 收到 200px，剩余文字靠悬停 title 看全。 */
.tbl-wrap .mp-it { width: 200px; min-width: 200px; max-width: 200px }
.tbl-wrap .mp-it input { width: 100%; min-width: 0 }

/* 项目行操作：填整列 / 删整列 */
table.al-tbl.mp-mx .mp-ops { width: 96px; min-width: 96px; text-align: left; white-space: nowrap }
table.al-tbl.mp-mx .mp-ops .act { font-size: 12px }
.mb-spec input[type="number"]::-webkit-outer-spin-button,
.mb-spec input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0 }
.mb-spec input[type="number"] { -moz-appearance: textfield; appearance: textfield }

/* ---------- 等码：尺码列第二行（同模位等价码） ---------- */
.mb-eq { font-size: 10px; color: #7c8aa0; font-weight: 400; letter-spacing: .2px; white-space: nowrap }
html[data-theme="dark"] .mb-eq { color: #8fa1bb }


/* ---------- 模杯资料 / 生产单：字段名与值对齐 ---------- */
.al-head.mb-head { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px 14px; margin-bottom: 12px }
.al-head.mb-head .al-hf { gap: 8px }
.al-head.mb-head .al-hf > label { flex: 0 0 62px; width: 62px; text-align: right; letter-spacing: 0; padding-top: 0 }
.al-head.mb-head .al-hf > input,
.al-head.mb-head .al-hf > select,
.al-head.mb-head .al-hf > .ssel { width: 100%; min-width: 0 }
.al-head.mb-head .al-hf.sp2 { grid-column: span 2 }
@media (max-width: 1280px) { .al-head.mb-head { grid-template-columns: repeat(3, minmax(0, 1fr)) } }
@media (max-width: 900px) {
  .al-head.mb-head { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .al-head.mb-head .al-hf.sp2 { grid-column: span 2 }
}
/* 生产单汇总条：标签与数值成对对齐 */
#mp-sum > div { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 6px; justify-content: start }
#mp-sum > div > span { color: #6b7688; white-space: nowrap }
#mp-sum > div > b { font-variant-numeric: tabular-nums }
#mp-sum > .mb-stale { grid-column: 1 / -1; color: #c0392b }
html[data-theme="dark"] #mp-sum > div > span { color: #9aa6b8 }
/* 明细里的数字统一右对齐、等宽 */
table.al-tbl.mp-mx input[type="number"],
#mp-lines input[type="number"] { text-align: right; font-variant-numeric: tabular-nums }
/* 模杯矩阵表：尺码表头与数字列居中，和下面的值对齐 */
table.al-tbl.mp-mx thead th:not(.mp-it) { text-align: center }
/* 模杯尺寸表：尺码表头跟下面的数值一起右对齐（数值框也靠右贴齐） */
table.al-tbl.mp-mx[data-kind="dim"] thead th:not(.mp-it) { text-align: right; padding-right: 7px }
table.al-tbl.mp-mx[data-kind="dim"] tbody td:not(.mp-it):not(:last-child) { text-align: right }
table.al-tbl.mp-sizes thead th { text-align: center }
table.al-tbl.mp-sizes tbody input { text-align: center }
html[data-theme="dark"] .al-head.mb-head .al-hf > label { color: #9aa6b8 }

/* ---------- 合金生产：物料 / 工单 / 委外 / 看板 ---------- */
.ap-tag { display:inline-block; padding:1px 8px; border-radius:10px; font-size:12px; line-height:17px; white-space:nowrap; color:var(--c); border:1px solid var(--c) }
.ap-bar { position:relative; display:inline-block; width:100%; height:15px; border-radius:8px; background:rgba(120,130,145,.18); overflow:hidden; vertical-align:middle }
.ap-bar i { position:absolute; left:0; top:0; bottom:0; background:#2f9e60; border-radius:8px; transition:width .3s }
.ap-bar em { position:relative; z-index:1; font-style:normal; font-size:11px; line-height:15px; padding-left:6px; color:#1c2333 }
.ap-form { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px 12px }
.ap-form label { display:flex; flex-direction:column; gap:4px; font-size:12.5px; color:#6b7488 }
.ap-form label.ap-wide { grid-column:1/-1 }
.ap-form input, .ap-form select, .ap-form textarea { width:100%; padding:6px 8px; border:1px solid #D6DED4; border-radius:6px; background:#fff; font-size:14px; color:inherit; font-family:inherit }
.ap-form textarea { resize:vertical }
.ap-od-head { display:flex; flex-wrap:wrap; gap:10px 26px; padding:10px 12px; background:#F4F8F2; border-radius:8px; margin-bottom:10px }
.ap-od-head>div { display:flex; flex-direction:column; gap:2px; font-size:12px; color:#6b7488 }
.ap-od-head b { font-size:15px; color:#1c2333 }
.ap-actions { display:flex; flex-wrap:wrap; gap:8px; margin: 0 -18px 8px; padding: 8px 18px; position: sticky; top: var(--mh-h, 53px); z-index: 5; background: #fff; border-bottom: 1px solid #EEF1EE }
.ap-two { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-top:6px }
.ap-two b { display:block; margin-bottom:6px; font-size:14px }
.ap-kv { display:flex; flex-direction:column; gap:6px; background:#F4F8F2; border-radius:8px; padding:12px 14px }
.ap-kv>div { display:flex; align-items:baseline; gap:8px; font-size:13px; color:#6b7488 }
.ap-kv b { font-size:18px; color:#1c2333 }
.ap-hint { margin-top:8px; line-height:1.7 }
.warn-text { color:#c98016 }
@media (max-width: 900px) { .ap-form { grid-template-columns:repeat(2,minmax(0,1fr)) } .ap-two { grid-template-columns:1fr } }
html[data-theme="dark"] .ap-form input, html[data-theme="dark"] .ap-form select, html[data-theme="dark"] .ap-form textarea { background:#1c2531; border-color:#33425a; color:#dfe6f1 }
html[data-theme="dark"] .ap-od-head, html[data-theme="dark"] .ap-kv { background:#1e2a36 }
html[data-theme="dark"] .ap-od-head b, html[data-theme="dark"] .ap-kv b { color:#e6edf7 }
html[data-theme="dark"] .ap-bar em { color:#dfe6f1 }

/* 测试报告编辑弹窗：label 包字段时的标签与输入框排版 */
.m-body .fld > span { display: block; font-size: 13px; color: #5a6478; margin-bottom: 3px }
.m-body .fld > input, .m-body .fld > select, .m-body .fld > textarea { width: 100% }
.m-body .tr-it table.t { font-size: 13px }
.m-body .tr-it table.t th, .m-body .tr-it table.t td { padding: 3px 4px }

/* 测试申请单头：12 栅格，行1/行2 各 3 项、行3 4 项、备注整行 */
.tr-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px 10px }
.tr-grid > .c3 { grid-column: span 3 }
.tr-grid > .c4 { grid-column: span 4 }
.tr-grid > .c6 { grid-column: span 6 }
.tr-grid > .c12 { grid-column: span 12 }

/* 单头控件统一盒模型：同高同宽、同字号同边框，input / select / textarea 视觉一致 */
.m-body .tr-grid .fld > span { font-size: 12.5px; margin-bottom: 4px }
.m-body .tr-grid input,
.m-body .tr-grid select,
.m-body .tr-grid textarea {
  box-sizing: border-box; width: 100%; height: 32px; padding: 0 9px; margin: 0;
  border: 1px solid #D6DED4; border-radius: 5px; background: #fff;
  font-family: inherit; font-size: 13.5px; line-height: 30px; color: inherit }
.m-body .tr-grid select { padding-right: 6px }
.m-body .tr-grid textarea { height: auto; min-height: 52px; padding: 6px 9px; line-height: 1.55; resize: vertical }
.m-body .tr-grid input[readonly] { background: #f4f6f3; color: #4a5568; cursor: default }

/* 测试项目行内的输入框：同样统一高度，避免与单头一高一低 */
.m-body .tr-it input, .m-body .tr-it select {
  box-sizing: border-box; height: 28px; padding: 0 6px; margin: 0;
  border: 1px solid #D6DED4; border-radius: 4px; background: #fff;
  font-family: inherit; font-size: 13px; color: inherit }

html[data-theme="dark"] .m-body .tr-grid input,
html[data-theme="dark"] .m-body .tr-grid select,
html[data-theme="dark"] .m-body .tr-grid textarea,
html[data-theme="dark"] .m-body .tr-it input,
html[data-theme="dark"] .m-body .tr-it select { background: #151e28; border-color: #34414f; color: #e4ebf4 }
html[data-theme="dark"] .m-body .tr-grid input[readonly] { background: #1a2531; color: #a9b8c9 }

@media (max-width: 760px) {
  .tr-grid { grid-template-columns: repeat(4, 1fr) }
  .tr-grid > .c3, .tr-grid > .c4, .tr-grid > .c6 { grid-column: span 2 }
  .tr-grid > .c12 { grid-column: span 4 }
}

/* ---------- 模杯生产（车间执行） ---------- */
.mf-kpi { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 12px 0 6px }
.mf-kpi .k { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 14px; min-width: 0 }
.mf-kpi .k span { display: block; font-size: 12px; color: #8a93a6; margin-bottom: 4px; letter-spacing: .2px }
.mf-kpi .k b { font-size: 23px; font-weight: 700; color: #1c2333; letter-spacing: -.3px }
.mf-kpi .k em { display: block; font-style: normal; font-size: 11.5px; color: #98a2b3; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.mf-h3 { font-size: 14px; font-weight: 600; color: #33415c; margin: 18px 0 8px }
.mf-bars { display: flex; gap: 4px; align-items: center; flex-wrap: wrap }
.mf-bar { position: relative; flex: 1 1 46px; min-width: 40px; height: 16px; background: #eef2ec; border-radius: 4px; overflow: hidden; display: block }
.mf-bar i { display: block; height: 100%; background: #9fb6d8; border-radius: 4px }
.mf-bar.done i { background: #2f9e63 }
.mf-bar em { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 10px; color: #38445c; letter-spacing: .2px }
.mf-slim { display: inline-block; vertical-align: middle; width: 84px; height: 7px; background: #eef2ec; border-radius: 4px; overflow: hidden; margin-right: 6px }
.mf-slim i { display: block; height: 100%; background: #2f6bd6 }
.mf-in { border: 1px solid #d8e0ea; border-radius: 5px; padding: 3px 6px; font: inherit; font-size: 12.5px; text-align: right; background: #fff }
.mf-tabs { display: flex; gap: 6px; margin: 10px 0 8px }
.mf-tab { border: 1px solid #dbe3ee; background: #fff; color: #55627a; border-radius: 8px; padding: 6px 16px; font-size: 13.5px; cursor: pointer }
.mf-tab.on { background: #2456a6; border-color: #2456a6; color: #fff; font-weight: 600 }

/* 扫码报工（手机优先） */
.scan-wrap { max-width: 720px }
.scan-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 16px; margin-bottom: 12px }
.scan-card > label { display: block; font-size: 12px; color: #8a93a6; margin-bottom: 6px }
.scan-no { width: 100%; height: 54px; border: 2px solid #cfdcef; border-radius: 10px; padding: 0 14px; font-size: 20px; font-weight: 600; letter-spacing: 1px; background: #fbfdff; color: #16202f }
.scan-no:focus { outline: none; border-color: #2456a6; background: #fff }
.scan-wo { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e5ebf3; font-size: 14px }
.scan-wo .dim { margin-top: 3px }
.scan-hint { margin-top: 8px; font-size: 13px }
.scan-procs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px }
.scan-proc { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 82px; background: #fff; border: 2px solid #e2e8f0; border-radius: 12px; cursor: pointer; padding: 8px 4px; color: #26303f }
.scan-proc b { font-size: 16px; font-weight: 700 }
.scan-proc em { font-style: normal; font-size: 10.5px; color: #98a2b3; line-height: 1.3; text-align: center }
.scan-proc span { font-size: 11px; color: #2456a6; margin-top: 2px }
.scan-proc.on { border-color: #2456a6; background: #f3f7ff; box-shadow: 0 0 0 3px rgba(36, 86, 166, .10) }
.scan-qty { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px }
.scan-qty label > span, .scan-row label > span { display: block; font-size: 12px; color: #8a93a6; margin-bottom: 5px }
.qbox { display: flex; align-items: stretch; border: 1px solid #d8e0ea; border-radius: 10px; overflow: hidden; background: #fff }
.qbox button { width: 42px; border: 0; background: #f1f5f9; color: #33415c; font-size: 20px; cursor: pointer; line-height: 1 }
.qbox button:active { background: #e2e8f0 }
.qbox input { flex: 1; min-width: 0; border: 0; text-align: center; font-size: 22px; font-weight: 700; height: 52px; color: #16202f; background: #fff }
.qbox input:focus { outline: none; background: #fbfdff }
.scan-sum { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 12px 0; font-size: 13px; color: #55627a }
.scan-sum b { color: #1c2333 }
.scan-row { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; margin-bottom: 12px }
.scan-row select, .scan-row input { width: 100%; height: 40px; border: 1px solid #d8e0ea; border-radius: 8px; padding: 0 10px; font: inherit; font-size: 14px; background: #fff }
.scan-submit { width: 100%; height: 54px; font-size: 17px; font-weight: 700; border-radius: 10px }
@media (max-width: 760px) {
  .mf-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .scan-procs { grid-template-columns: repeat(2, 1fr) }
  .scan-qty { grid-template-columns: 1fr; }
  .scan-row { grid-template-columns: 1fr }
  .qbox input { height: 46px }
}
html[data-theme="dark"] .mf-kpi .k,
html[data-theme="dark"] .scan-card,
html[data-theme="dark"] .scan-proc,
html[data-theme="dark"] .mf-tab { background: #151e28; border-color: #2b3949; color: #dbe4ef }
html[data-theme="dark"] .scan-no,
html[data-theme="dark"] .qbox input,
html[data-theme="dark"] .qbox,
html[data-theme="dark"] .scan-row select,
html[data-theme="dark"] .scan-row input,
html[data-theme="dark"] .mf-in { background: #101923; border-color: #2b3949; color: #e4ebf4 }
html[data-theme="dark"] .mf-kpi .k b { color: #e4ebf4 }

/* ===== 模杯生产 · 排唛架 ===== */
.mk-params { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 14px }
.mk-params .fld { margin: 0 }
.mk-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px }
.mk-kpi > div { background: #f6f8fc; border: 1px solid #e3e8f0; border-radius: 10px; padding: 10px 13px }
.mk-kpi span { display: block; font-size: 11.5px; color: #8a93a6; margin-bottom: 3px; letter-spacing: .2px }
.mk-kpi b { display: block; font-size: 21px; font-weight: 700; color: #1d3a6b; line-height: 1.25; font-variant-numeric: tabular-nums }
.mk-kpi i { display: block; font-style: normal; font-size: 11px; color: #98a2b3; margin-top: 2px }
.mk-line { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; margin-bottom: 14px; align-items: start }
@media (max-width: 1000px) { .mk-line { grid-template-columns: 1fr } .mk-params { grid-template-columns: repeat(2, 1fr) } .mk-kpi { grid-template-columns: repeat(2, 1fr) } }
.mk-note-box { background: #f7f9fc; border-left: 3px solid #1d3a6b; border-radius: 0 8px 8px 0; padding: 10px 13px; font-size: 12.5px; line-height: 1.85; color: #39445a }
.mk-note-box > div + div { margin-top: 3px }
.mk-prev-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap }
.mk-legend { margin-left: auto; display: flex; gap: 12px; flex-wrap: wrap }
.mk-legend span { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: #5b6678 }
.mk-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block }
.mk-prev { max-height: 470px; overflow: auto; border: 1px solid #e3e8f0; border-radius: 8px; background: #fff; padding: 8px }
.mk-prev svg { display: block; margin: 0 auto }
.mk-tbl { font-size: 12.5px }
.mk-tbl td { vertical-align: top }
.mk-over { color: #b45309; font-weight: 700 }
.mk-sum td { background: #fafbfd; font-weight: 700; color: #1d3a6b }
html[data-theme="dark"] .mk-kpi > div { background: #1a2531; border-color: #2b3a4a }
html[data-theme="dark"] .mk-kpi b { color: #8fb4e8 }
html[data-theme="dark"] .mk-note-box { background: #18222d; color: #b9c6d6; border-left-color: #4a7bc8 }
html[data-theme="dark"] .mk-sum td { background: #1a2531; color: #8fb4e8 }
html[data-theme="dark"] .mk-prev-head b { color: #cfd8e6 }

/* ---------- PI 导入：单价与销售报价不一致的行 ---------- */
tr.q-bad > td { background: #fff1f0 }
tr.q-bad > td:first-child { box-shadow: inset 3px 0 0 #d93025 }
tr.q-bad:hover > td { background: #ffe7e5 }
.qbad-t { color: #c62828; font-weight: 700 }
.qbad-p { color: #a3271f; font-size: 11px; margin-top: 2px }
.qbad-d { font-size: 11px; margin-top: 2px }
.qbad-d .act b { color: #1a5fb4; text-decoration: underline; text-underline-offset: 2px }
.qbad-price { color: #c62828; font-weight: 700; background: #ffe3e0; padding: 1px 4px; border-radius: 3px }
.q-warnbar { margin: 0 0 10px; padding: 7px 10px; border: 1px solid #f0c9c4; background: #fff4f2; color: #a3271f; border-radius: 6px; font-size: 12.5px; line-height: 1.7 }
/* 单价 / 色号下方的行内预警：一句话 + 直达链接，11px 小字，不撑宽表格 */
.pi-warn { font-size: 11px; line-height: 1.5; margin-top: 2px; max-width: 172px; white-space: normal; word-break: break-word }
.pi-warn.bad { color: #c62828 }
.pi-warn.warn { color: #b06d00 }
.pi-warn .act { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer }
html[data-theme="dark"] .pi-warn.bad { color: #ff8a80 }
html[data-theme="dark"] .pi-warn.warn { color: #e0b25c }

/* 产品中心：工具条（全选/批量编辑/搜索/分页、添加尺码等）滚动时吸顶不动 */
.pc-bar, .pw-tools { position: sticky; top: 0; z-index: 7; background: #EDF2EC }
.pc-bar { padding: 8px 0; margin: -8px 0 2px }
.pw-tools { padding: 8px 0; margin: -8px 0 4px }
html[data-theme="dark"] .pc-bar, html[data-theme="dark"] .pw-tools { background: #111822 }
@media (max-width: 820px) {
  .pc-bar, .pw-tools { top: 50px }
}

/* 弹窗标题栏图标按钮：窄屏收紧尺寸与间距，避免一行放不下 */
@media (max-width: 820px) {
  .mh-btns { gap: 4px; margin-left: 6px }
  .m-ico, .mh-btns > .x, .m-head .x { width: 28px; height: 28px; border-radius: 7px }
  .m-ico svg { width: 16px; height: 16px }
  .m-txt { height: 28px; padding: 0 8px; border-radius: 7px; font-size: 12.5px }
}

/* ---------- 等码设置（产品中心 · 尺码页）：勾选成组，不用手打分隔符 ---------- */
.eq-sec { border: 1px solid #E1E7E1; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #FBFCFA }
.eq-sec-t { font-size: 13px; font-weight: 600; color: #4A5563; margin-bottom: 8px }
.eq-pool { display: flex; flex-wrap: wrap; gap: 6px; min-height: 36px; align-items: center }
.eq-chip { border: 1px solid #CBD5CF; background: #fff; color: #374151; border-radius: 16px; padding: 5px 13px; font-size: 13.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font-family: inherit; line-height: 1.3 }
.eq-chip:hover { border-color: #2456A6; color: #2456A6 }
.eq-chip.on { background: #2456A6; border-color: #2456A6; color: #fff }
.eq-chip.sm { padding: 2px 10px; font-size: 12.5px; border-radius: 12px; cursor: default }
.eq-chip.base { background: #FFF7E6; border-color: #E8BF72; color: #8A5A00; font-weight: 600 }
.eq-chip .eq-x { margin-left: 1px; color: #B4472F; text-decoration: none; font-size: 14px; line-height: 1 }
.eq-eqs { color: #9AA5A0; font-size: 12px; margin: 0 1px }
.eq-baserow { margin-top: 9px; font-size: 12.5px; color: #4A5563; display: flex; gap: 12px; align-items: center; flex-wrap: wrap }
.eq-bopt { display: inline-flex; align-items: center; gap: 3px; cursor: pointer; color: #374151 }
.eq-bopt input { width: 15px; height: 15px; margin: 0; accent-color: #2456A6 }
.eq-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 9px }
.eq-gcard { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 9px; border-radius: 8px; background: #fff; border: 1px solid #E7EBE6; margin-bottom: 6px }
.eq-gno { width: 20px; height: 20px; border-radius: 50%; background: #2456A6; color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; flex: none }
.eq-gmem { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap }
.eq-gbase { font-size: 12px; color: #7C8781; display: inline-flex; gap: 4px; align-items: center }
.eq-gbase select { padding: 2px 6px; font-size: 12px; border: 1px solid #CBD5CF; border-radius: 6px; background: #fff; font-family: inherit }
.eq-gcard .act.danger { margin-left: auto }
/* 尺码表里的等码标记 */
.sz-eq { font-size: 11px; border-radius: 8px; padding: 1px 6px; margin-left: 4px; background: #EFF2EE; color: #6B7770; white-space: nowrap }
.sz-eq.base { background: #FDF3DC; color: #8A5A00; font-weight: 600 }
html[data-theme="dark"] .eq-sec { background: #1A2129; border-color: #2B3644 }
html[data-theme="dark"] .eq-sec-t { color: #AEBACB }
html[data-theme="dark"] .eq-chip { background: #22303F; border-color: #3A4658; color: #C7D1E0 }
html[data-theme="dark"] .eq-chip.on { background: #2F6BD0; border-color: #2F6BD0; color: #fff }
html[data-theme="dark"] .eq-chip.base { background: #3A2F14; border-color: #8A6A1F; color: #F0C879 }
html[data-theme="dark"] .eq-baserow { color: #AEBACB }
html[data-theme="dark"] .eq-bopt { color: #C7D1E0 }
html[data-theme="dark"] .eq-gbase select { background: #22303F; border-color: #3A4658; color: #C7D1E0 }
html[data-theme="dark"] .eq-gcard { background: #1F2836; border-color: #2B3644 }
html[data-theme="dark"] .sz-eq { background: #253040; color: #93A3B8 }
html[data-theme="dark"] .sz-eq.base { background: #3A2F14; color: #F0C879 }

/* 打色记录 · 具体产品多选 */
.dip-cats { display: flex; gap: 6px; margin: 0 0 6px }
.dip-cats select { flex: 1 1 0; min-width: 0 }
.dip-picks { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; min-height: 4px }
.dip-chip { display: inline-flex; align-items: center; gap: 5px; background: #eef3fb; border: 1px solid #d7e2f4; color: #12325c; border-radius: 13px; padding: 2px 6px 2px 9px; font-size: 12.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.dip-chip a { color: #8a94a6; cursor: pointer; font-weight: 700; padding: 0 2px; line-height: 1 }
.dip-chip a:hover { color: #b3261e }
.dip-prod-list { display: none; max-height: 190px; overflow: auto; border: 1px solid #e5e9f0; border-radius: 8px; margin-top: 4px; background: #fff }
.dip-prod-list.on { display: block }
.dip-prod-opt { padding: 5px 9px; cursor: pointer; font-size: 12.8px }
.dip-prod-opt:hover { background: #f2f6fc }
.dip-prod-opt.on { color: #1d7a3e }
html[data-theme="dark"] .dip-chip { background: #22303F; border-color: #3A4658; color: #C7D1E0 }
html[data-theme="dark"] .dip-prod-list { background: #1F2836; border-color: #2B3644 }
html[data-theme="dark"] .dip-prod-opt:hover { background: #253040 }
.dip-his { display: flex; flex-direction: column; gap: 8px }
.dip-his-i { border: 1px solid #e6eaf1; border-radius: 8px; padding: 9px 12px; background: #fbfcfe }
.dip-his-h { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 12.5px }
.dip-his-c { font-size: 12.8px; color: #26303f; line-height: 1.7; white-space: pre-wrap; word-break: break-word }
html[data-theme="dark"] .dip-his-i { background: #1F2836; border-color: #2B3644 }
html[data-theme="dark"] .dip-his-c { color: #C7D1E0 }

/* ---------- PI 明细弹窗：列宽百分比 + 允许折行，一屏内看完，不出现左右拉动 ---------- */
.pi-lines-tbl { table-layout: fixed; width: 100%; font-size: 12.5px }
.pi-lines-tbl th, .pi-lines-tbl td { white-space: normal; word-break: break-word; padding: 7px 8px; vertical-align: top }
.pi-lines-tbl th { font-size: 12px; color: #5b6b82 }
.pi-lines-tbl .pi-sub { font-size: 11px; line-height: 1.45; margin-top: 2px }
.pi-lines-tbl .pi-ops { display: inline-flex; gap: 8px; white-space: nowrap; align-items: center }
/* 拖动排序：左侧手柄 + 拖动中的行/落点提示 */
.pi-lines-tbl .pi-grip { width: 28px; padding-left: 4px; padding-right: 2px; text-align: center; vertical-align: middle }
.pi-lines-tbl .pi-grip-h { display: inline-block; cursor: grab; color: #b3bdcc; font-size: 16px; line-height: 1; letter-spacing: -3px; user-select: none; padding: 4px 2px }
.pi-lines-tbl .pi-grip-h:hover { color: #1d3a6b }
.pi-lines-tbl .pi-grip-h:active { cursor: grabbing }
.pi-lines-tbl tr.dragging { opacity: .45 }
.pi-lines-tbl tr.drag-over-top td { box-shadow: inset 0 2px 0 #1d3a6b }
.pi-lines-tbl tr.drag-over-bottom td { box-shadow: inset 0 -2px 0 #1d3a6b }
/* 复制明细：红色提醒条 */
.pi-copy-warn { background: #fdecea; border: 1px solid #f3c0ba; color: #c0392b; border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; font-weight: 600; line-height: 1.6 }
html[data-theme="dark"] .pi-copy-warn { background: #3a1f1d; border-color: #6d3a35; color: #ff9c93 }

/* 表格单元格内单行省略（超宽时用 … 截断，悬停 title 看全文） */
.cell-clip { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle }

/* 新增采购分配：供应商下方当前报价摘要（报价单 / 编制日期 / 有效期至 / 单价） */
.alloc-quote-hint { margin-top: 7px; font-size: 12px; line-height: 1.85; color: #3b4a60; background: #f6f9ff; border: 1px solid #e2eaf6; border-radius: 7px; padding: 6px 10px }
.alloc-quote-hint b { color: #17304f }
html[data-theme="dark"] .alloc-quote-hint { background: #1c2431; border-color: #2c3746; color: #c7d3e3 }
html[data-theme="dark"] .alloc-quote-hint b { color: #e6eefb }
.alloc-quote-hint .aq-row { padding: 3px 0 }
.alloc-quote-hint .aq-row + .aq-row { border-top: 1px dashed #dde6f2; margin-top: 3px; padding-top: 5px }
.alloc-quote-hint .aq-l1 { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px }
.alloc-quote-hint .aq-l1 b { color: #17304f }
.alloc-quote-hint .aq-l2 { font-size: 11.5px; margin-top: 1px }
html[data-theme="dark"] .alloc-quote-hint .aq-l1 b { color: #e6eefb }
html[data-theme="dark"] .alloc-quote-hint .aq-row + .aq-row { border-top-color: #2c3746 }
/* 报价生效中：绿色圆形白勾，跟在价格后面，与第一行同排 */
.alloc-quote-hint .aq-l1 { flex-wrap: nowrap; white-space: nowrap }
.alloc-quote-hint .aq-ok { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: #1e9e57; color: #fff; font-size: 11px; font-weight: 700; line-height: 1 }

/* 采购单：关联 PI 改单 / 结束提醒（未下发生产时显示在单号后） */
.pi-warn{margin-left:6px;font-size:11px;font-weight:600;color:#c0392b}

/* 品检入库明细：到货数量超采购数预警 */
.qc-over{margin-top:2px;font-size:12px;font-weight:700;color:#d9342b;white-space:nowrap}
.qc-ord.over{background:#fdf3f2}
.qc-ord.over>:first-child{color:#d9342b;font-weight:700}
html[data-theme="dark"] .qc-over{color:#ff8b80}
html[data-theme="dark"] .qc-ord.over{background:#3b201d}

/* 弹窗底部确认条：贴在弹窗最下方，蓝底白字整条可点（品检入库等） */
.m-foot{position:sticky;bottom:0;z-index:6;display:flex;background:#2456a6;border-radius:0 0 12px 12px;box-shadow:0 -1px 0 #2456a6}
.m-foot .btn{flex:1 1 auto;border:0;border-radius:0 0 12px 12px;background:transparent;color:#fff;font-size:15px;font-weight:600;padding:13px 16px;letter-spacing:.5px}
.m-foot .btn:hover{background:#1e4890;color:#fff}
.m-foot .btn:disabled{opacity:.6;cursor:default}
html[data-theme="dark"] .m-foot{background:#2a5fb8;box-shadow:0 -1px 0 #2a5fb8}
html[data-theme="dark"] .m-foot .btn:hover{background:#25539f}
@media (max-width:760px){.m-foot,.m-foot .btn{border-radius:0}}

/* 品检入库：超收超过 3%，需采购经理确认 */
.qc-over.need{color:#c0281f}
.qc-approve{margin-top:10px;padding:9px 12px;border:1px solid #f0c6c1;border-left:3px solid #d9342b;background:#fdf4f3;border-radius:6px;font-size:13px;line-height:1.7;color:#8a2a22}
.qc-approve b{display:block;margin-bottom:2px}
html[data-theme="dark"] .qc-over.need{color:#ff8b80}
html[data-theme="dark"] .qc-approve{background:#3a211e;border-color:#6b3a34;border-left-color:#ff8b80;color:#ffb3aa}

/* 一次性动作：提交中的按钮（防连点）。禁用态由 onceHandler 自动加/去 */
.is-busy{opacity:.65;cursor:progress}
a.act.is-busy{pointer-events:none}

/* 装箱界面毛重输入框：去掉浏览器默认上下调节箭头（仅 .pk-nospin 生效，不影响其他数字框） */
.pk-nospin::-webkit-outer-spin-button,
.pk-nospin::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0 }
.pk-nospin{ -moz-appearance:textfield; appearance:textfield }

/* 装箱明细：一条明细一行 —— OLN/款号/色号/尺码 + 数量 + 毛重 + 净重 + 缸号 + 卷号
   行高固定 34px：右侧「待装 / 已装」按同样行高逐行渲染，才能与每个输入框水平对齐 */
.pk-item{margin:0;padding:0;height:34px;box-sizing:border-box;border-bottom:1px dashed #edf1f7;display:flex;align-items:center;overflow:hidden}
.pk-item:last-child{border-bottom:0}
.pk-head{display:flex;gap:6px;align-items:center;flex-wrap:nowrap;width:100%;min-width:0}
.pk-head .pk-lb{font-size:12.5px}
.pk-head .pk-ilb{flex:1 1 auto;min-width:90px;font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#3c4a5f}
.pk-head .pk-ibatch,.pk-head .pk-iroll,.pk-head .pk-iqty{height:26px;font-size:12px;padding:0 6px;flex:0 0 auto}
.pk-meta{font-size:11.5px}
.pk-w{display:inline-flex;align-items:center;gap:4px;font-size:11.5px;color:#7b8798;white-space:nowrap;flex:0 0 auto}
.pk-w input{height:26px;width:64px;padding:0 6px;font-size:12px}
/* 右侧「待装 / 已装」：每行与左侧 .pk-item 同高、水平居中 */
.pk-stat-row{height:34px;display:flex;align-items:center;justify-content:center;font-size:12px;white-space:nowrap;box-sizing:border-box;border-bottom:1px dashed transparent}
html[data-theme="dark"] .pk-item{border-bottom-color:#33415c}
html[data-theme="dark"] .pk-head .pk-ilb{color:#c3cddd}
html[data-theme="dark"] .pk-w{color:#9aa8bf}
.pk-grip{cursor:move;color:#a8b3c5;user-select:none;flex:0 0 auto;font-size:13px;line-height:1}
.pk-grip:hover{color:#2456a6}
/* 箱单分组行：同一 OrderLineNumber 的箱合成一组，组头拖 ⠿ 整组排序 */
tr.pk-group > td{background:#f3f7fd;border-top:1px solid #dde6f2;padding:5px 8px!important;font-size:12px;color:#3c4a5f;white-space:nowrap}
tr.pk-group > td b{font-size:12.5px;color:#2456a6;margin-right:6px}
tr.pk-group > td .pk-glabel{color:#54637a;margin-right:6px}
tr.pk-group > td .pk-grip{margin-right:6px}
tr.drag-over > td{background:#eaf2ff!important;box-shadow:inset 0 0 0 2px #2456a6}
.pk-item.drag-over{background:#eaf2ff;border-radius:6px;box-shadow:inset 0 0 0 2px #2456a6}
html[data-theme="dark"] tr.drag-over > td{background:#24395c!important}
html[data-theme="dark"] .pk-item.drag-over{background:#24395c}
html[data-theme="dark"] tr.pk-group > td{background:#22304a;border-top-color:#31415c;color:#c3cddd}
html[data-theme="dark"] tr.pk-group > td b{color:#8fb6ee}
html[data-theme="dark"] tr.pk-group > td .pk-glabel{color:#9aa8bf}
html[data-theme="dark"] .pk-grip{color:#7d8ba1}

/* 置灰的链接型操作（如装箱「＋ 加明细」在全部装完后） */
.act.disabled,.act[aria-disabled="true"]{color:#b6bfcc;cursor:not-allowed;pointer-events:none;text-decoration:none}
html[data-theme="dark"] .act.disabled,html[data-theme="dark"] .act[aria-disabled="true"]{color:#5d6b80}

/* 窄屏：参与人等 span 2 的单字段退回一列，避免撑出横向滚动 */
@media (max-width: 1040px) {
  .fgrid > .fld[style*="span 2"] { grid-column: span 1 !important }
}

/* ===== 审批中心：卡片列表（桌面多列 / 平板两列 / 手机单列） ===== */
.apr-group { margin-bottom: 18px }
.apr-gh { display: flex; align-items: center; gap: 8px; margin: 0 2px 9px; font-size: 14.5px; font-weight: 700; color: #1c2333 }
.apr-n { font-style: normal; font-size: 11.5px; font-weight: 700; color: #b4551f; background: #fdeee1; border-radius: 9px; padding: 1px 8px }
.apr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 10px }
.apr-item { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 11px 13px; background: #fff; border: 1px solid #E4EAE2; border-radius: 10px; box-shadow: 0 1px 2px rgba(20,40,80,.04); transition: border-color .15s, box-shadow .15s }
.apr-item:hover { border-color: #b9cdbb; box-shadow: 0 3px 10px rgba(20,40,80,.08) }
.apr-mi { flex: 1 1 auto; min-width: 0 }
.apr-l1 { display: flex; align-items: center; gap: 7px; min-width: 0 }
.apr-l1 .badge { flex: 0 0 auto }
.apr-no { font-size: 14px; font-weight: 700; color: #1b4a7a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.apr-who { margin-top: 3px; font-size: 12.5px; color: #6d7a8c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.apr-mr { flex: 0 0 auto; max-width: 46%; text-align: right }
.apr-amt { font-size: 13.5px; font-weight: 700; color: #1c2333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.apr-date { margin-top: 3px; font-size: 12px; color: #93a0b0; white-space: nowrap }
.apr-go { flex: 0 0 auto; font-size: 12.5px; font-weight: 600; color: #2f6fa8; white-space: nowrap }
@media (max-width: 960px) {
  .apr-list { grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); gap: 8px }
}
@media (max-width: 680px) {
  .apr-group { margin-bottom: 14px }
  .apr-gh { font-size: 14px; margin-bottom: 7px }
  .apr-list { grid-template-columns: 1fr; gap: 8px }
  .apr-item { padding: 12px; gap: 10px }
  .apr-mr { max-width: 40% }
  .apr-go { font-size: 12px }
}
html[data-theme="dark"] .apr-gh { color: #e6edf5 }
html[data-theme="dark"] .apr-item { background: #1c2634; border-color: #2b3747; box-shadow: none }
html[data-theme="dark"] .apr-item:hover { border-color: #3d5064 }
html[data-theme="dark"] .apr-no { color: #8fc0ec }
html[data-theme="dark"] .apr-who { color: #9aa9bb }
html[data-theme="dark"] .apr-amt { color: #e6edf5 }
html[data-theme="dark"] .apr-date { color: #7d8b9e }
html[data-theme="dark"] .apr-go { color: #7fb4e0 }

/* ===== 企微提醒弹窗：私聊 / 群机器人 分区 ===== */
.rs-sec { border: 1px solid #E4EAE2; border-radius: 10px; padding: 12px 14px; margin-bottom: 13px; background: #FAFCF9 }
.rs-sec-h { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: #1c2333; margin-bottom: 7px }
.rs-tag { font-size: 11px; font-weight: 600; color: #1d8a3c; background: #e3f6e8; border-radius: 8px; padding: 1px 7px }
.rs-tag.gray { color: #6d7a8c; background: #eef2ee }
.rs-tip { line-height: 1.7; margin-bottom: 10px }
.rs-sec .fld { margin-bottom: 8px }
html[data-theme="dark"] .rs-sec { background: #1a2430; border-color: #2b3747 }
html[data-theme="dark"] .rs-sec-h { color: #e6edf5 }
html[data-theme="dark"] .rs-tag { color: #7fd39a; background: #1d3a26 }
html[data-theme="dark"] .rs-tag.gray { color: #9aa9bb; background: #232e3c }
