/* 笑涵阁 SCRM · 后台样式。纯亮色主题：每个组件显式写颜色，不加深色媒体查询（见宪法第三章）。 */
:root {
  --bg: #f6f3ef; --surface: #ffffff; --surface-2: #faf8f5; --line: #e8e2da; --line-2: #f1ece6;
  --ink: #24201d; --ink-2: #5c554f; --ink-3: #847b73;
  --brand: #8a5a44; --brand-2: #6c4433; --brand-soft: #f4ece6; --brand-line: #e3d2c6;
  --good: #2c7a57; --good-soft: #e6f2ec; --warn: #9a6210; --warn-soft: #faf0df; --bad: #ad3f2c; --bad-soft: #f8e7e3;
  --info: #3f6596; --info-soft: #e8eef6;
  --c-taobao: #e07b39; --c-douyin: #34302d; --c-xhs: #d64d6c; --c-jd: #4a6fa5; --c-miniapp: #3e9b6e; --c-store: #8a5a44;
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(36, 32, 29, .04), 0 6px 18px rgba(36, 32, 29, .05);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px;
  line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); }
button, input, select, textarea { font-family: inherit; font-size: 14px; color: var(--ink); }
.num, td.num, .kpi .v { font-variant-numeric: tabular-nums; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* ---------- 外框 ---------- */
.shell { display: flex; min-height: 100vh; }
.side { width: 232px; flex: none; background: #fbf9f6; border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh;
  overflow-y: auto; display: flex; flex-direction: column; }
.brand { padding: 22px 22px 18px; border-bottom: 1px solid var(--line-2); }
.brand .w { font-family: var(--serif); font-size: 22px; letter-spacing: 4px; color: var(--ink); font-weight: 600; }
.brand .s { font-size: 11px; color: var(--ink-3); letter-spacing: 2px; margin-top: 2px; }
.nav { padding: 10px 12px 24px; flex: 1; }
.nav .g { font-size: 11px; color: var(--ink-3); letter-spacing: 1px; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--ink-2); font-size: 14px; }
.nav a:hover { background: #f2ede7; color: var(--ink); }
.nav a.on { background: var(--brand-soft); color: var(--brand-2); font-weight: 600; }
.nav a .badge { margin-left: auto; }
.side .me { padding: 14px 18px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 10px; }
.side .me .av { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-2); display: grid; place-items: center; font-weight: 600; }
.side .me .r { color: var(--ink-3); font-size: 12px; }
.side .me button { margin-left: auto; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-x: clip; }
.top { height: 60px; display: flex; align-items: center; gap: 14px; padding: 0 28px; background: rgba(246, 243, 239, .92);
  backdrop-filter: saturate(1.4) blur(8px); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line-2); }
