/* =============================================================
 * app.css —— 晨阳集团AI智能工作台 样式系统
 * 设计基调：企业级清爽风 —— 冷调浅灰画布、高对比文字、
 *            统一冷调边框与轻阴影，品牌暖色克制点缀
 * ============================================================= */

:root {
  /* —— 冷调中性画布 —— */
  --bg: #F4F6F9;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --surface-3: #EEF2F6;
  --border: #E3E8EF;
  --border-2: #D2DAE4;

  /* —— 高对比文字层级 —— */
  --text: #1F2A37;
  --text-2: #56616E;
  --text-3: #8A97A6;

  /* —— 品牌暖色（克制点缀，仅用于关键强调） —— */
  --brand: #B05A54;
  --brand-2: #C97B74;
  --brand-dark: #96483F;
  --brand-soft: #FBEEEB;

  /* —— 总部 / 内部 / 门店 语义色 —— */
  --hq: #B98A2E;
  --hq-soft: #FBF3E2;
  --internal: #4A5FBF;
  --internal-soft: #ECEFFB;
  --store: #B05A54;
  --store-soft: #FBEEEB;

  /* —— 状态色 —— */
  --ok: #2E9E6B;
  --ok-soft: #E8F5EE;
  --warn: #D97D26;
  --warn-soft: #FDF1E3;
  --danger: #C4453D;
  --danger-soft: #FBEAE8;
  --info: #3E7CB1;
  --info-soft: #EAF2F9;

  /* —— 圆角 / 阴影（冷调、轻量） —— */
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(31, 42, 55, .04), 0 4px 16px rgba(31, 42, 55, .06);
  --shadow-lg: 0 8px 40px rgba(31, 42, 55, .12);
  --sidebar-w: 232px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; }
a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #C7D0DB; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ============ 登录页 ============ */
.login-wrap {
  display: flex; min-height: 100vh; background: var(--bg);
}
.login-brand {
  flex: 1.1; position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(150deg, #4A3432 0%, #7A4A44 45%, #B05A54 100%);
  padding: 56px 60px; display: flex; flex-direction: column; justify-content: space-between;
}
.login-brand::after {
  content: ''; position: absolute; right: -120px; top: -80px; width: 420px; height: 420px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 65%);
}
.login-brand::before {
  content: ''; position: absolute; left: -60px; bottom: -140px; width: 360px; height: 360px;
  border-radius: 50%; background: radial-gradient(circle, rgba(201, 160, 90, .28), transparent 70%);
}
.lb-logo { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }
.lb-logo .mark {
  width: 40px; height: 40px; border-radius: 11px; background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28); display: grid; place-items: center;
  font-size: 19px; font-weight: 700; letter-spacing: -.5px;
}
.lb-logo .nm { font-size: 16px; font-weight: 600; letter-spacing: .3px; }
.lb-logo .sub { font-size: 11.5px; opacity: .68; letter-spacing: 1.2px; text-transform: uppercase; }
.lb-mid { position: relative; z-index: 2; max-width: 460px; }
.lb-mid h1 { font-size: 34px; line-height: 1.35; margin-bottom: 16px; font-weight: 600; }
.lb-mid p { font-size: 14.5px; opacity: .78; line-height: 1.9; margin: 0 0 26px; }
.lb-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; margin-top: 8px; }
.lb-feat { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; opacity: .9; }
.lb-feat i {
  width: 18px; height: 18px; border-radius: 5px; background: rgba(255, 255, 255, .18);
  display: grid; place-items: center; font-style: normal; font-size: 11px; margin-top: 2px; flex: none;
}
.lb-quote {
  position: relative; z-index: 2; max-width: 460px; margin-top: 22px;
  padding: 13px 16px; border-left: 2px solid rgba(201, 160, 90, .78);
  background: rgba(255, 255, 255, .055); border-radius: 0 10px 10px 0;
  font-size: 13px; line-height: 1.95; opacity: .9; letter-spacing: .2px;
}
.lb-foot { position: relative; z-index: 2; font-size: 12px; opacity: .55; }

.login-panel {
  width: 460px; flex: none; background: var(--surface); display: flex; align-items: center;
  justify-content: center; padding: 40px;
}
.login-box { width: 100%; max-width: 340px; }
.login-box h2 { font-size: 22px; margin-bottom: 6px; }
.login-box .tip { color: var(--text-3); font-size: 13px; margin-bottom: 26px; }
.login-tabs { display: flex; gap: 4px; background: var(--surface-3); padding: 3px; border-radius: 9px; margin-bottom: 20px; }
.login-tabs button {
  flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 7px; cursor: pointer;
  font-size: 13px; color: var(--text-2); transition: .18s;
}
.login-tabs button.on { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .07); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.input, .select, .textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border-2); border-radius: 8px;
  background: #fff; font-size: 14px; color: var(--text); outline: none; transition: .16s; font-family: inherit;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(176, 90, 84, .12); }
.input::placeholder { color: #BFB4AD; }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4.5L6 8.5L10 4.5' stroke='%239B8F89' stroke-width='1.4' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px; }
.inline-field { display: flex; gap: 8px; }
.inline-field .input { flex: 1; }

.demo-accounts { margin-top: 22px; border-top: 1px dashed var(--border-2); padding-top: 16px; }
.demo-accounts .dt { font-size: 12px; color: var(--text-3); margin-bottom: 10px; }
.demo-list { display: flex; flex-direction: column; gap: 6px; max-height: 232px; overflow: auto; }
.demo-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; transition: .16s; text-align: left;
}
.demo-item:hover { border-color: var(--brand-2); background: var(--brand-soft); }
.demo-item .who { flex: 1; min-width: 0; }
.demo-item .who b { font-size: 13px; font-weight: 600; display: block; }
.demo-item .who span { font-size: 11.5px; color: var(--text-3); }

