/* ============================================================
   伊日甜 · 网页后台样式
   配色沿用小程序端：莓果粉 #E8627C / 奶油底 #FFF9F5 / 可可 #43302A / 焦糖 #E9A87C
   ============================================================ */

:root {
  --brand: #E8627C;
  --brand-d: #C9455F;
  --brand-l: #FDEDF1;
  --cream: #FFF9F5;
  --cocoa: #43302A;
  --sub: #9C8A81;
  --line: #F0E4DA;
  --caramel: #E9A87C;
  --green: #35A06A;
  --blue: #3D8BFD;
  --amber: #E9A23B;
  --red: #D94A4A;
  --white: #FFFFFF;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(67, 48, 42, .06), 0 8px 24px rgba(67, 48, 42, .05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: 14px;
  color: var(--cocoa);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

a { color: var(--brand); }

.hidden { display: none !important; }

/* ==================== 登录页 ==================== */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* 底部预留固定页脚（ICP + 公安网备）的高度，避免矮屏上盖住登录卡片。
     2026-10-19 加了公安网备那一行 → 预留从 76px 提到 104px（三行文字 + 内边距）。 */
  padding: 24px 24px 104px;
  background: linear-gradient(160deg, #FFF5F0 0%, var(--cream) 45%, #FDF1F4 100%);
}

/* ==================== 备案号（网站主页底部，工信部硬要求） ====================
   网站主页底部必须规范标明 ICP 核准编号，并链接至工信部备案系统。
   两处口径一致：登录页底部 .site-foot + 侧栏底部 .site-foot-line。
   备案号下来后替换 index.html 里那两处「京ICP备XXXXXXXX号-X」即可。 */
.site-foot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
  color: var(--sub);
  padding: 10px 16px 12px;
  /* 不拦截登录卡片的点击；链接本身仍可点 */
  pointer-events: none;
}
.site-foot .sf-sep,
.site-foot span,
.site-foot a { pointer-events: auto; }
.site-foot a,
.site-foot-line a {
  color: var(--sub);
  text-decoration: none;
}
.site-foot a:hover,
.site-foot-line a:hover {
  color: var(--brand);
  text-decoration: underline;
}
.site-foot-line {
  margin-top: 10px;
  font-size: 11.5px;
  line-height: 1.5;
  word-break: break-all;
}

/* ==================== 公安网备（2026-10-19） ====================
   公安部要求「已备案网站在底部展示备案号 + 官方徽标，并可点击跳转查询」。
   徽标原图 62×67（四周有留白），按 13×14 显示 —— 再大会把页脚跟行距撑开，
   而登录页的 .site-foot 是 fixed 定位，太高会压到登录卡片。 */
.gongan-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
  white-space: nowrap;
}
.gongan-ico {
  width: 13px;
  height: 14px;
  object-fit: contain;
  flex: none;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--white);
  border-radius: 18px;
  padding: 36px 32px 30px;
  box-shadow: var(--shadow);
}

.login-logo {
  width: 54px; height: 54px;
  border-radius: 16px;
  background: var(--brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  margin-bottom: 18px;
}

.login-title { font-size: 21px; font-weight: 700; margin: 0 0 6px; }
.login-sub { font-size: 13px; color: var(--sub); margin: 0 0 26px; line-height: 1.6; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 12.5px;
  color: var(--sub);
  margin-bottom: 7px;
  font-weight: 500;
}

.input, .select, .textarea {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #FFFDFC;
  outline: none;
  transition: border-color .15s, background .15s;
}

.textarea { height: auto; min-height: 76px; padding: 11px 13px; line-height: 1.6; resize: vertical; }

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  background: #fff;
}

.input::placeholder, .textarea::placeholder { color: #C4B5AE; }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239C8A81' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 32px;
}

