/* 泽众智管 · 管家婆 iShop 网页同款壳（三端共用） */
:root {
  --gjp-nav: #2b333e;           /* 管家婆侧栏底色 */
  --gjp-nav-hover: #3b78e7;     /* 管家婆悬浮/选中亮蓝 */
  --gjp-nav-active: #3b78e7;
  --gjp-accent: #e11d48;        /* 主按钮/新增（管家婆红） */
  --gjp-tab-active: #3b78e7;    /* 页签选中蓝 */
  --gjp-bg: #f0f2f5;
  --gjp-card: #ffffff;
  --gjp-ink: #1f2937;
  --gjp-muted: #6b7280;
  --gjp-line: #e5e7eb;
  --gjp-blue: #3b82f6;
  --gjp-green: #10b981;
  --gjp-orange: #f59e0b;
  --gjp-red: #ef4444;
  --gjp-side-w: 75px;
  --gjp-font: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --gjp-edge: 14px;
  --gjp-fav-zebra: #f7f8fa;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%;
  font-family: var(--gjp-font);
  background: var(--gjp-bg);
  color: var(--gjp-ink);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }

/* —— 登录（对齐管家婆 iShop 双栏视觉） —— */
.login-page {
  min-height: 100%;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1200px 800px at -10% -10%, rgba(19, 181, 194, 0.18), transparent 50%),
    radial-gradient(900px 600px at 110% 110%, rgba(15, 118, 110, 0.22), transparent 55%),
    linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
