/* ============================================================
 * 悦点进销存 Web 版 · 通用组件层（按钮 / 卡片 / 表格 / 徽章 / 表单 / 弹窗 / Toast / 标签页 …）
 * 各业务模块共用这些类，改组件样式只改这里
 * ============================================================ */
/* ================= 通用组件 ================= */
/* turn130e：按钮统一 34px 高（与搜索框同高）
   turn130j：white-space+flex:none —— 按钮文字永不换行/被挤压截断（微信支付弹窗「我已支付，刷新状态」曾贴边被裁）；
             容器放不下时由 .modal-foot/.page-tools 的 flex-wrap 负责换行
   turn130k-6：整套按钮统一质感（淡描边 + 极淡投影 + 按下回弹），语义色一眼可分：
               无修饰 = 次要操作 / primary = 主操作（品牌实底）/ danger = 危险操作（默认就是红色调） */
.btn { border: 1px solid #e5e6eb; background: #fff; color: var(--t2); border-radius: var(--radius-sm); padding: 0 14px; height: 34px; font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1; white-space: nowrap; flex: none; box-shadow: 0 1px 2px rgba(29, 33, 41, .04); }
.btn:hover { color: var(--brand); border-color: rgba(22, 119, 255, .5); background: rgba(22, 119, 255, .06); box-shadow: 0 2px 6px rgba(22, 119, 255, .12); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn:focus-visible { outline: 2px solid rgba(22, 119, 255, .35); outline-offset: 1px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; box-shadow: 0 2px 8px rgba(22, 119, 255, .24); }
.btn-primary:hover { color: #fff; background: var(--brand-deep); border-color: var(--brand-deep); box-shadow: 0 4px 12px rgba(22, 119, 255, .3); }
/* turn130k-37：收付款登记用「报表卡片金额的那个绿」（--ok）——付款/收款是资金动作，
   与蓝色「新增/审核」区分开，扫一眼就能在工具栏里找到 */
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; font-weight: 600; box-shadow: 0 2px 8px rgba(0, 180, 42, .24); }
.btn-ok:hover { color: #fff; background: #009a29; border-color: #009a29; box-shadow: 0 4px 12px rgba(0, 180, 42, .3); }
.btn-ok:focus-visible { outline-color: rgba(0, 180, 42, .35); }
.btn-ok:disabled:hover { color: #fff; background: var(--ok); border-color: var(--ok); }
.btn-danger { color: var(--danger); border-color: rgba(245, 63, 63, .35); background: rgba(245, 63, 63, .05); }
.btn-danger:hover { color: var(--danger); border-color: var(--danger); background: rgba(245, 63, 63, .1); box-shadow: 0 2px 6px rgba(245, 63, 63, .14); }
.btn-sm { padding: 0 10px; height: 28px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn:disabled:hover { color: var(--t2); border-color: #e5e6eb; background: #fff; box-shadow: none; }
.btn-primary:disabled:hover { color: #fff; background: var(--brand); border-color: var(--brand); }

/* ---------- 页面操作条（turn130k-6） ----------
   所有页面的按钮区统一用 .page-tools：淡底 + 描边 + 左侧品牌色短竖条，
   一眼看出这一带可以点。想改全站按钮区外观只改这一段。
   · 卡片头 / 弹窗里嵌套时自动降级为透明，避免「边框套边框」
   · 主操作按钮（新增类）加 .btn-add 会被推到右侧，与左侧筛选控件自然分成两组 */
.page-tools {
	display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
	padding: 10px 12px;
	background: linear-gradient(180deg, #f7f8fa 0%, #f2f3f5 100%);
	border: 1px solid var(--line);
	border-radius: 12px;
	box-shadow: var(--shadow-sm);
	position: relative;
}
.page-tools::before {
	content: ""; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 3px;
	border-radius: 3px; background: var(--brand); opacity: .55;
}
.card-head .page-tools, .modal-body .page-tools {
	gap: 8px; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none;
}
.card-head .page-tools::before, .modal-body .page-tools::before { display: none; }
/* 操作条里的输入控件保持白底，不被淡背景吃掉 */
.page-tools .row-input { background: #fff; }
.page-tools .hint { margin: 0; }
/* 主操作按钮（新增类）：与前面的筛选/工具按钮之间加一道竖分隔线，
   把「查」和「做」在视觉上分成两组；宽屏有剩余空间时同时靠右（margin-left:auto） */
.page-tools .btn-add { margin-left: auto; padding-left: 18px; position: relative; }
.page-tools .btn-add::before {
  content: ""; position: absolute; left: 2px; top: 7px; bottom: 7px; width: 1px;
  background: var(--line);
}
.page-tools .btn-add:first-child::before { display: none; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }

/* ---------- 20261111n：工具栏两行拆分 ----------
   「查询条件」占第一行（.page-tools 原条），「其它操作按钮」挪进紧随其后的 .bar-acts
   （第二行，紧贴下方列表）。由 core/utils.js 的 WB.splitTools 自动生成/维护：
   · 条件行被挪空时把灰条收起来（.tools-empty）
   · .page-head 后面跟着动作行时把间距收紧，两行视觉上成一组
   20261116d：与采购/销售管理（.pt-od）同口径 —— 查询行与操作行之间加一道实线分隔，
   上方距查询行 10px、下方距按钮 10px，线恰好垂直居中于两行之间 */
.bar-acts {
	display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
	margin: 0 0 12px; padding: 10px 2px 0;
	border-top: 1px solid var(--line);
}
.bar-acts .btn-add { margin-left: auto; }
.page-tools.tools-empty { display: none; }
.page-head:has(+ .bar-acts) { margin-bottom: 0; }
.page-head:has(+ .bar-acts) .page-tools { margin-bottom: 10px; }
.card-head:has(+ .bar-acts) { margin-bottom: 10px; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 16px; }
/* turn130e：统计卡去掉装饰圆斑与粗色条，只留一道 3px 淡色条 + 细描边 */
.stat-card { position: relative; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow-sm); overflow: hidden; }
.stat-card::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 3px 3px 0; }
.stat-card.blue::before { background: var(--brand); }
.stat-card.green::before { background: var(--ok); }
.stat-card.orange::before { background: #ff9a2e; }
.stat-card.purple::before { background: var(--purple); }
/* FR-09 周转率卡片新增青色（平均库存金额用，区别于期初/期末的蓝） */
.stat-card.cyan::before { background: #00b2b2; }
.stat-label { color: var(--t3); font-size: 12.5px; }
.stat-num { font-size: 24px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat-num .unit { font-size: 13px; color: var(--t3); font-weight: 400; margin-left: 4px; }

/* 20261112b：列表列多时不再把 12 列硬压进一屏（文字折行 / 右侧列看不见），
   改由卡片自身出现横向滚动条；纵向仍裁切保持圆角与原有行为不变。 */
.card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 16px; overflow-x: auto; overflow-y: hidden; }
/* 20261112b：原生滚动条在 Chromium/Edge 的 overlay 模式下淡到看不见，
   这里隐藏原生条、改由 js/core/card-scroll.js 画一条常驻可见的自绘滚动条，避免出现两条。 */
.card::-webkit-scrollbar { height: 0; }
.card-hscroll {
  position: sticky; left: 0; bottom: 0; z-index: 3;
  width: 100%; height: 8px; margin-top: 2px;
  background: #eef0f3; border-radius: 0 0 var(--radius) var(--radius);
  cursor: pointer; flex: none;
}
/* 20261116k：滚动条改灰色纤细（原蓝色 10px，用户口径：灰色、小一点） */
.card-hscroll i {
  display: block; height: 8px; min-width: 48px;
  background: #c9cdd4; border-radius: 6px;
  transition: background .15s;
}
.card-hscroll:hover i, .card-hscroll i:active { background: #b0b6bf; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; gap: 10px; }
.card-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
/* 卡片标题右侧的辅助口径文案（如「最近 20 / 共 137 条」） */
.card-sub { font-size: 12.5px; color: var(--t3); }
.card-title::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--brand); }
.card-body { padding: 16px 18px; }

/* turn130e：表头更轻（无重底）、行高更舒展、分隔线更淡 */
/* 20261112b：max-content 让每列按内容排布；min-width:100% 保证列少时仍铺满卡片 */
.tbl { width: max-content; min-width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; padding: 10px 14px; background: #f7f8fa; color: var(--t3); font-weight: 500; font-size: 12.5px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); color: var(--t1); vertical-align: middle; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: #f2f3f5; }
/* turn130k-56：列表行选中态（新增 / 编辑保存后定位到该条）——左侧品牌蓝竖条 + 浅蓝底；
   必须写在 :hover 之后，否则鼠标划过选中行时会被 hover 灰底盖掉 */
.tbl tbody tr.sel { background: rgba(22, 119, 255, .1); box-shadow: inset 3px 0 0 var(--brand); }
.tbl tbody tr.sel:hover { background: rgba(22, 119, 255, .14); }
.tbl tbody tr.sel > td:first-child { font-weight: 600; }
.tbl tbody tr.detail-row:hover { background: #f7f8fa; }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .empty { text-align: center; color: var(--t3); padding: 44px 0; font-size: 12.5px; }
/* 20261113q：单元格省略截断（内联 max-width 限宽，此处补溢出行为）——
   客户维护等弹窗内嵌表格用，防止长文本把 width:max-content 的表格撑出横向滚动条 */
.tbl td.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.money { font-variant-numeric: tabular-nums; }
.money-in { color: var(--ok); font-weight: 600; }
.money-out { color: var(--danger); font-weight: 600; }
.link-act { color: var(--brand); cursor: pointer; font-size: 12.5px; }
.link-act:hover { text-decoration: underline; }
/* 单号列样式（进货/销售单据列表专属）在 css/pages/orders.css */

.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.b-ok { background: rgba(0, 180, 42, .1); color: var(--ok); }
.b-warn { background: rgba(255, 125, 0, .12); color: var(--warn); }
.b-danger { background: rgba(245, 63, 63, .1); color: var(--danger); }
.b-blue { background: rgba(22, 119, 255, .1); color: var(--brand); }
.b-purple { background: rgba(114, 46, 209, .1); color: var(--purple); }
/* 20261112q：财务（70）专属配色 —— 原先没配，落到 b-gray 看着像「未分配」 */
.b-teal { background: rgba(13, 166, 166, .1); color: #0da6a6; }
.b-gray { background: #f2f3f5; color: var(--t3); }

.bar-wrap { height: 5px; background: #f2f3f5; border-radius: 3px; overflow: hidden; margin-top: 5px; }
.bar-wrap i { display: block; height: 100%; border-radius: 3px; background: var(--brand); }
.bar-wrap i.full { background: var(--ok); }

.demo-tip { background: rgba(114, 46, 209, .06); border: 1px solid rgba(114, 46, 209, .18); color: var(--purple); font-size: 12.5px; border-radius: var(--radius-sm); padding: 9px 14px; margin-bottom: 14px; }

.search-box { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; height: 34px; background: #fff; width: 240px; }
.search-box input { border: 0; outline: 0; flex: 1; font-size: 13px; background: transparent; min-width: 0; }
.search-box svg { width: 15px; height: 15px; color: var(--t3); flex: none; }

/* ================= 表单 ================= */
.field label { font-size: 13px; color: var(--t2); margin-bottom: 6px; display: block; }
.field label .req { color: var(--danger); margin-left: 2px; }
/* 20261108：必填红星全局化——明细表格列头（th）里也用 <span class="req">*</span>，
   不在 .field label 作用域内，故补一条通用规则（class="req" 全站只用于必填星号） */
.req { color: var(--danger); margin-left: 2px; }
/* turn130k-15：补上 datetime-local / time 等类型——此前入库/出库登记弹窗的
   「入库时间」控件没命中任何宽度规则，只剩浏览器默认 163px，显得特别窄 */
.field input[type=text], .field input[type=number], .field input[type=date],
.field input[type=datetime-local], .field input[type=time], .field input[type=search],
.field input[type=email], .field input[type=tel], .field input[type=url],
.field select, .field textarea {
  width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 13px; font-size: 13.5px; color: var(--t1); background: #fff; outline: 0; transition: border .15s, box-shadow .15s, background .15s; font-family: inherit; box-sizing: border-box;
}
.field textarea { height: auto; padding: 9px 13px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #c9cdd4; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3.5px rgba(22, 119, 255, .12); }
/* turn130k-18：select 换掉系统原生外观（appearance:none），自绘品牌色箭头；
   此前 38px + 系统箭头在高分屏上显得又扁又旧，是「库存管理弹窗下拉太扁」的主因 */
.field select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 36px;
  background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2386909c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 13px center; }
.field select:hover { background-color: #f7f8fa; }
.field select:focus { background-color: #fff; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 16px; }
.form-grid .span2 { grid-column: span 2; }
/* turn130k-58：下拉 + 快捷新增按钮并排（对齐 App 端「+」直接建档再选中） */
.sel-row { display: flex; align-items: center; gap: 8px; }
.sel-row select { flex: 1; min-width: 0; }
.qa-btn { flex: none; width: 42px; height: 42px; border: 0; border-radius: 10px; background: var(--brand); color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .1s; }
.qa-btn:hover { background: var(--brand-deep, #0958d9); }
.qa-btn:active { transform: scale(.94); }
.form-item-inline { display: flex; gap: 8px; align-items: center; }
.hint { color: var(--t3); font-size: 12px; margin-top: 5px; }

/* turn130k-67：留痕信息只读行（turn130k-68 起只在「查看」弹窗展示，编辑弹窗不展示） */
.trace-line { grid-column: span 2; margin-top: 2px; padding-top: 10px; border-top: 1px dashed var(--line, #e5e6eb);
  font-size: 12px; color: var(--t3); line-height: 1.7; }

/* ================= 只读查看弹窗（turn130k-68） =================
 * 所有业务表的「查看」入口共用：标签/值两列只读行 + 可选明细表 + 留痕行 */
.view-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.view-row { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f2f3f5; min-width: 0; }
.view-row:last-child { border-bottom: 0; }
.view-label { flex: none; font-size: 12.5px; color: var(--t3); }
.view-val { flex: 1; min-width: 0; font-size: 13.5px; color: var(--t1); text-align: right; word-break: break-all; }
.view-grid .span2 { grid-column: span 2; }

/* ================= 弹窗 ================= */
.modal-mask { position: fixed; inset: 0; z-index: 100; background: rgba(29, 33, 41, .45); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; animation: fadeIn .18s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { background: #fff; border-radius: 14px; width: 520px; max-width: 94vw; max-height: 88vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: popIn .22s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes popIn { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: none; } }
/* turn130k-57：点遮罩试图关闭时的轻抖提示（弹窗只能靠 × / 取消 关闭） */
@keyframes modalShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.modal.modal-shake { animation: modalShake .32s ease; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 15.5px; }
.modal-x { border: 0; background: transparent; font-size: 18px; color: var(--t3); cursor: pointer; width: 28px; height: 28px; border-radius: 6px; }
.modal-x:hover { background: #f2f3f5; color: var(--t1); }
.modal-body { padding: 18px 20px; overflow-x: auto; overflow-y: auto; }
.modal-foot { padding: 13px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.confirm-ico { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; margin: 0 auto 12px; background: rgba(22, 119, 255, .1); color: var(--brand); }

/* 盘点 / 明细行编辑 */
.row-input { width: 100%; height: 32px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; font-size: 13px; outline: 0; }
.row-input:focus { border-color: var(--brand); }
.mini-tbl td, .mini-tbl th { padding: 8px 10px; font-size: 12.5px; }

/* ================= Toast ================= */
.toast-wrap { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 9px; background: #fff; border-radius: 10px; box-shadow: var(--shadow-lg); padding: 11px 16px; font-size: 13.5px; min-width: 240px; max-width: 380px; animation: slideIn .25s cubic-bezier(.2, .9, .3, 1.15); border-left: 4px solid var(--brand); }
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warn); }
.toast .tico { width: 20px; height: 20px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; }
.toast.ok .tico { background: var(--ok); }
.toast.err .tico { background: var(--danger); }
.toast.warn .tico { background: var(--warn); }
.toast.out { animation: slideOut .25s forwards; }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes slideOut { to { opacity: 0; transform: translateX(30px); } }

/* 全局遮罩 */
.global-mask { position: fixed; inset: 0; z-index: 300; background: rgba(255, 255, 255, .45); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(22, 119, 255, .18); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.global-mask span { color: var(--t2); font-size: 13px; }

/* 20261117am：列表 / 统计数据加载动画遮罩（WB.showDataLoading 挂在 apiListRaw）
   只盖 .content 主内容区（JS 按 rect 定位），带淡入；文案复用 .global-mask span 的观感 */
.data-loading-mask {
  position: fixed; z-index: 260; pointer-events: all;
  background: rgba(255, 255, 255, .42);
  display: flex; align-items: center; justify-content: center;
  animation: dlFadeIn .15s ease;
}
.data-loading-mask .dl-box { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.data-loading-mask .dl-box .spinner { width: 34px; height: 34px; }
.data-loading-mask .dl-box span { color: var(--t2); font-size: 13px; }
@keyframes dlFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 标签页（turn130k-95：吸顶 —— 仓库管理 10 个标签的长页滚到下面也能直接切标签；
   top:-18px 抵消 .content 的 padding-top，贴合滚动口顶部不留缝；
   expenses/migrate 的 tabs 在 .card(overflow:hidden) 内吸顶不生效，无害回退静态） */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 12px; background: #fff; position: sticky; top: -18px; z-index: 8; border-radius: var(--radius) var(--radius) 0 0; }
.tab { padding: 12px 16px; cursor: pointer; color: var(--t2); font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; user-select: none; transition: color .15s; white-space: nowrap; flex: 0 0 auto; }
.tab:hover { color: var(--brand); }
.tab.active { color: var(--brand); font-weight: 600; border-bottom-color: var(--brand); }

/* 双栏布局 */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.cols .card { margin-bottom: 0; }
@media (max-width: 1100px) { .cols { grid-template-columns: 1fr; } }

/* 勾选组 */
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 18px; }
.perm-item { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--t2); cursor: pointer; padding: 8px 11px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); transition: all .15s; }
.perm-item:hover { border-color: var(--brand); }
.perm-item.on { border-color: var(--brand); background: rgba(22, 119, 255, .05); color: var(--brand); }
.perm-item input { accent-color: var(--brand); width: 15px; height: 15px; }

/* 展开明细 */
.items-detail { background: #f7f8fa; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 10px 14px; margin: 4px 0 8px; }
.items-detail table { border-collapse: collapse; font-size: 12.5px; width: auto; }
.items-detail th { background: transparent; border-bottom: 1px solid var(--line); padding: 4px 14px; color: var(--t3); }
.items-detail td { border: 0; padding: 4px 14px; }

/* 分页条（turn 99 服务端分页：商品 / 进货单 / 销售单 / 入出库标签共用） */
.pager { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; padding: 12px 2px 2px; }
.pager-info { font-size: 12.5px; color: var(--t3); margin-right: 8px; }
.pg-btn { min-width: 28px; height: 28px; padding: 0 8px; border: 1px solid var(--line); background: var(--card); border-radius: 6px; font-size: 12.5px; color: var(--t1); cursor: pointer; }
.pg-btn:hover:not(:disabled):not(.active) { border-color: var(--brand); color: var(--brand); }
.pg-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; cursor: default; }
.pg-btn:disabled { opacity: .38; cursor: default; }
.pg-dots { color: var(--t3); font-size: 12.5px; padding: 0 2px; }

/* ============================================================
 * turn130k-10：示例数据提示条 + 单位引导卡（新用户引导）
 * ------------------------------------------------------------
 * .demo-tip   列表上方黄条 —— 列表里是示例数据时出现（js/lib/demo-data.js 的 WB.demoTip 生成）
 * .org-guide  工作台顶部引导卡 —— 未绑定 / 未启用 / 即将到期三态（dashboard.js renderGuide）
 * 两处都由 JS 写入插槽，插槽为空时不占高度（:empty 隐藏）
 * ============================================================ */
.demo-slot:empty, .guide-slot:empty { display: none; }
.demo-tip { display: flex; align-items: center; gap: 9px; margin: 0 0 10px; padding: 9px 14px;
  border: 1px solid rgba(255, 125, 0, .26); border-radius: 10px;
  background: linear-gradient(90deg, rgba(255, 125, 0, .14), rgba(255, 125, 0, .05));
  color: #9a5a2c; font-size: 13px; line-height: 1.5; }
.demo-tip-ico { flex: none; width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 50%;
  background: var(--warn); color: #fff; font-size: 12px; font-weight: 700; font-style: normal; }

.org-guide { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; padding: 14px 18px;
  border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow-sm); }
.org-guide.unbound { border-left-color: var(--brand); }
.org-guide.expiring { border-left-color: var(--danger); }
/* FR-08：新用户开账引导卡（绿色，区别于绑定/到期提醒的警示色调） */
.org-guide.setup { border-left-color: var(--ok); }
.org-guide.setup .og-icon { background: var(--ok); }
.og-icon { flex: none; width: 26px; height: 26px; line-height: 26px; text-align: center; border-radius: 50%;
  background: var(--warn); color: #fff; font-weight: 700; font-size: 15px; font-style: normal; }
.org-guide.unbound .og-icon { background: var(--brand); }
.org-guide.expiring .og-icon { background: var(--danger); }
.og-text { flex: 1; min-width: 0; }
.og-title { font-size: 15px; font-weight: 600; color: var(--t1); }
.og-desc { margin-top: 3px; font-size: 13px; color: var(--t2); line-height: 1.55; }
.og-act { flex: none; }
@media (max-width: 900px) { .org-guide { flex-wrap: wrap; } .og-act { width: 100%; } .og-act .btn { width: 100%; } }

/* ==================== 订货商城分享弹窗（20261027） ==================== */
.ms-hero { padding: 12px 14px; border-radius: 10px; background: linear-gradient(135deg, #f0f6ff, #f7faff); border: 1px solid #d6e6ff; }
.ms-hero-title { font-size: 15px; font-weight: 700; color: #1677ff; }
.ms-hero-desc { margin-top: 6px; font-size: 12px; line-height: 1.7; color: var(--t2, #4e5969); }
.ms-main { display: flex; gap: 16px; margin-top: 14px; align-items: flex-start; }
.ms-qr { flex: none; width: 150px; height: 150px; padding: 8px; border: 1px solid var(--line, #e5e6eb); border-radius: 10px; background: #fff; }
.ms-qr svg { width: 100%; height: 100%; display: block; }
.ms-qr-fail { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 12px; color: var(--t3, #86909c); text-align: center; padding: 6px; }
.ms-right { flex: 1; min-width: 0; }
.ms-label { font-size: 12px; color: var(--t3, #86909c); margin-bottom: 4px; }
.ms-url { display: block; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; color: #1677ff; word-break: break-all; text-decoration: none; }
.ms-url:hover { text-decoration: underline; }
.ms-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ms-code-row { display: flex; align-items: center; gap: 8px; }
.ms-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 17px; font-weight: 700; letter-spacing: 1px; color: var(--t1, #1d2129); }
.ms-code.none { font-family: inherit; font-size: 13px; font-weight: 400; color: var(--t3, #86909c); letter-spacing: 0; }
.ms-tip { margin-top: 6px; font-size: 12px; color: var(--t3, #86909c); line-height: 1.6; }
.ms-steps { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line, #e5e6eb); }
.ms-step { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--t2, #4e5969); background: var(--bg2, #f7f8fa); border-radius: 999px; padding: 4px 10px; }
.ms-step b { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: #1677ff; color: #fff; font-size: 11px; font-weight: 600; }
.ms-note { margin-top: 10px; font-size: 12px; line-height: 1.7; color: var(--t3, #86909c); }

/* 20261107b 档案停用 / 注销：列表开关、状态徽标、删除拦截弹窗 */
.ag-switch { display: inline-flex; align-items: center; gap: 5px; margin-right: 8px; font-size: 12px; color: var(--t2, #4e5969); cursor: pointer; white-space: nowrap; }
.ag-switch input { width: 14px; height: 14px; margin: 0; accent-color: #1677ff; }
.ag-tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; line-height: 18px; }
.ag-tag.on { color: #00b42a; background: rgba(0, 180, 42, .08); }
.ag-tag.off { color: #86909c; background: rgba(134, 144, 156, .12); }
.ag-box { text-align: center; padding: 6px 4px 2px; }
.ag-ico { width: 42px; height: 42px; margin: 0 auto 10px; border-radius: 50%; background: #f53f3f; color: #fff; font-size: 26px; font-weight: 700; line-height: 42px; }
.ag-msg { font-size: 15px; font-weight: 600; color: #f53f3f; line-height: 1.7; }
.ag-detail { margin-top: 10px; padding: 8px 10px; border-radius: 6px; background: var(--bg2, #f7f8fa); font-size: 12px; color: var(--t2, #4e5969); line-height: 1.7; text-align: left; }
.ag-hint { margin-top: 12px; font-size: 12px; color: var(--t3, #86909c); line-height: 1.7; text-align: left; }

/* 20261112bb：图标小方钮（如开单表头「＋ 新增供应商/客户」）—— 省横向空间，悬停语义靠 title */
.btn.btn-icon { flex: none; width: 32px; padding: 0; text-align: center; font-weight: 700; font-size: 15px; line-height: 1; }

/* 20261114b：档案下拉左侧的输入检索框（旧样式，已被 20261116a 组合框取代，保留兼容） */
.sel-search-input { width: 92px; height: 32px; margin-right: 4px; padding: 0 8px;
  border: 1px solid var(--line, #e5e6eb); border-radius: 6px; background: var(--card, #fff);
  color: var(--t1, #1d2129); font-size: 13px; outline: 0; vertical-align: middle; box-sizing: border-box; }
.sel-search-input:focus { border-color: var(--brand, #1677ff); box-shadow: 0 0 0 2px rgba(22, 119, 255, .12); }
.sel-search-input::placeholder { color: var(--t3, #86909c); }
.sel-search-input:disabled { background: var(--bg, #f2f3f5); color: var(--t3, #86909c); }

/* ============================================================
 * 20261116a：档案下拉组合框（左输入 + 右侧下拉图标）
 * ------------------------------------------------------------
 * 用户口径：不要「输入框 + 下拉框」两个控件上下堆叠，要合并成一个：
 * 左边点一下是输入（打字检索），右边是下拉图标，点它才展开候选。
 * 原生 select 退到幕后（.sel-combo-native）继续当值载体。
 * 20261116b：全站统一为图3风格 —— 大圆角、无箭头区分隔线、
 * 箭头加深加粗（此前 32px 高 + 6px 圆角 + 细分隔线显得单薄）。
 * ============================================================ */
.sel-combo { position: relative; display: inline-flex; align-items: stretch; vertical-align: middle;
  width: 100%; height: 38px; border: 1px solid var(--line, #e5e6eb); border-radius: 10px;
  background: var(--card, #fff); box-sizing: border-box; overflow: hidden; }
.sel-combo:hover { border-color: #c9cdd4; }
.sel-combo.open { border-color: var(--brand, #1677ff); box-shadow: 0 0 0 2px rgba(22, 119, 255, .12); }
.sel-combo.disabled { background: var(--bg, #f2f3f5); }
.sel-combo-input { flex: 1 1 auto; min-width: 0; height: 100%; padding: 0 14px;
  border: 0; background: transparent; color: var(--t1, #1d2129); font-size: 13.5px;
  outline: 0; font-family: inherit; }
.sel-combo-input::placeholder { color: var(--t3, #86909c); }
.sel-combo-input:disabled { background: transparent; color: var(--t3, #86909c); }
/* 箭头区：无分隔线（与图3一致），箭头 14×9 / 描边 2.2 / 深灰 #4e5969 */
.sel-combo-arrow { flex: none; width: 40px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--t3, #86909c);
  background: var(--card, #fff) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5l5.5 5.5 5.5-5.5' fill='none' stroke='%234e5969' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
  box-sizing: border-box; }
.sel-combo-arrow:hover { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5l5.5 5.5 5.5-5.5' fill='none' stroke='%231677ff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.sel-combo-arrow.disabled { cursor: not-allowed; opacity: .55; }
/* 原生 select 退到幕后：保留 id/value/options/change，只是不再显示 */
select.sel-combo-native { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
/* 候选面板：挂 body（fixed），避免被表格 overflow 裁剪 */
.sel-combo-panel { position: fixed; z-index: 3000; max-height: 280px; overflow-y: auto;
  padding: 4px 0; background: var(--card, #fff); border: 1px solid var(--line, #e5e6eb);
  border-radius: 10px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.sel-combo-opt { padding: 8px 14px; font-size: 13.5px; color: var(--t1, #1d2129); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-combo-opt:hover { background: #f2f6ff; color: var(--brand, #1677ff); }
.sel-combo-opt.on { color: var(--brand, #1677ff); font-weight: 600; }
.sel-combo-empty { padding: 10px 12px; font-size: 12.5px; color: var(--t3, #86909c); text-align: center; }
/* 表单（.field）里的组合框跟 .field select 的高度口径一致 */
.field .sel-combo { height: 42px; border-radius: 10px; }
.field .sel-combo-input { padding: 0 13px; font-size: 13.5px; }
.field .sel-combo-arrow { width: 36px; background-position: right 13px center; }
/* 20261116d：⚠ 关键兜底 —— tight.css 第 2 节给 .field input[type=text] 设了
   width:auto / min-width:150~180px / field-sizing:content（specificity 0,2,1 高于
   .sel-combo-input 的 0,1,0），导致开单/编辑页组合框的输入框永远 ≥180px 撑破容器，
   右侧箭头被 .sel-combo { overflow:hidden } 整个裁掉（用户截图：供应商/采购员/入库仓库
   三个字段看不到下拉箭头）。组合框输入框宽度必须完全交给 flex 分配，全部 !important 压制。 */
.sel-combo .sel-combo-input { width: auto !important; min-width: 0 !important; max-width: none !important; field-sizing: fixed !important; }
.sel-combo .sel-combo-arrow { background-color: #fff; }
/* 20261116b：窄版（列表筛选下拉 ≤132px）—— 箭头区收窄到 28px、控件高度与 row-input 对齐 */
.sel-combo-sm { height: 34px; border-radius: 8px; }
/* 20261116d：筛选内容字体再小一档（12px）、左右内边距收紧（0 8px）——
   用户反馈筛选条件文字显示不全，缩小字号 + 让出内边距尽量保障显示完整 */
.sel-combo-sm .sel-combo-input { padding: 0 8px; font-size: 12px; }
.sel-combo-sm .sel-combo-arrow { width: 28px; }
/* 20261116d：查询条件行的日期/文本输入框与搜索框同步缩字号（仅筛选行，弹窗表单不受影响） */
.page-tools .row-input { font-size: 12.5px; }
.page-tools .search-box input { font-size: 12.5px; }
