:root {
  --primary: #FF6B35;
  --primary-dark: #F4511E;
  --primary-light: #FFF3EC;
  --accent: #FF8A5B;
  --text: #1F2329;
  --text-soft: #8A8F99;
  --bg: #F6F7F9;
  --card: #FFFFFF;
  --border: #EDEFF2;
  --success: #2BB673;
  --radius: 16px;
  --shadow: 0 6px 22px rgba(31, 35, 41, 0.06);
  --shadow-sm: 0 2px 10px rgba(31, 35, 41, 0.04);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-dark); text-decoration: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 999px; cursor: pointer; font-size: 15px;
  padding: 12px 18px; font-weight: 600; transition: .15s ease;
}
.btn:active { transform: scale(.985); }
.btn-primary { background: linear-gradient(135deg, #FF8A5B, #F4511E); color: #fff; box-shadow: 0 8px 20px rgba(244,81,30,.25); }
.btn-primary:disabled { background: #FFC9B4; box-shadow: none; cursor: not-allowed; }
.btn-success { background: linear-gradient(135deg, #34C77B, #2BB673); color: #fff; box-shadow: 0 8px 20px rgba(43,182,115,.28); }
.btn-ghost { background: var(--primary-light); color: var(--primary-dark); }
.btn-line { background: #fff; border: 1px solid var(--border); color: var(--text); }
.btn-danger { background: #fff; border: 1px solid #F6D3D0; color: #E2554E; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

.inp {
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 11px;
  font-size: 13px; background: #fff; color: var(--text); outline: none; transition: .15s;
}
.inp:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.of-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.of-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 6px; }
.of-filters .inp { min-width: 0; }
.of-filters #ofKeyword { flex: 1 1 200px; }
.of-sep { color: var(--text-soft); font-size: 13px; }
.of-pagebar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.of-pageinfo { color: var(--text-soft); font-size: 13px; }
.of-pagebtns { display: flex; flex-wrap: wrap; gap: 6px; }
.of-pagebtns .btn { padding: 6px 10px; font-size: 12px; }
#ofPageSize { min-width: 90px; }
.qr-pos-field { max-width: 140px; }
.qr-pos-input { padding: 9px 10px; font-size: 14px; }

.input {
  width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 13px 14px;
  font-size: 15px; background: #fff; color: var(--text); outline: none; transition: .15s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); transition: .18s ease; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.tag { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--primary-light); color: var(--primary-dark); }
.tag.alt { background: #EEF6F0; color: var(--success); }
.tag.new { background: #E8F3FF; color: #1E66D0; }
.tag.used { background: #FFF3E6; color: #C2410C; }
.muted { color: var(--text-soft); }
.center { text-align: center; }
.hidden { display: none !important; }

/* ===== 客户前端 ===== */
.app { max-width: 460px; margin: 0 auto; min-height: 100vh; background: var(--bg); padding-bottom: 84px; position: relative; }
.topbar { padding: 22px 20px 10px; }
.topbar h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: .3px; }
.topbar p { margin: 4px 0 0; color: var(--text-soft); font-size: 13px; }
.section { padding: 12px 18px; }

.picker { display: flex; flex-direction: column; gap: 14px; }
/* 选购页：年级/学院/专业整体卡片 + 标题 */
.picker-card { background: #fff; border-radius: 14px; padding: 16px; box-shadow: var(--shadow-sm); }
.picker-card .section-title { margin-bottom: 14px; }
.picker-card .hint { font-size: 12px; color: var(--text-soft); text-align: center; margin: 10px 0 0; }
.picker .row .lbl { font-size: 13px; color: var(--text-soft); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.picker .row .lbl::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--primary); display: inline-block; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--border); background: #fff; color: var(--text); border-radius: 999px;
  padding: 8px 15px; font-size: 14px; cursor: pointer; transition: .15s; user-select: none;
}
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(244,81,30,.2); }

.book { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.book .check {
  width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--border); flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff; font-size: 14px; transition: .15s;
}
.book .check.on { background: var(--primary); border-color: var(--primary); }
.book .info { flex: 1; min-width: 0; }
.book .name { font-weight: 600; }
.book .meta { font-size: 12px; color: var(--text-soft); margin-top: 3px; }
.book .price { color: var(--primary-dark); font-weight: 700; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 28px; height: 28px; border-radius: 9px; border: 1px solid var(--border); background: #fff; cursor: pointer; font-size: 16px; color: var(--text); }
.stepper span { min-width: 18px; text-align: center; }

/* 底部结算栏（位于底部导航上方，避免被 tabbar 遮挡） */
.bottombar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(56px + env(safe-area-inset-bottom, 0px)); width: 100%; max-width: 460px;
  background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--border);
  display: flex; padding: 12px 16px; gap: 12px; align-items: center; justify-content: flex-end; box-shadow: 0 -6px 20px rgba(31,35,41,.06); z-index: 20;
}
.app.with-checkout { padding-bottom: calc(130px + env(safe-area-inset-bottom, 0px)); }
.bottombar .total .num { font-size: 21px; font-weight: 800; color: var(--primary-dark); }
.bottombar .total .lbl { font-size: 12px; color: var(--text-soft); }

/* 支付成功结果页 */
.pay-check { width: 64px; height: 64px; margin: 6px auto 12px; border-radius: 50%; background: #07C160; color: #fff; font-size: 34px; line-height: 64px; text-align: center; box-shadow: 0 8px 20px rgba(7,193,96,.3); }
.btn.loading { opacity: .75; cursor: default; }

/* 底部导航 */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 460px;
  background: rgba(255,255,255,.97); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--border); display: flex; z-index: 21; padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tabbar .tab { flex: 1; text-align: center; padding: 9px 0 11px; cursor: pointer; color: var(--text-soft); font-size: 12px; }
.tabbar .tab .ico { font-size: 21px; display: block; line-height: 1; margin-bottom: 2px; filter: grayscale(.4); }
.tabbar .tab.active { color: var(--primary-dark); font-weight: 700; }
.tabbar .tab.active .ico { filter: none; }

/* ===== 我的 页面 ===== */
.profile {
  margin: 14px 16px 0; border-radius: 20px; padding: 22px 20px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #FF8A5B 0%, #F4511E 100%); box-shadow: 0 12px 30px rgba(244,81,30,.28);
}
.profile::after { content: ""; position: absolute; right: -30px; top: -30px; width: 130px; height: 130px; background: rgba(255,255,255,.12); border-radius: 50%; }
.profile .top { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.avatar {
  width: 60px; height: 60px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); background: rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center; overflow: hidden; flex: 0 0 auto;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar .ph { font-size: 28px; }
.profile .who { flex: 1; min-width: 0; }
.profile .nick { font-size: 17px; font-weight: 700; }
.profile .uid { font-size: 12px; opacity: .9; margin-top: 3px; letter-spacing: .5px; }
.profile .wxbtn { margin-top: 14px; position: relative; z-index: 1; }
.profile .wxbtn .btn { background: rgba(255,255,255,.95); color: var(--primary-dark); }

/* 「我的订单」顶部公告栏（后台「首页设置 → 订单公告」维护） */
.order-notice {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 14px 16px 0; padding: 11px 14px;
  background: var(--primary-light, #FFF3EC);
  border: 1px solid #FFD9C7; border-left: 4px solid var(--primary-dark, #F4511E);
  border-radius: 10px;
  font-size: 13.5px; line-height: 1.6; color: #8A3A1C;
}
.order-notice .on-ico { flex: 0 0 auto; font-size: 14px; line-height: 1.5; filter: saturate(1.1); }
.order-notice .on-text { flex: 1; min-width: 0; word-break: break-word; white-space: normal; }

/* 列表折叠：默认展示有限条数，点击展开/收起 */
.collapse-toggle {
  margin-top: 12px; padding: 9px 14px;
  text-align: center; font-size: 13px; font-weight: 600;
  color: var(--primary-dark, #F4511E);
  background: #fff; border: 1px solid var(--border, #EDEFF2);
  border-radius: 999px; cursor: pointer; user-select: none;
  transition: .15s ease; box-shadow: var(--shadow-sm, 0 2px 10px rgba(31,35,41,.04));
}
.collapse-toggle:hover { background: var(--primary-light, #FFF3EC); border-color: #FFD9C7; }

/* 「我的」页底部水印（文字由后端「首页设置」管理；淡灰色，仅展示一次，居中） */
.mine-watermark {
  display: none;
  margin: 28px auto 16px;
  padding: 8px 0;
  text-align: center;
  color: #c9c9c9;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  pointer-events: none;
  user-select: none;
}

.menu { margin: 14px 16px; }
.menu .item {
  background: #fff; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 12px; box-shadow: var(--shadow-sm); overflow: hidden;
}
.menu .item .head { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px; cursor: pointer; }
.menu .item .head .left { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.menu .item .head .left .emoji { font-size: 20px; }
.menu .item .head .arrow { color: var(--text-soft); transition: .2s; font-size: 13px; }
.menu .item.open .head .arrow { transform: rotate(90deg); }
.menu .item .body { display: none; padding: 0 16px 16px; }
.menu .item.open .body { display: block; }
.logout-btn { margin: 18px 16px 28px; width: calc(100% - 32px); color: #E2554E; border: 1px solid #f3c9c5; }
.logout-btn:hover { background: #FFF3F1; }

.order { border: 1px solid var(--border); border-radius: 12px; padding: 13px; margin-bottom: 10px; background: #fff; }
.order .head { display: flex; justify-content: space-between; align-items: center; }
.order .items { margin: 8px 0; font-size: 13px; color: var(--text-soft); }
.order .items div { padding: 2px 0; }
.order .foot { display: flex; justify-content: space-between; align-items: center; }
.oitem { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 10px; margin-bottom: 6px; background: #FAFBFC; border: 1px solid var(--border); border-radius: 10px; }
.oitem-main { min-width: 0; }
.oitem-name { font-size: 14px; color: var(--text); font-weight: 600; }
.oitem-meta { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.oitem-meta .x { color: var(--primary-dark); margin: 0 2px; }
.oitem-amt { font-size: 15px; font-weight: 800; color: var(--primary-dark); white-space: nowrap; }
.oitem-share { font-size: 12px; color: var(--primary-dark); padding: 4px 0; }
.oitem-pickup { font-size: 12px; color: var(--text-soft); margin-top: 4px; padding-top: 6px; border-top: 1px dashed var(--border); }
.empty { text-align: center; color: var(--text-soft); font-size: 13px; padding: 20px 0; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(20,20,30,.4); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { background: #fff; border-radius: 18px; padding: 22px; width: 88%; max-width: 360px; box-shadow: var(--shadow); animation: pop .2s ease; }
@keyframes pop { from { transform: scale(.94); opacity: .6; } to { transform: scale(1); opacity: 1; } }
.modal h3 { margin: 0 0 16px; font-size: 17px; }
.modal .row { margin-bottom: 12px; }
.modal .actions { display: flex; gap: 10px; margin-top: 8px; }
.toast { position: fixed; left: 50%; top: 32%; transform: translateX(-50%); background: rgba(31,31,41,.92); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 99; opacity: 0; transition: .2s; pointer-events: none; }
.toast.show { opacity: 1; }

/* 首页进入弹窗 */
.modal.popup { padding: 0; overflow: hidden; }
.popup-banner { width: 100%; height: 150px; background-size: cover; background-position: center; background-color: var(--primary-light); }
.modal.popup h3 { margin: 18px 18px 0; font-size: 17px; }
.popup-content { margin: 10px 18px 4px; font-size: 14px; line-height: 1.7; color: #444; white-space: pre-wrap; word-break: break-word; }
.modal.popup .actions { padding: 14px 18px 18px; }

/* ===== 管理后台（左侧栏布局）===== */
.admin-shell { display: flex; min-height: 100vh; background: #F4F5F7; }
.sidebar {
  width: 232px; flex: 0 0 232px; background: #1F2329; color: #C9CDD4; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; padding: 18px 14px; overflow-y: auto;
}
.sidebar .brand { color: #fff; font-size: 17px; font-weight: 800; padding: 6px 10px 18px; display: flex; align-items: center; gap: 8px; }
.sidebar .group-title { font-size: 11px; letter-spacing: 1px; color: #6B7280; padding: 14px 12px 6px; }
.sidebar .nav-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 10px; cursor: pointer;
  font-size: 14px; color: #C9CDD4; margin-bottom: 3px; transition: .15s; user-select: none;
}
.sidebar .nav-item .ico { font-size: 17px; width: 20px; text-align: center; }
.sidebar .nav-badge { margin-left: auto; background: #FF3B30; color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; box-shadow: 0 2px 6px rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.18); }
.sidebar .nav-badge[hidden] { display: none; }
.sidebar .nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar .nav-item.active { background: linear-gradient(135deg,#FF8A5B,#F4511E); color: #fff; font-weight: 600; box-shadow: 0 6px 16px rgba(244,81,30,.3); }
.sidebar .spacer { flex: 1; }
.sidebar .me { font-size: 12px; color: #8A8F99; padding: 10px 12px 4px; border-top: 1px solid rgba(255,255,255,.08); margin-top: 8px; }

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--border); padding: 14px 26px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 5; }
.admin-topbar .title { font-size: 18px; font-weight: 700; }
.admin-topbar .right { display: flex; gap: 8px; align-items: center; }
.admin-content { padding: 24px 26px; }
.admin-panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.admin h1 { font-size: 20px; margin: 0; }
.admin table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin th, .admin td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
.admin th { color: var(--text-soft); font-weight: 600; font-size: 13px; }
.admin .stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.admin .stat { background: linear-gradient(135deg,#FFF3EC,#FFE3D3); border-radius: 14px; padding: 16px; }
.admin .stat .v { font-size: 24px; font-weight: 800; color: var(--primary-dark); }
.admin .stat .k { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.admin .stat.alt { background: #EEF6F0; }
.admin .stat.alt .v { color: #2BB673; }
.admin .stat.blue { background: #EAF1FB; }
.admin .stat.blue .v { color: #2F6BD3; }
.admin .stat.purple { background: #F1ECFB; }
.admin .stat.purple .v { color: #7A4FD6; }
.admin .stat.red { background: #FDECEC; }
.admin .stat.red .v { color: #E0483D; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: linear-gradient(135deg,#FFF3EC,#FFE3D3); border-radius: 14px; padding: 16px; }
.stat .si { font-size: 18px; margin-bottom: 4px; }
.stat .v { font-size: 24px; font-weight: 800; color: var(--primary-dark); line-height: 1.15; }
.stat .k { font-size: 12px; color: var(--text-soft); margin-top: 4px; }
.stat.alt { background: #EEF6F0; }
.stat.alt .v { color: #2BB673; }
.stat.blue { background: #EAF1FB; }
.stat.blue .v { color: #2F6BD3; }
.stat.purple { background: #F1ECFB; }
.stat.purple .v { color: #7A4FD6; }
.stat.red { background: #FDECEC; }
.stat.red .v { color: #E0483D; }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl th { color: #B0623C; font-weight: 600; font-size: 13px; background: var(--primary-light, #FFF3EC); white-space: nowrap; }
.tbl tbody tr { transition: .12s; }
.tbl tbody tr:hover { background: #FAFBFC; }
.tbl .ck { width: 17px; height: 17px; cursor: pointer; accent-color: var(--primary); }
.tag.off { background: #F1F2F4; color: #9AA0A8; }
.tag.done { background: #E8F7EE; color: #1B9E5A; }
.stock-zero { color: #E2554E; font-weight: 700; }
.wd-amt { color: var(--primary-dark); font-weight: 700; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filter-bar .filter-search { flex: 1; min-width: 180px; }
.select { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 14px; background: #fff; color: var(--text); outline: none; cursor: pointer; min-width: 124px; }
.select:focus { border-color: var(--primary); }
.batch-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: linear-gradient(135deg,#FFF3EC,#FFE3D3); border: 1px solid #FFD9C7; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px; color: var(--primary-dark); }
.batch-bar b { font-size: 14px; }
.batch-bar .sp { flex: 1; }
.login-box { max-width: 360px; margin: 12vh auto 0; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--text-soft); margin-bottom: 6px; }
.multi { display: flex; flex-wrap: wrap; gap: 6px; }
.multi .chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.import-preview { max-height: 280px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; margin-top: 10px; }
.import-preview table { font-size: 13px; }
.import-preview th, .import-preview td { padding: 7px 8px; border-bottom: 1px solid var(--border); }
/* 导入预检查 + 批次记录 */
.pc-summary { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pc-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 5px 12px; border-radius: 999px; font-weight: 600; }
.pc-chip.ok { background: #E8F7EE; color: #1B9E5A; }
.pc-chip.bad { background: #FDECEC; color: #D6453E; }
.pc-chip.warn { background: #FFF4E5; color: #C8821A; }
.pc-list { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.pc-row { display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 13px; }
.pc-row:last-child { border-bottom: none; }
.pc-idx { color: var(--text-soft); }
.pc-reason { color: #D6453E; }
.pc-tag { font-weight: 600; }
.pc-tag.ok { color: #1B9E5A; }
.pc-tag.bad { color: #D6453E; }
.pc-tag.warn { color: #C8821A; }
.batch-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; font-size: 13px; }
.batch-item .bi-main { flex: 1; min-width: 0; }
.batch-item .bi-time { color: var(--text-soft); font-size: 12px; }
.batch-item .bi-stats { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.batch-item .bi-name { font-weight: 600; }
/* 销售视图条形图 */
.bars { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 78px; align-items: center; gap: 10px; font-size: 13px; }
.bar-row .bl { color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { background: #F1F2F4; border-radius: 999px; height: 14px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg,#FF8A5B,#F4511E); border-radius: 999px; }
.bar-row .bv { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.rank-item .no { width: 22px; height: 22px; border-radius: 6px; background: var(--primary-light); color: var(--primary-dark); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.rank-item .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-item .qt { color: var(--text-soft); font-size: 13px; }
.section-title { font-size: 15px; font-weight: 700; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ""; width: 3px; height: 15px; border-radius: 2px; background: var(--primary); display: inline-block; }
.sec-block { background: var(--surface, #fff); border: 1px solid var(--border, #ececec); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.sec-head { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.sec-head .nav-badge { margin-left: 4px; background: #FF3B30; color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; box-shadow: 0 2px 6px rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.18); }
.sec-head .nav-badge[hidden] { display: none; }
.warn-overview { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.warn-chip { flex: 1; min-width: 120px; border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 800; }
.warn-chip span { font-size: 22px; font-weight: 900; line-height: 1; }
/* 缺货/偏低 红/橙底用白字+双层深色投影；偏高黄底用深棕字+白色投影，确保任何亮度底色都清晰 */
.warn-chip.lv-out { background: linear-gradient(135deg,#E53935,#B71C1C); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.95), 0 3px 8px rgba(0,0,0,.85); }
.warn-chip.lv-low { background: linear-gradient(135deg,#F57C00,#E65100); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.95), 0 3px 8px rgba(0,0,0,.85); }
.warn-chip.lv-mid { background: linear-gradient(135deg,#FBC02D,#F9A825); color: #3E2723; text-shadow: 0 1px 0 rgba(255,255,255,.55), 0 1px 3px rgba(0,0,0,.25); }
.warn-chip.lv-out span { text-shadow: 0 1px 2px rgba(0,0,0,1), 0 4px 12px rgba(0,0,0,.9); }
.warn-chip.lv-low span { text-shadow: 0 1px 2px rgba(0,0,0,1), 0 4px 12px rgba(0,0,0,.9); }
.warn-chip.lv-mid span { text-shadow: 0 1px 0 rgba(255,255,255,.7), 0 1px 4px rgba(0,0,0,.2); }
/* 31–50 偏高（库存积压）：蓝色调，与缺货/偏低/中等区分 */
.warn-chip.lv-high { background: linear-gradient(135deg,#1E88E5,#1565C0); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.95), 0 3px 8px rgba(0,0,0,.85); }
.warn-chip.lv-high span { text-shadow: 0 1px 2px rgba(0,0,0,1), 0 4px 12px rgba(0,0,0,.9); }
.warn-list { display: flex; flex-direction: column; gap: 8px; }
.warn-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border, #ececec); border-radius: 10px; background: #FFFDF7; }
.wi-name { font-weight: 600; }
.wi-meta { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.lv-out { color: #E23B3B; }
.lv-low { color: #F5760E; }
.lv-mid { color: #C98A0E; }
.lv-high { color: #1565C0; }
.sec-session-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--border, #ecec); }
.sec-session-row:last-child { border-bottom: none; }
.sec-session-meta { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.sec-session-ip { font-family: monospace; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .sidebar { display: none; } .grid-2 { grid-template-columns: 1fr; } .od-grid { grid-template-columns: 1fr; } }
/* 订单详情 */
.od-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.od-row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--border, #ecec); font-size: 13px; }
.od-row > span:first-child { color: var(--text-soft); }
.od-row code { font-size: 12px; word-break: break-all; }
.od-items { display: flex; flex-direction: column; gap: 8px; }
.od-item { padding: 8px 10px; border: 1px solid var(--border, #ecec); border-radius: 8px; background: #FAFAFA; }
.od-item .muted { margin-top: 2px; }

/* 权限勾选网格 */
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; max-height: 42vh; overflow: auto; }
.perm-group { grid-column: 1 / -1; }
.perm-group-title { font-size: 12px; font-weight: 700; color: var(--text-soft); margin: 6px 0 4px; }
.perm-item { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.45; padding: 4px 0; cursor: pointer; }
.perm-item input { margin-top: 3px; }
.perm-item b { font-weight: 600; }
.perm-item i { font-style: normal; color: var(--text-soft); margin-left: 4px; }
.tag-all { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: #E8F7EE; color: #1B9E5A; margin-left: 6px; }

/* 销售视图 Hero 汇总 */
.sales-hero {
  background: linear-gradient(135deg,#FF8A5B,#F4511E); border-radius: var(--radius);
  padding: 22px 24px; color: #fff; box-shadow: 0 12px 30px rgba(244,81,30,.25);
  margin-bottom: 18px; display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 14px;
}
.sales-hero .h-label { font-size: 14px; opacity: .9; }
.sales-hero .h-value { font-size: 32px; font-weight: 800; line-height: 1.1; margin-top: 4px; }
.sales-hero .h-sub { font-size: 13px; opacity: .92; margin-top: 8px; }
.sales-hero .h-badge { background: rgba(255,255,255,.18); border-radius: 999px; padding: 7px 14px; font-size: 13px; white-space: nowrap; }

/* 分销团队头像 */
.dist-cell { display: flex; align-items: center; gap: 10px; }
.avatar-sm {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(135deg,#FF8A5B,#F4511E); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}

/* 前端下拉选择器 */
.dropdown { position: relative; margin-bottom: 12px; }
.dd-trigger {
  width: 100%; display: flex; align-items: center; gap: 10px; background: #fff;
  border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; font-size: 15px;
  cursor: pointer; text-align: left; color: var(--text); transition: .15s;
}
.dd-trigger:active, .dd-trigger.open { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.dd-trigger .dd-label { color: var(--text-soft); font-size: 13px; }
.dd-trigger .dd-value { flex: 1; font-weight: 600; }
.dd-trigger .dd-value.placeholder { color: var(--text-soft); font-weight: 400; }
.dd-trigger .dd-chev { color: var(--text-soft); font-size: 12px; transition: .2s; }
.dd-trigger.open .dd-chev { transform: rotate(180deg); color: var(--primary-dark); }
.dd-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 12px 30px rgba(31,35,41,.12); max-height: 260px; overflow-y: auto; padding: 6px; animation: ddIn .15s ease;
}
@keyframes ddIn { from { opacity: .4; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.dd-option { padding: 12px; border-radius: 10px; cursor: pointer; font-size: 15px; transition: .12s; }
.dd-option:hover { background: var(--bg); }
.dd-empty { padding: 14px; color: var(--text-soft); font-size: 14px; text-align: center; }
.dd-option.active { background: var(--primary-light); color: var(--primary-dark); font-weight: 700; }
.dd-option .ck { color: var(--primary-dark); float: right; }

/* ===== 我的推广 ===== */
.subbar {
  position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.subbar .back { background: none; border: none; color: var(--primary-dark); font-size: 16px; cursor: pointer; padding: 4px 6px; font-weight: 600; }
.subbar .title { font-size: 17px; font-weight: 700; }
.promo-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 16px; }
.promo-stats .ps {
  background: linear-gradient(135deg, #FFF3EC, #FFE3D3); border-radius: 14px; padding: 16px 8px; text-align: center;
  border: 1px solid #FFD9C7;
}
.promo-stats .ps .pv { font-size: 20px; font-weight: 800; color: var(--primary-dark); line-height: 1.1; }
.promo-stats .ps .pk { font-size: 12px; color: var(--text-soft); margin-top: 4px; }
.promo-stats .ps:nth-child(2) .pv { color: #2F6BD3; }
.promo-stats .ps:nth-child(3) .pv { color: #2BB673; }
.wd-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.wd-item:last-child { border-bottom: none; }
.wd-item .tag { margin-left: 6px; font-size: 11px; }
#posterCanvasWrap canvas { width: 280px; max-width: 80%; height: auto; border-radius: 14px; box-shadow: var(--shadow); }

/* 首页横幅轮播 */
.banner { width: 100%; aspect-ratio: 5 / 2; background: #eee; overflow: hidden; border-radius: 14px; }
/* 兼容旧版浏览器（不支持 aspect-ratio，如老版 Firefox/Android WebView）：用高度兜底 */
@supports not (aspect-ratio: 5 / 2) { .banner { height: 40vw; max-height: 184px; } }
.banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner a { display: block; }
/* 不支持 backdrop-filter 的浏览器（老版 Firefox 等）：用近不透明背景兜底，避免毛玻璃缺失导致内容透出 */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .bottombar, .tabbar, .subbar, .cart-summary { background: rgba(255,255,255,.99); }
}

/* 首页公告（单行，过长滚动播放） */
.announce {
  height: 36px; display: flex; align-items: center; overflow: hidden;
  background: linear-gradient(135deg, #FFF3EC, #FFE3D3); color: var(--primary-dark);
  border-bottom: 1px solid #FFE0CC;
}
.announce-inner { display: flex; align-items: center; height: 100%; white-space: nowrap; will-change: transform; }
.announce-inner span { font-size: 13px; padding: 0 8px; }
.announce.scroll .announce-inner { animation: marquee 14s linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* 我的分享二维码 */
.qr-card #myQrBox canvas { width: 180px; height: 180px; border-radius: 12px; box-shadow: var(--shadow-sm); }
.share-link { text-align: center; }

/* 订单号 / 取件码 */
.ocode { font-size: 12px; color: var(--text-soft); margin-top: 4px; word-break: break-all; }
.pickup-code { font-size: 16px; letter-spacing: 2px; color: var(--primary-dark); background: var(--primary-light); padding: 2px 10px; border-radius: 8px; }

/* 后台横幅列表 */
.banner-list { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.banner-item { position: relative; width: 220px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.banner-item img { width: 100%; height: 110px; object-fit: cover; display: block; }
.banner-item .bi-actions { display: flex; justify-content: space-between; padding: 8px; gap: 8px; }
.banner-item .bi-actions .btn { flex: 1; text-align: center; }

/* 自定义快捷按钮（后台管理列表） */
.ql-admin-item { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: #fff; margin-top: 10px; }
.ql-admin-item .ql-order { width: 22px; height: 22px; border-radius: 50%; background: var(--primary-light); color: var(--primary-dark); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.ql-admin-item .ql-logo { width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: 0 0 auto; }
.ql-admin-item .ql-logo img { width: 100%; height: 100%; object-fit: cover; }
.ql-admin-item .ql-meta { flex: 1; min-width: 0; }
.ql-admin-item .ql-ops { display: flex; gap: 6px; flex: 0 0 auto; }
.ql-admin-form { margin-top: 14px; padding: 14px; border: 1px dashed var(--border); border-radius: 12px; background: #fafafa; }

/* 海报二维码编辑器 */
#posterEditor { touch-action: none; }
#qrHandle { box-shadow: 0 0 0 1px rgba(255,255,255,0.8) inset; }
#qrHandle:active { background: rgba(244,81,30,0.22); }

/* 联系商家 */
.contact-row { display: flex; align-items: center; gap: 10px; padding: 12px 4px; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.contact-row:last-child { border-bottom: none; }
.contact-row .ico { font-size: 20px; }
.contact-row .ck { font-size: 12px; color: #888; }
.contact-row .cv { font-size: 15px; font-weight: 600; }
.contact-row .ck-call { margin-left: auto; color: var(--primary); font-size: 13px; }
#wxQrBox canvas { width: 160px; height: 160px; border-radius: 12px; box-shadow: var(--shadow-sm); }

/* 优惠券管理 */
.coupon-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.coupon-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.coupon-item .ci-main { flex: 1; min-width: 0; }
.coupon-item .ci-name { font-weight: 600; }
.coupon-item .ci-meta { font-size: 12px; color: #888; margin-top: 2px; }
.coupon-form .field label, .field label { font-size: 12px; color: #888; display: block; margin-bottom: 4px; }

/* 购物车顶部优惠券 */
.cart-coupons { margin-bottom: 14px; }
.cart-coupons .cc-title { font-size: 13px; font-weight: 600; color: #888; margin-bottom: 8px; }
.coupon-card { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: linear-gradient(135deg,#FFF3EC,#FFE3D3); border: 2px solid transparent; margin-bottom: 8px; cursor: pointer; transition: .15s; }
.coupon-card:active { transform: scale(.99); }
.coupon-card.active { border-color: var(--primary); background: linear-gradient(135deg,#FFF3EC,#FFD6C2); }
.coupon-card.disabled { opacity: .55; cursor: not-allowed; }
.coupon-card .cc-amt { font-size: 20px; font-weight: 800; color: var(--primary-dark); }
.coupon-card .cc-name { font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.coupon-card .cc-meta { font-size: 12px; color: #888; margin-top: 2px; }
.coupon-card .cc-check { font-size: 11px; color: var(--primary-dark); background: rgba(255,255,255,.7); padding: 2px 6px; border-radius: 8px; }
.coupon-card .cc-check.off { color: #888; }
.coupon-card.new { background: linear-gradient(135deg,#EAF7EF,#D6F0E0); }
.coupon-card.new.active { border-color: #2BB673; background: linear-gradient(135deg,#EAF7EF,#C6EDD6); }
.coupon-card.used { background: linear-gradient(135deg,#EEF1F5,#E2E7ED); }

/* 选购栏回到顶部悬浮窗（手机大小屏幕右下角，浅灰圆形文字按钮，不贴边） */
.shop-backtop {
  position: fixed; right: 16px; bottom: 88px;
  min-width: 52px; height: 52px; padding: 0 14px; border-radius: 26px;
  background: #ededed; color: #555; border: 1px solid #e0e0e0;
  font-size: 14px; font-weight: 600; line-height: 1.1;
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.16); z-index: 70; cursor: pointer;
}
.shop-backtop.show { display: flex; }
.shop-backtop:active { transform: scale(.96); }

/* 首页自定义快捷按钮（公告下方：圆形 logo + 标题） */
.quick-links { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px 16px 4px; }
.quick-links:empty { display: none; }
.ql-item { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 60px; text-decoration: none; color: var(--text); }
.ql-logo { width: 50px; height: 50px; border-radius: 50%; background: #fff; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: var(--shadow-sm); }
.ql-logo img { width: 100%; height: 100%; object-fit: cover; }
.ql-emoji { font-size: 22px; }
.ql-title { font-size: 12px; color: var(--text-soft); text-align: center; line-height: 1.2; }

/* 我的推广四项指标（2x2） */
.promo-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; }
.promo-stats .ps { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px; text-align: center; }
.promo-stats .pv { font-size: 20px; font-weight: 700; color: var(--primary-dark); }

/* ===== 购物车（batch 16） ===== */
/* 菜单项右上角小红点 */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #E2554E; color: #fff; font-size: 11px; font-weight: 700;
  margin-left: 6px;
}
.badge[hidden] { display: none; }

/* 全部商品标题 + 搜索栏 */
.all-products-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: nowrap; }
.all-products-title span { flex: 0 0 auto; }
.all-products-title .inp { flex: 1 1 auto; max-width: 180px; font-size: 13px; padding: 7px 11px; }

/* 商品右侧操作区：步进器 + 购物车 */
.book .actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-btn {
  width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--border);
  background: #fff; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center;
  color: var(--primary-dark); transition: .15s;
}
.cart-btn:disabled { opacity: .45; cursor: not-allowed; }
.cart-btn:active:not(:disabled) { background: var(--primary-light); transform: scale(.94); }

/* 购物车页面 */
#view-cart .empty { text-align: center; color: var(--text-soft); padding: 40px 0; }
.cart-item {
  display: flex; gap: 12px; align-items: center; margin-bottom: 12px;
  background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 12px;
}
.cart-item .info { flex: 1; min-width: 0; }
.cart-item .name { font-weight: 600; }
.cart-item .meta { font-size: 12px; color: var(--text-soft); margin-top: 3px; }
.cart-item .price { color: var(--primary-dark); font-weight: 700; }
.cart-item .right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-item .remove { font-size: 12px; color: #E2554E; background: none; border: none; cursor: pointer; padding: 2px; }
.cart-summary {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 59px; width: 100%; max-width: 460px;
  background: rgba(255,255,255,.97); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--border);
  display: flex; padding: 12px 16px; gap: 12px; align-items: center; justify-content: space-between; z-index: 21;
}
.cart-summary .total .num { font-size: 21px; font-weight: 800; color: var(--primary-dark); }
.cart-summary .total .lbl { font-size: 12px; color: var(--text-soft); }
.cart-summary .discount { text-align: right; }
.cart-summary .discount .num { font-size: 15px; font-weight: 700; color: var(--success); }
.cart-summary .discount .lbl { font-size: 12px; color: var(--text-soft); }
.app.with-cart-summary { padding-bottom: 140px; }
.promo-stats .pk { font-size: 12px; color: var(--text-soft); margin-top: 4px; }

/* 后台订单批量操作：选中后底部固定操作条 */
.batch-bar.fixed { position: fixed; left: 232px; right: 0; bottom: 0; z-index: 80; margin: 0; border-radius: 0; box-shadow: 0 -4px 16px rgba(0,0,0,.12); padding-bottom: env(safe-area-inset-bottom, 0px); }
body.with-batchbar { padding-bottom: 72px; }
@media (max-width: 760px) { .batch-bar.fixed { left: 0; } }

/* 直客链接 / 分销图卡片 */
.direct-card { margin: 0 16px 16px; background: #f7f8fa; border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.direct-card .dc-title { font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.direct-card .dc-body { display: flex; gap: 16px; flex-wrap: wrap; }
.direct-card .dc-qr { display: flex; justify-content: center; }
.direct-card .dc-qr canvas { width: 150px; height: auto; max-width: 100%; border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm); }
.direct-card .dc-info { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 10px; }
.direct-card .dc-stat { display: flex; gap: 24px; }
.direct-card .dc-stat > span { font-size: 13px; color: var(--text-soft); display: flex; flex-direction: column; }
.direct-card .dc-stat > span b { font-size: 18px; color: var(--primary-dark); font-weight: 800; line-height: 1.2; }
.direct-card .dc-link { display: flex; gap: 8px; align-items: center; }
.direct-card .dc-link .inp { flex: 1; font-size: 12px; color: var(--text-soft); }
.direct-card .dc-hint { font-size: 12px; color: var(--text-soft); line-height: 1.5; }

/* 分销团队搜索栏 */
.dist-search { display: flex; gap: 8px; margin: 0 0 14px; }
.dist-search .inp { flex: 1; }

/* 用户列表：分销员标签 */
.tag.dist { background: #EAF2FF; color: #2f6fed; }
.tag.ban { background: #FDECEC; color: #D6453E; }
.tag.wl { background: #E8F7EE; color: #1B9E5A; }

/* 安全防护：用户级黑白名单（按 UID） */
.sec-user-acl .uacl-cols { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
.sec-user-acl .uacl-col { flex: 1; min-width: 240px; border: 1px solid var(--border, #ececec); border-radius: 10px; padding: 12px; background: #fafbfc; }
.sec-user-acl .uacl-col-title { font-weight: 700; font-size: 13px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.sec-user-acl .uacl-count { font-size: 12px; font-weight: 600; color: #fff; background: var(--primary, #e0483d); border-radius: 999px; padding: 1px 8px; }
.sec-user-acl .uacl-add { display: flex; gap: 8px; align-items: center; }
.sec-user-acl .uacl-add .input { flex: 1; }
.sec-uid-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow: auto; }
.sec-uid-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #fff; border: 1px solid var(--border, #ececec); border-radius: 8px; padding: 6px 10px; }
.sec-uid-row code { font-size: 13px; }

/* ===== 团购邀约 ===== */
.gi-deadline { display: flex; gap: 8px; flex-wrap: wrap; }
.gi-day {
  flex: 1; min-width: 60px; padding: 10px 0; text-align: center;
  border: 1px solid var(--border); border-radius: 10px;
  background: #fff; color: var(--text); font-size: 14px; cursor: pointer;
  transition: all .15s ease;
}
.gi-day.active {
  border-color: var(--primary); background: var(--primary-light);
  color: var(--primary-dark); font-weight: 700;
}
.gi-buyer {
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.gi-buyer:last-of-type { border-bottom: none; }
.gi-items { margin-top: 6px; }
.gi-item {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; color: var(--text); padding: 3px 0;
}
.gi-item .muted { font-size: 12px; }
.gi-total {
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border);
  font-size: 13px; color: var(--primary-dark); font-weight: 700; text-align: right;
}
/* 购买统计：买家行可下拉展开明细 */
.gi-buyer-head {
  display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 0;
}
.gi-buyer-head .gi-chev { transition: .2s; color: var(--text-soft); font-size: 12px; }
.gi-buyer-head.open .gi-chev { transform: rotate(180deg); color: var(--primary-dark); }
.gi-buyer-detail { display: none; padding: 8px 0 4px; border-top: 1px dashed var(--border); margin-top: 6px; }
.gi-buyer-detail.open { display: block; }

/* 团购邀约：提示与商品合计区 */
.gi-hint {
  font-size: 12px; color: var(--primary-dark); background: var(--primary-light, #eaf5ee);
  padding: 6px 8px; border-radius: 6px; margin: 8px 0 2px; line-height: 1.5;
}
.gi-prod-summary { background: linear-gradient(135deg,#f4faf6,#eef6f1); border: 1px solid #d8ebe0; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.03); }
.gi-prod-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.gi-prod-ico { font-size: 14px; }
.gi-prod-htitle { font-weight: 700; font-size: 13px; color: var(--primary-dark); }
.gi-prod-htotal { margin-left: auto; font-size: 12px; color: var(--text-soft); background: #fff; border: 1px solid #d8ebe0; border-radius: 10px; padding: 1px 8px; }
.gi-prod-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.gi-prod {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  font-size: 12px; background: #fff; border: 1px solid #e2efe8;
  border-radius: 10px; padding: 6px 10px; color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,.02);
}
.gi-prod-name { font-weight: 600; }
.gi-prod-qty { color: var(--primary-dark); font-weight: 700; white-space: nowrap; }

/* 团购邀约：已结束标识 */
.gi-ended {
  font-size: 12px; color: #8a6d3b; background: #fff7e6;
  border: 1px solid #ffe2b3; border-radius: 6px; padding: 6px 8px; margin: 8px 0 2px; line-height: 1.5;
}

/* 后端订单详情：内容过长时内部滚动，避免弹窗过高 */
#orderDetailBody { max-height: 72vh; overflow-y: auto; }

/* 平台暂停销售：前端顶部横幅 */
.pause-banner {
  display: none;
  background: linear-gradient(90deg, #e0483d, #f56a3c);
  color: #fff; font-weight: 700; font-size: 14px;
  padding: 10px 14px; border-radius: 8px; margin-bottom: 10px;
  text-align: center; box-shadow: 0 2px 8px rgba(224,72,61,.25);
}

/* 后端订单管理上方：平台销售状态控制条 */
.sales-ctrl {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; margin-bottom: 12px;
}
.sales-ctrl .sc-left { display: flex; align-items: center; gap: 10px; }
.sc-dot { width: 10px; height: 10px; border-radius: 50%; background: #34c759; box-shadow: 0 0 0 3px rgba(52,199,89,.18); }
.sc-dot.on { background: #e0483d; box-shadow: 0 0 0 3px rgba(224,72,61,.18); }
.sc-title { font-weight: 700; font-size: 14px; }
.sc-sub { font-size: 12px; color: var(--muted, #888); margin-top: 2px; }
/* 平台销售状态 + 邀约创建：并排双开关 */
.ctrl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .ctrl-row { grid-template-columns: 1fr; } }
.invite-ctrl .sc-title { color: #e08a1d; }
/* 进行中的邀约看板 */
.invite-board { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.invite-board .ib-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.invite-board .ib-count { font-size: 13px; color: #e0483d; font-weight: 700; }
.invite-board .ib-head .btn { margin-left: auto; }
.ib-list { display: flex; flex-direction: column; gap: 10px; }
.ib-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--border, #eee); border-radius: 8px; padding: 10px 12px; background: #fafafa; }
.ib-class { font-weight: 700; font-size: 14px; }
.ib-meta { font-size: 12px; color: var(--muted, #888); margin-top: 3px; }
.ib-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; white-space: nowrap; }
.ib-orders { font-size: 12px; color: #555; font-weight: 600; }
.btn.btn-disabled, .btn:disabled { opacity: .55; cursor: not-allowed; filter: grayscale(.3); }

/* 备货统计表格容器 */
.stock-stats { font-size: 13px; }