/* 暗背景上的网格 + 工厂感线条 */
.login-page::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.5;
}
.login-card {
  width: min(880px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
  position: relative; z-index: 1;
}
/* 左侧品牌区 */
.login-card .brand-pane {
  background:
    radial-gradient(600px 400px at 10% 100%, rgba(255,255,255,0.18), transparent 60%),
    linear-gradient(150deg, #13b5c2 0%, #0e8a96 55%, #0a6e79 100%);
  color: #fff;
  padding: 32px 28px;
  display: flex; flex-direction: column; gap: 18px;
  position: relative; overflow: hidden;
}
.login-card .brand-pane::after {
  content: ""; position: absolute; right: -40px; bottom: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.login-card .brand-pane::before {
  content: ""; position: absolute; left: -60px; top: -80px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,0.07);
}
.login-card .brand-pane .b-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; letter-spacing: 0.5px; font-size: 16px;
  position: relative; z-index: 1;
}
.login-card .brand-pane .b-logo .b-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(255,255,255,0.18);
  display: grid; place-items: center;
  font-size: 18px; font-weight: 900;
  border: 1.5px solid rgba(255,255,255,0.35);
}
.login-card .brand-pane .b-title {
  font-size: 38px; font-weight: 800; line-height: 1.1;
  letter-spacing: 1px;
  position: relative; z-index: 1;
}
.login-card .brand-pane .b-title span {
  display: block; font-size: 18px; font-weight: 500;
  letter-spacing: 4px; opacity: 0.92; margin-top: 6px;
}
.login-card .brand-pane .b-slogan {
  font-size: 14px; line-height: 1.7;
  opacity: 0.92; max-width: 280px;
  position: relative; z-index: 1;
}
.login-card .brand-pane .b-features {
  display: grid; gap: 10px; margin-top: 6px;
  font-size: 13px; position: relative; z-index: 1;
}
.login-card .brand-pane .b-features li {
  display: flex; align-items: center; gap: 8px;
  list-style: none;
}
.login-card .brand-pane .b-features li::before {
  content: "✓"; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.login-card .brand-pane .b-foot {
  margin-top: auto; font-size: 11px; opacity: 0.75;
  letter-spacing: 1.2px;
  position: relative; z-index: 1;
}
/* 右侧表单区 */
.login-card .form-pane {
  padding: 28px 32px 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.login-card .form-pane .fp-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.login-card .form-pane .fp-title {
  font-size: 17px; font-weight: 700; color: #0f172a;
}
.login-card label { display: block; font-size: 0.78rem; color: #475569; margin: 6px 0 4px; }
.login-card select, .login-card input[type=password], .login-card input[type=text] {
  width: 100%; padding: 11px 12px;
  border: 1px solid #d8e1eb; border-radius: 8px; background: #fff;
  font-size: 14px; color: #0f172a;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.login-card select:focus, .login-card input:focus {
  outline: none; border-color: #13b5c2;
  box-shadow: 0 0 0 3px rgba(19, 181, 194, 0.15);
}
.login-card .remember-row {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: #64748b; margin-top: 6px;
}
.login-card .remember-row .lp-remember {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  white-space: nowrap;
}
.login-card .remember-row .lp-remember input { width: 14px; height: 14px; accent-color: #13b5c2; }
/* .lp-forgot / .alt-entries / .login-pwa-tip / .login-pwa-install 均已移除（2026-07-29 老板要求） */
.login-card .btn-primary {
  width: 100%; margin-top: 14px; padding: 12px;
  border: none; border-radius: 8px; cursor: pointer;
  background: linear-gradient(135deg, #13b5c2 0%, #0e8a96 100%);
  color: #fff; font-weight: 700; font-size: 15px;
  letter-spacing: 4px;
  box-shadow: 0 8px 20px rgba(19, 181, 194, 0.32);
  transition: transform 0.08s, box-shadow 0.15s;
}
.login-card .btn-primary:hover { box-shadow: 0 12px 24px rgba(19, 181, 194, 0.4); }
.login-card .btn-primary:active { transform: translateY(1px); }
.btn-demo-login {
  width: 100%; margin-top: 10px; padding: 12px 16px;
  border: 1px solid #93c5fd; border-radius: 10px;
  background: #eff6ff; color: #1d4ed8;
  font-size: 0.92rem; font-weight: 600; cursor: pointer;
  min-height: 44px;
}
.btn-demo-login:hover { background: #dbeafe; }
.demo-login-hint {
  margin: 10px 0 0; font-size: 0.78rem; line-height: 1.45;
  color: #64748b; text-align: center;
}
.login-card .err {
  color: #dc2626; font-size: 0.85rem; margin-top: 8px; min-height: 1.2em;
  background: #fef2f2; border: 1px solid #fecaca; border-radius: 6px;
  padding: 6px 10px; display: none;
}
.login-card .err.show { display: block; }
/* 小屏：单列 */
@media (max-width: 720px) {
  .login-card { grid-template-columns: 1fr; }
  .login-card .brand-pane { padding: 24px 22px; }
  .login-card .brand-pane .b-title { font-size: 28px; }
  .login-card .brand-pane .b-title span { font-size: 14px; }
  .login-card .form-pane { padding: 22px; }
}

/* 价格跟踪报表（对齐管家婆进货/销售价格跟踪） */
.pt-toolbar { flex-wrap: wrap; gap: 8px; align-items: center; }
.pt-toolbar input[type="search"] {
  min-width: 140px; max-width: 200px; height: 32px; padding: 0 10px;
  border: 1px solid var(--gjp-line); border-radius: 4px;
}
.pt-side-seg button.on {
  background: #e11d48; color: #fff; border-color: #e11d48;
}
.pt-table-wrap { flex: 1; min-height: 0; overflow: auto; }
.pt-pager {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-top: 1px solid var(--gjp-line); background: #fff;
}
.pt-detail-modal { width: min(960px, 94vw); max-height: 86vh; overflow: auto; background: #fff; border-radius: 8px; padding: 12px 16px 16px; }
.pt-detail-modal .modal-hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
@media print {
  .topbar, .side, .tabs, .pt-toolbar, .pt-pager, #flyout { display: none !important; }
  .pt-table-wrap { overflow: visible !important; }
}

/* 基础设置（管家婆 OSParameter） */
.os-layout {
  display: flex; height: 100%; min-height: 0; background: #f5f6f8;
}
.os-side {
  width: 200px; flex-shrink: 0; background: #fff; border-right: 1px solid #e8eaed;
  padding: 12px 0; overflow-y: auto;
}
.os-side-title {
  padding: 4px 16px 10px; font-size: 13px; color: #94a3b8; font-weight: 600;
}
.os-side-item {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 10px 16px; font-size: 13px; color: #334155; cursor: pointer;
}
.os-side-item:hover { background: #fff1f2; }
.os-side-item.on { background: #ffe4e6; color: #e11d48; font-weight: 600; }
.os-main {
  flex: 1; min-width: 0; display: flex; flex-direction: column; background: #fff; margin: 10px;
  border-radius: 6px; border: 1px solid #e8eaed; overflow: hidden;
}
.os-tabs {
  display: flex; gap: 0; padding: 0 16px; border-bottom: 1px solid #e8eaed; background: #fff;
}
.os-tab {
  border: 0; background: transparent; padding: 12px 16px; font-size: 13px; color: #64748b; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.os-tab.on { color: #e11d48; border-bottom-color: #e11d48; font-weight: 600; }
.os-body { flex: 1; overflow: auto; padding: 8px 20px 24px; }
.os-foot {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 12px; border-top: 1px solid #e8eaed; background: #fff;
}
.os-foot .btn-red { min-width: 120px; padding: 10px 28px; font-size: 15px; }
.os-row {
  display: grid; grid-template-columns: 220px 1fr; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid #f1f5f9; align-items: start;
}
.os-lab { color: #334155; font-size: 13px; padding-top: 4px; }
.os-ctl { font-size: 13px; color: #0f172a; }
.os-radio, .os-check {
  display: inline-flex; align-items: center; gap: 4px; margin-right: 14px; margin-bottom: 6px;
  cursor: pointer; white-space: nowrap;
}
.os-checks { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.os-hint { color: #94a3b8; font-size: 12px; margin-top: 6px; line-height: 1.45; }
.os-info {
  margin: 10px 0; padding: 10px 12px; background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: 6px; color: #1e40af; font-size: 12px; line-height: 1.5;
}
.os-alert {
  margin: 8px 0 14px; padding: 8px 12px; background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 6px; color: #92400e; font-size: 12px;
}
.os-box {
  margin: 8px 0 12px; padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 6px; background: #f8fafc;
}
.os-section-title {
  margin: 14px 0 6px; font-size: 14px; font-weight: 600; color: #0f172a;
  border-left: 3px solid #e11d48; padding-left: 8px;
}
.os-num { width: 72px; height: 30px; padding: 0 8px; border: 1px solid #cbd5e1; border-radius: 4px; }
.os-select, .os-text {
  min-width: 220px; max-width: 480px; width: 100%; height: 32px; padding: 0 10px;
  border: 1px solid #cbd5e1; border-radius: 4px;
}
textarea.os-text { height: auto; padding: 8px 10px; }
.os-inline { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.os-logo-box {
  width: 120px; height: 120px; border: 1px dashed #cbd5e1; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 12px;
  background: #f8fafc;
}
@media (max-width: 900px) {
  .os-layout { flex-direction: column; }
  .os-side { width: 100%; display: flex; overflow-x: auto; padding: 0; border-right: 0; border-bottom: 1px solid #e8eaed; }
  .os-side-title { display: none; }
  .os-side-item { white-space: nowrap; }
  .os-row { grid-template-columns: 1fr; gap: 6px; }
}
.login-busy { color: var(--gjp-muted); font-size: 0.85rem; margin-top: 14px; text-align: center; }

/* —— 主壳 —— */
.app { display: none; height: 100vh; height: 100dvh; }
.app.on { display: flex; flex-direction: column; }
.app-body { flex: 1; display: flex; min-height: 0; position: relative; }

/* 顶栏：对齐管家婆「锁定顶栏」——整栏钉在视口顶部，滚内容也不走 */
.topbar {
  height: 48px; flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 60;
  background: #fff; border-bottom: 1px solid var(--gjp-line);
  display: flex; align-items: center; gap: 12px; padding: 0 14px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.topbar .icon-btn {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--gjp-line); background: #fff; cursor: pointer;
}
/* 大屏：隐藏 edge-handle */
@media (min-width: 901px) {
  .side.hidden { margin-left: 0 !important; }
  .edge-handle { display: none !important; }
}
.topbar .icon-btn:hover { background: #f9fafb; color: var(--gjp-accent); }
.topbar .company-logo {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 8px;
  text-decoration: none; overflow: hidden;
}
.topbar .company-logo img {
  width: 36px; height: 36px; object-fit: contain; display: block;
}
.topbar .search {
  flex: 1; max-width: 360px; margin-left: 8px;
  display: flex; align-items: center; gap: 4px;
  border: 1px solid var(--gjp-line); border-radius: 8px;
  padding: 0 6px 0 12px; background: #f1f5f9;
  height: 34px; min-width: 0; box-sizing: border-box;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.topbar .search:focus-within {
  background: #fff;
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.15);
}
.topbar .search input {
  border: none; outline: none; background: transparent;
  flex: 1; min-width: 0; width: 100%; padding: 6px 0; font-size: 0.86rem;
  color: #0f172a;
}
.topbar .search input::placeholder { color: #94a3b8; }
.topbar .search-go-btn {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border: 0; border-radius: 6px;
  background: transparent; color: #64748b;
  /* 郑总：⌕ 放大约一倍（原 1rem → 2rem） */
  font-size: 2rem; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.topbar .search-go-btn:hover { color: #1677ff; background: #eff6ff; }
.topbar .spacer { flex: 1; }
.topbar .user { font-size: 0.86rem; color: var(--gjp-muted); }
.tb-ai-wrap { position: relative; flex-shrink: 0; }
.tb-ai-btn {
  border: 1px solid #e2e8f0; background: #fff; color: #0f172a;
  border-radius: 6px; padding: 6px 12px; cursor: pointer;
  font-size: 0.84rem; font-weight: 600;
}
.tb-ai-btn:hover, .tb-ai-btn.is-open {
  border-color: var(--gjp-tab-active); color: var(--gjp-tab-active); background: #eff6ff;
}
.tb-ai-drop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 80;
  min-width: 640px; max-width: min(920px, 92vw);
  background: #fff; border: 1px solid var(--gjp-line); border-radius: 8px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  padding: 12px 14px 14px; display: grid; gap: 12px 18px;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}
.tb-ai-drop[hidden] { display: none !important; }
.tb-ai-drop h4 {
  margin: 0 0 8px; font-size: 12px; font-weight: 600; color: #94a3b8;
  letter-spacing: 0.02em;
}
.tb-ai-drop .tb-ai-col { min-width: 0; }
.tb-ai-drop .tb-ai-item {
  display: flex; align-items: center; gap: 6px; width: 100%;
  border: 0; background: transparent; text-align: left;
  padding: 6px 8px; border-radius: 4px; cursor: pointer;
  font-size: 13px; color: #0f172a;
}
.tb-ai-drop .tb-ai-item:hover { background: #f1f5f9; color: var(--gjp-tab-active); }
.tb-ai-drop .tb-ai-badge {
  margin-left: auto; font-size: 10px; font-weight: 700;
  color: #e11d48; background: #fff1f2; border-radius: 3px; padding: 1px 5px;
}
.tb-msg-live {
  position: relative;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  border-radius: 6px;
  padding: 5px 12px;
  cursor: pointer;
  font-size: 0.82rem;
  margin-right: 6px;
  flex-shrink: 0;
}
.tb-msg-live:hover { border-color: #93c5fd; color: #1d4ed8; background: #f8fbff; }
.tb-msg-live.has-msg { border-color: #fda4af; color: #be123c; }
.tb-msg-badge {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #e11d48;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
.wb-today-flash {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.wb-today-flash .flash-chip {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12px;
  color: #475569;
}
.wb-today-flash .flash-chip:hover { border-color: #93c5fd; background: #f8fbff; }
.wb-today-flash .flash-chip strong { color: #0f172a; margin: 0 2px; }
.msg-center-modal {
  position: fixed; inset: 0; z-index: 12000;
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding: 56px 18px 18px;
}
.msg-center-modal[hidden] { display: none !important; }
.msg-center-backdrop {
  position: absolute; inset: 0; background: rgba(15, 23, 42, 0.28);
}
.msg-center-panel {
  position: relative;
  width: min(420px, 96vw);
  max-height: calc(100vh - 80px);
  overflow: auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.22);
  z-index: 1;
}
.msg-center-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #e2e8f0;
}
.msg-center-hd h3 { margin: 0; font-size: 16px; }
.msg-center-close {
  border: none; background: transparent; font-size: 22px; line-height: 1;
  cursor: pointer; color: #64748b; padding: 0 4px;
}
.msg-center-body { padding: 12px 14px 16px; }
.msg-summary { font-size: 12px; color: #64748b; margin-bottom: 10px; }
.msg-item {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  text-align: left;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
}
.msg-item:hover { border-color: #93c5fd; background: #f8fbff; }
.msg-item-n {
  min-width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
}
.msg-item.tone-amber .msg-item-n { background: #fff7ed; color: #c2410c; }
.msg-item.tone-blue .msg-item-n { background: #eff6ff; color: #1d4ed8; }
.msg-item.tone-cyan .msg-item-n { background: #ecfeff; color: #0e7490; }
.msg-item.tone-rose .msg-item-n { background: #fff1f2; color: #be123c; }
.msg-item.tone-green .msg-item-n { background: #ecfdf5; color: #047857; }
.msg-item-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.msg-item-txt strong { font-size: 13px; color: #0f172a; }
.msg-item-txt small { font-size: 11px; color: #64748b; }
.msg-item-go { font-size: 12px; color: #3b82f6; flex-shrink: 0; }
.msg-loading, .msg-center-body .empty { padding: 24px; text-align: center; color: #64748b; }

.topbar-icons {
  display: flex; align-items: center; gap: 2px; flex-shrink: 0;
}
.topbar-icons[hidden],
.topbar .btn-absorb[hidden] {
  display: none !important;
}
.topbar .tb-ico {
  border: none; background: transparent; cursor: pointer;
  font-size: 0.78rem; color: #64748b; padding: 6px 8px; border-radius: 4px;
}
.topbar .tb-ico:hover { background: #f3f4f6; color: var(--gjp-tab-active); }
.topbar .btn-absorb {
  border: 1px solid var(--gjp-accent); color: var(--gjp-accent);
  background: #fff; border-radius: 6px; padding: 5px 12px; cursor: pointer; font-size: 0.82rem;
}
.topbar .btn-absorb:hover { background: #fff1f2; }

/* 侧栏 */
.side {
  width: var(--gjp-side-w); flex-shrink: 0;
  background: var(--gjp-nav); color: #e5e7eb;
  display: flex; flex-direction: column;
  transition: margin-left .22s ease, transform .22s ease;
  z-index: 40;
}
.side.hidden { margin-left: calc(-1 * var(--gjp-side-w)); }
.side-nav { flex: 1; overflow-y: auto; padding: 8px 0 8px; min-height: 0; }
.side-foot {
  flex-shrink: 0;
  border-top: 1px solid #3f4554;
  padding: 4px 0 8px;
  background: #252933;
}
.side-foot .nav-item { font-size: 0.88rem; color: #cbd5e1; }
.nav-item {
  width: 100%; border: none; background: transparent; color: #d1d5db;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  padding: 9px 4px; cursor: pointer; text-align: center; font-size: 0.72rem;
  border-left: 3px solid transparent;
  transition: background .12s ease, color .12s ease;
  line-height: 1.15;
}
/* 管家婆：悬浮 / 选中 = 亮蓝底，无红条 */
.nav-item:hover,
.nav-item.nav-hot {
  background: var(--gjp-nav-hover);
  color: #fff;
}
.nav-item.on {
  background: var(--gjp-nav-active);
  color: #fff;
  border-left-color: transparent;
}
.nav-item .ico { font-size: 18px; line-height: 1; width: auto; text-align: center; }
.nav-item .lbl {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  font-size: 0.7rem;
  letter-spacing: 0.2px;
}
.status-chips { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.status-chips .chip {
  border: 1px solid var(--gjp-line); background: #fff; color: var(--gjp-muted);
  border-radius: 4px; padding: 3px 8px; font-size: 12px; cursor: pointer;
}
.status-chips .chip.on { border-color: var(--gjp-accent); color: var(--gjp-accent); background: #fff1f2; }
.borrow-banner {
  margin: 0 0 10px; padding: 8px 12px; border-radius: 6px;
  background: #fff7ed; color: #9a3412; font-size: 12px; border: 1px solid #fed7aa;
}

/* 左缘小条（侧栏收起后） */
.edge-handle {
  display: none; width: var(--gjp-edge); flex-shrink: 0;
  background: transparent; border: none; cursor: pointer; position: relative; z-index: 41;
}
.edge-handle.on { display: block; }
.edge-handle::after {
  content: "";
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 4px; height: 44px; border-radius: 2px;
  background: #9ca3af;
}
.edge-handle:hover::after { background: var(--gjp-accent); }

/* 飞出层 —— 对齐管家婆：顶贴当前侧栏项，高度随内容收缩，右侧不露滑块 */
.flyout {
  --fly-pad-x: 24px;
  --fly-pad-y: 12px;
  --fly-col-gap: 28px;
  --fly-row-h: 36px;
  display: none;
  position: absolute;
  left: var(--gjp-side-w);
  top: 0;
  bottom: auto;
  height: auto;
  width: 688px;                 /* 三列业务流程图标准宽 */
  max-width: calc(100vw - var(--gjp-side-w) - 24px);
  max-height: min(85vh, calc(100% - 8px));
  background: #fff;
  border-right: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
  border-top: 3px solid var(--gjp-accent); /* 管家婆飞出顶红线 */
  box-shadow: 4px 0 18px rgba(15, 23, 42, 0.10);
  z-index: 35;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 0 0 4px 0;
  /* 管家婆二级菜单：不露出右侧滑块条（内容仍可滚轮滚动） */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.flyout::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent;
}
.flyout,
.flyout * {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.flyout *::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}
.flyout.flyout-flow2 { width: 520px; }          /* 两列：客户/档案等 */
.flyout.flyout-slim { width: 300px; }           /* 单列：员工/设置/短信等 */
.flyout.flyout-flow4 { width: min(820px, 90vw); } /* 四列偶发 */
.flyout.flyout-wide { width: min(920px, 86vw); } /* 报表等多列 */
/* 常用功能：窄单列斑马纹，顶对齐当前侧栏项 */
.flyout.flyout-fav {
  width: 300px;
  bottom: auto;
  height: auto;
  max-height: min(72vh, 560px);
  border-radius: 0 0 4px 0;
  /* 贴紧侧栏，消除白缝 */
  left: calc(var(--gjp-side-w) - 1px);
}
.flyout.flyout-fav .fly-flow-title {
  color: #333 !important;
  font-weight: 600;
  cursor: default;
}
.flyout.flyout-fav .fly-flow-ico,
.flyout.flyout-fav .fly-back { display: none !important; }
.flyout.flyout-fav .flyout-hd {
  padding: 12px 16px 10px;
  border-bottom: 1px solid #f0f0f0;
}
.flyout.flyout-fav .flyout-cols {
  display: block;
  padding: 0;
  gap: 0;
}
.flyout.flyout-fav .flyout-col h4 { display: none; }
.flyout.flyout-fav .fly-row {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 0;
}
.flyout.flyout-fav .fly-row:nth-child(even) { background: var(--gjp-fav-zebra); }
.flyout.flyout-fav .fly-row:hover { background: #eef2f7; }
.flyout.flyout-fav .fly-name { font-size: 14px; color: #333; }
.flyout.flyout-fav .fly-name:hover { color: #333; }
.flyout.on { display: flex; flex-direction: column; }
.app-body.side-closed .flyout { left: 0; }
.flyout-hd {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 10px var(--fly-pad-x) 8px;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
}
.flyout-hd .fly-back {
  border: none;
  background: transparent;
  width: 28px;
  height: 28px;
  padding: 0;
  cursor: pointer;
  color: #999;
  font-size: 20px;
  line-height: 1;
  border-radius: 4px;
}
.flyout-hd .fly-back:hover { color: var(--gjp-accent); background: #fff1f2; }
.fly-flow-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  padding: 4px 6px;
  margin: 0;
  cursor: pointer;
  color: var(--gjp-accent);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.fly-flow-title:hover { opacity: 0.88; }
.fly-flow-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background: currentColor;
  /* 简易流程图图标（红块） */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h6v4H4V4zm10 0h6v4h-6V4zM4 16h6v4H4v-4zm10 0h6v4h-6v-4zM9 8h2v3h2v2h-2v3H9v-3H7v-2h2V8z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h6v4H4V4zm10 0h6v4h-6V4zM4 16h6v4H4v-4zm10 0h6v4h-6v-4zM9 8h2v3h2v2h-2v3H9v-3H7v-2h2V8z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.flyout-cols {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 4px var(--fly-col-gap);
  padding: var(--fly-pad-y) var(--fly-pad-x) 16px;
  align-content: start;
  flex: 0 0 auto;
}
.flyout.flyout-flow .flyout-cols {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.flyout.flyout-flow4 .flyout-cols {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.flyout.flyout-flow2 .flyout-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.flyout.flyout-slim .flyout-cols {
  grid-template-columns: 1fr;
  gap: 0;
}
.flyout.flyout-wide .flyout-cols {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 4px 24px;
}

.flyout-col h4 {
  margin: 0 0 4px;
  padding: 0 8px;
  font-size: 13px;
  color: #999;
  font-weight: 500;
  line-height: 1.4;
}

.fly-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: var(--fly-row-h);
  padding: 0 8px;
  margin: 0;
  border-radius: 2px;
  cursor: default;
}
.fly-row:hover { background: #f5f5f5; }
.fly-row.soon .fly-name { color: #b0b0b0; }
.fly-row.soon:hover { background: #fafafa; }

.fly-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  vertical-align: middle;
  color: #fff;
  background: #ef4444;
  letter-spacing: 0.02em;
}
.fly-name.has-badge { font-weight: 600; }
.fly-name {
  flex: 1;
  min-width: 0;
  text-align: left;
  border: none;
  background: transparent;
  padding: 6px 0;
  border-radius: 0;
  cursor: pointer;
  color: #333;
  font-size: 14px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fly-name:hover { color: var(--gjp-accent); background: transparent; }

.fly-add {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--gjp-accent);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 0 8px 8px;
  white-space: nowrap;
  letter-spacing: 0;
}
.fly-add:hover { text-decoration: none; opacity: 0.85; }

.fly-ro { flex-shrink: 0; font-size: 12px; color: #b0b0b0; white-space: nowrap; }

/* 兼容旧单按钮样式（若别处仍用） */
.flyout-col > button {
  display: block; width: 100%; text-align: left;
  border: none; background: transparent;
  padding: 10px; border-radius: 2px;
  cursor: pointer; color: #333; font-size: 14px;
  min-height: var(--fly-row-h);
}
.flyout-col > button:hover { background: #f5f5f5; color: var(--gjp-accent); }
.flyout-col > button.soon { color: #b0b0b0; }

/* 内容区：页签锁定在顶栏下方，只有 panel 滚动（管家婆红框锁定区同款） */
.content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  background: var(--gjp-bg);
}
.content > .panel {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 20px 20px;
  -webkit-overflow-scrolling: touch;
}
.content > .panel:not(.on) {
  display: none !important;
}
/* 单据/档案列表：页签+工具栏钉住，仅表体滚动（对齐管家婆） */
.content.content--fill-list {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
}
.content.content--fill-list > .tabs {
  flex-shrink: 0;
  margin-bottom: 0;
  background: #fff;
  z-index: 50;
}
.content.content--fill-list > .panel.on {
  padding-bottom: 12px;
}
.content.content--fill-list > .panel.on.panel-fill-list {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.content.content--fill-list > .panel.on.panel-fill-list > .toolbar,
.content.content--fill-list > .panel.on.panel-fill-list > .goods-toolbar,
.content.content--fill-list > .panel.on.panel-fill-list > .goods-subbar,
.content.content--fill-list > .panel.on.panel-fill-list > .docs-adv-panel,
.content.content--fill-list > .panel.on.panel-fill-list > .docs-subbar {
  flex-shrink: 0;
  background: var(--gjp-bg);
  z-index: 15;
}
.content.content--fill-list > .panel.on.panel-fill-list > .card,
.content.content--fill-list > .panel.on.panel-fill-list > .goods-layout,
.content.content--fill-list > .panel.on.panel-fill-list > .arch-layout {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-bottom: 0;
}
.content.content--fill-list > .panel.on.panel-fill-list > .goods-layout {
  flex-direction: row;
}
.content.content--fill-list > .panel.on.panel-fill-list > .arch-layout {
  flex-direction: row;
}
.content.content--fill-list > .panel.on.panel-fill-list .table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.content.content--fill-list > .panel.on.panel-fill-list table.gjp thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f9fafb;
  box-shadow: 0 1px 0 var(--gjp-line);
}
.content.content--fill-list > .panel.on.panel-fill-list .goods-layout > .cat-side {
  overflow: auto;
  min-height: 0;
}
.content.content--fill-list > .panel.on.panel-fill-list .goods-layout > .goods-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.content.content--fill-list > .panel.on.panel-fill-list .arch-layout > .arch-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tabs {
  display: flex; gap: 0; flex-wrap: wrap; flex-shrink: 0;
  margin: 0;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0 4px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}
.tabs .tab {
  border: none; border-bottom: 2px solid transparent;
  background: transparent;
  padding: 9px 16px 8px; cursor: pointer; font-size: 0.86rem; color: #64748b;
  border-radius: 0;
}
.tabs .tab:hover { color: #334155; background: #f9fafb; }
.tabs .tab.on {
  background: #fff; color: var(--gjp-tab-active);
  border-bottom-color: var(--gjp-tab-active); font-weight: 600;
}
.tabs .tab .x {
  margin-left: 8px; opacity: 0.45; border: none; background: none; cursor: pointer;
  font-size: 14px; line-height: 1;
}
.tabs .tab .x:hover { opacity: 1; color: var(--gjp-accent); }

.tab-ctx-menu {
  position: fixed; z-index: 9999; min-width: 148px;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 4px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  display: none; padding: 4px 0;
}
.tab-ctx-menu button {
  display: block; width: 100%; text-align: left;
  border: none; background: none; padding: 8px 14px;
  font-size: 0.86rem; cursor: pointer; color: #374151;
}
.tab-ctx-menu button:hover { background: #f3f4f6; color: var(--gjp-tab-active); }

.panel { display: none; }
.panel.on { display: block; }
/* 列表填满模式：开着的 panel 必须是 flex，才能钉工具栏、滚表体 */
.content.content--fill-list > .panel.on.panel-fill-list {
  display: flex;
}

.card {
  background: var(--gjp-card); border-radius: 4px;
  border: 1px solid var(--gjp-line); padding: 14px 16px; margin-bottom: 12px;
}
.card h3 { margin: 0 0 12px; font-size: 0.95rem; }

/* 工作台首页 */
.wb-page-title {
  font-size: 1.05rem; font-weight: 700; color: var(--gjp-ink);
  margin: 0 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--gjp-line);
}
.wb-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 10px;
}
.wb-card-head h3 { margin: 0; display: flex; align-items: center; gap: 6px; }
.wb-card-head .title-bar {
  display: inline-block; width: 3px; height: 14px;
  background: var(--gjp-accent); border-radius: 1px;
}
.wb-gear {
  border: none; background: transparent; color: var(--gjp-accent);
  cursor: pointer; font-size: 1rem; padding: 2px 4px; line-height: 1;
}
.wb-gear:hover { opacity: 0.8; }
.wb-enter-link {
  border: none; background: transparent; color: #2563eb;
  cursor: pointer; font-size: 0.82rem; padding: 0;
}
.wb-enter-link:hover { text-decoration: underline; }
.wb-card-foot {
  display: flex; justify-content: flex-end; margin-top: 10px;
  padding-top: 8px; border-top: 1px solid var(--gjp-line);
}
.wb-kpi-left {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.wb-hide-data {
  border: none; background: transparent; color: var(--gjp-muted);
  cursor: pointer; font-size: 0.78rem; padding: 0;
}
.wb-hide-data:hover { color: var(--gjp-ink); }
.wb-kpi-refresh { font-size: 0.72rem; color: var(--gjp-muted); }
.kpi-row.is-hidden .val,
.kpi-row.is-hidden .sub { filter: blur(6px); user-select: none; }
.home-top-row {
  display: grid;
  grid-template-columns: 1fr min(320px, 34%);
  gap: 12px;
  margin-bottom: 12px;
}
.home-top-row .card { margin-bottom: 0; }
.home-quick .quick-grid,
.fum-grid {
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 6px 8px;
}
.fum-grid button {
  flex-direction: row;
  justify-content: flex-start;
  gap: 8px;
  border: 1px solid var(--gjp-line);
  background: #fff;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
}
.fum-grid button:hover { background: #fff7f7; border-color: #fecdd3; }
.fum-grid .qi {
  width: 28px; height: 28px; border-radius: 6px; font-size: 0.85rem; flex-shrink: 0;
}
.fum-grid .qi-label { text-align: left; line-height: 1.25; }
.quick-grid .qi-label { text-align: center; line-height: 1.25; }
.quick-grid .qi-sub { display: inline; font-size: 0.68rem; color: var(--gjp-accent); margin-left: 2px; }

/* 审核中心（对齐 workSpace.ac-card） */
.audit-center h3 { margin-bottom: 0; }
.audit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.audit-item {
  border: none; border-radius: 4px;
  padding: 12px 8px 10px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: box-shadow .15s, transform .12s;
  min-height: 108px;
}
.audit-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); transform: translateY(-1px); }
.audit-item .ac-ico {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,.85);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
  margin-bottom: 2px;
  position: relative;
}
.audit-item .ac-ico::after {
  content: ""; position: absolute; inset: 8px;
  border: 2px solid currentColor; border-radius: 3px; opacity: 0.55;
}
.audit-item.ac-blue { background: #f3f9ff; color: #3b82f6; }
.audit-item.ac-amber { background: #fff8e8; color: #d97706; }
.audit-item.ac-rose { background: #fff1f2; color: #e11d48; }
.audit-item.ac-cyan { background: #ecfeff; color: #0891b2; }
.audit-item .lab { font-size: 0.72rem; color: #64748b; text-align: center; line-height: 1.3; }
.audit-item .val { font-size: 1.2rem; font-weight: 700; color: #111827; }
.status-pill {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 0.75rem; line-height: 1.4;
}
.status-pill.status-unposted {
  background: #ffe4e6; color: #be123c; border: 1px solid #fecdd3;
}

/* 常用功能 */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
}
.quick-grid button {
  border: none; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 4px; border-radius: 8px; color: var(--gjp-ink); font-size: 0.78rem;
}
.quick-grid button:hover { background: #f9fafb; color: var(--gjp-accent); }
.quick-grid .qi {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; font-size: 1.1rem; color: #fff;
}
.qi.c1 { background: #3b82f6; } .qi.c2 { background: #10b981; }
.qi.c3 { background: #f59e0b; } .qi.c4 { background: #ef4444; }
.qi.c5 { background: #8b5cf6; } .qi.c6 { background: #06b6d4; }

/* KPI */
.kpi-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px; flex-wrap: wrap;
}
.seg { display: flex; gap: 0; border: 1px solid var(--gjp-line); border-radius: 6px; overflow: hidden; }
.seg button {
  border: none; background: #fff; padding: 6px 12px; cursor: pointer;
  font-size: 0.82rem; color: var(--gjp-muted); border-right: 1px solid var(--gjp-line);
}
.seg button:last-child { border-right: none; }
.seg button.on { background: var(--gjp-accent); color: #fff; }
.kpi-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.kpi {
  border-radius: 8px; padding: 16px 14px; color: #fff; min-height: 96px;
}
.kpi .lab { font-size: 0.82rem; opacity: 0.92; }
.kpi .val { font-size: 1.45rem; font-weight: 700; margin-top: 8px; letter-spacing: 0.01em; }
.kpi .sub { font-size: 0.75rem; margin-top: 8px; opacity: 0.85; line-height: 1.5; }
.kpi .sub .trend--up { color: #86efac; font-weight: 600; }
.kpi .sub .trend--down { color: #fecaca; font-weight: 600; }
.kpi.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.kpi.green { background: linear-gradient(135deg, #34d399, #059669); }
.kpi.orange { background: linear-gradient(135deg, #fbbf24, #d97706); }
.kpi.red { background: linear-gradient(135deg, #f87171, #dc2626); }

/* 表格 */
.table-wrap { overflow: auto; }
.docs-selected-count {
  color: #ff405d;
  background: #fff1f3;
  border-radius: 10px;
  padding: 2px 9px;
  font-size: 12px;
  cursor: pointer;
}
.docs-page-jump { display:inline-flex; align-items:center; gap:5px; color:#64748b; white-space:nowrap; }
.docs-page-jump input { width:52px; height:30px; padding:3px 6px; text-align:center; border:1px solid #dfe4ea; border-radius:4px; }
.docs-columns-panel {
  position: absolute;
  z-index: 32;
  right: 18px;
  top: 106px;
  width: 430px;
  padding: 14px;
  background: #fff;
  border: 1px solid #dfe4ea;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .16);
}
.docs-columns-tip { display:block; color:#8a94a3; font-size:12px; margin:4px 0 12px; }
.docs-columns-list { display:grid; grid-template-columns:repeat(3, 1fr); gap:9px 12px; }
.docs-columns-list label { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.docs-columns-actions { display:flex; align-items:center; gap:8px; margin-top:14px; padding-top:10px; border-top:1px solid #eef1f5; }
#docsTable tbody tr.docs-row-active > td { background:#fff8e8 !important; }
#docsTable tbody tr[data-doc-id] { cursor:default; }
table.gjp {
  width: 100%; border-collapse: collapse; font-size: 0.84rem; background: #fff;
}
table.gjp th, table.gjp td {
  border-bottom: 1px solid var(--gjp-line); padding: 9px 10px; text-align: left; white-space: nowrap;
}
table.gjp th { background: #f9fafb; color: var(--gjp-muted); font-weight: 600; }
table.gjp tr:hover td { background: #fef2f2; }
table.gjp .link { color: var(--gjp-blue); cursor: pointer; border: none; background: none; padding: 0; text-decoration: none; }
table.gjp .gjp-row-acts { white-space: nowrap; }
table.gjp .gjp-row-acts .link,
table.gjp .gjp-row-acts .link-red { margin-right: 12px; font-size: 0.86rem; }
table.gjp .gjp-row-acts .link:last-child,
table.gjp .gjp-row-acts .link-red:last-child { margin-right: 0; }

/* 开单明细：货号/品名加宽 1.5×；折后单价/金额可编辑（对齐管家婆） */
#dnLines td.dn-col-sku { min-width: 7.5rem; width: 7.5rem; }
#dnLines td.dn-col-name { min-width: 11.25rem; width: 11.25rem; }
#dnLines .dn-sku,
#dnLines .dn-name {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
#dnLines .dn-dprice,
#dnLines .dn-amt {
  width: 5.6rem;
  min-width: 5.6rem;
  box-sizing: border-box;
  text-align: right;
}
#dnLines .dn-amt:disabled {
  background: #f1f5f9;
  color: #64748b;
}
.doc-no-link { color: #2563eb; cursor: pointer; font-weight: 500; padding: 0; border: none; background: none; font: inherit; text-align: left; }
.doc-no-link:hover { text-decoration: underline; }

.doc-gjp-hd {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-bottom: 14px; border-bottom: 1px solid var(--gjp-line); margin-bottom: 16px;
}
.doc-gjp-hd-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.doc-gjp-title { margin: 8px 0 6px; font-size: 1.15rem; font-weight: 600; }
.doc-gjp-sub { display: flex; flex-wrap: wrap; gap: 16px; color: var(--gjp-muted); font-size: 13px; }
.doc-gjp-hd-links { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.doc-status-pill {
  display: inline-block; padding: 4px 10px; border-radius: 4px; font-size: 13px; font-weight: 600;
  line-height: 1.3;
}
.doc-status-pill.status-posted { background: #fff7ed; color: #ea580c; }
.doc-status-pill.status-ok { background: #ecfdf5; color: #059669; }
.doc-status-pill.status-draft { background: #f1f5f9; color: #64748b; }
.doc-status-pill.status-void { background: #fef2f2; color: #b91c1c; }
.doc-line-ding {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; margin-right: 4px; border-radius: 3px;
  background: #eff6ff; color: #2563eb; font-size: 11px; font-weight: 700; vertical-align: middle;
}
.doc-related-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  margin: 10px 0 4px; padding: 8px 12px;
  background: #f8fafc; border: 1px solid var(--gjp-line); border-radius: 4px;
  font-size: 13px;
}
.doc-related-bar .lab { color: var(--gjp-muted); }
.doc-related-bar .link { font-weight: 600; }
.doc-line-idx { white-space: nowrap; }
.doc-line-thumb { width: 36px; height: 36px; object-fit: cover; border-radius: 2px; border: 1px solid var(--gjp-line); }
.doc-line-thumb-ph { color: #cbd5e1; font-size: 12px; }
.doc-gjp-bill-foot {
  margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--gjp-line);
  position: sticky; bottom: 0; background: #fff; z-index: 2;
}
.doc-gjp-bill-foot-money { margin-bottom: 10px; }
.doc-gjp-amt-main { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.doc-gjp-amt-main .lab { color: var(--gjp-muted); font-size: 13px; }
.doc-gjp-amt-main .amt-red { color: #e11d48; font-size: 1.35rem; font-weight: 700; }
.doc-gjp-amt-meta {
  display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: #475569;
}
.doc-alloc-off { display: inline-flex; align-items: center; gap: 4px; color: #64748b; }
.doc-gjp-bill-foot-bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  align-items: center; padding: 8px 0 4px;
}
.doc-gjp-foot-actions {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  border: none; padding: 0; margin: 0; background: transparent;
}
.doc-gjp-sec { margin-bottom: 18px; }
.doc-gjp-sec-title {
  margin: 0 0 10px; padding-left: 8px; border-left: 3px solid var(--gjp-accent);
  font-size: 0.95rem; font-weight: 600;
}
.doc-gjp-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px;
  font-size: 13px;
}
.doc-gjp-grid .lab { color: var(--gjp-muted); margin-right: 8px; }
.doc-gjp-grid .span-2 { grid-column: span 2; }
.doc-ship-grid input {
  width: min(220px, 100%); min-height: 32px; padding: 4px 8px;
  border: 1px solid var(--gjp-line); border-radius: 4px; font-size: 13px;
}
.four-flow-sec { margin-top: 8px; }
.four-flow-lead {
  margin: 0 0 14px; color: #64748b; font-size: 12px; line-height: 1.55;
}
.four-flow-lead b { color: #334155; font-weight: 600; }
.four-flow-status {
  display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 500; vertical-align: middle;
}
.four-flow-status.ok { background: #ecfdf5; color: #047857; }
.four-flow-status.miss { background: #fff7ed; color: #c2410c; }
.four-flow-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
@media (max-width: 1100px) {
  .four-flow-grid { grid-template-columns: 1fr; }
}
.four-flow-slot, .four-flow-service {
  border: 1px solid #eef2f7; border-radius: 6px; padding: 12px; background: #fff;
}
.four-flow-service { margin-top: 12px; }
.four-flow-slot-hd {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px;
}
.four-flow-badge {
  flex: 0 0 auto; min-width: 36px; height: 22px; padding: 0 8px;
  border-radius: 4px; background: #f1f5f9; color: #64748b;
  font-size: 12px; line-height: 22px; text-align: center;
}
.four-flow-badge.on { background: #fee2e2; color: #be123c; }
.four-flow-slot-title { font-size: 13px; font-weight: 600; color: #0f172a; }
.four-flow-slot-tip { font-size: 12px; color: #94a3b8; margin-top: 2px; }
.four-flow-count { margin-left: auto; font-size: 12px; color: #94a3b8; }
.doc-attach-add-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; padding: 0 14px; margin-bottom: 6px;
  border: 1px dashed #f87171; color: #e11d48; background: #fff;
  border-radius: 4px; cursor: pointer; font-size: 13px;
}
.doc-attach-add-btn:hover { background: #fff1f2; }
.doc-attach-hint { color: var(--gjp-muted); font-size: 12px; margin: 0 0 8px; }
.doc-attach-cards { display: flex; flex-direction: column; gap: 8px; }
.doc-attach-card {
  display: flex; align-items: center; gap: 10px; padding: 8px;
  border: 1px solid #f1f5f9; border-radius: 4px; background: #fafafa;
}
.doc-attach-thumb {
  width: 44px; height: 44px; border: 1px solid #e2e8f0; border-radius: 4px;
  background: #fff; color: #e11d48; font-size: 12px; cursor: pointer;
}
.doc-attach-thumb.doc-attach-file { color: #2563eb; }
.doc-attach-meta { flex: 1; min-width: 0; }
.doc-attach-meta .muted { color: var(--gjp-muted); font-size: 12px; margin-top: 2px; }
.doc-attach-empty { color: var(--gjp-muted); font-size: 12px; padding: 4px 0 2px; }
.four-flow-warn {
  margin-top: 8px; padding: 8px 10px; border-radius: 4px;
  background: #fffbeb; color: #b45309; font-size: 12px;
}
.dn-four-flow { display: flex; flex-direction: column; gap: 8px; }
.dn-flow-row {
  display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: center;
  font-size: 12px; color: #64748b;
}
.dn-flow-row input[type=file] { font-size: 12px; }
.doc-attach-box { font-size: 13px; }
.doc-attach-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.doc-attach-add { cursor: pointer; padding: 4px 10px; display: inline-block; }
.doc-attach-list { list-style: none; margin: 0; padding: 0; }
.doc-attach-list li {
  display: flex; align-items: center; gap: 12px; padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
}
.doc-attach-list .muted { color: var(--gjp-muted); font-size: 12px; }
.doc-link { color: #2563eb; }
.doc-gjp-grid-4 {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 16px;
  font-size: 13px;
}
@media (max-width: 1100px) {
  .doc-gjp-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.doc-gjp-grid-4 .lab { color: var(--gjp-muted); margin-right: 8px; }
.doc-gjp-grid-4 .span-2 { grid-column: span 2; }
.doc-gjp-grid-4 input {
  width: min(100%, 180px); border: 1px solid var(--gjp-line); border-radius: 3px;
  padding: 3px 8px; font: inherit;
}
.doc-fee-note { font-size: 12px; color: #64748b; margin: 0 0 8px; }
.doc-empty-hint {
  margin: 0; padding: 14px; text-align: center; color: #94a3b8; font-size: 13px;
  background: #f8fafc; border: 1px dashed #e2e8f0; border-radius: 4px;
}
.doc-ship-block { font-size: 13px; }
.doc-ship-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px;
}
.doc-ship-row input {
  border: 1px solid var(--gjp-line); border-radius: 3px; padding: 4px 8px; font: inherit;
  min-width: 140px;
}
.doc-ship-hint { color: #b45309; font-size: 12px; }
.doc-remark { word-break: break-all; }
.doc-gjp-sumbar .muted { color: #64748b; font-weight: normal; font-size: 12px; margin-left: 4px; }
.doc-gjp-sumbar {
  display: flex; flex-wrap: wrap; gap: 20px; margin-top: 10px; font-size: 13px;
  align-items: baseline;
}
.doc-gjp-settle {
  display: flex; flex-wrap: wrap; gap: 24px; font-size: 14px;
}
.doc-gjp-settle .lab { color: var(--gjp-muted); margin-right: 8px; font-weight: normal; }
.doc-gjp-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-top: 14px; border-top: 1px solid var(--gjp-line); margin-top: 8px;
}
.doc-gjp-foot-actions { border: none; padding: 0; margin: 0; background: transparent; }
.doc-gjp-lines .doc-sum-row td { background: #f7f8fa; }
.doc-gjp-status { margin-right: 8px; }

.doc-action-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 10px 12px; margin-bottom: 10px;
  background: #fff; border: 1px solid var(--gjp-line); border-radius: 4px;
}
.doc-action-bar .btn-red,
.doc-action-bar .btn-ghost { margin-left: 0 !important; }
.doc-hint-muted { color: #64748b; font-size: 12px; margin: 8px 0; }
.doc-hint { color: #64748b; font-size: 12px; margin: 8px 0; }

.toolbar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px;
}
.toolbar input[type="search"] {
  flex: 1; min-width: 180px; padding: 8px 12px;
  border: 1px solid var(--gjp-line); border-radius: 6px;
}
#docsToolbarMain #docsQ { max-width: 520px; margin-left: auto; }
.docs-remark-cell {
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #64748b; font-size: 12px;
}
.btn-red {
  background: var(--gjp-accent); color: #fff; border: none;
  border-radius: 6px; padding: 8px 14px; cursor: pointer; font-weight: 600;
}
.btn-ghost {
  background: #fff; border: 1px solid var(--gjp-line);
  border-radius: 6px; padding: 8px 12px; cursor: pointer;
}
.btn-toolbar {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px; border: 1px solid var(--gjp-line);
  border-radius: 6px; background: #fff; color: var(--gjp-text, #1f2937);
  cursor: pointer; font-size: 13px;
}
.btn-toolbar:hover { background: var(--gjp-bg); border-color: var(--gjp-accent); color: var(--gjp-accent); }
.empty {
  text-align: center; color: var(--gjp-muted); padding: 40px 16px; font-size: 0.9rem;
}
.doc-meta {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 16px;
  font-size: 0.86rem; padding: 10px 0; border-bottom: 1px solid var(--gjp-line);
}
@media (max-width: 900px) {
  .doc-meta { grid-template-columns: 1fr 1fr; }
}
.status-ok { color: #059669; }       /* 已完成 / 已确认 */
.status-posted { color: #d97706; }   /* 已过账 / 部分调用 */
.status-draft { color: #94a3b8; }
.status-void { color: #94a3b8; text-decoration: line-through; }
.status-void { color: #9ca3af; text-decoration: line-through; }

/* 商品页：左分类 + 表（对齐管家婆商品信息） */
.goods-toolbar { flex-wrap: wrap; gap: 8px; align-items: center; }
.goods-subbar { margin-top: -4px; padding-top: 0; }
.goods-select {
  height: 34px; border: 1px solid var(--gjp-line); border-radius: 6px;
  padding: 0 10px; background: #fff; font-size: 0.86rem;
}
.goods-search { flex: 1; min-width: 220px; max-width: 420px; }
.link-red {
  border: none; background: none; color: var(--gjp-accent); cursor: pointer;
  font-size: 0.86rem; padding: 0 4px;
}

/* 销售/进货订单 · 高级查询（对齐管家婆：高级查询▼ / 收起▲） */
.btn-adv-query {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #93c5fd;
  border-radius: 4px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.86rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-adv-query:hover { background: #dbeafe; border-color: #60a5fa; }
.btn-adv-query.is-open {
  border-color: var(--gjp-accent);
  background: #fff1f2;
  color: var(--gjp-accent);
}
.btn-adv-query .adv-tri {
  font-size: 10px;
  line-height: 1;
  transform: translateY(-1px);
}
.btn-adv-query .adv-filter-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--gjp-accent, #e11d48);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.docs-filter-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  padding: 6px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 12px;
  color: #475569;
}
.docs-filter-summary[hidden] { display: none !important; }
.docs-filter-summary .dfs-lab {
  color: #94a3b8;
  margin-right: 2px;
}
.docs-filter-summary .dfs-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.docs-filter-summary .dfs-clear {
  margin-left: 4px;
  font-size: 12px;
}
.docs-adv-panel {
  margin: 0 0 8px;
  padding: 12px 14px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #fff;
}
.docs-adv-panel[hidden] { display: none !important; }
.docs-adv-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 8px;
}
.docs-adv-row > label {
  font-size: 0.86rem;
  color: #475569;
  text-align: right;
}
.docs-adv-dates {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.docs-adv-dates input[type="date"] {
  height: 30px;
  border: 1px solid var(--gjp-line);
  border-radius: 4px;
  padding: 0 8px;
  font-size: 0.84rem;
  background: #fff;
}
.docs-adv-dates > span { color: #94a3b8; font-size: 0.82rem; }
.docs-adv-quick {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: 4px;
}
.docs-adv-quick button {
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  font-size: 0.78rem;
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
}
.docs-adv-quick button:hover,
.docs-adv-quick button.on {
  color: var(--gjp-accent);
  background: #fff1f2;
  border-color: #fecdd3;
}
.docs-adv-grid {
  display: grid;
  grid-template-columns: 96px 1fr 96px 1fr;
  gap: 8px 12px;
  align-items: center;
  margin: 10px 0 8px;
}
.docs-adv-grid > label {
  font-size: 0.86rem;
  color: #475569;
  text-align: right;
}
.docs-adv-grid > input {
  height: 30px;
  border: 1px solid var(--gjp-line);
  border-radius: 4px;
  padding: 0 8px;
  font-size: 0.84rem;
  background: #fff;
  min-width: 0;
}
.docs-adv-checks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 6px 0;
  padding-left: 96px;
  font-size: 0.86rem;
  color: #334155;
}
.docs-adv-check-lab {
  margin-left: -96px;
  width: 96px;
  text-align: right;
  color: #475569;
  flex-shrink: 0;
}
.docs-adv-checks label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
}
.docs-adv-checks label[hidden],
.docs-adv-panel .adv-stock-only[hidden],
.docs-adv-panel .adv-cash-only[hidden],
.docs-adv-panel label.adv-st-cash[hidden],
.docs-adv-panel label.adv-st-order[hidden],
.docs-adv-panel label.adv-st-bill[hidden],
.docs-adv-panel label.adv-st-outbound[hidden],
.docs-adv-panel label.adv-src-order[hidden],
.docs-adv-panel label.adv-src-outbound[hidden],
.docs-adv-panel label.adv-src-common[hidden] {
  display: none !important;
}
.docs-adv-actions {
  display: flex;
  gap: 8px;
  padding: 8px 0 2px 96px;
  flex-wrap: wrap;
  align-items: center;
}
.docs-adv-preset-wrap {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-left: 8px;
}
.docs-adv-preset-wrap select {
  min-width: 140px;
  max-width: 200px;
  height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0 8px;
  font-size: 13px;
  background: #fff;
}
.stock-warn-wh-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px 14px 10px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.stock-warn-wh-kpis .sw-wh-lab {
  font-size: 12px;
  color: #64748b;
  margin-right: 4px;
}
.stock-warn-wh-kpis .sw-wh-chip {
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 12px;
  color: #334155;
}
.stock-warn-wh-kpis .sw-wh-chip:hover { border-color: #93c5fd; background: #eff6ff; }
.stock-warn-wh-kpis .sw-wh-chip strong { font-size: 13px; color: #0f172a; }
.docs-subbar {
  margin-bottom: 8px;
  gap: 6px;
  min-height: 38px;
  border-top: 1px solid var(--gjp-line);
}
.docs-subbar-spacer { flex: 1; }
.docs-analysis-link {
  border: 0;
  background: transparent;
  color: #1677ff;
  cursor: pointer;
  padding: 5px 10px;
}
/* 销售单列表：操作列保持横排，贴近管家婆行高密度 */
#panelDocs table.gjp td.docs-ops-cell {
  white-space: nowrap;
  padding: 6px 10px;
}
#panelDocs table.gjp td.docs-ops-cell .gjp-row-acts {
  display: inline-flex;
  align-items: center;
  gap: 0;
}
#panelDocs.docs-type-outbound table.gjp th,
#panelDocs.docs-type-outbound table.gjp td {
  padding-top: 7px;
  padding-bottom: 7px;
}
.docs-template-link {
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  padding: 5px 2px;
  font-size: 12px;
}
.docs-pager {
  min-height: 42px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-top: 1px solid var(--gjp-line);
  background: #fff;
  color: #64748b;
  font-size: 13px;
}
.docs-pager select {
  height: 30px;
  border: 1px solid var(--gjp-line);
  border-radius: 3px;
  background: #fff;
}
#docsTable .docs-total-row td {
  position: sticky;
  bottom: 0;
  z-index: 4;
  height: 38px;
  background: #fff8e8;
  border-top: 1px solid #f5d58b;
  color: #8a5a00;
  font-weight: 600;
}
#docsTable th {
  position: sticky;
  top: 0;
  white-space: nowrap;
  font-weight: 500;
}
#docsTable {
  width: max(100%, var(--docs-table-width, 1200px));
  table-layout: fixed;
}
#docsTable th,
#docsTable td {
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 管家婆式三段表：左侧勾选/序号、右侧操作冻结，中间列由底部横向滚动条控制。 */
#docsTable thead th:first-child,
#docsTable tbody td:first-child:not([colspan]) {
  position: sticky;
  left: 0;
  z-index: 7;
  background: #fff;
}
#docsTable thead th:nth-child(2),
#docsTable tbody td:nth-child(2):not([colspan]) {
  position: sticky;
  left: var(--docs-left-select-width, 56px);
  z-index: 7;
  background: #fff;
  box-shadow: 1px 0 0 #e5e7eb;
}
#docsTable thead th:last-child,
#docsTable tbody td:last-child:not([colspan]) {
  position: sticky;
  right: 0;
  z-index: 7;
  background: #fff;
  box-shadow: -1px 0 0 #e5e7eb;
}
#docsTable thead th:first-child,
#docsTable thead th:nth-child(2),
#docsTable thead th:last-child {
  z-index: 9;
  background: #f9fafb;
}
#docsTable tbody tr:hover td:first-child,
#docsTable tbody tr:hover td:nth-child(2),
#docsTable tbody tr:hover td:last-child {
  background: #f7faff;
}
#panelDocs .table-wrap {
  scrollbar-color: #9ca3af #eef1f5;
  scrollbar-width: auto;
}
#panelDocs .table-wrap::-webkit-scrollbar {
  width: 12px;
  height: 14px;
}
#panelDocs .table-wrap::-webkit-scrollbar-track {
  background: #eef1f5;
  border-radius: 8px;
}
#panelDocs .table-wrap::-webkit-scrollbar-thumb {
  min-width: 56px;
  background: #9ca3af;
  border: 3px solid #eef1f5;
  border-radius: 8px;
}
#panelDocs .table-wrap::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}
.docs-col-resizer {
  position: absolute;
  z-index: 8;
  top: 0;
  right: -5px;
  width: 10px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
  user-select: none;
}
.docs-col-resizer::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 4px;
  width: 1px;
  height: 14px;
  transform: translateY(-50%);
  background: #cbd5e1;
}
.docs-col-resizer:hover::after,
.docs-col-resizer.on::after {
  width: 2px;
  background: var(--gjp-accent);
}
.docs-col-guide {
  position: fixed;
  z-index: 99999;
  width: 1px;
  background: var(--gjp-accent);
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255, 64, 88, 0.08);
}
body.docs-col-resizing,
body.docs-col-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}
.docs-sort-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.docs-sort-arrows {
  display: inline-flex;
  gap: 0;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1;
}
.docs-sort-arrows i { font-style: normal; margin-left: -2px; }
.docs-sort-btn:hover { color: #1677ff; }
.docs-sort-btn[data-dir="asc"] .up,
.docs-sort-btn[data-dir="desc"] .down {
  color: var(--gjp-accent);
  font-weight: 800;
}
.docs-sort-btn[data-dir="asc"] .down,
.docs-sort-btn[data-dir="desc"] .up { color: #dbe1e8; }
#docsTable td {
  height: 42px;
  white-space: nowrap;
}
#docsTable tbody tr:hover { background: #f7faff; }
#docsTable .status-confirmed,
#docsTable .status-posted,
#docsTable .status-done {
  color: #f59e0b;
}
@media (max-width: 900px) {
  .docs-adv-row { grid-template-columns: 1fr; }
  .docs-adv-row > label { text-align: left; }
  .docs-adv-grid { grid-template-columns: 1fr; }
  .docs-adv-grid > label { text-align: left; }
  .docs-adv-checks { padding-left: 0; }
  .docs-adv-check-lab { margin-left: 0; width: auto; text-align: left; }
  .docs-adv-actions { padding-left: 0; }
}
.link-muted {
  border: none; background: none; color: var(--gjp-muted); cursor: pointer; font-size: 0.78rem;
}
.doc-ops { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.doc-ops .link { border: none; background: none; color: #2563eb; cursor: pointer; font-size: 0.82rem; padding: 0; }
.doc-more-wrap { position: relative; display: inline-block; }
.doc-more-menu,
.goods-more-menu {
  position: absolute; right: 0; top: 100%; z-index: 40;
  min-width: 128px; background: #fff; border: 1px solid #e2e8f0;
  border-radius: 6px; box-shadow: 0 8px 24px rgba(15,23,42,.12);
  padding: 4px 0; margin-top: 4px;
}
.doc-more-menu[hidden],
.goods-more-menu[hidden] { display: none !important; }
/* 挂到 body 后避免被 #docsTable td / .table-wrap 的 overflow 裁成空框 */
.doc-more-menu.is-portal,
.goods-more-menu.is-portal {
  position: fixed;
  z-index: 6000;
  margin-top: 0;
  right: auto;
}
.doc-more-menu button {
  display: block; width: 100%; text-align: left; border: none; background: none;
  padding: 7px 12px; font-size: 0.82rem; color: #0f172a; cursor: pointer;
}
.doc-more-menu button:hover { background: #f1f5f9; }
.doc-more-menu button:disabled { color: #94a3b8; cursor: default; }
.doc-more-menu button:disabled:hover { background: none; }
.convert-order-modal { width: min(760px, 94vw); max-height: 86vh; overflow: auto; }
.convert-order-hint {
  margin: 4px 0 12px;
  padding: 9px 12px;
  background: #fff8e8;
  border: 1px solid #f5d58b;
  color: #8a5a00;
  border-radius: 3px;
  font-size: 13px;
}
.convert-order-mode {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 18px 10px 0;
  font-size: 14px;
  cursor: pointer;
}
.convert-order-lines { max-height: 46vh; border: 1px solid var(--gjp-line); }
.convert-order-lines input {
  width: 110px;
  height: 30px;
  border: 1px solid var(--gjp-line);
  border-radius: 3px;
  padding: 0 7px;
}
.convert-order-lines input:disabled { background: #f5f6f8; color: #94a3b8; }
.goods-more-wrap { position: relative; display: inline-block; vertical-align: middle; }
.goods-more-menu button {
  display: block; width: 100%; text-align: left; border: none; background: none;
  padding: 7px 12px; font-size: 0.82rem; color: #0f172a; cursor: pointer;
}
.goods-more-menu button:hover { background: #f1f5f9; }
.goods-more-menu button.danger { color: #b91c1c; }
.goods-layout { display: flex; gap: 12px; min-height: 420px; }
.stock-layout { display: flex; gap: 12px; min-height: 420px; }
.stock-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content.content--fill-list > .panel.on.panel-fill-list > .stock-layout { flex-direction: row; }
.content.content--fill-list > .panel.on.panel-fill-list .stock-layout > .cat-side {
  overflow: auto; min-height: 0;
}
.content.content--fill-list > .panel.on.panel-fill-list .stock-layout > .stock-main {
  flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden;
}
.cat-side {
  width: 220px; flex-shrink: 0; background: #fff;
  border: 1px solid var(--gjp-line); border-radius: 8px; padding: 8px 0 12px;
  max-height: calc(100vh - 220px); overflow: auto;
}
.cat-hd {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 12px 8px; font-weight: 600; font-size: 0.88rem;
}
.cat-search {
  display: block; width: calc(100% - 24px); margin: 0 12px 8px;
  border: 1px solid var(--gjp-line); border-radius: 4px; padding: 6px 8px; font-size: 0.8rem;
}
.cat-tree button {
  display: block; width: 100%; text-align: left; border: none; background: transparent;
  padding: 7px 14px; cursor: pointer; font-size: 0.84rem; color: var(--gjp-ink);
}
.cat-tree button.lv2 { padding-left: 28px; color: #475569; }
.cat-tree button:hover { background: #f8fafc; }
.cat-tree button.on { background: #fff1f2; color: var(--gjp-accent); font-weight: 600; }
.goods-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.goods-name-link {
  color: #2563eb; cursor: pointer; text-decoration: none; border: none; background: none;
  padding: 0; font: inherit; text-align: left;
}
.goods-name-link:hover { text-decoration: underline; }
.goods-thumb {
  width: 36px; height: 36px; object-fit: cover; border-radius: 4px;
  background: #f1f5f9; display: inline-block; vertical-align: middle;
}
.goods-thumb.ph {
  width: 36px; height: 36px; border: 1px dashed #cbd5e1; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #94a3b8; font-size: 0.7rem;
}
.goods-total-row td { background: #f8fafc; font-weight: 600; }
.goods-ops a, .goods-ops button {
  color: #2563eb; cursor: pointer; border: none; background: none;
  font-size: 0.82rem; margin-right: 8px; padding: 0;
}
.pager {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 10px 12px; border-top: 1px solid var(--gjp-line); font-size: 0.82rem;
  color: #475569;
}
.pager-btns { display: flex; flex-wrap: wrap; gap: 4px; }
.pager-btns button {
  min-width: 28px; height: 28px; border: 1px solid var(--gjp-line);
  background: #fff; border-radius: 4px; cursor: pointer; font-size: 0.8rem;
}
.pager-btns button.on { background: var(--gjp-accent); color: #fff; border-color: var(--gjp-accent); }
.pager-goto input {
  width: 48px; height: 28px; border: 1px solid var(--gjp-line); border-radius: 4px;
  text-align: center; margin: 0 4px;
}

/* 编辑商品 */
#panelGoodsEdit { display: none; flex-direction: column; min-height: 0; }
#panelGoodsEdit.on { display: flex; }
.ge-scroll { flex: 1; overflow: auto; padding: 0 0 80px; }
.ge-footer {
  position: sticky; bottom: 0; display: flex; justify-content: center; gap: 16px;
  padding: 14px; background: rgba(255,255,255,.96); border-top: 1px solid var(--gjp-line);
  z-index: 5;
}
.ge-sec {
  background: #fff; border: 1px solid var(--gjp-line); border-radius: 8px;
  margin: 0 0 12px; padding: 14px 18px 18px;
}
.ge-sec h3 {
  margin: 0 0 14px; font-size: 0.95rem; padding-left: 10px;
  border-left: 3px solid var(--gjp-accent); font-weight: 700;
}
.ge-sec .ge-sec-extra { float: right; font-size: 0.8rem; font-weight: 400; color: #2563eb; cursor: pointer; }
.ge-grid {
  display: grid; grid-template-columns: 120px 1fr 120px 1fr; gap: 12px 10px; align-items: center;
}
.ge-grid label { text-align: right; color: #64748b; font-size: 0.86rem; }
.ge-grid label .req { color: #e11d48; margin-right: 2px; }
.ge-grid input, .ge-grid select, .ge-grid textarea {
  width: 100%; border: 1px solid var(--gjp-line); border-radius: 4px;
  padding: 7px 10px; font-size: 0.86rem; background: #fff;
}
.ge-grid textarea { min-height: 72px; resize: vertical; grid-column: 2 / span 3; }
.ge-grid .span2 { grid-column: 2 / span 3; }
.ge-hint { color: #94a3b8; font-size: 0.78rem; margin-top: 8px; }
.ge-toggle-row {
  display: flex; align-items: flex-start; gap: 16px; padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}
.ge-toggle-row:last-child { border-bottom: none; }
.ge-toggle {
  display: inline-flex; align-items: center; gap: 8px; min-width: 120px;
  font-weight: 600; font-size: 0.88rem;
}
.ge-toggle .sw {
  width: 40px; height: 22px; border-radius: 11px; background: #cbd5e1; position: relative;
  cursor: pointer; flex-shrink: 0;
}
.ge-toggle .sw.on { background: var(--gjp-accent); }
.ge-toggle .sw::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: left .15s;
}
.ge-toggle .sw.on::after { left: 20px; }
.ge-toggle-desc { color: #64748b; font-size: 0.82rem; flex: 1; }
/* 多单位：管家婆横排公式「辅助单位1：1 盘 = 4500 PCS（个）」——窄单位名、无步进箭头、无卡片 */
.ge-unit-head {
  display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px;
  font-size: 0.86rem; color: #64748b;
}
.ge-unit-head strong { color: #0f172a; font-size: 0.92rem; font-weight: 700; }
.ge-unit-list { display: flex; flex-direction: column; gap: 0; max-width: 560px; }
.ge-unit-row-gjp {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap;
  padding: 7px 0; border-bottom: 1px solid #f1f5f9; background: transparent;
}
.ge-unit-row-gjp:last-child { border-bottom: none; }
.ge-unit-row-gjp .ge-uc-lab {
  flex: 0 0 84px; font-size: 0.84rem; color: #64748b; font-weight: 500;
  white-space: nowrap;
}
.ge-unit-row-gjp .ge-uc-formula {
  display: inline-flex; align-items: center; gap: 6px; flex: 1; min-width: 0;
}
.ge-unit-row-gjp .ge-uc-one {
  font-size: 0.9rem; font-weight: 600; color: #0f172a; width: 14px; text-align: center;
}
/* 单位名：固定窄框，盘/箱同宽对齐（修截图红箭头处过宽） */
.ge-unit-row-gjp input.ge-uc-name {
  width: 48px; min-width: 48px; max-width: 48px; height: 30px; box-sizing: border-box;
  border: 1px solid #d0d7de; border-radius: 3px;
  padding: 0 4px; font-size: 0.88rem; font-weight: 600;
  color: #0f172a; background: #fff; text-align: center;
}
.ge-unit-row-gjp .ge-uc-eq-sign {
  color: #64748b; font-weight: 500; font-size: 0.9rem; width: 14px; text-align: center;
}
.ge-unit-row-gjp input.ge-uc-rate,
.ge-unit-row-gjp input[data-u-rate] {
  width: 104px; height: 30px; box-sizing: border-box;
  border: 1px solid #d0d7de; border-radius: 3px;
  padding: 0 8px; font-size: 0.9rem; font-weight: 600;
  text-align: right; color: #0f172a; background: #fff;
  appearance: textfield; -moz-appearance: textfield;
}
.ge-unit-row-gjp input[data-u-rate]::-webkit-outer-spin-button,
.ge-unit-row-gjp input[data-u-rate]::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.ge-unit-row-gjp .ge-uc-base {
  font-size: 0.84rem; color: #334155; white-space: nowrap; min-width: 64px;
}
.ge-unit-row-gjp .ge-uc-del {
  flex: 0 0 26px; margin-left: 2px;
  width: 26px; height: 26px; border: none; border-radius: 3px;
  background: transparent; color: #94a3b8; cursor: pointer;
  font-size: 1.05rem; line-height: 1; padding: 0;
}
.ge-unit-row-gjp .ge-uc-del:hover { color: #e11d48; background: #fef2f2; }
.ge-unit-empty {
  color: #94a3b8; font-size: 0.86rem; padding: 6px 0 2px;
}
.ge-unit-ratio {
  margin-top: 8px; max-width: 560px; font-size: 0.8rem; color: #64748b;
  background: #f8fafc; border: 1px solid #eef2f7;
  border-radius: 4px; padding: 7px 12px;
}
.ge-unit-ratio b { color: #0f172a; font-weight: 700; }
.ge-unit-defaults {
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid #f1f5f9;
  max-width: 720px;
}
.ge-unit-defaults .ge-ud-item {
  display: inline-flex; align-items: center; gap: 6px;
}
.ge-unit-defaults label {
  color: #64748b; font-size: 0.84rem; white-space: nowrap;
}
.ge-unit-defaults select {
  min-width: 118px; height: 30px; border: 1px solid #d0d7de; border-radius: 3px;
  padding: 0 8px; font-size: 0.84rem; background: #fff; color: #0f172a;
}
@media (max-width: 900px) {
  .ge-unit-row-gjp { flex-wrap: wrap; }
  .ge-unit-defaults { gap: 10px 12px; }
  .ge-unit-defaults select { min-width: 110px; }
}
.ge-unit-row, .ge-price-table, .ge-bound-table {
  width: 100%; border-collapse: collapse; font-size: 0.84rem; margin-top: 8px;
}
.ge-unit-row td, .ge-price-table th, .ge-price-table td,
.ge-bound-table th, .ge-bound-table td {
  border: 1px solid var(--gjp-line); padding: 6px 8px;
}
.ge-price-table th, .ge-bound-table th { background: #f8fafc; font-weight: 600; }
.ge-price-table input, .ge-bound-table input, .ge-unit-row input, .ge-unit-row select {
  width: 100%; border: 1px solid transparent; background: transparent;
  padding: 4px; text-align: right; font-size: 0.84rem;
}
.ge-unit-row input[type="text"], .ge-unit-row select { text-align: left; }
/* 销售分析：对齐管家婆 — 期间+日期 · 维度红条 · 排行在上 · 明细在下 */
.sa-tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--gjp-line); margin: 0 0 10px;
  background: #fff; padding: 0 4px;
}
.sa-tabs button {
  border: none; background: none; padding: 10px 18px; cursor: pointer;
  font-size: 0.9rem; color: #64748b; border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.sa-tabs button.on {
  color: var(--gjp-accent); font-weight: 700; border-bottom-color: var(--gjp-accent);
}
/* 销售分析多维度 Tab（对齐管家婆 iShop） */
.sa-dim-tabs {
  display: flex; gap: 4px; margin: 0 0 6px;
  background: #fff; padding: 4px 6px; border-radius: 6px;
  border-bottom: none;
}
.sa-dim-tabs button {
  border: 1px solid #e2e8f0; background: #fff; padding: 6px 16px; cursor: pointer;
  font-size: 0.86rem; color: #64748b; border-radius: 6px; transition: all 0.15s;
}
.sa-dim-tabs button:hover { background: #f1f5f9; }
.sa-dim-tabs button.on {
  background: var(--gjp-accent); color: #fff; border-color: var(--gjp-accent); font-weight: 600;
}
/* 销售分析日期快捷筛选条 */
.sa-date-bar {
  display: flex; gap: 4px; flex-wrap: wrap; padding: 4px 0; margin: 0 0 6px;
}
.sa-date-btn {
  border: 1px solid #e2e8f0; background: #fff; padding: 4px 12px; cursor: pointer;
  font-size: 0.82rem; color: #64748b; border-radius: 6px; transition: all 0.15s;
}
.sa-date-btn:hover { background: #f1f5f9; }
.sa-date-btn.on {
  background: var(--gjp-accent); color: #fff; border-color: var(--gjp-accent); font-weight: 600;
}
.sa-range {
  font-size: 12px; color: #64748b; white-space: nowrap;
}
.sa-hint {
  margin: 0 0 10px; font-size: 12px; color: #94a3b8; line-height: 1.45;
}
.sa-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}
.sa-kpi {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 4px;
  padding: 10px 12px;
  min-height: 64px;
  box-shadow: none;
}
.sa-kpi .lab { font-size: 12px; color: #64748b; margin-bottom: 2px; }
.sa-kpi .val {
  font-size: 1.2rem; font-weight: 700; color: #0f172a;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.sa-kpi .sub { margin-top: 2px; font-size: 11px; color: #94a3b8; }
.sa-kpi--gross .val { color: #0f766e; }
.sa-layout,
.sa-layout--stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sa-layout--split {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 16px;
  align-items: start;
}
.sa-layout--split .sa-rank {
  order: 1;
}
.sa-rank {
  background: #fff; border: 1px solid #eef2f7; border-radius: 4px;
  padding: 12px 16px; margin: 0;
}
.sa-rank-hd {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 10px;
}
.sa-rank-hd h4 {
  margin: 0; font-size: 0.92rem; color: #0f172a; font-weight: 700;
}
.sa-rank-metrics {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.sa-rank-metrics button {
  border: 1px solid #e2e8f0; background: #fff; color: #64748b;
  border-radius: 3px; padding: 3px 10px; font-size: 12px; cursor: pointer;
}
.sa-rank-metrics button.on {
  border-color: var(--gjp-accent); color: var(--gjp-accent); background: #fff1f2;
  font-weight: 600;
}
.sa-bar-row {
  display: grid; grid-template-columns: 22px minmax(72px, 120px) 1fr 110px; gap: 8px;
  align-items: center; margin: 7px 0; font-size: 0.82rem;
}
.sa-bar-i {
  color: #94a3b8; font-variant-numeric: tabular-nums; text-align: right;
}
.sa-bar-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #334155;
}
.sa-bar-track {
  height: 10px; background: #f1f5f9; border-radius: 2px; overflow: hidden;
}
.sa-bar-fill {
  height: 100%; background: var(--gjp-accent); border-radius: 2px;
  min-width: 2px;
}
.sa-bar-amt {
  text-align: right; color: #0f172a; font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.sa-table-wrap { background: #fff; border: 1px solid #eef2f7; border-radius: 4px; }
.sa-table-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 8px; border-bottom: 1px solid #f1f5f9;
}
.sa-table-hd strong { font-size: 0.92rem; color: #0f172a; }
.sa-table-hd-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sa-check {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: #64748b; user-select: none;
}
.sa-mini.on {
  border-color: var(--gjp-accent) !important;
  color: var(--gjp-accent) !important;
  background: #fff1f2 !important;
  font-weight: 600;
}
.sa-muted { font-size: 12px; color: #94a3b8; }
.sa-table-card { margin: 0; border: none; border-radius: 0; box-shadow: none; padding: 0; }
.sa-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.sa-table thead th {
  background: #f5f6f8; color: #334155; font-weight: 600;
  border-bottom: 1px solid #e2e8f0; padding: 8px 10px; white-space: nowrap;
  text-align: left;
}
.sa-table thead th.num, .sa-table tbody td.num {
  text-align: right; font-variant-numeric: tabular-nums;
}
.sa-table thead .sa-col-filter th {
  background: #fff; padding: 4px 8px; border-bottom: 1px solid #eef2f7;
}
.sa-table thead .sa-col-filter input {
  width: 100%; min-width: 64px; border: 1px solid #e2e8f0; border-radius: 2px;
  padding: 3px 6px; font-size: 12px; background: #fff;
}
.sa-table tbody td {
  padding: 7px 10px; border-bottom: 1px solid #f1f5f9;
  vertical-align: middle; font-variant-numeric: tabular-nums;
}
.sa-table tbody tr:nth-child(even) { background: #fafbfc; }
.sa-table tbody tr:hover { background: #fff7f8; }
.sa-table .sa-total-row td {
  background: #f5f6f8 !important; font-weight: 700; border-top: 1px solid #e2e8f0;
}
.sa-name-link, .sa-link {
  border: none; background: none; color: #2563eb; cursor: pointer;
  font-size: 0.84rem; padding: 0; text-align: left;
}
.sa-name-link:hover, .sa-link:hover { text-decoration: underline; }
.sa-pager {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 14px 10px; border-top: 1px solid #f1f5f9;
  font-size: 12px; color: #64748b;
}
.sa-pager select {
  border: 1px solid #e2e8f0; border-radius: 3px; padding: 2px 6px; font-size: 12px;
}
.sa-total-row { font-weight: 700; background: #f8fafc; }
.sa-neg { color: #b91c1c; }
.sa-pos { color: #0f766e; }
.sa-bar-amt { color: var(--gjp-accent); }
/* 排行榜表格内嵌条形图 */
.sa-bar-cell { min-width: 130px; width: 150px; }
.sa-bar-cell.num { text-align: left; }
.sa-bar-inline { position: relative; height: 24px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.sa-bar-inline-fill { position: absolute; left: 0; top: 0; height: 100%; background: linear-gradient(90deg, var(--gjp-accent), #e53e3e); border-radius: 4px; min-width: 2px; transition: width 0.4s; opacity: 0.85; }
.sa-bar-inline-val { position: relative; z-index: 1; padding-left: 8px; line-height: 24px; font-size: 12px; color: #1e293b; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
#reportToolbar { flex-wrap: wrap; gap: 8px; align-items: center; }
#reportPeriodSeg { margin-left: auto; }
@media (max-width: 1100px) {
  .sa-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sa-bar-row { grid-template-columns: 22px minmax(64px, 100px) 1fr 96px; }
}
@media (max-width: 640px) {
  .sa-kpi-row { grid-template-columns: 1fr; }
  #reportPeriodSeg { margin-left: 0; width: 100%; overflow-x: auto; }
  .sa-bar-row { grid-template-columns: 18px 1fr; }
  .sa-bar-track, .sa-bar-amt { grid-column: 1 / -1; }
}
.ge-wh-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.ge-wh-pills button {
  border: 1px solid var(--gjp-line); background: #fff; border-radius: 4px;
  padding: 5px 10px; font-size: 0.8rem; cursor: pointer;
}
.ge-wh-pills button.on { background: var(--gjp-accent); color: #fff; border-color: var(--gjp-accent); }
.ge-add-link {
  display: inline-block; margin-top: 8px; color: #2563eb; cursor: pointer;
  border: none; background: none; font-size: 0.84rem; padding: 0;
}

/* 窄屏：侧栏变抽屉 */
@media (max-width: 900px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .home-top-row { grid-template-columns: 1fr; }
  .side {
    position: absolute; left: 0; top: 0; bottom: 0;
    box-shadow: 8px 0 24px rgba(0,0,0,.2);
  }
  .side.hidden { margin-left: 0; transform: translateX(-105%); }
  .edge-handle.on { display: block; }
  .flyout {
    left: 0;
    width: min(100%, 688px);
    --fly-pad-x: 20px;
    --fly-col-gap: 24px;
  }
  .flyout.flyout-flow2 { width: min(100%, 520px); }
  .flyout.flyout-wide { width: min(100%, 920px); }
  .topbar .search { display: none; }
  .goods-layout { flex-direction: column; }
  .stock-layout { flex-direction: column; }
  .cat-side { width: 100%; display: flex; overflow-x: auto; padding: 0; }
  .cat-side button { white-space: nowrap; }
}
@media (max-width: 560px) {
  .kpi-row { grid-template-columns: 1fr; }
  .audit-grid { grid-template-columns: 1fr 1fr; }
  .seg button { padding: 5px 8px; font-size: 0.75rem; }
}

/* 智管模块（网页嫁接手机能力） */
.smart-page { display: flex; flex-direction: column; gap: 12px; }
.smart-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.smart-hd h3 { margin: 0 0 4px; font-size: 1.15rem; }
.smart-sub { margin: 0; color: #64748b; font-size: 0.86rem; line-height: 1.5; }
.smart-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.smart-kpi {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
}
.smart-kpi-card {
  background: #fff; border: 1px solid var(--gjp-line); border-radius: 8px; padding: 12px 14px;
}
.smart-kpi-card .l { font-size: 0.78rem; color: #64748b; }
.smart-kpi-card .v { font-size: 1.25rem; font-weight: 700; margin-top: 6px; color: #0f172a; }
.smart-seal-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 12px;
}
.smart-seal-strip {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
}
.smart-seal-item {
  width: 88px; border: 1px solid var(--gjp-line); border-radius: 8px; background: #fff;
  padding: 8px 6px; cursor: pointer; text-align: center;
}
.smart-seal-item.on { border-color: var(--gjp-accent); box-shadow: 0 0 0 1px var(--gjp-accent); }
.smart-seal-item img { width: 56px; height: 56px; object-fit: contain; display: block; margin: 0 auto 4px; }
.smart-seal-item .n { font-size: 0.75rem; font-weight: 600; display: block; }
.smart-seal-item .k { font-size: 0.68rem; color: #94a3b8; }
.smart-seal-preview { width: 100px; height: 100px; object-fit: contain; display: block; margin: 12px auto 0; }
.smart-hint { font-size: 0.78rem; color: #64748b; margin: 6px 0 0; line-height: 1.45; }
.smart-mark-preview {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px;
  padding: 12px; border: 1px dashed #cbd5e1; border-radius: 8px; background: #f8fafc;
}
.smart-mark-before, .smart-mark-after {
  flex: 1; min-width: 120px; text-align: center; font-size: 0.75rem; color: #64748b;
}
.smart-mark-before img, .smart-mark-after img {
  display: block; width: 120px; height: 120px; object-fit: contain; margin: 6px auto 0;
  background: repeating-conic-gradient(#e2e8f0 0% 25%, #fff 0% 50%) 50% / 12px 12px;
  border-radius: 6px; border: 1px solid #e2e8f0;
}
.smart-size-row {
  display: flex; align-items: center; gap: 8px; margin-top: 12px;
  font-size: 0.84rem; color: #334155;
}
.smart-size-row input[type="range"] { flex: 1; }
.seal-place-stage {
  margin-top: 10px; min-height: 280px; background: #e8edf3; border-radius: 10px;
  border: 1px solid var(--gjp-line); display: flex; align-items: center; justify-content: center;
  padding: 12px; overflow: auto;
}
.seal-place-empty { color: #94a3b8; font-size: 0.9rem; padding: 40px 16px; text-align: center; }
.seal-place-fit {
  position: relative; display: inline-block; max-width: 100%;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12); background: #fff; border-radius: 4px;
}
.seal-place-page { display: block; max-width: 100%; max-height: 520px; height: auto; user-select: none; }
.seal-place-overlays { position: absolute; inset: 0; }
.seal-place-mark {
  position: absolute; transform: translate(-50%, -50%);
  cursor: grab; touch-action: none; z-index: 2;
}
.seal-place-mark.on { z-index: 5; filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.28)); }
.seal-place-mark:not(.on) { opacity: 0.78; }
.seal-place-mark img {
  width: 100%; height: auto; display: block; pointer-events: none; user-select: none;
}
.seal-place-handle {
  position: absolute; right: -6px; bottom: -6px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; border: 2px solid #3b78e7; cursor: nwse-resize;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.seal-place-mark:not(.on) .seal-place-handle,
.seal-place-mark:not(.on) .seal-place-x { display: none; }
.seal-place-x {
  position: absolute; top: -10px; right: -10px; width: 22px; height: 22px; border: 0;
  border-radius: 50%; background: #fff; color: #b91c1c; font-size: 14px; line-height: 1;
  box-shadow: 0 1px 4px rgba(0,0,0,.18); cursor: pointer;
}
.smart-file-chip {
  margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: #f8fafc;
  border: 1px dashed #cbd5e1; font-size: 0.86rem; color: #334155;
}
.smart-file-btn { display: inline-flex; align-items: center; cursor: pointer; }
.smart-ok { color: #065f46; font-size: 0.86rem; margin-top: 8px; }
.smart-err { color: #b91c1c; font-size: 0.86rem; margin-top: 8px; }
.smart-dl { display: inline-block; margin-top: 10px; color: var(--gjp-accent); font-weight: 600; }
.smart-list-item {
  display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #f1f5f9;
  background: #fff; padding: 12px 4px; cursor: pointer;
}
.smart-list-item:hover { background: #fff1f2; }
.smart-list-item .t { font-weight: 600; color: #0f172a; }
.smart-list-item .m { font-size: 0.8rem; color: #64748b; margin-top: 4px; line-height: 1.45; }
.smart-pill {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px;
  font-size: 0.7rem; background: #fff1f2; color: var(--gjp-accent); font-weight: 600;
}
.smart-banner { background: #f8fafc; line-height: 1.6; }
.smart-light { border-left: 4px solid #94a3b8; }
.smart-light.red, .smart-light.红 { border-left-color: #ef4444; }
.smart-light.yellow, .smart-light.黄 { border-left-color: #f59e0b; }
.smart-light.green, .smart-light.绿 { border-left-color: #10b981; }
.smart-item-row { display: flex; gap: 8px; margin: 6px 0; }
.smart-item-row input { flex: 1; padding: 8px 10px; border: 1px solid var(--gjp-line); border-radius: 6px; }
.smart-bullets { margin: 0; padding-left: 1.2em; line-height: 1.9; }
.smart-bullets .t { font-weight: 600; }
.smart-bullets .m { color: #64748b; font-size: 0.86rem; line-height: 1.45; margin: 2px 0 6px; }
.advisor-lv {
  display: inline-block; font-size: 0.72rem; font-weight: 600;
  color: #b91c1c; background: #fef2f2; border-radius: 4px; padding: 1px 6px; margin-right: 4px;
}
.advisor-cursor { line-height: 1.55; }
.advisor-pre {
  white-space: pre-wrap; font-family: inherit; font-size: 0.88rem;
  background: #f8fafc; border: 1px solid var(--gjp-line); border-radius: 8px;
  padding: 12px; max-height: 360px; overflow: auto; margin: 8px 0 0;
}
@media (max-width: 900px) {
  .smart-kpi { grid-template-columns: 1fr 1fr; }
  .smart-seal-grid { grid-template-columns: 1fr; }
}

/* 概况页内选项卡（对齐管家婆：概况 | 智能分析） */
.page-subtabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 12px;
  padding: 0 2px 8px;
  border-bottom: 1px solid var(--gjp-line);
}
.page-subtabs button[data-ov] {
  border: 0;
  background: transparent;
  padding: 8px 14px;
  font-size: 0.92rem;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -9px;
}
.page-subtabs button[data-ov].on {
  color: var(--gjp-tab-active);
  font-weight: 600;
  border-bottom-color: var(--gjp-tab-active);
}
.gjp-ov-custom {
  margin-left: 8px !important;
  font-size: 0.82rem !important;
  color: #94a3b8 !important;
}
.gjp-native-hide { display: none !important; }
.page-subtabs-meta {
  margin-left: auto;
  font-size: 12px;
  color: #94a3b8;
}
.ov-kpi-row { margin-top: 12px; }
.ov-trend-foot { font-size: 12px; color: #94a3b8; margin-top: 6px; }
.ov-acct-wrap {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  align-items: center;
}
.ov-donut {
  width: 120px; height: 120px; border-radius: 50%;
  border: 10px solid #e2e8f0; border-top-color: #3b82f6; border-right-color: #60a5fa;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin: 8px auto;
  font-size: 0.85rem; font-weight: 700; color: #0f172a;
}
.ov-donut small { font-weight: 400; color: #94a3b8; font-size: 11px; }
.ov-arap-total { font-size: 0.9rem; color: #334155; margin: 4px 0 8px; }
@media (max-width: 900px) {
  .ov-acct-wrap { grid-template-columns: 1fr; }
  .page-subtabs { flex-wrap: wrap; }
}

/* 经营趋势 / 排行 / 待办（录像 F–G 段） */
.wb-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.wb-grid .card { margin-bottom: 0; }
.trend-svg { width: 100%; height: 160px; display: block; }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--gjp-line);
  font-size: 0.86rem;
}
.rank-list li:last-child { border-bottom: none; }
.rank-list .n { color: var(--gjp-muted); width: 1.5em; }
.rank-list .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list .amt { color: var(--gjp-accent); font-weight: 600; }
.todo-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px;
}
.todo-card {
  border-radius: 8px; padding: 14px 12px; background: #fff;
  border: 1px solid var(--gjp-line);
}
.todo-card .lab { font-size: 0.78rem; color: var(--gjp-muted); }
.todo-card .val { font-size: 1.4rem; font-weight: 700; margin-top: 6px; }
.todo-card.t1 { border-top: 3px solid #3b82f6; }
.todo-card.t2 { border-top: 3px solid #10b981; }
.todo-card.t3 { border-top: 3px solid #f59e0b; }
.todo-card.t4 { border-top: 3px solid #ef4444; }
.quick-reds { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.quick-reds button {
  background: var(--gjp-accent); color: #fff; border: none;
  border-radius: 6px; padding: 8px 16px; cursor: pointer; font-weight: 600;
}

/* iShop：Toast / 全局搜 / 快速开单 / 库存预警 */
.toast-host {
  position: fixed; right: 16px; bottom: 16px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  background: #111827; color: #fff; padding: 10px 14px; border-radius: 8px;
  font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.18); max-width: 320px;
}
.toast.err { background: #b91c1c; }
.toast.ok { background: #065f46; }
.global-hits {
  position: absolute; top: 48px; left: 180px; right: 160px;
  background: #fff; border: 1px solid var(--gjp-line); border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0,0,0,.12); z-index: 80; max-height: 360px; overflow: auto;
}
.global-hits .gh-item {
  display: block; width: 100%; text-align: left; border: 0; background: #fff;
  padding: 10px 12px; border-bottom: 1px solid #f3f4f6; cursor: pointer;
}
.global-hits .gh-item:hover { background: #fff1f2; }
.global-hits .gh-empty { padding: 12px; color: var(--gjp-muted); }
/* globalHits 相对顶栏定位；顶栏本身仍 sticky 锁定 */
.topbar { position: sticky; }
.low-stock-banner {
  margin-top: 10px; padding: 10px 12px; border-radius: 8px;
  background: #fef2f2; color: #9f1239; border: 1px solid #fecdd3; font-size: 13px;
}
.qs-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.qs-row input { border: 1px solid var(--gjp-line); border-radius: 6px; padding: 8px 10px; }
.qs-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px; gap: 12px; flex-wrap: wrap;
}
@media print {
  .topbar, .side, .edge-handle, .flyout, .tabs, .toolbar, #btnAbsorb, #btnLogout { display: none !important; }
  .btn-toolbar, .btn, .btn-red, .btn-ghost, .cat-side, .goods-subbar, .stock-filter-tog, .sa-date-bar,
  #stockKpiCards, #stockDistSummary, #stockCatSide, #goodsCatSide, .goods-toolbar { display: none !important; }
  .stock-layout { display: block !important; }
  .stock-main { overflow: visible !important; }
  .goods-layout { display: block !important; }
  .goods-main { overflow: visible !important; }
  .table-wrap { overflow: visible !important; }
  .app-body { display: block !important; }
  .content { padding: 0 !important; }
  .panel { display: none !important; }
  .panel.on { display: block !important; }
  body { background: #fff !important; }
}
@media (max-width: 900px) {
  .wb-grid { grid-template-columns: 1fr; }
  .todo-row { grid-template-columns: repeat(2, 1fr); }
  .global-hits { left: 12px; right: 12px; }
}

/* —— 操作员岗位卡片 / 业务员表 / 岗位权限（对齐管家婆） —— */
.btn-blue {
  border: none; border-radius: 6px; padding: 7px 14px; cursor: pointer;
  background: #3b82f6; color: #fff; font-weight: 600; font-size: 13px;
}
.ops-banner {
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
  border-radius: 6px; padding: 8px 12px; font-size: 13px; margin-bottom: 10px;
}
.ops-cards {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
}
@media (max-width: 1100px) {
  .ops-cards { grid-template-columns: 1fr; }
}
.ops-card {
  background: #fff; border: 1px solid var(--gjp-line); border-radius: 8px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.ops-card-hd {
  display: flex; justify-content: space-between; gap: 10px; align-items: flex-start;
  border-bottom: 1px solid var(--gjp-line); padding-bottom: 8px;
}
.ops-post { font-weight: 700; font-size: 14px; }
.ops-blurb { color: var(--gjp-muted); font-size: 12px; margin-top: 2px; }
.ops-card-acts { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }
.ops-card-acts .btn-ghost { font-size: 12px; padding: 4px 8px; }
.ops-members { display: flex; flex-direction: column; gap: 6px; min-height: 40px; }
.ops-member {
  display: grid; grid-template-columns: 36px 1.2fr 1fr auto; gap: 8px;
  align-items: center; font-size: 13px; padding: 4px 0;
  border-bottom: 1px dashed #f1f5f9;
}
.ops-member-hd {
  font-size: 12px; color: var(--gjp-muted); font-weight: 600;
  border-bottom: 1px solid var(--gjp-line); padding-bottom: 6px; margin-bottom: 2px;
}
.ops-idx { color: var(--gjp-muted); }
.ops-acc { color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-name { font-weight: 600; }
.ops-boss { color: var(--gjp-accent); font-style: normal; font-size: 11px; font-weight: 600; }
.sp-edit-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin-top: 4px;
}
.sp-edit-grid label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: var(--gjp-muted);
}
.sp-edit-grid input, .sp-edit-grid select {
  border: 1px solid var(--gjp-line); border-radius: 6px; padding: 7px 10px; color: var(--gjp-ink);
  background: #fff;
}
.sp-edit-grid .sp-edit-full { grid-column: 1 / -1; }
.sp-edit-modal { width: min(520px, 92vw); max-width: 520px; }
.modal-ft {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--gjp-line);
}
.ops-acts { display: flex; gap: 8px; white-space: nowrap; align-items: center; }
.ops-acts .link,
.ops-acts .link-muted,
.ops-acts .link-red {
  background: none; border: none; cursor: pointer; padding: 0; font-size: 12px;
}
.ops-acts .link { color: #2563eb; }
.ops-acts .link-muted { color: #2563eb; }
.ops-acts .link-muted:disabled { color: #94a3b8; cursor: default; }
.ops-acts .link-red { color: #dc2626; }
.ops-acts .link-red:hover { text-decoration: underline; }
.ops-empty { color: var(--gjp-muted); font-size: 13px; padding: 8px 0; }
.ops-card-ft { padding-top: 4px; }
.ops-card-ft .btn-ghost { width: 100%; justify-content: center; }

.sp-acts { display: inline-flex; gap: 4px; }
.sp-ico {
  border: 1px solid var(--gjp-line); background: #fff; border-radius: 4px;
  width: 26px; height: 26px; cursor: pointer; font-size: 12px; line-height: 1;
  padding: 0;
}
.sp-ico:hover { border-color: #93c5fd; background: #eff6ff; }
.muted { color: var(--gjp-muted); font-size: 12px; }
.sp-idcard-bind {
  border: 0;
  background: transparent;
  color: #2563eb;
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sp-idcard-bind:hover { color: #1d4ed8; }
.sp-idcard-bound { font-size: 12px; }
.pc-acts { display: inline-flex; gap: 10px; }
.pc-acts .link {
  border: 0; background: transparent; color: #2563eb; cursor: pointer;
  padding: 0; font-size: 13px;
}
.pc-acts .link:hover { text-decoration: underline; }
.pc-dragging { opacity: 0.45; }
.pc-dragover { outline: 2px dashed #93c5fd; background: #eff6ff; }
.pc-name { font-weight: 500; }

.arch-layout { display: flex; gap: 12px; margin-top: 10px; align-items: stretch; }
.arch-cats {
  width: 148px; flex-shrink: 0; background: #f8fafc; border: 1px solid var(--gjp-line);
  border-radius: 6px; padding: 8px 0; align-self: flex-start;
}
.arch-cats .arch-cat {
  display: block; width: 100%; text-align: left; border: none; background: transparent;
  padding: 8px 14px; font-size: 13px; color: #334155; cursor: pointer;
}
.arch-cats .arch-cat:hover { background: #eef2ff; }
.arch-cats .arch-cat.on { background: #fee2e2; color: #b91c1c; font-weight: 600; }
.arch-cats .arch-cat-title {
  padding: 4px 14px 8px; font-size: 12px; color: var(--gjp-muted); font-weight: 600;
}
.arch-row-off td { color: #94a3b8; }
.arch-status-on { color: #16a34a; }
.arch-status-off { color: #94a3b8; }
.arch-acts { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.arch-acts button {
  border: none; background: none; color: #2563eb; cursor: pointer; font-size: 12px; padding: 0;
}
.arch-acts button:hover { text-decoration: underline; }
.arch-foot {
  padding: 8px 12px; font-size: 13px; color: var(--gjp-muted);
  border-top: 1px solid var(--gjp-line); background: #fafafa;
}
.arch-main { min-width: 0; }

.modal-mask {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15, 23, 42, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-card {
  background: #fff; border-radius: 10px; width: min(920px, 100%);
  max-height: min(86vh, 900px); overflow: auto;
  padding: 16px 18px; box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.modal-hd {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; border-bottom: 1px solid var(--gjp-line); padding-bottom: 8px;
}

/* 温馨提示：地基有房子联查 */
.house-block-modal { width: min(560px, 94vw); max-width: 560px; }
.force-del-confirm-modal { width: min(420px, 92vw); max-width: 420px; }
.house-block-body {
  display: flex; gap: 12px; align-items: flex-start; margin: 8px 0 14px;
}
.house-block-warn {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  background: #fbbf24; color: #fff; font-weight: 700; font-size: 20px;
  display: grid; place-items: center; line-height: 1;
}
.house-block-msg {
  margin: 0; font-size: 14px; line-height: 1.55; color: #334155; padding-top: 6px;
}
.house-block-table { max-height: 280px; margin-bottom: 8px; }
.house-block-table .link {
  border: none; background: none; color: #2563eb; cursor: pointer;
  font-size: inherit; padding: 0; text-decoration: none;
}
.house-block-table .link:hover { text-decoration: underline; }
.house-block-pager {
  font-size: 12px; color: #64748b; margin-bottom: 8px;
}

/* 分享给朋友（对齐管家婆） */
.doc-share-modal { width: min(420px, 92vw); max-width: 420px; padding: 16px 18px 18px; }
.doc-share-tip { margin: 0 0 12px; color: #64748b; font-size: 13px; line-height: 1.5; }
.doc-share-link-box {
  background: #f3f4f6; border-radius: 6px; padding: 12px 14px; margin-bottom: 12px;
}
.doc-share-link-lab { font-size: 12px; color: #94a3b8; margin-bottom: 6px; }
.doc-share-link-text { font-size: 14px; color: #1f2937; line-height: 1.55; word-break: break-all; }
.doc-share-note-lab { display: block; position: relative; margin-bottom: 14px; }
.doc-share-note-lab textarea {
  width: 100%; border: 1px solid var(--gjp-line); border-radius: 6px;
  padding: 10px 12px 24px; resize: vertical; min-height: 64px; font: inherit;
}
.doc-share-count {
  position: absolute; right: 10px; bottom: 8px; font-size: 12px; color: #94a3b8;
}
.btn-share-copy {
  display: inline-block; border: none; border-radius: 6px; cursor: pointer;
  background: #e11d48; color: #fff; font-weight: 600; font-size: 15px;
  padding: 11px 22px; min-width: 160px;
}
.btn-share-copy:disabled { opacity: 0.65; cursor: wait; }

.post-perm-meta {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px;
}
.post-perm-meta label { font-size: 12px; color: var(--gjp-muted); display: flex; flex-direction: column; gap: 4px; }
.post-perm-meta input {
  border: 1px solid var(--gjp-line); border-radius: 6px; padding: 7px 10px; color: var(--gjp-ink);
  background: #f8fafc;
}
.post-perm-table-wrap { max-height: 58vh; overflow: auto; margin-top: 6px; }
.post-perm-modal { max-width: min(1100px, 96vw); width: 96vw; }
.post-perm-table .pp-group td { background: #f1f5f9; font-size: 13px; position: sticky; top: 0; z-index: 1; }
.pp-toggle {
  display: inline-block; min-width: 40px; text-align: center;
  border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600;
  border: 1px solid #94a3b8; background: #f1f5f9; color: #334155; cursor: pointer;
}
.pp-toggle.on { background: #e11d48; border-color: #e11d48; color: #fff; }
.pp-funcs { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-chip {
  border: 1px solid #64748b; border-radius: 4px; padding: 3px 8px;
  font-size: 12px; color: #0f172a; background: #fff; cursor: pointer;
}
.pp-chip.on {
  border-color: #e11d48; color: #be123c; background: #fff1f2; font-weight: 600;
}
.pp-chip:hover { border-color: #e11d48; }

/* —— 新手入门（对齐管家婆四步向导） —— */
.ob-page { max-width: 980px; }
.ob-hd {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 14px;
}
.ob-hd h3 { margin: 0 0 6px; font-size: 20px; }
.ob-pct {
  text-align: right; min-width: 88px;
  background: #fff1f2; border: 1px solid #fecdd3; border-radius: 8px;
  padding: 8px 12px;
}
.ob-pct span { display: block; font-size: 22px; font-weight: 700; color: #be123c; line-height: 1.1; }
.ob-pct small { color: #64748b; font-size: 12px; }
.ob-steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-bottom: 10px;
}
.ob-step {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  border: 1px solid var(--gjp-line); background: #fff; border-radius: 8px;
  padding: 10px 12px; cursor: pointer; text-align: left; color: #334155;
}
.ob-step:hover { border-color: #fda4af; }
.ob-step.on {
  border-color: #e11d48; background: #fff1f2; box-shadow: 0 0 0 1px #fecdd3;
}
.ob-step.done .ob-n { background: #16a34a; }
.ob-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 999px;
  background: #e11d48; color: #fff; font-size: 12px; font-weight: 700;
}
.ob-step:not(.on) .ob-n { background: #94a3b8; }
.ob-t { font-size: 14px; font-weight: 600; }
.ob-p { font-size: 12px; color: #64748b; }
.ob-iron {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px;
}
.ob-iron span {
  font-size: 12px; color: #9f1239; background: #fff7ed;
  border: 1px solid #fed7aa; border-radius: 999px; padding: 4px 10px;
}
.ob-main { margin-bottom: 12px; }
.ob-step-title { font-size: 16px; font-weight: 700; color: #0f172a; margin-bottom: 4px; }
.ob-blurb { color: #64748b; font-size: 13px; margin: 0 0 12px; }
.ob-task-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  border-bottom: 1px solid var(--gjp-line); padding-bottom: 10px; margin-bottom: 12px;
}
.ob-task-tab {
  border: 1px solid #cbd5e1; background: #fff; color: #334155;
  border-radius: 4px; padding: 6px 12px; font-size: 13px; cursor: pointer;
}
.ob-task-tab.on {
  border-color: #e11d48; color: #be123c; background: #fff1f2; font-weight: 600;
}
.ob-task-tab.done { color: #15803d; }
.ob-task-body h4 { margin: 0 0 8px; font-size: 15px; }
.ob-why {
  background: #f8fafc; border-left: 3px solid #e11d48;
  padding: 10px 12px; margin-bottom: 14px; font-size: 13px; line-height: 1.6; color: #334155;
}
.ob-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.ob-meta { font-size: 12px; color: #64748b; margin: 0; }
.ob-stats h4 { margin: 0 0 10px; }
.ob-stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.ob-stat-grid div {
  background: #f8fafc; border: 1px solid var(--gjp-line); border-radius: 6px;
  padding: 10px; text-align: center;
}
.ob-stat-grid b { display: block; font-size: 18px; color: #0f172a; }
.ob-stat-grid span { font-size: 12px; color: #64748b; }
@media (max-width: 720px) {
  .ob-steps { grid-template-columns: 1fr 1fr; }
  .ob-stat-grid { grid-template-columns: 1fr 1fr; }
  .ob-hd { flex-direction: column; }
}

/* AI Organization Center · /ai */
.aic-layout {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0;
  min-height: calc(100vh - 120px);
  background: #f7f8fa;
  border: 1px solid var(--gjp-line, #e5e7eb);
}
.aic-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 8px;
  background: #1e293b;
  border-right: 1px solid #0f172a;
}
.aic-nav-btn {
  text-align: left;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 4px;
}
.aic-nav-btn:hover { background: #334155; color: #fff; }
.aic-nav-btn.on { background: #3b78e7; color: #fff; font-weight: 600; }
.aic-main { display: flex; flex-direction: column; min-width: 0; }
.aic-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--gjp-line, #e5e7eb);
  background: #fff;
}
.aic-toolbar h2 { margin: 0; font-size: 16px; font-weight: 700; color: #0f172a; }
.aic-md {
  margin: 0; padding: 14px 16px; flex: 1;
  overflow: auto; white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px; line-height: 1.55; color: #1e293b; background: #fff;
}
@media (max-width: 720px) {
  .aic-layout { grid-template-columns: 1fr; }
  .aic-nav { flex-direction: row; flex-wrap: wrap; }
}

/* R18 · 库存筛选 + 快捷键帮助 */
.stock-filter-tog {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.stock-filter-tog input { margin: 0; }
#btnStockNegOnly.on {
  border-color: #fca5a5;
  color: #b91c1c;
  background: #fef2f2;
}
.cell-ellipsis {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hotkey-help-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.hotkey-help-modal[hidden] { display: none !important; }
.hotkey-help-card {
  background: #fff;
  border-radius: 10px;
  width: min(480px, 96vw);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
  padding: 16px 18px 14px;
}
.hotkey-help-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.hotkey-help-table td:first-child {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #1d4ed8;
  width: 140px;
  white-space: nowrap;
}
.hotkey-help-tip {
  margin: 10px 0 0;
  font-size: 12px;
  color: #64748b;
}

/* R20：打印列表下拉（对齐管家婆打印列表/已选详情/预览） */
.docs-print-dd { vertical-align: middle; }
.docs-print-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 40;
  min-width: 168px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  padding: 4px;
}
.docs-print-menu[hidden] { display: none !important; }
.docs-print-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #0f172a;
}
.docs-print-menu button:hover { background: #f1f5f9; }

/* —— 手机端专用壳（美团/微信式底栏 + 宫格业务） —— */
:root {
  --ms-tab-h: 52px;
  --ms-safe-top: env(safe-area-inset-top, 0px);
  --ms-safe-bottom: env(safe-area-inset-bottom, 0px);
}
.mobile-back-btn,
.mobile-top-title,
.mobile-search-btn,
.mobile-tabbar,
.mobile-shell-panel { display: none; }
.phone-shell .mobile-shell-panel.on { display: block; }

.phone-shell .mobile-tabbar { display: flex; }
.phone-shell .mobile-top-title { display: none; }
.phone-shell .mobile-search-btn { display: none !important; }

.phone-shell {
  --ms-topbar-h: calc(48px + var(--ms-safe-top, 0px));
}
.phone-shell .topbar {
  padding-top: var(--ms-safe-top);
  height: var(--ms-topbar-h);
  gap: 8px;
  /* 隐藏时 transform + 负 margin 收掉占位，避免灰条挡内容（ZZ-100） */
  transition: transform 0.22s ease, margin-top 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
  will-change: transform, margin-top;
  transform: translateY(0);
  margin-top: 0;
}
.phone-shell.ms-topbar-hide .topbar {
  transform: translateY(-110%);
  margin-top: calc(-1 * var(--ms-topbar-h));
  border-bottom-color: transparent;
  box-shadow: none;
  background: transparent;
  pointer-events: none;
}
/* 顶栏隐藏时骨架/蒙版占位一并收起 */
.phone-shell.ms-topbar-hide ~ #msSkeleton {
  display: none !important;
}
.phone-shell.ms-topbar-hide .ms-sheet-backdrop:not(.on) {
  display: none !important;
}
/* #8：顶栏隐藏后内容区吃满多出来的高度，横屏首页一屏不留顶空隙 */
.phone-shell.ms-topbar-hide .content {
  min-height: 0;
}
.phone-shell.ms-topbar-hide.phone-landscape #panelHome,
.phone-shell.ms-topbar-hide.ms-game-land #panelHome {
  min-height: calc(100dvh - var(--ms-rail-w, 56px) * 0 - 8px);
  height: 100%;
}
.phone-shell .mobile-top-title {
  flex: 0 1 auto;
  max-width: 28%;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.phone-shell .mobile-back-btn {
  display: none;
  width: 36px; height: 36px;
  border: 0; border-radius: 8px;
  background: #f1f5f9; color: #0f172a;
  font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.phone-shell.mobile-detail .mobile-back-btn { display: inline-flex; align-items: center; justify-content: center; }
.phone-shell.mobile-detail .company-logo { display: none; }
/* 手机壳：搜索条常显，从 logo 右撑到右侧按钮左 */
.phone-shell .topbar .search {
  display: flex;
  flex: 1 1 auto;
  max-width: none;
  min-width: 120px;
  margin-left: 4px;
  height: 34px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid transparent;
  position: relative;
  left: auto; right: auto; top: auto;
  z-index: auto;
  box-shadow: none;
}
.phone-shell .topbar .search:focus-within {
  background: #fff;
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.15);
}
.phone-shell.search-open .topbar .search {
  display: flex;
}
.phone-shell .tb-ai-wrap,
.phone-shell .topbar .user,
.phone-shell .topbar .icon-btn,
.phone-shell .topbar .spacer,
.phone-shell .tb-msg-live { display: none !important; }
.phone-shell .edge-handle { display: none !important; }
.phone-shell .side { display: none !important; }
.phone-shell .tabs { display: none !important; }
.phone-shell .content {
  padding-bottom: calc(var(--ms-tab-h) + var(--ms-safe-bottom) + 8px);
}
.phone-shell .wb-page-title { display: none; }
.phone-shell #panelHome .btn-sync-gjp-data {
  margin: 0 0 10px !important;
  width: 100%;
  font-size: 14px !important;
  padding: 12px !important;
}

.mobile-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  height: calc(var(--ms-tab-h) + var(--ms-safe-bottom));
  padding-bottom: var(--ms-safe-bottom);
  background: #fff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
  align-items: stretch;
  justify-content: space-around;
  /* 盖住 Home 条，避免「底栏悬空」白边 */
  margin: 0;
}
.mtab {
  flex: 1;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.68rem;
  color: #64748b;
  cursor: pointer;
  position: relative;
  padding: 4px 0;
}
.mtab .mi { font-size: 1.15rem; line-height: 1.1; }
.mtab.on { color: var(--gjp-tab-active, #2563eb); font-weight: 600; }
.mtab-badge {
  position: absolute;
  top: 2px; right: calc(50% - 22px);
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444; color: #fff;
  font-size: 10px; font-weight: 700;
  line-height: 16px; text-align: center;
}

.mobile-shell-panel { padding: 0 12px 12px; }
.ms-page-hd { padding: 4px 2px 12px; }
.ms-page-hd h2 { margin: 0; font-size: 1.25rem; }
.ms-sub { margin: 4px 0 0; color: #64748b; font-size: 0.82rem; }
.ms-section-title {
  margin: 16px 2px 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
}
.ms-biz-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 8px;
}
.ms-biz-item {
  border: 0;
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px 6px 10px;
  text-align: center;
  cursor: pointer;
}
.ms-biz-item .ico {
  width: 40px; height: 40px;
  margin: 0 auto 6px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: #fff;
}
.ms-biz-item .lbl {
  display: block;
  font-size: 0.72rem;
  color: #334155;
  line-height: 1.25;
}
.ms-quick-grid { gap: 10px 8px; }
.ms-quick-grid .qi { width: 36px; height: 36px; border-radius: 10px; }

.ms-me-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  margin: 8px 0 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #fff;
}
.ms-me-avatar {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem;
}
.ms-me-name { font-size: 1.1rem; font-weight: 700; }
.ms-me-co { font-size: 0.78rem; opacity: 0.88; margin-top: 4px; }
.ms-menu-list { display: flex; flex-direction: column; gap: 2px; }
.ms-menu-row {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; border: 0; background: #fff;
  padding: 14px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  color: #0f172a;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
}
.ms-menu-row .arr { color: #94a3b8; }
.ms-logout {
  width: 100%; margin-top: 16px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #fecaca;
  background: #fff;
  color: #b91c1c;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.phone-shell .flyout {
  top: calc(48px + var(--ms-safe-top));
  bottom: calc(var(--ms-tab-h) + var(--ms-safe-bottom));
  height: auto;
  border-radius: 16px 16px 0 0;
}

/* 手机 / 窄屏：二级菜单 → 底部抽屉（可滚动，不遮挡） */
.ms-sheet-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 80;
}
.ms-sheet-backdrop.on { display: block; }

@media (max-width: 900px) {
  .flyout.flyout-sheet {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: calc(var(--ms-tab-h, 56px) + var(--ms-safe-bottom, 0px));
    width: 100% !important;
    max-width: 100% !important;
    max-height: min(78vh, calc(100vh - 96px));
    border-radius: 16px 16px 0 0;
    z-index: 81;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.18);
  }
}
.phone-shell .flyout.flyout-sheet {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  top: auto !important;
  bottom: calc(var(--ms-tab-h, 56px) + var(--ms-safe-bottom, 0px));
  width: 100% !important;
  max-width: 100% !important;
  max-height: min(78vh, calc(100vh - 96px));
  z-index: 81;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.18);
}
.flyout.flyout-sheet .flyout-cols {
  display: block !important;
  padding-bottom: 12px;
}
.flyout.flyout-sheet .flyout-col {
  width: 100% !important;
  min-width: 0;
}
.flyout.flyout-sheet .fly-row {
  min-height: 48px;
  align-items: center;
}
.flyout.flyout-sheet .fly-name,
.flyout.flyout-sheet .fly-add {
  min-height: 44px;
  font-size: 15px;
}

.phone-shell.phone-landscape .content { padding-bottom: 8px; }
.phone-shell.phone-landscape .flyout.flyout-sheet {
  max-height: min(88vh, calc(100vh - 56px));
  bottom: var(--ms-safe-bottom, 0px);
}
.phone-shell.phone-landscape .ms-home-cockpit .ms-hero-stats,
.phone-shell.ms-game-land .ms-home-cockpit .ms-hero-stats {
  grid-template-columns: 1fr 1fr;
}

/* —— ZZ-98 第4步：横屏首页一屏（营收左40% + 三待办横排 + AI闭环一行） —— */
.phone-shell.phone-landscape #panelHome,
.phone-shell.ms-game-land #panelHome {
  overflow: hidden !important;
  padding: 8px 10px 6px !important;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.phone-shell.phone-landscape .ms-home-cockpit,
.phone-shell.ms-game-land .ms-home-cockpit {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); /* ≈40% / 60% */
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px 10px;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  align-content: stretch;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-hero-card,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-hero-card {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
  height: 100%;
  min-height: 0;
  padding: 10px 12px 8px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden; /* 月环比/金额/双格均锁在蓝框内，横屏一屏不溢出 */
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-hero-card .ms-hero-top,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-hero-card .ms-hero-top {
  flex: 0 0 auto;
  align-items: flex-start;
  gap: 8px;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-hero-card .ms-hero-heading,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-hero-card .ms-hero-heading {
  min-width: 0;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-hero-card .ms-hero-trend,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-hero-card .ms-hero-trend {
  margin-top: 2px;
  font-size: 0.72rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 0 auto;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-hero-card .ms-hero-eye,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-hero-card .ms-hero-eye {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-hero-card .ms-hero-val,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-hero-card .ms-hero-val {
  /* #5：千万级金额用 clamp 缩字，单行省略，不顶破蓝卡 */
  font-size: clamp(1.05rem, 3.2vw, 1.35rem);
  margin-top: 4px;
  flex: 0 1 auto;
  min-height: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-hero-card .ms-hero-stats,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-hero-card .ms-hero-stats {
  margin-top: auto;
  gap: 6px;
  flex: 0 0 auto;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-hero-card .ms-stat,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-hero-card .ms-stat {
  min-height: 34px;
  padding: 6px 8px;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-todo-stack,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-todo-stack {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  min-height: 0;
  align-content: stretch;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-todo-stack .ms-todo-card,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-todo-stack .ms-todo-card {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  height: 100%;
  min-height: 0;
  padding: 10px;
  box-sizing: border-box;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-todo-stack .ms-todo-card .arr,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-todo-stack .ms-todo-card .arr {
  display: none;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-todo-stack .ms-todo-card .n,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-todo-stack .ms-todo-card .n {
  width: 36px; min-width: 36px; height: 36px;
  font-size: 0.95rem;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-todo-stack .ms-todo-card .txt,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-todo-stack .ms-todo-card .txt {
  min-width: 0;
  width: 100%;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-todo-stack .ms-todo-card .t,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-todo-stack .ms-todo-card .t {
  /* #4：标题单行、副文两行，三卡高度一致 */
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-todo-stack .ms-todo-card .d,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-todo-stack .ms-todo-card .d {
  font-size: 0.68rem;
  line-height: 1.25;
  min-height: calc(1.25em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-essence-loop,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-essence-loop {
  grid-column: 1 / -1;
  grid-row: 3;
  margin: 0;
  padding: 8px 10px 8px;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-essence-loop .ms-section-head,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-essence-loop .ms-section-head {
  margin: 0 0 6px;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-essence-loop .essence-grid,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-essence-loop .essence-grid {
  /* #6：三卡同行等高 */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 0;
  align-items: stretch;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-essence-loop .essence-card,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-essence-loop .essence-card {
  padding: 8px 10px;
  height: 100%;
  min-height: 0;
  align-content: start;
  box-sizing: border-box;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-essence-loop .essence-val,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-essence-loop .essence-val {
  -webkit-line-clamp: 1;
  min-height: 1.35em;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-essence-loop .essence-sub,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-essence-loop .essence-sub {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 1.35em;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-essence-loop .essence-foot,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-essence-loop .essence-foot {
  display: none;
}

/* #7：竖屏驾驶舱 — 月环比上移后间距收紧，避免顶区过挤 */
.phone-shell.phone-portrait .ms-hero-card {
  padding: 16px 14px 12px;
}
.phone-shell.phone-portrait .ms-hero-val {
  margin-top: 8px;
  font-size: clamp(1.45rem, 7vw, 2rem);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.phone-shell.phone-portrait .ms-hero-trend {
  font-size: 0.8rem;
  line-height: 1.3;
}
.phone-shell.phone-portrait .ms-hero-stats {
  margin-top: 12px;
}
/* 一屏优先：应用/走势/快捷/最近单据横屏首页先藏，避免滚动 */
.phone-shell.phone-landscape .ms-home-cockpit > .ms-apps-zone,
.phone-shell.phone-landscape .ms-home-cockpit > .ms-trend-card,
.phone-shell.phone-landscape .ms-home-cockpit > .ms-action-zone,
.phone-shell.phone-landscape .ms-home-cockpit > .ms-recent-card,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-apps-zone,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-trend-card,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-action-zone,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-recent-card {
  display: none !important;
}

.phone-shell .home-top-row { gap: 12px; }
.phone-shell .audit-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
.phone-shell .kpi-bar { flex-direction: column; align-items: stretch; gap: 8px; }
.phone-shell .seg { flex-wrap: wrap; }
.phone-shell .doc-table-wrap { -webkit-overflow-scrolling: touch; }

@media (max-width: 900px) {
  .phone-shell .tb-ai-drop { min-width: 0; width: calc(100vw - 24px); grid-template-columns: 1fr 1fr; }
}

/* —— 手机首页 2.0 驾驶舱 —— */
.ms-home-cockpit { display: none; }
.phone-shell .ms-home-cockpit { display: block; }
.phone-shell .home-desktop-layout { display: none !important; }

.ms-hero-card {
  margin: 4px 0 14px;
  padding: 18px 16px 14px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, #1e40af 0%, #2563eb 55%, #3b82f6 100%);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.28);
}
.ms-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ms-hero-heading { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.ms-hero-label { font-size: 0.82rem; opacity: 0.9; }
.ms-hero-eye {
  border: 0; background: rgba(255,255,255,0.18); color: #fff;
  width: 36px; height: 36px; border-radius: 10px; font-size: 1rem; cursor: pointer;
  flex: 0 0 auto;
}
.ms-hero-val {
  margin-top: 6px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
/* 月环比紧贴「本月营收」标题下方（上移进蓝框顶区，避免横屏一屏被裁出） */
.ms-hero-trend { margin-top: 0; font-size: 0.86rem; opacity: 0.92; line-height: 1.3; }
.ms-hero-trend .up { color: #bbf7d0; }
.ms-hero-trend .down { color: #fecaca; }
.ms-hero-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-top: 14px;
}
.ms-stat {
  border: 0; text-align: left; cursor: pointer;
  background: rgba(255,255,255,0.14);
  border-radius: 12px; padding: 10px 12px; color: #fff;
  min-height: 48px;
}
.ms-stat .l { display: block; font-size: 0.72rem; opacity: 0.85; }
.ms-stat .v { display: block; margin-top: 4px; font-size: 1rem; font-weight: 700; }

.ms-todo-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }

/* AI 优化闭环 · 精髓三步（找数据 → 找方向 → 消灭问题） */
.ms-essence-loop,
.desk-essence-loop {
  margin: 0 0 14px;
  padding: 12px 12px 10px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.desk-essence-loop { margin-bottom: 12px; }
.essence-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 8px;
}
.essence-grid--desk {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.essence-card {
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 10px;
  row-gap: 2px;
  width: 100%;
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px 12px;
  cursor: pointer;
  color: #0f172a;
  transition: border-color .15s, background .15s, transform .12s;
}
.essence-card:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  transform: translateY(-1px);
}
.essence-card:active { transform: translateY(0); }
.essence-step {
  grid-row: 1 / span 3;
  align-self: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 0.85rem; font-weight: 800;
  color: #fff;
  background: #2563eb;
}
.essence-card[data-essence="find-dir"] .essence-step { background: #d97706; }
.essence-card[data-essence="kill-issue"] .essence-step { background: #059669; }
.essence-title {
  grid-column: 2;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
}
.essence-val {
  grid-column: 2;
  font-size: 0.84rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.essence-sub {
  grid-column: 2;
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.35;
}
.essence-foot {
  margin: 8px 2px 0;
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.4;
}
.essence-foot strong { color: #b45309; font-weight: 700; }
@media (max-width: 900px) {
  .essence-grid--desk { grid-template-columns: 1fr; }
}

.ms-apps-zone { margin-bottom: 14px; }
.ms-apps-hint {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 500;
}
.ms-apps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 8px;
  margin-top: 8px;
}
.ms-app-tile {
  position: relative;
  border: 0;
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px 4px 10px;
  text-align: center;
  cursor: pointer;
}
.ms-app-tile .ico {
  width: 42px; height: 42px;
  margin: 0 auto 6px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  color: #fff;
}
.ms-app-tile .lbl {
  display: block;
  font-size: 0.72rem;
  color: #334155;
  line-height: 1.25;
}
.ms-app-tile.soon { opacity: 0.72; }
.ms-app-tile .tag {
  position: absolute;
  top: 4px; right: 4px;
  font-size: 0.55rem;
  color: #64748b;
  background: #e2e8f0;
  border-radius: 4px;
  padding: 1px 4px;
}
.phone-shell.phone-landscape .ms-apps-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.ms-todo-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; border: 0; border-radius: 14px;
  padding: 14px 14px; min-height: 56px;
  text-align: left; cursor: pointer;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}
.ms-todo-card .n {
  flex-shrink: 0; min-width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 800;
}
.ms-todo-card .txt { flex: 1; min-width: 0; }
.ms-todo-card .t { display: block; font-size: 0.95rem; font-weight: 700; color: #0f172a; }
.ms-todo-card .d { display: block; margin-top: 2px; font-size: 0.76rem; color: #64748b; }
.ms-todo-card .arr { color: #94a3b8; font-size: 1.2rem; }
.ms-todo-card.tone-red { background: #fef2f2; border: 1px solid #fecaca; }
.ms-todo-card.tone-red .n { background: #ef4444; color: #fff; }
.ms-todo-card.tone-amber { background: #fffbeb; border: 1px solid #fde68a; }
.ms-todo-card.tone-amber .n { background: #f59e0b; color: #fff; }
.ms-todo-card.tone-blue { background: #eff6ff; border: 1px solid #bfdbfe; }
.ms-todo-card.tone-blue .n { background: #2563eb; color: #fff; }

.ms-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 10px;
}
.ms-section-head h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.ms-link-btn {
  border: 0; background: transparent; color: var(--gjp-tab-active, #2563eb);
  font-size: 0.82rem; font-weight: 600; cursor: pointer; padding: 8px 4px;
  min-height: 44px;
}

.ms-trend-card {
  margin-bottom: 14px;
  padding: 14px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
}
.ms-trend-svg { width: 100%; height: 88px; display: block; }
.ms-trend-foot { margin-top: 6px; font-size: 0.72rem; color: #94a3b8; }

.ms-action-zone { margin-bottom: 14px; }
.ms-action-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 8px;
}
.ms-action-btn {
  border: 0; background: #f8fafc; border-radius: 14px;
  padding: 12px 6px; min-height: 72px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; cursor: pointer;
}
.ms-action-btn .ico {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: #fff;
}
.ms-action-btn .lbl { font-size: 0.72rem; color: #334155; font-weight: 600; line-height: 1.2; }

.ms-recent-card { border-radius: 14px; padding: 12px !important; margin-bottom: 8px; }
.ms-recent-seg { scale: 0.92; transform-origin: right center; }
.ms-recent-table { max-height: 240px; overflow: auto; }
.ms-recent-table .doc-table { font-size: 0.82rem; }
.ms-recent-table th, .ms-recent-table td { padding: 10px 8px; min-height: 44px; }

/* —— mobile50 batch —— */
.ms-role-badge {
  font-size: 0.68rem; font-weight: 600; color: #64748b;
  background: #f1f5f9; padding: 2px 8px; border-radius: 999px; margin-left: 6px;
}
.ms-hide-table { display: none !important; }
.ms-docs-cards, .ms-stock-cards {
  display: flex; flex-direction: column; gap: 10px;
  padding: 10px 12px 12px;
}
.ms-empty-card {
  padding: 24px 16px; text-align: center; color: #94a3b8; font-size: 0.9rem;
  background: #f8fafc; border-radius: 12px;
}
.ms-doc-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  padding: 14px; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  cursor: pointer;
}
.ms-doc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ms-doc-no { font-weight: 700; font-size: 0.95rem; color: #0f172a; }
.ms-doc-st { font-size: 0.72rem; padding: 3px 8px; border-radius: 999px; font-weight: 600; }
.ms-doc-st.draft { background: #fef2f2; color: #b91c1c; }
.ms-doc-st.ok { background: #ecfdf5; color: #047857; }
.ms-doc-mid { display: flex; justify-content: space-between; margin-top: 8px; gap: 8px; }
.ms-doc-partner { font-size: 0.9rem; color: #334155; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-doc-amt { font-size: 1.05rem; font-weight: 800; color: #0f172a; }
.ms-doc-sub { margin-top: 4px; font-size: 0.76rem; color: #64748b; }
.ms-doc-actions { display: flex; gap: 8px; margin-top: 12px; }
.ms-btn-pass, .ms-btn-reject {
  flex: 1; min-height: 44px; border-radius: 10px; font-size: 0.9rem; font-weight: 700; cursor: pointer; border: 0;
}
.ms-btn-pass { background: #059669; color: #fff; }
.ms-btn-reject { background: #fff; color: #b91c1c; border: 1px solid #fecaca !important; }
.ms-stock-card {
  display: grid; grid-template-columns: 1fr auto; gap: 8px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  padding: 12px 14px; position: relative; overflow: hidden;
}
.ms-stock-card.low .ms-stock-qty { color: #d97706; animation: ms-pulse 1.5s ease-in-out infinite; }
.ms-stock-card.neg .ms-stock-qty { color: #dc2626; font-weight: 800; }
@keyframes ms-pulse { 50% { opacity: 0.55; } }
.ms-stock-name { font-weight: 700; font-size: 0.92rem; color: #0f172a; }
.ms-stock-meta { font-size: 0.74rem; color: #64748b; margin-top: 2px; }
.ms-stock-qty { font-size: 1.2rem; font-weight: 800; text-align: right; align-self: center; }
.ms-stock-qty small { display: block; font-size: 0.68rem; font-weight: 500; color: #94a3b8; }
.ms-stock-swipe { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 4px; }
.ms-stock-swipe button {
  flex: 1; min-height: 40px; border: 0; border-radius: 8px;
  background: #f1f5f9; color: #334155; font-size: 0.82rem; font-weight: 600; cursor: pointer;
}
.ms-skeleton-layer {
  position: fixed; left: 0; right: 0; z-index: 70; pointer-events: none;
  padding: 12px; display: none; flex-direction: column; gap: 10px;
}
.ms-skeleton-layer:not([hidden]) { display: flex; }
.ms-skeleton-layer[hidden] { display: none !important; }
.ms-skel-block {
  height: 72px; border-radius: 14px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%; animation: ms-shimmer 1.2s infinite;
}
.ms-skel-block.short { height: 48px; width: 70%; }
@keyframes ms-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.ms-wizard { position: fixed; inset: 0; z-index: 120; }
.ms-wizard-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,0.5); }
.ms-wizard-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh;
  background: #fff; border-radius: 16px 16px 0 0;
  display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom, 0);
}
.ms-wizard-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid #f1f5f9;
}
.ms-wizard-hd h3 { margin: 0; font-size: 1rem; }
.ms-wizard-close, .ms-wizard-back {
  border: 0; background: #f1f5f9; width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
}
.ms-wizard-steps {
  display: flex; gap: 8px; padding: 10px 14px; font-size: 0.76rem; color: #94a3b8;
}
.ms-wizard-steps span.on { color: #2563eb; font-weight: 700; }
.ms-wizard-body { flex: 1; overflow: auto; padding: 12px 14px; -webkit-overflow-scrolling: touch; }
.ms-wizard-ft { display: flex; gap: 10px; padding: 12px 14px; border-top: 1px solid #f1f5f9; }
.ms-wizard-ft button { flex: 1; min-height: 48px; }
.ms-wiz-input {
  width: 100%; box-sizing: border-box; min-height: 48px; padding: 10px 12px;
  border: 1px solid #e2e8f0; border-radius: 12px; font-size: 1rem; margin-bottom: 10px;
}
.ms-wiz-list { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow: auto; }
.ms-wiz-row, .ms-wiz-prod {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  min-height: 48px; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 12px;
  background: #fff; cursor: pointer;
}
.ms-wiz-row.on, .ms-wiz-prod.on { border-color: #2563eb; background: #eff6ff; }
.ms-wiz-row small { display: block; color: #64748b; font-size: 0.74rem; }
.ms-wiz-prod .ico {
  width: 44px; height: 44px; border-radius: 10px; background: #2563eb; color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.ms-wiz-prod .txt b { display: block; font-size: 0.9rem; }
.ms-wiz-prod .txt small { color: #64748b; font-size: 0.74rem; }
.ms-wiz-confirm p { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f1f5f9; margin: 0; }
.ms-wiz-confirm .hint { display: block; margin-top: 12px; color: #64748b; font-size: 0.82rem; border: 0; }
.phone-shell #panelStock .cat-side { display: none; }
.phone-shell #panelStock .stock-layout { display: block; }
.phone-shell #panelStock .toolbar { flex-wrap: wrap; gap: 8px; }
.phone-shell #panelStock #stockQ { flex: 1 1 100%; min-height: 48px; font-size: 1rem; }
body.flyout-sheet-open { overflow: hidden; }

/* —— 手机强制横版（王者式）：左侧导航轨 + 可滑出侧栏 —— */
.phone-shell.phone-landscape,
.phone-shell.ms-game-land {
  --ms-rail-w: 56px; /* ZZ-98：竖轨略收，首页横宽更够 */
  --ms-side-w: min(280px, 42vw);
  --ms-top-h: 48px;
}
.phone-shell.phone-landscape .topbar,
.phone-shell.ms-game-land .topbar {
  padding-left: max(10px, env(safe-area-inset-left, 0px));
  padding-right: max(10px, env(safe-area-inset-right, 0px));
  margin-left: var(--ms-rail-w);
  width: auto;
}
.phone-shell.phone-landscape .app-body,
.phone-shell.ms-game-land .app-body {
  margin-left: var(--ms-rail-w);
  min-width: 0;
}
.phone-shell.phone-landscape .content,
.phone-shell.ms-game-land .content {
  padding-bottom: 12px !important;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
/* 底栏 → 左侧竖轨 */
.phone-shell.phone-landscape .mobile-tabbar,
.phone-shell.ms-game-land .mobile-tabbar {
  top: 0;
  bottom: 0;
  left: 0;
  right: auto;
  width: var(--ms-rail-w);
  height: auto !important;
  padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  flex-direction: column;
  justify-content: space-evenly;
  border-top: 0;
  border-right: 1px solid #e2e8f0;
  box-shadow: 4px 0 16px rgba(15, 23, 42, 0.06);
  display: flex !important;
}
.phone-shell.phone-landscape .mobile-tabbar .mtab,
.phone-shell.ms-game-land .mobile-tabbar .mtab {
  /* #14：竖轨热区 ≥48px */
  flex: 0 0 auto;
  width: 100%;
  min-height: 48px;
  padding: 8px 2px;
  font-size: 0.62rem;
  box-sizing: border-box;
}
.phone-shell.phone-landscape .mobile-tabbar .mtab .mi,
.phone-shell.ms-game-land .mobile-tabbar .mtab .mi {
  font-size: 1.15rem;
  margin-bottom: 2px;
}
.phone-shell.phone-landscape .mobile-tabbar .mtab-badge,
.phone-shell.ms-game-land .mobile-tabbar .mtab-badge {
  top: 4px;
  right: 6px;
}
/* 左侧抽屉：手机壳停用（单据中心替代侧栏悬浮） */
.phone-shell.phone-landscape .side,
.phone-shell.ms-game-land .side,
.phone-shell.phone-landscape .side.hidden,
.phone-shell.ms-game-land .side.hidden,
.phone-shell.phone-landscape.ms-side-open .side,
.phone-shell.ms-game-land.ms-side-open .side,
.phone-shell.phone-landscape.ms-side-open .side.hidden,
.phone-shell.ms-game-land.ms-side-open .side.hidden {
  display: none !important;
}
/* 手机壳：永不显示绿色 edgeHandle（单据中心替代侧栏悬浮） */
.phone-shell.phone-landscape .edge-handle,
.phone-shell.ms-game-land .edge-handle,
.phone-shell.phone-landscape .edge-handle.on,
.phone-shell.ms-game-land .edge-handle.on,
.phone-shell.phone-portrait .edge-handle,
.phone-shell.phone-portrait .edge-handle.on,
.phone-shell.phone-landscape.ms-side-open .edge-handle,
.phone-shell.ms-game-land.ms-side-open .edge-handle {
  display: none !important;
}
.phone-shell.phone-landscape ~ #msSkeleton,
.phone-shell.ms-game-land ~ #msSkeleton {
  left: var(--ms-rail-w);
}

/* —— 单据中心全屏分组 —— */
.ms-doc-center {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ms-doc-group {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
}
.ms-doc-group-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 8px;
}
.ms-doc-group-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.ms-doc-group-hd b { display: block; font-size: 0.95rem; color: #0f172a; }
.ms-doc-group-hd small { display: block; color: #94a3b8; font-size: 0.72rem; margin-top: 2px; }
.ms-doc-rows { display: flex; flex-direction: column; }
.ms-doc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 0;
  border-top: 1px solid #f1f5f9;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}
.ms-doc-row:active { background: #f8fafc; }
.ms-doc-ico {
  width: 36px; height: 36px; border-radius: 10px;
  color: #fff; font-size: 0.85rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ms-doc-txt { flex: 1; font-size: 0.95rem; color: #1e293b; font-weight: 500; }
.ms-doc-arr { color: #cbd5e1; font-size: 1.1rem; }

.phone-shell .mobile-orient-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: auto;
  min-width: 52px;
  height: 34px;
  margin-left: 4px;
  padding: 0 8px;
  border: 0; border-radius: 8px;
  background: transparent;
  color: #1677ff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.phone-shell .mobile-orient-btn .ms-auto-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}
.phone-shell .mobile-orient-btn.is-manual,
.phone-shell .mobile-orient-btn[data-lock="landscape"],
.phone-shell .mobile-orient-btn[data-lock="portrait"] {
  color: #999;
  background: transparent;
}
.phone-shell .mobile-orient-btn.is-manual .ms-auto-dot { display: none; }

/* 竖屏：底栏；单据中心单列 */
.phone-shell.phone-portrait .ms-doc-center { gap: 12px; }
.phone-shell.phone-portrait .ms-doc-rows { display: flex; flex-direction: column; }

/* 横屏：单据中心可双列分组；表单双列 */
.phone-shell.phone-landscape .ms-doc-center {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.phone-shell.phone-landscape .ge-grid {
  grid-template-columns: 100px 1fr 100px 1fr;
  transition: grid-template-columns 0.2s ease;
}
.phone-shell.phone-portrait .ge-grid {
  grid-template-columns: 96px 1fr;
  transition: grid-template-columns 0.2s ease;
}
.phone-shell.phone-portrait .ge-grid textarea,
.phone-shell.phone-portrait .ge-grid .span2 {
  grid-column: 2 / span 1;
}
.phone-shell.phone-landscape .ms-docs-cards,
.phone-shell.phone-landscape #msDocsCards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-height: 420px) {
  .phone-shell.phone-landscape .ms-doc-center {
    grid-template-columns: 1fr 1fr;
  }
}

/* —— ZZ-98 其余横屏页：单据 / 开单详情 / 审批 / 报表 / 我的设置 —— */
.phone-shell.phone-landscape #panelDocs .ms-docs-table-wrap,
.phone-shell.ms-game-land #panelDocs .ms-docs-table-wrap {
  /* #9：sticky 表头 + 惯性横滚 */
  display: block !important;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  max-height: calc(100dvh - 168px);
  min-height: 0;
  touch-action: pan-x pan-y;
}
.phone-shell.phone-landscape #panelDocs #msDocsCards,
.phone-shell.ms-game-land #panelDocs #msDocsCards {
  display: none !important;
}
.phone-shell.phone-landscape #panelDocs table.gjp,
.phone-shell.ms-game-land #panelDocs table.gjp {
  min-width: 920px;
}
.phone-shell.phone-landscape #panelDocs table.gjp thead th,
.phone-shell.ms-game-land #panelDocs table.gjp thead th {
  position: sticky;
  top: 0;
  z-index: 6;
  background: #f8fafc;
  box-shadow: 0 1px 0 #e2e8f0;
}

/* 开单 / 通用 ge-grid：横屏两列字段 */
.phone-shell.phone-landscape .dn-ge-grid,
.phone-shell.ms-game-land .dn-ge-grid,
.phone-shell.phone-landscape #panelDocNew .ge-grid,
.phone-shell.ms-game-land #panelDocNew .ge-grid {
  grid-template-columns: 96px minmax(0, 1fr) 96px minmax(0, 1fr) !important;
}
/* #10：窄横屏退回「标签+字段」单列对，避免挤爆 */
@media (max-width: 740px) {
  .phone-shell.phone-landscape .dn-ge-grid,
  .phone-shell.ms-game-land .dn-ge-grid,
  .phone-shell.phone-landscape #panelDocNew .ge-grid,
  .phone-shell.ms-game-land #panelDocNew .ge-grid,
  .phone-shell.phone-landscape .ge-grid,
  .phone-shell.ms-game-land .ge-grid {
    grid-template-columns: 88px minmax(0, 1fr) !important;
  }
  .phone-shell.phone-landscape #panelDocNew .dn-four-flow,
  .phone-shell.ms-game-land #panelDocNew .dn-four-flow {
    grid-column: 2;
  }
}
.phone-shell.phone-landscape #panelDocNew .dn-four-flow,
.phone-shell.ms-game-land #panelDocNew .dn-four-flow {
  grid-column: 2 / -1;
}
.phone-shell.phone-landscape #panelDocNew .dn-card,
.phone-shell.ms-game-land #panelDocNew .dn-card {
  max-width: none;
}

/* 单据详情：抬头两列 */
.phone-shell.phone-landscape #docDetailBody .doc-meta,
.phone-shell.ms-game-land #docDetailBody .doc-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
}
.phone-shell.phone-landscape #panelDocDetail .card,
.phone-shell.ms-game-land #panelDocDetail .card {
  max-width: none;
}

/* 审批：左列表右详情 */
.phone-shell.phone-landscape .smart-page,
.phone-shell.ms-game-land .smart-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  min-height: calc(100dvh - 120px);
  align-items: stretch;
}
.phone-shell.phone-landscape .smart-page > .smart-hd,
.phone-shell.ms-game-land .smart-page > .smart-hd,
.phone-shell.phone-landscape .smart-page > .seg,
.phone-shell.ms-game-land .smart-page > .seg {
  grid-column: 1 / -1;
}
.phone-shell.phone-landscape .smart-page > #webTodoList,
.phone-shell.ms-game-land .smart-page > #webTodoList {
  grid-column: 1;
  grid-row: 3;
  margin: 0 !important;
  min-height: 0;
  overflow: auto;
  max-height: calc(100dvh - 180px);
}
.phone-shell.phone-landscape .smart-page > #webApDetail,
.phone-shell.ms-game-land .smart-page > #webApDetail {
  grid-column: 2;
  grid-row: 3;
  display: block !important;
  margin: 0 !important;
  min-height: 0;
  overflow: auto;
  max-height: calc(100dvh - 180px);
}
.phone-shell.phone-landscape .smart-page > #webApDetail:empty::before,
.phone-shell.ms-game-land .smart-page > #webApDetail:empty::before {
  /* #11：空态 */
  content: '点左侧审批单查看详情';
  display: block;
  color: #94a3b8;
  font-size: 0.86rem;
  padding: 16px;
  border: 1px dashed #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  min-height: 120px;
  box-sizing: border-box;
}
.phone-shell.phone-landscape .smart-page > #webApDetail.is-loading::before,
.phone-shell.ms-game-land .smart-page > #webApDetail.is-loading::before {
  /* #11：加载态（JS 可挂 is-loading） */
  content: '加载审批详情…';
  display: block;
  color: #64748b;
  font-size: 0.86rem;
  padding: 16px;
}

/* 报表：主区 60% / 侧栏 40% */
.phone-shell.phone-landscape #reportSaLayout,
.phone-shell.ms-game-land #reportSaLayout {
  display: grid !important;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 12px;
  align-items: start;
}
/* #12：横屏 KPI 条不换行，溢出横滑 */
.phone-shell.phone-landscape #panelReport .sa-kpi-row,
.phone-shell.ms-game-land #panelReport .sa-kpi-row,
.phone-shell.phone-landscape #panelReport #reportKpis.sa-kpi-row,
.phone-shell.ms-game-land #panelReport #reportKpis.sa-kpi-row {
  display: flex !important;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.phone-shell.phone-landscape #panelReport .sa-kpi-row > *,
.phone-shell.ms-game-land #panelReport .sa-kpi-row > *,
.phone-shell.phone-landscape #panelReport .sa-kpi,
.phone-shell.ms-game-land #panelReport .sa-kpi {
  flex: 0 0 auto;
  min-width: 118px;
}
.phone-shell.phone-landscape #reportSaLayout .sa-table-wrap,
.phone-shell.ms-game-land #reportSaLayout .sa-table-wrap {
  min-width: 0;
  order: 0;
}
.phone-shell.phone-landscape #reportSaLayout .sa-rank,
.phone-shell.ms-game-land #reportSaLayout .sa-rank {
  display: block !important;
  min-width: 0;
  order: 1;
  margin: 0;
}
.phone-shell.phone-landscape #panelReport .sa-table-card,
.phone-shell.ms-game-land #panelReport .sa-table-card {
  max-height: calc(100dvh - 220px);
  overflow: auto;
}

/* 我的：左右分栏 */
.phone-shell.phone-landscape #panelMobileMe,
.phone-shell.ms-game-land #panelMobileMe {
  /* #13：安全区 */
  display: grid;
  grid-template-columns: minmax(200px, 36%) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 12px;
  align-content: start;
  padding-left: max(0px, env(safe-area-inset-left, 0px));
  padding-right: max(8px, env(safe-area-inset-right, 0px));
  padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}
.phone-shell.phone-landscape #panelMobileMe .ms-me-card,
.phone-shell.ms-game-land #panelMobileMe .ms-me-card {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  height: 100%;
}
.phone-shell.phone-landscape #panelMobileMe .ms-logout,
.phone-shell.ms-game-land #panelMobileMe .ms-logout {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
}
.phone-shell.phone-landscape #panelMobileMe .ms-menu-list,
.phone-shell.ms-game-land #panelMobileMe .ms-menu-list {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 0;
  overflow: auto;
}

/* 设置：左右分栏（侧栏 + 正文） */
.phone-shell.phone-landscape #panelOsSettings .os-layout,
.phone-shell.ms-game-land #panelOsSettings .os-layout {
  /* #13：设置分栏安全区 */
  flex-direction: row !important;
  height: calc(100dvh - 100px);
  min-height: 0;
  padding-bottom: max(0px, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}
.phone-shell.phone-landscape #panelOsSettings .os-side,
.phone-shell.ms-game-land #panelOsSettings .os-side {
  width: min(240px, 36%);
  flex: 0 0 min(240px, 36%);
  overflow: auto;
  border-right: 1px solid #e2e8f0;
  border-bottom: 0;
  padding-left: max(0px, env(safe-area-inset-left, 0px));
}
.phone-shell.phone-landscape #panelOsSettings .os-main,
.phone-shell.ms-game-land #panelOsSettings .os-main {
  flex: 1;
  min-width: 0;
  overflow: auto;
  padding-right: max(0px, env(safe-area-inset-right, 0px));
}

/* 许愿池 MVP */
.wish-pool .wish-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.wish-chip {
  border: 1px solid var(--gjp-line, #d8dee6);
  background: #f8fafc;
  color: #0f172a;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  max-width: 100%;
  text-align: left;
}
.wish-chip:hover { border-color: #0ea5e9; color: #0369a1; }
.wish-thread {
  max-height: min(42vh, 420px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 2px 12px;
}
.wish-bubble { max-width: 92%; }
.wish-user { align-self: flex-end; }
.wish-bot { align-self: flex-start; }
.wish-role { font-size: 11px; opacity: .55; margin-bottom: 2px; }
.wish-text {
  padding: 10px 12px;
  border-radius: 12px;
  line-height: 1.45;
  font-size: 14px;
  white-space: normal;
  word-break: break-word;
}
.wish-user .wish-text { background: #0ea5e9; color: #fff; border-bottom-right-radius: 4px; }
.wish-bot .wish-text { background: #f1f5f9; color: #0f172a; border-bottom-left-radius: 4px; }
.wish-meta { font-size: 11px; opacity: .5; margin-top: 4px; }
.wish-compose textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--gjp-line, #d8dee6);
  border-radius: 8px;
  resize: vertical;
  margin: 8px 0;
  font: inherit;
}

/* ===== ZZ-107 H5 十刚需 ===== */
.docs-quick-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.docs-quick-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.docs-quick-dates button {
  border: 1px solid #dbe3ef;
  background: #fff;
  color: #334155;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}
.docs-quick-dates button.on {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}
#docsQuickPartner {
  min-width: 140px;
  flex: 1 1 160px;
  max-width: 280px;
  height: 32px;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 13px;
}
.dn-freq-wrap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0 0;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.dn-freq-lab {
  flex: 0 0 auto;
  font-size: 12px;
  color: #64748b;
  padding-top: 6px;
}
.dn-freq-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dn-freq-chip {
  border: 1px solid #dbe3ef;
  background: #fff;
  color: #0f172a;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  cursor: pointer;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dn-freq-chip:hover { border-color: #3b78e7; color: #1d4ed8; }
.dn-freq-chip small { color: #94a3b8; margin-left: 4px; }
.link.doc-pass { color: #16a34a; font-weight: 600; }
.link.doc-reject { color: #dc2626; }
.ms-btn-pass, .ms-btn-reject {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
}
.ms-btn-pass { background: #16a34a; color: #fff; }
.ms-btn-pass:active { transform: scale(0.97); background: #15803d; }
.ms-btn-reject { background: #fee2e2; color: #b91c1c; }
.ms-btn-reject:active { transform: scale(0.97); background: #fecaca; }
.ms-doc-actions { display: flex; gap: 8px; margin-top: 8px; }
.ms-sync-banner {
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
}
.ms-sync-banner.is-bad {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #991b1b;
}
.ms-sync-banner button {
  margin-left: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
.ms-ar-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}
.ms-ar-chip {
  flex: 1 1 140px;
  min-width: 0;
  text-align: left;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
}
.ms-ar-chip .l { display: block; font-size: 11px; color: #64748b; }
.ms-ar-chip .v { display: block; margin-top: 2px; font-size: 1.05rem; font-weight: 700; color: #0f172a; }
.ms-ar-chip.tone-rose { border-color: #fecaca; background: #fef2f2; }
.ms-ar-chip.tone-rose .v { color: #b91c1c; }
.sw-row-click { cursor: pointer; }
.sw-row-click:hover { background: #eff6ff; }
.open-order-follow { color: #1d4ed8; font-weight: 600; }

/* #9 横屏首页再压一屏 */
.phone-shell.phone-landscape .ms-home-cockpit,
.phone-shell.ms-game-land .ms-home-cockpit {
  gap: 6px 8px;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-hero-card,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-hero-card {
  padding: 8px 10px 6px;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-hero-card .ms-hero-val,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-hero-card .ms-hero-val {
  font-size: clamp(0.98rem, 2.8vw, 1.22rem);
  margin-top: 2px;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-hero-card .ms-stat,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-hero-card .ms-stat {
  min-height: 30px;
  padding: 4px 6px;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-todo-stack,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-todo-stack {
  gap: 6px;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-todo-stack .ms-todo-card,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-todo-stack .ms-todo-card {
  padding: 8px;
  gap: 4px;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-todo-stack .ms-todo-card .n,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-todo-stack .ms-todo-card .n {
  width: 32px; min-width: 32px; height: 32px;
  font-size: 0.88rem;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-essence-loop,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-essence-loop {
  padding: 6px 8px;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-essence-loop .essence-card,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-essence-loop .essence-card {
  padding: 6px 8px;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-sync-banner,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-sync-banner {
  grid-column: 1 / -1;
  grid-row: 1;
  margin: 0;
  padding: 6px 10px;
  font-size: 12px;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-ar-strip,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-ar-strip {
  /* 横屏一屏：应收并入消息/超期入口，避免再占一行 */
  display: none !important;
}
.phone-shell.phone-landscape .ms-home-cockpit > .ms-apps-zone,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-apps-zone,
.phone-shell.phone-landscape .ms-home-cockpit > .ms-trend-card,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-trend-card,
.phone-shell.phone-landscape .ms-home-cockpit > .ms-action-zone,
.phone-shell.ms-game-land .ms-home-cockpit > .ms-action-zone {
  display: none !important;
}
