:root {
  --brand: #1b63f0;
  --brand-dark: #0f47c4;
  --brand-soft: #eaf1ff;
  --bg: #f3f5fa;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #6b7a90;
  --line: #e5e9f2;
  --green: #12b76a;
  --green-soft: #e7f8ef;
  --red: #ef4444;
  --red-soft: #fdecec;
  --amber: #f59e0b;
  --amber-soft: #fef4e6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px -12px rgba(16, 24, 40, .18);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: var(--brand); text-decoration: none; }
input, select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27, 99, 240, .12); }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d3dae8; border-radius: 8px; }

/* ============ 登录 ============ */
.login-wrap {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(1200px 600px at 20% 0%, #1e3a8a 0%, #0b1226 45%, #060a16 100%);
}
.login-box { width: 100%; max-width: 400px; }
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; color: #fff; }
.login-logo .mark {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(135deg, #4f8bff, #1b63f0); box-shadow: 0 8px 22px rgba(27, 99, 240, .45);
}
/* 首页/登录页 logo：用新动漫角色图标，方图裁圆角，遮住 SVG 渐变底 */
.login-logo .mark.logo-img, .sidebar .brand .mark.logo-img {
  background: none; box-shadow: none; overflow: hidden; padding: 0;
}
.login-logo .mark.logo-img::before, .sidebar .brand .mark.logo-img::before {
  content: ''; display: block; width: 100%; height: 100%;
  background: url('/icon-192.png') center/cover no-repeat; border-radius: inherit;
}
.login-logo h1 { font-size: 19px; margin: 0; font-weight: 700; letter-spacing: .5px; }
.login-logo p { margin: 2px 0 0; font-size: 12px; color: #93a6c9; letter-spacing: 2px; }
.login-card { background: rgba(255, 255, 255, .97); border-radius: 20px; padding: 26px 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.login-card h2 { margin: 0 0 20px; font-size: 18px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.login-tip { margin-top: 16px; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.8; }

/* ============ 布局 ============ */
.shell { display: flex; min-height: 100dvh; }
.sidebar {
  width: 232px; flex: 0 0 232px; background: linear-gradient(180deg, #0e1a33, #101d38);
  color: #b6c6e0; display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100dvh;
  overflow-y: auto; overflow-x: hidden; scrollbar-width: thin;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 3px; }
.sidebar .brand, .sidebar .side-foot { flex: 0 0 auto; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; color: #fff; }
.sidebar .brand .mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #4f8bff, #1b63f0); }
.sidebar .brand b { font-size: 15px; letter-spacing: .4px; }
.sidebar .brand span { display: block; font-size: 10.5px; color: #7d90b3; letter-spacing: 1.5px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: #a9bbd6;
  font-size: 14px; margin-bottom: 3px; transition: .15s; width: 100%; text-align: left;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active { background: linear-gradient(135deg, #2b6cf6, #1b4fd8); color: #fff; box-shadow: 0 6px 16px -6px rgba(43, 108, 246, .9); }
.nav-item svg { flex: 0 0 18px; }
.nav-spacer { flex: 1; }
.side-foot { font-size: 11px; color: #5d6f90; padding: 10px 12px; border-top: 1px solid rgba(255, 255, 255, .07); line-height: 1.7; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 20px; background: rgba(255, 255, 255, .86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.topbar h2 { font-size: 16.5px; margin: 0; font-weight: 650; }
.top-scan-btn {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  border: 1px solid var(--brand); color: var(--brand); background: var(--brand-soft);
  border-radius: 10px; padding: 7px 12px; font-size: 13px; font-weight: 650; cursor: pointer;
}
.top-scan-btn:active { transform: scale(.96); }
.topbar .who { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 12.5px; font-weight: 700; }
.content { padding: 20px; flex: 1; }
@media (min-width: 900px) { .content { padding: 24px 28px; max-width: 1320px; width: 100%; } }

/* 移动端底部导航 */
.tabbar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); padding-bottom: var(--safe-b);
}
.tabbar-inner { display: flex; }
.tab { flex: 1; padding: 8px 0 7px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: #8b98ad; font-size: 10.5px; }
.tab.active { color: var(--brand); }
.tab.active svg { transform: translateY(-1px); }



@media (max-width: 899px) {
  .sidebar { display: none; }
  .tabbar { display: block; }
  .topbar { height: 52px; padding: 0 14px; }
  .topbar h2 { font-size: 16px; }
  .content { padding: 14px 14px calc(84px + var(--safe-b)); }
  .topbar { padding-top: var(--safe-t); height: calc(52px + var(--safe-t)); }
}

/* ============ 通用组件 ============ */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 14px; }
.card-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-title h3 { margin: 0; font-size: 14.5px; font-weight: 650; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 16px; border-radius: 10px; font-weight: 600; font-size: 14.5px;
  transition: transform .12s, box-shadow .15s, background .15s; white-space: nowrap;
}
.btn:active { transform: scale(.975); }
.btn-primary { background: linear-gradient(135deg, #3b7cf8, #1b63f0); color: #fff; box-shadow: 0 8px 20px -8px rgba(27, 99, 240, .85); }
.btn-primary:disabled { opacity: .55; box-shadow: none; }
.btn-ghost { background: var(--brand-soft); color: var(--brand); }
.btn-plain { background: #f2f4f8; color: #475467; }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 18px; font-size: 16px; border-radius: 12px; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }

.row { display: flex; gap: 10px; align-items: center; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.hidden { display: none !important; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; }
.chip-in { background: var(--green-soft); color: #0d8f55; }
.chip-ok { background: var(--green-soft); color: #0d8f55; }
.chip-out { background: var(--red-soft); color: #d92d20; }
.chip-check { background: var(--amber-soft); color: #b54708; }
.chip-warn { background: var(--amber-soft); color: #b54708; }
.text-amber { color: #b54708; }

/* 统计卡 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 899px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.stat { background: var(--card); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 4px; }
.stat .k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 25px; font-weight: 700; line-height: 1.15; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.stat .bar { position: absolute; right: -18px; top: -18px; width: 66px; height: 66px; border-radius: 50%; opacity: .1; }
.stat.in .bar { background: var(--green); }
.stat.out .bar { background: var(--red); }
.stat.check .bar { background: var(--amber); }
.stat.stock .bar { background: var(--brand); }

/* 列表 */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: none; }
.list-item .t { font-weight: 600; font-size: 14px; }
.list-item .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.list-item .r { margin-left: auto; text-align: right; }

/* 表格（PC） */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.card > .table-wrap { box-shadow: none; border-radius: 0; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 12px 14px; background: #fafbfd; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td.acts { white-space: nowrap; }
td.acts .btn + .btn { margin-left: 6px; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafbff; }
.num { font-variant-numeric: tabular-nums; }

/* ============ 扫码页 ============ */
.scan-hero {
  background: linear-gradient(150deg, #1546b8, #1b63f0 55%, #2f7bff);
  border-radius: 20px; padding: 22px; color: #fff; box-shadow: 0 18px 40px -18px rgba(27, 99, 240, .9);
  position: relative; overflow: hidden;
}
.scan-hero::after {
  content: ''; position: absolute; right: -40px; bottom: -60px; width: 190px; height: 190px;
  border-radius: 50%; background: rgba(255, 255, 255, .12);
}
.scan-hero h3 { margin: 0 0 4px; font-size: 17px; }
.scan-hero p { margin: 0 0 16px; font-size: 12.5px; color: rgba(255, 255, 255, .78); }
.scan-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%;
  padding: 16px; border-radius: 14px; background: #fff; color: var(--brand); font-weight: 700; font-size: 16.5px;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); position: relative; z-index: 2;
}
.scan-sub { display: flex; gap: 10px; margin-top: 10px; position: relative; z-index: 2; }
.scan-sub button {
  flex: 1; padding: 10px; border-radius: 11px; background: rgba(255, 255, 255, .16); color: #fff;
  font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid rgba(255, 255, 255, .2);
}

/* 扫码浮层 */
.scan-overlay {
  position: fixed; inset: 0; z-index: 1500; background: #05070d; display: flex; flex-direction: column;
  animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
.scan-overlay .head {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3; padding: calc(14px + var(--safe-t)) 16px 22px;
  display: flex; align-items: center; justify-content: space-between; color: #fff;
  background: linear-gradient(180deg, rgba(4, 10, 24, .88), rgba(4, 10, 24, .35) 70%, transparent);
}
.scan-overlay .head b { font-size: 15px; font-weight: 600; margin-left: 10px; letter-spacing: .5px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(8px); transition: background .15s, transform .1s; }
.icon-btn:active { transform: scale(.92); background: rgba(255, 255, 255, .26); }
.scan-overlay .head .sc-spacer { flex: 1; }
.scan-overlay .head .icon-btn + .icon-btn { margin-left: 8px; }
.scan-overlay .icon-btn.on { background: linear-gradient(135deg, #ffd166, #f5a623); color: #402c00; border-color: transparent; box-shadow: 0 4px 16px rgba(245, 166, 35, .45); }
#sc-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  display: block; background: #000; z-index: 1;
  pointer-events: none; -webkit-touch-callout: none;
  /* v16：video 只做取流源，画面改由 #sc-view canvas 显示。video 透明后，
     国产 WebView 画在 video 上的内核级播放/暂停图标随之消失（CSS 伪元素盖不住它）。
     用 0.01 而非 0：部分内核对完全透明或 display:none 的 video 会暂停送帧。 */
  opacity: .01;
}
/* v16：画面显示层。JS 每帧把解码用的整帧画到这里，定位与 video 完全一致。 */
#sc-view {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; background: #000; z-index: 1;
  pointer-events: none; -webkit-touch-callout: none;
}
/* v15：彻底屏蔽部分 WebView 在 video 上叠加的原生播放/暂停图标与控制条。
   这些伪元素只在个别内核出现，标准浏览器无副作用。 */
#sc-video::-webkit-media-controls,
#sc-video::-webkit-media-controls-panel,
#sc-video::-webkit-media-controls-enclosure,
#sc-video::-webkit-media-controls-overlay-play-button,
#sc-video::-webkit-media-controls-play-button,
#sc-video::-webkit-media-controls-start-playback-button,
#sc-video::-webkit-media-controls-timeline,
#sc-video::-webkit-media-controls-current-time-display,
#sc-video::-webkit-media-controls-time-remaining-display,
#sc-video::-webkit-media-controls-mute-button,
#sc-video::-webkit-media-controls-volume-slider,
#sc-video::-webkit-media-controls-fullscreen-button,
#sc-video::-webkit-media-controls-toggle-closed-captions-button { display: none !important; -webkit-appearance: none; }
#sc-video::-moz-media-controls { display: none !important; }
/* 变焦条 */
.sc-zoom {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(122px + var(--safe-b)); z-index: 4;
  display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(6px);
}
.sc-zoom button {
  width: 40px; height: 32px; border-radius: 999px; color: #fff; font-size: 12.5px; font-weight: 700;
  background: transparent;
}
.sc-zoom button.on { background: #fff; color: #0d1526; }
/* 手动输入层 */
.sc-manual {
  position: absolute; inset: 0; z-index: 9; display: none; place-items: center;
  background: rgba(4, 8, 16, .72); backdrop-filter: blur(3px); padding: 20px;
}
.sc-manual.on { display: grid; }
.sc-manual-in { width: 100%; max-width: 380px; background: #111a2b; border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; padding: 18px; }
.sc-manual-t { color: #fff; font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.sc-manual-in input {
  width: 100%; padding: 13px 14px; border-radius: 11px; border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08); color: #fff; font-size: 16px; outline: none;
}
.sc-manual-in input::placeholder { color: #7f8ca6; }
.scan-frame {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 2;
}
.scan-frame .box {
  width: 88vw; max-width: 640px; height: 48vh; min-height: 150px; max-height: 440px;
  border-radius: 18px; box-shadow: 0 0 0 100vmax rgba(2, 6, 18, .58), inset 0 0 0 1px rgba(255, 255, 255, .06); position: relative;
}
.scan-frame .box::before, .scan-frame .box::after,
.scan-frame .box i::before, .scan-frame .box i::after {
  content: ''; position: absolute; width: 32px; height: 32px; border: 4px solid #51c4ff; border-radius: 6px;
  filter: drop-shadow(0 0 6px rgba(81, 196, 255, .55));
}
.scan-frame .box::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.scan-frame .box::after { top: -2px; right: -2px; border-left: 0; border-bottom: 0; }
.scan-frame .box i::before { bottom: -2px; left: -2px; border-right: 0; border-top: 0; }
.scan-frame .box i::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }
.scan-frame .box i { display: block; width: 100%; height: 100%; position: relative; font-style: normal; }
.scan-line {
  position: absolute; left: 6%; right: 6%; height: 2px; top: 20%;
  background: linear-gradient(90deg, transparent, #69f0ae 20%, #eafff4 50%, #69f0ae 80%, transparent);
  box-shadow: 0 0 18px 3px rgba(105, 240, 174, .85); animation: scanMove 2.2s ease-in-out infinite; border-radius: 2px;
}
/* 诊断面板：长按标题 1.2 秒开关，排查"扫不出"时看这几行 */
.sc-diag {
  position: absolute; left: 12px; right: 12px; top: calc(66px + var(--safe-t)); z-index: 6;
  display: none; padding: 9px 11px; border-radius: 10px; background: rgba(0, 0, 0, .62);
  color: #9fe8b0; font: 11.5px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap; pointer-events: none;
}
@keyframes scanMove { 0%, 100% { top: 12% } 50% { top: 86% } }
.scan-overlay .foot {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 3; padding: 22px 16px calc(24px + var(--safe-b));
  background: linear-gradient(0deg, rgba(4, 10, 24, .92), rgba(4, 10, 24, .5) 65%, transparent); color: #ccd8ee; font-size: 13px; text-align: center;
}
.scan-overlay .foot .acts { display: flex; gap: 10px; margin-top: 16px; }
.scan-overlay .foot .acts button {
  flex: 1; padding: 12px 8px; border-radius: 13px; background: rgba(255, 255, 255, .12); color: #fff;
  border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(8px);
  font-size: 13.5px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .15s, transform .1s;
}
.scan-overlay .foot .acts button:active { transform: scale(.96); background: rgba(255, 255, 255, .22); }
.scan-overlay .foot .acts button[data-mode].on {
  background: linear-gradient(135deg, #51c4ff, #1b63f0); border-color: transparent;
  box-shadow: 0 4px 18px rgba(27, 99, 240, .5);
}
/* 录入面板 */
.sheet-mask { position: fixed; inset: 0; background: rgba(8, 14, 26, .55); z-index: 1000; animation: fadeIn .16s; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1001; background: #fff;
  border-radius: 20px 20px 0 0; padding: 8px 18px calc(18px + var(--safe-b)); max-height: 88dvh; overflow-y: auto;
  animation: slideUp .24s cubic-bezier(.22, 1, .36, 1);
}
@media (min-width: 900px) {
  .sheet { left: 50%; bottom: 50%; transform: translate(-50%, 50%); width: 460px; border-radius: 18px; max-height: 86vh; animation: popIn .2s ease; }
  /* 单据 / 表格类弹层在宽屏用更宽的版式，明细不挤 */
  .sheet.sheet-lg { width: min(920px, 92vw); max-height: 90vh; }
  .sheet-mask { backdrop-filter: blur(2px); }
}
@keyframes slideUp { from { transform: translateY(100%) } to { transform: translateY(0) } }
@keyframes popIn { from { opacity: 0; transform: translate(-50%, 46%) scale(.97) } to { opacity: 1; transform: translate(-50%, 50%) scale(1) } }
.sheet .grab { width: 38px; height: 4px; border-radius: 4px; background: #dfe4ee; margin: 6px auto 14px; }
@media (min-width: 900px) { .sheet .grab { display: none; } }
.sheet h3 { margin: 0 0 14px; font-size: 16.5px; }
.prod-box { background: #f7f9fd; border-radius: 12px; padding: 13px 14px; margin-bottom: 14px; }
.prod-box .n { font-weight: 650; font-size: 15px; }
.prod-box .m { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.prod-box .stock { margin-top: 8px; font-size: 13px; }
.seg { display: flex; background: #f1f4fa; border-radius: 11px; padding: 3px; margin-bottom: 16px; }
.seg button {
  flex: 1; padding: 9px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted); transition: .16s;
}
.seg button.on { background: #fff; color: var(--brand); box-shadow: 0 1px 4px rgba(16, 24, 40, .12); }
.seg button[data-type="out"].on { color: var(--red); }
.seg button[data-type="check"].on { color: #b54708; }
.qty-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.qty-ctrl { display: flex; align-items: center; gap: 10px; flex: 1; }
.qty-ctrl button {
  width: 44px; height: 44px; border-radius: 11px; background: #f1f4fa; font-size: 22px; font-weight: 500;
  color: #344054; display: grid; place-items: center; flex: 0 0 auto;
}
.qty-ctrl input { text-align: center; font-size: 19px; font-weight: 700; padding: 8px; height: 44px; }

/* Toast */
.toast {
  position: fixed; left: 50%; top: calc(20px + var(--safe-t)); transform: translate(-50%, -140%);
  background: rgba(15, 23, 42, .93); color: #fff; padding: 11px 18px; border-radius: 11px;
  font-size: 14px; z-index: 2000; transition: transform .28s cubic-bezier(.22, 1, .36, 1), opacity .2s;
  max-width: 90vw; text-align: center; box-shadow: 0 12px 30px rgba(0, 0, 0, .28); opacity: 0; pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.ok { background: rgba(6, 118, 71, .96); }
.toast.err { background: rgba(180, 35, 24, .96); }

/* 空状态 */
.empty { text-align: center; padding: 44px 20px; color: #98a4b8; font-size: 13.5px; }
.empty svg { opacity: .45; margin-bottom: 10px; }

/* 更新提示条 */
.update-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + var(--safe-b)); z-index: 900;
  background: #0f172a; color: #fff; padding: 10px 12px 10px 16px; border-radius: 12px; font-size: 13.5px;
  display: flex; align-items: center; gap: 14px; box-shadow: 0 14px 34px rgba(0, 0, 0, .34);
}
@media (min-width: 900px) { .update-bar { bottom: 28px; } }
.update-bar button { background: var(--brand); color: #fff; padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; }

/* 滚动条 & 细节 */
.search-bar { position: relative; }
.search-bar input { padding-left: 38px; }
.search-bar svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #97a3b6; }

.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); display: inline-block; }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); flex: 0 0 auto; }
.kv .v { text-align: right; word-break: break-all; font-weight: 550; }
.pill-group { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { padding: 7px 14px; border-radius: 20px; background: #f1f4fa; font-size: 13px; color: #475467; font-weight: 500; }
.pill.on { background: var(--brand); color: #fff; }

@media print { .sidebar, .tabbar, .topbar { display: none !important; } }

/* =========================================================
   全局搜索
   ========================================================= */
.topbar-right { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; margin-left: auto; min-width: 0; }
.gs-wrap { flex: 0 1 320px; width: 320px; min-width: 0; margin: 0; position: relative; }
@media (max-width: 1100px) { .gs-wrap { width: 220px; flex-basis: 220px; } }
.topbar .who { flex: 0 0 auto; white-space: nowrap; }
.gs-box {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px;
  background: #f4f6fb; border: 1px solid var(--line); border-radius: 10px; color: var(--muted);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.gs-box:focus-within { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27, 99, 240, .12); }
.gs-box input { flex: 1; border: none; background: transparent; padding: 0; height: 100%; font-size: 13.5px; color: var(--text); }
.gs-box input:focus { box-shadow: none; }
.gs-kbd {
  font-size: 11px; color: #93a1b6; border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 6px; background: #fff; font-family: inherit; white-space: nowrap;
}
.gs-panel {
  display: none; position: absolute; left: 0; right: 0; top: 44px; z-index: 950;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 24px 60px -18px rgba(16, 24, 40, .36); max-height: 70vh; overflow-y: auto; padding: 6px;
}
.gs-panel.show { display: block; animation: fadeIn .12s; }
.gs-g + .gs-g { border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 4px; }
.gs-t { font-size: 11.5px; color: #93a1b6; font-weight: 600; padding: 6px 10px 4px; letter-spacing: .3px; }
.gs-item { padding: 8px 10px; border-radius: 9px; cursor: pointer; }
.gs-item:hover, .gs-item:active { background: var(--brand-soft); }
.gs-i-main { display: flex; align-items: center; gap: 8px; font-size: 13.8px; }
.gs-i-main b { font-weight: 620; }
.gs-i-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.gs-dim { font-size: 11.5px; color: #93a1b6; }
.gs-badge { font-size: 11.5px; font-weight: 600; }
.gs-empty { padding: 22px 12px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.8; }

@media (max-width: 899px) {
  .topbar #who-name { display: none; }
  .top-scan-btn { padding: 7px 9px; }
  .top-scan-btn span { display: none; }
  .rp-toolbar { gap: 8px; }
  .rp-toolbar .rp-search { flex: 1 1 100%; min-width: 0; }
  .rp-toolbar select { flex: 1 1 0; min-width: 0; }
  .rp-toolbar input[type="date"] { flex: 1 1 0; min-width: 0; width: auto; }
  .rp-toolbar .btn { flex: 1 1 100%; justify-content: center; }
  .gs-wrap { margin: 0; max-width: none; flex: 0 0 auto; width: auto; }
  .topbar-right { gap: 8px; }
  .gs-kbd { display: none; }
  .gs-box { width: 36px; height: 34px; padding: 0; justify-content: center; border-radius: 9px; overflow: hidden; }
  .gs-box input { width: 0; opacity: 0; }
  .gs-wrap.on { position: fixed; inset: 0; z-index: 980; margin: 0; padding: calc(8px + var(--safe-t)) 10px 10px;
    background: rgba(10, 16, 28, .45); display: flex; flex-direction: column; }
  .gs-wrap.on .gs-box { width: 100%; padding: 0 12px; background: #fff; }
  .gs-wrap.on .gs-box input { width: auto; flex: 1; opacity: 1; }
  .gs-wrap.on .gs-panel { position: static; margin-top: 8px; max-height: 72vh; box-shadow: 0 12px 30px -10px rgba(0,0,0,.4); }
}

/* =========================================================
   维修单
   ========================================================= */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-row .stat { padding: 13px 15px; }
.stat-row .stat .k { font-size: 12.5px; color: var(--muted); }
.stat-row .stat .v { font-size: 22px; font-weight: 700; margin-top: 2px; }
@media (max-width: 899px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-row .stat .v { font-size: 19px; }
}

.rp-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.rp-toolbar select { width: auto; min-width: 108px; height: 38px; padding: 0 10px; font-size: 13px; }
.rp-toolbar input[type="date"] { width: 148px; flex: 0 0 auto; height: 38px; padding: 0 10px; font-size: 13px; }
.rp-search {
  flex: 1; min-width: 200px; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; height: 38px; background: #fff; color: var(--muted);
}
.rp-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27, 99, 240, .1); }
.rp-search input { border: none; padding: 0; height: 100%; font-size: 13.5px; }
.rp-search input:focus { box-shadow: none; }

.rp-chip {
  display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 7px;
  border: 1px solid currentColor; border-radius: 20px; line-height: 1.6; white-space: nowrap;
}
.ellip { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-foot { padding: 10px 4px 2px; font-size: 12.5px; color: var(--muted); }
.table-wrap table th, .table-wrap table td { white-space: nowrap; }
/* 固定表格布局：按百分比分配列宽，永不横向溢出，超长内容省略 */
.rp-table { table-layout: fixed; width: 100%; }
.rp-table th, .rp-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-table td.acts { overflow: visible; }
/* 明细账列多：给个最小宽度，窄屏横向滚动，避免单号/客户被压成省略 */
.rp-table.ledger { min-width: 1140px; }
.rp-table.ledger th, .rp-table.ledger td { padding: 11px 9px; font-size: 12.8px; }
.rp-table tr.clickable { cursor: pointer; }
.rp-table tr.clickable:hover { background: #f7f9fd; }
.rp-table td.acts .btn { padding: 5px 9px; }
.rp-table th, .rp-table td { padding: 10px 8px; font-size: 13.5px; }
.rp-table th { font-size: 12.5px; }
.rp-sec.row { justify-content: flex-start; }
.rp-sec.row > button { margin-left: auto; }

.rp-cards { display: flex; flex-direction: column; gap: 10px; }
.rp-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; background: #fff; }
.rp-card:active { background: #fafbfe; }
.rp-card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rp-card-h b { font-size: 14px; }
.rp-card-b { margin: 7px 0 8px; }
.rp-card-b .row1 { font-size: 14px; font-weight: 600; }
.rp-card-b .row2 { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.rp-card-f { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; }

/* ---- 库位树（按层级配色：一级仓库=蓝 / 二级库区=青 / 三级库位=橙）· 高可读版 ---- */
.lc-lv { display: inline-block; font-size: 12.5px; line-height: 20px; padding: 0 9px; border-radius: 7px; font-weight: 700; letter-spacing: .3px; }
.lc-lv.lv1 { background: #dbe8ff; color: #1246b8; }
.lc-lv.lv2 { background: #cfefe8; color: #08765f; }
.lc-lv.lv3 { background: #ffe6c8; color: #a85a08; }
.lc-tree { color: #7c8ba3; font-size: 14px; font-weight: 700; }

.lc-cards { display: flex; flex-direction: column; gap: 10px; }
.lc-card { border: 1px solid var(--line); border-left-width: 5px; border-radius: 12px; padding: 12px 14px; background: #fff; }
.lc-card.lv1 { border-left-color: #1b63f0; background: linear-gradient(90deg, #f3f7ff 0%, #fff 40%); }
.lc-card.lv2 { border-left-color: #0f9b83; background: linear-gradient(90deg, #f0fbf8 0%, #fff 40%); }
.lc-card.lv3 { border-left-color: #d97a16; background: linear-gradient(90deg, #fff8f0 0%, #fff 40%); }
.lc-card-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lc-card-h b { font-size: 16px; font-weight: 700; color: #1f2937; }
.lc-card-sub { margin-top: 5px; line-height: 1.55; font-size: 13.5px; color: #475569; }
.lc-card-sub.muted, .lc-card .small.muted { color: #475569 !important; }
.lc-card-h .small.muted { color: #334155 !important; font-size: 13px; font-weight: 600; }
.lc-card-acts { display: flex; gap: 8px; margin-top: 11px; flex-wrap: wrap; }
.lc-card-acts .btn { font-size: 13.5px; padding: 8px 14px; }
/* 桌面表格行：首列左侧色条标示层级 + 加大字号 */
.lc-row { font-size: 14px; }
.lc-row td { padding-top: 13px; padding-bottom: 13px; }
.lc-row b { font-size: 15px; font-weight: 700; color: #1f2937; }
.lc-row .small.muted, .lc-row .small { font-size: 13px; color: #475569; }
.lc-row.lv1 td:first-child { box-shadow: inset 4px 0 #1b63f0; }
.lc-row.lv2 td:first-child { box-shadow: inset 4px 0 #0f9b83; }
.lc-row.lv3 td:first-child { box-shadow: inset 4px 0 #d97a16; }

/* ---- 单据中心（底部「单据」tab） ---- */
.doc-hub { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.doc-hub-item { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; position: relative;
  padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; cursor: pointer; transition: .15s; }
.doc-hub-item:active { transform: scale(.98); background: var(--brand-soft); }
.doc-hub-item .dhi-i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px;
  background: var(--brand-soft); color: var(--brand); margin-bottom: 4px; }
.doc-hub-item b { font-size: 15px; font-weight: 700; color: #1f2937; }
.doc-hub-item .dhi-d { font-size: 12.5px; color: #64748b; line-height: 1.4; }
.doc-hub-item > svg:last-child { position: absolute; right: 12px; top: 16px; color: #b6c0d0; }
@media (min-width: 600px) { .doc-hub { grid-template-columns: repeat(3, 1fr); } }


/* ---- 商品多选：桌面勾选框 / 手机卡片勾选圈 ---- */
.pd-ck { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; vertical-align: -2px; }
.pd-pick { display: flex; align-items: center; flex: 0 0 auto; padding: 2px 2px 2px 0; cursor: pointer; }
.pd-pick input { width: 19px; height: 19px; margin: 0; accent-color: var(--brand); }
.rp-card-h .pd-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }

/* ---- 批量操作条 ---- */
.batchbar {
  position: fixed; left: 0; right: 0; bottom: calc(56px + var(--safe-b)); z-index: 45;
  padding: 9px 12px;
  background: rgba(255, 255, 255, .97); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); box-shadow: 0 -6px 22px rgba(16, 24, 40, .1);
}
.batchbar-in { display: flex; align-items: center; gap: 8px; max-width: 1320px; margin: 0 auto; }
.batchbar-n { flex: 1; font-size: 13px; color: var(--muted); }
.batchbar-n b { color: var(--brand); font-size: 16px; }
@media (min-width: 900px) {
  .batchbar { left: 232px; right: 0; bottom: 0; border-radius: 0; padding: 10px 28px; }
  .batchbar-in { max-width: 1320px; }
  .batchbar-n { font-size: 14px; }
}


/* 详情 / 表单容器 */
.rp-detail, .rp-form {
  position: fixed; z-index: 1001; background: #fff; display: flex; flex-direction: column;
  left: 0; right: 0; bottom: 0; top: 0;
}
@media (min-width: 900px) {
  .rp-detail { left: 50%; top: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%);
    width: min(1000px, 94vw); max-height: 88vh; border-radius: 16px; box-shadow: 0 30px 80px -20px rgba(16,24,40,.4); }
  .rp-form { left: 50%; top: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%);
    width: min(940px, 94vw); max-height: 90vh; border-radius: 16px; box-shadow: 0 30px 80px -20px rgba(16,24,40,.4); }
}
.rp-detail-h {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: calc(14px + var(--safe-t)) 16px 12px; border-bottom: 1px solid var(--line);
}
@media (min-width: 900px) { .rp-detail-h { padding: 16px 20px 14px; } }
.rp-no { font-size: 17px; font-weight: 700; letter-spacing: .2px; }
.rp-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.rp-tags { display: flex; align-items: center; gap: 8px; }
.icon-btn.dark { color: var(--muted); }
.rp-detail-b { flex: 1; overflow-y: auto; padding: 14px 16px calc(16px + var(--safe-b)); }
@media (min-width: 900px) { .rp-detail-b { padding: 16px 20px 20px; } }
.rp-sec { font-size: 12.5px; font-weight: 700; color: var(--brand); margin: 16px 0 9px; display: flex; align-items: center; gap: 8px; }
.rp-sec:first-child { margin-top: 0; }
.rp-sec::before { content: ''; width: 3px; height: 13px; background: var(--brand); border-radius: 2px; }
.kv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 14px; }
.kv-grid.kv4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 899px) { .kv-grid { grid-template-columns: repeat(2, 1fr); } .kv-grid.kv4 { grid-template-columns: repeat(2, 1fr); } }
.kv2 { display: flex; flex-direction: column; padding: 7px 10px; background: #f7f9fd; border-radius: 8px; }
.kv2 .k2 { font-size: 11.5px; color: var(--muted); }
.kv2 .v2 { font-size: 13.5px; font-weight: 550; margin-top: 1px; word-break: break-all; }
.rp-text { padding: 10px 12px; background: #f7f9fd; border-radius: 8px; font-size: 13.5px; line-height: 1.75; white-space: pre-wrap; }
.rp-detail-f {
  display: flex; gap: 10px; padding: 10px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); background: #fff;
}
.rp-detail-f .btn { flex: 1; }
@media (min-width: 900px) { .rp-detail-f { padding: 12px 20px; justify-content: flex-end; } .rp-detail-f .btn { flex: 0 0 auto; min-width: 110px; } }

.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 12px; }
@media (max-width: 899px) { .form-grid { grid-template-columns: repeat(2, 1fr); gap: 9px 10px; } }
.fg { display: flex; flex-direction: column; gap: 4px; }
.fg.full { grid-column: 1 / -1; }
.fg > span { font-size: 12px; color: var(--muted); }
.fg input, .fg select, .fg textarea { padding: 8px 10px; font-size: 13.5px; border-radius: 8px; }

.rp-item { border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; margin-bottom: 10px; background: #fcfdff; }
.rp-item-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 12.5px; color: var(--muted); }

/* 扫码页模式切换 */
.mode-seg {
  display: inline-flex; gap: 4px; padding: 4px; margin: 14px auto 12px; background: rgba(255, 255, 255, .16);
  border-radius: 12px; backdrop-filter: blur(6px);
}
.mode-seg button {
  display: flex; align-items: center; gap: 5px; padding: 8px 16px; border-radius: 9px;
  font-size: 13.5px; font-weight: 600; color: #dbe6fb;
}
.mode-seg button.on { background: #fff; color: var(--brand); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.mode-seg { flex-wrap: wrap; justify-content: center; }
@media (max-width: 520px) {
  .mode-seg { width: 100%; }
  .mode-seg button { flex: 1 1 46%; justify-content: center; padding: 8px 6px; font-size: 12.5px; }
}

/* ============ 下拉选择框（客户库 / 库位共用） ============ */
.cbo { position: relative; }
.cbo .cbo-in { padding-right: 34px; }
.cbo .cbo-ar {
  position: absolute; right: 1px; top: 1px; bottom: 1px; width: 30px;
  display: grid; place-items: center; color: var(--muted); font-size: 12px;
  border-radius: 9px; pointer-events: none; transition: transform .15s;
}
.cbo.open .cbo-ar { transform: rotate(180deg); color: var(--brand); }
.cbo-pop {
  display: none; position: absolute; z-index: 1300; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  box-shadow: 0 14px 34px -8px rgba(16, 24, 40, .28), 0 2px 6px rgba(16, 24, 40, .08);
}
.cbo-pop.on { display: block; animation: cboIn .12s ease; }
@keyframes cboIn { from { opacity: 0; transform: translateY(-4px) } to { opacity: 1; transform: none } }
.cbo-list { max-height: 240px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.cbo-i { padding: 9px 12px; display: flex; flex-direction: column; gap: 1px; cursor: pointer; }
.cbo-i b { font-weight: 600; font-size: 14px; color: var(--text); }
.cbo-i span { font-size: 12px; color: var(--muted); }
.cbo-i.on, .cbo-i:hover { background: var(--brand-soft); }
.cbo-empty { padding: 16px 12px; color: var(--muted); font-size: 13px; text-align: center; }
.cbo-add {
  width: 100%; padding: 11px 12px; text-align: left; font-size: 13px; font-weight: 700;
  color: var(--brand); background: #f6f9ff; border-top: 1px solid var(--line);
}
.cbo-add:hover { background: var(--brand-soft); }
.fg .cbo { margin-top: 0; }
.rp-cbo-fg > span { display: flex; align-items: center; gap: 6px; }
.rp-from {
  font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .3px;
  color: var(--brand); background: var(--brand-soft); padding: 1px 5px; border-radius: 4px;
}
/* 从维修单带出：一行一个 cbo + 扫码按钮 */
.rp-from-row { display: flex; gap: 8px; align-items: stretch; }
.rp-from-row .cbo { flex: 1; }
.rp-from-row .btn { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 640px) {
  .rp-from-row { flex-direction: column; }
}

/* 扫码自检 */
.scan-check { text-align: center; margin: 12px 0 2px; }
.scan-check button { font-size: 12.5px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding: 4px 8px; }
.diag { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.diag-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; font-size: 13.5px; }
.diag-row + .diag-row { border-top: 1px solid var(--line); }
.diag-row .diag-k { color: var(--muted); flex: 0 0 auto; }
.diag-row .diag-v { font-weight: 600; text-align: right; word-break: break-all; }
.diag-row.ok .diag-v { color: var(--green); }
.diag-row.bad { background: var(--red-soft); }
.diag-row.bad .diag-v { color: var(--red); }

/* ============ 侧栏分组标题 ============ */
.nav-group {
  font-size: 10.5px; font-weight: 700; letter-spacing: .6px; color: #8b98ad;
  padding: 14px 12px 6px; text-transform: uppercase;
}
.nav-group:first-child { padding-top: 4px; }

/* ============ 工作台待办 ============ */
.todo-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
@media (max-width: 900px) { .todo-row { grid-template-columns: repeat(2, 1fr); } }
.todo {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: var(--card);
  border-radius: 12px; box-shadow: var(--shadow); text-align: left;
}
.todo .tk { font-size: 12.5px; color: var(--muted); flex: 1; }
.todo b { font-size: 18px; font-weight: 700; color: var(--text); }
.todo svg { color: #b6c0d0; }
.todo.warn b { color: var(--red); }

/* ============ 调拨流水标签 ============ */
.chip-transfer { background: var(--brand-soft); color: var(--brand); }
.chip-reverted { background: #eef0f4; color: #7a8699; text-decoration: line-through; }

/* ============ 调拨表单 ============ */
.tr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 900px) { .tr-grid { grid-template-columns: 1fr; } }
.tr-grid .fg.full { grid-column: 1 / -1; }
.cbo-row { display: flex; gap: 8px; align-items: stretch; }
.cbo-row .cbo { flex: 1; }
.cbo-row .btn { flex: 0 0 auto; white-space: nowrap; }

/* ============ 库区预警 ============ */
.mini-bar { height: 4px; border-radius: 3px; background: #eef1f7; margin-top: 5px; overflow: hidden; width: 96px; }
.mini-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #ffb020, #ef4444); }
.area-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.area-card { border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px; background: #fbfcfe; }
.area-card.warn { border-color: #fcd9d9; background: #fffafa; }
.area-card .an { font-size: 13px; color: var(--muted); font-weight: 600; }
.area-card .av { font-size: 24px; font-weight: 750; margin: 4px 0 2px; letter-spacing: -.5px; }
.area-card .am { font-size: 12px; color: var(--muted); }
.area-bar { height: 6px; border-radius: 4px; background: #eef1f7; margin: 9px 0 6px; overflow: hidden; }
.area-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #4f8bff, #1b63f0); }
.area-card .aw { font-size: 12px; color: var(--red); font-weight: 600; }
.area-card .ok { color: var(--green); font-size: 12px; }

/* ============ 跟进记录 ============ */
.fl-hist { max-height: 240px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.fl-h { border-left: 3px solid var(--brand-soft); padding: 8px 0 8px 12px; }
.fl-h + .fl-h { margin-top: 6px; }
.fl-h-t { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }
.fl-h-t b { color: var(--brand); font-size: 12.5px; }
.fl-h-c { font-size: 13.5px; margin-top: 3px; line-height: 1.6; }
.fl-h-r, .fl-h-n { font-size: 12px; color: var(--muted); margin-top: 2px; }
.fl-h-n { color: #b54708; }

/* ============ 弹窗表单栅格 ============ */
.rp-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.rp-form-grid .fg.full { grid-column: 1 / -1; }
@media (max-width: 640px) { .rp-form-grid { grid-template-columns: 1fr; } }

/* ============ 盘点 ============ */
.sk-sum { display: flex; gap: 16px; padding: 10px 12px; background: #f7f9fd; border-radius: 10px; margin: 12px 0; font-size: 13px; color: var(--muted); }
.sk-sum b { color: var(--text); font-size: 15px; margin-left: 3px; }
.sk-list { max-height: 46vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
.sk-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; }
.sk-row + .sk-row { border-top: 1px solid var(--line); }
.sk-row.diff { background: #fff8f8; }
.sk-row .t { font-size: 13.5px; font-weight: 600; }
.sk-row .s { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.sk-num { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.sk-num input { width: 84px; text-align: right; padding: 6px 8px; font-size: 13.5px; border-radius: 8px; }
.sk-diff { width: 58px; text-align: right; font-size: 13px; font-weight: 700; color: var(--red); }

/* ============ 统计报表 ============ */
.rep-chart { padding: 10px 4px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rep-bars { display: flex; align-items: flex-end; justify-content: center; gap: 8px; height: 190px; min-width: 100%; }
.rep-bar { flex: 1; min-width: 22px; max-width: 74px; display: flex; flex-direction: column; align-items: center; height: 100%; }
.rep-bar .bs { flex: 1; display: flex; align-items: flex-end; gap: 2px; width: 100%; justify-content: center; }
.rep-bar .b { width: 9px; border-radius: 3px 3px 2px 2px; min-height: 2px; }
.rep-bar .b.in { background: linear-gradient(180deg, #34d399, #12b76a); }
.rep-bar .b.out { background: linear-gradient(180deg, #fb7185, #ef4444); }
.rep-bar .bd { font-size: 10.5px; color: #98a4b8; margin-top: 6px; white-space: nowrap; }
.rep-legend { display: flex; gap: 16px; justify-content: center; padding: 10px 0 2px; font-size: 12px; color: var(--muted); }
.rep-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.rep-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
@media (max-width: 1000px) { .rep-2col { grid-template-columns: 1fr; } }
.rep-rank .rk { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.rep-rank .rk + .rk { border-top: 1px solid var(--line); }
.rep-rank .rk-n {
  width: 20px; height: 20px; border-radius: 6px; background: #f1f4fa; color: var(--muted);
  font-size: 11.5px; font-weight: 700; display: grid; place-items: center; flex: 0 0 auto;
}
.rep-rank .rk:nth-child(1) .rk-n { background: var(--brand); color: #fff; }
.rep-rank .rk:nth-child(2) .rk-n { background: #cfe0ff; color: var(--brand); }
.rep-rank .t { font-size: 13.5px; font-weight: 600; }
.rep-rank .s { font-size: 11.5px; color: var(--muted); }
.rep-rank .rk-v { font-weight: 700; font-size: 14px; }
.rep-rank .rk-v2 { font-size: 11.5px; color: var(--muted); }

/* ============ 序列号（一物一码） ============ */
.sn-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sn-head .icon-btn { background: #f1f4fa; color: var(--muted); width: 34px; height: 34px; flex: 0 0 auto; }
.sn-head .icon-btn:hover { background: #e6ebf5; }

.kv-grid .kv { padding: 0; border-bottom: none; display: block; }
.kv-grid .kv > span { display: block; font-size: 11.5px; color: var(--muted); }
.kv-grid .kv > b { display: block; font-size: 13.5px; font-weight: 600; margin-top: 2px; word-break: break-all; }

.sn-sec { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fbfcfe; }
.sn-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: #5a6478; font-weight: 600; }
.sn-sec-h i { font-style: normal; font-weight: 400; }
.sn-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sn-chip {
  display: inline-flex; align-items: center; gap: 6px; background: #fff;
  border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px 4px 9px; font-size: 12.5px;
}
.sn-chip b { font-weight: 600; }
.sn-chip button {
  width: 16px; height: 16px; border-radius: 50%; background: #eef1f7; color: var(--muted);
  font-size: 13px; line-height: 1; display: grid; place-items: center;
}
.sn-chip button:hover { background: var(--red-soft); color: var(--red); }
.sn-input {
  width: 100%; margin-top: 8px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 9px;
  font: inherit; font-size: 13px; line-height: 1.6; color: var(--text); background: #fff; resize: vertical;
}
.sn-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27,99,240,.1); }
/* v2.27.1：按钮变多（扫码/连扫/手动/自动生成），窄屏不再挤成一团，允许换行 */
.sn-add-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sn-add-bar .btn { flex: 0 0 auto; }
.sn-add-bar .btn-primary.grow { flex: 1 1 100%; }

.tl { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 14px; }
.tl-i { position: relative; padding: 6px 0; }
.tl-dot { position: absolute; left: -21px; top: 12px; width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 3px #fff; }
.tl-t { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.tl-t span { color: var(--muted); font-size: 11.5px; flex: 0 0 auto; }
.tl-s { font-size: 12px; color: var(--muted); margin-top: 2px; }

.loc-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.loc-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 11px; font-size: 13px; }
.loc-row + .loc-row { border-top: 1px solid var(--line); }

.sn-table th, .sn-table td { font-size: 13px; }

/* ============ 移动端工具条：搜索框占整行，按钮另起一行 ============ */
@media (max-width: 640px) {
  .row > .search-bar { flex: 1 1 100%; }
  .row > .search-bar ~ .btn { flex: 1 1 auto; }
}

/* ===== 商品表单（分组全字段） ===== */
.pf-sheet { max-width: 680px; }
.pf-sec {
  font-size: 12px; font-weight: 800; color: var(--brand); letter-spacing: .4px;
  margin: 16px 0 8px; padding-left: 8px; border-left: 3px solid var(--brand);
}
.pf-sec:first-of-type { margin-top: 8px; }
.pf-photo-row { display: flex; gap: 14px; align-items: center; margin: 0 0 14px; }
.pf-photo-preview {
  width: 92px; height: 92px; flex: 0 0 92px; border: 1px dashed var(--line); border-radius: 12px;
  background: var(--bg); display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 11px; text-align: center; line-height: 1.5; overflow: hidden;
}
.pf-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.pf-photo-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pf-photo-btns .small { flex-basis: 100%; }
.pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pf-item { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pf-item > span { font-size: 12px; color: var(--muted); font-weight: 600; }
.pf-item > input, .pf-item > select, .pf-item > textarea {
  width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 9px;
  padding: 0 10px; font-size: 13.5px; background: var(--card); color: var(--text);
}
.pf-item > textarea { height: auto; padding: 9px 10px; line-height: 1.5; resize: vertical; }
.pf-item > input:focus, .pf-item > select:focus, .pf-item > textarea:focus { border-color: var(--brand); outline: none; }
.pf-item.full { grid-column: 1 / -1; }
.pf-item .cbo { width: 100%; }
@media (max-width: 640px) {
  .pf-grid { grid-template-columns: 1fr; }
}

/* 库存偏低小标 */
.pd-low {
  font-style: normal; font-size: 10px; font-weight: 800; color: #fff; background: var(--red);
  border-radius: 4px; padding: 0 4px; margin-left: 4px; vertical-align: 1px;
}

/* ===== 导入结果卡片 ===== */
.imp-tip {
  font-size: 12.5px; line-height: 1.75; color: var(--muted);
  background: var(--brand-soft); border-radius: 10px; padding: 10px 12px;
}
.imp-tip b { color: var(--brand); }
.imp-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--card); }
.imp-h { font-weight: 700; font-size: 13.5px; margin-bottom: 10px; word-break: break-all; }
.imp-nums { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; text-align: center; }
.imp-nums > div { background: var(--bg-soft, #f6f8fb); border-radius: 9px; padding: 8px 4px; }
.imp-nums span { display: block; font-size: 11px; color: var(--muted); }
.imp-nums b { font-size: 17px; font-variant-numeric: tabular-nums; }
.imp-nums .ok b { color: var(--green); }
.imp-nums .up b { color: var(--brand); }
.imp-nums .skip b { color: var(--muted); }
.imp-nums .bad b { color: var(--red); }
.imp-fail { margin-top: 12px; max-height: 200px; overflow-y: auto; }
.imp-fail-row {
  display: flex; gap: 8px; font-size: 12.5px; padding: 6px 0; border-top: 1px dashed var(--line);
}
.imp-fail-row b { color: var(--red); flex: 0 0 auto; }
.imp-fail-row span { color: var(--muted); word-break: break-all; }
.text-red { color: var(--red); }

/* ===== 仓库设置（编码规则） ===== */
.wh-hero {
  background: linear-gradient(135deg, #1b63f0 0%, #3b82f6 100%);
  color: #fff; border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px;
  box-shadow: 0 10px 26px -14px rgba(27, 99, 240, .7);
}
.wh-hero h3 { margin: 0 0 6px; font-size: 17px; }
.wh-hero p { margin: 0; font-size: 12.8px; line-height: 1.9; opacity: .92; }
.wh-hero p b { color: #fff; }
.wh-live {
  margin-top: 12px; background: rgba(255, 255, 255, .16); border-radius: 10px;
  padding: 9px 12px; font-size: 12.4px; line-height: 1.7; word-break: break-all;
}
.wh-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.wh-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.wh-rule { transition: opacity .2s; }
.wh-rule.off { opacity: .4; }
.wh-hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.wh-sample { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 2px; }
.wh-k { font-size: 12px; color: var(--muted); }
.wh-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.wh-chips b {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; font-weight: 600;
  background: var(--brand-soft); color: var(--brand-dark); border-radius: 7px; padding: 3px 8px;
}

/* ===== 商品表单：编号行 ===== */
.pf-sku-row { display: flex; gap: 6px; align-items: center; }
.pf-sku-row > input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 11px; font-size: 13.5px; background: #fff;
}
.pf-sku-row > input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(27, 99, 240, .12); }
.pf-sku-row > input[readonly] { background: #f4f6fb; color: var(--muted); }
.pf-sku-row > .btn { flex: 0 0 auto; height: 36px; white-space: nowrap; }
.pf-barcode-row { display: flex; gap: 6px; align-items: center; }
.pf-barcode-row > input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 11px; font-size: 13.5px; background: #fff;
}
.pf-barcode-row > input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(27, 99, 240, .12); }
.pf-barcode-row > .btn { flex: 0 0 auto; height: 36px; white-space: nowrap; }
.pf-note { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.pf-tip { font-style: normal; font-size: 11px; color: var(--brand); margin-left: 6px; font-weight: 500; }
.pf-item > input.pf-ro {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px;
  font-size: 13.5px; background: #f4f6fb; color: var(--muted);
}

@media (max-width: 900px) {
  .wh-grid2 { grid-template-columns: 1fr; }
  .wh-2col { grid-template-columns: 1fr; }
}

/* ===== 管理页通用（员工 / 角色 / 备份 / 外网 / 功能设置） ===== */
.adm-table { display: flex; flex-direction: column; }
.adm-tr {
  display: grid; grid-template-columns: 1.6fr 1fr 0.9fr 1.1fr 0.7fr 1.6fr;
  gap: 10px; align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.adm-tr:last-child { border-bottom: 0; }
.adm-tr.adm-th { font-size: 12px; color: var(--muted); background: #f7f9fc; border-radius: 8px; font-weight: 500; }
.adm-tr.off { opacity: .5; }
.adm-main { display: flex; flex-direction: column; gap: 2px; }
.adm-main b { font-weight: 600; }
.adm-main i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.adm-main .chip { align-self: flex-start; margin-top: 2px; }
.adm-ops { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.adm-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.adm-form .pf-item.full { grid-column: 1 / -1; }
.adm-tip {
  background: var(--brand-soft); color: var(--brand-dark); border-radius: 9px;
  padding: 9px 12px; font-size: 12.5px; line-height: 1.7;
}
.adm-tip.err { background: #fdecec; color: #b42318; }
.adm-kv { display: grid; gap: 8px; }
.adm-kv > div { display: flex; gap: 12px; font-size: 12.8px; }
.adm-kv i { font-style: normal; color: var(--muted); min-width: 76px; }
.adm-kv b { font-weight: 500; word-break: break-all; }

/* 角色 */
.role-wrap { display: grid; grid-template-columns: 230px 1fr; gap: 16px; align-items: start; }
.role-list { display: flex; flex-direction: column; gap: 8px; }
.role-item {
  text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; transition: .15s;
}
.role-item b { font-size: 13.5px; font-weight: 600; }
.role-item i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.role-item .chip { align-self: flex-start; }
.role-item.active { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(27,99,240,.08); }
.role-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.role-name {
  border: 1px solid transparent; background: transparent; font-size: 17px; font-weight: 700;
  padding: 2px 6px; border-radius: 7px; width: 100%; max-width: 280px;
}
.role-name:focus { border-color: var(--brand); outline: none; background: #fff; }
.perm-groups { display: grid; gap: 14px; }
.perm-groups.disabled { opacity: .62; }
.perm-group { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.perm-gtitle {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px; font-weight: 600; color: var(--brand-dark); margin-bottom: 8px;
}
.perm-item {
  display: flex; gap: 9px; align-items: flex-start; padding: 5px 4px; border-radius: 7px; cursor: pointer;
}
.perm-item:hover { background: #f7f9fc; }
.perm-item input { margin-top: 3px; }
.perm-item input[type="checkbox"] {
  width: 15px; height: 15px; margin: 3px 0 0; accent-color: var(--brand); cursor: pointer; flex: none;
}
.perm-item span { display: flex; flex-direction: column; gap: 1px; }
.perm-item b { font-weight: 500; font-size: 13px; }
.perm-item i { font-style: normal; font-size: 11.5px; color: var(--muted); }

/* 打印设置 */
.pr-kinds { display: grid; gap: 10px; }
.pr-kind { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.pr-kind summary {
  display: flex; align-items: baseline; gap: 10px; cursor: pointer; list-style: none; font-size: 13.5px;
}
.pr-kind summary::-webkit-details-marker { display: none; }
.pr-kind summary b { font-weight: 600; }
.pr-kind summary i { font-style: normal; font-size: 11.5px; color: var(--muted); flex: 1; }
.pr-kind summary em { font-style: normal; font-size: 11.5px; color: var(--brand); font-weight: 600; }
.pr-fields { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; }
.pr-fields label { display: flex; align-items: center; gap: 5px; font-size: 12.8px; cursor: pointer; }

/* 备份 */
.bk-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-left: 4px solid var(--muted);
}
.bk-hero.on { border-left-color: var(--green); background: linear-gradient(90deg, #f2fbf5, #fff 60%); }
.bk-hero h3 { margin: 0 0 5px; font-size: 16px; }
.bk-hero p { margin: 0 0 6px; font-size: 12.8px; color: var(--muted); line-height: 1.7; }
.bk-hero p b { color: var(--text); }
.bk-last { font-size: 11.5px; color: var(--muted); }
.bk-logs .adm-tr { grid-template-columns: 1.2fr .6fr 1.4fr .6fr .6fr 2fr; }
.switch { position: relative; display: inline-block; width: 48px; height: 27px; flex: 0 0 auto; }
.switch input { display: none; }
.switch span {
  position: absolute; inset: 0; background: #d6dbe6; border-radius: 27px; transition: .2s; cursor: pointer;
}
.switch span::after {
  content: ''; position: absolute; left: 3px; top: 3px; width: 21px; height: 21px;
  background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(21px); }

/* 目录选择 */
.dir-bar { display: flex; gap: 8px; margin-bottom: 10px; }
.dir-bar input {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; min-width: 0;
}
.dir-list {
  max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
}
.dir-item {
  display: flex; align-items: center; gap: 7px; border: 0; background: transparent;
  padding: 8px 9px; border-radius: 7px; font-size: 13px; cursor: pointer; text-align: left; width: 100%;
}
.dir-item:hover { background: var(--brand-soft); }
.dir-item.drive { font-weight: 600; }

@media (max-width: 900px) {
  .adm-tr { grid-template-columns: 1fr 1fr; gap: 6px; }
  .adm-tr.adm-th { display: none; }
  .adm-ops { grid-column: 1 / -1; justify-content: flex-start; }
  .adm-form { grid-template-columns: 1fr; }
  .role-wrap { grid-template-columns: 1fr; }
  .role-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .role-item { min-width: 0; padding: 9px 10px; }
  .role-item i { font-size: 11px; }
  .bk-logs .adm-tr { grid-template-columns: 1fr 1fr; }
}

/* 修正：chip 用 em 承载时不该斜体 */
em.chip, .adm-main em.chip, .bk-last em.chip { font-style: normal; }
/* 角色权限：两列排，勾选框和文字对齐 */
.perm-group { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; }
.perm-gtitle { grid-column: 1 / -1; }
.perm-item { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; }
.perm-item input { margin: 3px 0 0; }
.perm-item span { min-width: 0; }
.perm-item b { line-height: 1.4; }
.perm-item i { line-height: 1.45; }
/* 打印字段：标签不许换行把字竖起来 */
.pr-fields label { white-space: nowrap; }
.pr-fields label span { white-space: nowrap; }
@media (max-width: 900px) {
  .perm-group { grid-template-columns: 1fr; }
}

/* ================= 操作日志 ================= */
.op-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.op-stat {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff;
  display: flex; flex-direction: column; gap: 2px;
}
.op-stat b { font-size: 18px; font-weight: 700; color: var(--text); }
.op-stat.wide b { font-size: 12.5px; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-stat span { font-size: 11.5px; color: var(--muted); }

.op-filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.op-filter input, .op-filter select { height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: #fff; }
.op-btns { display: flex; gap: 8px; }
.op-btns .btn { flex: 1; }

.op-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.op-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 900px; }
.op-table thead th {
  text-align: left; font-weight: 600; color: var(--muted); background: #f7f9fc;
  padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 12px;
}
.op-table td { padding: 9px 10px; border-bottom: 1px solid #eef1f6; vertical-align: top; }
.op-table tr:last-child td { border-bottom: 0; }
.op-table tbody tr:hover { background: #fafbfd; }
.op-table tr.bad td { background: #fff7f7; }
.op-table td.mono { white-space: nowrap; }
.op-table .op-target { max-width: 220px; }
.op-table .op-detail { max-width: 320px; color: var(--muted); }
.op-role { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 1px; white-space: nowrap; }
.chip-bad { background: #feecec; color: #d64545; }
.chip-err { background: #feecec; color: #d64545; }

/* 日志页：实时 / 归档 两个页签 */
.op-tabs { display: inline-flex; gap: 4px; padding: 4px; background: #eef1f6; border-radius: 10px; margin-bottom: 12px; }
.op-tab {
  border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600;
  padding: 7px 16px; border-radius: 8px; cursor: pointer; transition: background .15s, color .15s;
}
.op-tab:hover { color: var(--text); }
.op-tab.active { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(16, 24, 40, .08); }

/* 归档设置：一行三个输入 + 保存 */
.ar-set {
  display: grid; grid-template-columns: 160px 160px 160px max-content; gap: 10px 12px;
  align-items: start; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line);
}
.ar-set .btn { height: 38px; margin-top: 22px; }
.btn-xs { padding: 4px 9px; font-size: 12px; border-radius: 6px; }
@media (max-width: 900px) {
  .ar-set { grid-template-columns: 1fr 1fr; }
  .ar-set .btn { grid-column: 1 / -1; }
}


.op-page { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; gap: 10px; }

.op-list { display: flex; flex-direction: column; gap: 8px; }
.op-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; }
.op-item.bad { border-color: #f3c9c9; background: #fffafa; }
.op-line1 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.op-line1 b { font-size: 13.5px; }
.op-time { font-size: 11.5px; color: var(--muted); }
.op-target { font-size: 12.5px; margin-top: 3px; word-break: break-all; }
.op-detail { font-size: 12px; color: var(--muted); margin-top: 2px; word-break: break-all; }
.op-who { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.op-bad { font-style: normal; color: #d64545; }

@media (max-width: 900px) {
  .op-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .op-stat.wide { grid-column: span 2; }
  .op-stat b { font-size: 16px; }
  .op-filter { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .op-filter input, .op-filter select { width: 100%; min-width: 0 !important; flex: none; }
  .op-btns .btn { width: 100%; }
  .op-page { flex-direction: column; align-items: stretch; }
  .op-page .row { justify-content: space-between; }
  .op-page button { flex: 1; }
}

/* ============ 批量录入 / 批量入库 ============ */
.bt-tool { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 0 10px; }
.bt-tool .small { margin-left: auto; }
.bt-paste {
  background: #f7f9fd; border: 1px dashed var(--line); border-radius: 12px;
  padding: 12px; margin-bottom: 12px;
}
.bt-paste.hide { display: none; }
.bt-paste textarea {
  width: 100%; height: 130px; resize: vertical; font-size: 12.5px; line-height: 1.6;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.bt-rows { display: flex; flex-direction: column; gap: 10px; max-height: 46vh; overflow-y: auto; padding-right: 2px; }
.bt-row {
  display: flex; gap: 8px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 10px 12px; background: #fff;
}
.bt-n {
  width: 22px; height: 22px; flex: 0 0 22px; margin-top: 18px; border-radius: 50%;
  background: #eef2fa; color: var(--muted); font-size: 11.5px; font-weight: 700;
  display: grid; place-items: center;
}
.bt-fields { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; }
.bt-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bt-f i { font-size: 11.5px; color: var(--muted); font-style: normal; }
.bt-f input { width: 100%; height: 36px; padding: 0 10px; font-size: 13px; }
.bt-del {
  flex: 0 0 auto; width: 26px; height: 26px; margin-top: 16px; border-radius: 8px;
  color: var(--muted); display: grid; place-items: center;
}
.bt-del:hover { background: #feecec; color: var(--red); }
.bt-foot { display: flex; gap: 10px; margin-top: 14px; }
.bs-text {
  width: 100%; height: 180px; resize: vertical; padding: 10px 12px; border-radius: 12px;
  font-size: 13px; line-height: 1.7; font-family: ui-monospace, Menlo, Consolas, monospace;
}
@media (max-width: 720px) {
  .bt-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bt-rows { max-height: 52vh; }
}
@media (min-width: 900px) {
  .sheet.bt-sheet { width: min(780px, 92vw); }
  .sheet.bt-sheet-sm { width: min(620px, 92vw); }
}
@media (max-width: 900px) {
  /* 手机端：整张表跟着弹窗一起滚，"提交"始终贴底，避免列表被切一半 */
  .bt-rows { max-height: none; overflow: visible; }
  .sheet.bt-sheet { padding-bottom: 0; }
  .bt-foot {
    position: sticky; bottom: 0; background: #fff;
    padding: 10px 0 calc(14px + var(--safe-b)); margin-top: 14px;
    box-shadow: 0 -10px 16px -12px rgba(16, 24, 40, .3);
  }
}

/* ============ 手机端性能 ============ */
/* backdrop-filter 在手机 GPU 上非常贵：滚动列表、开弹层都会掉帧。
   手机端一律关掉，用不透明底色达到同样的可读效果；桌面端保留毛玻璃。 */
@media (max-width: 899px) {
  .topbar,
  .tabbar,
  .sheet-mask,
  .cbo-pop,
  .gs-panel,
  .scan-overlay .head {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .topbar { background: #fff; }
  .tabbar { background: #fff; }
}
/* 长列表优化：屏幕外的行跳过渲染，商品/流水几百行时滚动不再卡 */
.adm-tr { content-visibility: auto; contain-intrinsic-size: auto 58px; }
@media (min-width: 900px) {
  .table-wrap tbody tr { content-visibility: auto; contain-intrinsic-size: auto 46px; }
}

/* =========================================================
   入库单 / 出库单 单据视图
   ========================================================= */
.doc-cards { display: none; }
.doc-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-top: 10px; }
.doc-card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.doc-card-h b { font-size: 14.5px; }
.doc-card-m { display: flex; gap: 18px; margin: 9px 0 6px; font-size: 13px; color: var(--muted); }
.doc-card-m b { color: var(--ink); font-size: 14px; }
.doc-card-acts { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 11px; padding-top: 10px; border-top: 1px dashed var(--line); }
@media (max-width: 899px) {
  #doc-list > .table-wrap { display: none; }
  .doc-cards { display: block; }
}

/* =========================================================
   一键安装引导
   ========================================================= */
.install-hero { display: flex; align-items: center; gap: 14px; padding: 16px; margin-top: 10px; border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-soft), #fff); color: var(--brand); }
.install-hero b { color: var(--ink); font-size: 15px; }
.install-hero .small { color: var(--muted); }
.ins-step { display: flex; align-items: flex-start; gap: 11px; padding: 9px 2px; font-size: 13.5px; line-height: 1.6; }
.ins-step > b { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 12.5px; }
.ins-step b { color: var(--brand); }
.ins-note { margin: 8px 0 2px; padding: 10px 12px; border-radius: 10px; background: var(--amber-soft);
  color: #8a5a12; font-size: 12.5px; line-height: 1.6; }

/* =========================================================
   首页：库存实时看板
   ========================================================= */
.fc-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.fc-k { background: var(--bg, #f6f8fc); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.fc-k span { font-size: 12px; color: var(--muted); }
.fc-k b { font-size: 20px; font-weight: 700; }
.fc-body { display: flex; flex-direction: column; }
.fc-row { display: grid; grid-template-columns: 1fr 78px 78px 84px; align-items: center; gap: 8px; padding: 10px 2px; border-top: 1px dashed var(--line); }
.fc-row:first-child { border-top: 0; }
.fc-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fc-name b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-metric { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.fc-metric b { font-size: 14px; }
.fc-days { text-align: center; font-size: 12.5px; font-weight: 650; padding: 5px 6px; border-radius: 8px; background: #eef0f4; color: #7a8699; }
.fc-days.low { background: var(--red-soft); color: #d92d20; }
.fc-days.tight { background: var(--amber-soft); color: #b54708; }
@media (max-width: 899px) {
  .fc-summary { grid-template-columns: repeat(2, 1fr); }
  .fc-row { grid-template-columns: 1fr 64px 64px 72px; gap: 5px; }
  .fc-name b { font-size: 12.5px; }
  .fc-metric b { font-size: 13px; }
  .fc-days { font-size: 11.5px; }
}

/* =========================================================
   顶栏：企业名 + 当前页副标题
   ========================================================= */
.tb-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.tb-title b { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.tb-title small { font-size: 11px; color: var(--muted); margin-top: 1px; }
@media (min-width: 900px) { .tb-title b { max-width: 340px; } }

/* =========================================================
   首页（默认落地页）
   ========================================================= */
.home-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 20px 22px; border-radius: 16px; color: #fff;
  background: linear-gradient(120deg, #1b63f0 0%, #3f7bff 55%, #6a9bff 100%);
  box-shadow: 0 10px 30px -14px rgba(27, 99, 240, .6);
}
.hh-left { min-width: 0; }
.hh-greet { font-size: 12.5px; opacity: .85; }
.home-hero h1 { margin: 4px 0 3px; font-size: 23px; font-weight: 750; letter-spacing: .5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hh-sub { font-size: 12px; opacity: .8; }
.hh-scan {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  width: 84px; height: 84px; border: 0; border-radius: 20px; cursor: pointer;
  background: rgba(255, 255, 255, .18); color: #fff; font-size: 12px; font-weight: 600;
  border: 1px solid rgba(255, 255, 255, .35);
}
.hh-scan:active { transform: scale(.95); }

.home-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.hs { background: var(--card, #fff); border-radius: 14px; padding: 13px 14px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.hs::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.hs.in::before { background: var(--green); }
.hs.out::before { background: var(--brand); }
.hs.stock::before { background: #7a5af0; }
.hs.warn::before { background: var(--amber, #f59e0b); }
.hs-k { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.hs-v { font-size: 22px; font-weight: 750; margin-top: 5px; }
.hs-v small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }

.home-quick { margin-top: 14px; }
.hq-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.hq {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  padding: 14px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg, #f7f9fd);
  color: var(--text); font-size: 12.5px; cursor: pointer;
}
.hq:active { transform: scale(.96); background: var(--brand-soft); }
.hq-i { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); }

.home-fc .fc-row { grid-template-columns: 1fr 78px 84px; }

.home-install {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  border-radius: 14px; background: var(--brand-soft); border: 1px solid #d4e2ff;
}
.hi-i { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center;
  background: var(--brand); color: #fff; }
.home-install b { font-size: 14.5px; }

@media (max-width: 899px) {
  .home-hero { padding: 16px; border-radius: 14px; }
  .home-hero h1 { font-size: 19px; }
  .hh-scan { width: 66px; height: 66px; border-radius: 16px; font-size: 11px; }
  .home-stats { grid-template-columns: repeat(2, 1fr); }
  .hq-grid { grid-template-columns: repeat(3, 1fr); }
  .home-fc .fc-row { grid-template-columns: 1fr 62px 72px; }
  .home-install { flex-wrap: wrap; }
  .home-install .btn { width: 100%; }
}

/* 安装步骤高亮提示 */
.ins-hl { animation: insHl 1.4s ease; border-radius: 10px; }
@keyframes insHl {
  0%, 100% { background: transparent; }
  25%, 70% { background: var(--amber-soft); box-shadow: 0 0 0 6px var(--amber-soft); }
}

/* =========================================================
   首页快捷入口：添加按钮
   ========================================================= */
.hq-add { border-style: dashed; color: var(--muted); background: transparent; }
.hq-add .hq-i { background: var(--bg); color: var(--muted); }

/* =========================================================
   仓库管理集合页
   ========================================================= */
.wh-hub-hero {
  display: flex; align-items: center; gap: 14px; padding: 18px;
  border-radius: 14px; color: #fff;
  background: linear-gradient(120deg, #7a5af0 0%, #9069ff 60%, #ad8bff 100%);
  box-shadow: 0 10px 30px -14px rgba(122, 90, 240, .55);
}
.wh-hub-hero b { font-size: 17px; }
.wh-hub-hero .small { opacity: .85; }
.wh-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.wh-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
  padding: 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg, #f7f9fd); color: var(--text); text-align: left; cursor: pointer;
}
.wh-item:active { transform: scale(.97); background: var(--brand-soft); }
.wh-item b { font-size: 13.5px; }
.wh-item .small { font-size: 11.5px; line-height: 1.4; }
.wh-i { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); margin-bottom: 2px; }
@media (max-width: 899px) {
  .wh-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   快捷入口编辑器
   ========================================================= */
.qe-row, .qe-add {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 10px; border-radius: 10px; background: var(--bg, #f7f9fd);
  border: 1px solid var(--line); margin-bottom: 7px; color: var(--text); text-align: left;
}
.qe-row b, .qe-add b { font-size: 13.5px; font-weight: 600; }
.qe-i { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); flex: 0 0 auto; }
.qe-add { cursor: pointer; background: transparent; border-style: dashed; }
.qe-add:active { background: var(--brand-soft); }
.qe-btn {
  flex: 0 0 auto; width: 28px; height: 28px; border: 0; border-radius: 8px; cursor: pointer;
  display: grid; place-items: center; background: var(--card, #fff); color: var(--muted);
}
.qe-btn:disabled { opacity: .3; cursor: default; }
.qe-btn.danger { color: var(--red); background: var(--red-soft); }
.qe-btn:nth-of-type(1) svg { transform: rotate(-90deg); }  /* 上移：箭头朝上 */
.qe-btn:nth-of-type(2) svg { transform: rotate(90deg); }   /* 下移：箭头朝下 */

/* =========================================================
   出入库单据（列表 / 表单 / 详情）
   ========================================================= */
.dc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.dc-card { padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--card, #fff); cursor: pointer; box-shadow: var(--shadow); }
.dc-card:active { transform: scale(.98); }
.dc-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.dc-h b { font-size: 15px; }
.dc-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; }
.dc-meta span { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.dc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.dc-foot b { font-size: 15px; }
.dc-sec { font-size: 13px; font-weight: 650; color: var(--brand); margin: 16px 0 8px; padding-left: 8px; border-left: 3px solid var(--brand); overflow: hidden; }
.dc-sec:first-child { margin-top: 2px; }
.dc-addbtns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.di-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg, #f7f9fd); margin-bottom: 8px; }
.di-thumb { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); overflow: hidden; }
.di-thumb img { width: 100%; height: 100%; object-fit: cover; }
.di-info { flex: 1 1 auto; min-width: 0; }
.di-ctrl { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.di-qty-lock { font-size: 13px; font-weight: 650; color: var(--muted); }
.di-qty, .di-price { width: 68px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--card, #fff); color: var(--text); font-size: 13px; text-align: right; }
.di-sn { flex: 1; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--card, #fff); color: var(--text); font-size: 12.5px; }
.di-del { flex: 0 0 auto; width: 28px; height: 28px; border: 0; border-radius: 7px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); cursor: pointer; }
.dc-attach { display: flex; flex-wrap: wrap; gap: 10px; }
.dc-attach-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.dc-attach-item img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.dc-att { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 92px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; text-align: center; overflow: hidden; }
.dc-att img { width: 100%; height: 64px; object-fit: cover; border-radius: 6px; }
.dc-view-hero { display: flex; align-items: center; justify-content: space-between; padding: 12px; border-radius: 11px; background: var(--brand-soft); }
.dc-view-hero b { font-size: 16px; }
.dc-kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; }
.dc-kv > div { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.dc-kv span { color: var(--muted); font-size: 12.5px; }
.dc-kv b { font-size: 12.5px; text-align: right; }
.dpp-list { max-height: 60vh; overflow: auto; }
.dpp-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); margin-bottom: 7px; text-align: left; color: var(--text); cursor: pointer; }
.dpp-item:active { background: var(--brand-soft); }
@media (max-width: 899px) {
  .dc-grid { grid-template-columns: 1fr; }
  .dc-kv { grid-template-columns: 1fr; }
  .di-qty, .di-price { width: 60px; }
}

/* 打印预览层：先核对排版，再确认打印 */
.print-preview-mask { z-index: 1400; display: flex; align-items: center; justify-content: center; padding: 16px; }
.pp-wrap { width: min(920px, 96vw); height: min(92dvh, 900px); display: flex; flex-direction: column; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 60px rgba(8, 14, 26, .3); animation: popIn .2s ease; }
.pp-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pp-bar-t { display: flex; align-items: center; gap: 8px; font-size: 15.5px; font-weight: 650; }
.pp-bar-s { font-size: 12px; font-weight: 400; color: var(--muted); }
.pp-tip { padding: 9px 16px; font-size: 12.5px; color: var(--muted); background: var(--brand-soft); }
.pp-stage { flex: 1; min-height: 0; padding: 14px; background: #e9edf4; overflow: auto; display: flex; justify-content: center; }
.pp-frame { width: 100%; max-width: 720px; min-height: 70%; background: #fff; border: 1px solid #d5dae4; box-shadow: 0 3px 14px rgba(16, 24, 40, .1); }
.pp-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
