:root {
  --blue: #2f6bff;
  --blue-dark: #1f54d8;
  --bg: #f3f6fb;
  --card: #fff;
  --text: #1f2a37;
  --muted: #6b7280;
  --border: #e5e7eb;
  --danger: #e34d59;
  --ok: #00a870;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}
.hidden { display: none !important; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #e8f0ff, #f7f9fc 45%, #dce8ff);
}
.login-card {
  width: 380px;
  background: #fff;
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 16px 40px rgba(47, 107, 255, 0.12);
}
.login-card h1 { margin: 0; font-size: 24px; }
.login-sub { color: var(--muted); margin: 6px 0 24px; }
.login-card label { display: block; font-size: 13px; margin: 12px 0 6px; color: var(--muted); }
.login-card input, .form-grid input, .form-grid textarea, .form-grid select, .toolbar input, .toolbar select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}
.login-card input:focus, .form-grid input:focus, .form-grid textarea:focus {
  border-color: var(--blue);
}
.error { color: var(--danger); min-height: 20px; font-size: 13px; }

.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px;
  background: #15233b;
  color: #fff;
  padding: 20px 12px 16px;
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  position: sticky;
  top: 0;
}
.sidebar nav {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}
.brand {
  font-weight: 700;
  font-size: 18px;
  padding: 8px 12px 16px;
}
.nav-group { margin-bottom: 6px; }
.nav-group-title {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #8ea0bd;
  padding: 10px 12px 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.nav-group.collapsed .nav-group-items { display: none; }
.nav-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #c9d4e8;
  padding: 8px 12px 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 2px;
  font-size: 13px;
}
.nav-item:hover, .nav-item.active {
  background: rgba(47, 107, 255, 0.25);
  color: #fff;
}
.logout { margin-top: auto; }

.main { flex: 1; display: flex; flex-direction: column; }
.topbar {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}
.topbar h2 { margin: 0; font-size: 18px; }
.admin-name { color: var(--muted); font-size: 14px; }
.content { padding: 24px 28px 40px; }

.btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
}
.btn.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.btn.primary:hover { background: var(--blue-dark); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; color: #c9d4e8; border-color: rgba(255,255,255,.2); }
.btn.block { width: 100%; margin-top: 18px; padding: 12px; }
.btn.sm { padding: 4px 10px; font-size: 12px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stats.cols-5 { grid-template-columns: repeat(5, 1fr); }
.subtabs { display: flex; gap: 8px; margin-bottom: 16px; }
.subtabs .btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.muted { color: var(--muted); font-size: 13px; }
.stat-card {
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border);
}
.stat-card .label { color: var(--muted); font-size: 13px; }
.stat-card .value { font-size: 28px; font-weight: 700; margin-top: 8px; color: var(--blue); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.toolbar input, .toolbar select { width: auto; min-width: 180px; }
.spacer { flex: 1; }
.batch-bar {
  margin: -6px 0 12px;
  font-size: 13px;
  color: var(--muted);
}
.batch-bar strong { color: var(--primary, #2f6bff); }
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  border-bottom: 1px solid var(--border);
  padding: 12px 8px;
  text-align: left;
  vertical-align: middle;
}
th { color: var(--muted); font-weight: 600; background: #fafbfc; }
.thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  background: #f3f4f6;
}
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #eef3ff;
  color: var(--blue);
}
.tag.off { background: #f3f4f6; color: var(--muted); }
.tag.ok { background: #e8f8f1; color: var(--ok); }
.tag.warn { background: #fff4e5; color: #e37318; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: center;
  z-index: 50;
}
.modal-card {
  width: min(760px, 94vw);
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
}
.hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}
.img-preview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.img-preview-row img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  background: #f3f4f6;
}
.section-title {
  font-size: 14px;
  font-weight: 600;
  margin: 8px 0 4px;
  color: var(--text);
  border-left: 3px solid var(--blue);
  padding-left: 8px;
}
.check-list {
  max-height: 140px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}
.check-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  font-size: 13px;
  color: var(--text);
}
.check-list input { width: auto; }

.upload-field {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.upload-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.upload-btn input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.img-chip {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f3f4f6;
}
.img-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-chip .rm {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
  padding: 0;
}
.upload-status {
  font-size: 12px;
  color: var(--muted);
}
.upload-status.err { color: var(--danger); }
.upload-status.ok { color: var(--ok); }
.url-toggle {
  font-size: 12px;
  color: var(--blue);
  cursor: pointer;
  margin-left: 4px;
  background: none;
  border: none;
  padding: 0;
}
.modal-head, .modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-foot {
  border-bottom: 0;
  border-top: 1px solid var(--border);
  justify-content: flex-end;
  gap: 10px;
}
.modal-head h3 { margin: 0; font-size: 16px; }
#modalBody { padding: 18px; max-height: 60vh; overflow: auto; }
.icon-btn {
  border: 0;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  color: var(--muted);
}
.form-grid { display: grid; gap: 12px; }
.form-grid.two-col { grid-template-columns: 1fr 1fr; }
.form-grid label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 4px; }
.week-reward-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.week-reward-grid input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 8px;
  font-size: 14px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.muted { color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 6px; }

/* 客户管理聊天 */
.chat-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 12px;
  min-height: calc(100vh - 140px);
}
.chat-users {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: auto;
  max-height: calc(100vh - 140px);
}
.chat-user {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.chat-user:hover, .chat-user.active { background: #eef3ff; }
.chat-user-name {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-badge {
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  padding: 1px 6px;
}
.chat-user-preview {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-user-time { color: #9aa3b2; font-size: 11px; margin-top: 4px; }
.chat-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 140px);
}
.chat-panel-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.chat-messages {
  flex: 1;
  overflow: auto;
  padding: 16px;
  background: #f7f8fb;
}
.chat-bubble-row { display: flex; margin-bottom: 10px; }
.chat-bubble-row.mine { justify-content: flex-end; }
.chat-bubble {
  max-width: 70%;
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.chat-bubble-row.mine .chat-bubble { background: #2f6bff; color: #fff; }
.chat-text { font-size: 14px; line-height: 1.5; word-break: break-word; }
.chat-time { font-size: 11px; opacity: .65; margin-top: 4px; }
.chat-img { max-width: 220px; border-radius: 6px; display: block; }
.chat-composer {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
  align-items: center;
}
.chat-composer input#chatText { flex: 1; }

@media (max-width: 960px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .sidebar { width: 180px; }
  .chat-layout { grid-template-columns: 1fr; }
}

.product-title { min-width: 180px; max-width: 320px; font-weight: 600; }
#pBody td { white-space: nowrap; }
#pBody td:nth-child(4) { white-space: normal; }
.card:has(#pBody) { overflow-x: auto; }

.product-pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 4px 2px; }
.pagination-actions { display: flex; align-items: center; gap: 10px; }
#pPageInfo { min-width: 90px; text-align: center; font-size: 13px; color: var(--muted); }
.group-table td { height: 62px; }
.group-parent td { background: #fbfcff; }
.group-expand, .link-btn {
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
}
.group-expand { width: 28px; padding: 0; font-size: 18px; }
.group-thumb {
  width: 40px;
  height: 40px;
  margin: 0 10px;
  border-radius: 6px;
  object-fit: cover;
  vertical-align: middle;
  background: #f3f4f6;
}
.group-child { padding-left: 42px; }
.group-branch { color: #aab2bf; }
.link-btn { padding: 4px 8px; font-size: 13px; }
.group-switch { display: inline-flex; gap: 7px; align-items: center; cursor: pointer; }
.group-switch input { width: 34px; height: 18px; accent-color: var(--ok); }
.promo-category-list {
  max-height: 260px;
  overflow: auto;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.promo-category-group { padding: 8px 0; border-bottom: 1px solid #f0f2f5; }
.promo-category-group:last-child { border-bottom: 0; }
.promo-category-group label,
.promo-category-children label { display: inline-flex; align-items: center; gap: 6px; margin: 4px 14px 4px 0; color: var(--text); }
.promo-category-group input { width: auto; }
.promo-category-children { padding-left: 24px; }
.promo-selected-products { display: flex; flex-wrap: wrap; gap: 8px; min-height: 30px; }
.promo-selected-item { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 16px; color: var(--blue); background: #eef3ff; font-size: 12px; }
.promo-selected-item button { border: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: 15px; padding: 0; }
.promo-product-results { max-height: 260px; }
.promo-product-option img { width: 38px; height: 38px; border-radius: 6px; object-fit: cover; background: #f3f4f6; }
.promo-product-option span { display: flex; flex-direction: column; gap: 3px; }
.promo-product-option small { color: var(--muted); }

.user-table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.user-management-table { width: max-content; min-width: 100%; }
.user-management-table th,
.user-management-table td {
  min-width: 140px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-management-table th:first-child,
.user-management-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
}
.user-management-table th:first-child { background: #fafbfc; z-index: 2; }
.field-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
  max-height: 55vh;
  overflow-y: auto;
  padding: 8px 2px;
}
.field-picker label { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.field-picker input { width: 16px; height: 16px; }

.user-filter-card { padding: 0; overflow: hidden; }
.user-filter-title { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.filter-toggle { border: 0; background: transparent; color: var(--blue); cursor: pointer; padding: 4px 0; font-size: 14px; }
.filter-toggle span { display: inline-block; margin-left: 4px; font-size: 16px; }
.user-filter-common { padding: 18px 20px; }
.user-filter-advanced { padding: 18px 20px; border-top: 1px dashed var(--border); background: #fafbfe; }
.user-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 16px; align-items: end; }
.user-filter-grid label { display: flex; min-width: 0; flex-direction: column; gap: 7px; color: var(--muted); font-size: 13px; }
.user-filter-grid input,
.user-filter-grid select { width: 100%; min-width: 0; height: 40px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; background: #fff; color: var(--text); outline: none; }
.user-filter-grid input:focus,
.user-filter-grid select:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(47, 107, 255, 0.08); }
.user-filter-actions { display: flex; gap: 10px; align-items: center; height: 40px; }
.filter-range { grid-column: span 2; }
.filter-range > div { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.filter-range i { color: var(--muted); font-style: normal; }
.active-filter-summary { padding: 10px 20px; border-top: 1px solid var(--border); background: #f7f9ff; color: var(--muted); font-size: 12px; }
@media (max-width: 1280px) { .user-filter-grid { grid-template-columns: repeat(3, minmax(180px, 1fr)); } }
@media (max-width: 900px) { .user-filter-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); } .filter-range { grid-column: span 2; } }
.import-progress-bubble {
  position: fixed; right: 24px; bottom: 24px; z-index: 1200; width: 340px;
  padding: 18px 42px 16px 18px; border: 1px solid #dbe5ff; border-radius: 14px;
  background: #fff; box-shadow: 0 12px 38px rgba(31, 42, 55, 0.2); font-size: 13px;
}
.import-progress-bubble strong { display: block; margin-bottom: 12px; font-size: 15px; }
.import-bubble-close { position: absolute; right: 12px; top: 10px; border: 0; background: transparent; color: var(--muted); font-size: 21px; cursor: pointer; }
.import-progress-track { height: 8px; overflow: hidden; margin-bottom: 10px; border-radius: 5px; background: #edf1f7; }
.import-progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--blue); transition: width 0.2s ease; }
.import-progress-bubble.success .import-progress-track i { background: var(--ok); }
.import-progress-bubble.failed { border-color: #ffd4d8; }
.import-progress-bubble.failed .import-progress-track i { background: var(--danger); }
.import-progress-bubble.failed #uImportProgressText { color: var(--danger); }
.point-filter-grid { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
.point-transaction-table th,
.point-transaction-table td { min-width: 130px; }
.point-transaction-table th:first-child,
.point-transaction-table td:first-child { min-width: 170px; }
.point-increase { color: var(--ok); font-weight: 700; }
.point-decrease { color: var(--danger); font-weight: 700; }
/* Staff product library and batch pricing */
.staff-table-scroll { overflow-x: auto; }
.staff-product-image { display:inline-flex; align-items:center; justify-content:center; width:64px; height:64px; object-fit:contain; border-radius:8px; background:#f6f7fa; flex-shrink:0; }
.staff-image-empty { font-size:12px; color:#88919f; }
.staff-table-scroll td { vertical-align:middle; }
.staff-table-scroll td:nth-child(3) { min-width:100px; }
.staff-table-scroll input[type="number"] { width:110px; padding:8px; border:1px solid #dce1e8; border-radius:6px; }
.staff-batch-scroll { max-height:48vh; overflow-y:auto; }
.staff-batch-scroll th { position:sticky; top:0; background:#f8fafc; z-index:1; }
.staff-discount-controls { display:flex; gap:16px; align-items:flex-end; flex-wrap:wrap; margin:16px 0; }
.staff-discount-controls label { display:flex; flex-direction:column; gap:8px; }
.staff-discount-controls input { width:140px; padding:8px; border:1px solid #dce1e8; border-radius:6px; }
.admin-task {position:fixed;right:24px;bottom:24px;z-index:3000;background:#fff;color:#244d9f;padding:16px 22px;border:1px solid #dce7ff;border-radius:12px;box-shadow:0 6px 30px #18304d26;}
.supplier-form {gap:18px;padding:8px 0;}
.supplier-enabled {display:flex!important;align-items:center;gap:10px;margin:0!important;}
.supplier-enabled input {width:auto!important;margin:0!important;}
.product-editor-modal .modal-card {width:min(1320px,96vw);max-width:1320px;}
.product-editor-modal #modalBody {display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:24px;align-items:start;}
.product-live-preview {position:sticky;top:0;background:#f5f7fa;padding:12px;border-radius:12px;max-height:70vh;overflow:auto;}
.preview-phone {background:#fff;border-radius:18px;overflow:hidden;border:1px solid #e0e5ed;}
.preview-hero,.preview-detail {display:block;width:100%;}
.preview-hero {aspect-ratio:1;object-fit:contain;}
.preview-empty {padding:70px 15px;text-align:center;color:#88919f;}
.preview-info {padding:14px;overflow-wrap:anywhere;}
.preview-price {color:#f04444;font-size:24px;}
.preview-specs {display:flex;gap:8px;flex-wrap:wrap;}
.preview-specs>div {display:flex;gap:8px;align-items:center;padding:6px;background:#f6f7fa;border-radius:6px;}
.preview-specs img {width:44px;height:44px;object-fit:contain;}
.preview-specs.grid>div {flex-direction:column;width:88px;}
.preview-specs.grid img {width:76px;height:76px;}
.preview-recommends {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.preview-recommends img {width:100%;aspect-ratio:1;object-fit:contain;}
.preview-buy {padding:14px;background:#fff1ee;text-align:center;color:#e84934;}
.spec-value-editor {display:flex;flex-wrap:wrap;gap:12px;}
.spec-value-editor>div {display:flex;flex-direction:column;gap:8px;width:180px;border:1px solid #e0e5ed;border-radius:8px;padding:10px;}
.spec-value-editor input {max-width:100%;}
.recommend-library input {min-width:0;}
.rec-selection {display:inline-block;background:#eef4ff;border-radius:8px;padding:5px 8px;margin:4px;}
@media(max-width:900px){.product-editor-modal #modalBody{grid-template-columns:1fr;}.product-live-preview{position:static;max-width:380px;}}
.ha-editor{display:grid;grid-template-columns:minmax(0,1fr) 415px;gap:20px;align-items:start;}
.ha-preview{position:sticky;top:16px;max-height:calc(100vh - 110px);overflow:auto;}
.ha-phone{width:375px;max-width:100%;border:1px solid #e3e7ef;border-radius:16px;overflow:hidden;background:#fff;}
.ha-phone-header{padding:18px;text-align:center;font-weight:600;}
.ha-preview-existing{margin:10px 12px;padding:20px;background:#f3f6fb;color:#8692a6;text-align:center;font-size:12px;}
.ha-preview-layout{box-sizing:border-box;margin:10px 0;}
.ha-preview-card{position:relative;background:#eef2f7;overflow:hidden;display:flex;align-items:center;justify-content:center;color:#8993a0;font-size:12px;}
.ha-preview-card img{width:100%;height:100%;object-fit:cover;}
.ha-preview-card strong{position:absolute;bottom:0;left:0;right:0;padding:8px;color:white;background:linear-gradient(transparent,#0009);font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ha-card-fields{padding:16px;background:#f8fafc;border:1px solid #e5eaf1;border-radius:10px;display:grid;gap:12px;}
@media(max-width:1000px){.ha-editor{grid-template-columns:1fr}.ha-preview{position:static;width:415px;max-width:100%;}}
/* Live home preview: dimensions mirror the 375px mini-program viewport. */
.ha-phone{font-family:Arial,sans-serif;background:#f5f7fb;}
.ha-live-body{padding:0 12px 20px;}
.ha-live-search{border-radius:18px;background:#fff;color:#747474;height:32px;display:flex;align-items:center;padding:0 16px;font-size:14px;}
.ha-live-banner{position:relative;margin-top:10px;border-radius:10px;overflow:hidden;}
.ha-live-banner>img,.ha-floor-banner{display:block;width:100%;height:auto;}
.ha-banner-mask{position:absolute;bottom:0;left:0;right:0;padding:18px 14px;background:linear-gradient(transparent,#0007);color:#fff;}
.ha-banner-mask strong{display:block;font-size:20px;}.ha-banner-mask small{display:block;margin-top:4px;font-size:12px;}
.ha-banner-dots{position:absolute;bottom:4px;left:0;right:0;display:flex;justify-content:center;gap:5px;}
.ha-banner-dots button{border:0;border-radius:50%;width:6px;height:6px;padding:0;background:#ffffff8c;cursor:pointer;}.ha-banner-dots .active{background:#2f6bff;}
.ha-live-menus{display:flex;flex-wrap:wrap;margin-top:12px;border-radius:10px;background:#fff;padding:12px 4px 4px;}
.ha-live-menus>div{width:20%;display:flex;align-items:center;flex-direction:column;margin-bottom:12px;}.ha-live-menus img{width:48px;height:48px;object-fit:cover;border-radius:50%;background:#f3f6fb;}.ha-live-menus span{font-size:11px;margin-top:6px;text-align:center;}
.ha-live-floor{margin-top:12px;overflow:hidden;border-radius:10px;background:#fff;}
.ha-live-floor h4{display:flex;justify-content:space-between;margin:0;padding:14px 12px 10px;font-size:16px;}.ha-live-floor h4 small{font-size:11px;color:#888;font-weight:400;}
.ha-floor-tabs{display:flex;overflow-x:auto;white-space:nowrap;padding:10px 8px;gap:16px;}.ha-floor-tabs button{border:0;background:none;cursor:pointer;color:#777;font-size:14px;padding:4px 0;}.ha-floor-tabs .active{color:#2f6bff;border-bottom:2px solid #2f6bff;}
.ha-live-products{display:grid;gap:8px;padding:8px;}.ha-live-products article{min-width:0;overflow:hidden;border-radius:8px;background:#fff;}.ha-goods-image{position:relative;aspect-ratio:1;}.ha-goods-image>img{width:100%;height:100%;object-fit:cover;}.ha-goods-image>img.ha-goods-badge{position:absolute;top:0;left:0;width:38px;height:38px;object-fit:contain;}.ha-goods-image>span{position:absolute;top:4px;left:4px;background:#2f6bff;color:#fff;font-size:10px;padding:2px 4px;}
.ha-goods-body{padding:8px;}.ha-goods-title{font-size:14px;line-height:20px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:40px;}.ha-goods-tags{display:flex;gap:4px;flex-wrap:wrap;margin:4px 0;}.ha-goods-tags span{border:1px solid #ff6030;border-radius:4px;color:#ff6030;font-size:10px;padding:1px 3px;}.ha-goods-price{color:#2f6bff;font-size:18px;font-weight:600;display:flex;align-items:center;flex-wrap:wrap;gap:4px;}.ha-goods-price small{font-size:10px;}.ha-goods-price b{margin-left:auto;font-size:22px;font-weight:400;}
.ha-live-bottom{display:flex;background:white;border-top:1px solid #eee;padding:8px 0;}.ha-live-bottom>div{width:20%;text-align:center;font-size:10px;color:#555;}.ha-live-bottom span{display:block;font-size:22px;margin-bottom:3px;}.ha-live-bottom .active{color:#2f6bff;}
/* Top-level business modules with contextual sidebar. */
.app{display:grid;grid-template-columns:220px minmax(0,1fr);grid-template-rows:60px minmax(0,1fr);align-items:start;}
.business-header{grid-column:1/-1;position:sticky;top:0;z-index:30;height:60px;background:#20242b;color:#fff;display:flex;align-items:center;gap:24px;padding:0 20px;box-shadow:0 1px 4px #0002;}
.business-brand{display:flex;align-items:center;gap:10px;flex-shrink:0;font-size:14px;min-width:180px;}.business-logo{background:#fff;color:#2f6bff;border-radius:5px;padding:8px 4px;font-size:12px;font-weight:700;}
.module-tabs{display:flex;align-self:stretch;gap:4px;flex:1;min-width:0;overflow-x:auto;}.module-tab{border:0;background:none;color:#bcc3cf;font-size:14px;padding:0 16px;cursor:pointer;white-space:nowrap;position:relative;}.module-tab:hover{background:#ffffff0b;color:#fff;}.module-tab.active{color:#fff;font-weight:600;}.module-tab.active:after{content:'';position:absolute;bottom:0;height:3px;background:#467bff;left:14px;right:14px;border-radius:3px;}.module-tab:focus-visible,.nav-item:focus-visible{outline:2px solid #6c95ff;outline-offset:-2px;}
.business-account{display:flex;gap:16px;align-items:center;flex-shrink:0;}.business-account .admin-name{color:#e2e6ee;}.business-account .btn{font-size:12px;padding:6px 10px;}
.app .sidebar{grid-column:1;grid-row:2;width:220px;height:calc(100vh - 60px);max-height:none;top:60px;background:white;color:#1f2a37;padding:16px 12px;border-right:1px solid #e6eaf1;}.sidebar .brand{padding:4px 12px 16px;font-size:16px;border-bottom:1px solid #edf0f5;margin-bottom:12px;}#legacySidebar{display:none;}.sidebar #moduleSidebar{min-height:0;}.sidebar .nav-group[hidden]{display:none;}.sidebar .nav-group{margin-bottom:16px;}.sidebar .nav-group-title{color:#596579;font-size:13px;letter-spacing:0;padding:10px 12px;display:flex;align-items:center;justify-content:space-between;}.sidebar .nav-group-title:after{content:'⌃';color:#a2adbb;}.sidebar .nav-group.collapsed .nav-group-title:after{content:'⌄';}.sidebar .nav-item{color:#758195;font-size:13px;padding:10px 16px 10px 22px;border-radius:6px;}.sidebar .nav-item:hover{background:#f5f7fb;color:#2f6bff;}.sidebar .nav-item.active{background:#edf3ff;color:#2f6bff;font-weight:600;}
.app .main{grid-column:2;grid-row:2;min-width:0;width:100%;}.module-breadcrumb{color:#8a95a5;font-size:12px;}.app .topbar{height:60px;padding:0 24px;}.app .topbar h2{font-size:16px;}.app .content{padding:20px 24px 40px;}
@media(max-width:1000px){.business-header{gap:10px;padding:0 12px;}.business-brand{min-width:0;}.business-brand>span:last-child{display:none;}.module-tab{padding:0 12px;}.business-account{gap:8px;}.business-account .admin-name{max-width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}}
@media(max-width:680px){.app{grid-template-columns:160px minmax(0,1fr);}.app .sidebar{width:160px;padding:12px 6px;}.business-header{gap:6px;}.business-account .admin-name{display:none;}.business-account .btn{padding:5px;}.module-tab{padding:0 10px;}.app .content{padding:12px;}.app .topbar{padding:0 12px;}.module-breadcrumb{display:none;}.sidebar .nav-item{padding-left:14px;}}
.crm-check{display:inline-flex;align-items:center;gap:6px;margin:6px 12px 6px 0;font-size:13px;}.crm-check input{width:auto!important;margin:0;}
.crm-customer{display:flex;align-items:center;gap:10px;min-width:180px;margin:8px 0;}.crm-customer small{color:#8a95a5;}.crm-customer .thumb{flex-shrink:0;}.crm-tag-tree section{padding:12px;border:1px solid #e8edf5;margin:8px 0;border-radius:8px;}.crm-tag-tree strong{display:block;}
.crm-visibility{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:16px;}.crm-filter-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:16px;}.crm-filter-grid label{display:flex;gap:10px;align-items:center;font-size:13px;}.crm-filter-grid input,.crm-filter-grid select{min-width:0;flex:1;padding:9px;border:1px solid #dfe5ee;border-radius:6px;}
.crm-marketing-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;}.crm-marketing-tile{padding:20px;text-align:left;border:1px solid #e4eaf3;border-radius:8px;background:#fff;cursor:pointer;display:grid;grid-template-columns:48px 1fr;gap:8px;}.crm-marketing-tile:hover{border-color:#2f6bff;background:#f8faff;}.crm-marketing-tile span{grid-row:1/3;font-size:30px;}.crm-marketing-tile small{color:#8792a5;}.crm-tier{padding:16px;border:1px solid #e4eaf3;background:#f8fafc;border-radius:8px;margin-top:12px;}.crm-review-images{display:flex;gap:6px;flex-wrap:wrap;}.crm-review-images img{width:64px;height:64px;object-fit:cover;border-radius:6px;}.crm-stars{color:#ff9b00;letter-spacing:4px;}
.table-scroll{overflow-x:auto;}.as-order-header{background:#f5f7fb;}.as-order-header td{padding:14px!important;}.as-order-header span{margin-left:12px;font-size:12px;}.as-header-actions{display:inline-flex;float:right;gap:8px;}.after-sale-table{min-width:1050px;}.after-sale-table td{vertical-align:top;}.after-sale-table tr:not(.as-order-header) td{padding:18px 10px;} .after-sale-table .btn{margin:4px 0;}
@media(max-width:1000px){.crm-filter-grid,.crm-marketing-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}@media(max-width:680px){.crm-filter-grid,.crm-marketing-grid{grid-template-columns:1fr;}}

.chat-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:10px 0}.chat-tools input{min-width:180px;flex:1}.chat-star{border:0;background:transparent;color:#e6a23c;font-size:21px;cursor:pointer}.chat-tools span{flex:1;white-space:pre-wrap}
.sp-list-top,.sp-toolbar,.sp-actions{display:flex;align-items:center;gap:10px;justify-content:space-between}.sp-toolbar{background:#fff;padding:12px;margin-bottom:12px}.sp-toolbar input{width:210px}.sp-toolbar span{flex:1;color:#8691a6}.sp-editor{display:grid;grid-template-columns:240px minmax(380px,1fr) 350px;min-height:750px;background:#eef0f5}.sp-library,.sp-properties{padding:18px;background:#fff;max-height:calc(100vh - 170px);overflow:auto}.sp-components{display:grid;grid-template-columns:1fr 1fr;gap:10px}.sp-components button{border:1px solid #e6eaf1;background:#fafbfe;border-radius:8px;padding:14px 5px;color:#334155;cursor:pointer}.sp-components span{display:block;font-size:30px;color:#3979ff;margin-bottom:8px}.sp-canvas{padding:25px 15px;max-height:calc(100vh - 170px);overflow:auto}.sp-phone{width:375px;margin:auto;background:#fff;box-shadow:0 5px 24px #21314e12}.sp-phone-head{text-align:center;padding:15px;font-weight:600}.sp-block{position:relative;min-height:35px;border:2px solid transparent;cursor:pointer;background:#fff}.sp-block.selected{border-color:#3979ff}.sp-block>small{display:none;position:absolute;top:0;left:0;background:#3979ff;color:#fff;padding:2px 6px;z-index:1}.sp-block.selected>small{display:block}.sp-block h3,.sp-block h4{margin:8px 0}.sp-empty{padding:30px 12px;background:#f3f6fb;color:#8893a6;text-align:center}.sp-properties label,.sp-library label{display:block;margin:12px 0;color:#475569}.sp-properties input:not([type=checkbox]),.sp-properties select,.sp-properties textarea,.sp-library input{width:100%;box-sizing:border-box}.sp-style{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}.sp-actions{flex-wrap:wrap;justify-content:flex-start}.sp-image-edit{background:#f4f6fa;border-radius:8px;padding:12px;margin:14px 0}.sp-image-edit>img{width:100%;max-height:150px;object-fit:contain}.sp-goods,.sp-icons{display:grid;gap:8px}.sp-goods article{overflow:hidden;border-radius:8px;font-size:12px}.sp-goods article>img{width:100%;aspect-ratio:1;object-fit:cover}.sp-goods strong{display:block;color:#ee5b40;padding:8px 0}.sp-icons{text-align:center;font-size:11px}.sp-icons img{display:block;width:42px;height:42px;object-fit:cover;border-radius:50%;margin:0 auto 5px}.sp-search{background:#f3f5f8;border-radius:25px;color:#99a2b2;padding:12px}.sp-dots{display:flex;justify-content:center;gap:5px;padding:6px}.sp-dots i{width:5px;height:5px;background:#3b82f6;border-radius:50%}.sp-product-row{display:flex!important;align-items:center;gap:8px;margin:7px 0}.sp-product-row img{width:45px;height:45px;object-fit:cover}.sp-product-row span{flex:1}.sp-product-row input{width:auto!important}.sp-properties select[multiple]{min-height:100px}@media(max-width:1150px){.sp-editor{grid-template-columns:180px minmax(375px,1fr) 280px}.sp-library,.sp-properties{padding:12px}}
.sp-editor input:not([type=checkbox]):not([type=file]):not([type=color]),.sp-editor select,.sp-editor textarea,.sp-toolbar input,#spFilter{border:1px solid #dce2ec;border-radius:6px;min-height:36px;padding:7px 10px;background:#fff;color:#334155;font:inherit}.sp-editor input[type=color]{height:36px;border:1px solid #dce2ec}.sp-editor textarea{min-height:120px}.sp-editor input:focus,.sp-editor select:focus,.sp-toolbar input:focus,#spFilter:focus{outline:1px solid #3979ff}#spFilter{width:300px;margin:12px 0}
/* Decoration library and product layout variants */
.sp-components button[hidden]{display:none}.sp-components button small{display:block;color:#8993a6;font-size:11px}.sp-mini{position:relative;display:flex!important;gap:4px;background:linear-gradient(135deg,#eef2ff,#e0f2fe);height:54px!important;padding:8px;align-items:center;border-radius:5px}.sp-mini i{height:34px;background:#fff;box-shadow:0 2px 4px #bbc7d8;width:33%;border-radius:3px}.sp-mini-list,.sp-mini-accordion,.sp-mini-sidebar{flex-direction:column}.sp-mini-list i,.sp-mini-accordion i,.sp-mini-sidebar i{height:10px;width:100%}.sp-mini-carousel i,.sp-mini-cards i,.sp-mini-center i{transform:rotate(-7deg)}.sp-mini-waterfall i:nth-child(2){height:44px}.sp-mini-video{background:#29354b;color:white}.sp-mini-video:after{content:'▶';position:absolute;margin-left:36px}.sp-mini-text i,.sp-mini-title i,.sp-mini-notice i{height:5px}.sp-entry-grid{display:grid;gap:8px}.sp-entry-grid>div{padding:12px;border:1px solid #dce3ee;text-align:center;border-radius:8px}.sp-entry-grid img{width:32px;height:32px;display:block;margin:auto}.sp-notice{display:flex;background:#fff7ed;padding:10px;gap:8px}.sp-countdown{background:#172f55;color:white;padding:12px;border-radius:8px;text-align:center}.sp-floor-banner{width:100%;border-radius:8px}.sp-goods.sp-mode-list{display:flex;flex-direction:column}.sp-mode-list article{display:grid;grid-template-columns:90px 1fr}.sp-mode-list article img{grid-row:span 2;height:90px}.sp-goods.sp-mode-horizontal{display:flex;overflow:auto}.sp-mode-horizontal article{min-width:140px;max-width:140px}.sp-mode-waterfall{align-items:start}.sp-mode-waterfall article:nth-child(3n) img{height:200px}.sp-mode-cards article{margin:8px 25px;box-shadow:0 5px 20px #ccd4e0}.sp-mode-background{background:#edf1f6;padding:14px}.sp-goods.sp-mode-split{grid-template-columns:1fr!important;max-height:300px;overflow:auto}.sp-mode-split article{display:flex}.sp-mode-split article img{width:90px;height:90px}.sp-group-tabs{display:flex;gap:12px;padding:10px;overflow:auto;color:#2563eb;white-space:nowrap}.sp-goods.sp-mode-groups{margin-bottom:15px}
.sp-image-horizontal{display:flex;overflow:auto}.sp-carousel-center{padding:0 22px}.sp-carousel-cards{padding:6px 22px}.sp-carousel-cards img{box-shadow:0 4px 16px #bbc7d8;transform:scale(.94)}.sp-carousel-zoom{padding:6px 22px;transform:scale(.92)}.sp-mode-waterfall article{margin-bottom:8px}
.sp-goods-waterfall article{background:white;border-radius:8px;overflow:hidden;margin-bottom:8px}.sp-goods-waterfall article img{width:100%;display:block}.sp-goods-waterfall article div{padding:6px;font-size:12px}.sp-goods-waterfall article strong{display:block;color:#f0523e;padding:6px}
/* Shipping form inputs need room for long carrier and tracking identifiers. */
#shipCompany,#shipNumber,#shipPhone,#shipWechatCompany{width:100%;min-height:42px;font-size:15px;margin-bottom:14px}
#spLibrary [hidden]{display:none!important}

#spCanvas{display:flex;flex-wrap:wrap;align-items:flex-start}.sp-category-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}.carrier-row{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:center;margin-bottom:10px}.carrier-row input:not([type=checkbox]){min-width:0;width:100%}.customer-notes article{background:#f5f7fb;padding:12px 16px;margin:10px 0;border-radius:10px}.customer-notes p{white-space:pre-wrap}.chat-panel{min-height:70vh}.chat-messages{min-height:440px}.chat-composer input[type=text],#chatText{min-height:44px}.btn{min-height:36px;padding:8px 14px}.sp-toolbar{flex-wrap:wrap}.sp-block img{max-width:100%}

.order-more{margin-top:8px}.order-more summary{cursor:pointer;color:#3979ff;padding:8px 0}.order-more .btn{margin:5px 5px 0 0}.chat-tools .btn{border-radius:8px}.chat-layout{grid-template-columns:300px minmax(0,1fr)}@media(max-width:800px){.chat-layout{grid-template-columns:1fr}}

/* Personal center modules in the decoration canvas mirror the native page. */
.sp-member-banner{min-height:180px;padding:30px 16px;background-size:cover;background-position:center;color:#fff;background-color:#45618a;box-shadow:inset 0 0 0 300px #14285055}
.sp-member-banner h3{margin-top:40px}.sp-member-profile{display:flex;align-items:center;gap:10px;margin:-24px 12px 12px;position:relative;padding:16px;background:#fff;border-radius:12px;box-shadow:0 4px 12px #2f6bff15}.sp-member-profile p{font-size:12px;color:#1677ff}.sp-member-profile>span:last-child{margin-left:auto;font-size:12px;color:#1677ff}.sp-member-avatar{display:grid;place-items:center;background:#eaf1ff;border-radius:50%;width:48px;height:48px;font-size:12px}.sp-member-orders,.sp-member-menu{margin:12px;padding:14px;background:#fff;border-radius:12px}.sp-member-orders h3{margin:0 0 20px}.sp-member-orders small{float:right;color:#999;font-size:12px}.sp-member-orders>div{font-size:12px;color:#666}.sp-member-menu>div{padding:16px 0;border-bottom:1px solid #f5f5f5}.sp-member-menu span{float:right;color:#999}
/* Customer-service card selector: separated orders and product catalog. */
.cc-overlay{position:fixed;inset:0;z-index:12000;background:#13233d66;backdrop-filter:blur(5px);display:grid;place-items:center;padding:24px}.cc-dialog{width:min(1080px,96vw);height:min(780px,91vh);display:flex;flex-direction:column;background:#fff;border-radius:22px;box-shadow:0 24px 90px #15294340;overflow:hidden;color:#24324a}.cc-header{display:flex;justify-content:space-between;align-items:flex-start;padding:24px 28px 18px;border-bottom:1px solid #edf0f6}.cc-eyebrow{font-size:10px;font-weight:700;letter-spacing:2px;color:#637dea}.cc-header h2{font-size:24px;margin:5px 0 7px;letter-spacing:-.5px}.cc-header p{font-size:13px;color:#8a94a6;margin:0}.cc-close{border:0;background:#f4f6fa;border-radius:50%;width:34px;height:34px;font-size:23px;color:#758199;cursor:pointer}.cc-toolbar{display:flex;align-items:center;gap:16px;padding:16px 28px}.cc-search{display:flex;align-items:center;gap:10px;padding:0 14px;background:#f5f7fb;border:1px solid #e5eaf3;border-radius:12px;flex:1}.cc-search>span{font-size:25px;color:#7888ab}.cc-search input{width:100%;min-width:0;background:none;border:0;outline:0;padding:12px 0;font:inherit;font-size:14px;color:#26354d}.cc-clear{background:none;border:0;color:#8490a3;cursor:pointer}.cc-count{font-size:12px;color:#8a94a6;white-space:nowrap}.cc-content{display:grid;grid-template-columns:minmax(0,1fr) 335px;flex:1;min-height:0;border-top:1px solid #edf0f6}.cc-results{display:flex;flex-direction:column;min-width:0;min-height:0;background:#f7f9fc}.cc-list{flex:1;overflow:auto;padding:18px;min-height:0}.cc-order-list{display:flex;flex-direction:column;gap:12px}.cc-product-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-content:start}.cc-order-card,.cc-product-card{font:inherit;text-align:left;background:#fff;border:1px solid #e5eaf2;border-radius:14px;cursor:pointer;color:inherit;padding:16px;transition:box-shadow .15s,border-color .15s}.cc-order-card:hover,.cc-product-card:hover{border-color:#afbbf5;box-shadow:0 5px 20px #344a7a0a}.cc-order-card.selected,.cc-product-card.selected{border-color:#526fe7;box-shadow:0 0 0 2px #526fe724}.cc-order-top,.cc-order-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px}.cc-order-top>strong{font-size:13px}.cc-pill{display:inline-block;font-size:11px;font-weight:500;color:#5470d7;background:#edf1ff;border-radius:6px;padding:5px 8px;white-space:nowrap}.cc-pill.muted{color:#9c6a28;background:#fff7e7}.cc-order-preview{display:flex;align-items:center;gap:12px;margin:15px 0}.cc-thumb{width:58px;height:58px;flex-shrink:0;background:#f3f6fa;border-radius:10px;overflow:hidden;display:grid;place-items:center}.cc-thumb img{width:100%;height:100%;object-fit:contain}.cc-thumb-empty{font-size:10px;color:#9ca8b8;text-align:center}.cc-order-preview>div:last-child{min-width:0;flex:1}.cc-order-preview h4{margin:0 0 7px;font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cc-order-preview p{margin:0;font-size:11px;color:#919aaa}.cc-order-bottom{padding-top:12px;border-top:1px solid #f0f3f8}.cc-order-bottom>span{font-size:12px;color:#7a89aa}.cc-order-bottom strong,.cc-product-card strong{color:#df6a4c;font-size:16px;font-weight:600}.cc-product-thumb{aspect-ratio:1;background:#f7f9fc;border-radius:10px;display:grid;place-items:center;overflow:hidden}.cc-product-thumb img{width:100%;height:100%;object-fit:contain}.cc-product-card h4{font-size:13px;font-weight:500;line-height:1.6;height:42px;overflow:hidden;margin:12px 0}.cc-product-card>div:last-child{display:flex;justify-content:space-between;align-items:center;gap:6px}.cc-product-card small{font-size:10px;color:#9aa4b5}.cc-detail{padding:24px;overflow:auto;border-left:1px solid #e9edf5;min-width:0}.cc-detail h3{font-size:16px;line-height:1.7;overflow-wrap:anywhere;margin:14px 0 8px}.cc-placeholder,.cc-empty{text-align:center;align-self:center;padding:50px 20px;color:#8c99ae}.cc-placeholder>span,.cc-empty>span{display:block;font-size:38px;color:#bcc8de;margin:0 0 15px}.cc-placeholder h3,.cc-empty h3{font-size:15px;color:#687891;font-weight:500}.cc-placeholder p,.cc-empty p{font-size:12px;line-height:1.8}.cc-empty{grid-column:1/-1}.cc-order-items{border-top:1px solid #eef1f6;border-bottom:1px solid #eef1f6;margin-top:16px;padding:8px 0}.cc-order-item{display:flex;align-items:center;gap:12px;padding:10px 0}.cc-order-item>div:last-child{flex:1;min-width:0}.cc-order-item strong{font-size:12px;line-height:1.6;font-weight:500}.cc-order-item span,.cc-order-item small{display:block;font-size:11px;color:#8c98aa;margin-top:5px}.cc-order-total{display:flex;justify-content:space-between;padding:18px 0;font-size:13px}.cc-order-total strong,.cc-price{font-size:20px;color:#df6a4c}.cc-detail dl{font-size:12px;margin:10px 0}.cc-detail dt{color:#95a1b4;margin-top:14px}.cc-detail dd{margin:5px 0 0;color:#53637a;line-height:1.7;word-break:break-word}.cc-muted{font-size:11px;color:#9aa4b5}.cc-detail-heading{display:flex;flex-wrap:wrap;gap:5px}.cc-product-hero{height:210px;background:#f7f9fc;border-radius:14px;display:grid;place-items:center;margin-bottom:20px}.cc-product-hero img{height:100%;width:100%;object-fit:contain}.cc-shipment{background:#f7f9fc;border-radius:10px;padding:12px;font-size:11px;margin-top:12px}.cc-shipment p{word-break:break-all;color:#7b89a1}.cc-pagination{display:flex;justify-content:center;align-items:center;gap:18px;border-top:1px solid #e9edf5;padding:13px;background:#fff;font-size:12px;color:#919caf}.cc-pagination button{border:1px solid #e5eaf2;border-radius:8px;background:#fff;padding:7px 12px;color:#63738d;cursor:pointer}.cc-pagination button:disabled{opacity:.4;cursor:default}.cc-footer{padding:17px 28px;display:flex;justify-content:space-between;align-items:center;gap:16px;border-top:1px solid #e9edf5;box-shadow:0 -4px 14px #263d6c04}.cc-footer>span{font-size:12px;color:#8b96a8;max-width:55%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.cc-footer>div{display:flex;gap:10px}.cc-footer .btn{border-radius:10px;padding:10px 20px}.cc-footer .primary{background:#526fe7;border-color:#526fe7}.cc-footer button:disabled{opacity:.4;cursor:default}.cc-error{padding:10px 28px;background:#fff1ee;color:#b9493e;font-size:12px}.cc-loading{text-align:center;padding:45px 12px;color:#919eb3;font-size:13px}.chat-composer{flex-wrap:wrap;background:#fff;border-radius:0 0 16px 16px;gap:10px}.chat-composer .btn{border-radius:9px}.chat-order-action{color:#4767cf;background:#edf2ff;border-color:#dce5fc}.chat-product-action{color:#298d80;background:#eaf8f4;border-color:#d6eee6}.chat-composer #chatText{border:1px solid #e5eaf2;border-radius:10px;background:#f8fafc;padding:12px;min-width:180px}.chat-panel{border-radius:16px;min-width:0}.chat-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px}.chat-panel-head .btn{font-size:12px;color:#74839c;border-color:#e6ebf3;border-radius:9px}.chat-bubble{border-radius:14px;padding:12px 15px;box-shadow:none}.chat-user.active{background:#eff3ff;box-shadow:inset 3px 0 #6380ee}
@media(max-width:760px){.cc-overlay{padding:10px}.cc-dialog{width:100%;height:94vh;border-radius:16px}.cc-header{padding:18px}.cc-header h2{font-size:20px}.cc-toolbar{padding:12px 18px}.cc-content{grid-template-columns:minmax(0,1fr) 40%}.cc-detail{padding:14px}.cc-list{padding:10px}.cc-order-top{flex-wrap:wrap}.cc-order-card,.cc-product-card{padding:10px}.cc-product-list{grid-template-columns:1fr}.cc-footer{padding:12px 18px}.cc-footer .btn{padding:8px 12px}.cc-count{display:none}}
.chat-layout{height:calc(100vh - 290px);min-height:440px}.chat-layout .chat-panel{min-height:0;overflow:hidden}.chat-layout .chat-messages{min-height:0}.chat-layout .chat-users{min-height:0;max-height:none}.chat-layout #chatQuickUse{padding:10px 14px;gap:8px}.chat-layout #chatQuickUse .btn{border-radius:8px;font-size:12px;color:#74839a;border-color:#e7ecf4;background:#f8fafc}
@media(max-width:800px){.chat-layout{height:auto;min-height:0}.chat-layout .chat-users{max-height:180px}.chat-layout .chat-panel{height:65vh;min-height:400px}}
.chat-tools input:not([type=file]),.chat-tools select{min-height:40px;border:1px solid #e4eaf3;border-radius:10px;background:#f8fafc;padding:9px 12px;font:inherit;font-size:13px;color:#64748b;outline:none}.chat-tools input:focus,.chat-tools select:focus{border-color:#9caef1;box-shadow:0 0 0 3px #637ce712}.chat-tools #chatSearch{flex:1;min-width:160px;background:#f8fafc}.chat-tools select{min-width:120px}.chat-tools #chatStatusSave{border-radius:10px;font-size:13px;color:#52699b}
.chat-bubble.has-card,.chat-bubble-row.mine .chat-bubble.has-card{padding:0;background:#fff;color:#26354b;border:1px solid #e7ebf2;overflow:hidden;width:310px;max-width:100%;border-radius:14px}.chat-message-card{width:100%}.chat-card-heading{display:flex;justify-content:space-between;padding:14px 16px 8px;font-size:11px;color:#7c8da7}.chat-card-heading span:last-child{color:#6980d1}.chat-card-body{display:flex;align-items:center;gap:12px;padding:8px 16px 16px}.chat-card-body img,.chat-card-placeholder{width:82px;height:82px;object-fit:contain;border-radius:9px;background:#f4f6fa;flex-shrink:0}.chat-card-placeholder{display:grid;place-items:center;font-size:11px;color:#9aa6b7}.chat-card-body>div:last-child{flex:1;min-width:0}.chat-card-body strong{font-size:13px;font-weight:500;line-height:1.6;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.chat-card-body small{display:block;color:#98a3b4;font-size:10px;margin-top:4px}.chat-card-body b{display:block;color:#df6c4d;font-size:17px;margin-top:9px;font-weight:600}.chat-card-number{font-size:10px;color:#a0aabc;padding:0 16px 12px;word-break:break-all}.chat-card-footer{border-top:1px solid #edf1f6;padding:11px 16px;font-size:11px;color:#8c9ab0;display:flex;justify-content:space-between}.has-card>.chat-time{padding:0 16px 10px;color:#8c9ab0;font-size:10px}

/* Store account editor: searchable registered-user picker and account switch. */
.sw-account-form{gap:18px}.sw-user-field{position:relative;min-width:0}.sw-user-field>label{display:block;color:#667085;font-size:13px;margin-bottom:4px}.sw-user-input{display:flex;border:1px solid #dce2ed;border-radius:10px;background:#fff;align-items:center;overflow:hidden}.sw-user-input:focus-within{border-color:#426bff;box-shadow:0 0 0 3px #426bff12}.sw-user-input input{flex:1;min-width:0;border:0!important;box-shadow:none!important;background:transparent}.sw-user-input button{border:0;background:transparent;color:#7b8497;cursor:pointer;width:34px;height:38px;font-size:20px;flex:none}.sw-user-input button:hover{color:#3264ff;background:#f2f5ff}.sw-user-panel{margin-top:6px;border:1px solid #e3e8f0;border-radius:12px;background:#fff;box-shadow:0 10px 30px #23365312;overflow:hidden}.sw-user-panel[hidden],.sw-user-more[hidden]{display:none}.sw-user-summary{padding:10px 12px;background:#f7f9fc;font-size:12px;color:#7a8598}#swUserResults{max-height:235px;overflow:auto}.sw-user-option{display:flex;width:100%;align-items:center;gap:10px;padding:11px 12px;text-align:left;background:#fff;border:0;border-bottom:1px solid #f0f3f8;cursor:pointer}.sw-user-option:hover,.sw-user-option.is-active{background:#f0f5ff}.sw-user-option[aria-selected="true"]{background:#eef4ff}.sw-user-option:disabled{cursor:not-allowed;opacity:.58}.sw-user-avatar{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#edf2ff;color:#4469ca;flex:none}.sw-user-info{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1;overflow-wrap:anywhere}.sw-user-info strong{font-size:14px;color:#26364d}.sw-user-info small,.sw-user-linked{font-size:12px;color:#8792a3}.sw-user-check{color:#3b6dff}.sw-user-empty{text-align:center;padding:24px 12px;color:#8a94a6;font-size:13px;line-height:1.8}.sw-user-more{display:block;width:100%;padding:10px;background:#f8faff;color:#416bf4;border:0;cursor:pointer}.sw-field-help{display:block;font-size:12px;line-height:1.6;color:#8a94a6;margin-top:7px}.sw-enabled-row{display:flex;justify-content:space-between;align-items:center;border:1px solid #e5eaf3;border-radius:12px;padding:15px 16px;background:#f8faff;gap:18px}.sw-enabled-row strong{display:block;font-size:14px;color:#2d3b50}.sw-enabled-row small{display:block;margin-top:4px;color:#8a94a6;font-size:12px}.sw-account-switch{width:42px;height:24px;border:0;border-radius:99px;background:#cfd6e2;padding:3px;cursor:pointer;flex:none;transition:background .18s}.sw-account-switch span{display:block;width:18px;height:18px;background:#fff;border-radius:50%;box-shadow:0 1px 3px #0002;transition:transform .18s}.sw-account-switch[aria-checked="true"]{background:#3869ff}.sw-account-switch[aria-checked="true"] span{transform:translateX(18px)}.sw-account-switch:focus-visible{outline:3px solid #92adff;outline-offset:3px}
.sw-account-form{grid-template-columns:repeat(2,minmax(0,1fr))}.sw-account-form .sw-user-field{grid-column:1 / -1;order:2}.sw-account-form .sw-enabled-row{grid-column:1 / -1;order:3}@media(max-width:600px){.sw-account-form{grid-template-columns:minmax(0,1fr)}}

/* Enterprise settlement configuration. */
.sw-enterprise-form{display:grid;gap:18px;color:#27364c}.sw-enterprise-form [hidden]{display:none!important}.sw-enterprise-store{display:flex;align-items:center;gap:12px;padding-bottom:2px}.sw-enterprise-store-icon{display:grid;place-items:center;width:42px;height:42px;flex:none;background:#edf3ff;border-radius:12px;color:#3c69ec;font-size:18px;font-weight:600}.sw-enterprise-store strong{font-size:16px;display:block}.sw-enterprise-store small{display:block;font-size:12px;color:#8994a7;margin-top:3px}.sw-enterprise-section{padding:18px;border:1px solid #e7ebf2;border-radius:12px;background:#fff}.sw-enterprise-section h4{font-size:14px;margin:0 0 14px;color:#29384f}.sw-enterprise-section label{display:flex;flex-direction:column;gap:8px;font-size:13px;color:#6c788c}.sw-enterprise-section select{width:100%;height:40px;border:1px solid #dce2ed;border-radius:9px;padding:0 12px;color:#2b3c54;background:#fff}.sw-enterprise-amount{display:flex;align-items:center;border:1px solid #dce2ed;border-radius:9px;margin-top:8px;overflow:hidden;padding:0 12px;gap:10px}.sw-enterprise-amount:focus-within{border-color:#426bff;box-shadow:0 0 0 3px #426bff12}.sw-enterprise-amount span{color:#8b95a6;font-size:14px}.sw-enterprise-amount input{flex:1;width:100%;min-width:0;border:0!important;box-shadow:none!important;padding:10px 0!important;color:#243954;font-size:18px;font-weight:600;background:transparent}.sw-enterprise-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.sw-enterprise-summary{font-size:12px;color:#5773a9;border-radius:8px;background:#f4f7fd;padding:10px 12px;margin-top:14px;line-height:1.6}.sw-enterprise-note{border-radius:10px;background:#f5f8fc;border-left:3px solid #a6bce9;padding:12px 14px;font-size:12px;color:#7e8a9c;line-height:1.8}.sw-enterprise-note strong{font-size:13px;color:#5e6f87}.sw-enterprise-note p{margin:4px 0 0}@media(max-width:600px){.sw-enterprise-grid{grid-template-columns:1fr}.sw-enterprise-section{padding:14px}.sw-enterprise-form .sw-enabled-row{padding:12px}}
.sw-enterprise-form{gap:12px}.sw-enterprise-panels{display:grid;grid-template-columns:.9fr 1.1fr;gap:14px}.sw-enterprise-form .sw-enabled-row{padding:12px 14px}.sw-enterprise-store-icon{width:32px;height:32px;border-radius:9px;font-size:15px}.sw-enterprise-store strong{font-size:14px}.sw-enterprise-section{padding:14px}.sw-enterprise-section h4{margin-bottom:10px}.sw-enterprise-grid{gap:10px}.sw-enterprise-summary{margin-top:10px;padding:8px 10px}.sw-enterprise-note{padding:9px 12px}.sw-enterprise-note p{margin-top:2px}@media(max-width:600px){.sw-enterprise-panels{grid-template-columns:1fr}.sw-enterprise-grid{grid-template-columns:1fr 1fr}}

/* Read-only store-product approval preview. */
.sp-review{padding:8px 0 20px}.sp-review p{color:#77859a;line-height:1.8;font-size:13px}.sp-review h4{font-size:14px;border-top:1px solid #e8edf5;padding-top:18px;margin:18px 0 10px}.sp-review-images{display:flex;gap:10px;flex-wrap:wrap}.sp-review-images img{width:70px;height:70px;object-fit:contain;border:1px solid #e3e9f2;border-radius:8px}.sp-review-details img{display:block;max-width:100%;max-height:500px;object-fit:contain;margin:10px 0}.sp-review .sp-table-wrap{overflow:auto;border:1px solid #e4eaf3;border-radius:9px}.sp-review table{min-width:600px}.sp-review table img{width:45px;height:45px;object-fit:contain}.sp-review table small{display:block;color:#8a96a8;margin-top:5px}
