/* ============================================================
   收银系统 全局样式
   ============================================================ */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --green: #16a34a;
  --green-dark: #15803d;
  --orange: #f59e0b;
  --red: #dc2626;
  --bg: #f3f5f9;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, .14);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { opacity: .85; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mt8 { margin-top: 8px; }
.mt16 { margin-top: 16px; }
.mb16 { margin-bottom: 16px; }

/* ================= 顶栏 ================= */
.topnav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
  height: 61px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand {
  font-size: 30px;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand .logo {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 800;
}
.nav-links { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
.nav-link {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 15px;
  white-space: nowrap;
}
.nav-link:hover { background: var(--bg); color: var(--text); opacity: 1; }
.nav-link.on { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.nav-user { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.shop-name { font-weight: 600; font-size: 13px; }
.expire { font-size: 11px; color: var(--muted); }

/* ================= 布局 ================= */
.page { max-width: 1440px; margin: 0 auto; padding: 20px 16px 60px; }
.page-narrow { max-width: 560px; margin: 0 auto; padding: 40px 16px; }
.page-title { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.page-sub { color: var(--muted); margin: 0 0 20px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card + .card { margin-top: 16px; }
.card-title { font-size: 15px; font-weight: 600; margin: 0 0 14px; display: flex; align-items: center; justify-content: space-between; }

/* ================= 统计卡片 ================= */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.stat-card .label { color: var(--muted); font-size: 13px; }
.stat-card .value { font-size: 24px; font-weight: 700; margin-top: 4px; }
.stat-card .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat-card.blue .value { color: var(--primary); }
.stat-card.green .value { color: var(--green); }
.stat-card.orange .value { color: var(--orange); }
.stat-card.red .value { color: var(--red); }
.stat-card::after {
  content: '';
  position: absolute;
  right: -20px; top: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(37, 99, 235, .06);
}

/* ================= 按钮 ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.btn:hover { border-color: #cbd5e1; background: #f8fafc; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-success:hover { background: var(--green-dark); }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-violet { background: #7c3aed; border-color: #7c3aed; color: #fff; }
.btn-violet:hover { background: #6d28d9; }
.btn-warn { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.btn-warn:hover { background: #d97706; }
.btn-slate { background: #475569; border-color: #475569; color: #fff; }
.btn-slate:hover { background: #334155; }
.btn-cashier { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-cashier:hover { background: var(--primary-dark); }
.btn-cyan { background: #0891b2; border-color: #0891b2; color: #fff; }
.btn-green { background: #16a34a; border-color: #16a34a; color: #fff; }
.btn-green:hover { background: #15803d; }
.btn-cyan:hover { background: #0e7490; }
.btn-teal { background: #0d9488; border-color: #0d9488; color: #fff; }
.btn-teal:hover { background: #0f766e; }
.btn-warning { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.btn-warning:hover { background: #d97706; }

.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-xs { padding: 2px 8px; font-size: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ================= 表单 ================= */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.form-row label .req { color: var(--red); }
.input, .select, .textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
  outline: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.textarea { resize: vertical; min-height: 64px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.checkbox-row input { width: 16px; height: 16px; }

/* ================= 表格 ================= */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { background: #f8fafc; color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
/* 后台操作列按钮一行显示 */
.op-btns { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; white-space: nowrap; }
.op-btns .btn { padding: 3px 8px; font-size: 12px; }
.table tr:hover td { background: #f8fafc; }
.table td { vertical-align: middle; }
.table .num { font-variant-numeric: tabular-nums; }

/* ================= 徽章 ================= */
.badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 600;
}
.badge-success { background: #dcfce7; color: #15803d; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-warn { background: #fef3c7; color: #b45309; }
.badge-info { background: #dbeafe; color: #1d4ed8; }
.badge-gray { background: #f1f5f9; color: #475569; }

/* ================= 弹窗 ================= */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .45);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  animation: modalIn .18s ease;
}
.modal-lg { max-width: 720px; }
@keyframes modalIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 16px; font-weight: 600;
}
.modal-close { border: 0; background: none; font-size: 20px; color: var(--muted); cursor: pointer; line-height: 1; }
.modal-body { padding: 20px; max-height: 65vh; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ================= Toast ================= */
.toast-box { position: fixed; top: 68px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #111827; color: #fff;
  padding: 9px 20px;
  border-radius: 24px;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-8px);
  transition: all .25s;
  max-width: 80vw;
}
.toast.show { opacity: 1; transform: none; }
.toast-success { background: var(--green); }
.toast-danger { background: var(--red); }
.toast-warn { background: var(--orange); }

/* ================= 登录页 ================= */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 45%, #38bdf8 100%);
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 400px;
  background: #fff;
  border-radius: 16px;
  padding: 36px 32px 30px;
  box-shadow: 0 20px 50px rgba(2, 6, 23, .25);
}
.login-logo {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800;
  margin: 0 auto 14px;
}
.login-title { text-align: center; font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.login-sub { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 24px; }
.login-err {
  background: #fee2e2; color: #b91c1c;
  border-radius: 8px; padding: 9px 12px;
  font-size: 13px; margin-bottom: 14px;
}
.login-tip { text-align: center; font-size: 12px; color: var(--muted); margin-top: 18px; }

/* ================= 收银台 ================= */
.cashier-wrap .btn-success { background: var(--primary); border-color: var(--primary); color: #fff; }
.cashier-wrap .btn-success:hover { background: var(--primary-dark); }
.cashier-wrap .btn-success.btn-block { width: 100%; }
.cashier-wrap { max-width: 1440px; margin: 0 auto; padding: 14px 16px 40px; }
.cashier-toolbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.seg { display: inline-flex; background: #e2e8f0; border-radius: 10px; padding: 3px; gap: 2px; }
.seg-btn {
  border: 0; background: transparent; padding: 6px 16px;
  border-radius: 8px; font-size: 14px; color: var(--muted); cursor: pointer;
}
.seg-btn.on { background: #fff; color: var(--primary); font-weight: 600; box-shadow: var(--shadow); }
.toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.hint { font-size: 12px; color: var(--muted); }

.cashier-body { display: flex; gap: 14px; align-items: flex-start; }

/* 桌台区域 */
.table-area { width: 250px; flex-shrink: 0; }
.table-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.table-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 12px 8px 8px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  gap: 3px;
}
.table-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.table-card .t-icon { flex: none; margin-top: 4px; }
.table-card .t-name { font-weight: 600; font-size: 14px; margin-top: 4px; }
.table-card .t-status { font-size: 12px; margin-top: 2px; }
.table-card.free .t-status { color: var(--green); }
.table-card.using { background: var(--primary-light); border-color: var(--primary); }
.table-card .t-icon { color: var(--primary); }
.table-card.using .t-icon { color: var(--primary-dark); }
.table-card.sel { outline: 2px solid var(--primary); }
.table-card .t-amt { font-size: 12px; color: var(--orange); font-weight: 600; }
.table-card .t-btns { display: flex; gap: 5px; margin-top: auto; width: 100%; padding-top: 6px; }
.table-card .t-btn { flex: 1; border: 0; border-radius: 6px; font-size: 12px; line-height: 22px; cursor: pointer; }
.table-card .t-btn-add { background: var(--primary); color: #fff; }
.table-card .t-btn-close { background: #fff; color: var(--red, #dc2626); border: 1px solid #fca5a5; }

/* 菜品区域 */
.dish-area { flex: 1; min-width: 0; }
.cat-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pill {
  border: 1px solid var(--border); background: #fff;
  padding: 5px 14px; border-radius: 20px; font-size: 13px; cursor: pointer; color: var(--muted);
}
.pill.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.dish-list.with-img { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.dish-card {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; cursor: pointer; transition: all .15s; position: relative;
}
.dish-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.dish-card .d-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: #f1f5f9; }
.dish-card .d-info { padding: 8px 10px 10px; }
.dish-card .d-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dish-card .d-meta { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dish-card .d-price { color: var(--red); font-weight: 700; font-size: 15px; margin-top: 4px; }
.dish-card .d-add {
  position: absolute; right: 8px; bottom: 8px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff; border: 0; font-size: 18px; line-height: 1;
  cursor: pointer; box-shadow: var(--shadow);
}
.dish-card.off { opacity: .55; }

.dish-list.no-img { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.dish-row {
  display: flex; flex-direction: column; align-items: stretch; gap: 3px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px 40px; cursor: pointer; transition: all .15s; position: relative;
  min-width: 0;
}
.dish-row:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.dish-row .d-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dish-row .d-meta { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dish-row .d-price { color: var(--red); font-weight: 700; font-size: 15px; }
.dish-row .d-add {
  position: absolute; right: 8px; bottom: 8px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary); color: #fff; border: 0; font-size: 17px; line-height: 1; cursor: pointer;
  box-shadow: var(--shadow);
}
.empty-tip { text-align: center; color: var(--muted); padding: 40px 0; }

/* 购物车 */
.cart-panel {
  width: 340px; flex-shrink: 0;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 130px);
  position: sticky; top: 70px;
}
.cart-actions { display: flex; gap: 8px; padding: 8px 0 0; align-items: center; }
.cart-actions .tag { background: var(--primary-light); color: var(--primary); font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 6px; }
.t-time { font-size: 12px; color: #ea580c; font-weight: 600; margin-top: 2px; }
.t-time.over { color: #dc2626; }
.cart-head { padding: 10px 16px; border-bottom: 1px solid var(--border); font-weight: 600; }
.cart-head-row { display: flex; align-items: center; gap: 8px; }
.cart-head #cartTitle { font-size: 16px; }
.cart-head .tag {
  background: var(--primary-light); color: var(--primary);
  font-size: 12px; padding: 1px 8px; border-radius: 6px;
}
.cart-head .cart-head-row .btn { margin-left: auto; }
.cart-items { flex: 1; overflow-y: auto; padding: 6px 12px; min-height: 120px; max-height: 400px; }
.cart-empty { text-align: center; color: var(--muted); font-size: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 260px; padding: 30px 0; }
.cart-empty .ce-ic { width: 123px; height: 150px; opacity: .28; object-fit: contain; }
.cart-item { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.cart-item .ci-info { flex: 1; min-width: 0; }
.cart-item .ci-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item .ci-meta { font-size: 12px; color: var(--muted); }
.cart-item .ci-sub { font-size: 13px; font-weight: 600; white-space: nowrap; }
.qty-box { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.qty-box button { border: 0; background: #f8fafc; width: 26px; height: 26px; font-size: 14px; cursor: pointer; color: var(--text); }
.qty-box input { width: 36px; text-align: center; font-size: 14px; border: 0; outline: 0; height: 26px; -moz-appearance: textfield; }
.qty-box input::-webkit-outer-spin-button, .qty-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-item .ci-del { border: 0; background: none; color: #cbd5e1; font-size: 15px; cursor: pointer; padding: 2px; }
.cart-item .ci-del:hover { color: var(--red); }
/* 次卡抵扣按钮（收银台购物车行内） */
.ci-deduct {
  margin-top: 4px;
  border: 1px solid #f59e0b;
  background: #fffbeb;
  color: #b45309;
  font-size: 11px;
  line-height: 1;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.ci-deduct:hover { background: #fef3c7; }
.ci-deduct.on { background: #f59e0b; border-color: #f59e0b; color: #fff; font-weight: 600; }
/* 次卡购买支付方式切换 */
.bc-pay { border: 1px solid var(--border); background: #fff; color: var(--text); }
.bc-pay.on { background: #0891b2 !important; border-color: #0891b2 !important; color: #fff !important; font-weight: 600; }
/* 会员等级折扣价 */
.ci-price.on { color: #dc2626; font-weight: 700; }
.ci-disc-tag { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 4px; background: #dc2626; color: #fff; font-size: 10px; line-height: 1.5; }
/* 充值卡片（统计报表同款样式，可点击） */
a.q-stat-card { display: block; text-decoration: none; color: var(--text); transition: all .15s; }
a.q-stat-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.q-stat-card .value { color: var(--primary); font-size: 20px; }
.q-stat-card.qc-purple .value { color: #8b5cf6; }
.q-stat-card.qc-cyan .value { color: #0891b2; }
.q-stat-card.qc-green .value { color: #16a34a; }

/* ================= 扫码收款弹窗 ================= */
.scan-info { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.scan-amount { text-align: center; font-size: 40px; font-weight: 800; color: var(--red); margin: 12px 0 18px; }
.scan-input { text-align: center; font-size: 16px; letter-spacing: 2px; }
.scan-print { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: var(--text); user-select: none; }
.scan-print input { width: 15px; height: 15px; accent-color: var(--green); cursor: pointer; }
.scan-tip { color: var(--muted); font-size: 12px; text-align: center; margin-top: 12px; line-height: 1.8; }

.cart-foot { border-top: 1px solid var(--border); padding: 12px 16px; }
.cart-total { font-size: 15px; display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.cart-total b { font-size: 22px; color: var(--red); }
.pay-row, .time-row { margin-bottom: 10px; }
.pay-label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 6px; }
.pay-btns { display: flex; gap: 8px; }
.pay-btn {
  flex: 1; padding: 8px 0; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; font-size: 14px; cursor: pointer; color: var(--text);
}
.pay-btn.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pay-btn.disabled { opacity: .45; cursor: not-allowed; }
.time-row { display: flex; align-items: center; gap: 8px; }
.time-row .pay-label { margin: 0; white-space: nowrap; }
.time-row .input { flex: 1; }
/* 收银台结账区：时间/备注与收款按钮左缘对齐（label 上、控件下） */
.cart-foot .time-row { display: block; margin-bottom: 10px; }
.cart-foot .time-row .pay-label { margin-bottom: 6px; display: block; }
.cart-foot .time-row .input { width: 100%; box-sizing: border-box; }
.print-row { margin-bottom: 10px; }
.checkbox-label { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--green); cursor: pointer; }

/* ================= 批量补录合规提示（独立框架） ================= */
.batch-notice {
  background: #fff8ee;
  border: 3px solid #fa8c16;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 0 0 16px;
  box-shadow: 0 3px 14px rgba(250, 140, 22, .18);
}
.batch-notice-title {
  font-size: 18px;
  font-weight: 700;
  color: #d46b08;
  margin-bottom: 6px;
}
.batch-notice-text {
  font-size: 14px;
  line-height: 1.9;
  color: #874d00;
}

/* ================= 图表（CSS 柱状） ================= */
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding: 8px 4px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.bar {
  width: 100%; max-width: 42px;
  background: linear-gradient(180deg, #60a5fa, #2563eb);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  transition: height .3s;
}
.bar-col .bar-val { font-size: 11px; color: var(--muted); white-space: nowrap; transform: scale(.9); }
.bar-col .bar-date { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ================= 快捷入口 ================= */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.quick-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; text-align: center; cursor: pointer; transition: all .15s; display: block; color: var(--text);
}
.quick-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-2px); color: var(--text); }
.quick-card .q-icon {
  width: 40px; height: 40px; border-radius: 12px; margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #fff;
}
.quick-card .q-name { font-weight: 600; }
.quick-card .q-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
/* 快捷入口卡片：与营业额统计卡（stat-card）同款白底样式，文字用功能色居中 */
.quick-card.q-text {
  display: flex; align-items: center; justify-content: center;
  min-height: 110px; padding: 18px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 24px; font-weight: 700; color: var(--bg); letter-spacing: 2px;
  transition: all .15s;
}
.quick-card.q-text:hover {
  border-color: var(--bg);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  color: var(--bg);
}

/* ================= 筛选栏 ================= */
.filter-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 14px;
}
.filter-bar .input, .filter-bar .select { width: auto; min-width: 140px; }
.filter-bar .date-input { width: 150px; }
.quick-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.qbtn {
  border: 1px solid var(--border); background: #fff;
  padding: 4px 12px; border-radius: 16px; font-size: 13px; cursor: pointer; color: var(--muted);
}
.qbtn.on { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }

/* ================= 订单行内展开 ================= */
.order-row { cursor: pointer; }
.order-detail-row td { background: #f8fafc; padding: 0; }
.order-detail { padding: 10px 18px 14px; }
.order-detail .items-table { width: 100%; }
.order-detail .items-table td { padding: 4px 10px; border: 0; font-size: 13px; }

/* ================= 批量生成 ================= */
.batch-order-card {
  border: 1px solid var(--border); border-radius: 10px; background: #fff;
  padding: 14px; margin-bottom: 12px;
}
.batch-order-card .bo-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.batch-order-card .bo-head .input { width: 190px; }
.batch-order-card .bo-head .select { width: 110px; }
.bo-items { margin-top: 8px; }
.bo-item-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.bo-item-row .select { width: 200px; }
.bo-item-row .input { width: 80px; }
.bo-item-row .bo-sub { width: 90px; font-weight: 600; }
.bo-item-row .btn { padding: 4px 10px; }
.batch-summary {
  background: var(--primary-light); border: 1px solid #bfdbfe;
  border-radius: 10px; padding: 14px 18px; margin-top: 14px; line-height: 1.9;
}
.batch-summary .total { font-size: 18px; font-weight: 700; color: var(--primary); }

/* 页面顶部操作提示（退单/保存结果 flash） */
.flash-box {
  background: var(--primary-light); border: 1px solid #bfdbfe;
  border-radius: 10px; padding: 12px 16px; margin-bottom: 14px;
  font-weight: 600; color: #1d4ed8;
}
.flash-box.err { background: #fef2f2; border-color: #fecaca; color: #dc2626; }

/* ================= 响应式 ================= */
/* 顶部导航：按钮/到期时间同步加大（PC 网页端 + Windows 软件端统一） */
.topnav .btn { font-size: 13px; padding: 6px 11px; }
.expire { font-size: 13px; }

@media (max-width: 1100px) {
  .cashier-body { flex-direction: column; }
  .table-area { width: 100%; }
  .cart-panel { width: 100%; max-height: none; position: static; }
  .table-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
}
@media (max-width: 720px) {
  /* 顶栏：店名 + 操作按钮一行，导航链接第二行横向滚动（占文档流，避免遮挡下方内容） */
  .nav-inner { flex-wrap: wrap; height: auto; padding: 6px 10px; gap: 8px; }
  .brand { font-size: 17px; gap: 6px; }
  .brand .logo { width: 22px; height: 22px; font-size: 12px; border-radius: 6px; }
  .nav-user { width: auto; justify-content: flex-end; gap: 6px; }
  .expire { display: none; }
  .nav-user .btn { padding: 4px 9px; font-size: 12px; }
  .nav-links { position: relative; left: auto; right: auto; top: auto; width: 100%; order: 3; padding: 6px 0 0; background: #fff; border-top: 1px solid var(--border); overflow-x: auto; flex-wrap: nowrap; }
  .nav-link { font-size: 13px; padding: 5px 10px; }
  .stat-card .value { font-size: 20px; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ============ 手机端自适应（收衣/收银台等窄屏） ============ */
@media (max-width: 640px) {
  /* 导航样式已在 720px 断点统一为紧凑版，此处不再放大 */
  /* 收银台商品：改为列表模式（单列一行式，图片缩小为左侧小图） */
  .dish-list.with-img { grid-template-columns: 1fr; gap: 8px; }
  .dish-list.no-img { grid-template-columns: 1fr; gap: 8px; }
  .dish-card { display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px; position: relative; }
  .dish-card .d-img { width: 52px; height: 52px; aspect-ratio: auto; border-radius: 8px; flex: none; }
  .dish-card .d-info { flex: 1; min-width: 0; padding: 0; }
  .dish-card .d-add { position: static; margin-left: auto; }
  .dish-row { position: relative; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 10px 12px; }
  .dish-row .d-meta { flex-basis: 100%; }
  .dish-row .d-add { position: static; margin-left: auto; }
  /* 手机端：商品卡片隐藏「+」改用行内数量控件（点单后直接显示已点数量，可加减） */
  body:not(.is-app) .d-add { display: none !important; }
  body:not(.is-app) .m-qty {
    display: flex; align-items: center; justify-content: center; gap: 2px;
    position: absolute; right: 8px; bottom: 8px;
  }
  body:not(.is-app) .m-qty button {
    width: 26px; height: 26px; border-radius: 50%;
    background: #eff6ff; color: #1d4ed8; border: 0; font-size: 16px; line-height: 1; cursor: pointer;
  }
  body:not(.is-app) .m-qty.on button:first-child { background: #fee2e2; color: #dc2626; }
  body:not(.is-app) .m-qty span { min-width: 24px; text-align: center; font-size: 15px; font-weight: 700; color: #111827; }
  /* 未点单：只显示一个+按钮（不再显示 −0＋） */
  body:not(.is-app) .m-qty .m-qty-add { width: 28px; height: 28px; background: #2563eb; color: #fff; font-size: 18px; }
  /* 手机端收银台：顶部 PC 导航隐藏，只显示「收银台」标题栏（仅收银台页面生效） */
  html.m-cashier .topnav { display: none !important; }
  html.m-cashier .m-title-bar {
    display: block; text-align: center; font-size: 17px; font-weight: 700; color: #111827;
    background: #fff; padding: 12px 0 10px; border-bottom: 1px solid #f1f5f9;
  }
  html.m-cashier .cashier-wrap {
    height: calc(100vh - 125px); height: calc(100dvh - 125px);
    display: flex; flex-direction: column;
    padding: 8px 0 0;
  }
  body:not(.is-app) .cashier-toolbar { flex: none; padding: 8px 8px 6px; }
  body:not(.is-app) .cashier-body { flex: 1; min-height: 0; height: auto; display: flex; flex-direction: column; }
  /* 手机端：分类改左侧竖排列表，商品列表在右侧 */
  body:not(.is-app) .dish-area {
    display: flex; flex-direction: row; align-items: stretch;
    flex: 1 1 0; min-height: 0; overflow: hidden;
  }
  body:not(.is-app) .cat-pills {
    width: 92px; flex: none; display: flex; flex-direction: column;
    overflow-y: auto; overflow-x: hidden; gap: 0; padding: 6px 0;
    background: #f3f4f6; border-right: 1px solid #e5e7eb;
  }
  body:not(.is-app) .cat-pill {
    margin: 0; padding: 12px 6px; border-radius: 0; text-align: center;
    font-size: 13px; white-space: normal; line-height: 1.3; border: 0;
  }
  body:not(.is-app) .cat-pill.on { background: #fff; color: #1d4ed8; font-weight: 700; }
  body:not(.is-app) .dish-list { flex: 1; min-width: 0; overflow-y: auto; padding-bottom: 40px; }
  /* 手机端收银台：购物车固定底部，高度自适应保证收款方式/提交订单按钮完整可见；
     明细过多时明细区内部滚动，付款按钮永不被挤出屏幕 */
  html.m-cashier .cart-panel {
    position: static; top: auto; width: 100%;
    flex: 0 0 auto; max-height: 62vh; max-height: 62dvh; min-height: 0;
    overflow: hidden;
  }
  html.m-cashier .cart-items { flex: 1; min-height: 40px; max-height: none; overflow-y: auto; }
  /* 桌台模式：桌台区限高可滚动，避免挤掉购物车 */
  body:not(.is-app) .table-area { flex: none; max-height: 38%; overflow-y: auto; }
  /* 会员行：可换行，输入框不再限宽 */
  .cashier-wrap .pay-row { flex-wrap: wrap; }
  .cashier-wrap .member-bind { max-width: none !important; }
  /* 收衣单底栏支付按钮可换行 */
  .cart-foot .pay-btns { flex-wrap: wrap; }
  .cart-foot .pay-btn { flex: 1 1 auto; padding: 8px 10px; font-size: 13px; }
  .member-picked { flex-wrap: wrap; }
  .modal-lg { max-width: 100%; }
  .page-title { font-size: 20px; }
}

/* 手机端商品行内数量控件（默认隐藏，仅手机浏览器显示） */
.m-qty { display: none; }
/* 手机端收银台专属标题栏（默认隐藏，仅手机浏览器显示「收银台」） */
.m-title-bar { display: none; }

/* ============ 会员绑定（收银台储值支付） ============ */
.member-bind { position: relative; flex: 1; min-width: 0; }
.member-bind .input { width: 100%; }
.member-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff;
  border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 6px 16px rgba(0,0,0,.10);
  z-index: 60; max-height: 260px; overflow: auto; }
.ms-item { padding: 9px 12px; cursor: pointer; font-size: 13px; }
.ms-item:hover { background: #f1f5f9; }
.ms-item .ms-name { font-weight: 600; font-size: 14px; }
.ms-item .ms-sub { display: flex; justify-content: space-between; align-items: center; margin-top: 3px; }
.ms-item .ms-sub .muted { color: #94a3b8; }
.ms-bal { color: #16a34a; font-weight: 600; white-space: nowrap; }
.member-picked { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 8px; padding: 8px 10px; }
.mp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mp-name { font-size: 13px; font-weight: 600; color: #065f46; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-phone { font-size: 12px; color: #475569; }
.mp-bal { font-size: 13px; color: #16a34a; font-weight: 700; }
.mp-actions-col { display: flex; flex-direction: column; gap: 6px; flex: none; }
.mp-actions { display: flex; gap: 6px; flex: none; }
.mp-actions .btn { white-space: nowrap; }
.mp-actions .mp-btn { min-width: 52px; padding: 6px 12px; font-size: 13px; text-align: center; }
.member-picked .btn-danger { flex: none; padding: 7px 16px; font-size: 13px; }
/* 会员列表操作按钮间距 */
.op-btns { display: inline-flex; gap: 6px; align-items: center; }
/* 收银台会员行（label+输入框+新增按钮 一行） */
.cashier-member-row { display: flex; align-items: center; gap: 8px; }
.cashier-member-row .pay-label { margin: 0; white-space: nowrap; flex: none; }
.cashier-member-row .btn { flex: none; }

/* ============ 干洗店模块样式 ============ */
/* 行业标签（后台商户列表） */
.badge-violet { background: #ede9fe; color: #7c3aed; }
.badge-cyan { background: #cffafe; color: #0891b2; }
.btn-indigo { background: #6366f1; border-color: #6366f1; color: #fff; }
.btn-indigo:hover { background: #4f46e5; border-color: #4f46e5; }
.btn-default { background: #fff; border-color: #d1d5db; color: #374151; }
.btn-default:hover { background: #f3f4f6; }

/* 卡片标题行（标题 + 右侧按钮） */
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.table-hover tbody tr:hover { background: #f8fafc; }

/* 干洗商品卡片（收衣页网格） */
.laundry-goods {
  border: 1px solid var(--border); border-radius: 12px; padding: 14px;
  text-align: center; cursor: pointer; background: #fff;
  transition: box-shadow .15s, border-color .15s, transform .1s;
}
.laundry-goods:hover { border-color: #2563eb; box-shadow: 0 4px 14px rgba(37,99,235,.12); transform: translateY(-1px); }
.lg-type { display: inline-block; font-size: 12px; color: #2563eb; background: #eff6ff; border-radius: 20px; padding: 1px 10px; margin-bottom: 6px; }
.lg-name { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; word-break: break-all; }
.lg-price { font-size: 14px; font-weight: 700; color: #dc2626; }

/* 拍照留痕上传块 */
.photo-upload { display: inline-flex; width: 96px; height: 96px; border: 1.5px dashed #cbd5e1; border-radius: 10px; cursor: pointer; background: #f8fafc; overflow: hidden; }
.photo-upload:hover { border-color: #2563eb; }
.photo-upload .pp {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #94a3b8; font-size: 26px; line-height: 1; background-size: cover; background-position: center;
}
.photo-upload .pp small { font-size: 11px; margin-top: 6px; }

/* 会员搜索下拉（干洗收衣页复用，独立类名避免影响收银台浮层） */
.laundry-suggest { position: static; box-shadow: none; border: 1px solid var(--border); border-radius: 10px; background: #fff; overflow: hidden; }
.ms-item { padding: 9px 12px; border-bottom: 1px solid #f1f5f9; cursor: pointer; font-size: 14px; }
.ms-item:last-child { border-bottom: none; }
.ms-item:hover { background: #eff6ff; }
.ms-item .ms-name { font-weight: 600; font-size: 15px; }
.ms-item .ms-sub { display: flex; justify-content: space-between; align-items: center; margin-top: 3px; }
.ms-item .ms-sub .muted { color: #94a3b8; font-size: 13px; }
.ms-bal { color: #16a34a; font-weight: 700; font-size: 13px; }
.laundry-picked { display: flex; gap: 10px; border: 1px solid #bbf7d0; background: #f0fdf4; border-radius: 10px; padding: 10px 14px; }
/* 桌台模式两段式：先选桌台（全屏大卡片）→ 点桌台后再显示商品 */
.table-back-bar { margin-bottom: 10px; }
.cashier-body.tbl-list .table-area { width: 100%; }
.cashier-body.tbl-list .table-grid { grid-template-columns: repeat(6, 1fr); gap: 14px; }
.cashier-body.tbl-list .table-card {
  padding: 16px 8px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  border-radius: 12px;
}
.cashier-body.tbl-list .table-card .t-icon {
  width: 62px; height: 62px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-light));
  color: var(--primary); margin-bottom: 3px;
  box-shadow: 0 2px 6px rgba(0,0,0,.10);
}
.cashier-body.tbl-list .table-card.free .t-icon {
  background: linear-gradient(135deg, var(--primary-light), var(--primary-light));
  color: var(--primary);
  box-shadow: 0 2px 6px rgba(0,0,0,.10);
}
.cashier-body.tbl-list .table-card.using .t-icon {
  background: transparent;
  color: var(--primary-dark);
  box-shadow: none;
}
.cashier-body.tbl-list .table-card .t-name { font-size: 16px; }
.cashier-body.tbl-list .table-card .t-status { font-size: 13px; }
@media (max-width: 720px) {
  .cashier-body.tbl-list .table-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .cashier-body.tbl-list .table-card { padding: 12px 6px 10px; }
  .cashier-body.tbl-list .table-card .t-icon { width: 48px; height: 48px; }
  .cashier-body.tbl-list .table-card .t-name { font-size: 14px; }
}

/* 桌台区域筛选条 */
.area-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cashier-body.tbl-list .area-pills .pill { padding: 6px 16px; font-size: 14px; }

/* 通用确认弹窗 */
.ui-confirm-text { font-size: 15px; line-height: 1.7; color: #374151; white-space: pre-wrap; }
.ui-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* 登录页：微信快捷登录 */
.wx-login-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; color: var(--muted); font-size: 12px; }
.wx-login-divider::before, .wx-login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.wx-login-tip { margin-top: 10px; }
.btn-success.btn-block { height: 42px; font-size: 15px; border-radius: 8px; }

/* PC端隐藏滚动条但保留滚动（鼠标设备生效，触屏不受影响） */
@media (hover: hover) and (pointer: fine) {
  * { scrollbar-width: none; -ms-overflow-style: none; }
  *::-webkit-scrollbar { width: 0; height: 0; display: none; }
}