/* ==================== 按钮 ==================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s, border-color .15s, opacity .15s;
}

.btn:hover { background: #FDF7F3; border-color: #E7D6CB; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn.primary:hover { background: var(--brand-d); border-color: var(--brand-d); }

.btn.danger { color: var(--red); border-color: #F3D6D6; background: #FEF7F7; }
.btn.danger:hover { background: #FCECEC; border-color: #EBBDBD; }

.btn.ghost { background: transparent; border-color: transparent; color: var(--sub); }
.btn.ghost:hover { background: #FBF3EF; color: var(--cocoa); }

.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn.block { width: 100%; height: 44px; }

/* ==================== 布局 ==================== */

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 216px;
  flex: none;
  background: var(--white);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--line);
}
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: .3px; }
.brand-tag { font-size: 11.5px; color: var(--sub); margin-top: 3px; }

.nav { padding: 10px 10px; flex: 1; overflow-y: auto; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  border-radius: 9px;
  cursor: pointer;
  color: #6B5A52;
  margin-bottom: 2px;
  font-weight: 500;
}
.nav-item:hover { background: #FBF5F1; }
.nav-item.active { background: var(--brand-l); color: var(--brand-d); }
.nav-item .ic { width: 18px; text-align: center; font-size: 15px; }
/* 有未处理催单时的角标：红底 + 轻微呼吸，和「只是有新单」明显区分 */
.nav-item .badge.badge-urge {
  background: #E5484D;
  animation: badgePulse 1.6s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}
/* 订单页「🔔 催单」页签上的数量 */
.ft.ft-urge { color: #E5484D; font-weight: 600; }
.ft.ft-urge b { font-weight: 700; }
.nav-item .badge {
  margin-left: auto;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
  font-weight: 600;
}

.sidebar-foot {
  padding: 12px 14px 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--sub);
}
.mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #F6F1ED;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
  margin-bottom: 8px;
}
.mode-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.mode-chip.cloud .dot { background: var(--green); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 60px;
  flex: none;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.page-title { font-size: 16px; font-weight: 700; }
.page-desc { font-size: 12.5px; color: var(--sub); }
.topbar .spacer { flex: 1; }

.content { padding: 22px 24px 60px; }

/* ==================== 通用块 ==================== */

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.card.tight { padding: 14px 16px; }

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.card-head h3 { font-size: 14.5px; font-weight: 700; margin: 0; }
.card-head .sub { font-size: 12.5px; color: var(--sub); }
.card-head .spacer { flex: 1; }

.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); }

