:root {
  /* 品牌色：全站唯一主色 */
  --brand: #0f5f5c;
  --brand-2: #127d72;
  --brand-3: #0b4744;
  --brand-4: #0a3a37;
  --brand-ink: #ffffff;
  --brand-ink-soft: #eaf4f2;
  --brand-tint: #eef5f4;
  --line-brand: #d6e6e4;
  --line-brand-strong: #bcd8d4;

  /* 金色：仅用于等级/贵宾标识 */
  --gold: #b08d57;
  --gold-ink: #8a6520;
  --gold-tint: #fdf7ea;
  --gold-line: #ead9b4;
  --gold-bright: #f0d9a8;
  --gold-deep: #4a3417;

  /* 中性色阶：全站唯一一套 */
  --bg: #f4f6f8;
  --panel: #ffffff;
  --surface-2: #f8fafb;
  --surface-3: #eef1f4;
  --ink: #17212b;
  --ink-soft: #5b6673;
  --ink-2: #5b6673;
  --ink-3: #8c96a0;
  --ink-4: #a8b1b9;
  --ink-on-dark: #cdd9d7;
  --line: #e3e8ee;
  --line-soft: #edf1f4;

  /* 语义色 */
  --danger: #c0392b;
  --danger-tint: #fdf4f2;
  --line-danger: #f0cfc9;
  --ok: #1e8449;

  /* 分类色：收款方式与图表图例，仅用于区分 */
  --cat-green: #3d9b71;
  --cat-blue: #4a7fb0;
  --cat-pink: #c96f8d;
  --cat-red: #c85b53;
  --cat-sky: #4a90b8;
  --cat-yellow: #c99544;
  --cat-purple: #7d6cb2;
  --cat-orange: #c88048;
  --cat-blue-tint: #edf2f7;
  --cat-orange-deep: #b87333;

  /* 侧栏（深色导航）*/
  --nav-bg: #16302f;
  --ink-on-dark: #cdd9d7;
  --ink-on-dark-2: #93a8a5;
  --ink-on-dark-3: #7b9290;

  /* 提示 / 等级 */
  --warn: var(--warn);
  --warn-tint: var(--warn-tint);
  --danger-deep: var(--danger-deep);
  --line-strong: #d3dadf;
  --brand-tint-2: #dff0ec;
  --tier-silver: var(--tier-silver);
  --tier-silver-tint: var(--tier-silver-tint);
  --tier-silver-line: var(--tier-silver-line);

  /* 排版：一套字体 + 八级字号 */
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fs-11: 11px;
  --fs-12: 12px;
  --fs-13: 13px;
  --fs-15: 15px;
  --fs-18: 18px;
  --fs-20: 20px;
  --fs-24: 24px;
  --fs-32: 32px;

  --radius: 12px;
  --shadow: 0 10px 30px rgba(23, 33, 43, 0.08);
  --shadow-sm: 0 2px 8px rgba(23, 33, 43, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: var(--fs-13);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-2); text-decoration: none; }

/* ---------- 登录页 ---------- */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background:
    radial-gradient(900px 520px at 8% -5%, rgba(46, 160, 146, 0.55) 0%, transparent 62%),
    radial-gradient(760px 520px at 100% 108%, rgba(176, 141, 87, 0.18) 0%, transparent 58%),
    linear-gradient(145deg, #0a3b39 0%, #0d3138 52%, #101f29 100%);
  overflow-x: hidden;
}
.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.75), transparent 78%);
}
.auth-page::after {
  content: "";
  position: fixed;
  width: 420px;
  height: 420px;
  left: -160px;
  bottom: -190px;
  border-radius: 50%;
  border: 1px solid rgba(240, 217, 168, 0.14);
  box-shadow: 0 0 0 46px rgba(240, 217, 168, 0.04), 0 0 0 92px rgba(240, 217, 168, 0.025);
  pointer-events: none;
}

.auth-shell {
  position: relative;
  width: min(960px, 100%);
  min-height: 560px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 36px 90px rgba(2, 18, 18, 0.45), 0 4px 16px rgba(2, 18, 18, 0.18);
  animation: auth-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes auth-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.auth-brand {
  position: relative;
  padding: 52px 46px 40px;
  color: var(--brand-ink-soft);
  background:
    radial-gradient(520px 360px at 18% 12%, rgba(255, 255, 255, 0.14), transparent 62%),
    linear-gradient(158deg, var(--brand-2) 0%, var(--brand) 46%, var(--brand-3) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.auth-brand::before {
  content: "東";
  position: absolute;
  right: -34px;
  bottom: 42px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 260px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.035);
  pointer-events: none;
}
.auth-brand::after {
  content: "";
  position: absolute;
  right: 44px;
  top: 46px;
  width: 74px;
  height: 74px;
  border: 1px solid rgba(240, 217, 168, 0.22);
  border-radius: 50%;
  box-shadow: 0 0 0 14px rgba(240, 217, 168, 0.04);
}

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  font-size: var(--fs-11);
  letter-spacing: 2.2px;
  color: rgba(234, 246, 244, 0.55);
  text-transform: uppercase;
}
.auth-eyebrow i {
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-bright), transparent);
}

.auth-brand .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  font-size: var(--fs-15);
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--gold-bright), var(--gold));
  color: var(--gold-deep);
  font-weight: 800;
  font-size: var(--fs-15);
  box-shadow: 0 8px 18px rgba(196, 154, 93, 0.28);
}

.auth-brand h1 {
  margin: 40px 0 16px;
  font-size: var(--fs-32);
  line-height: 1.36;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.auth-brand h1 em {
  font-style: normal;
  position: relative;
  color: var(--gold-bright);
}
.auth-brand h1 em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  height: 7px;
  background: linear-gradient(90deg, rgba(240, 217, 168, 0.28), rgba(240, 217, 168, 0.04));
  border-radius: 4px;
  z-index: -1;
}

.auth-brand p {
  color: rgba(234, 246, 244, 0.68);
  line-height: 1.85;
  font-size: var(--fs-13);
  margin: 0;
  max-width: 340px;
}

.auth-points { margin: 32px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.auth-points li {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 34px;
  padding: 0 13px;
  width: fit-content;
  font-size: var(--fs-13);
  color: rgba(234, 246, 244, 0.86);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  backdrop-filter: blur(4px);
}
.auth-points li span {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  border-radius: 50%;
  background: rgba(240, 217, 168, 0.14);
  border: 1px solid rgba(240, 217, 168, 0.55);
  color: var(--gold-bright);
  font-size: var(--fs-11);
  display: grid;
  place-items: center;
}

.auth-foot {
  margin-top: 36px;
  font-size: var(--fs-12);
  letter-spacing: 0.4px;
  color: rgba(234, 246, 244, 0.42);
}

.auth-form-wrap {
  position: relative;
  padding: 44px 48px 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(420px 260px at 100% 0%, rgba(15, 95, 92, 0.05), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--panel) 100%);
}
.auth-form-head { position: relative; margin-bottom: 22px; }
.auth-secure {
  position: absolute;
  right: 0;
  top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 99px;
  background: var(--brand-tint);
  color: var(--brand-2);
  font-size: var(--fs-12);
  letter-spacing: 0.3px;
}
.auth-secure svg { width: 12px; height: 14px; }
.auth-mobile-brand { display: none; }
.auth-form-wrap h2 {
  margin: 0 0 8px;
  font-size: var(--fs-24);
  letter-spacing: 0.6px;
  color: var(--ink);
}
.auth-form-wrap .sub {
  margin: 0;
  color: var(--ink-2);
  font-size: var(--fs-13);
  letter-spacing: 0.2px;
}

.field { margin-bottom: 16px; }
.field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-12);
  color: var(--ink-2);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}
.field input, .field select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  font-size: var(--fs-15);
  color: var(--ink);
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.field input::placeholder { color: var(--ink-4); }
.field select {
  appearance: none;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 19px) 21px, calc(100% - 14px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 38px;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--brand-2);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(18, 125, 114, 0.1);
}

.auth-input { position: relative; }
.auth-input .field-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--ink-3);
  pointer-events: none;
}
.auth-input input { padding-left: 43px; }
.auth-input select { padding-left: 43px; }
.auth-input.pw input { padding-right: 48px; }
.pw-toggle .eye-off { display: none; }
.pw-toggle.on .eye { display: none; }
.pw-toggle.on .eye-off { display: block; }
.pw-toggle {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.pw-toggle:hover { background: var(--brand-tint); color: var(--brand-2); }
.pw-toggle svg { width: 18px; height: 18px; }

.auth-field-hint {
  margin-top: 7px;
  font-size: var(--fs-12);
  line-height: 1.6;
  color: var(--ink-3);
}

/* 企业名称回显：识别到企业后仅显示名称，一行简洁提示 */
.tenant-echo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-ok, #cfe6dd);
  background: var(--ok-tint, #f1f8f5);
  font-size: var(--fs-13);
  line-height: 1.4;
  color: var(--ink-2);
  max-width: 100%;
}
.tenant-echo[hidden] { display: none; }
.tenant-echo > svg { width: 15px; height: 15px; flex: 0 0 15px; color: var(--brand-2, #127d72); }
.tenant-echo strong { font-weight: 600; color: var(--brand-3, #0a3b39); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.auth-alert {
  display: none;
  align-items: flex-start;
  gap: 9px;
  margin: 4px 0 16px;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--line-danger);
  background: var(--danger-tint);
  color: var(--danger);
  font-size: var(--fs-12);
  line-height: 1.5;
}
.auth-alert.show { display: flex; animation: alert-in 0.22s ease-out both; }
.auth-alert svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 2px; }
@keyframes alert-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.btn-primary {
  position: relative;
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand-2) 0%, var(--brand) 100%);
  color: var(--brand-ink);
  font-weight: 600;
  font-size: var(--fs-15);
  letter-spacing: 3px;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.2s, filter 0.2s;
  box-shadow: 0 12px 24px rgba(15, 95, 92, 0.24);
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.18) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 14px 28px rgba(15, 95, 92, 0.3); }
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.65; cursor: not-allowed; box-shadow: none; }

.auth-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 18px 0 0;
  font-size: var(--fs-12);
  color: var(--ink-3);
}
.auth-note svg { width: 13px; height: 14px; }

.auth-register-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 0;
  font-size: var(--fs-12);
  color: var(--ink-3);
  text-decoration: none;
  transition: color 0.15s ease;
}
.auth-register-link b { color: var(--brand-2); font-weight: 600; }
.auth-register-link svg { width: 13px; height: 13px; transition: transform 0.15s ease; }
.auth-register-link:hover { color: var(--brand-2); }
.auth-register-link:hover svg { transform: translateX(2px); }

@media (max-width: 860px) {
  .auth-page { padding: 20px 14px; }
  .auth-shell { min-height: 0; grid-template-columns: 1fr; border-radius: 20px; }
  .auth-brand { display: none; }
  .auth-form-wrap { padding: 30px 24px 26px; }
  .auth-form-wrap h2 { font-size: var(--fs-24); }
  .auth-mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    font-size: var(--fs-13);
    font-weight: 700;
    color: var(--brand-2);
  }
  .auth-mobile-brand .logo-mark { width: 30px; height: 30px; border-radius: 9px; font-size: var(--fs-13); }
  .auth-secure { position: static; width: fit-content; margin-bottom: 12px; }
  .auth-form-head { display: flex; flex-direction: column; margin-bottom: 22px; }
  .auth-form-head h2 { order: 2; }
  .auth-form-head .sub { order: 3; }
  .auth-field-hint { display: none; }
  .field { margin-bottom: 14px; }
  .field input, .field select { height: 46px; }
  .auth-note { margin-top: 14px; }
}

