/* ============================================

 * 电玩寄售 — 商品后台管理页样式

 * ============================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }



:root {

  --brand: #ff2c2c;

  --brand-soft: #fff0f0;

  --text: #1a1a1a;

  --muted: #888;

  --border: #ececec;

  --bg: #f5f6f8;

}



body {

  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;

  background: var(--bg);

  color: var(--text);

  line-height: 1.6;

}



.admin-wrap { max-width: 760px; margin: 0 auto; padding: 24px 16px 60px; }



/* ---------- 头部 ---------- */

.admin-header {

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 12px;

  padding: 8px 4px 20px;

}

.admin-title { display: flex; align-items: center; gap: 12px; }

.admin-logo {

  width: 46px; height: 46px;

  border-radius: 12px;

  background: linear-gradient(135deg, #ff5a5a, var(--brand));

  color: #fff;

  font-size: 20px; font-weight: 700;

  display: flex; align-items: center; justify-content: center;

  box-shadow: 0 6px 16px rgba(255, 44, 44, 0.3);

}

.admin-title h1 { font-size: 19px; }

.admin-sub { font-size: 12px; color: var(--muted); }

.btn-back {

  flex-shrink: 0;

  text-decoration: none;

  font-size: 13px;

  color: var(--brand);

  border: 1px solid var(--brand);

  border-radius: 18px;

  padding: 7px 16px;

  transition: background .15s;

}

.btn-back:hover { background: var(--brand-soft); }

.admin-header-btns { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.btn-logout {

  flex-shrink: 0;

  font-size: 13px;

  color: #999;

  background: #fff;

  border: 1px solid var(--border);

  border-radius: 18px;

  padding: 7px 16px;

  cursor: pointer;

  transition: all .15s;

}

.btn-logout:hover { color: #ff4d4f; border-color: #ff4d4f; }



/* ---------- 管理员登录遮罩 ---------- */

.admin-login-overlay {

  position: fixed;

  inset: 0;

  z-index: 9999;

  background: rgba(0, 0, 0, 0.45);

  backdrop-filter: blur(4px);

  display: flex;

  align-items: center;

  justify-content: center;

  animation: loginFadeIn .2s ease;

}

@keyframes loginFadeIn { from { opacity: 0; } to { opacity: 1; } }

.admin-login-overlay[hidden] { display: none; }

.admin-login-box {

  width: 320px;

  background: #fff;

  border-radius: 16px;

  padding: 30px 26px 26px;

  text-align: center;

  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);

  box-sizing: border-box;

}

.admin-login-logo {

  width: 52px; height: 52px;

  margin: 0 auto 14px;

  border-radius: 14px;

  background: linear-gradient(135deg, #ff5a5a, var(--brand));

  color: #fff;

  font-size: 22px; font-weight: 700;

  display: flex; align-items: center; justify-content: center;

  box-shadow: 0 6px 16px rgba(255, 44, 44, 0.3);

}

.admin-login-title { font-size: 18px; font-weight: 700; color: #333; }

.admin-login-desc { font-size: 12px; color: var(--muted); margin: 6px 0 18px; }

.admin-login-input {

  width: 100%;

  box-sizing: border-box;

  font-size: 14px;

  padding: 11px 14px;

  border: 1px solid var(--border);

  border-radius: 10px;

  outline: none;

  transition: border-color .15s, box-shadow .15s;

}

.admin-login-input:focus {

  border-color: var(--brand);

  box-shadow: 0 0 0 3px var(--brand-soft);

}

.admin-login-btn {

  width: 100%;

  margin-top: 14px;

  font-size: 15px;

  font-weight: 600;

  color: #fff;

  background: linear-gradient(135deg, #ff5a5a, var(--brand));

  border: none;

  border-radius: 10px;

  padding: 11px 0;

  cursor: pointer;

  transition: opacity .15s;

}

.admin-login-btn:hover { opacity: .9; }

.admin-login-btn:disabled { opacity: .6; cursor: not-allowed; }

.admin-login-error {

  margin-top: 12px;

  font-size: 12px;

  color: #ff4d4f;

}

.admin-login-error[hidden] { display: none; }



/* ---------- 顶部分类导航 ---------- */

.admin-categories {

  display: flex;

  gap: 8px;

  margin-bottom: 20px;

  position: sticky;

  top: 0;

  z-index: 10;

  background: var(--bg);

  padding: 8px 0;

}

.admin-category {

  flex: 1;

  padding: 12px 4px;

  border: 1px solid var(--border);

  border-radius: 10px;

  background: #fff;

  color: var(--muted);

  font-size: 14px;

  cursor: pointer;

  transition: all .15s;

  white-space: nowrap;

}

.admin-category:hover {

  border-color: #ffb3b3;

  color: var(--brand);

}

.admin-category.active {

  background: var(--brand);

  border-color: var(--brand);

  color: #fff;

  font-weight: 600;

  box-shadow: 0 4px 12px rgba(255, 44, 44, 0.2);

}



/* ---------- 分类内容区 ---------- */

.admin-section { display: none; }

.admin-section.active { display: block; }



/* ---------- 商品类型 Tab ---------- */

.admin-tabs { display: flex; gap: 8px; margin-bottom: 16px; }

.admin-tab {

  flex: 1;

  padding: 11px 0;

  border: 1px solid var(--border);

  border-radius: 10px;

  background: #fff;

  color: var(--muted);

  font-size: 14px;

  cursor: pointer;

  transition: all .15s;

}

.admin-tab.active {

  background: var(--brand);

  border-color: var(--brand);

  color: #fff;

  font-weight: 600;

}



/* ---------- 卡片 ---------- */

.admin-card {

  background: #fff;

  border: 1px solid var(--border);

  border-radius: 14px;

  padding: 20px;

  margin-bottom: 16px;

  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);

}

.admin-card h2 { font-size: 15px; margin-bottom: 14px; }

.count-badge {

  display: inline-block;

  min-width: 22px;

  padding: 1px 8px;

  border-radius: 11px;

  background: var(--brand-soft);

  color: var(--brand);

  font-size: 12px;

  font-weight: 600;

  text-align: center;

}



/* ---------- 表单 ---------- */

.game-form { display: flex; flex-direction: column; gap: 12px; }

.form-row label { display: block; font-size: 13px; color: #555; margin-bottom: 6px; }

.form-row .req { color: var(--brand); }

.form-row input[type="text"],

.form-row input[type="number"],

.form-row input[type="url"] {

  width: 100%;

  padding: 10px 12px;

  border: 1px solid var(--border);

  border-radius: 8px;

  font-size: 14px;

  outline: none;

  transition: border-color .15s, box-shadow .15s;

}

.form-row input:focus {

  border-color: var(--brand);

  box-shadow: 0 0 0 3px rgba(255, 44, 44, 0.1);

}

.form-row textarea {

  width: 100%;

  padding: 10px 12px;

  border: 1px solid var(--border);

  border-radius: 8px;

  font-size: 14px;

  outline: none;

  resize: vertical;

  font-family: inherit;

  transition: border-color .15s, box-shadow .15s;

}

.form-row textarea:focus {

  border-color: var(--brand);

  box-shadow: 0 0 0 3px rgba(255, 44, 44, 0.1);

}



.notice-card { margin-bottom: 16px; }

.notice-tip { font-size: 12px; color: var(--muted); margin-top: 10px; }
.setting-divider { height: 1px; background: #e8e8e8; margin: 18px 0 4px; }



.platform-group { display: flex; gap: 8px; flex-wrap: wrap; }

.plat-opt {

  display: flex !important;

  align-items: center;

  gap: 5px;

  margin-bottom: 0 !important;

  padding: 7px 14px;

  border: 1px solid var(--border);

  border-radius: 8px;

  font-size: 13px !important;

  cursor: pointer;

  user-select: none;

}

.plat-opt:has(input:checked) {

  border-color: var(--brand);

  background: var(--brand-soft);

  color: var(--brand);

  font-weight: 600;

}

.plat-opt input { accent-color: var(--brand); }



.cover-upload {

  margin-top: 8px;

  display: flex;

  align-items: center;

  gap: 10px;

  flex-wrap: wrap;

}

.upload-label {

  cursor: pointer;

  display: inline-flex;

  align-items: center;

  gap: 4px;

}

.upload-status {

  font-size: 12px;

  color: var(--muted);

}

.upload-status.ok { color: #2aa; }

.upload-status.err { color: var(--brand); }

.cover-preview {

  margin-top: 8px;

  display: flex;

  align-items: center;

  gap: 10px;

}

.cover-preview img {

  width: 64px; height: 64px;

  object-fit: cover;

  border-radius: 8px;

  border: 1px solid var(--border);

}



.form-actions { display: flex; gap: 10px; margin-top: 4px; }

.btn-primary {

  border: none;

  border-radius: 8px;

  padding: 11px 26px;

  background: var(--brand);

  color: #fff;

  font-size: 14px;

  font-weight: 600;

  cursor: pointer;

  transition: box-shadow .15s, transform .1s;

}

.btn-primary:hover { box-shadow: 0 6px 16px rgba(255, 44, 44, 0.3); }

.btn-primary:active { transform: scale(0.98); }

.btn-ghost {

  border: 1px solid var(--border);

  border-radius: 8px;

  padding: 11px 20px;

  background: #fff;

  color: var(--muted);

  font-size: 14px;

  cursor: pointer;

}

.btn-danger {

  border: none;

  border-radius: 8px;

  padding: 11px 26px;

  background: #ff4d4f;

  color: #fff;

  font-size: 14px;

  cursor: pointer;

  transition: box-shadow .15s, transform .1s;

}

.btn-danger:hover { box-shadow: 0 6px 16px rgba(255, 77, 79, 0.3); }

.btn-danger:active { transform: scale(0.98); }

.btn-danger-sm {

  border: 1px solid #ffccc7;

  border-radius: 6px;

  padding: 4px 10px;

  background: #fff0f0;

  color: #cf1322;

  font-size: 12px;

  cursor: pointer;

}



.order-section-title-wrap {

  display: flex;

  justify-content: space-between;

  align-items: center;

  gap: 12px;

  flex-wrap: wrap;

}

.order-header-actions {

  display: flex;

  align-items: center;

  gap: 8px;

  flex-wrap: wrap;

}



.order-actions {

  display: flex;

  gap: 10px;

  margin-top: 12px;

  padding-top: 12px;

  border-top: 1px solid var(--border);

}

.order-actions .btn-primary,

.order-actions .btn-danger,

.order-actions .btn-ghost { padding: 8px 18px; font-size: 13px; }

.order-actions .btn-primary {

  background: #ff7a8a;

  box-shadow: none;

}

.order-actions .btn-primary:hover { box-shadow: 0 4px 12px rgba(255, 122, 138, 0.25); }

.order-actions .btn-danger {

  background: #fff0f0;

  color: #cf1322;

  border: 1px solid #ffccc7;

}

.order-actions .btn-danger:hover { box-shadow: 0 4px 12px rgba(207, 19, 34, 0.12); }



.order-note-save {

  background: #ff7a8a;

  box-shadow: none;

  border: none;

  color: #fff;

}

.order-note-save:hover { box-shadow: 0 4px 12px rgba(255, 122, 138, 0.25); }



.btn-ghost-sm {

  border: 1px solid var(--border);

  border-radius: 6px;

  padding: 4px 10px;

  background: #fff;

  color: var(--muted);

  font-size: 12px;

  cursor: pointer;

}

.order-private-note {

  border-color: #ffd666;

  color: #d48806;

  background: #fffbe6;

  margin-left: 6px;

}

.order-private-note.has-note {

  border-color: #ffa940;

  color: #fff;

  background: #ffa940;

  font-weight: 500;

}

.order-private-note:hover {

  opacity: 0.85;

}

.order-chat {

  border-color: #b7eb8f;

  color: #389e0d;

  background: #f6ffed;

  margin-left: 6px;

}

.order-chat:hover {

  opacity: 0.85;

}



/* ---------- 列表 ---------- */

.list-empty {

  text-align: center;

  color: var(--muted);

  font-size: 13px;

  padding: 30px 0;

}

.platform-tabs {

  display: flex;

  gap: 8px;

  margin: 12px 0 14px;

  overflow-x: auto;

  -webkit-overflow-scrolling: touch;

}

.platform-tab {

  flex-shrink: 0;

  padding: 8px 16px;

  border: 1px solid var(--border);

  border-radius: 18px;

  background: #fff;

  color: var(--muted);

  font-size: 13px;

  cursor: pointer;

  transition: all .15s;

  user-select: none;

}

.platform-tab:hover {

  border-color: #ffb3b3;

  color: var(--brand);

}

.platform-tab.active {

  background: var(--brand);

  border-color: var(--brand);

  color: #fff;

  font-weight: 600;

  box-shadow: 0 4px 12px rgba(255, 44, 44, 0.2);

}

.game-group { margin-bottom: 16px; }

.game-group-header {

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 10px 12px;

  background: #fff;

  border: 1px solid var(--border);

  border-radius: 10px;

  margin-bottom: 8px;

  position: sticky;

  top: 72px;

  z-index: 5;

}

.game-group-title {

  font-size: 14px;

  font-weight: 700;

  color: var(--text);

}

.game-group-count {

  font-size: 12px;

  color: #fff;

  background: var(--brand);

  padding: 2px 10px;

  border-radius: 10px;

  font-weight: 600;

}

.game-group-body {

  background: #fff;

  border: 1px solid var(--border);

  border-radius: 10px;

  overflow: hidden;

}

.game-group-body .game-item:last-child { border-bottom: none; }

.game-item {

  display: flex;

  align-items: center;

  gap: 12px;

  padding: 12px 6px;

  border-bottom: 1px solid var(--border);

}

.game-item:last-child { border-bottom: none; }

.item-cover {

  width: 56px; height: 56px;

  border-radius: 8px;

  overflow: hidden;

  flex-shrink: 0;

  background: var(--brand-soft);

  display: flex;

  align-items: center;

  justify-content: center;

  color: #bbb;

  font-size: 10px;

}

.item-cover img { width: 100%; height: 100%; object-fit: cover; }

.item-info { flex: 1; min-width: 0; }

.item-name { font-size: 14px; font-weight: 600; }

.item-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

.item-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }

.item-tag {

  font-size: 10px;

  color: var(--brand);

  background: var(--brand-soft);

  padding: 1px 7px;

  border-radius: 8px;

}

.item-price { font-size: 15px; font-weight: 700; color: var(--brand); flex-shrink: 0; }

.item-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }

.icon-btn {

  border: 1px solid var(--border);

  background: #fff;

  border-radius: 6px;

  padding: 4px 10px;

  font-size: 12px;

  cursor: pointer;

  color: #555;

}

.icon-btn:hover { border-color: var(--brand); color: var(--brand); }

.icon-btn.danger:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }



/* ---------- 用户补缺申请 ---------- */

.request-list { display: flex; flex-direction: column; gap: 10px; }

.request-item {

  display: flex;

  align-items: flex-start;

  justify-content: space-between;

  gap: 12px;

  padding: 12px 14px;

  border: 1px solid var(--border);

  border-radius: 10px;

  background: #fff;

}

.request-item.done { opacity: 0.65; background: #fafafa; }

.req-body { flex: 1; min-width: 0; }

.req-content { font-size: 14px; line-height: 1.5; word-break: break-all; }

.req-meta {

  display: flex; gap: 12px; align-items: center;

  margin-top: 6px; font-size: 12px; color: var(--muted);

}

.req-status { color: #eab308; }

.request-item.done .req-status { color: #16a34a; }

.req-img { display: inline-block; margin-top: 8px; }

.req-img img {

  width: 72px; height: 72px;

  object-fit: cover;

  border-radius: 8px;

  border: 1px solid var(--border);

  cursor: zoom-in;

}



/* ---------- 底部 ---------- */

.admin-footer {

  text-align: center;

  font-size: 12px;

  color: #aaa;

  line-height: 1.8;

  padding-top: 8px;

}



/* ---------- 在线客服 ---------- */

.chat-wrap {

  display: flex;

  gap: 14px;

  border: 1px solid var(--border);

  border-radius: 12px;

  overflow: hidden;

  min-height: 360px;

}

.chat-users {

  width: 240px;

  flex-shrink: 0;

  background: #fafafa;

  border-right: 1px solid var(--border);

  overflow-y: auto;

  max-height: 520px;

}

.chat-users .list-empty { padding: 30px 10px; }

.chat-user {

  display: flex;

  align-items: center;

  gap: 10px;

  padding: 12px 14px;

  cursor: pointer;

  border-bottom: 1px solid var(--border);

  transition: background .15s;

}

.chat-user:hover { background: #f0f0f0; }

.chat-user.active { background: var(--brand-soft); }

.chat-user-avatar {

  width: 38px; height: 38px;

  border-radius: 50%;

  background: #ddd;

  display: flex; align-items: center; justify-content: center;

  font-size: 16px;

  flex-shrink: 0;

}

.chat-user-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.chat-user-info { flex: 1; min-width: 0; }

.chat-user-name {

  font-size: 14px; font-weight: 600;

  display: flex; align-items: center; gap: 6px;

}

/* 平台标签：🟢微信 / 🔵支付宝（根据 userId 前缀判断） */

.platform-tag {

  display: inline-flex;

  align-items: center;

  gap: 3px;

  padding: 1px 7px;

  border-radius: 10px;

  font-size: 11px;

  font-weight: 600;

  line-height: 1.5;

  flex-shrink: 0;

  white-space: nowrap;

}

.platform-tag.wechat {

  background: #e8f7ee;

  color: #1a9c4a;

  border: 1px solid #b6e6c5;

}

.platform-tag.alipay {

  background: #e6f1ff;

  color: #1677ff;

  border: 1px solid #b8d4ff;

}

/* 平台筛选 tab（订单列表顶部） */

.platform-tabs {

  display: flex;

  gap: 8px;

  flex-wrap: wrap;

  margin-bottom: 12px;

  padding: 8px 10px;

  background: #f7f8fa;

  border-radius: 8px;

  border: 1px solid var(--border);

}

.platform-tabs-label {

  font-size: 12px;

  color: var(--muted);

  align-self: center;

  margin-right: 4px;

}

.platform-tab {

  display: flex;

  align-items: center;

  gap: 4px;

  padding: 5px 12px;

  border: 1px solid var(--border);

  border-radius: 16px;

  background: #fff;

  color: var(--muted);

  font-size: 12px;

  cursor: pointer;

  transition: all .15s;

  user-select: none;

}

.platform-tab:hover { color: var(--text); }

.platform-tab.active {

  background: var(--brand);

  color: #fff;

  border-color: var(--brand);

}

.platform-tab-count {

  font-size: 11px;

  opacity: .85;

  font-weight: 600;

}

.chat-user-last {

  font-size: 12px; color: var(--muted);

  margin-top: 3px;

  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;

}

.chat-user-badge {

  display: inline-block;

  min-width: 18px; padding: 1px 6px;

  border-radius: 9px;

  background: var(--brand);

  color: #fff;

  font-size: 11px;

  text-align: center;

}

.chat-room {

  flex: 1;

  display: flex;

  flex-direction: column;

  min-width: 0;

  background: #fff;

}

.chat-messages {

  flex: 1;

  padding: 16px;

  overflow-y: auto;

  max-height: 420px;

  display: flex;

  flex-direction: column;

  gap: 14px;

}

.chat-msg { display: flex; flex-direction: column; max-width: 78%; }

.chat-msg.user { align-self: flex-end; align-items: flex-end; }

.chat-msg.admin { align-self: flex-start; align-items: flex-start; }

.chat-msg-bubble {

  padding: 10px 14px;

  border-radius: 14px;

  font-size: 14px;

  line-height: 1.45;

  word-break: break-word;

}

.chat-msg.user .chat-msg-bubble { background: #ffe5e5; color: #333; border-bottom-right-radius: 4px; }

.chat-msg.admin .chat-msg-bubble { background: #f5f5f5; color: #333; border-bottom-left-radius: 4px; }

.chat-msg-time { font-size: 11px; color: #aaa; margin-top: 4px; }

.chat-reply-bar {

  display: flex;

  gap: 10px;

  padding: 12px 14px;

  border-top: 1px solid var(--border);

}

.chat-reply-bar input {

  flex: 1;

  padding: 10px 12px;

  border: 1px solid var(--border);

  border-radius: 8px;

  font-size: 14px;

}

.chat-reply-bar input:focus { outline: none; border-color: var(--brand); }



/* 聊天窗口顶栏 + 用户历史订单抽屉 */

.chat-wrap { position: relative; }

.chat-room-bar {

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 10px;

  padding: 10px 14px;

  border-bottom: 1px solid var(--border);

  background: #fafafa;

}

.chat-target-name {

  font-size: 13px;

  font-weight: 600;

  color: var(--text);

  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;

}

.chat-orders {

  position: absolute;

  right: 0;

  top: 0;

  bottom: 0;

  width: 320px;

  background: #fff;

  border-left: 1px solid var(--border);

  box-shadow: -4px 0 16px rgba(0,0,0,0.08);

  display: flex;

  flex-direction: column;

  z-index: 10;

  transition: transform .22s ease;

}

.chat-orders[hidden],

.chat-orders-mask[hidden] { display: none; }

.chat-orders-mask {

  position: absolute;

  inset: 0;

  z-index: 9;

  background: rgba(0,0,0,0.18);

  cursor: pointer;

}

.chat-orders-head {

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 10px 14px;

  font-size: 13px;

  font-weight: 600;

  border-bottom: 1px solid var(--border);

  background: #fafafa;

}

.chat-orders-close {

  border: none;

  background: transparent;

  font-size: 18px;

  line-height: 1;

  color: var(--muted);

  cursor: pointer;

  padding: 0 4px;

}

.chat-orders-close:hover { color: var(--text); }

.chat-orders-list {

  flex: 1;

  overflow-y: auto;

  padding: 10px;

  display: flex;

  flex-direction: column;

  gap: 8px;

}

.chat-orders-list .list-empty { padding: 30px 10px; }

.chat-order-item {

  border: 1px solid var(--border);

  border-radius: 8px;

  padding: 8px 10px;

  font-size: 12px;

  background: #fff;

}

.chat-order-top {

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 6px;

  margin-bottom: 4px;

}

.chat-order-no {

  font-weight: 600;

  color: var(--text);

  font-size: 11px;

  word-break: break-all;

}

.chat-order-status {

  flex-shrink: 0;

  padding: 1px 8px;

  border-radius: 10px;

  font-size: 11px;

  background: #eee;

  color: #555;

}

.chat-order-status.status-pending { background: #fff7e6; color: #d48806; }

.chat-order-status.status-approved { background: #ffe6ea; color: #ff4d6f; }

.chat-order-status.status-shipped { background: #ffe6ea; color: #ff4d6f; }

.chat-order-status.status-paid { background: #e6f7ff; color: #1677ff; }

.chat-order-status.status-closed { background: #f0f0f0; color: #999; }

.chat-order-items {

  color: var(--muted);

  margin-bottom: 4px;

  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;

}

.chat-order-bottom {

  display: flex;

  align-items: center;

  justify-content: space-between;

}

.chat-order-total { font-weight: 600; color: #ff4d6f; }

.chat-order-time { color: #aaa; font-size: 11px; }



/* ---------- 轻提示 ---------- */

.toast-tip {

  position: fixed;

  left: 50%;

  bottom: 36px;

  transform: translateX(-50%) translateY(20px);

  background: rgba(0, 0, 0, 0.78);

  color: #fff;

  font-size: 13px;

  padding: 9px 20px;

  border-radius: 20px;

  opacity: 0;

  pointer-events: none;

  transition: all .25s;

  z-index: 99;

}

.toast-tip.show { opacity: 1; transform: translateX(-50%) translateY(0); }



/* ---------- 寄售订单 ---------- */

.orders-list { display: flex; flex-direction: column; gap: 14px; }

.order-card {

  background: #fff9f9;

  border: 1px solid #f6e0e0;

  border-radius: 12px;

  padding: 16px;

}

.order-header {

  display: flex;

  justify-content: space-between;

  align-items: center;

  margin-bottom: 14px;

  padding-bottom: 12px;

  border-bottom: 1px solid var(--border);

}

.order-no { font-size: 13px; color: var(--muted); }

.order-header-right {

  display: flex;

  align-items: center;

  gap: 8px;

  flex-wrap: wrap;

  justify-content: flex-end;

}

.order-status {

  display: inline-flex;

  align-items: center;

  gap: 5px;

  font-size: 12px;

  background: #f7f8fa;

  color: #555;

  padding: 4px 10px;

  border-radius: 12px;

  font-weight: 600;

  border: 1px solid var(--border);

}

.order-status::before {

  content: '';

  width: 6px; height: 6px;

  border-radius: 50%;

  background: #bbb;

}

.order-status.status-0::before { background: #faad14; }

.order-status.status-1::before { background: #1677ff; }

.order-status.status-4::before { background: #52c41a; }

.order-status.status-2::before { background: #52c41a; }

.order-status.status-3::before { background: #999; }



.order-delete {

  margin-left: 8px;

  border-color: #ffccc7;

  color: #cf1322;

  background: #fff;

}

.order-delete:hover {

  background: #fff0f0;

}



.deleted-card {

  background: #fff;

  opacity: 0.92;

}

.deleted-card .order-header {

  border-bottom-style: dashed;

}



/* 信息行：去掉色块框，改用紧凑行 */

.order-section {

  margin-bottom: 14px;

  padding-bottom: 14px;

  border-bottom: 1px solid var(--border);

}

.order-section:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.order-section-title {

  font-size: 12px;

  color: var(--muted);

  margin-bottom: 8px;

  font-weight: 500;

}

.order-meta {

  display: flex;

  flex-wrap: wrap;

  gap: 6px 18px;

  font-size: 12px;

  color: #555;

}

.order-meta b { color: #333; font-weight: 500; }

.order-extra {

  display: flex;

  flex-wrap: wrap;

  gap: 6px 18px;

  font-size: 12px;

  color: #555;

  line-height: 1.6;

}

.order-extra b { color: #333; font-weight: 500; }

.order-extra.empty { color: #aaa; }



/* 商品列表：平铺，用分隔线 */

.order-items {

  display: flex;

  flex-direction: column;

  margin-bottom: 14px;

  padding-bottom: 14px;

  border-bottom: 1px solid var(--border);

}

.order-item {

  display: flex;

  gap: 12px;

  padding: 12px 0;

  border-bottom: 1px solid #f2f2f2;

}

.order-item:first-child { padding-top: 0; }

.order-item:last-child { border-bottom: none; padding-bottom: 0; }

.order-item-cover {

  width: 56px; height: 56px;

  border-radius: 6px;

  overflow: hidden;

  flex-shrink: 0;

  background: #f7f8fa;

  display: flex; align-items: center; justify-content: center;

}

.order-item-cover img { width: 100%; height: 100%; object-fit: cover; }

.order-item-no-cover { font-size: 11px; color: #bbb; }

.order-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }

.order-item-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; color: #222; }

.order-item-spec { font-size: 12px; color: var(--muted); }

.order-item-price { font-size: 14px; color: #333; font-weight: 700; margin-top: 4px; }

.order-total {

  text-align: right;

  font-size: 14px;

  color: #333;

  margin-bottom: 14px;

  padding-bottom: 14px;

  border-bottom: 1px solid var(--border);

}

.order-total b { color: var(--brand); font-size: 16px; font-weight: 700; }



/* 收款信息、备注等文本信息 */

.order-text-block {

  display: flex;

  flex-wrap: wrap;

  gap: 6px 20px;

  font-size: 13px;

  color: #555;

  line-height: 1.7;

}

.order-text-block b { color: #333; font-weight: 500; }

.order-remark-line {

  font-size: 13px;

  color: #555;

  line-height: 1.7;

}

.order-remark-line b { color: #333; font-weight: 500; }

.order-time {

  font-size: 12px;

  color: #aaa;

  text-align: right;

  margin-top: 12px;

}



/* 后台留言：去掉外框，输入框白底 */

.order-note {

  margin-bottom: 14px;

  padding-bottom: 14px;

  border-bottom: 1px solid var(--border);

}

.order-note-title {

  font-size: 13px;

  font-weight: 600;

  color: #555;

  margin-bottom: 8px;

}

.order-note-input {

  width: 100%;

  min-height: 54px;

  border: 1px solid var(--border);

  border-radius: 8px;

  padding: 10px 12px;

  font-size: 13px;

  line-height: 1.6;

  color: #333;

  background: #fff;

  box-sizing: border-box;

  resize: vertical;

}

.order-note-input:focus { outline: none; border-color: var(--brand); }

.order-note-bar {

  display: flex;

  justify-content: space-between;

  align-items: center;

  margin-top: 8px;

}

.order-note-hint {

  font-size: 12px;

  color: #999;

}

.order-note-actions {

  display: flex;

  gap: 10px;

  align-items: center;

}

.order-note-save {

  font-size: 12px;

  padding: 6px 14px;

  border-radius: 6px;

}

.order-note-file { display: none; }

.order-note-upload {

  border: 1px solid var(--border);

  border-radius: 6px;

  padding: 6px 12px;

  background: #fff;

  color: var(--muted);

  font-size: 12px;

  cursor: pointer;

  transition: all .15s;

}

.order-note-upload:hover {

  border-color: var(--brand);

  color: var(--brand);

}

.order-note-preview-wrap { margin: 8px 0; }

.order-note-preview {

  display: inline-block;

  max-width: 160px;

  border-radius: 6px;

  overflow: hidden;

  border: 1px solid var(--border);

}

.order-note-preview img {

  display: block;

  width: 100%;

  height: auto;

}



/* 售后留言：去掉外框 */

.order-tickets {

  margin-bottom: 14px;

  padding-bottom: 14px;

  border-bottom: 1px solid var(--border);

}

.order-tickets .order-note-title { color: #555; }

.ticket-item {

  padding: 12px 0;

  border-bottom: 1px solid #f2f2f2;

}

.ticket-item:first-child { padding-top: 0; }

.ticket-item:last-child { border-bottom: none; padding-bottom: 0; }

.ticket-head {

  display: flex;

  justify-content: space-between;

  font-size: 12px;

  color: #888;

  margin-bottom: 6px;

}

.ticket-status { color: #555; font-weight: 600; }

.ticket-content {

  font-size: 13px;

  color: #333;

  line-height: 1.6;

  margin-bottom: 8px;

}

.ticket-reply-input {

  width: 100%;

  min-height: 50px;

  border: 1px solid var(--border);

  border-radius: 8px;

  padding: 10px 12px;

  font-size: 13px;

  line-height: 1.6;

  color: #333;

  background: #fff;

  box-sizing: border-box;

  margin-bottom: 6px;

}

.ticket-reply-input:focus { outline: none; border-color: var(--brand); }

.ticket-bar { text-align: right; }



/* ---------- 用户黑名单 ---------- */

.blacklist-tip {

  font-size: 12px;

  color: #999;

  margin: 6px 0 12px;

}

.blacklist-item {

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 12px;

  padding: 10px 12px;

  border: 1px solid #ffe0e6;

  background: #fff7f8;

  border-radius: 8px;

  margin-bottom: 8px;

}

.blacklist-info {

  font-size: 13px;

  color: #333;

  line-height: 1.7;

}

.blacklist-time {

  font-size: 12px;

  color: #999;

}



/* ---------- 订单状态分组 ---------- */

.order-status-tabs {

  display: flex;

  gap: 8px;

  flex-wrap: wrap;

  margin-bottom: 16px;

}

.order-status-tab {

  display: flex;

  align-items: center;

  gap: 6px;

  padding: 7px 14px;

  border: 1px solid var(--border);

  border-radius: 18px;

  background: #fff;

  color: var(--muted);

  font-size: 13px;

  cursor: pointer;

  transition: all .15s;

  user-select: none;

}

.order-status-tab:hover {

  border-color: #ffb3b3;

  color: var(--brand);

}

.order-status-tab.active {

  background: var(--brand);

  border-color: var(--brand);

  color: #fff;

  font-weight: 600;

}

.order-status-tab.active .order-status-count {

  background: rgba(255,255,255,0.25);

  color: #fff;

}

.order-status-count {

  display: inline-block;

  min-width: 18px;

  padding: 1px 6px;

  border-radius: 9px;

  background: var(--brand-soft);

  color: var(--brand);

  font-size: 11px;

  font-weight: 600;

  text-align: center;

}



.order-group {

  margin-bottom: 18px;

}

.order-group-header {

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 10px 0;

  cursor: pointer;

  font-size: 15px;

  font-weight: 600;

  color: #333;

  border-bottom: 1px solid var(--border);

  margin-bottom: 12px;

}

.order-group-meta {

  display: flex;

  align-items: center;

  gap: 10px;

}

.order-group-count {

  display: inline-block;

  min-width: 20px;

  padding: 1px 8px;

  border-radius: 10px;

  background: var(--brand-soft);

  color: var(--brand);

  font-size: 12px;

  font-weight: 600;

  text-align: center;

}

.order-group-toggle {

  font-size: 12px;

  color: var(--muted);

  font-weight: 400;

}

.order-group-body {

  display: flex;

  flex-direction: column;

  gap: 14px;

}

.order-group-body.collapsed { display: none; }

.order-group-body .list-empty {

  padding: 24px 0;

  background: transparent;

}



/* ---------- 订单视图切换（按状态 / 按用户） ---------- */

.order-view-switch {

  display: flex;

  gap: 10px;

  margin-bottom: 12px;

}

.order-view-btn {

  padding: 7px 18px;

  border: 1px solid var(--border);

  background: #fff;

  color: var(--muted);

  border-radius: 8px;

  font-size: 13px;

  cursor: pointer;

  transition: all .2s;

}

.order-view-btn:hover {

  border-color: var(--brand);

  color: var(--brand);

}

.order-view-btn.active {

  background: var(--brand);

  color: #fff;

  border-color: var(--brand);

}



/* ---------- 按用户归类的分组样式 ---------- */

.user-group-header {

  font-weight: 400;

}

.order-group-title {

  display: flex;

  align-items: center;

  gap: 12px;

  min-width: 0;

}

.user-avatar {

  flex-shrink: 0;

  width: 36px;

  height: 36px;

  border-radius: 50%;

  background: var(--brand);

  color: #fff;

  display: flex;

  align-items: center;

  justify-content: center;

  font-size: 14px;

  font-weight: 600;

}

.user-info-main {

  line-height: 1.35;

  min-width: 0;

}

.user-id {

  font-weight: 600;

  color: #333;

  font-size: 14px;

  word-break: break-all;

}

.user-nick {

  color: var(--muted);

  font-size: 12px;

}

.user-summary {

  display: flex;

  gap: 14px;

  font-size: 13px;

  color: var(--muted);

  white-space: nowrap;

}

.user-summary span {

  display: flex;

  align-items: center;

  gap: 4px;

}

.user-summary b {

  color: #333;

  font-weight: 600;

}



/* ---------- 快递公司管理 ---------- */

.express-form {

  display: flex;

  gap: 10px;

  margin-bottom: 12px;

}

.express-form input {

  flex: 1;

  padding: 10px 12px;

  border: 1px solid var(--border);

  border-radius: 8px;

  font-size: 14px;

  outline: none;

}

.express-form input:focus { border-color: var(--brand); }

.express-form .btn-primary { padding: 10px 18px; }

.express-list { display: flex; flex-direction: column; gap: 8px; }

.express-item {

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 10px;

  padding: 10px 12px;

  border: 1px solid var(--border);

  border-radius: 8px;

  background: #fafafa;

}

.express-toggle {

  display: flex;

  align-items: center;

  gap: 8px;

  cursor: pointer;

  flex: 1;

  min-width: 0;

}

.express-toggle input { width: 16px; height: 16px; accent-color: var(--brand); flex-shrink: 0; }

.express-name { font-size: 14px; color: #333; }

.express-actions { display: flex; gap: 6px; flex-shrink: 0; }

.express-actions .icon-btn { padding: 4px 8px; }

.express-actions .icon-btn:disabled {

  opacity: 0.35;

  cursor: not-allowed;

  border-color: var(--border);

  color: #bbb;

}



/* ---------- 设置项图片上传 ---------- */

.upload-label {

  display: block;

  font-size: 13px;

  color: #555;

  margin-bottom: 8px;

  font-weight: 500;

}

.upload-input {

  display: block;

  width: 100%;

  padding: 8px 0;

  font-size: 13px;

  color: #333;

}

.image-preview {

  display: flex;

  flex-wrap: wrap;

  gap: 10px;

  margin-top: 10px;

}

.image-preview-item {

  position: relative;

  width: 90px;

  height: 90px;

  border-radius: 8px;

  overflow: hidden;

  border: 1px solid var(--border);

  background: #fafafa;

}

.image-preview-item img {

  width: 100%;

  height: 100%;

  object-fit: cover;

}

.image-preview-item .remove-btn {

  position: absolute;

  top: 2px;

  right: 2px;

  width: 20px;

  height: 20px;

  border-radius: 50%;

  background: rgba(0,0,0,0.5);

  color: #fff;

  font-size: 12px;

  display: flex;

  align-items: center;

  justify-content: center;

  cursor: pointer;

  border: none;

}

.image-preview-item .remove-btn:hover { background: rgba(0,0,0,0.7); }

.image-preview-item .uploading {

  position: absolute;

  inset: 0;

  display: flex;

  align-items: center;

  justify-content: center;

  background: rgba(255,255,255,0.8);

  font-size: 12px;

  color: #666;

}


