/* ==========================================================================
   启晟商城 - H5 全局样式
   ========================================================================== */

:root {
  --primary: #FF5722;
  --primary-dark: #E64A19;
  --primary-light: #FFE6DA;
  --secondary: #FF9800;
  --success: #4CAF50;
  --info: #2196F3;
  --warning: #FFC107;
  --danger: #F44336;
  --text: #333;
  --text-light: #666;
  --text-mute: #999;
  --bg: #F5F5F7;
  --bg-card: #FFFFFF;
  --border: #E8E8E8;
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.04);
  --shadow: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.10);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
input, textarea, select { font-family: inherit; outline: none; }

/* 通用 */
.app { min-height: 100vh; padding-bottom: 70px; padding-top: 50px; }
.page { padding: 12px; }
.text-primary { color: var(--primary); }
.text-mute { color: var(--text-mute); }
.text-light { color: var(--text-light); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.bold { font-weight: 600; }
.center { text-align: center; }

/* 顶部 NAV */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; height: 50px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff; line-height: 50px; font-size: 16px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(255,87,34,0.18);
  z-index: 100;
}
.navbar .nav-left, .navbar .nav-right {
  position: absolute; top: 0; bottom: 0;
  display: flex; align-items: center; padding: 0 14px;
  font-size: 18px; cursor: pointer;
}
.navbar .nav-left { left: 0; }
.navbar .nav-right { right: 0; }

/* 底部 TAB */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; height: calc(60px + var(--safe-bottom));
  background: #fff; display: flex; z-index: 100;
  border-top: 1px solid #f0f0f0;
  padding-bottom: var(--safe-bottom);
  backdrop-filter: saturate(180%) blur(12px);
}
.tabbar .tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-mute); font-size: 14px; font-weight: 500; padding-top: 6px;
  transition: color 0.15s;
}
.tabbar .tab .tab-icon {
  width: 26px; height: 26px; margin-bottom: 3px;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0.55; transition: all 0.2s;
}
.tabbar .tab .tab-icon svg { width: 100%; height: 100%; }
.tabbar .tab.active { color: var(--primary); }
.tabbar .tab.active .tab-icon { opacity: 1; transform: translateY(-1px) scale(1.08); }
.tabbar .tab .tab-icon { position: relative; }
.tabbar .tab .tab-badge {
  position: absolute; top: -6px; right: -10px;
  min-width: 18px; height: 18px; line-height: 18px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 600;
  border-radius: 9px; padding: 0 5px; text-align: center;
  box-shadow: 0 1px 3px rgba(244,67,54,0.35);
}

/* 通用按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 24px; border-radius: 22px;
  font-size: 14px; font-weight: 600; transition: all 0.2s;
  background: var(--primary); color: #fff;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-block { display: flex; width: 100%; }
.btn-lg { height: 50px; border-radius: 25px; font-size: 16px; }
.btn-sm { height: 32px; padding: 0 14px; border-radius: 16px; font-size: 12px; }
.btn-outline {
  background: transparent; color: var(--primary); border: 1px solid var(--primary);
}
.btn-ghost { background: #f5f5f5; color: var(--text); }
.btn-danger { background: var(--danger); }

/* 卡片 */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px;
  margin-bottom: 12px;
}
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.card-flex { display: flex; justify-content: space-between; align-items: center; }

/* 表单 */
.form-item {
  display: flex; align-items: center;
  padding: 12px;
  background: #fff;
  border-radius: var(--radius);
  margin-bottom: 10px;
}
.form-item label {
  width: 80px;
  color: var(--text-light);
  font-size: 14px;
}
.form-item input {
  flex: 1;
  border: none;
  font-size: 14px;
  padding: 8px 4px;
}
.form-item textarea {
  flex: 1;
  border: none;
  font-size: 14px;
  padding: 8px 4px;
  min-height: 60px;
  resize: vertical;
}
.form-block {
  background: #fff;
  border-radius: var(--radius);
  padding: 4px 14px;
  margin-bottom: 14px;
}

