:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --bg: #f1f5f9;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #000000;
  --text-2: #000000;
  --sidebar-bg: #1e293b;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
/* 手机浏览器禁用"字体自动放大"（font boosting）：此前无此声明，手机上表格 13.5px 被放大近两倍，
   固定列宽装不下 → 「净料/蔬菜/圆僖」等两字词一字一行竖排、整页字偏大（2026-11-09 用户手机实测） */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { font-family: "STKaiti", "华文楷体", "KaiTi", "楷体", "Microsoft YaHei", "PingFang SC", -apple-system, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; font-weight: 700; text-rendering: geometricPrecision; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
/* 全系统统一华文楷体：按钮/输入框/下拉/表格默认继承正文字体（个别等宽数字样式随后单独覆盖） */
button, input, select, textarea, table { font-family: inherit; }
input, select, textarea, button { font-weight: 700; }
.hidden { display: none !important; }
h2 { font-size: 16px; margin-bottom: 10px; }
h3 { font-size: 14px; margin-bottom: 8px; }

/* 登录 */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #1e293b 0%, #2563eb 100%); }
.login-card { background: var(--card); border-radius: 16px; padding: 40px; width: 380px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.login-logo { font-size: 48px; }
.login-card h1 { font-size: 22px; margin: 8px 0 4px; }
.login-sub { color: var(--text-2); margin-bottom: 24px; font-size: 13px; }
.login-card input { width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 12px; font-size: 14px; outline: none; }
.login-card input:focus { border-color: var(--primary); }
.login-error { color: var(--danger); font-size: 13px; margin-top: 10px; }
.login-hint { color: var(--text-2); font-size: 12px; margin-top: 16px; }

/* 布局 */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: var(--sidebar-bg); color: #cbd5e1; display: flex; flex-direction: column; position: fixed; top: 6px; bottom: 6px; left: 6px; border-radius: 12px; transition: width .18s ease; z-index: 80; /* 高于各表格 sticky 表头（z-index 1-20），收起/展开过渡时表头不会盖过侧栏 */ }
/* 整栏收起/展开（用户指令：默认固定展开；取消悬停展开；开关=侧栏底部绿点上方一枚蓝色圆点，收起后仍可见可点） */
.rail-dot { display: block; width: 9px; height: 9px; border-radius: 50%; background: #38bdf8; border: none; padding: 0; margin: 0 0 8px 1px; cursor: pointer; box-shadow: 0 0 0 3px rgba(56,189,248,.16); transition: box-shadow .15s, background .15s; }
.rail-dot:hover { background: #7dd3fc; box-shadow: 0 0 0 4px rgba(56,189,248,.3); }
body.rail .rail-dot { margin: 0 auto 8px; }
body.rail .sidebar { width: 64px; }
body.rail .main { margin-left: 76px; }
/* 收起态：标志缩小、只显一字胶囊 */
body.rail .sidebar-title { padding: 10px 0 8px; gap: 4px; border-bottom: none; }
body.rail .brand-logo-main { width: 38px; height: 38px; }
body.rail .brand-name { display: none; }
body.rail .sidebar nav { margin-top: 8px; }
body.rail .sidebar nav a { width: 40px; margin: 5px auto; padding: 3px 0; letter-spacing: 0; text-indent: 0; font-size: 12px; }
body.rail .sidebar nav a .lbl { display: none; }
body.rail .sidebar nav a::after { content: attr(data-short); }
body.rail .sidebar nav a .caret { display: none; }
body.rail .nv-badges { display: none; }
body.rail .nav-sub { display: none !important; }
body.rail .sidebar-footer { padding: 8px 6px; }
body.rail .sidebar-footer .cloud-badge { justify-content: center; }
body.rail #cloud-badge-text, body.rail .user-info { display: none; }
.sidebar-title { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 22px 14px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.brand-logo-main { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: #fff; box-shadow: 0 3px 12px rgba(0, 0, 0, .35), 0 0 0 3px rgba(255, 255, 255, .12); }
.brand-name { font-size: 20px; font-weight: bold; color: #fff; letter-spacing: 2px; white-space: nowrap; }
/* AI 管理员：「机器人」固定在侧边栏标志右侧（用户指令：固定位置，不再拖动），公司logo作机器人的脸 */
.ai-fab { position: absolute; right: 4px; top: 30px; z-index: 75; width: 58px; height: 68px; padding: 0; border: none; background: transparent; cursor: pointer; display: flex; align-items: flex-end; justify-content: center; touch-action: none; user-select: none; transition: transform .15s; }
.ai-fab:hover { transform: scale(1.07); }
.ai-fab.dragging { transition: none; cursor: pointer; opacity: .92; }
/* 收起态：机器人缩小贴在细栏最顶部，logo 与「·」开关依次下移（互不遮挡，圆点保持可点） */
body.rail .ai-fab { right: auto; left: 50%; top: 4px; margin-left: -23px; transform: scale(.8); transform-origin: center top; }
body.rail .sidebar-title { padding-top: 64px; }
body.rail .brand-logo-main { width: 34px; height: 34px; }
.ai-fab-antenna { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 3px; height: 11px; background: #38bdf8; border-radius: 2px; }
.ai-fab-antenna::before { content: ''; position: absolute; top: -9px; left: 50%; transform: translateX(-50%); width: 9px; height: 9px; border-radius: 50%; background: #22d3ee; box-shadow: 0 0 7px 2px rgba(34,211,238,.55); animation: ai-fab-blink 2.2s ease-in-out infinite; }
@keyframes ai-fab-blink { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.ai-fab-head { position: relative; width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(160deg, #1e293b, #0f172a); border: 2px solid #38bdf8; box-shadow: 0 4px 14px rgba(15,23,42,.32), 0 0 10px rgba(56,189,248,.28); display: flex; align-items: flex-end; justify-content: center; }
.ai-fab-ear { position: absolute; top: 15px; width: 5px; height: 15px; border-radius: 3px; background: #38bdf8; }
.ai-fab-ear.l { left: -8px; }
.ai-fab-ear.r { right: -8px; }
.ai-fab-eye { position: absolute; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: #67e8f9; box-shadow: 0 0 5px rgba(103,232,249,.85); }
.ai-fab-eye.l { left: 12px; }
.ai-fab-eye.r { right: 12px; }
.ai-fab-logo { width: 27px; height: 27px; border-radius: 50%; object-fit: cover; pointer-events: none; margin-bottom: 8px; box-shadow: 0 0 0 2px rgba(56,189,248,.55); }
.ai-top-logo { width: 25px; height: 25px; border-radius: 50%; object-fit: cover; display: block; }
.sidebar nav { flex: 1; overflow-y: auto; overflow-x: hidden; /* 水平滚动条已取消（用户指令） */ scrollbar-gutter: stable; display: flex; flex-direction: column; --pill-w: 142px; margin-top: 28px; /* 离顶部一个胶囊高度（AI 固定胶囊已取消） */ }
.nav-sub { left: 0; }
/* 导航统一胶囊：所有条目同一宽度（= 6 个汉字 + 徽标位），悬停/选中蓝底白字
   高度压薄、上下留出间隙，避免一列胶囊贴在一起显得拥挤 */
.sidebar nav a {
  position: relative;
  display: block; text-align: center;
  box-sizing: border-box; width: var(--pill-w); max-width: calc(100% - 20px); min-width: 0;
  margin: 7px 10px; padding: 3px 12px; flex: none;
  /* 每个字之间均匀空开约 1/3 字宽；text-indent 抵消末字后多出的字距，视觉保持居中 */
  letter-spacing: .3em; text-indent: .3em;
  color: #cbd5e1; cursor: pointer; font-size: 13.5px; line-height: 1.25;
  border: 1px solid rgba(255,255,255,.13); border-radius: 999px;
  background: transparent; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.sidebar nav a.len2, .sidebar nav a.len3 { text-align: center; }
.sidebar nav a:hover { color: #fff; background: var(--primary); border-color: var(--primary); }
.sidebar nav a.active { color: #fff; background: var(--primary-dark); border-color: var(--primary-dark); box-shadow: 0 2px 8px rgba(37,99,235,.38); }
/* 数字徽标：绝对定位在胶囊最左端（不占正文宽度，所以所有胶囊文字起点一致） */
/* 徽标恢复常显（用户指令 2026-11-07）：有数=彩色、0=灰色，全部环节联动可见 */
.nv-badges { display: inline-flex; align-items: center; gap: 2px; flex: 0 0 auto; position: absolute; left: 5px; top: 50%; transform: translateY(-50%); }
.nv-badge {
  min-width: 15px; height: 15px; padding: 0 4px; border-radius: 7.5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; line-height: 1; letter-spacing: 0;
  background: rgba(255,255,255,.1); color: #94a3b8;
}
.nv-badge.zero { background: rgba(255,255,255,.09); color: #94a3b8; }
.nv-badge.warn { background: #d97706; color: #fff; }
.nv-badge.danger { background: #dc2626; color: #fff; }
.nv-badge.ok { background: #16a34a; color: #fff; }
.nv-badge.info { background: #2563eb; color: #fff; }
.sidebar nav a:hover .nv-badge, .sidebar nav a.active .nv-badge { box-shadow: 0 0 0 1.5px rgba(255,255,255,.6); }
.sidebar nav a:hover .nv-badge.zero, .sidebar nav a.active .nv-badge.zero { background: rgba(255,255,255,.22); color: #fff; }
.sidebar-footer { padding: 14px 18px; border-top: none; /* 下框分割线已取消（用户指令） */ }
.cloud-badge { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #94a3b8; margin-bottom: 10px; }
.cloud-badge .cloud-dot { width: 7px; height: 7px; border-radius: 50%; background: #64748b; flex: none; }
.cloud-badge.ok { color: #86efac; }
.cloud-badge.ok .cloud-dot { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.cloud-badge.warn { color: #fcd34d; }
.cloud-badge.warn .cloud-dot { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.18); }
.user-info { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; color: #e2e8f0; }
.role-badge { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--primary); color: #fff; }
.role-badge.warehouse { background: var(--primary); }
.role-badge.site { background: var(--success); }

/* 业务流程步骤 */
.flow-steps { display: flex; flex-direction: column; gap: 10px; }
.flow-step { display: flex; justify-content: space-between; align-items: center; background: #f8fafc; border-radius: 8px; padding: 10px 14px; font-size: 13px; }
.flow-step span { color: var(--text-2); }
.main { flex: 1; margin-left: 232px; padding: 12px 18px; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.page-head h2 { margin-bottom: 0; }

/* 卡片与统计 */
.card { background: var(--card); border-radius: 12px; padding: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 12px; }
.stat-card { background: var(--card); border-radius: 12px; padding: 12px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.stat-card .label { color: var(--text-2); font-size: 12.5px; margin-bottom: 4px; }
.stat-card .value { font-size: 20px; font-weight: bold; }
.stat-card .value.money-in { color: var(--success); }
.stat-card .value.money-out { color: var(--danger); }
.stat-card .value.warn { color: var(--warning); }
/* 仪表盘下方两块面板等宽：一行两个，与上方指标卡节奏一致 */
.dash-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; align-items: stretch; }
/* 倒计时卡：竖排占满整行 */
.dash-row .sla-bar { margin: 0 0 4px; }
.dash-row .sla-chip { width: 100%; justify-content: space-between; }
#sla-empty { margin: 4px 0 2px; }
@media (max-width: 900px) { .dash-row { grid-template-columns: 1fr; } }

/* 趋势图 */
.trend-chart { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 10px; }
.trend-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.trend-bar { width: 60%; max-width: 42px; background: var(--primary); border-radius: 6px 6px 0 0; min-height: 3px; transition: height .4s; }
.trend-bar.zero { background: var(--border); }
.trend-label { font-size: 12px; color: var(--text-2); }
.trend-value { font-size: 12px; color: var(--text); }

/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 3px 5px; text-align: center; border-bottom: 1px solid var(--border); white-space: nowrap; line-height: 1.25; vertical-align: middle; }
/* 表头：行高加大，列名自动换行，列宽更紧 */
th { color: #000; font-weight: 800; font-size: 13.5px; background: #f8fafc; white-space: normal; word-break: break-word; line-height: 1.2; padding: 6px 4px; vertical-align: middle; }
/* 品名 / 长文本单元格：自动换行，优先完整显示不被截断 */
td.cell-wrap, th.cell-wrap { white-space: normal; word-break: break-word; overflow-wrap: anywhere; min-width: 5em; max-width: 13em; }
tr:hover td { background: #f8fafc; }
.low-stock-tag { color: var(--danger); font-weight: bold; }
.empty-tip { text-align: center; color: var(--text-2); padding: 20px 0 !important; }

/* 按钮 */
.btn { border: none; border-radius: 8px; padding: 6px 13px; font-size: 14px; cursor: pointer; transition: .15s; }
/* 语音下单按钮：默认紫底，听写中红色提示 */
.btn-voice { background: #6366f1; color: #fff; }
.btn-voice:hover { background: #4f46e5; }
.btn-voice.voice-on, .btn-voice.voice-on:hover { background: #dc2626; color: #fff; animation: voice-pulse 1.2s infinite; }
@keyframes voice-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,.4); } 50% { box-shadow: 0 0 0 6px rgba(220,38,38,0); } }
/* 食材库搜索框旁的语音麦克风按钮 */
.mic-btn { flex: 0 0 auto; width: 42px; border: 1px solid var(--border); background: #fff; border-radius: 8px; font-size: 17px; cursor: pointer; }
.mic-btn:hover { border-color: var(--primary); background: #eff6ff; }
/* 全局语音输入麦克风：右下角悬浮，先点输入框再点它说话 */
.global-mic { position: fixed; right: 18px; bottom: 18px; z-index: 150; width: 54px; height: 54px; border-radius: 50%; border: none; background: #fff; cursor: pointer; box-shadow: 0 4px 14px rgba(15,23,42,.28); transition: .15s; touch-action: none; user-select: none; display: flex; align-items: center; justify-content: center; }
.global-mic svg { display: block; }
.global-mic.dragging { transition: none; cursor: grabbing; opacity: .92; }
.global-mic:hover { transform: scale(1.06); box-shadow: 0 6px 20px rgba(15,23,42,.38); }
.global-mic.on { background: #dc2626; animation: voice-pulse 1.2s infinite; }
.global-mic.on svg rect, .global-mic.on svg line { fill: #ffffff; stroke: #ffffff; }
.global-mic.on svg path { stroke: #ffffff; }
/* 食材库表头搜索框右侧的固定话筒（此页不显示右下角悬浮话筒） */
.inline-mic { flex: 0 0 auto; width: 46px; min-height: 40px; border-radius: 9px; border: 1.5px solid #cbd5e1; background: #fff; color: #333; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .15s; user-select: none; padding: 0; }
.inline-mic svg { display: block; }
.inline-mic:hover { border-color: var(--primary); background: #eff6ff; }
.inline-mic.on { background: #dc2626; border-color: #dc2626; color: #fff; animation: voice-pulse 1.2s infinite; }
@media print { .global-mic, .inline-mic { display: none; } }
/* 听写实时字幕气泡：话筒听写时贴屏幕下方居中显示，打印/正常态不出现 */
#mic-live { position: fixed; left: 50%; transform: translateX(-50%); bottom: 88px; z-index: 200; background: #dc2626; color: #fff; padding: 10px 18px; border-radius: 14px; font-size: 15px; font-weight: 700; max-width: 82vw; box-shadow: 0 6px 24px rgba(220,38,38,.4); pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
#mic-live .ml-txt { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#mic-live .ml-lv { font-size: 12.5px; font-weight: 600; letter-spacing: .5px; opacity: .95; line-height: 1.35; max-width: 100%; }
#mic-live.warn { background: #b45309; box-shadow: 0 6px 24px rgba(180,83,9,.45); }
#mic-live.warn .ml-lv { white-space: normal; font-size: 12.5px; }
@media print { #mic-live { display: none; } }
/* AI 管理员：侧边栏/顶栏标题行 logo 入口 + 顶部弹出对话面板 */
.ai-head-logo { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; vertical-align: -5px; margin-right: 6px; background: #fff; }
.ai-row { display: flex; align-items: flex-end; gap: 6px; max-width: 100%; }
.ai-avatar { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: #fff; border: 1px solid var(--border); }
.ai-panel { position: fixed; top: 58px; left: 10px; z-index: 160; display: flex; flex-direction: column; width: min(360px, calc(100vw - 20px)); height: min(520px, calc(100vh - 76px)); background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 32px rgba(15,23,42,.18); overflow: hidden; }
.ai-panel.hidden { display: none; }
.ai-head { flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: #0ea5e9; color: #fff; font-weight: 700; font-size: 14px; cursor: grab; user-select: none; touch-action: none; }
.ai-head.dragging { cursor: grabbing; }
.ai-head button { border: none; background: rgba(255,255,255,.25); color: #fff; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: 15px; line-height: 1; }
.ai-msgs { flex: 1 1 auto; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #f8fafc; }
.ai-msg { max-width: 85%; padding: 9px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.ai-msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--border); color: var(--text); }
.ai-msg.me { align-self: flex-end; background: #2563eb; color: #fff; }
.ai-chips { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--border); background: #fff; }
.ai-chips button { border: 1px solid #bfdbfe; background: #eff6ff; color: #1d4ed8; border-radius: 14px; padding: 5px 10px; font-size: 12px; cursor: pointer; }
.ai-chips button:hover { background: #dbeafe; }
.ai-input-row { flex: 0 0 auto; display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); background: #fff; }
.ai-input-row input { flex: 1; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; outline: none; }
.ai-input-row button { border: none; background: #0ea5e9; color: #fff; border-radius: 8px; padding: 0 16px; cursor: pointer; font-size: 14px; }
.ai-tip { flex: 0 0 auto; margin: 0; padding: 6px 12px 8px; font-size: 12px; color: var(--text-2); background: #fff; border-top: 1px dashed var(--border); }
@media print { .ai-panel, .ai-fab { display: none; } }
/* 我的申购·流程进度条：已过=浅蓝、当前=深蓝、驳回=红色、未到=灰 */
.osteps { display: flex; align-items: center; gap: 2px; margin-top: 4px; flex-wrap: wrap; }
.ostep { font-size: 12px; line-height: 1; padding: 3px 6px; border-radius: 9px; background: #f1f5f9; color: #94a3b8; white-space: nowrap; }
.ostep.done { background: #dbeafe; color: #1d4ed8; }
.ostep.cur { background: #2563eb; color: #fff; font-weight: 800; }
.ostep.cur.bad { background: #dc2626; }
.oarr { color: #cbd5e1; font-style: normal; font-size: 10px; }
/* 提交大按钮「未就绪」态：浅蓝=还没有填数量，提示不可递交；填了数量由 JS 去掉 idle 变深色高亮 */
.btn.idle, .btn.idle:hover { background: #eff6ff !important; color: #93c5fd !important; border: 1px solid #bfdbfe; box-shadow: none; }
/* 提交大按钮「已完成」态：表头同款浅底灰字，防止重复点击误操作 */
.btn.done, .btn.done:hover { background: #f8fafc !important; color: #94a3b8 !important; border: 1px solid #e2e8f0; box-shadow: none; }
.btn:hover { opacity: .88; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-ghost { background: transparent; color: inherit; border: 1px solid currentColor; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-xs { padding: 3px 8px; font-size: 13px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link-edit { background: #eff6ff; color: var(--primary); }
.link-del { background: #fef2f2; color: var(--danger); }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: var(--card); border-radius: 14px; width: 560px; max-width: 94vw; max-height: 88vh; display: flex; flex-direction: column; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-close { border: none; background: none; font-size: 16px; cursor: pointer; color: var(--text-2); }
.modal-body { padding: 20px; overflow-y: auto; }
.form-row { display: flex; gap: 10px; margin-bottom: 10px; }
.form-row > div { flex: 1; }
.form-row label, .modal-body label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 3px; }
.modal-body input, .modal-body select, .modal-body textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; outline: none; font-family: inherit;
}
.modal-body input:focus, .modal-body select:focus { border-color: var(--primary); }
/* 单选/复选框豁免文本框样式：保持原生圆钮大小，无内边距边框；选项行字号跟随弹窗正文 */
.modal-body input[type="radio"], .modal-body input[type="checkbox"] { width: auto; padding: 0; border: 0; margin: 0; }
.modal-body label:has(input[type="radio"]), .modal-body label:has(input[type="checkbox"]) { font-size: inherit; color: inherit; margin-bottom: 0; }
.modal-actions { margin-top: 18px; display: flex; justify-content: flex-end; gap: 10px; }
.order-item-row { display: flex; gap: 8px; margin-bottom: 10px; align-items: center; }
.order-item-row select { flex: 2; }
.order-item-row input { flex: 1; width: auto; }
.order-item-row .btn-xs { flex-shrink: 0; }
.order-total { text-align: right; font-size: 15px; font-weight: bold; margin: 12px 0 4px; }

/* 提示 */
.toast { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); background: #1e293b; color: #fff; padding: 11px 22px; border-radius: 10px; z-index: 200; font-size: 14px; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.toast.err { background: var(--danger); }
.toast.ok { background: var(--success); }

/* ============ 手机端适配 ============ */
.mobile-topbar { display: none; }

@media (max-width: 768px) {
  /* 顶栏 */
  .mobile-topbar {
    display: flex; align-items: center; gap: 12px;
    position: fixed; top: 0; left: 0; right: 0; height: 64px;
    background: var(--sidebar-bg); color: #fff; z-index: 50;
    padding: 0 14px; box-shadow: 0 2px 8px rgba(0,0,0,.15);
  }
  .mobile-topbar .topbar-title { font-size: 16px; font-weight: bold; flex: 1; white-space: nowrap; }
  .mobile-topbar .brand-logo { width: 34px; height: 34px; vertical-align: -11px; margin-right: 7px; }
  .hamburger { background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; padding: 6px 8px; }
  /* AI 面板：手机端从顶栏下方右侧弹出 */
  .ai-panel { top: 60px; left: auto; right: 8px; height: min(480px, calc(100vh - 76px)); }

  /* 侧边栏变抽屉 */
  .sidebar {
    width: 240px; z-index: 60; transform: translateX(-100%);
    transition: transform .25s ease;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 8px 0 30px rgba(0,0,0,.35); }
  .sidebar-mask { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 55; }
  .sidebar nav { --pill-w: 146px; }
  .sidebar nav a { padding: 4px 12px; font-size: 14px; }

  .main { margin-left: 0; padding: 66px 12px 20px; }
  h2 { font-size: 18px; }
  .page-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .page-head > div { display: flex; gap: 8px; }

  /* 统计卡片两列 */
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 12px 14px; }
  .stat-card .value { font-size: 18px; }

  /* 表格保持可横滑，字体略小 */
  .table-wrap { -webkit-overflow-scrolling: touch; }
  td, th { padding: 6px 6px; }

  /* 弹窗贴底全屏化 */
  .modal { width: 100%; max-width: 100vw; max-height: 92vh; border-radius: 14px 14px 0 0; }
  .modal-mask { align-items: flex-end; }
  .modal-body { padding: 16px; }

  /* 触控友好 */
  .btn { padding: 11px 18px; }
  .btn-xs { padding: 8px 12px; font-size: 13px; }
  .modal-body input, .modal-body select, .modal-body textarea { padding: 12px; font-size: 16px; }
  .order-item-row { flex-wrap: wrap; }
  .order-item-row select { flex-basis: 100%; }
  .order-item-row input { flex: 1; min-width: 80px; }

  .dash-row { grid-template-columns: 1fr; }
  .trend-chart { height: 130px; }
  .toast { width: max-content; max-width: 90vw; text-align: center; }
}

/* ---------- 智能搜索联想（商品/菜品选择） ---------- */
.smart-box { position: relative; }
.smart-input { width: 100%; }
.smart-drop {
  position: absolute; top: calc(100% + 2px); left: 0; right: auto; z-index: 300;
  width: 100%; box-sizing: border-box;
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .14); max-height: 320px; overflow-y: auto;
}
.smart-item {
  padding: 8px 12px; font-size: 13px; cursor: pointer; display: flex;
  justify-content: space-between; align-items: center; gap: 10px; color: var(--text);
}
.smart-item:hover, .smart-item.active { background: #eff6ff; }
.smart-item .smart-meta { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.smart-item.smart-empty { color: var(--text-2); cursor: default; }
.smart-item.smart-empty:hover { background: none; }
.smart-tip { padding: 6px 12px; font-size: 12px; color: var(--text-2); border-top: 1px solid var(--border); }
/* 操作记录表：窄容器内允许横向滚动（桌面同样适用，表宽 410 > 卡片时不再顶破右边框） */
#rl-logs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* 批检报告库 手机端适配（2026-11-09 用户反馈：搜索框与拖入报告/拖入图片框超出卡片右边框）
   实测越界元素：#rl-kw-wrap(装着 520px 搜索框不收缩)、.rl-up-left(4 个拖入槽 446px 不收缩)、
   .rl-up-right(图片栏 border-left+padding 溢出)。改为：搜索框可收缩、工作台左右栏手机上改上下堆叠 */
#rl-kw-wrap { flex: 0 0 auto; } /* 原写在 HTML 行内样式，媒体查询压不过，挪入样式表分档 */
@media (max-width: 768px) {
  #rl-kw-wrap { flex: 1 1 200px; min-width: 0; }
  #rl-kw-wrap { flex: 1 1 200px; min-width: 0; }
  .rl-up-cols { flex-direction: column; gap: 14px; }
  .rl-up-left, .rl-up-right { flex: 1 1 auto; width: 100%; }
  .rl-up-right { border-left: none; padding-left: 0; border-top: 1px dashed var(--border, #d8dce3); padding-top: 12px; }
}
/* 手机端搜索联想候选：名称独占一行、编码/分类小字换到第二行。
   此前右侧 meta 设 white-space:nowrap 不收缩，窄屏把名称挤到两三个字宽，
   「净料*大白菜*去老叶」被折成 4 行竖排观感（2026-11-09 用户手机截图实证）；
   同一组件用于食材库/菜品库/下周预定表头三处搜索框，一并生效 */
@media (max-width: 768px) {
  .smart-item { flex-wrap: wrap; row-gap: 2px; }
  .smart-item .smart-meta { flex-basis: 100%; white-space: normal; line-height: 1.35; }
}

/* ---------- 延余品牌 ---------- */
.login-logo-img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto 10px; box-shadow: 0 4px 16px rgba(15, 23, 42, .12); }
.brand-logo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; vertical-align: -13px; margin-right: 9px; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
/* 品牌名修饰（用户指定）：「延余 · 延年有余」中间点黄色（全系统统一：登录页/手机顶栏/侧边栏）
   注意：不加文字描边——金黄色描边会把白色文字晕染发虚（用户反馈），文字保持纯白清晰 */
.brand-dot { color: #ffd700; }                       /* 深色背景（侧边栏/手机顶栏）：正黄 */
.login-card .brand-dot { color: #df9e00; }           /* 登录卡浅色背景：深黄保证可见 */
.order-item-row select.usage-sel { flex: 0 0 100px; }
@media (max-width: 760px) {
  .order-item-row select.usage-sel { flex: 0 0 auto; flex-basis: auto; min-width: 96px; }
}

/* 图片放大查看器 */
#img-viewer { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.72); align-items: center; justify-content: center; cursor: zoom-out; }
#img-viewer img { max-width: 88vw; max-height: 88vh; border-radius: 10px; box-shadow: 0 12px 48px rgba(0,0,0,.45); }

/* ===== 仪表盘 · 深色数据大屏 ===== */
#page-dashboard.dash-dark {
  --card: #0f2440; --border: #1e3a5f; --text: #dcebf7; --text-2: #7d97b4;
  --bg: #0b1b33; --warning: #f0a24c; --success: #35d0ba; --danger: #f08c8c;
  background: #0b1b33; border-radius: 16px; padding: 20px 22px;
}
#page-dashboard.dash-dark h2, #page-dashboard.dash-dark .card h3 { color: #dcebf7; }
#page-dashboard.dash-dark .card, #page-dashboard.dash-dark .stat-card { background: #0f2440; border: 1px solid #1e3a5f; box-shadow: none; }
#page-dashboard.dash-dark .stat-card { text-align: left; border-radius: 10px; padding: 12px 14px; }
/* 指标卡半圆仪表 */
#page-dashboard.dash-dark .stat-card .gauge { display: block; margin: 0 0 4px; }
#page-dashboard.dash-dark .stat-card .gauge text { font-family: inherit; letter-spacing: 0; }
#page-dashboard.dash-dark .stat-card .label { margin-bottom: 2px; }
#page-dashboard.dash-dark .stat-card .value { line-height: 1.2; }
#page-dashboard.dash-dark .icon-tile { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
#page-dashboard.dash-dark .icon-tile.t-teal { background: rgba(53,208,186,.14); }
#page-dashboard.dash-dark .icon-tile.t-blue { background: rgba(79,163,227,.14); }
#page-dashboard.dash-dark .icon-tile.t-amber { background: rgba(240,162,76,.14); }
#page-dashboard.dash-dark .icon-tile.t-red { background: rgba(240,140,140,.14); }
#page-dashboard.dash-dark .stat-card .value.blue { color: #4fa3e3; }
.dash-greet { margin-bottom: 16px; }
/* 退出登录跟在问候语后面（同一行右端） */
.dash-greet-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.dash-greet-row .dash-greet { margin-bottom: 0; }
.dash-greet-row .btn { flex: none; margin-top: 4px; }
#page-dashboard.dash-dark .dash-greet-row .btn { background: rgba(255,255,255,.06); border: 1px solid #1e3a5f; color: #7d97b4; }
#page-dashboard.dash-dark .dash-greet-row .btn:hover { color: #f08c8c; border-color: #f08c8c; background: rgba(240,140,140,.08); }
#page-dashboard.dash-dark .greet-title { font-size: 18px; font-weight: bold; color: #dcebf7; }
#page-dashboard.dash-dark .greet-sub { font-size: 13px; color: #7d97b4; margin-top: 4px; }
#page-dashboard.dash-dark .greet-sub b { color: #35d0ba; }
#page-dashboard.dash-dark .stat-card .label { color: #5b7a9e; font-size: 12px; }
#page-dashboard.dash-dark .stat-card .value { color: #35d0ba; letter-spacing: 1px; }
#page-dashboard.dash-dark .stat-card .value.money-in { color: #35d0ba; }
#page-dashboard.dash-dark .stat-card .value.money-out { color: #f08c8c; }
#page-dashboard.dash-dark .stat-card .value.warn { color: #f0a24c; }
#page-dashboard.dash-dark .flow-step { background: #0b1b33; border: 1px solid #1e3a5f; color: #dcebf7; }
#page-dashboard.dash-dark .flow-step span { color: #7d97b4; }
#page-dashboard.dash-dark th { background: #0b1b33; color: #7d97b4; }
#page-dashboard.dash-dark td { color: #dcebf7; }
#page-dashboard.dash-dark tr:hover td { background: #12294a; }
#page-dashboard.dash-dark input, #page-dashboard.dash-dark select {
  background: #0b1b33; border: 1px solid #1e3a5f; color: #dcebf7; border-radius: 8px; padding: 7px 10px; outline: none;
}
#page-dashboard.dash-dark .empty-tip { color: #7d97b4; }
#page-dashboard.dash-dark p { color: #dcebf7; }

/* 智能搜索框：高度约 3 倍，宽度由 JS 按「品名」列右边缘对齐（见 syncProdSearchWidth） */
#prod-kw {
  display: block; width: 100%; height: 69px;
  padding: 12px 16px; font-size: 15px; font-family: inherit; color: var(--text);
  background: #fff; border: 1px solid var(--border); border-radius: 10px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
#prod-kw::placeholder { color: var(--text-2); font-size: 13.5px; }
#prod-kw:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }

/* 全系统页面级搜索框统一（不分账户）：与食材库搜索框同款 —— 高 69px、15px 字号、圆角 10px
   覆盖：报告 / 总部台账 / 项目管理 / 员工 / 合同 / 证照 / 菜品 / 每日预定 / 价格模版 / 成本核算·菜式定价 / 已汇总 / 已导出 / 排班筛选 */
#rp-q, #hl-kw, #site-kw, #staff-kw, #ct-kw, #cert-kw, #dish-kw, #wb-kw, #pt-kw, #dp-q, #sp-filter, #ss-filter, .ws-q, #rl-kw {
  height: 69px; padding: 12px 16px; font-size: 15px; font-family: inherit; color: var(--text);
  border-radius: 10px; box-sizing: border-box;
}
#rp-q::placeholder, #hl-kw::placeholder, #site-kw::placeholder, #staff-kw::placeholder, #ct-kw::placeholder,
#cert-kw::placeholder, #dish-kw::placeholder, #wb-kw::placeholder, #pt-kw::placeholder, #dp-q::placeholder,
#sp-filter::placeholder, #ss-filter::placeholder, .ws-q::placeholder, #rl-kw::placeholder { color: var(--text-2); font-size: 13.5px; }

/* 食材表表头：列名横排在上（按列宽自动换行）、筛选控件在下，整列水平居中 */
#products-table th { vertical-align: middle; line-height: 1.2; padding: 6px 4px; }
#products-table td { padding: 2px 4px; font-size: 13.5px; }
#products-table .th-flex {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 5px; flex-wrap: nowrap; width: 100%;
}
/* 列名：横向书写、加粗放大，宽度跟随列宽自动折行，两行内垂直居中 */
#products-table .th-flex .th-cat-label {
  display: flex; align-items: center; justify-content: center;
  width: 100%; max-width: 100%; min-height: 34px;
  text-align: center; white-space: normal; word-break: break-word; overflow-wrap: anywhere;
  line-height: 1.2; font-size: 14px; font-weight: 800; letter-spacing: .5px; color: var(--text);
}
/* 兼容旧类名：一/二/三级列名同样横排 */
#products-table .th-flex .th-cat-label.vert {
  max-width: 100%; white-space: normal; writing-mode: horizontal-tb; text-orientation: mixed;
  line-height: 1.2; letter-spacing: .5px;
}
/* 列宽可拖拽：fixed 布局 + colgroup 定宽（宽度记忆在浏览器本地），拖表头右缘调整、松手生效 */
#products-table table { table-layout: fixed; }
#products-table td { overflow: hidden; }
#products-table .col-resizer { position: absolute; top: 0; right: 0; width: 8px; height: 100%; cursor: col-resize; z-index: 6; }
#products-table .col-resizer:hover { background: rgba(37,99,235,.28); }
#prod-col-guide { position: fixed; width: 2px; border-radius: 2px; background: #2563eb; z-index: 999; display: none; pointer-events: none; }
#prod-col-guide-tip { position: fixed; z-index: 1000; display: none; pointer-events: none; background: #1e293b; color: #fff; font-size: 12px; font-weight: 400; padding: 2px 7px; border-radius: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* 一级/二级/三级下拉收窄（窄列适配） */
#products-table th.th-cat.cat-lv .th-filter { width: 56px; min-width: 0; max-width: 56px; font-size: 12px; padding: 2px 2px; }
/* 默认供应商：显示供应商昵称（短），列与下拉均收窄（原列122px/下拉76px，收1/3） */
#products-table th.sup-th .th-cat-label { line-height: 1.15; }
#products-table th.sup-th .th-filter {
  width: 50px; min-width: 0; max-width: 50px;
  padding: 3px 4px; font-size: 12px; line-height: 1.35; cursor: pointer;
}
/* 箱装规格：数据自动换行 */
#products-table td.spec-cell {
  white-space: normal; word-break: break-all; overflow-wrap: anywhere;
  line-height: 1.25; font-size: 12px; padding: 3px 4px;
}
/* 一级/二级/三级数据格：文字竖排（与表头一致） */
#products-table td.cat-cell { vertical-align: middle; padding: 4px 2px; white-space: nowrap; }
#products-table td.cat-cell .vtext {
  display: inline-block; writing-mode: vertical-lr; text-orientation: upright;
  letter-spacing: 1px; line-height: 1.1; font-size: 12px; color: var(--text);
}
/* ===== 创建申购单表格：复用食材库同款风格（表头列名+内嵌筛选、窄分类列、竖排分类文字） ===== */
#oe-prod-list table { table-layout: fixed; }
#oe-prod-list th { vertical-align: middle; line-height: 1.2; padding: 6px 4px; font-weight: 800; font-size: 13px; }
#oe-prod-list td { padding: 4px 5px; font-size: 15px; overflow: hidden; }
/* 全表文字加粗（含表头、单元格与数量输入框） */
#oe-prod-list table { font-weight: 700; }
#oe-prod-list input[type="number"] { font-weight: 700; text-align: center; font-size: 14px; }
/* ===== 申购编辑器分页栏（吸底常驻：每页行数 + 总页数 + 翻页） ===== */
#oe-prod-list .oe-pager {
  position: sticky; bottom: 0; z-index: 4;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 8px 12px; margin-top: 2px;
  background: #fff; border-top: 1px solid var(--border);
  font-size: 13px; font-weight: 700;
}
.oe-pager .pg-info b { color: var(--primary); }
.oe-pager .pg-size { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.oe-pager .pg-size select { height: 30px; padding: 2px 4px; font-size: 12.5px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); font-weight: 700; }
.oe-pager .pg-btns { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.oe-pager .pg-btns button {
  min-width: 30px; height: 30px; padding: 0 8px; font-size: 14px; line-height: 1;
  border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); cursor: pointer;
}
.oe-pager .pg-btns button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.oe-pager .pg-btns button:disabled { opacity: .4; cursor: not-allowed; }
.oe-pager .pg-cur { font-size: 13px; padding: 0 4px; white-space: nowrap; }
#oe-prod-list .th-flex {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 5px; flex-wrap: nowrap; width: 100%;
}
#oe-prod-list .th-flex .th-cat-label {
  display: flex; align-items: center; justify-content: center;
  width: 100%; max-width: 100%; min-height: 30px;
  text-align: center; white-space: normal; word-break: break-word; overflow-wrap: anywhere;
  line-height: 1.2; font-size: 14px; font-weight: 800; letter-spacing: .5px; color: var(--text);
}
#oe-prod-list .th-filter {
  flex: 0 0 auto; display: block; margin: 0; height: 38px; box-sizing: border-box;
  padding: 2px 4px; font-size: 12px; line-height: 1.4; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; color: var(--text); text-align: left; cursor: pointer;
}
#oe-prod-list .th-filter:focus { outline: none; border-color: var(--primary); }
#oe-prod-list .th-filter optgroup { font-size: 10.5px; font-weight: 600; }
#oe-prod-list th.th-cat.cat-lv .th-filter { width: 46px; min-width: 0; max-width: 46px; font-size: 11px; padding: 2px 2px; }
#oe-prod-list th.oe-side-th .th-filter { width: 54px; min-width: 0; max-width: 54px; font-size: 11px; padding: 2px 2px; }
/* 编码/品名表头筛选输入框：列名下方堆叠，宽度随列自适应；高度与申购按钮同高 38px，方便输入与查看 */
#oe-prod-list .th-input {
  flex: 0 0 auto; display: block; width: 100%; min-width: 0; margin: 0; box-sizing: border-box;
  height: 38px; padding: 2px 6px; font-size: 12.5px; line-height: 1.4;
  border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); text-align: left;
}
#oe-prod-list .th-input::placeholder { color: var(--text-2); font-size: 11px; }
#oe-prod-list .th-input:focus { outline: none; border-color: var(--primary); }
#oe-prod-list th.txt-th .th-cat-label { min-height: 30px; }
/* 表头文字齐高：列名区统一最小高度，所有列的列名在同一水平线上 */
#products-table .th-flex .th-cat-label, #oe-prod-list .th-flex .th-cat-label { min-height: 30px; }
/* 编码/品名自动下拉面板：只向下展开 */
#th-combo-panel {
  position: fixed; z-index: 1300; min-width: 130px; background: #fff;
  border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 10px 30px rgba(15,23,42,.18);
  overflow: auto; padding: 4px; box-sizing: border-box;
}
#th-combo-panel .tcp-row { padding: 5px 8px; font-size: 12.5px; font-weight: 700; cursor: pointer; border-radius: 5px; white-space: nowrap; }
#th-combo-panel .tcp-row:hover { background: rgba(37,99,235,.08); color: var(--primary); }
#th-combo-panel .tcp-row.on { background: rgba(37,99,235,.12); color: var(--primary); font-weight: 800; }
#th-combo-panel .tcp-empty { padding: 6px 8px; font-size: 11.5px; color: var(--text-2); }
/* 老师/学生 勾选筛选按钮 + 面板 */
#oe-prod-list .th-fbtn {
  flex: 0 0 auto; font-size: 11px; line-height: 1.3; padding: 2px 5px; white-space: nowrap; height: 38px; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); cursor: pointer;
  max-width: 82px; overflow: hidden; text-overflow: ellipsis;
}
#oe-prod-list .th-fbtn:hover { border-color: var(--primary); }
#oe-prod-list .th-fbtn.active { border-color: var(--primary); color: var(--primary); background: rgba(37,99,235,.08); font-weight: 600; }
#oe-side-panel {
  position: fixed; z-index: 1200; width: 210px; max-height: 320px; overflow: auto;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15,23,42,.18); padding: 8px;
}
#oe-side-panel .fp-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; margin-bottom: 6px; padding: 0 2px; }
#oe-side-panel .fp-head button { border: none; background: none; color: var(--primary); font-size: 11px; cursor: pointer; padding: 2px 4px; }
#oe-side-panel .fp-row { display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 6px; cursor: pointer; font-size: 12px; }
#oe-side-panel .fp-row:hover { background: rgba(37,99,235,.06); }
#oe-side-panel .fp-row input { margin: 0; cursor: pointer; }
#oe-side-panel .fp-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#oe-side-panel .fp-cnt { flex: 0 0 auto; color: var(--text-2); font-size: 11px; }
#oe-side-panel .fp-tip { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--border); font-size: 10.5px; color: var(--text-2); line-height: 1.5; }
#oe-prod-list td.cat-cell { vertical-align: middle; padding: 4px 2px; white-space: nowrap; }
#oe-prod-list td.cat-cell .vtext {
  display: inline-block; writing-mode: vertical-lr; text-orientation: upright;
  letter-spacing: 1px; line-height: 1.1; font-size: 12px; color: var(--text);
}
#oe-prod-list td.spec-cell {
  white-space: normal; word-break: break-all; overflow-wrap: anywhere;
  line-height: 1.25; font-size: 12px; padding: 3px 4px;
}
/* 生产商数据格：可换行 */
#products-table td.maker-cell {
  white-space: normal; word-break: break-all; overflow-wrap: anywhere;
  line-height: 1.25; font-size: 12px; max-width: 84px; padding: 3px 4px;
}
#products-table .th-filter {
  flex: 0 0 auto; display: block; width: 3.6em; min-width: 3em; max-width: 4.2em; margin: 0;
  height: 38px; box-sizing: border-box;
  padding: 2px 4px; font-size: 12px; line-height: 1.4; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; color: var(--text); text-align: left; cursor: pointer;
}
#products-table .th-input {
  flex: 0 0 auto; display: block; width: 5.9em; min-width: 0; margin: 0;
  height: 38px; box-sizing: border-box;
  padding: 2px 5px; font-size: 12px; line-height: 1.4; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; color: var(--text); text-align: left;
}
/* 编码输入框加长：容纳 8 位编码更从容 */
#products-table .th-input[data-k="code"] { width: 96px; letter-spacing: .3px; }
/* 品名输入框：比编码略宽，便于看全名称 */
#products-table .th-input[data-k="name"] { width: 5.9em; }
#products-table .th-input::placeholder { color: var(--text-2); font-size: 11px; }
#products-table .th-filter:focus, #products-table .th-input:focus { outline: none; border-color: var(--primary); }
/* 下拉里的分组标题（一级·二级）字号略小，保证窄框内不被截断 */
#products-table .th-filter optgroup { font-size: 10.5px; font-weight: 600; }

/* ---- 行操作：红色圆点（用户指令：恢复点开菜单方案，操作入口=一枚红色圆点，平时像状态标记） ---- */
#products-table th.op-th { width: 20px; min-width: 20px; max-width: 20px; text-align: left; }
#products-table td.op-cell { white-space: nowrap; padding: 2px 0 2px 0; text-align: left; }
.op-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); border: none; padding: 0; margin-left: 1px; cursor: pointer; box-shadow: 0 0 0 2px rgba(37,99,235,.14); vertical-align: middle; transition: box-shadow .15s, background .15s, transform .15s; }
.op-dot:hover { background: var(--primary-dark, #1d4ed8); box-shadow: 0 0 0 4px rgba(37,99,235,.26); transform: scale(1.15); }
.op-dot-th { cursor: default; display: inline-block; margin-left: 1px; }
.op-dot-th:hover { background: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.14); transform: none; }
/* 编辑弹窗内：禁用/删除（左置）与 取消/保存（右置）分组 */
.modal-actions { flex-wrap: wrap; }
.modal-actions .ma-gap { flex: 1 1 auto; }
.modal-actions .btn-warn { color: #b45309; border-color: #fcd34d; background: #fffbeb; }
.modal-actions .btn-warn:hover { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.modal-actions .btn-danger { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
.modal-actions .btn-danger:hover { background: #fee2e2; border-color: #ef4444; color: #991b1b; }
.row-op-menu {
  position: fixed; z-index: 9999; min-width: 132px; padding: 4px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .16);
  display: flex; flex-direction: column; gap: 2px; animation: opMenuIn .12s ease-out;
}
@keyframes opMenuIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.row-op-menu .op-item {
  display: flex; align-items: center; gap: 7px; width: 100%;
  padding: 8px 10px; font-size: 13px; text-align: left; cursor: pointer;
  color: var(--text); background: transparent; border: 0; border-radius: 7px;
}
.row-op-menu .op-item:hover { background: #f1f5f9; }
.row-op-menu .op-item.warn:hover { background: #fff7ed; color: #b45309; }
.row-op-menu .op-item.danger { color: var(--danger); }
.row-op-menu .op-item.danger:hover { background: #fef2f2; }
.row-op-menu .op-ico { font-size: 13px; width: 16px; text-align: center; }
/* 已停用商品：整行淡化 + 标签 */
#products-table tr.row-disabled td { background: #fafafa; color: var(--text-2); }
#products-table tr.row-disabled td.cat-cell .vtext,
#products-table tr.row-disabled .maker-cell { color: var(--text-2); }
#products-table tr.row-disabled img { filter: grayscale(1); opacity: .65; }
#products-table .tag-disabled {
  display: inline-block; margin-left: 5px; padding: 0 5px; border-radius: 4px;
  font-size: 11px; line-height: 16px; vertical-align: middle;
  color: #b45309; background: #fff7ed; border: 1px solid #fed7aa; white-space: nowrap;
}

/* 侧边栏分组：主胶囊本身就是展开开关（同一宽度、同一胶囊外观，只多一个右端箭头） */
.nav-group { display: flex; flex-direction: column; }
.sidebar nav a.nav-group-head {
  cursor: pointer; user-select: none; padding-right: 22px;
  color: #cbd5e1; font-weight: 500;
}
.sidebar nav a.nav-group-head:hover { color: #fff; background: var(--primary); border-color: var(--primary); }
.sidebar nav a.nav-group-head .caret {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 9px; opacity: .65; transition: transform .18s;
}
.nav-group.open > .nav-group-head { color: #fff; background: rgba(37,99,235,.28); border-color: rgba(96,165,250,.55); }
.nav-group.open > .nav-group-head .caret { transform: translateY(-50%) rotate(180deg); opacity: .95; }
/* 收起状态但当前页面就在这个组里：左侧点一个蓝点，避免收起后找不到自己在哪 */
.nav-group.has-active:not(.open) > .nav-group-head { color: #e2e8f0; border-color: rgba(96,165,250,.45); }
.nav-group.has-active:not(.open) > .nav-group-head::before {
  content: ''; position: absolute; left: 12px; top: 50%; width: 6px; height: 6px;
  margin-top: -3px; border-radius: 50%; background: #60a5fa;
}
/* 二级：默认收起；展开后从主胶囊的一半位置（10px + 126/2 ≈ 74px）起排，形成半格阶梯缩进 */
.nav-sub { display: none; margin: 0 0 5px; position: relative; }
.nav-group.open > .nav-sub { display: block; }
.nav-sub::before { content: ''; position: absolute; left: 64px; top: 5px; bottom: 5px; width: 1px; background: rgba(255,255,255,.12); border-radius: 1px; }
.sidebar nav .nav-sub a {
  box-sizing: border-box; width: calc(var(--pill-w) - 16px) !important;
  margin: 7px 7px 7px 70px !important; padding: 3px 8px 3px 24px !important; font-size: 11.5px !important;
  text-align: left; letter-spacing: .06em; text-indent: 0;
}
/* 三级（理财中心 › 应收 / 应付 › 项目 / 供应商）：继续半格阶梯，宽度相应收窄，保证不顶到侧栏右缘 */
.nav-sub .nav-sub::before { left: 91px; }
.sidebar nav .nav-sub .nav-sub a {
  margin: 6px 7px 6px 95px !important; width: 88px !important;
  padding: 2px 6px 2px 16px !important; font-size: 11px !important;
}
.nav-sub .nav-group-head { margin: 4px 8px 4px 70px; padding: 4px 10px; font-size: 12px; width: calc(var(--pill-w) - 16px); }
/* 二级里再嵌套的可展开组（应收 / 应付）：与二级项同一缩进，右端箭头 */
.sidebar nav .nav-sub .nav-group > a.nav-group-head { position: relative; }
.sidebar nav .nav-sub .nav-group.open > a.nav-group-head { color: #fff; background: rgba(37,99,235,.28); border-color: rgba(96,165,250,.55); }
.sidebar nav .nav-sub .nav-group.has-active:not(.open) > a.nav-group-head::before {
  content: ''; position: absolute; left: 10px; top: 50%; width: 5px; height: 5px;
  margin-top: -2.5px; border-radius: 50%; background: #60a5fa;
}
/* 空态占位（暂无应付账款等） */
.sidebar nav a.nav-empty { opacity: .45; pointer-events: none; font-style: normal; }

/* ===== 申购单明细列：一行一个食材 ===== */
.it-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 0; font-size: 12.5px; text-align: left; }
/* 师/生分组小标题（项目申购看板等明细行用）：老师→学生→未分师生 */
.it-sec { font-size: 11px; font-weight: 700; color: #334155; margin: 3px 0 1px; }
.it-sec:first-child { margin-top: 0; }
.it-sec i { font-style: normal; font-weight: 400; color: #94a3b8; margin-left: 4px; }
.it-row + .it-row { border-top: 1px dashed var(--border); }
.it-n { flex: 1; min-width: 0; }
.it-r { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.it-q { color: var(--primary); font-weight: 700; }
.it-u { font-size: 10.5px; padding: 0 5px; border-radius: 7px; line-height: 16px; font-weight: 700; }
.u-teacher { background: #fef3c7; color: #92400e; }
.u-student { background: #dbeafe; color: #1e40af; }
.u-both { background: #ede9fe; color: #5b21b6; }
.it-note { font-size: 11px; color: var(--text-2); margin-bottom: 2px; }

/* ===== 项目周菜单 ===== */
.week-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.week-bar b { font-size: 14px; min-width: 210px; text-align: center; }
.week-bar .btn { padding: 5px 10px; }
.week-tip { color: var(--text-2); font-size: 12px; line-height: 1.7; margin-bottom: 10px; background: #f8fafc; border: 1px dashed var(--border); border-radius: 8px; padding: 8px 10px; }
.week-tip b.warn, b.warn { color: #dc2626; }
.week-grid { display: block; }
.week-day { border: 1px solid var(--border); border-radius: 10px; background: #fff; display: flex; flex-direction: column; min-height: 210px; overflow: hidden; }
.week-day.today { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
.week-day.past { background: #f8fafc; }
.week-day-head { padding: 6px 8px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 700; background: #f1f5f9; }
.week-day-head .d { color: var(--text-2); font-weight: 500; font-size: 11.5px; }
.week-day-body { flex: 1; padding: 6px; display: flex; flex-direction: column; gap: 5px; overflow-y: auto; max-height: 260px; }
.week-dish-row { display: flex; gap: 4px; align-items: center; }
.week-dish-row select { flex: 1; min-width: 0; font-size: 11.5px; padding: 3px 4px; }
.week-dish-row input { width: 46px; font-size: 11.5px; padding: 3px 4px; text-align: center; }
.week-dish-row .del { border: 0; background: none; color: var(--danger); cursor: pointer; font-size: 12px; padding: 0 2px; }
.week-day-foot { border-top: 1px dashed var(--border); padding: 6px; display: flex; gap: 4px; flex-wrap: wrap; }
.week-day-foot button { font-size: 11.5px; padding: 3px 7px; }
.week-day .empty-day { color: var(--text-2); font-size: 11.5px; text-align: center; padding: 10px 0; }
.week-day .po-status { font-size: 11px; color: var(--text-2); width: 100%; }
.week-day .po-status.ok { color: var(--success); }

/* 冻结表头：食材库 / 创建新订单 表格（表头固定，表体在容器内滚动） */
#oe-prod-list { max-height: calc(100vh - 215px); overflow: auto; }
/* 食材库框体高度由 JS 动态计算（UI.syncProdHeight）：贴到视口底部，分批条一并可见 */
#products-table { overflow: auto; }
#products-table thead th, #oe-prod-list thead th { position: sticky; top: 0; z-index: 3; box-shadow: 0 1px 0 var(--border); }
/* 食材库分批条（#prod-pager-fixed）：单行紧凑不换行，省出的高度让给表格框体向下延伸 */
#prod-pager-fixed { margin-top: 4px; }
#prod-pager-fixed .oe-pager {
  display: flex; align-items: center; gap: 10px; flex-wrap: nowrap;
  padding: 3px 12px;
  background: #fff; border-top: 1px solid var(--border);
  font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden;
}
#prod-pager-fixed .pg-info b { color: var(--primary); }
#prod-pager-fixed .pg-size { display: flex; align-items: center; gap: 4px; white-space: nowrap; flex: none; }
#prod-pager-fixed .pg-size select { height: 26px; padding: 1px 3px; font-size: 12.5px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); font-weight: 700; }
#prod-pager-fixed .pg-btns { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
#prod-pager-fixed .pg-btns button { min-width: 30px; height: 26px; padding: 0 8px; font-size: 13px; line-height: 1; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); cursor: pointer; }
#prod-pager-fixed .pg-btns button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
#prod-pager-fixed .pg-cur { font-size: 12.5px; padding: 0 2px; white-space: nowrap; }

/* ===== 项目点库存：今日出入库汇总卡 ===== */
.today-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.today-stats .tstat { flex: 1; min-width: 150px; background: var(--bg, #f6f8fb); border-radius: 10px; padding: 12px 16px; }
.today-stats .tstat-num { font-size: 26px; font-weight: 800; line-height: 1.2; }
.today-stats .tstat-label { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
/* ===== 库存可视化：近7天趋势柱状图 + 库存占比条 ===== */
.trend-legend { display: flex; align-items: center; gap: 18px; font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; }
.trend-legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.lg-in { background: var(--success); }
.lg-out { background: var(--warning); }
.trend-chart { display: flex; align-items: stretch; gap: 10px; height: 150px; padding: 0 6px; border-bottom: 2px solid var(--border); }
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.trend-bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 5px; width: 100%; }
.tbar { width: 24px; border-radius: 4px 4px 0 0; position: relative; transition: height .3s; }
.tbar.tin { background: var(--success); }
.tbar.tout { background: var(--warning); }
.tbar span { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 800; color: var(--text-2); white-space: nowrap; }
.trend-day { margin-top: 6px; font-size: 12px; color: var(--text-2); padding-bottom: 4px; white-space: nowrap; }
.trend-day.today { color: var(--primary); font-weight: 800; }
.qty-bar { position: relative; height: 18px; background: #eef2f7; border-radius: 9px; overflow: hidden; min-width: 80px; max-width: 320px; }
.qty-bar i { display: block; height: 100%; background: linear-gradient(90deg, #2563eb, #60a5fa); border-radius: 9px; }
.qty-bar.close-bar i { background: linear-gradient(90deg, #059669, #34d399); }
.qty-bar b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11.5px; color: var(--text); }

/* ===== 送达日期周历选择器（周一开始、周日结束） ===== */
.oe-cal {
  position: absolute; top: 100%; left: 0; z-index: 60; width: 280px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.14); padding: 10px; margin-top: 6px;
}
.oe-cal .cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.oe-cal .cal-head button { border: 1px solid var(--border); background: #fff; border-radius: 6px; width: 26px; height: 26px; cursor: pointer; line-height: 1; }
.oe-cal .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.oe-cal .cal-wd { font-size: 11px; color: var(--text-2); padding: 2px 0; }
.oe-cal .cal-day { padding: 6px 0; font-size: 12.5px; border-radius: 6px; cursor: pointer; }
.oe-cal .cal-day:hover { background: rgba(37,99,235,.1); }
.oe-cal .cal-day.disabled { color: #c4ccd8; cursor: not-allowed; }
.oe-cal .cal-day.selected { background: var(--primary); color: #fff; font-weight: 700; }
.oe-cal .cal-day.adv { background: #ecfdf5; color: #047857; font-weight: 600; }
.oe-cal .cal-day.adv:hover { background: #d1fae5; }
.oe-cal .cal-day.adv.selected { background: #047857; color: #fff; }
.oe-cal .cal-tip { margin-top: 8px; font-size: 11px; color: var(--text-2); line-height: 1.4; }

/* 续填草稿提示条：明确告诉用户「正在改同一张单」，避免重复新建 */
.oe-draft-hint {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 0 0 10px; padding: 9px 12px; border-radius: 8px;
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af;
  font-size: 13px; line-height: 1.5;
}
.oe-draft-hint.hidden { display: none; }
.oe-draft-hint b { color: #1d4ed8; }

/* ===== 创建申购单：表头卡片（申购日期/送达日期/备注 + 右侧横排按钮） ===== */
.oe-head-card .form-row { display: flex; gap: 14px; flex-wrap: wrap; }
/* 三个输入框宽度缩至原来约 2/3 */
.oe-head-card .form-row > div { flex: 0.66; min-width: 115px; }
.oe-head-card .form-row > div:nth-child(2) { flex: 0.8; }
.oe-head-card .form-row > div:nth-child(3) { flex: 0.66; }
/* 三个输入框统一为与右侧按钮同款方块：同圆角、同高度 38px */
.oe-head-card .form-row > div input {
  width: 100%; box-sizing: border-box; height: 38px; padding: 0 12px; margin: 0;
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
  font-size: 14px; color: var(--text); outline: none; transition: .15s;
}
.oe-head-card .form-row > div input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
#oe-order-time { background: var(--bg, #f6f8fb); color: var(--text-2); cursor: default; }
/* 送达日期的周历范围小字改为绝对定位，不占布局高度，保证四个框同一水平线 */
.oe-head-card .form-row > div:nth-child(2) { position: relative; padding-bottom: 0; }
#oe-week-range { position: absolute; left: 0; top: calc(100% + 4px); margin: 0; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.oe-head-card { padding-bottom: 34px; }
.oe-head-actions { display: flex; gap: 8px; align-items: flex-end; margin-left: auto; flex: 0 0 auto !important; min-width: 0 !important; }
.oe-head-actions .btn { white-space: nowrap; height: 38px; box-sizing: border-box; }

/* ===== 出入库三页统一版式（收货验收 / 领料出库 / 生产出库）===== */
.op-card { margin-bottom: 14px; }
.op-head { margin: 0 0 12px; }
/* 库存操作台：页面标题行 = 库存（站点） + 实时库存徽标 + 当前页签名 */
#page-site-stock h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
#page-site-stock h2 .ss-pane-title { font-size: 15px; font-weight: 800; color: var(--text); }
#page-site-stock h2 .live-stamp { margin-left: 0; }
.op-title { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 15px; font-weight: 800; color: var(--text); line-height: 1.3; }
.op-ico { font-size: 15px; line-height: 1; }
.op-hint { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--text-2); line-height: 1.55; }
.op-note { margin: 8px 0 0; font-size: 12.5px; font-weight: 700; color: var(--primary); line-height: 1.5; }
.op-note:empty { display: none; }
.op-note-danger { color: var(--danger); background: rgba(220, 38, 38, .08); border-left: 3px solid var(--danger); padding: 8px 12px; border-radius: 8px; }
.op-toolbar { background: var(--bg, #f6f8fb); border: 1px solid var(--border); border-radius: 10px; box-shadow: none; padding: 14px 14px 12px; margin-bottom: 12px; }
.op-toolbar .form-row { margin-bottom: 0; align-items: flex-end; gap: 12px; }
.op-toolbar .form-row > div.op-f-date { flex: 0 0 170px; width: 170px; }
.op-toolbar .form-row > div.op-f-note { flex: 0 0 240px; width: 240px; min-width: 0; position: static; padding-bottom: 0; }
.op-toolbar .form-row > div.op-f-sw { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; height: 38px; padding-bottom: 0; }
.op-toolbar .form-row > div.op-f-sw input { width: 16px; height: 16px; margin: 0; box-shadow: none; }
.op-toolbar .form-row > div.op-f-sw label { margin: 0; font-size: 13px; color: var(--text); cursor: pointer; white-space: nowrap; }
.op-toolbar .oe-head-actions { margin-left: 0; }
.op-summary { margin: 6px 0 0; font-size: 12.5px; font-weight: 700; color: var(--primary); line-height: 1.5; }
.op-summary:empty { display: none; }
.op-sub { margin-top: 14px; }
.op-sub .op-title { font-size: 14px; }
.op-sub .op-head { margin-bottom: 10px; }
#sk-date:disabled, #ll-date:disabled { background: var(--bg, #f6f8fb); color: var(--text-2); cursor: default; }
@media (max-width: 720px) {
  .op-toolbar .form-row > div.op-f-date { flex: 1 1 130px; width: auto; }
  .op-toolbar .form-row > div.op-f-note { flex: 1 1 100%; width: auto; }
  .op-toolbar .oe-head-actions { width: 100%; margin-left: 0; }
  .op-toolbar .oe-head-actions .btn { flex: 1; }
}

/* 库存页：总部角色选项目点 */
.stock-site-pick { display: flex; align-items: center; gap: 8px; margin: -6px 0 12px; font-size: 13px; color: var(--text-2); }
.stock-site-pick label { margin: 0; font-weight: 600; }
.stock-site-pick select {
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; color: var(--text); background: var(--card); outline: none; font-family: inherit;
}

/* 库存页 Tab（领料出库 / 生产出库，两页版式完全一致） */
.stock-tabs { display: flex; gap: 8px; margin: 0 0 12px; flex-wrap: wrap; }
.stock-tab {
  appearance: none; border: 1px solid var(--border); background: var(--card); color: var(--text-2);
  height: 40px; padding: 0 18px; border-radius: 10px 10px 0 0; border-bottom-color: transparent;
  font-size: 14px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s, color .15s, opacity .15s, filter .15s;
  /* 未进入的标签淡色显示（用户指令）：降透明度+降饱和，进入后实色高亮 */
  opacity: .45; filter: saturate(.55);
}
.stock-tab:hover { opacity: .8; filter: saturate(.85); }
.stock-tab.active { opacity: 1; filter: none; box-shadow: inset 0 -4px 0 rgba(255,255,255,.85); }
/* 表头标签配色：验收入库=绿底白字；两个出库=蓝底白字；成本分析=深灰底白字 */
.stock-tab[data-pane="rc"] { background: var(--success); border-color: #15803d; color: #fff; }
.stock-tab[data-pane="rc"]:hover { background: #15803d; color: #fff; }
.stock-tab[data-pane="ll"], .stock-tab[data-pane="sp"] { background: var(--primary); border-color: var(--primary-dark); color: #fff; }
.stock-tab[data-pane="ll"]:hover, .stock-tab[data-pane="sp"]:hover { background: var(--primary-dark); color: #fff; }
.stock-tab[data-pane="cost"] { background: #475569; border-color: #334155; color: #fff; }
.stock-tab[data-pane="cost"]:hover { background: #334155; color: #fff; }
/* 退库=绿底白字；损耗=红底白字 */
.stock-tab[data-pane="rt"] { background: var(--success); border-color: #15803d; color: #fff; }
.stock-tab[data-pane="rt"]:hover { background: #15803d; color: #fff; }
.stock-tab[data-pane="ls"] { background: #dc2626; border-color: #b91c1c; color: #fff; }
.stock-tab[data-pane="ls"]:hover { background: #b91c1c; color: #fff; }
.stock-pane.hidden { display: none; }
@media (max-width: 720px) {
  .stock-tab { flex: 1; justify-content: center; padding: 0 10px; }
}

/* ===== 领料出库表格：整表复用食材库版式（colgroup 定宽 / 表头列名+内嵌筛选 / 粘顶 / 行高列宽一致） ===== */
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) { max-height: calc(100vh - 300px); min-height: 320px; overflow: auto; padding: 0; }
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) table { width: 100%; table-layout: fixed; }
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) th {
  position: sticky; top: 0; z-index: 3; background: #f8fafc;
  vertical-align: middle; line-height: 1.2; padding: 9px 4px; box-shadow: 0 1px 0 var(--border);
}
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) td { padding: 2px 4px; font-size: 13.5px; overflow: hidden; }
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) .th-flex {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 5px; flex-wrap: nowrap; width: 100%;
  /* 表头齐高：标签 34 + 间距 5 + 筛选框 38，没有筛选框的列（如验收入库·老师/学生）也占同高，文字统一齐顶 */
  min-height: 77px;
}
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) .th-flex .th-cat-label {
  display: flex; align-items: center; justify-content: center;
  width: 100%; max-width: 100%; min-height: 34px;
  text-align: center; white-space: normal; word-break: break-word; overflow-wrap: anywhere;
  line-height: 1.2; font-size: 14px; font-weight: 800; letter-spacing: .5px; color: var(--text);
}
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) .col-resizer { position: absolute; top: 0; right: 0; width: 8px; height: 100%; cursor: col-resize; z-index: 6; }
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) .col-resizer:hover { background: rgba(37,99,235,.28); }
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) .th-filter {
  flex: 0 0 auto; display: block; width: 4.6em; min-width: 3.6em; max-width: 5.4em; margin: 0;
  height: 38px; box-sizing: border-box;
  padding: 2px 4px; font-size: 12px; line-height: 1.4; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; color: var(--text); text-align: left; cursor: pointer;
}
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) .th-input {
  flex: 0 0 auto; display: block; width: 5.9em; min-width: 0; margin: 0;
  height: 38px; box-sizing: border-box;
  padding: 2px 5px; font-size: 12px; line-height: 1.4; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; color: var(--text); text-align: left;
}
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) .th-input[data-k="code"] { width: 96px; letter-spacing: .3px; }
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) .th-input[data-k="name"] { width: 5.9em; }
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) .th-input::placeholder { color: var(--text-2); font-size: 11px; }
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) .th-filter:focus, :is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) .th-input:focus { outline: none; border-color: var(--primary); }
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) .th-filter optgroup { font-size: 10.5px; font-weight: 600; }
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) th.th-cat.cat-lv .th-filter { width: 54px; min-width: 0; max-width: 54px; font-size: 11px; padding: 2px 2px; }
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) td.cat-cell { vertical-align: middle; padding: 4px 2px; white-space: nowrap; }
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) td.cat-cell .vtext {
  display: inline-block; writing-mode: vertical-lr; text-orientation: upright;
  letter-spacing: 1px; line-height: 1.1; font-size: 12px; color: var(--text);
}
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) td.spec-cell {
  white-space: normal; word-break: break-all; overflow-wrap: anywhere;
  line-height: 1.25; font-size: 12px; padding: 3px 4px;
}
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) td.cell-wrap {
  white-space: normal; word-break: break-word; overflow-wrap: anywhere; max-width: 9em;
}
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) td.img-cell { padding: 1px 0; line-height: 1; }
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) .qty-input {
  width: 100%; height: 30px; box-sizing: border-box; text-align: center;
  font-size: 13px; font-weight: 700; padding: 2px 4px;
  border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text);
}
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) .qty-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
/* 验收入库数量由申购单自动带出（未手工修改）时高亮，便于与本单手填区分 */
:is(#rc-prod-list) .qty-input.is-auto {
  color: #1d4ed8; background: rgba(37,99,235,.06); border-color: rgba(37,99,235,.22);
}

/* 验收入库：表头副标（验收入库列的老师/学生区分）、申购数量只读列、验收结论下拉 */
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) .th-note {
  display: block; margin-top: 2px; font-size: 10px; font-weight: 600;
  color: var(--text-2); letter-spacing: .5px;
}
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) td.rc-dem {
  text-align: center; white-space: nowrap; font-weight: 700; font-size: 12.5px;
  color: #1d4ed8; background: rgba(37,99,235,.045); padding: 0 6px;
}
/* 申购数量框：按申购单自动带出的只读数量，无申购显示 0.0 */
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) td.rc-dem .rc-dem-input {
  width: 100%; height: 28px; box-sizing: border-box; text-align: center;
  background: rgba(37,99,235,.07); border: 1px solid rgba(37,99,235,.22);
  border-radius: 6px; color: #1d4ed8; font-weight: 700; font-size: 12.5px;
  font-variant-numeric: tabular-nums; cursor: default; outline: none;
}
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) td.rc-dem .rc-dem-input.is-zero {
  background: #fff; border-color: var(--border); color: #b8bfcc; font-weight: 400;
}
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) .rc-nil { color: #c7ccd6; font-weight: 400; }
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) .rc-verdict {
  width: 100%; height: 28px; box-sizing: border-box; text-align: center;
  font-size: 12px; font-weight: 700; padding: 0 2px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text);
  font-family: inherit; outline: none;
}
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) .rc-verdict.reject { color: #b91c1c; border-color: #fca5a5; background: #fef2f2; }
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) .rc-verdict.swap { color: #b45309; border-color: #fcd34d; background: #fffbeb; }
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) .rc-verdict:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
/* 验收结论：确认（绿）/ 退回（红）/ 补送（蓝）三个选项平行展开，等宽逐行对齐；底色常显实心、文字统一白色，选中态加深 + 白圈 */
:is(#rc-prod-list) .rc-seg { display: flex; align-items: center; gap: 3px; width: 100%; }
:is(#rc-prod-list) .rc-seg .rc-vbtn {
  flex: 1 1 0; min-width: 0; height: 30px; padding: 0 2px; box-sizing: border-box;
  font-family: inherit; font-size: 13px; font-weight: 800; line-height: 1; white-space: nowrap;
  cursor: pointer; border: 0; border-radius: 6px; color: #fff;
  transition: background .12s, box-shadow .12s, transform .08s, filter .12s;
}
:is(#rc-prod-list) .rc-seg .rc-vbtn.confirm { background: #16a34a; }
:is(#rc-prod-list) .rc-seg .rc-vbtn.reject { background: #dc2626; }
:is(#rc-prod-list) .rc-seg .rc-vbtn.swap { background: #2563eb; }
:is(#rc-prod-list) .rc-seg .rc-vbtn:hover { filter: brightness(1.08); }
:is(#rc-prod-list) .rc-seg .rc-vbtn:active { transform: translateY(1px); }
:is(#rc-prod-list) .rc-seg .rc-vbtn.on { background: #f8fafc; box-shadow: inset 0 0 0 1.5px currentColor; }
:is(#rc-prod-list) .rc-seg .rc-vbtn.confirm.on { color: #16a34a; }
:is(#rc-prod-list) .rc-seg .rc-vbtn.reject.on { color: #dc2626; }
:is(#rc-prod-list) .rc-seg .rc-vbtn.swap.on { color: #2563eb; }

/* 出库确认按钮：未确认=亮蓝实心白字（可点），已确认=灰色（弱化，再点可撤销） */
:is(#ll-prod-list, #sp-prod-list, #rt-prod-list, #ls-prod-list) td.ok-cell { padding-left: 2px; padding-right: 2px; }
:is(#ll-prod-list, #sp-prod-list, #rt-prod-list, #ls-prod-list) .ok-btn {
  display: inline-block; min-width: 66px; height: 28px; padding: 0 10px; box-sizing: border-box;
  font-family: inherit; font-size: 13.5px; font-weight: 800; line-height: 26px; white-space: nowrap;
  border: 1px solid transparent; border-radius: 7px; cursor: pointer;
  color: #fff; background: #2563eb; box-shadow: 0 1px 3px rgba(37,99,235,.3);
  transition: background .12s, box-shadow .12s, color .12s, transform .08s;
}
:is(#ll-prod-list, #sp-prod-list, #rt-prod-list, #ls-prod-list) .ok-btn:hover { background: #1d4ed8; }
:is(#ll-prod-list, #sp-prod-list, #rt-prod-list, #ls-prod-list) .ok-btn:active { transform: translateY(1px); }
:is(#ll-prod-list, #sp-prod-list, #rt-prod-list, #ls-prod-list) .ok-btn.on {
  background: #f8fafc; color: #94a3b8; border-color: #e2e8f0; box-shadow: none; font-weight: 700;
}
:is(#ll-prod-list, #sp-prod-list, #rt-prod-list, #ls-prod-list) .ok-btn.on:hover { background: #f1f5f9; color: #64748b; }
/* 表头「全部递交」按钮：与左侧筛选框完全同尺寸（同宽 4.6em、同高 38px、同字号），一次递交整表已填数量的行 */
:is(#ll-prod-list, #sp-prod-list, #rt-prod-list, #ls-prod-list) .ok-all {
  display: block; width: 4.6em; min-width: 3.6em; max-width: 5.4em; height: 38px; margin: 0;
  padding: 2px 4px; box-sizing: border-box; font-family: inherit;
  font-size: 13px; font-weight: 800; line-height: 1.4; white-space: nowrap;
  color: #2563eb; background: #eff6ff; border: 1px solid #2563eb; border-radius: 6px; cursor: pointer;
  transition: background .12s, color .12s;
}
:is(#ll-prod-list, #sp-prod-list, #rt-prod-list, #ls-prod-list) .ok-all:hover { background: #2563eb; color: #fff; }
:is(#ll-prod-list, #sp-prod-list, #rt-prod-list, #ls-prod-list) .ok-all:active { transform: translateY(1px); }

/* 实时库存列：可用量（实时库存 − 本单已填）+ 已填扣减标记 */
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) td.ll-have {
  text-align: center; white-space: nowrap; vertical-align: middle;
  font-weight: 800; font-size: 13px; color: var(--text);
}
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) td.ll-have .have-num { font-variant-numeric: tabular-nums; }
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) td.ll-have .have-book {
  display: block; margin-top: 1px; font-size: 10.5px; font-weight: 700; line-height: 1.15;
  color: var(--warning, #d97706); white-space: nowrap;
}
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) td.ll-have .have-book.over { color: var(--danger, #dc2626); }
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) td.ll-have.have-low { color: var(--warning, #d97706); }
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) td.ll-have.have-out { color: var(--danger, #dc2626); }
:is(#ll-prod-list, #sp-prod-list, #rc-prod-list, #rt-prod-list, #ls-prod-list) td.ll-have.have-out .have-num { text-decoration: underline wavy rgba(220,38,38,.5); }
.live-stamp {
  display: inline-block; margin-left: 10px; padding: 1px 8px; border-radius: 999px;
  background: rgba(22,163,74,.1); color: #15803d; font-size: 11.5px; font-weight: 700;
  letter-spacing: .2px; white-space: nowrap;
}
/* 徽标置于标题上方时：去掉左缩进，与标题留一点间距 */
.op-head .op-hint:first-child .live-stamp { margin-left: 0; }
.op-head .op-hint:first-child { margin-bottom: 3px; }

/* ===== 成本分析（8 大食材大类 × 日 / 周 / 月） ===== */
.live-stamp.cost-basis { background: rgba(37,99,235,.1); color: #1d4ed8; cursor: help; }
/* 计价视角切换：总仓=成本价口径 / 项目点=售价口径 */
.op-toolbar .form-row > div.cost-scope { flex: 0 0 230px; width: 230px; min-width: 0; }
.op-toolbar .form-row > div.cost-scope select {
  width: 100%; box-sizing: border-box; height: 38px; padding: 0 10px; margin: 0;
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
  font-size: 13.5px; color: var(--text); font-family: inherit; outline: none; cursor: pointer;
}
.op-toolbar .form-row > div.cost-scope select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
.cost-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; flex: 0 0 auto; width: 170px; height: 38px; box-sizing: border-box; }
.op-toolbar .form-row > div.cost-seg { flex: 0 0 170px; width: 170px; min-width: 0; }
.cost-seg-btn { flex: 1 1 0; border: 0; background: #fff; padding: 0; font-size: 14px; color: var(--text-2); cursor: pointer; font-family: inherit; height: 100%; line-height: 38px; }
.cost-seg-btn + .cost-seg-btn { border-left: 1px solid var(--border); }
.cost-seg-btn.active { background: var(--primary); color: #fff; }
.cost-seg-btn:hover:not(.active) { background: #f8fafc; }
.cost-period-name { font-size: 13px; color: var(--text-2); padding: 0 6px; white-space: nowrap; }
.cost-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 6px 0 14px; }
.cost-kpi-card { border: 1px solid var(--border); border-radius: 10px; padding: 11px 14px; background: #fff; }
.cost-kpi-card .ck { font-size: 12px; color: var(--text-2); }
.cost-kpi-card .cv { font-size: 22px; font-weight: 700; margin-top: 2px; color: var(--text); font-variant-numeric: tabular-nums; }
.cost-kpi-card .cs { font-size: 11.5px; color: var(--text-2); margin-top: 5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cost-delta { font-weight: 700; }
.cost-delta.good { color: var(--success); }
.cost-delta.bad { color: var(--danger); }
.cost-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cost-table th { position: sticky; top: 0; z-index: 1; background: #f8fafc; font-weight: 600; color: var(--text); text-align: center; padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.cost-table th.cc-name { text-align: left; }
.cost-table th.cc-num { text-align: right; }
.cost-table th .cc-note { display: block; font-weight: 400; font-size: 11px; color: var(--text-2); font-style: normal; }
.cost-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: right; font-variant-numeric: tabular-nums; }
.cost-table td.cc-name { text-align: left; font-weight: 500; white-space: nowrap; }
.cost-table .cc-total { font-weight: 700; color: var(--primary-dark); }
.cost-table .cc-pct { width: 180px; text-align: left; }
.cost-row:hover { background: #f8fafc; }
.cost-parent { cursor: pointer; user-select: none; }
.cost-sub td { background: #fcfdff; font-size: 12.5px; color: var(--text-2); }
.cost-sub td.cc-name { padding-left: 30px; font-weight: 400; }
.cost-sub .cc-total { color: var(--text-2); font-weight: 600; }
.cc-caret { display: inline-block; width: 15px; color: var(--text-2); }
.cost-sum td { background: #f1f5f9; font-weight: 700; border-top: 2px solid var(--border); }
.cost-bar { display: inline-block; vertical-align: middle; width: 88px; height: 7px; background: #e2e8f0; border-radius: 4px; overflow: hidden; margin-right: 8px; }
.cost-bar i { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.cost-table .cc-pct span { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
/* 项目点视角：老师 / 学生分列（11 列，压缩内边距与占比条） */
.cost-table.cost-wide { font-size: 13.5px; }
.cost-table.cost-wide th, .cost-table.cost-wide td { padding: 8px 6px; }
.cost-table.cost-wide th .cc-note { font-size: 10.5px; }
.cost-table.cost-wide .cc-pct { width: 118px; }
.cost-table.cost-wide .cost-bar { width: 46px; margin-right: 6px; }
.cost-table.cost-wide .cc-u { color: var(--text-2); font-style: italic; }
.cost-trend { padding: 10px 6px 6px; }
.cost-trendwrap { display: flex; align-items: flex-end; gap: 10px; height: 132px; border-bottom: 1px solid var(--border); padding: 0 6px; }
.cost-tbar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.cost-tbars { display: flex; align-items: flex-end; gap: 3px; height: 100%; }
.cost-tbars i { display: block; width: 12px; border-radius: 3px 3px 0 0; }
.bar-cost { background: var(--primary); }
.bar-sale { background: #bfdbfe; }
.cost-tbar > span { font-size: 11px; color: var(--text-2); margin-top: 4px; white-space: nowrap; }
.cost-empty { padding: 20px; color: var(--text-2); font-size: 13px; text-align: center; }
@media (max-width: 1100px) { .cost-kpi { grid-template-columns: repeat(2, 1fr); } }
/* 损耗表行内「损耗原因」下拉（数量旁边，逐行必选） */
.cell-sel {
  width: 100%;
  box-sizing: border-box;
  padding: 3px 2px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
}
.cell-sel.is-empty { border-color: #fca5a5; background: #fff7f7; }
.cell-sel.is-empty:focus, .cell-sel:focus { border-color: #2563eb; outline: none; }

/* ---- 出入库台账页：筛选区 + 单据卡片 ---- */
.ledger-filters { align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.ledger-filters > div { display: flex; flex-direction: column; gap: 4px; }
.ledger-filters label { font-size: 12px; color: var(--text-2); font-weight: 600; }
.ledger-filters select, .ledger-filters input { min-width: 120px; }
.ledger-btns { flex-direction: row !important; align-items: center !important; gap: 8px !important; }
.ledger-doc { margin-top: 12px; padding: 12px 14px; }
.ledger-doc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.ledger-doc-head .ledger-ref { margin-left: 10px; font-size: 12.5px; color: var(--text-2); font-family: Consolas, monospace; }
.ledger-doc-head .ledger-doc-meta { font-size: 12px; color: var(--text-2); }
.ledger-doc table { width: 100%; border-collapse: collapse; font-size: 13.5px; table-layout: fixed; }
.ledger-doc th, .ledger-doc td { border: 1px solid var(--border); padding: 4px 6px; text-align: center; overflow: hidden; }
.ledger-doc th { background: #f8fafc; color: var(--text); font-weight: 700; font-size: 12px; }
.ledger-doc td.l { text-align: left; }
.ledger-doc td.b { font-weight: 700; }
.ledger-doc tfoot td { background: #f8fafc; }
.ledger-btns .btn { white-space: nowrap; }

/* ---- 周期申购（米面油·调料）：模式横幅 + 订单标签 ---- */
.weekly-bar {
  margin: 0 0 12px; padding: 10px 14px; border-radius: 8px;
  border: 1px solid var(--border); font-size: 13px; line-height: 1.6; color: var(--text);
}
.weekly-tag {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 8px;
  font-size: 11px; font-weight: 700; background: #ecfdf5; color: #047857; border: 1px solid #6ee7b7;
}

/* ---- 下周整周单编辑器 + 暂存汇总 ---- */
.wb-toolbar .form-row { flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.wb-toolbar label { font-size: 12px; color: var(--text-2); font-weight: 600; display: block; margin-bottom: 4px; }
.wb-toolbar input, .wb-toolbar select { min-width: 130px; padding: 9px 12px; font-size: 15px; border: 1px solid var(--border); border-radius: 8px; outline: none; font-family: inherit; height: 42px; }
/* 一级分类 / 每批行数：长度减半；搜索框宽度由 JS 与食材库搜索框同步、高度与食材库一致 69px（wbRender） */
.wb-toolbar #wb-cat1, .wb-toolbar #wb-size { width: 100px; min-width: 100px; padding: 9px 8px; }
#wb-kw { max-width: 100%; height: 69px; padding: 12px 16px; font-size: 15px; border-radius: 10px; }
#wb-kw::placeholder { color: var(--text-2); font-size: 13.5px; }
.wb-toolbar input:focus, .wb-toolbar select:focus { border-color: var(--primary); }
.wb-actions { display: flex; gap: 8px; align-items: center; }
.wb-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.wb-table th, .wb-table td { border: 1px solid var(--border); padding: 4px 6px; text-align: center; vertical-align: middle; }
/* 整周单列宽可拖：固定布局让列宽精确可控，品名列弹性吸收剩余，品名过长省略 */
.wb-table.wb-fixed { table-layout: fixed; width: 100%; }
.wb-table.wb-fixed th, .wb-table.wb-fixed td { box-sizing: border-box; }
.wb-table.wb-fixed .cell-wrap { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-table.wb-fixed .wb-day-cell { min-width: 0; }
.wb-table.wb-fixed .wb-day-cell input { max-width: 88px; } /* 学/师并排：输入框已按需求放大一倍（46→88px） */
.col-resizer { position: absolute; top: 0; right: -4px; width: 9px; height: 100%; cursor: col-resize; z-index: 3; touch-action: none; }
.col-resizer::after { content: ''; position: absolute; left: 3px; top: 18%; width: 3px; height: 64%; border-radius: 2px; background: transparent; transition: background .12s; }
.col-resizer:hover::after { background: #378ADD; }
body.col-resizing { cursor: col-resize !important; user-select: none; }
body.col-resizing .col-resizer::after { background: #185FA5; }
.wb-col-tip { color: #64748b; font-weight: 400; }
.wb-col-live { color: #185FA5; font-weight: 400; font-variant-numeric: tabular-nums; }
.wb-col-reset { color: #185FA5; cursor: pointer; text-decoration: underline; font-weight: 400; }
.wb-col-reset:hover { color: #042C53; }
/* 全系统滚动条统一改细（用户指令：表格底部横向滚动条没必要那么高） */
::-webkit-scrollbar { height: 10px; width: 10px; }
::-webkit-scrollbar-track { background: #eef2f7; }
::-webkit-scrollbar-thumb { background: #c3cdd9; border-radius: 6px; border: 2px solid #eef2f7; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
::-webkit-scrollbar-corner { background: #eef2f7; }
.wb-scroll { scrollbar-color: #c3cdd9 #eef2f7; }
.wb-scroll::-webkit-scrollbar { height: 10px; width: 10px; }
.wb-scroll::-webkit-scrollbar-track { background: #eef2f7; border-radius: 8px; }
.wb-scroll::-webkit-scrollbar-thumb { background: #c3cdd9; border-radius: 6px; border: 2px solid #eef2f7; }
.wb-scroll::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.wb-table thead th { background: #f8fafc; color: var(--text); font-weight: 700; font-size: 12px; white-space: nowrap; }
.wb-table .cell-wrap { text-align: center; }
.wb-day-cell { min-width: 140px; }
/* 学/师输入框左右并排（与出入库一致）：一行两个输入框，尺寸放大一倍（46→88px 宽、约 25→42px 高），字号 13→16px */
.wb-day-cell input { width: 100%; max-width: 88px; min-width: 0; flex: 1 1 0; height: 42px; padding: 0 6px; font-size: 16px; text-align: center; box-sizing: border-box; border-radius: 8px; }
.wb-row { display: flex; align-items: center; gap: 5px; justify-content: center; flex-wrap: nowrap; }
.wb-row + .wb-row { margin-top: 3px; }
.wb-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; display: inline-block; }
.wb-dot.dot-s { background: #378ADD; }
.wb-dot.dot-t { background: #EF9F27; }
.wb-day-cell input.wb-in-s { background: #E6F1FB; border-color: #B5D4F4; color: #042C53; }
.wb-day-cell input.wb-in-t { background: #FAEEDA; border-color: #FAC775; color: #412402; }
.wb-legend { display: flex; gap: 18px; align-items: center; font-size: 12.5px; color: var(--text-2); margin: 0 2px 8px; }
.wb-legend .wb-dot { margin-right: 5px; vertical-align: -1px; }
.wb-day-cell .wb-day-total { display: block; font-size: 11px; color: #2563eb; font-weight: 700; line-height: 1.3; min-height: 14px; }
/* 7天防填错格：隔列底色 + 天与天粗分隔线 + 聚焦列/行十字高亮 + 正在填提示条 */
.wb-table .wb-col-alt { background: #F8FAFC; }
.wb-table th.wb-day-col, .wb-table td.wb-day-col { border-left: 3px double #94a3b8; }
.wb-table tr.wb-row-focus > td:not(.wb-col-focus) { background-color: #FAEEDA; }
.wb-table .wb-col-focus { background: #E6F1FB; }
.wb-focus-hint { background: #E6F1FB; border: 1px solid #B5D4F4; color: #042C53; font-size: 13.5px; font-weight: 700; padding: 6px 12px; border-radius: 8px; margin: 0 2px 8px; text-align: center; }
/* 整周单按天锁定：锁定列只读变灰，表头金色锁按钮 */
.wb-lock-btn { border: 1px solid var(--border); background: #fff; color: var(--text-2); border-radius: 6px; font-size: 11px; font-weight: 700; padding: 2px 3px; cursor: pointer; margin-top: 2px; white-space: nowrap; position: relative; z-index: 4; line-height: 0; }
.wb-lock-btn svg { width: 16px; height: 16px; display: block; }
.wb-lock-btn:hover { border-color: #f59e0b; background: #fffbeb; }
.wb-lock-btn.locked { background: #FCEBEB; border-color: #E24B4A; }
.wb-table th.wb-th-locked { background: #fef3c7; }
.wb-table td.wb-locked input { background: #f1f5f9 !important; border-color: #e2e8f0 !important; color: #94a3b8; }
/* 整页字号调节器（A-/A+）已取消：页面固定 100%，相关样式移除 */
@media print { body { zoom: 1 !important; } }
.wb-day-th { min-width: 140px; }
/* 三排高表头：周几日期+整天锁 / 师·生独立锁 / 师·生数量筛选 */
.wb-day-th3 { vertical-align: top; padding: 4px 2px 3px; }
.wb-day-top { display: flex; align-items: center; justify-content: center; gap: 2px; white-space: nowrap; }
.wb-day-sub2 { display: flex; gap: 2px; margin-top: 2px; }
.wb-subcol { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
/* 数量筛选（可勾选多选菜单） */
.wb-fdrop { position: relative; width: 100%; display: flex; justify-content: center; }
.wb-fbtn { font-size: 12px; font-weight: 700; padding: 6px 7px; min-width: 50px; border: 1px solid var(--border); border-radius: 4px; background: #fff; color: var(--text); cursor: pointer; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.wb-fbtn:hover { border-color: var(--primary); color: var(--primary); }
.wb-fbtn.on { background: #dbeafe; border-color: var(--primary); color: #1d4ed8; }
.wb-fpanel { position: fixed; display: none; z-index: 980; min-width: 152px; max-height: 240px; overflow: auto; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(15, 23, 42, .18); padding: 4px; }
.wb-fpanel.open { display: block; }
.wb-fitem { display: flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 6px; border-radius: 5px; cursor: pointer; white-space: nowrap; }
.wb-fitem:hover { background: #f1f5f9; }
.wb-fitem.wb-fall { font-weight: 700; border-bottom: 1px solid var(--border); border-radius: 0; margin-bottom: 2px; }
.wb-fempty { font-size: 11px; color: var(--text-2); padding: 4px 6px; }
/* 数量筛选面板：全选 / 反选 / 清空 */
.wb-fops { display: flex; gap: 4px; padding: 2px 2px 6px; border-bottom: 1px solid var(--border); margin-bottom: 3px; }
.wb-fops button { flex: 1; font-size: 11px; padding: 4px 0; border: 1px solid var(--border); border-radius: 5px; background: #fff; color: var(--text); cursor: pointer; white-space: nowrap; }
.wb-fops button:hover { border-color: var(--primary); color: var(--primary); background: #eff6ff; }
.wb-fhint { font-size: 11px; color: var(--text-2); padding: 4px 4px 1px; border-top: 1px dashed var(--border); margin-top: 3px; }
/* 数量筛选生效提示条 */
.wb-flt-bar { align-items: center; gap: 8px; flex-wrap: wrap; background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; font-size: 12px; padding: 6px 10px; border-radius: 8px; margin: 0 0 8px; }
.wb-flt-bar b { font-weight: 700; }
.wb-flt-bar button { font-size: 11px; padding: 2px 9px; border: 1px solid #93c5fd; background: #fff; color: #1d4ed8; border-radius: 5px; cursor: pointer; }
.wb-flt-bar button:hover { background: #dbeafe; }
/* 全系统列宽复原小按钮 */
.col-reset-chip { display: block; margin: 6px auto 2px; font-size: 11px; color: var(--text-2); background: #fff; border: 1px dashed var(--border); border-radius: 6px; padding: 2px 10px; cursor: pointer; }
.col-reset-chip:hover { color: var(--primary); border-color: var(--primary); }
/* 数量筛选命中高亮 */
.wb-cell-hl { background: #fde047 !important; box-shadow: inset 0 0 0 2px #f59e0b; }
.wb-cell-hl input { font-weight: 700; color: #92400e; }
/* 分列锁定的输入框灰显 */
.wb-day-cell input[readonly] { background: #f1f5f9; color: #94a3b8; }
.wb-day-hd { display: inline-flex; align-items: baseline; justify-content: center; gap: 3px; white-space: nowrap; }
.wb-day-date { font-weight: 400; font-size: 11px; color: var(--text-2); }
.wb-tag { background: #eff6ff; color: #1d4ed8; border-color: #93c5fd; }

/* ---- 食材库数据行：深蓝字体（楷体细笔画在深灰黑下显淡，试深蓝提亮视觉对比） ---- */
#products-table td { color: #000; }
#products-table td.cat-cell .vtext { color: #000; }
#products-table tr.row-disabled td { color: #94a3b8; } /* 已停用行保持灰 */

/* ===== 申购审批 · 紧凑审核卡（明细全部默认展开，审核不用点开） ===== */
.rv-bar { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #475569; margin-bottom: 8px; flex-wrap: wrap; }
.rv-bar b { color: var(--warning); font-size: 13.5px; }
.rv-bar-tip { margin-left: auto; font-size: 11.5px; color: #475569; background: #f8fafc; border: 1px solid var(--border); border-radius: 5px; padding: 1px 8px; }
.rv-list { display: flex; flex-direction: column; gap: 7px; }
.rvc { display: flex; gap: 10px; background: var(--card); border: 1px solid var(--border); border-radius: 9px; padding: 7px 10px; }
.rvc.hot { border-left: 3px solid var(--warning); background: linear-gradient(90deg, #fffdf5 0, #fff 60px); padding-left: 8px; }
.rvc-main { flex: 1; min-width: 0; }
.rvc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: #475569; line-height: 1.5; }
.rvc-head .no { font-size: 13px; font-weight: 700; color: #0f172a; }
.rvc-head .site { font-size: 12.5px; font-weight: 700; color: #0f172a; }
.rvc-head .sp { flex: 1; }
.rvc-head .wait b { color: var(--warning); }
.rvc-head .due { color: var(--warning); }
.rvc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 0 14px; margin-top: 3px; }
.rv-i { display: flex; align-items: baseline; justify-content: flex-start; gap: 5px; font-size: 12px; line-height: 1.8; border-bottom: 1px dotted #eef2f7; min-width: 0; }
.rv-i .rv-in { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #334155; }
.rv-i b { color: var(--primary); white-space: nowrap; flex: none; }
.rv-u { font-size: 10px; padding: 0 4px; border-radius: 6px; line-height: 15px; margin-left: 3px; font-weight: 700; }
.rv-note { margin-top: 3px; font-size: 11.5px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 5px; padding: 1px 7px; display: inline-block; }
.rvc-act { flex: none; width: 88px; display: flex; flex-direction: column; gap: 4px; }
.rvc-act .rv-pass { background: var(--success); color: #fff; border: none; border-radius: 6px; padding: 5px 0; font-size: 12.5px; cursor: pointer; }
.rvc-act .rv-pass:hover { background: #15803d; }
.rvc-act .rv-rej { background: #fff; color: var(--danger); border: 1px solid #fecaca; border-radius: 6px; padding: 4px 0; font-size: 12px; cursor: pointer; }
.rvc-act .rv-rej:hover { background: #fef2f2; }
.rvc-act .rv-tip { font-size: 10px; color: #64748b; text-align: center; line-height: 1.25; font-weight: 400; }
.rv-empty { border: 1px dashed var(--border); border-radius: 9px; padding: 26px 0; text-align: center; color: #64748b; font-size: 13px; }
@media (max-width: 760px) {
  .rvc { flex-wrap: wrap; padding: 7px 8px; gap: 6px; }
  .rvc-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 0 10px; }
  .rvc-act { width: 100%; flex-direction: row; margin-top: 2px; }
  .rvc-act .rv-pass { flex: 1.5; padding: 7px 0; font-size: 13px; }
  .rvc-act .rv-rej { flex: 1; padding: 6px 0; font-size: 12.5px; }
  .rvc-act .rv-tip { display: none; }
  .rvc-head { font-size: 11.5px; gap: 6px; }
  .rvc-head .no { font-size: 12.5px; }
  .rv-bar-tip { display: none; }
  .rv-i { font-size: 11.5px; }
}
/* 审核卡 · 总部审核/配送/打印共用扩展：状态块、金额块、蓝/红小按钮 */
.rv-st { display: inline-flex; align-items: center; border-radius: 5px; background: #f8fafc; border: 1px solid var(--border); padding: 0 6px; }
.rv-st span { font-size: 11px !important; }
.rv-money { color: #0f172a; }
.rv-money i { font-style: normal; color: var(--danger); }
.rvc-act .rv-pass { white-space: nowrap; font-size: 12px; }
.rvc-act .rv-pr { background: #fff; color: var(--primary); border: 1px solid #bfdbfe; border-radius: 6px; padding: 4px 0; font-size: 12px; cursor: pointer; white-space: nowrap; }
.rvc-act .rv-pr:hover { background: #eff6ff; }
.rvc-act .rv-rc { background: #fff; color: var(--danger); border: 1px solid #fecaca; border-radius: 6px; padding: 4px 0; font-size: 12px; cursor: pointer; white-space: nowrap; }
.rvc-act .rv-rc:hover { background: #fef2f2; }
@media (max-width: 760px) {
  .rvc-act .rv-pr, .rvc-act .rv-rc { flex: 1; padding: 6px 0; font-size: 12.5px; }
}

/* ===== 已汇总申购单（平铺清单，明细全部展开） ===== */
.sum-table { width: 100%; border-collapse: collapse; }
.sum-table th { text-align: left; font-size: 11.5px; color: #475569; padding: 5px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.sum-table td { font-size: 12px; padding: 6px 8px; border-bottom: 1px dotted #eef2f7; vertical-align: top; }
.sum-table tr:hover td { background: #fafcff; }
.sum-table td.sum-items { min-width: 400px; white-space: normal; }
.sum-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 0 12px; margin-top: 0; }
.sum-st { display: inline-block; font-size: 11px; border-radius: 5px; padding: 1px 7px; background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; white-space: nowrap; }
@media (max-width: 760px) {
  .sum-table td.sum-items { min-width: 260px; }
  .sum-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 0 8px; }
}

/* ===== 汇总单（整周 · 全部项目点） ===== */
.ws-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 7px; }
/* 已汇总申购单清单（汇总后从待汇总移入，可撤回） */
.sm-box { margin-bottom: 14px; padding: 10px 12px; border-radius: 10px; background: #fffbeb; border: 1px solid #fde68a; }
.sm-box.sm-none { background: #f8fafc; border-color: #e2e8f0; color: #64748b; font-size: 12.5px; }
.sm-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: #78350f; margin-bottom: 8px; }
.sm-h b { color: #b45309; }
.sm-h .ws-money { color: #b45309; }
.sm-tip { margin-left: auto; font-size: 11.5px; color: #92400e; opacity: .8; }
.sm-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
.sm-table th, .sm-table td { padding: 6px 9px; font-size: 12.5px; border-bottom: 1px solid #f1f5f9; text-align: left; }
.sm-table th { background: #fff7ed; color: #92400e; font-weight: 700; font-size: 11.5px; }
.sm-table tr:last-child td { border-bottom: 0; }
.ws-nav { padding: 5px 10px !important; font-size: 12px !important; }
.ws-week { display: flex; align-items: baseline; gap: 6px; padding: 0 4px; }
.ws-week b { font-size: 14.5px; color: #0f172a; }
.ws-week span { font-size: 11px; color: #64748b; }
.ws-sp { flex: 1; }
.ws-q { width: 168px; padding: 5px 9px !important; font-size: 12px !important; }
.ws-stats { font-size: 12px; color: #475569; margin-bottom: 7px; }
.ws-stats b { color: #0f172a; font-size: 12.5px; }
.ws-stats .ws-money { color: var(--primary); font-size: 13.5px; }
.ws-filters { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 6px 0; margin-bottom: 8px; }
.ws-fl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 2px 0; }
.ws-fl-t { font-size: 11.5px; color: #64748b; width: 58px; flex: none; }
.ws-chip { display: inline-flex; align-items: center; font-size: 11.5px; padding: 3px 9px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: #475569; cursor: pointer; user-select: none; line-height: 1.5; }
.ws-chip:hover { border-color: #bfdbfe; background: #f8fbff; }
.ws-chip.on { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; font-weight: 600; }
.ws-chip.off { opacity: .42; }
.ws-chip i { font-style: normal; margin-left: 5px; font-size: 10.5px; color: #94a3b8; font-weight: 400; }
.ws-clr { font-size: 11.5px; color: var(--primary); cursor: pointer; margin-left: 2px; }
.ws-clr:hover { text-decoration: underline; }
.ws-none { font-size: 11.5px; color: #94a3b8; }
.ws-table { width: 100%; border-collapse: collapse; }
/* 每个大类一张独立汇总表：米面油 / 调料 / 易耗品 … 表内按食材名称排序 */
.ws-cat { margin-bottom: 16px; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; background: #fff; }
.ws-cat-h { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: linear-gradient(90deg,#eef4ff,#f8fafc); border-bottom: 1px solid #e2e8f0; }
.ws-cat-t { font-size: 13.5px; font-weight: 800; color: #1e3a8a; }
.ws-cat-s { margin-left: auto; font-size: 12px; color: #475569; }
.ws-cat-s b { color: #1d4ed8; }
.ws-alltot { margin: 4px 0 0; padding: 9px 12px; border-radius: 9px; background: #0f172a; color: #e2e8f0; font-size: 12.5px; text-align: right; }
.ws-alltot b { color: #fff; }
.ws-table th { text-align: left; font-size: 11.5px; color: #475569; font-weight: 600; padding: 5px 7px; background: #f8fafc; border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.ws-table td { padding: 4px 7px; font-size: 12px; color: #334155; border-bottom: 1px dotted #eef2f7; vertical-align: middle; }
.ws-table tbody tr:hover td { background: #fafcff; }
.ws-table tr.ws-g td { background: #f1f5f9; font-weight: 700; font-size: 11.5px; color: #334155; padding: 5px 8px; border-bottom: 1px solid #e2e8f0; }
.ws-table tr.ws-tot td { background: #f8fafc; font-weight: 700; border-top: 2px solid var(--border); color: #0f172a; font-size: 12.5px; }
.ws-r { text-align: right; }
.ws-c { text-align: center; }
.ws-nowrap { white-space: nowrap; }
.ws-amt { color: #0f172a; }
.ws-kid { display: inline-block; font-size: 10px; line-height: 15px; padding: 0 5px; border-radius: 4px; font-weight: 700; }
.ws-kid-t { background: #fef3c7; color: #92400e; }
.ws-kid-s { background: #dbeafe; color: #1e40af; }
.ws-kid-b { background: #ede9fe; color: #5b21b6; }
.ws-sitesub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 9px; font-size: 11.5px; color: #64748b; }
.ws-sub-t { font-weight: 600; color: #475569; }
.ws-sub-i { background: #f8fafc; border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; }
.ws-sub-i b { color: #0f172a; }
.ws-sub-i i { font-style: normal; color: #94a3b8; margin-left: 3px; font-size: 10.5px; }
@media (max-width: 760px) {
  .ws-q { width: 100%; }
  .ws-bar { gap: 6px; }
  .ws-week b { font-size: 13px; }
  .ws-fl-t { width: 100%; }
  .ws-table { min-width: 860px; }
  .ws-table th, .ws-table td { padding: 4px 5px; }
  .ws-stats { font-size: 11.5px; line-height: 1.7; }
}

/* ===== 导出已汇总申购单 ===== */
.exp-stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 12px; }
.exp-kpi { flex: 1 1 120px; min-width: 110px; background: #f8fafc; border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; }
.exp-kpi b { font-size: 19px; color: #0f172a; line-height: 1.2; }
.exp-kpi span { font-size: 11.5px; color: #64748b; }
.exp-kpi-amt { background: #eff6ff; border-color: #bfdbfe; }
.exp-kpi-amt b { color: var(--primary); }
.exp-table { width: 100%; border-collapse: collapse; }
.exp-table th { font-size: 11.5px; color: #475569; text-align: left; padding: 6px 8px; background: #f8fafc; border-bottom: 1px solid var(--border); white-space: nowrap; }
.exp-table td { font-size: 12.5px; padding: 6px 8px; border-bottom: 1px dotted #eef2f7; }
.exp-table tfoot td { font-weight: 700; background: #f8fafc; border-top: 2px solid var(--border); font-size: 12.5px; }
.exp-foot { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.exp-opts { flex: 1; display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: #334155; }
.exp-chk { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.exp-tip { font-size: 11px; color: #94a3b8; line-height: 1.6; }
.exp-actions { display: flex; gap: 8px; align-items: center; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 760px) {
  .exp-kpi { flex: 1 1 44%; }
  .exp-foot { flex-direction: column; align-items: stretch; }
  .exp-actions { flex-direction: column-reverse; }
  .exp-actions .btn { width: 100%; }
}

/* 导出记录 */
.exp-logs { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--border); }
.exp-logs-h { font-size: 13px; font-weight: 700; color: #0f172a; margin-bottom: 8px; }
.exp-logs-h span { font-size: 11.5px; font-weight: 400; color: #94a3b8; }
.exp-log-table td { font-size: 12px; }
.exp-log-f { font-size: 11.5px; color: #64748b; max-width: 260px; }
.exp-dl { color: var(--primary); font-size: 12px; white-space: nowrap; }
.exp-dl:hover { text-decoration: underline; }

/* 批检报告档案 */
.pill-warn { display: inline-block; background: #fffbeb; color: #b45309; border: 1px solid #fde68a; border-radius: 20px; padding: 0 7px; font-size: 11.5px; font-weight: 700; }
#report-table td, #report-gap-table td { vertical-align: middle; }
#report-table .btn-sm, #report-gap-table .btn-sm { padding: 3px 8px; font-size: 12px; }
@media (max-width: 760px) {
  #report-table table, #report-gap-table table { font-size: 12px; }
  #report-table th, #report-table td { padding: 6px 5px; }
}

/* 侧栏导航滚动条：细半透明，避免粗灰条抢视觉 */
.sidebar nav::-webkit-scrollbar { width: 5px; }
.sidebar nav::-webkit-scrollbar-track { background: transparent; }
.sidebar nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 3px; }
.sidebar nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.26); }
.sidebar nav { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.14) transparent; }

/* ===== 库存 · 总仓页「各项目库存实时汇总」 ===== */
.inv-proj-card { margin-bottom: 16px; }
.inv-proj-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.inv-proj-head b { font-size: 15px; }
.inv-proj-head span { font-size: 12px; color: var(--text-2); font-weight: 600; }
.inv-site-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 10px; }
.inv-site-card { display: block; border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px 10px; text-decoration: none; color: var(--text); background: linear-gradient(180deg, #f8fafc, #fff); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.inv-site-card:hover { border-color: var(--primary); box-shadow: 0 3px 10px rgba(37,99,235,.12); transform: translateY(-1px); }
.isc-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.isc-name { font-size: 13px; }
.isc-kinds { font-size: 11px; color: #475569; background: #eef2f7; border-radius: 999px; padding: 1px 7px; font-weight: 600; }
.isc-qty { font-size: 20px; font-weight: 800; color: var(--primary-dark); margin: 3px 0 1px; }
.isc-sub { font-size: 11px; color: var(--text-2); font-weight: 600; }
.inv-matrix-head { display: flex; align-items: baseline; gap: 8px; margin: 16px 0 8px; font-size: 13px; }
.inv-matrix-head span { font-size: 11.5px; color: var(--text-2); font-weight: 600; }
.inv-matrix { max-height: 420px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.inv-matrix table { margin: 0; }
@media (max-width: 720px) {
  .inv-site-grid { grid-template-columns: repeat(2, 1fr); }
  .isc-qty { font-size: 18px; }
}

/* 供应商账户：待开通状态 */
.acc-wait { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 10px; background: #fef3c7; color: #b45309; font-weight: 600; }
.acc-wait-row > td { background: rgba(245, 158, 11, .04); }
.btn-xs.btn-open-acc { border: 1px solid #fbbf24; color: #b45309; background: #fffbeb; }
.btn-xs.btn-open-acc:hover { background: #fef3c7; }

/* ===== 人事中心：考勤录入 ===== */
#att-table td { white-space: nowrap; vertical-align: middle; }
#att-table input.att-inp { width: 68px; margin: 0; padding: 3px 6px; text-align: center; }
#att-table input.att-note { width: 150px; margin: 0; padding: 3px 6px; }
#staff-table td:nth-child(9) { white-space: nowrap; }

/* ===== 人事中心：档案 / 合同 / 证件 / 排班 / 工资 ===== */
.hr-sub { font-size: 12.5px; font-weight: 600; color: #475569; }
.hr-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; padding: 10px 12px; }
.hr-toolbar select, .hr-toolbar input { margin-bottom: 0; }
.hr-toolbar #staff-kw, .hr-toolbar #ct-kw, .hr-toolbar #cert-kw { flex: 1; min-width: 200px; }
.hr-note { color: #475569; font-size: 12px; line-height: 1.7; margin-top: 10px; }
.hr-tag { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 10px; font-weight: 700; white-space: nowrap; }
.hr-tag.ok { background: #dcfce7; color: #15803d; }
.hr-tag.warn { background: #fef3c7; color: #b45309; }
.hr-tag.danger { background: #fee2e2; color: #b91c1c; }
.hr-tag.gray { background: #eef2f7; color: #475569; }
.hr-tag.blue { background: #dbeafe; color: #1d4ed8; }
.hr-tag + .hr-tag { margin-left: 4px; }
.hr-alert { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 13px; }
.hr-alert b { color: #b91c1c; }
.hr-alert .hr-alert-item { cursor: pointer; padding: 2px 8px; border-radius: 999px; background: #ffedd5; }
.hr-alert .hr-alert-item:hover { background: #fed7aa; }
.hr-alert.ok { background: #ecfdf5; border-color: #a7f3d0; }
/* 详情页 */
.sd-card { background: #fff; border-radius: 12px; padding: 16px 18px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 12px; }
.sd-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sd-name { font-size: 22px; font-weight: 800; }
.sd-meta { color: #475569; font-size: 12.5px; margin-top: 6px; display: flex; gap: 14px; flex-wrap: wrap; }
.hr-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 12px; }
.hr-tab { padding: 7px 14px; border-radius: 8px; background: #e2e8f0; color: #334155; font-size: 13px; cursor: pointer; font-weight: 700; border: none; }
.hr-tab.active { background: var(--primary); color: #fff; }
.sd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 22px; }
.sd-field { border-bottom: 1px dashed #e2e8f0; padding: 7px 0; font-size: 13px; }
.sd-field span { display: block; color: #64748b; font-size: 11.5px; margin-bottom: 3px; font-weight: 600; }
.sd-sec { font-size: 14px; font-weight: 800; margin: 16px 0 8px; padding-left: 8px; border-left: 3px solid var(--primary); }
/* 排班 */
#shifts-table td { padding: 6px 8px; }
#shifts-table select.shift-sel { margin: 0; padding: 3px 4px; font-size: 12px; min-width: 74px; }
#shifts-table th.wk { text-align: center; font-size: 12px; }
#shifts-table th.wk.we { color: #b91c1c; }
/* 工资表 */
#payroll-table td { padding: 5px 6px; white-space: nowrap; }
#payroll-table input.pay-inp { width: 84px; margin: 0; padding: 3px 6px; text-align: right; font-size: 12.5px; }
#payroll-table input.pay-note { width: 120px; margin: 0; padding: 3px 6px; font-size: 12.5px; }
#payroll-table tbody tr.locked td { background: #f8fafc; }
#payroll-table tfoot td { background: #f1f5f9; font-weight: 800; }
/* 附件行 */
.hr-file-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed #e2e8f0; font-size: 12.5px; flex-wrap: wrap; }
.hr-file-row:last-child { border-bottom: none; }
.hr-file-kind { background: #eef2f7; border-radius: 6px; padding: 1px 7px; font-size: 11px; color: #334155; }
.hr-empty { color: #64748b; font-size: 12.5px; padding: 12px 0; }
.hr-bar { height: 8px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.hr-bar > i { display: block; height: 100%; background: var(--primary); }
.hr-cost-row { display: grid; grid-template-columns: 120px 1fr 110px 90px; gap: 10px; align-items: center; font-size: 12.5px; padding: 6px 0; }
.hr-pick { display: flex; gap: 8px; align-items: center; }

/* 总仓库存页 Tab（库存总览 / 出入库台账） */
.inv-tab-btn { padding: 6px 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text); font-size: 13px; cursor: pointer; transition: all .15s; }
.inv-tab-btn:hover { border-color: var(--primary); color: var(--primary); }
.inv-tab-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* ===== 库存操作台角色只读态：厨师长（只签质量）/ 项目经理（只读复核）===== */
#page-site-stock.readonly-ops .stock-pane input,
#page-site-stock.readonly-ops .stock-pane select { pointer-events: none; opacity: .75; }
#page-site-stock.readonly-ops .op-table button,
#page-site-stock.readonly-ops .stock-pane .btn-success,
#page-site-stock.readonly-ops .stock-pane .btn-primary,
#page-site-stock.readonly-ops .stock-pane .btn-danger { display: none; }
#rc-quality-box { margin-bottom: 12px; }
#rc-quality-box .q-btn { border: 0.5px solid var(--border); background: #fff; color: var(--text-2); padding: 3px 10px; border-radius: 999px; font-size: 12px; cursor: pointer; }
#rc-quality-box .q-btn:hover { border-color: var(--primary); color: var(--primary); }
#rc-quality-box .q-btn.q-on { background: var(--primary); border-color: var(--primary); color: #fff; }
#page-site-stock.readonly-ops #rc-quality-box .btn,
#page-site-stock.readonly-ops #rc-quality-box .q-btn { display: inline-flex !important; pointer-events: auto; }

/* ===== 项目点人事中心（排班申报 / 每日考勤）：架构版 ===== */
.ss-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 10px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--border); font-size: 13px; color: var(--text); }
.ss-banner.readonly { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.ss-meta { font-size: 12px; color: #475569; font-weight: 600; }
.ss-reject { font-size: 12px; color: var(--danger); font-weight: 700; }
.ss-grid, .sat-grid { min-width: 880px; }
.ss-grid th, .sat-grid th { white-space: nowrap; }
.ss-grid .ss-name, .sat-grid .ss-name { min-width: 150px; }
.ss-dh { font-size: 11px; font-weight: 600; color: #64748b; margin-top: 2px; }
.ss-post { font-size: 11px; color: #64748b; font-weight: 600; margin-top: 2px; }
.ss-sel { margin: 0; padding: 4px 6px; font-size: 12px; min-width: 76px; width: 100%; }
.ss-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.ss-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.ss-foot-tip { font-size: 12px; color: #64748b; font-weight: 600; }
.sat-status { margin: 0; padding: 4px 6px; font-size: 12px; min-width: 100px; }
.sat-inp { margin: 0; padding: 4px 6px; font-size: 12px; width: 100px; }
.sat-note { margin: 0; padding: 4px 6px; font-size: 12px; min-width: 160px; }
.ss-sel:disabled, .sat-inp:disabled, .sat-note:disabled, .sat-status:disabled { background: #f8fafc; color: #334155; opacity: 1; cursor: not-allowed; }
@media (max-width: 720px) {
  .ss-actions { align-items: stretch; }
  .ss-btns { margin-left: 0; width: 100%; }
  .ss-btns .btn { flex: 1; }
}

/* 库存操作台只读提示（厨师长 / 项目经理：可查看、不可出入库） */
.stock-ro-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 14px; margin: 10px 0 2px; border-radius: 10px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; font-size: 13px; line-height: 1.6; }
.stock-ro-note b { color: #1d4ed8; }
.stock-ro-note.hidden { display: none !important; }

/* 排班工具栏：员工筛选 + 班次图例 + 班次设置弹层 */
.ss-tool { gap: 10px; flex-wrap: wrap; align-items: center; }
.ss-filter { max-width: 250px; }
.ss-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.ss-lg { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: #f8fafc; border: 1px solid var(--border); font-size: 12px; color: #334155; font-weight: 600; white-space: nowrap; }
.ss-lg i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.ss-lg em { font-style: normal; color: #64748b; font-weight: 500; }
.ss-lg.none { color: #94a3b8; font-weight: 500; }
.ss-sel { text-align: left; }
.ss-def-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.ss-def-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.ss-def-time { font-size: 12px; color: #475569; font-weight: 600; font-variant-numeric: tabular-nums; }
.ss-def-ops { display: flex; gap: 6px; }
.ss-def-ops .ss-del { color: var(--danger); }
.ss-def-form { border-top: 1px dashed var(--border); padding-top: 14px; }
.ss-def-form-head { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.ss-def-form-head span { display: block; font-size: 12px; font-weight: 500; color: #64748b; margin-top: 3px; line-height: 1.5; }
.ss-def-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr .7fr; gap: 10px; }
.ss-def-grid label { font-size: 12px; color: var(--text-2); font-weight: 600; }
.ss-def-grid input { width: 100%; margin-top: 4px; }
@media (max-width: 640px) { .ss-def-grid { grid-template-columns: 1fr 1fr; } .ss-tool { align-items: stretch; } }

/* 侧边栏固定 AI 入口：悬浮球被拖走/被遮挡时的保底入口，所有项目点角色都可见 */
.ai-side-entry { display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 10px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; background: rgba(255,255,255,.06); color: #e2e8f0; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s; }
.ai-side-entry:hover { background: rgba(255,255,255,.12); }
.ai-side-entry img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(14,165,233,.55); flex: none; }
/* AI 管理员固定在导航置顶：紧贴「延余」标志下方（用户指定） */
.ai-side-top { margin: 6px 12px 8px; width: calc(100% - 24px); justify-content: center; padding: 1px 12px; font-size: 13.5px; font-weight: 600; color: #cbd5e1; letter-spacing: .12em; text-indent: .12em; white-space: nowrap; border-radius: 10px; border-color: rgba(14,165,233,.45); background: linear-gradient(90deg, rgba(14,165,233,.16), rgba(14,165,233,.06)); }
.ai-side-top img { width: 19px; height: 19px; }
.ai-side-top:hover { background: rgba(14,165,233,.22); }

/* 我的申购卡片：审批进度条并入卡片（与申购审批同款排列） */
.rvc-steps { margin-top: 4px; }

/* ===== 审批卡紧凑版：左元信息 165px + 中明细 + 右竖排小按钮 ===== */
.rvc { align-items: stretch; gap: 8px; padding: 6px 8px; }
.rvc-meta { flex: none; width: 165px; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: #64748b; line-height: 1.5; }
.rvc-meta .m-no { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12.5px; font-weight: 700; color: #0f172a; }
.rvc-meta .m-no .weekly-tag { font-size: 10px; }
.rvc-meta .m-site { font-size: 12px; font-weight: 700; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rvc-meta .m-sum { font-weight: 600; color: #334155; }
.rvc-meta .m-sum b { color: #0f172a; }
.rvc-meta .m-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rvc-meta .m-wait { color: var(--warning); }
.rvc-meta .m-due { color: var(--warning); }
.rvc-meta .m-hot { align-self: flex-start; font-size: 10px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 5px; padding: 0 5px; line-height: 16px; }
.rvc-meta .m-money { font-weight: 700; color: var(--primary); }
.rvc-meta .rv-note { margin-top: 1px; max-width: 100%; white-space: normal; }
.rvc-mid { flex: 1; min-width: 0; }
.rv-chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.rv-chips.hidden { display: none; }
.rv-chip { display: inline-flex; align-items: center; gap: 3px; max-width: 240px; font-size: 11.5px; color: #334155; background: #f8fafc; border: 1px solid var(--border); border-radius: 999px; padding: 0 8px; line-height: 20px; }
.rv-chip .rv-cn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 165px; }
.rv-chip b { color: var(--primary); white-space: nowrap; }
.rv-chip .rv-u { margin-left: 0; }
.rv-more { border: none; background: none; color: var(--primary); font-size: 11px; font-weight: 600; cursor: pointer; padding: 0 4px; white-space: nowrap; }
.rv-more:hover { text-decoration: underline; }
.rv-full.hidden { display: none; }
.rv-full .rv-more { margin-top: 2px; }
.rvc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; margin-top: 2px; }
.rvc-act { width: 74px; gap: 3px; }
.rvc-act .rv-pass { height: 26px; padding: 0; font-size: 12px; border-radius: 5px; }
.rvc-act .rv-rej { height: 26px; padding: 0; font-size: 11.5px; border-radius: 5px; }
.rvc-act .rv-pr { height: 26px; padding: 0; }
.rvc-act .rv-tip { font-size: 9.5px; line-height: 1.3; }
@media (max-width: 860px) {
  .rvc { flex-wrap: wrap; }
  .rvc-meta { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 3px 12px; }
  .rvc-act { width: 100%; flex-direction: row; }
  .rvc-act .rv-pass, .rvc-act .rv-rej, .rvc-act .rv-pr { flex: 1; height: 30px; font-size: 12.5px; }
  .rvc-act .rv-tip { display: none; }
  .rvc-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
}
.rvc-meta { line-height: 1.4; }
.rv-st-chip { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; font-weight: 700; }

/* ---------- 待汇总（已审批申购单 · 按申购日期 → 项目点归类） ---------- */
.ps-kpi{margin:0 0 14px;padding:10px 14px;border-radius:10px;background:#eff6ff;border:1px solid #bfdbfe;font-size:13px;color:var(--text);line-height:1.7}
.ps-kpi b{color:#1d4ed8;font-size:15px}
.ps-kpi-tip{margin-left:10px;font-size:12px;color:#475569}
.ps-day{margin:0 0 22px}
.ps-day-h{display:flex;align-items:baseline;gap:12px;padding:6px 0 8px;border-bottom:2px solid #dbeafe}
.ps-cal{font-size:14px;color:var(--text)}
.ps-cal b{font-size:15px;color:#1d4ed8}
.ps-day-sub,.ps-site-sub{margin-left:auto;font-size:12px;color:#475569;font-weight:600}
.ps-site{margin:12px 0 0 8px;padding-left:12px;border-left:3px solid #cbd5e1}
.ps-site-h{display:flex;align-items:baseline;gap:10px;font-size:13.5px;font-weight:700;padding:2px 0 6px}
.ps-row{border:1px solid var(--border);border-radius:10px;padding:8px 10px;margin:6px 0;background:var(--card)}
.ps-row:hover{border-color:#93c5fd;box-shadow:0 1px 4px rgba(37,99,235,.08)}
.ps-l1{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:12.5px}
.ps-no{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:13px;color:var(--text)}
.ps-tag{background:#e0e7ff;color:#3730a3;border-radius:6px;padding:1px 7px;font-size:11.5px;font-weight:700}
.ps-n{color:var(--text);font-weight:600}
.ps-n b{color:#b45309}
.ps-t{color:#475569}
/* 申购日期：单据行最右侧（汇总以配送日期为准，申购日期只作参考） */
.ps-t.ps-date{margin-left:auto;color:#475569;background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;padding:1px 7px;line-height:17px;flex:none}
.ps-ok{margin-left:auto;color:#15803d;font-weight:700;font-size:12px;background:#ecfdf5;border:1px solid #bbf7d0;border-radius:6px;padding:1px 7px}
.ps-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}
.ps-chips.ps-clip{max-height:27px;overflow:hidden}
.ps-chip{background:#f1f5f9;border:1px solid #e2e8f0;border-radius:6px;padding:2px 8px;font-size:12px;color:var(--text)}
.ps-chip b{color:#1d4ed8}
@media (max-width:860px){.ps-ok{margin-left:0}.ps-l1{gap:6px}.ps-site{margin-left:0}}

/* ---------- 待汇总：勾选工具条 / 明细网格（师·生分开，不合并） ---------- */
.ps-bar{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 12px;padding:9px 12px;border-radius:10px;background:var(--card);border:1px solid var(--border);box-shadow:0 2px 10px rgba(15,23,42,.07)}
/* 工具条矩阵：第1行=配送日期下拉+汇总按钮，第2行=项目名称下拉+汇总信息条（上下对齐平行） */
.ps-matrix{display:grid;grid-template-columns:max-content 1fr;gap:8px 18px;align-items:center;width:100%}
.ps-row2{display:flex;align-items:center;gap:10px;min-width:0}
.ps-matrix .btn{height:36px;justify-self:start}
/* 汇总按钮 + 清除：并排紧邻，胶囊高度一致 */
.ps-go-wrap{display:flex;align-items:center;gap:8px;justify-self:start}
.ps-clr{height:36px;padding:0 16px;font-size:13px;line-height:1;border-radius:8px;border:1px solid #cbd5e1;background:#fff;color:#475569;font-weight:600}
.ps-clr:hover{background:#f8fafc;border-color:#94a3b8;color:#1e293b;opacity:1}
.ps-clr:disabled{background:#f8fafc;border-color:#e2e8f0;color:#cbd5e1;cursor:not-allowed;opacity:1}
/* 信息条在网格第二列时按内容宽度，不拉满整列 */
.ps-matrix .ps-scope{justify-self:start}
.ps-ck{display:inline-flex;align-items:center;gap:5px;font-size:13px;color:var(--text);cursor:pointer;user-select:none;flex:none}
.ps-ck input{width:15px;height:15px;cursor:pointer;accent-color:var(--primary);margin:0}
.ps-ck-all{font-weight:700;padding-right:4px;border-right:1px solid var(--border)}
.ps-pickinfo{font-size:13px;color:#475569}
.ps-pickinfo b{color:#1d4ed8;font-size:14px}
.ps-sp{flex:1 1 auto}
.ps-bar .btn[disabled]{opacity:.45;cursor:not-allowed}
.ps-row.sel{border-color:#93c5fd;background:#f0f9ff;box-shadow:0 0 0 2px rgba(59,130,246,.12)}
.ps-items{margin-top:7px;padding:7px 10px 5px;border-radius:8px;background:#f8fafc;border:1px solid #eef2f7}
.ps-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(238px,1fr));gap:0 18px}
.ps-it{display:flex;align-items:center;gap:6px;font-size:12.5px;line-height:2.1;border-bottom:1px solid #eef2f7;min-width:0;padding:1px 0}
.ps-it .n{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#334155}
.ps-it .ps-sp{color:#94a3b8;font-style:normal;font-size:11px;margin-left:4px}
.ps-it .q{flex:none;display:flex;align-items:center;gap:3px}
/* 师/生用量标签：同一食材老师与学生分开计数，任何界面都不合并 */
.qv{font-weight:700;white-space:nowrap;flex:none;font-size:11px;line-height:16px;padding:0 5px;border-radius:6px;margin-left:4px}
.qv.k-t{background:#fef3c7;color:#92400e}
.qv.k-s{background:#dbeafe;color:#1e40af}
.rv-i .qv,.rv-chip .qv{margin-left:4px}
/* 明细师生分组：老师在前 → 学生在后，不混放 */
.rvc-sec{margin-top:7px}
.rvc-sec-h{display:flex;align-items:baseline;gap:8px;font-size:12px;font-weight:700;color:#334155;line-height:1.6;border-bottom:1px dashed #e2e8f0;margin-bottom:2px}
.rvc-sec-t{flex:none}
.rvc-sec.sec-t .rvc-sec-t{color:#92400e}
.rvc-sec.sec-s .rvc-sec-t{color:#1e40af}
.rvc-sec.sec-p .rvc-sec-t{color:#64748b}
.rvc-sec-s{margin-left:auto;font-weight:400;font-size:11px;color:#94a3b8}
.rvc-sec-s b{color:#1d4ed8}
.ps-sec{margin-top:8px}
.ps-sec:first-child{margin-top:0}
.ps-sec-h{display:flex;align-items:baseline;gap:8px;font-size:12.5px;font-weight:700;color:#334155;line-height:1.7;border-bottom:1px dashed #e2e8f0;margin-bottom:1px}
.ps-sec-t{flex:none}
.ps-sec.sec-t .ps-sec-t{color:#92400e}
.ps-sec.sec-s .ps-sec-t{color:#1e40af}
.ps-sec.sec-p .ps-sec-t{color:#64748b}
.ps-sec-s{margin-left:auto;font-weight:400;font-size:11.5px;color:#94a3b8}
.ps-sec-s b{color:#1d4ed8}
.ws-lock{margin:0 0 10px;padding:9px 12px;border-radius:10px;background:#eff6ff;border:1px solid #bfdbfe;font-size:13px;color:#1e40af}
.ws-lock b{color:#1d4ed8}
@media (max-width:860px){.ps-grid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:0 12px}.ps-bar{gap:8px}}

/* ---------- 审核列表：批量勾选通过 ---------- */
.rv-selgrp{display:inline-flex;align-items:center;gap:10px;margin-left:12px;padding-left:12px;border-left:1px solid var(--border)}
.rvc-ck{flex:none;align-self:flex-start;padding-top:3px}
.rvc.sel{border-color:#93c5fd;background:#f0f9ff;box-shadow:0 0 0 2px rgba(59,130,246,.12)}
.btn-xs{padding:3px 10px;font-size:12px}

/* ---------- 待汇总表头筛选（配送日期 / 项目名称 两个下拉） ---------- */
.ps-flt{display:inline-flex;align-items:center;gap:6px;flex:none}
.ps-flts{display:flex;flex-direction:column;align-items:flex-start;gap:6px;flex:none}
.ps-flt-t{font-style:normal;font-size:11.5px;color:#64748b;font-weight:700;flex:none;padding-right:2px}
.ps-clr{font-style:normal;font-size:11.5px;color:var(--primary);cursor:pointer;flex:none;margin-left:2px}
.ps-clr:hover{text-decoration:underline}
.ps-sel{appearance:none;-webkit-appearance:none;height:32px;min-width:170px;max-width:250px;padding:0 30px 0 10px;border:1px solid #cbd5e1;border-radius:8px;background:#fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2364748b' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;font-size:13px;color:var(--text);cursor:pointer;text-overflow:ellipsis;font-family:inherit}
.ps-sel:hover{border-color:#93c5fd;background-color:#f8fbff}
.ps-sel:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px rgba(29,78,216,.12)}
.ps-scope{height:36px;display:inline-flex;align-items:center;font-size:12.5px;color:#334155;padding:0 12px;border-radius:8px;background:#f1f5f9;border:1px solid #e2e8f0;flex:none;white-space:nowrap}
.ps-scope b{color:#1d4ed8}
/* 表头下拉：点开为可勾选面板（列出全部配送日期/项目，多选） */
.ps-dd{position:relative;display:inline-block}
.ps-ddbtn{display:inline-flex;align-items:center;gap:6px;height:36px;min-width:104px;max-width:144px;padding:0 10px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;font:inherit;font-size:13px;color:var(--text);cursor:pointer}
.ps-ddbtn:hover{border-color:#93c5fd;background:#f8fbff}
.ps-dd.open .ps-ddbtn{border-color:var(--primary);box-shadow:0 0 0 3px rgba(29,78,216,.12)}
.ps-dd-t{flex:1 1 auto;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ps-arr{font-style:normal;color:#94a3b8;font-size:10px;transition:transform .15s}
.ps-dd.open .ps-arr{transform:rotate(180deg)}
.ps-pop{position:absolute;top:37px;left:0;z-index:60;width:272px;background:#fff;border:1px solid #e2e8f0;border-radius:10px;box-shadow:0 12px 30px rgba(15,23,42,.16);overflow:hidden}
.ps-pop-h{padding:7px 11px;font-size:11.5px;color:#64748b;font-weight:700;background:#f8fafc;border-bottom:1px solid #eef2f7}
.ps-pop-l{max-height:224px;overflow:auto;padding:4px}
.ps-opt{display:flex;align-items:center;gap:7px;padding:6px 8px;border-radius:7px;font-size:12.5px;color:#334155;cursor:pointer}
.ps-opt:hover{background:#f8fbff}
.ps-opt.on{background:#eff6ff;color:#1d4ed8;font-weight:600}
.ps-opt input{width:14px;height:14px;margin:0;accent-color:var(--primary);cursor:pointer}
.ps-opt-t{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ps-opt i{font-style:normal;font-size:11px;color:#94a3b8;flex:none}
.ps-pop-f{display:flex;align-items:center;gap:10px;padding:7px 10px;border-top:1px solid #eef2f7;background:#fcfdff}
.ps-pop-f u{font-size:11.5px;color:var(--primary);cursor:pointer;text-decoration:none}
.ps-pop-f u:hover{text-decoration:underline}
.ps-pop-f .btn{margin-left:auto}
/* 全选行 + 分隔线（Excel 筛选按钮式：先全选，再逐项勾选） */
.ps-opt-all{border-bottom:0;font-weight:700;color:#0f172a;background:#f8fafc;border-radius:7px}
.ps-opt-all:hover{background:#eff6ff}
.ps-opt-all.on{color:#0f172a;background:#eef2f7}
.ps-opt-all i{font-weight:400}
.ps-pop-div{height:1px;background:#eef2f7;margin:4px 8px}
.ps-pop-none{padding:10px;text-align:center;font-size:12px;color:#94a3b8}
.ps-ddbtn.has-flt{border-color:#93c5fd;background:#eff6ff;color:#1d4ed8;font-weight:600}
/* 列表页筛选工具条（审核 / 我的申购 / 待汇总统一） */
.rv-flt{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:9px 12px;margin-bottom:10px;border-radius:11px;background:#fff;border:1px solid #e2e8f0;box-shadow:0 2px 10px rgba(15,23,42,.05)}
.rv-flt .btn,.rv-flt .ps-ddbtn{height:36px}
/* 选中后有可点的动作按钮：高亮，让用户一眼看到能按 */
.ps-bar .btn-primary:not([disabled]),.rv-flt .btn-primary:not([disabled]),.rv-selgrp .btn-primary:not([disabled]){box-shadow:0 4px 14px rgba(29,78,216,.32);font-weight:700;animation:psGlow .5s ease-out}
@keyframes psGlow{from{box-shadow:0 0 0 rgba(29,78,216,0)}to{box-shadow:0 4px 14px rgba(29,78,216,.32)}}
/* 汇总按钮数字：与侧边导航徽标同款（实心橙胶囊 + 白色数字） */
.ps-num{display:inline-flex;align-items:center;justify-content:center;min-width:21px;height:21px;padding:0 6px;border-radius:11px;background:#d97706;color:#fff;font-size:12.5px;font-weight:800;line-height:21px;letter-spacing:0;vertical-align:middle;margin-left:5px;box-shadow:0 1px 3px rgba(217,119,6,.45);text-indent:0}
.ps-nin{font-style:normal;display:inline-block;transform:translate(-.5px,-.6px)}
.ws-filters.ps-matrix{border-top:1px solid var(--border);border-bottom:1px solid var(--border);padding:8px 0;margin-bottom:8px}
.ws-export{white-space:nowrap;justify-self:start}
/* 待汇总页头：截单时间（日历 + 时钟） */
.cut-in{height:36px;padding:0 9px;border:1px solid var(--border);border-radius:8px;background:#fff;color:var(--text);font-size:13px;font-family:inherit;cursor:pointer;box-sizing:border-box}
#page-pending-summary .page-head .cut-in{height:40px;padding:0 11px;font-size:14px;align-self:center}
.cut-in:hover{border-color:#94a3b8}
.cut-in:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.cut-time{width:112px}
#cut-date{width:148px}
.cut-now{font-size:12.5px;color:#475569;white-space:nowrap;display:inline-flex;align-items:center;gap:6px}
.cut-now i{font-style:normal;padding:2px 7px;border-radius:6px;background:#f1f5f9;border:1px solid #e2e8f0}
.ps-hand{font-style:normal;line-height:1;display:inline-flex;align-items:center;margin-right:0;flex:0 0 auto}
.ps-hand svg{width:30px;height:17px;display:block}
/* 带黄色箭头的动作按钮：底色黄色、深色文字，图标/文字/数字同轴对齐 */
#ps-go.btn-primary,.ws-export.btn-primary,#exp-order-btn.btn-primary{display:inline-flex;align-items:center;gap:7px;background:#fde047;border-color:#eab308;color:#232a5c}
#ps-go.btn-primary:hover:not([disabled]),.ws-export.btn-primary:hover:not([disabled]),#exp-order-btn.btn-primary:hover:not([disabled]){background:#fef08a;border-color:#d97706;color:#232a5c}
#ps-go.btn-primary[disabled],.ws-export.btn-primary[disabled],#exp-order-btn.btn-primary[disabled]{background:#fef9c3;border-color:#f1f5f9;color:#94a3b8;box-shadow:none}
#ps-go.btn-primary .ps-num,.ws-export.btn-primary .ps-num,#exp-order-btn.btn-primary .ps-num{margin-left:0}
.btn-primary[disabled] .ps-num{background:#c3d5f0;color:#fff;box-shadow:none}
#ps-go.btn-primary[disabled] .ps-num,.ws-export.btn-primary[disabled] .ps-num,#exp-order-btn.btn-primary[disabled] .ps-num{background:#e2e8f0;color:#94a3b8;box-shadow:none}
.ps-bar .btn-primary[disabled]{background:#dbeafe;color:#93b4f7;border-color:#dbeafe;opacity:1}
.ps-scope-from{font-style:normal;font-size:11.5px;color:#94a3b8}
/* 不在本次筛选范围的单：仍显示，灰显标注 */
.ps-row.out{opacity:.62;background:#fbfcfe;border-left-color:#e2e8f0!important}
.ps-row.out:hover{opacity:.82}
.ps-row.out .ps-l1 .ps-no{color:#64748b}
.ps-out-tag{font-size:11px;line-height:18px;padding:0 7px;border-radius:6px;background:#f1f5f9;color:#64748b;border:1px solid #e2e8f0;flex:none}
@media (max-width:1100px){.ps-flt{flex:1 1 auto}.ps-sel{max-width:none;min-width:140px}}


/* ===== 全局倒计时条：递交申购（仓管）+ 审核（厨师长/项目经理/营运/采购） ===== */
/* 倒计时条：已移入仪表盘页内（不再全局置顶 sticky） */
.sla-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  margin:0 0 16px;padding:10px 16px;background:linear-gradient(#ffffff,#f8fafc);
  border:1px solid var(--border);border-radius:12px;box-shadow:0 2px 10px rgba(15,23,42,.05)}
/* 仪表盘深色主题下的倒计时条配色 */
#page-dashboard.dash-dark .sla-bar{background:linear-gradient(#10264a,#0e213f);border-color:#1e3a5f;box-shadow:none}
#page-dashboard.dash-dark .sla-chip{background:#0f2440;border-color:#1e3a5f}
#page-dashboard.dash-dark .sla-chip:hover{box-shadow:0 6px 18px rgba(0,0,0,.4)}
#page-dashboard.dash-dark .sla-tx b{color:#dcebf7}
#page-dashboard.dash-dark .sla-tx i{color:#7d97b4}
.sla-chip{display:inline-flex;align-items:center;gap:9px;height:44px;padding:0 14px;border:1px solid #e2e8f0;
  border-radius:12px;background:#fff;cursor:pointer;font-family:inherit;text-align:left;transition:box-shadow .15s,transform .15s}
.sla-chip:hover{box-shadow:0 6px 18px rgba(15,23,42,.12);transform:translateY(-1px)}
.sla-chip.sub{border-left:4px solid var(--primary)}
.sla-chip.rev{border-left:4px solid var(--warning)}
.sla-ico{font-size:17px;line-height:1;flex:none}
.sla-tx{display:flex;flex-direction:column;gap:1px;line-height:1.2;min-width:0}
.sla-tx b{font-size:13px;color:#1e293b;white-space:nowrap}
.sla-tx i{font-style:normal;font-size:11.5px;color:#64748b;white-space:nowrap;max-width:330px;overflow:hidden;text-overflow:ellipsis}
.sla-num{font-family:"SFMono-Regular",Consolas,"Courier New",monospace;font-size:19px;font-weight:800;
  letter-spacing:.6px;font-variant-numeric:tabular-nums;color:var(--primary);min-width:92px;text-align:right;flex:none}
.sla-chip.warn .sla-num{color:#d97706}
.sla-chip.danger .sla-num{color:var(--danger);animation:slaPulse 1.1s ease-in-out infinite}
.sla-chip.closed{background:#f8fafc;border-color:#e2e8f0}
.sla-chip.closed .sla-num{color:#94a3b8;animation:none}
.sla-chip.closed .sla-tx b{color:#64748b}
.sla-chip.rev.idle .sla-num{color:#94a3b8;font-size:16px}
@keyframes slaPulse{0%,100%{opacity:1}50%{opacity:.45}}
/* 单据卡上的本环节倒计时徽标 */
.m-sla{display:inline-flex;align-items:center;gap:6px;margin-top:4px;padding:2px 8px;border-radius:8px;
  background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;font-size:12px;line-height:18px;width:max-content}
.m-sla .m-sla-k{font-weight:700}
.m-sla b{font-family:"SFMono-Regular",Consolas,monospace;font-variant-numeric:tabular-nums;font-size:12.5px}
.m-sla.over{background:#fef2f2;border-color:#fecaca;color:#b91c1c}
/* 下单页：递交截止提示 */
.oe-sla-hint{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;color:#9a3412;background:#fff7ed;
  border:1px solid #fed7aa;border-radius:8px;padding:5px 9px;white-space:nowrap}
.oe-sla-hint b{font-family:"SFMono-Regular",Consolas,monospace;font-size:13px}
.oe-sla-hint.closed{background:#f8fafc;border-color:#e2e8f0;color:#64748b}
@media (max-width:720px){
  .sla-bar{margin:0 0 12px;padding:8px 12px;gap:8px}
  .sla-chip{height:40px;padding:0 10px;flex:1 1 100%}
  .sla-num{font-size:17px;min-width:84px}
  .sla-tx i{max-width:180px}
}
/* 审核超时已转系统管理员代审：红色提醒条 */
.rv-esc-bar{margin:0 0 8px;padding:8px 12px;border-radius:10px;background:#fef2f2;border:1px solid #fecaca;
  color:#991b1b;font-size:13px;line-height:1.5}
.rv-esc-bar b{font-size:15px;color:#b91c1c}

/* ===== 时限设置页（管理中心，仅系统管理员） ===== */
.st-wrap{display:grid;gap:14px;max-width:100%}
/* 申购时限卡：收窄到内容宽度，行内按钮紧跟时间胶囊 */
.st-fit{max-width:600px}
/* 顶部两栏（各占一半）：左栏竖向排 申购时限 → 审核时限 → 申购计时提醒；右栏 申购范围与张数 */
.st-top{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;align-items:stretch;max-width:100%} /* 两栏等高：右栏申购范围卡与左列底部齐平 */
@media (max-width:1180px){.st-top{grid-template-columns:1fr}}
.st-lcol{display:grid;grid-template-rows:auto auto auto 1fr;gap:14px;align-content:start;min-width:0;--st-line-cols:78px 24px 70px 64px 24px 70px 64px max-content} /* 共享列模板：审核时限行与申购时限行同列对齐（第8列=默认/临时开关列）；末行 1fr=审核时限卡拉伸补足，左右两栏底部齐平 */
.st-duo{display:grid;grid-template-columns:minmax(0,1fr) 480px;gap:14px;align-items:start;max-width:960px}
@media (max-width:1000px){.st-duo{grid-template-columns:1fr}}
/* 申购时限：整体一块，按「类别行 + 其临时调整行」成对竖排，行间无分割线；占满左栏（=半列宽） */
.st-card-doc{width:100%;max-width:100%}
.st-docs{display:grid;gap:8px;overflow-x:auto}
.st-doc-g{display:grid;gap:10px;padding:6px 0}
.st-sw-row{display:inline-flex;align-items:center;gap:6px;cursor:pointer;white-space:nowrap}
.st-doc-line{display:grid;grid-template-columns:var(--st-line-cols);column-gap:10px;align-items:center;white-space:nowrap} /* 固定列：大类名/开始/日期/时间/结束/日期/时间/开关——两行的开始、结束、开关全部竖向对齐；与审核时限行共享模板 */
/* 大类名与临时调整：侧边栏导航胶囊同款（23px 高 / 999px 胶囊圆角 / 悬停蓝色高亮 / 宽度随文字自适应） */
.st-doc-line .st-doc-nm{display:inline-flex;align-items:center;justify-content:center;height:23px;width:auto;padding:0 12px;box-sizing:border-box;flex:none;font-size:12px;color:#334155;font-weight:600;border:1px solid var(--border);border-radius:999px;background:transparent;white-space:nowrap;cursor:default;transition:background .15s,border-color .15s,color .15s}
.st-doc-line .st-doc-nm:hover{color:#fff;background:var(--primary);border-color:var(--primary)}
/* 临时调整行：外层 b 仅作容器（内层按钮才是胶囊），避免双层胶囊 */
.st-doc-tmp .st-doc-nm{border:none;background:none;padding:0}
.st-doc-tmp .st-doc-nm:hover{color:inherit;background:none;border:none}
.st-doc-line .st-doc-nm .st-mini{font-weight:600;height:23px;width:auto;padding:0 12px;box-sizing:border-box;border-radius:999px;border:1px solid var(--border);background:transparent;color:#334155;font-size:12px;cursor:pointer}
.st-doc-line .st-doc-nm .st-mini:hover{color:#fff;background:var(--primary);border-color:var(--primary)}
.st-doc-line .st-doc-nm .st-mini.on:hover{background:#1e40af;border-color:#1e40af}
.st-doc-line .st-pill{display:contents}
.st-doc-line .st-dt{height:30px;width:70px;border:1px solid var(--border);border-radius:8px;background:#fff;font-family:inherit;font-size:12px;color:#334155;padding:0 2px;text-align:center} /* 日期框加高到30px并加可见边框，方便点击编辑 */
.st-doc-line .st-dt::-webkit-calendar-picker-indicator{display:none}
.st-doc-line .st-hm{width:64px}
.st-doc-line .st-pill.sm .st-hm{height:30px;width:64px;font-size:13px;font-weight:600;padding:0;border:1px solid var(--border);border-radius:8px;background:#fff;text-align:center;margin-left:0} /* 时间框加高到30px、加宽到64px并显示边框：修改窗口更大更好点 */
.st-doc-line .st-sub-acts{margin-left:0}
.st-doc-line .st-unit{font-size:12px;color:#334155;font-weight:600} /* 与「每日申购」胶囊文字同色同号 */
.st-doc-tmp .st-hm{color:#B45309}
.st-doc-tmp .st-dt{color:#B45309}
.st-doc-line .st-mini{font-size:11.5px;padding:3px 8px;border:1px solid var(--border);border-radius:8px;box-sizing:border-box}
/* 恢复默认/临时生效：可点时悬停高亮蓝色（与「临时调整」一致） */
.st-doc-line .st-sub-acts .st-mini:hover{background:var(--primary);border-color:var(--primary);color:#fff}
/* 已实施的那个：保持现在的颜色、不响应悬停、不可再按 */
.st-doc-line .st-sub-acts .st-mini.done,.st-doc-line .st-sub-acts .st-mini.done:hover{background:transparent;border-color:var(--border);color:#334155;cursor:default}
/* 时间输入框取消时钟选择器图标：点击后直接键入时/分 */
input[type="time"]::-webkit-calendar-picker-indicator{display:none}
input[type="time"]{-webkit-appearance:none;appearance:none}
/* 申购范围与张数：大类勾选块 */
.st-card-scope{width:100%;max-width:100%}
/* 申购范围在右栏半列宽：说明文字允许换行，不做横向滚动 */
.st-card-scope .st-doc-line{display:flex;white-space:normal;flex-wrap:wrap;row-gap:6px}
.st-card-scope .st-unit{white-space:normal;line-height:1.5}
.st-cats{display:flex;flex-wrap:wrap;gap:4px;align-items:center;min-width:0;flex:1}
/* 申购范围：组名胶囊加高 23→46px（用户指定加高1倍） */
.st-card-scope .st-doc-line .st-doc-nm{height:46px}
/* 申购范围大类：两列竖排勾选列表（用户拍板样式）——每行 勾选框+大类名，选中行蓝底 */
.st-card-scope .st-cats{display:grid;grid-template-columns:1fr 1fr;gap:6px 14px;flex:1;min-width:0;max-width:66%} /* 每个大类行缩短 1/3：整体限宽 2/3，过长名称省略号 */
/* 周三预定 / 下周预定 左右并排：各为单列竖排，组名胶囊居左、全选/清空竖排居右 */
.st-card-scope .st-scope-pair{display:grid;grid-template-columns:1fr 1fr;gap:14px;flex-wrap:nowrap;align-items:stretch}
.st-scope-grp{display:flex;gap:10px;align-items:center;min-width:0}
.st-scope-side{display:flex;flex-direction:column;align-items:center;gap:8px;flex:none} /* 组名胶囊在上、全选/清空竖排在下：两组按钮处于同一竖直位置 */
.st-card-scope .st-scope-grp .st-cats-col{grid-template-columns:1fr;max-width:none;gap:5px;align-self:stretch}
.st-scope-grp .st-acts-col{display:flex;flex-direction:column;gap:6px;flex:none}
.st-card-scope .st-cat{display:flex;align-items:center;justify-content:flex-start;text-align:left;gap:8px;font-size:13px;color:#334155;background:#fff;border:1px solid var(--border);border-radius:8px;padding:5px 10px;cursor:pointer;white-space:nowrap;min-width:0}
.st-card-scope .st-cat:hover{border-color:#94a3b8;background:#f8fafc}
.st-card-scope .st-cat.on{background:#E6F1FB;border-color:#1d4ed8;color:#1e293b}
.st-card-scope .st-cat span{overflow:hidden;text-overflow:ellipsis}
.st-cat-chk{width:15px;height:15px;accent-color:#1d4ed8;flex:none;margin:0;cursor:pointer}
.st-cat-no{font-style:normal;font-size:10.5px;font-weight:600;color:#94a3b8;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:5px;padding:1px 5px;flex:none;letter-spacing:.2px} /* 大类前端编码号段标注 */
.st-card-scope .st-cat.on .st-cat-no{color:#1d4ed8;background:#fff;border-color:#bfdbfe}
.st-cat-grp{display:inline-flex;align-items:center;gap:4px;padding-right:10px}
.st-cat{all:unset;cursor:pointer;font-size:11.5px;padding:2px 9px;border:1px solid var(--border);border-radius:8px;color:#475569;background:#fff;white-space:nowrap}
.st-cat:hover{border-color:#94a3b8;color:#1e293b;background:#f8fafc}
.st-cat.on{background:#1d4ed8;border-color:#1d4ed8;color:#fff}
.st-cat.on:hover{background:#1e40af;border-color:#1e40af;color:#fff}
.st-cat-t{font-weight:700}
.st-doc-line .st-num{height:23px;width:64px;font-size:13px;text-align:center;border-radius:8px}
.st-date{font-size:11.5px;color:#475569;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:8px;padding:1px 7px;white-space:nowrap;cursor:default}
.st-doc-line .st-date{display:inline-flex;align-items:center;justify-content:center;width:70px;height:23px;box-sizing:border-box;font-size:11.5px;color:#94a3b8;background:transparent;border:none}
.st-date.tmp{background:#FDEBD3;border-color:#f0c894;color:#B45309}
.st-pill.sm.tmp{background:#FFF9F0;border-color:#f0c894}
.st-mini.on{background:#1d4ed8;border-color:#1d4ed8;color:#fff}
.st-mini.on:hover{background:#1e40af;border-color:#1e40af;color:#fff}
.st-half .st-row{gap:10px}
.st-card{background:#fff;border:1px solid var(--border);border-radius:14px;padding:14px 18px}
.st-h{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:4px}
.st-h b{font-size:14px;color:#1e293b}
.st-h i{font-style:normal;font-size:12px;color:#64748b}
.st-h .st-badge{margin-left:auto;font-size:11.5px;color:#854F0B;background:#FAEEDA;border-radius:999px;padding:2px 9px}
.st-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 0;border-top:1px dashed #eef2f7}
.st-row:first-of-type{border-top:none}
.st-lab{min-width:0}
.st-lab b{display:block;font-size:13px;color:#334155;font-weight:600}
.st-lab i{display:block;font-style:normal;font-size:12px;color:#94a3b8;margin-top:2px;line-height:1.5}
.st-ctl{display:flex;align-items:center;gap:8px;flex:none}
.st-hm,.st-num{height:36px;border:1px solid var(--border);border-radius:9px;padding:0 9px;font-family:inherit;font-size:13px;background:#fff;color:#1e293b}
.st-num{width:74px;text-align:center;font-family:"SFMono-Regular",Consolas,monospace;font-weight:700}
.st-hm{width:108px}
.st-unit{font-size:12px;color:#94a3b8}
.st-grid4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:8px}
.st-audit{display:flex;align-items:flex-start;gap:36px;margin-top:6px}
.st-roles{display:grid;gap:8px;width:250px}
.st-role{display:flex;align-items:center;justify-content:space-between;gap:12px}
.st-role b{font-size:13px;color:#334155;font-weight:600}
.st-role .st-in{display:flex;align-items:center;gap:5px}
.st-role .st-num{width:32px;padding:0 2px;text-align:center}
.st-chips-v{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding-top:2px}
.st-auto{display:flex;align-items:center;gap:8px;margin-top:8px;cursor:pointer;font-size:12.5px;color:#334155;font-weight:600;white-space:nowrap}
.st-pill{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--border);border-radius:999px;padding:4px 6px 4px 14px;background:#fff;white-space:nowrap}
.st-pill b{font-size:13px;color:#1e293b;font-weight:700}
.st-pill .st-hm{height:30px;width:96px;border-radius:999px}
.st-sel{height:26px;border:1px solid var(--border);border-radius:999px;background:#fff;font-family:inherit;font-size:12.5px;color:#1e293b;padding:0 2px;cursor:pointer}
.st-colon{font-size:13px;color:#64748b;font-weight:700}
/* 申购时限 + 审核时限：同一卡片左右两栏 */
.st-two{display:flex;align-items:flex-start;gap:0}
.st-col{display:grid;gap:10px;align-content:start}
.st-col:first-child{width:600px;flex:none}
.st-col+.st-col{border-left:1px solid var(--border);padding-left:28px;margin-left:28px;flex:1}
.st-pills-v{display:grid;gap:8px;justify-items:start}
.st-pills-v .st-pill{width:100%;justify-content:space-between}
/* 申购时限三行：名称 + 开始/结束胶囊 + 行内操作 */
.st-sub{display:grid;gap:8px}
.st-sub-row{display:flex;align-items:center;gap:8px}
.st-sub-row>b{font-size:13px;color:#334155;font-weight:600;width:92px;flex:none}
.st-sub-times{display:flex;align-items:center;gap:6px}
.st-pill.sm{padding:2px 4px 2px 9px;gap:5px}
.st-pill.sm .st-unit{font-size:11px}
.st-pill.sm .st-hm{height:26px;width:82px;font-size:12.5px}
.st-sub-acts{display:flex;gap:5px;margin-left:auto}
.st-mini{all:unset;cursor:pointer;font-size:11.5px;padding:3px 8px;border-radius:999px;border:1px solid var(--border);color:#475569;background:#fff;white-space:nowrap}
.st-mini:hover{border-color:#94a3b8;color:#1e293b;background:#f8fafc}
/* 审核时限四行：岗位 + 5/10/15/20 四档 */
.st-roles{display:grid;gap:7px}
.st-role{display:flex;align-items:center;gap:10px}
.st-role b{font-size:13px;color:#334155;font-weight:600;width:64px;flex:none}
.st-chips-r{display:flex;gap:6px}
.st-chips-r .st-chip{padding:2px 12px;font-size:12px;text-align:center}
.st-cell{background:#f8fafc;border:1px solid #eef2f7;border-radius:11px;padding:9px 10px}
.st-cell b{display:block;font-size:12.5px;color:#475569;margin-bottom:6px}
.st-cell .st-in{display:flex;align-items:center;gap:5px}
.st-chips{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:10px}
.st-chip{all:unset;cursor:pointer;font-size:12px;padding:4px 11px;border-radius:999px;border:1px solid var(--border);color:#64748b;background:#fff}
.st-chip.on{background:#FFF3E0;border-color:#F0A64A;color:#B45309;font-weight:600}
.st-tot{margin-left:auto;font-size:12.5px;color:#64748b}
.st-tot b{font-family:"SFMono-Regular",Consolas,monospace;font-size:15px;color:#1e293b}
.st-sw{appearance:none;-webkit-appearance:none;width:40px;height:22px;border-radius:999px;background:#cbd5e1;position:relative;cursor:pointer;transition:background .15s;border:none;flex:none}
.st-sw:checked{background:var(--primary)}
.st-sw::after{content:"";position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:#fff;transition:left .15s}
.st-sw:checked::after{left:20px}
.st-sw:disabled{opacity:.38;cursor:not-allowed}
/* 申购时限行内「默认/临时」开关标签 */
.st-sw-lab{font-size:11.5px;font-weight:600;color:#64748b;white-space:nowrap}
.st-now{margin-top:8px;padding:8px 12px;border-radius:10px;font-size:12.5px;line-height:1.6}
/* 审核时限：左栏半列宽，四个岗位竖排一列，每岗 5/10/15/20 四档开关四选一；行网格与上方申购时限行同列——20 档开关与「默认/临时」开关同列（第8列）竖向对齐 */
.st-card-audit .st-roles{width:100%;grid-template-columns:1fr;gap:12px}
.st-card-audit .st-role{display:grid;grid-template-columns:var(--st-line-cols);column-gap:10px;align-items:center;justify-content:start}
.st-card-audit .st-role .st-swset{display:contents} /* 开关行升为网格项，按 grid-column 2/4/6/8 落位 */
/* 申购计时提醒：左栏半列宽，标题+开关+上下班时间一行排开，状态条在下方 */
.st-wh{width:100%;padding:12px 16px 11px}
.st-wh-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.st-wh-t{font-size:13px;color:#334155;font-weight:600;white-space:nowrap}
.st-wh .st-badge{font-size:10.5px;color:#854F0B;background:#FAEEDA;border-radius:999px;padding:1px 7px;white-space:nowrap}
.st-seg{display:grid;grid-template-columns:1fr 1fr;gap:3px;padding:3px;background:#f1f5f9;border-radius:9px;width:140px;flex:none}
.st-seg-b{all:unset;cursor:pointer;height:22px;line-height:22px;text-align:center;font-size:12px;font-weight:600;color:#475569;border-radius:7px;transition:background .15s,color .15s,box-shadow .15s}
.st-seg-b:hover{color:#1d4ed8}
.st-seg-b.on{background:#fff;color:#1d4ed8;box-shadow:0 1px 2px rgba(15,23,42,.12)}
.st-wh-time{display:flex;align-items:center;gap:5px;margin-left:auto;white-space:nowrap}
.st-wh-lb{font-size:11.5px;color:#64748b;font-weight:600}
.st-wh .st-hm{height:23px;width:56px;border:1px solid transparent;border-radius:8px;background:#f8fafc;font-family:inherit;font-size:12px;font-weight:600;color:#334155;text-align:center;padding:0}
.st-wh .st-hm:focus{border-color:#c7d2fe;background:#fff;outline:none}
.st-wh .st-hm:disabled{opacity:.45}
.st-wh-dash{color:#cbd5e1;font-size:11px}
.st-wh .st-now{margin-top:9px;padding:6px 10px;font-size:11.5px;line-height:1.5;border-radius:8px}
.st-now.ok{background:#f0fdf4;border:1px solid #bbf7d0;color:#15803d}
.st-now.pause{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412}
.st-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 18px;background:#f8fafc;border:1px solid var(--border);border-radius:12px;font-size:12.5px;color:#64748b} /* 置顶状态栏：位于 toprow 左格=左列同宽 */
.st-foot b{color:#334155}
/* 底部「立即生效」按钮：整体保存入口（与开关自动保存同功能），蓝底主按钮 */
.st-foot-r{display:flex;align-items:center;gap:12px}
.st-save{all:unset;cursor:pointer;font-size:12.5px;font-weight:700;color:#fff;background:var(--primary);border-radius:999px;padding:6px 20px;white-space:nowrap;transition:background .15s}
.st-save:hover{background:#1e40af}
.st-save:active{transform:translateY(1px)}
.st-link{color:var(--primary);cursor:pointer;text-decoration:underline}
@media (max-width:760px){.st-grid4{grid-template-columns:repeat(2,minmax(0,1fr))}.st-row{flex-wrap:wrap}}

/* 已导出存放区：勾选下单 */
.exp-sel-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:10px;padding:9px 16px;
  border:1px solid #f0a64a;border-radius:999px;background:#FFF7EA;font-size:13px;color:#334155}
.exp-sel-bar b{font-size:14px}
.exp-sel-chk{color:#B45309}
.exp-sel-bar .btn{flex:none}
.exp-done-tag{display:inline-block;margin-left:6px;padding:1px 8px;border-radius:999px;background:#E1F5EE;
  border:1px solid #9FE1CB;color:#0F6E56;font-size:11px;font-weight:600;vertical-align:1px}
.sm-table tbody tr{cursor:default}
.sm-table tbody tr:not([style*="opacity"]) td:first-child{cursor:pointer}

/* 已导出归档：周为单位 → 大类 → 日期 */
.exp-wk{margin-bottom:26px}
.exp-wk-h{display:flex;align-items:center;gap:10px;padding:9px 14px;margin-bottom:12px;border-radius:10px;
  background:linear-gradient(90deg,#0f172a,#1e3a5f);color:#e2e8f0;font-size:14px}
.exp-wk-t{font-weight:800;letter-spacing:.3px}
.exp-wk-now{padding:1px 9px;border-radius:999px;background:#f59e0b;color:#0f172a;font-size:11px;font-weight:700}
.exp-wk-s{margin-left:auto;font-size:12px;color:#cbd5e1}
.exp-wk-s b{color:#fff;font-size:13px}
.exp-wk-acts{display:flex;align-items:center;gap:8px;flex:none}
.exp-wk-dl{color:#7dd3fc;font-size:12.5px;font-weight:600;text-decoration:none;white-space:nowrap}
.exp-wk-dl:hover{text-decoration:underline}
.exp-wk-h .btn-sm{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.35);color:#e2e8f0}
.exp-wk-h .btn-sm:hover{background:rgba(255,255,255,.22)}
.ws-table tr.ws-date-h td{background:#f1f5f9;border-top:1px solid #e2e8f0;font-size:12.5px;font-weight:700;
  color:#1e3a8a;padding:5px 10px}
.ws-date-n{margin-left:auto;float:right;font-weight:600;color:#475569}
.ws-date-n b{color:#1d4ed8}

/* 申购跟踪页内状态 Tab */
.trk-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}
.trk-tab{border:1px solid #e2e8f0;background:#fff;color:#475569;border-radius:18px;padding:4px 12px;font-size:12.5px;cursor:pointer;display:inline-flex;align-items:center;gap:5px}
.trk-tab span{font-size:11px;background:#f1f5f9;border-radius:9px;padding:0 6px;min-width:16px;text-align:center}
.trk-tab.on{background:#eff6ff;border-color:#3b82f6;color:#1d4ed8;font-weight:600}
.trk-tab.on span{background:#dbeafe;color:#1d4ed8}
.trk-tab.hasrej{border-color:#fca5a5;color:#b91c1c}
.trk-tab.hasrej span{background:#fee2e2;color:#b91c1c}

/* 周菜单底板：7 天并列田字格总览 */
.wm7{width:100%;border-collapse:collapse;table-layout:fixed;font-size:12.5px}
.wm7 col.wm-c0{width:78px}
.wm7 col.wm-cn{width:58px}
.wm7 th,.wm7 td{border:1px solid #d7dee8;text-align:center;vertical-align:middle;padding:3px 4px;background:#fff}
.wm7 th.wm-corner{background:#f8fafc;border-color:#d7dee8}
.wm7 th.wm-snh{background:#f8fafc;color:#92400e;font-size:11.5px;font-weight:600;padding:4px 2px}
.wm7 th.wm-wd{background:#f1f5f9;font-weight:600;color:#334155;padding:6px 2px;font-size:13px}
.wm7 th.wm-wd.wk{background:#fef3c7;color:#92400e}
.wm7 th.wm-wd.today{background:#dbeafe;color:#1d4ed8}
.wm7 .wm-drow td{background:#f8fafc;color:#64748b;font-size:12px;padding:4px 2px}
.wm7 .wm-drow td.today{background:#dbeafe;color:#1d4ed8;font-weight:600}
.wm7 tr.wm-sec td{background:#eef2f7;color:#1e293b;font-weight:600;padding:5px 8px;text-align:left;border-top:2px solid #94a3b8}
.wm7 tr.wm-sec td .tag{display:inline-block;background:#1d4ed8;color:#fff;border-radius:5px;padding:1px 10px;margin-right:8px;font-size:12px}
.wm7 tr.wm-sec.meal-b td .tag{background:#b45309}
.wm7 tr.wm-sec.meal-d td .tag{background:#0f766e}
.wm7 tr.wm-sec td .t{font-weight:400;color:#64748b;font-size:11.5px}
.wm7 th.wm-slot{background:#f8fafc;color:#475569;font-weight:500;font-size:12px;padding:4px 2px}
.wm7 th.wm-slot.wm-n{color:#b45309}
.wm7 td.wm-scell{background:#fffdf5;padding:2px}
.wm7 td.wm-scell input{width:100%;min-width:0;text-align:center;border:1px solid #eadfc8;border-radius:4px;padding:3px 1px;font-size:11.5px;background:#fff;color:#92400e}
.wm7 td.wm-scell input::placeholder{color:#c4b28c;font-weight:400}
.wm7 td select{width:100%;font-size:12px;padding:3px 2px;text-align:center;text-align-last:center;border:1px solid #cbd5e1;border-radius:4px;background:#fff;color:#1e293b}
.wm7 td select.dup{border-color:#dc2626;color:#dc2626;background:#fef2f2;font-weight:600}
.wm7 td.wm-ncell{background:#fffdf5}
.wm7 td.wm-ncell input{width:100%;min-width:0;text-align:center;border:1px solid #e7dcc3;border-radius:4px;padding:3px 2px;font-size:12px;background:#fff}
.wm7 td.wm-ocell{padding:4px 3px}
.wm7 td.wm-ocell .btn-xs.wm-gen{font-size:11.5px;padding:2px 8px}
.wm7 td.wm-ocell .st{font-size:11.5px;color:#94a3b8}
.wm7 td.wm-ocell .st.ok{color:#15803d;font-weight:600}
.wm7 td.wm-ocell .st.draft{color:#b45309}
.wm-hint{margin-top:10px;font-size:12px;color:#64748b}
.wm-hint b{color:#334155}
.wm-hint b.dup{color:#dc2626}
/* 供应商定价（半月周期）：已改价行高亮 */
.sp-changed td{background:#fffbeb}
.sp-changed td:nth-child(5) input{border-color:#f59e0b;color:#b45309;font-weight:600}
.wm-sitesel{display:flex;align-items:center;gap:8px;margin-bottom:10px;font-size:13px;color:#334155;font-weight:600}
.wm-sitesel select{min-width:180px;font-size:13px;padding:4px 8px}
/* 价格计算模版（仅管理员）：Excel 式表格 */
.pt7{width:100%;border-collapse:collapse;font-size:12px;table-layout:auto}
.pt7 thead th{position:sticky;top:0;z-index:2;background:#f1f5f9;color:#334155;font-weight:600;padding:6px 4px;border-bottom:2px solid #cbd5e1;text-align:center;white-space:nowrap}
.pt7 td{border-bottom:1px solid #eef2f7;padding:2px 4px;vertical-align:middle;background:#fff}
.pt7 tr:hover td{background:#f8fafc}
.pt7 td.pt-c{text-align:center;color:#475569;white-space:nowrap}
.pt7 td.pt-n{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.pt7 td.pt-out{color:#0f766e;font-variant-numeric:tabular-nums}
.pt7 td input[type=number]{width:74px;text-align:right;padding:3px 4px;font-size:12px}
.pt7 td select{padding:3px 2px;font-size:12px}
.pt7 tr.pt-chg td{background:#fffbeb}
.pt7 tr.pt-chg td.pt-out{color:#b45309;font-weight:600}
.pt7 tr.pt-chg td:first-child{box-shadow:inset 3px 0 0 #f59e0b}

/* 单日专注：表头「专注」按钮 / 专注提示条 / 专注列高亮 */
.wb-fcbtn { font-size: 11px; font-weight: 700; padding: 2px 9px; border: 1px solid var(--primary); color: var(--primary); background: #eff6ff; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.wb-fcbtn:hover { background: #dbeafe; }
.wb-th-focus { box-shadow: inset 0 0 0 2px var(--primary); }
.wb-fc-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; padding: 7px 12px; margin: 8px 0; font-size: 13px; }
.wb-fc-bar b { color: var(--primary); }
.wb-fc-bar .btn-xs[disabled] { opacity: .45; cursor: not-allowed; }
.wb-fc-exit { background: var(--primary); color: #fff; border-color: var(--primary); }
.wb-fc-exit:hover { filter: brightness(1.08); }

/* 「继续上次填写」横幅：登录/刷新后提示未填完的申购现场，一键回到现场 */
/* 「继续上次申购」大卡片（方案A：遮罩 + 居中卡片，必须二选一，手机电脑同款） */
.resume-modal-mask { position: fixed; inset: 0; z-index: 9400; background: rgba(9, 20, 38, .55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.resume-card { width: min(92vw, 520px); background: #fff; border-radius: 18px; padding: 24px 22px 18px; text-align: center; box-shadow: 0 18px 50px rgba(4, 12, 26, .45); animation: rmIn .18s ease-out; }
@keyframes rmIn { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.resume-card .rm-ic { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; background: #E8F1FB; display: flex; align-items: center; justify-content: center; font-size: 32px; }
.resume-card h3 { font-size: 21px; color: #12365e; margin-bottom: 4px; }
.resume-card .rm-s { font-size: 13px; color: #5a7ba6; }
.resume-card .rm-info { background: #F3F7FC; border: 1px solid #DCE8F5; border-radius: 12px; padding: 8px 14px; margin: 14px 0 16px; }
.resume-card .rm-info .li { display: flex; justify-content: space-between; align-items: center; font-size: 15px; color: #2c4a70; padding: 6px 0; border-bottom: 1px dashed #e4edf7; }
.resume-card .rm-info .li:last-child { border-bottom: none; }
.resume-card .rm-info .li b { color: #12365e; font-size: 16px; }
.resume-card .rm-go { display: block; width: 100%; height: 56px; border: none; border-radius: 14px; background: var(--primary, #185FA5); color: #fff; font-size: 18px; font-weight: 700; letter-spacing: 2px; cursor: pointer; }
.resume-card .rm-go:active { filter: brightness(.92); }
.resume-card .rm-no { display: block; width: 100%; margin-top: 12px; height: 46px; border: 1px solid #f3c2c2; background: #fff7f7; color: #c0392b; border-radius: 12px; font-size: 15px; cursor: pointer; }
.resume-card .rm-tip { margin-top: 10px; font-size: 12px; color: #8ba0ba; }

/* ===== 预订单看板 / 预订单状态（2026-11-05） ===== */
.pob-kpi { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.pob-card { flex: 1 1 130px; min-width: 120px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.pob-card span { font-size: 12px; color: var(--text-2); }
.pob-card b { font-size: 20px; font-weight: 700; }
.pob-card.warn { border-color: #fbbf24; background: #fffbeb; }
.pob-card.warn b { color: #b45309; }
.pob-card.bad { border-color: #fca5a5; background: #fef2f2; }
.pob-card.bad b { color: #b91c1c; }
.pob-tabs { display: flex; gap: 8px; margin: 4px 0 12px; flex-wrap: wrap; }
.pob-tab { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 7px 14px; font-size: 13px; cursor: pointer; }
.pob-tab.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.pob-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; border: 1px solid transparent; white-space: nowrap; }
.pob-tag.pre { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }
.pob-tag.pending { background: #fffbeb; color: #b45309; border-color: #fcd34d; }
.pob-tag.confirmed { background: #ecfdf5; color: #047857; border-color: #6ee7b7; }
.pob-tag.auto { background: #eff6ff; color: #1d4ed8; border-color: #93c5fd; }
.pob-tag.expired { background: #fef2f2; color: #b91c1c; border-color: #fca5a5; }
.pob-tag.rejected { background: #fef2f2; color: #991b1b; border-color: #f87171; }
.pob-sup-head { display: flex; align-items: baseline; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); background: #f8fafc; }
.pob-sup-head span { font-size: 12px; color: var(--text-2); }
.preorder-bar { background: #fffbeb; border: 1px solid #fcd34d; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.pob-bar-t { font-size: 13px; color: #92400e; margin-bottom: 6px; }
.pob-bar-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; padding: 5px 0; border-top: 1px dashed #fde68a; }
.pob-bar-row:first-of-type { border-top: none; }
.pob-bar-row span { color: var(--text-2); font-size: 12px; }
.wb-state-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.wb-st { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 8px; padding: 5px 10px; font-size: 12px; background: #fff; }
.wb-st b { font-size: 12px; }
.wb-st span { color: var(--text-2); }
.wb-st i { font-style: normal; font-size: 10px; color: var(--text-3, #94a3b8); }
.wb-st.pending { border-color: #fcd34d; background: #fffbeb; }
.wb-st.pending span { color: #b45309; }
.wb-st.confirmed { border-color: #6ee7b7; background: #ecfdf5; }
.wb-st.auto { border-color: #93c5fd; background: #eff6ff; }
.wb-st.expired { border-color: #fca5a5; background: #fef2f2; }
.wb-st.expired span { color: #b91c1c; }
.wb-st.none { opacity: .6; }
.wb-onlyfilled { white-space: nowrap; }
.wb-onlyfilled.on { background: #eff6ff; border-color: #2563eb; color: #1d4ed8; font-weight: 600; box-shadow: 0 0 0 2px rgba(37, 99, 235, .12); }
.pob-tag.draft { background: #f1f5f9; color: #64748b; border-color: #cbd5e1; }
/* 汇总单式视图（与桌面《汇总单_周》同模型）：固定列宽、行高紧凑 */
.ws-table.ws-doc { table-layout: fixed; max-width: 100%; }
.ws-table.ws-doc.ws-sum { width: 1036px; }
.ws-table.ws-doc.ws-sitetot { width: 760px; }
.ws-table.ws-doc.ws-prodtot { width: 912px; }
.ws-doc-hd { display: flex; align-items: flex-end; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: linear-gradient(90deg, #eef4ff, #f8fafc); flex-wrap: wrap; }
.ws-doc-t { font-size: 15px; font-weight: 800; color: #1e3a8a; letter-spacing: .3px; }
.ws-doc-s { margin-top: 3px; font-size: 12px; color: #475569; }
.ws-doc-s b { color: #1d4ed8; }
.ws-doc-tabs { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.ws-doc .ws-gray { color: #64748b; }
.ws-table.ws-doc .ws-g td { font-size: 11.5px; }
.ws-table.ws-doc th, .ws-table.ws-doc td { padding: 3px 6px; font-size: 12px; }
.ws-table.ws-doc th { font-size: 11px; }
.ws-table.ws-doc td.ws-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-table.ws-doc td.ws-nowrap { overflow: hidden; text-overflow: ellipsis; }

/* ---------- 编辑商品：操作确认开关（开关不开，按钮点不动） ---------- */
.act-switch-row{display:flex;align-items:center;gap:8px}
.act-switch{width:36px;height:20px;border-radius:10px;background:#c9ced6;position:relative;transition:background .15s;flex-shrink:0;cursor:pointer;display:inline-block}
.act-switch::after{content:'';position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;transition:left .15s;box-shadow:0 1px 2px rgba(0,0,0,.25)}
.act-switch-row input:checked + .act-switch{background:var(--primary,#2563eb)}
.act-switch-row input:checked + .act-switch::after{left:18px}
.act-switch-row .btn[disabled]{opacity:.45;cursor:not-allowed;pointer-events:none}
.act-switch-row .btn{min-width:64px;padding:6px 12px;font-size:13px}

/* ---------- 批检报告库：食材行内拖放上传框（搜索命中即出现，拖入即传） ---------- */
.rl-drop{display:flex;align-items:center;gap:10px;margin:6px 0 8px 22px;padding:12px 14px;border:2px dashed var(--border,#d8dce3);border-radius:10px;background:#f8fafc;cursor:pointer;transition:border-color .15s,background .15s}
.rl-drop:hover{border-color:var(--primary,#2563eb);background:#eef4fd}
.rl-drop.over{border-color:var(--primary,#2563eb);background:#e3edfd;border-style:solid}
.rl-drop-ico{width:30px;height:30px;border-radius:8px;background:#dbe9fb;color:#185fa5;display:flex;align-items:center;justify-content:center;font-size:15px;flex-shrink:0}
.rl-drop-txt{font-size:12.5px;color:var(--text);line-height:1.5}
.rl-drop-txt b{font-weight:700}
.rl-drop-sub{display:block;font-size:11px;color:var(--text-2);margin-top:2px}

/* ---------- 批检报告库：顶部「上传报告」选食材弹窗 ---------- */
.rl-pick-list{max-height:340px;overflow:auto;border:1px solid var(--border,#e3e6ea);border-radius:8px;background:#fff}
.rl-pick-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;border-bottom:1px solid #f0f2f5;cursor:pointer;font-size:13px}
.rl-pick-row:last-child{border-bottom:0}
.rl-pick-row:hover{background:#eef4fd}
.rl-pick-name{font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rl-pick-meta{color:var(--text-2);font-size:11.5px;flex-shrink:0}
.rl-pick-more{margin:0;padding:10px 12px;color:var(--text-2);font-size:12px}

/* ---------- 批检报告：食材搜索建议下拉 ---------- */
.rl-sugg{position:absolute;top:calc(100% + 4px);left:0;min-width:100%;max-height:300px;overflow:auto;background:#fff;border:1px solid var(--border,#e3e6ea);border-radius:10px;box-shadow:0 10px 28px rgba(15,23,42,.14);z-index:80}
.rl-sugg-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;cursor:pointer;font-size:13px;border-bottom:1px solid #f2f4f7}
.rl-sugg-row:last-of-type{border-bottom:0}
.rl-sugg-row:hover{background:#eef4fd}
.rl-sugg-name{font-weight:600;color:var(--text,#111);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rl-sugg-meta{color:var(--text-2,#6b7280);font-size:11.5px;flex-shrink:0}

/* ---------- 批检报告：上传工作台（四个拖放窗口 + 下方按钮排） ---------- */
.rl-up{border:1px solid var(--border,#e3e6ea);border-radius:12px;background:#fbfcfe;padding:10px 12px;margin:0 0 12px}
.rl-up-head{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12.5px;color:var(--text);margin-bottom:8px}
.rl-up-body{display:flex;flex-direction:column;align-items:flex-start;gap:10px}
.rl-up-slots{display:flex;gap:10px;flex-wrap:wrap}
.rl-slot{position:relative;width:104px;height:104px;border-radius:10px;border:2px dashed var(--border,#d8dce3);background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;cursor:pointer;transition:border-color .15s,background .15s;padding:6px;box-sizing:border-box}
.rl-slot:hover{border-color:var(--primary,#2563eb);background:#eef4fd}
.rl-slot.over{border-color:var(--primary,#2563eb);border-style:solid;background:#e3edfd}
.rl-slot-ico{font-size:22px;color:var(--text-2,#6b7280);line-height:1}
.rl-slot-txt{font-size:11px;color:var(--text-2,#6b7280);text-align:center;word-break:break-all;line-height:1.3;max-height:30px;overflow:hidden}
.rl-slot.filled{border-style:solid;border-color:#c7dcfb;background:#f4f8ff}
.rl-slot.sel{border-color:var(--primary,#2563eb);background:#e8f1ff;box-shadow:0 0 0 3px rgba(37,99,235,.18)}
.rl-slot-img{width:100%;height:100%;object-fit:cover;border-radius:8px;position:absolute;top:0;left:0}
.rl-slot.filled .rl-slot-txt{position:absolute;left:0;right:0;bottom:0;background:rgba(255,255,255,.92);font-size:10px;padding:2px 4px;max-height:26px}
.rl-slot-x{position:absolute;top:-6px;right:-6px;z-index:2;width:20px;height:20px;border-radius:50%;border:0;background:#ef4444;color:#fff;font-size:13px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}
.rl-up-slotrow{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
/* 操作记录表：拉长到与「清空/撤回」按钮列右缘齐平（= 4格×104 + 3×10间距 + 12缩进 + 84按钮列 + 10间距 = 553px）；行线拉齐、列距不变 */
.rl-log-tb{width:100% !important;min-width:0;max-width:553px}
.rl-log-tb th,.rl-log-tb td{text-align:left;padding:4px 14px 4px 0;white-space:nowrap}
.rl-log-tb th:first-child,.rl-log-tb td:first-child{padding-left:2px}
.rl-log-tb td{font-size:12.5px;color:var(--text)}
/* 清空 / 撤回：窗口右侧竖排两钮（各半高） */
.rl-sidecol{display:flex;flex-direction:column;gap:4px}
.rl-sidecol .btn{height:50px;min-width:84px;padding:0 14px}
.rl-sidecol .rl-wd{color:#b45309 !important;border:1px solid #d97706 !important}
.rl-sidecol .rl-wd:not(:disabled):hover{background:#fdf3e3 !important}
.rl-slot-tag{position:absolute;top:4px;left:4px;font-size:9px;line-height:1.4;background:#e0edff;color:#185fa5;border-radius:4px;padding:0 4px}
/* 窗口内现有报告：三行文字（名称/日期/生产商），无图标无标签 */
.rl-slot.rep{padding:8px 6px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;text-align:center}
.rl-rep-name{font-size:10.5px;font-weight:600;color:var(--text,#111);line-height:1.3;word-break:break-all;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.rl-rep-date{font-size:9.5px;color:var(--text-2,#6b7280);letter-spacing:.5px}
.rl-rep-manu{font-size:9.5px;color:var(--text-2,#6b7280);line-height:1.3;word-break:break-all;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.rl-up-actions{display:flex;flex-direction:row;gap:10px;align-items:center;justify-content:flex-start;flex-wrap:wrap}
/* 转发按钮：绿色分享图标（方框+外弯箭头），文字黑色 */
.rl-fwd{color:#111 !important;border:1px solid #16a34a !important}
.rl-fwd:not(:disabled):hover{background:#ecfaf1 !important}
.rl-fwd svg{width:30px;height:30px;vertical-align:-10px;margin-right:4px;color:#16a34a}
/* 按钮与上方格子逐列对齐：同宽 104px、同间距 10px */
.rl-up-actions .btn{width:104px;min-width:0;padding-left:0;padding-right:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rl-up-idle{display:flex;gap:10px;align-items:flex-start;font-size:12.5px;color:var(--text-2);line-height:1.7;border-style:dashed;background:#f8fafc}
.rl-up-idle-ico{width:32px;height:32px;border-radius:9px;background:#dbe9fb;color:#185fa5;display:flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0}
.rl-up-idle b{color:var(--text)}
/* 工作台左右布局：左=报告上传区（4格+清空/撤回+按钮排），右=食材图片区（3格+上传/删除） */
.rl-up-cols{display:flex;gap:24px;align-items:flex-start;flex-wrap:wrap;width:100%}
.rl-up-left{flex:0 0 auto;min-width:0}
.rl-up-right{flex:0 0 auto;border-left:1px dashed var(--border,#d8dce3);padding-left:18px}
.rl-img-head{font-size:12.5px;color:var(--text);margin-bottom:8px}
.rl-img-slots{display:flex;gap:10px;flex-wrap:wrap}
.rl-img-actions{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.rl-img-actions .btn{height:34px;padding:0 14px;font-size:12.5px}
.rl-img-actions .rl-img-del:not(:disabled){color:#b91c1c !important;border:1px solid #dc2626 !important}
.rl-img-actions .rl-img-del:not(:disabled):hover{background:#fdecec !important}
.rl-img-badge{position:absolute;top:4px;left:4px;z-index:2;font-size:10px;line-height:1.4;background:#185fa5;color:#fff;border-radius:4px;padding:0 6px}
.rl-img-badge.new{background:#0f766e}

/* ============ 申购页：管理者视图（左=已递交 / 右=未递交草稿，按项目分组、按送达日期排列） ============ */
.po-cols{display:grid;grid-template-columns:1fr 1fr;gap:0;align-items:start;border:1px solid var(--border,#d8dce3);border-radius:12px;overflow:hidden;background:var(--card,#fff)}
.po-col{padding:10px 12px;min-width:0}
.po-col-left{border-right:1px solid var(--border,#d8dce3)}
.po-col-right{background:#fafbfc}
.po-col-head{font-size:13px;font-weight:600;color:#0f6e56;background:#e1f5ee;border-radius:8px;padding:5px 10px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.po-col-head.is-draft{color:#854f0b;background:#faeeda}
.po-col-tip{font-weight:400;font-size:11.5px;color:inherit;opacity:.75;margin-left:auto}
.po-grp{margin:6px 0 0 6px;border-left:2px solid #9fe1cb;padding-left:8px}
.po-col-right .po-grp{border-left-color:#fac775}
.po-grp-head{font-size:13px;font-weight:600;padding:3px 0;cursor:pointer;display:flex;align-items:center;gap:6px;user-select:none}
.po-grp-head:hover b{color:#185fa5}
.po-grp-head span{font-weight:400;font-size:12px;color:var(--text-2,#6b7280)}
.po-grp-head .po-arrow{font-style:normal;font-size:11px;color:var(--text-2,#6b7280)}
.po-grp-body table{width:100%;border-collapse:collapse;font-size:12.5px}
.po-grp-body td{padding:4px 4px;border-top:1px solid var(--border-light,#eceff3);vertical-align:middle}
.po-date{color:var(--text-2,#6b7280);white-space:nowrap;width:62px;font-size:12px}
.po-no{white-space:nowrap;width:1%}
.po-no a{font-weight:600;color:var(--text,#111);text-decoration:none;border-bottom:1px dashed #b6c2d0}
.po-no a:hover{color:#185fa5;border-bottom-color:#185fa5}
.po-meta{color:var(--text-2,#6b7280);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:99%;max-width:none;padding-left:10px}
.po-st{white-space:nowrap;width:86px}
.po-act{white-space:nowrap;text-align:right;width:1%}
.po-tag{font-size:11px;border-radius:6px;padding:1px 6px;white-space:nowrap}
.po-tag.st-flow{color:#185fa5;background:#e6f1fb}
.po-tag.st-draft{color:#854f0b;background:#faeeda}
.po-tag.st-rej{color:#a32d2d;background:#fcebeb}
.po-tag.st-ok{color:#0f6e56;background:#e1f5ee}
.po-empty{font-size:12.5px;color:var(--text-2,#6b7280);padding:14px 4px;line-height:1.7}
@media (max-width:1100px){.po-cols{grid-template-columns:1fr}.po-col-left{border-right:none;border-bottom:1px solid var(--border,#d8dce3)}}

/* ============ 只读透视表：日期列收窄（只要能放下即可；不影响填报网格的可拖拽列宽） + 食材大类分组行 ============ */
.wb-table th.wb-day-narrow { min-width: 0 !important; width: 58px; padding-left: 2px; padding-right: 2px; font-size: 11.5px; }
.wb-table tr.wbs-cat td { background: #f2f7f4; font-weight: 700; text-align: left; font-size: 12.5px; color: #0f6e56; }

/* ============ 审核流程看板：按项目分看板的标题条 ============ */
.rv-site-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 16px 0 8px; padding: 6px 12px; border-radius: 8px; background: #eef4fb; border-left: 4px solid #2563eb; font-size: 13.5px; font-weight: 700; }
.rv-site-head:first-child { margin-top: 4px; }
.rv-site-head .rv-site-tip { font-weight: 400; font-size: 11.5px; color: var(--text-2); }

/* ============ 紧凑表：每列压到刚好放下文字/数字（采购总量按品名等） ============ */
.wb-compact { width: auto; }
.wb-compact th, .wb-compact td { padding: 4px 10px; white-space: nowrap; }
.wb-compact td.cell-wrap { white-space: normal; }

/* ============ 手机图片下单（2026-11-09）：搜名称 → 图片宫格 → 点图输数量 ============ */
.oe-mobile-card { padding: 10px; }
.oe-m-top { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.oe-m-kw { flex: 1 1 auto; min-width: 0; font-size: 16px; padding: 10px 12px; border-radius: 10px; }
.oe-m-view { flex: 0 0 auto; font-size: 13px; padding: 9px 12px; border: 1px solid var(--border); background: #f5f5f5; border-radius: 10px; color: var(--text-2); }
.oe-m-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.oe-m-cats::-webkit-scrollbar { display: none; }
.oe-m-cat { flex: 0 0 auto; font-size: 13px; padding: 5px 12px; border-radius: 16px; border: 1px solid var(--border); background: #fff; color: var(--text-2); white-space: nowrap; }
.oe-m-cat.on { background: #185FA5; border-color: #185FA5; color: #fff; font-weight: 600; }
.oe-m-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.oe-tile { padding: 0; border: 1px solid var(--border); border-radius: 10px; background: #fff; overflow: hidden; text-align: left; display: flex; flex-direction: column; }
.oe-tile.on { border-color: #185FA5; box-shadow: 0 0 0 1px #185FA5 inset; }
.oe-tile-thumb { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; background: #f3f3f3; overflow: hidden; }
.oe-tile-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.oe-tile-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; letter-spacing: 1px; padding: 4px; text-align: center; line-height: 1.2; }
.oe-tile-badge { position: absolute; top: 4px; right: 4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #185FA5; color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.oe-tile-name { display: block; padding: 5px 6px 0; font-size: 12px; line-height: 1.3; color: var(--text); max-height: 2.6em; overflow: hidden; }
.oe-tile-meta { display: block; padding: 1px 6px 6px; font-size: 11px; color: var(--text-2); }
.oe-m-more { padding: 10px 0 2px; text-align: center; }
.oe-m-more button { font-size: 13px; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: var(--text-2); }
.oe-m-bar { display: none; }
/* 数量输入面板（底部弹出） */
.oe-sheet { display: none; position: fixed; inset: 0; z-index: 9500; }
.oe-sheet.open { display: block; }
.oe-sheet-mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .42); }
.oe-sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 16px 16px 0 0; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); max-height: 92vh; overflow-y: auto; }
.oe-sheet-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.oe-sheet-thumb { width: 58px; height: 58px; border-radius: 10px; overflow: hidden; background: #f3f3f3; flex: 0 0 auto; }
.oe-sheet-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.oe-sheet-tit { flex: 1 1 auto; min-width: 0; }
.oe-sheet-tit b { display: block; font-size: 15px; line-height: 1.3; margin-bottom: 2px; }
.oe-sheet-tit span { font-size: 12px; color: var(--text-2); }
.oe-sheet-x { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; border: none; background: #f1f1f1; font-size: 18px; color: #666; }
.oe-sheet-mid { display: flex; align-items: stretch; gap: 14px; margin: 4px 0 10px; }
.oe-sheet-rows { flex: 0 1 auto; min-width: 0; }
.oe-sheet-row { display: flex; align-items: center; gap: 14px; padding: 7px 0; margin-bottom: 4px; background: transparent; }
.oe-sheet-row .lbl { flex: 0 0 auto; font-size: 18px; font-weight: 700; color: var(--text); }
.oe-sheet-row .unit { flex: 0 0 auto; font-size: 15px; color: var(--text-2); }
.oe-sheet-row .qty { margin-left: 0; flex: 1 1 auto; width: auto; min-width: 110px; max-width: 170px; min-height: 62px; display: flex; align-items: center; justify-content: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; text-align: center; font-size: 24px; font-weight: 600; color: var(--text); }
.oe-sheet-okv { flex: 0 0 auto; width: 76px; border: none; border-radius: 12px; background: #185FA5; color: #fff; font-size: 18px; font-weight: 700; letter-spacing: 2px; }
.oe-sheet-okv:active { background: #124a82; }
.oe-sheet-row.on .lbl { color: #185FA5; }
.oe-sheet-row.on .qty { border-color: #185FA5; background: #EEF5FD; color: #185FA5; }
.oe-sheet-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.oe-sheet-pad button { padding: 14px 0; font-size: 20px; border-radius: 12px; border: 1px solid var(--border); background: #f7f7f7; color: var(--text); }
.oe-sheet-pad button:active { background: #e8e8e8; }
.oe-sheet-foot { display: flex; gap: 10px; }
.oe-sheet-foot button { flex: 1; padding: 13px 0; font-size: 16px; border-radius: 12px; border: none; }
.oe-sheet-clear { background: #f1f1f1; color: #666; }
.oe-sheet-ok { background: #185FA5; color: #fff; font-weight: 600; }
@media (max-width: 768px) {
  #po-editor { padding-bottom: 72px; }
  .oe-head-actions .btn-warning, .oe-head-actions #oe-submit-btn { display: none; }
  .oe-m-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; display: flex; gap: 8px; align-items: center; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--border); }
  .oe-m-bar-info { flex: 1 1 auto; min-width: 0; font-size: 12px; color: var(--text-2); line-height: 1.35; }
  .oe-m-bar .btn { padding: 10px 12px; font-size: 14px; white-space: nowrap; }
  .oe-m-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ===== 手机出入库 / 验收（图片宫格 + 大键盘，与手机下单同构；桌面端不受影响） ===== */
.im-mobile { display: none; padding-bottom: 66px; }
body.im-grid .im-mobile { display: block; }
body.im-grid #page-site-stock .op-table { display: none; }
body.im-grid #page-site-stock .op-toolbar .oe-head-actions { display: none; }
@media (max-width: 768px) {
  .im-mobile { display: block; }
  #page-site-stock .op-table { display: none; }
  #page-site-stock .op-toolbar .oe-head-actions { display: none; }
  #page-site-stock .op-toolbar { padding-bottom: 8px; }
}
.im-top { display: flex; gap: 8px; align-items: center; margin: 6px 0 8px; }
.im-kw { flex: 1 1 auto; min-width: 0; font-size: 16px; padding: 10px 12px; border-radius: 10px; margin-bottom: 0; }
.im-view { flex: 0 0 auto; font-size: 13px; padding: 9px 12px; border: 1px solid var(--border); background: #f5f5f5; border-radius: 10px; color: var(--text-2); }
.im-hint { font-size: 12px; color: var(--text-2); margin: 0 0 8px; line-height: 1.5; }
.im-tile-meta { display: block; padding: 1px 6px 6px; font-size: 11px; color: var(--text-2); }
.im-tile-meta b { color: #b45309; }
.im-tile-meta i { color: #15803d; font-style: normal; }
.im-more { width: 100%; margin-top: 10px; padding: 11px; border-radius: 10px; border: 1px solid var(--border); background: #f7f7f7; font-size: 14px; color: var(--text-2); }
.im-empty { padding: 22px 0; text-align: center; color: var(--text-2); font-size: 13px; }
.im-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 800; display: none; align-items: center; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -2px 10px rgba(0, 0, 0, .06); }
body.im-grid .im-bar { display: flex; }
@media (max-width: 768px) { .im-bar { display: flex; } }
.im-bar-info { flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: var(--text-2); line-height: 1.35; }
.im-bar-info b { color: var(--text); }
.im-bar .btn { flex: 0 0 auto; }
.im-vseg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 2px 0 12px; }
.im-vbtn { padding: 11px 0; border-radius: 10px; border: 1px solid var(--border); background: #fff; font-size: 14px; color: var(--text-2); font-weight: 600; }
.im-vbtn.on.confirm { background: #16a34a; border-color: #16a34a; color: #fff; }
.im-vbtn.on.reject { background: #dc2626; border-color: #dc2626; color: #fff; }
.im-vbtn.on.swap { background: #d97706; border-color: #d97706; color: #fff; }
.im-sec-lbl { font-size: 12px; color: var(--text-2); margin: 0 0 5px; }
.im-photo-row { display: flex; gap: 8px; align-items: center; overflow-x: auto; margin: 0 0 12px; padding-bottom: 2px; }
.im-photo { position: relative; flex: 0 0 auto; width: 58px; height: 58px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.im-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.im-photo-x { position: absolute; top: 0; right: 0; width: 19px; height: 19px; border: none; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; line-height: 19px; padding: 0; border-radius: 0 0 0 6px; }
.im-photo-add { flex: 0 0 auto; width: 58px; height: 58px; border-radius: 8px; border: 1px dashed #c9c9c9; background: #fafafa; font-size: 11px; color: var(--text-2); display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.25; }
.im-due { display: flex; gap: 10px; font-size: 12.5px; color: var(--text-2); margin: 0 0 10px; flex-wrap: wrap; }
.im-due b { color: #b45309; font-size: 14px; }

/* 手机端：禁止页面级横向溢出（溢出会让 position:fixed 弹层按更宽的布局视口渲染，键盘第三列/确认键被挤出屏幕） */
@media (max-width: 768px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  .oe-sheet-panel { width: 100%; max-width: 100%; box-sizing: border-box; }
}

/* 账户编号（总部 YYxx / 项目 YXxx） */
.acc-code { font-family: ui-monospace, "Consolas", "Courier New", monospace; color: #185FA5; letter-spacing: .6px; font-weight: 700; font-size: 13px; white-space: nowrap; }
