/* ============ 基础 ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #6c5ce7;
  --primary-d: #5849c2;
  --primary-l: #efecff;
  --bg: #f5f6fa;
  --panel: #ffffff;
  --text: #2d3436;
  --text-2: #636e72;
  --border: #e8e8ef;
  --green: #00b894;
  --red: #e74c3c;
  --orange: #e67e22;
  --blue: #0984e3;
  --yellow: #fdcb6e;
  --shadow: 0 2px 12px rgba(0,0,0,.06);
  --radius: 12px;
}
html, body { height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: var(--primary); text-decoration: none; }

/* ============ 登录 ============ */
.login-page {
  height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
}
.login-card {
  width: 380px; background: #fff; border-radius: 16px; padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.login-logo { font-size: 26px; font-weight: 700; color: var(--primary); text-align: center; }
.login-sub { text-align: center; color: var(--text-2); font-size: 12px; letter-spacing: 2px; margin-bottom: 20px; }
.role-tabs { display: flex; background: var(--bg); border-radius: 10px; padding: 4px; margin-bottom: 18px; }
.role-tab { flex: 1; border: none; background: transparent; padding: 9px; border-radius: 8px; color: var(--text-2); font-size: 13px; }
.role-tab.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: var(--shadow); }
.login-card label { display: block; font-size: 12px; color: var(--text-2); margin: 12px 0 6px; }
.login-card input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 9px; outline: none;
  transition: border .2s;
}
.login-card input:focus { border-color: var(--primary); }
.login-error { color: var(--red); font-size: 12px; min-height: 18px; margin-top: 8px; }
.login-btn { width: 100%; margin-top: 14px; }
.login-demo { margin-top: 16px; font-size: 12px; color: var(--text-2); background: var(--bg); padding: 10px 12px; border-radius: 8px; line-height: 1.7; }
.login-demo b { color: var(--primary); }

/* ============ 按钮 ============ */
.btn-primary, .btn-ghost, .btn-danger, .btn-success {
  border: none; border-radius: 9px; padding: 9px 16px; font-size: 13px; font-weight: 600;
  transition: all .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); }
