/* ============================================================
   日常管理的内容样式（2026-10-31 照 docs\后台首页装修-原型.html 搬）
   ⚠ 装修页在 decorate.css，商品页在 products.css，别混。
   ============================================================ */

.mg-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}
.mg-h2 { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.mg-h2 .count { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.mg-hint { color: var(--muted); font-size: 12.5px; margin: 0 0 16px; }
.mg-hint:last-child { margin-bottom: 0; }

.mg-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.mg-stat { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.mg-stat .n { font-size: 26px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.mg-stat .k { font-size: 12px; color: var(--muted); margin-top: 2px; }

.mg-note {
  background: #f7f7f2;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.mg-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }

.mg-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mg-table th,
.mg-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.mg-table th { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }

.mg-btn {
  font: inherit;
  font-size: 11.5px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.mg-btn:hover { border-color: #bdbdb4; color: var(--ink); }
.mg-btn.ok { background: var(--ink); border-color: var(--ink); color: #fff; }
.mg-btn.danger:hover { border-color: var(--bad); color: var(--bad); }

/* 分类页是「左树 + 右品牌表」两栏（cat-layout 在 style.css 里定的列宽） */
.cat-layout > .mg-panel { margin-bottom: 0; }

/* 2026-11-02（他选的乙）：管理分类弹窗 —— 分类页收进商品页 */
#catModal .modal-card { width: min(1180px, calc(100vw - 40px)); }
#catModal .modal-body { padding: 14px 16px 18px; }

/* 清理数据弹窗（2026-11-09 重排）：分组卡片 + 已选摘要 + 备份 / 真删分色 */
.clear-modal-card { width: min(880px, calc(100vw - 40px)); }
#clearModal .modal-body { max-height: min(72vh, 720px); overflow: auto; padding: 16px 18px 18px; }
#clearModal .modal-body p { margin: 0 0 9px; font-size: 13px; line-height: 1.7; color: var(--muted); }
#clearModal .modal-body b { color: var(--ink); }
#clearModal .modal-body .mono { word-break: break-all; font-family: "Cascadia Mono", Consolas, monospace; }

/* 顶部：一句话规则 + 已选块数 */
#clearModal .clr-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 12px 14px; margin-bottom: 12px;
  background: #fbfbf7; border: 1px solid var(--line); border-radius: 12px;
}
#clearModal .clr-top-main b { display: block; font-size: 14px; margin-bottom: 3px; }
#clearModal .clr-top-main span { font-size: 12px; color: var(--muted); line-height: 1.6; }
#clearModal .clr-picked {
  flex: none; align-self: center;
  padding: 5px 10px; border-radius: 99px;
  background: var(--accent); color: #fff; font-size: 12px; white-space: nowrap;
}
#clearModal .clr-picked.none { background: #ecece5; color: var(--muted); }

/* 分组卡片 */
#clearModal .clr-groups { display: flex; flex-direction: column; gap: 12px; }
#clearModal .clr-group { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
#clearModal .clr-group-head { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; background: #fbfbf7; border-bottom: 1px solid var(--line); }
#clearModal .clr-dot { flex: none; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: #8a8a8a; }
#clearModal .clr-group-name { min-width: 0; }
#clearModal .clr-group-name b { display: block; font-size: 13px; }
#clearModal .clr-group-name em { display: block; margin-top: 2px; font-style: normal; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
#clearModal .clr-list { padding: 2px 14px; }
#clearModal .clr-row { display: flex; align-items: flex-start; gap: 10px; padding: 11px 6px; border-bottom: 1px dashed var(--line); cursor: pointer; border-radius: 6px; }
#clearModal .clr-row:last-child { border-bottom: 0; }
#clearModal .clr-row:hover { background: #fbfbf7; }
#clearModal .clr-row:has(input:checked) { background: #f7f8f0; }
#clearModal .clr-row input { width: 16px; height: 16px; margin-top: 2px; flex: none; accent-color: #1a1a1a; cursor: pointer; }
#clearModal .clr-main { flex: 1; min-width: 0; }
#clearModal .clr-row-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
#clearModal .clr-row-top b { font-size: 13px; }
#clearModal .clr-count { margin-left: auto; font-size: 11.5px; color: #7a5a12; text-align: right; }
#clearModal .clr-note { display: block; margin-top: 3px; font-size: 11.5px; color: var(--muted); line-height: 1.55; }

/* 分色：备份（灰）/ 本机图（蓝）/ 云端真删（红）/ 同步（绿） */
#clearModal .clr-group.clr-move .clr-dot { background: #3b6fb6; }
#clearModal .clr-group.clr-move .clr-group-head { background: #f4f8ff; }
#clearModal .clr-group.clr-delete { border-color: #e6cccc; }
#clearModal .clr-group.clr-delete .clr-dot { background: var(--bad); }
#clearModal .clr-group.clr-delete .clr-group-head { background: #fff6f6; }
#clearModal .clr-group.clr-sync .clr-dot { background: #2f7a4f; }
#clearModal .clr-group.clr-sync .clr-group-head { background: #f4fbf6; }

#clearModal .clr-warn { margin-top: 12px; padding: 9px 11px; background: #fff6e6; border: 1px solid #f0d9a8; border-radius: 8px; color: #8a5a00; font-size: 12px; line-height: 1.65; }
#clearModal .clr-foot-picked { margin-right: auto; align-self: center; font-size: 12px; color: var(--muted); }
#clearModal .clr-result { margin: 0 0 10px; padding-left: 18px; font-size: 12.5px; line-height: 1.8; color: var(--ink); }
#clearModal .clr-intro { font-size: 12.5px; }

/* ---------- 分类树 ---------- */
.mg-tree, .mg-tree ul { list-style: none; margin: 0; padding: 0; }
.mg-tree { max-width: 760px; }
.mg-tree ul { margin-left: 18px; padding-left: 14px; border-left: 1px solid var(--line); }
.mg-tree li { padding: 3px 0; }
.mg-node {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  min-height: 32px;
}
.mg-node:hover { background: #f7f7f2; }
.mg-node.on { background: #efefe9; }
/* 2026-11-02：行身不再选中 / 绑定（绑货去商品页归类），只有行上的按钮可点 */
.mg-node { cursor: default; }
.mg-node .nm { font-size: 13.5px; }
.mg-node .pill {
  font-size: 10.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0 7px;
  white-space: nowrap;
}
.mg-node .ops { margin-left: auto; display: flex; gap: 4px; flex: none; }
.mg-node.editing { background: #fbfbf7; border: 1px dashed var(--line); }
.mg-node.editing .cat-input { flex: 1; }

/* ---------- 同步：读哪儿 / 写哪儿 ---------- */
.mg-ks { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; font-size: 13px; }
.mg-ks dt { color: var(--muted); }
.mg-ks dd { margin: 0; }

/* ---------- 同步（上云，2026-11-01）：两步卡片 + 状态小标 ---------- */
.sync-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.sync-card {
  background: #fbfbf8;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}
.sync-card h3 { font-size: 14px; font-weight: 600; margin: 0 0 6px; }
.sync-card p { margin: 0 0 10px; color: var(--muted); font-size: 12.5px; line-height: 1.8; }
.sync-state {
  display: inline-block;
  font-size: 11px;
  line-height: 19px;
  padding: 0 8px;
  border-radius: 9px;
}
.sync-state.off { background: #efefe9; color: var(--muted); }
.mg-btn:disabled { opacity: .45; cursor: not-allowed; }
.mg-btn:disabled:hover { border-color: var(--line); color: var(--muted); }

/* ---------- 日常管理右边的手机预览（照 docs\小程序前端-原型.html） ----------
   这块的类名和尺寸都照原型里的手机内容区搬；统一套在 .mpv里，不动别处。 */
/* ⚠ 别用 .mini 当外层类名 —— 后台小按钮就叫 .mini，会串样式（2026-11-01 踩过） */
.mpv { height: 100%; }
.mp-empty { padding: 30px 10px; color: #aaa; font-size: 12px; text-align: center; line-height: 1.8; }

/* 分类页 */
.mpv .catalog-page { height: 100%; display: flex; flex-direction: column; }
.mpv .catalog-search {
  flex: none; display: flex; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid #eee; background: #fff;
}
.mpv .search-ico { width: 16px; height: 16px; margin-right: 8px; flex: none; }
.mpv .catalog-search input {
  flex: 1; border: 0; outline: 0; font: inherit; font-size: 14px;
  color: #1a1a1a; background: transparent; padding: 0;
}
.mpv .catalog-search input::placeholder { color: #bbb; }
.mpv .catalog-body { flex: 1; min-height: 0; display: flex; }
.mpv .catalog-rail {
  width: 112.5px; flex: none; background: #eee;
  overflow-y: auto; overflow-x: hidden;
}
.mpv .rail-head {
  width: 100%; height: 47.5px; border: 0; background: #1a1a1a; color: #fff;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
}
.mpv .rail-item {
  width: 100%; height: 56.5px; line-height: 56.5px; border: 0;
  background: transparent; color: #1a1a1a; font-size: 14px; text-align: center;
  cursor: pointer; position: relative; padding: 0;
}
.mpv .rail-item.on { background: #fff; font-weight: 600; }
.mpv .rail-line {
  position: absolute; left: 50%; bottom: 10px; width: 24px; height: 2px;
  margin-left: -12px; background: #1a1a1a;
}
.mpv .catalog-main { flex: 1; min-width: 0; overflow-y: auto; background: #fff; }
.mpv .letter { padding: 14px 16px 4px; font-size: 21.5px; font-weight: 700; color: #1a1a1a; }
.mpv .brand-row,
.mpv .prod-row {
  padding: 14px 16px; border-bottom: 1px solid #eee;
  font-size: 14px; color: #1a1a1a;
}
.mpv .brand-row:hover, .mpv .prod-row:hover { background: #f8fafc; }
.mpv .banner { position: relative; height: 142px; margin: 13px; background: #848484; }
.mpv .banner-all {
  position: absolute; left: 50%; bottom: 13px; width: 100.5px; height: 24px;
  margin-left: -50.25px; border: 1px solid #fff; background: transparent;
  color: #fff; font-size: 10px; letter-spacing: 3px; text-indent: 3px;
  line-height: 22px; text-align: center; cursor: pointer;
}
.mpv .catalog-placeholder { padding: 28px 20px; color: #999; font-size: 13px; line-height: 1.8; }
.mpv .catalog-index {
  width: 23px; flex: none; padding: 8px 0; display: flex; flex-direction: column;
  align-items: center; background: #fff; color: #333; font-size: 10px;
  line-height: 16px; overflow: hidden;
}
/* 商品页的手机预览：导航条里换成 logo（和小程序的自定义导航一致，2026-11-07） */
.phone-title-logo { display: block; height: 14px; width: auto; }

/* 商品页 */
.mpv { font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif; }
.mpv .products-page { height: 100%; display: flex; flex-direction: column; }
/* 搜索栏（照小程序 2026-11-07：高 50px、图标 + 提示字一组居中） */
.mpv .products-search {
  display: flex; align-items: center; justify-content: center; flex: none;
  height: 50px; padding: 0; border-bottom: 1px solid #eee; background: #fff;
}
.mpv .products-search img { width: 15px; height: 15px; margin-right: 8px; }
.mpv .products-search span { color: #848484; font-size: 12px; letter-spacing: 2.5px; }
.mpv .products-head {
  position: relative; z-index: 2; flex: none;
  padding: 0; background: #fff;
}
/* 名字那一行是展开卡片的挂点：卡片从它下面弹出来，盖住筛选 / 排序，主界面不动（2026-11-07） */
.mpv .products-title-row { position: relative; }
.mpv .products-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  height: 50px; padding: 0 20px; box-sizing: border-box;
}
.mpv .products-title { font-size: 15px; font-weight: 700; letter-spacing: 1.25px; }
.mpv .products-count { font-weight: 400; color: #666; }
.mpv .products-toggle { border: 0; background: none; font-size: 12px; font-weight: 700; letter-spacing: 2.5px; color: #1a1a1a; cursor: pointer; padding: 0; }
.mpv .products-top.open .products-toggle { padding: 3px 9px; border: 1px solid #ccc; border-radius: 4px; }
.mpv .products-bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 50px; padding: 0 20px; box-sizing: border-box;
}
.mpv .layout-btn { border: 0; background: none; font-size: 12.5px; font-weight: 700; letter-spacing: 2.5px; color: #1a1a1a; cursor: pointer; padding: 0; }
.mpv .acts { display: flex; gap: 20px; }
.mpv .act { display: flex; align-items: center; border: 0; background: none; font-size: 12.5px; font-weight: 700; letter-spacing: 2.5px; color: #1a1a1a; cursor: pointer; padding: 0; }
.mpv .act-ico { width: 13px; height: 13px; margin-right: 5px; }
.mpv .act.on { font-weight: 600; color: #000; }
.mpv .drop {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 5;
  max-height: 560px; overflow: hidden; background: #fff;
  box-shadow: 0 8px 16px rgba(0,0,0,.12);
}
.mpv .drop-filter { display: flex; flex-direction: column; }
/* 展开（照小程序 2026-11-07）：抽屉效果 —— 卡片整块从上面滑出来 / 缩回去；
   外壳只负责裁切，路径文字 + 加粗下划线「查看全部」 */
.mpv .drop-expand {
  padding-bottom: 7px;
  background: transparent;
  box-shadow: none;
}
.mpv .drawer-card {
  padding: 6px 20px 12px;
  background: #fff;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.06);
  animation: mpv-drawer 0.24s ease;
}
@keyframes mpv-drawer {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}
.mpv .crumb-box {
  padding: 0; border: 0;
  font-size: 12px; line-height: 1.4; color: #1a1a1a;
}
.mpv .view-all {
  margin-top: 10px; padding-bottom: 2px;
  font-size: 17px; font-weight: 600; text-decoration: underline; cursor: pointer;
}
.mpv .sort-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 24.5px; color: #848484; font-size: 13px; cursor: pointer;
}
.mpv .sort-row.on { color: #1a1a1a; font-weight: 600; }
.mpv .tick { color: #1a1a1a; font-size: 14px; }
.mpv .f-scroll { max-height: 480px; overflow-y: auto; }
.mpv .f-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 25.5px 7px;
}
.mpv .f-title { font-size: 18px; font-weight: 700; }
.mpv .f-sign { font-size: 18px; }
.mpv .f-letter, .mpv .f-group { padding: 8px 25.5px 3px 62px; font-size: 17px; font-weight: 700; }
.mpv .f-brands { position: relative; }
.mpv .f-row {
  display: flex; align-items: center;
  padding: 7px 32px 7px 36.5px; color: #848484; font-size: 13px; cursor: pointer;
}
.mpv .f-row.on { color: #1a1a1a; }
.mpv .f-index {
  position: absolute; right: 3px; top: 5px; bottom: 5px;
  display: flex; flex-direction: column; justify-content: space-between;
  color: #333; font-size: 9px; line-height: 1;
}
.mpv .f-note { padding: 5px 25.5px 12px; color: #999; font-size: 12px; }
.mpv .box {
  width: 10px; height: 10px; margin-right: 7px; flex: none;
  border: 1px solid #ccc; box-sizing: border-box;
}
.mpv .box.on { background: #1a1a1a; border-color: #1a1a1a; }
.mpv .f-actions { display: flex; flex: none; padding: 10px 25.5px 14px; border-top: 1px solid #eee; }
.mpv .f-reset, .mpv .f-apply { flex: 1; height: 47px; border: 0; font-size: 15px; cursor: pointer; }
.mpv .f-reset { margin-right: 10px; border: 1px solid #ccc; background: #fff; color: #333; }
.mpv .f-apply { background: #1a1a1a; color: #fff; }
.mpv .products-list { flex: 1; min-height: 0; overflow-y: auto; background: #fff; }
.mpv .p-grid, .mpv .s-grid { display: flex; flex-wrap: wrap; padding: 9px 5px 0; }
.mpv .p-card, .mpv .s-card { width: 50%; padding: 5px 5px 9px; }
.mpv .p-cover, .mpv .s-cover {
  position: relative; width: 100%; padding-top: 133.33%;
  background: #f2f2f2; overflow: hidden; cursor: pointer;
}
.mpv .p-cover img, .mpv .s-cover img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.mpv .cover-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #999; font-size: 11px;
}
.mpv .p-thumbs {
  margin-top: 6px; display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px;
}
.mpv .p-thumb {
  width: 32px; height: 42px; flex: none; border: 1px solid #ddd;
  background: #f2f2f2; padding: 0; overflow: hidden; cursor: pointer;
}
.mpv .p-thumb.on { border-color: #1a1a1a; }
.mpv .p-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mpv .p-thumb span { display: block; font-size: 8px; color: #999; line-height: 42px; text-align: center; }
.mpv .p-name, .mpv .s-name { margin-top: 8px; font-size: 12px; letter-spacing: 1.25px; color: #1a1a1a; }
.mpv .p-desc, .mpv .s-desc { margin-top: 3px; font-size: 12px; color: #1a1a1a; }
.mpv .s-card { cursor: pointer; }
.mpv .more { padding: 15px 0 30px; text-align: center; color: #888; font-size: 13px; }

/* 日期流 */
.mpv .feed-page { height: 100%; display: flex; flex-direction: column; }
.mpv .feed-head {
  flex: none; padding: 9.5px 16.5px 0; border-bottom: 1px solid #d0d0d0; background: #fff;
}
.mpv .feed-top { display: flex; align-items: center; justify-content: space-between; }
.mpv .feed-title { font-size: 15px; font-weight: 700; }
.mpv .feed-toggle { border: 0; background: none; font-size: 12px; color: #1a1a1a; cursor: pointer; padding: 0; }
.mpv .feed-sub { display: flex; align-items: center; margin-top: 4px; font-size: 13px; color: #1a1a1a; }
.mpv .feed-sub img { width: 11px; height: 11px; margin-left: 6px; }
.mpv .feed-thumbs { margin-top: 8px; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.mpv .feed-thumb {
  width: 62.5px; height: 62.5px; flex: none; border: 1px solid transparent;
  background: #f2f2f2; padding: 0; overflow: hidden; cursor: pointer;
}
.mpv .feed-thumb.on { border-color: #1a1a1a; }
.mpv .feed-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mpv .feed-thumb span { display: block; font-size: 9px; color: #999; line-height: 62.5px; text-align: center; }
.mpv .feed-body { flex: 1; min-height: 0; overflow-y: auto; }
.mpv .feed-year {
  padding: 7px 16.5px; border-top: 1px solid #eee; border-bottom: 1px solid #eee;
  color: #8a8a8a; font-size: 13px;
}
.mpv .feed-month { display: flex; align-items: baseline; padding: 13px 16.5px 7px 25px; }
.mpv .feed-month .num { font-size: 25px; font-weight: 700; }
.mpv .feed-month .name { margin-left: 6px; font-size: 12px; }
.mpv .feed-post { padding: 0 16.5px 5px 42.5px; }
.mpv .feed-caption {
  height: 24px; line-height: 24px; padding: 0 10px; margin-bottom: 7px;
  background: #d9d9d9; color: #1a1a1a; font-size: 12px;
  white-space: nowrap; overflow: hidden;
}
.mpv .feed-shots { display: flex; flex-wrap: wrap; margin-bottom: 8px; }
.mpv .feed-shot {
  width: 99.5px; height: 99.5px; margin-right: 7px; margin-bottom: 7px;
  background: #f2f2f2; object-fit: cover; display: block;
}
.mpv .feed-shot:nth-child(3n) { margin-right: 0; }
.mpv .feed-note { margin: 0 0 8px; color: #1a1a1a; font-size: 12px; line-height: 22.5px; }

/* 2026-11-02：日期流照后台右栏 —— 一条一张卡（左九宫格 / 右文案框）；
   连续「单图 + 无文案」一排 3 个。尺寸按手机 375 宽：110px 一格。 */
.mpv { --pd-grid: 110px; }
.mpv .feed-count { color: #8a8a8a; font-size: 9px; font-weight: 400; }
.mpv .feed-body { background: #f5f5f5; padding: 8px 8px 14px; }
.mpv .pd-year { font-size: 13px; margin: 8px 0 4px; }
.mpv .pd-month-head { margin: 4px 0 6px; font-size: 11px; }
.mpv .pd-tile-row { gap: 7px; margin-bottom: 8px; }
.mpv .pd-tile { flex: 0 0 110px; }
.mpv .pd-tile-img { width: 110px; height: 110px; border-radius: 6px; }
.mpv .pd-tile-time { font-size: 9px; margin-top: 3px; }
.mpv .pd-moment { padding: 8px; border-radius: 8px; margin-bottom: 8px; }
.mpv .pd-moment-body { gap: 8px; }
.mpv .pd-moment-side { width: 110px; }
.mpv .pd-nine { width: 110px; height: 110px; gap: 3px; }
.mpv .pd-moment-copy { height: 110px; padding: 6px 8px; border-radius: 8px; }
.mpv .pd-moment-copy pre { font-size: 10px; line-height: 1.5; }
.mpv .pd-moment-meta { font-size: 9px; }
.mpv .pd-moment.copyonly .pd-moment-copy { height: 80px; }

.mpv .placeholder-page {
  height: 100%; display: flex; align-items: center; justify-content: center;
  padding: 30px; background: #fff;
}
.mpv .placeholder-box { width: 100%; text-align: center; }
.mpv .tip { padding: 6px 0; color: #999; font-size: 13px; }

/* 商品列表预览（弹窗里的手机） */
.phone-in-modal { transform: scale(.86); transform-origin: top center; margin-bottom: -110px; }

/* ---------- 分类页：绑定商品 / 规格 ---------- */
.cat-bind-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 4px 28px; }
.cat-bind-prod {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; margin-top: 10px;
}
.cat-bind-specs { margin: 4px 0 10px 24px; display: flex; flex-direction: column; gap: 3px; }
.cat-bind-spec { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.cat-bind-spec .mg-code { font-size: 11px; }
.cat-bind-spec .where { font-size: 11px; color: var(--faint); }

/* ---------- 分类页右边的品牌表 ---------- */
.mg-brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px 28px; }
.mg-brand-letter {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  margin-bottom: 6px;
  letter-spacing: .5px;
}
.mg-brand-item { font-size: 13px; padding: 2px 0; }

/* ---------- 要注意的 ---------- */
.mg-warn { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; }
.mg-warn li { margin: 3px 0; }
.mg-code {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  background: #efefe9;
  border-radius: 4px;
  padding: 1px 5px;
}

/* ---------- 邀请码（2026-11-03） ---------- */
/* 宽屏默认 overflow:hidden 是给商品页分栏滚动用的；邀请码页是普通长页面，要能竖向滚动 */
#manageView.wide.invites-view { padding: 24px 0 60px; overflow-y: auto; }
#manageView.wide.invites-view .wrap { height: auto; }
#manageView.wide.invites-view #view { height: auto; }

.mg-input {
  font: inherit;
  font-size: 12.5px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
.mg-input:focus { outline: none; border-color: #bdbdb4; }
.mg-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.mg-badge.ok { color: #2e7d32; border-color: #c8e6c9; background: #f1f8e9; }
.mg-badge.bad { color: var(--bad); border-color: #f3c9c9; background: #fdf2f2; }
/* 身份等级（2026-11-03）：管理员用金色，未分级用灰色 */
.mg-badge.admin { color: #8a6d00; border-color: #f0e0a8; background: #fff8e1; }
.mg-badge.none { color: var(--muted); border-color: var(--line); background: #f7f7f4; }
.mg-pager {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--muted);
}
.mg-table td.ops { white-space: nowrap; }
.mg-table td.ops .mg-btn { margin-right: 4px; }
#inviteLogsModal .modal-body { max-height: 60vh; overflow-y: auto; }
.inv-log { padding: 10px 0; border-bottom: 1px solid var(--line); }
.inv-log:last-child { border-bottom: 0; }
.inv-log-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inv-log-time { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.inv-log-openid {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  font-family: "Cascadia Mono", Consolas, monospace;
  word-break: break-all;
}

/* ---------- 邀请码页装修（2026-11-03 第 4 格） ---------- */
#inviteBuilderView {
  grid-column: 2;
  grid-row: 1;
  padding: 24px;
  overflow-y: auto;
}
.invite-form { max-width: 760px; }
.invite-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.invite-row > label { width: 110px; flex: none; color: var(--muted); font-size: 12.5px; }
.invite-row .mg-input { flex: 1; }
.invite-media { display: flex; align-items: center; gap: 10px; }
.invite-thumb {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f7f2;
}
.invite-thumb-empty {
  width: 88px;
  height: 88px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
}
.invite-color {
  width: 44px;
  height: 34px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

/* 装修预览里的邀请码页（2026-11-07 品牌整屏版） */
.pv-gate {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 70px 26px 30px;
  box-sizing: border-box;
  text-align: center;
}
.pv-gate-logo-img { width: 180px; height: 35px; object-fit: contain; }
.pv-gate-logo-text { font-size: 19px; font-weight: 700; letter-spacing: 2px; }
.pv-gate-title { margin-top: 40px; font-size: 16px; font-weight: 700; letter-spacing: 1px; }
.pv-gate-welcome { margin-top: 6px; font-size: 11px; color: #8a8a8a; }
.pv-gate-input {
  margin-top: 32px;
  width: 100%;
  height: 34px;
  border: 0;
  border-bottom: 1px solid #1a1a1a;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 13px;
  letter-spacing: 2px;
  box-sizing: border-box;
}
.pv-gate-paste {
  width: 100%;
  margin-top: 6px;
  text-align: right;
  font-size: 10px;
  color: #1a1a1a;
  text-decoration: underline;
}
.pv-gate-btn {
  margin-top: 22px;
  width: 100%;
  height: 38px;
  border-radius: 0;
  background: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  letter-spacing: 6px;
}
.pv-gate-footer {
  margin-top: auto;
  padding-top: 24px;
  font-size: 10px;
  color: #999;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* ---------- 分类管理（只读，2026-11-13） ---------- */
#manageView.wide.categories-view { padding: 24px 0 60px; overflow-y: auto; }
#manageView.wide.categories-view .wrap { height: auto; width: min(1280px, calc(100% - 32px)); }
#manageView.wide.categories-view #view { height: auto; }
/* 一列一级，最多 4 级 = 4 列（2026-11-13） */
.cro4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 560px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.cro4-col { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.cro4-col:last-child { border-right: 0; }
.cro4-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  background: #fbfbf7;
  font-size: 12.5px; font-weight: 600;
}
.cro4-head span { color: var(--faint); font-weight: 400; font-size: 11px; }
.cro4-list { flex: 1; overflow-y: auto; padding: 8px; }
.cro4-item {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 10px; border: 0; border-radius: 7px; background: transparent;
  font: inherit; font-size: 12.8px; color: var(--ink); text-align: left; cursor: pointer;
}
.cro4-item + .cro4-item { margin-top: 2px; }
.cro4-item:hover { background: #f0f0ea; }
.cro4-item.on { background: var(--ink); color: #fff; font-weight: 600; }
.cro4-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cro4-count { flex: none; font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.cro4-item.on .cro4-count { color: rgba(255, 255, 255, .7); }
.cro4-empty { padding: 18px 12px; text-align: center; color: var(--faint); font-size: 11.5px; line-height: 1.6; }
.cro4-brand { grid-column: 2 / -1; padding: 16px 18px; min-width: 0; overflow-y: auto; }
.cro4-brand-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin-bottom: 8px; font-size: 13.5px; font-weight: 600;
}
.cro4-brand-head span { color: var(--faint); font-weight: 400; font-size: 11px; }
.cro4-hint { margin: 0 0 12px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.cro4-note { margin: 10px 2px 0; color: var(--faint); font-size: 10.5px; line-height: 1.6; }

/* ---------- 数据表（只读，2026-11-03） ---------- */
#manageView.wide.database-view { padding: 24px 0 60px; overflow-y: auto; }
#manageView.wide.database-view .wrap { height: auto; }
#manageView.wide.database-view #view { height: auto; }
/* 2026-11-10：账号页也是长页面，要能竖向滚动 */
#manageView.wide.account-view { padding: 24px 0 60px; overflow-y: auto; }
#manageView.wide.account-view .wrap { height: auto; }
#manageView.wide.account-view #view { height: auto; }
.acct-table td.ops { white-space: nowrap; }
.db-scroll { overflow-x: auto; }
.db-cell {
  display: inline-block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}


/* ---------- 从个人库复制分类 + 品牌（2026-11-01） ---------- */
.copy-panel { margin-bottom: 14px; }
.copy-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 10px; }
.copy-box { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fbfbf8; }
.copy-h { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.copy-row { font-size: 12.5px; line-height: 1.8; }
.copy-row.d1 { font-weight: 600; }
.copy-row.d2 { padding-left: 18px; }
.copy-row.d3 { padding-left: 36px; }
.copy-row.d4 { padding-left: 54px; }
.copy-row.d5 { padding-left: 72px; }
.copy-row.special { color: var(--ink); font-weight: 700; }
.copy-tag {
  font-size: 10px; line-height: 15px; padding: 0 5px; border-radius: 8px;
  background: #efefe9; color: var(--muted); font-weight: 400;
}
.copy-brand-list { font-size: 11.5px; line-height: 1.8; color: var(--muted); max-height: 250px; overflow: auto; }

/* 2026-11-10：后台「账号」页 */
.acct-form { display: flex; flex-direction: column; gap: 6px; max-width: 420px; }
.acct-label { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.acct-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.acct-actions .mg-hint { margin: 0; }
.acct-table { margin-bottom: 18px; }
.acct-table td.ops { text-align: right; }
.acct-create { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 8px; }
.acct-sub { font-size: 13px; font-weight: 600; margin: 0 0 8px; }
.acct-perms { display: flex; flex-wrap: wrap; gap: 7px 18px; padding: 6px 0; max-width: 640px; }
.acct-perm { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink); }
.acct-perm input { width: 15px; height: 15px; accent-color: #1a1a1a; cursor: pointer; }
.acct-perms-cell { font-size: 12.5px; color: var(--muted); max-width: 360px; }
.acct-perm-group { margin-bottom: 10px; }
.acct-perm-title { font-size: 12px; font-weight: 600; color: var(--muted); margin: 8px 0 4px; }
@media (max-width: 900px) { .copy-cols { grid-template-columns: 1fr; } }