.top h1 { font-size: 18px; margin: 0; font-weight: 600; letter-spacing: .5px; white-space: nowrap; }
.top .crumb { color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.top .search { margin-left: auto; position: relative; width: 300px; }
.top .search input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 19px; padding: 0 14px 0 38px; background: #fff; }
.top .search svg { position: absolute; left: 13px; top: 10px; color: var(--ink-3); }
.top .menu { display: none; }
.content { padding: 24px 28px 48px; max-width: 1320px; width: 100%; }
.mask { display: none; }

/* ---------- 基本元件 ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > .hd { display: flex; align-items: center; gap: 10px; padding: 16px 20px 0; }
.card > .hd h3 { margin: 0; font-size: 15px; font-weight: 600; }
.card > .hd .sub { color: var(--ink-3); font-size: 12px; }
.card > .hd .tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card > .bd { padding: 16px 20px 20px; }
.grid { display: grid; gap: 16px; }
.grid > *, .pos > * { min-width: 0; }   /* 网格里的输入框不许把整页撑宽（手机） */
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g-side { grid-template-columns: minmax(0, 1fr) 340px; }
.g-7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.mt { margin-top: 16px; } .mt2 { margin-top: 24px; } .mb { margin-bottom: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sp { flex: 1; }
.muted { color: var(--ink-3); } .small { font-size: 12px; } .b { font-weight: 600; }
.right { text-align: right; } .center { text-align: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 18px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap; font-weight: 500; }
.btn:hover { border-color: var(--brand-line); background: var(--surface-2); }
.btn.pri { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.pri:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: #efe9e2; }
.btn.danger { color: var(--bad); border-color: #ecc9c1; }
.btn.sm { height: 30px; padding: 0 12px; font-size: 13px; border-radius: 15px; }
.btn.lg { height: 46px; padding: 0 24px; font-size: 16px; border-radius: 23px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.icon { width: 36px; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px;
  background: #f1ede8; color: var(--ink-2); white-space: nowrap; }
.chip.brand { background: var(--brand-soft); color: var(--brand-2); }
.chip.good { background: var(--good-soft); color: var(--good); } .chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); } .chip.info { background: var(--info-soft); color: var(--info); }
.chip.line { background: #fff; border: 1px solid var(--line); }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff; font-size: 11px;
  display: inline-grid; place-items: center; font-weight: 600; }
.lvl { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px 0 7px; border-radius: 11px; font-size: 12px; color: #fff; white-space: nowrap; }
.lvl::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .75); }
.ch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.ch i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; cursor: pointer; }
.tabs a.on { color: var(--brand-2); border-color: var(--brand); font-weight: 600; }
.seg { display: inline-flex; background: #efe9e2; border-radius: 18px; padding: 3px; }
.seg a { padding: 5px 12px; border-radius: 15px; color: var(--ink-2); font-size: 13px; cursor: pointer; white-space: nowrap; }
.seg a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); font-weight: 600; }

/* 表单 */
.f { display: flex; flex-direction: column; gap: 6px; }
.f label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.f .hint { font-size: 12px; color: var(--ink-3); }
.inp, select.inp, textarea.inp { height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; background: #fff; width: 100%; }
textarea.inp { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; }
.inp:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(138, 90, 68, .12); }
.inp-group { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.inp-group input { border: 0; height: 36px; padding: 0 10px; flex: 1; min-width: 0; background: transparent; }
.inp-group input:focus { outline: none; }
.inp-group span { padding: 0 12px; color: var(--ink-3); background: var(--surface-2); height: 36px; display: grid; place-items: center; border-left: 1px solid var(--line); white-space: nowrap; }
.inp-group span.l { border-left: 0; border-right: 1px solid var(--line); }
.form { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form .full { grid-column: 1 / -1; }
.switch { position: relative; width: 40px; height: 22px; display: inline-block; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #d9d1c8; border-radius: 11px; transition: .15s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(18px); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 18px; cursor: pointer; font-size: 13px; background: #fff; }
.checks input { accent-color: var(--brand); }

/* 表格 */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #fbf8f4; }
.tbl th.num, .tbl td.num { text-align: right; }
.tbl .who { display: flex; align-items: center; gap: 10px; }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: #fff; flex: none; font-size: 14px; }
.who .n { font-weight: 600; } .who .p { font-size: 12px; color: var(--ink-3); }
.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 12px 4px 0; color: var(--ink-3); font-size: 13px; }
.empty { padding: 48px 20px; text-align: center; color: var(--ink-3); }
.empty svg { width: 36px; height: 36px; color: #cfc5ba; margin-bottom: 8px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters .inp { width: auto; min-width: 140px; }
.filters .grow { flex: 1; min-width: 200px; }

/* KPI */
.kpi { padding: 18px 20px; }
.kpi .k { color: var(--ink-3); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.kpi .v { font-size: 26px; font-weight: 650; margin-top: 6px; letter-spacing: -.3px; }
.kpi .v small { font-size: 14px; font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.kpi .d { font-size: 12px; margin-top: 4px; color: var(--ink-3); }
.up { color: var(--good); } .down { color: var(--bad); }
.todo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.todo a { display: flex; gap: 12px; align-items: center; padding: 16px 20px; color: var(--ink); border-right: 1px solid var(--line-2); }
.todo a:last-child { border-right: 0; }
.todo a:hover { background: var(--surface-2); }
.todo .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.todo .t { font-size: 12px; color: var(--ink-3); } .todo .n { font-size: 18px; font-weight: 650; }

/* 条形清单 */
.bars .it { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 7px 0; }
.bars .track { height: 8px; background: #f0ebe5; border-radius: 4px; overflow: hidden; }
.bars .fill { height: 100%; border-radius: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; }
.tip { position: absolute; pointer-events: none; background: #2b2623; color: #fff; padding: 8px 10px; border-radius: 8px; font-size: 12px;
  line-height: 1.6; white-space: nowrap; z-index: 5; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); display: none; }
.tip b { color: #fff; }
.tip .r { display: flex; gap: 12px; justify-content: space-between; color: #e9e2db; }
.tip .r i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 6px; }

/* 会员 360 */
.mcard { border-radius: 16px; color: #fff; padding: 22px 22px 18px; position: relative; overflow: hidden; min-height: 168px; }
.mcard::after { content: ""; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .07); }
.mcard .nm { font-size: 20px; font-weight: 600; letter-spacing: 1px; }
.mcard .lv { font-size: 12px; opacity: .85; letter-spacing: 2px; margin-top: 2px; }
.mcard .pts { display: flex; gap: 24px; margin-top: 18px; }
.mcard .pts .v { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; color: #fff; }
.mcard .pts .k { font-size: 12px; opacity: .8; color: #fff; }
.prog { height: 6px; background: rgba(255, 255, 255, .25); border-radius: 3px; overflow: hidden; margin-top: 16px; }
.prog i { display: block; height: 100%; background: #fff; border-radius: 3px; }
.mcard .pn { font-size: 12px; opacity: .9; margin-top: 6px; color: #fff; }
.idbar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.idbar .it { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 6px; text-align: center; font-size: 12px; color: var(--ink-3); background: #fff; }
.idbar .it.on { border-style: solid; border-color: transparent; background: var(--surface-2); color: var(--ink); }
.idbar .it .d { width: 26px; height: 26px; border-radius: 50%; margin: 0 auto 4px; display: grid; place-items: center; color: #6f665e; font-size: 12px; font-weight: 600; background: #ebe4dc; }
.idbar .it.on .d { color: #fff; }
.kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px 12px; font-size: 13px; }
.kv .k { color: var(--ink-3); }
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.timeline .it { position: relative; padding: 0 0 16px; }
.timeline .it::before { content: ""; position: absolute; left: -17px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); }
.timeline .it .t { font-size: 12px; color: var(--ink-3); }
.calc { font-size: 12px; color: var(--ink-3); background: var(--surface-2); border-radius: 6px; padding: 4px 8px; display: inline-block; margin-top: 4px; }
.pts-pos { color: var(--good); font-weight: 600; } .pts-neg { color: var(--bad); font-weight: 600; } .pts-frz { color: var(--warn); font-weight: 600; }

/* RFM */
.rfm { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rfm .cell { border-radius: 12px; padding: 16px; border: 1px solid var(--line); background: #fff; cursor: pointer; transition: .12s; }
.rfm .cell:hover { border-color: var(--brand-line); box-shadow: var(--shadow); }
.rfm .cell.on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(138, 90, 68, .12); }
.rfm .cell .n { font-size: 24px; font-weight: 650; }
.rfm .cell .t { font-weight: 600; } .rfm .cell .d { font-size: 12px; color: var(--ink-3); margin-top: 2px; min-height: 36px; }
.rfm .cell.hi { background: #fbf6f2; }

/* 商城卡片 */
.gifts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.gift { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.gift .art { height: 128px; display: grid; place-items: center; }
.gift .art svg { width: 64px; height: 64px; }
.gift .bd { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.gift .nm { font-weight: 600; } .gift .pt { color: var(--brand-2); font-weight: 650; font-size: 16px; }
.coupon { display: flex; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.coupon .l { width: 116px; flex: none; background: var(--brand-soft); color: var(--brand-2); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px 8px; border-right: 1px dashed var(--brand-line); text-align: center; }
.coupon .l .v { font-size: 22px; font-weight: 700; } .coupon .l .c { font-size: 11px; }
.coupon .r { padding: 12px 14px; flex: 1; min-width: 0; }

/* POS */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.pos .big { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pos .sum .r { display: flex; justify-content: space-between; padding: 6px 0; color: var(--ink-2); }
.pos .sum .r.t { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; color: var(--ink); font-weight: 600; font-size: 16px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keypad button { height: 52px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 20px; font-weight: 600; cursor: pointer; }
.keypad button:active { background: var(--brand-soft); }
.cp-pick { display: flex; flex-direction: column; gap: 8px; }
.cp-pick label { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; background: #fff; }
.cp-pick label.on { border-color: var(--brand); background: var(--brand-soft); }
.cp-pick input { accent-color: var(--brand); }
input[type=range] { accent-color: var(--brand); width: 100%; }

/* 导购工作台（企微侧边栏的样子） */
.wk { max-width: 760px; }
.wk-hero { background: linear-gradient(135deg, #3a302b, #6c4433); color: #fff; border-radius: 16px; padding: 20px; }
.wk-hero .k { font-size: 12px; opacity: .8; color: #fff; } .wk-hero .v { font-size: 22px; font-weight: 650; color: #fff; }
.list .it { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.list .it:last-child { border-bottom: 0; }
.list .it .m { flex: 1; min-width: 0; overflow: hidden; }
.list .it .m .s, .list .it .m .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .it .m .n { font-weight: 600; } .list .it .m .s { font-size: 12px; color: var(--ink-3); }
.script { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; }
.script .t { font-weight: 600; font-size: 13px; display: flex; align-items: center; }

/* 弹窗 / 抽屉 / 提示 */
.modal-bg { position: fixed; inset: 0; background: rgba(36, 32, 29, .38); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .12s; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .2); animation: pop .14s; }
.modal.wide { max-width: 760px; }
.modal .mh { display: flex; align-items: center; padding: 18px 22px 0; }
.modal .mh h3 { margin: 0; font-size: 17px; }
.modal .mh button { margin-left: auto; }
.modal .mb { padding: 16px 22px; overflow-y: auto; }
.modal .mf { padding: 0 22px 18px; display: flex; gap: 10px; justify-content: flex-end; }
.toasts { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #2b2623; color: #fff; padding: 10px 18px; border-radius: 22px; font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); animation: pop .15s; max-width: 90vw; }
.toast.bad { background: #9c3826; } .toast.good { background: #2c6e50; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { transform: scale(.96); opacity: 0; } }
.skel { background: linear-gradient(90deg, #efe9e2 25%, #f6f2ed 37%, #efe9e2 63%); background-size: 400% 100%; animation: sk 1.4s infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.note { background: var(--warn-soft); color: #6e4a12; border-radius: 10px; padding: 10px 14px; font-size: 13px; display: flex; gap: 8px; }
.note.info { background: var(--info-soft); color: #2f4c73; }
.note svg { flex: none; margin-top: 2px; }
.mob-only { display: none; }

/* ---------- 手机 ---------- */
@media (max-width: 900px) {
  .side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0, 0, 0, .15); }
  body.nav-open .side { transform: none; }
  body.nav-open .mask { display: block; position: fixed; inset: 0; background: rgba(36, 32, 29, .35); z-index: 50; }
  .top { padding: 0 14px; gap: 8px; }
  .top .menu { display: inline-flex; }
  .top .crumb { display: none; }
  .top .search { width: auto; flex: 1; max-width: 220px; }
  .content { padding: 16px 14px 40px; }
  .g2, .g3, .g-side, .g-7-5, .pos { grid-template-columns: minmax(0, 1fr); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .todo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .todo a { border-bottom: 1px solid var(--line-2); }
  .rfm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form { grid-template-columns: minmax(0, 1fr); }
  .idbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi { padding: 14px 16px; } .kpi .v { font-size: 22px; }
  .btn { height: 40px; } .btn.sm { height: 34px; }
  .mob-hide { display: none !important; }
  .mob-only { display: block; }
  .keypad.mob-only { display: grid; }
  /* 表格变卡片 */
  table.tbl.cards thead { display: none; }
  table.tbl.cards, table.tbl.cards tbody, table.tbl.cards tr, table.tbl.cards td { display: block; width: 100%; }
  table.tbl.cards tr { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 8px 4px; background: #fff; }
  table.tbl.cards td { border: 0; padding: 5px 12px; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  table.tbl.cards td::before { content: attr(data-l); color: var(--ink-3); font-size: 12px; text-align: left; flex: none; }
  table.tbl.cards td.lead { text-align: left; }
  table.tbl.cards td.lead::before { display: none; }
  .filters .inp { flex: 1; min-width: 120px; }
  .modal-bg { align-items: flex-end; padding: 0; }
  .modal { border-radius: 18px 18px 0 0; max-height: 92vh; }
}
@media (max-width: 420px) { .g4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .kpi .v { font-size: 20px; } }
.g-l { grid-template-columns: 360px minmax(0, 1fr); align-items: start; }
@media (max-width: 1100px) { .g-l { grid-template-columns: minmax(0, 1fr); } }
