* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f4f1ea; color: #3a2418; }
.app { display: flex; min-height: 100vh; }

.sidebar { width: 220px; background: #6b1f1f; color: #f5e9d9; padding: 20px 0; flex-shrink: 0; overflow: hidden; }

.logo { display: flex; align-items: center; gap: 10px; padding: 0 20px 20px; margin-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.15); white-space: nowrap; }
.logo-mark { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; background: linear-gradient(135deg, #d4a24a, #a13a2c); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: bold; border: 1px solid rgba(255,255,255,.3); }
.logo-text { font-size: 16px; font-weight: bold; line-height: 1.5; }
.logo-text span { display: block; font-size: 11px; font-weight: normal; opacity: .7; letter-spacing: .5px; }

.nav-item { display: flex; align-items: center; gap: 10px; padding: 12px 20px; color: #e8d5b8; text-decoration: none; font-size: 14px; white-space: nowrap; }
.nav-item:hover { background: rgba(255,255,255,.08); }
.nav-item.active { background: #8a2e2e; color: #fff; font-weight: bold; border-left: 3px solid #d4a24a; }
.nav-icon { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }

.nav-group-head { display: flex; align-items: center; gap: 10px; padding: 12px 20px; color: #e8d5b8; font-size: 14px; cursor: pointer; white-space: nowrap; }
.nav-group-head:hover { background: rgba(255,255,255,.08); }
.nav-group-head .nav-label { flex: 1; }
.nav-group-arrow { font-size: 11px; transition: transform .15s ease; opacity: .7; }
.nav-group-arrow.collapsed { transform: rotate(-90deg); }
.nav-group-body { overflow: hidden; }
.nav-group-body.collapsed { display: none; }
.nav-subitem { padding-left: 46px; font-size: 13px; }

.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 20px);
  background: #3a2418; color: #fff; padding: 12px 24px; border-radius: 8px;
  font-size: 14px; opacity: 0; pointer-events: none; z-index: 9999;
  box-shadow: 0 4px 16px rgba(0,0,0,.2); transition: opacity .25s ease, transform .25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

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

.content { flex: 1; padding: 28px 36px; overflow-y: auto; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
h2 { margin-top: 0; color: #6b1f1f; }
h3 { color: #6b1f1f; margin-bottom: 12px; }
h4 { margin: 20px 0 10px; color: #8a4a20; }
.hint { font-size: 12px; color: #999; font-weight: normal; }

.card { background: #fff; border-radius: 10px; padding: 20px 22px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: #6b4a30; margin-bottom: 6px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; max-width: 480px; padding: 8px 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px;
}

.btn-primary { background: #a13a2c; color: #fff; border: none; padding: 9px 20px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.btn-primary:hover { background: #8a2e22; }
.btn-secondary { background: #fff; color: #a13a2c; border: 1px solid #a13a2c; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-size: 13px; margin-top: 4px; }
.btn-secondary:hover { background: #fdf0ec; }
.btn-danger { background: #fff; color: #c0392b; border: 1px solid #c0392b; padding: 5px 12px; border-radius: 6px; cursor: pointer; font-size: 12px; }

.image-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.image-list .img-item { position: relative; width: 90px; height: 90px; border-radius: 8px; overflow: hidden; border: 1px solid #eee; }
.image-list .img-item img { width: 100%; height: 100%; object-fit: cover; }

/* 扁担条这类窄长图不能按方形裁切，改成原比例完整显示在米色底上，跟小程序里的展示逻辑一致 */
.image-list.wide-preview .img-item { width: auto; max-width: 100%; height: auto; background: #f4f1ea; }
.image-list.wide-preview .img-item img { width: auto; max-width: 100%; height: auto; max-height: 120px; object-fit: contain; display: block; }
.image-list .img-item .remove-btn {
  position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,.6); color: #fff;
  border: none; border-radius: 50%; width: 18px; height: 18px; font-size: 11px; cursor: pointer; line-height: 1;
}

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 12px; }
.mini-card { border: 1px solid #eadfce; border-radius: 8px; padding: 14px; background: #fffaf3; }
.mini-card .row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mini-card label { font-size: 12px; color: #8a6a40; width: 64px; flex-shrink: 0; }
.mini-card input, .mini-card select { flex: 1; padding: 6px 8px; border: 1px solid #ddd; border-radius: 5px; font-size: 13px; }
.mini-card .thumb { width: 100%; height: 110px; object-fit: cover; border-radius: 6px; margin-bottom: 8px; background: #eee; }
.mini-card .thumb.thumb-contain { object-fit: contain; background: #f4f1ea; }
.mini-card .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.data-table { width: 100%; border-collapse: collapse; margin-top: 16px; background: #fff; border-radius: 8px; overflow: hidden; }
.data-table th, .data-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #eee; font-size: 13px; }
.data-table th { background: #f7f0e4; color: #6b4a30; }
.data-table img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.tag-on { color: #2e8b57; }
.tag-off { color: #999; }

.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: #fff; border-radius: 10px; width: 640px; max-height: 88vh; display: flex; flex-direction: column; }
.modal.modal-wide { width: 980px; }
.modal h3 { padding: 18px 22px; margin: 0; border-bottom: 1px solid #eee; }
.modal-body { padding: 18px 22px; overflow-y: auto; flex: 1; }
.modal-body.modal-body-split { display: flex; gap: 22px; align-items: flex-start; }
.modal-edit-col { flex: 1; min-width: 0; }
.modal-preview-col { width: 280px; flex-shrink: 0; position: sticky; top: 0; }
.modal-footer { padding: 14px 22px; border-top: 1px solid #eee; display: flex; justify-content: flex-end; gap: 10px; }

.preview-sub-label { font-size: 12px; color: #8a6a40; font-weight: bold; margin: 14px 0 8px; }
.prev-card-standalone { width: 200px; }

.phone-frame-small { width: 260px; }
.prev-detail-img { height: 160px; background: #eee; }
.prev-detail-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prev-detail-body { padding: 12px; }
.prev-detail-price-row { display: flex; justify-content: space-between; align-items: baseline; }
.prev-detail-price { font-size: 20px; color: #c0392b; font-weight: bold; }
.prev-detail-sold { font-size: 10px; color: #999; }
.prev-detail-name { font-size: 14px; font-weight: bold; color: #3a2418; margin-top: 6px; }
.prev-detail-subtitle { font-size: 11px; color: #8a6a40; margin-top: 4px; }
.prev-detail-unit-inline { font-size: 11px; color: #a08a70; font-weight: normal; }
.prev-detail-delivery { font-size: 10px; color: #8a6a40; margin-top: 10px; }
.prev-detail-blocks img, .prev-detail-blocks video { width: 100%; display: block; margin-top: 8px; border-radius: 6px; }
.prev-detail-blocks .block-text-prev { font-size: 11px; color: #6b4a30; margin-top: 6px; }

.attr-edit-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.attr-edit-row .attr-icon-select { width: 70px; padding: 8px 4px; border: 1px solid #ddd; border-radius: 6px; font-size: 16px; text-align: center; }
.attr-edit-row input { flex: 1; padding: 8px 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; }
.attr-icon-img-box { flex-wrap: nowrap; margin-bottom: 0; min-width: 40px; }
.attr-icon-img-box .img-item { width: 40px; height: 40px; border-radius: 6px; }
.attr-icon-img-box .img-item img { object-fit: contain; background: #f4f1ea; }

/* 卡片信息条预览里，如果图标是自定义图片而不是emoji，按这个小尺寸显示 */
.prev-attr-item .attr-icon-img { width: 10px; height: 10px; object-fit: contain; display: block; margin: 0 auto; }

/* 图标预设库：站点设置里的管理列表 */
.icon-preset-list { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.icon-preset-item { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 92px; background: #faf6ee; border-radius: 8px; padding: 10px 6px; }
.icon-preset-item img { width: 40px; height: 40px; object-fit: contain; }
.icon-preset-label { font-size: 11px; color: #6b4a30; text-align: center; word-break: break-all; }
.icon-preset-add-row { display: flex; gap: 8px; align-items: center; }
.icon-preset-add-row input { flex: 1; padding: 8px 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; }

/* 图标预设库：商品编辑里每个属性行下面的快速点选条 */
.icon-preset-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: -4px 0 10px; }
.icon-preset-picker-label { font-size: 12px; color: #999; margin-right: 2px; }
.icon-preset-thumb { width: 26px; height: 26px; object-fit: contain; border: 1px solid #eee; border-radius: 5px; padding: 2px; background: #fff; cursor: pointer; }
.icon-preset-thumb:hover { border-color: #a13a2c; }

.color-swatch-row { display: flex; gap: 8px; margin-bottom: 8px; }
.color-swatch { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; }
.color-swatch.active { border-color: #3a2418; box-shadow: 0 0 0 2px #fff inset; }
.color-custom-input { width: 60px; height: 32px; padding: 2px; border: 1px solid #ddd; border-radius: 6px; cursor: pointer; }

.theme-swatch-row { display: flex; gap: 10px; flex-wrap: wrap; }
.theme-swatch { width: 92px; height: 48px; border-radius: 10px; cursor: pointer; border: 2px solid transparent; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 500; }
.theme-swatch.active { border-color: #3a2418; box-shadow: 0 0 0 2px #fff inset; }

/* ---- 客服联系方式 · 实时预览（照搬小程序"我的"页面加微信卡片的真实样式） ---- */
.contact-settings-layout { display: flex; gap: 28px; align-items: flex-start; }
.contact-edit-col { flex: 0 1 500px; min-width: 0; }
.contact-preview-col { width: 380px; flex-shrink: 0; position: sticky; top: 20px; }
.contact-preview-stage { background: #f4f1ea; border-radius: 12px; padding: 34px 24px; }
.contact-card-preview { border-radius: 16px; padding: 30px 26px; transition: background .15s; }
.contact-preview-title { font-size: 20px; font-weight: bold; color: #fff; margin-bottom: 18px; word-break: break-word; }
.contact-preview-bullets { margin-bottom: 24px; }
.contact-preview-bullet { font-size: 15px; line-height: 1.7; margin-bottom: 6px; word-break: break-word; }
.contact-preview-bullet:last-child { margin-bottom: 0; }
.contact-preview-btn { display: flex; align-items: center; justify-content: center; gap: 8px; background: #fff; border-radius: 999px; padding: 15px 0; font-size: 17px; font-weight: bold; }
.contact-preview-caption { text-align: center; font-size: 12px; margin-top: 10px; opacity: .75; word-break: break-word; }
.contact-theme-red { background: linear-gradient(135deg, #6b1717, #8a2e22); }
.contact-theme-red .contact-preview-bullet, .contact-theme-red .contact-preview-caption { color: #f0d9c8; }
.contact-theme-red .contact-preview-btn { color: #8a2e22; }
.contact-theme-orange { background: linear-gradient(135deg, #a8481f, #c96a35); }
.contact-theme-orange .contact-preview-bullet, .contact-theme-orange .contact-preview-caption { color: #fbe3cf; }
.contact-theme-orange .contact-preview-btn { color: #a8481f; }
.contact-theme-indigo { background: linear-gradient(135deg, #1f3a52, #2e5578); }
.contact-theme-indigo .contact-preview-bullet, .contact-theme-indigo .contact-preview-caption { color: #cfe0ee; }
.contact-theme-indigo .contact-preview-btn { color: #1f3a52; }
.contact-theme-brown { background: linear-gradient(135deg, #4a3320, #6b4a2c); }
.contact-theme-brown .contact-preview-bullet, .contact-theme-brown .contact-preview-caption { color: #e8d9c4; }
.contact-theme-brown .contact-preview-btn { color: #4a3320; }
.contact-theme-green { background: linear-gradient(135deg, #1f4a2e, #2e6b45); }
.contact-theme-green .contact-preview-bullet, .contact-theme-green .contact-preview-caption { color: #d9ecdf; }
.contact-theme-green .contact-preview-btn { color: #1f4a2e; }
.contact-theme-purple { background: linear-gradient(135deg, #3a1f4a, #5a2e6b); }
.contact-theme-purple .contact-preview-bullet, .contact-theme-purple .contact-preview-caption { color: #e5d9ec; }
.contact-theme-purple .contact-preview-btn { color: #3a1f4a; }
.contact-theme-charcoal { background: linear-gradient(135deg, #2a2a2a, #4a4a4a); }
.contact-theme-charcoal .contact-preview-bullet, .contact-theme-charcoal .contact-preview-caption { color: #d9d9d9; }
.contact-theme-charcoal .contact-preview-btn { color: #2a2a2a; }
.contact-theme-rose { background: linear-gradient(135deg, #6b1f3a, #8a2e52); }
.contact-theme-rose .contact-preview-bullet, .contact-theme-rose .contact-preview-caption { color: #f0d9e2; }
.contact-theme-rose .contact-preview-btn { color: #6b1f3a; }

.spec-row, .block-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; background: #faf6ee; padding: 8px; border-radius: 6px; }
.spec-row input, .block-row input { flex: 1; padding: 6px 8px; border: 1px solid #ddd; border-radius: 5px; font-size: 13px; }
.block-row textarea { flex: 2; padding: 6px 8px; border: 1px solid #ddd; border-radius: 5px; font-size: 13px; height: 50px; }
.block-row-actions { display: flex; flex-direction: column; gap: 4px; }
.block-row-actions button { padding: 3px 10px; font-size: 12px; }
.block-row-actions button:disabled { opacity: .35; cursor: not-allowed; }

.shipping-group-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.shipping-group-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.shipping-group-actions { display: flex; align-items: center; gap: 14px; }
.enable-check { display: flex; align-items: center; gap: 5px; font-size: 13px; color: #6b4a30; }
.region-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.region-checkbox {
  display: flex; align-items: center; gap: 6px; border: 1px solid #ddd; border-radius: 6px;
  padding: 8px 10px; font-size: 13px; cursor: pointer; color: #444;
}
.region-checkbox.checked { border-color: #c0392b; color: #c0392b; background: #fdf0ec; }
.region-checkbox input { accent-color: #c0392b; }
.shipping-price-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.shipping-price-row .form-row { margin-bottom: 0; }
.shipping-price-row input { max-width: none; }

/* ---- 首页管理：实时预览 ---- */
.home-layout { display: flex; gap: 24px; align-items: flex-start; }
.home-edit-col { flex: 1; min-width: 0; }
.home-preview-col { width: 300px; flex-shrink: 0; }
.preview-sticky { position: sticky; top: 20px; }
.preview-label { font-size: 13px; color: #6b4a30; font-weight: bold; margin-bottom: 10px; }
.phone-frame { width: 300px; background: #f4f1ea; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,.18); border: 6px solid #2a2a2a; }
.phone-nav { background: #fdfaf3; text-align: center; padding: 10px 0 6px; font-weight: bold; font-size: 14px; color: #3a2418; }

.prev-hero { margin: 10px; height: 130px; border-radius: 8px; overflow: hidden; position: relative; background: #eee; }
.prev-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prev-empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #999; font-size: 11px; background: repeating-linear-gradient(45deg,#eee,#eee 8px,#e2e2e2 8px,#e2e2e2 16px); }
.prev-hero-text { position: absolute; left: 10px; top: 12px; }
.prev-hero-title { font-size: 15px; font-weight: bold; color: #f0d9a8; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.prev-hero-subtitle { font-size: 13px; font-weight: bold; color: #f0d9a8; margin: 2px 0; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.prev-hero-desc { font-size: 9px; color: #e8d5b8; text-shadow: 0 1px 3px rgba(0,0,0,.4); }

.prev-strip { margin: 8px 10px 0; min-height: 4px; }
.prev-strip-img { width: 100%; display: block; }
.prev-strip-pill { background: linear-gradient(90deg,#5a3a1a,#8a5a28,#5a3a1a); border-radius: 999px; padding: 7px 0; text-align: center; color: #f0d9a8; font-size: 10px; }

.prev-scale-divider { display: flex; align-items: center; margin: 10px; }
.prev-scale-line { flex: 1; height: 1px; background-image: repeating-linear-gradient(90deg,#c9b896 0,#c9b896 1px,transparent 1px,transparent 6px); }
.prev-scale-tag { background: #fff; color: #8a1f1f; border: 1px solid #8a1f1f; font-size: 9px; padding: 3px 9px; border-radius: 999px; margin: 0 6px; white-space: nowrap; }

.prev-section-title { font-size: 13px; font-weight: bold; color: #3a2418; margin: 8px 10px 6px; }
.prev-cards { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 8px; }
.prev-card { width: calc(50% - 6px); background: #fdf7ec; border-radius: 8px; overflow: hidden; }
.prev-card-empty { height: 90px; display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 10px; background: #fdf7ec; border-radius: 8px; }
.prev-card-img { width: 100%; display: block; }
.prev-card-img-empty { width: 100%; height: 90px; background: #eee; }
.prev-card-tags { display: flex; flex-wrap: wrap; gap: 3px; padding: 6px 6px 0; }
.prev-tag { font-size: 8px; background: #f2e8d5; color: #8a6a40; padding: 1px 6px; border-radius: 4px; }
.prev-card-attrs { display: flex; align-items: center; padding: 4px 3px 1px; }
.prev-attr-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; font-size: 6px; }
.prev-attr-text { font-size: 5px; color: #8a6a40; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.prev-attr-div { width: 1px; height: 11px; background: #eadfce; flex-shrink: 0; }
.prev-card-bottom { display: flex; justify-content: space-between; align-items: center; padding: 5px 6px 6px; border-top: 1px solid #f4ecd9; margin: 2px 4px 0; }
.prev-card-price { font-size: 12px; color: #c0392b; font-weight: bold; }
.prev-card-cart { width: 20px; height: 20px; border-radius: 50%; background: #8a5a28; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; }

.prev-seasonal-grid { display: flex; align-items: flex-start; gap: 6px; padding: 0 8px 10px; }
.prev-seasonal { width: calc(50% - 3px); border-radius: 6px; overflow: hidden; position: relative; }
.prev-seasonal img { width: 100%; display: block; }
.prev-seasonal-stamp {
  position: absolute; top: 46%; left: 44%;
  transform: translate(-50%, -50%) rotate(-22deg);
  box-sizing: border-box;
  width: 74px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(139, 30, 30, .85);
  outline: .5px solid rgba(139, 30, 30, .85);
  outline-offset: .8px;
  color: rgba(139, 30, 30, .9);
  background: rgba(255, 250, 244, .4);
  font-size: 6.5px; font-weight: bold; letter-spacing: 0;
  border-radius: 2px;
  white-space: nowrap;
  text-align: center;
}

.order-status-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.order-status-tab { background: #fff; border: 1px solid #e5dcc9; border-radius: 20px; padding: 7px 16px; font-size: 13px; color: #6b4a30; cursor: pointer; }
.order-status-tab .tab-count { color: #a13a2c; font-weight: bold; margin-left: 2px; }
.order-status-tab.active { background: #a13a2c; border-color: #a13a2c; color: #fff; }
.order-status-tab.active .tab-count { color: #fff; }
.order-status-tab:hover { border-color: #a13a2c; }

.order-card { background: #fff; border-radius: 8px; padding: 16px 18px; margin-bottom: 14px; }
.order-card .order-head { display: flex; align-items: center; gap: 16px; font-size: 13px; color: #666; margin-bottom: 10px; flex-wrap: wrap; }
.order-card .order-head-actions { margin-left: auto; display: flex; gap: 8px; }
.order-search-input { width: 100%; max-width: 480px; padding: 9px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; }
.order-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.order-toolbar .order-search-input { margin-bottom: 0; flex: 1; }
.order-sub { border-top: 1px dashed #eadfce; padding-top: 10px; margin-top: 10px; }
.order-sub .sub-tag { display: inline-block; background: #f0e0c8; color: #8a4a20; font-size: 11px; padding: 2px 8px; border-radius: 4px; margin-right: 6px; }
.order-sub .channel-tag { display: inline-block; background: #e8f0e0; color: #4a7a2c; font-size: 11px; padding: 2px 8px; border-radius: 4px; margin-right: 6px; }
.status-pending { color: #d4a24a; } .status-paid { color: #a13a2c; } .status-done { color: #999; } .status-aftersale { color: #c0392b; } .status-refunded { color: #7a7a7a; }

.form-row-group { display: flex; gap: 16px; }
.form-row-group .form-row { flex: 1; }
.mo-item-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; background: #faf6ee; padding: 8px; border-radius: 6px; }
.mo-item-row input, .mo-item-row select { flex: 1; padding: 6px 8px; border: 1px solid #ddd; border-radius: 5px; font-size: 13px; }
.mo-item-row input[type="number"] { max-width: 90px; }
.mo-item-row .mo-item-subtotal { width: 70px; flex-shrink: 0; font-size: 13px; color: #8a4a20; text-align: right; }
.mo-total-display { padding: 8px 10px; font-size: 16px; font-weight: bold; color: #a13a2c; }
.mo-ocr-row { background: #faf6ee; border-radius: 8px; padding: 12px 14px; margin-bottom: 18px; }
.mo-ocr-status { font-size: 12.5px; color: #4a7a2c; margin-top: 6px; line-height: 1.6; }
.mo-ocr-status.mo-ocr-error { color: #c0392b; }

/* ---- 财务管理 ---- */
.finance-stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.finance-stat-card { background: #fff; border-radius: 10px; padding: 20px 22px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.finance-stat-label { font-size: 13px; color: #8a6a40; margin-bottom: 8px; }
.finance-stat-value { font-size: 28px; font-weight: bold; color: #a13a2c; }
.finance-stat-sub { font-size: 12px; color: #999; margin-top: 6px; }

.finance-status-row { display: flex; flex-wrap: wrap; gap: 12px; }
.finance-status-pill { background: #f7f0e4; border-radius: 8px; padding: 10px 18px; font-size: 13px; color: #6b4a30; border: none; font-family: inherit; }
.finance-status-pill b { font-size: 18px; color: #a13a2c; margin-right: 6px; }
.finance-status-pill-clickable { cursor: pointer; }
.finance-status-pill-clickable:hover { background: #eee0c8; }

.tag-pill { display: inline-block; width: 68px; padding: 3px 0; border-radius: 10px; font-size: 12px; font-weight: 500; line-height: 1.6; text-align: center; }

.finance-trend-chart { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.finance-trend-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.finance-trend-bar { width: 100%; max-width: 28px; background: #a13a2c; border-radius: 4px 4px 0 0; min-height: 2px; }
.finance-trend-amount { font-size: 10px; color: #a13a2c; margin-bottom: 2px; white-space: nowrap; }
.finance-trend-day { font-size: 10px; color: #999; margin-top: 6px; white-space: nowrap; }

/* ---- 数据中心 · 客户地域分析 ---- */
.insights-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.insights-header-icon { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.insights-title { margin: 0; color: #6b1f1f; font-size: 22px; }
.insights-subtitle { margin: 2px 0 0; font-size: 13px; color: #8a6a40; }
.insights-header-spacer { flex: 1; }
.insights-time-filter { display: flex; gap: 6px; background: #fff; border-radius: 8px; padding: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.time-filter-btn { border: none; background: none; padding: 7px 14px; border-radius: 6px; font-size: 13px; color: #6b4a30; cursor: pointer; }
.time-filter-btn.active { background: #a13a2c; color: #fff; font-weight: bold; }
.time-filter-btn:hover:not(.active) { background: #f4ede2; }

.insights-view-tabs { display: inline-flex; gap: 4px; background: #fff; border-radius: 8px; padding: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.06); margin-bottom: 8px; }
.view-tab-btn { border: none; background: none; padding: 8px 22px; border-radius: 6px; font-size: 14px; color: #6b4a30; cursor: pointer; }
.view-tab-btn.active { background: #a13a2c; color: #fff; font-weight: bold; }
.view-tab-btn:hover:not(.active) { background: #f4ede2; }
.insights-note { margin: 4px 0 18px; }

.insights-stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.insights-stat-card { background: #fff; border-radius: 10px; padding: 18px 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); display: flex; align-items: center; gap: 14px; }
.insights-stat-icon { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0; }
.insights-stat-icon-a { background: #fde3d8; color: #c96a35; }
.insights-stat-icon-b { background: #fbe7c8; color: #a8481f; }
.insights-stat-icon-c { background: #f8dede; color: #a13a2c; }
.insights-stat-icon-d { background: #fdeccb; color: #c9862f; }
.insights-stat-value { font-size: 22px; font-weight: bold; color: #3a2418; line-height: 1.3; }
.insights-stat-label { font-size: 12px; color: #8a6a40; }

.insights-main-row { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; align-items: start; margin-bottom: 18px; }
.insights-main-row-equal { align-items: stretch; }
.insights-main-row-equal .card { display: flex; flex-direction: column; margin-bottom: 0; }
.insights-map-card, .insights-rank-card { margin-bottom: 0; }
.map-card-title { display: flex; align-items: center; gap: 7px; }
.map-info-dot { width: 16px; height: 16px; border-radius: 50%; border: 1.4px solid #c7a98f; color: #b08968; font-size: 10.5px; font-style: italic; font-family: Georgia, serif; display: inline-flex; align-items: center; justify-content: center; cursor: help; flex-shrink: 0; }
.map-row { display: flex; gap: 14px; align-items: center; }
.map-legend-vertical { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: #8a6a40; flex-shrink: 0; }
.map-legend-vbar { width: 12px; height: 120px; border-radius: 6px; background: linear-gradient(180deg, #8f2a20 0%, #d1594a 32%, #ef9c86 62%, #fbe3d8 100%); }
.guangdong-map-svg, .china-map-svg { width: 100%; max-width: 860px; height: auto; min-width: 0; }
.gd-city-path, .cn-province-path { cursor: default; transition: opacity .15s; }
.gd-city-path:hover, .cn-province-path:hover { opacity: .8; }
.gd-city-label, .cn-province-label { font-size: 13px; fill: #3a2418; pointer-events: none; }
.gd-city-count, .cn-province-count { font-size: 11px; fill: #a13a2c; font-weight: bold; pointer-events: none; }

.rank-cell { display: flex; align-items: center; gap: 8px; }
.rank-medal { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: bold; color: #fff; flex-shrink: 0; }
.rank-medal-1 { background: linear-gradient(135deg, #f0c14a, #c9932a); }
.rank-medal-2 { background: linear-gradient(135deg, #cfcfcf, #9a9a9a); }
.rank-medal-3 { background: linear-gradient(135deg, #d99a5c, #a8623a); }
.rank-index { width: 20px; text-align: center; color: #999; font-size: 12px; flex-shrink: 0; }

.insights-export-btn { margin-left: auto; align-self: center; }

/* 省外客户观察 / 重点结论 */
.insights-observation-list, .insights-conclusion-list { display: flex; flex-direction: column; gap: 10px; }
.insights-observation-item, .insights-conclusion-item { display: flex; align-items: center; gap: 10px; background: #faf6ee; border-radius: 8px; padding: 10px 14px; font-size: 13px; color: #3a2418; }
.insights-observation-icon { font-size: 16px; flex-shrink: 0; }

/* 客户标签概览 */
.insights-tag-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.insights-tag-card { background: #faf6ee; border-radius: 10px; padding: 16px 10px; text-align: center; }
.insights-tag-icon { font-size: 20px; margin-bottom: 6px; }
.insights-tag-value { font-size: 20px; font-weight: bold; color: #3a2418; }
.insights-tag-label { font-size: 12px; color: #6b4a30; margin: 2px 0; }
.insights-tag-pct { font-size: 12px; color: #a13a2c; font-weight: bold; }

/* 热门商品偏好 */
.insights-product-bars { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.insights-product-row { display: flex; align-items: center; gap: 10px; }
.insights-product-name { width: 70px; font-size: 13px; color: #3a2418; flex-shrink: 0; }
.insights-product-track { flex: 1; height: 16px; background: #f4ede2; border-radius: 4px; overflow: hidden; }
.insights-product-fill { height: 100%; background: linear-gradient(90deg, #d4a24a, #a13a2c); border-radius: 4px; }
.insights-product-pct { width: 44px; text-align: right; font-size: 13px; color: #a13a2c; font-weight: bold; flex-shrink: 0; }

/* ---- 会员管理 ---- */
.member-top-row { display: flex; gap: 18px; align-items: stretch; margin-bottom: 20px; }
.member-top-row .card { margin-bottom: 0; }
.member-settings-card { flex: 0 0 360px; }
.member-tags-card { flex: 1; min-width: 0; }
.member-tag-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.member-tag-chip { background: #faf6ee; border: 1.5px solid #e5dcc9; border-radius: 20px; padding: 8px 16px; font-size: 13px; color: #6b4a30; cursor: pointer; }
.member-tag-chip b { color: #a13a2c; margin-left: 4px; }
.member-tag-chip:hover { border-color: #a13a2c; }
.member-tag-chip.active { background: #a13a2c; border-color: #a13a2c; color: #fff; }
.member-tag-chip.active b { color: #fff; }
.member-id { font-size: 11px; color: #bbb; }
.member-toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.member-toolbar input { flex: 1; min-width: 200px; padding: 8px 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; }
.member-toolbar select { padding: 8px 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; }
.member-row { cursor: pointer; }
.member-row:hover { background: #faf6ee; }
.spend-total { font-weight: bold; color: #a13a2c; }
.spend-breakdown { font-size: 11px; margin-top: 2px; }

.member-sleepy-row { display: flex; gap: 18px; align-items: stretch; margin-bottom: 20px; }
.member-sleepy-row .card { margin-bottom: 0; }
.member-sleepy-card, .member-list-card { display: flex; flex-direction: column; max-height: 640px; }
.member-sleepy-card, .member-list-card { flex: 1 1 0; min-width: 0; }
.member-sleepy-card h3 { flex-shrink: 0; }
.member-list-card .member-toolbar { flex-shrink: 0; margin-bottom: 10px; }
.member-list-card .member-toolbar input { min-width: 120px; }
.member-list-table-scroll { flex: 1; min-height: 0; overflow: auto; }
.member-list-table-scroll .data-table { white-space: nowrap; }
.sleepy-reminder-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.sleepy-reminder-item { display: flex; align-items: center; gap: 14px; background: #fdf0ec; border-radius: 8px; padding: 10px 14px; cursor: pointer; font-size: 13px; }
.sleepy-reminder-item:hover { background: #fbe3dc; }
.sleepy-reminder-item .sleepy-days { margin-left: auto; color: #c0392b; font-weight: bold; }
.sleepy-reminder-actions { display: flex; gap: 8px; }
.col-actions { text-align: center; }
.row-actions button { padding: 7px 14px; font-size: 13px; margin: 0; }

.member-detail-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.member-avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: #a13a2c; color: #fff; font-size: 14px; margin-right: 8px; vertical-align: middle; }
.member-detail-name { font-size: 18px; font-weight: bold; color: #3a2418; display: flex; align-items: center; gap: 8px; }
.member-detail-sub { font-size: 13px; color: #8a6a40; margin-top: 6px; margin-left: 40px; }
.member-stat-row { margin-bottom: 16px; }

.member-timeline { position: relative; padding: 20px 10px 0; overflow-x: auto; }
.timeline-line { position: absolute; left: 20px; right: 20px; top: 26px; height: 2px; background: #eadfce; }
.timeline-dots { display: flex; gap: 28px; position: relative; padding-bottom: 6px; }
.timeline-dot-wrap { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; background: #a13a2c; border: 2px solid #fff; box-shadow: 0 0 0 1px #a13a2c; }
.timeline-date { font-size: 11px; color: #999; margin-top: 6px; white-space: nowrap; }

.member-products { display: flex; flex-wrap: wrap; gap: 8px; }
.member-product-tag { background: #f2e8d5; color: #8a6a40; font-size: 12px; padding: 5px 12px; border-radius: 6px; }

.member-note-input { width: 100%; box-sizing: border-box; min-height: 70px; padding: 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; margin-bottom: 10px; font-family: inherit; }

/* ========== 手机窄屏适配：侧边栏改成顶部横条，两栏预览改成上下堆叠 ========== */
@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; padding: 10px 0; display: flex; align-items: center; overflow-x: auto; white-space: nowrap; }
  .sidebar .logo { padding: 0 14px; border-bottom: none; border-right: 1px solid rgba(255,255,255,.15); flex-shrink: 0; }
  .sidebar .logo br { display: none; }
  .sidebar nav { display: flex; }
  .nav-item { padding: 10px 14px; flex-shrink: 0; }
  .nav-item.active { border-left: none; border-bottom: 3px solid #d4a24a; }

  .content { padding: 16px; width: 100%; overflow-x: hidden; }

  .home-layout, .modal-body.modal-body-split, .member-top-row, .member-sleepy-row, .contact-settings-layout { flex-direction: column; }
  .member-settings-card, .member-sleepy-card { flex-basis: auto; }
  .contact-preview-col { width: 100%; position: static; }
  .home-preview-col, .modal-preview-col {
    width: 100%; position: static; order: -1; margin-bottom: 16px;
  }
  .preview-sticky { position: static; }
  .phone-frame, .phone-frame-small, .prev-card-standalone {
    width: 100% !important; max-width: 375px; margin: 0 auto;
  }

  .modal-mask { padding: 12px; }
  .modal, .modal.modal-wide { width: 100%; max-width: 100%; max-height: 92vh; }

  .card-grid { grid-template-columns: 1fr; }
  .region-grid { grid-template-columns: repeat(2, 1fr); }
  .shipping-price-row { grid-template-columns: repeat(2, 1fr); }
  .finance-stat-row { grid-template-columns: 1fr; }

  .spec-row, .block-row { flex-wrap: wrap; }
  .form-row input, .form-row select, .form-row textarea { max-width: 100%; }

  .data-table { display: block; overflow-x: auto; white-space: nowrap; }
}
