:root {
  --ink: #172d2f;
  --muted: #536762;
  --line: #dfe7e3;
  --paper: #f5f7f3;
  --white: #fff;
  --cloud: #eef2ee;
  --river: #24575a;
  --river-dark: #183f42;
  --river-soft: #d9e7e2;
  --jade: #4d7662;
  --gold: #c69a52;
  --gold-soft: #f3e7d3;
  --danger: #b64f43;
  --shadow: 0 14px 40px rgba(22, 58, 55, .07);
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar: 244px;
  --display: "FZKai-Z03", "STKaiti", "KaiTi", serif;
  --body: "HarmonyOS Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  --data: "DIN Alternate", "Bahnschrift", "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); color: var(--ink); font-family: var(--body); }
body { margin: 0; min-height: 100vh; background: var(--paper); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
::selection { background: var(--river-soft); color: var(--river-dark); }
:focus-visible { outline: 3px solid rgba(36, 87, 90, .25); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; width: var(--sidebar); flex-direction: column; padding: 28px 18px 22px; color: rgba(255,255,255,.72); background: var(--river-dark); overflow: hidden; transition: width .24s ease, padding .24s ease; }
.sidebar::after { content: ""; position: absolute; right: -80px; bottom: 80px; width: 210px; height: 210px; border: 1px solid rgba(255,255,255,.07); border-radius: 47% 53% 62% 38%; transform: rotate(24deg); box-shadow: 0 0 0 28px rgba(255,255,255,.025), 0 0 0 58px rgba(255,255,255,.018); pointer-events: none; }
.brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; padding: 0 10px 34px; color: #fff; }
.brand-mark { display: inline-grid; flex: 0 0 auto; width: 39px; height: 39px; place-items: center; color: var(--river-dark); background: #dceae2; border-radius: 12px 12px 12px 3px; font-family: var(--display); font-size: 24px; font-weight: 700; transform: rotate(-2deg); }
.brand strong { display: block; font-family: var(--display); font-size: 22px; letter-spacing: .16em; }
.brand small { display: block; margin-top: 2px; color: rgba(255,255,255,.5); font-size: 10px; letter-spacing: .18em; }
.side-nav { position: relative; z-index: 1; display: grid; gap: 8px; }
.side-nav a, .side-nav .nav-parent { display: flex; align-items: center; gap: 13px; min-height: 48px; padding: 0 14px; border-radius: 12px; font-size: 14px; transition: .2s ease; }
.side-nav .nav-parent { width: 100%; color: inherit; background: transparent; border: 0; cursor: pointer; text-align: left; }
.side-nav a:hover, .side-nav .nav-parent:hover { color: #fff; background: rgba(255,255,255,.06); }
.side-nav a.active, .side-nav .nav-parent.active { color: #fff; background: rgba(205, 229, 217, .15); box-shadow: inset 3px 0 #b7d2c1; }
.nav-icon { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; font-family: var(--display); font-size: 13px; }
.side-nav a.active .nav-icon, .side-nav .nav-parent.active .nav-icon { color: var(--river-dark); background: #cde0d5; border-color: #cde0d5; }
.nav-group { position: relative; display: grid; gap: 8px; }
.settings-nav-label { white-space: nowrap; }
.settings-nav-caret { margin-left: auto; font-family: var(--data); font-size: 15px; line-height: 1; transition: transform .2s ease; }
.side-subnav { display: grid; visibility: visible; max-height: 360px; gap: 2px; margin: -3px 0 8px 40px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.12); opacity: 1; overflow: hidden auto; scrollbar-width: thin; scrollbar-color: rgba(217,231,226,.28) transparent; transition: max-height .22s ease, margin .22s ease, opacity .16s ease, visibility .22s; }
.side-subnav a { min-height: 34px; padding: 0 8px; border-radius: 7px; color: rgba(255,255,255,.62); font-size: 13px; }
.side-subnav a:hover { color: #fff; background: rgba(255,255,255,.04); }
.side-subnav a.active { color: #d9e9e0; background: rgba(205,229,217,.1); box-shadow: none; }
html.sidebar-collapsed .nav-group:hover .side-subnav,
html.sidebar-collapsed .nav-group.is-flyout-open .side-subnav { visibility: visible; opacity: 1; pointer-events: auto; transform: translateX(0); }
html.sidebar-collapsed .nav-group.is-flyout-click-closed .side-subnav { visibility: hidden; opacity: 0; pointer-events: none; transform: translateX(-6px); }
html.sidebar-collapsed .side-subnav::before { content: attr(data-flyout-label); padding: 4px 8px 7px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 700; letter-spacing: .1em; }
.sidebar-toggle { position: fixed; z-index: 35; top: 47px; left: calc(var(--sidebar) - 15px); display: grid; width: 30px; height: 30px; place-items: center; padding: 0; color: var(--river); background: #fff; border: 1px solid #d2ded9; border-radius: 50%; box-shadow: 0 5px 16px rgba(18,54,52,.17); cursor: pointer; transition: left .24s ease, color .18s ease, background .18s ease, transform .18s ease; }
.sidebar-toggle:hover { color: #fff; background: var(--river); border-color: var(--river); transform: scale(1.06); }
.sidebar-toggle-icon { display: grid; place-items: center; font-family: var(--data); font-size: 20px; line-height: 1; transition: transform .24s ease; }
.sidebar-foot { position: relative; z-index: 1; margin-top: auto; }
.sidebar-version { margin: 6px 0 0; padding: 0 10px; font-size: 11px; color: rgba(255,255,255,.42); text-align: center; letter-spacing: .4px; user-select: none; }
.sidebar-collapsed .sidebar-version { display: none; }
.operator { display: grid; grid-template-columns: 37px 1fr auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; transition: .2s ease; }
.operator:hover, .operator.active { background: rgba(255,255,255,.06); }
.avatar { display: inline-grid; flex: 0 0 auto; width: 37px; height: 37px; place-items: center; color: var(--river-dark); background: #d9e7e0; border-radius: 50%; font-family: var(--display); font-size: 16px; font-weight: 700; }
.operator small, .operator strong { display: block; }
.operator small { color: rgba(255,255,255,.42); font-size: 10px; }
.operator strong { color: #fff; font-size: 13px; margin-top: 2px; }

.content-shell { min-height: 100vh; margin-left: var(--sidebar); transition: margin-left .24s ease; }
.page-content { width: min(1480px, 100%); margin: 0 auto; padding: 38px 42px 60px; }
.mobile-header, .bottom-nav { display: none; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 0 0 26px; }
.page-header.compact { align-items: flex-start; }
.page-header h1 { margin: 3px 0 5px; font-family: var(--display); font-size: clamp(30px, 3vw, 40px); line-height: 1.2; letter-spacing: .035em; }
.dashboard-heading h1 { letter-spacing: .02em; }
.eyebrow { margin: 0 0 5px; color: var(--jade); font-family: var(--data); font-size: 10px; font-weight: 800; letter-spacing: .24em; }
.eyebrow.light { color: rgba(255,255,255,.55); }
.muted { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.back-link { display: inline-flex; margin-bottom: 12px; color: var(--muted); font-size: 12px; transition: color .2s; }
.back-link:hover { color: var(--river); }
.title-with-status { display: flex; align-items: center; gap: 12px; }
.title-with-status h1 { margin-bottom: 1px; }
.status-pill { padding: 4px 9px; color: var(--muted); background: var(--cloud); border-radius: 20px; font-size: 11px; }
.status-pill.on { color: #326e59; background: #dceee4; }
.header-actions { display: flex; gap: 10px; }
.member-quick-actions { flex-wrap: wrap; justify-content: flex-end; }
.member-quick-actions .account-action { min-width: 68px; }
.button.recharge-action { color: #fff; background: var(--river); box-shadow: 0 7px 18px rgba(36,87,90,.18); }
.button.recharge-action:hover { background: var(--river-dark); box-shadow: 0 9px 23px rgba(36,87,90,.24); }
.button.consume-action { color: #815c25; background: #f4ead7; border-color: #e5d2ae; }
.button.consume-action:hover { background: #eedfbe; border-color: #d7b97d; }
/* 工作台收银区的「确认收款」是整页主操作，用主色而非会员详情页的三动作区分色。 */
.consume-quick-form .button.consume-action { color: #fff; background: var(--river); border-color: var(--river); box-shadow: 0 7px 18px rgba(36,87,90,.18); }
.consume-quick-form .button.consume-action:hover { background: var(--river-dark); border-color: var(--river-dark); box-shadow: 0 9px 23px rgba(36,87,90,.24); }
.button.points-action { color: #655585; background: #eeeaf5; border-color: #dcd3ea; }
.button.points-action:hover { background: #e6dff0; border-color: #c8b9dc; }
.edit-member-action { margin-left: 2px; }

.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 5px; padding: 0 18px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 700; transition: background .12s ease, border-color .12s ease, box-shadow .12s ease, opacity .12s ease; }
.button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
/* 提交处理中：按钮立即弱化并锁点击（JS 已做防重复提交，这里补视觉反馈）。 */
form[aria-busy] button[type="submit"] { opacity: .55; cursor: progress; }
form[aria-busy] button[type="submit"]::after { content: " …"; }
.button.primary { color: #fff; background: var(--river); box-shadow: 0 7px 18px rgba(36,87,90,.18); }
.button.primary:hover { background: var(--river-dark); box-shadow: 0 9px 23px rgba(36,87,90,.24); }
.button.secondary { color: var(--river); background: #fff; border-color: #cbd9d4; }
.button.secondary:hover { border-color: var(--river); }
.button.ghost { color: var(--muted); background: transparent; border-color: var(--line); }
.button.wide { width: 100%; }
.button.small { min-height: 34px; padding: 0 14px; font-size: 12px; }
.inventory-form .button { color: var(--river); background: #fff; border-color: #cbd9d4; }
.inventory-form .button:hover { border-color: var(--river); }
.inventory-form .button.primary { color: #fff; background: var(--river); border-color: var(--river); }
.inventory-form .button.primary:hover { background: var(--river-dark); border-color: var(--river-dark); }
.button.danger { color: #a13333; background: #fff; border-color: #e0b4b4; }
.button.danger:hover { color: #fff; background: #b53c3c; border-color: #b53c3c; }
.text-button { align-self: center; padding: 8px 5px; color: var(--river); background: transparent; border: 0; cursor: pointer; font-size: 12px; font-weight: 700; }
.receipt-link { white-space: nowrap; }
.danger-text { color: var(--danger); }

.panel { background: var(--white); border: 1px solid rgba(32,75,71,.07); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 23px 24px 16px; }
.panel-head h2, .form-panel h2 { margin: 0; font-family: var(--display); font-size: 21px; letter-spacing: .04em; }
.panel-head a { color: var(--river); font-size: 12px; font-weight: 700; }
.panel-head a span { display: inline-block; transition: transform .2s ease; }
.panel-head a:hover span { transform: translateX(3px); }
.soft-label { padding: 5px 9px; color: var(--muted); background: var(--cloud); border-radius: 20px; font-size: 10px; }

.metric-strip { display: flex; flex-wrap: wrap; margin-bottom: 16px; background: #fff; border: 1px solid rgba(32,75,71,.07); border-radius: 16px; box-shadow: 0 8px 28px rgba(22,58,55,.045); overflow: hidden; }
.metric-strip .strip-item { flex: 1 1 200px; min-width: 0; display: grid; gap: 3px; padding: 13px 18px 11px; border-right: 1px solid var(--line); }
.metric-strip .strip-item:last-child { border-right: 0; }
.metric-strip .strip-item small { color: var(--muted); font-size: 10px; }
.metric-strip .strip-item strong { font-family: var(--data); font-size: 21px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.metric-strip .strip-item strong small { font-size: 11px; color: var(--ink); }
.metric-strip .strip-item em { font-style: normal; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-strip .strip-item.featured { background: var(--river); }
.metric-strip .strip-item.featured small { color: rgba(255,255,255,.66); }
.metric-strip .strip-item.featured strong { color: #fff; }
.metric-strip .strip-item.featured strong small { color: rgba(255,255,255,.8); }
.metric-strip .strip-item.featured em { color: rgba(255,255,255,.66); }
@media (max-width: 900px) {
  .metric-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-strip .strip-item { min-height: 96px; border-bottom: 1px solid var(--line); }
}
.metric-card { position: relative; min-width: 0; padding: 20px 21px 18px; background: #fff; border: 1px solid rgba(32,75,71,.07); border-radius: 16px; box-shadow: 0 8px 28px rgba(22,58,55,.045); overflow: hidden; }
.metric-card.featured { color: #fff; background: var(--river); border-color: transparent; }
.metric-card.featured::after { content: ""; position: absolute; right: -28px; bottom: -60px; width: 150px; height: 150px; border: 1px solid rgba(255,255,255,.13); border-radius: 42% 58% 38% 62%; transform: rotate(-20deg); box-shadow: 0 0 0 21px rgba(255,255,255,.04); }
.metric-label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.featured .metric-label { color: rgba(255,255,255,.65); }
.pulse { width: 7px; height: 7px; background: #bfe0c7; border-radius: 50%; box-shadow: 0 0 0 5px rgba(191,224,199,.1); }
.mini-seal, .trend { padding: 3px 6px; color: var(--river); background: var(--river-soft); border-radius: 6px; font-family: var(--display); font-size: 9px; font-style: normal; }
.metric-card > strong { position: relative; z-index: 1; display: block; margin: 15px 0 10px; font-family: var(--data); font-size: clamp(27px, 2.5vw, 35px); font-weight: 650; letter-spacing: -.025em; white-space: nowrap; }
.metric-card > strong small { font-family: var(--body); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.metric-card p { position: relative; z-index: 1; margin: 0; color: var(--muted); font-size: 10px; }
.metric-card.featured p { color: rgba(255,255,255,.58); }

/* 概览的收银区与经营动态共用列宽和间距，上下卡片边线保持对齐。 */
.page-content:has(#cashier) { --dashboard-gap: 24px; }
.quick-grid, .dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: var(--dashboard-gap); align-items: stretch; }
.quick-grid > *, .dashboard-grid > * { min-width: 0; }
.quick-grid { margin-bottom: var(--dashboard-gap); }
.dashboard-aside { display: grid; align-content: start; gap: var(--dashboard-gap); }
.transaction-list { padding: 0 24px 13px; }
.transaction-row { display: grid; grid-template-columns: 38px minmax(120px, 1fr) minmax(95px, 240px); align-items: center; gap: 12px; min-height: 65px; border-top: 1px solid var(--line); transition: background .18s ease; }
a.transaction-row:hover { margin-inline: -10px; padding-inline: 10px; background: #f8faf8; border-radius: 9px; }
.transaction-icon { display: grid; width: 34px; height: 34px; place-items: center; color: var(--river); background: var(--river-soft); border-radius: 10px; font-family: var(--display); font-size: 13px; }
.transaction-icon.consume { color: #976c2b; background: #f3e8d2; }
.transaction-icon.points_adjust { color: #6d5c92; background: #eae5f3; }
.transaction-icon.opening { color: #5f6b67; background: #e9eeeb; }
.transaction-person { min-width: 0; }
.transaction-person strong, .transaction-person small, .transaction-value small { display: block; }
.transaction-person strong { font-size: 13px; }
.transaction-person small, .transaction-value small { margin-top: 4px; color: var(--muted); font-size: 9px; white-space: normal; overflow-wrap: anywhere; }
.transaction-value { min-width: 0; text-align: right; font-family: var(--data); font-size: 13px; font-weight: 700; }
.positive { color: #43806b !important; }
.negative { color: #a46542 !important; }
.transaction-value small { max-width: 100%; font-family: var(--body); font-weight: 400; }
.level-stack { display: grid; gap: 18px; padding: 4px 24px 25px; }
.level-line { display: grid; grid-template-columns: 82px 1fr 24px; align-items: center; gap: 10px; }
.level-line > div:first-child { display: flex; align-items: center; gap: 6px; }
.level-line strong { font-size: 12px; }
.level-line small { color: var(--muted); font-size: 9px; }
.level-line b { font-family: var(--data); font-size: 11px; text-align: right; }
.level-dot { width: 7px; height: 7px; background: var(--level-color); border-radius: 50%; }
.level-bar { height: 5px; background: var(--cloud); border-radius: 5px; overflow: hidden; }
.level-bar i { display: block; min-width: 2px; height: 100%; background: var(--level-color); border-radius: inherit; }
.birthday-list { padding: 0 24px 14px; }
.birthday-list a { display: grid; grid-template-columns: 35px 1fr auto; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.avatar.tint { color: var(--river); background: var(--river-soft); }
.birthday-list .avatar { width: 33px; height: 33px; font-size: 13px; }
.birthday-list strong, .birthday-list small { display: block; }
.birthday-list strong { font-size: 12px; }
.birthday-list small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.birthday-list b { color: var(--gold); font-size: 10px; }
.quiet-empty { margin: 0; padding: 6px 24px 25px; color: var(--muted); font-size: 12px; }

.filter-panel { margin-bottom: 16px; padding: 16px; }
.filter-form { display: flex; align-items: center; gap: 10px; }
.search-field { position: relative; flex: 1; min-width: 230px; }
.search-field > span { position: absolute; z-index: 1; left: 13px; top: 50%; color: var(--muted); transform: translateY(-50%); }
.search-field input { width: 100%; padding-left: 37px; }
input, select, textarea { width: 100%; color: var(--ink); background: #fbfcfa; border: 1px solid #d6dfda; border-radius: 9px; outline: 0; transition: border-color .18s, box-shadow .18s, background .18s; }
input, select { height: 42px; padding: 0 12px; }
textarea { padding: 11px 12px; resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #a5afac; }
/* 复选框不受全局 input 宽高影响：统一 16px 方块 + 主题色（各处特例自行覆盖）。 */
input[type="checkbox"] { width: 16px; height: 16px; min-width: 16px; min-height: 16px; padding: 0; accent-color: var(--river); flex: none; }
/* 隐藏原生 number spinner：触屏上无用且挤占输入区，键盘/输入法仍可输入数字。 */
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input:focus, select:focus, textarea:focus { background: #fff; border-color: var(--jade); box-shadow: 0 0 0 3px rgba(118,161,140,.12); }
.filter-form select { width: 125px; }
.member-search-feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 24px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.member-search-feedback button { padding: 4px 8px; }
[data-member-results][data-search-stale="true"] { opacity: .55; }
.table-panel { overflow: hidden; }
.table-meta { display: flex; justify-content: space-between; padding: 18px 22px 12px; color: var(--muted); font-size: 10px; }
.table-meta strong { color: var(--ink); }
.table-wrap { width: 100%; overflow-x: auto; }
/* 进销存各页用的包裹类此前没有定义，窄屏下整页横向溢出；与 .table-wrap 同义。 */
.data-table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { padding: 11px 16px; color: var(--muted); background: #f5f8f5; font-size: 10px; font-weight: 600; text-align: left; white-space: nowrap; }
.data-table td { padding: 13px 16px; border-top: 1px solid var(--line); white-space: nowrap; }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: #fafcfb; }
.member-cell { display: flex; align-items: center; gap: 10px; }
.member-cell .avatar { width: 34px; height: 34px; font-size: 13px; }
.member-cell strong, .member-cell small { display: block; }
.member-cell small { margin-top: 3px; color: var(--muted); font-family: var(--data); font-size: 9px; letter-spacing: .04em; }
.member-cell em { margin-left: 5px; padding: 2px 4px; color: var(--muted); background: var(--cloud); border-radius: 4px; font-size: 8px; font-style: normal; }
.level-badge { display: inline-flex; padding: 5px 8px; color: var(--river); background: var(--river-soft); border-radius: 6px; font-size: 10px; }
.level-金卡会员 { color: #326c5b; background: #d9ece2; }
.level-铂金会员 { color: #315e69; background: #dbe9ed; }
.level-钻石会员 { color: #fff; background: var(--river-dark); }
.inactive-row { opacity: .58; }
.row-arrow { display: grid; width: 29px; height: 29px; place-items: center; color: var(--river); border-radius: 50%; transition: .2s; }
.row-arrow:hover { background: var(--river-soft); transform: translateX(2px); }
.empty-state { display: grid; justify-items: center; padding: 52px 24px; text-align: center; }
.empty-state > span { display: grid; width: 46px; height: 46px; place-items: center; color: var(--river); background: var(--river-soft); border-radius: 14px; font-family: var(--display); }
.empty-state h3 { margin: 15px 0 6px; font-family: var(--display); font-size: 18px; }
.empty-state p { margin: 0 0 17px; color: var(--muted); font-size: 11px; }
.search-empty-state .empty-state { min-height: 260px; align-content: center; }
.search-empty-state .empty-state > span { width: 56px; height: 56px; color: var(--river); background: #f8fbf8; border: 1px dashed var(--jade); border-radius: 50%; font-size: 17px; }
.search-empty-state .empty-state p { max-width: 460px; margin-bottom: 0; line-height: 1.75; }

.form-layout { display: grid; gap: 16px; max-width: 900px; }
.form-panel { padding: 25px; }
.section-title { display: flex; align-items: center; gap: 12px; margin-bottom: 23px; }
.section-title > span { display: grid; width: 37px; height: 37px; place-items: center; color: var(--river); background: var(--river-soft); border-radius: 11px; font-family: var(--display); font-size: 12px; }
.section-title p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 19px 20px; }
.form-panel label, .operation-form label, .settings-form > label { display: grid; gap: 7px; color: #4c5e5a; font-size: 11px; font-weight: 650; }
.span-2 { grid-column: 1 / -1; }
.level-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.level-choice { position: relative; }
.level-choice input { position: absolute; opacity: 0; pointer-events: none; }
.level-choice > span { display: block; padding: 12px; background: #fbfcfa; border: 1px solid #d9e1dd; border-radius: 10px; cursor: pointer; transition: .18s; }
.level-choice b, .level-choice small { display: block; }
.level-choice b { color: var(--ink); font-family: var(--display); font-size: 14px; }
.level-choice small { margin-top: 4px; color: var(--muted); font-size: 8px; font-weight: 400; white-space: nowrap; }
.level-choice input:checked + span { color: var(--river); background: #eef6f1; border-color: var(--jade); box-shadow: inset 0 0 0 1px var(--jade); }
.input-affix { display: flex; height: 42px; align-items: center; background: #fbfcfa; border: 1px solid #d6dfda; border-radius: 9px; overflow: hidden; }
.input-affix:focus-within { background: #fff; border-color: var(--jade); box-shadow: 0 0 0 3px rgba(118,161,140,.12); }
.input-affix span { padding-left: 12px; color: var(--muted); }
.input-affix input { height: 100%; border: 0; box-shadow: none; }
.input-affix input:focus { box-shadow: none; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 3px 0 10px; }

.account-hero { position: relative; display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); align-items: stretch; margin-bottom: 18px; color: #fff; background: linear-gradient(112deg, #1e4d50, #2d6261); border-radius: var(--radius); box-shadow: 0 14px 35px rgba(28,68,68,.16); overflow: hidden; }
.account-hero::after { content: ""; position: absolute; right: 8%; bottom: -110px; width: 210px; height: 210px; border: 1px solid rgba(255,255,255,.08); border-radius: 46% 54% 37% 63%; box-shadow: 0 0 0 28px rgba(255,255,255,.03), 0 0 0 58px rgba(255,255,255,.02); }
.account-identity, .account-number { position: relative; z-index: 1; min-width: 0; padding: 25px 24px; }
.account-identity { display: flex; align-items: center; gap: 15px; }
.member-seal { display: grid; width: 54px; height: 54px; place-items: center; color: var(--river-dark); background: #d8e8df; border: 1px solid rgba(255,255,255,.3); border-radius: 18px 18px 18px 5px; font-family: var(--display); font-size: 19px; box-shadow: inset 0 0 0 4px rgba(255,255,255,.24); }
.member-seal.level-钻石会员 { color: var(--river-dark); background: #e0c48c; }
.account-identity span, .account-identity strong, .account-identity small, .account-number span, .account-number strong, .account-number em { display: block; }
.account-identity div > span, .account-number > span { color: rgba(255,255,255,.55); font-size: 10px; }
.account-identity strong { margin: 4px 0; font-family: var(--display); font-size: 21px; }
.account-identity small, .account-number em { color: rgba(255,255,255,.5); font-size: 9px; font-style: normal; }
.account-number { border-left: 1px solid rgba(255,255,255,.1); }
.account-number strong { margin: 11px 0 6px; font-family: var(--data); font-size: clamp(22px, 2.4vw, 31px); font-weight: 650; white-space: nowrap; }
.account-number strong small { font-family: var(--body); font-size: 10px; font-weight: 400; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .7fr); gap: 18px; align-items: start; }
.detail-aside { display: grid; gap: 16px; }
.detailed .transaction-row { grid-template-columns: 38px minmax(110px,.7fr) minmax(90px,.7fr) minmax(95px, 240px); }
.transaction-note { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-list { margin: 0; padding: 0 24px 15px; }
.profile-list > div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 11px; }
.profile-list dt { color: var(--muted); }
.profile-list dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.profile-list a { color: var(--river); font-weight: 700; }
.member-notes { margin: 0 24px 23px; padding: 14px; background: #f5f8f5; border-radius: 10px; }
.member-notes span { color: var(--muted); font-size: 9px; }
.member-notes p { margin: 7px 0 0; font-size: 11px; line-height: 1.65; }
.danger-panel { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 21px; }
.danger-panel strong { font-size: 12px; }
.danger-panel p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }

.account-dialog { inset: 0; width: min(660px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; background: #fff; border: 0; border-radius: 22px; box-shadow: 0 25px 80px rgba(10,38,38,.28); overflow-y: auto; overscroll-behavior: contain; }
.recharge-dialog { border-top: 5px solid var(--river); }
.consume-dialog { width: min(860px, calc(100vw - 32px)); border-top: 5px solid var(--gold); }
.points-dialog { border-top: 5px solid #756296; }
.account-dialog::backdrop { background: rgba(15,35,35,.52); backdrop-filter: blur(3px); }
.campaign-hints { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.campaign-hint { display: inline-block; padding: 4px 10px; border-radius: 999px; background: #eef4ee; border: 1px solid #d7e4d8; color: #3d6d68; font-size: 12px; font-weight: 600; }
.dialog-close-form { position: absolute; z-index: 2; top: 18px; right: 18px; }
.dialog-close-form button { display: grid; width: 42px; height: 42px; place-items: center; color: var(--muted); background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 50%; box-shadow: 0 7px 24px rgba(22,58,55,.1); cursor: pointer; font-size: 24px; }
.dialog-heading { width: 100%; padding: 35px 36px 22px; }
.dialog-heading h2 { margin: 0 0 7px; font-family: var(--display); font-size: clamp(28px, 4vw, 38px); }
.dialog-heading p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.consume-dialog .dialog-heading .eyebrow { color: #a8782d; }
.points-dialog .dialog-heading .eyebrow { color: #756296; }
.operation-form { display: grid; width: 100%; gap: 18px; padding: 22px 36px 36px; }
.operation-form > label > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.points-adjust-input { height: 58px; font-family: var(--data); font-size: 25px; }
.field-guidance { margin: -9px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.input-affix.large { height: 55px; }
.input-affix.large span { color: var(--ink); font-family: var(--data); font-size: 20px; }
.input-affix.large input { font-family: var(--data); font-size: 23px; }
.quick-amounts { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; margin-top: -7px; }
.quick-amounts button { height: 31px; color: var(--river); background: #f2f7f4; border: 1px solid #dbe7e0; border-radius: 7px; cursor: pointer; font-family: var(--data); font-size: 10px; }
.payment-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 0; padding: 0; border: 0; }
.payment-methods legend { margin-bottom: 7px; color: var(--muted); font-size: 10px; }
.payment-methods label { position: relative; cursor: pointer; }
.payment-methods input { position: absolute; opacity: 0; pointer-events: none; }
.payment-methods label > span { display: grid; min-height: 65px; align-content: center; gap: 4px; padding: 9px; background: #fbfcfa; border: 1px solid #dbe3df; border-radius: 9px; }
.payment-methods b { font-size: 9px; }
.payment-methods small { color: var(--muted); font-size: 7px; line-height: 1.4; }
.payment-methods input:checked + span { color: var(--river); background: var(--river-soft); border-color: var(--jade); box-shadow: inset 0 0 0 1px var(--jade); }
.payment-methods label.disabled { cursor: not-allowed; opacity: .5; }
.payment-methods label.disabled > span { background: #f2f3f1; }
.consume-preview { display: grid; gap: 10px; padding: 13px; color: var(--muted); background: #f5f8f5; border: 1px solid #e4ebe7; border-radius: 10px; font-size: 10px; }
.consume-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.consume-preview-head strong { color: var(--river); font-size: 10px; }
.consume-split-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.consume-split-grid > span { display: grid; gap: 4px; padding: 8px; background: #fff; border-radius: 7px; font-size: 8px; }
.consume-split-grid b { color: var(--ink); font-family: var(--data); font-size: 11px; }
.consume-split-grid [data-preview-award] b { color: #8c6728; }
.consume-preview > small { line-height: 1.55; }

.summary-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 16px; background: var(--white); border: 1px solid rgba(32,75,71,.07); border-radius: 14px; box-shadow: var(--shadow); }
.summary-strip > div { padding: 16px 21px; border-left: 1px solid var(--line); }
.summary-strip > div:first-child { border-left: 0; }
.summary-strip span, .summary-strip strong { display: block; }
.summary-strip span { margin-bottom: 7px; color: var(--muted); font-size: 9px; }
.summary-strip strong { font-family: var(--data); font-size: 18px; }
.settlement-summary { grid-template-columns: repeat(6, 1fr); }
.transaction-filter { align-items: flex-end; }
.transaction-filter label { display: grid; gap: 5px; }
.field-caption { color: var(--muted); font-size: 9px; }
.transaction-filter input, .transaction-filter select { min-width: 145px; }
.align-end { align-self: end; }
.transaction-table { min-width: 1120px; }
.transaction-table td { font-size: 11px; }
.payment-split { display: block; color: var(--ink); white-space: nowrap; }
.payment-split small, .payment-split em { display: block; margin-top: 3px; font-size: 8px; font-style: normal; }
.payment-split small { color: var(--muted); }
.payment-split em { color: #946b28; }

.payment-checkout { display: grid; grid-template-columns: minmax(360px, 1.2fr) minmax(280px, .8fr); gap: 18px; max-width: 940px; margin: 0 auto; }
.payment-code-card { display: grid; justify-items: center; align-content: start; min-height: 600px; padding: 34px; text-align: center; }
.payment-provider-mark { display: grid; width: 52px; height: 52px; place-items: center; margin-bottom: 12px; color: #fff; border-radius: 16px; font-size: 22px; font-weight: 800; }
.payment-provider-mark.wechat { background: #07c160; }
.payment-provider-mark.alipay { background: #1677ff; }
.payment-code-card > h2 { margin: 3px 0 20px; font-family: var(--data); font-size: 38px; }
.payment-qr-wrap { padding: 15px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 9px 30px rgba(27,61,59,.08); }
.payment-qr-wrap img { display: block; width: min(260px, 62vw); height: auto; }
.payment-qr-wrap p { margin: 13px 0 3px; font-size: 12px; font-weight: 700; }
.payment-qr-wrap small { color: var(--muted); font-size: 9px; }
.payment-waiting { display: flex; align-items: center; gap: 9px; margin-top: 20px; color: var(--muted); font-size: 10px; }
.payment-waiting span { width: 8px; height: 8px; background: var(--jade); border-radius: 50%; box-shadow: 0 0 0 0 rgba(65,132,116,.45); animation: payment-pulse 1.5s infinite; }
@keyframes payment-pulse { 70% { box-shadow: 0 0 0 8px rgba(65,132,116,0); } 100% { box-shadow: 0 0 0 0 rgba(65,132,116,0); } }
.payment-result { display: grid; justify-items: center; gap: 8px; max-width: 360px; margin: 70px 0 30px; }
.payment-result > span { display: grid; width: 70px; height: 70px; place-items: center; color: #fff; background: var(--jade); border-radius: 50%; font-size: 34px; }
.payment-result.closed > span, .payment-result.failed > span, .payment-result.review > span { background: #ad7841; }
.payment-result strong { font-size: 20px; }
.payment-result p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.payment-code-card > .button { max-width: 310px; margin-top: 12px; }
.payment-order-aside { display: grid; align-content: start; gap: 12px; }
.payment-breakdown { padding-bottom: 22px; }
.payment-breakdown dl { margin: 0; padding: 0 24px; }
.payment-breakdown dl > div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 11px; }
.payment-breakdown dt { color: var(--muted); }
.payment-breakdown dd { margin: 0; font-family: var(--data); }
.payment-breakdown .payment-due { margin-top: 4px; color: var(--ink); font-weight: 800; }
.payment-breakdown .payment-due dt { color: var(--ink); }
.payment-award, .payment-note { margin: 14px 24px 0; padding: 12px; border-radius: 9px; font-size: 10px; line-height: 1.6; }
.payment-award { color: #765523; background: #fff8e8; }
.payment-note { color: var(--muted); background: var(--cloud); }
.payment-settings-panel { padding: 25px; }
.payment-provider-list { display: grid; gap: 10px; margin: 20px 0; }
.payment-provider-row { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 14px; padding: 16px; background: #fbfcfa; border: 1px solid var(--line); border-radius: 12px; }
.payment-provider-row .payment-provider-mark { margin: 0; }
.payment-provider-row > div { display: grid; gap: 4px; }
.payment-provider-row > div strong { font-size: 12px; }
.payment-provider-row > div small, .payment-provider-row > p { color: var(--muted); font-size: 9px; }
.payment-provider-row > em { padding: 5px 8px; color: #8b6230; background: #fff5e5; border-radius: 999px; font-size: 9px; font-style: normal; font-weight: 700; }
.payment-provider-row.ready > em { color: #287255; background: #eaf7ef; }
.payment-provider-row > p { grid-column: 2 / -1; margin: -2px 0 0; line-height: 1.6; }
.payment-settings-panel code { overflow-wrap: anywhere; }
.payment-vault-location { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 11px 13px; color: var(--muted); background: var(--cloud); border-radius: 9px; font-size: 9px; }
.payment-vault-location span { color: var(--ink); font-weight: 700; }
.payment-vault-location code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payment-vault-location em { color: #39725f; font-style: normal; }
.payment-config-form { display: grid; gap: 16px; }
.payment-common-card, .credential-card, .payment-confirm-card { padding: 24px; }
.credential-card-title { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; margin-bottom: 18px; }
.credential-card-title > span { display: grid; width: 40px; height: 40px; place-items: center; color: var(--river); background: var(--river-soft); border-radius: 12px 12px 12px 4px; font-family: var(--display); font-size: 11px; font-weight: 800; }
.credential-card-title > span.wechat, .credential-card-title > span.alipay { color: #fff; font-size: 17px; }
.credential-card-title > span.wechat { background: #07a954; }
.credential-card-title > span.alipay { background: #1677e8; }
.credential-card-title h2 { margin: 0; font-family: var(--display); font-size: 18px; }
.credential-card-title p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.credential-card-title > em { padding: 5px 8px; color: #8b6230; background: #fff5e5; border-radius: 999px; font-size: 8px; font-style: normal; font-weight: 800; }
.credential-card-title > em.ready { color: #287255; background: #e7f5ec; }
.payment-common-card > label, .credential-fields label, .key-upload-grid label, .payment-confirm-card label { display: grid; gap: 7px; color: #4c5e5a; font-size: 10px; font-weight: 700; }
.callback-route-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.callback-route-list span { padding: 7px 9px; color: var(--muted); background: var(--cloud); border-radius: 7px; font-size: 8px; }
.callback-route-list code { color: var(--river); }
.provider-config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.credential-progress { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 19px; }
.credential-progress::before { content: ""; position: absolute; z-index: 0; top: 8px; right: 15%; left: 15%; height: 1px; background: var(--line); }
.credential-progress span { position: relative; z-index: 1; display: grid; justify-items: center; gap: 6px; color: var(--muted); font-size: 8px; }
.credential-progress span::before { content: ""; width: 8px; height: 8px; background: #d9dfdc; border: 4px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.credential-progress span.done { color: #36725e; font-weight: 700; }
.credential-progress span.done::before { background: #54a17f; box-shadow: 0 0 0 1px #75ac93; }
.credential-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.credential-fields .secret-input small { color: var(--muted); font-size: 8px; font-weight: 400; }
.single-provider-fields { margin-bottom: 13px; }
.key-upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.key-upload-grid label { min-width: 0; padding: 11px; background: #f8faf8; border: 1px dashed #cedbd4; border-radius: 9px; }
.key-upload-grid input[type="file"] { width: 100%; height: auto; padding: 7px; font-size: 8px; }
.key-upload-grid input[type="file"]::file-selector-button { margin-right: 7px; padding: 6px 8px; color: var(--river); background: var(--river-soft); border: 0; border-radius: 5px; cursor: pointer; font-size: 8px; font-weight: 700; }
.key-upload-grid small { color: #9a7041; font-size: 8px; font-weight: 400; overflow-wrap: anywhere; }
.key-upload-grid small.ready { color: #35745e; }
.payment-confirm-card { display: grid; grid-template-columns: minmax(220px,1fr) minmax(190px,.7fr) auto; align-items: end; gap: 16px; color: #fff; background: linear-gradient(112deg, var(--river-dark), #2b6261); }
.payment-confirm-card strong { font-family: var(--display); font-size: 17px; }
.payment-confirm-card p { margin: 5px 0 0; color: rgba(255,255,255,.57); font-size: 9px; line-height: 1.6; }
.payment-confirm-card label { color: rgba(255,255,255,.75); }
.payment-confirm-card input { background: rgba(255,255,255,.96); }
.payment-confirm-card .button { white-space: nowrap; }
.payment-config-locked { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 15px; padding: 25px; }
.payment-config-locked > span { display: grid; width: 46px; height: 46px; place-items: center; color: #845f31; background: #f7ecd9; border-radius: 14px; font-family: var(--display); }
.payment-config-locked h2 { margin: 0; font-family: var(--display); font-size: 18px; }
.payment-config-locked p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.plain-member strong, .plain-member small, .account-after small, .note-cell small { display: block; }
.plain-member small, .account-after small, .note-cell small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.type-label { display: inline-flex; padding: 4px 7px; color: var(--river); background: var(--river-soft); border-radius: 5px; font-size: 9px; }
.type-label.consume { color: #966b2d; background: #f4ead7; }
.type-label.points_adjust { color: #69588b; background: #ebe6f3; }
.type-label.opening { color: #5e6c68; background: #e9eeeb; }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr); gap: 18px; max-width: 920px; }
.settings-form { display: grid; gap: 17px; }
.settings-form .button { justify-self: start; }
.system-card { padding: 25px; }
.system-card .profile-list { padding: 0; }
.path-text { font-family: monospace; font-size: 9px; }
.backup-tip { margin: 12px 0 18px; padding: 15px; color: #5d674f; background: #f5f1e5; border-radius: 10px; }
.backup-tip strong { font-size: 11px; }
.backup-tip p { margin: 6px 0 0; font-size: 9px; line-height: 1.6; }
.backup-tip code { font-size: inherit; }

.settings-heading { align-items: center; }
.role-stamp { display: grid; min-width: 112px; justify-items: center; gap: 3px; padding: 11px 16px; color: var(--river); background: var(--river-soft); border: 1px solid rgba(36,87,90,.08); border-radius: 14px 14px 14px 4px; font-family: var(--display); font-size: 15px; font-weight: 700; }
.role-stamp small { color: var(--muted); font-family: var(--body); font-size: 8px; font-weight: 500; }
.role-stamp.role-admin { color: #795d2d; background: #f1e6cc; }
.role-stamp.role-cashier { color: #526460; background: #e7ece9; }
.settings-center { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.settings-nav { position: sticky; top: 24px; display: none; gap: 5px; padding: 8px; background: #fff; border: 1px solid rgba(32,75,71,.07); border-radius: 15px; box-shadow: var(--shadow); }
.settings-nav a { display: grid; grid-template-columns: 31px 1fr; align-items: center; gap: 10px; min-height: 54px; padding: 7px 9px; border-radius: 10px; transition: .18s ease; }
.settings-nav a:hover { background: #f6f9f6; }
.settings-nav a.active { color: var(--river); background: var(--river-soft); }
.settings-nav a > span { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid var(--line); border-radius: 8px; font-family: var(--display); font-size: 11px; }
.settings-nav a.active > span { color: #fff; background: var(--river); border-color: var(--river); }
.settings-nav strong, .settings-nav small { display: block; }
.settings-nav strong { font-size: 11px; }
.settings-nav small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.settings-content { display: grid; gap: 16px; min-width: 0; }
.identity-card { position: relative; display: grid; grid-template-columns: 59px 1fr auto; align-items: center; gap: 16px; min-height: 128px; padding: 23px 27px; color: #fff; background: linear-gradient(108deg, var(--river-dark), #2b6261); border-radius: var(--radius); box-shadow: 0 15px 38px rgba(28,68,68,.15); overflow: hidden; }
.identity-card::after { content: ""; position: absolute; right: -55px; bottom: -130px; width: 230px; height: 230px; border: 1px solid rgba(255,255,255,.08); border-radius: 43% 57% 38% 62%; box-shadow: 0 0 0 28px rgba(255,255,255,.025); }
.identity-avatar { position: relative; z-index: 1; display: grid; width: 57px; height: 57px; place-items: center; color: var(--river-dark); background: #dceae2; border-radius: 18px 18px 18px 5px; font-family: var(--display); font-size: 23px; font-weight: 700; }
.identity-card > div { position: relative; z-index: 1; }
.identity-card > div > span { color: rgba(255,255,255,.58); font-size: 9px; }
.identity-card h2 { margin: 3px 0; font-family: var(--display); font-size: 23px; }
.identity-card p { margin: 0; color: rgba(255,255,255,.52); font-size: 9px; }
.role-ribbon { position: relative; z-index: 1; padding: 6px 10px; color: #d8e9e0; border: 1px solid rgba(255,255,255,.15); border-radius: 20px; font-size: 9px; font-style: normal; }
.settings-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.permission-card { padding: 25px; }
.permission-list { display: grid; gap: 11px; margin: 0 0 23px; padding: 0; list-style: none; }
.permission-list li { display: flex; align-items: center; gap: 9px; color: #485a56; font-size: 11px; }
.permission-list li span { display: grid; width: 20px; height: 20px; place-items: center; color: #3e7864; background: #e2efe7; border-radius: 50%; font-size: 9px; font-weight: 800; }
.setting-section-form { padding: 27px; }
.inline-actions { display: flex; justify-content: flex-end; margin-top: 23px; padding-top: 18px; border-top: 1px solid var(--line); }
.rule-panel { padding: 25px; }
.level-rule-list { display: grid; }
.level-rule-row { display: grid; grid-template-columns: 43px minmax(80px,1fr) minmax(105px,.65fr) minmax(125px,.75fr) minmax(170px,1fr); align-items: center; gap: 11px; padding: 14px 0; border-top: 1px solid var(--line); }
/* 已售卡种定义锁定的徽标与禁用态 */
.level-rule-row input:disabled { background: #f0f3f1; color: #9aa59f; cursor: not-allowed; }
.level-rule-row .switch input:disabled + span { opacity: .45; cursor: not-allowed; }
.level-rule-row .sold-lock { margin-left: 8px; padding: 2px 8px; font-size: 9px; font-weight: 700; color: #8a5a1f; background: #f8ecd8; border-radius: 999px; white-space: nowrap; }
/* 卡种行：名称/充值/次数/有效期/入储值开关/启用开关，不复用等级行的序号列 */

/* 卡种卡片式编辑器（两行紧凑版） */
.cardtype-list { display: grid; gap: 9px; }
.cardtype-card { display: grid; gap: 8px; padding: 9px 12px; background: #f7faf7; border: 1px solid var(--line); border-left: 3px solid var(--jade); border-radius: 10px; }
.cardtype-card.is-off { border-left-color: #b9c2bd; background: #f5f6f5; opacity: .78; }
.cardtype-card.is-new { border-style: dashed; border-left-style: dashed; background: #fff; }
.cardtype-card.is-editing { border-left-color: #d9a441; background: #fffbf2; }
.cardtype-create-label { font-size: 12px; color: #4c5e5a; white-space: nowrap; }
.cardtype-existing-title { margin: 6px 0 -2px; font-size: 11px; font-weight: 700; color: #7a8a84; letter-spacing: .04em; }
.cardtype-info-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cardtype-info-name { font-size: 14px; font-family: var(--display); }
.status-pill { padding: 2px 9px; font-size: 10px; font-weight: 700; border-radius: 999px; background: #e8efe9; color: #3e7d5f; }
.status-pill:not(.ok) { background: #ececec; color: #8a908c; }
.cardtype-edit-button { margin-left: auto; min-height: 28px; padding: 0 12px; font-size: 11px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.cardtype-edit-button:hover { border-color: var(--jade); color: var(--jade); }
.cardtype-hidden-values { display: none; }
.cardtype-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cardtype-card-head .cardtype-name-input { flex: 0 1 150px; min-width: 110px; height: 30px; padding: 0 9px; font-size: 13px; font-weight: 700; }
.cardtype-card-head .switch-labeled { margin-left: auto; }
.sold-badge { padding: 2px 9px; font-size: 10px; font-weight: 700; color: #8a5a1f; background: #f8ecd8; border-radius: 999px; white-space: nowrap; }
.cardtype-summary { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 6px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.cardtype-summary b { font-family: var(--data); color: var(--ink); font-size: 12.5px; }
.cardtype-summary .sold-note { color: #9aa59f; }
.cardtype-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 11.5px; font-weight: 650; color: #4c5e5a; }
.cardtype-card .cardtype-fields label { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 650; color: #4c5e5a; white-space: nowrap; cursor: text; }
.cardtype-card .cardtype-fields input { width: 86px; height: 30px; padding: 0 9px; font-size: 13px; text-align: right; }
.cardtype-fields .input-affix { height: 30px; gap: 0; }
.cardtype-fields .input-affix span { padding: 0 4px 0 9px; font-size: 11.5px; font-weight: 650; color: #4c5e5a; }
.cardtype-fields .input-affix input { width: 74px; height: 100%; padding: 0 9px 0 2px; text-align: right; }
.cardtype-card label.cardtype-deposit { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 11.5px; font-weight: 650; color: var(--ink); cursor: pointer; white-space: nowrap; }
.cardtype-card label.cardtype-deposit > input[type="checkbox"] { margin: 0; accent-color: var(--jade); width: 15px; height: 15px; flex: none; }
@media (max-width: 640px) { .cardtype-card-head .cardtype-name-input { flex: 1 1 100%; } }
.member-seal.small { width: 40px; height: 40px; border-radius: 12px 12px 12px 4px; font-size: 14px; box-shadow: inset 0 0 0 3px rgba(255,255,255,.3); }
.level-rule-name input { height: 37px; font-family: var(--display); font-size: 13px; }
.level-rule-row > label { position: relative; }
.level-rule-row > label > small { position: absolute; right: 11px; bottom: 12px; color: var(--muted); }
.level-rule-row > label > input { padding-right: 27px; }
.rule-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.rule-block { display: grid; gap: 15px; padding: 17px; background: #f7f9f7; border: 1px solid #e5ebe7; border-radius: 12px; }
.rule-block-head, .compact-rule { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.rule-block strong, .rule-block small { display: block; }
.rule-block strong { font-size: 11px; }
.rule-block small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.rule-number { display: flex !important; grid-auto-flow: column; align-items: center; justify-content: start; gap: 8px !important; color: var(--muted) !important; }
.rule-number input { width: 68px; text-align: center; }
.compact-rule .input-affix { width: 135px; flex: 0 0 auto; }
.switch { position: relative; display: inline-block !important; flex: 0 0 auto; width: 42px; height: 24px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { position: absolute; inset: 0; background: #c8d1cd; border-radius: 30px; cursor: pointer; transition: .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: 0 2px 5px rgba(30,50,48,.2); transition: .2s; }
.switch input:checked + span { background: var(--river); }
.switch input:checked + span::after { transform: translateX(18px); }
.strategy-panel { padding: 27px; }
.strategy-steps { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 4px; }
.strategy-steps::after { content: "→"; position: absolute; z-index: 2; top: 50%; left: 50%; display: grid; width: 27px; height: 27px; place-items: center; color: var(--river); background: #fff; border: 1px solid var(--line); border-radius: 50%; font-family: var(--data); font-size: 13px; box-shadow: 0 5px 14px rgba(24,55,53,.1); transform: translate(-50%, -50%); }
.strategy-step { display: grid; align-content: start; gap: 18px; min-height: 205px; padding: 20px; background: #f8faf8; border: 1px solid var(--line); border-top: 3px solid var(--river); border-radius: 13px; }
.strategy-step.campaign-step { border-top-color: #3a8f6f; }
.campaign-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.campaign-table th, .campaign-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.campaign-table th { font-weight: 600; color: #5c6b64; background: rgba(0,0,0,.02); }
.campaign-actions { display: flex; gap: 6px; }
.campaign-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.campaign-form-grid label { display: grid; gap: 4px; font-size: 12.5px; color: #40504a; }
.campaign-form-grid input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.campaign-active-label { display: flex !important; align-items: center; gap: 8px; }
.campaign-form-box summary { cursor: pointer; font-weight: 600; color: var(--river); }
.campaign-form-box[open] summary { margin-bottom: 12px; }
.choice-cards { display: grid; gap: 9px; }
.choice-cards.three { grid-template-columns: repeat(3, 1fr); }
.choice-card { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 7px; align-items: center; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.choice-card:hover { border-color: var(--jade); }
.choice-card input { appearance: none; width: 14px; height: 14px; margin: 0; border: 2px solid #b7c4be; border-radius: 50%; background: #fff; cursor: pointer; transition: .15s; }
.choice-card input:checked { border-color: var(--river); background: var(--river); box-shadow: inset 0 0 0 3px #fff; }
.choice-card span { font-size: 12px; font-weight: 600; }
.choice-card small { grid-column: 1 / -1; margin-top: 2px; font-size: 9px; color: #7a8781; line-height: 1.5; }
.choice-card:has(input:checked) { border-color: var(--river); background: var(--river-soft); }
.choice-card:has(input:focus-visible) { outline: 2px solid var(--river); outline-offset: 2px; }
.strategy-sub { display: grid; gap: 8px; }
.strategy-sub-label { font-size: 10px; font-weight: 700; color: var(--river-dark); }
.strategy-step.first-step { border-top-color: var(--gold); }
.strategy-step-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; }
.strategy-step-head strong, .strategy-step-head small { display: block; }
.strategy-step-head strong { font-size: 12px; }
.strategy-step-head small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.55; }
.strategy-sequence { display: grid; min-width: 47px; height: 30px; place-items: center; padding-inline: 8px; color: var(--river); background: var(--river-soft); border-radius: 8px 8px 8px 3px; font-family: var(--data); font-size: 9px; font-weight: 800; }
.first-step .strategy-sequence { color: #886424; background: #f2e7cf; }
.strategy-value { display: flex !important; align-items: center; gap: 9px !important; color: #55645f !important; font-size: 10px !important; }
.strategy-value .input-affix { width: 130px; }
.strategy-value .percent-input { width: 72px; text-align: center; }
.strategy-formula { display: flex; align-items: center; justify-content: center; gap: 11px; padding: 12px; color: var(--muted); background: #fff; border: 1px dashed #dfc898; border-radius: 9px; font-size: 9px; }
.strategy-formula b { color: #896528; font-family: var(--data); font-size: 16px; }
.strategy-option { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-top: 14px; border-top: 1px solid var(--line); }
.benefit-panel { display: grid; gap: 10px; }
.benefit-panel[hidden] { display: none; }
.strategy-option label.sleep-days-inline, .sleep-days-inline { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; }
.sleep-days-inline input { width: 58px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; text-align: center; font-family: var(--data); font-size: 14px; font-weight: 700; color: var(--river-dark); }
.sleep-days-inline input:focus { border-color: var(--river); }
.strategy-option label.sleep-days-inline span, .sleep-days-inline span { font-size: 10px; color: var(--muted); white-space: nowrap; }
.industry-preset { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 15px; padding: 13px 15px; background: var(--river-soft); border: 1px solid var(--jade); border-radius: 11px; }
.industry-preset > div:first-child { display: grid; gap: 4px; }
.industry-preset strong { color: var(--river-dark); font-size: 10px; }
.industry-preset small { color: var(--muted); font-size: 8px; line-height: 1.5; }
.industry-preset .inline-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.industry-preset .button { white-space: nowrap; }
@media (max-width: 640px) { .industry-preset { flex-direction: column; align-items: stretch; } }
.strategy-option strong, .strategy-option small { display: block; }
.strategy-option strong { font-size: 10px; }
.strategy-option small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.gift-level-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.gift-level-grid > span { display: grid; gap: 3px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.gift-level-grid b { font-size: 10px; }
.gift-level-grid small { color: var(--muted); font-size: 8px; }
.strategy-example { display: grid; grid-template-columns: 42px 1fr; align-items: start; gap: 12px; margin-top: 18px; padding: 15px 17px; color: #596763; background: var(--river-soft); border-radius: 11px; }
.strategy-example > span { display: grid; height: 24px; place-items: center; color: #fff; background: var(--river); border-radius: 6px; font-size: 9px; font-weight: 700; }
.strategy-example p { margin: 2px 0 0; font-size: 10px; line-height: 1.8; }
.strategy-example b { color: var(--river-dark); font-family: var(--data); }
.staff-panel { overflow: hidden; }
.staff-list { padding: 0 22px 20px; }
.staff-row { border-top: 1px solid var(--line); }
.staff-row.inactive { opacity: .62; }
.staff-row summary { display: grid; grid-template-columns: 37px minmax(120px,1fr) 88px 58px 20px; align-items: center; gap: 12px; min-height: 67px; padding: 9px 3px; cursor: pointer; list-style: none; }
.staff-row summary::-webkit-details-marker { display: none; }
.staff-main strong, .staff-main small { display: block; }
.staff-main strong { font-size: 12px; }
.staff-main small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.staff-main em { margin-left: 6px; padding: 2px 5px; color: var(--river); background: var(--river-soft); border-radius: 4px; font-size: 7px; font-style: normal; }
.role-badge, .account-status { justify-self: start; padding: 5px 8px; border-radius: 6px; font-size: 8px; white-space: nowrap; }
.role-badge { color: #775e32; background: #f2e8d2; }
.role-badge.role-manager { color: var(--river); background: var(--river-soft); }
.role-badge.role-cashier { color: #5e6d69; background: #e9eeeb; }
.account-status { color: var(--muted); background: var(--cloud); }
.account-status.on { color: #39745e; background: #deede4; }
.disclosure { color: var(--muted); transition: transform .18s; }
.staff-row[open] .disclosure { transform: rotate(180deg); }
.staff-edit-grid { display: grid; gap: 10px; margin: 0 0 13px 49px; padding: 15px; background: #f7f9f7; border-radius: 11px; }
.staff-edit-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 10px; }
.staff-password-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; }
.staff-edit-grid label { display: grid; gap: 5px; color: var(--muted); font-size: 9px; }
.role-hint { margin-top: 17px; padding: 12px 14px; color: var(--muted); background: #f5f8f5; border-radius: 9px; font-size: 9px; line-height: 1.7; }
.role-hint span { color: var(--river); font-weight: 700; }
.data-overview { display: grid; grid-template-columns: repeat(3,1fr); color: #fff; background: var(--river); border-radius: 15px; overflow: hidden; }
.data-overview > div { padding: 18px 22px; border-left: 1px solid rgba(255,255,255,.1); }
.data-overview > div:first-child { border-left: 0; }
.data-overview span { display: block; margin-bottom: 6px; color: rgba(255,255,255,.55); font-size: 9px; }
.data-overview strong { font-family: var(--data); font-size: 25px; }
.data-overview small { margin-left: 5px; color: rgba(255,255,255,.55); font-size: 9px; }
.data-actions-panel { padding: 25px; }
.download-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.download-action-form { margin: 0; }
.download-card { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; padding: 16px; background: #f7f9f7; border: 1px solid var(--line); border-radius: 11px; transition: .18s; }
button.download-card { width: 100%; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.download-card:hover { border-color: var(--jade); transform: translateY(-1px); }
.download-card > span { display: grid; width: 38px; height: 38px; place-items: center; color: var(--river); background: var(--river-soft); border-radius: 10px; font-family: var(--data); font-size: 9px; font-weight: 800; }
.download-card strong, .download-card small { display: block; }
.download-card strong { font-size: 11px; }
.download-card small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.download-card b { color: var(--river); font-size: 9px; white-space: nowrap; }
.database-path { margin: 0; color: var(--muted); font-family: monospace; font-size: 8px; overflow-wrap: anywhere; }
.audit-panel { overflow: hidden; }
.audit-list { padding: 0 24px 18px; }
.audit-list > div { display: grid; grid-template-columns: 8px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.audit-dot { width: 7px; height: 7px; margin-top: 4px; background: var(--jade); border-radius: 50%; box-shadow: 0 0 0 4px var(--river-soft); }
.audit-list p { margin: 0; font-size: 10px; }
.audit-list small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.error-body { min-height: 100dvh; display: grid; place-items: center; margin: 0; background: #e8efeb; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 14px 0 4px; font-size: 11px; color: var(--muted); }
.error-page { display: grid; min-height: 60vh; place-content: center; justify-items: center; text-align: center; }
.error-page > span { color: var(--river-soft); font-family: var(--data); font-size: 80px; font-weight: 800; line-height: 1; }
.error-page h1 { margin: -12px 0 8px; font-family: var(--display); font-size: 28px; }
.error-page p { margin: 0 0 18px; color: var(--muted); font-size: 11px; }

.toast-stack { position: fixed; z-index: 100; top: 22px; right: 25px; display: grid; gap: 8px; width: min(370px, calc(100vw - 30px)); }
.toast { display: grid; grid-template-columns: 26px 1fr 22px; align-items: center; gap: 9px; padding: 12px 13px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 15px 45px rgba(20,49,48,.17); font-size: 11px; animation: toast-in .3s ease both; }
.toast > span { display: grid; width: 23px; height: 23px; place-items: center; color: #39745f; background: #dceee4; border-radius: 50%; font-weight: 800; }
.toast.error > span { color: var(--danger); background: #f5dfdc; }
.toast button { padding: 0; color: var(--muted); background: none; border: 0; cursor: pointer; font-size: 18px; }
.toast-leave { opacity: 0; transform: translateY(-10px); transition: .3s ease; pointer-events: none; }
.inline-alert { padding: 11px 13px; color: var(--danger); background: #f8e7e4; border-radius: 8px; font-size: 11px; }

.login-page { display: grid; min-height: 100dvh; place-items: center; padding: 34px; background: #e8efeb; }
.login-shell { display: grid; grid-template-columns: 1.05fr .95fr; width: min(920px, 100%); min-height: 570px; background: #fff; border-radius: 25px; box-shadow: 0 28px 90px rgba(18,56,53,.16); overflow: hidden; }
.login-story { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 38px 42px; color: #fff; background: var(--river-dark); overflow: hidden; }
.story-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 19px; letter-spacing: .12em; }
.story-copy { position: relative; z-index: 2; margin-bottom: 64px; }
.story-copy h1 { margin: 10px 0 20px; font-family: var(--display); font-size: clamp(37px, 4vw, 51px); font-weight: 500; line-height: 1.32; letter-spacing: .04em; }
.story-copy > p:last-child { max-width: 320px; margin: 0; color: rgba(255,255,255,.56); font-size: 12px; line-height: 1.9; }
.flow-lines { position: absolute; inset: auto -80px -140px auto; width: 390px; height: 390px; border: 1px solid rgba(255,255,255,.09); border-radius: 50% 42% 57% 43%; transform: rotate(18deg); }
.flow-lines i { position: absolute; inset: 45px; border: 1px solid rgba(255,255,255,.07); border-radius: 42% 58% 45% 55%; }
.flow-lines i:nth-child(2) { inset: 90px; }
.flow-lines i:nth-child(3) { inset: 135px; }
.login-panel { display: grid; place-items: center; padding: 40px; }
.login-form { display: grid; width: min(320px,100%); gap: 20px; }
.login-form h2 { margin: 3px 0 7px; font-family: var(--display); font-size: 30px; }
.login-form label { display: grid; gap: 8px; color: #4d5f5c; font-size: 11px; font-weight: 700; }
.login-form input { height: 46px; }
.login-tip { margin: -8px 0 0; color: var(--muted); font-size: 9px; text-align: center; }

html.sidebar-collapsed { --sidebar: 78px; }
html.sidebar-collapsed .sidebar { padding-inline: 11px; overflow: visible; }
html.sidebar-collapsed .sidebar::after { display: none; }
html.sidebar-collapsed .brand { justify-content: center; padding-inline: 0; }
html.sidebar-collapsed .brand > span:last-child,
html.sidebar-collapsed .side-nav > a > span:last-child,
html.sidebar-collapsed .nav-group > [data-settings-toggle] > .settings-nav-label,
html.sidebar-collapsed .settings-nav-caret,
html.sidebar-collapsed .operator > span:nth-child(2),
html.sidebar-collapsed .operator > span:last-child { display: none; }
html.sidebar-collapsed .side-nav > a,
html.sidebar-collapsed .side-nav .nav-parent { justify-content: center; padding-inline: 0; }
html.sidebar-collapsed .sidebar-toggle-icon { transform: rotate(180deg); }
html.sidebar-collapsed .operator { display: flex; justify-content: center; padding: 8px 0; border-color: transparent; }
html.sidebar-collapsed .nav-group::after { content: ""; position: absolute; top: 0; left: 100%; width: 14px; height: 48px; }
html.sidebar-collapsed .side-subnav { position: absolute; z-index: 45; top: 0; left: calc(100% + 12px); display: grid; visibility: hidden; width: 148px; max-height: none; gap: 3px; margin: 0; padding: 9px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 15px 42px rgba(18,54,52,.18); opacity: 0; overflow: visible; pointer-events: none; transform: translateX(-6px); transition: opacity .16s ease, transform .16s ease, visibility .16s; }
html.sidebar-collapsed .nav-group:hover .side-subnav,
html.sidebar-collapsed .nav-group.is-flyout-open .side-subnav { visibility: visible; opacity: 1; pointer-events: auto; transform: translateX(0); }
html.sidebar-collapsed .nav-group.is-flyout-click-closed .side-subnav { visibility: hidden; opacity: 0; pointer-events: none; transform: translateX(-6px); }
html.sidebar-collapsed .side-subnav::before { content: attr(data-flyout-label); padding: 4px 8px 7px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 700; letter-spacing: .1em; }
html.sidebar-collapsed .side-subnav a { justify-content: flex-start; min-height: 33px; padding: 0 9px; color: #596965; border-radius: 7px; font-size: 10px; }
html.sidebar-collapsed .side-subnav a:hover { color: var(--river); background: #f2f7f4; }
html.sidebar-collapsed .side-subnav a.active { color: #fff; background: var(--river); }

@keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } }

@media (max-width: 1120px) {
  :root { --sidebar: 210px; }
  .page-content { padding-inline: 28px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .account-hero { grid-template-columns: 1.2fr repeat(3, .9fr); }
  .account-identity, .account-number { padding-inline: 18px; }
  .level-options { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  body { padding-bottom: calc(71px + env(safe-area-inset-bottom)); }
  .sidebar, .sidebar-toggle { display: none; }
  .content-shell { margin-left: 0; }
  .mobile-header { position: sticky; top: 0; z-index: 18; display: flex; height: 62px; align-items: center; justify-content: space-between; padding: 0 18px; background: rgba(245,247,243,.9); border-bottom: 1px solid rgba(32,75,71,.07); backdrop-filter: blur(12px); }
  .mobile-brand { display: flex; align-items: center; gap: 9px; font-family: var(--display); letter-spacing: .08em; }
  .mobile-brand .brand-mark { width: 31px; height: 31px; border-radius: 9px 9px 9px 3px; font-size: 18px; }
  .mobile-header > .avatar { width: 32px; height: 32px; font-size: 13px; }
  .bottom-nav { position: fixed; z-index: 50; inset: auto 0 0; display: grid; grid-template-columns: repeat(6, 1fr); height: calc(64px + env(safe-area-inset-bottom)); padding: 5px 4px env(safe-area-inset-bottom); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); box-shadow: 0 -7px 30px rgba(24,55,53,.07); backdrop-filter: blur(15px); }
  .bottom-nav a { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 2px; color: #81908c; font-size: 9px; }
  .bottom-nav a > span { display: grid; width: 27px; height: 27px; place-items: center; font-family: var(--display); font-size: 13px; }
  .bottom-nav a.active { color: var(--river); font-weight: 700; }
  .bottom-nav .bottom-action > span { width: 37px; height: 37px; margin-top: -18px; color: #fff; background: var(--river); border: 4px solid var(--paper); border-radius: 50%; box-shadow: 0 5px 15px rgba(36,87,90,.25); font-family: var(--body); font-size: 21px; }
  .page-content { padding: 25px 16px 35px; }
  .page-header { align-items: flex-start; margin-bottom: 20px; }
  .page-header h1 { font-size: 29px; }
  .desktop-only { display: none; }
  .page-header > .button { flex: 0 0 auto; padding-inline: 12px; }
  .metric-grid { gap: 10px; }
  .metric-card { padding: 16px; }
  .metric-card > strong { font-size: 26px; }
  .detail-grid, .settings-grid { grid-template-columns: 1fr; }
  .dashboard-aside { grid-template-columns: 1fr 1fr; }
  .filter-form { flex-wrap: wrap; }
  .search-field { flex: 1 0 100%; }
  .filter-form select { flex: 1; width: 100%; }
  .account-hero { grid-template-columns: repeat(3, 1fr); }
  .account-identity { grid-column: 1/-1; padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.1); }
  .account-number { padding-block: 18px; }
  .account-number:nth-child(2) { border-left: 0; }
  .account-number strong { font-size: 23px; }
  .member-heading { align-items: flex-end; }
  .form-layout { max-width: none; }
  .settings-center { grid-template-columns: 1fr; }
  .settings-nav { position: sticky; z-index: 15; top: 62px; display: flex; gap: 5px; margin-inline: -16px; padding: 8px 16px; border-width: 0 0 1px; border-radius: 0; box-shadow: 0 6px 18px rgba(24,55,53,.05); overflow-x: auto; scrollbar-width: none; }
  .settings-nav::-webkit-scrollbar { display: none; }
  .settings-nav a { flex: 0 0 auto; grid-template-columns: 27px auto; min-height: 45px; padding: 6px 10px; }
  .settings-nav a > span { width: 27px; height: 27px; }
  .settings-nav small { display: none; }
  .level-rule-row { grid-template-columns: 43px 1fr 110px 125px 170px; }

  .settlement-summary { grid-template-columns: repeat(6, minmax(125px, 1fr)); overflow-x: auto; scrollbar-width: none; }
  .settlement-summary::-webkit-scrollbar { display: none; }
  .strategy-steps { grid-template-columns: 1fr; }
  .strategy-steps::after { content: "↓"; }
  .choice-cards.three { grid-template-columns: 1fr; }
  .payment-checkout { grid-template-columns: 1fr; }
  .payment-code-card { min-height: 0; }
  .provider-config-grid { grid-template-columns: 1fr; }
  .payment-confirm-card { grid-template-columns: 1fr 1fr; }
  .payment-confirm-card > div { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .page-content { padding-inline: 13px; }
  .account-dialog, .consume-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); border-radius: 16px; }
  .dialog-close-form { top: 12px; right: 12px; }
  .dialog-close-form button { width: 38px; height: 38px; }
  .dialog-heading { padding: 28px 20px 18px; }
  .dialog-heading h2 { padding-right: 40px; }
  .operation-form { gap: 16px; padding: 18px 20px 25px; }
  .page-header { gap: 10px; }
  .header-actions { display: grid; gap: 6px; }
  .header-actions .button { min-height: 36px; padding-inline: 11px; font-size: 10px; }
  .member-heading { flex-wrap: wrap; }
  .member-quick-actions { display: flex; width: 100%; gap: 6px; }
  .member-quick-actions .button { flex: 1 1 0; min-width: 0; padding-inline: 7px; }
  .edit-member-action { margin-left: 0; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 125px; }
  .metric-card > strong { margin-top: 18px; font-size: 24px; }
  .metric-card p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dashboard-aside { grid-template-columns: 1fr; }
  .panel-head { padding: 20px 18px 14px; }
  .transaction-list, .level-stack, .birthday-list { padding-inline: 18px; }
  .recent-panel .transaction-row { grid-template-columns: 35px minmax(0,1fr) auto; }
  .transaction-value { min-width: 78px; }
  .transaction-value small { max-width: 90px; }
  .filter-panel { padding: 12px; }
  .filter-form { display: grid; grid-template-columns: 1fr 1fr; }
  .filter-form .search-field { grid-column: 1/-1; min-width: 0; }
  .filter-form .button { width: 100%; }
  .table-meta { padding-inline: 15px; }
  .member-table, .member-table tbody, .member-table tr, .member-table td { display: block; width: 100%; }
  .member-table thead { display: none; }
  .member-table tbody { padding: 0 12px 12px; }
  .member-table tr { position: relative; margin-bottom: 9px; padding: 14px; background: #fbfcfa; border: 1px solid var(--line); border-radius: 12px; }
  .member-table td { display: flex; justify-content: space-between; gap: 20px; padding: 6px 0; border: 0; text-align: right; }
  .member-table td::before { content: attr(data-label); color: var(--muted); font-size: 10px; }
  .member-table td:first-child { padding: 0 0 11px; margin-bottom: 4px; border-bottom: 1px solid var(--line); text-align: left; }
  .member-table td:first-child::before, .member-table td:last-child { display: none; }
  .level-badge { padding-block: 2px; background: transparent; }
  .form-panel { padding: 20px 17px; }
  .form-grid { grid-template-columns: 1fr; gap: 16px; }
  .span-2 { grid-column: auto; }
  .level-options { grid-template-columns: 1fr 1fr; }
  .form-actions { position: sticky; z-index: 12; bottom: 72px; padding: 10px; background: rgba(245,247,243,.92); border: 1px solid var(--line); border-radius: 13px; backdrop-filter: blur(10px); }
  .form-actions .button { flex: 1; }
  .account-hero { grid-template-columns: 1fr 1fr; }
  .account-identity { grid-column: 1/-1; }
  .account-number { padding: 17px; }
  .account-number:last-child { grid-column: 1/-1; border-top: 1px solid rgba(255,255,255,.1); border-left: 0; }
  .detailed .transaction-row { grid-template-columns: 35px minmax(0,1fr) auto; padding-block: 10px; }
  .detailed .transaction-note { display: none; }
  .consume-split-grid { grid-template-columns: 1fr 1fr; }
  .payment-methods { grid-template-columns: 1fr; }
  .payment-methods label > span { min-height: 0; }
  .profile-list { padding-inline: 18px; }
  .member-notes { margin-inline: 18px; }
  .summary-strip > div { padding: 13px; }
  .summary-strip span { min-height: 22px; line-height: 1.4; }
  .summary-strip strong { font-size: 15px; }
  .transaction-filter { grid-template-columns: 1fr 1fr; }
  .transaction-filter label:first-child { grid-column: 1/-1; }
  .transaction-filter input, .transaction-filter select { min-width: 0; }
  .transaction-filter .button { grid-column: 1/-1; }
  .toast-stack { top: 10px; right: 10px; }
  .login-page { padding: 0; background: #fff; }
  .login-shell { grid-template-columns: 1fr; min-height: 100dvh; border-radius: 0; }
  .login-story { min-height: 230px; padding: 25px 24px; }
  .story-copy { margin: 45px 0 0; }
  .story-copy h1 { margin-block: 7px 9px; font-size: 30px; line-height: 1.28; }
  .story-copy > p:last-child { display: none; }
  .login-panel { padding: 31px 24px max(32px, env(safe-area-inset-bottom)); place-items: start center; }
  .settings-heading { align-items: center; }
  .role-stamp { min-width: 91px; padding: 9px 10px; font-size: 12px; }
  .settings-nav { margin-inline: -13px; padding-inline: 13px; }
  .settings-nav a { grid-template-columns: 25px auto; }
  .settings-nav a > span { width: 25px; height: 25px; }
  .identity-card { grid-template-columns: 48px 1fr; min-height: 115px; padding: 20px; }
  .identity-avatar { width: 47px; height: 47px; border-radius: 14px 14px 14px 4px; font-size: 19px; }
  .identity-card h2 { font-size: 19px; }
  .role-ribbon { display: none; }
  .settings-two-col { grid-template-columns: 1fr; }
  .setting-section-form, .rule-panel, .strategy-panel, .permission-card, .data-actions-panel { padding: 19px 16px; }
  .inline-actions .button { width: 100%; }
  .level-rule-row { grid-template-columns: 38px 1fr 94px; gap: 9px; }
  .level-rule-row > label:nth-last-child(-n+2) { grid-column: 2/-1; }


  .member-seal.small { width: 36px; height: 36px; }
  .rule-blocks { grid-template-columns: 1fr; }
  .strategy-step { min-height: 0; padding: 16px; }
  .strategy-step-head { grid-template-columns: 1fr auto; }
  .strategy-sequence { grid-column: 1 / -1; justify-self: start; }
  .strategy-value { flex-wrap: wrap; }
  .staff-list { padding-inline: 13px; }
  .staff-row summary { grid-template-columns: 35px 1fr auto 17px; gap: 8px; }
  .staff-row summary .account-status { display: none; }
  .staff-main small { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .staff-edit-grid { margin-left: 0; }
  .staff-edit-form, .staff-password-form { grid-template-columns: 1fr; }
  .staff-edit-form .button, .staff-password-form .button { width: 100%; }
  .download-actions { grid-template-columns: 1fr; }
  .download-card { grid-template-columns: 38px 1fr; }
  .download-card b { grid-column: 2; }
  .data-overview > div { padding: 14px 10px; text-align: center; }
  .data-overview strong { font-size: 20px; }
  .payment-vault-location { grid-template-columns: 1fr; }
  .payment-vault-location code { white-space: normal; }
  .credential-card, .payment-common-card, .payment-confirm-card { padding: 18px 16px; }
  .credential-fields, .key-upload-grid, .payment-confirm-card { grid-template-columns: 1fr; }
  .credential-fields .span-2, .payment-confirm-card > div { grid-column: auto; }
  .payment-confirm-card .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* == 支付订单人工核对 == */
.payment-review-panel { margin-top: 18px; }
.review-reason { color: var(--danger); font-size: 10px; }
.review-resolve-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-password { display: flex; align-items: center; gap: 6px; }
.review-password span { color: var(--muted); font-size: 9px; white-space: nowrap; }
.review-password input { width: 130px; padding: 7px 9px; }
.review-actions { display: flex; gap: 7px; }
.review-actions .button { padding: 7px 12px; }
.review-actions .danger { color: #fff; background: var(--danger); border-color: var(--danger); }
@media (max-width: 720px) {
  .review-resolve-form { align-items: stretch; flex-direction: column; }
  .review-password input { width: 100%; }
  .review-actions .button { flex: 1; }
}
.totp-qr { display: block; width: 180px; height: 180px; margin: 10px 0; border: 1px solid var(--line); border-radius: 10px; }
.recovery-codes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0; padding: 0; list-style: none; }
.recovery-codes .recovery-code { display: block; padding: 8px 6px; font-family: var(--data); font-size: 11px; font-weight: 700; letter-spacing: 1px; text-align: center; color: var(--ink); background: #f2f6f4; border: 1px solid var(--line); border-radius: 8px; }
.button.review-actions-danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.payment-countdown { margin: 6px 0 0; font-family: var(--data); font-size: 13px; font-weight: 700; color: var(--river); font-variant-numeric: tabular-nums; }
.payment-redirect { margin: 10px 0 0; font-size: 11px; color: var(--muted); }
.payment-checkout.payment-big { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
.payment-checkout.payment-big .payment-order-aside { display: none; }
.payment-checkout.payment-big .payment-code-card h2 { font-size: 64px; }
.payment-checkout.payment-big .payment-qr-wrap img { width: 320px; height: 320px; }
.payment-checkout.payment-big .payment-countdown { font-size: 16px; }
[data-field="auth-code"] input { font-family: var(--data); letter-spacing: 1px; }
.fullscreen-toggle { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; cursor: pointer; }
.fullscreen-toggle:hover { color: var(--river); border-color: var(--river); }
.license-line { margin: 10px 0 0; font-size: 10px; color: var(--muted); }
.license-line code { font-family: var(--data); letter-spacing: 1px; }
.device-code { display: inline-block; padding: 12px 18px; margin: 8px 0 14px; font-family: var(--data); font-size: 18px; font-weight: 700; letter-spacing: 2px; color: var(--river-dark); background: #f2f6f4; border: 1px dashed var(--river); border-radius: 10px; user-select: all; }
.license-token-input { font-family: var(--data); letter-spacing: 1px; word-break: break-all; }
.device-code-inline { font-family: var(--data); letter-spacing: 1px; padding: 2px 6px; background: #f2f6f4; border-radius: 6px; }
.backup-reminder { margin: 0 0 14px; display: flex; align-items: center; gap: 12px; }
.backup-reminder .text-button { color: var(--river); }
.ledger-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 0 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: 11px; }
.ledger-filter label { display: grid; gap: 4px; color: var(--muted); }
.ledger-filter input, .ledger-filter select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; color: var(--ink); background: #fff; }
.sleep-badge { display: inline-block; margin-left: 8px; padding: 2px 8px; font-size: 10px; font-weight: 700; color: #8a5a1f; background: #f8ecd8; border-radius: 999px; }
.strategy-option .input-affix { width: 90px; margin-top: 6px; }
.quick-grid .consume-card { grid-column: 1; }
.quick-grid .member-info-card { grid-column: 2; }
@media (max-width: 980px) {
  .quick-grid, .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .quick-grid .consume-card, .quick-grid .member-info-card { grid-column: 1; }
}
@media (max-width: 620px) {
  .page-content:has(#cashier) { --dashboard-gap: 16px; }
}
.member-picker { position: relative; display: grid; gap: 6px; margin-bottom: 4px; }
.picker-results { display: grid; gap: 6px; max-height: 240px; overflow: auto; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(18,56,53,.14); }
.picker-option { display: grid; gap: 2px; padding: 9px 11px; text-align: left; background: #f7faf8; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font: inherit; }
.picker-option:hover { border-color: var(--river); background: #eef6f2; }
.picker-option b { font-size: 12px; }
.picker-option small { color: var(--muted); font-size: 10px; }
.picker-empty { margin: 0; padding: 8px; color: var(--muted); font-size: 11px; }
.picker-no-match { display: grid; gap: 6px; }
.picker-action { padding: 8px 10px; text-align: center; background: #f7faf8; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font: inherit; font-size: 12px; }
.picker-action:hover { border-color: var(--river); background: #eef6f2; }
.picker-selected { margin: 0; padding: 8px 10px; color: var(--river-dark); background: #eef6f2; border-radius: 8px; font-size: 11px; }
.quick-grid.single { grid-template-columns: minmax(0, 560px); }
.voided-mark { color: var(--danger); font-style: normal; font-weight: 700; }
.transaction-row:has(.voided-mark) .transaction-value { text-decoration: line-through; opacity: .55; }
fieldset[disabled] { opacity: .78; }
fieldset[disabled] input, fieldset[disabled] select, fieldset[disabled] textarea { color: var(--muted); background: #f4f7f5; }
/* ── 快捷收银消费卡（经营概览）── */
.consume-card .panel-head { margin-bottom: 10px; }
.consume-card .picker-input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; color: var(--ink); background: #fff; }
.consume-card .member-picker { margin-bottom: 10px; }
.consume-card .picker-results { position: absolute; top: calc(100% - 6px); left: 0; right: 0; z-index: 30; }
.consume-amount-row { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 10px; }
.consume-amount-row .input-affix.large { flex: 1; }
.consume-amount-row .input-affix.large input { font-size: 20px; font-weight: 700; }
.consume-amount-row .quick-amounts { padding-bottom: 4px; }
.consume-amount-row .quick-amounts button { padding: 7px 10px; font-size: 11px; }
.consume-preview.compact { margin: 0 0 10px; padding: 10px 12px; background: #f2f7f4; border: 1px solid var(--line); border-radius: 10px; }
.preview-strip { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; }
.preview-strip > span { display: grid; gap: 2px; font-size: 10px; color: var(--muted); }
.preview-strip b { font-family: var(--data); font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.preview-strip .due b { font-size: 20px; font-weight: 800; color: var(--river-dark); }
.consume-preview.compact small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
.channel-segments { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0 0 10px; }
.channel-segments legend { padding: 0; margin-bottom: 6px; font-size: 10px; color: var(--muted); }
.channel-segments .segment { position: relative; }
.channel-segments .segment input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.channel-segments .segment span { display: inline-block; padding: 9px 16px; font-size: 12px; font-weight: 700; color: var(--ink); background: #f4f7f5; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.channel-segments .segment input:checked + span { color: #fff; background: var(--river-dark); border-color: var(--river-dark); }
.channel-segments .segment input:focus-visible + span { outline: 2px solid var(--river); outline-offset: 2px; }
.channel-segments .segment.disabled span { opacity: .4; cursor: not-allowed; }
.consume-note { width: 100%; padding: 10px 12px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 12px; color: var(--ink); background: #fff; }
/* ── 收银旁的会员账户卡：与消费模块等高，资料按用途分组 ── */
.member-info-card { display: flex; flex-direction: column; min-width: 0; }
.member-info-card .panel-head { flex: 0 0 auto; }
.member-info-card [data-member-info-state] { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.member-info-card [data-member-info-state]::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.member-info-card[data-member-state="selected"] [data-member-info-state] { color: var(--river); background: var(--river-soft); }
.member-info-body { display: flex; flex: 1; flex-direction: column; gap: 18px; min-width: 0; padding: 12px 24px 36px; }
.member-info-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.member-info-identity > div { min-width: 0; }
.member-info-avatar { display: grid; flex: 0 0 48px; width: 48px; height: 48px; place-items: center; border: 1px solid var(--line); border-radius: 15px 15px 15px 5px; background: var(--river-soft); color: var(--river-dark); font-family: var(--display); font-size: 24px; font-weight: 700; }
.member-info-identity h3 { margin: 0 0 3px; color: var(--ink); font-family: var(--display); font-size: 22px; line-height: 1.35; overflow-wrap: anywhere; }
.member-info-number { color: var(--muted); font-family: var(--data); font-size: 12px; letter-spacing: .05em; overflow-wrap: anywhere; }
.member-wallet { position: relative; isolation: isolate; overflow: hidden; padding: 18px; border: 1px solid var(--river); border-radius: 15px; color: #fff; background: var(--river-dark); }
.member-wallet::after { content: ""; position: absolute; z-index: -1; top: -48px; right: -56px; width: 170px; height: 170px; border: 1px solid rgba(217,231,226,.13); border-radius: 44% 56% 61% 39%; box-shadow: 0 0 0 19px rgba(217,231,226,.035), 0 0 0 39px rgba(217,231,226,.025); transform: rotate(-22deg); pointer-events: none; }
.member-wallet-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; color: #d9e7e2; font-size: 12px; }
.member-wallet-level { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 11px; }
.member-wallet-level b { font-weight: 500; }
.member-wallet-level i { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: #d9e7e2; }
.member-wallet-total { display: flex; align-items: baseline; gap: 6px; min-width: 0; margin: 10px 0 17px; font-family: var(--data); font-variant-numeric: tabular-nums; }
.member-wallet-total > span { color: #d9e7e2; font-size: 17px; }
.member-wallet-total strong { min-width: 0; font-size: clamp(28px, 2.7vw, 40px); font-weight: 650; line-height: 1.15; letter-spacing: -.02em; overflow-wrap: anywhere; }
.member-wallet-details { border-top: 1px solid rgba(217,231,226,.2); }
.member-wallet-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; padding: 8px 0; color: #d9e7e2; font-size: 12px; line-height: 1.4; cursor: pointer; list-style: none; }
.member-wallet-details > summary::-webkit-details-marker { display: none; }
.member-wallet-details > summary:hover { color: #fff; }
.member-wallet-details > summary:focus-visible { outline: 2px solid #d9e7e2; outline-offset: -2px; border-radius: 5px; }
.member-wallet-details > summary svg { flex: 0 0 16px; width: 16px; height: 16px; }
.member-wallet-details[open] > summary svg { transform: rotate(180deg); }
.member-wallet-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding-top: 8px; }
.member-wallet-split > div { min-width: 0; }
.member-wallet-split > div + div { padding-left: 12px; border-left: 1px solid rgba(217,231,226,.2); }
.member-wallet-split dt { margin-bottom: 4px; color: #d9e7e2; font-size: 11px; }
.member-wallet-split dd { margin: 0; color: #fff; font-family: var(--data); font-size: 15px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.member-wallet-split dd small { display: block; margin-top: 5px; color: #d9e7e2; font-family: var(--body); font-size: 11px; line-height: 1.5; }
.member-wallet-explanation { margin: 10px 0 0; color: #d9e7e2; font-size: 11px; line-height: 1.6; }
@media (max-width: 980px) { .member-wallet-details > summary { min-height: 44px; } }
.member-info-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.member-info-metrics > div { min-width: 0; padding: 13px 14px; background: #f4f7f4; border: 1px solid var(--line); border-radius: 11px; }
.member-info-metrics dt { margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.member-info-metrics dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px; margin: 0; font-family: var(--data); font-variant-numeric: tabular-nums; }
.member-info-metrics strong { color: var(--ink); font-size: 23px; line-height: 1.1; overflow-wrap: anywhere; }
.member-info-metrics dd > span { color: var(--muted); font-family: var(--body); font-size: 11px; }
.member-info-facts { display: grid; gap: 12px; margin: 0; }
.member-info-facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.member-info-facts dt { flex-shrink: 0; color: var(--muted); font-size: 12px; }
.member-info-facts dd { min-width: 0; margin: 0; color: var(--ink); font-family: var(--data); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.member-info-footer { display: grid; gap: 10px; margin-top: auto; padding-top: 8px; }
.member-info-footer p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.member-info-details { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; padding: 11px 14px; border: 1px solid #b9cfc3; border-radius: 10px; color: var(--river-dark); background: #f0f6f2; font: inherit; font-size: 12px; font-weight: 700; text-align: left; cursor: pointer; transition: background .18s ease, border-color .18s ease; }
.member-info-details:hover { background: #e1eee6; border-color: var(--river); }
.member-info-details svg { flex: 0 0 auto; width: 18px; height: 18px; }
.member-info-empty { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 25px 0; text-align: center; }
.member-info-empty h3 { margin: 24px 0 10px; color: var(--ink); font-family: var(--display); font-size: 21px; line-height: 1.4; }
.member-info-empty p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.85; }
.member-card-illustration { position: relative; width: min(100%, 240px); padding: 0 14px 14px 0; }
.member-card-ghost { display: grid; gap: 22px; padding: 21px; border: 1px solid #b9cfc3; border-radius: 15px; color: var(--river); background: #eaf2ec; box-shadow: 10px 10px 0 #f3f6f1; transform: rotate(-5deg); text-align: left; }
.member-card-ghost > span { font-family: var(--display); font-size: 14px; font-weight: 700; }
.member-card-ghost > b { color: #6b8d7a; font-family: var(--data); font-size: 19px; letter-spacing: .17em; }
.member-card-ghost > i { position: absolute; top: 24px; right: 23px; width: 26px; height: 19px; border: 1px solid #8bad99; border-radius: 5px; background: #d7e6db; }
.member-card-ghost > div { display: flex; gap: 12px; }
.member-card-ghost > div i { width: 42%; height: 5px; border-radius: 4px; background: #c2d7c9; }
.member-card-ghost > div i + i { width: 23%; }
.member-card-seal { position: absolute; right: -3px; bottom: 0; display: grid; width: 58px; height: 58px; place-items: center; border: 5px solid white; border-radius: 50%; background: var(--river-dark); color: #d9e7e2; }
.member-card-seal svg { width: 25px; height: 25px; }
.member-info-preview-labels { display: flex; flex-wrap: wrap; justify-content: center; gap: 0; margin-top: 20px; color: var(--muted); font-size: 10px; }
.member-info-preview-labels span + span { margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--line); }
@media (max-width: 980px) {
  .member-info-body { padding: 8px 20px 24px; }
  .member-info-empty { padding-block: 20px; }
  .member-card-illustration { width: 205px; }
  .member-info-empty h3 { margin-top: 20px; }
  .member-wallet-total strong { font-size: 34px; }
}

/* 高频收银信息保持可读，提交状态不改变原生表单的成功控件集合。 */
form[aria-busy="true"] button[type="submit"] { opacity: .65; cursor: progress; }
.settings-role-manager .settings-nav { display: flex; flex-wrap: wrap; position: static; }
.transaction-person small, .transaction-value small, .picker-option small,
.consume-preview.compact small, .preview-strip > span, .field-guidance { font-size: 12px; }
#cashier { scroll-margin-top: 76px; }
@media (max-width: 900px) {
  .page-content:has(#cashier) { display: flex; flex-direction: column; }
  .page-content:has(#cashier) > .dashboard-heading { order: 0; }
  .page-content:has(#cashier) > #cashier { order: 1; }
  .page-content:has(#cashier) > .backup-reminder { order: 3; }
  .page-content:has(#cashier) > .dashboard-grid { order: 4; }
  .consume-quick-form { gap: 10px; }
  .channel-segments .segment span { min-height: 44px; padding: 12px; }
  .fullscreen-toggle { width: 44px; height: 44px; }
  .consume-card .panel-head { margin-bottom: 0; }
}

/* 会员详情：参加过的充值活动 */
.campaign-participation-list { list-style: none; margin: 0; padding: 0; }
.campaign-participation-list li {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line);
}
.campaign-participation-list li:last-child { border-bottom: none; }
.campaign-participation-list li small { color: var(--muted, #888); }

/* 次卡行内操作与流水页核销记录 */
.card-row-actions { display: flex; gap: 12px; align-items: center; margin-top: 6px; }
.card-extend-form { display: flex; gap: 6px; align-items: center; }
.card-extend-form input[type="date"] { padding: 2px 6px; font-size: 0.85rem; }
.card-redeems-list { display: grid; gap: 8px; }
.card-redeem-row {
  display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap;
  padding: 6px 0; border-bottom: 1px dashed var(--line);
}
.card-redeem-row:last-child { border-bottom: none; }
.card-redeem-time { color: var(--muted, #888); font-size: 0.85rem; }
.card-redeem-card small { display: block; color: var(--muted, #888); }
.card-redeem-operator { margin-left: auto; color: var(--muted, #888); font-size: 0.85rem; }

/* 流水页储值变动方向徽章 */
.sv-dir { font-style: normal; margin-right: 6px; padding: 2px 6px; border-radius: 5px; font-size: 9px; font-weight: 700; }
.sv-dir.in { color: #2c5c45; background: #dceae2; }
.sv-dir.out { color: #7a5520; background: #f4ead7; }

/* 会员详情：次卡面板 */
.card-list { display: grid; gap: 10px; margin: 0 24px 23px; }
.card-row {
  position: relative; display: grid; gap: 5px;
  padding: 13px 16px 13px 18px;
  background: #f7faf7; border: 1px solid var(--line); border-radius: 12px;
}
.card-row::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--jade);
}
.card-row.card-row-expired::before { background: #b9c2bd; }
.card-row.card-row-empty::before { background: var(--gold); }
.card-row.card-row-voided::before { background: var(--danger); }
.card-row.card-row-expired, .card-row.card-row-voided { background: #f7f8f7; }
.card-row-main { display: flex; align-items: center; gap: 10px; }
.card-row-main strong { min-width: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 700; }
.card-row-main .card-redeem-actions { margin-left: auto; flex: 0 0 auto; }
.card-status {
  flex: 0 0 auto; padding: 2px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 700; white-space: nowrap;
}
.card-status-ok { color: #2c5c45; background: #dceae2; }
.card-status-expired { color: #536762; background: #eef2ee; }
.card-status-empty { color: #8a5a1f; background: #f8ecd8; }
.card-status-voided { color: #9c3f34; background: #f7e6e3; }
.card-row-meta { display: flex; flex-wrap: nowrap; align-items: baseline; gap: 3px 10px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; }
.card-row-count b { font-family: var(--data); font-size: 15px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.card-row-expiry { font-family: var(--data); letter-spacing: .01em; }
.card-row-expiry .expiring-soon { font-style: normal; margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: #f8ecd8; color: #8a5a1f; font-weight: 700; font-size: 11px; }
.card-redeem-button { color: #1d6a4c; font-weight: 700; }
.card-redeem-button:hover { text-decoration: underline; }
.card-usable-hint { border-left: 3px solid #1d6a4c; padding-left: 10px; }
.card-empty { margin: 0 24px 23px; }

/* 会员详情：次卡核销记录 */
.card-ledger-list { display: grid; gap: 1px; margin: 2px 24px 23px; padding-top: 15px; border-top: 1px solid var(--line); }
.card-ledger-title { margin: 0 0 4px; font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.card-ledger-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.card-ledger-row:last-child { border-bottom: none; }
.card-ledger-icon { flex: 0 0 auto; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; font-size: 11px; font-weight: 700; }
.card-ledger-icon.issue { color: #2c5c45; background: #dceae2; }
.card-ledger-icon.redeem { color: #24575a; background: #d9e7e2; }
.card-ledger-icon.reversal { color: #8a5a1f; background: #f8ecd8; }
.card-ledger-main { flex: 1 1 auto; min-width: 0; }
.card-ledger-main strong { font-size: 13px; font-weight: 700; }
.card-ledger-main small { display: block; color: var(--muted); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.card-ledger-delta { flex: 0 0 auto; margin-left: auto; font-family: var(--data); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.card-ledger-delta.plus { color: #2c5c45; }
.card-ledger-delta.minus { color: var(--muted); }

@media (max-width: 620px) {
  .card-list, .card-empty, .card-ledger-list { margin-inline: 18px; }
  .card-row-main { flex-wrap: wrap; }
  .card-ledger-row { flex-wrap: wrap; row-gap: 6px; }
}

/* 进销存（803-r13） */
.sale-items { margin: 10px 0; padding: 10px; border: 1px dashed var(--river-soft); border-radius: 8px; }
.sale-items-title { margin: 0 0 8px; font-size: 12px; color: var(--ink-soft); }
.sale-items-title small { display: block; color: var(--ink-faint); }
.sale-item-row { display: grid; grid-template-columns: minmax(0, 1fr) 68px 104px auto auto; gap: 6px; margin-bottom: 6px; align-items: center; }

/* —— B2-1 一屏收银骨架（仅收银工作台页 + 桌面宽度；放大模式不锁定，B03 zoom 依赖整页滚动）—— */
@media (min-width: 981px) {
  html:not(.text-zoomed) body[data-frontend-page="core.dashboard"] .content-shell {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  html:not(.text-zoomed) body[data-frontend-page="core.dashboard"] .page-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
  }
  html:not(.text-zoomed) body[data-frontend-page="core.dashboard"] .quick-grid .member-info-card {
    position: sticky;
    top: 12px;
    align-self: start;
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
  }
  html:not(.text-zoomed) body[data-frontend-page="core.dashboard"] [data-sale-item-rows] {
    max-height: 320px;
    overflow-y: auto;
  }
}

/* —— B2-3 库存触顶：行金橙警示 + 数量输入红字（服务端仍为准）—— */
.sale-item-row.at-cap {
  background: #fdf8ee;
  box-shadow: inset 3px 0 0 var(--gold);
}
.sale-item-row.at-cap [data-sale-item-qty] {
  color: var(--danger);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* —— B2-2 多件高亮：qty>1 行淡金底 + ×N 徽标（照原型 .sale-line.multi/.sl-count，C04/C06）—— */
.sale-item-row.multi {
  background: #fdf8ee;
  box-shadow: inset 3px 0 0 var(--gold);
}
.sale-item-row.multi [data-sale-item-qty] {
  font-weight: 700;
  color: var(--ink);
}
.sale-item-multi-badge {
  display: inline-block;
  align-self: center;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: #8a6a34;
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sale-item-row {
  grid-template-columns: minmax(0, 1fr) 68px 104px auto auto auto;
}

/* —— B2-4 菜品快捷网格（无库存子功能行业，如餐饮；原型 07-cashier-dining
   .cat-grid/.cat-card 同名类）：无条码区，点卡片把价格并入收款金额 —— */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin: 2px 0 10px;
}
.cat-card {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  text-align: left;
  cursor: pointer;
}
.cat-card:hover { border-color: var(--river); background: var(--paper); }
.cat-card b {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.cat-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.cat-card .cp {
  color: var(--river-dark);
  font-family: var(--data);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cat-card:hover .cp { color: var(--ink); }
.sale-item-row select, .sale-item-row input { font-size: 12px; padding: 6px 7px; }
.sale-item-row-action { padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); color: var(--muted); font-size: 12px; cursor: pointer; }
.sale-item-row-action:hover { color: var(--river); border-color: var(--river-soft); }
.sale-item-row-remove:hover { color: var(--danger); border-color: var(--danger); }
.sale-items-actions { display: flex; align-items: center; gap: 8px; margin: 2px 0 4px; }
.sale-item-add { padding: 6px 10px; border: 1px dashed var(--river-soft); border-radius: 7px; background: var(--white); color: var(--river); font-size: 12px; cursor: pointer; }
.sale-item-add:disabled { border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.sale-items-actions-note { font-size: 11px; color: var(--muted); }
.sale-items-total { margin: 6px 0 0; font-size: 12px; text-align: right; color: var(--ink-soft); }
.sale-items-total strong { color: var(--ink); }
.sale-item-scan { position: relative; margin-bottom: 8px; }
.sale-item-scan input { width: 100%; font-size: 13px; padding: 7px 9px; }
.sale-item-scan-note { margin: 4px 0 0; font-size: 12px; color: var(--ink-soft); }
.sale-item-candidates { display: grid; gap: 2px; max-height: 240px; margin-top: 6px; padding: 4px; border: 1px solid var(--river-soft); border-radius: 8px; background: var(--white); overflow-y: auto; }
.sale-item-candidate { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; width: 100%; padding: 7px 8px; border: 0; border-radius: 6px; background: transparent; text-align: left; font-size: 12px; cursor: pointer; }
.sale-item-candidate b { font-weight: 700; }
.sale-item-candidate small { color: var(--muted); white-space: nowrap; }
.sale-item-candidate:hover, .sale-item-candidate.is-active { background: var(--cloud); box-shadow: inset 0 0 0 2px var(--river-soft); }
.sale-item-candidates-more { margin: 2px 8px; font-size: 11px; color: var(--muted); }
.profit-spec { color: var(--muted); }
.profit-note { margin: 10px 0 0; }
.profit-legacy { margin-left: 6px; padding: 1px 6px; border-radius: 5px; font-size: 11px; color: var(--ink-soft); background: var(--line-soft); }
/* B4-5：经营报表表头点击排序。 */
.sort-link { color: inherit; text-decoration: none; }
.sort-link:hover { color: var(--river-dark); }
.sort-link.sorted { color: var(--river-dark); font-weight: 700; }
td.col-sorted { background: var(--river-soft); }
/* B4-4：对账差异行展开追溯（原型 13-inventory-reconcile.html 差异行追溯；
   以 <details> 静态排查指引实现，不用 alert）。 */
details.diff-trace { margin-top: 6px; }
details.diff-trace summary { cursor: pointer; font-size: 12px; color: var(--river-dark); }
details.diff-trace p { margin: 6px 0 0; padding: 8px 10px; background: #fdf5f4; border: 1px solid #e3b7b0; border-radius: var(--radius-sm); font-size: 12px; color: var(--ink-soft); }

/* B4-2：盘点单列表草稿行金框 + 行内进度（原型 13-inventory-counts.html
   `.cnt-row.is-draft` / `.row-progress`；P14 状态锚点 `.is-draft`/`[data-draft]`）。 */
tr.is-draft td { background: #fffcf5; border-top-color: var(--gold); }
tr.is-draft td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.draft-progress { display: inline-flex; align-items: center; gap: 8px; }
.draft-progress .bar { width: 110px; height: 5px; border-radius: 999px; background: var(--paper); overflow: hidden; display: inline-block; }
.draft-progress .bar i { display: block; height: 100%; background: var(--gold); }
.draft-progress b { font-variant-numeric: tabular-nums; }

/* B4-1：盘点作业页实时反馈。 */
.count-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
tr.row-scanned td { background: var(--gold-soft); transition: background 1.2s ease; }
.count-diff { display: block; color: var(--ink-soft); }
.count-diff.positive { color: #2f6b3a; }
.count-diff.negative { color: #a13333; }
.count-progress { margin: 10px 0 0; }
.count-summary { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 6px 0 12px; padding: 10px 14px; background: var(--cloud); border-radius: var(--radius-sm); font-size: 12px; }
.count-summary span { white-space: nowrap; }
.low-stock-panel { border-color: #d8a24a; padding-bottom: 14px; }
.low-stock-list { list-style: none; margin: 0; padding: 0 24px; }
.low-stock-list li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.low-stock-list li:last-child { border-bottom: 0; }
.low-stock-list strong { font-size: 13px; }
.low-stock-list small { color: var(--ink-faint); }
.low-stock-qty { margin-left: auto; font-weight: 700; color: #966b2d; background: #f4ead7; padding: 2px 8px; border-radius: 5px; font-size: 12px; }
.low-stock-qty.critical { color: #a13333; background: #f6e0e0; }
.low-stock-more { margin: 6px 0 0; font-size: 12px; color: var(--ink-faint); }
.inventory-form { margin: 10px 0 14px; }
.inventory-section-title { margin: 12px 0 6px; font-size: 12px; font-weight: 700; color: var(--river); letter-spacing: 0.05em; }
.inventory-edit .inventory-section-title { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 10px; }
.inventory-edit .inventory-form:first-of-type .inventory-section-title { border-top: 0; margin-top: 4px; padding-top: 0; }
.inventory-create { margin: 12px 0 16px; padding: 14px; background: var(--cloud); border: 1px solid var(--line); border-radius: 12px; }
.inventory-create:not([open]) { display: none; }
.inventory-create > summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--river); user-select: none; }
.inventory-create[open] > summary { margin-bottom: 2px; }
.inventory-sub { margin: 10px 0; padding: 10px 12px; background: #f8faf8; border: 1px dashed var(--line); border-radius: 10px; }
.inventory-sub > summary { cursor: pointer; font-size: 12px; font-weight: 700; color: var(--ink-soft); user-select: none; }
.inventory-sub[open] > summary { margin-bottom: 10px; }
.field-hint { display: block; margin-top: 4px; color: var(--ink-faint); font-size: 11px; }
.form-error-box { margin-bottom: 14px; padding: 10px 14px; color: #a13333; background: #f6e0e0; border: 1px solid #e5b5b5; border-radius: 10px; font-size: 13px; font-weight: 600; }
.inventory-create .inventory-form { margin-bottom: 4px; }
.inventory-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; margin-bottom: 8px; }
.inventory-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--ink-soft); }
.inventory-grid input, .inventory-grid select { padding: 7px 8px; font-size: 13px; }
.inventory-inline { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px 10px; margin-bottom: 8px; align-items: end; }
.inventory-inline label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--ink-soft); }
.checkbox-label { flex-direction: row !important; align-items: center; gap: 6px !important; font-size: 12px !important; }
.inventory-edit summary { cursor: pointer; font-size: 12px; color: var(--river); }
.inventory-edit[open] summary { margin-bottom: 4px; }
.inventory-edit form { border-top: 0; padding-top: 0; }
/* 行内展开区：桌面把三个子表单（采购入库 / 修改资料 / 盘点调整）排成双栏，
   避免纵向堆叠把单行撑到 600px+；容器足够宽时才并排（容器查询），窄屏回落单列。
   用 float 而非 flex/grid（后者在 details[open]@table-cell 内布局异常，子项被错误按单列堆叠、
   百分比基准错乱）；父级用 flow-root 清除浮动。
   密度压缩从 721px 起生效，覆盖“表格模式”的整个区间。 */
@media (min-width: 721px) {
  .inventory-edit[open] { display: flow-root; width: 100%; }
  .inventory-edit[open] > summary { display: block; margin-bottom: 4px; }
  .inventory-edit[open] form { border-top: 0; padding-top: 0; }
  .inventory-edit[open] .inventory-form .inventory-section-title { border-top: 0; margin-top: 2px; padding-top: 0; }
  .inventory-edit[open] .inventory-sub { margin-top: 3px; }
  /* 压缩行内编辑区字段密度：输入框更矮、标签间距更紧、标题紧凑、按钮行紧帖 */
  .inventory-edit[open] .inventory-grid, .inventory-edit[open] .inventory-inline { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; margin-bottom: 4px; }
  .inventory-edit[open] .inventory-grid label, .inventory-edit[open] .inventory-inline label { gap: 1px; font-size: 10.5px; }
  .inventory-edit[open] .inventory-grid input, .inventory-edit[open] .inventory-grid select,
  .inventory-edit[open] .inventory-inline input, .inventory-edit[open] .inventory-inline select { height: 26px; min-height: 26px; padding: 0 6px; font-size: 12px; box-sizing: border-box; }
  .inventory-edit[open] .inventory-grid input[type="checkbox"], .inventory-edit[open] .inventory-inline input[type="checkbox"] { height: 16px; min-height: 16px; width: 16px; padding: 0; }
  .inventory-edit[open] .inventory-grid .spec-unit { height: 26px; }
  .inventory-edit[open] .inventory-grid .spec-unit select { padding: 0 2px; width: auto; flex: 0 0 auto; }
  .inventory-edit[open] .inventory-form .inventory-section-title { font-size: 11px; line-height: 1.2; }
  .inventory-edit[open] .inventory-form button { margin-top: 2px; }
  .inventory-edit[open] .field-hint { margin: 2px 0 0; font-size: 10.5px; }
}
/* 展开区自身宽 ≥ 400px 时才拆双栏：左列「采购入库 + 盘点调整」，右列「修改资料」整高。
   1024px 等窄桌面下第四列过窄，自动回落单列（配合上面密度压缩仍比旧版矮）。 */
@container (min-width: 360px) {
  .inventory-edit[open] form:nth-of-type(1),
  .inventory-edit[open] form:nth-of-type(3) { float: left; width: calc(50% - 7px); margin: 0 0 8px; }
  .inventory-edit[open] form:nth-of-type(2) { float: right; width: calc(50% - 7px); margin: 0 0 8px; }
}
/* 商品信息表格列宽分配：前三列紧凑，第 4 列（入库 / 资料）占大头，容纳双栏行内编辑区。
   固定布局下第四列才有稳定宽度，容器查询也在此区间启用（自动布局 + inline-size 容器
   会让无内容约束的 details 塌缩到极窄）。 */
@media (min-width: 1000px) {
  .inventory-edit[open] { container-type: inline-size; }
  .inventory-table.products-table { table-layout: fixed; }
  .inventory-table.products-table thead th:first-child { width: 210px; }
  .inventory-table.products-table thead th:nth-child(2) { width: 156px; }
  .inventory-table.products-table thead th:nth-child(3) { width: 100px; }
  .inventory-table.products-table td { white-space: normal; overflow-wrap: break-word; }
}
.inventory-table td small { display: block; color: var(--ink-faint); font-size: 11px; }
/* 移动端卡片化：商品/批次/对账/盘点各表在窄屏变为逐商品卡片，
   行内编辑/入库/盘点表单获得全宽——不再挤在横向滚动的表格列里。 */
@media (max-width: 720px) {
  .inventory-table, .inventory-table tbody, .inventory-table tr,
  .inventory-table td { display: block; width: 100%; }
  .inventory-table thead { display: none; }
  .inventory-table tbody { padding: 0 12px 12px; }
  .inventory-table tr { margin-bottom: 10px; padding: 14px; background: #fbfcfa; border: 1px solid var(--line); border-radius: 12px; }
  .inventory-table td { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 6px 0; border: 0; white-space: normal; text-align: right; }
  .inventory-table td::before { content: attr(data-label); color: var(--muted); font-size: 10px; text-align: left; flex: none; }
  .inventory-table td:first-child { padding: 0 0 11px; margin-bottom: 4px; border-bottom: 1px solid var(--line); text-align: left; }
  .inventory-table td:first-child::before { content: none; }
  .inventory-table td[data-label="实盘数"] input,
  .inventory-table td[data-label="到期日"] input { flex: 1 1 auto; min-width: 0; width: auto; }
  .inventory-table td:last-child { padding-top: 10px; border-top: 1px solid var(--line); }
}
.inactive-row { opacity: 0.55; }
.inv-purchase { color: #2e7d4f; background: #e3f1e8; }
.inv-sale { color: #966b2d; background: #f4ead7; }
.inv-sale_reversal { color: #5e6c68; background: #e9eeeb; }
.inv-adjust_in { color: #2e7d4f; background: #e3f1e8; }
.inv-adjust_out { color: #a13333; background: #f6e0e0; }
.inv-loss { color: #a13333; background: #f6e0e0; }
.inventory-filter { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 10px; }
.inventory-filter label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--ink-soft); }
.product-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px 0; }
.product-filter input[type="search"] { flex: 1 1 220px; min-width: 0; height: 36px; }
.product-filter-toggle { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 12px; white-space: nowrap; }
.product-filter [data-product-count] { margin-left: auto; white-space: nowrap; }
/* 「商品录入」入口在页头（主色按钮），表单容器默认收起；
   展开时摘要行左侧显示表单标题、右侧显示「收起」控制。 */
.inventory-create { padding-top: 0; }
.inventory-create > summary { list-style: none; display: none; }
.inventory-create > summary::-webkit-details-marker { display: none; }
.inventory-create[open] > summary.create-collapse {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 6px 4px 0; color: var(--muted); font-size: 12px; cursor: pointer;
}
.inventory-create[open] > summary.create-collapse strong { color: var(--river); font-size: 13px; font-weight: 700; }
.category-dialog { width: min(560px, calc(100vw - 32px)); border-top: 5px solid var(--river); position: fixed; }
.category-manager-body { display: grid; gap: 18px; padding: 0 28px 26px; }
.category-manager-body .inventory-inline { margin-bottom: 0; }
/* 进销存各页页头：标题居左、动作区（页链接 + 主/次按钮）贴右缘 */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin: 0 0 22px; }
.page-head .back-link { margin-bottom: 0; }
.page-head-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.page-head-actions .button { white-space: nowrap; }
.quick-ranges { display: inline-flex; gap: 2px; margin-left: 6px; }
.quick-ranges .text-button { padding: 4px 7px; color: var(--muted); }
.quick-ranges .text-button.active { color: var(--river); font-weight: 800; text-decoration: underline; }
.page-head-actions .button svg { width: 16px; height: 16px; }
/* 分类行内改名：与表格改价同一交互 */
.category-list li { display: flex; align-items: center; gap: 10px; }
.category-rename { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; }
.category-rename input { width: auto; flex: 1 1 180px; min-width: 0; height: 34px; padding: 0 10px; font-size: 12px; }
.category-rename-save { min-height: 34px; padding: 0 9px; border: 1px solid #cbd9d4; border-radius: 8px; background: #fff; color: var(--river); cursor: pointer; font-weight: 800; }
.category-rename-save:hover { background: var(--river); color: #fff; border-color: var(--river); }
.category-state { color: var(--ink-faint); font-size: 11px; }
/* 规格 / 单位组合框：一个视觉输入框，左输入右选量词 */
.spec-unit { display: flex; width: 100%; min-width: 0; border: 1px solid #d6dfda; border-radius: 9px; overflow: hidden; background: #fbfcfa; transition: border-color .12s, box-shadow .12s; }
.spec-unit:focus-within { background: #fff; border-color: var(--jade); box-shadow: 0 0 0 3px rgba(118,161,140,.12); }
.spec-unit input { flex: 1 1 auto; min-width: 0; height: 42px; border: 0; border-radius: 0; background: transparent; }
.spec-unit input:focus { box-shadow: none; }
.spec-unit select { width: auto; min-width: 74px; flex: none; height: 42px; border: 0; border-left: 1px solid #d6dfda; border-radius: 0; background: #f2f6f3; }
.spec-unit select:focus { box-shadow: none; }
.product-filter select { width: auto; min-width: 120px; height: 36px; }
.row-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-bottom: 4px; }
.price-inline { display: inline-flex; align-items: center; gap: 6px; }
.price-inline .input-affix { width: 96px; }
.price-inline .input-affix input { height: 32px; padding: 0 8px; font-size: 12px; }
.price-save { min-height: 32px; padding: 0 9px; border: 1px solid #cbd9d4; border-radius: 8px; background: #fff; color: var(--river); cursor: pointer; font-weight: 800; }
.price-save:hover { background: var(--river); color: #fff; border-color: var(--river); }
@media (max-width: 720px) {
  .inventory-table td[data-label="零售价"] { justify-content: flex-end; }
  .price-inline { flex-wrap: wrap; }
}
.row-actions .text-button { padding: 4px 5px; }
th[data-sort-key] { cursor: pointer; user-select: none; }
th[data-sort-key]:hover { color: var(--river); }
th.sorted-asc::after { content: " ▲"; color: var(--river); }
th.sorted-desc::after { content: " ▼"; color: var(--river); }
.table-pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 12px 14px 16px; }
.barcode-warning { color: #a15a1f; font-weight: 600; }
.batches-view-switch a.active { color: var(--river); font-weight: 800; text-decoration: underline; }
.inventory-inline .button { justify-self: start; }
.inventory-filter select { padding: 6px 8px; font-size: 13px; }
@media (max-width: 720px) {
  .inventory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-inline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-inline label:last-child { grid-column: 1 / -1; }
  .sale-item-row { grid-template-columns: minmax(0, 1fr) 56px 92px auto auto auto; }
}

/* 进销存Ⅲ-A：统计条标签、分类管理列表、划线价、工作台热销面板 */
.metric-strip .strip-label { display: block; color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.category-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.category-list li { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px 4px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }
.category-list li.inactive { opacity: .55; }
.category-list li.empty { border: 0; color: var(--muted); }
.category-list form { margin: 0; }
.line-price { color: var(--muted); margin-right: 4px; font-weight: 400; }
.inventory-stats-panel .top-product-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.inventory-stats-panel .top-product-list li { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.inventory-stats-panel .top-product-list .top-rank { width: 18px; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.inventory-stats-panel .top-product-list small { color: var(--muted); }
.inventory-stats-panel .top-product-list b { margin-left: auto; font-variant-numeric: tabular-nums; }
.inventory-stats-panel .today-sales-line { margin: 10px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 12px; }
.inventory-stats-panel .today-sales-line strong { color: var(--ink); font-size: 14px; }

/* 券-A 电子优惠券：收银选择条 / 结算预览券抵扣行 / 会员详情券面板 */
.coupon-select-row { display: flex; align-items: center; gap: 10px; margin: 8px 0 0; font-size: 13px; }
.coupon-select-row > span { color: var(--muted); white-space: nowrap; }
.coupon-select-row select { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; }
/* 券-A：选中券后扫码渠道不可用，提示条 + 渠道置灰 */
.coupon-channel-note { color: #8a4b12; }
.payment-channels label:has(input[data-coupon-blocked]) { opacity: 0.45; cursor: not-allowed; }

.settlement-details [data-preview-coupon-row] dd { color: #8a4b12; }

.coupons-panel .coupon-list { display: grid; gap: 8px; }
.coupon-row { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; }
.coupon-row-voided, .coupon-row-used, .coupon-row-expired { opacity: .62; background: var(--muted-bg, #f6f7f6); }
.coupon-row-main { display: flex; align-items: baseline; gap: 10px; }
.coupon-row-main strong { font-size: 14px; }
.coupon-status { font-size: 11px; padding: 2px 8px; border-radius: 999px; }
.coupon-status-ok { color: #2c5c45; background: #dceae2; }
.coupon-status-expired, .coupon-status-voided { color: #536762; background: #eef2ee; }
.coupon-status-used { color: #4a4a4a; background: #ececec; }
.coupon-row-meta { display: flex; flex-wrap: wrap; gap: 3px 16px; color: var(--muted); font-size: 12px; }
.coupon-row-amount { font-variant-numeric: tabular-nums; }
.coupon-row-actions { display: flex; justify-content: flex-end; }
.coupon-issue-box { margin-top: 10px; }
.coupon-issue-box summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.coupon-issue-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-top: 8px; }
.coupon-issue-form label { flex: 1; min-width: 220px; display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.coupon-issue-form select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; }

/* 卡种行开关带文字标签 */
.switch-labeled { display: inline-flex; align-items: center; gap: 7px; justify-self: end; }
.switch-labeled small { font-size: 10px; color: var(--muted); white-space: nowrap; }
