/* 管理后台样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
  background: #f5f6fa;
  color: #333;
}
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  background: #fff;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
  width: 360px;
}
.login-card h2 { text-align: center; margin-bottom: 24px; color: #2a1f0d; }
.login-card input {
  width: 100%;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}
.login-card button {
  width: 100%;
  padding: 12px;
  background: #c9a86c;
  color: #1a1200;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 200px;
  background: #1a1a1a;
  color: #fff;
  padding: 20px 0;
  flex-shrink: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar .brand {
  text-align: center;
  padding: 0 20px 20px;
  border-bottom: 1px solid #333;
  font-size: 16px;
  font-weight: 700;
}
.sidebar .menu-item {
  padding: 14px 24px;
  cursor: pointer;
  font-size: 14px;
  color: #aaa;
}
.sidebar .menu-item:hover, .sidebar .menu-item.active {
  background: #c9a86c;
  color: #1a1200;
}
/* 功能总览页 / 收银台隐藏左侧菜单栏 */
.sidebar.sidebar-hidden { display: none; }
/* 收银台页隐藏后，点击左上角 ☰ 仍可临时展开菜单（.open 优先于隐藏） */
.sidebar.sidebar-hidden.open { display: block; position: fixed; top: 0; left: 0; bottom: 0; z-index: 250; width: 200px; }
.main-content {
  flex: 1;
  padding: 24px;
  overflow: auto;
  height: 100vh;
}
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.top-bar h1 { font-size: 22px; }
.top-bar .user { color: #666; font-size: 14px; }

/* 超级管理员门店切换器 */
.store-switcher {
  margin-left: 14px;
  padding: 7px 30px 7px 12px;
  font-size: 14px;
  color: #333;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%23666'/></svg>") no-repeat right 12px center;
  border: 1px solid #e2e2e2;
  border-radius: 20px;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  max-width: 200px;
}
.store-switcher:focus { border-color: #ff8a3d; }
.store-switcher:hover { border-color: #ffb066; }

/* 左上角标题可点击退回上一页 */
.title-wrap { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.title-wrap h1 { font-size: 22px; margin: 0; }
.back-arrow {
  font-size: 22px; line-height: 1; color: #d4880a;
  opacity: .55; transition: opacity .15s, transform .15s;
}
.title-wrap:hover .back-arrow { opacity: 1; transform: translateX(-2px); }
.title-wrap.no-back { cursor: default; }
.title-wrap.no-back .back-arrow { display: none; }

/* 收银台页「手机收银台」按钮（在标题右侧） */
.btn-mobile-pos {
  margin-left: 14px;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #ff8a3d, #ff6a00);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(255,106,0,.35);
}
.btn-mobile-pos:hover { filter: brightness(1.05); }
.btn-mobile-pos:active { transform: translateY(1px); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.stat-card .num { font-size: 28px; font-weight: 700; color: #c9a86c; }
.stat-card .label { font-size: 13px; color: #999; margin-top: 6px; }

.panel {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.panel h3 { margin-bottom: 16px; font-size: 16px; }
.btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}
.btn-primary { background: #c9a86c; color: #1a1200; font-weight: 600; }
.btn-danger { background: #c62828; color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #eee;
}
.data-table th { color: #999; font-weight: 600; }
.data-table tr:hover { background: #fafafa; }
.data-table th.op-col { text-align: right; }
.data-table td.op-cell { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.form-row input, .form-row select {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.modal-overlay.active { display: flex; }
.modal {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 420px;
  max-width: 90%;
  max-height: 90vh;
  overflow: auto;
}
.modal h3 { margin-bottom: 16px; }
.modal .form-group { margin-bottom: 12px; }
.modal label { display: block; font-size: 13px; color: #666; margin-bottom: 4px; }
.modal input, .modal select, .modal textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
}
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

/* 门店地图选点（腾讯地图 GL） */
.btn-row { display:flex; gap:8px; align-items:center; margin-top:8px; flex-wrap:wrap; }
.btn-mini { background:#fff; color:#e65100; border:1px solid #ffb74d; border-radius:6px; padding:6px 12px; font-size:12px; cursor:pointer; transition:all .15s; }
.btn-mini:hover { background:#fff3e0; }
.btn-mini:active { transform:scale(0.97); }
.btn-mini:disabled { opacity:0.6; cursor:not-allowed; }
.loc-hint { font-size:12px; color:#666; flex:1; min-width:180px; }
.loc-hint-ok { color:#43a047; }
.loc-hint-warn { color:#fb8c00; }
.loc-hint-error { color:#e53935; }
.loc-hint-info { color:#1976d2; }
.modal-hint { margin:0 0 12px 0; color:#888; font-size:12px; line-height:1.6; }
.modal-hint a { color:#e65100; cursor:pointer; text-decoration:underline; }
.map-picker-modal { display:flex; flex-direction:column; width:92vw; max-width:720px; height:80vh; max-height:640px; overflow:hidden; }
.map-picker-search { display:flex; gap:8px; margin-bottom:8px; }
.map-picker-search input[type="text"] { flex:1; min-width:0; padding:8px 10px; border:1px solid #e0e0e0; border-radius:6px; font-size:13px; }
.map-picker-search input#map-search-region { flex:0 0 64px; width:64px; }
.map-picker-search .btn { flex:0 0 auto; width:auto; white-space:nowrap; padding:6px 14px; font-size:13px; border-radius:6px; }
.map-search-results { max-height:200px; overflow-y:auto; border:1px solid #e8e8e8; border-radius:6px; background:#fff; margin-bottom:8px; }
.map-search-item { padding:9px 12px; border-bottom:1px solid #f0f0f0; cursor:pointer; }
.map-search-item:last-child { border-bottom:none; }
.map-search-item:hover { background:#fff8f0; }
.map-search-item .ms-title { font-size:13px; font-weight:600; color:#333; }
.map-search-item .ms-addr { font-size:12px; color:#999; margin-top:2px; }
.map-search-empty { padding:10px 12px; color:#999; font-size:13px; }
.map-picker-wrap { position:relative; flex:1; min-height:0; border-radius:8px; overflow:hidden; border:1px solid #e0e0e0; background:#f5f5f5; }
.map-picker-wrap > div, #storeMapPick { width:100%; height:100%; min-height:280px; }
.map-picker-nomap { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; background:#f5f5f5; color:#888; text-align:center; padding:20px; }
.map-picker-nomap .nomap-icon { font-size:40px; }
.map-picker-nomap .nomap-text { font-size:13px; line-height:1.6; max-width:340px; }
.map-picker-result { margin-top:12px; font-size:13px; line-height:1.6; background:#fff8f0; border:1px solid #ffe0b2; border-radius:8px; padding:10px 12px; }
.map-picker-result .result-label { color:#e65100; font-weight:600; }
.map-picker-result .result-addr { color:#333; }
.map-picker-result .result-coord { display:block; color:#999; font-size:12px; margin-top:4px; }
.form-row-2 { display:flex; gap:12px; }
.form-row-2 .form-group { flex:1; margin-bottom:12px; }

/* 团购核销 */
.verify-box { background: linear-gradient(135deg,#fff8ef,#fff); border: 1px solid #f0d9b8; }
.verify-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.verify-row .filter-select { width: auto; min-width: 120px; }
.verify-result { margin-top: 12px; font-size: 14px; min-height: 22px; }
.verify-result.ok { color: #1a7f37; font-weight: 600; }

/* 打印机设置 */
.printer-hint { color: #666; font-size: 13px; margin-bottom: 16px; }
.printer-status { padding: 10px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.printer-status.on { background: #e8f5ec; color: #1a7f37; border: 1px solid #bfe3cb; }
.printer-status.off { background: #f5f5f5; color: #888; border: 1px solid #e0e0e0; }
.printer-tip { margin-top: 18px; padding: 14px; background: #faf7f0; border: 1px solid #f0e6d2; border-radius: 8px; font-size: 12px; color: #7a6a4a; line-height: 1.9; }
.printer-tip b { color: #5a4a2a; }

/* 打印模板设置 + 小票预览 */
.printer-preview-wrap { margin-top: 22px; border-top: 1px dashed #e3e3e3; padding-top: 18px; }
.printer-preview-title { font-size: 13px; color: #888; margin-bottom: 10px; }
.receipt-preview {
  background: #2b2b2b; border-radius: 10px; padding: 16px; overflow-x: auto;
  max-width: 320px; box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.rp-paper { font-family: "Courier New", Consolas, monospace; font-size: 12px; line-height: 1.55; color: #f3f3f3; white-space: pre; }
.rp-c { text-align: center; }
.rp-r { text-align: right; }
.rp-l { text-align: left; }
.rp-c:first-child { font-size: 14px; font-weight: 700; }
.rp-c:nth-child(2) { font-weight: 600; }
/* 各板块字号控件（后台模板设置） */
.sec-sizes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; margin: 4px 0 6px; padding: 12px 14px; background: #fbfbfd; border: 1px solid #ececf2; border-radius: 10px; }
.sec-size-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sec-size-row .sec-label { font-size: 12.5px; color: #555; }
.sec-input-wrap { display: inline-flex; align-items: center; gap: 6px; }
.sec-size-row .sec-level-sel { padding: 5px 10px; border: 1px solid #d8d8e0; border-radius: 7px; background: #fff; font-size: 13px; color: #333; min-width: 104px; cursor: pointer; }
.sec-size-row .sec-level-sel:focus { outline: none; border-color: #146b4d; }
/* 各板块字号预览（行级，标准/大/特大，纯前端视觉对照真实小票） */
.rp-sec-sm { font-size: 11px; line-height: 1.5; }
.rp-sec-lg { font-size: 14px; line-height: 1.5; }
.rp-sec-xl { font-size: 18px; line-height: 1.5; }
.rp-c.rp-sec-lg { font-size: 18px; font-weight: 600; }
.rp-c.rp-sec-xl { font-size: 24px; font-weight: 700; line-height: 1.35; }
.rp-sec-xxl { font-size: 22px; line-height: 1.4; }
.rp-c.rp-sec-xxl { font-size: 30px; font-weight: 800; line-height: 1.3; }
.printer-divider { margin: 22px 0 14px; border: none; border-top: 1px dashed #e3e3e3; }

/* 打印机设置：双品牌切换 + 易联云打印机列表 */
.brand-tabs { display:flex; gap:8px; margin:4px 0 4px; flex-wrap:wrap; }
.brand-tab { padding:10px 18px; border:1px solid #e0e0e0; background:#fff; border-radius:8px; cursor:pointer; font-size:14px; font-weight:600; color:#555; transition:all .15s; }
.brand-tab:hover { border-color:#ffb877; }
.brand-tab.active { border-color:#ff7a00; color:#ff7a00; background:#fff7ef; }
.printer-subtitle { font-weight:600; margin:6px 0 10px; color:#333; }
.printer-subtip { font-weight:400; font-size:12px; color:#999; margin-left:10px; }
.printer-list { display:flex; flex-direction:column; gap:10px; }
.printer-card { display:flex; justify-content:space-between; align-items:center; border:1px solid #e3e3e3; border-radius:10px; padding:12px 14px; background:#fff; transition:all .15s; }
.printer-card.active { border-color:#ff7a00; background:#fff7ef; box-shadow:0 0 0 2px rgba(255,122,0,.12); }
.pc-main { flex:1; min-width:0; }
.pc-name { font-weight:600; color:#333; }
.pc-badge { font-size:11px; font-weight:500; padding:1px 7px; border-radius:10px; margin-left:6px; vertical-align:middle; }
.pc-badge.ok { background:#e6f7ec; color:#1a9a4e; border:1px solid #b6e6c8; }
.pc-badge.warn { background:#fff4e5; color:#c8761a; border:1px solid #f3d9b0; }
.pc-id { font-size:12px; color:#888; margin-top:2px; }
.pc-ops { display:flex; align-items:center; gap:14px; white-space:nowrap; }
.pc-radio, .pc-enable { font-size:13px; color:#555; display:flex; align-items:center; gap:4px; cursor:pointer; }
.verify-result.err { color: #c62828; font-weight: 600; }
.verify-result.warn { color: #b26a00; font-weight: 600; }
.tag-platform { display: inline-block; padding: 2px 10px; border-radius: 6px; font-size: 12px; color: #fff; }
.tag-meituan { background: #ffc300; color: #333; }
.tag-douyin { background: #161823; }
.badge-status { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; }
.status-unused { background: #fff3e0; color: #b26a00; }
.status-verified { background: #e8f5e9; color: #1a7f37; }
.status-refunded { background: #f5f5f5; color: #888; }
.status-on { background: #e8f5e9; color: #1a7f37; }
.status-off { background: #f5f5f5; color: #888; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 10px; background: #eef0f2; color: #666; font-size: 12px; }
.badge-super { background: #fff0d9; color: #c8851a; font-weight: 600; }
.muted { color: #999; }

/* 小程序端显示开关 */
.mp-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: #fafbfc; border: 1px solid #eef0f2; border-radius: 12px; padding: 16px 18px; margin-top: 8px; }
.mp-toggle-info { flex: 1; }
.mp-toggle-title { font-weight: 600; font-size: 15px; color: #1f2329; }
.mp-toggle-state { margin-top: 6px; font-size: 13px; color: #666; }
.mp-toggle-state .badge { margin-left: 4px; }
.switch { position: relative; display: inline-block; width: 52px; height: 28px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: #cfd4da; border-radius: 28px; transition: .2s; }
.switch .slider::before { content: ""; position: absolute; height: 22px; width: 22px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: #e53935; }
.switch input:checked + .slider::before { transform: translateX(24px); }

/* 易联云 K8 扫码核销 */
.k8-scan-box { background: linear-gradient(135deg,#eef6ff,#fff); border: 1px solid #cfe2ff; }
.k8-feed { margin-top: 14px; max-height: 260px; overflow-y: auto; border: 1px solid #e3e9f2; border-radius: 10px; background: #fff; }
.k8-feed-empty { padding: 16px; color: #999; font-size: 13px; text-align: center; }
.k8-feed-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #f0f3f8; font-size: 13px; }
.k8-feed-item:last-child { border-bottom: none; }
.k8-code { flex: 1; font-family: monospace; word-break: break-all; color: #333; }
.k8-time { color: #999; font-size: 12px; white-space: nowrap; }
.k8-ok { color: #1a7f37; font-weight: 600; }
.k8-warn { color: #b26a00; font-weight: 600; }
.k8-skip { color: #888; }
.k8-config { margin-top: 14px; padding: 10px 12px; border: 1px dashed #cfe2ff; border-radius: 10px; background: #fafcff; }
.k8-config summary { cursor: pointer; color: #2b6cb0; font-weight: 600; font-size: 13px; }
.k8-config .form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 12px; }
.k8-config .form-group { display: flex; flex-direction: column; gap: 4px; }
.k8-config .form-group label { font-size: 12px; color: #666; }
.k8-config .form-group input, .k8-config .form-group select { padding: 7px 9px; border: 1px solid #d8d8e0; border-radius: 7px; font-size: 13px; }
.callback-tip { margin-top: 12px; font-size: 12px; color: #555; line-height: 1.6; }
.callback-tip code { display: inline-block; padding: 3px 8px; background: #eef2f7; border-radius: 6px; color: #1a73e8; word-break: break-all; }
.k8-config .btn { margin-top: 12px; }

/* 菜品图片上传 */
.img-preview { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid #ddd; margin: 8px 0; display: block; }
.img-upload-btns { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.img-upload-btns .btn-sm { cursor: pointer; }

/* 数据高亮 */
.text-balance { color: #1a7f37; font-weight: 600; }
.text-up { color: #c62828; font-weight: 600; }
.text-down { color: #888; font-weight: 600; }

/* 数据概览时间范围选择器 */
.range-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.range-label { font-size: 14px; color: #555; margin-right: 4px; }
.btn-range {
  padding: 6px 16px;
  border: 1px solid #d9d9d9;
  background: #fff;
  border-radius: 20px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  transition: all .15s;
}
.btn-range:hover { border-color: #c62828; color: #c62828; }
.btn-range.active { background: #c62828; border-color: #c62828; color: #fff; }
.range-custom { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; }
.range-custom input[type="date"] {
  padding: 5px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
}
.range-custom span { color: #999; font-size: 13px; }
.range-current { margin-left: auto; font-size: 13px; color: #c62828; font-weight: 600; }

/* 客户数据备份与恢复 */
.panel-tip { font-size: 13px; color: #888; margin: 8px 0 14px; line-height: 1.6; }
.btn-outline { background: #fff; color: #c62828; border: 1px solid #c62828; padding: 8px 18px; border-radius: 6px; font-size: 14px; cursor: pointer; }
.btn-outline:hover { background: #fdeaea; }
.io-hint { margin-left: 14px; font-size: 13px; color: #1a7f37; }

/* 工具栏 / 搜索 / 筛选 */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search-input {
  padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; width: 200px;
  transition: border-color .15s;
}
.search-input:focus { border-color: #c9a86c; outline: none; }
.filter-select {
  padding: 8px 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; background: #fff;
}
.count-badge {
  display: inline-block; min-width: 20px; padding: 1px 8px; margin-left: 4px;
  background: #c9a86c; color: #1a1200; border-radius: 10px; font-size: 12px; font-weight: 600;
}
.table-scroll { overflow-x: auto; }
.t-loading, .t-empty { text-align: center; color: #999; padding: 28px 0; }

/* 分页器 */
.pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.pager-info { font-size: 13px; color: #888; margin-right: 8px; }
.pager-btn { background: #fff; border: 1px solid #ddd; color: #555; }
.pager-btn:hover:not([disabled]) { border-color: #c9a86c; color: #c9a86c; }
.pager-btn[disabled] { opacity: .5; cursor: not-allowed; }
.pager-cur { background: #c9a86c; border-color: #c9a86c; color: #1a1200; font-weight: 600; }

/* 图表条形 */
.charts-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 24px; }
.chart-bars { display: flex; flex-direction: column; gap: 10px; }
.chart-empty { color: #999; font-size: 13px; padding: 12px 0; text-align: center; }
.bar-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.bar-label { width: 84px; flex-shrink: 0; color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1; height: 16px; background: #f0f0f0; border-radius: 8px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: linear-gradient(90deg, #e8a0a0, #c9a86c); border-radius: 8px; transition: width .4s; }
.bar-val { width: 78px; flex-shrink: 0; text-align: right; color: #333; font-weight: 600; }

/* 弹窗头部 */
.modal-lg { width: 620px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-header h3 { margin: 0; }
.modal-close { cursor: pointer; font-size: 18px; color: #999; line-height: 1; }
.modal-close:hover { color: #c62828; }

/* 订单详情 */
.order-detail { font-size: 13px; }
.od-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.od-item { display: flex; flex-direction: column; }
.od-label { color: #999; font-size: 12px; margin-bottom: 2px; }
.od-value { color: #333; font-weight: 600; }
.od-remark { margin: 12px 0; color: #555; }
.od-subtitle { margin: 16px 0 8px; font-size: 14px; }
.od-items { margin-bottom: 12px; }
.od-summary { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px; background: #faf7f0; border-radius: 8px; margin-bottom: 14px; }
.od-summary div { display: flex; gap: 6px; align-items: baseline; }
.od-summary b { color: #c62828; font-size: 15px; }
.od-status-row { display: flex; align-items: center; gap: 12px; }
.od-status-text { font-weight: 700; color: #a67c52; }
.od-status-tip { font-size: 12px; color: #b5afa4; }
/* 订单管理列表状态标签（只读）：按状态着色 */
.order-status-text { display: inline-block; padding: 4px 12px; font-size: 12px; font-weight: 600; border-radius: 999px; white-space: nowrap; }
.order-status-text.st-pending { color: #e6822a; background: #fff4e8; }
.order-status-text.st-cooking { color: #b8862f; background: #fdf6ea; }
.order-status-text.st-ready, .order-status-text.st-served { color: #1e9e57; background: #e9f8ef; }
.order-status-text.st-paid { color: #0f8a4d; background: #e4f6ec; }
.order-status-text.st-completed { color: #8a8a8a; background: #f1f1f1; }
.order-status-text.st-refunding { color: #d9534f; background: #fff1f1; }
.order-status-text.st-refunded { color: #8a8a8a; background: #f1f1f1; }
.order-status-text.st-cancelled { color: #9a9a9a; background: #f1f1f1; }

/* 响应式 */
.sidebar-toggle {
  display: none; position: fixed; top: 14px; left: 14px; z-index: 300;
  width: 40px; height: 40px; border: none; border-radius: 8px;
  background: #c9a86c; color: #fff; font-size: 18px; cursor: pointer;
}
@media (max-width: 768px) {
  .sidebar-toggle { display: block; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 250; transform: translateX(-100%);
    transition: transform .25s; width: 180px;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { padding: 56px 16px 16px; height: auto; overflow: visible; }
  .od-grid { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* 店铺设置 */
.setting-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0; border-bottom: 1px solid #eee;
}
.setting-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.setting-desc { font-size: 13px; color: #888; line-height: 1.5; }
.switch { position: relative; display: inline-block; width: 50px; height: 28px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #ccc; border-radius: 28px; transition: .25s;
}
.switch .slider::before {
  content: ''; position: absolute; height: 22px; width: 22px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .25s;
}
.switch input:checked + .slider { background: #c9a86c; }
.switch input:checked + .slider::before { transform: translateX(22px); }

/* ===================== 功能总览（大板块展示页） ===================== */
.overview-intro { margin-bottom: 18px; }
.overview-intro h2 { font-size: 20px; color: #2a1f0d; margin-bottom: 6px; }
.overview-intro p { font-size: 13px; color: #888; }
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.feature-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  position: relative;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.10);
  border-color: #c9a86c;
}
.fc-icon {
  font-size: 38px;
  line-height: 1;
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  background: #faf6ee;
  border-radius: 14px;
  flex-shrink: 0;
}
.fc-body { flex: 1; min-width: 0; }
.fc-name { font-size: 17px; font-weight: 700; color: #2a1f0d; margin-bottom: 6px; }
.fc-desc { font-size: 13px; color: #777; line-height: 1.6; }
.fc-enter {
  position: absolute; right: 18px; bottom: 16px;
  font-size: 13px; font-weight: 600; color: #c9a86c;
  opacity: 0; transition: opacity .15s;
}
.feature-card:hover .fc-enter { opacity: 1; }
@media (max-width: 768px) {
  .overview-grid { grid-template-columns: 1fr; }
}

/* ===================== 实时订单 ===================== */
.rt-tip { font-size: 12px; font-weight: 400; color: #999; margin-left: 8px; }
.realtime-list { display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 170px); overflow-y: auto; padding-right: 6px; }
.rt-card {
  position: relative;
  border: 1px solid #eee;
  border-left: 4px solid #c9a86c;
  border-radius: 10px;
  padding: 14px 16px;
  background: #fff;
}
.rt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rt-no { font-weight: 700; color: #2a1f0d; font-size: 15px; }
.rt-time { font-size: 12px; color: #999; }
.rt-serve {
  position: absolute;
  top: 4px;
  right: 16px;
  z-index: 5;
  white-space: nowrap;
  transform: scale(4);
  transform-origin: top right;
  cursor: pointer;
}
.rt-body { font-size: 13px; color: #555; }
.rt-row { margin: 3px 0; line-height: 1.5; }
.rt-label { display: inline-block; width: 38px; color: #999; flex-shrink: 0; }
.rt-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed #eee;
}
.rt-amount { font-size: 16px; font-weight: 700; color: #c62828; margin-right: auto; }
/* 详情 / 小票补打 按钮组：靠右对齐且彼此留缝 */
.rt-foot .btn { margin: 0; }

/* ===================== 优惠券管理 ===================== */
.status-on { color: #2e7d32; background: #e8f5e9; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.status-off { color: #999; background: #f0f0f0; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }

/* ===================== 会员等级 / 规则设置 ===================== */
.level-list { display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.level-row { display: flex; align-items: center; gap: 12px; }
.level-tag { width: 46px; font-weight: 700; color: #c9a86c; flex-shrink: 0; }
.level-name { flex: 1; padding: 8px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; }
.tier-list { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.tier-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid #eee; border-radius: 10px; background: #fafafa; }
.tier-idx { font-weight: 600; color: #666; min-width: 64px; }
.tier-row label { font-size: 13px; color: #666; display: flex; align-items: center; gap: 4px; }
.tier-row input[type=number] { width: 90px; padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; }
.tier-tag { width: 120px; padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; }

/* ===================== 广告配置 ===================== */
/* 沿用通用 .form-group / .data-table / .img-preview / .img-upload-btns 样式，无特化规则 */

/* 英雄区顶部大图编辑器 */
.hero-editor { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.hero-preview {
  width: 280px; height: 200px; flex-shrink: 0;
  border-radius: 12px; overflow: hidden; background: #f2f2f2;
  display: flex; align-items: center; justify-content: center;
  color: #bbb; font-size: 13px; text-align: center; padding: 12px;
  border: 1px solid #eee; background-size: cover; background-position: center;
}
.hero-editor-main { flex: 1; min-width: 280px; }
/* 底部横幅：3 等分网格，使 ①/② 分别对齐到英雄区 图1/图2 下方 */
.hero-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
@media (max-width: 980px) { .hero-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .hero-grid-3 { grid-template-columns: 1fr; } }
.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; }
/* 图片预览：显示当前/原始图片 */
.hero-preview img.preview-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.preview-cap { font-size: 12px; color: #888; margin-top: 6px; }
/* 统一五个图片板块的按钮行（上传 + 保存 一致排布） */
.img-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
/* 桌台管理表单 */
.table-form { background:#fafbfc; border:1px solid #eceef1; border-radius:12px; padding:16px 18px; margin-bottom:18px; }
.table-form h4 { margin:0 0 14px; font-size:15px; color:#222; }

/* ===================== 扫码点餐 / 收银台 ===================== */
.pos-layout { display:flex; gap:18px; align-items:flex-start; }
.pos-menu { flex:1 1 auto; min-width:0; }
/* 收银台菜品区：每个分类一组（从上到下），组内菜品横向一行排开（可横向滑动） */
#posGrid { flex:1 1 auto; min-width:0; }
.pos-search { padding:8px 12px; border:1px solid #ddd; border-radius:8px; font-size:13px; width:220px; }
/* 菜品横向排列：每个分类一行，菜品从左到右排开，超出横向滑动 */
#posGrid { flex:1 1 auto; min-width:0; }
.pos-dish-row { display:flex; gap:14px; overflow-x:auto; padding-bottom:10px; }
.pos-dish-row::-webkit-scrollbar { height:8px; }
.pos-dish-row::-webkit-scrollbar-thumb { background:#e8e0d3; border-radius:4px; }
.pos-dish-row .pos-card { width:150px; flex-shrink:0; }
.pos-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:14px; margin-top:14px; }
.pos-grid-empty { color:#999; padding:40px; text-align:center; }
/* 收银台：按菜品分类排版 */
.pos-cat { margin-bottom:22px; }
.pos-cat-title { font-size:15px; font-weight:700; color:#222; border-left:4px solid #ff7a18; padding:4px 0 4px 10px; margin-bottom:2px; }
.pos-cat .pos-grid { margin-top:10px; }
/* 方形卡片（保留原尺寸）+ 图片右下角数量加减控件 */
.pos-card { position:relative; background:#fff; border:1px solid #eceef1; border-radius:14px; overflow:hidden; cursor:pointer; transition:transform .08s, box-shadow .12s; }
.pos-card:hover { transform:translateY(-2px); box-shadow:0 6px 18px rgba(0,0,0,.08); }
.pos-card:active { transform:scale(.97); }
.pos-card-img { position:relative; width:100%; aspect-ratio:1/1; background:#f3f4f6; }
/* 菜品卡片上的数量加减控件（仿小程序点餐卡片：+- 快捷加减，点击卡片其余区域仍弹详情） */
.pos-stepper { position:absolute; right:8px; bottom:8px; display:flex; align-items:center; gap:6px; background:rgba(255,255,255,.96); border-radius:16px; padding:3px; box-shadow:0 2px 8px rgba(0,0,0,.18); }
.ps-btn { width:26px; height:26px; border:none; border-radius:50%; background:#ff7a18; color:#fff; font-size:18px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; }
.ps-btn.ps-minus { background:#fff; color:#ff7a18; border:1px solid #ff7a18; }
.ps-num { min-width:18px; text-align:center; font-size:14px; font-weight:700; color:#222; }
.pos-card-img img { width:100%; height:100%; object-fit:cover; display:block; }
.pos-card-body { padding:8px 10px 10px; }
.pos-card-name { font-size:14px; color:#222; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pos-card-price { font-size:13px; color:#e4393c; font-weight:700; margin-top:2px; }
/* ===== 收银台菜品详情弹窗（仿小程序点餐详情） ===== */
.pos-detail-mask { position:fixed; inset:0; background:rgba(0,0,0,.5); display:none; align-items:center; justify-content:center; z-index:300; padding:20px; box-sizing:border-box; }
.pos-detail-sheet { position:relative; width:380px; max-width:100%; max-height:90vh; overflow:auto; background:#fff; border-radius:16px; padding:18px; box-sizing:border-box; box-shadow:0 12px 40px rgba(0,0,0,.25); }
.pos-detail-close { position:absolute; top:10px; right:12px; width:32px; height:32px; border:none; border-radius:50%; background:#f2f3f5; color:#666; font-size:22px; line-height:1; cursor:pointer; z-index:2; }
.pos-detail-close:hover { background:#e6e7e9; }
.pos-detail-pic { width:100%; aspect-ratio:16/10; background:#f3f4f6; border-radius:12px; overflow:hidden; display:flex; align-items:center; justify-content:center; }
.pos-detail-pic img { width:100%; height:100%; object-fit:cover; display:block; }
.pos-detail-title { display:flex; align-items:center; gap:8px; margin-top:12px; }
.pos-detail-name { font-size:18px; font-weight:700; color:#222; }
.pos-detail-tag { background:#fff0d9; color:#c8851a; font-size:12px; font-weight:600; padding:2px 8px; border-radius:10px; }
.pos-detail-desc { margin-top:8px; font-size:13px; color:#888; line-height:1.6; }
.pos-detail-section { margin-top:14px; }
.section-sub { font-size:13px; color:#666; margin-bottom:8px; }
.option-list { display:flex; flex-wrap:wrap; gap:10px; }
.option-item { display:flex; align-items:center; gap:4px; padding:8px 14px; border:1px solid #ddd; border-radius:10px; font-size:14px; color:#444; cursor:pointer; transition:all .12s; background:#fff; }
.option-item:hover { border-color:#ffb27a; }
.option-item.selected { border-color:#ff7a18; background:#fff7ef; color:#ff7a18; font-weight:600; }
.option-star { color:#ff7a18; }
.pos-detail-footer { display:flex; align-items:center; gap:12px; margin-top:18px; flex-wrap:wrap; }
.pos-detail-price { font-size:20px; font-weight:800; color:#e4393c; flex:1 1 auto; }
.pos-detail-price .unit { font-size:12px; color:#999; font-weight:400; }
.pos-detail-qty { display:flex; align-items:center; gap:8px; background:#f5f6f8; border-radius:18px; padding:4px; }
.pos-detail-qty .dq-btn { width:30px; height:30px; border:none; border-radius:50%; background:#ff7a18; color:#fff; font-size:18px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; }
.pos-detail-qty .dq-num { min-width:22px; text-align:center; font-size:15px; font-weight:700; color:#222; }
.pos-detail-add { flex:1 1 120px; border:none; border-radius:24px; background:#ff7a18; color:#fff; font-size:15px; font-weight:700; padding:11px 0; cursor:pointer; box-shadow:0 4px 12px rgba(255,122,24,.3); }
.pos-detail-add:hover { background:#f06a08; }
/* 购物车中做法标注 */
.pci-option { color:#ff7a18; font-size:12px; margin-left:4px; }

.pos-cart { flex:0 0 320px; background:#fff; border:1px solid #eceef1; border-radius:14px; padding:16px; position:sticky; top:16px; }
.pos-cart-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.pos-meta { display:flex; flex-direction:column; gap:8px; margin-bottom:12px; }
.pos-input { padding:8px 10px; border:1px solid #ddd; border-radius:8px; font-size:13px; width:100%; box-sizing:border-box; }
/* 收银台：堂食/外带/外卖 三选一自锁按钮 */
.pos-mode-group { display:flex; gap:8px; }
.pos-mode-btn { flex:1; padding:9px 0; border:1px solid #ddd; border-radius:8px; background:#fff; color:#555; font-size:13px; cursor:pointer; transition:all .12s; box-sizing:border-box; }
.pos-mode-btn:hover { border-color:#ffb27a; }
.pos-mode-btn.active { background:#ff7a18; border-color:#ff7a18; color:#fff; font-weight:700; box-shadow:0 2px 8px rgba(255,122,24,.25); }
/* 收银台：桌号按键（与桌台管理同步） */
.pos-table-group { display:flex; flex-wrap:wrap; gap:6px; }
.pos-table-btn { padding:7px 12px; min-width:42px; border:1px solid #ddd; border-radius:8px; background:#fff; color:#555; font-size:13px; cursor:pointer; transition:all .12s; box-sizing:border-box; }
.pos-table-btn:hover { border-color:#ffb27a; }
.pos-table-btn.active { background:#ff7a18; border-color:#ff7a18; color:#fff; font-weight:700; box-shadow:0 2px 8px rgba(255,122,24,.25); }
/* 收银台：会员信息同步卡片 */
.pos-member-info { margin-top:2px; border:1px solid #eceef1; border-radius:10px; padding:8px 10px; font-size:13px; background:#fffaf3; }
.pos-member-info.not-found { background:#fff; color:#e4393c; border-color:#f3c2c2; }
.pos-member-info .pmi-row { display:flex; justify-content:space-between; align-items:center; padding:2px 0; gap:8px; }
.pos-member-info .pmi-name { font-weight:700; color:#222; }
.pos-member-info .pmi-lvl { font-size:11px; color:#ff7a18; border:1px solid #ffd2ad; border-radius:10px; padding:1px 8px; }
.pos-member-info .pmi-bal { color:#e4393c; font-weight:700; }
.pos-member-info .pmi-coupon { color:#888; }
/* 收银台会员可用券按钮 */
.pos-coupons { margin-top:10px; display:flex; flex-wrap:wrap; gap:8px; }
.pos-coupons-title { width:100%; font-size:12px; color:#888; margin-bottom:2px; }
/* 收银台：选择会员按钮 + 弹窗列表 */
.pos-member-row { display:flex; gap:8px; align-items:stretch; position:relative; }
.pos-member-row .pos-input { flex:1 1 auto; }
.pos-member-pick { flex:0 0 auto; white-space:nowrap; background:#fff7e6; border:1px solid #ffd591; color:#ad6800; border-radius:8px; cursor:pointer; font-size:13px; padding:0 14px; }
.pos-member-pick:hover { background:#ffe7ba; }
/* 收银台会员搜索：数字键盘浮层（点击搜索框弹出） */
.pos-keypad-pop { position:fixed; left:0; right:0; bottom:0; z-index:200; margin:0 auto; max-width:520px; background:#fff; border-top:1px solid #eee; box-shadow:0 -8px 24px rgba(0,0,0,.14); padding:12px 12px calc(12px + env(safe-area-inset-bottom)); }
.pos-keypad-list { max-height:120px; overflow:auto; display:flex; flex-direction:column; gap:6px; margin-bottom:10px; }
.pos-keypad-list .t-empty { color:#999; font-size:13px; text-align:center; padding:14px 0; }
.pos-keypad-list .pos-member-row-item { border:1px solid #eceef1; border-radius:10px; padding:9px 12px; cursor:pointer; background:#fff; }
.pos-keypad-list .pos-member-row-item:hover { border-color:#ffb27a; background:#fffaf3; }
.pos-keypad-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.pos-key { height:46px; border:1px solid #e6e8eb; border-radius:10px; background:#f7f8fa; font-size:18px; font-weight:600; color:#222; cursor:pointer; user-select:none; transition:all .1s; }
.pos-key:hover { background:#eef1f5; }
.pos-key:active { background:#e0e6ef; transform:scale(.96); }
.pos-key-clear { color:#ad6800; background:#fff7e6; border-color:#ffd591; font-size:14px; }
.pos-key-del { color:#e4393c; background:#fff1f0; border-color:#ffccc7; font-size:16px; }
.pos-keypad-close { margin-top:10px; text-align:center; font-size:13px; color:#888; cursor:pointer; padding:8px; border-top:1px dashed #eee; }
.pos-keypad-close:hover { color:#ff7a18; }
/* 当前订单栏会员搜索：就地筛选下拉列表（占会员信息卡位置，正常文档流） */
.pos-member-inline-list { max-height:260px; overflow:auto; background:#fff; border:1px solid #eee; border-radius:10px; box-shadow:0 4px 14px rgba(0,0,0,.08); padding:6px; margin-top:8px; display:flex; flex-direction:column; gap:6px; }
.pos-member-inline-list .pos-member-row-item { border:1px solid #eceef1; border-radius:10px; padding:9px 12px; cursor:pointer; transition:all .12s; background:#fff; }
.pos-member-inline-list .pos-member-row-item:hover { border-color:#ffb27a; background:#fffaf3; }
.pos-member-list { margin-top:10px; max-height:46vh; overflow:auto; display:flex; flex-direction:column; gap:6px; }
.pos-member-row-item { border:1px solid #eceef1; border-radius:10px; padding:9px 12px; cursor:pointer; transition:all .12s; background:#fff; }
.pos-member-row-item:hover { border-color:#ffb27a; background:#fffaf3; }
.pos-member-row-item .pmi-main { display:flex; justify-content:space-between; align-items:center; }
.pos-member-row-item .pmi-name { font-weight:700; color:#222; font-size:14px; }
.pos-member-row-item .pmi-lvl { font-size:11px; color:#ff7a18; border:1px solid #ffd2ad; border-radius:10px; padding:1px 8px; }
/* 收银台：会员余额抵扣 */
.pos-balance-row { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top:8px; padding:8px 10px; border:1px solid #e3eefc; border-radius:10px; background:#f3f8ff; }
.pos-bal-amount { font-weight:700; color:#e4393c; font-size:14px; }
.pos-bal-toggle { display:flex; align-items:center; gap:6px; font-size:13px; color:#222; cursor:pointer; }
.pos-bal-toggle input { width:16px; height:16px; accent-color:#ff7a18; cursor:pointer; }
.pos-bal-amt { display:flex; align-items:center; gap:6px; font-size:13px; color:#e4393c; font-weight:700; }
.pos-bal-input { width:84px; padding:5px 8px; border:1px solid #cfd8e3; border-radius:7px; font-size:13px; text-align:right; box-sizing:border-box; }
.pos-bal-max { font-size:11px; color:#8aa0b6; font-weight:400; }
.pos-balance-hint { font-size:12px; color:#2f7de0; margin-top:2px; }
.pos-member-row-item .pmi-sub { display:flex; gap:12px; flex-wrap:wrap; font-size:12px; color:#888; margin-top:3px; }
.pos-member-row-item .pmi-sub .pmi-bal { color:#e4393c; font-weight:700; }
.pos-coupon-btn { padding:6px 12px; border:1px solid #ffd591; background:#fff7e6; color:#ad6800; border-radius:18px; font-size:12px; cursor:pointer; transition:all .12s; }
.pos-coupon-btn:hover { background:#ffe7ba; }
.pos-coupon-btn.active { background:#ff7a18; border-color:#ff7a18; color:#fff; font-weight:700; box-shadow:0 2px 8px rgba(255,122,24,.25); }
.pos-coupon-hint { font-size:12px; color:#ff7a18; margin-top:6px; min-height:16px; }
/* 收银台当前订单 - 优惠券上下滑动（仿小程序确认订单：仅显示一个，上下滑动看其它） */
.pos-order-coupons { margin:10px 0 2px; }
.pos-coupon-head { display:flex; align-items:center; justify-content:space-between; font-size:14px; font-weight:700; color:#1a1a1a; margin-bottom:8px; }
.pos-coupon-none-btn { font-size:13px; font-weight:400; color:#888; padding:6px 16px; border:2px solid #ddd; border-radius:28px; background:#fafafa; cursor:pointer; user-select:none; }
.pos-coupon-none-btn.on { color:#fff; background:#ff7a18; border-color:#ff7a18; font-weight:600; }
.pos-coupon-scroll { height:78px; overflow-y:auto; scroll-snap-type:y mandatory; -webkit-overflow-scrolling:touch; }
.pos-coupon-scroll::-webkit-scrollbar { width:4px; }
.pos-coupon-scroll::-webkit-scrollbar-thumb { background:#eee; border-radius:4px; }
.pos-coupon-slide { scroll-snap-align:center; }
.pos-coupon-slide .pos-coupon-card { margin:0; min-height:78px; }
.pos-coupon-empty { font-size:13px; color:#bbb; padding:6px 2px 2px; }
.pos-coupon-card { display:flex; justify-content:space-between; align-items:center; background:#fafafa; border:2px solid #eee; border-radius:16px; padding:14px 18px; box-sizing:border-box; cursor:pointer; min-height:76px; transition:all .12s; }
.pos-coupon-card.sel { border-color:#ff7a18; background:#fff7e6; }
.pos-coupon-info { display:flex; flex-direction:column; min-width:0; }
.pos-coupon-name { font-size:15px; font-weight:700; color:#1a1a1a; }
.pos-coupon-disc { font-size:13px; color:#ff7a18; margin-top:4px; }
.pos-coupon-radio { width:22px; height:22px; border-radius:50%; border:2px solid #ccc; box-sizing:border-box; flex-shrink:0; }
.pos-coupon-radio.on { background:#ff7a18; border-color:#ff7a18; }
.pos-order-coupons .pos-coupon-hint { text-align:center; font-size:12px; color:#bbb; margin-top:4px; }
.pos-actual-pay { display:flex; align-items:center; justify-content:space-between; margin:10px 0 2px; padding:10px 14px; border:1px dashed #ffd591; border-radius:12px; background:#fffdf7; }
.pos-actual-pay-label { font-size:14px; font-weight:700; color:#1a1a1a; }
.pos-actual-pay-amt { font-size:20px; font-weight:800; color:#ff7a18; }
.pos-cart-list { max-height:42vh; overflow:auto; margin-bottom:10px; }
.pos-empty { color:#999; font-size:13px; text-align:center; padding:24px 0; }
.pos-cart-item { display:flex; align-items:center; gap:8px; padding:10px 0; border-bottom:1px dashed #eee; font-size:13px; }
.pci-name { flex:1 1 auto; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:#222; }
.pci-price { color:#888; width:64px; text-align:right; }
.pci-qty { display:flex; align-items:center; gap:6px; }
.pci-btn { width:24px; height:24px; border:1px solid #ddd; background:#fafafa; border-radius:6px; cursor:pointer; font-size:15px; line-height:1; color:#333; }
.pci-btn:active { background:#eee; }
.pci-sum { width:70px; text-align:right; font-weight:700; color:#e4393c; }
.pos-total { display:flex; justify-content:space-between; align-items:center; font-size:15px; font-weight:700; padding:10px 0; border-top:2px solid #f0f0f0; }
.pos-total-amt { color:#e4393c; font-size:20px; }
.pos-pay { display:flex; flex-direction:column; gap:10px; margin-top:8px; }
.btn-scan-pay { width:100%; background:linear-gradient(135deg,#ff7a18,#ff5a00); color:#fff; font-size:16px; font-weight:700; padding:16px; box-shadow:0 4px 12px rgba(255,90,0,.25); }
.btn-scan-pay:active { background:linear-gradient(135deg,#e96a0d,#e05000); }
/* 结算区：余额抵扣按钮（位于扫码收款上方，与小程序余额支付一致） */
.btn-balance-pay { width:100%; background:linear-gradient(135deg,#ffd666,#faad14); color:#5c3b00; font-size:16px; font-weight:700; padding:16px; box-shadow:0 4px 12px rgba(250,173,20,.25); }
.btn-balance-pay:active { background:linear-gradient(135deg,#e8b730,#e09b00); }
.btn-balance-pay.disabled, .btn-balance-pay:disabled { background:#f0f0f0; color:#bbb; box-shadow:none; cursor:not-allowed; }
.pos-supplement { display:flex; align-items:center; justify-content:space-between; gap:6px; margin:6px 0 2px; padding:8px 12px; background:#fff7f0; border:1px solid #ffd9bf; border-radius:10px; font-size:14px; }
.pos-supplement .pos-supplement-label { color:#e65100; font-weight:600; }
.pos-supplement .pos-supplement-amt { color:#e4393c; font-weight:800; font-size:16px; }
.pos-supplement .pos-supplement-tag { color:#fff; background:#ff8f00; padding:2px 10px; border-radius:12px; font-size:12px; }
/* 会员券管理页 */
.uc-grant-box { background:#fafafa; border:1px solid #eee; border-radius:10px; padding:12px; margin-bottom:14px; }
.uc-grant-title { font-weight:700; margin-bottom:8px; color:#333; }
.uc-grant-fields { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.uc-grant-fields .pos-input { width:auto; min-width:120px; }
.uc-grant-fields .pos-input[type=date] { min-width:150px; }
.io-hint { font-size:12px; color:#52c41a; margin-left:8px; }
.table-empty { text-align:center; color:#999; padding:24px; }
.pos-clear { width:100%; margin-top:10px; color:#999; background:#fafafa; border:1px solid #eee; }
.btn-link { background:transparent; color:#1677ff; border:1px solid #d6e4ff; }
.btn-link:active { background:#f0f6ff; }
.manual-pay { margin-top:14px; padding-top:14px; border-top:1px dashed #eee; }
.manual-pay .pay-input { margin-bottom:10px; }

.pay-amt { font-size:18px; font-weight:700; color:#e4393c; margin:6px 0 14px; }
.pay-label { display:block; font-size:13px; color:#666; margin-bottom:6px; }
.pay-input { width:100%; padding:12px; border:1px solid #ddd; border-radius:8px; font-size:15px; letter-spacing:1px; box-sizing:border-box; }
.pay-tip { color:#e4393c; font-size:13px; margin-top:12px; min-height:18px; }
.pay-queue { text-align:center; font-size:14px; color:#d4880a; font-weight:700; margin:-4px 0 12px; }
/* 排号成功浮层（仿小程序下单成功） */
.pos-queue-modal { text-align:center; padding:30px 24px; }
.pos-queue-label { font-size:18px; color:#666; }
.pos-queue-no { font-size:84px; font-weight:800; color:#e4393c; line-height:1.1; letter-spacing:4px; margin:8px 0 4px; }
.pos-queue-tip { font-size:13px; color:#999; margin-bottom:24px; }
.pos-queue-actions { display:flex; justify-content:center; }
.k8-wait { text-align:center; font-size:15px; color:#444; padding:22px 0; line-height:1.9; }
.k8-sub { font-size:12px; color:#999; }
.modal-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:18px; }
.modal-title { font-size:17px; font-weight:700; color:#222; margin-bottom:8px; }
.cfg-check { display:flex; align-items:center; gap:8px; font-size:13px; color:#333; margin-bottom:8px; cursor:pointer; }
.cfg-block { font-size:13px; font-weight:700; color:#555; margin:14px 0 8px; border-top:1px dashed #eee; padding-top:12px; }
.pos-textarea { width:100%; min-height:64px; padding:8px 10px; border:1px solid #ddd; border-radius:8px; font-size:12px; font-family:monospace; box-sizing:border-box; resize:vertical; }

@media (max-width: 880px){
  .pos-layout { flex-direction:column; }
  .pos-cart { flex:1 1 auto; width:100%; position:static; }
}

/* ===== 新增功能板块样式（库存/审计/退款/营销/营业/权限） ===== */
.section-title { font-size:18px; font-weight:700; color:#222; margin:4px 0 14px; display:flex; align-items:center; gap:12px; }
.section-tip { font-size:13px; color:#888; margin:-6px 0 14px; }
.form-card { max-width:480px; background:#fff; border:1px solid #eee; border-radius:12px; padding:20px; }
.stock-input { padding:6px 8px; border:1px solid #ddd; border-radius:6px; }
.t-empty { text-align:center; color:#999; padding:30px 0; font-size:13px; }
.t-loading { text-align:center; color:#aaa; padding:20px 0; font-size:13px; }
.pager { display:flex; align-items:center; gap:12px; justify-content:center; margin-top:16px; }
.pager-info { font-size:13px; color:#666; }
.badge-warn { background:#fff3e0; color:#e08a00; }
.badge-off { background:#f0f0f0; color:#999; }
.toolbar { display:flex; gap:10px; margin-bottom:14px; flex-wrap:wrap; }
.toolbar input { padding:8px 12px; border:1px solid #ddd; border-radius:8px; font-size:13px; }

/* 权限 */
.perm-admin-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:16px; margin-top:8px; }
.perm-card { border:1px solid #eee; border-radius:12px; padding:16px; background:#fff; }
.perm-admin { font-size:15px; margin-bottom:12px; display:flex; align-items:center; gap:10px; }
.perm-checks { display:flex; flex-wrap:wrap; gap:10px 16px; margin-bottom:14px; }
.perm-check { font-size:13px; color:#444; display:flex; align-items:center; gap:6px; cursor:pointer; }
.perm-actions { display:flex; gap:12px; flex-wrap:wrap; align-items:center; justify-content:flex-end; padding-top:4px; }
.perm-actions .perm-del { margin-left:auto; }

/* 模态框表单 & 危险按钮 */
.form-row { margin-bottom:12px; }
.form-row > label { display:block; font-size:13px; color:#555; margin-bottom:5px; }
.form-input { width:100%; box-sizing:border-box; padding:9px 11px; border:1px solid #d9d9d9; border-radius:7px; font-size:14px; outline:none; }
.form-input:focus { border-color:#ff7a00; }
.modal-body { padding:18px; }
.modal-footer { padding:12px 18px; border-top:1px solid #eee; text-align:right; }
.btn-danger { background:#e74c3c; color:#fff; border:none; }
.btn-danger:hover { background:#c0392b; }

/* ============ 超级管理员控制台：分组卡片 ============ */
.super-head { margin-bottom:6px; }
.super-head h2 { font-size:22px; margin:0 0 4px; }
.card-group { margin-top:16px; }
.card-group .panel-head { align-items:baseline; }
.card-group .panel-head .muted.sm { font-size:12px; }
.sub-block { margin-top:16px; padding-top:14px; border-top:1px dashed #eee; }
.sub-block:first-of-type { border-top:none; padding-top:0; }
.sub-block h4 { margin:0 0 8px; font-size:15px; }
.form-row-3 { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.form-row-3 input, .form-row-3 select { flex:1; min-width:160px; }
.table-wrap { overflow-x:auto; margin-top:6px; }
.muted.sm { font-size:12px; color:#888; }
.row-total { background:#fff8ee; font-weight:600; }
.row-total td { border-top:2px solid #ffd9a8; }

/* 模态框 */
.modal-mask { position:fixed; inset:0; background:rgba(0,0,0,.45); display:flex; align-items:center; justify-content:center; z-index:1000; }
.modal-box { width:420px; max-width:92vw; background:#fff; border-radius:14px; box-shadow:0 12px 40px rgba(0,0,0,.25); overflow:hidden; }
.modal-head { display:flex; align-items:center; justify-content:space-between; padding:14px 18px; border-bottom:1px solid #eee; }
.modal-head h3 { margin:0; font-size:16px; }
.modal-close { font-size:22px; line-height:1; cursor:pointer; color:#999; padding:0 6px; }
.modal-close:hover { color:#333; }
.modal-body { padding:18px; }
.modal-foot { padding:12px 18px; border-top:1px solid #eee; display:flex; justify-content:flex-end; gap:10px; }

.data-table tr.row-hl { background:#fff3da; }
.data-table td:first-child { font-weight:600; }