/* ---------- 管理台 ---------- */
.topbar {
  height: 62px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.topbar .brand small { color: var(--ink-soft); font-weight: 400; margin-left: 6px; font-size: var(--fs-12); }
.topbar .right { display: flex; align-items: center; gap: 14px; font-size: var(--fs-13); color: var(--ink-soft); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(140deg, #127d72, #0f5f5c);
  color: #fff; display: grid; place-items: center; font-size: var(--fs-13); font-weight: 600;
}
.role-tag {
  padding: 2px 8px; border-radius: 999px; font-size: var(--fs-12);
  background: var(--brand-tint); color: var(--brand); border: 1px solid var(--line-brand);
}

/* 当前门店标签：总店用金色，分店用青绿色 */
.store-tag {
  padding: 2px 9px; border-radius: 999px; font-size: var(--fs-12); white-space: nowrap;
  background: var(--gold-tint); color: var(--gold-ink); border: 1px solid var(--gold-line);
}
.store-tag.sub { background: var(--brand-tint); color: var(--brand); border-color: var(--line-brand); }

.btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: var(--fs-13);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--surface-2); border-color: var(--line-strong); }
.btn.ghost { border-color: transparent; color: var(--ink-soft); }
.btn.danger { color: var(--danger); border-color: var(--line-danger); background: var(--danger-tint); }
.btn.solid { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.solid:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.sm { height: 28px; padding: 0 10px; font-size: var(--fs-12); border-radius: 7px; }

.page { max-width: 1180px; margin: 0 auto; padding: 22px 22px 60px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.stat-card .k { font-size: var(--fs-12); color: var(--ink-soft); }
.stat-card .v { font-size: var(--fs-24); font-weight: 700; margin-top: 8px; letter-spacing: -0.5px; }
.stat-card .v small { font-size: var(--fs-13); font-weight: 500; color: var(--ink-soft); margin-left: 4px; }
.stat-card .foot { font-size: var(--fs-12); color: var(--ink-soft); margin-top: 8px; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel-head {
  display: flex; gap: 10px; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.panel-head h3 { margin: 0; font-size: var(--fs-15); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters input, .filters select {
  height: 34px; border: 1px solid var(--line); border-radius: 8px;
  padding: 0 10px; background: var(--surface-2); font-size: var(--fs-13);
}
.filters input:focus, .filters select:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(18,125,114,0.1); }
.filters input[type="search"] { width: 210px; }

/* 流水单据筛选条 */
.order-filters {
  padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); gap: 10px;
}
#orderNoKw { width: 158px; }
#orderMemberKw { width: 232px; }
#orderOperatorKw { width: 118px; }
.order-filters select { min-width: 120px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-13); min-width: 860px; }
thead th {
  text-align: left; padding: 11px 12px; background: var(--surface-2);
  color: var(--ink-soft); font-weight: 600; font-size: var(--fs-12); white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
tbody td { padding: 13px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:hover { background: var(--surface-2); }
.cell-name { font-weight: 600; }
.cell-sub { font-size: var(--fs-12); color: var(--ink-soft); margin-top: 3px; }
.num { font-variant-numeric: tabular-nums; }

/* 商品管理二级页：列较多，收紧内边距让操作列完整可见 */
#view-stockNow table, #view-stockIn table, #view-stockOut table, #view-stockCheck table { min-width: 0; }
#view-memberTypes table, #view-memberLevels table { min-width: 0; }
#view-memberTypes td:nth-child(3) { white-space: normal; }
/* 报表中心：两列并排的表格需要能压缩，否则右侧会被挤到屏幕外 */
#view-reports .rep-table { min-width: 0; }
#view-reports .grid2 { align-items: start; }
#view-reports .grid2 > .panel { min-width: 0; }
/* 门店名（如「铁一路店」）不换行，避免会员列表里被挤成两行 */
#view-members tbody td:nth-child(2) { white-space: nowrap; }
.level-input {
  width: 128px; height: 34px; padding: 0 10px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; font-size: var(--fs-13); text-align: right;
  font-variant-numeric: tabular-nums;
}
.level-input[readonly] { background: var(--surface-2); color: var(--ink-soft); }
#view-stockNow thead th, #view-stockNow tbody td,
#view-stockIn thead th, #view-stockIn tbody td,
#view-stockOut thead th, #view-stockOut tbody td,
#view-stockCheck thead th, #view-stockCheck tbody td { padding-left: 8px; padding-right: 8px; }
#view-stockNow .row-actions { gap: 4px; }
#view-stockNow .row-actions .btn.sm { padding: 0 7px; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: var(--fs-12); border: 1px solid; white-space: nowrap; }
.badge.普通 { color: var(--ink-2); border-color: var(--line); background: var(--bg); }
.badge.青铜 { color: #8a5a34; border-color: #e7d5c2; background: #fbf4ec; }
.badge.白银 { color: var(--tier-silver); border-color: var(--tier-silver-line); background: var(--tier-silver-tint); }
.badge.黄金 { color: var(--gold-ink); border-color: var(--gold-line); background: var(--gold-tint); }
.badge.铂金 { color: #46586a; border-color: #cfdae2; background: #f2f7fa; }
.badge.银卡 { color: var(--tier-silver); border-color: var(--tier-silver-line); background: var(--tier-silver-tint); }
.badge.金卡 { color: var(--gold-ink); border-color: var(--gold-line); background: var(--gold-tint); }
.badge.钻石 { color: #0f5f5c; border-color: var(--line-brand-strong); background: var(--brand-tint); }
.badge.储值 { color: #0f5f5c; border-color: var(--line-brand-strong); background: var(--brand-tint); }
.badge.次卡 { color: var(--gold-ink); border-color: var(--gold-line); background: var(--gold-tint); }
.badge.off { color: var(--ink-4); border-color: var(--line); background: var(--surface-2); }

.hint { font-size: var(--fs-12); color: var(--ink-3); margin-top: 5px; line-height: 1.7; }

.row-actions { display: flex; gap: 6px; white-space: nowrap; }

/* 会员列表列较多，操作列固定在右侧，窄窗口也能直接点到「修改」 */
#view-members .table-wrap th:last-child,
#view-members .table-wrap td:last-child {
  position: sticky;
  right: 0;
  background: #fff;
  z-index: 2;
  box-shadow: -8px 0 12px -10px rgba(0, 0, 0, 0.28);
}
#view-members .table-wrap thead th:last-child { background: var(--surface-2); z-index: 3; }
#view-members .table-wrap tbody tr:hover td:last-child { background: var(--surface-2); }
#view-members .table-wrap thead th { padding: 11px 9px; }
#view-members .table-wrap tbody td { padding: 13px 9px; }
#view-members .row-actions { gap: 4px; }
#view-members .row-actions .btn.sm { padding: 0 7px; }

/* ===== 会员列表美化：工具条 / 表头 / 斑马纹 / 数字对齐 / 按钮分级 ===== */
#view-members .panel-head { gap: 12px; }
#view-members .filters { gap: 8px; }
#view-members .filters input, #view-members .filters select {
  height: 34px; border-radius: 8px; background: #fff;
}
#view-members #searchBtn {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
#view-members #searchBtn:hover { background: var(--brand-2); border-color: var(--brand-2); }

/* 表头：品牌浅青底，加深文字对比 */
#view-members thead th {
  background: var(--brand-tint);
  color: var(--brand-3);
  font-weight: 600;
  border-bottom: 1px solid var(--line-brand-strong);
}

/* 斑马纹 + 悬停高亮（sticky 操作列背景同步） */
#view-members tbody tr:nth-child(even) td { background: #f6f9f8; }
#view-members tbody tr:nth-child(even) td:last-child { background: #f6f9f8; }
#view-members tbody tr:hover td { background: var(--brand-tint); }
#view-members tbody tr:hover td:last-child { background: var(--brand-tint); }

/* 数字列右对齐：余额/剩余次数、积分、累计消费 */
#view-members th:nth-child(6), #view-members td:nth-child(6),
#view-members th:nth-child(7), #view-members td:nth-child(7),
#view-members th:nth-child(8), #view-members td:nth-child(8) { text-align: right; }
#view-members td:nth-child(6) .cell-sub,
#view-members td:nth-child(7) .cell-sub,
#view-members td:nth-child(8) .cell-sub { text-align: right; }

/* 操作按钮分级：修改=实心青，记账=青描边浅底，流水=中性，删除=红；等宽居中 */
#view-members .row-actions { gap: 6px; }
#view-members .row-actions .btn.sm {
  min-width: 60px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
}
#view-members .row-actions .btn.sm.primary {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
#view-members .row-actions .btn.sm.primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
#view-members .row-actions .btn.sm.accent {
  background: var(--brand-tint); border-color: var(--line-brand-strong); color: var(--brand);
}
#view-members .row-actions .btn.sm.accent:hover { background: var(--brand-tint-2); border-color: var(--brand-2); }
#view-members .row-actions .btn.sm.plain { background: #fff; color: var(--ink-soft); }
#view-members .row-actions .btn.sm.danger {
  background: var(--danger-tint); border-color: var(--line-danger); color: var(--danger);
}

.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; font-size: var(--fs-13); color: var(--ink-soft); }
.pager .btns { display: flex; gap: 6px; align-items: center; }
.pager .btns .btn { height: 30px; }
.pager b { color: var(--ink); }

.empty { padding: 56px 0; text-align: center; color: var(--ink-soft); font-size: var(--fs-13); }

/* ---------- 弹层 ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(16, 28, 36, 0.42);
  display: none; z-index: 40;
}
.mask.open { display: block; }

.modal {
  position: fixed; z-index: 50; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 32px));
  background: #f7f9f9; border-radius: 14px; box-shadow: var(--shadow);
  display: none; max-height: calc(100vh - 60px); overflow: auto;
}
.modal.open { display: block; }
.modal-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; font-size: var(--fs-15); }
.modal-head .x { border: 0; background: none; font-size: var(--fs-20); line-height: 1; cursor: pointer; color: var(--ink-soft); }
.modal-body { padding: 18px 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- 每日流水 ---------- */
.ledger-modal { width: min(1000px, calc(100vw - 40px)); }
.ledger-body { padding-top: 14px; }
.ledger-bar {
  display: flex; flex-wrap: wrap; gap: 10px;
  align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.ledger-day, .ledger-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ledger-day input[type="date"] {
  height: 32px; padding: 0 9px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff;
  font-size: 12.5px; color: var(--ink);
}
.ledger-filters select {
  height: 32px; padding: 0 8px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff;
  font-size: 12px; color: var(--ink);
}
.ledger-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.ledger-kpi { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.ledger-kpi span { display: block; font-size: 11px; color: var(--ink-4); }
.ledger-kpi b { display: block; margin-top: 3px; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ledger-kpi b small { font-size: 10.5px; margin-right: 1px; }
.ledger-kpi b.gold { color: #b9822b; }
.ledger-kpi b.green { color: #2f6f64; }
.ledger-scroll {
  max-height: min(52vh, 520px); overflow: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
}
.ledger-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ledger-table th {
  position: sticky; top: 0; z-index: 1;
  padding: 8px 10px; background: #f2f6f5; text-align: left;
  font-size: 11.5px; font-weight: 600; color: #5c6c72; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.ledger-table td {
  padding: 8px 10px; border-bottom: 1px solid #eef2f2;
  color: #33434a; vertical-align: top;
}
.ledger-table tbody tr:hover { background: #f8fbfa; }
.ledger-table td.num, .ledger-table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ledger-table td.time { white-space: nowrap; color: #5c6c72; }
.ledger-table td.no { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ledger-table .pay { display: inline-block; padding: 1px 6px; border-radius: 5px; background: #eef5f3; color: #3f7a6f; font-size: 11px; white-space: nowrap; }
.ledger-table .pay.times, .ledger-table .pay.balance { background: #fdf3ea; color: #a5712c; }
.ledger-table .kind { display: inline-block; padding: 1px 6px; border-radius: 5px; background: #eef3f8; color: #4a6a86; font-size: 11px; white-space: nowrap; }
.ledger-table .kind.recharge { background: #eef7ef; color: #3f7a4f; }
.ledger-table .kind.times { background: #fdf3ea; color: #a5712c; }
.ledger-table .clamp { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-table .muted { color: var(--ink-4); }
.ledger-table tfoot td { padding: 9px 10px; font-weight: 700; background: #fafcfb; border-top: 1px solid var(--line); }
.ledger-empty { padding: 36px 12px !important; text-align: center; color: var(--ink-4); font-size: 12px; }
.ledger-hint { margin-top: 8px; font-size: 11px; color: var(--ink-4); }
@media (max-width: 760px) {
  .ledger-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pform-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
.form-field { margin-bottom: 14px; }
.form-field label { display: block; font-size: var(--fs-12); color: var(--ink-soft); margin-bottom: 6px; }
.field-inline-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.field-inline-label label { margin: 0; }
.field-link {
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 11.5px;
  cursor: pointer;
  padding: 0;
}
.field-link:hover { color: var(--brand-2); text-decoration: underline; }
.form-field label .req { color: #d83939; margin-left: 2px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 11px; background: var(--surface-2); font-size: var(--fs-13);
}
.form-field textarea { resize: vertical; min-height: 64px; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--brand-2); background: #fff; box-shadow: 0 0 0 3px rgba(18,125,114,0.1);
}
.form-field .hint { font-size: var(--fs-12); color: var(--ink-3); margin-top: 5px; }
.form-error { color: var(--danger); font-size: var(--fs-13); min-height: 18px; margin: 2px 0 10px; }

/* 次卡绑定扣次项目：一行一个项目 */
.item-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.item-row select { flex: 1 1 auto; min-width: 0; }
.item-row input { width: 88px; flex: 0 0 88px; text-align: center; }
.item-row .btn.sm.danger { flex: 0 0 auto; padding: 6px 10px; }

.seg { display: flex; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button {
  flex: 1; height: 36px; border: 0; background: #fff; cursor: pointer; font-size: var(--fs-13); color: var(--ink-soft);
}
.seg button.on { background: var(--brand); color: #fff; }

.records { max-height: 56vh; overflow: auto; margin-top: 4px; }
.records table { min-width: 0; table-layout: auto; }
.records thead th { position: sticky; top: 0; }
.records th, .records td { white-space: nowrap; padding: 11px 10px; }
.records td:last-child { white-space: normal; }

.drawer {
  position: fixed; z-index: 50; top: 0; right: 0; height: 100vh; width: min(680px, 100vw);
  background: #fff; box-shadow: -20px 0 50px rgba(16,28,36,0.14);
  transform: translateX(102%); transition: transform 0.24s ease; display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; }
.drawer-head h3 { margin: 0 0 4px; font-size: var(--fs-15); }
.drawer-head .meta { font-size: var(--fs-12); color: var(--ink-soft); }
.drawer-head .x { border: 0; background: none; font-size: var(--fs-24); line-height: 1; cursor: pointer; color: var(--ink-soft); }
.drawer-head-actions { display: flex; align-items: center; gap: 10px; }
.drawer-body { padding: 16px 20px; overflow: auto; }

.toast {
  position: fixed; left: 50%; top: 22px; transform: translateX(-50%) translateY(-14px);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 9px; font-size: var(--fs-13);
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 90; max-width: 80vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--danger-deep); }

/* ---------- 前台收银 ---------- */
.front-page { padding-top: 16px; padding-bottom: 84px; }

.front-summary { display: flex; padding: 0; margin-bottom: 14px; overflow: hidden; }
.fs-item {
  flex: 1; min-width: 0; padding: 12px 18px;
  display: flex; align-items: baseline; gap: 6px; border-right: 1px solid var(--line);
}
.fs-item:last-child { border-right: 0; }
.fs-item .k { font-size: var(--fs-12); color: var(--ink-soft); }
.fs-item b { font-size: var(--fs-20); font-variant-numeric: tabular-nums; }
.fs-item small { font-size: var(--fs-12); color: var(--ink-soft); }

.front-layout { display: grid; grid-template-columns: minmax(0, 1fr) 396px; gap: 14px; align-items: stretch; }
.ph-left { display: flex; align-items: baseline; gap: 8px; }
.mini-search {
  height: 30px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px;
  font-size: var(--fs-12); background: var(--surface-2); width: 190px;
}
.mini-search:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(18,125,114,0.1); }

/* 产品区（占满宽度，自身滚动） */
.products-panel { display: flex; flex-direction: column; min-height: 340px; max-height: calc(100vh - 210px); }
.product-zones { flex: 1; min-height: 0; overflow: auto; padding-bottom: 10px; }
.product-zone { padding: 12px 16px 6px; }
.product-zone + .product-zone { border-top: 1px dashed var(--line-soft); margin-top: 4px; }
.zone-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 9px; }
.zone-head h4 { margin: 0; font-size: var(--fs-13); letter-spacing: 1px; color: var(--ink); }
.zone-head h4::before {
  content: ''; display: inline-block; width: 3px; height: 12px; border-radius: 2px;
  background: var(--brand); margin-right: 7px; vertical-align: -1px;
}
.zone-tip { font-size: var(--fs-12); color: var(--ink-4); }
.product-grid {
  flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  grid-auto-rows: min-content; align-content: start; gap: 10px;
}
.product-grid .empty { grid-column: 1 / -1; padding: 70px 0; }
.product-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 0;
  text-align: left; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
/* 图区：无图片字段，用灰色相框占位 */
.p-thumb {
  position: relative; aspect-ratio: 1 / 1; background: #f0f1f3; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.p-ph {
  width: 42%; height: 42%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect x='7' y='11' width='50' height='42' rx='5' fill='%23e4e7ea' stroke='%23c6ccd1' stroke-width='2'/%3E%3Ccircle cx='23' cy='27' r='5' fill='%23c6ccd1'/%3E%3Cpath d='M15 47l11-11 9 9 8-7 10 9z' fill='%23c6ccd1'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: 0.9;
}
.p-img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 后台商品表单：图片选择区 */
.p-image-row { display: flex; gap: 14px; align-items: flex-start; }
.p-image-preview {
  width: 96px; height: 96px; flex: none; border: 1px dashed var(--line); border-radius: 10px;
  background: #f6f7f8; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.p-image-preview img { width: 100%; height: 100%; object-fit: cover; }
.p-image-empty { font-size: var(--fs-12); color: var(--ink-4); }
.p-image-actions { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.p-image-actions input[type='text'] { height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; }
.p-info { padding: 9px 10px 10px; display: flex; flex-direction: column; gap: 3px; }
.product-card.picked { border-color: #e63946; box-shadow: 0 0 0 1.5px rgba(230, 57, 70, 0.55); }
.p-badge {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  min-width: 20px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #e63946; color: #fff; font-size: var(--fs-11); line-height: 18px; text-align: center;
  font-variant-numeric: tabular-nums; box-shadow: 0 2px 6px rgba(230, 57, 70, 0.35);
}
.product-card:hover { border-color: var(--line-brand-strong); box-shadow: 0 6px 16px rgba(15, 95, 92, 0.10); transform: translateY(-1px); }
.product-card.picked:hover { border-color: #e63946; box-shadow: 0 0 0 1.5px rgba(230, 57, 70, 0.55), 0 6px 16px rgba(230, 57, 70, 0.12); }
.product-card:active { transform: translateY(0); }
.product-card .p-name { font-weight: 600; font-size: var(--fs-13); line-height: 1.35; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .p-price { color: #e63946; font-size: var(--fs-15); font-weight: 700; font-variant-numeric: tabular-nums; }
.product-card .p-price small { font-size: var(--fs-11); font-weight: 500; color: var(--ink-soft); margin-left: 2px; }

/* 前台「项目」区：服务项目基本无图，改为紧凑文字卡，一屏能多放一倍 */
.product-zone[data-zone="项目"] .product-grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; }
.product-zone[data-zone="项目"] .product-card { min-height: 72px; justify-content: center; border-radius: 10px; }
.product-zone[data-zone="项目"] .p-thumb { display: none; }
.product-zone[data-zone="项目"] .p-info { padding: 9px 10px; gap: 2px; }
.product-zone[data-zone="项目"] .p-name { font-size: var(--fs-12); }
.product-zone[data-zone="项目"] .p-price { font-size: 14px; }
/* 「次卡可扣」角标：选中次卡会员且该项目在本卡绑定清单内时显示 */
.product-zone[data-zone="项目"] .p-times {
  position: absolute; top: 6px; right: 6px; z-index: 2; pointer-events: none;
  height: 15px; line-height: 15px; padding: 0 5px; border-radius: 4px;
  font-size: 9px; font-weight: 600; letter-spacing: 0.3px;
  color: #0b6f66; background: rgba(18, 125, 114, 0.12); border: 1px solid rgba(18, 125, 114, 0.35);
}
/* 有可扣项目时整组卡片顶部让出角标位，名称不被挤窄 */
.product-zone[data-zone="项目"] .product-grid.times-mode .p-info { padding-top: 22px; }
.product-zone[data-zone="项目"] .p-badge { top: auto; bottom: 6px; right: 6px; }

/* 底部固定结算条：已选件数 + 合计 + 去结算 */
.checkout-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px; background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -8px 22px rgba(15, 60, 58, 0.07);
}
.checkout-bar .cb-left { display: flex; align-items: baseline; gap: 16px; margin-right: auto; min-width: 0; }
.cb-count { font-size: var(--fs-12); color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-total { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.cb-total span { font-size: var(--fs-12); color: var(--ink-soft); }
.cb-total b { font-size: var(--fs-24); color: var(--brand); font-variant-numeric: tabular-nums; }
.cb-total small { font-size: var(--fs-12); color: var(--ink-soft); }
.checkout-bar .btn-primary { width: auto; flex: 0 0 auto; min-width: 132px; padding: 0 28px; letter-spacing: 1px; }

/* 结算弹窗 */
.checkout-modal { width: min(600px, calc(100vw - 32px)); overflow: hidden; display: none; }
.checkout-modal .modal-head { gap: 10px; background: #f7f9f9; }
.checkout-modal .modal-head h3 { margin-right: auto; }
.checkout-modal .modal-body { max-height: calc(100vh - 210px); overflow: auto; }
.checkout-modal .cart-items { max-height: none; }
.checkout-modal .modal-foot { align-items: center; gap: 12px; }
.checkout-modal .modal-foot .footer-total { margin: 0 auto 0 0; }
.checkout-modal .modal-foot .btn-primary { width: auto; flex: 0 0 auto; min-width: 124px; padding: 0 24px; height: 42px; }
.footer-total .ft-label { font-size: var(--fs-12); color: var(--ink-soft); margin-right: 6px; }

/* 右：结算面板（头部固定、内容滚动、合计与按钮固定在底部） */
.cart-panel {
  display: flex; flex-direction: column; position: sticky; top: 74px;
  max-height: calc(100vh - 96px); padding: 0; overflow: hidden;
}
.cart-count { font-size: var(--fs-12); color: var(--ink-soft); }
.cart-body { flex: 1; overflow: auto; padding: 2px 16px 0; }
.co-sec { padding: 10px 0; border-bottom: 1px solid var(--surface-3); }
.co-sec:last-child { border-bottom: 0; }
.cart-items { max-height: 300px; overflow: auto; }

.cart-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 9px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--surface-3); }
.cart-row:last-child { border-bottom: 0; }
.cr-main .cr-name { font-size: var(--fs-13); font-weight: 600; }
/* 服务员工：一行可登记多位，含业绩、轮牌/指定与删除 */
.emp-assign { grid-column: 1 / -1; min-width: 0; padding-top: 2px; }
.ea-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 5px; }
.ea-head > span { font-size: 11px; color: var(--ink-4); white-space: nowrap; }
.ea-sum { margin-left: auto; font-size: 10px; font-weight: 400; color: var(--ink-4); text-align: right; }
.ea-sum.over { color: var(--danger); }
.ea-rows { display: flex; flex-direction: column; gap: 5px; }
.ea-row {
  display: grid;
  grid-template-columns: minmax(96px, 116px) 84px 106px 24px;
  gap: 7px;
  justify-content: space-between;
  align-items: center;
}
.ea-emp {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink-2);
  font-size: 11.5px;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.ea-emp:hover { border-color: var(--line-brand-strong); background: var(--surface-2); }
.ea-emp.on { border-color: var(--line-brand-strong); background: var(--brand-tint); }
.ea-avatar {
  width: 22px;
  height: 22px;
  flex: none;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
}
.ea-avatar.blank { color: var(--brand-2); background: var(--brand-tint); }
.ea-emp-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; flex: 1; }
.ea-emp-txt b { font-weight: 600; font-size: 11.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ea-emp-txt small { font-size: 10px; color: var(--ink-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ea-emp.blank .ea-emp-txt b { color: var(--ink-3); font-weight: 500; }
.ea-pencil { flex: none; color: var(--ink-4); display: inline-flex; }
.ea-perf {
  display: flex;
  align-items: center;
  height: 34px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink-4);
  font-size: 10px;
  overflow: hidden;
}
.ea-perf:focus-within { border-color: var(--brand-2); box-shadow: 0 0 0 2px rgba(18,125,114,.08); }
.ea-perf input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 1px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ea-perf input::placeholder { color: var(--ink-4); font-size: 10.5px; }
.ea-perf.disabled { background: var(--surface-2); opacity: .6; }
.ea-mode {
  display: flex;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
}
.ea-mode button {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-size: 10.5px;
  cursor: pointer;
  padding: 0;
}
.ea-mode button.on { background: var(--brand); color: #fff; font-weight: 600; }
.ea-mode.disabled { opacity: .55; }
.ea-del {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid #f2b8b8;
  border-radius: 50%;
  background: #fde8e8;
  color: #d33d3d;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(191, 61, 61, .08);
}
.ea-del:hover { background: #fbdede; border-color: #eaa3a3; }
.ea-del svg { width: 14px; height: 14px; }
.ea-add {
  height: 29px;
  margin-top: 7px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: .02em;
}
.ea-add:hover { background: var(--brand-2); }
.ea-add:disabled { background: var(--surface-3); color: var(--ink-4); cursor: default; }

.cr-sub { font-size: var(--fs-12); font-variant-numeric: tabular-nums; text-align: right; min-width: 52px; }
.qty-ctrl { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.qty-ctrl button { width: 24px; height: 24px; border: 0; background: #fff; cursor: pointer; color: var(--ink-soft); font-size: var(--fs-13); }
.qty-ctrl button:hover { background: var(--brand-tint); color: var(--brand); }
.qty-ctrl span { min-width: 24px; text-align: center; font-size: var(--fs-12); font-variant-numeric: tabular-nums; }
.cr-del { border: 0; background: none; color: var(--ink-4); cursor: pointer; font-size: var(--fs-15); line-height: 1; padding: 0 2px; }
.cr-del:hover { color: var(--danger); }

.block-title { display: flex; align-items: baseline; gap: 6px; font-size: var(--fs-12); color: var(--ink-soft); margin-bottom: 8px; }
.block-title .opt { font-size: var(--fs-11); color: var(--ink-4); }
#memberKw {
  width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 8px;
  padding: 0 10px; font-size: var(--fs-13); background: var(--surface-2);
}
#memberKw:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(18,125,114,0.1); }
.member-results { position: relative; z-index: 5; }
.member-option {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  padding: 8px 10px; border: 1px solid var(--line); border-top: 0; background: #fff;
  cursor: pointer; font-size: var(--fs-12); text-align: left;
}
.member-option:first-child { margin-top: 6px; border-top: 1px solid var(--line); border-radius: 8px 8px 0 0; }
.member-option:hover { background: var(--surface-2); }
.mo-meta { font-size: var(--fs-12); color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.member-selected {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 9px 12px; border: 1px solid var(--line-brand); background: var(--brand-tint); border-radius: 9px;
}
.ms-name { font-weight: 600; font-size: var(--fs-13); }

.pay-seg { margin-bottom: 7px; }
.pay-seg button:disabled { color: var(--ink-4); background: var(--surface-2); cursor: not-allowed; }
.times-field { margin-top: 10px; }
.remark-field { margin: 0; }

/* 固定底部：应收 + 结算 */
.cart-footer { border-top: 1px solid var(--line); background: #fff; padding: 12px 16px 14px; }
.footer-total { display: flex; align-items: baseline; gap: 5px; margin-bottom: 10px; }
.footer-total span { font-size: var(--fs-12); color: var(--ink-soft); margin-right: auto; }
.footer-total b { font-size: var(--fs-24); color: var(--brand); font-variant-numeric: tabular-nums; }
.footer-total small { font-size: var(--fs-12); color: var(--ink-soft); }

.orders-panel { margin-top: 14px; }
.orders-panel table th:nth-child(1), .orders-panel table td:nth-child(1) { width: 150px; white-space: nowrap; }
.orders-panel table th:nth-child(2), .orders-panel table td:nth-child(2) { width: 158px; white-space: nowrap; }
.orders-panel table th:nth-child(4), .orders-panel table td:nth-child(4) { width: 132px; }
.orders-panel table th:nth-child(5), .orders-panel table td:nth-child(5) { width: 84px; white-space: nowrap; }
.orders-panel table th:nth-child(6), .orders-panel table td:nth-child(6) { width: 96px; white-space: nowrap; }
.orders-panel table th:nth-child(7), .orders-panel table td:nth-child(7) { width: 92px; white-space: nowrap; }
.empty.small { padding: 18px 0; font-size: var(--fs-12); }

/* ---------- 前台工作台（会员 + 收银） ---------- */
.front-page .front-summary { margin-bottom: 12px; }
.front-summary .fs-store { flex: 0 0 auto; background: var(--brand-tint); border-right: 1px solid var(--line); }
.front-summary .fs-store .k { color: var(--brand); font-weight: 600; }
.front-summary .fs-store b { font-size: var(--fs-15); }
.front-summary .fs-item { min-width: 104px; }
.front-summary .fs-item .k,
.front-summary .fs-store .k { white-space: nowrap; }

.member-bar { padding: 14px 16px 15px; margin-bottom: 12px; }
.mb-top { display: flex; align-items: center; gap: 10px; }
.mb-top .btn.solid { height: 38px; flex: 0 0 auto; }
.mb-search { position: relative; display: flex; gap: 8px; flex: 1; min-width: 0; }
.mb-search select {
  height: 38px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface-2); font-size: var(--fs-12); color: var(--ink-soft); cursor: pointer;
}
.member-bar .mb-input {
  flex: 1; min-width: 0; height: 38px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface-2); font-size: var(--fs-13);
}
.member-bar .mb-input:focus,
.mb-search select:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(18,125,114,0.1); }
.mb-tip { font-size: var(--fs-12); color: var(--ink-3); flex: 0 0 auto; }
.mb-results {
  position: absolute; top: 44px; left: 0; right: 0; z-index: 25;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 26px rgba(23,33,43,0.12); overflow: hidden; max-height: 320px; overflow-y: auto;
}
.mb-option {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border: 0; border-bottom: 1px solid var(--surface-3); background: #fff;
  text-align: left; cursor: pointer;
}
.mb-option:last-child { border-bottom: 0; }
.mb-option:hover { background: var(--surface-2); }
.mb-option-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mb-option-main b { font-size: var(--fs-13); }
.mb-option-meta { font-size: var(--fs-12); color: var(--ink-soft); text-align: right; white-space: nowrap; }
.mb-option-meta i { font-style: normal; margin-left: 6px; color: var(--ink-4); }
.mb-option-meta i.warn { color: var(--danger); }
.mb-empty { padding: 12px; font-size: var(--fs-12); color: var(--ink-soft); }

.member-card-wrap { margin-top: 12px; }
.member-empty {
  display: flex; align-items: baseline; gap: 10px; padding: 12px 14px;
  border: 1px dashed var(--line); border-radius: 10px; background: var(--surface-2);
  font-size: var(--fs-13); color: var(--ink-soft);
}
.member-empty b { color: var(--ink); font-weight: 600; }
.member-empty span { font-size: var(--fs-12); color: var(--ink-3); }

.member-card { border: 1px solid var(--line-brand); background: linear-gradient(180deg, var(--brand-tint), #fff 60%); border-radius: 12px; padding: 13px 15px 12px; }
.member-card.off { border-color: var(--line); background: var(--surface-2); }
.mc-head { display: flex; align-items: center; gap: 11px; }
.mc-avatar {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(140deg, #127d72, #0f5f5c); color: #fff; font-weight: 700; font-size: var(--fs-15);
}
.mc-id { flex: 1; min-width: 0; }
.mc-title { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.mc-title b { font-size: var(--fs-15); }
.mc-id .cell-sub { margin-top: 3px; font-size: var(--fs-12); }
.mc-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.mc-stat { background: #fff; border: 1px solid var(--line-soft); border-radius: 9px; padding: 8px 10px; display: flex; align-items: baseline; gap: 4px; }
.mc-stat span { font-size: var(--fs-12); color: var(--ink-soft); }
.mc-stat b { font-size: var(--fs-18); font-variant-numeric: tabular-nums; color: var(--brand); }
.mc-stat small { font-size: var(--fs-11); color: var(--ink-soft); }
.mc-item-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mc-item {
  font-size: var(--fs-12); color: var(--ink-2); background: #fff; border: 1px solid var(--line-soft);
  border-radius: 999px; padding: 3px 10px;
}
.mc-item b { color: var(--brand); font-variant-numeric: tabular-nums; }
.mc-item small { color: var(--ink-4); }

/* ===== 前台会员卡：深色卡（参照会员卡样式） ===== */
.member-card.mc-dark {
  background: linear-gradient(160deg, #34393f 0%, #222529 100%);
  border: 1px solid #3d434a;
  color: #f2f4f5;
  padding: 15px 16px 13px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.member-card.mc-dark.off { opacity: 0.6; background: linear-gradient(160deg, #2c2f33, #1e2023); }
.mc-dark .mcd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.mc-dark .mcd-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mc-dark .mcd-title b { font-size: 19px; font-weight: 700; color: #fff; letter-spacing: 0.5px; }
.mc-dark .mcd-no { color: #e8c88a; font-size: 13px; font-weight: 600; letter-spacing: 1px; white-space: nowrap; padding-top: 2px; }
.mc-dark .mcd-sub { margin-top: 6px; font-size: var(--fs-12); color: #a9b2b8; }
.mc-dark .mcd-expiry { margin-top: 8px; font-size: var(--fs-12); color: #c8cfd4; text-align: right; }
.mc-dark .mcd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.mc-dark .mcd-cell {
  background: rgba(255, 255, 255, 0.07); border-radius: 10px; padding: 10px 11px;
  display: flex; flex-direction: column; gap: 3px;
}
.mc-dark .mcd-cell span { font-size: var(--fs-12); color: #a9b2b8; }
.mc-dark .mcd-cell b { font-size: 17px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.mc-dark .mcd-cell b i { font-style: normal; font-size: var(--fs-12); color: #a9b2b8; margin-left: 3px; font-weight: 500; }
/* 徽章在深底上统一为半透明金 */
.mc-dark .badge { background: rgba(232, 200, 138, 0.16); border-color: rgba(232, 200, 138, 0.35); color: #e8c88a; }
.mc-dark .badge.off { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); color: #c8cfd4; }
/* 疗程卡 chips / 项目剩余 在深底上的适配 */
.mc-dark .mc-card-list { border-top-color: rgba(255, 255, 255, 0.12); }
.mc-dark .mc-card-label { color: #a9b2b8; }
.mc-dark .mc-card-chip { background: rgba(232, 200, 138, 0.15); border-color: rgba(232, 200, 138, 0.4); color: #e8c88a; }
.mc-dark .mc-card-chip:hover { background: rgba(232, 200, 138, 0.25); }
.mc-dark .mc-item { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.12); color: #d8dde0; }
.mc-dark .mc-item b { color: #e8c88a; }
.mc-dark .mc-item small { color: #8f989e; }

.cart-member { padding: 8px 10px; border: 1px solid var(--line-soft); background: var(--surface-2); border-radius: 8px; display: flex; flex-direction: column; gap: 2px; }
.cm-name { font-size: var(--fs-13); font-weight: 600; }
.cart-footer .form-error { margin: 6px 0 0; min-height: 0; font-size: var(--fs-12); }
.cart-footer .btn-primary { width: 100%; height: 42px; }

.front-page .products-panel { max-height: calc(100vh - 350px); min-height: 320px; }

.txn-member {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; margin-bottom: 14px;
  background: var(--brand-tint); border: 1px solid var(--brand-tint-2); border-radius: 9px; font-size: var(--fs-12); color: var(--ink-soft);
}
.txn-member b { font-size: var(--fs-15); color: var(--ink); }
.item-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.item-row select { flex: 1; min-width: 0; height: 34px; border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; background: var(--surface-2); }
.item-row input { width: 84px; height: 34px; border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; background: var(--surface-2); }
.item-row .unit { font-size: var(--fs-12); color: var(--ink-soft); }

.member-modal, .txn-modal { width: min(640px, calc(100vw - 32px)); }
.receipt-modal { width: min(460px, calc(100vw - 32px)); }

/* 结账窗口 */
.checkout-modal { width: min(560px, calc(100vw - 32px)); }
.ck-top {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 14px; margin-bottom: 12px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
}
.ck-member { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; min-width: 0; }
.ck-m-name { font-weight: 700; font-size: var(--fs-15); }
.ck-m-balance { font-size: var(--fs-12); color: var(--brand); font-variant-numeric: tabular-nums; }
.ck-total { text-align: right; white-space: nowrap; }
.ck-total span { display: block; font-size: var(--fs-12); color: var(--ink-3); }
.ck-total b { font-size: var(--fs-24); color: var(--brand); font-variant-numeric: tabular-nums; }
.ck-total-val { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.ck-speak {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 30px; height: 30px; padding: 0; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--brand-3);
}
.ck-speak:hover { background: var(--surface-2); }
.ck-speak:active { transform: scale(0.96); }
.ck-speak.speaking { animation: ckSpeakPulse 0.9s ease-out 2; }
@keyframes ckSpeakPulse {
  0% { box-shadow: 0 0 0 0 rgba(18, 125, 114, 0.35); }
  100% { box-shadow: 0 0 0 10px rgba(18, 125, 114, 0); }
}
.ck-items { max-height: 168px; overflow: auto; border-top: 1px dashed var(--line-soft); border-bottom: 1px dashed var(--line-soft); padding: 6px 0; margin-bottom: 12px; }
.ck-line { display: flex; align-items: baseline; gap: 10px; padding: 5px 2px; font-size: var(--fs-12); }
.ck-line-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-line-qty { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ck-line-sub { min-width: 74px; text-align: right; font-variant-numeric: tabular-nums; }
.ck-line-wrap { padding: 2px 0 4px; border-bottom: 1px dashed var(--surface-3); }
.ck-line-wrap:last-child { border-bottom: 0; }
.ck-line-emp { padding: 0 2px 2px 0; font-size: 10.5px; color: var(--brand-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-pay { margin-bottom: 8px; }
.ck-cash[hidden] { display: none; }
.ck-cash { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 10px; margin: 10px 0 12px; }
.ck-cash-row {
  box-sizing: border-box; display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
}
.ck-cash-row label { font-size: var(--fs-12); color: var(--ink-soft); white-space: nowrap; }
.ck-cash-row input { flex: 1; min-width: 0; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; text-align: right; font-variant-numeric: tabular-nums; }
.ck-cash-row span { font-size: var(--fs-12); color: var(--ink-soft); white-space: nowrap; }
.ck-cash-chips { grid-column: 1 / -1; display: flex; gap: 8px; }
.ck-cash-chips button {
  flex: 1; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink-2); font-size: var(--fs-12); cursor: pointer;
  font-variant-numeric: tabular-nums; transition: border-color .15s, color .15s, background .15s;
}
.ck-cash-chips button:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); }
.ck-remark { margin: 2px 0 4px; }
.ck-remark-toggle {
  border: 0; background: none; padding: 2px 0; color: var(--ink-3); font-size: var(--fs-12);
  cursor: pointer;
}
.ck-remark-toggle:hover { color: var(--brand); }
.ck-remark input { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; }
.ck-kbd-hint { margin-right: auto; font-size: 11px; color: var(--ink-3); letter-spacing: .2px; white-space: nowrap; }
.ck-change { font-size: var(--fs-18); color: var(--ok); font-variant-numeric: tabular-nums; }
.ck-change.short { color: var(--danger); font-size: var(--fs-15); }
.receipt-modal .modal-body { padding: 18px 20px 8px; }
.receipt-modal .modal-foot { align-items: center; }
.receipt-modal .modal-foot .btn { height: 42px; padding: 0 18px; }
.receipt-modal .modal-foot .btn-primary { width: auto; height: 42px; padding: 0 24px; flex: 0 0 auto; }
.rc-tpl { font-size: var(--fs-13); color: var(--ink); }
.rc-tpl .ps-line { padding: 3px 0; }
.rc-no { font-size: var(--fs-20); font-weight: 700; letter-spacing: 0.5px; color: var(--brand); font-variant-numeric: tabular-nums; }
.rc-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 14px; font-size: var(--fs-12); color: var(--ink-3); }
.rc-line { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: var(--fs-12); }
.rc-line span { color: var(--ink-soft); }
.rc-items { margin: 12px 0; border-top: 1px dashed var(--line-soft); border-bottom: 1px dashed var(--line-soft); padding: 8px 0; }
.rc-item { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: var(--fs-12); }
.rc-item b { font-variant-numeric: tabular-nums; }
.rc-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0 2px; }
.rc-total span { font-size: var(--fs-12); color: var(--ink-soft); }
.rc-total b { font-size: var(--fs-24); color: var(--brand); font-variant-numeric: tabular-nums; }
.rc-up { margin-top: 8px; font-size: var(--fs-12); color: var(--gold-ink); background: var(--gold-tint); border: 1px solid var(--gold-line); border-radius: 8px; padding: 6px 10px; }
.rc-foot { margin-top: 10px; font-size: var(--fs-12); color: var(--ink-3); text-align: center; }

@media (max-width: 880px) {
  .mb-top { flex-wrap: wrap; }
  .mb-tip { display: none; }
  .mb-search { flex: 1 1 100%; }
  .mc-head { flex-wrap: wrap; }
  .mc-actions { width: 100%; justify-content: flex-start; }
  .mc-stats { grid-template-columns: 1fr 1fr; }
  .mc-dark .mcd-grid { grid-template-columns: 1fr 1fr; }
  .front-page .products-panel { max-height: none; min-height: 0; }
  .cart-panel { position: static; max-height: none; }
  .front-layout { grid-template-columns: minmax(0, 1fr); }

  /* 窄屏：概览条两列换行，避免标签竖排挤压 */
  .front-summary { flex-wrap: wrap; }
  .fs-item { flex: 1 1 44%; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .fs-item b { font-size: var(--fs-18); }
  .topbar .brand small { display: none; }
  .topbar .role-tag { display: none; }
  .checkout-bar { padding: 8px 14px; gap: 8px; }
  .checkout-modal .modal-body { max-height: calc(100vh - 180px); }
}

/* ---------- 管理台侧边栏框架（仅 app.html，.layout 作用域，不影响前台） ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 218px; flex: 0 0 218px; background: var(--nav-bg); color: var(--ink-on-dark);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side-logo { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.side-logo .logo-mark { background: linear-gradient(140deg, var(--brand-2), var(--brand)); color: #fff; }
.side-title { font-weight: 700; color: #fff; font-size: var(--fs-15); }
.side-sub { font-size: var(--fs-11); color: var(--ink-on-dark-2); margin-top: 2px; }
.side-menu { padding: 12px 10px; }
.menu-group { font-size: var(--fs-12); color: var(--ink-on-dark-3); padding: 14px 10px 6px; letter-spacing: 1px; }
.menu-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  color: var(--ink-on-dark); font-size: var(--fs-13); cursor: pointer; margin-bottom: 2px;
}
.menu-item:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.menu-item.on { background: var(--brand-2); color: #fff; }
.menu-item.disabled { opacity: 0.45; cursor: not-allowed; }
.menu-item.disabled:hover { background: none; color: var(--ink-on-dark); }
.mi-icon { width: 18px; text-align: center; font-size: var(--fs-15); }

/* 订单二级菜单 */
.menu-group.has-sub { padding: 0; letter-spacing: 0; }
.sub-toggle { font-size: var(--fs-15); font-weight: 600; }
.submenu .menu-item { font-size: var(--fs-12); }
.sub-toggle .caret { margin-left: auto; font-size: var(--fs-11); transition: transform 0.15s; opacity: 0.7; }
.menu-group.has-sub.open .caret { transform: rotate(180deg); }
.submenu { display: none; padding-left: 20px; }
.side-menu > .menu-group.has-sub > .submenu {
  margin-left: 12px; padding-left: 8px; border-left: 1px solid rgba(255, 255, 255, 0.09);
}
.sub-nested { font-size: var(--fs-15); font-weight: 500; }
.submenu .menu-group.has-sub { padding: 0; }
.menu-group.has-sub.open .submenu { display: block; }

/* 单据管理 */
.doc-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.doc-tab { border: 0; background: transparent; padding: 10px 16px; font-size: var(--fs-13); color: var(--ink-soft); cursor: pointer; border-bottom: 2px solid transparent; }
.doc-tab.on { color: var(--brand-2); border-bottom-color: var(--brand-2); font-weight: 600; }
.doc-filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.doc-quick { display: flex; gap: 8px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 16px; font-size: var(--fs-13); cursor: pointer; color: var(--ink-soft); }
.chip.on { background: var(--brand-2); color: #fff; border-color: var(--brand-2); }
.doc-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.doc-row label { display: flex; align-items: center; gap: 8px; font-size: var(--fs-13); color: var(--ink-soft); }
.doc-row input { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: var(--fs-13); min-width: 150px; }
.doc-actions { gap: 10px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: var(--fs-13); }
.doc-table th, .doc-table td { padding: 10px 12px; border-bottom: 1px solid var(--surface-3); text-align: left; white-space: nowrap; }
.doc-table th { background: var(--surface-2); color: var(--ink-soft); font-weight: 500; }
.doc-pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: var(--fs-13); color: var(--ink-soft); }
.doc-pagebtns { display: flex; gap: 6px; }
.doc-pg { min-width: 30px; height: 30px; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; }
.doc-pg.on { background: var(--brand-2); color: #fff; border-color: var(--brand-2); }
.btn.small { padding: 4px 12px; font-size: var(--fs-12); }
.doc-table .num.muted { color: var(--ink-soft); }
.doc-table .num.strong { font-weight: 600; color: var(--ink); }
.rch-table { min-width: 0; }
.rch-table th, .rch-table td { padding: 8px 8px; }
/* 充次 / 会员卡单据列多，收紧横向留白，1440 宽下尽量不出现横向滚动 */
.tm-table th, .tm-table td, .cd-table th, .cd-table td { padding: 8px 7px; }
.cd-table { min-width: 0; }
.cd-table td:last-child, .tm-table td:nth-last-child(2) { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.xc-filters { gap: 10px; margin-bottom: 14px; }
.xc-table { min-width: 1680px; border-spacing: 0; }
.xc-table th, .xc-table td { padding: 11px 12px; border-bottom: 1px solid var(--surface-3); vertical-align: middle; }
.xc-table thead th { font-size: var(--fs-12); color: var(--ink-soft); font-weight: 500; background: var(--surface-2); }
.xc-table .xc-group-title { text-align: center; color: var(--ink); font-weight: 600; }
.xc-sub-head th { background: var(--surface-3) !important; color: var(--ink-soft); font-weight: 400; font-size: var(--fs-12); }
.xc-row { background: #fff; }
.xc-row:hover { background: var(--surface-2); }
.xc-time { white-space: nowrap; }
.xc-no { font-weight: 600; color: var(--brand); font-variant-numeric: tabular-nums; }
.xc-store { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--brand-tint); color: var(--brand); font-size: var(--fs-12); }
.xc-member { font-weight: 600; }
.xc-pay { display: inline-flex; padding: 2px 9px; border-radius: 6px; background: var(--surface-2); color: var(--ink-soft); font-size: var(--fs-12); }
.xc-total { font-weight: 700; color: var(--ink); font-size: var(--fs-15); }
.xc-item-name { font-weight: 500; }
.xc-qty, .xc-times { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); color: var(--ink-soft); font-size: var(--fs-12); }
.xc-employee { font-weight: 500; }
.xc-commission { color: var(--brand); font-weight: 600; }
.xc-buyer { white-space: nowrap; }
.xc-stat { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 8px; background: var(--surface-2); color: var(--ink-soft); font-size: var(--fs-13); font-variant-numeric: tabular-nums; }
.xc-stat:first-child { color: var(--brand); font-weight: 600; }
.xc-empty { padding: 52px 0 !important; }
.xc-empty-icon { width: 46px; height: 46px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: var(--surface-2); color: var(--ink-soft); font-size: 22px; }
.xc-empty span { display: block; margin-top: 6px; font-size: var(--fs-12); color: var(--ink-4); }
#xcPageBtns { display: flex; gap: 6px; }

/* 充值单据：赠送物品弹窗 */
.gift-doc-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: var(--fs-12); color: var(--ink-soft); margin-bottom: 14px; }
.gift-doc-meta span { white-space: nowrap; }
.gift-table { min-width: 0; }
.gift-table th, .gift-table td { padding: 9px 10px; }
.gift-doc-total { margin-top: 14px; text-align: right; font-size: var(--fs-13); font-weight: 600; color: var(--ink); }

/* 前台设置：支付设置 */
.settings-block { padding: 6px 4px; }
.sb-head { font-size: var(--fs-15); font-weight: 600; color: var(--ink); padding: 8px 2px 14px; display: flex; justify-content: space-between; align-items: center; }
.sb-fold { color: var(--ink-soft); font-size: var(--fs-13); }
.pay-grid { display: flex; gap: 14px; flex-wrap: wrap; }
.pay-card { width: 84px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; transition: all 0.12s; }
.pay-card:hover { border-color: var(--line-brand-strong); }
.pay-card.on { border-color: var(--brand-2); box-shadow: 0 0 0 1px var(--brand-2) inset; }
.pay-ico { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: var(--fs-24); color: #fff; }
.pay-ico.c-green { background: var(--cat-green); }
.pay-ico.c-yellow { background: var(--cat-yellow); }
.pay-ico.c-blue { background: var(--cat-blue); }
.pay-ico.c-purple { background: var(--cat-purple); }
.pay-ico.c-orange { background: var(--cat-orange); }
.pay-ico.c-pink { background: var(--cat-pink); }
.pay-ico.c-red { background: var(--cat-red); }
.pay-ico.c-sky { background: var(--cat-sky); }
.pay-name { font-size: var(--fs-13); color: var(--ink); }
.pay-add { color: var(--ink-4); font-size: var(--fs-24); justify-content: center; }
.pay-card { position: relative; }
.pay-del { position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; border: 0; background: var(--surface-3); color: var(--ink-3); border-radius: 50%; cursor: pointer; font-size: var(--fs-12); line-height: 1; }
.pay-del:hover { background: var(--danger); color: #fff; }
.pay-add-row { display: flex; gap: 10px; margin-top: 14px; align-items: center; }
.pay-add-row input { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; min-width: 220px; font-size: var(--fs-13); }
.sb-footer { margin-top: 16px; display: flex; align-items: center; gap: 14px; }
/* 前台设置：安全设置 */
.sec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 0 18px; max-width: 560px; padding-top: 2px; }
.sec-grid .form-field { margin-bottom: 10px; }
.sec-grid .form-field input:disabled { background: var(--surface-3); color: var(--ink-3); }
@media (max-width: 640px) { .sec-grid { grid-template-columns: 1fr; max-width: 100%; } }

/* 前台设置：打印设置 */
.set-tabs { display: flex; gap: 6px; margin: 2px 2px 16px; border-bottom: 1px solid var(--line); }
.set-tab {
  border: 0; background: none; padding: 9px 16px; font-size: var(--fs-13); color: var(--ink-soft);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.set-tab:hover { color: var(--ink); }
.set-tab.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.set-pane[hidden] { display: none; }

.print-wrap { max-width: 780px; }
.print-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 2px 0 16px; }
.print-intro b { display: block; font-size: var(--fs-15); margin-bottom: 4px; }
.print-intro .cell-sub { line-height: 1.7; }
.pr-chip {
  flex: none; font-size: var(--fs-12); padding: 5px 10px; border-radius: 999px;
  background: rgba(15, 95, 92, 0.08); color: var(--brand); white-space: nowrap;
}
.print-block {
  border: 1px solid var(--line); border-radius: 14px; background: #fff;
  padding: 14px 22px 8px; margin-bottom: 16px; transition: background 0.15s;
}
.print-block.off { background: var(--surface-2); }
.pb-head {
  display: flex; align-items: center; gap: 12px; padding-bottom: 10px;
  border-bottom: 1px dashed var(--line-soft); margin-bottom: 4px;
}
.pb-title { font-size: var(--fs-15); font-weight: 600; color: var(--ink); }
.pb-badge {
  margin-left: auto; font-size: var(--fs-12); padding: 3px 10px; border-radius: 999px;
  background: var(--surface-3); color: var(--ink-3);
}
.print-block:not(.off) .pb-badge { background: rgba(15, 95, 92, 0.1); color: var(--brand); }
.print-block:not(.off) .pb-badge.pending { background: var(--warn-tint); color: var(--warn); }
.pr-row { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 14px; padding: 9px 0; }
.pr-label { font-size: var(--fs-13); color: var(--ink-soft); text-align: right; }
.pr-ctrl { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; }
.pr-ctrl select, .pr-ctrl input[data-field="device"] {
  height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px;
  font-size: var(--fs-12); background: #fff; color: var(--ink);
}
.pr-ctrl select { width: 132px; }
.pr-ctrl input[data-field="device"] { width: 300px; max-width: 100%; }
.stepper { display: inline-flex; align-items: center; height: 34px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.stepper button { width: 32px; height: 32px; border: 0; background: var(--surface-2); color: var(--ink-soft); cursor: pointer; font-size: var(--fs-15); }
.stepper button:hover { background: var(--brand-tint); color: var(--ink); }
.stepper input { width: 58px; height: 32px; border: 0; text-align: center; font-size: var(--fs-13); font-variant-numeric: tabular-nums; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.radio { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-12); cursor: pointer; }
.radio input { accent-color: var(--brand); }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-12); cursor: pointer; color: var(--ink); }
.chk input { accent-color: var(--brand); width: 15px; height: 15px; }
.pr-funcs { gap: 10px 18px; }
.pr-row-funcs { align-items: flex-start; }
.print-block.off .pr-row { opacity: 0.55; }
.print-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.print-btns { display: flex; gap: 10px; }
.print-tpl-panel .form-field { margin: 0 0 12px; }
.print-tpl-panel .form-field:first-of-type { margin-top: 8px; }
.print-tpl-panel #tplScenario { width: 190px; }
.print-tpl-panel .pr-row { align-items: flex-start; }
.print-tpl-panel .pr-ctrl { flex: 1; }


/* 测试打印预览 */
.print-preview-modal { width: min(420px, calc(100vw - 32px)); }
.print-stage { display: flex; justify-content: center; padding: 10px 0 4px; background: var(--surface-2); border-radius: 12px; overflow-x: auto; }
.print-sheet { background: #fff; padding: 14px 12px; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08); font-size: var(--fs-12); color: var(--ink); line-height: 1.5; }
.print-sheet.paper-58 { width: 58mm; }
.print-sheet.paper-80 { width: 80mm; }
.ps-center { text-align: center; }
.ps-bold { font-weight: 700; }
.ps-lg { font-size: var(--fs-15); margin-bottom: 2px; }
.ps-sub { font-size: var(--fs-11); color: var(--ink-2); }
.ps-hr { border-top: 1px dashed var(--line); margin: 6px 0; }
.ps-line { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; font-variant-numeric: tabular-nums; }

#printArea { display: none; }
@media print {
  body.printing > *:not(#printArea) { display: none !important; }
  #printArea { display: block !important; }
}

/* 前台设置弹窗（账号密码 / 打印机） */
.settings-modal { width: min(560px, calc(100vw - 32px)); }
.settings-modal .set-tabs { margin-bottom: 16px; }
.settings-modal .pane-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.settings-modal .pane-actions .btn { flex: 0 0 auto; white-space: nowrap; }
.settings-modal .pane-actions .btn-primary { width: auto; height: 38px; padding: 0 24px; flex: 0 0 auto; }
.print-row { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.print-row:last-of-type { border-bottom: 0; }
.print-row .pr-label { text-align: right; }
#paperSeg button { min-width: 76px; padding: 7px 12px; }
#printerSelect { min-width: 240px; max-width: 100%; }
#voiceSelect { width: 240px; max-width: 100%; }
#voiceRepeatSeg { justify-self: start; }
#voiceRepeatSeg button { min-width: 72px; }

/* 前台小票打印：屏幕上隐藏，打印时只输出 #posPrintArea */
#posPrintArea { display: none; }
@media print {
  body.pos-printing > *:not(#posPrintArea) { display: none !important; }
  #posPrintArea { display: block !important; width: 58mm; padding: 0 2mm; background: #fff; color: #000; }
  #posPrintArea.paper-80 { width: 80mm; }
  #posPrintArea .ps-hr { border-top: 1px dashed #000; }
  #posPrintArea .ps-sub { color: #000; }
  #posPrintArea .ps-line { font-variant-numeric: tabular-nums; }
  #posPrintArea .ps-item { margin: 5px 0; }
  #posPrintArea .ps-item-name { line-height: 1.35; word-break: break-all; }
  @page { margin: 4mm 0; }
}

.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.layout .topbar {
  background: linear-gradient(90deg, var(--brand-3), var(--brand-2)); color: #fff; border-bottom: 0; height: 58px;
}
.layout .topbar .right { color: rgba(255, 255, 255, 0.92); }
.layout .topbar .btn.ghost { color: #fff; background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.34); }
.layout .topbar .btn.ghost:hover { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.52); }
.layout .topbar .store-tag, .layout .topbar .role-tag { background: rgba(255, 255, 255, 0.16); color: #fff; border-color: transparent; }
.crumb { font-size: var(--fs-15); font-weight: 600; }

.content { flex: 1; padding: 18px 20px 40px; }
.view { display: none; }
.view.active { display: block; }

/* 首页仪表盘 */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
.dash-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dash-rail { display: flex; flex-direction: column; gap: 16px; }
.dash-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 6px 18px 18px; }
.dash-card { display: flex; gap: 12px; align-items: center; border-radius: 12px; padding: 16px; }
.dc-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-size: var(--fs-20); color: #fff; flex: 0 0 42px; }
.dc-v { font-size: var(--fs-24); font-weight: 700; font-variant-numeric: tabular-nums; }
.dc-k { font-size: var(--fs-12); color: var(--ink-soft); margin-top: 2px; }
.dash-card { background: var(--surface-2); border: 1px solid var(--line-soft); }
.dash-card.c-green .dc-icon { background: var(--cat-green); }
.dash-card.c-yellow .dc-icon { background: var(--cat-yellow); }
.dash-card.c-blue .dc-icon { background: var(--cat-blue); }
.dash-card.c-purple .dc-icon { background: var(--cat-purple); }
.dash-card.c-red .dc-icon { background: var(--cat-red); }
.dash-card.c-orange .dc-icon { background: var(--cat-orange); }

.range-seg { background: var(--surface-3); padding: 3px; border-radius: 8px; }
.range-seg button { border: 0; background: transparent; padding: 5px 14px; border-radius: 6px; cursor: pointer; font-size: var(--fs-12); color: var(--ink-soft); }
.range-seg button.on { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); }

.chart-wrap { padding: 10px 14px 0; }
.chart-legend { display: flex; gap: 18px; padding: 8px 18px 14px; font-size: var(--fs-12); color: var(--ink-soft); justify-content: center; }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg-orange { color: var(--cat-orange); } .lg-green { color: var(--cat-green); } .lg-blue { color: var(--cat-blue); }

.notice-list { padding: 6px 18px 16px; }
.notice-item { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.notice-item:last-child { border-bottom: 0; }
.notice-title { font-weight: 600; font-size: var(--fs-13); }
.notice-sub { font-size: var(--fs-12); color: var(--ink-soft); margin-top: 4px; line-height: 1.6; }
.more-link { font-size: var(--fs-12); color: var(--brand-2); cursor: pointer; }

.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 14px 18px 18px; }
.quick-item { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; font-size: var(--fs-12); color: var(--ink-soft); }
.quick-item.disabled { opacity: 0.5; cursor: not-allowed; }
.qi { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: var(--fs-20); color: #fff; }
.qi.c-green { background: var(--cat-green); } .qi.c-blue { background: var(--cat-blue); } .qi.c-purple { background: var(--cat-purple); }

.promo-card { border-radius: 12px; padding: 20px 18px; color: #fff; background: linear-gradient(140deg, var(--brand-3), var(--brand-4)); }
.promo-title { font-size: var(--fs-18); font-weight: 700; }
.promo-sub { font-size: var(--fs-12); margin-top: 10px; line-height: 1.8; opacity: 0.9; }

.tabs { display: flex; gap: 4px; padding: 12px 18px 0; }
.tabs button { border: 0; background: transparent; padding: 6px 14px; cursor: pointer; font-size: var(--fs-13); color: var(--ink-soft); border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }

@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .sidebar { width: 64px; flex-basis: 64px; }
  .side-title, .side-sub, .menu-group { display: none; }
  .menu-item { justify-content: center; font-size: 0; }
  .dash-cards { grid-template-columns: 1fr 1fr; }
}

/* ---------- 商品录入弹窗 ---------- */
#productModal { width: min(640px, calc(100vw - 32px)); }
#productModal.open { display: flex; flex-direction: column; overflow: hidden; }
#productModal .modal-body { overflow-y: auto; flex: 1 1 auto; min-height: 0; }
#productModal .modal-head { padding: 14px 18px; }
#productModal .modal-body { padding: 14px 18px 10px; }
#productModal .modal-foot { padding: 12px 18px; }
#productModal .type-cards { gap: 10px; margin-bottom: 12px; }
#productModal .type-card { padding: 10px 12px; gap: 3px; }
#productModal .form-field { margin-bottom: 10px; }
#productModal .form-field label { margin-bottom: 4px; }
#productModal .form-field input, #productModal .form-field select { padding: 8px 10px; }
.type-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.type-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 14px; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px; transition: border-color 0.15s, background 0.15s;
}
.type-card b { font-size: var(--fs-15); }
.type-card span { font-size: var(--fs-12); color: var(--ink-soft); line-height: 1.6; }
.type-card:hover { border-color: var(--line-brand-strong); }
.type-card.on { border-color: var(--brand-2); background: var(--brand-tint); }
.type-card.on b { color: var(--brand); }
.modal-foot .btn.solid { min-width: 110px; }
@media (max-width: 560px) {
  #productModal .pform-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== 前台收银新布局（参照收银台截图） ===== */
.pos-topbar { background: linear-gradient(90deg, var(--brand-3), var(--brand-2)); border-bottom: 0; color: #fff; }
.pos-topbar .brand { color: #fff; }
.pos-topbar .right { color: rgba(255, 255, 255, 0.9); }
.pos-topbar .btn.ghost { color: #fff; background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.34); }
.pos-topbar .btn.ghost:hover { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.52); }
.pos-topbar .store-tag, .pos-topbar .role-tag { background: rgba(255, 255, 255, 0.18); color: #fff; border-color: transparent; }

.pos-shell { display: flex; min-height: calc(100vh - 62px); }
.pos-nav {
  width: 82px;
  background: linear-gradient(180deg, var(--brand-2) 0%, var(--brand-4) 100%);
  display: flex; flex-direction: column; padding: 14px 0; gap: 6px; flex-shrink: 0;
}
.pos-nav-item {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 13px 4px; background: transparent; border: 0;
  color: rgba(255, 255, 255, 0.78); cursor: pointer;
  font-size: var(--fs-12); letter-spacing: 0.5px;
  border-radius: 12px; margin: 0 10px;
  transition: background 0.18s, color 0.18s, transform 0.12s;
}
.pos-nav-item .pi { font-size: var(--fs-20); line-height: 1; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15)); }
.pos-nav-item i { font-style: normal; }
.pos-nav-item:hover { background: rgba(255, 255, 255, 0.12); color: #fff; transform: translateY(-1px); }
.pos-nav-item.on { background: rgba(255, 255, 255, 0.2); color: #fff; font-weight: 600; }
.pos-nav-item.on::before {
  content: ""; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 22px; border-radius: 0 4px 4px 0; background: #fff;
}

.pos-shell { font-family: var(--font-sans); }
.pos-member-card, .pos-cart, .pos-pay, .pos-settle, .pos-right { box-shadow: 0 1px 3px rgba(21, 95, 176, 0.06); }
.pmc-icon { background: linear-gradient(140deg, var(--cat-blue-tint), var(--cat-blue-tint)); }

.pos-main { flex: 1; display: flex; gap: 14px; padding: 14px; min-width: 0; }
#view-orders { flex-direction: column; }
.pos-left { width: 384px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; }
.pos-right { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 12px; }

/* 收银视图锁定一屏：商品越多只在购物车与商品区内部滚动，结算区始终停在右下角可见 */
#view-pos { height: calc(100vh - 62px); min-height: 460px; overflow: hidden; }
#view-pos .pos-left { min-height: 0; }
#view-pos .pos-right { min-height: 0; }
#view-pos .pos-cart { min-height: 120px; scrollbar-gutter: stable; }
#view-pos .pos-grid { min-height: 0; }
@media (max-width: 900px) {
  #view-pos { height: auto; min-height: calc(100vh - 62px); overflow: visible; }
  #view-pos .pos-cart { min-height: 180px; max-height: 46vh; }
}
/* 矮屏（如 1280×720）压缩左栏间距，保证购物车至少能看到几行商品 */
@media (min-width: 901px) and (max-height: 780px) {
  #view-pos .pos-left { gap: 10px; }
  #view-pos .pos-cart { min-height: 96px; }
  #view-pos .pos-settle { padding: 10px 12px; }
  #view-pos .pos-row { padding-bottom: 7px; }
  #view-pos .pos-stats { padding: 8px 0; gap: 6px 16px; }
}

.pos-member-card { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.pmc-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--cat-blue-tint); display: grid; place-items: center; font-size: var(--fs-20); flex-shrink: 0; }
.pmc-info { flex: 1; min-width: 0; }
.pmc-info b { display: block; font-size: var(--fs-15); }
.pmc-info span { font-size: var(--fs-12); color: var(--ink-soft); }

.pos-searchbox { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.pos-searchbox .mb-input { width: 100%; }
.pos-searchbox select { height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; margin-bottom: 8px; background: #fff; }

.pos-cart { flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; overflow: auto; min-height: 150px; }
.pos-pay { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.pos-pay > input { width: 100%; margin-top: 8px; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; }

.pos-settle { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.pos-row { display: flex; justify-content: space-between; font-size: var(--fs-13); padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.pos-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; padding: 12px 0; }
.pos-stats > div { display: flex; justify-content: space-between; font-size: var(--fs-13); color: var(--ink-soft); }
.pos-stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.pos-stats .red { color: var(--danger); }
.pos-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.pos-hold { flex: 1; position: relative; }
.hold-badge {
  position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 999px; background: var(--brand-2); color: #fff;
  font-size: 11px; line-height: 18px; text-align: center; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.pos-reset { flex: 1; }

/* 挂单弹窗 */
.held-current {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
  margin-bottom: 14px;
}
.held-cur-info { font-size: var(--fs-13); line-height: 1.7; }
.held-cur-info b { color: var(--brand-2); }
.held-list-wrap { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.held-table { width: 100%; min-width: 0; border-collapse: collapse; font-size: var(--fs-13); }
.held-table th, .held-table td { padding: 9px 10px; border-bottom: 1px solid var(--surface-3); text-align: left; }
.held-table th { background: var(--surface-2); color: var(--ink-soft); font-weight: 500; position: sticky; top: 0; z-index: 2; }
.held-table .row-actions { justify-content: flex-end; }
.pos-paybtn { flex: 1 1 100%; order: 3; height: 46px; font-size: var(--fs-15); white-space: nowrap; padding: 0 12px; }

.pos-tabs { display: flex; gap: 8px; padding: 14px 16px 0; }
.pos-tabs button { height: 34px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; font-size: var(--fs-13); color: var(--ink-soft); }
.pos-tabs button.on { background: var(--brand-3); color: #fff; border-color: var(--brand-3); }
.pos-grid { flex: 1; overflow: auto; padding: 12px 16px; }
.pos-quick { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); align-items: center; flex-wrap: wrap; }
.pos-scan { flex: 1; display: flex; gap: 8px; min-width: 220px; }
.pos-scan input { flex: 1; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; }
.pos-disabled { color: var(--ink-4); background: var(--surface-2); cursor: not-allowed; }

/* 选择会员弹窗 [F2] */
.pos-member-card.pickable { cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.pos-member-card.pickable:hover { border-color: var(--line-brand-strong); background: var(--surface-2); }
.member-pick-modal { width: min(1080px, 94vw); }
.member-pick-modal .modal-body { padding: 18px 22px; }
.ms-search-row { display: flex; gap: 10px; margin-bottom: 14px; align-items: center; }
.ms-search-box { position: relative; flex: 1; display: flex; align-items: center; }
.ms-search-icon { position: absolute; left: 12px; color: var(--ink-4); font-size: 14px; pointer-events: none; }
.ms-search-box .mb-input { width: 100%; height: 40px; padding: 0 36px 0 36px; border: 1px solid var(--line-brand-strong); border-radius: 10px; }
.ms-clear { position: absolute; right: 10px; width: 22px; height: 22px; border: 0; background: var(--surface-2); border-radius: 50%; color: var(--ink-4); cursor: pointer; line-height: 1; }
.ms-search-row select { height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: #fff; }
.ms-search-row .btn { height: 40px; min-width: 76px; }
.ms-table-wrap { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: auto; height: 320px; }
.ms-grid { width: 100%; border-collapse: collapse; font-size: var(--fs-13); table-layout: fixed; }
.ms-grid th, .ms-grid td { padding: 8px 12px; border-bottom: 1px solid var(--surface-3); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-grid td:empty { height: 300px; }
.ms-grid th { background: var(--surface-2); color: var(--ink-soft); font-weight: 500; }
.ms-grid th:nth-child(1), .ms-grid td:nth-child(1) { width: 110px; }
.ms-grid th:nth-child(2), .ms-grid td:nth-child(2) { width: 96px; }
.ms-grid th:nth-child(3), .ms-grid td:nth-child(3) { width: 56px; }
.ms-grid th:nth-child(4), .ms-grid td:nth-child(4) { width: 120px; }
.ms-grid th:nth-child(5), .ms-grid td:nth-child(5) { width: 80px; }
.ms-grid th:nth-child(6), .ms-grid td:nth-child(6) { width: 110px; }
.ms-grid th:nth-child(7), .ms-grid td:nth-child(7),
.ms-grid th:nth-child(8), .ms-grid td:nth-child(8),
.ms-grid th:nth-child(10), .ms-grid td:nth-child(10) { width: 84px; }
.ms-grid th:nth-child(9), .ms-grid td:nth-child(9) { width: 84px; }
.ms-grid th:nth-child(11), .ms-grid td:nth-child(11) { width: 104px; }
.ms-grid td.num, .ms-grid th:nth-child(n+7) { text-align: right; }
.ms-row { cursor: pointer; }
.ms-row:hover { background: var(--surface-2); }
.ms-row.on { background: var(--cat-blue-tint); }
.ms-row.on td { color: var(--brand); }
.ms-code { color: var(--brand-2); font-variant-numeric: tabular-nums; }
.ms-tag { display: inline-flex; margin-left: 6px; padding: 1px 7px; border-radius: 6px; font-size: var(--fs-12); }
.ms-tag.warn { color: var(--danger); background: var(--danger-tint, #fdecec); }
.ms-empty-row td { padding: 60px 12px; text-align: center; }
.ms-empty-title { font-size: var(--fs-14); color: var(--ink-soft); }
.member-pick-modal .modal-foot { gap: 0; padding: 0; }
.member-pick-modal .modal-foot .btn { flex: 1; height: 54px; border: 0; border-radius: 0; background: var(--surface-2); color: var(--ink); }
.member-pick-modal .modal-foot .btn-primary { flex: 1.4; border-radius: 0; background: #65c9a8; color: #fff; font-weight: 600; }

/* 选择服务员工弹窗 */
.emp-pick-modal {
  width: min(760px, calc(100vw - 28px));
  border-radius: 10px;
  overflow: hidden;
  background: #f7f9f9;
}
.emp-pick-modal .modal-head {
  padding: 15px 20px;
  background: #f7f9f9;
}
.emp-pick-modal .modal-head h3 { font-size: 15px; letter-spacing: .02em; }
.emp-pick-modal .modal-head .x { font-size: 22px; color: var(--ink-3); }
.emp-pick-body {
  padding: 0;
  display: flex;
  flex-direction: column;
}
.emp-pick-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--surface-3);
  background: #fff;
}
.emp-role-chips {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}
.emp-role-chips::-webkit-scrollbar { display: none; }
.emp-role-chip {
  flex: none;
  height: 30px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: all .15s;
}
.emp-role-chip:hover { border-color: var(--line-brand-strong); color: var(--brand); }
.emp-role-chip.on { border-color: var(--brand); background: var(--brand); color: #fff; }
.emp-own-toggle {
  flex: none;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-2);
  font-size: 12.5px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.emp-own-toggle.disabled { opacity: .55; cursor: default; }
.emp-own-toggle input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}
.emp-own-toggle i {
  position: relative;
  width: 38px;
  height: 20px;
  border-radius: 10px;
  background: #d7dfe2;
  transition: background .18s;
}
.emp-own-toggle i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .16);
  transition: transform .18s;
}
.emp-own-toggle input:checked + i { background: var(--brand); }
.emp-own-toggle input:checked + i::after { transform: translateX(18px); }
.emp-pick-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 18px;
  min-height: 212px;
  max-height: 400px;
  overflow-y: auto;
  align-content: start;
  background: #f7f9f9;
}
.emp-pick-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  height: 100%;
  padding: 12px 5px 10px;
  border: 1px solid #eef2f2;
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.emp-pick-card:hover { border-color: var(--line-brand-strong); background: var(--surface-2); }
.emp-pick-card.on {
  border-color: var(--brand);
  background: var(--brand-tint);
  box-shadow: inset 0 0 0 1px rgba(15, 95, 92, .08);
}
.ep-avatar-wrap { position: relative; margin-bottom: 3px; }
.emp-avatar {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: #fff;
  font-family: var(--serif, Georgia, serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .04em;
  box-shadow: 0 5px 14px rgba(23, 33, 43, .13);
}
.ep-avatar { width: 58px; height: 58px; }
.ep-check {
  position: absolute;
  right: -3px;
  bottom: -2px;
  display: none;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(15, 95, 92, .25);
}
.emp-pick-card.on .ep-check { display: grid; }
.emp-pick-card b {
  width: 100%;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.emp-pick-card em {
  width: 100%;
  color: var(--ink-3);
  font-size: 11px;
  font-style: normal;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.emp-pick-card small {
  width: 100%;
  color: var(--ink-4);
  font-size: 10.5px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.emp-pick-empty {
  padding: 54px 20px 44px;
  text-align: center;
  background: #fff;
}
.emp-pick-empty b { display: block; color: var(--ink-2); font-size: 14px; margin-bottom: 6px; }
.emp-pick-empty span { color: var(--ink-3); font-size: 12px; }
.emp-pick-hint {
  padding: 0 18px 12px;
  color: var(--ink-4);
  font-size: 11.5px;
  text-align: right;
  background: #fff;
}
.emp-pick-foot { gap: 0; padding: 0; border-top: 1px solid var(--line); }
.emp-pick-foot .btn {
  flex: 1;
  height: 50px;
  border: 0;
  border-radius: 0;
  background: #f0f2f3;
  color: var(--ink);
  font-size: 14px;
}
.emp-pick-foot .btn-primary {
  flex: 1.35;
  height: 50px;
  border: 0;
  border-radius: 0;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.emp-pick-foot .btn-primary:hover { background: var(--brand-2); }
@media (max-width: 680px) {
  .emp-pick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 14px; }
  .emp-pick-toolbar { flex-wrap: wrap; }
  .emp-role-chips { order: 1; width: 100%; flex-basis: 100%; }
  .emp-own-toggle { margin-left: auto; }
}
@media (max-width: 460px) {
  .emp-pick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 会员管理弹窗 */
#memberPanelModal { width: min(1200px, 96vw); }
#memberPanelModal .modal-body { padding: 22px 24px; }
#memberPanelModal .mp-table-wrap { max-height: 420px; }
/* 四张统计卡 */
.mp-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.mp-card { border-radius: 12px; padding: 16px 18px; color: #fff; display: flex; flex-direction: column; gap: 10px; }
.mp-card.green { background: linear-gradient(135deg, var(--cat-green), #2b7a5b); }
.mp-card.blue { background: linear-gradient(135deg, var(--cat-blue), #39628c); }
.mp-card.orange { background: linear-gradient(135deg, var(--cat-orange), #9d5f2f); }
.mp-card.red { background: linear-gradient(135deg, var(--cat-red), #9d453e); }
.mpc-main { font-size: var(--fs-13); display: flex; align-items: baseline; gap: 6px; }
.mpc-main b { font-size: var(--fs-24); font-weight: 700; }
.mpc-main em { font-style: normal; font-size: var(--fs-13); }
.mpc-sub { display: flex; justify-content: space-between; font-size: var(--fs-12); opacity: 0.95; border-top: 1px solid rgba(255, 255, 255, 0.35); padding-top: 8px; }
.mpc-sub b { font-size: var(--fs-15); }

/* 快捷筛选条 */
.mp-quick { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.mp-quick-label { font-size: var(--fs-12); color: var(--ink-3); }
.mp-chip {
  height: 28px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  font-size: var(--fs-12); transition: all 0.15s;
}
.mp-chip:hover { border-color: var(--brand-2); color: var(--brand-2); }
.mp-chip.on {
  border-color: var(--brand-3); background: rgba(18, 125, 114, 0.08);
  color: var(--brand-3); font-weight: 600;
}
.mp-chip-select {
  height: 28px; border: 1px solid var(--line); border-radius: 999px; padding: 0 8px;
  background: #fff; color: var(--ink-soft); font-size: var(--fs-12); cursor: pointer;
}
.mp-chip-select:hover { border-color: var(--brand-2); }
.mp-quick-hint { font-size: var(--fs-12); color: var(--ink-3); }
.mp-quick-hint b { color: var(--brand-3); }

/* 工具栏 */
.mp-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.mp-toolbar select { height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; background: #fff; }
.mp-tb-label { font-size: var(--fs-13); color: var(--ink-soft); white-space: nowrap; }
.mp-toolbar .mb-input { flex: 1; max-width: 320px; }

/* 卡片 / 列表 视图切换 */
.mp-view-switch {
  margin-left: auto; display: inline-flex; gap: 2px; padding: 3px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); flex-shrink: 0;
}
.mp-view-switch button {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 12px;
  border: 0; border-radius: 7px; background: transparent; color: var(--ink-soft);
  font-size: var(--fs-12); cursor: pointer;
}
.mp-view-switch button:hover { color: var(--ink); }
.mp-view-switch button.on { background: var(--brand-3); color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }

/* 会员卡片模式 */
.mp-cardgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 12px; max-height: min(380px, calc(100vh - 452px)); min-height: 200px; overflow: auto; padding: 2px;
}
.mp-cardgrid[hidden] { display: none; }
.mp-table-wrap[hidden] { display: none; }
.mpm-empty { grid-column: 1 / -1; padding: 28px 0; text-align: center; color: var(--ink-3); font-size: var(--fs-13); }
.mp-mcard {
  position: relative; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 12px 14px 0;
  cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s;
}
.mp-mcard:hover { border-color: var(--brand-2); box-shadow: 0 4px 14px rgba(21, 95, 176, 0.10); }
.mp-mcard.on { border-color: var(--brand-3); box-shadow: 0 0 0 2px rgba(18, 125, 114, 0.14); }
.mpm-head { display: flex; align-items: flex-start; gap: 10px; }
.mpm-avatar {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; font-size: 16px; font-weight: 600;
}
.mpm-who { flex: 1; min-width: 0; }
.mpm-name { display: flex; align-items: center; gap: 5px; font-size: var(--fs-15); font-weight: 700; line-height: 1.25; }
.mpm-name .mpm-sex { font-size: 13px; line-height: 1; }
.mpm-sex.f { color: #e0568f; }
.mpm-sex.m { color: #3b6fb6; }
.mpm-level {
  display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px;
  font-size: 10px; color: #8a6a1f; background: linear-gradient(135deg, #f7e9c6, #f1d79a);
  border: 1px solid #e8cf94;
}
.mpm-more {
  flex-shrink: 0; width: 22px; height: 22px; line-height: 1; border: 0; background: none;
  color: var(--ink-4); font-size: 18px; cursor: pointer; padding: 0; border-radius: 6px;
}
.mpm-more:hover { background: var(--surface-2); color: var(--ink-soft); }
.mpm-rows {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px;
  margin: 10px 0 8px; font-size: 11px; color: var(--ink-3);
}
.mpm-rows > div { display: flex; gap: 4px; min-width: 0; }
.mpm-rows > div.full { grid-column: 1 / -1; }
.mpm-rows span { flex-shrink: 0; white-space: nowrap; }
.mpm-rows b {
  font-weight: 500; color: var(--ink-soft); min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.mpm-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; min-height: 17px; }
.mpm-tag {
  font-size: 10px; padding: 1px 7px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line);
}
.mpm-tag.warn { color: #b4541f; background: #fdf1e7; border-color: #f0d3bb; }
.mpm-tag.off { color: var(--danger); background: #fdeeee; border-color: #f2c9c9; }
.mpm-stats {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px;
  margin: 0 -14px; padding: 8px 12px; border-top: 1px solid var(--line);
  background: var(--surface-2); border-radius: 0 0 11px 11px;
}
.mpm-stats > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mpm-stats span { font-size: 10px; color: var(--ink-3); white-space: nowrap; }
.mpm-stats b {
  font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mpm-stats b.blue { color: var(--brand-2); }
.mpm-stats b.gold { color: #b8860b; }
.mpm-stats b.muted { color: var(--ink-3); font-weight: 500; }

/* 会员表格 */
.mp-table-wrap { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.mp-grid { width: 100%; border-collapse: collapse; font-size: var(--fs-13); }
.mp-grid th, .mp-grid td { padding: 10px 12px; border-bottom: 1px solid var(--surface-3); text-align: left; white-space: nowrap; }
.mp-grid th { background: var(--surface-2); color: var(--ink-soft); font-weight: 500; position: sticky; top: 0; }
.mp-grid-row { cursor: pointer; }
.mp-grid-row:hover { background: var(--surface-2); }
.mp-grid-row.on { background: var(--cat-blue-tint); }
.mp-grid-row .mp-code { color: var(--brand-2); }
.c-check { width: 36px; }
.mp-tag { font-size: var(--fs-12); padding: 2px 8px; border-radius: 999px; background: var(--cat-blue-tint); color: var(--brand-2); }

/* 表尾汇总 */
.mp-foot { display: flex; flex-wrap: wrap; gap: 24px; margin: 12px 2px; font-size: var(--fs-13); color: var(--cat-orange-deep); }
.mp-foot b { color: var(--cat-orange-deep); }

.mp-detail { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-top: 12px; }
.mp-who b { font-size: var(--fs-15); margin-right: 8px; }
.mp-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 8px; font-size: var(--fs-13); color: var(--ink-soft); }
.mp-meta b { color: var(--ink); }
.mp-actions { display: flex; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
.mp-report { margin-top: 6px; max-height: 260px; overflow: auto; }
.mp-table { width: 100%; border-collapse: collapse; font-size: var(--fs-13); }
.mp-table th, .mp-table td { padding: 8px 10px; border-bottom: 1px solid var(--surface-3); text-align: left; }
.mp-table th { color: var(--ink-soft); font-weight: 500; background: var(--surface-2); }

/* 会员详情里的两张表：会员充值表 / 会员消费表 */
.mp-records { display: grid; gap: 12px; margin-top: 12px; }
.mp-rec-block { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mp-rec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.mp-rec-head h4 { margin: 0; font-size: var(--fs-14); }
.mp-rec-wrap { max-height: 220px; overflow: auto; }
.mp-rec-wrap .mp-table { table-layout: fixed; min-width: 0; }
.mp-rec-wrap .mp-table th, .mp-rec-wrap .mp-table td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-rec-wrap .mp-remark-txt { display: block; white-space: normal; word-break: break-word; overflow: hidden; text-overflow: ellipsis; }

/* 弹窗右上角窗口控件：最小化 / 最大化 / 关闭 */
.win-controls { display: flex; gap: 2px; }
.wc-btn { width: 34px; height: 30px; border: 0; background: transparent; cursor: pointer; font-size: var(--fs-15); line-height: 1; color: var(--ink-soft); border-radius: 6px; display: grid; place-items: center; transition: background 0.12s, color 0.12s; }
.wc-btn:hover { background: var(--surface-3); color: var(--ink); }
.wc-close:hover { background: var(--danger); color: #fff; }
#memberPanelModal.max.open { width: 96vw; height: 92vh; max-height: 92vh; display: flex; flex-direction: column; }
#memberPanelModal.max .modal-body { flex: 1; overflow: auto; }

/* 最小化后的悬浮恢复条 */
.panel-restore { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; align-items: center; gap: 8px; background: var(--brand-2); color: #fff; padding: 10px 16px; border-radius: 10px; cursor: pointer; box-shadow: 0 4px 16px rgba(10, 58, 55, 0.32); font-size: var(--fs-13); }
.panel-restore:hover { background: var(--brand-2); }
.pr-icon { font-size: var(--fs-15); }

@media (max-width: 1100px) {
  .pos-left { width: 320px; }
}
@media (max-width: 900px) {
  .pos-shell { flex-direction: column; }
  .pos-nav { width: 100%; flex-direction: row; overflow-x: auto; }
  .pos-main { flex-direction: column; }
  .pos-left { width: 100%; }
}


/* ---------- 充值赠送预览 ---------- */
.gift-preview { border: 1px dashed var(--gold-line); background: var(--gold-tint); border-radius: 10px; padding: 10px 12px; margin: -2px 0 14px; font-size: var(--fs-13); }
.gp-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 600; color: var(--gold-ink); margin-bottom: 4px; }
.gp-head span { font-weight: 500; font-size: var(--fs-12); color: var(--gold-ink); }
.gp-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--gold-line); }
.gp-ico { font-size: var(--fs-15); line-height: 1; }
.gp-name { font-weight: 500; }
.gp-spec { color: var(--gold-ink); }
.gp-tag { margin-left: auto; font-size: var(--fs-12); color: var(--danger); }
.gp-item.warn .gp-spec { color: var(--danger); }
.gp-empty { color: var(--ink-4); font-size: var(--fs-12); padding: 2px 0; }
.gp-tip { font-size: var(--fs-12); color: var(--ink-4); margin-top: 4px; }

/* ---------- 会员卡包 / 疗程卡 ---------- */
.card-pack { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; background: var(--surface-2); }
.cp-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 4px; }
.cp-head span { font-weight: 400; font-size: var(--fs-12); color: var(--ink-soft); }
.cp-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--surface-3); }
.cp-row .btn { flex: none; }
.cp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cp-main b { font-size: var(--fs-13); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-main .cell-sub { font-size: var(--fs-12); }

/* 收银台会员卡上的疗程卡快捷核销 */
.mc-card-list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.mc-card-label { font-size: var(--fs-12); color: var(--ink-soft); }
.mc-card-chip { border: 1px solid var(--line-brand-strong); background: var(--brand-tint); color: var(--brand); border-radius: 999px; padding: 4px 10px; font-size: var(--fs-12); cursor: pointer; }
.mc-card-chip:hover { background: var(--brand-tint-2); }

/* 弹窗底部按钮统一最小宽度，避免窄屏竖排换行 */
.modal-foot .btn { min-width: 92px; text-align: center; }

/* ---------- 快速扣次（点计次项目弹出） ---------- */
.modal.qd-modal { width: min(460px, calc(100vw - 32px)); }
.qd-top {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 14px; margin-bottom: 12px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
}
.qd-item { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.qd-item b { font-size: var(--fs-16); }
.qd-item span { font-size: var(--fs-12); color: var(--ink-3); }
.qd-left { text-align: right; white-space: nowrap; display: flex; flex-direction: column; gap: 2px; }
.qd-left span { font-size: var(--fs-12); color: var(--ink-3); }
.qd-left b { font-size: var(--fs-20); color: var(--brand); font-variant-numeric: tabular-nums; }
.qd-member {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px;
  padding: 0 2px 12px; border-bottom: 1px dashed var(--line-soft); margin-bottom: 12px;
}
.qd-member b { font-size: var(--fs-14); }
.qd-member span { font-size: var(--fs-12); color: var(--ink-3); }
.qd-row {
  display: grid; grid-template-columns: 78px 1fr; align-items: center; gap: 12px;
  margin-bottom: 12px;
}
.qd-row label { font-size: var(--fs-12); color: var(--ink-soft); text-align: right; }
.qd-row .stepper { justify-self: start; }
.qd-row select {
  width: 100%; max-width: 210px; height: 34px; border: 1px solid var(--line); border-radius: 8px;
  padding: 0 10px; font-size: var(--fs-13); background: #fff; color: var(--ink);
}
.qd-row #qdRemark {
  width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 8px;
  padding: 0 10px; font-size: var(--fs-13); background: #fff; color: var(--ink);
}
.qd-cart-link {
  display: inline-block; padding: 0; border: 0; background: none;
  font-size: var(--fs-12); color: var(--brand); cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px;
}
.qd-cart-link:hover { color: var(--brand-2); }
.qd-modal .form-field { margin-bottom: 10px; }
.qd-modal .form-error { margin: 0 0 6px; min-height: 16px; }

/* ---------- 库存入库 / 出库 / 盘点 / 流水 ---------- */
.modal.wide { width: min(900px, calc(100vw - 40px)); }
.stock-now { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: var(--fs-13); color: var(--ink-soft); margin: -4px 0 14px; }
.check-table-wrap { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.check-table { width: 100%; border-collapse: collapse; font-size: var(--fs-13); }
.check-table th, .check-table td { padding: 8px 12px; border-bottom: 1px solid var(--surface-3); text-align: left; white-space: nowrap; }
.check-table th { position: sticky; top: 0; background: var(--surface-2); color: var(--ink-soft); font-weight: 500; z-index: 1; }
.check-input { width: 96px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; }
.check-diff.plus { color: var(--ok); font-weight: 600; }
.check-diff.minus { color: var(--danger); font-weight: 600; }
.stock-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.stock-qty.plus { color: var(--ok); font-weight: 600; }
.stock-qty.minus { color: var(--danger); font-weight: 600; }

/* ===== 报表中心 · 每日对账 ===== */
#view-dailyCheck { flex-direction: column; gap: 14px; }
#view-dailyCheck.active { display: flex; }
.dc-label { display: flex; align-items: center; gap: 6px; font-size: var(--fs-12); color: var(--ink-soft); }
.dc-label select { height: 34px; }
.dc-sep { font-size: var(--fs-12); color: var(--ink-soft); }
#view-dailyCheck .doc-filters { margin-bottom: 6px; padding: 12px 18px 6px; }
#view-dailyCheck .filters { gap: 4px; }
#view-dailyCheck .filters input, #view-dailyCheck .filters select { height: 30px; padding: 0 6px; font-size: var(--fs-12); }
#view-dailyCheck .dc-label { gap: 4px; }
#dcQuery { height: 30px; padding: 0 10px; }
#dcPeriod { width: 72px; }
#dcStart, #dcEnd { width: 102px; }
#dcStore, #dcOperator { width: 94px; }

.dc-heroes { display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); gap: 8px; padding: 4px 18px 18px; }
.dc-hero { --dc: #12b48c; --dc-bg: #eaf9f4; border-radius: 8px; overflow: hidden; border: 1px solid rgba(0, 0, 0, 0.04); }
.dc-hero.h-blue { --dc: #3f7fe0; --dc-bg: #edf3fd; }
.dc-hero.h-red { --dc: #ee6467; --dc-bg: #fdeeee; }
.dc-hero.h-orange { --dc: #ff8f43; --dc-bg: #fff3e8; }
.dc-hero.h-teal { --dc: #16b98e; --dc-bg: #e9f8f3; }
.dc-hero-head {
  display: flex; align-items: center; gap: 5px; padding: 7px 9px;
  background: var(--dc); color: #fff; font-size: var(--fs-12); font-weight: 600;
}
.dc-q { width: 14px; height: 14px; line-height: 14px; text-align: center; border-radius: 50%; background: rgba(255, 255, 255, 0.28); font-size: var(--fs-11); font-weight: 600; cursor: help; }
.dc-hero-body {
  position: relative; display: flex; align-items: baseline; gap: 3px;
  padding: 14px 9px 16px; background: var(--dc-bg); color: var(--dc);
  font-size: 20px; font-weight: 700; letter-spacing: -0.4px;
}
.dc-hero-body small { font-size: var(--fs-11); font-weight: 500; }
.dc-hero-icon { position: absolute; right: 9px; bottom: 6px; font-size: 20px; opacity: 0.22; color: var(--dc); }

.dc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 12px; align-items: stretch; }
.dc-panel {
  --dc: #12b48c; --dc-soft: #effaf6; --dc-hover: rgba(255, 255, 255, 0.5);
  display: flex; flex-direction: column; margin: 0; min-height: 188px;
  background: var(--dc-soft); border-color: rgba(0, 0, 0, 0.06); box-shadow: 0 1px 2px rgba(16, 40, 38, 0.06);
  overflow: hidden; border-radius: 10px;
}
.dc-panel.c-orange { --dc: #f58a3c; --dc-soft: #fff5ec; }
.dc-panel.c-blue { --dc: #3f7fe0; --dc-soft: #eef4fd; }
.dc-panel.c-purple { --dc: #7c6ff0; --dc-soft: #f2f0fd; }
.dc-panel.c-red { --dc: #ea6164; --dc-soft: #fdeeee; }
.dc-panel.c-teal { --dc: #0ea5b7; --dc-soft: #e9f7fa; }
.dc-panel .panel-head { background: var(--dc); border-bottom: 0; padding: 9px 12px; }
.dc-panel .panel-head h3 { color: #fff; font-size: 13px; }
.dc-tag {
  margin-left: auto; padding: 2px 7px; border-radius: 9px;
  background: rgba(255, 255, 255, 0.22); color: #fff; font-size: 11px; font-weight: 500;
}
.dc-panel .table-wrap { padding: 2px 4px 4px; }
.dc-panel .dc-table th { color: rgba(38, 55, 54, 0.6); }
.dc-panel .dc-table td { color: var(--ink); }
.dc-panel .dc-table .dc-sum td { color: var(--dc); border-top-color: rgba(0, 0, 0, 0.14); }
.dc-panel .dc-foot { border-top-color: rgba(0, 0, 0, 0.1); }
.dc-panel .dc-foot b { color: var(--dc); }
.dc-panel .dc-sub-head { color: rgba(38, 55, 54, 0.6); }
.dc-panel .dc-table tbody tr:hover { background: var(--dc-hover); }
.dc-panel .panel-head h3 { font-size: 13px; }
.dc-table { width: 100%; min-width: 0; border-collapse: collapse; font-size: 12px; }
.dc-table th {
  padding: 5px 7px; background: none; border: 0; color: var(--ink-soft);
  font-size: 11px; font-weight: 500; text-align: left; white-space: nowrap;
}
.dc-table td { padding: 5px 7px; border: 0; }
.dc-table .empty { padding: 10px 0; }
.dc-table .num { text-align: right; white-space: nowrap; }
#view-dailyCheck tbody tr:hover { background: none; }
.dc-table .dc-sum td { border-top: 1px dashed var(--line); color: var(--brand-2); font-weight: 600; }
.dc-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 6px 12px; border-top: 1px dashed var(--line);
  font-size: 11px; color: var(--ink-soft);
}
.dc-foot b { color: var(--brand-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.dc-foot + .dc-foot { border-top: 0; padding-top: 0; }
.dc-sub-head {
  display: grid; grid-template-columns: 1fr 42px 68px; gap: 4px;
  padding: 8px 8px 2px; font-size: 11px; color: var(--ink-soft);
}
.dc-sub-head span:nth-child(2), .dc-sub-head span:nth-child(3) { text-align: right; }
.dc-pairs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 6px;
  padding: 6px 8px; flex: 1; align-content: start;
}
.dc-pair {
  display: flex; align-items: baseline; justify-content: space-between; gap: 4px;
  padding: 6px 2px; border-bottom: 1px dashed rgba(0, 0, 0, 0.07); min-width: 0;
}
.dc-pair:last-child, .dc-pair:nth-last-child(2) { border-bottom: 0; }
.dc-pair span { font-size: 10px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-pair b { font-size: 11px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dc-kpis { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 8px 12px; flex: 1; }
.dc-kpi {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0;
}
.dc-kpi span { font-size: 12px; color: var(--ink-soft); }
.dc-kpi b { font-size: 15px; font-weight: 700; color: var(--dc); font-variant-numeric: tabular-nums; }

/* ===== 系统设置 · 商品基础（仅样式骨架） ===== */
.pb-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 18px 12px; }
.pb-search { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pb-search span { color: var(--ink-3); font-size: 14px; }
.pb-search input { width: 190px; border: 0; outline: 0; background: transparent; font-size: var(--fs-12); color: var(--ink-3); }
.pb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pb-chip { display: inline-flex; align-items: center; gap: 3px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-soft); font-size: var(--fs-12); cursor: pointer; }
.pb-chip:has(.pb-chip-del) { padding-right: 8px; }
.pb-chip.on { background: var(--brand-tint); border-color: var(--line-brand-strong); color: var(--brand); font-weight: 600; }
.pb-chip-del { width: 15px; height: 15px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 11px; line-height: 15px; text-align: center; cursor: pointer; opacity: .45; }
.pb-chip-del:hover { opacity: 1; color: var(--danger); background: var(--danger-tint); }
.pb-badge { margin-left: auto; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--gold-line); background: var(--gold-tint); color: var(--gold-ink); font-size: var(--fs-12); }
.pb-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 0 18px 14px; }
@media (max-width: 900px) { .pb-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pb-card {
  --pb: #12b48c; --pb-bg: #effaf6;
  padding: 12px 14px 10px; border: 1px solid rgba(0, 0, 0, 0.05); border-radius: 10px;
  background: var(--pb-bg); box-shadow: 0 1px 2px rgba(16, 40, 38, 0.05);
}
.pb-card:nth-child(2) { --pb: #3f7fe0; --pb-bg: #eef4fd; }
.pb-card:nth-child(3) { --pb: #f58a3c; --pb-bg: #fff5ec; }
.pb-card:nth-child(4) { --pb: #124f6e; --pb-bg: #eaf1f5; }
.pb-card-top { display: flex; align-items: center; gap: 7px; color: var(--pb); font-size: 13px; font-weight: 600; }
.pb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pb); }
.pb-card p { min-height: 38px; margin: 7px 0 10px; color: var(--ink-soft); font-size: var(--fs-12); line-height: 1.6; }
.pb-state { display: inline-block; padding: 2px 9px; border: 1px solid rgba(0, 0, 0, 0.06); border-radius: 999px; background: rgba(255, 255, 255, 0.75); color: var(--pb); font-size: var(--fs-11); }
.pb-panel .table-wrap { padding: 0 18px 8px; }
.pb-table { min-width: 0; }
.pb-table th, .pb-table td { padding-left: 8px; padding-right: 8px; }
.pb-table tbody td.empty { color: var(--ink-3); }

/* ===== 系统设置 · 操作日志 ===== */
#view-operationLogs .doc-filters { margin-bottom: 10px; }
#view-operationLogs .filters { gap: 6px; flex-wrap: nowrap; }
#view-operationLogs .filters input, #view-operationLogs .filters select { height: 32px; padding: 0 8px; }
#olStart, #olEnd { width: 118px; }
#olModule { width: 96px; }
#olKeyword { width: 130px; }
#view-operationLogs .ol-table { min-width: 0; table-layout: fixed; }
.ol-table th, .ol-table td { padding-left: 8px; padding-right: 8px; overflow: hidden; text-overflow: ellipsis; }
.ol-table th:nth-child(1) { width: 150px; }
.ol-table th:nth-child(2) { width: 100px; }
.ol-table th:nth-child(3) { width: 66px; }
.ol-table th:nth-child(4) { width: 66px; }
.ol-table th:nth-child(6) { width: 62px; }
.ol-table th:nth-child(7) { width: 80px; }
.ol-user { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ol-sub { margin-top: 2px; font-size: 10px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ol-table td { vertical-align: middle; }
.ol-time { white-space: nowrap; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ol-mod { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--brand-tint); color: var(--brand); font-size: var(--fs-11); white-space: nowrap; }
.ol-path { overflow: hidden; color: var(--ink-soft); font-family: ui-monospace, Consolas, monospace; font-size: 11px; }
.ol-path > div:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ol-action { white-space: nowrap; }
.ol-detail { font-family: inherit; }
.ol-ok { color: var(--ok); font-weight: 600; }
.ol-fail { color: var(--danger); font-weight: 600; }
.ol-ip { white-space: nowrap; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ===== 系统设置 · 门店管理 ===== */
#view-storeManage .sm-panel { margin-bottom: 14px; }
.store-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; padding: 12px 18px 10px; }
.store-card {
  --sc: #12b48c; --sc-bg: #effaf6;
  display: flex; flex-direction: column; justify-content: flex-start; min-height: 118px;
  padding: 9px 11px 8px; border: 1px solid rgba(0, 0, 0, 0.05); border-radius: 10px;
  background: var(--sc-bg); box-shadow: 0 1px 2px rgba(16, 40, 38, 0.05);
}
.store-card[data-store-edit] { cursor: pointer; transition: box-shadow 0.15s ease, transform 0.15s ease; }
.store-card[data-store-edit]:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(16, 40, 38, 0.1); }
.store-card.is-main { --sc: #0f5f5c; --sc-bg: #eaf4f2; }
.store-card:nth-child(2) { --sc: #3f7fe0; --sc-bg: #eef4fd; }
.store-card:nth-child(3) { --sc: #7c6ff0; --sc-bg: #f3f1fd; }
.store-card:nth-child(4) { --sc: #f58a3c; --sc-bg: #fff5ec; }
.store-card-top { display: flex; align-items: center; justify-content: space-between; }
.store-code { color: var(--sc); font-size: 10px; font-weight: 600; letter-spacing: 0.3px; }
.store-badge { padding: 0 6px; border-radius: 999px; background: var(--sc); color: #fff; font-size: 9px; line-height: 15px; }
.store-badge.sub { background: rgba(255, 255, 255, 0.85); color: var(--sc); border: 1px solid rgba(0, 0, 0, 0.06); }
.store-card-name { margin: 5px 0 4px; color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-share { display: flex; gap: 3px; margin-bottom: 5px; }
.store-share span { padding: 0 5px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.06); background: rgba(255, 255, 255, 0.55); color: var(--ink-4); font-size: 9px; line-height: 15px; }
.store-share span.on { border-color: rgba(0, 0, 0, 0.04); background: #fff; color: var(--sc); font-weight: 600; }
.store-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; color: var(--ink-soft); font-size: 11px; }
.store-card-foot b { color: var(--sc); font-size: 13px; }
.store-state { color: var(--sc); background: rgba(255, 255, 255, 0.8); border: 1px solid rgba(0, 0, 0, 0.05); border-radius: 999px; padding: 0 6px; font-size: 9px; line-height: 15px; }
.store-add {
  align-items: center; justify-content: center; gap: 5px;
  border: 1px dashed var(--line-brand-strong); background: #fff; color: var(--brand);
  font-size: 12px; font-weight: 600; cursor: pointer;
}
.store-add:hover { background: var(--brand-tint); border-color: var(--brand-2); }
.store-add-icon { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); font-size: 15px; line-height: 1; }

/* 门店共享信息开关 */
.store-share-block { margin: 2px 0 12px; padding: 12px 14px 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.ssb-head { color: var(--ink); font-size: 13px; font-weight: 600; }
.ssb-sub { margin: 2px 0 4px; color: var(--ink-3); font-size: 11px; }
.switch-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-soft); cursor: pointer; }
.switch-row input { display: none; }
.switch { position: relative; flex: none; width: 34px; height: 19px; margin-top: 1px; border-radius: 999px; background: #d7dde3; transition: background 0.16s ease; }
.switch::after { content: ''; position: absolute; left: 2px; top: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); transition: left 0.16s ease; }
.switch-row input:checked + .switch { background: var(--brand-2); }
.switch-row input:checked + .switch::after { left: 17px; }
.sr-text b { display: block; color: var(--ink); font-size: 12px; font-weight: 600; }
.sr-text em { display: block; margin-top: 2px; color: var(--ink-3); font-size: 11px; font-style: normal; line-height: 1.5; }
#view-storeManage .hint { padding: 0 18px 14px; }

.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.sm-form { padding: 14px 18px 0; }
.sm-form .form-field { margin-bottom: 12px; }
.sm-actions { display: flex; align-items: center; gap: 8px; padding: 0 18px; margin-bottom: 12px; }
.sm-table { max-height: none; padding: 0 18px 8px; }
.sm-table table { min-width: 0; }
@media (max-width: 900px) { .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


/* ============================================================
   首页改版（2026-11）：常用功能 + 现金收入 + 待办提醒 + 双列分析 + 近7日趋势
   ============================================================ */
.layout .topbar .top-search {
  display: flex; align-items: center; gap: 8px;
  height: 34px; width: 248px; padding: 0 12px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.16);
  transition: background 0.16s, border-color 0.16s, box-shadow 0.16s;
}
.top-search svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: rgba(255, 255, 255, 0.82); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.top-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: #fff; font-size: var(--fs-12); }
.top-search input::placeholder { color: rgba(255, 255, 255, 0.62); }
.top-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.top-search:focus-within { background: #fff; border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18); }
.top-search:focus-within svg { stroke: var(--ink-3); }
.top-search:focus-within input { color: var(--ink); }
.top-search:focus-within input::placeholder { color: var(--ink-4); }

.home { display: grid; grid-template-columns: minmax(0, 1fr) 296px; gap: 16px; align-items: start; }
.home-main, .home-rail { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.home-card {
  background: #fff; border: 1px solid #e9eef1; border-radius: 16px;
  box-shadow: 0 1px 2px rgba(23, 33, 43, 0.04), 0 10px 26px rgba(23, 33, 43, 0.035);
  overflow: hidden;
}
.hc-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px 12px; }
.hc-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: var(--fs-15); font-weight: 700; letter-spacing: 0.2px; }
.hc-bar { width: 3px; height: 14px; border-radius: 2px; background: linear-gradient(180deg, var(--brand-2), var(--brand)); display: inline-block; flex: 0 0 3px; }
.hc-sub { font-size: var(--fs-12); color: var(--ink-3); }
.hc-sub b { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.hc-tools { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.hc-head > .hc-link { margin-left: auto; }
.hc-link { border: 0; background: none; padding: 0; font: inherit; font-size: var(--fs-12); color: var(--brand-2); cursor: pointer; white-space: nowrap; }
.hc-link:hover { color: var(--brand); text-decoration: underline; }

/* 常用功能 */
.home-quick { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; padding: 2px 12px 16px; }
.hq {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 12px 4px; border: 0; border-radius: 12px; background: transparent;
  font: inherit; color: var(--ink); cursor: pointer; text-align: center;
  transition: background 0.16s;
}
.hq:hover { background: var(--surface-2); }
.hq:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.hq-ico { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; }
.hq-ico svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.hq-name { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }

.t-teal, .i-teal { background: #e6f1ef; color: #0f6b64; }
.t-blue, .i-blue { background: #e8f0f8; color: #3a70a5; }
.t-gold, .i-gold { background: #f9f2e2; color: #96722f; }
.t-orange, .i-orange { background: #fbeee3; color: #b4733d; }
.t-violet, .i-violet { background: #efedf8; color: #6a5ea6; }
.t-mint, .i-mint { background: #e8f4ee; color: #2f8260; }
.t-rose, .i-rose { background: #fbecf0; color: #b25f7b; }
.t-slate, .i-slate { background: #eef1f5; color: #5a6a7a; }

/* 现金收入 */
.home-income { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 20px; padding: 0 20px 20px; }
.hi-lead { border-right: 1px solid var(--line-soft); padding-right: 20px; }
.hi-k { font-size: var(--fs-12); color: var(--ink-3); }
.hi-v { display: flex; align-items: baseline; gap: 5px; margin: 4px 0 8px; }
.hi-v em { font-style: normal; font-size: var(--fs-18); color: var(--ink-3); }
.hi-v b { font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: -0.6px; font-variant-numeric: tabular-nums; }
.hi-delta { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink-3); font-size: var(--fs-12); }
.hi-delta.up { background: #eaf5ef; color: var(--ok); }
.hi-delta.down { background: var(--danger-tint); color: var(--danger); }
.hi-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-content: center; }
.hi-col { min-width: 0; }
.hi-k2 { display: flex; align-items: center; gap: 6px; font-size: var(--fs-12); color: var(--ink-3); }
.hi-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: 0 0 7px; }
.d-svc { background: var(--brand-2); } .d-goods { background: #3a70a5; } .d-card { background: var(--gold); } .d-recharge { background: #b4733d; }
.hi-v2 { margin-top: 4px; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hi-track { height: 4px; border-radius: 3px; background: var(--surface-3); margin-top: 10px; overflow: hidden; }
.hi-track i { display: block; height: 100%; border-radius: 3px; transition: width 0.4s ease; }
.hi-cols .hi-col:nth-child(1) .hi-track i { background: var(--brand-2); }
.hi-cols .hi-col:nth-child(2) .hi-track i { background: #3a70a5; }
.hi-cols .hi-col:nth-child(3) .hi-track i { background: var(--gold); }
.hi-cols .hi-col:nth-child(4) .hi-track i { background: #b4733d; }

/* 待办提醒 */
.home-todos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 16px; padding: 0 14px 16px; }
.todo {
  display: flex; align-items: center; gap: 10px; padding: 11px 10px;
  border: 0; border-radius: 10px; background: transparent; font: inherit; text-align: left; cursor: pointer;
  transition: background 0.16s;
}
.todo:hover { background: var(--surface-2); }
.todo:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.todo-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 34px; }
.todo-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.todo-name { font-size: var(--fs-13); color: var(--ink-2); }
.todo-num { margin-left: auto; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.todo-unit { font-size: var(--fs-11); color: var(--ink-3); }

/* 收款构成 / 今日客流 */
.home-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.home-split .home-card { display: flex; flex-direction: column; }
.pay-mix { padding: 0 20px 10px; }
.pm-bar { display: flex; height: 14px; border-radius: 8px; overflow: hidden; background: var(--surface-3); }
.pm-seg { height: 100%; }
.pay-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; padding: 4px 20px 18px; margin-top: auto; }
.pl-item { display: flex; align-items: center; gap: 8px; font-size: var(--fs-12); color: var(--ink-2); min-width: 0; }
.pl-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.pl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-amt { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.pl-pct { width: 38px; text-align: right; color: var(--ink-3); font-size: var(--fs-11); font-variant-numeric: tabular-nums; }
.mini-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 0 22px; color: var(--ink-4); font-size: var(--fs-12); }
.mini-empty-ico { font-size: 30px; line-height: 1; color: var(--line-strong); }

.traffic { padding: 2px 20px 18px; display: flex; flex-direction: column; gap: 16px; margin-top: auto; }
.tr-row { display: flex; flex-direction: column; gap: 6px; }
.tr-label { font-size: var(--fs-12); color: var(--ink-3); }
.tr-bar { display: flex; height: 28px; border-radius: 7px; overflow: hidden; background: var(--surface-3); }
.tr-seg { display: flex; align-items: center; justify-content: center; font-size: var(--fs-11); color: #fff; font-variant-numeric: tabular-nums; transition: width 0.4s ease; }
.tr-seg.s1 { background: linear-gradient(90deg, #127d72, #0f5f5c); }
.tr-seg.s2 { background: #c9d4db; color: var(--ink-2); }
.tr-seg.s3 { background: linear-gradient(90deg, #4a7fb0, #3a70a5); }
.tr-seg.s4 { background: #e8b7c7; color: #8a4159; }
.tr-empty { padding: 30px 0 24px; text-align: center; color: var(--ink-4); font-size: var(--fs-12); }

/* 近7日趋势 */
.home-chart { padding: 2px 18px 0; }
.home .chart-legend { justify-content: flex-start; gap: 18px; padding: 4px 20px 16px; }

/* 右侧栏 */
.rail-store { border: 0; padding: 18px; color: #fff; background: linear-gradient(150deg, #0d5451 0%, #127d72 62%, #1a8a7e 100%); box-shadow: 0 12px 28px rgba(13, 84, 81, 0.22); }
.rs-top { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-11); }
.rs-label { padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); }
.rs-role { opacity: 0.82; }
.rs-name { font-size: 20px; font-weight: 700; margin: 12px 0 16px; letter-spacing: 0.2px; }
.rs-metrics { display: flex; gap: 10px; }
.rs-metrics > div { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.13); }
.rs-metrics b { display: block; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rs-metrics span { font-size: var(--fs-11); opacity: 0.82; }
.rs-btn { display: block; margin-top: 14px; padding: 8px; border-radius: 9px; text-align: center; font-size: var(--fs-12); font-weight: 600; color: var(--brand-3); background: rgba(255, 255, 255, 0.94); }
.rs-btn:hover { background: #fff; }

.guide-list { display: flex; flex-direction: column; gap: 2px; padding: 0 12px 14px; }
.guide { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; font: inherit; text-align: left; color: var(--ink); cursor: pointer; }
.guide:hover { background: var(--surface-2); }
.guide:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.guide-ico { width: 22px; height: 22px; flex: 0 0 22px; margin-top: 2px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand); font-size: var(--fs-12); }
.guide b { display: block; font-size: 12.5px; font-weight: 600; }
.guide i { display: block; margin-top: 2px; font-style: normal; font-size: 11.5px; line-height: 1.5; color: var(--ink-3); }

.home-promo { border-radius: 16px; padding: 18px; }
.promo-btn { display: block; margin-top: 12px; padding: 8px; border-radius: 9px; text-align: center; font-size: var(--fs-12); font-weight: 600; color: var(--brand-3); background: rgba(255, 255, 255, 0.94); }

@media (max-width: 1180px) {
  .home { grid-template-columns: 1fr; }
  .home-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .home-rail .rail-store { grid-column: 1 / -1; }
  .home-quick { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-bottom: 10px; gap: 8px; }
}
@media (max-width: 900px) {
  .home-income { grid-template-columns: 1fr; gap: 14px; }
  .hi-lead { border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 0 0 14px; }
  .hi-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
  .home-split { grid-template-columns: 1fr; }
  .home-todos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-rail { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .layout .topbar .top-search { display: none; }
  .home-quick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-todos { grid-template-columns: 1fr; }
}

/* 插入补充：客流标签与数量 */
.tr-label { display: flex; align-items: center; gap: 8px; }
.tr-nums { margin-left: auto; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* 首页细节微调 */
.home .range-seg button { white-space: nowrap; }
.home-chart svg { display: block; height: 260px; }
.home .chart-legend .lg::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------- 系统设置 · 权限管理矩阵 ---------- */
.perm-wrap { overflow-x: auto; }
table.perm-table { min-width: 0; width: 100%; table-layout: fixed; }
table.perm-table th, table.perm-table td { padding: 8px 4px; text-align: center; }
table.perm-table th.perm-role, table.perm-table td.perm-role { text-align: left; width: 104px; }
table.perm-table th.perm-col { width: auto; font-weight: 600; font-size: 11px; line-height: 1.3; white-space: normal; word-break: break-all; }
table.perm-table td.perm-cell label { display: flex; justify-content: center; cursor: pointer; }
table.perm-table td.perm-cell input { width: 16px; height: 16px; accent-color: #c8a15a; cursor: pointer; }
table.perm-table th.perm-act, table.perm-table td.perm-act { width: 70px; }
table.perm-table td.perm-act .btn { white-space: nowrap; padding: 6px 8px; }
table.perm-table tbody tr:hover td { background: #faf7f0; }

/* ---------- 系统设置 · 员工管理 ---------- */
.emp-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 6px; }
.emp-toolbar input[type="search"] { flex: 1; min-width: 170px; }
.emp-toolbar select { min-width: 116px; }
.emp-summary { margin: 4px 0 10px; font-size: 13px; color: #6b6257; }
.emp-summary b { color: #2f2a24; font-size: 15px; }
table.emp-table { min-width: 0; width: 100%; table-layout: fixed; }
table.emp-table th:nth-child(1), table.emp-table td:nth-child(1) { width: 58px; }
table.emp-table th:nth-child(2), table.emp-table td:nth-child(2) { width: 76px; }
table.emp-table th:nth-child(3), table.emp-table td:nth-child(3) { width: 64px; }
table.emp-table th:nth-child(4), table.emp-table td:nth-child(4) { width: 92px; }
table.emp-table th:nth-child(5), table.emp-table td:nth-child(5) { width: 104px; }
table.emp-table th:nth-child(6), table.emp-table td:nth-child(6) { width: 118px; }
table.emp-table th:nth-child(7), table.emp-table td:nth-child(7) { width: 56px; }
table.emp-table th:nth-child(8), table.emp-table td:nth-child(8) { width: 148px; }
table.emp-table td .row-actions { display: flex; gap: 4px; flex-wrap: nowrap; }
table.emp-table td .row-actions .btn { padding: 4px 6px; white-space: nowrap; }

/* 提成设置：整体 + 单项 */
.modal.commission-modal { width: min(780px, calc(100vw - 32px)); }
.comm-section { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 14px; }
.comm-section-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.comm-section-head strong { font-size: 14px; }
.comm-section-head .cell-sub { color: #8a8175; font-size: 12px; }
.comm-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.comm-tab {
  border: 1px solid var(--line); background: #fff; color: #4a4238;
  border-radius: 8px; padding: 7px 14px; font-size: 13px; cursor: pointer;
}
.comm-tab.active { border-color: #b28a52; background: #fbf3e4; color: #7a5322; font-weight: 600; }
.comm-item-list { max-height: 280px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; background: #fffdf9; }
.comm-item { display: grid; grid-template-columns: minmax(0, 1fr) 112px 104px; gap: 8px; align-items: center; padding: 9px 12px; border-bottom: 1px solid #f1ece2; }
.comm-item:last-child { border-bottom: 0; }
.comm-item-main { min-width: 0; }
.comm-item-name { font-size: 13px; color: #2f2a24; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comm-item-sub { font-size: 12px; color: #938a7d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comm-item-mode, .comm-item-value { height: 32px; font-size: 13px; }
.comm-item-value-wrap { display: flex; align-items: center; gap: 4px; }
.comm-item-value-wrap .comm-item-value { width: 68px; }
.comm-item-unit { font-size: 12px; color: #8a8175; width: 16px; }

/* 岗位维护：岗位切换 + 单项提成 */
.role-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.role-tabs { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 320px; }
.role-tab {
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #4a4238;
  font-size: 13px;
  cursor: pointer;
}
.role-tab.active { border-color: #b28a52; background: #fbf3e4; color: #7a5322; font-weight: 600; }
.role-add { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.role-add input {
  width: 158px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}
.role-add .btn { height: 32px; white-space: nowrap; }
.role-item-tabs { margin-top: 12px; }
.role-modal .comm-item-list { max-height: 300px; }

/* 服务档案里的员工提成（项目默认） */
.svc-role-comm { margin-top: 16px; }
.svc-role-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.svc-role-head strong { color: #26343b; font-size: 13px; }
.svc-role-head span { color: #7c8984; font-size: 11.5px; }
.svc-role-list {
  border: 1px solid #dce4df;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.svc-role-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 112px;
  gap: 9px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid #eef2ef;
}
.svc-role-row:last-child { border-bottom: 0; }
.svc-role-name { font-size: 12.5px; color: #34434a; font-weight: 500; }
.svc-role-row select,
.svc-role-row input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #dce4df;
  border-radius: 6px;
  background: #fff;
  color: #25343b;
  font-size: 12.5px;
  outline: none;
}
.svc-role-row select:focus,
.svc-role-row input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 2px rgba(18, 125, 114, .08); }
.svc-role-value { display: flex; align-items: center; gap: 5px; }
.svc-role-value input { flex: 1 1 auto; }
.svc-role-value em { flex: none; width: 16px; color: #7c8984; font-size: 11.5px; font-style: normal; }
.svc-role-value.is-off { visibility: hidden; }
.svc-role-empty { padding: 12px; color: #7c8984; font-size: 12px; text-align: center; }

/* ---------- 报表中心 · 员工报表（业绩 / 提成） ---------- */
.er-shell {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.er-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 18px 0;
  border-bottom: 1px solid var(--line);
}
.er-tabs { display: flex; align-items: flex-end; gap: 4px; }
.er-tab {
  height: 38px;
  min-width: 108px;
  padding: 0 24px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #f7f9fa;
  color: #5f6c76;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.er-tab:hover { background: #f0f4f5; color: #2d3a42; }
.er-tab.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
}
.er-actions { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; }
.er-actions .btn { height: 32px; border-radius: 7px; background: #fff; }
.er-actions .btn.solid { background: #fff; border-color: var(--line); color: var(--brand); font-weight: 600; }
.er-actions .btn.solid:hover { background: var(--brand-tint); border-color: var(--line-brand-strong); }

.er-filterbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 18px;
  background: #fbfcfd;
  border-bottom: 1px solid var(--line-soft);
}
.er-filterbar .filters input,
.er-filterbar .filters select { height: 32px; background: #fff; }
.er-sep { color: var(--ink-3); font-size: 12px; }
.er-meta {
  color: var(--ink-soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.er-pane { min-width: 0; }
.er-table-wrap { max-height: 610px; overflow: auto; }

.er-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  table-layout: auto;
}
.er-table th,
.er-table td {
  padding: 9px 12px;
  border-right: 1px solid #edf1f3;
  border-bottom: 1px solid #edf1f3;
  white-space: nowrap;
  vertical-align: middle;
}
.er-table th {
  font-size: 12px;
  font-weight: 600;
  color: #48545d;
  background: #f7f9fa;
  text-align: center;
}
.er-table th .er-sort,
.er-table th[data-sort] { cursor: pointer; }
.er-table tbody td { height: 48px; background: #fff; color: #26343c; }
.er-table tbody tr:nth-child(even) td { background: #fbfcfd; }
.er-table tbody tr:hover td { background: #f2f8f6; }

/* 两级表头：总业绩暖色、劳动业绩冷色 */
.er-group { font-size: 13px; letter-spacing: .2px; }
.er-group.g-total { background: #fcf1e3 !important; color: #8a5b25 !important; border-bottom-color: #f1dfc8; }
.er-group.g-labor { background: #edf4fb !important; color: #2f5f8a !important; border-bottom-color: #dae7f4; }
.er-head-row1 th { height: 42px; }
.er-head-row2 th { height: 40px; }
.er-table thead th { position: sticky; top: 0; z-index: 5; }
.er-head-row2 th { top: 42px; }

/* 左侧两列固定 */
.er-col-emp,
.er-col-store { position: sticky; z-index: 3; background: #fff; }
.er-col-emp { left: 0; width: 108px; min-width: 108px; max-width: 108px; }
.er-col-store { left: 108px; width: 138px; min-width: 138px; max-width: 138px; box-shadow: 8px 0 10px -10px rgba(23, 33, 43, .35); }
.er-table thead .er-col-emp,
.er-table thead .er-col-store { background: #f7f9fa; z-index: 7; }
.er-table tbody tr:nth-child(even) .er-col-emp,
.er-table tbody tr:nth-child(even) .er-col-store { background: #fbfcfd; }
.er-table tbody tr:hover .er-col-emp,
.er-table tbody tr:hover .er-col-store { background: #f2f8f6; }
.er-table tfoot td { background: #f4f7f8; border-top: 1px solid var(--line); }
.er-table tfoot td.er-col-emp,
.er-table tfoot td.er-col-store { background: #f4f7f8; position: sticky; z-index: 3; }

.er-emp-name { display: flex; align-items: center; gap: 6px; font-weight: 600; color: #1b2a33; }
.er-emp-sub { margin-top: 2px; color: #8b97a0; font-size: 11.5px; letter-spacing: .2px; }
.er-off { display: inline-block; padding: 0 6px; border-radius: 4px; background: #f3f5f6; color: #9aa5ad; font-size: 11px; font-weight: 400; }
.er-store-text { color: #5f6d76; }
.er-money { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.er-count { text-align: right; font-variant-numeric: tabular-nums; color: #4b5a64; }
.er-money.zero,
.er-count.zero { color: #a9b3ba; font-weight: 400; }
.er-method { color: #48565f; white-space: normal; line-height: 1.55; min-width: 280px; }
.er-comm-table { min-width: 900px; }
.er-comm-table thead th { top: 0; }
.er-sort { margin-left: 4px; color: #9ba7ae; font-size: 11px; }
.er-sort.on { color: var(--brand); font-weight: 700; }

.er-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 18px;
  border-top: 1px solid var(--line);
  color: #394750;
  font-size: 13px;
}
.er-foot #erTotal { font-weight: 600; }
.er-foot-hint { color: var(--ink-3); font-size: 12px; }

.er-config {
  position: absolute;
  top: 52px;
  right: 18px;
  z-index: 30;
  width: 292px;
  padding: 12px 14px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 14px 40px rgba(20, 32, 40, .18);
}
.er-config-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.er-config-head b { font-size: 13px; color: #2b3a42; }
.er-config-head button { border: 0; background: none; color: var(--brand-2); font-size: 12px; cursor: pointer; }
.er-config-list { max-height: 330px; overflow-y: auto; padding-top: 6px; }
.er-cfg-row { display: flex; align-items: center; gap: 8px; padding: 7px 2px; font-size: 12.5px; color: #4a5860; cursor: pointer; }
.er-cfg-row:hover { background: #f7faf9; }
.er-cfg-row input { width: 15px; height: 15px; accent-color: var(--brand); }

/* ---------- 订单中心 · 流水单据 ---------- */
.ol-shell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.ol-tabs {
  display: flex;
  align-items: center;
  gap: 34px;
  padding: 16px 20px 0;
  border-bottom: 1px solid var(--line);
}
.ol-tab {
  position: relative;
  border: 0;
  background: none;
  padding: 0 1px 13px;
  color: #26343c;
  font-size: 14px;
  cursor: pointer;
}
.ol-tab:hover { color: var(--brand-2); }
.ol-tab.on { color: var(--brand); font-weight: 700; }
.ol-tab.on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--brand);
}

.ol-filterbar {
  display: grid;
  grid-template-columns: 104px minmax(160px, 1fr) 160px 94px 120px 84px 98px 64px 42px;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line-soft);
  background: #fbfcfd;
}
.ol-filter {
  display: flex;
  align-items: center;
  height: 34px;
  padding: 0 9px;
  border: 1px solid #dfe5ea;
  border-radius: 5px;
  background: #fff;
  min-width: 0;
  transition: border-color .15s, box-shadow .15s;
}
.ol-filter:focus-within { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(18, 125, 114, .08); }
.ol-filter select,
.ol-filter input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #34424b;
  font-size: 12.5px;
}
#olStore, #olDate, #olType, #olItem, #olStatus, #olOrderType { width: 100%; min-width: 0; }
.ol-search { min-width: 0; }
.ol-search-ic { color: #7f8c95; font-size: 17px; margin-right: 6px; line-height: 1; transform: translateY(-1px); }
.ol-search input::placeholder { color: #9aa5ad; }
.ol-primary {
  height: 34px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--brand);
  border-radius: 5px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s;
}
.ol-primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.ol-reset {
  height: 34px;
  padding: 0;
  border: 0;
  background: none;
  color: #7c8890;
  font-size: 12.5px;
  cursor: pointer;
}
.ol-reset:hover { color: var(--brand); }

.ol-table-wrap { max-height: 452px; overflow: auto; }
.ol-table {
  width: 100%;
  min-width: 1060px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.ol-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 12px 9px;
  background: #fff;
  color: #2f3c45;
  font-weight: 600;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.ol-table th:nth-child(1),
.ol-table th:nth-child(2),
.ol-table th:nth-child(3),
.ol-table th:nth-child(4),
.ol-table th:nth-child(5),
.ol-table th:nth-child(6),
.ol-table th:nth-child(8),
.ol-table th:nth-child(9),
.ol-table th:nth-child(10),
.ol-table th:nth-child(11),
.ol-table th:nth-child(12),
.ol-table td { box-sizing: border-box; }.ol-table td {
  padding: 11px 9px;
  border-bottom: 1px solid #eff2f4;
  color: #33414a;
  background: #fff;
  vertical-align: middle;
}
.ol-table tbody tr:nth-child(even) td { background: #f9fbfc; }
.ol-table tbody tr:hover td { background: #f1f7f5; }
.ol-table .num { text-align: right; }

.ol-no { font-size: 12.5px; font-variant-numeric: tabular-nums; color: #3b4952; white-space: nowrap; }
.ol-date { font-size: 12.5px; color: #5e6b74; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ol-store { color: #55636c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ol-phone { font-size: 12.5px; color: #55636c; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ol-guest { color: #8d99a1; }
.ol-type { color: #46545d; white-space: nowrap; }
.ol-cell-content { max-width: none; }
.ol-content { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ol-content-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ol-more { color: #8b979f; font-size: 12px; white-space: nowrap; }
.ol-ic {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 4px;
  color: #fff;
  font-size: 11px;
  line-height: 1;
}
.ol-ic.ic-service { background: #3d82d6; }
.ol-ic.ic-product { background: #9a62d8; }
.ol-amount { font-weight: 500; color: #26343c; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ol-pay { font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.ol-pay span { color: #79858d; }
.ol-status { display: inline-flex; align-items: center; gap: 4px; color: #1c9852; font-size: 12.5px; white-space: nowrap; }
.ol-status i { width: 5px; height: 5px; border-radius: 50%; background: #1c9852; }
.ol-detail-btn {
  border: 0;
  background: none;
  padding: 2px 0;
  color: #2f6fd0;
  font-size: 12.5px;
  cursor: pointer;
}
.ol-detail-btn:hover { text-decoration: underline; }

.ol-empty { padding: 86px 20px 94px; text-align: center; color: #8b969e; }
.ol-empty-ic { font-size: 34px; color: #b8c3c8; margin-bottom: 10px; }
.ol-empty b { display: block; color: #43525b; font-size: 15px; margin-bottom: 8px; }
.ol-empty p { margin: 0; font-size: 12.5px; }

.ol-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 20px;
  border-top: 1px solid var(--line);
  color: #4f5d66;
  font-size: 12.5px;
}
.ol-foot-hint { color: #96a1a8; }

/* 单据详情弹层 */
.modal.order-detail-modal { width: min(880px, calc(100vw - 40px)); }
.od-head {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 16px;
  background: #f7faf9;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}
.od-head > div { min-width: 0; }
.od-head span { display: block; color: #8a969e; font-size: 11.5px; margin-bottom: 4px; }
.od-head b { display: block; color: #25343c; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.od-head .ol-status { color: #1c9852; }
.od-table-wrap { margin-top: 14px; border: 1px solid var(--line-soft); border-radius: 8px; }
table.od-table { min-width: 0; width: 100%; font-size: 12.5px; }
.od-table th { padding: 9px 10px; font-size: 12px; }
.od-table td { padding: 10px; }
.od-sum {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 18px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}
.od-sum > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; min-width: 0; }
.od-sum span { color: #8a969e; font-size: 12px; }
.od-sum b { color: #2b3a42; font-size: 13px; font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; }
.od-sum .od-strong { color: var(--brand); font-size: 16px; }

/* ---------- 后台「添加服务」弹窗 ---------- */
.modal.svc-modal {
  width: min(610px, calc(100vw - 30px));
  background: #f7f9f9;
  overflow: hidden;
}
.svc-modal.open { display: flex; flex-direction: column; }
.svc-top {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 84px;
  align-items: center;
  height: 56px;
  padding: 0 18px;
  background-color: #eef1ef;
  background-image: linear-gradient(#eef1ef, #eef1ef);
  border-bottom: 1px solid #dde4df;
  flex: none;
}
.svc-top h3 {
  margin: 0;
  color: #26343b;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: .02em;
  text-align: center;
}
.svc-back {
  justify-self: start;
  border: 0;
  background: none;
  color: #5b6a70;
  font-size: 13px;
  cursor: pointer;
  padding: 6px 0;
}
.svc-back:hover { color: var(--brand); }
.svc-save {
  justify-self: end;
  height: 30px;
  min-width: 60px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 7px rgba(16, 105, 99, .18);
}
.svc-save:hover { background: var(--brand-2); }
.svc-save:disabled { opacity: .6; cursor: default; }
.svc-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px 20px;
}
.svc-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px;
  gap: 18px;
  align-items: start;
}
.svc-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-bottom: 11px;
}
.svc-row:last-child { margin-bottom: 0; }
.svc-row.svc-two { grid-template-columns: 64px minmax(0, 1fr) 64px minmax(0, 1fr); }
.svc-row > label {
  color: #45545c;
  font-size: 12px;
  white-space: nowrap;
}
.svc-row input,
.svc-row select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border: 1px solid #dce4df;
  border-radius: 6px;
  background: #fff;
  color: #25343b;
  font-size: 12.5px;
  outline: none;
}
.svc-row input:focus,
.svc-row select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 2px rgba(18, 125, 114, .08); }
.svc-row input::placeholder { color: #b0b9b5; }
.svc-code-group { display: flex; align-items: center; gap: 7px; min-width: 0; }
.svc-code-group input { flex: 1 1 auto; }
.svc-code-gen {
  flex: none;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand-2);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}
.svc-code-gen:hover { background: #d6eee9; }
.svc-suffix,
.svc-money {
  display: flex;
  align-items: center;
  height: 34px;
  min-width: 0;
  padding: 0 9px;
  border: 1px solid #dce4df;
  border-radius: 6px;
  background: #fff;
}
.svc-suffix:focus-within,
.svc-money:focus-within { border-color: var(--brand-2); box-shadow: 0 0 0 2px rgba(18, 125, 114, .08); }
.svc-suffix input,
.svc-money input {
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.svc-suffix span {
  flex: none;
  color: #7c8984;
  font-size: 12px;
  padding-left: 5px;
}
.svc-money > span {
  flex: none;
  color: #9aa5a0;
  font-size: 12px;
  padding-right: 4px;
}
.svc-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2px;
}
.svc-pic {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: #e9edeb;
  color: #b6c0bb;
}
.svc-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.svc-pic-btn {
  height: 30px;
  margin-top: 12px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}
.svc-pic-btn:hover { background: var(--brand-2); }
.svc-pic-clear {
  margin-top: 5px;
  border: 0;
  background: none;
  color: #8b9691;
  font-size: 11px;
  cursor: pointer;
  padding: 3px 6px;
}
.svc-pic-clear:hover { color: #d33d3d; }
.svc-note-field { margin-top: 5px; }
.svc-note-field textarea {
  display: block;
  width: 100%;
  height: 108px;
  padding: 10px 12px;
  border: 1px solid #efe5bd;
  border-radius: 8px;
  background: #fffbe2;
  color: #5d5740;
  font-size: 12.5px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}
.svc-note-field textarea::placeholder { color: #bdb28a; }
.svc-note-field textarea:focus { border-color: #dfcd8f; box-shadow: 0 0 0 2px rgba(218, 195, 120, .12); }
.svc-switch-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.svc-switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-width: 228px;
  cursor: pointer;
  color: #34434a;
  font-size: 12.5px;
}
.svc-switch-row > span:first-child { min-width: 94px; }
.svc-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex: none;
}
.svc-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.svc-switch i {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #dfe5e2;
  transition: background .18s;
}
.svc-switch i::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(30, 48, 42, .18);
  transition: transform .18s;
}
.svc-switch input:checked + i { background: var(--brand); }
.svc-switch input:checked + i::before { transform: translateX(18px); }
.svc-switch-row em {
  min-width: 18px;
  color: #7f8c87;
  font-size: 12px;
  font-style: normal;
}
.svc-switch-row input:focus + i { box-shadow: 0 0 0 2px rgba(18, 125, 114, .15); }
#svcErr { margin-top: 12px; }

@media (max-width: 560px) {
  .svc-main { grid-template-columns: 1fr; }
  .svc-media { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 2px 0 0; }
  .svc-pic { width: 76px; height: 76px; }
  .svc-pic-btn { margin-top: 0; }
  .svc-row.svc-two { grid-template-columns: 58px minmax(0, 1fr); }
}

/* ===== 顶栏账号区美化：门店 / 角色 / 头像姓名做成整齐的一组 ===== */
.layout .topbar .right,
.pos-topbar .right { gap: 10px; }

.layout .topbar .store-tag,
.pos-topbar .store-tag { font-weight: 600; letter-spacing: .2px; }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 13px 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .26);
  transition: background .18s, border-color .18s;
}
.user-chip:hover { background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .4); }

.layout .topbar .user-chip .avatar,
.pos-topbar .user-chip .avatar {
  width: 28px;
  height: 28px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-2);
  background: #fff;
  border: 0;
  box-shadow: 0 1px 2px rgba(6, 40, 38, .25);
  line-height: 1;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pos-topbar .user-name { max-width: 96px; }

.layout .topbar .right > .btn.ghost,
.pos-topbar .right > .btn.ghost { border-radius: 999px; padding: 0 15px; }

.layout .topbar .right > a.btn.ghost:first-of-type,
.pos-topbar .right > a.btn.ghost:first-of-type {
  background: rgba(255, 255, 255, .92);
  color: var(--brand-2);
  border-color: transparent;
  font-weight: 600;
}
.layout .topbar .right > a.btn.ghost:first-of-type:hover,
.pos-topbar .right > a.btn.ghost:first-of-type:hover {
  background: #fff;
  color: var(--brand-3);
  border-color: transparent;
}

@media (max-width: 1100px) {
  .user-name { max-width: 88px; }
}
@media (max-width: 900px) {
  .user-chip { padding-right: 5px; }
  .user-name { display: none; }
}

/* ===== 后台顶栏精简：去掉角色标签与全局搜索，门店名加粗换字体 ===== */
.layout .topbar .role-tag,
.layout .topbar .top-search { display: none; }

.layout .topbar .store-tag {
  font-family: "Alibaba PuHuiTi 3.0", "HarmonyOS Sans SC", "Source Han Sans SC", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: .8px;
  line-height: 22px;
  padding: 3px 13px;
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
  text-shadow: 0 1px 1px rgba(4, 32, 30, .25);
}

/* ===== 前台顶栏同步：去掉角色标签，门店名加粗换字体 ===== */
.pos-topbar .role-tag { display: none; }

.pos-topbar .store-tag {
  font-family: "Alibaba PuHuiTi 3.0", "HarmonyOS Sans SC", "Source Han Sans SC", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: .8px;
  line-height: 22px;
  padding: 3px 13px;
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
  text-shadow: 0 1px 1px rgba(4, 32, 30, .25);
}

/* ===== 选择会员弹窗：卡片模式（与会员管理同款卡片） ===== */
.ms-view-switch { margin-left: auto; }
.ms-cardgrid {
  height: 320px;
  max-height: none;
  min-height: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 12px;
}
.ms-cardgrid .mpm-more { display: none; }
.ms-cardgrid .mpm-rows { grid-template-columns: 1fr 1fr; }

/* ===== 选择会员弹窗：放大窗体，卡片铺满且不截断 ===== */
.member-pick-modal {
  width: min(1240px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: hidden;
}
.member-pick-modal.open { display: flex; flex-direction: column; }
.member-pick-modal .modal-head { flex: 0 0 auto; padding: 14px 22px; }
.member-pick-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}
.member-pick-modal .ms-search-row { flex: 0 0 auto; }
.member-pick-modal .ms-search-box { flex: 1 1 auto; min-width: 0; }

.member-pick-modal .ms-cardgrid {
  flex: 1 1 auto;
  height: auto;
  min-height: 300px;
  max-height: none;
  overflow: auto;
  grid-template-columns: repeat(auto-fill, minmax(246px, 1fr));
  align-content: start;
}

.member-pick-modal .ms-table-wrap {
  flex: 1 1 auto;
  height: auto;
  min-height: 300px;
}

.member-pick-modal .modal-foot { flex: 0 0 auto; }
.member-pick-modal .modal-foot .btn { height: 48px; }

@media (max-height: 720px) {
  .member-pick-modal .ms-cardgrid,
  .member-pick-modal .ms-table-wrap { min-height: 240px; }
}