.btn-ghost { background: var(--primary-l); color: var(--primary); }
.btn-ghost:hover { background: #e2ddff; }
.btn-danger { background: #ffe5e2; color: var(--red); }
.btn-danger:hover { background: #ffd3cd; }
.btn-success { background: #e0f8f1; color: var(--green); }
.btn-success:hover { background: #c8f3e7; }
.btn-warn { background: #fff1e0; color: #d97706; border: 1px solid #fcd9a8; }
.btn-warn:hover { background: #ffe4c2; }
.btn-icon { background: transparent; border: none; font-size: 20px; color: var(--text-2); padding: 4px 8px; }
.btn-voice { background: linear-gradient(135deg, #6c5ce7, #a29bfe); border: none; border-radius: 16px; padding: 5px 12px; color: #fff; font-size: 12px; cursor: pointer; white-space: nowrap; transition: opacity .2s; }
.btn-voice:hover { opacity: .85; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.cust-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; padding: 10px; background: var(--bg); border-radius: 10px; }

/* ============ 布局 ============ */
.app { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: 232px; background: #fff; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; flex-shrink: 0; transition: margin .25s;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border-bottom: 1px solid var(--border); }
.brand-icon { font-size: 26px; }
.brand-name { font-weight: 700; font-size: 15px; }
.brand-store { font-size: 11px; color: var(--text-2); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px; }
.nav-group-title { font-size: 11px; color: var(--text-2); padding: 12px 10px 4px; font-weight: 600; letter-spacing: 1px; }
.nav-item { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 9px; color: var(--text); cursor: pointer; font-size: 13px; margin: 1px 0; }
.nav-item:hover { background: var(--bg); }
.nav-item.active { background: var(--primary-l); color: var(--primary); font-weight: 600; }
.nav-item .ni-icon { font-size: 16px; width: 18px; text-align: center; }
.nav-sub { padding-left: 30px !important; font-size: 12.5px; }
.nav-sub.active { background: transparent; color: var(--primary); font-weight: 600; }
.sb-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e74c3c; color: #fff; font-size: 11px; font-weight: 700; margin-left: auto; }
.sidebar-bottom { border-top: 1px solid var(--border); padding: 12px; }
.sidebar-user { font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.sidebar-user b { color: var(--text); }
.btn-logout { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px; color: var(--text-2); font-size: 12px; }
.btn-logout:hover { background: #ffe5e2; color: var(--red); border-color: #ffd3cd; }

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar { height: 56px; background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 18px; gap: 14px; flex-shrink: 0; }
.topbar-title { font-size: 16px; font-weight: 700; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.global-search { border: 1px solid var(--border); border-radius: 20px; padding: 7px 14px; width: 200px; outline: none; }
.global-search:focus { border-color: var(--primary); }
.topbar-user { font-size: 13px; color: var(--text-2); }
.page-content { flex: 1; overflow-y: auto; padding: 20px; }

/* ============ 卡片/面板 ============ */
.panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-title { font-size: 15px; font-weight: 700; }
.panel-title small { font-weight: 400; color: var(--text-2); font-size: 12px; margin-left: 8px; }
.panel-sub { color: var(--text-2); font-size: 12.5px; margin: -6px 0 14px; line-height: 1.6; }

/* ── 预约时段设置（会员商城 → 预约设置） ── */
.inp-sm { border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; font-size: 13px; outline: none; }
.inp-sm:focus { border-color: var(--primary); }
.slot-gen { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.slot-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.slot-chip { display: inline-flex; align-items: center; gap: 6px; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 16px; padding: 6px 10px 6px 14px; font-size: 13.5px; font-weight: 600; color: #334155; }
.slot-chip .slot-x { border: none; background: #cbd5e1; color: #fff; width: 18px; height: 18px; line-height: 16px; border-radius: 50%; cursor: pointer; font-size: 13px; padding: 0; }
.slot-chip .slot-x:hover { background: #ef4444; }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.dash-quick { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.dash-quick .btn-primary { font-size: 15px; padding: 10px 22px; }
.dash-quick .btn-ghost { padding: 10px 18px; }

/* ── 工作台关键指标卡片（扁平 · 无背景框 · 左侧无色条 · 卡片间竖线分隔） ── */
.stats-row > .stat-card,
.stats-row > .stat-card-lg {
  display: flex;
  flex-direction: column;
  min-height: 138px;
  padding: 20px 26px;
}
.stats-row > .stat-card:not(:last-child),
.stats-row > .stat-card-lg:not(:last-child) {
  border-right: 1px solid #e5e7eb;
}
.stat-card {
  background: transparent;
  border-radius: 0;
  position: relative;
  overflow: visible;
  border: none;
  box-shadow: none;
  transition: background .2s;
}
.stat-card::before { display: none; }
.stat-card .sc-label {
  font-size: 13px;
  color: #8b8fa3;
  font-weight: 500;
  letter-spacing: .3px;
}
.stat-card .sc-value {
  font-size: 28px;
  font-weight: 800;
  margin-top: 12px;
  letter-spacing: -.5px;
}
.stat-card .sc-sub {
  font-size: 12px;
  color: #a0a4b8;
  margin-top: auto;
  line-height: 1.5;
  padding-top: 14px;
  text-indent: 0;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0;
}

/* 各指标用文字颜色 + 很淡背景色区分 */
.sc-value.green { color: #059669; }
.sc-value.blue { color: #2563eb; }
.sc-value.orange { color: #d97706; }
.sc-value.red { color: #dc2626; }
.sc-value.purple { color: #7c3aed; }
.sc-value.cyan { color: #0891b2; }

.stats-row > .stat-card[data-color="green"] { background: rgba(5, 150, 105, .04); }
.stats-row > .stat-card[data-color="blue"] { background: rgba(37, 99, 235, .04); }
.stats-row > .stat-card[data-color="purple"] { background: rgba(124, 58, 237, .04); }
.stats-row > .stat-card[data-color="cyan"] { background: rgba(8, 145, 178, .04); }
.stats-row > .stat-card[data-color="orange"] { background: rgba(217, 119, 6, .04); }
.stats-row > .stat-card[data-color="red"] { background: rgba(220, 38, 38, .04); }

.stat-card[data-color="green"] .scl-value { color: #059669; }
.stat-card[data-color="cyan"] .scl-value { color: #0891b2; }

.stat-card.clickable { cursor: pointer; }
.stat-card.clickable:hover { background: rgba(255, 255, 255, .5); }

/* ── 大号统计卡片（消耗业绩等） ── */
.stat-card-lg {
  background: transparent;
  border-radius: 0;
  position: relative;
  overflow: visible;
  border: none;
  box-shadow: none;
}
.stat-card-lg::before { display: none; }
.stat-card-lg .scl-label { font-size: 13px; color: #8b8fa3; margin-bottom: 10px; font-weight: 500; }
.stat-card-lg .scl-value { font-size: 34px; font-weight: 800; color: #2563eb; margin-bottom: 8px; line-height: 1.2; letter-spacing: -.5px; }
.stat-card-lg .scl-sub { font-size: 12px; color: #a0a4b8; }
.stat-card-lg .scl-sub-row { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; justify-content: flex-start; margin-top: auto; padding-top: 10px; }
.stat-card-lg .scl-item { font-size: 13px; color: #6b7280; white-space: nowrap; }
.stat-card-lg .scl-item b { color: #1e40af; font-weight: 700; }
.stat-card-lg .scl-sep { display: none; }

@media (max-width: 768px) {
  .stats-row > .stat-card:not(:last-child),
  .stats-row > .stat-card-lg:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }
}

/* ── 普通统计行（非工作台） ── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stat-row .stat-card {
  background: #f8f9fc;
  border-radius: 14px;
  padding: 18px 20px;
  min-height: 120px;
}
.stat-row .stat-card.clickable:hover { background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.06); }

/* ============ 表格 ============ */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
/* 分页控件 */
.tbl-pager { display:flex; align-items:center; justify-content:flex-end; gap:4px; padding:10px 12px 0; }
.pager-info { font-size:12px; color:var(--text-2); margin-right:auto; }
.pager-btn,.pager-num { padding:5px 10px; border:1px solid var(--border); border-radius:6px;
  background:#fff; cursor:pointer; font-size:12px; color:var(--text-1); transition:all .15s; }
.pager-btn:hover:not(:disabled),.pager-num:hover { background:#f0f0ff; color:var(--primary); border-color:var(--primary); }
.pager-btn:disabled,.pager-btn.disabled { opacity:.4; cursor:not-allowed; }
.pager-num.active { background:var(--primary); color:#fff; border-color:var(--primary); }
table.tbl th { background: var(--bg); text-align: left; padding: 10px 12px; color: var(--text-2); font-weight: 600; white-space: nowrap; border-bottom: 1px solid var(--border); }
table.tbl th.sortable { cursor: pointer; user-select: none; }
table.tbl th.sortable:hover { color: var(--primary); }
table.tbl th.sortable .sort-icon { font-size: 12px; margin-left: 4px; color: var(--text-3); }
table.tbl th.sortable:hover .sort-icon { color: var(--primary); }
table.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
table.tbl tr:hover td { background: #fafaff; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.tag.green { background: #e0f8f1; color: var(--green); }
.tag.red { background: #ffe5e2; color: var(--red); }
.tag.blue { background: #e3f2fd; color: var(--blue); }
.tag.yellow { background: #fff6e0; color: var(--orange); }
.tag.gray { background: var(--bg); color: var(--text-2); }
.tag.purple { background: var(--primary-l); color: var(--primary); }

/* ============ 表单/筛选 ============ */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select { padding: 8px 11px; border: 1px solid var(--border); border-radius: 8px; outline: none; }
.toolbar input:focus, .toolbar select:focus { border-color: var(--primary); }
.toolbar .spacer { flex: 1; }
.biz-date-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.biz-date-bar input[type="date"] { padding: 8px 11px; border: 1px solid var(--border); border-radius: 8px; outline: none; width: auto; min-width: 140px; }
.biz-date-bar input[type="date"]:focus { border-color: var(--primary); }
.biz-date-bar .sep { color: var(--text-2); font-size: 13px; }
.field { margin-bottom: 14px; position: relative; }
.field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); }

/* formModal 可搜索下拉 */
.fm-search-select { position: relative; }
.fm-ss-input { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; outline: none; background: #fff; }
.fm-ss-input:focus { border-color: var(--primary); }
.fm-ss-dropdown { position: absolute; top: calc(100% + 4px); left: 0; right: 0; max-height: 220px; overflow-y: auto; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 100; }
.fm-ss-option { padding: 9px 12px; font-size: 13px; cursor: pointer; border-bottom: 1px solid #f3f4f6; }
.fm-ss-option:last-child { border-bottom: none; }
.fm-ss-option:hover, .fm-ss-option.active { background: var(--primary-l); color: var(--primary); }
.fm-ss-empty { padding: 12px; font-size: 12.5px; color: var(--muted); text-align: center; }

/* 顾客可搜索下拉（combobox） */
.cust-pop { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); margin-top: 4px; max-height: 220px; overflow-y: auto; }
.cust-pop .cust-opt { padding: 9px 11px; cursor: pointer; font-size: 13px; }
.cust-pop .cust-opt:hover { background: var(--primary-l); color: var(--primary); }
.cust-pop .cust-opt.muted { color: var(--text-3); cursor: default; }

/* 多选下拉（multi-select） */
.multi-select { position: relative; }
.ms-input { width: 100%; min-height: 38px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; background: #fff; font-size: 13px; line-height: 1.4; }
.ms-input:hover { border-color: var(--primary); }
.ms-ph { color: var(--text-3); }
.ms-tag { display: inline-flex; align-items: center; gap: 3px; background: var(--primary-l); color: var(--primary); padding: 2px 7px; border-radius: 5px; font-size: 12px; white-space: nowrap; }
.ms-tag-rm { cursor: pointer; font-size: 11px; opacity: .6; margin-left: 2px; }
.ms-tag-rm:hover { opacity: 1; }
.ms-tag-qty { width:34px !important; height:18px !important; font-size:11px !important; border:1px solid var(--primary) !important; border-radius:4px !important; text-align:center !important; margin-left:2px !important; padding:0 !important; outline:none !important; }
.ms-tag-qty:focus { border-color: var(--purple) !important; box-shadow: 0 0 0 2px rgba(99,102,241,.2) !important; }
.ms-dropdown { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); margin-top: 4px; max-height: 360px; overflow-y: auto; }
.ms-search-wrap { padding: 8px; border-bottom: 1px solid var(--border); }
.ms-search { width: 100%; padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; outline: none; font-size: 13px; box-sizing: border-box; }

/* ═══════════════ 开通次卡 · 产品列表框 ═══════════════ */
.pkg-prod-box { border: 1px solid var(--border); border-radius: 8px; max-height: 360px; overflow-y: auto; background: #fff; }
.pkg-prod-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 11px; border-bottom: 1px solid var(--border); transition: opacity .15s; }
.pkg-prod-row:last-child { border-bottom: none; }
.pkg-prod-row:hover { background: var(--primary-l); }
.pkg-prod-name { font-size: 13px; color: var(--text); cursor: pointer; display: flex; align-items: center; gap: 6px; flex: 1; }
.pkg-prod-name input[type=checkbox] { width: 15px; height: 15px; cursor: pointer; }
.pkg-prod-fields { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.pkg-prod-lbl { font-size: 11px; color: var(--text-3); }
.pkg-prod-qty, .pkg-prod-price { padding: 4px 6px; border: 1px solid var(--border); border-radius: 5px; text-align: center; font-size: 12px; outline: none; }
.pkg-prod-qty:focus, .pkg-prod-price:focus { border-color: var(--primary); }
.pkg-prod-price { color: var(--purple); border-color: var(--purple); }
.pkg-prod-price:focus { box-shadow: 0 0 0 2px rgba(99,102,241,.2); }
.pkg-prod-qty:disabled, .pkg-prod-price:disabled { background: #f1f1f3; cursor: not-allowed; }
.ms-search:focus { border-color: var(--primary); }
.ms-opts { padding: 4px 0; max-height: 310px; overflow-y: auto; }
.ms-opt { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; font-size: 13px; user-select: none; }
.ms-opt:hover { background: var(--primary-l); }
.ms-opt.ms-checked { background: #eef2ff; }
.ms-opt input[type=checkbox] { accent-color: var(--primary); width: 15px; height: 15px; cursor: pointer; }

/* ============ 弹窗 ============ */
.modal-mask { position: fixed; inset: 0; background: rgba(20,20,40,.45); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal { background: #fff; border-radius: 14px; width: 520px; max-width: 92vw; max-height: 88vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 16px; }
.modal-close { background: none; border: none; font-size: 22px; color: var(--text-2); }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }

/* ============ Toast ============ */
#toast-root { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #2d3436; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: toastIn .2s; }
.toast.ok { background: #00b894; }
.toast.err { background: #e74c3c; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ============ 杂项 ============ */
.empty { text-align: center; color: var(--text-2); padding: 40px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; }
.section-title { font-size: 14px; font-weight: 700; margin: 6px 0 12px; color: var(--text); }
.muted { color: var(--text-2); font-size: 12px; }
.pagination { display: flex; gap: 6px; align-items: center; justify-content: flex-end; margin-top: 12px; }
.pagination button { border: 1px solid var(--border); background: #fff; border-radius: 6px; padding: 5px 10px; font-size: 12px; }
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding: 10px 0; }
.bar-chart .bar { flex: 1; background: var(--primary); border-radius: 5px 5px 0 0; position: relative; min-height: 4px; }
.bar-chart .bar span { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--text-2); }
.bar-chart .bar b { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-size: 11px; }
.kpi-inline { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.kpi-inline div { font-size: 12px; color: var(--text-2); }
.kpi-inline b { color: var(--text); }

/* 今日待办 - 左侧预约列表 + 右侧快捷入口 */
.dash-todo-wrap { display: flex; gap: 16px; margin-bottom: 20px; align-items: stretch; }
.dash-todo-main { flex: 1; min-width: 0; }
.dash-todo-side { width: 180px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; }
.todo-mini { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; transition: transform .15s, box-shadow .15s; }
.todo-mini:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.todo-mini-label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.todo-mini-num { font-size: 26px; font-weight: 800; line-height: 1; }

@media (max-width: 768px) {
  .dash-todo-wrap { flex-direction: column; }
  .dash-todo-side { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .todo-mini { flex: 1; min-width: 100px; }
}

/* 房态网格 */
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.room-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px; border-left: 4px solid var(--green); }
.room-card.svc { border-left-color: var(--blue); }
.room-card.clean { border-left-color: var(--orange); }
.room-card.book { border-left-color: var(--purple, #a29bfe); }
.room-card h4 { font-size: 14px; margin-bottom: 6px; }
.room-card .rc-row { font-size: 12px; color: var(--text-2); margin: 3px 0; }
.room-card .rc-status { font-weight: 700; }

/* 告警/列表 */
.alert-item { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; }
.alert-item .ai-icon { font-size: 22px; }
.alert-item .ai-body { flex: 1; }
.alert-item .ai-body b { font-size: 13px; }
.alert-item .ai-body div { font-size: 12px; color: var(--text-2); }

/* 日历 */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .cal-cell { border: 1px solid var(--border); border-radius: 8px; min-height: 90px; padding: 6px; font-size: 11px; }
.cal .cal-cell.head { border: none; min-height: auto; text-align: center; font-weight: 700; color: var(--text-2); background: transparent; }
.cal .cal-cell .day { font-weight: 700; margin-bottom: 4px; }
.cal .cal-cell .ev { background: var(--primary-l); color: var(--primary); border-radius: 5px; padding: 2px 4px; margin-bottom: 3px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .cal-cell.today { background: #fff8e1; border-color: var(--yellow); }

/* 矩阵 */
.matrix { display: grid; gap: 3px; font-size: 11px; }
.matrix .mh { background: var(--bg); padding: 6px; text-align: center; font-weight: 600; border-radius: 4px; }
.matrix .mc { padding: 6px; text-align: center; border-radius: 4px; }
.mc.c0 { background: #f0f0f5; } .mc.c1 { background: #e8f5e9; } .mc.c2 { background: #c8e6c9; } .mc.c3 { background: #a5d6a7; } .mc.c4 { background: #81c784; }

/* 树/分配 */
.assign-item { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 9px; margin-bottom: 8px; }
.assign-item img, .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-l); display: flex; align-items: center; justify-content: center; color: var(--primary); font-weight: 700; flex-shrink: 0; }

/* 图表canvas容器 */
.chart-box { width: 100%; height: 260px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 880px) { .two-col { grid-template-columns: 1fr; } .form-grid { grid-template-columns: 1fr; } }

/* 子账号卡片 */
.sub-acc-card { border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.sub-acc-card .sa-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sub-acc-card .sa-avatar { width: 46px; height: 46px; border-radius: 12px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.sub-acc-card .sa-stats { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); }
.sub-acc-card .sa-stats b { display: block; color: var(--text); font-size: 16px; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }

/* ============ 顾客详情页（多Tab完整面板） ============ */
.cust-detail { }
/* 顶部：头像 + 名字 + 等级 + 操作按钮行 */
.cd-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.cd-avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), #a29bfe); color: #fff; font-size: 26px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-weight: 700; }
.cd-info { flex: 1; min-width: 0; }
.cd-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cd-name { font-size: 22px; font-weight: 800; }
.cd-phone { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.cd-level-badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; letter-spacing: 1px; }
.cd-level-badge.gold { background: linear-gradient(135deg,#fef3c7,#fde68a); color: #92400e; }
.cd-level-badge.plat { background: linear-gradient(135deg,#dbeafe,#bfdbfe); color: #1e40af; }
.cd-level-badge.diamond { background: linear-gradient(135deg,#fce7f3,#fbcfe8); color: #9d174d; }
.cd-header-btns { display: flex; gap: 6px; flex-shrink: 0; }
.cd-header-btns button { font-size: 12px; padding: 5px 10px; }

/* 来源标签行 */
.cd-source-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.cd-source-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--primary-l); color: var(--primary); }
.cd-store-name { color: var(--text-2); font-size: 12px; }

/* 标签 + 档案完成度 + 备注行 */
.cd-meta-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.cd-tag-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; border: 1px solid var(--border); cursor: pointer; transition: background .15s; }
.cd-tag-pill:hover { background: var(--bg); }
.cd-progress-mini { font-size: 12px; color: var(--text-2); }
.cd-progress-mini b { color: var(--primary); }
/* 备注编辑 */
.cd-remark { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 6px; }
.cd-remark textarea { flex: 1; min-height: 32px; max-height: 80px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; resize: vertical; font-size: 12.5px; outline: none; transition: border-color .2s; }
.cd-remark textarea:focus { border-color: var(--primary); }
.cd-remark-save { padding: 5px 12px; font-size: 11.5px; white-space: nowrap; }

/* 统计网格（4列） */
.cd-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.cd-stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; position: relative; overflow: hidden; }
.cd-stat-card::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--primary), #a29bfe); opacity: .6; }
.cd-stat-num { font-size: 24px; font-weight: 800; color: var(--text); line-height: 1.2; }
.cd-stat-label { font-size: 11.5px; color: var(--text-2); margin-top: 3px; }
.cd-stat-sub { font-size: 11px; color: var(--text-2); opacity: .7; margin-top: 2px; }
.cd-stat-link { font-size: 11px; color: var(--primary); cursor: pointer; margin-top: 4px; font-weight: 600; }
.cd-stat-link:hover { text-decoration: underline; }

/* ═══ 顾客详情页：整体布局 ═══ */
.cust-detail { position: relative; }

/* ═══ 双栏区：左侧100%内容 + 右侧固定浮层 ═══ */
.cd-body { display: block; }
/* 左栏：占满全部可用宽度 */
.cd-body > div:first-child { display: block; }

/* 右侧TA资产：fixed定位贴屏幕右边缘，不占用文档流 */
.cd-body > div:nth-child(2) {
  position: fixed;
  right: 12px;
  top: 72px;
  width: 270px;
  max-height: calc(100vh - 88px);
  overflow-y: auto;
  z-index: 10;
  /* 给主内容留出右侧内边距，避免被固定面板遮挡文字 */
}
/* 主内容区右侧留白避免被fixed遮挡 */
.cd-body > div:first-child {
  margin-right: 290px;
}

@media (max-width: 1100px) {
  .cd-body > div:nth-child(2) { position: static; width: auto; max-height: none; margin-top: 16px; }
  .cd-body > div:first-child { margin-right: 0; }
}

/* 右侧：TA的资产 */
.cd-assets { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.cd-assets-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cd-assets-head h3 { font-size: 15px; font-weight: 700; }
.ca-tabs { display: flex; gap: 4px; background: var(--bg); border-radius: 8px; padding: 3px; }
.ca-tab { padding: 4px 10px; border: none; background: transparent; border-radius: 6px; font-size: 11.5px; color: var(--text-2); cursor: pointer; font-weight: 600; transition: all .15s; white-space: nowrap; flex-shrink: 0; }
.ca-tab.active { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.ca-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 8px; }
.ca-card-name { font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.ca-card-detail { font-size: 11.5px; color: var(--text-2); line-height: 1.6; }
.ca-card-action { margin-top: 6px; text-align: right; }
.ca-empty { color: var(--text-2); font-size: 12.5px; text-align: center; padding: 20px 0; }

/* 待办事项 */
.cd-todos { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-top: 14px; }
.cd-todos h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.todo-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 12.5px; }
.todo-item:last-child { border-bottom: none; }
.todo-warn { color: var(--red); font-weight: 700; }
.todo-date { color: var(--text-2); font-size: 11.5px; }

/* 基本信息小卡片 */
.cd-basic-info { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-bottom: 18px; }
.cd-basic-info h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.cd-bi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cd-bi-item { font-size: 13px; }
.cd-bi-label { color: var(--text-2); font-size: 11.5px; }

/* Tab 导航 */
.cd-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 18px; }
.cd-tab { padding: 10px 20px; border: none; background: transparent; font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer; position: relative; transition: color .15s; }
.cd-tab:hover { color: var(--text); }
.cd-tab.active { color: var(--primary); }
.cd-tab.active::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: var(--primary); }
.cd-tab-content { display: none; }
.cd-tab-content.active { display: block; }

/* 流水表格 */
.cd-flow-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.cd-flow-tabs { display: flex; gap: 4px; background: var(--bg); border-radius: 8px; padding: 3px; }
.cd-flow-tab { padding: 5px 12px; border: none; background: transparent; border-radius: 6px; font-size: 12px; color: var(--text-2); cursor: pointer; font-weight: 600; transition: all .15s; }
.cd-flow-tab.active { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.cd-flow-filter { margin-left: auto; display: flex; gap: 4px; }
.cd-flow-filter select { padding: 5px 10px; border: 1px solid var(--border); border-radius: 7px; font-size: 12px; outline: none; background: #fff; }

/* 到店日历 */
.cd-cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cd-cal-mode { display: flex; gap: 6px; background: var(--bg); border-radius: 8px; padding: 3px; }
.cd-cal-mode button { padding: 5px 12px; border: none; background: transparent; border-radius: 6px; font-size: 12px; color: var(--text-2); cursor: pointer; font-weight: 600; transition: all .15s; }
.cd-cal-mode button.active { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.cd-cal-months { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cd-cal-month h4 { font-size: 14px; font-weight: 700; margin-bottom: 8px; text-align: center; }
.cd-visit-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); margin-left: 2px; }
.cd-visit-list-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; margin-bottom: 6px; cursor: pointer; transition: background .15s; }
.cd-visit-list-item:hover { background: var(--bg); }
.cd-visit-date { font-weight: 700; font-size: 13px; }
.cd-visit-proj { font-size: 12px; color: var(--text-2); }

/* 皮肤档案 */
.cd-skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cd-skin-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--panel); }
.cd-skin-img { width: 100%; height: 180px; object-fit: cover; background: var(--bg); display: flex; align-items: center; justify-content: center; color: var(--text-2); font-size: 12px; }
.cd-skin-img img { width: 100%; height: 100%; object-fit: cover; }
.cd-skin-body { padding: 12px; }
.cd-skin-date { font-size: 11.5px; color: var(--text-2); }
.cd-skin-note { font-size: 13px; margin-top: 4px; line-height: 1.5; }
.cd-skin-staff { font-size: 11.5px; color: var(--text-2); margin-top: 4px; }
.cd-skin-empty { text-align: center; padding: 40px 0; color: var(--text-2); }

/* 预约弹窗小卡片 */
.cd-appt-pop { position: fixed; z-index: 1000; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; box-shadow: 0 12px 40px rgba(0,0,0,.15); min-width: 260px; }
.cd-appt-pop h4 { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.cd-appt-row { display: flex; justify-content: space-between; font-size: 12.5px; padding: 4px 0; }
.cd-appt-label { color: var(--text-2); }

/* ============================================================
 * 新进顾客客情 (customer_new_guest)
 * ============================================================ */
.ngf-toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.ngf-tabs { display: flex; gap: 6px; background: var(--bg); border-radius: 10px; padding: 4px; }
.ngf-tab { padding: 7px 16px; border-radius: 8px; border: none; background: transparent; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; transition: all .2s; }
.ngf-tab:hover { background: rgba(124,58,237,.06); color: var(--primary); }
.ngf-tab.active { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.ngf-tab b { font-weight: 700; margin-left: 2px; }

.ngf-rate { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ngf-bar { width: 80px; height: 6px; background: #eef0f5; border-radius: 3px; overflow: hidden; }
.ngf-fill { height: 100%; background: linear-gradient(90deg, var(--red), #ff7b72); border-radius: 3px; transition: width .3s; }
.ngf-rate b { font-size: 15px; font-weight: 700; }

/* 日期分组 */
.ngf-group { margin-bottom: 20px; }
.ngf-group-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; padding-left: 4px; }
.ngf-group-title { font-size: 15px; font-weight: 800; color: var(--text-1); }
.ngf-group-week { font-size: 11.5px; color: var(--text-3); }
.ngf-empty-row { color: var(--text-3); font-size: 12.5px; padding: 8px 4px; }

/* 卡片网格 */
.ngf-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }

/* 单张卡片 */
.ngf-card { background: #fff; border-radius: 14px; box-shadow: 0 1px 6px rgba(0,0,0,.07); padding: 16px; position: relative; transition: transform .2s, box-shadow .2s; }
.ngf-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }

.ngf-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ngf-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #7c3aed, #a78bfa); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; flex-shrink: 0; }
.ngf-name { font-size: 15px; font-weight: 700; color: var(--text-1); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 状态徽章 */
.ngf-status-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.ngf-status-badge.pending { background: #fff3cd; color: #d39e00; }
.ngf-status-badge.done { background: #d4edda; color: #28a745; }
.ngf-status-badge.expired { background: #f8d7da; color: #dc3545; }

/* 描述文字 */
.ngf-desc { font-size: 12px; color: var(--text-2); line-height: 1.55; margin-bottom: 10px; }

/* 美容师行 */
.ngf-staff-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ngf-staff-name { font-size: 13px; font-weight: 600; color: var(--primary); }
.ngf-staff-badges { display: flex; gap: 4px; }

/* 小徽章 sb */
.sb { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; font-size: 9.5px; font-weight: 700; color: #fff; line-height: 1; }
.sb-blue { background: #3b82f6; }   /* 储值 */
.sb-orange { background: #f59e0b; } /* 无储值 */
.sb-green { background: #22c55e; }  /* 有消费 */
.sb-gray { background: #9ca3af; }   /* 新 */
.sb-purple { background: #8b5cf6; } /* 伙伴 */

/* 日期信息 */
.ngf-date-info { font-size: 11.5px; color: var(--text-3); margin-bottom: 10px; }

/* 操作区 */
.ngf-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 新客转化率分析 */
.conv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.conv-grid .panel { margin: 0; }
.conv-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.conv-toolbar label { font-size: 13px; color: var(--text-2); }
.conv-toolbar select { padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 13px; }
.conv-note { margin-top: 14px; padding: 12px 14px; background: var(--primary-l); border-radius: 10px; font-size: 13px; color: var(--text-2); line-height: 1.7; }
.conv-note b { color: var(--text); }
@media (max-width: 720px) { .conv-grid { grid-template-columns: 1fr; } }

/* ============ 顾客详情（会员分析）— 三板块 + 日期筛选 ============ */
.ca-section { background: var(--bg); border-radius: 16px; padding: 32px 36px; margin-bottom: 24px; box-shadow: 0 2px 12px rgba(0,0,0,.04); }
.ca-section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 28px; }
.ca-head-left { display: flex; align-items: center; gap: 10px; }
.ca-section-icon { font-size: 24px; }
.ca-section-title { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: .5px; }

/* ── 日期范围选择器 ── */
.ca-date-range { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ca-date-range label { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.ca-date-range input[type="date"] {
  padding: 7px 12px; border: 1px solid var(--border);
  border-radius: 10px; background: #fff; color: var(--text);
  font-size: 14px; height: 38px; box-sizing: border-box;
  transition: border-color .2s;
}
.ca-date-range input[type="date"]:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-light); }
.ca-date-sep { color: var(--text-3); font-size: 16px; font-weight: 300; }

/* ── 会员阶段：横向大数字行（大气）── */
.ca-stage-row { display: flex; align-items: stretch; gap: 0; }
.ca-stage-item { flex: 1; text-align: center; padding: 24px 12px; min-width: 0; position: relative; transition: transform .2s; }
.ca-stage-item:hover { transform: translateY(-3px); }
.ca-stage-total { border-right: 1px solid #eef0f4; margin-right: 24px; padding-right: 32px; flex: 0 0 auto; min-width: 110px; background: linear-gradient(135deg, #faf5ff, #ede6fe); border-radius: 14px; margin-right: 20px; padding: 28px 32px; }
.ca-stage-big { font-size: 52px; font-weight: 800; line-height: 1.05; letter-spacing: -2px; }
.ca-stage-label { font-size: 14px; color: var(--text-3); margin-top: 6px; font-weight: 500; }
.ca-stage-pill { display: inline-block; width: 30px; height: 30px; line-height: 30px; border-radius: 50%; color: #fff; font-size: 14px; font-weight: 700; margin-top: 8px; }
.ca-stage-pct { font-size: 12px; color: var(--text-3); opacity: .65; margin-top: 3px; }
.ca-stage-divider { width: 1px; height: 56px; background: linear-gradient(to bottom, transparent, #e0e0e0, transparent); margin: 0 16px; flex-shrink: 0; align-self: center; }

/* ── 到店率/消费能力：网格 + 右侧环形图（大气）── */
.ca-split { display: flex; gap: 36px; align-items: stretch; }
.ca-grid { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; align-content: start; }
.ca-chart-wrap { width: 210px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; padding: 16px 0; background: linear-gradient(135deg, #fafbfc, #f5f5fa); border-radius: 16px; }

.ca-cell { text-align: center; padding: 26px 16px 22px; border-radius: 16px; background: #fff; border: 1px solid #f0f0f3; transition: transform .2s, box-shadow .2s; cursor: default; }
.ca-cell:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,.08); border-color: transparent; }
.ca-cell-num { font-size: 44px; font-weight: 800; line-height: 1.08; letter-spacing: -1.5px; }
.ca-cell-pill { display: inline-block; width: 28px; height: 28px; line-height: 28px; border-radius: 50%; color: #fff; font-size: 13px; font-weight: 700; margin-top: 10px; }
.ca-cell-name { font-size: 14px; color: var(--text-3); margin-top: 8px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 960px) {
  .ca-stage-row { flex-wrap: wrap; gap: 10px; justify-content: center; }
  .ca-stage-item { flex: 1 1 calc(25% - 10px); min-width: 90px; }
  .ca-stage-total { flex: 1 1 100%; border-right: none; border-bottom: 1px solid #eef0f4; margin-right: 0; margin-bottom: 16px; padding-bottom: 20px; }
  .ca-stage-divider { display: none; }
}
@media (max-width: 768px) {
  .ca-section { padding: 22px 18px; margin-bottom: 16px; }
  .ca-split { flex-direction: column; gap: 20px; }
  .ca-chart-wrap { width: 100%; }
  .ca-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
  .ca-stage-big { font-size: 40px; }
  .ca-cell-num { font-size: 34px; }
}

/* ============ 套餐消耗升单分析 — 指标卡片 + 顾客列表 ============ */
.pkg-metric-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 24px; }
.pkg-metric-card {
  background: #fff; border-radius: 16px; padding: 24px 18px;
  text-align: center; cursor: pointer;
  border: 2px solid transparent;
  transition: all .25s ease; position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.pkg-metric-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.1); border-color: rgba(99,102,241,.15); }
.pkg-metric-card.active {
  background: linear-gradient(135deg, #f8f7ff, #ede6fe);
  border-color: #8B5CF6;
  box-shadow: 0 4px 16px rgba(139,92,245,.2);
}
.pm-icon {
  display: inline-flex; justify-content: center; align-items: center;
  width: 48px; height: 48px;
  border-radius: 14px; font-size: 22px; font-weight: 800; margin-bottom: 12px;
}
.pm-num { font-size: 40px; font-weight: 800; line-height: 1.1; letter-spacing: -1.5px; margin-bottom: 6px; }
.pm-label { font-size: 15px; color: var(--text); font-weight: 600; margin-bottom: 2px; }
.pm-sub { font-size: 12px; color: var(--text-3); }

@media (max-width: 900px) { .pkg-metric-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .pkg-metric-row { grid-template-columns: 1fr; gap: 12px; } .pkg-metric-card { padding: 18px 14px; } .pm-num { font-size: 32px; } }

/* 购买产品多选列表 */
.bp-list { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.bp-row { display: flex; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--border); transition: background .15s; }
.bp-row:last-child { border-bottom: none; }
.bp-row:hover { background: var(--bg); }
.bp-check { display: flex; align-items: center; gap: 8px; flex: 1; cursor: pointer; min-width: 0; }
.bp-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); flex-shrink: 0; cursor: pointer; }
.bp-name { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-price { font-size: 12px; color: var(--primary); font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.bp-right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; font-size: 12px; color: var(--text-2); }
.bp-qty { width: 52px; padding: 3px 6px; border: 1px solid var(--border); border-radius: 6px; text-align: center; font-size: 13px; outline: none; }
.bp-qty:focus { border-color: var(--primary); }
.bp-qty:disabled { opacity: .45; background: var(--bg); }
.bp-sub { font-weight: 600; color: var(--red); min-width: 52px; text-align: right; }
.bp-total-bar { text-align: right; padding: 10px 4px; font-size: 15px; color: var(--text-2); border-top: 2px dashed var(--border); margin-bottom: 12px; align-items: center; }
.bp-grand-input { width: 100px; padding: 4px 8px; border: 2px solid var(--red); border-radius: 8px; font-size: 18px; font-weight: 800; color: var(--red); text-align: right; outline: none; background: #fff5f5; }
.bp-grand-input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(220,38,38,.15); }

/* 开单收银 - 次卡结算 */
#f_pkg_wrap { background: linear-gradient(135deg,#faf5ff,#f0e6ff); border:1px solid #d8b4fe; border-radius:10px; padding:12px 14px; margin-bottom:4px; }
#f_pkg_wrap select { width:100%; padding:8px 10px; border-radius:8px; border:2px solid #c084fc; font-size:13.5px; color:#7c3aed; font-weight:600; background:#fff; outline:none; }
#f_pkg_remain { animation: pkgPulse 1.5s ease-in-out infinite alternate; }
@keyframes pkgPulse { from{opacity:.75} to{opacity:1} }

/* ═══════════════ 首页轮播图管理（店务端） ═══════════════ */
.carousel-admin{display:flex;flex-direction:column;gap:12px}
.ca-item{display:flex;align-items:center;gap:12px;background:#fafafa;border:1px solid #eee;border-radius:12px;padding:10px}
.ca-img{width:120px;height:48px;object-fit:cover;border-radius:8px;flex:none;background:#eee}
.ca-info{flex:1;min-width:0}
.ca-title{font-weight:700;font-size:14px;color:#111827;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ca-link{font-size:12px;margin-top:2px}
.ca-ops{display:flex;gap:6px;align-items:center;flex-wrap:wrap}

/* ═══════════════ 营销活动管理（店务端） ═══════════════ */
.camp-list{display:flex;flex-direction:column;gap:10px}
.camp-item{display:flex;align-items:center;gap:12px;background:#fafafa;border:1px solid #eee;border-radius:12px;padding:10px}
.camp-thumb{width:64px;height:64px;object-fit:cover;border-radius:10px;flex:none;background:#eee}
.camp-thumb-empty{display:flex;align-items:center;justify-content:center;font-size:26px;color:#fff}
.camp-info{flex:1;min-width:0}
.camp-t1{font-size:14px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.camp-t1 b{color:#111827}
.camp-t2{font-size:12px;margin-top:3px}
.camp-t3{font-size:12px;margin-top:2px;color:#6b7280}
.camp-ops{display:flex;gap:6px;align-items:center;flex-wrap:wrap;flex:none}
.cp-form .field{margin-bottom:12px}
.cp-form textarea{width:100%;font-family:inherit}
/* 活动商品/奖品 结构化逐行录入 */
.cp-itbl{border:1.5px solid #e5e7eb;border-radius:10px;overflow:hidden;background:#fff}
.cp-row{display:flex;gap:6px;padding:6px 8px;align-items:center}
.cp-row:nth-child(even){background:#fcfbfe}
.cp-head{background:#f3f0fb;font-size:12px;font-weight:700;color:#6b7280;padding:8px}
.cp-icell{display:flex;min-width:0}
.cp-icell.cp-del{flex:0 0 auto}
.cp-input{width:100%;min-width:0;padding:7px 8px;border:1.5px solid #e5e7eb;border-radius:8px;font-size:13px;font-family:inherit}
.cp-input:focus{outline:none;border-color:var(--purple)}
.cp-icon-select{width:100%;min-width:0;padding:6px 4px;border:1.5px solid #e5e7eb;border-radius:8px;font-size:18px;background:#fff;cursor:pointer;text-align:center}
.cp-icon-select:focus{outline:none;border-color:var(--purple)}
.cp-del .btn-sm{padding:4px 8px;line-height:1}