.metric {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.metric .label { font-size: 12.5px; color: var(--sub); }
.metric .value { font-size: 26px; font-weight: 700; margin-top: 6px; letter-spacing: -.5px; }
.metric .value small { font-size: 14px; font-weight: 600; margin-right: 1px; }
.metric .foot { font-size: 12px; color: var(--sub); margin-top: 5px; }

.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

.muted { color: var(--sub); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* ==================== 表格 ==================== */

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th {
  text-align: left;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--sub);
  padding: 12px 14px;
  background: #FDFAF8;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.tbl td {
  padding: 13px 14px;
  border-bottom: 1px solid #F7EFE9;
  vertical-align: middle;
}
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tbody tr:hover { background: #FFFCFA; }
table.tbl .ops { display: flex; gap: 6px; flex-wrap: wrap; }

.thumb {
  width: 46px; height: 46px;
  border-radius: 9px;
  object-fit: cover;
  background: #F4EDE8;
  flex: none;
}
.thumb.lg { width: 62px; height: 62px; border-radius: 11px; }

.cellmain { display: flex; align-items: center; gap: 11px; }
.cellmain .t { font-weight: 600; }
.cellmain .s { font-size: 12px; color: var(--sub); margin-top: 2px; }

/* ==================== 标签 / 状态 ==================== */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  border-radius: 999px;
  padding: 3px 9px;
  background: #F6F1ED;
  color: #7A675E;
  white-space: nowrap;
  font-weight: 500;
}
.tag.brand { background: var(--brand-l); color: var(--brand-d); }
.tag.green { background: #E9F6EF; color: #237A4F; }
.tag.blue { background: #EAF2FE; color: #2563B8; }
.tag.amber { background: #FDF3E2; color: #A9701A; }
.tag.red { background: #FDECEC; color: #B33A3A; }
.tag.purple { background: #F5EDF9; color: #7B4C99; }
.tag.gray { background: #F4F2F0; color: #8B7C74; }

.dot-status {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-right: 6px; vertical-align: middle;
}

/* ==================== 表单 ==================== */

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }

.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 11px 0; border-bottom: 1px solid #F7EFE9;
}
.toggle-row:last-child { border-bottom: none; }
.toggle-row .tl { font-weight: 500; }
.toggle-row .td { font-size: 12px; color: var(--sub); margin-top: 2px; line-height: 1.5; }

/* 小票字号开关（2026-10-20）：每项右侧一个方块，点一下循环「标 → 粗 → 大」。
   做得很小是有意的 —— 小票内容区是三列网格，按钮一大就把标签挤断行。 */
.optfont {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 20px; border-radius: 5px;
  font-size: 11px; line-height: 1;
  color: var(--sub); background: var(--white);
  border: 1px solid #E3D9D2;
  cursor: pointer; user-select: none;
}
.optfont:hover { border-color: var(--brand); color: var(--brand); }
/* 2 = 加高：只变高、宽度不变 —— 「比标准大一点点」那一档 */
.optfont.t2 {
  color: #8A6A58; border-color: #DCC4B4;
}
/* 3 = 加粗：尺寸不变、字重更重 */
.optfont.t3 {
  color: #6E5B52; border-color: #C9B2A6; font-weight: 700;
}
/* 4 = 加大：实心品牌色 */
.optfont.t4 {
  color: #fff; background: var(--brand); border-color: var(--brand); font-weight: 600;
}

.switch {
  width: 44px; height: 25px; border-radius: 13px; background: #E3D9D2;
  position: relative; cursor: pointer; flex: none; transition: background .18s;
}
.switch::after {
  content: ''; position: absolute; top: 2.5px; left: 2.5px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  transition: transform .18s; box-shadow: 0 1px 3px rgba(0,0,0,.16);
}
.switch.on { background: var(--brand); }
.switch.on::after { transform: translateX(19px); }

.chip-group { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: #FFFDFC; cursor: pointer; font-size: 13px; user-select: none;
}
.chip:hover { border-color: #E7D6CB; }
.chip.on { background: var(--brand-l); border-color: var(--brand); color: var(--brand-d); font-weight: 600; }

.filter-tabs { display: flex; gap: 4px; flex-wrap: wrap; background: #F7F1ED; padding: 4px; border-radius: 10px; }
.filter-tabs .ft {
  padding: 7px 14px; border-radius: 8px; cursor: pointer; font-size: 13px; color: #7A675E;
}
.filter-tabs .ft:hover { background: rgba(255,255,255,.7); }
.filter-tabs .ft.on { background: #fff; color: var(--brand-d); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.05); }

/* ==================== 弹层 ==================== */

.modal-mask {
  position: fixed; inset: 0; background: rgba(50, 35, 30, .38);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 20px; z-index: 100; overflow-y: auto;
  backdrop-filter: blur(2px);
}
.modal {
  background: var(--white); border-radius: 16px; width: 100%;
  box-shadow: 0 20px 60px rgba(50,35,30,.24);
  animation: pop .18s ease-out;
}
.modal.sm { max-width: 420px; }
.modal.md { max-width: 620px; }
.modal.lg { max-width: 860px; }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.99); } }

.modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: 15.5px; font-weight: 700; }
.modal-head .spacer { flex: 1; }
.modal-close {
  width: 30px; height: 30px; border-radius: 8px; border: none; background: transparent;
  cursor: pointer; color: var(--sub); font-size: 17px; line-height: 1;
}
.modal-close:hover { background: #F6F1ED; color: var(--cocoa); }
.modal-body { padding: 20px 22px; }
.modal-foot {
  padding: 15px 22px; border-top: 1px solid var(--line);
  display: flex; gap: 10px; justify-content: flex-end;
  position: sticky; bottom: 0; background: var(--white);
  border-radius: 0 0 16px 16px;
}

/* ==================== 吐司 ==================== */

.toast-wrap {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: #3A2C26; color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 13.5px; box-shadow: 0 8px 24px rgba(0,0,0,.2);
  animation: toastIn .2s ease-out;
  max-width: 78vw;
}
.toast.ok { background: #2E8B5C; }
.toast.err { background: #C0392B; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }

/* ==================== 商品口味编辑 ==================== */

.flavor-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 10px;
}
.flavor-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px;
  background: #FFFDFC; position: relative;
}
.flavor-card.off { opacity: .5; }
.flavor-card.def { border-color: var(--brand); background: var(--brand-l); }
.flavor-card .fc-img {
  width: 100%; height: 72px; border-radius: 8px; object-fit: cover;
  background: #F4EDE8; margin-bottom: 8px; cursor: pointer; display: block;
}
.flavor-card .fc-name { width: 100%; height: 30px; border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; font-size: 13px; }
/* 口味库里的「种类」：虚线框，和口味名区分开 */
.flavor-card .fc-cat {
  width: 100%; height: 28px; margin-top: 6px;
  border: 1px dashed var(--line); border-radius: 7px; padding: 0 8px;
  font-size: 12.5px; background: transparent; color: var(--cocoa);
}
.flavor-card .fc-cat:focus { border-style: solid; border-color: var(--brand); }
.flavor-card .fc-row { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.flavor-card .fc-row input {
  width: 100%; min-width: 0; height: 28px; border: 1px solid var(--line);
  border-radius: 7px; padding: 0 7px; font-size: 12.5px;
}
.flavor-card .fc-lbl { font-size: 11px; color: var(--sub); flex: none; }
.flavor-card .fc-ops { display: flex; gap: 4px; margin-top: 8px; }
.flavor-card .fc-ops .btn { flex: 1; height: 26px; padding: 0; font-size: 11.5px; border-radius: 7px; }
.flavor-card .fc-def {
  position: absolute; top: -7px; right: 8px;
  background: var(--brand); color: #fff; font-size: 10.5px;
  padding: 2px 7px; border-radius: 999px; font-weight: 600;
}

.cat-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; margin: 16px 0 9px;
}
.cat-title::before {
  content: ''; width: 3px; height: 13px; border-radius: 2px; background: var(--brand);
}
.cat-title .n { color: var(--sub); font-weight: 500; font-size: 12px; }

/* ==================== 小票预览 ==================== */

.receipt-wrap { display: flex; gap: 18px; flex-wrap: wrap; }
.receipt {
  background: #2A2421; color: #F5EFE9; border-radius: 10px;
  padding: 16px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.5; white-space: pre; overflow-x: auto;
  flex: 1 1 340px; min-width: 300px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.receipt .r-line { display: block; }

.rec-list { display: flex; flex-direction: column; }
.rec-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid #F7EFE9;
}
.rec-item:last-child { border-bottom: none; }
.rec-item .t { font-weight: 600; }
.rec-item .s { font-size: 12px; color: var(--sub); margin-top: 2px; }

/* ==================== 空态 / 加载 ==================== */

.empty {
  text-align: center; padding: 52px 20px; color: var(--sub);
}
.empty .ic { font-size: 34px; margin-bottom: 10px; opacity: .5; }
.empty .t { font-size: 14px; margin-bottom: 4px; color: #7A675E; }
.empty .s { font-size: 12.5px; }

.skeleton {
  height: 15px; border-radius: 6px; background: #F2EAE5;
  animation: shimmer 1.3s infinite linear;
  background-image: linear-gradient(90deg, #F2EAE5 0%, #FAF5F1 50%, #F2EAE5 100%);
  background-size: 200% 100%;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.trend {
  display: flex; align-items: flex-end; gap: 10px; height: 130px; padding-top: 8px;
}
.trend .bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.trend .bar {
  width: 100%; max-width: 46px; border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #F2A0B3, var(--brand));
  min-height: 3px; transition: height .3s;
}
.trend .lbl { font-size: 11px; color: var(--sub); }
.trend .amt { font-size: 11px; color: var(--cocoa); font-weight: 600; }

/* ==================== 响应式 ==================== */

@media (max-width: 860px) {
  .sidebar { width: 62px; }
  .brand-name, .brand-tag, .nav-item span:not(.ic):not(.badge), .sidebar-foot .txt { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item .badge { position: absolute; margin: 0; transform: translate(14px, -12px); }
  .brand { padding: 16px 0; text-align: center; }
  .content { padding: 16px 14px 60px; }
  .topbar { padding: 0 14px; }
}

/* ==================== 开屏提示弹窗预览 ==================== */

.popup-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  border-radius: 12px;
  background: #4A3730;
  overflow: hidden;
}
.popup-preview .pp-badge {
  position: absolute;
  top: 9px; right: 11px;
  font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(255, 255, 255, .18);
  border-radius: 999px; padding: 2px 10px;
}
.popup-preview .pp-card {
  width: 100%; max-width: 280px;
  padding: 20px 18px 15px;
  border-radius: 13px;
  background: linear-gradient(180deg, #FFFFFF, #FFF9F5);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .32);
  text-align: center;
  transition: opacity .2s;
}
.popup-preview.off .pp-card { opacity: .38; }
.popup-preview .pp-title { font-size: 14.5px; font-weight: 800; color: #43302A; line-height: 1.4; }
.popup-preview .pp-div { width: 26px; height: 3px; border-radius: 99px; background: #E8627C; margin: 9px auto 0; }
.popup-preview .pp-body {
  margin-top: 10px; font-size: 12px; line-height: 1.75; color: #6B5A52;
  white-space: pre-wrap; word-break: break-all;
}
.popup-preview .pp-bar { height: 4px; border-radius: 99px; background: #F2E7DE; overflow: hidden; margin-top: 15px; }
.popup-preview .pp-bar i { display: block; height: 100%; width: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #E9A87C, #E8627C); }
.popup-preview .pp-tip { margin-top: 8px; font-size: 10.5px; color: #9C8A81; }

/* ============================================================
   多门店 · 门店切换 / 作用范围 / 门店管理 / 扫码绑定
   ============================================================ */

/* ---------- 侧栏「当前门店」切换器 ---------- */

.store-scope { padding: 0 12px 12px; }

.scope-store {
  background: linear-gradient(180deg, #FFF6F9, #FFFBF8);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 12px 12px;
}
.scope-store .ss-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; color: var(--brand-d);
  letter-spacing: .3px;
}
.scope-store .ss-head .ic { font-size: 13px; }
.scope-store .ss-name {
  margin-top: 7px; font-size: 13.5px; font-weight: 700; color: var(--cocoa);
  line-height: 1.4; word-break: break-all;
}
.scope-store .ss-select {
  width: 100%; margin-top: 7px;
  height: 32px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--white); font-size: 12.5px; font-weight: 600;
  color: var(--cocoa); cursor: pointer;
}
.scope-store .ss-select:focus { outline: none; border-color: var(--brand); }
.scope-store .ss-sub {
  margin-top: 7px; font-size: 11px; line-height: 1.6; color: var(--sub);
}

/* ---------- 页面顶部的数据范围提示条 ---------- */

.scope-bar {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 15px;
  margin-bottom: 16px;
  border-radius: 11px;
  border: 1px solid #F6DCE4;
  background: linear-gradient(90deg, #FDEEF2, #FFF8F4);
}
.scope-bar .ic { font-size: 18px; line-height: 1; }
.scope-bar .t { font-size: 13px; font-weight: 700; color: var(--brand-d); }
.scope-bar .s { font-size: 11.5px; color: #9B7C86; margin-top: 2px; line-height: 1.6; }
.scope-bar.is-all {
  border-color: #E4E9F6;
  background: linear-gradient(90deg, #EEF3FE, #F7F9FF);
}
.scope-bar.is-all .t { color: #2F5FA8; }
.scope-bar.is-all .s { color: #7E8CA6; }

/* ---------- 门店卡片列表 ---------- */

.store-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 14px;
}
.store-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #FFFFFF, #FFFCFA);
  padding: 14px 15px 12px;
  display: flex; flex-direction: column;
  transition: box-shadow .2s, border-color .2s;
}
.store-card:hover { border-color: #F3D6DE; box-shadow: 0 4px 16px rgba(67,48,42,.06); }

.sc-head { display: flex; align-items: flex-start; gap: 10px; }
.sc-title {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.sc-name { font-size: 15px; font-weight: 800; color: var(--cocoa); margin-right: 2px; }

.sc-meta {
  margin: 12px 0 4px;
  display: flex; flex-direction: column; gap: 6px;
  flex: 1;
}
.sc-line { display: flex; gap: 9px; font-size: 12.5px; line-height: 1.6; }
.sc-line .k {
  flex: 0 0 62px; color: var(--sub); font-size: 12px;
  align-self: flex-start; padding-top: 1px;
}
.sc-line .v { flex: 1; min-width: 0; color: var(--cocoa); word-break: break-all; }
.sc-line .v .tag { font-size: 11px; }

.sc-foot {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 11px;
  border-top: 1px dashed var(--line);
}

/* ---------- 看板「各门店今日表现」 ---------- */

.store-stat { display: flex; flex-direction: column; }
.store-stat .ss-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 6px;
  border-bottom: 1px solid #F6EEE8;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}
.store-stat .ss-row:last-child { border-bottom: none; }
.store-stat .ss-row:hover { background: #FFF8F6; }
.store-stat .ss-main { flex: 1; min-width: 0; }
.store-stat .ss-main .t { font-size: 13.5px; font-weight: 700; }
.store-stat .ss-main .sub { font-size: 11.5px; color: var(--sub); margin-top: 3px; }
.store-stat .right { text-align: right; flex: 0 0 auto; }
.store-stat .amt { font-size: 14.5px; font-weight: 800; color: var(--brand-d); }

/* ---------- 用当前位置填坐标 ---------- */

.loc-pick {
  display: flex; align-items: center; gap: 11px; flex-wrap: wrap;
  margin-top: 14px; padding: 11px 14px;
  border: 1px dashed #E9D6CC; border-radius: 10px;
  background: #FFFCFA;
}

/* ---------- 收款绑定二维码 ---------- */

.qr-wrap {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 18px; border-radius: 12px;
  background: linear-gradient(180deg, #FFFDFC, #FFF7F9);
  border: 1px solid var(--line);
}
.qr-img {
  flex: 0 0 auto;
  width: 190px; height: 190px;
  padding: 9px; border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(67,48,42,.09);
  display: flex; align-items: center; justify-content: center;
}
.qr-img svg, .qr-img canvas { width: 100%; height: 100%; display: block; }
.qr-token { flex: 1; min-width: 190px; }
.qr-token .tok {
  margin: 9px 0 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 30px; font-weight: 800; letter-spacing: 7px;
  color: var(--brand-d); line-height: 1.25;
  word-break: break-all;
}
.qr-steps { display: flex; flex-direction: column; gap: 7px; margin-top: 16px; }
.qr-steps .qs {
  display: flex; align-items: center; gap: 9px;
  font-size: 12.5px; color: #6B5A52;
}
.qr-steps .qs b {
  flex: 0 0 auto;
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--brand-l); color: var(--brand-d);
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- 一次性密码展示 ---------- */

.pwd-result {
  margin-top: 14px; padding: 14px 15px;
  border: 1px solid #CDE9DA; border-radius: 11px;
  background: linear-gradient(180deg, #F3FBF6, #FAFEFC);
}
.pwd-result .pr-title { font-size: 13.5px; font-weight: 700; color: #237A4F; }
.pwd-result .pr-row {
  display: flex; align-items: center; gap: 10px;
  margin-top: 9px; font-size: 13px;
}
.pwd-result .pr-row .k { flex: 0 0 44px; color: var(--sub); font-size: 12px; }
.pwd-result .pr-row .v { flex: 1; min-width: 0; font-weight: 600; word-break: break-all; }
.pwd-result .pr-row .v.big { font-size: 19px; letter-spacing: 1.5px; font-weight: 800; color: #1E6642; }
.pwd-result .pr-tip { margin-top: 10px; font-size: 11.5px; line-height: 1.7; color: #5C8A72; }

/* ---------- 窄屏适配 ---------- */

@media (max-width: 860px) {
  .qr-wrap { gap: 14px; padding: 14px; }
  .qr-img { width: 150px; height: 150px; }
  .qr-token .tok { font-size: 24px; letter-spacing: 5px; }
  .store-cards { grid-template-columns: 1fr; }
  .sc-line .k { flex-basis: 54px; }
}

/* 兑换码（优惠券列表内点击复制） */
.rc-code {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 10px;
  border-radius: 8px;
  background: #FFF3E3;
  border: 1px dashed #E9A87C;
  color: #B4713B;
  font-weight: 800;
  letter-spacing: 2px;
  cursor: pointer;
  font-size: 13px;
}
.rc-code:hover { background: #FFEACD; }

/* ==================== 门店形象（图片上传） ==================== */
.img-pick { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.img-pick-box {
  width: 260px; height: 146px;           /* 16:9，与小程序首页头图比例一致 */
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #FBF5F1;
  overflow: hidden;
  flex: none;
  display: flex; align-items: center; justify-content: center;
}
.img-pick-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-pick-box .ph {
  font-size: 12px; color: var(--sub); text-align: center; line-height: 1.7; padding: 0 12px;
}
.img-pick-box.empty { border-style: dashed; }
.img-pick-ops { flex: 1; min-width: 240px; }
.img-pick-ops .ip-title { font-weight: 600; margin-bottom: 4px; }

/* ==================== 收银员 · 权限勾选 ==================== */

.perm-wrap { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.perm-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.perm-head .spacer { flex: 1; }

.perm-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #FFFDFC;
}
.perm-group .pg-head { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.perm-group .pg-desc { font-size: 12px; color: var(--sub); margin: 2px 0 8px; }

.perm-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 8px; border-radius: 8px; cursor: pointer;
}
.perm-item:hover { background: #FDF4F6; }
.perm-item input[type="checkbox"] { margin-top: 3px; flex: none; accent-color: var(--brand); }
.perm-item .pi-main { display: flex; flex-direction: column; line-height: 1.5; }
.perm-item .pi-label { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.perm-item .pi-tag { margin: 0; }
.perm-item .pi-desc { font-size: 12px; color: var(--sub); }
/* 涉及钱 / 门店配置的权限：左边加一条红杠，勾选时前端还会再问一次 */
.perm-item.is-sensitive { border-left: 3px solid var(--red); }

.chip-perm {
  display: inline-block;
  padding: 1px 8px;
  margin: 0 4px 4px 0;
  border-radius: 999px;
  background: var(--brand-l);
  color: var(--brand-d);
  font-size: 12px;
  font-weight: 600;
}

.onetime-pwd { display: flex; align-items: center; gap: 10px; }
.onetime-pwd code {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  background: #FFF3E3;
  border: 1px dashed #E9A87C;
  color: #B4713B;
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 15px;
  cursor: pointer;
  text-align: center;
}
.onetime-pwd code:hover { background: #FFEACD; }

/* ==================== 二级密码 ==================== */
/* 6 位数字输入：居中、拉大字距，一眼能数清位数 */
.pin-row { display: flex; align-items: center; gap: 8px; }
.pin-row .pin-input { flex: 1; min-width: 0; }
/* 显示 / 隐藏明文切换（默认打码） */
.pin-eye { flex: none; padding: 8px 14px; }
.pin-input {
  width: 100%;
  text-align: center;
  font-size: 22px;
  letter-spacing: 10px;
  padding: 10px 0 10px 10px; /* 末尾字距会多出一份，往左找补 */
  font-family: Consolas, monospace;
}
.pin-modal .modal-body { padding-top: 14px; }