/* ============ 主框架 ============ */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: none; background: #33292A; color: #E7DFDA;
  display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 30;
}
.sb-top { padding: 18px 18px 14px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.sb-logo { display: flex; align-items: center; gap: 10px; }
.sb-logo .mark {
  width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(140deg, #C97B74, #96483F);
  display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #fff; flex: none;
}
.sb-logo .nm { font-size: 14.5px; font-weight: 600; color: #fff; line-height: 1.25; }
.sb-logo .sub { font-size: 10.5px; color: rgba(231, 223, 218, .5); letter-spacing: .8px; }
.sb-sector {
  margin-top: 13px; padding: 7px 10px; border-radius: 8px; font-size: 12px; display: flex; align-items: center; gap: 7px;
}
.sb-sector .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.sb-nav { flex: 1; overflow-y: auto; padding: 12px 10px 20px; }
.sb-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); }
.nav-group { font-size: 10.5px; color: rgba(231, 223, 218, .38); letter-spacing: 1px; padding: 12px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer;
  font-size: 13.5px; color: rgba(231, 223, 218, .82); transition: .15s; margin-bottom: 2px; user-select: none;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.on { background: rgba(201, 123, 116, .22); color: #fff; font-weight: 600; }
.nav-item .ico { width: 17px; text-align: center; opacity: .85; font-size: 14px; flex: none; }
.nav-item .cnt {
  margin-left: auto; background: rgba(201, 123, 116, .9); color: #fff; font-size: 10.5px;
  min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 5px;
}
.nav-item.locked { opacity: .34; cursor: not-allowed; }
.sb-foot { padding: 12px; border-top: 1px solid rgba(255, 255, 255, .07); }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 58px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 22px; gap: 14px; position: sticky; top: 0; z-index: 20;
}
.tb-title { font-size: 15.5px; font-weight: 600; }
.tb-sub { font-size: 12px; color: var(--text-3); margin-top: -2px; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.tb-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px;
  font-size: 12px; background: var(--surface-3); color: var(--text-2); white-space: nowrap;
}
.tb-chip .dot { width: 6px; height: 6px; border-radius: 50%; }
.user-menu { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 4px 8px; border-radius: 8px; transition: .15s; }
.user-menu:hover { background: var(--surface-3); }
.user-menu .nm { font-size: 13px; font-weight: 500; }
.user-menu .rl { font-size: 11px; color: var(--text-3); display: block; margin-top: -3px; }

.page { padding: 20px 22px 40px; flex: 1; min-width: 0; }

/* ============ 通用组件 ============ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card-hd {
  padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.card-hd h3 { font-size: 14.5px; }
.card-hd .desc { font-size: 12px; color: var(--text-3); }
.card-hd .right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card-bd { padding: 16px 18px; }
.card-bd.tight { padding: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g-2-1 { grid-template-columns: 2fr 1fr; }
.g-1-2 { grid-template-columns: 1fr 2fr; }
@media (max-width:1280px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width:1000px) { .g2, .g3, .g4, .g-2-1, .g-1-2 { grid-template-columns: 1fr; } }

.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat-card .lb { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.stat-card .vl { font-size: 26px; font-weight: 650; margin-top: 6px; letter-spacing: -.3px; }
.stat-card .ex { font-size: 11.5px; color: var(--text-3); margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stat-card .ic {
  position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center; font-size: 16px;
}
.up { color: var(--ok); } .down { color: var(--danger); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px;
  border-radius: 8px; border: 1px solid var(--border-2); background: #fff; color: var(--text);
  cursor: pointer; font-size: 13px; transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--brand-2); color: var(--brand); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 4px 10px; font-size: 12.5px; border-radius: 7px; }
.btn-xs { padding: 2px 8px; font-size: 12px; border-radius: 6px; }
.btn-danger { color: var(--danger); border-color: #EBC5C1; }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.btn-ai { background: linear-gradient(120deg, #7A4A44, #B05A54); border: 0; color: #fff; }
.btn-ai:hover { background: linear-gradient(120deg, #6A3E39, #A04E49); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-group { display: flex; gap: 6px; }
.btn-group .btn.on { background: var(--brand-soft); border-color: var(--brand-2); color: var(--brand); font-weight: 600; }

.tag {
  display: inline-block; padding: 1.5px 8px; border-radius: 5px; font-size: 11.5px;
  background: var(--surface-3); color: var(--text-2); line-height: 1.7;
}
.tag-brand { background: var(--brand-soft); color: var(--brand); }
.tag-internal { background: var(--internal-soft); color: var(--internal); }
.tag-store { background: var(--store-soft); color: var(--store); }
.tag-hq { background: var(--hq-soft); color: var(--hq); }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-danger { background: var(--danger-soft); color: var(--danger); }
.tag-info { background: var(--info-soft); color: var(--info); }
.badge { display: inline-block; padding: 1px 7px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.dot-i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }

.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center;
  color: #fff; font-size: 11.5px; font-weight: 600; flex: none;
}
.avatar.lg { width: 38px; height: 38px; font-size: 13.5px; }

.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; padding: 10px 14px; background: var(--surface-2); color: var(--text-2);
  font-weight: 600; font-size: 12.5px; border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0;
}
.tbl td { padding: 11px 14px; border-bottom: 1px solid #EDF1F5; vertical-align: middle; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .row-click { cursor: pointer; }
.ta-r { text-align: right; } .ta-c { text-align: center; }
.tbl .mono { font-variant-numeric: tabular-nums; }

.empty { padding: 46px 20px; text-align: center; color: var(--text-3); }
.empty-ico { font-size: 30px; opacity: .35; margin-bottom: 8px; }
.empty-t { font-size: 13px; }

.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--border); }
.pager-info { font-size: 12.5px; color: var(--text-3); }
.pager-btns { display: flex; gap: 4px; }
.pg {
  min-width: 28px; height: 28px; border: 1px solid var(--border-2); background: #fff; border-radius: 6px;
  cursor: pointer; font-size: 12.5px; color: var(--text-2); padding: 0 7px;
}
.pg.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pg.disabled { opacity: .4; cursor: not-allowed; }

.prog { position: relative; height: 18px; background: var(--surface-3); border-radius: 9px; overflow: hidden; min-width: 90px; }
.prog-bar { height: 100%; border-radius: 9px; background: var(--brand); transition: width .5s; }
.prog-bar.ok { background: var(--ok); } .prog-bar.warn { background: var(--warn); } .prog-bar.low { background: var(--danger); }
.prog-txt {
  position: absolute; inset: 0; text-align: center; font-size: 11.5px; line-height: 18px;
  color: #fff; font-weight: 600; letter-spacing: .2px;
  text-shadow: 0 1px 2px rgba(45, 25, 20, .55), 0 0 3px rgba(45, 25, 20, .4);
}

/* 模态 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(31, 42, 55, .42); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 24px; animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0 } }
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: pop .18s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: .4 } }
.modal-hd { padding: 15px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.modal-hd h3 { font-size: 15.5px; }
.modal-x { margin-left: auto; border: 0; background: transparent; cursor: pointer; font-size: 15px; color: var(--text-3); padding: 4px; }
.modal-x:hover { color: var(--text); }
.modal-bd { padding: 18px 20px; overflow: auto; flex: 1; }
.modal-ft { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.confirm-body { font-size: 13.5px; color: var(--text-2); line-height: 1.8; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width:640px) { .form-grid { grid-template-columns: 1fr; } }
.form-hint { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }
.form-sec {
  font-size: 12.5px; font-weight: 600; color: var(--text); margin: 18px 0 10px; padding-bottom: 6px;
  border-bottom: 1px solid var(--border); grid-column: 1 / -1;
}

/* Toast */
.toast-box { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #33292A; color: #fff; padding: 9px 18px; border-radius: 22px; font-size: 13px;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 8px; animation: slideDown .22s ease;
}
.toast.out { animation: fadeOut .5s ease forwards; }
@keyframes slideDown { from { transform: translateY(-14px); opacity: 0 } }
@keyframes fadeOut { to { opacity: 0; transform: translateY(-10px) } }
.toast-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-2); }
.toast-ok .toast-dot { background: #57C08A; }
.toast-warn .toast-dot { background: #F0A858; }
.toast-danger .toast-dot { background: #E3706A; }

/* 图表 */
.chart-svg { width: 100%; height: auto; display: block; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--text-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.hbar-wrap { display: flex; flex-direction: column; gap: 11px; }
.hbar-row { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.hbar-lb { width: 128px; flex: none; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { flex: 1; height: 9px; background: var(--surface-3); border-radius: 5px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 5px; }
.hbar-vl { width: 92px; text-align: right; flex: none; font-variant-numeric: tabular-nums; font-weight: 600; }

/* 过滤条 */
.filter-bar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px;
  border-bottom: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.filter-bar .select, .filter-bar .input { width: auto; min-width: 130px; padding: 6px 10px; font-size: 13px; }
.filter-bar .lb { font-size: 12.5px; color: var(--text-2); }
.filter-bar .sp { margin-left: auto; }

/* 分区标题 */
.sec-title { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.sec-title .line { flex: 1; height: 1px; background: var(--border); }

/* 权限不足提示 */
.denied {
  background: var(--danger-soft); border: 1px solid #EBC5C1; border-radius: var(--radius-lg);
  padding: 34px 22px; text-align: center; color: var(--danger);
}
.denied .big { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.denied .sm { font-size: 12.5px; color: #A9645E; }

/* ============ 模块：知识库 ============ */
.kb-layout { display: grid; grid-template-columns: 258px 1fr; gap: 16px; align-items: start; }
@media (max-width:1080px) { .kb-layout { grid-template-columns: 1fr; } }
.kb-tree { padding: 10px; max-height: calc(100vh - 160px); overflow: auto; }
.kb-node {
  display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 7px; cursor: pointer;
  font-size: 13px; color: var(--text-2); user-select: none;
}
.kb-node:hover { background: var(--surface-3); }
.kb-node.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.kb-node .caret { width: 12px; text-align: center; font-size: 9px; color: var(--text-3); transition: transform .18s; flex: none; }
.kb-node.open .caret { transform: rotate(90deg); }
.kb-node .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-node .ct { font-size: 11px; color: var(--text-3); }
.kb-children { margin-left: 14px; border-left: 1px dashed var(--border-2); padding-left: 4px; }
.kb-scope { font-size: 10px; padding: 0 5px; border-radius: 4px; margin-left: 4px; }

.doc-list { display: flex; flex-direction: column; }
.doc-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #F3EFEB;
  transition: .15s; cursor: pointer;
}
.doc-item:hover { background: var(--surface-2); }
.doc-ico {
  width: 34px; height: 40px; border-radius: 6px; display: grid; place-items: center; font-size: 11px;
  font-weight: 700; color: #fff; flex: none; letter-spacing: -.3px;
}
.ico-pdf { background: #C4453D; } .ico-docx { background: #3E7CB1; } .ico-xlsx { background: #2E9E6B; }
.ico-pptx { background: #D97D26; } .ico-txt { background: #8A8078; } .ico-image { background: #7A6EA8; }
.ico-video { background: #4A5FBF; }
.doc-main { flex: 1; min-width: 0; }
.doc-main .t { font-size: 13.5px; font-weight: 600; margin-bottom: 3px; }
.doc-main .m { font-size: 11.5px; color: var(--text-3); display: flex; gap: 12px; flex-wrap: wrap; }
.doc-main .tags { margin-top: 5px; display: flex; gap: 5px; flex-wrap: wrap; }
.doc-act { display: flex; gap: 6px; flex: none; }

/* AI 对话 */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 190px); min-height: 460px; }
.chat-body { flex: 1; overflow: auto; padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; gap: 10px; max-width: 88%; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg .bubble {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px 12px 12px 12px;
  padding: 11px 14px; font-size: 13.5px; line-height: 1.85; white-space: pre-wrap; word-break: break-word;
}
.msg.me .bubble { background: var(--brand); border-color: var(--brand); color: #fff; border-radius: 12px 4px 12px 12px; }
.msg.ai .bubble { background: #fff; }
.msg .who { font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.refs { margin-top: 10px; border-top: 1px dashed var(--border-2); padding-top: 9px; }
.refs .rt { font-size: 11.5px; color: var(--text-3); margin-bottom: 6px; }
.ref-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 9px; border: 1px solid var(--border);
  border-radius: 7px; font-size: 12px; margin-bottom: 5px; cursor: pointer; background: var(--surface-2); transition: .15s;
}
.ref-item:hover { border-color: var(--brand-2); background: var(--brand-soft); }
.ref-item .no { width: 18px; height: 18px; border-radius: 4px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 10.5px; flex: none; }
.ref-item .tt { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref-item .pg { color: var(--text-3); }
.chat-foot { border-top: 1px solid var(--border); padding: 12px 16px; background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.quick-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.quick-q {
  padding: 4px 11px; border: 1px dashed var(--border-2); border-radius: 16px; font-size: 12px;
  color: var(--text-2); cursor: pointer; background: #fff; transition: .15s;
}
.quick-q:hover { border-color: var(--brand-2); color: var(--brand); background: var(--brand-soft); border-style: solid; }
.chat-input-row { display: flex; gap: 8px; }
.chat-input-row .input { flex: 1; }
.typing { display: inline-flex; gap: 3px; align-items: center; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); animation: blink 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: .2s } .typing i:nth-child(3) { animation-delay: .4s }
@keyframes blink { 0%, 80%, 100% { opacity: .25 } 40% { opacity: 1 } }

/* ============ 模块：肌肤检测 ============ */
.skin-report { max-width: 560px; }
.skin-score-row { display: flex; align-items: center; gap: 20px; padding: 18px; background: linear-gradient(120deg, #FBF3F0, #FDF8F2); border-radius: var(--radius); margin-bottom: 16px; }
.issue-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; background: var(--surface-2); }
.issue-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.issue-hd .nm { font-weight: 600; font-size: 13.5px; }
.lv-bar { display: flex; gap: 3px; margin-left: auto; }
.lv-bar i { width: 15px; height: 6px; border-radius: 3px; background: var(--border-2); }
.lv-bar i.on { background: var(--brand); }
.issue-adv { font-size: 12.5px; color: var(--text-2); line-height: 1.8; }
.rec-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; }
.rec-item .nm { flex: 1; font-size: 13px; font-weight: 500; }
.rec-item .pr { color: var(--brand); font-weight: 600; font-size: 13px; }
.disclaimer { font-size: 11.5px; color: var(--text-3); background: var(--surface-3); padding: 10px 12px; border-radius: 8px; line-height: 1.75; margin-top: 14px; }

.photo-box {
  width: 100%; aspect-ratio: 3/4; border-radius: var(--radius); border: 2px dashed var(--border-2);
  display: grid; place-items: center; overflow: hidden; background: var(--surface-2); position: relative; cursor: pointer;
}
.photo-box:hover { border-color: var(--brand-2); }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-ph { text-align: center; color: var(--text-3); font-size: 13px; padding: 20px; }
.photo-ph .big { font-size: 26px; opacity: .4; margin-bottom: 6px; }

/* V6.0 三视角精细化面诊 */
.collect-tips { font-size: 12px; color: var(--text-2); line-height: 1.8; background: #FBF3F0; border: 1px solid #F1D9D3; padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
.g-skin { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
@media (max-width: 1000px) { .g-skin { grid-template-columns: 1fr; } }
.collect-tips b { color: var(--brand-dark); }
.view-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.view-card { border: 1px solid var(--border); border-radius: 10px; padding: 10px; background: var(--surface-2); }
.view-hd { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.view-hd b { font-size: 12.5px; }
.view-no { width: 18px; height: 18px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 11px; display: grid; place-items: center; }
.view-ang { margin-left: auto; font-size: 10.5px; color: var(--text-3); }
.view-photo { width: 100%; aspect-ratio: 3/4; border-width: 1.5px; }
.view-photo .photo-ph { font-size: 11.5px; padding: 10px 4px; word-break: keep-all; }
.view-photo .photo-ph .big { font-size: 20px; margin-bottom: 4px; }
.view-photo.filled { border-style: solid; border-color: var(--brand-2); }
.view-areas { font-size: 10.5px; color: var(--text-2); margin-top: 7px; line-height: 1.5; }
.view-guide { font-size: 10px; color: var(--text-3); margin-top: 3px; line-height: 1.5; min-height: 28px; }
.dim-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; margin: 6px 0 4px; }
.dim-cell .dim-top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 4px; }
.dim-top b.good { color: #2E9E6B; } .dim-top b.mid { color: #D97D26; } .dim-top b.low { color: #C4453D; }
.dim-track { height: 6px; background: var(--border-2); border-radius: 3px; overflow: hidden; }
.dim-track i { display: block; height: 100%; border-radius: 3px; }
.dim-track i.good { background: #2E9E6B; } .dim-track i.mid { background: #D97D26; } .dim-track i.low { background: #C4453D; }
.dim-good { font-size: 10px; color: var(--text-3); margin-top: 3px; }
.issue-area { font-size: 11px; color: var(--text-3); background: var(--surface-3); padding: 2px 7px; border-radius: 10px; }
.issue-basis { font-size: 11.5px; color: var(--text-3); margin: -2px 0 6px; line-height: 1.6; }
.rec-item { flex-wrap: wrap; }
.rec-reason { flex-basis: 100%; font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.req { color: #C4453D; font-weight: 700; margin-left: 2px; }
.input-err { border-color: #C4453D !important; box-shadow: 0 0 0 3px rgba(196, 69, 61, .12) !important; }
@media (max-width: 720px) { .view-grid { grid-template-columns: 1fr; } .dim-grid { grid-template-columns: 1fr; } }

.scan-line {
  position: absolute; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, #B05A54, transparent);
  box-shadow: 0 0 12px rgba(176, 90, 84, .8); animation: scan 1.5s linear infinite;
}
@keyframes scan { 0% { top: 4% } 100% { top: 96% } }
.analyzing-mask {
  position: absolute; inset: 0; background: rgba(42, 36, 34, .5); display: grid; place-items: center; color: #fff;
  text-align: center; font-size: 13px;
}

/* 门店专属码 */
.qr-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; text-align: center; }
.qr-box {
  width: 92px; height: 92px; margin: 8px auto; background: #fff; border: 1px solid var(--border);
  border-radius: 8px; display: grid; place-items: center; padding: 7px;
}
.qr-box svg { width: 100%; height: 100%; }

/* ============ 模块：进销存 ============ */
.wh-tabs { display: flex; gap: 4px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
.wh-tab { padding: 6px 14px; border-radius: 7px; font-size: 13px; cursor: pointer; color: var(--text-2); transition: .15s; }
.wh-tab:hover { background: var(--surface-3); }
.wh-tab.on { background: var(--brand); color: #fff; font-weight: 600; }
.stock-cell { display: flex; align-items: center; gap: 8px; }
.stock-bar { width: 62px; height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; flex: none; }
.stock-bar i { display: block; height: 100%; border-radius: 3px; }
.alert-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #F3EFEB; font-size: 13px;
}
.alert-item:last-child { border-bottom: 0; }
.alert-item .nm { flex: 1; font-weight: 500; }
.step-flow { display: flex; align-items: center; gap: 8px; padding: 8px 0; flex-wrap: wrap; }
.step-flow .s { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.step-flow .s b { font-weight: 600; color: var(--text); }

/* 可编辑协同表格 */
.editable-tbl td[contenteditable="true"] { outline: none; transition: .15s; }
.editable-tbl td[contenteditable="true"]:hover { background: #FFFBEF; box-shadow: inset 0 0 0 1px var(--border-2); }
.editable-tbl td[contenteditable="true"]:focus { background: #FFF8E6; box-shadow: inset 0 0 0 2px var(--brand-2); }
.editable-tbl .cell-saved { animation: saved .8s ease; }
@keyframes saved { 0% { background: #E8F5EE } 100% { background: transparent } }
.collab-tag { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.collab-tag .live { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .35 } }

/* ============ 模块：业绩 ============ */
.rank-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid #F3EFEB; }
.rank-row:last-child { border-bottom: 0; }
.rank-no {
  width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 12px;
  font-weight: 700; background: var(--surface-3); color: var(--text-2); flex: none;
}
.rank-no.t1 { background: #E5B94E; color: #fff; } .rank-no.t2 { background: #B9BEC7; color: #fff; }
.rank-no.t3 { background: #CB9A6A; color: #fff; }
.rank-nm { flex: 1; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.rank-vl { font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.ai-block {
  background: linear-gradient(135deg, #FBF3F0, #FDF8F4); border: 1px solid #EFDCD5;
  border-radius: var(--radius); padding: 14px 16px; font-size: 13px; line-height: 1.9;
}
.ai-block .hd { font-weight: 600; color: var(--brand); margin-bottom: 8px; display: flex; align-items: center; gap: 7px; font-size: 13px; }
.ai-block pre { margin: 0; white-space: pre-wrap; font-family: inherit; font-size: 13px; color: var(--text); }

/* ============ 模块：权限配置 ============ */
.perm-group { margin-bottom: 6px; }
.perm-gh {
  font-size: 12.5px; font-weight: 600; padding: 8px 12px; background: var(--surface-2);
  border-radius: 7px; display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none;
}
.perm-gh .cb { display: flex; align-items: center; gap: 6px; }
.perm-list { padding: 8px 12px 12px 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px 18px; }
@media (max-width:760px) { .perm-list { grid-template-columns: 1fr; } }
.ck { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; cursor: pointer; }
.ck input { margin-top: 3px; accent-color: var(--brand); }
.ck .ds { font-size: 11.5px; color: var(--text-3); }
.role-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; cursor: pointer; transition: .15s; }
.role-card:hover { border-color: var(--brand-2); box-shadow: var(--shadow); }
.role-card.on { border-color: var(--brand); background: var(--brand-soft); }
.role-card .nm { font-weight: 600; font-size: 13.5px; margin-bottom: 4px; }
.role-card .mt { font-size: 11.5px; color: var(--text-2); display: flex; gap: 10px; flex-wrap: wrap; }

/* ============ H5 移动端 ============ */
.h5-stage { min-height: 100vh; background: #EFEBE8; display: flex; justify-content: center; padding: 26px 16px; }
.h5-device {
  width: 390px; height: 844px; background: #fff; border-radius: 40px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(42, 36, 34, .22); border: 9px solid #2A2422; display: flex; flex-direction: column; position: relative;
}
.h5-notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 148px; height: 26px;
  background: #2A2422; border-radius: 0 0 16px 16px; z-index: 10;
}
.h5-status { height: 40px; background: linear-gradient(120deg, #7A4A44, #B05A54); flex: none; display: flex; align-items: flex-end; padding: 0 20px 5px; color: #fff; font-size: 11px; justify-content: space-between; }
.h5-hd {
  background: linear-gradient(120deg, #7A4A44, #B05A54); color: #fff; padding: 6px 18px 14px; flex: none;
  display: flex; align-items: center; gap: 10px;
}
.h5-hd .bk { font-size: 17px; opacity: .85; }
.h5-hd .tt { font-size: 16px; font-weight: 600; }
.h5-hd .sub { font-size: 11px; opacity: .78; margin-top: -2px; }
.h5-body { flex: 1; overflow-y: auto; background: #F7F4F1; padding: 14px; }
.h5-body::-webkit-scrollbar { width: 0; }
.h5-foot { flex: none; border-top: 1px solid var(--border); background: #fff; display: flex; padding: 6px 0 14px; }
.h5-tab { flex: 1; text-align: center; font-size: 10.5px; color: var(--text-3); padding: 4px 0; cursor: pointer; }
.h5-tab .ic { font-size: 18px; display: block; margin-bottom: 1px; }
.h5-tab.on { color: var(--brand); font-weight: 600; }
.h5-card { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(42, 36, 34, .06); }
.h5-card h4 { font-size: 14px; margin-bottom: 10px; }
.h5-btn {
  width: 100%; padding: 12px; border-radius: 24px; border: 0; font-size: 15px; font-weight: 600;
  background: linear-gradient(120deg, #7A4A44, #B05A54); color: #fff; cursor: pointer;
}
.h5-btn:disabled { background: #CCC4BE; }
.h5-btn.ghost { background: #fff; border: 1px solid var(--border-2); color: var(--text-2); }
.h5-store-item { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; cursor: pointer; }
.h5-store-item.on { border-color: var(--brand); background: var(--brand-soft); }
.h5-store-item .nm { flex: 1; font-size: 13.5px; font-weight: 500; }
.h5-store-item .ds { font-size: 11px; color: var(--text-3); }

.h5-side { width: 300px; flex: none; padding-top: 10px; }
.h5-side h2 { font-size: 19px; margin-bottom: 6px; }
.h5-side p { font-size: 13px; color: var(--text-2); line-height: 1.9; }
.h5-tips { background: #fff; border-radius: 12px; padding: 16px; margin-top: 16px; box-shadow: var(--shadow); }
.h5-tips li { font-size: 12.5px; color: var(--text-2); margin-bottom: 7px; line-height: 1.7; }

/* ============ 看板 ============ */
.kpi-row { display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr); }
@media (max-width:1280px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
.mini-tbl td, .mini-tbl th { padding: 8px 12px; font-size: 12.5px; }
.legend-soft { font-size: 11.5px; color: var(--text-3); }

/* 滚动条美化：卡片内 */
.card-bd::-webkit-scrollbar-thumb { background: #D6DEE8; }

/* 通用工具类 */
.mt0 { margin-top: 0 !important; } .mb0 { margin-bottom: 0 !important; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; }
.muted { color: var(--text-3); } .strong { font-weight: 600; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.nowrap { white-space: nowrap; }
.text-r { text-align: right; }
.hide { display: none !important; }
.flex-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-tabs { display: flex; gap: 4px; background: var(--surface-3); padding: 3px; border-radius: 9px; }
.pill-tabs button { border: 0; background: transparent; padding: 5px 13px; border-radius: 7px; font-size: 12.5px; cursor: pointer; color: var(--text-2); }
.pill-tabs button.on { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .07); }

/* AI 拆解方案表格：可编辑行与金额输入 */
.ai-row:hover { background: var(--brand-soft, #FBF3EC); }
.ai-row .ai-amt { font-weight: 600; color: var(--brand, #B05A54); }
.donut { display: block; margin: 0 auto; }

/* =============================================================
 * V2.0 增量样式（增量改造，不覆盖原有视觉语言）
 * 覆盖：移动端抽屉 (G1) / 组织架构 (A2) / 入口导航 (G3) /
 *       客户运营阶段流与时间线 (B1) / 单据流转 (E4) / 成本指标 (F1)
 * ============================================================= */

/* ---------- 1. 移动端导航抽屉 ---------- */
.sb-mask { display: none; }
.menu-btn { display: none; }
body.nav-open { overflow: hidden; }

/* ---------- 2. 看板新增成本指标 ---------- */
.kpi-row-cost { margin-top: 14px; }
.kpi-row-cost .stat-card { border-style: dashed; }
.cost-note {
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border);
  font-size: 12.5px; color: var(--text-2);
}
.cost-note b { font-size: 14px; color: var(--brand); }

/* ---------- 3. 账号列表：批量选择 ---------- */
.acc-tbl th:first-child, .acc-tbl td:first-child { width: 38px; padding-right: 0; }
.acc-tbl input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; vertical-align: middle; }
.acc-tbl tbody tr.row-sel { background: var(--brand-soft); }
.acc-tbl tbody tr.row-sel:hover { background: #F8E4DF; }
.batch-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 14px; margin-bottom: 10px; border-radius: 9px;
  background: var(--brand-soft); border: 1px solid #F1D9D3; font-size: 12.5px; color: var(--brand-dark);
}
.batch-bar .cnt { font-weight: 600; }
.batch-bar .sp { flex: 1; }

/* ---------- 4. 组织架构树 ---------- */
.dept-row {
  display: flex; align-items: center; gap: 9px; padding: 8px 12px; border-radius: 8px;
  border: 1px solid transparent; transition: .14s;
}
.dept-row:hover { background: var(--surface-2); border-color: var(--border); }
.dept-row .dept-ico {
  width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  background: var(--surface-3); color: var(--text-2); font-size: 12px; flex: none;
}
.dept-row.lv1 .dept-ico { background: var(--brand-soft); color: var(--brand); }
.dept-row .dept-nm { font-size: 13.5px; font-weight: 500; }
.dept-row .dept-meta { font-size: 11.5px; color: var(--text-3); }
.dept-row .dept-ops { margin-left: auto; display: flex; gap: 5px; opacity: 0; transition: .14s; }
.dept-row:hover .dept-ops { opacity: 1; }
.dept-tree-line { border-left: 1px dashed var(--border-2); margin-left: 24px; padding-left: 8px; }

/* ---------- 5. 入口导航 ---------- */
.nav-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 10px;
  border: 1px solid var(--border); border-radius: 11px; background: var(--surface);
  transition: .15s;
}
.nav-card:hover { border-color: var(--brand-2); box-shadow: 0 2px 12px rgba(176, 90, 84, .08); }
.nav-ico {
  width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand-soft), #F6E6E2); color: var(--brand); font-size: 15px;
}
.nav-main { flex: 1; min-width: 0; }
.nav-t { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.nav-d { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.nav-u {
  font-size: 11.5px; color: var(--info); margin-top: 4px; word-break: break-all;
  background: var(--info-soft); padding: 3px 7px; border-radius: 5px; display: inline-block; max-width: 100%;
}
.nav-store-tip {
  font-size: 12px; color: var(--text-2); background: var(--surface-2); border: 1px dashed var(--border-2);
  border-radius: 8px; padding: 9px 12px; margin-bottom: 10px; line-height: 1.7;
}
.nav-sub {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: -4px 0 12px 46px; font-size: 11.5px; color: var(--text-3);
}
.nav-sub .mono { color: var(--info); }
.nav-qr { display: inline-flex; padding: 3px; background: #fff; border: 1px solid var(--border); border-radius: 6px; }
.nav-qr svg { width: 42px; height: 42px; display: block; }

/* ---------- 6. 客户运营：阶段流转 ---------- */
.stage-flow { display: flex; align-items: center; gap: 0; flex-wrap: wrap; padding: 4px 0; }
.stage-node { display: flex; align-items: center; gap: 6px; }
.stage-node .dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3);
  border: 2px solid var(--border-2); flex: none; transition: .2s;
}
.stage-node .txt { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.stage-node.done .dot { background: var(--ok); border-color: var(--ok); }
.stage-node.done .txt { color: var(--text-2); }
.stage-node.on .dot { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.stage-node.on .txt { color: var(--brand); font-weight: 600; }
.stage-line { flex: 1; min-width: 18px; height: 2px; background: var(--border); margin: 0 7px; }
.stage-line.done { background: var(--ok); }

/* ---------- 7. 客户详情时间线 ---------- */
.timeline { position: relative; padding-left: 4px; }
.tl-item { display: flex; gap: 11px; padding-bottom: 14px; position: relative; }
.tl-item:not(:last-child)::before {
  content: ''; position: absolute; left: 4.5px; top: 14px; bottom: 0; width: 1px; background: var(--border);
}
.tl-dot {
  width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--brand-2);
  flex: none; margin-top: 4px; position: relative; z-index: 1;
}
.tl-time { font-size: 11.5px; color: var(--text-3); }
.tl-txt { font-size: 12.5px; color: var(--text); margin-top: 1px; line-height: 1.65; }

/* ---------- 8. 单据流转记录 ---------- */
.flow-list { display: flex; flex-direction: column; gap: 0; }
.flow-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 0;
  border-bottom: 1px dashed var(--border); font-size: 12.5px;
}
.flow-row:last-child { border-bottom: 0; }
.flow-node {
  min-width: 74px; text-align: center; padding: 2px 8px; border-radius: 20px;
  background: var(--surface-3); color: var(--text-3); font-size: 11.5px;
}
.flow-node.done { background: var(--ok-soft); color: var(--ok); font-weight: 500; }
.flow-who { color: var(--text-2); min-width: 60px; }
.flow-time { margin-left: auto; color: var(--text-3); font-size: 11.5px; }

/* ---------- 9. 多行货品录入（要货 / 活动出库） ---------- */
.req-line { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.req-line .select { flex: 1; min-width: 0; }
.req-line .input { width: 86px; flex: none; }
.req-line .del { flex: none; }
.it-qty { font-weight: 600; }
.it-amt { font-weight: 600; color: var(--brand); }

/* ---------- 10. 目标拆解表单 ---------- */
.sp-w { font-weight: 600; }
.sp-pct { color: var(--text-3); font-size: 12px; }
.sp-d { text-align: center; }
.split-sum {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 10px; padding: 9px 12px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px;
}
.split-sum .ok { color: var(--ok); font-weight: 600; }
.split-sum .bad { color: var(--danger); font-weight: 600; }

/* ---------- 11. 移动端整体适配（G1：全模块可见可用） ---------- */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .24s cubic-bezier(.4, 0, .2, 1); }
  body.nav-open .sidebar { transform: translateX(0); box-shadow: 0 0 48px rgba(20, 12, 10, .45); }
  body.nav-open .sb-mask { display: block; position: fixed; inset: 0; background: rgba(30, 22, 20, .46); z-index: 29; }
  .main { margin-left: 0; }
  .menu-btn {
    display: grid; place-items: center; width: 34px; height: 34px; flex: none;
    border: 1px solid var(--border); background: var(--surface); border-radius: 9px;
    font-size: 16px; line-height: 1; cursor: pointer; color: var(--text-2);
  }
  .topbar { padding: 0 14px; gap: 10px; }
  .tb-sub { display: none; }
  .tb-right .tb-chip { display: none; }
  .page { padding: 14px 12px 34px; }
  .kpi-row { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .kpi-row-cost { margin-top: 10px; }
  .stat-card { padding: 12px; }
  .stat-card .vl { font-size: 18px; }
  .card-hd { padding: 12px 14px; }
  .card-bd { padding: 14px; }
  .card-bd.tight { padding: 6px 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .g2, .g3, .g4, .g-2-1, .g-1-2 { grid-template-columns: 1fr !important; }
  .modal { width: calc(100vw - 22px) !important; max-height: 88vh; }
  .modal-bd { max-height: 68vh; overflow: auto; }
  .tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .pill-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .pill-tabs button { white-space: nowrap; }
  .nav-card { flex-wrap: wrap; }
  .nav-card .btn { flex: none; }
  .nav-sub { margin-left: 0; }
  .stage-flow { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; }
  .dept-row .dept-ops { opacity: 1; }
  .page-actions, .toolbar { flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .kpi-row { grid-template-columns: 1fr !important; }
  .tb-title { font-size: 14px; }
  .user-menu .rl { display: none; }
  .req-line { flex-wrap: wrap; }
  .req-line .input { width: 72px; }
  .batch-bar { font-size: 12px; }
  .nav-u { font-size: 11px; }
}

/* ============================================================
   12. V3 · 客户影像档案（体验卡用户 / 跟进客户 / 待成交客户）
   ============================================================ */
.sec-img .card-hd { align-items: center; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
.ph-card {
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: var(--surface); transition: box-shadow .18s, transform .18s;
}
.ph-card:hover { box-shadow: 0 6px 20px rgba(80, 45, 40, .10); }
.ph-img {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  background:
    radial-gradient(120% 90% at 30% 18%, rgba(255, 255, 255, .55), transparent 60%),
    linear-gradient(150deg, var(--tone, #D9C3B8) 0%, #F3EAE4 62%, #FBF7F4 100%);
  display: grid; place-items: center;
}
.ph-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-badge {
  position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 600; letter-spacing: .2px;
  background: rgba(255, 255, 255, .92); color: var(--text-2);
  box-shadow: 0 1px 4px rgba(60, 30, 26, .14);
}
.ph-badge.ph-before { color: #35618C; }
.ph-badge.ph-mid { color: #B0661F; }
.ph-badge.ph-after { color: #1F7A50; }
.ph-ops { position: absolute; right: 6px; top: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .16s; }
.ph-card:hover .ph-ops { opacity: 1; }
.ph-op {
  border: 0; border-radius: 7px; padding: 3px 8px; font-size: 11px; cursor: pointer;
  background: rgba(255, 255, 255, .94); color: var(--text-2); box-shadow: 0 1px 4px rgba(60, 30, 26, .16);
}
.ph-op:hover { background: #fff; color: var(--brand); }
.ph-body { padding: 9px 10px 11px; }
.ph-time { font-size: 11px; color: var(--text-3); letter-spacing: .2px; }
.ph-desc {
  font-size: 12.5px; color: var(--text); line-height: 1.55; margin: 3px 0 5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ph-by { font-size: 11px; color: var(--text-3); }

/* 时间轴 */
.ph-timeline { position: relative; }
.ph-tl-row { display: grid; grid-template-columns: 52px 20px 1fr; gap: 10px; align-items: start; }
.ph-tl-row + .ph-tl-row { margin-top: 12px; }
.ph-tl-date { text-align: right; padding-top: 4px; }
.ph-tl-date b { display: block; font-size: 13px; color: var(--text); letter-spacing: .3px; }
.ph-tl-date span { font-size: 10.5px; color: var(--text-3); }
.ph-tl-line { position: relative; align-self: stretch; display: flex; justify-content: center; }
.ph-tl-line::before {
  content: ""; position: absolute; top: 12px; bottom: -14px; width: 1.5px;
  background: linear-gradient(180deg, var(--border-2), var(--border));
}
.ph-tl-row:last-child .ph-tl-line::before { display: none; }
.ph-dot {
  position: relative; z-index: 1; width: 10px; height: 10px; border-radius: 50%; margin-top: 8px;
  border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-2);
  background: var(--text-3);
}
.ph-dot.ph-before { background: #6E93B8; }
.ph-dot.ph-mid { background: #D9A05B; }
.ph-dot.ph-after { background: #4CA57C; }
.ph-tl-row .ph-card { max-width: 300px; }

/* 前后对比滑块 */
.cmp { max-width: 460px; }
.cmp-stage {
  position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-3);
}
.cmp-layer { position: absolute; inset: 0; }
.cmp-layer .ph-img { height: 100%; border-radius: 0; }
.cmp-handle {
  position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px;
  background: #fff; box-shadow: 0 0 8px rgba(40, 20, 18, .35); pointer-events: none;
}
.cmp-handle::after {
  content: "⇄"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--text-2);
  display: grid; place-items: center; font-size: 13px; box-shadow: 0 2px 10px rgba(40, 20, 18, .28);
}
.cmp-range { width: 100%; margin: 10px 0 6px; accent-color: var(--brand); height: 18px; }
.cmp-meta { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-3); }

/* ============================================================
   13. V3 · 客户画像四宫格
   ============================================================ */
.pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pf-block { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.pf-t {
  font-size: 11.5px; font-weight: 600; color: var(--text-2); letter-spacing: .3px;
  padding-left: 8px; position: relative; margin-bottom: 6px;
}
.pf-t::before {
  content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 2.5px;
  border-radius: 2px; background: var(--brand-2);
}
.pf-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-size: 12.5px; padding: 3.5px 0; border-bottom: 1px dashed rgba(0, 0, 0, .05);
}
.pf-row:last-child { border-bottom: 0; }
.pf-k { color: var(--text-3); flex: none; }
.pf-v { color: var(--text); font-weight: 500; text-align: right; }
.pf-score { display: flex; align-items: center; gap: 12px; margin: 2px 0 10px; }
.pf-score > div:first-child { display: flex; align-items: baseline; gap: 6px; flex: none; }
.pf-score b { font-size: 28px; line-height: 1; color: var(--brand); letter-spacing: -.5px; }
.pf-score span { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.pf-score .prog { width: 100%; height: 20px; border-radius: 10px; }
.pf-score .prog-bar { border-radius: 10px; }
.pf-score .prog-txt { line-height: 20px; font-size: 11px; }
/* 进度条（真·条状）——供 mod-sales 目标完成度使用 */
.pf-line { height: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.pf-line i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--brand-2), var(--brand)); }
/* 文字建议行（推荐项目 / 跟进建议） */
.pf-note {
  font-size: 12.5px; line-height: 1.72; color: #7C3B36;
  padding-top: 7px; margin-top: 7px; border-top: 1px dashed rgba(160, 90, 84, .22);
  word-break: break-word;
}
.pf-score + .pf-note { margin-top: 0; padding-top: 0; border-top: 0; }
.pf-note b { color: #6E2F2A; font-weight: 600; }
.pf-advice {
  margin-top: 10px; padding: 9px 11px; border-radius: 9px; font-size: 12.5px; line-height: 1.7;
  background: var(--brand-soft); color: #8A3E39; border: 1px solid #F2DCD7;
}
.masked {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  background: var(--surface-3); border-radius: 4px; padding: 0 4px; letter-spacing: .6px;
  color: var(--text-2); font-size: 12px;
}

/* ============================================================
   14. V3 · 跟进反馈 / 筛选条 / 提示 / 空态
   ============================================================ */
.fb-quote {
  background: var(--surface-2); border-left: 3px solid var(--brand-2);
  border-radius: 0 9px 9px 0; padding: 9px 12px;
}
.fb-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-3); margin-bottom: 4px; }
.fb-txt { font-size: 12.5px; color: var(--text); line-height: 1.72; }
.filter-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 12px; margin-bottom: 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
}
.filter-bar .input, .filter-bar .select { height: 32px; width: auto; min-width: 112px; font-size: 12.5px; }
.filter-bar label { font-size: 12px; color: var(--text-3); }
.filter-cnt { margin-left: auto; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.empty-soft {
  padding: 26px 16px; text-align: center; font-size: 12.5px; line-height: 1.8; color: var(--text-3);
  border: 1px dashed var(--border-2); border-radius: 12px; background: var(--surface-2);
}
.alert-strip {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 9px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.65;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2);
}
.alert-strip b { font-weight: 600; }
.alert-strip.alert-warn { background: #FDF4E8; border-color: #F2DFC4; color: #8A5A1D; }
.alert-strip.alert-info { background: #EEF4FA; border-color: #D8E5F2; color: #2F5F8A; }
.mini-list { display: flex; flex-direction: column; gap: 6px; }
.mini-row {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px;
  padding: 7px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border);
}
.mini-row .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-2); flex: none; }
.mini-row .nm { font-weight: 500; }
.mini-row .sp { margin-left: auto; color: var(--text-3); font-size: 11.5px; }
.role-tip {
  margin-bottom: 12px; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.75;
  background: var(--brand-soft); border: 1px solid #F2DCD7; color: #8A3E39;
}
.btn-danger-ghost {
  border: 1px solid #E4B9B4; background: transparent; color: var(--danger);
}
.btn-danger-ghost:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.pill-sm button { padding: 4px 10px; font-size: 12px; }
.link { color: var(--info); cursor: pointer; background: none; border: 0; padding: 0; font: inherit; }
.link:hover { text-decoration: underline; }
.upload-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.upload-preview {
  margin-top: 8px; min-height: 66px; padding: 8px; border-radius: 9px;
  border: 1px dashed var(--border-2); background: var(--surface-2);
  display: grid; place-items: center; font-size: 12px; color: var(--text-3);
}
.upload-preview img { max-height: 168px; max-width: 100%; border-radius: 7px; display: block; }

/* ============================================================
   V4.3 §13.4 · 影像上传缩略图轴 / 分阶段分组 / 大图预览
   PC 与手机端 H5 共用（H5 另有触控尺寸覆盖）
   ============================================================ */
.thumb-strips { display: grid; gap: 10px; }
.thumb-group { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px 10px; background: var(--surface-2); }
.thumb-group.is-empty { opacity: .6; }
.thumb-group-hd { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.thumb-group-hd b { font-weight: 600; color: var(--text); }
.thumb-group-hd span { color: var(--text-3); }
.thumb-strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x proximity; }
.thumb-strip::-webkit-scrollbar { height: 6px; }
.thumb-item {
  flex: 0 0 134px; scroll-snap-align: start; position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 6px;
}
.thumb-box {
  position: relative; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden;
  background: var(--surface-3); display: grid; place-items: center; cursor: zoom-in;
}
.thumb-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-ph { font-size: 11px; color: var(--text-3); }
.thumb-mask { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.84); font-size: 11px; color: var(--text-2); }
.thumb-mask.is-fail { background: rgba(176,58,48,.88); color: #fff; padding: 4px; text-align: center; }
.thumb-item.is-reading .thumb-box::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 40%;
  background: var(--brand); animation: thumb-prog 1s linear infinite;
}
@keyframes thumb-prog { from { left: -40%; } to { left: 100%; } }
.thumb-time { font-size: 10.5px; color: var(--text-3); margin-top: 5px; }
.thumb-desc, .thumb-sel {
  width: 100%; margin-top: 4px; font-size: 11px; padding: 4px 5px;
  border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--text);
}
.thumb-desc-txt { font-size: 11px; color: var(--text-2); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb-ft { display: flex; gap: 4px; margin-top: 5px; }
.thumb-btn {
  flex: 1; min-height: 28px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface-2); color: var(--text-2); font-size: 11px; cursor: pointer;
}
.thumb-btn:hover { color: var(--brand); border-color: var(--brand); }
.thumb-del:hover { color: #b23b30; border-color: #b23b30; }
.thumb-empty { font-size: 11px; color: var(--text-3); padding: 10px 4px; }
.iu-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px; border: 1px dashed var(--border-2); border-radius: 9px; background: var(--surface-2);
}
.iu-count { font-size: 12px; font-weight: 600; color: var(--brand-dark); }
.iu-limit { font-size: 11px; color: var(--text-3); }
.iu-common { margin-top: 12px; }
.iu-uploader-strip { margin-top: 12px; }
.iu-tip { font-size: 11px; color: var(--text-3); margin-top: 8px; line-height: 1.6; }
.img-viewer .iv-stage { background: #241d1c; border-radius: 10px; height: min(56vh, 460px); overflow: hidden; display: grid; place-items: center; }
.img-viewer .iv-stage img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .15s; }
.iv-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.iv-sp { flex: 1; }
.iv-count { font-size: 12px; color: var(--text-2); min-width: 56px; text-align: center; }
.iv-meta { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }

/* 角色管理卡片补充 */
.role-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-3); margin-top: 6px; }
.role-meta b { color: var(--text-2); font-weight: 600; }

@media (max-width: 900px) {
  .ph-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .pf-grid { grid-template-columns: 1fr; }
  .ph-tl-row { grid-template-columns: 44px 16px 1fr; gap: 8px; }
  .ph-tl-row .ph-card { max-width: 100%; }
  .ph-desc { -webkit-line-clamp: 1; }
  .cmp { max-width: 100%; }
  .thumb-item { flex-basis: 142px; }
  .thumb-btn { min-height: 44px; font-size: 12px; }
  .iu-bar .btn, .iv-bar .btn { min-height: 44px; }
  .img-viewer .iv-stage { height: 52vh; }
  .filter-bar .input, .filter-bar .select { min-width: 0; flex: 1 1 120px; }
  .filter-cnt { margin-left: 0; width: 100%; }
}

/* ============================================================
   15. V3 · 数据看板视觉升级（高级 · 清爽）
   —— 大面积留白、低饱和、统一圆角、细分割线、弱化阴影与渐变
   ============================================================ */
.dash { display: flex; flex-direction: column; gap: 18px; }
.dash .kpi-row { gap: 16px; }
.dash .kpi-row-main { grid-template-columns: repeat(4, 1fr); }
.dash .kpi-row-sub { grid-template-columns: repeat(4, 1fr); gap: 12px; }
.dash .kpi-row-sub .stat-card {
  background: var(--surface-2); border-style: dashed; box-shadow: none; padding: 13px 15px;
}
.dash .kpi-row-sub .stat-card .lb { font-size: 11.5px; }
.dash .kpi-row-sub .stat-card .vl { font-size: 19px; color: var(--text-2); }
.dash .kpi-row-sub .stat-card .ex { font-size: 11px; }

.dash .stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 18px 18px 16px;
  box-shadow: 0 1px 2px rgba(70, 45, 40, .028);
  transition: box-shadow .2s, transform .2s;
}
.dash .stat-card:hover { box-shadow: 0 4px 18px rgba(70, 45, 40, .06); transform: translateY(-1px); }
.dash .stat-card .lb { font-size: 12px; color: var(--text-3); letter-spacing: .3px; font-weight: 500; }
.dash .stat-card .vl {
  font-size: 27px; font-weight: 600; letter-spacing: -.6px; line-height: 1.25;
  color: var(--text); margin: 7px 0 5px; font-variant-numeric: tabular-nums;
}
.dash .stat-card .ex { font-size: 11.5px; color: var(--text-3); line-height: 1.5; }

.dash .card {
  border: 1px solid var(--border); border-radius: 16px; background: var(--surface);
  box-shadow: 0 1px 2px rgba(70, 45, 40, .028);
}
.dash .card-hd { padding: 15px 18px; border-bottom: 1px solid var(--border); }
.dash .card-hd h3 { font-size: 14px; font-weight: 600; letter-spacing: .2px; color: var(--text); }
.dash .card-hd .legend-soft { font-size: 11.5px; color: var(--text-3); }
.dash .card-bd { padding: 16px 18px; }
.dash .card-bd.tight { padding: 6px 10px; }
.dash .grid { gap: 16px; }

/* 图表去装饰：细网格、弱轴线 */
.dash svg text { font-size: 10px; fill: #A29690; }
.dash .chart-legend { font-size: 11.5px; color: var(--text-3); gap: 16px; margin-top: 6px; }
.dash .cost-note { font-size: 11.5px; color: var(--text-3); margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.dash .alert-item { padding: 10px 8px; border-bottom: 1px solid #F5F1ED; }
.dash .alert-item:last-child { border-bottom: 0; }
.dash .rank-row { padding: 10px 4px; border-bottom: 1px solid #F5F1ED; }
.dash .rank-row:last-child { border-bottom: 0; }
.dash .tbl th { background: transparent; border-bottom: 1px solid var(--border); font-weight: 500; }
.dash .tbl td { border-bottom: 1px solid #F5F1ED; }

@media (max-width: 1100px) {
  .dash .kpi-row-main, .dash .kpi-row-sub { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .dash { gap: 14px; }
  .dash .kpi-row, .dash .kpi-row-main, .dash .kpi-row-sub {
    grid-template-columns: repeat(2, 1fr) !important; gap: 10px;
  }
  .dash .stat-card { padding: 13px 13px 12px; border-radius: 13px; }
  .dash .stat-card .vl { font-size: 21px; margin: 5px 0 4px; }
  .dash .stat-card .ex { font-size: 10.5px; }
  .dash .card-hd { padding: 12px 14px; }
  .dash .card-bd { padding: 13px 14px; }
  .dash .card { border-radius: 13px; }
}
@media (max-width: 420px) {
  .dash .stat-card .vl { font-size: 19px; }
}

/* =============================================================
 * 16. 多选与数据清零（V3 提示词 10）
 * ============================================================= */
.sel-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px; margin: 0 0 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; font-size: 12.5px; color: var(--text-2);
}
.sel-bar .sel-cnt b { color: var(--brand); font-weight: 600; font-size: 13.5px; }
.sel-bar .sel-lb { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.sel-bar .btn { white-space: nowrap; }
.sel-cb, .sel-bar input[type="checkbox"], th input[data-sel-all] { width: 14px; height: 14px; accent-color: var(--brand); cursor: pointer; }
.tbl th .sel-cb, .tbl td .sel-cb { margin: 0; }
.ck-row {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--text-2); margin: 10px 0 2px; cursor: pointer;
}
.ck-row input { width: 14px; height: 14px; accent-color: var(--brand); }
.pg-sum {
  padding: 10px 12px; border-radius: 10px; background: var(--brand-soft);
  font-size: 13px; color: var(--text-2);
}
.pg-sum b { font-size: 19px; color: var(--danger); font-weight: 600; margin: 0 3px; }
.alert-strip.alert-danger { background: var(--danger-soft); border-color: #EBC5C1; color: #8E3B34; }
.rs-scope { font-size: 12px; color: var(--text-3); }
@media (max-width: 900px) {
  .sel-bar { gap: 8px; padding: 8px 10px; font-size: 12px; }
  .sel-bar .btn { padding: 2px 7px; font-size: 11.5px; }
}

/* 知识库文档多选 */
.doc-sel { display: flex; align-items: center; padding-right: 4px; }
.doc-sel input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
@media (max-width: 700px) {
  .doc-sel { padding-right: 2px; }
}

/* =============================================================
 * 17. V4 · 活动管理 / 目标对象 / 服务门店 / 通用辅助
 * ============================================================= */
.desc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 18px; }
.desc-grid > div { display: flex; align-items: baseline; gap: 8px; font-size: 13px; padding: 5px 0; border-bottom: 1px dashed rgba(0,0,0,.05); }
.desc-grid span { color: var(--text-3); flex: none; min-width: 62px; font-size: 12px; }
.desc-grid b { color: var(--text); font-weight: 600; }
.ok { color: var(--ok); font-weight: 600; }
.kv-line { display: flex; gap: 6px; font-size: 12.5px; padding: 3px 0; }
.kv-line .k { color: var(--text-3); flex: none; min-width: 72px; }
.kv-line .v { color: var(--text); }
@media (max-width: 700px) { .desc-grid { grid-template-columns: 1fr; } }
/* 服务门店详情：双列卡片，窄屏单列 */
@media (max-width: 900px) { .svc-2col { grid-template-columns: 1fr !important; } }

/* 活动归还登记：照片缩略图与表单密度 */
.ret-photos { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.ret-ph {
  display: inline-flex; flex-direction: column; align-items: center; gap: 3px;
  width: 54px; cursor: pointer; position: relative;
}
.ret-ph img, .ret-ph i {
  width: 54px; height: 54px; border-radius: 8px; object-fit: cover; display: block;
  border: 1px solid var(--border); background: #EDE4DC; font-style: normal;
}
.ret-ph b {
  font-size: 10px; font-weight: 500; color: var(--text-3); line-height: 1.2;
  max-width: 54px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ret-ph:hover b { color: var(--danger); }
.ret-tbl td { vertical-align: top; }
.ret-tbl .input { padding: 4px 6px; font-size: 12.5px; }
@media (max-width: 900px) {
  .ret-tbl { font-size: 12px; }
  .ret-tbl .input { width: 64px !important; }
}

/* 看板区块化（V4 提示词 6）与下钻交互 */
.dash-block { margin-bottom: 16px; }
.dash-block:last-child { margin-bottom: 0; }
.blk-hd {
  display: flex; align-items: center; gap: 10px;
  margin: 2px 0 9px; font-size: 12.5px; color: var(--text-3); letter-spacing: .02em;
}
.blk-hd span { font-weight: 600; color: var(--text-2); }
.blk-hd .blk-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), rgba(0,0,0,0)); }
.drill, .drill-item, .drill-link, .drill-wrap, .drillable { cursor: pointer; }
.stat-card.drill { transition: box-shadow .16s ease, transform .16s ease; }
.stat-card.drill:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-1px); }
.drill-arrow { float: right; color: var(--text-3); font-size: 15px; line-height: 1; }
.drill-link { color: var(--brand); }
.drill-link:hover { text-decoration: underline; }
.drill-item { transition: background .14s ease; }
.drill-item:hover { background: var(--brand-soft); }
.drill-bar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
  padding: 8px 12px; border-radius: 10px; background: var(--brand-soft);
  font-size: 12.5px; color: var(--text-2);
}
.drill-bar .db-crumb { color: var(--text); font-weight: 600; }
.drill-bar .db-crumb i { font-style: normal; color: var(--text-3); margin: 0 4px; }
.drill-bar .db-cond { color: var(--text-3); }
@media (max-width: 700px) {
  .drill-bar { flex-wrap: wrap; gap: 6px; }
  .drill-bar .db-cond { width: 100%; }
}

/* ============ V5：货品多选勾选器（要货单 / 活动出库 / 赠品申请） ============ */
.gp-box { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.gp-search { margin: 10px; width: calc(100% - 20px); }
.gp-list {
  max-height: 264px; overflow-y: auto;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.gp-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}
.gp-row:last-child { border-bottom: none; }
.gp-row:hover { background: var(--brand-soft); }
.gp-check { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; cursor: pointer; }
.gp-check b { font-weight: 600; }
.gp-check .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-stock { flex: none; width: 78px; text-align: right; font-size: 12px; }
.gp-qty { flex: none; width: 92px; }
.gp-box .form-hint { padding: 8px 12px; }
@media (max-width: 700px) {
  .gp-check .muted { display: none; }
  .gp-stock { display: none; }
}

/* ============ V4.3 · P11 单据纠错与系统初始化（PC / H5 共用） ============ */
.btn-warn { background: #FFF4E3; color: #B26A16; border: 1px solid #F0D6AE; }
.btn-warn:hover { background: #FFE9C9; }
.doc-panel { font-size: 13px; }
.doc-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.doc-head b { font-size: 14px; }
.doc-head .muted { margin-top: 4px; font-size: 12px; }
.doc-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.doc-logs { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 6px; }
.doc-logs .cap { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.doc-log { padding: 7px 10px; border-radius: 7px; background: var(--bg-soft, #FAF7F5); margin-bottom: 6px; line-height: 1.7; font-size: 12px; }
.doc-log .muted { margin-left: 16px; }
.doc-totals {
  display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center;
  padding: 10px 14px; border-radius: 9px; background: var(--brand-soft);
  font-size: 12.5px; color: var(--text-2);
}
.doc-totals b { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--text-1); font-size: 13px; }
.init-state { padding: 10px 12px; border-radius: 8px; background: var(--brand-soft); font-size: 12.5px; line-height: 1.8; }
.init-wizard h4 { margin: 10px 0 8px; font-size: 15px; }
.init-wizard .form-hint { line-height: 1.9; font-size: 12.5px; }
.init-wizard .doc-acts { margin-bottom: 0; }
@media (max-width: 700px) {
  .doc-acts { gap: 6px; }
  .doc-acts .btn { min-height: 40px; padding: 8px 12px; font-size: 12.5px; }
  .doc-totals { gap: 6px 12px; padding: 10px; }
  .doc-totals span { flex: 1 1 44%; }
  .doc-panel .tbl-wrap { max-width: 100%; }
  .init-wizard .input, .init-wizard .select { min-height: 44px; }
}
body.h5a .doc-acts .btn { min-height: 44px; }
body.h5a .init-wizard .input { min-height: 44px; }

/* ===== V4.3 P12｜产品客服跟踪：多选面板 / 产品子表 / 使用时间线 ===== */
.pt-filter { flex-wrap: wrap; gap: 8px; align-items: center; }
.pt-filter .input[type="date"] { min-width: 140px; }
.pt-form .form-grid { gap: 10px 14px; }
.pt-items-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
#ptItems .input, #ptItems .select { min-height: 32px; padding: 5px 8px; font-size: 12.5px; width: 100%; }
#ptItems td { vertical-align: middle; }
.pck { border: 1px solid var(--border); border-radius: 10px; padding: 10px; background: var(--surface-2, #fff); }
.pck-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pck-top .input { flex: 1 1 200px; min-width: 150px; }
.pck-top .select { flex: 0 1 150px; }
.pck-cnt { font-size: 12.5px; color: var(--brand); font-weight: 600; white-space: nowrap; }
.pck-tags { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; margin: 10px 0; }
.pck-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); font-size: 12px; }
.pck-tag button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; }
.pck-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; max-height: 230px; overflow-y: auto; padding-right: 4px; }
.pck-item { display: flex; align-items: center; gap: 7px; min-height: 40px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 7px; cursor: pointer; font-size: 12.5px; }
.pck-item:hover { border-color: var(--brand); }
.pck-item input { accent-color: var(--brand); flex: none; }
.pck-nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pck-ct { color: var(--text-3); font-size: 11px; white-space: nowrap; }
.pck-empty { grid-column: 1 / -1; padding: 16px; text-align: center; color: var(--text-3); font-size: 12.5px; }
.pt-mobile-pick { display: flex; flex-direction: column; gap: 8px; }
.pt-mobile-pick .btn { min-height: 44px; }
.pt-photo-box { display: flex; align-items: center; gap: 8px; min-height: 34px; flex-wrap: wrap; }
.pt-stars { color: #E8A33D; letter-spacing: 1px; white-space: nowrap; }
.pt-tl-row { margin: 4px 0 8px; font-size: 12.5px; }
.pt-tl-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; margin-top: 4px; }
/* 手机端：产品多选改为底部弹层 */
.modal-mask.modal-sheet { align-items: flex-end; padding: 0; }
.modal-mask.modal-sheet .modal { width: 100%; max-width: 100% !important; max-height: 82vh; border-radius: 16px 16px 0 0; }
.modal-mask.modal-sheet .modal-bd { max-height: 70vh; overflow-y: auto; }
@media (max-width: 700px) {
  .pck-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 200px; }
  .pt-filter .btn { min-height: 40px; }
  #ptItems { min-width: 560px; }
}
body.h5a .pck-list { grid-template-columns: 1fr; max-height: 46vh; }
body.h5a .pck-item { min-height: 44px; font-size: 13px; }
body.h5a .pck-top .input, body.h5a .pck-top .select { min-height: 44px; flex: 1 1 100%; }
body.h5a .pck-top .btn, body.h5a .pt-items-bar .btn, body.h5a .pt-filter .btn { min-height: 44px; }
body.h5a #ptItems .input, body.h5a #ptItems .select { min-height: 40px; }
body.h5a .modal-mask.modal-sheet .modal-bd { padding-bottom: 14px; }
body.h5a .pt-filter .input, body.h5a .pt-filter .select { min-height: 40px; }

/* ==================== V4.3 P13｜区域门店 + 全门店总览 ==================== */
.rg-dist-hd { font-size: 12px; font-weight: 600; color: var(--text-3); letter-spacing: .4px; margin: 2px 0 10px; }
.rg-main { min-width: 0; }
.rg-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rg-filter .select, .rg-filter .input { flex: 1 1 128px; min-width: 116px; max-width: 210px; }
.rg-filter .btn { white-space: nowrap; }
.rg-group-hd { display: flex; align-items: center; gap: 8px; padding: 10px 12px 4px; font-size: 12.5px; color: var(--text-2); background: var(--bg-soft); }
.rg-group-hd b { color: var(--brand); }
.rg-dist { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.rg-dist-chip { padding: 5px 10px; border: 1px solid var(--border); border-radius: 16px; background: #fff; color: var(--text-2); font-size: 12px; cursor: pointer; }
.rg-dist-chip:hover { border-color: var(--brand); color: var(--brand); }
.rg-dist-chip b { color: var(--brand); }
.rg-fold { border: 0; background: transparent; color: var(--brand); font-size: 14px; cursor: pointer; padding: 0 4px; }
.rg-store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.rg-store-card { border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.rg-store-card:hover { border-color: var(--brand); box-shadow: 0 3px 12px rgba(180, 120, 100, .10); }
.rg-sc-hd { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 13.5px; }
.rg-sc-sub { margin: 5px 0 9px; color: var(--text-3); font-size: 11.5px; line-height: 1.5; }
.rg-sc-kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 8px; font-size: 11.5px; color: var(--text-3); }
.rg-sc-kpi b { color: var(--text-1); font-size: 12px; }
.rg-sc-ft { margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--border); color: var(--text-3); font-size: 11px; line-height: 1.5; }
.rg-detail .rg-kv-box { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.rg-kv { display: flex; justify-content: space-between; gap: 10px; padding: 7px 2px; border-bottom: 1px dashed var(--border); font-size: 12.5px; }
.rg-kv > span { color: var(--text-3); flex: none; }
.rg-kv > b { font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.rg-detail .kpi-row { margin: 14px 0 0; }
.rg-follow { font-size: 12.5px; line-height: 1.7; }
@media (max-width: 900px) {
  .rg-filter .select, .rg-filter .input { flex: 1 1 45%; max-width: none; }
  .rg-store-grid { grid-template-columns: 1fr; }
  .rg-detail .rg-kv-box { grid-template-columns: 1fr; }
}
body.h5a .rg-filter .select, body.h5a .rg-filter .input { min-height: 44px; flex: 1 1 100%; max-width: none; }
body.h5a .rg-filter .btn { min-height: 44px; flex: 1 1 44%; }
body.h5a .rg-store-grid { grid-template-columns: 1fr; }
body.h5a .rg-store-card { padding: 13px; }
body.h5a .rg-dist-chip { min-height: 36px; }
body.h5a .rg-fold { min-height: 44px; min-width: 44px; }
body.h5a .rg-detail .rg-kv-box { grid-template-columns: 1fr; }
body.h5a .rg-detail .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ============================================================
 * V4.3 P14 · 门店只读视角 / 四级账号树 / 门店端单据纠错
 * PC 与 H5 共用；手机端触控目标 ≥ 44px
 * ============================================================ */
.viewas-bar { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; padding: 9px 14px; margin: 0 0 14px; border: 1px solid var(--border-2);
  border-radius: 10px; background: linear-gradient(96deg, #FFF6E8, #FDEFE7); box-shadow: var(--shadow); }
.viewas-bar .va-ico { width: 26px; height: 26px; border-radius: 7px; background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px; flex: none; }
.viewas-bar .va-txt { font-size: 13px; color: var(--text); }
.viewas-bar .va-txt b { color: var(--brand-dark); }
.viewas-bar .va-sp { flex: 1; min-width: 8px; }
.viewas-bar .va-sel { min-width: 150px; max-width: 220px; }
.viewas-bar .btn { flex: none; }
.viewas-readonly [data-viewas-locked="1"] { opacity: .55; cursor: not-allowed !important; }
.viewas-hd { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 4px 0 12px; }
.viewas-hd h3 { margin: 0; font-size: 16px; }
.va-tabs { margin-bottom: 12px; flex-wrap: wrap; }
.viewas-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px;
  margin-bottom: 12px; border: 1px dashed var(--border-2); border-radius: 9px; background: var(--surface-2); }
.viewas-actions .btn { opacity: .55; }
.viewas-readonly .card-hd .legend-soft { color: var(--warn); }

/* 四级账号树（总部 → 区域 → 门店 → 员工） */
.org-tree { border: 1px solid var(--border); border-radius: 10px; background: #fff; overflow: hidden; }
.org-node { display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-bottom: 1px dashed var(--border); font-size: 13px; flex-wrap: wrap; }
.org-node:last-child { border-bottom: 0; }
.org-node .org-ind { width: 14px; color: var(--text-3); flex: none; }
.org-node .org-lv { flex: none; font-size: 11px; padding: 2px 8px; border-radius: 10px;
  background: var(--surface-3); color: var(--text-2); }
.org-node.lv1 > .org-lv { background: var(--hq-soft); color: var(--hq); }
.org-node.lv2 > .org-lv { background: var(--info-soft); color: var(--info); }
.org-node.lv3 > .org-lv { background: var(--brand-soft); color: var(--brand-dark); }
.org-node.lv4 > .org-lv { background: var(--ok-soft); color: var(--ok); }
.org-node .org-nm { font-weight: 600; }
.org-node .org-meta { color: var(--text-3); font-size: 11.5px; margin-left: auto; }
.org-node.lv1 { background: var(--surface-2); font-weight: 600; }

/* 门店端单据纠错面板 */
.sf-head { margin-bottom: 12px; }
.sf-head .desc-grid { margin-bottom: 8px; }
#sfWhyWrap { padding-top: 10px; border-top: 1px dashed var(--border); }

@media (max-width: 900px) {
  .viewas-bar { position: static; }
  .org-node .org-meta { margin-left: 0; flex-basis: 100%; }
}
body.h5a .viewas-bar .va-sel, body.h5a .viewas-bar .btn { min-height: 44px; }
body.h5a .viewas-bar .va-txt { flex: 1 1 100%; }
body.h5a .va-tabs .btn, body.h5a .va-tabs button { min-height: 44px; }
body.h5a .viewas-actions .btn { min-height: 44px; }
body.h5a .org-node { min-height: 44px; padding: 11px 12px; }
body.h5a .org-node .org-lv { font-size: 11.5px; padding: 3px 9px; }
body.h5a #sfWhy .textarea, body.h5a .sf-head .textarea { min-height: 44px; }

/* ============================================================
 * V4.3 P15：活动倒计时 / 节点看板
 * ============================================================ */
.ag-cd {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 12px;
  background: linear-gradient(120deg, #FBF1ED, #F6E9E4); border: 1px solid var(--border-2);
}
.ag-cd.ag-cd-sm { padding: 9px 12px; margin-bottom: 12px; }
.ag-cd-l { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; min-width: 0; }
.ag-cd-txt { font-size: 13.5px; color: var(--text-2); }
.ag-cd-time { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 25px;
  font-weight: 700; color: var(--brand-dark); letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.ag-cd[data-ag-locked="1"] { background: #F5F2F0; }
.ag-cd[data-ag-locked="1"] .ag-cd-time { color: var(--text-3); }
body.h5a .ag-cd { flex-wrap: wrap; padding: 12px; }
body.h5a .ag-cd-time { font-size: 27px; width: 100%; text-align: center; }
body.h5a .ag-cd-txt { font-size: 13px; }

/* ============================================================
 * V4.3 P16（§17.4）：手机端版面适配 375 / 390 / 414 / 430
 * 以手机宽度重排，不缩放 PC 页面；以下规则全部限定在 H5 壳层内
 * ============================================================ */
body.h5a { overflow-x: hidden; }
body.h5a #pageBody { max-width: 100%; box-sizing: border-box; padding-left: 12px; padding-right: 12px; padding-bottom: 78px; }
body.h5a .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
body.h5a .form-grid, body.h5a .grid.g-2-1, body.h5a .desc-grid { grid-template-columns: 1fr !important; }
body.h5a .filter-bar, body.h5a .row-between { flex-wrap: wrap; gap: 8px; }
body.h5a .filter-bar .select, body.h5a .filter-bar .input { flex: 1 1 100%; max-width: 100%; }
body.h5a .pill-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
body.h5a .pill-tabs button { white-space: nowrap; min-height: 44px; }
body.h5a .btn, body.h5a button.btn, body.h5a .input, body.h5a .select, body.h5a .textarea,
body.h5a .nav-item, body.h5a .h5a-tabbar .it, body.h5a .wh-tab { min-height: 44px; }
body.h5a .btn.btn-xs, body.h5a button.btn.btn-xs { min-height: 44px; padding: 8px 12px; }
body.h5a .h5a-tabbar .it { padding: 6px 0 calc(8px + env(safe-area-inset-bottom)); font-size: 11px; }
body.h5a .big-num, body.h5a .stat-card .vl { font-size: 22px; line-height: 1.3; }

/* 表格转卡片：页面级不出现横向滚动条 */
body.h5a .tbl-wrap { overflow: visible; }
body.h5a table.tbl.tbl-cards { display: block; width: 100%; }
body.h5a table.tbl.tbl-cards thead { display: none; }
body.h5a table.tbl.tbl-cards tbody { display: block; }
body.h5a table.tbl.tbl-cards tr {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; box-shadow: var(--shadow);
}
body.h5a table.tbl.tbl-cards td {
  display: flex; gap: 10px; border: 0; padding: 5px 0; min-height: 32px;
  align-items: flex-start; word-break: break-word;
}
body.h5a table.tbl.tbl-cards td::before {
  content: attr(data-label); flex: 0 0 34%; max-width: 34%;
  color: var(--text-3); font-size: 11.5px; line-height: 1.7;
}
body.h5a table.tbl.tbl-cards td.clamp-2 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
body.h5a table.tbl.tbl-cards td.clamp-2.open { -webkit-line-clamp: unset; overflow: visible; }

/* 弹窗底部抽屉 + 底部固定操作栏 */
body.h5a .modal-mask.modal-sheet .modal-ft {
  position: sticky; bottom: 0; display: flex; gap: 8px; background: var(--surface);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border); box-shadow: 0 -6px 20px rgba(40,28,24,.07);
}
body.h5a .modal-mask.modal-sheet .modal-ft .btn { flex: 1 1 0; min-height: 44px; }
body.h5a .modal-mask.modal-sheet .modal-bd { padding-bottom: 12px; }

/* 加载骨架屏 */
.h5-skeleton { padding: 8px 0; }
.sk-line, .sk-block {
  background: linear-gradient(90deg, #EFEAE6 25%, #F8F5F2 50%, #EFEAE6 75%);
  background-size: 200% 100%; animation: skShine 1.2s infinite linear; border-radius: 6px;
}
.sk-line { height: 14px; margin: 8px 0; }
.sk-block { height: 96px; margin: 12px 0; border-radius: 12px; }
.sk-line.w40 { width: 40%; } .sk-line.w55 { width: 55%; }
.sk-line.w60 { width: 60%; } .sk-line.w70 { width: 70%; }
@keyframes skShine { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* 线下出货单明细 / 凭证（手机端单列 + 44px 触控） */
body.h5a .os-item { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
body.h5a .os-item select[data-os-g] { grid-column: 1 / -1; }
.os-print { padding: 8px; }
.thumb-item img { width: 100%; height: 96px; object-fit: cover; border-radius: 8px; }
body.h5a #ofFile, body.h5a .thumb-item .btn { min-height: 44px; }
@media print {
  body > *:not(.os-print) { display: none !important; }
  .os-print { display: block !important; }
}