/* 商品网格 */
.goods-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.goods-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.goods-card .img {
  width: 100%; aspect-ratio: 1/1; background: #f0f0f0;
  object-fit: cover;
}
.goods-card .info { padding: 8px 10px; }
.goods-card .name {
  font-size: 13px; color: var(--text); margin-bottom: 6px;
  height: 36px; line-height: 18px;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.goods-card .price {
  color: var(--primary); font-size: 16px; font-weight: 700;
}
.goods-card .price .symbol { font-size: 12px; }
.goods-card .status-tag {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,0.6); color: #fff;
  padding: 3px 8px; border-radius: 11px;
  font-size: 11px;
}
.goods-card .status-wait { background: rgba(255,193,7,0.9); }
.goods-card .status-rush { background: var(--danger); animation: pulse 1.5s infinite; }
.goods-card .status-listing { background: linear-gradient(135deg, #FF9800, #F44336); font-weight: 600; }
.goods-card .status-newbie { background: linear-gradient(135deg, #9C27B0, #E91E63); font-weight: 700; animation: pulse 1.5s infinite; }

/* 多人抢单剩余单数徽章（首页商品卡片） */
.goods-card .slots-badge {
  position: absolute; top: 36px; right: 8px;
  background: linear-gradient(135deg, #FF5722, #FF9800);
  color: #fff; padding: 5px 11px; border-radius: 6px;
  font-size: 13px; font-weight: 700;
  box-shadow: 0 2px 8px rgba(255,87,34,0.4);
  z-index: 2;
}

/* 详情页多人抢单剩余单数大banner */
.detail-slots {
  background: linear-gradient(135deg, #FF5722, #FF9800);
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 700;
  margin: 10px 14px 0;
  text-align: center;
  box-shadow: 0 4px 14px rgba(255,87,34,0.35);
  letter-spacing: 1px;
}
.detail-slots b { font-size: 26px; vertical-align: -2px; margin: 0 4px; }
.detail-slots small { font-size: 12px; opacity: 0.9; margin-left: 6px; font-weight: 500; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

/* 倒计时浮窗 */
.countdown-bar {
  background: linear-gradient(135deg, #FFE0D0, #FFD0AA);
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.countdown-bar .row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 0;
}
.countdown-bar .row + .row { border-top: 1px dashed rgba(255,255,255,0.6); margin-top: 2px; padding-top: 6px; }
.countdown-bar .label { font-size: 13px; color: var(--text-light); }
.countdown-bar .timer { font-size: 18px; font-weight: 700; color: var(--primary); }
.countdown-bar .timer span { display: inline-block; min-width: 28px; text-align: center; }

/* 倒计时覆盖图 */
.goods-card .countdown-overlay {
  position: absolute; left: 0; bottom: 0; right: 0;
  background: rgba(0,0,0,0.55); color: #fff;
  padding: 6px 8px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px;
}
.goods-card .countdown-overlay .badge {
  background: var(--primary); padding: 2px 6px;
  border-radius: 8px; font-size: 11px;
}
.goods-card .countdown-overlay .timer {
  font-family: "Courier New", monospace; font-weight: 700;
}

/* 状态条 / 空状态 */
.empty {
  text-align: center; padding: 60px 20px;
  color: var(--text-mute); font-size: 13px;
}
.empty .icon { font-size: 48px; margin-bottom: 10px; opacity: 0.4; }

/* 加载 */
.spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.78); color: #fff;
  padding: 12px 20px; border-radius: var(--radius);
  font-size: 14px; z-index: 9999;
  animation: toast 0.25s ease;
  max-width: 240px; text-align: center;
}
@keyframes toast { from { opacity: 0; transform: translate(-50%, -40%); } }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 998; padding: 20px;
}
.modal {
  background: #fff; border-radius: var(--radius-lg);
  width: 100%; max-width: 360px; max-height: 80vh; overflow: auto;
  animation: pop 0.25s ease;
}
@keyframes pop { from { transform: scale(0.92); opacity: 0; } }
.modal .modal-header {
  padding: 14px; text-align: center; font-size: 16px; font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.modal .modal-body { padding: 14px; }
.modal .modal-footer {
  display: flex; border-top: 1px solid var(--border);
}
.modal .modal-footer button {
  flex: 1; height: 50px; font-size: 14px; font-weight: 600;
  background: transparent; color: var(--text);
}
.modal .modal-footer button.primary { color: var(--primary); }
.modal .modal-footer button + button { border-left: 1px solid var(--border); }

/* 标签 */
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; background: var(--primary-light); color: var(--primary);
}
.tag-warn { background: #FFF3E0; color: #EF6C00; }
.tag-success { background: #E8F5E9; color: #2E7D32; }
.tag-info { background: #E3F2FD; color: #1565C0; }
.tag-danger { background: #FFEBEE; color: #C62828; }

/* 详情页 */
.detail-img {
  width: 100%;
  background: #fff;
  margin-bottom: 12px;
}
.detail-img img { width: 100%; }
.detail-info { padding: 14px; }
.detail-price {
  color: var(--primary); font-size: 28px; font-weight: 700;
}
.detail-price .symbol { font-size: 16px; }
.detail-name { font-size: 18px; font-weight: 600; margin: 8px 0; }
.detail-meta { color: var(--text-light); font-size: 13px; }
.detail-section {
  padding: 14px;
  background: #fff;
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.detail-section .title { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.detail-actions {
  position: fixed; bottom: calc(56px + var(--safe-bottom)); left: 0; right: 0;
  display: flex; padding: 10px 12px;
  background: #fff; box-shadow: 0 -2px 12px rgba(0,0,0,0.05);
  z-index: 10;
  padding-bottom: calc(10px + var(--safe-bottom));
}
.detail-actions .btn { flex: 1; }
.detail-actions .btn + .btn { margin-left: 8px; }

/* 仓库 */
.warehouse-tabs {
  display: flex; gap: 24px;
  padding: 10px 14px; background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 50px; z-index: 5;
}
.warehouse-tabs .tab {
  padding: 4px 0; font-size: 16px; color: var(--text-light); cursor: pointer;
  border-bottom: 2px solid transparent; font-weight: 600;
}
.warehouse-tabs .tab.active {
  color: var(--primary); border-bottom-color: var(--primary);
}

/* 仓库订单卡片 */
.order-card {
  background: #fff; border-radius: var(--radius);
  padding: 12px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-sm);
}
.order-card .img {
  width: 86px; height: 86px; border-radius: var(--radius-sm);
  object-fit: cover; background: #f0f0f0; flex-shrink: 0;
}
.order-card .body { flex: 1; min-width: 0; }
.order-card .name {
  font-size: 14px; font-weight: 600; margin-bottom: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.order-card .price {
  font-size: 18px; color: var(--primary); font-weight: 700; margin-bottom: 8px;
}
.order-card .price .symbol { font-size: 12px; }

/* 状态徽章 */
.badge {
  display: inline-block; padding: 4px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 600;
}
.badge-warning { background: #FFF3E0; color: #EF6C00; }
.badge-danger { background: #FFEBEE; color: #C62828; }
.badge-info { background: #E3F2FD; color: #1565C0; }
.badge-primary { background: #FFE6DA; color: #E64A19; }
.badge-success { background: #E8F5E9; color: #2E7D32; }
.badge-secondary { background: #ECEFF1; color: #607D8B; }

/* 字段行 */
.field-row {
  display: flex; justify-content: space-between; padding: 8px 0;
  border-bottom: 1px dashed var(--border); font-size: 14px;
}
.field-row:last-child { border-bottom: none; }
.field-row .label { color: var(--text-light); }
.field-row .value { color: var(--text); font-weight: 500; }

/* 收款码 */
.qr-image {
  width: 200px; height: 200px; margin: 16px auto;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #f5f5f5; display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.qr-image img { width: 100%; height: 100%; object-fit: contain; }

/* 上传图片 */
.uploader {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.uploader .upload-btn {
  width: 84px; height: 84px;
  border: 1.5px dashed var(--border); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: #fafafa; color: var(--text-mute); font-size: 24px;
}
.uploader .upload-preview {
  position: relative; width: 84px; height: 84px;
  border-radius: var(--radius-sm); overflow: hidden;
}
.uploader .upload-preview img {
  width: 100%; height: 100%; object-fit: cover;
}
.uploader .upload-preview .del {
  position: absolute; top: 2px; right: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; cursor: pointer;
}

/* 风险提示卡片 */
.risk-card {
  background: #FFF8E1;
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 12px;
  border-left: 3px solid #FFC107;
  font-size: 13px;
  line-height: 1.7;
  color: #5D4037;
}
.risk-card .title {
  font-size: 14px; font-weight: 700; color: #E65100;
  margin-bottom: 8px;
}
.risk-card ol, .risk-card ul {
  list-style: inside; padding-left: 4px;
}
.risk-card li { margin-bottom: 4px; }

/* 操作列表 */
.cell-list { background: #fff; border-radius: var(--radius); overflow: hidden; }
.cell {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px; border-bottom: 1px solid var(--border);
}
.cell:last-child { border-bottom: none; }
.cell .left { display: flex; align-items: center; gap: 10px; }
.cell .icon {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.cell .text { font-size: 14px; }
.cell .right { color: var(--text-mute); font-size: 12px; }
.cell .arrow { color: var(--text-mute); }

/* 头像 */
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 64px; height: 64px; font-size: 22px; }

/* 登录页 */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 60px 24px 24px;
}
.login-page .logo {
  text-align: center; color: #fff; margin-bottom: 30px;
}
.login-page .logo h1 { font-size: 26px; margin-bottom: 6px; }
.login-page .logo p { font-size: 13px; opacity: 0.85; }
.login-page .login-form {
  background: #fff; border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-lg);
}
.login-page .tabs {
  display: flex; margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.login-page .tabs .tab {
  flex: 1; text-align: center; padding-bottom: 10px;
  font-size: 16px; font-weight: 600; color: var(--text-mute);
  border-bottom: 2px solid transparent;
}
.login-page .tabs .tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* 商城首页 banner */
.banner {
  width: 100%; aspect-ratio: 16/7;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; padding: 24px; display: flex; flex-direction: column; justify-content: center;
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.banner h2 { font-size: 22px; margin-bottom: 4px; }
.banner p { opacity: 0.9; margin-bottom: 12px; font-size: 13px; }
.banner .btn {
  width: fit-content; padding: 0 22px; height: 38px;
  background: rgba(255,255,255,0.22); font-size: 13px; backdrop-filter: blur(4px);
}

/* 浮动占位 */
.fix-padding { padding-bottom: calc(74px + var(--safe-bottom)); }

/* 列表分隔 */
.section-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 4px 10px;
}
.section-title h3 { font-size: 16px; font-weight: 700; }
.section-title .more { color: var(--text-mute); font-size: 12px; }

/* 安全空白 */
.safe-pb { padding-bottom: calc(70px + var(--safe-bottom)); }

/* 风险提示弹窗（签名版） */
.risk-modal-mask { z-index: 1100; }
.risk-modal {
  background: #fff; border-radius: var(--radius-lg);
  width: 100%; max-width: 360px; max-height: 86vh;
  display: flex; flex-direction: column;
  overflow: hidden; animation: pop 0.25s ease;
}
.risk-modal-close {
  position: absolute; right: 12px; top: 10px;
  width: 32px; height: 32px; line-height: 32px; text-align: center;
  font-size: 22px; color: #999; cursor: pointer; z-index: 2;
}
.risk-modal-title {
  padding: 16px; text-align: center; font-size: 17px; font-weight: 700;
  border-bottom: 1px solid var(--border); position: relative;
}
.risk-modal-body {
  padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.risk-modal-content {
  font-size: 13px; line-height: 1.8; color: var(--text);
  white-space: pre-wrap; max-height: 36vh; overflow-y: auto;
  margin-bottom: 12px;
}
.risk-modal-confirm-text {
  font-size: 13px; color: var(--text-light);
  margin-bottom: 14px; text-align: center;
}
.risk-signature-area { margin-bottom: 6px; }
.risk-sig-canvas-box,
.risk-sig-image-box {
  border: 1px dashed #bbb; border-radius: var(--radius);
  background: #fafafa; position: relative;
  height: 150px; overflow: hidden;
}
.risk-canvas {
  width: 100%; height: 100%; touch-action: none;
  display: block;
}
.risk-sig-image {
  width: 100%; height: 100%; object-fit: contain;
  cursor: pointer; background: #fff;
}
.risk-sig-tip {
  position: absolute; left: 0; right: 0; top: 50%;
  transform: translateY(-50%); text-align: center;
  font-size: 13px; color: #bbb; pointer-events: none;
}
.risk-sig-image-box .risk-sig-tip {
  top: auto; bottom: 8px; transform: none;
  color: var(--primary); font-size: 12px;
}
/* 收款码切换 tab */
.payee-tabs {
  display: flex; justify-content: center; gap: 14px; margin-bottom: 14px;
}
.payee-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 20px; border: 1px solid var(--border);
  font-size: 13px; color: var(--text-light); background: #fff; cursor: pointer;
}
.payee-tab.active {
  border-color: var(--primary); color: var(--primary); background: #FFF3E0; font-weight: 600;
}
.payee-tab .pay-icon { width: 22px; height: 22px; border-radius: 4px; font-size: 11px; }

.risk-sig-clear {
  margin-top: 8px; font-size: 12px; color: var(--primary);
  background: transparent; border: none; padding: 4px 0;
}
.risk-modal-footer {
  display: flex; border-top: 1px solid var(--border);
}
.risk-modal-footer button {
  flex: 1; height: 50px; font-size: 15px; font-weight: 600;
  background: #fff; color: var(--text); border: none;
}
.risk-modal-footer button + button { border-left: 1px solid var(--border); }
.risk-btn-confirm { background: var(--primary) !important; color: #fff !important; }
.risk-btn-confirm:disabled { opacity: 0.5; }

/* ===== 订单内聊天窗口 ===== */
.chat-mask { background: rgba(0,0,0,0.45); z-index: 1200; }
.chat-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 70vh; max-height: 600px;
  background: #f5f5f7; display: flex; flex-direction: column;
  border-radius: 16px 16px 0 0; overflow: hidden;
  animation: chatUp 0.22s ease;
}
@keyframes chatUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; background: var(--primary); color: #fff;
}
.chat-title { font-size: 15px; font-weight: 600; }
.chat-close { font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
.chat-list { flex: 1; overflow-y: auto; padding: 12px; background: #f5f5f7; }
.chat-msg { display: flex; flex-direction: column; margin-bottom: 12px; max-width: 76%; }
.chat-msg.mine { align-self: flex-end; align-items: flex-end; margin-left: auto; }
.chat-msg.theirs { align-self: flex-start; align-items: flex-start; }
.chat-bubble {
  padding: 9px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45;
  word-break: break-word; white-space: pre-wrap;
}
.chat-msg.mine .chat-bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 3px; }
.chat-msg.theirs .chat-bubble { background: #fff; color: #333; border-bottom-left-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.chat-time { font-size: 10px; color: #aaa; margin-top: 3px; }
.chat-input-bar {
  display: flex; gap: 8px; padding: 10px; background: #fff; border-top: 1px solid var(--border);
}
.chat-input {
  flex: 1; height: 38px; border: 1px solid var(--border); border-radius: 19px;
  padding: 0 14px; font-size: 14px; outline: none;
}
.chat-input:focus { border-color: var(--primary); }
.chat-send {
  width: 64px; height: 38px; border: none; border-radius: 19px;
  background: var(--primary); color: #fff; font-size: 14px; font-weight: 600;
}
.chat-send:active { opacity: 0.85; }

/* ===== 消息中心列表 ===== */
.message-list { padding: 0; }
.message-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: #fff;
  border-bottom: 1px solid var(--border); position: relative;
}
.message-item:active { background: #f9f9f9; }
.message-item .msg-avatar {
  width: 48px; height: 48px; border-radius: 50%; overflow: hidden;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 600; flex-shrink: 0;
}
.message-item .msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.message-item .msg-body { flex: 1; min-width: 0; }
.message-item .msg-top {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;
}
.message-item .msg-name {
  font-size: 15px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.message-item .msg-time { font-size: 11px; color: var(--text-mute); flex-shrink: 0; }
.message-item .msg-bottom {
  display: flex; align-items: center; gap: 8px;
}
.message-item .msg-preview {
  flex: 1; font-size: 13px; color: var(--text-light);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.message-item .msg-unread {
  min-width: 18px; height: 18px; line-height: 18px;
  background: var(--danger); color: #fff; font-size: 11px;
  border-radius: 9px; padding: 0 5px; text-align: center;
}
.message-item .msg-product {
  font-size: 12px; color: var(--text-mute); margin-top: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 首页轮播 banner */
.carousel {
  position: relative; width: 100%; aspect-ratio: 16/7;
  border-radius: var(--radius); overflow: hidden; margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(255, 87, 34, 0.18);
}
.carousel .slides { display: flex; height: 100%; transition: transform 0.45s ease; }
.carousel .slide { position: relative; flex: 0 0 100%; height: 100%; overflow: hidden; }
.carousel .slide .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.carousel .slide .shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(110,35,0,0.66) 0%, rgba(110,35,0,0.30) 45%, rgba(110,35,0,0) 75%);
}
.carousel .slide .txt {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  color: #fff; max-width: 62%;
}
.carousel .slide .txt h2 { font-size: 20px; margin-bottom: 4px; text-shadow: 0 2px 8px rgba(0,0,0,0.28); white-space: nowrap; }
.carousel .slide .txt p { font-size: 12px; opacity: 0.94; margin-bottom: 10px; text-shadow: 0 1px 4px rgba(0,0,0,0.22); }
.carousel .slide .txt .btn {
  width: fit-content; padding: 0 18px; height: 34px; line-height: 34px;
  background: rgba(255,255,255,0.25); font-size: 12px; backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.45); border-radius: 999px;
  color: #fff; text-decoration: none; display: inline-block;
}
.carousel .dots { position: absolute; right: 14px; bottom: 10px; display: flex; gap: 6px; z-index: 2; }
.carousel .dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.55); transition: all 0.3s; cursor: pointer; }
.carousel .dots i.on { width: 16px; background: #fff; }

/* 首页商城/积分专区购买按钮 */
.goods-card .zone-buy-btn {
  display: block;
  width: calc(100% - 20px);
  margin: 0 10px 12px;
  padding: 12px 0;
  border: none;
  border-radius: 22px;
  background: linear-gradient(135deg, #FF7A45, #FF5722);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  box-shadow: 0 4px 12px rgba(255, 87, 34, 0.35);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.goods-card .zone-buy-btn:active { transform: scale(0.96); opacity: 0.9; }

/* 首页无顶部导航：去掉为导航预留的顶部留白 */
.app.no-nav { padding-top: 0; }

/* ===== 全站动感炫彩背景 ===== */
body {
  background: linear-gradient(125deg, #FFF6EF 0%, #FFE7D6 25%, #FFF3E0 50%, #FFDCD0 75%, #FFF6EF 100%);
  background-attachment: fixed;
  background-size: 400% 400%;
  animation: bgFlow 3s ease-in-out infinite;
}
@keyframes bgFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
body::before,
body::after {
  content: '';
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
}
body::before {
  width: 46vw; height: 46vw;
  top: -12vw; right: -14vw;
  background: rgba(255, 122, 69, 0.38);
  animation: blobFloatA 18s ease-in-out infinite;
}
body::after {
  width: 42vw; height: 42vw;
  bottom: -10vw; left: -14vw;
  background: rgba(255, 193, 7, 0.32);
  animation: blobFloatB 24s ease-in-out infinite;
}
@keyframes blobFloatA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-7vw, 7vw) scale(1.18); }
}
@keyframes blobFloatB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, -7vw) scale(1.22); }
}
