:root {
  --primary: #1d63ed;
  --primary-2: #0ea5e9;
  --primary-dark: #143f9f;
  --table-header-blue: #1455a0;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #667085;
  --border: #e5eaf2;
  --success: #14a36f;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 16px 40px rgba(30, 64, 175, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input, textarea, select { font: inherit; }
button { border: 0; cursor: pointer; }
textarea { min-height: 88px; resize: vertical; }
.hidden { display: none !important; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; background: radial-gradient(circle at top left, #dbeafe 0, transparent 35%), linear-gradient(135deg, #0f3b8f, #1d63ed 42%, #0ea5e9); }
.auth-hero { color: #fff; padding: 72px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-hero h1 { font-size: 46px; line-height: 1.15; margin: 0 0 18px; }
.auth-hero p { color: rgba(255,255,255,.82); font-size: 18px; max-width: 660px; }
.auth-badges { display: flex; gap: 12px; flex-wrap: wrap; }
.auth-badges span { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 9px 14px; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 32px; }
.auth-card { width: min(460px, 100%); background: rgba(255,255,255,.96); border-radius: 28px; padding: 34px; box-shadow: var(--shadow); }
.admin-login-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 15% 10%, rgba(96,165,250,.32), transparent 34%), radial-gradient(circle at 90% 94%, rgba(14,165,233,.25), transparent 38%), linear-gradient(145deg, #0f2f78, #1d63ed 54%, #0ea5e9); }
.admin-login-card { width: min(470px, 100%); padding: 38px; border: 1px solid rgba(255,255,255,.55); border-radius: 28px; background: rgba(255,255,255,.97); box-shadow: 0 28px 80px rgba(6,28,84,.32); }
.admin-login-mark { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 22px; border-radius: 18px; color: #fff; font-size: 24px; font-weight: 950; background: linear-gradient(135deg, #1455a0, #0ea5e9); box-shadow: 0 14px 28px rgba(29,99,237,.24); }
.admin-login-heading span { display: inline-flex; margin-bottom: 10px; padding: 5px 10px; border-radius: 999px; color: #1455a0; background: #eaf2ff; font-size: 12px; font-weight: 850; }
.admin-login-heading h1 { margin: 0; color: #102a63; font-size: clamp(26px, 4vw, 34px); letter-spacing: -.04em; }
.admin-login-heading p { margin: 12px 0 26px; color: var(--muted); line-height: 1.7; }
.admin-login-form { display: grid; gap: 16px; }
.admin-login-form .primary-btn { min-height: 48px; margin-top: 4px; }
.admin-login-form .muted { margin: 0; line-height: 1.6; font-size: 13px; }
.auth-tabs { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-bottom: 22px; background: #eef4ff; padding: 6px; border-radius: 16px; }
.auth-tabs button { padding: 12px; border-radius: 12px; background: transparent; color: var(--muted); font-weight: 700; }
.auth-tabs button.active { background: #fff; color: var(--primary); box-shadow: 0 8px 24px rgba(29,99,237,.12); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #344054; font-weight: 800; font-size: 15px; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 12px 13px; background: #fff; color: var(--text); outline: none; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary-2); box-shadow: 0 0 0 4px rgba(14,165,233,.12); }
.primary-btn, .secondary-btn, .danger-btn, .ghost-btn, .mini-btn { border-radius: 12px; padding: 11px 15px; font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.primary-btn { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 12px 28px rgba(29,99,237,.2); }
.secondary-btn { color: var(--primary-dark); background: #eaf2ff; }
.danger-btn { color: #fff; background: var(--danger); }
.ghost-btn { color: var(--muted); background: #f2f5f9; }
.mini-btn { padding: 8px 10px; font-size: 13px; border-radius: 9px; background: #eef4ff; color: var(--primary-dark); }
.mini-btn.danger { background: #fee2e2; color: #b91c1c; }
.layout { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; color: #fff; padding: 22px 16px; background: linear-gradient(180deg, #123a91, #1752c9 58%, #0ea5e9); display: flex; flex-direction: column; }
.brand { padding: 8px 8px 20px; border-bottom: 1px solid rgba(255,255,255,.16); }
.brand h2 { margin: 0; font-size: 20px; line-height: 1.35; overflow-wrap: anywhere; }
.brand p { margin: 8px 0 0; color: rgba(255,255,255,.74); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }
.nav button { text-align: left; padding: 12px 14px; border-radius: 14px; color: rgba(255,255,255,.82); background: transparent; font-weight: 800; font-size: 15px; }
.nav button.active, .nav button:hover { background: rgba(255,255,255,.16); color: #fff; }
.local-tip { margin-top: auto; font-size: 12px; line-height: 1.55; color: rgba(255,255,255,.78); background: rgba(255,255,255,.12); padding: 12px; border-radius: 16px; min-width: 0; }
.local-tip span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 8; height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 28px; background: rgba(244,247,251,.88); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(229,234,242,.8); }
.topbar h1 { margin: 0; font-size: 23px; }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.account-pill { color: #344054; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 9px 13px; font-weight: 700; }
.content { padding: 28px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); padding: 22px; margin-bottom: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.card h3 { margin: 0; font-size: 20px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat-card { padding: 20px; border-radius: 20px; background: linear-gradient(135deg, #fff, #eff6ff); border: 1px solid #dbeafe; }
.stat-card span { color: var(--muted); font-weight: 800; font-size: 15px; }
.stat-card strong { display: block; margin-top: 10px; font-size: 30px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters button { padding: 9px 13px; border-radius: 999px; background: #edf2fa; color: #475467; font-weight: 800; font-size: 14px; }
.filters button.active { color: #fff; background: var(--primary); }
.table-wrap { width: 100%; overflow-x: hidden; }
table { width: 100%; border-collapse: collapse; table-layout: auto; }
th { text-align: left; color: #667085; font-size: 14px; background: #f8fafc; }
th, td { padding: 13px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; overflow-wrap: anywhere; }
td { font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 7px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 13px; font-weight: 800; background: #eef4ff; color: var(--primary-dark); }
.badge.ok { background: #dcfce7; color: #166534; }
.badge.warn { background: #fef3c7; color: #92400e; }
.badge.danger { background: #fee2e2; color: #991b1b; }
.product-thumb { width: 58px; height: 44px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); background: #f8fafc; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.shop-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.shop-card img { width: 100%; height: 170px; object-fit: cover; background: #eef4ff; }
.shop-card .body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.price { color: var(--primary); font-weight: 900; font-size: 24px; }
.muted { color: var(--muted); }
.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.48); z-index: 30; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { width: min(760px, 100%); max-height: 92vh; overflow: auto; background: #fff; border-radius: 24px; box-shadow: 0 28px 80px rgba(15,23,42,.25); }
.modal-head, .modal-foot { padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); }
.modal-foot { border-top: 1px solid var(--border); border-bottom: 0; justify-content: flex-end; }
.modal-body { padding: 22px; }
.empty { text-align: center; color: var(--muted); padding: 24px; background: #f8fafc; border-radius: 16px; }
.detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.detail-list div { background: #f8fafc; border-radius: 12px; padding: 12px; }
.detail-list b { display: block; color: var(--muted); font-size: 14px; margin-bottom: 5px; }
.mobile-menu { display: none; }
@media (max-width: 980px) {
  .auth-shell, .layout { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .sidebar { position: relative; height: auto; border-radius: 0 0 24px 24px; }
  .nav { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stats-grid, .product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
  .topbar { height: auto; min-height: 72px; flex-direction: column; align-items: flex-start; padding-top: 14px; padding-bottom: 14px; }
  .form-grid, .stats-grid, .product-grid, .detail-list { grid-template-columns: 1fr; }
  .nav { grid-template-columns: 1fr; }
  th, td { padding: 10px 6px; font-size: 12px; }
  .auth-card { padding: 22px; }
  .admin-login-shell { padding: 18px; }
  .admin-login-card { padding: 28px 22px; border-radius: 24px; }
}

/* 用户管理：单一编辑入口与分区式客户编辑器。 */
#modal .modal.user-editor-modal { width: min(1040px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; overflow: hidden; }
#modal .user-editor-modal .modal-head, #modal .user-editor-modal .modal-foot { flex: 0 0 auto; }
#modal .user-editor-modal .modal-body { overflow: auto; padding: 18px 20px; background: #f8fbff; }
.user-edit-form { display: grid; gap: 14px; }
.user-editor-section { min-width: 0; padding: 18px; border: 1px solid #dbe8f5; border-radius: 16px; background: #fff; }
.user-editor-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.user-editor-section-head h4 { margin: 0; color: #203a5e; font-size: 17px; line-height: 1.3; }
.user-editor-section-head p { margin: 5px 0 0; color: #718198; font-size: 13px; line-height: 1.55; }
.user-edit-section-grid { gap: 14px 16px; }
.user-invite-binding-field { padding: 12px; border: 1px solid #fde7bf; border-radius: 12px; background: #fffaf0; }
.user-invite-binding-notice { margin: 0; color: #8d5b11; font-size: 12px; line-height: 1.6; }
.operation-notice { position: fixed; z-index: 10050; top: 22px; right: 24px; max-width: min(420px, calc(100vw - 32px)); padding: 12px 16px; border: 1px solid #d8e6ff; border-radius: 10px; background: #fff; color: #183153; box-shadow: 0 12px 28px rgba(34, 76, 134, .14); font-size: 14px; line-height: 1.5; }
.operation-notice-success { border-color: #b8e7cf; background: #f2fff7; color: #17663b; }
.operation-notice-info { border-color: #cfe0ff; background: #f4f8ff; color: #1d56a3; }
.operation-notice-error { border-color: #ffc9c9; background: #fff7f7; color: #ad3030; }
.user-editor-empty { padding: 18px; border-radius: 12px; color: #718198; background: #f7faff; font-size: 13px; line-height: 1.6; }
.user-asset-adjustments { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.user-asset-adjustment-card { display: grid; min-width: 0; gap: 12px; padding: 14px; border: 1px solid #dbe8f5; border-radius: 14px; background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%); }
.user-asset-balance span, .member-link-editor-summary span { display: block; color: #718198; font-size: 12px; font-weight: 800; }
.user-asset-balance strong { display: block; margin-top: 4px; color: #1d63ed; font-size: 25px; line-height: 1.1; }
.user-asset-balance p { min-height: 36px; margin: 6px 0 0; color: #718198; font-size: 12px; line-height: 1.5; }
.user-asset-adjustment-fields { display: grid; gap: 9px; }
.user-asset-adjustment-fields label { display: grid; gap: 5px; color: #475467; font-size: 12px; font-weight: 800; }
.user-asset-adjustment-fields input { min-width: 0; padding: 10px 11px; border: 1px solid #cfddec; border-radius: 10px; background: #fff; color: #203a5e; }
.user-asset-adjust-btn { width: 100%; min-height: 38px; }
.member-link-editor-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.member-link-editor-summary > div { min-width: 0; padding: 12px; border-radius: 12px; background: #f7faff; }
.member-link-editor-summary strong { display: block; margin-top: 7px; color: #203a5e; font-size: 14px; overflow-wrap: anywhere; }
.member-link-editor-summary .status-pill { width: fit-content; }
.member-link-editor-copy .field { margin-bottom: 10px; }
.member-link-editor-actions { margin-top: 14px; }
.users-card.managed-table-card .data-table col.col-actions { width: 76px; }
.users-card.managed-table-card .data-table td { padding-top: 7px; padding-bottom: 7px; }
.users-card.managed-table-card .data-table td.table-cell-action { height: auto; padding: 6px; }
.users-card.managed-table-card .user-row-actions { width: 64px; }
.users-card.managed-table-card .user-row-actions .mini-btn { min-height: 30px; padding: 6px 8px; }
@media (max-width: 900px) { .user-asset-adjustments { grid-template-columns: 1fr; } .user-asset-balance p { min-height: 0; } }
@media (max-width: 640px) {
  #modal .modal.user-editor-modal { width: min(100%, calc(100vw - 16px)); max-height: calc(100vh - 16px); border-radius: 18px; }
  #modal .user-editor-modal .modal-body { padding: 14px; }
  .user-editor-section { padding: 14px; }
  .user-edit-section-grid, .member-link-editor-summary { grid-template-columns: 1fr; }
  .user-editor-section-head { margin-bottom: 13px; }
  .member-link-editor-actions { display: grid; grid-template-columns: 1fr; }
}

/* 六项修复：客服设置与后台权益流水使用统一的全宽、红增绿减规则。 */
.payment-page {
  max-width: none;
}

.payment-card {
  width: 100%;
}

.payment-basic-grid {
  max-width: 1320px;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.payment-section .payment-field.full,
.payment-section .receipt-template-card {
  max-width: 1440px;
}

.asset-increase { color: #E53935 !important; }
.asset-decrease { color: #16A34A !important; }
.asset-neutral { color: #64748B !important; }

.table-change.asset-increase,
.table-change.asset-decrease,
.table-change.asset-neutral {
  font-weight: 950;
}

@media (max-width: 760px) {
  .payment-card { padding: 16px; }
  .payment-basic-grid { grid-template-columns: 1fr; }
  .payment-section .payment-field.full,
  .payment-section .receipt-template-card { max-width: none; }
}
@media print { .sidebar, .topbar, .actions, .toolbar { display:none; } .layout{display:block;} }
button:disabled { cursor: not-allowed; opacity: .58; }
.category-card { padding: 16px 18px; }
.card-head.compact { margin-bottom: 0; align-items: flex-start; }
.card-head.compact h3 { line-height: 1.35; }
.clamp-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.search-card { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.search-card .search-input { flex: 1 1 320px; }
.switch-row { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: #f8fafc; }
.switch-row p { margin: 6px 0 0; font-size: 13px; }
.switch { position: relative; display: inline-flex; width: 58px; height: 32px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #cbd5e1; box-shadow: inset 0 2px 5px rgba(15,23,42,.12); transition: .2s ease; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 26px; height: 26px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 4px 10px rgba(15,23,42,.2); transition: .2s ease; }
.switch input:checked + span { background: linear-gradient(135deg, var(--primary), var(--success)); }
.switch input:checked + span::before { transform: translateX(26px); }
.close-x { min-width: 38px; height: 38px; padding: 0; border-radius: 50%; font-size: 22px; line-height: 1; }
.table-wrap table th, .table-wrap table td { max-width: 180px; }
@media (max-width: 760px) {
  .search-card { align-items: stretch; }
  .search-card .actions { width: 100%; }
  .search-card .actions button { flex: 1; }
  .switch-row { align-items: flex-start; }
}

.modal-head h3 { margin: 0; font-size: 21px; }
.search-card .field label { font-size: 15px; }
.toolbar .muted { font-size: 14px; font-weight: 700; }

button { transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, opacity .16s ease; }
button:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(15,23,42,.10); }
.stats-page { font-size: 13px; }
.stats-page .card { padding: 16px; margin-bottom: 14px; }
.stats-page .card h3 { font-size: 18px; }
.compact-stats { gap: 12px; }
.compact-stats .stat-card { padding: 15px 16px; border-radius: 16px; }
.compact-stats .stat-card span { font-size: 13px; }
.compact-stats .stat-card strong { margin-top: 7px; font-size: 27px; }
.stat-section .card-head { margin-bottom: 12px; }
.profit-neg { color: var(--success); }
.profit-pos { color: var(--danger); }
.profit-zero { color: #475467; }
.recent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.recent-grid .card { margin-bottom: 0; }
.recent-grid th, .recent-grid td { padding: 8px 8px; font-size: 12px; }
.recent-grid .badge { padding: 4px 8px; font-size: 12px; }
.table-wrap table th, .table-wrap table td { max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
th { font-weight: 900; }
th, td { padding: 11px 9px; }
td { font-size: 12.8px; }
.search-card { padding: 18px; }
.search-card .field input { min-height: 44px; background: #fbfdff; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 14px; color: var(--muted); font-size: 13px; font-weight: 800; }
.pager .secondary-btn { padding: 8px 12px; }
.image-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; border: 1px dashed #cbd5e1; border-radius: 12px; background: #f8fafc; color: #94a3b8; font-size: 13px; font-weight: 800; }
.product-thumb + .image-placeholder, td .image-placeholder { width: 58px; height: 44px; min-height: 44px; }
.shop-card > .image-placeholder { height: 170px; border-radius: 0; border: 0; border-bottom: 1px solid var(--border); }
.product-preview { width: 100%; min-height: 150px; display: flex; align-items: center; justify-content: center; border-radius: 16px; background: #f8fafc; overflow: hidden; border: 1px solid var(--border); }
.product-preview img { width: 100%; max-height: 220px; object-fit: contain; display: block; }
.product-preview .image-placeholder { min-height: 150px; border: 0; }
.order-detail div strong { color: var(--primary-dark); font-size: 15px; }
.detail-note { margin-top: 12px; background: #f8fafc; border-radius: 12px; padding: 12px; }
.detail-note b { display: block; color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.detail-note p { margin: 0; white-space: pre-wrap; line-height: 1.55; }
.detail-actions { margin-top: 16px; display: flex; justify-content: flex-end; }

.order-detail-panel { display: flex; flex-direction: column; gap: 18px; }
.order-detail-summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.order-detail-summary > div { min-width: 0; }
.order-detail-summary span:not(.badge) { display: block; color: var(--muted); font-size: 13px; font-weight: 850; margin-bottom: 6px; }
.order-detail-summary strong { display: block; color: #101828; font-size: clamp(18px, 2.5vw, 24px); font-weight: 950; line-height: 1.2; overflow-wrap: anywhere; }
.order-detail-summary p { margin: 8px 0 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.order-detail-summary .badge { flex: 0 0 auto; margin-top: 2px; }
.order-detail-section { display: grid; gap: 10px; }
.order-detail-section h4 { margin: 0; color: #101828; font-size: 15px; font-weight: 950; }
.order-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.order-metric-card { min-width: 0; padding: 14px; border: 1px solid #dbeafe; border-radius: 16px; background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%); box-shadow: 0 10px 24px rgba(30, 64, 175, .05); }
.order-metric-card span { display: block; color: var(--muted); font-size: 12px; font-weight: 900; margin-bottom: 8px; }
.order-metric-card strong { display: block; color: #172033; font-size: 20px; font-weight: 950; line-height: 1.15; overflow-wrap: anywhere; }
.order-metric-card.primary { border-color: #bfdbfe; background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%); }
.order-metric-card.primary strong { color: var(--primary); font-size: clamp(24px, 3.2vw, 32px); }
.order-metric-card.diamond strong { color: #2563eb; }
.order-metric-card.diamond span::before { content: "💎 "; }
.order-metric-card.refund { border-color: #fed7aa; background: linear-gradient(135deg, #fff7ed 0%, #ffffff 100%); }
.order-metric-card.refund strong { color: #ea580c; }
.order-metric-card.is-muted { background: #f8fafc; border-color: var(--border); box-shadow: none; }
.order-metric-card.is-muted strong { color: #64748b; }
.order-detail-two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.order-detail-two-col > div,
.order-detail-rows,
.order-detail-notes { min-width: 0; padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: #fbfdff; }
.order-detail-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.order-detail-two-col > div { display: grid; gap: 10px; }
.order-detail-row { display: grid; gap: 4px; min-width: 0; }
.order-detail-row span { color: var(--muted); font-size: 12.5px; font-weight: 850; }
.order-detail-row strong { color: #172033; font-size: 14px; font-weight: 850; line-height: 1.45; overflow-wrap: anywhere; }
.order-detail-row.is-muted strong { color: #667085; font-weight: 750; }
.order-detail-notes { display: grid; gap: 12px; }
.order-detail-note-block b { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
.order-detail-note-block p { margin: 0; color: #172033; font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.order-detail-panel .detail-actions { margin-top: 2px; }
@media (max-width: 760px) {
  .order-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-detail-two-col,
  .order-detail-rows { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .order-detail-summary { flex-direction: column; align-items: flex-start; }
  .order-metric-grid { grid-template-columns: 1fr; }
  .order-metric-card.primary strong { font-size: 26px; }
}
@media (max-width: 1180px) { .recent-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .pager { justify-content: center; } .table-wrap { overflow-x: hidden; } .table-wrap table th, .table-wrap table td { max-width: 180px; } }
.quick-modal { max-width: 760px; }
.inline-check { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 13px; font-weight: 800; }
.inline-check input { width: auto; min-height: auto; }
.receipt-box textarea, .invite-card textarea { width: 100%; min-height: 170px; margin: 10px 0 12px; border: 1px solid var(--border); border-radius: 14px; padding: 14px; font-size: 14px; line-height: 1.65; background: #f8fafc; color: #0f172a; resize: vertical; }
.invite-card .badge { font-size: 18px; padding: 8px 14px; }
.small-stat { font-size: 18px !important; line-height: 1.35; }
/* 私域商城新增模块 */
.recent-stack { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; margin-top: 14px; }
.recent-stack .card { width: 100%; margin-bottom: 0; }
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.info-grid div { background: #f8fafc; border: 1px solid var(--border); border-radius: 14px; padding: 12px; min-width: 0; overflow-wrap: anywhere; }
.info-grid b { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.info-grid .wide { grid-column: 1 / -1; }
.qr-box { display: flex; justify-content: center; padding: 16px 0 4px; }
.qr-box img { width: 190px; height: 190px; object-fit: cover; border-radius: 18px; border: 1px solid var(--border); background: #f8fafc; }
.receipt-box textarea, .invite-card textarea, #consultCopy, #wechatCopy { width: 100%; min-height: 130px; margin: 10px 0 12px; border: 1px solid var(--border); border-radius: 14px; padding: 14px; font-size: 14px; line-height: 1.65; background: #f8fafc; color: #0f172a; resize: vertical; }
.quick-modal { max-width: 980px; }
.quick-modal .modal-body { padding-top: 18px; }
.product-grid .shop-card h3 { margin: 0; }
.recent-grid { grid-template-columns: 1fr; }
@media (max-width: 980px) { .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .info-grid { grid-template-columns: 1fr; } .recent-stack .table-wrap { overflow-x: hidden; } }

/* 数据统计看板布局优化 */
.stats-topbar { min-height: 66px; height: auto; padding: 0 28px; }
.stats-topbar h1 { font-size: 26px; font-weight: 950; letter-spacing: -0.02em; color: #101828; }
.stats-topbar .top-actions { justify-content: flex-end; gap: 12px; flex-wrap: nowrap; }
.stats-topbar .account-pill { padding: 10px 16px; border-color: #d8e6f7; box-shadow: 0 8px 22px rgba(30, 64, 175, .06); }
.stats-topbar .primary-btn,
.stats-topbar .secondary-btn,
.stats-topbar .ghost-btn { min-height: 38px; padding: 9px 15px; border-radius: 13px; box-shadow: 0 10px 22px rgba(29, 99, 237, .12); }
.stats-topbar .secondary-btn { background: #e6f2ff; color: #1557c0; }
.stats-topbar .ghost-btn { background: #eef2f7; color: #475467; box-shadow: 0 10px 22px rgba(15, 23, 42, .06); }

.stats-page { display: flex; flex-direction: column; gap: 12px; max-width: 1440px; margin: 0 auto; font-size: 13px; }
.stats-page .card { padding: 16px 18px; margin-bottom: 0; border-color: #dbeafe; border-radius: 22px; background: rgba(255, 255, 255, .96); box-shadow: 0 12px 30px rgba(30, 64, 175, .06); }
.stats-page .card h3 { font-size: 17px; font-weight: 950; color: #172033; }
.dashboard-kpis,
.operation-stats { gap: 12px; }
.dashboard-kpis .stat-card,
.operation-stats .stat-card { min-height: 86px; padding: 15px 18px; border-radius: 18px; border: 1px solid #cfe3fb; background: linear-gradient(135deg, #ffffff 0%, #f5faff 100%); box-shadow: 0 10px 22px rgba(30, 64, 175, .045); }
.dashboard-kpis .stat-card span,
.operation-stats .stat-card span { display: block; color: #61738f; font-size: 12px; font-weight: 900; letter-spacing: .01em; }
.dashboard-kpis .stat-card strong,
.operation-stats .stat-card strong { margin-top: 7px; font-size: clamp(24px, 2.1vw, 32px); line-height: 1.06; font-weight: 950; color: #101828; word-break: break-word; }
.operation-stats .stat-card { min-height: 78px; }
.operation-stats .stat-card strong { font-size: clamp(22px, 1.8vw, 29px); }
.operation-stats .profit-neg strong { color: var(--success); }
.operation-stats .profit-pos strong { color: var(--danger); }
.operation-stats .profit-zero strong { color: #475467; }
.stat-section { margin-top: 2px; }
.stat-section-head { align-items: center; margin-bottom: 12px; }
.stats-filter { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.stats-filter button { padding: 7px 12px; border-radius: 999px; background: #edf4fb; color: #344054; font-size: 12px; font-weight: 900; }
.stats-filter button.active { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 12px 24px rgba(29,99,237,.18); }
.custom-stats-form { margin-top: 4px; }
.recent-stack { gap: 10px; margin-top: 0; }
.recent-stack .card-head { margin-bottom: 9px; }
.recent-stack .table-wrap { overflow-x: hidden; }
.stats-page .card-head { min-height: auto; gap: 10px; }
.stats-page .table-wrap th,
.stats-page .table-wrap td { padding: 6px 8px; font-size: 11.8px; line-height: 1.25; }
.stats-page .table-wrap th { font-size: 11.5px; }
.stats-page .badge { padding: 3px 7px; font-size: 11px; }
.stats-page .mini-btn { padding: 6px 10px; font-size: 12px; }

/* 数据统计页：最近记录模块标题与表格列中线对齐优化 */
.stats-page .stats-recent-card {
  padding: 18px 20px 20px;
  border-color: #d8e6f7;
  overflow: hidden;
}
.stats-page .stats-recent-head {
  min-height: 38px;
  align-items: center;
  margin: 0 0 12px;
  padding: 0 2px;
}
.stats-page .stats-recent-head h3 {
  display: flex;
  align-items: center;
  min-height: 32px;
  line-height: 1.25;
}
.stats-page .stats-recent-head .mini-btn {
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 10px;
}
.stats-page .stats-recent-card .data-table-wrap,
.stats-page .stats-recent-card .table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
.stats-page .stats-recent-card table.data-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #edf2f8;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}
.stats-page .stats-recent-card table.data-table th,
.stats-page .stats-recent-card table.data-table td {
  max-width: none;
  min-width: 0;
  height: 42px;
  padding: 10px 9px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stats-page .stats-recent-card table.data-table th {
  height: 40px;
  color: #475467;
  background: #f6f9fd;
  border-bottom: 1px solid #e8eef6;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.3;
}
.stats-page .stats-recent-card table.data-table td {
  color: #344054;
  border-bottom: 1px solid #f0f4f9;
  font-size: 12px;
  line-height: 1.4;
}
.stats-page .stats-recent-card table.data-table tbody tr:last-child td {
  border-bottom: 0;
}
.stats-page .stats-recent-card table.data-table tbody tr:hover td {
  background: #f8fbff;
}
.stats-page .stats-recent-card table.data-table td .table-cell-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  text-align: center;
  overflow: hidden;
}
.stats-page .stats-recent-card table.data-table .table-cell-ellipsis,
.stats-page .stats-recent-card table.data-table .table-money-text {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100% !important;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stats-page .stats-recent-card table.data-table .badge {
  margin-left: auto;
  margin-right: auto;
}
.stats-page .stats-orders-card table.data-table col.col-key-orderNo { width: 16%; }
.stats-page .stats-orders-card table.data-table col.col-key-username { width: 12%; }
.stats-page .stats-orders-card table.data-table col.col-key-productName { width: 22%; }
.stats-page .stats-orders-card table.data-table col.col-key-payable { width: 10%; }
.stats-page .stats-orders-card table.data-table col.col-key-usePoints { width: 10%; }
.stats-page .stats-orders-card table.data-table col.col-key-status { width: 12%; }
.stats-page .stats-orders-card table.data-table col.col-key-createdAt { width: 18%; }
.stats-page .stats-points-card table.data-table col.col-key-id { width: 14%; }
.stats-page .stats-points-card table.data-table col.col-key-username { width: 12%; }
.stats-page .stats-points-card table.data-table col.col-key-change { width: 10%; }
.stats-page .stats-points-card table.data-table col.col-key-type { width: 16%; }
.stats-page .stats-points-card table.data-table col.col-key-relatedOrderNo { width: 17%; }
.stats-page .stats-points-card table.data-table col.col-key-time { width: 18%; }
.stats-page .stats-points-card table.data-table col.col-key-remark { width: 13%; }


@media (max-width: 1180px) {
  .stats-topbar { align-items: flex-start; flex-direction: column; padding: 18px 24px; }
  .stats-topbar .top-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
}
@media (max-width: 980px) {
  .dashboard-kpis,
  .operation-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .stats-topbar h1 { font-size: 26px; }
  .dashboard-kpis,
  .operation-stats { grid-template-columns: 1fr; }
  .stat-section-head { align-items: flex-start; flex-direction: column; }
  .stats-filter { justify-content: flex-start; }
}

/* 商品本地封面图、比例与游客价格提示 */
.upload-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.guest-price-tip { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: linear-gradient(135deg, #eff6ff, #ffffff); color: var(--primary-dark); font-weight: 800; }
.guest-price-tip span { color: var(--muted); font-size: 14px; font-weight: 700; }
.shop-image { width: 100%; background: #eef4ff; overflow: hidden; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.shop-image.ratio-1-1 { aspect-ratio: 1 / 1; }
.shop-image.ratio-3-4 { aspect-ratio: 3 / 4; }
.shop-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-image .image-placeholder { height: 100%; min-height: 180px; border: 0; border-radius: 0; }
.shop-card > img { height: auto; }
.product-preview img { width: 100%; height: 220px; max-height: 220px; object-fit: cover; display: block; }
@media (max-width: 640px) { .guest-price-tip { align-items: flex-start; flex-direction: column; } }

/* 商品分类、固定 1:1 封面与密码设置优化 */
.inline-input-actions { display: flex; gap: 8px; align-items: center; }
.inline-input-actions input { min-width: 180px; }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.category-card { text-align: left; border: 1px solid var(--border); border-radius: 18px; background: #fff; box-shadow: var(--shadow); padding: 16px 18px; color: var(--text); display: flex; flex-direction: column; gap: 8px; }
.category-card strong { font-size: 17px; }
.category-card span { color: var(--muted); font-weight: 800; font-size: 13px; }
.category-card.active { border-color: var(--primary-2); background: linear-gradient(135deg, #eff6ff, #ffffff); color: var(--primary-dark); }
.shop-section { margin-bottom: 22px; }
.shop-section .card-head { margin: 4px 0 12px; }
.product-thumb { width: 58px; height: 58px; aspect-ratio: 1 / 1; object-fit: cover; }
.shop-card img { height: 100%; object-fit: cover; }
.shop-image, .shop-image.ratio-1-1, .shop-image.ratio-3-4 { aspect-ratio: 1 / 1; }
.product-preview { aspect-ratio: 1 / 1; min-height: 220px; }
.product-preview img { height: 100%; max-height: none; object-fit: cover; }
@media (max-width: 980px) { .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .category-grid { grid-template-columns: 1fr; } .inline-input-actions { align-items: stretch; flex-direction: column; } }

/* 客服设置客服二维码上传 */
.qr-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  min-height: 220px;
  max-width: 100%;
  border: 1px dashed var(--border);
  border-radius: 18px;
  background: #f8fafc;
  padding: 14px;
}
.qr-preview img {
  width: 190px;
  height: 190px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
}
.qr-placeholder {
  width: 190px;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.5;
  border-radius: 14px;
  background: #eef4ff;
  padding: 16px;
}

/* 本轮优化：快捷录单蓝钻按钮、分类 Emoji、充值订单分页、等级图标、收款按钮 */
.quick-diamond-row {
  align-items: stretch;
}
.quick-diamond-row input {
  min-width: 120px;
}
.quick-diamond-row .mini-btn {
  min-height: 44px;
  padding-left: 14px;
  padding-right: 14px;
}
.emoji-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8fbff;
}
.emoji-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #fff;
  color: #344054;
  font-size: 13px;
  font-weight: 850;
}
.emoji-choice span,
.emoji-cell {
  font-size: 18px;
  line-height: 1;
}
.emoji-choice small {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.emoji-choice.active {
  border-color: var(--primary-2);
  background: linear-gradient(135deg, #e0f2fe, #eff6ff);
  color: var(--primary-dark);
  box-shadow: 0 10px 22px rgba(14, 165, 233, .14);
}
.emoji-choice.active small {
  color: var(--primary-dark);
}
.level-badge,
.member-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.member-level-badge {
  position: relative;
  isolation: isolate;
  padding: 6px 11px 6px 9px;
  border: 1px solid rgba(148, 163, 184, .32);
  border-radius: 999px;
  background: linear-gradient(135deg, #f8fafc, #e5e7eb);
  color: #475569;
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78), 0 8px 18px rgba(15,23,42,.07);
}
.member-level-badge::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(circle at 22% 18%, rgba(255,255,255,.8), transparent 34%);
}
.level-crown {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255,255,255,.55);
  font-size: 14px;
  box-shadow: inset 0 1px 2px rgba(255,255,255,.8);
}
.level-sparkle { font-size: 12px; letter-spacing: -2px; }
.member-level-badge.level-bronze {
  border-color: rgba(180, 83, 9, .34);
  background: linear-gradient(135deg, #fff7ed, #d97706 58%, #92400e);
  color: #fff7ed;
  text-shadow: 0 1px 1px rgba(120, 53, 15, .35);
}
.member-level-badge.level-silver {
  border-color: rgba(100, 116, 139, .34);
  background: linear-gradient(135deg, #ffffff, #cbd5e1 48%, #64748b);
  color: #1e293b;
}
.member-level-badge.level-gold {
  border-color: rgba(217, 119, 6, .44);
  background: linear-gradient(135deg, #fff7cc, #f59e0b 48%, #b45309);
  color: #451a03;
}
.member-level-badge.level-diamond {
  border-color: rgba(37, 99, 235, .42);
  background: linear-gradient(135deg, #eff6ff, #38bdf8 42%, #7c3aed);
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(30, 64, 175, .38);
}
.member-level-badge.level-purple {
  border-color: rgba(147, 51, 234, .42);
  background: linear-gradient(135deg, #faf5ff, #a855f7 42%, #4c1d95);
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(76, 29, 149, .38);
}
.member-level-badge.level-supreme {
  border-color: rgba(245, 158, 11, .5);
  background: linear-gradient(135deg, #fff7ed, #f59e0b 30%, #7c3aed 70%, #111827);
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(17, 24, 39, .45);
}
.account-pill .member-level-badge { margin-left: 4px; padding: 4px 8px 4px 6px; }
.account-pill .level-crown { width: 18px; height: 18px; font-size: 12px; }
.level-stat-card strong { font-size: 20px; }
.level-stat-card .member-level-badge { padding: 8px 13px 8px 10px; font-size: 14px; }
.user-account-tools .card-head { margin-bottom: 8px; }
.orders-card .table-wrap,
.points-card .table-wrap {
  overflow-x: hidden;
}
.orders-card table,
.points-card table {
  border-collapse: separate;
  border-spacing: 0 6px;
}
.orders-card th,
.points-card th {
  padding: 11px 7px 12px;
  border-bottom: 0;
  font-size: 12px;
  line-height: 1.35;
}
.orders-card td,
.points-card td {
  padding: 12px 7px;
  border-top: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
  font-size: 12px;
  line-height: 1.45;
}
.orders-card tbody tr td:first-child,
.points-card tbody tr td:first-child {
  border-left: 1px solid #eef2f7;
  border-radius: 12px 0 0 12px;
}
.orders-card tbody tr td:last-child,
.points-card tbody tr td:last-child {
  border-right: 1px solid #eef2f7;
  border-radius: 0 12px 12px 0;
}
.orders-card tbody tr:hover td,
.points-card tbody tr:hover td {
  background: #f8fbff;
}
.orders-card .mini-btn {
  padding: 7px 9px;
  font-size: 12px;
}
.orders-card .actions {
  gap: 6px;
  flex-wrap: nowrap;
}
.filters .user-add-btn {
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 12px 26px rgba(29, 99, 237, .22);
  font-weight: 900;
}
.filters .user-add-btn:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: 0 14px 30px rgba(29, 99, 237, .28);
}
.payment-upload-actions {
  gap: 12px;
  margin-top: 2px;
}
.payment-upload-btn,
.payment-clear-btn {
  min-height: 44px;
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.payment-upload-btn {
  color: #1557c0;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
}
.payment-clear-btn {
  color: #b42318;
  background: #fff1f2;
  border: 1px solid #ffe4e6;
}
.payment-upload-btn:hover,
.payment-clear-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, .09);
}
.payment-save-row {
  align-items: center;
  margin-top: 8px;
}
.payment-save-btn {
  min-height: 46px;
  width: min(360px, 100%);
}
#paymentQrPreview {
  margin-top: 2px;
}
@media (max-width: 760px) {
  .orders-card .table-wrap,
  .points-card .table-wrap { overflow-x: hidden; }
  .payment-upload-actions { align-items: stretch; }
  .payment-upload-actions > * { flex: 1; }
}

/* 本次优化：后台表格分页、会员徽章、菜单拖拽、客服设置 */
.nav button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  cursor: grab;
  user-select: none;
}
.nav button:active { cursor: grabbing; }
.nav button.dragging {
  opacity: .58;
  background: rgba(255,255,255,.22);
  box-shadow: 0 14px 28px rgba(15, 23, 42, .18);
}
.nav-drag-handle {
  color: rgba(255,255,255,.58);
  font-size: 13px;
  line-height: 1;
}
.member-level-badge {
  gap: 7px;
  min-height: 28px;
  padding: 6px 12px;
  border: 1px solid #d7dee9;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffffff, #eef2f7);
  color: #475569;
  font-size: 12.5px;
  font-weight: 950;
  letter-spacing: .01em;
  text-shadow: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 18px rgba(15,23,42,.06);
}
.member-level-badge::before { display: none; }
.level-mark {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: currentColor;
  font-size: 10px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
}
.member-level-badge.level-bronze {
  border-color: #d9b38a;
  background: linear-gradient(135deg, #fff8f0, #ead0b1);
  color: #8a4b18;
}
.member-level-badge.level-silver {
  border-color: #c6d3e2;
  background: linear-gradient(135deg, #ffffff, #dfe7f0);
  color: #40546d;
}
.member-level-badge.level-gold {
  border-color: #f0cf75;
  background: linear-gradient(135deg, #fff9d7, #f4c94f);
  color: #6f4800;
}
.member-level-badge.level-diamond,
.member-level-badge.level-purple,
.member-level-badge.level-supreme {
  border-color: rgba(96, 165, 250, .55);
  background: linear-gradient(135deg, #e0f2fe, #60a5fa 45%, #8b5cf6);
  color: #fff;
  text-shadow: 0 1px 1px rgba(30, 64, 175, .25);
}
.account-pill .member-level-badge { margin-left: 4px; padding: 4px 9px; min-height: 24px; }
.level-stat-card .member-level-badge { padding: 8px 14px; font-size: 14px; }
.managed-table-card .table-wrap {
  overflow-x: hidden;
}
.managed-table-card table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0 7px;
}
.managed-table-card th {
  padding: 11px 8px 12px;
  border-bottom: 0;
  color: #475467;
  font-size: 12px;
  line-height: 1.35;
}
.managed-table-card td {
  padding: 13px 8px;
  border-top: 1px solid #edf2f7;
  border-bottom: 1px solid #edf2f7;
  background: #fff;
  font-size: 12px;
  line-height: 1.45;
  vertical-align: middle;
}
.managed-table-card tbody tr td:first-child {
  border-left: 1px solid #edf2f7;
  border-radius: 13px 0 0 13px;
}
.managed-table-card tbody tr td:last-child {
  border-right: 1px solid #edf2f7;
  border-radius: 0 13px 13px 0;
}
.managed-table-card tbody tr:hover td { background: #f8fbff; }
.managed-table-card .actions {
  gap: 6px;
  flex-wrap: wrap;
}
.managed-table-card .mini-btn {
  padding: 7px 9px;
  font-size: 12px;
  border-radius: 9px;
}
.page-select-pager {
  padding-top: 16px;
}
.page-select-pager label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.page-select-pager select {
  min-width: 132px;
  min-height: 38px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 8px 34px 8px 12px;
  background: #f8fbff;
  color: var(--primary-dark);
  font-weight: 900;
  outline: none;
}
.page-select-pager select:focus {
  border-color: var(--primary-2);
  box-shadow: 0 0 0 4px rgba(14,165,233,.12);
}
.payment-card {
  padding: 24px;
  border-color: #dbeafe;
  background: linear-gradient(180deg, #fff, #fbfdff);
}
.payment-head {
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid #eef2f7;
}
.payment-head .muted { margin: 8px 0 0; }
.payment-form {
  margin-top: 18px;
  gap: 18px;
}
.payment-field,
.payment-upload-panel {
  padding: 16px;
  border: 1px solid #e6eef8;
  border-radius: 18px;
  background: #ffffff;
}
.payment-field input,
.payment-field textarea {
  min-height: 46px;
  background: #fbfdff;
}
.payment-field textarea { min-height: 150px; line-height: 1.65; }
.payment-upload-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  align-items: center;
  gap: 18px;
}
.payment-upload-panel label { color: #344054; font-weight: 800; font-size: 15px; }
.payment-upload-actions { margin-top: 14px; }
.payment-upload-btn { background: #e0f2fe; border-color: #bae6fd; color: #1557c0; }
.payment-clear-btn { background: #fff1f2; border-color: #fecdd3; color: #be123c; }
.payment-save-row { align-items: flex-end; }
.payment-save-btn { width: min(360px, 100%); min-height: 48px; }
.payment-card .qr-preview { justify-self: center; }
@media (max-width: 900px) {
  .payment-upload-panel { grid-template-columns: 1fr; }
  .payment-card .qr-preview { justify-self: start; }
}
@media (max-width: 760px) {
  .managed-table-card .table-wrap { overflow-x: hidden; }
  .managed-table-card table { table-layout: auto; }
}

/* 会员中心概览优化 */
.top-password-btn {
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #bae6fd;
  box-shadow: 0 8px 18px rgba(14, 165, 233, .12);
}
.stat-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.45;
}
.user-center-card .card-head {
  margin-bottom: 14px;
}
.user-center-card .empty {
  margin: 0;
}

/* 本次需求：会员中心、邀请按钮、后台简洁菜单与手机端适配 */
html, body { max-width: 100%; overflow-x: hidden; }
* { box-sizing: border-box; }
.nav button {
  justify-content: flex-start;
  cursor: pointer;
  user-select: auto;
}
.nav button:active { cursor: pointer; }
.member-record-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.member-record-card {
  border: 1px solid #e6eef8;
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(180deg, #fff, #fbfdff);
  min-width: 0;
}
.record-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.record-main strong,
.record-title { overflow-wrap: anywhere; }
.record-title {
  color: #172033;
  font-weight: 900;
  margin-bottom: 10px;
}
.record-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.record-grid span {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 12px;
  background: #f8fafc;
  color: #172033;
  overflow-wrap: anywhere;
}
.record-grid .wide { grid-column: 1 / -1; }
.record-grid b {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}
.change.positive { color: #16a34a; }
.change.negative { color: #dc2626; }
.member-full-list { max-width: 100%; overflow-x: hidden; }
.invite-copy-actions {
  margin-top: 16px;
  align-items: stretch;
}
.invite-copy-btn {
  min-height: 44px;
  min-width: 150px;
  justify-content: center;
}
.invite-copy-btn.copied {
  color: #fff !important;
  background: linear-gradient(135deg, #1d63ed, #0ea5e9) !important;
  border-color: #0ea5e9 !important;
  box-shadow: 0 14px 30px rgba(29, 99, 237, .24);
}
.invite-reward-desc {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #eff6ff;
}
.invite-reward-desc b {
  display: block;
  color: #1557c0;
  margin-bottom: 6px;
}
.invite-reward-desc p {
  margin: 0;
  line-height: 1.65;
  color: #344054;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 640px) {
  .layout { width: 100%; }
  .sidebar { padding: 16px 14px; }
  .brand { padding-bottom: 12px; }
  .nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .nav button { min-height: 42px; justify-content: center; text-align: center; padding: 10px 8px; font-size: 14px; }
  .content, .topbar { padding-left: 12px; padding-right: 12px; }
  .card { padding: 16px; border-radius: 18px; }
  .card-head { align-items: flex-start; flex-wrap: wrap; }
  .top-actions { width: 100%; align-items: stretch; }
  .top-actions > * { min-height: 40px; }
  .account-pill { width: 100%; border-radius: 14px; overflow-wrap: anywhere; }
  .category-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; gap: 14px; }
  .shop-card img { height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
  .shop-card .body .primary-btn { min-height: 42px; }
  .user-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .record-grid { grid-template-columns: 1fr; }
  .modal-mask { padding: 10px; align-items: flex-start; overflow-y: auto; }
  .modal { width: 100%; max-height: calc(100vh - 20px); border-radius: 18px; overflow-x: hidden; }
  .modal-head, .modal-foot, .modal-body { padding-left: 14px; padding-right: 14px; }
  .modal-foot { flex-wrap: wrap; }
  .modal-foot button { min-height: 42px; flex: 1; }
  .invite-copy-actions { flex-direction: column; }
  .invite-copy-btn { width: 100%; min-height: 46px; }
  .auth-shell { min-height: 100vh; }
  .auth-panel { padding: 14px; }
  .auth-card { width: 100%; padding: 18px; border-radius: 20px; }
  input, select, textarea, button { max-width: 100%; }
  .field input, .field select, .field textarea { min-height: 44px; }
}
@media (max-width: 390px) {
  .user-summary-grid { grid-template-columns: 1fr; }
  .nav { grid-template-columns: 1fr; }
}

/* 新客首单价与后台表格修复 */
.price-stack { display: grid; gap: 6px; min-width: 0; }
.first-order-price { color: #dc2626; font-weight: 950; overflow-wrap: anywhere; }
.deal-tip { display: inline-flex; width: fit-content; max-width: 100%; padding: 5px 9px; border-radius: 999px; background: #fff1f2; color: #be123c; font-size: 12.5px; font-weight: 900; }
.first-order-panel { padding: 14px; border: 1px solid #dbeafe; border-radius: 16px; background: #f8fbff; }
.first-order-extra textarea { min-height: 70px; }
.quick-price-info { margin-top: 0; }
.nav-drag-handle, .nav button.dragging::before { display: none !important; }
.nav button:active { cursor: pointer; }

.users-card.managed-table-card,
.orders-card.managed-table-card,
.points-card.managed-table-card,
.invites-card.managed-table-card { padding: 16px; }
.managed-table-card .table-wrap { overflow-x: hidden; }
.managed-table-card table { table-layout: fixed; border-collapse: collapse; border-spacing: 0; min-width: 0; }
.managed-table-card th { padding: 10px 8px; border-bottom: 1px solid #e5eaf2; white-space: nowrap; }
.managed-table-card td { height: 64px; max-height: 72px; padding: 8px; border-top: 0; border-bottom: 1px solid #edf2f7; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.managed-table-card tbody tr td:first-child,
.managed-table-card tbody tr td:last-child { border-radius: 0; }
.managed-table-card .actions { max-height: 56px; overflow: hidden; gap: 5px; align-content: center; }
.managed-table-card .mini-btn { min-height: 28px; padding: 5px 8px; font-size: 12px; }
.users-card.managed-table-card table { min-width: 0; }
.orders-card.managed-table-card table { min-width: 0; }
.points-card.managed-table-card table,
.invites-card.managed-table-card table { min-width: 0; }

@media (max-width: 640px) {
  .guest-price-tip { align-items: flex-start; flex-direction: column; }
  .category-grid, .product-grid { grid-template-columns: 1fr !important; }
  .shop-card, .shop-card .body { min-width: 0; }
  .price, .first-order-price { font-size: 21px; line-height: 1.25; }
  .deal-tip { width: 100%; justify-content: center; }
  .user-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .member-record-card { padding: 12px; }
  .record-main { align-items: flex-start; flex-direction: column; }
  .record-grid { grid-template-columns: 1fr !important; }
  .detail-list { grid-template-columns: 1fr !important; }
  .quick-modal .info-grid { grid-template-columns: 1fr; }
  .quick-diamond-row { flex-direction: column; align-items: stretch; }
  .quick-diamond-row .mini-btn { min-height: 40px; }
  .invite-copy-btn, .primary-btn, .secondary-btn, .ghost-btn, .danger-btn { min-height: 42px; }
  .auth-tabs button, .auth-card .primary-btn, .auth-card .secondary-btn { min-height: 44px; }
}
@media (max-width: 390px) {
  .user-summary-grid { grid-template-columns: 1fr !important; }
}

/* 本次优化：后台分页下拉框与卡片/背景自然衔接，避免页面底部白边 */
html,
body,
#app {
  min-height: 100%;
  background: var(--bg);
}
.layout,
.main,
.content {
  background: var(--bg);
}
.main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.content {
  flex: 1;
  min-height: calc(100vh - 72px);
  padding-bottom: 28px;
}
.managed-table-card {
  margin-bottom: 0;
}
.managed-table-card .table-wrap {
  margin-bottom: 0;
}
.page-select-pager {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #edf2f7;
  justify-content: flex-end;
}
.page-select-pager:empty {
  display: none;
}
.users-card.managed-table-card .actions {
  flex-wrap: nowrap;
  max-height: none;
}
.costs-card.managed-table-card table { min-width: 0; }

/* 后台整体布局与列表分页规范修复 */
html,
body,
#app {
  min-height: 100vh;
  background: var(--bg);
}

body:has(.layout) {
  overflow: hidden;
}

.layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

.sidebar {
  position: sticky;
  top: 0;
  width: 248px;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}

.nav {
  overflow-y: auto;
  padding-right: 2px;
}

/* PC端后台：隐藏左侧菜单滚动条，但保留菜单滚动能力 */
@media (min-width: 981px) {
  .layout:not(.user-layout) .sidebar,
  .layout:not(.user-layout) .nav {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .layout:not(.user-layout) .sidebar::-webkit-scrollbar,
  .layout:not(.user-layout) .nav::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }
}

.local-tip {
  flex-shrink: 0;
}

.main {
  flex: 1;
  min-width: 0;
  min-height: 100vh;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--bg);
}

.content {
  min-height: calc(100vh - 72px);
  padding: 28px;
  background: var(--bg);
}

.card {
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.products-card.managed-table-card,
.users-card.managed-table-card,
.levels-card.managed-table-card,
.orders-card.managed-table-card,
.points-card.managed-table-card,
.invites-card.managed-table-card,
.costs-card.managed-table-card {
  padding: 16px;
  margin-bottom: 0;
}

.managed-table-card .table-wrap {
  margin-bottom: 0;
  overflow-x: hidden;
}

.managed-table-card table {
  table-layout: fixed;
  border-collapse: collapse;
  border-spacing: 0;
  min-width: 0;
}

.managed-table-card th {
  padding: 10px 8px;
  border-bottom: 1px solid #e5eaf2;
  white-space: nowrap;
  line-height: 1.3;
}

.managed-table-card td {
  height: 56px;
  max-height: 64px;
  padding: 7px 8px;
  border-top: 0;
  border-bottom: 1px solid #edf2f7;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
}

.managed-table-card tbody tr td:first-child,
.managed-table-card tbody tr td:last-child {
  border-radius: 0;
}

.managed-table-card .actions {
  flex-wrap: nowrap;
  gap: 5px;
  max-height: none;
  overflow: visible;
  align-items: center;
}

.managed-table-card .mini-btn {
  min-height: 28px;
  padding: 5px 8px;
  font-size: 12px;
  line-height: 1.2;
}

.products-card.managed-table-card table,
.levels-card.managed-table-card table,
.costs-card.managed-table-card table {
  min-width: 0;
}

.users-card.managed-table-card table,
.points-card.managed-table-card table,
.invites-card.managed-table-card table {
  min-width: 0;
}

.orders-card.managed-table-card table {
  min-width: 0;
}

.managed-table-card .product-thumb,
.product-thumb {
  width: 46px;
  height: 46px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.managed-table-card .image-placeholder,
.managed-table-card td .image-placeholder {
  width: 46px;
  height: 46px;
  min-height: 46px;
}

.page-select-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #edf2f7;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.page-select-pager label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.page-select-pager select {
  min-width: 126px;
  min-height: 34px;
  padding-top: 6px;
  padding-bottom: 6px;
}

@media (max-width: 980px) {
  body:has(.layout) {
    overflow: auto;
  }

  .layout {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    min-height: auto;
    overflow: visible;
  }

  .nav {
    overflow: visible;
  }

  .main {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }
}

@media (max-width: 640px) {
  .content {
    padding: 18px 12px;
  }

  .page-select-pager {
    justify-content: center;
  }
}

/* 本次需求：上一页/下一页分页、用户管理操作栏、会员中心更多按钮与手机端细节 */
.button-pager {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #edf2f7;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.button-pager span {
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
}
.button-pager .secondary-btn {
  min-width: 76px;
  min-height: 36px;
  padding: 8px 12px;
}
.user-row-actions {
  flex-direction: column;
  align-items: stretch !important;
  justify-content: center;
  gap: 6px !important;
  max-height: none !important;
}
.user-row-actions .mini-btn {
  width: 76px;
  min-height: 26px;
  padding: 5px 8px;
}
.users-card.managed-table-card td:last-child {
  white-space: normal;
  overflow: visible;
}
.member-section-head {
  justify-content: flex-start;
  align-items: flex-start;
}
.member-title-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.member-more-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 22px rgba(29,99,237,.18);
  min-height: 34px;
  min-width: 62px;
}
@media (max-width: 760px) {
  .pager.button-pager { justify-content: flex-end; gap: 8px; }
  .button-pager .secondary-btn { min-height: 40px; }
  .member-full-list .button-pager { justify-content: center; }
}
@media (max-width: 430px) {
  .user-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  .stat-card { padding: 14px; min-width: 0; }
  .stat-card strong { font-size: 24px; overflow-wrap: anywhere; }
  .stat-help { font-size: 12px; }
  .member-title-actions { width: 100%; justify-content: flex-start; }
  .member-more-btn { min-height: 40px; }
  .record-grid span, .record-main strong, .record-title { max-width: 100%; }
  .button-pager { justify-content: center; }
}
@media (max-width: 390px) {
  .user-summary-grid { grid-template-columns: 1fr !important; }
  .button-pager { gap: 6px; }
  .button-pager .secondary-btn { min-width: 72px; padding-left: 10px; padding-right: 10px; }
}

/* 新客权益与移动端防溢出优化 */
html, body, #app { max-width: 100%; overflow-x: hidden; }
.shop-card, .shop-card .body, .price-stack, .deal-tip, .first-order-price, .detail-list div { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.deal-tip { display: inline-flex; align-items: center; width: fit-content; max-width: 100%; padding: 5px 9px; border-radius: 999px; background: #fff7ed; color: #c2410c; font-size: 12px; font-weight: 900; line-height: 1.35; }
.quick-price-info div { overflow-wrap: anywhere; }
@media (max-width: 430px) {
  .content { padding-left: 12px; padding-right: 12px; }
  .shop-card .body { padding: 14px; gap: 9px; }
  .shop-card .body h3 { font-size: 17px; line-height: 1.3; }
  .price-stack { gap: 5px; }
  .deal-tip { width: 100%; justify-content: center; text-align: center; border-radius: 12px; }
  .modal-mask { padding-left: 8px; padding-right: 8px; }
  .modal .actions { gap: 8px; }
  .modal .actions button { min-height: 42px; flex: 1 1 140px; }
  .invite-copy-actions { flex-direction: column; align-items: stretch; }
}
@media (max-width: 390px) {
  .content { padding-left: 10px; padding-right: 10px; }
  .price, .first-order-price { font-size: 19px; }
  .modal-head h3 { font-size: 18px; }
}
@media (max-width: 375px) {
  .content { padding-left: 8px; padding-right: 8px; }
  .shop-card .body { padding: 12px; }
  .category-card, .filters button { min-width: 0; }
}

/* 本次优化：简化商品价格配置与充值订单表格防溢出 */
.section-title h3 { margin: 0 0 6px; }
.price-config-card {
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: #f8fbff;
}
.price-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.price-config-grid .field { min-width: 0; }
.member-price-card { background: #fff; }
.products-card.managed-table-card table { min-width: 0; }
.orders-card.managed-table-card table { min-width: 0; }
.products-card.managed-table-card td:nth-child(2),
.orders-card.managed-table-card td:nth-child(2),
.orders-card.managed-table-card td:nth-child(3) {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.orders-card.managed-table-card td:first-child {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .product-form.form-grid,
  .price-config-grid { grid-template-columns: 1fr; }
  .price-config-card { padding: 14px; border-radius: 16px; }
  .products-card.managed-table-card .table-wrap,
  .orders-card.managed-table-card .table-wrap { overflow-x: hidden; }
  .products-card.managed-table-card table,
  .orders-card.managed-table-card table,
  .products-card.managed-table-card thead,
  .orders-card.managed-table-card thead,
  .products-card.managed-table-card tbody,
  .orders-card.managed-table-card tbody,
  .products-card.managed-table-card tr,
  .orders-card.managed-table-card tr,
  .products-card.managed-table-card td,
  .orders-card.managed-table-card td { display: block; width: 100%; min-width: 0; }
  .products-card.managed-table-card thead,
  .orders-card.managed-table-card thead { display: none; }
  .products-card.managed-table-card tr,
  .orders-card.managed-table-card tr {
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid #edf2f7;
    border-radius: 16px;
    background: #fff;
  }
  .products-card.managed-table-card td,
  .orders-card.managed-table-card td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    height: auto;
    max-height: none;
    padding: 8px 0;
    border-bottom: 1px dashed #edf2f7;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
  }
  .products-card.managed-table-card td::before,
  .orders-card.managed-table-card td::before {
    content: attr(data-label);
    flex: 0 0 92px;
    color: var(--muted);
    font-weight: 900;
  }
  .products-card.managed-table-card td:last-child,
  .orders-card.managed-table-card td:last-child { border-bottom: 0; }
  .products-card.managed-table-card .actions,
  .orders-card.managed-table-card .actions { flex-wrap: wrap; justify-content: flex-end; }
  .products-card.managed-table-card .mini-btn,
  .orders-card.managed-table-card .mini-btn { min-height: 38px; }
}

/* 本次优化：统一会员等级标签、用户管理与快捷录单移动端适配 */
.member-level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  min-width: 86px;
  height: 26px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #d8dee8;
  background: linear-gradient(135deg, #ffffff, #f1f5f9);
  color: #475569;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 6px 14px rgba(15,23,42,.06);
  vertical-align: middle;
  overflow: hidden;
}
.member-level-badge::before { display: none; }
.level-mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 16px;
  width: 16px;
  min-width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: currentColor;
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55);
}
.level-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-level-badge.level-normal {
  border-color: #d8dee8;
  background: linear-gradient(135deg, #ffffff, #f1f5f9);
  color: #64748b;
}
.member-level-badge.level-bronze {
  border-color: #d7a16f;
  background: linear-gradient(135deg, #fff7ed, #f1c08d 58%, #b7793d);
  color: #74340f;
}
.member-level-badge.level-silver {
  border-color: #b9c8db;
  background: linear-gradient(135deg, #ffffff, #dbeafe 55%, #94a3b8);
  color: #334155;
}
.member-level-badge.level-gold {
  border-color: #e9bd39;
  background: linear-gradient(135deg, #fffbeb, #facc15 58%, #d97706);
  color: #713f12;
}
.member-level-badge.level-diamond,
.member-level-badge.level-purple,
.member-level-badge.level-supreme {
  border-color: rgba(124, 58, 237, .58);
  background: linear-gradient(135deg, #e0f2fe, #3b82f6 46%, #8b5cf6);
  color: #fff;
  text-shadow: 0 1px 1px rgba(30,64,175,.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.36), 0 8px 18px rgba(79,70,229,.18);
}
.account-pill .member-level-badge,
.level-stat-card .member-level-badge {
  min-width: 86px;
  height: 26px;
  min-height: 26px;
  padding: 0 10px;
  font-size: 12px;
}
.users-card.managed-table-card table th,
.users-card.managed-table-card table td { max-width: 124px; }
.users-card.managed-table-card table th:last-child,
.users-card.managed-table-card table td:last-child { width: 88px; max-width: 88px; }
.user-edit-form .field { min-width: 0; }
#quickFirstOrderTip { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .managed-table-card .table-wrap { overflow-x: hidden; }
  .managed-table-card table { table-layout: fixed; }
  .users-card.managed-table-card th,
  .users-card.managed-table-card td { padding: 8px 5px; font-size: 11.5px; }
  .users-card.managed-table-card table th,
  .users-card.managed-table-card table td { max-width: 82px; }
  .user-row-actions .mini-btn { width: 70px; min-height: 34px; }
  .modal { width: min(100%, calc(100vw - 16px)); }
  .modal-body { overflow-x: hidden; }
  .quick-modal .form-grid,
  .user-edit-form { grid-template-columns: 1fr; }
  .member-level-badge { min-width: 78px; max-width: 96px; }
}
@media (max-width: 430px) {
  .users-card.managed-table-card th,
  .users-card.managed-table-card td { padding: 7px 4px; font-size: 11px; }
  .users-card.managed-table-card .member-level-badge { min-width: 74px; max-width: 82px; }
  .level-mark { flex-basis: 14px; width: 14px; min-width: 14px; height: 14px; font-size: 8px; }
}

/* 快捷录单：稳定搜索、顶部用户信息与精简金额区 */
.quick-modal {
  width: min(920px, 100%);
  overflow-x: hidden;
}
.quick-order-form {
  align-items: start;
}
.quick-customer-field {
  position: relative;
}
.quick-user-results {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}
.quick-user-result {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
  color: var(--text);
  text-align: left;
  display: grid;
  gap: 4px;
}
.quick-user-result strong {
  color: var(--primary-dark);
  font-size: 14px;
}
.quick-user-result span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.quick-user-result.active,
.quick-user-result:hover {
  border-color: var(--primary-2);
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}
.quick-user-empty {
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--muted);
  background: #f8fafc;
  text-align: center;
  font-weight: 800;
}
.quick-top-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fbff, #ffffff);
}
.quick-user-card,
.quick-first-order-card {
  min-width: 0;
}
.quick-first-order-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}
.quick-first-order-card label {
  color: #344054;
  font-weight: 900;
  font-size: 15px;
}
.quick-first-order-card select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 13px;
  background: #fff;
  color: var(--text);
  outline: none;
}
.quick-first-order-card .muted {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}
.quick-price-info {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 760px) {
  .modal-mask { padding: 10px; align-items: stretch; }
  .modal { max-height: calc(100vh - 20px); border-radius: 20px; }
  .modal-body { padding: 16px; }
  .modal-head, .modal-foot { padding: 15px 16px; }
  .modal-foot { flex-wrap: wrap; }
  .modal-foot button { flex: 1 1 140px; min-height: 44px; }
  .quick-top-panel,
  .quick-price-info { grid-template-columns: 1fr; }
  .quick-top-panel { padding: 12px; }
  .quick-user-results { max-height: 180px; }
  .quick-diamond-row { flex-direction: column; }
  .quick-diamond-row input { min-width: 0; }
}

/* 本次调整：快捷录单内嵌新客首单优惠、被邀请人首单奖励单行设置 */
.quick-user-info-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
.quick-first-order-item {
  min-width: 0;
}
.quick-first-order-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.quick-first-order-switch > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.quick-first-order-switch span:not(.switch span) {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.quick-first-order-switch .switch {
  min-width: 58px;
}
.quick-first-order-switch .switch input:disabled + span {
  cursor: not-allowed;
  opacity: .55;
}
.quick-first-order-item .muted {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.invitee-reward-group {
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8fafc;
}
.invitee-reward-group h4 {
  margin: 0;
  color: #344054;
  font-size: 16px;
}
.invitee-reward-row {
  display: grid;
  grid-template-columns: minmax(128px, .55fr) minmax(140px, .65fr) minmax(240px, 1.8fr);
  gap: 14px;
  align-items: center;
}
.invitee-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  color: #344054;
  font-weight: 800;
}
.invitee-points-field,
.invitee-desc-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.invitee-points-field label,
.invitee-desc-field label {
  color: #344054;
  font-weight: 800;
  font-size: 15px;
}
.invitee-points-field input,
.invitee-desc-field input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 13px;
  background: #fff;
  color: var(--text);
  outline: none;
}
@media (max-width: 760px) {
  .quick-user-info-grid,
  .invitee-reward-row {
    grid-template-columns: 1fr;
  }
  .quick-first-order-switch .switch {
    width: 64px;
    height: 36px;
    min-height: 44px;
    align-items: center;
  }
  .quick-first-order-switch .switch span {
    top: 2px;
    bottom: 2px;
  }
  .invitee-points-field input,
  .invitee-desc-field input {
    min-height: 44px;
  }
}
.quick-top-panel {
  grid-template-columns: 1fr;
}

/* 本次修复：快捷录单新客优惠开关与 6 格用户信息统一 */
.quick-user-info-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.quick-user-info-grid > div {
  min-height: 86px;
  height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.quick-user-info-grid > div > b,
.quick-first-order-switch b {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}
.quick-user-info-grid > div > span,
.quick-first-order-switch #quickFirstOrderState {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
}
.quick-first-order-item {
  justify-content: center;
}
.quick-first-order-switch {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.quick-first-order-switch > div {
  display: grid;
  gap: 7px;
  min-width: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}
.quick-first-order-switch .switch {
  width: 58px;
  min-width: 58px;
}
.quick-first-order-switch .switch input:disabled + span {
  cursor: not-allowed;
  opacity: .55;
}

/* 本次修复：蓝钻积分被邀请人首单奖励卡片 */
.invitee-reward-group {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fbff, #ffffff);
}
.invitee-reward-group h4 {
  margin: 0;
  color: #344054;
  font-size: 16px;
  font-weight: 950;
}
.invitee-reward-row {
  display: grid;
  grid-template-columns: minmax(136px, .7fr) minmax(150px, .8fr) minmax(260px, 1.8fr);
  gap: 12px;
  align-items: end;
}
.invitee-switch,
.invitee-points-field,
.invitee-desc-field {
  min-width: 0;
}
.invitee-switch {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #344054;
  font-size: 14px;
  font-weight: 900;
}
.invitee-points-field,
.invitee-desc-field {
  display: grid;
  gap: 7px;
}
.invitee-points-field label,
.invitee-desc-field label {
  color: #344054;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}
.invitee-points-field input,
.invitee-desc-field input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  outline: none;
}
@media (max-width: 760px) {
  .quick-user-info-grid,
  .invitee-reward-row {
    grid-template-columns: 1fr;
  }
  .quick-user-info-grid > div {
    min-height: 78px;
  }
}

/* 本次修复：统一会员等级徽章色系与质感（仅覆盖颜色，不改变布局） */
.member-level-badge.level-normal {
  border-color: #d9e1ec;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 48%, #e5e7eb 100%);
  color: #64748b;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 6px 14px rgba(15,23,42,.05);
}
.member-level-badge.level-bronze {
  border-color: #c48343;
  background: linear-gradient(135deg, #fff7ed 0%, #e6a35f 52%, #9a5a24 100%);
  color: #fff7ed;
  text-shadow: 0 1px 1px rgba(92,44,12,.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 7px 16px rgba(154,90,36,.16);
}
.member-level-badge.level-silver {
  border-color: #a8b6c7;
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 45%, #94a3b8 100%);
  color: #334155;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 7px 16px rgba(71,85,105,.13);
}
.member-level-badge.level-gold {
  border-color: #e4b21d;
  background: linear-gradient(135deg, #fffbea 0%, #fde047 46%, #f59e0b 100%);
  color: #713f12;
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65), 0 8px 18px rgba(217,119,6,.17);
}
.member-level-badge.level-platinum {
  border-color: #9fb7ff;
  background: linear-gradient(135deg, #f8fbff 0%, #bfdbfe 42%, #a78bfa 100%);
  color: #243b72;
  text-shadow: 0 1px 0 rgba(255,255,255,.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 8px 18px rgba(96,165,250,.18);
}
.member-level-badge.level-diamond {
  border-color: #7dd3fc;
  background: linear-gradient(135deg, #ecfeff 0%, #67e8f9 34%, #60a5fa 68%, #8b5cf6 100%);
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(30,64,175,.36);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 8px 20px rgba(14,165,233,.2);
}
.member-level-badge.level-purple,
.member-level-badge.level-supreme {
  border-color: #f5c542;
  background: linear-gradient(135deg, #fff7d6 0%, #fbbf24 28%, #a855f7 64%, #312e81 100%);
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(49,46,129,.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 9px 22px rgba(124,58,237,.22);
}
.member-level-badge img.level-mark {
  background: rgba(255,255,255,.72);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.72), 0 1px 3px rgba(15,23,42,.08);
}

/* 用户侧移动端长期适配与我的邀请细节优化 */
.rebate-amount {
  color: var(--primary-dark);
  font-size: 20px;
  font-weight: 950;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.inviter-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.inviter-info span {
  overflow-wrap: anywhere;
}
.bind-inviter-btn {
  width: fit-content;
  min-height: 40px;
  padding-left: 14px;
  padding-right: 14px;
}

@media (max-width: 760px) {
  html,
  body,
  #app,
  .layout,
  .main,
  .content,
  .card,
  .modal,
  .modal-body,
  .shop-section,
  .product-grid,
  .member-record-list,
  .member-full-list {
    max-width: 100%;
    overflow-x: hidden;
  }

  .topbar {
    align-items: stretch;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .top-actions .primary-btn,
  .top-actions .secondary-btn,
  .top-actions .ghost-btn,
  .account-pill {
    width: 100%;
    min-height: 42px;
    white-space: normal;
  }

  .product-grid,
  .category-grid,
  .info-grid,
  .detail-list,
  .form-grid {
    grid-template-columns: 1fr !important;
  }

  .shop-card,
  .member-record-card,
  .invite-card,
  .auth-card,
  .field,
  .field input,
  .field select,
  .field textarea {
    min-width: 0;
  }

  .member-record-card,
  .record-main,
  .record-grid span,
  .detail-list div,
  .info-grid div {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .table-wrap {
    overflow-x: hidden !important;
  }

  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap th,
  .table-wrap td {
    display: block;
    width: 100%;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .table-wrap thead {
    display: none;
  }

  .table-wrap tr {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
  }

  .table-wrap td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border: 0;
    white-space: normal !important;
    text-align: right;
  }

  .table-wrap td::before {
    content: attr(data-label);
    flex: 0 0 7em;
    color: var(--muted);
    font-weight: 900;
    text-align: left;
  }

  .modal-mask {
    padding: 10px;
    align-items: flex-start;
    overflow-y: auto;
  }

  .modal,
  .quick-modal {
    width: min(100%, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    border-radius: 18px;
  }

  .modal .actions,
  .modal-foot,
  .invite-copy-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .modal .actions button,
  .modal-foot button,
  .invite-copy-btn,
  .bind-inviter-btn {
    width: 100%;
    min-height: 42px;
  }

  input,
  select,
  textarea {
    min-height: 42px;
  }
}

@media (max-width: 430px) {
  .content {
    padding-left: 10px;
    padding-right: 10px;
  }

  .card {
    padding: 14px;
  }

  .user-summary-grid {
    grid-template-columns: 1fr !important;
  }
}

/* 本次优化：用户侧订单/蓝钻/积分记录信息简化 */
.user-friendly-records .member-record-card {
  overflow: hidden;
}
.user-friendly-records .record-main strong {
  color: #101828;
  font-size: 15px;
  line-height: 1.45;
}
.user-friendly-records .record-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.user-friendly-records .record-grid span {
  line-height: 1.5;
  white-space: normal;
}
.record-money,
.record-number {
  display: inline-block;
  color: var(--primary-dark);
  font-style: normal;
  font-size: 16px;
  font-weight: 950;
  line-height: 1.3;
}
.refund-money { color: var(--danger); }
.record-desc {
  margin: 0 0 10px;
  padding: 11px 12px;
  border-radius: 13px;
  background: #f8fafc;
  color: #172033;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.user-friendly-records .change {
  flex: 0 0 auto;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.1;
}
.deal-tip.highlight-tip {
  border: 1px solid #fed7aa;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  color: #c2410c;
  box-shadow: 0 8px 18px rgba(234, 88, 12, .11);
}
@media (max-width: 640px) {
  .user-friendly-records .record-grid { grid-template-columns: 1fr !important; }
  .user-friendly-records .record-main { gap: 8px; }
  .user-friendly-records .change { font-size: 20px; }
  .record-money,
  .record-number { font-size: 15px; }
  .record-desc { font-size: 13px; }
}


/* 本轮用户侧精简展示与移动端适配 */
.invite-reward-tip,
.invite-consult-tip {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  border-radius: 12px;
  padding: 10px 12px;
  line-height: 1.5;
}
.consult-detail-list div,
.ledger-record-card,
.invite-record-card {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ledger-record-card .record-desc {
  margin: 8px 0 6px;
  color: #475467;
  line-height: 1.55;
}
.ledger-record-card .record-time {
  color: #667085;
  font-size: 13px;
  font-weight: 700;
}
.invite-record-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
}
.simple-invite-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.simple-invite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
  border: 1px solid #e6eef8;
  border-radius: 14px;
  background: #ffffff;
  color: #172033;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
  min-width: 0;
  overflow: hidden;
}
.simple-invite-person,
.simple-invite-code,
.simple-invite-time {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.simple-invite-person {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex: 1 1 auto;
}
.simple-invite-index {
  flex: 0 0 auto;
  color: var(--primary-dark);
  font-weight: 950;
}
.simple-invite-code {
  flex: 0 1 auto;
  color: #2563eb;
}
.simple-invite-time {
  flex: 0 0 auto;
  color: #667085;
  text-align: right;
  white-space: nowrap;
}
.inviter-help {
  margin: 0;
  line-height: 1.5;
}
.bind-inviter-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
}
.bind-inviter-panel .mini-btn { min-height: 40px; }
.invite-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  .content, .card, .shop-section, .product-grid, .category-grid, .toolbar, .filters { min-width: 0; max-width: 100%; }
  .product-grid, .category-grid, .invite-summary-grid { grid-template-columns: 1fr !important; }
  .shop-card .body .primary-btn,
  .modal .actions button,
  .invite-copy-btn,
  .bind-inviter-panel .mini-btn { min-height: 44px; }
  .modal-mask { overflow-x: hidden; }
  .modal, .quick-modal { width: min(100%, calc(100vw - 16px)); max-width: calc(100vw - 16px); overflow-x: hidden; }
  .modal-body { overflow-x: hidden; }
  .detail-list, .consult-detail-list, .info-grid { grid-template-columns: 1fr !important; }
  .simple-invite-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
  }
  .simple-invite-person {
    align-items: flex-start;
  }
  .simple-invite-code,
  .simple-invite-time {
    width: 100%;
    text-align: left;
    white-space: normal;
  }
  .price, .first-order-price, .deal-tip, .muted, .badge { overflow-wrap: anywhere; word-break: break-word; }
}
@media (max-width: 430px) {
  .modal-mask { padding: 8px; }
  .shop-card .body { padding: 14px; }
  .member-record-card { padding: 12px; }
}

/* 本次需求：会员中心蓝钻/积分流水极简卡片与手机端适配 */
.change.positive { color: #dc2626; }
.change.negative { color: #16a34a; }
.simple-ledger-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #e6eef8;
  border-radius: 14px;
  background: #fff;
  min-width: 0;
  overflow: hidden;
}
.simple-ledger-card .ledger-text {
  flex: 1 1 auto;
  min-width: 0;
}
.simple-ledger-card .record-desc {
  margin: 0 0 7px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #172033;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.simple-ledger-card .record-time {
  color: #98a2b3;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.simple-ledger-card .change {
  flex: 0 0 auto;
  min-width: max-content;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.2;
  text-align: right;
}
.invite-share-preview {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #f8fbff;
  color: #172033;
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.invite-share-preview p {
  margin: 0;
}
.invite-share-preview p + p {
  margin-top: 6px;
  color: #2563eb;
  font-weight: 800;
}
@media (max-width: 430px) {
  .simple-ledger-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px;
  }
  .simple-ledger-card .change {
    justify-self: end;
    font-size: 21px;
  }
  .simple-ledger-card .record-desc {
    font-size: 14px;
  }
}

/* 本次调整：商品列表隐藏会员价列后压缩表格宽度，并优化我的邀请顶部邀请人入口 */
.products-card.managed-table-card table {
  min-width: 0;
}
.products-card.managed-table-card th,
.products-card.managed-table-card td {
  padding-left: 6px;
  padding-right: 6px;
}
.products-card.managed-table-card .actions {
  justify-content: center;
}
.member-price-title {
  margin-top: 14px;
}
.member-price-grid {
  margin-top: 8px;
}
.invite-summary-item,
.inviter-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.inviter-summary span {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.inviter-summary .bind-inviter-btn,
.bind-inviter-btn {
  min-height: 44px;
}

@media (max-width: 760px) {
  .products-card.managed-table-card table {
    min-width: 0;
  }
  .products-card.managed-table-card .actions {
    justify-content: flex-end;
  }
  .inviter-summary .bind-inviter-btn,
  .bind-inviter-btn {
    width: 100%;
    min-height: 44px;
  }
}


/* 本次修复：商品管理 Tab 状态、动态会员价列表、订单/用户表格防溢出 */
.product-tabs {
  padding: 5px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #eef4ff;
  gap: 5px;
}
.product-tab-btn {
  min-height: 38px;
  padding: 9px 15px;
  border-radius: 12px;
  background: transparent;
  color: #475569;
  font-weight: 900;
  box-shadow: none;
}
.product-tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 24px rgba(29,99,237,.20);
}
.product-tab-btn:not(.active):hover {
  color: var(--primary-dark);
  background: #fff;
}
.products-card.managed-table-card table,
.orders-card.managed-table-card table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.products-card.managed-table-card th,
.products-card.managed-table-card td,
.orders-card.managed-table-card th,
.orders-card.managed-table-card td {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.products-card.managed-table-card th:first-child,
.products-card.managed-table-card td:first-child {
  width: 64px;
  max-width: 64px;
}
.products-card.managed-table-card th:nth-child(2),
.products-card.managed-table-card td:nth-child(2),
.orders-card.managed-table-card th:nth-child(3),
.orders-card.managed-table-card td:nth-child(3) {
  width: 16%;
  max-width: 180px;
}
.products-card.managed-table-card th:last-child,
.products-card.managed-table-card td:last-child {
  width: 96px;
  max-width: 96px;
  overflow: visible;
}
.orders-card.managed-table-card th:last-child,
.orders-card.managed-table-card td:last-child {
  width: 136px;
  max-width: 136px;
  overflow: visible;
}
.orders-card.managed-table-card th:first-child,
.orders-card.managed-table-card td:first-child {
  width: 15%;
  max-width: 170px;
}
.orders-card.managed-table-card th:nth-child(2),
.orders-card.managed-table-card td:nth-child(2) {
  width: 13%;
  max-width: 150px;
}
.orders-card.managed-table-card .actions,
.products-card.managed-table-card .actions {
  justify-content: flex-end;
}
.users-card.managed-table-card table th:last-child,
.users-card.managed-table-card table td:last-child {
  width: 108px;
  max-width: 108px;
}
.user-row-actions .mini-btn {
  width: 92px;
  white-space: nowrap;
}
.user-row-actions .reset-password-btn,
.mini-btn.reset-password-btn {
  background: #fee2e2;
  color: #b91c1c;
}
.user-row-actions .reset-password-btn:hover,
.mini-btn.reset-password-btn:hover {
  background: #fecaca;
  color: #991b1b;
}
@media (max-width: 760px) {
  .product-manage-toolbar { align-items: stretch; }
  .product-tabs { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-tab-btn { width: 100%; }
  .products-card.managed-table-card th:first-child,
  .products-card.managed-table-card td:first-child,
  .products-card.managed-table-card th:nth-child(2),
  .products-card.managed-table-card td:nth-child(2),
  .products-card.managed-table-card th:last-child,
  .products-card.managed-table-card td:last-child,
  .orders-card.managed-table-card th:first-child,
  .orders-card.managed-table-card td:first-child,
  .orders-card.managed-table-card th:nth-child(2),
  .orders-card.managed-table-card td:nth-child(2),
  .orders-card.managed-table-card th:nth-child(3),
  .orders-card.managed-table-card td:nth-child(3),
  .orders-card.managed-table-card th:last-child,
  .orders-card.managed-table-card td:last-child,
  .users-card.managed-table-card table th:last-child,
  .users-card.managed-table-card table td:last-child {
    width: 100%;
    max-width: 100%;
  }
  .products-card.managed-table-card .actions,
  .orders-card.managed-table-card .actions,
  .user-row-actions { justify-content: flex-end; }
}

/* 表格与记录展示统一优化：列宽、长文本悬停、后台横向滚动隔离 */
.table-card,
.managed-table-card {
  overflow: visible;
}
.data-table-wrap,
.managed-table-card .data-table-wrap,
.managed-table-card .table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: visible;
  padding-bottom: 2px;
}
.data-table,
.managed-table-card table.data-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  min-width: 0;
}
.managed-table-card th,
.managed-table-card td,
.data-table th,
.data-table td {
  padding: 10px 9px;
  line-height: 1.35;
  vertical-align: middle;
}
.managed-table-card th,
.data-table th {
  color: #475467;
  font-size: 12px;
  font-weight: 950;
  text-align: left;
  background: #f8fafc;
  white-space: nowrap;
}
.managed-table-card td,
.data-table td {
  height: 58px;
  color: #172033;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
}
.data-table col.col-image { width: 68px; }
.data-table col.col-code { width: 150px; }
.data-table col.col-medium { width: 136px; }
.data-table col.col-wide { width: 210px; }
.data-table col.col-time { width: 158px; }
.data-table col.col-money { width: 112px; }
.data-table col.col-number { width: 96px; }
.data-table col.col-status,
.data-table col.col-userStatus { width: 92px; }
.data-table col.col-sort { width: 72px; }
.data-table col.col-actions { width: 132px; }
.data-table col.col-default { width: 120px; }
.table-cell-ellipsis {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.table-cell-center { text-align: center !important; }
.table-cell-money,
.table-cell-number { text-align: center !important; }
.table-cell-money .table-money-text,
.table-cell-number .table-cell-ellipsis,
.table-money-text {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  font-weight: 900;
}
.table-cell-action {
  text-align: right !important;
  overflow: visible !important;
}
.table-cell-action .actions {
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  max-height: none;
  overflow: visible;
}
.table-cell-action .mini-btn {
  flex: 0 0 auto;
  min-width: 50px;
  min-height: 30px;
}
.user-row-actions {
  width: 82px;
  margin-left: auto;
  flex-direction: column !important;
  align-items: stretch !important;
}
.user-row-actions .mini-btn {
  width: 100%;
  min-height: 30px;
}
.table-change {
  font-size: 13px;
  font-weight: 950;
}
.table-change.positive,
.record-change-positive { color: #dc2626; }
.table-change.negative,
.record-change-negative { color: #16a34a; }
.change.positive { color: #dc2626; }
.change.negative { color: #16a34a; }
.products-card.managed-table-card table.data-table { min-width: 0; }
.products-card .data-table col.col-image { width: 74px; }
.products-card .data-table col.col-wide { width: 220px; }
.products-card .data-table col.col-money { width: 112px; }
.products-card .data-table col.col-status { width: 84px; }
.products-card .data-table col.col-sort { width: 70px; }
.products-card .data-table col.col-actions { width: 122px; }
.orders-card.managed-table-card table.data-table { min-width: 0; }
.orders-card .data-table col.col-code { width: 180px; }
.orders-card .data-table col.col-wide { width: 220px; }
.orders-card .data-table col.col-time { width: 172px; }
.orders-card .data-table col.col-money,
.orders-card .data-table col.col-number { width: 104px; }
.orders-card .data-table col.col-actions { width: 154px; }
.users-card.managed-table-card table.data-table { min-width: 0; }
.users-card .data-table col.col-medium { width: 140px; }
.users-card .data-table col.col-number { width: 96px; }
.users-card .data-table col.col-time { width: 160px; }
.users-card .data-table col.col-actions { width: 116px; }
.points-card.managed-table-card table.data-table { min-width: 0; }
.points-card .data-table col.col-wide { width: 180px; }
.points-card .data-table col.col-actions { width: 112px; }
.invites-card.managed-table-card table.data-table { min-width: 0; }
.costs-card.managed-table-card table.data-table { min-width: 0; }
.levels-card.managed-table-card table.data-table { min-width: 0; }
.managed-table-card .product-thumb,
.product-thumb,
.managed-table-card .image-placeholder,
.managed-table-card td .image-placeholder {
  width: 50px;
  height: 50px;
  min-height: 50px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.stats-page .recent-stack .data-table-wrap { overflow-x: hidden; }
.stats-page .recent-stack table.data-table { min-width: 0; }
.stats-page .recent-stack .card { overflow: visible; }

/* 用户侧记录卡片：两行省略、触控按钮尺寸与移动端防横滚 */
.record-card,
.member-record-card,
.simple-invite-row {
  min-width: 0;
  overflow: hidden;
}
.record-line,
.record-desc,
.record-main strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
}
.record-time,
.record-time-text {
  display: inline-block;
  max-width: 100%;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}
.simple-ledger-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.simple-ledger-card .ledger-text { min-width: 0; flex: 1 1 auto; }
.simple-ledger-card .change { flex: 0 0 auto; font-size: 18px; font-weight: 950; }
.user-friendly-records,
.invite-record-list,
.simple-invite-list { max-width: 100%; overflow-x: hidden; }
.user-center-card .mini-btn,
.invite-card .secondary-btn,
.member-more-btn { min-height: 42px; }
.record-grid span { min-width: 0; }

@media (max-width: 640px) {
  .managed-table-card .data-table-wrap,
  .managed-table-card .table-wrap { overflow-x: hidden !important; }
  .products-card.managed-table-card table.data-table,
  .orders-card.managed-table-card table.data-table,
  .products-card.managed-table-card thead,
  .orders-card.managed-table-card thead,
  .products-card.managed-table-card tbody,
  .orders-card.managed-table-card tbody,
  .products-card.managed-table-card tr,
  .orders-card.managed-table-card tr,
  .products-card.managed-table-card td,
  .orders-card.managed-table-card td {
    display: revert;
  }
  .products-card.managed-table-card thead,
  .orders-card.managed-table-card thead { display: table-header-group; }
  .products-card.managed-table-card tbody,
  .orders-card.managed-table-card tbody { display: table-row-group; }
  .products-card.managed-table-card tr,
  .orders-card.managed-table-card tr { display: table-row; }
  .products-card.managed-table-card td,
  .orders-card.managed-table-card td { display: table-cell; }
  .products-card.managed-table-card td::before,
  .orders-card.managed-table-card td::before { content: none !important; }
  .member-record-card { padding: 12px; }
  .record-main { gap: 8px; }
  .simple-ledger-card { align-items: flex-start; }
  .record-time,
  .record-time-text { white-space: normal; }
}
@media (max-width: 430px) {
  .user-center-card,
  .invite-card { padding: 16px 14px; }
  .member-record-list { gap: 10px; }
  .record-grid { grid-template-columns: 1fr !important; }
  .simple-ledger-card .change { font-size: 17px; }
}

/* 本次修复：后台表格取消横向滚动，固定布局自适应内容区 */
html,
body,
.app-shell,
.main,
.content,
.card,
.table-card,
.managed-table-card,
.data-table-wrap,
.table-wrap {
  max-width: 100%;
  overflow-x: hidden !important;
  box-sizing: border-box;
}
.data-table-wrap,
.managed-table-card .data-table-wrap,
.managed-table-card .table-wrap,
.stats-page .recent-stack .data-table-wrap,
.recent-stack .table-wrap {
  overflow-x: hidden !important;
  overflow-y: visible;
  padding-left: 0;
  padding-right: 0;
}
.data-table,
.managed-table-card table.data-table,
.products-card.managed-table-card table.data-table,
.orders-card.managed-table-card table.data-table,
.users-card.managed-table-card table.data-table,
.points-card.managed-table-card table.data-table,
.invites-card.managed-table-card table.data-table,
.costs-card.managed-table-card table.data-table,
.levels-card.managed-table-card table.data-table,
.stats-page .recent-stack table.data-table {
  width: 100%;
  min-width: 0 !important;
  max-width: 100%;
  table-layout: fixed;
}
.managed-table-card {
  padding-left: 18px;
  padding-right: 18px;
}
.managed-table-card th,
.managed-table-card td,
.data-table th,
.data-table td {
  padding: 10px 8px;
}
.data-table th,
.data-table td,
.table-cell-ellipsis,
.table-money-text {
  min-width: 0;
  max-width: 100% !important;
}
.table-cell-text { text-align: left; }
.table-cell-center,
.table-cell-money,
.table-cell-number { text-align: center !important; }
.table-cell-action { text-align: right !important; }
.data-table col.col-image { width: 6%; }
.data-table col.col-code { width: 12%; }
.data-table col.col-medium { width: 11%; }
.data-table col.col-wide { width: 16%; }
.data-table col.col-time { width: 13%; }
.data-table col.col-money { width: 9%; }
.data-table col.col-number { width: 8%; }
.data-table col.col-status,
.data-table col.col-userStatus { width: 8%; }
.data-table col.col-sort { width: 6%; }
.data-table col.col-actions { width: 11%; }
.data-table col.col-default { width: 10%; }
.products-card .data-table col.col-image { width: 7%; }
.products-card .data-table col.col-wide { width: 18%; }
.products-card .data-table col.col-money { width: 10%; }
.products-card .data-table col.col-status { width: 7%; }
.products-card .data-table col.col-sort { width: 6%; }
.products-card .data-table col.col-actions { width: 10%; }
.orders-card .data-table col.col-code { width: 13%; }
.orders-card .data-table col.col-wide { width: 16%; }
.orders-card .data-table col.col-medium { width: 10%; }
.orders-card .data-table col.col-time { width: 13%; }
.orders-card .data-table col.col-money,
.orders-card .data-table col.col-number { width: 8%; }
.orders-card .data-table col.col-status { width: 8%; }
.orders-card .data-table col.col-actions { width: 11%; }
.users-card .data-table col.col-medium { width: 11%; }
.users-card .data-table col.col-number { width: 8%; }
.users-card .data-table col.col-time { width: 12%; }
.users-card .data-table col.col-status,
.users-card .data-table col.col-userStatus { width: 8%; }
.users-card .data-table col.col-actions { width: 10%; }
.table-cell-action .actions,
.user-row-actions {
  justify-content: flex-end;
  gap: 6px;
}
#quickUseAllBtn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(29, 99, 237, .18);
}
#quickUseAllBtn:disabled {
  cursor: not-allowed;
  opacity: .62;
  box-shadow: none;
}
.simple-invite-row {
  grid-template-columns: minmax(0, 1fr) minmax(135px, auto);
}
.simple-invite-code { display: none !important; }
@media (max-width: 640px) {
  .managed-table-card .data-table-wrap,
  .managed-table-card .table-wrap,
  .stats-page .recent-stack .data-table-wrap {
    overflow-x: hidden !important;
  }
  .products-card.managed-table-card table.data-table,
  .orders-card.managed-table-card table.data-table,
  .products-card.managed-table-card thead,
  .orders-card.managed-table-card thead,
  .products-card.managed-table-card tbody,
  .orders-card.managed-table-card tbody,
  .products-card.managed-table-card tr,
  .orders-card.managed-table-card tr,
  .products-card.managed-table-card td,
  .orders-card.managed-table-card td {
    display: block;
    width: 100%;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  .products-card.managed-table-card thead,
  .orders-card.managed-table-card thead { display: none; }
  .products-card.managed-table-card tr,
  .orders-card.managed-table-card tr {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
  }
  .products-card.managed-table-card td,
  .orders-card.managed-table-card td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border: 0;
    white-space: normal !important;
    text-align: right !important;
  }
  .products-card.managed-table-card td::before,
  .orders-card.managed-table-card td::before {
    content: attr(data-label) !important;
    flex: 0 0 7em;
    color: var(--muted);
    font-weight: 900;
    text-align: left;
  }
  .simple-invite-row {
    grid-template-columns: 1fr;
  }
}

/* 本次优化：后台表格操作列统一居中、竖向按钮栈与防溢出 */
.managed-table-card th,
.managed-table-card td,
.data-table th,
.data-table td {
  vertical-align: middle;
}
.managed-table-card .table-action-column,
.data-table .table-action-column,
.table-cell-action {
  text-align: center !important;
  overflow: visible !important;
}
.data-table col.col-actions {
  width: 112px;
  min-width: 96px;
}
.products-card .data-table col.col-actions,
.levels-card .data-table col.col-actions,
.points-card .data-table col.col-actions,
.invites-card .data-table col.col-actions,
.costs-card .data-table col.col-actions {
  width: 108px;
}
.orders-card .data-table col.col-actions,
.users-card .data-table col.col-actions {
  width: 118px;
}
.action-cell {
  text-align: center !important;
}
.action-stack,
.table-cell-action .action-stack,
.table-cell-action .actions,
.user-row-actions,
.managed-table-card .table-cell-action .actions,
.products-card.managed-table-card .table-cell-action .actions,
.orders-card.managed-table-card .table-cell-action .actions {
  width: 88px;
  max-width: 100%;
  margin: 0 auto;
  display: inline-flex;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: center !important;
  gap: 7px;
  flex-wrap: nowrap !important;
  max-height: none;
  overflow: visible;
}
.orders-card .action-stack,
.users-card .action-stack,
.orders-card.managed-table-card .table-cell-action .actions,
.users-card.managed-table-card .table-cell-action .actions,
.user-row-actions {
  width: 92px;
}
.action-btn,
.table-cell-action .mini-btn,
.user-row-actions .mini-btn,
.managed-table-card .table-cell-action .mini-btn {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 9px;
  line-height: 1.2;
  white-space: nowrap;
  text-align: center;
}
.managed-table-card td.table-cell-action {
  height: 72px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.managed-table-card th.table-action-column {
  padding-left: 0;
  padding-right: 0;
}
.managed-table-card .table-cell-center,
.managed-table-card .table-cell-money,
.managed-table-card .table-cell-number,
.managed-table-card .table-cell-status,
.managed-table-card .table-cell-userStatus,
.managed-table-card .table-cell-sort {
  text-align: center !important;
}
.managed-table-card .table-cell-text .table-cell-ellipsis {
  max-width: 100%;
}

@media (max-width: 640px) {
  .products-card.managed-table-card td.table-cell-action,
  .orders-card.managed-table-card td.table-cell-action {
    align-items: center;
    text-align: center !important;
  }
  .products-card.managed-table-card td.table-cell-action::before,
  .orders-card.managed-table-card td.table-cell-action::before {
    align-self: center;
  }
  .products-card .action-stack,
  .orders-card .action-stack,
  .products-card.managed-table-card .table-cell-action .actions,
  .orders-card.managed-table-card .table-cell-action .actions {
    margin-left: auto;
    margin-right: 0;
  }
}

/* 后台表格 UI 统一优化：表头、操作列、长文本与用户等级列宽 */
.managed-table-card .data-table {
  width: 100%;
  table-layout: fixed;
}
.managed-table-card .data-table th {
  padding: 12px 8px;
  text-align: center !important;
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.35;
  color: #475467;
  background: #f8fafc;
  vertical-align: middle;
}
.managed-table-card .data-table td {
  min-width: 0;
  padding: 9px 8px;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
}
.managed-table-card .data-table .table-cell-ellipsis,
.managed-table-card .data-table .table-money-text {
  display: inline-block;
  max-width: 100% !important;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.managed-table-card .data-table td.table-cell-text {
  text-align: left;
}
.managed-table-card .data-table td.table-cell-center,
.managed-table-card .data-table td.table-cell-money,
.managed-table-card .data-table td.table-cell-number,
.managed-table-card .data-table td.table-cell-status,
.managed-table-card .data-table td.table-cell-userStatus,
.managed-table-card .data-table td.table-cell-sort {
  text-align: center !important;
}
.managed-table-card .data-table th.table-action-column,
.managed-table-card .data-table td.table-cell-action {
  text-align: center !important;
  overflow: visible !important;
}
.managed-table-card .data-table td.table-cell-action {
  height: 86px;
  padding: 8px 6px;
}
.action-stack,
.managed-table-card .table-cell-action .actions,
.managed-table-card .table-cell-action .action-stack,
.products-card.managed-table-card .table-cell-action .actions,
.orders-card.managed-table-card .table-cell-action .actions,
.users-card.managed-table-card .table-cell-action .actions,
.levels-card.managed-table-card .table-cell-action .actions,
.user-row-actions {
  display: inline-flex;
  width: 92px;
  max-width: 100%;
  margin: 0 auto;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  justify-content: center !important;
  gap: 7px;
  overflow: visible;
  max-height: none;
}
.managed-table-card .table-cell-action .mini-btn,
.managed-table-card .action-btn,
.user-row-actions .mini-btn {
  width: 100%;
  min-width: 0;
  min-height: 31px;
  padding: 6px 8px;
  justify-content: center;
  text-align: center;
}
.mini-btn.danger,
.action-btn.danger {
  background: #fee2e2;
  color: #b91c1c;
  box-shadow: none;
}
.mini-btn.danger:not(:disabled):hover,
.action-btn.danger:not(:disabled):hover {
  background: #fecaca;
  color: #991b1b;
}
.levels-card.managed-table-card .data-table col.col-medium { width: 14%; }
.levels-card.managed-table-card .data-table col.col-number { width: 12%; }
.levels-card.managed-table-card .data-table col.col-wide { width: 34%; }
.levels-card.managed-table-card .data-table col.col-status { width: 10%; }
.levels-card.managed-table-card .data-table col.col-sort { width: 8%; }
.levels-card.managed-table-card .data-table col.col-actions { width: 22%; }
.levels-card.managed-table-card .data-table td.table-cell-levelTitle,
.levels-card.managed-table-card .data-table td.table-cell-requiredDiamonds,
.levels-card.managed-table-card .data-table td.table-cell-status,
.levels-card.managed-table-card .data-table td.table-cell-sort {
  text-align: center !important;
}
.levels-card.managed-table-card .data-table td.table-cell-levelDesc {
  text-align: left;
}
.levels-card.managed-table-card .data-table td.table-cell-levelDesc .table-cell-ellipsis {
  max-width: 100% !important;
}

@media (max-width: 640px) {
  .managed-table-card .data-table td.table-cell-action {
    height: auto;
    align-items: center;
    text-align: center !important;
  }
  .managed-table-card .table-cell-action .actions,
  .managed-table-card .table-cell-action .action-stack,
  .action-stack,
  .user-row-actions {
    width: min(92px, 42vw);
  }
}

/* 表头与数据列对齐修复：th/td 共用 colgroup 列宽，避免只居中表头造成错位 */
.managed-table-card .data-table-wrap,
.managed-table-card .table-wrap {
  max-width: 100%;
  overflow-x: hidden !important;
  overflow-y: visible;
}
.managed-table-card table.data-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed !important;
  border-collapse: collapse;
  min-width: 0 !important;
}
.managed-table-card table.data-table th,
.managed-table-card table.data-table td {
  box-sizing: border-box;
  min-width: 0;
  padding: 10px 7px;
  line-height: 1.35;
  vertical-align: middle;
}
.managed-table-card table.data-table th {
  text-align: center !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.managed-table-card table.data-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.managed-table-card table.data-table td.table-cell-text {
  text-align: left;
}
.managed-table-card table.data-table td.table-cell-center,
.managed-table-card table.data-table td.table-cell-money,
.managed-table-card table.data-table td.table-cell-number,
.managed-table-card table.data-table td.table-cell-status,
.managed-table-card table.data-table td.table-cell-userStatus,
.managed-table-card table.data-table td.table-cell-sort,
.managed-table-card table.data-table td.table-cell-levelName,
.managed-table-card table.data-table td.table-cell-action {
  text-align: center !important;
}
.managed-table-card table.data-table .table-cell-ellipsis,
.managed-table-card table.data-table .table-money-text,
.managed-table-card table.data-table .member-level-badge,
.managed-table-card table.data-table .badge {
  max-width: 100% !important;
}
.managed-table-card table.data-table .table-cell-ellipsis,
.managed-table-card table.data-table .table-money-text {
  display: inline-block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.managed-table-card table.data-table td.table-cell-action {
  height: 82px;
  overflow: visible !important;
  padding: 8px 5px;
}
.managed-table-card table.data-table th.table-action-column {
  padding-left: 5px;
  padding-right: 5px;
}
.managed-table-card .table-cell-action .actions,
.managed-table-card .table-cell-action .action-stack,
.managed-table-card .user-row-actions {
  width: 88px;
  max-width: 100%;
  margin: 0 auto;
  display: inline-flex;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  justify-content: center !important;
  gap: 7px;
}
.managed-table-card .table-cell-action .mini-btn,
.managed-table-card .action-btn,
.managed-table-card .user-row-actions .mini-btn {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  padding: 6px 7px;
  justify-content: center;
  text-align: center;
}

.products-card.managed-table-card .data-table col.col-key-image { width: 7%; }
.products-card.managed-table-card .data-table col.col-key-name { width: 16%; }
.products-card.managed-table-card .data-table col.col-key-guestPrice { width: 8%; }
.products-card.managed-table-card .data-table col.col-key-firstOrderPriceLabel { width: 8%; }
.products-card.managed-table-card .data-table col.col-level-price { width: 6.5%; }
.products-card.managed-table-card .data-table col.col-key-status { width: 7%; }
.products-card.managed-table-card .data-table col.col-key-sort { width: 5%; }
.products-card.managed-table-card .data-table col.col-key-actions { width: 10%; }
.products-card.managed-table-card .data-table td.table-cell-image,
.products-card.managed-table-card .data-table td.table-cell-status,
.products-card.managed-table-card .data-table td.table-cell-sort {
  text-align: center !important;
}
.products-card.managed-table-card .data-table td.table-cell-name .table-cell-ellipsis {
  text-align: left;
}

.orders-card.managed-table-card .data-table col.col-key-orderNo { width: 13%; }
.orders-card.managed-table-card .data-table col.col-key-username { width: 10%; }
.orders-card.managed-table-card .data-table col.col-key-productName { width: 16%; }
.orders-card.managed-table-card .data-table col.col-key-productCategory { width: 10%; }
.orders-card.managed-table-card .data-table col.col-key-payable { width: 8%; }
.orders-card.managed-table-card .data-table col.col-key-usePoints { width: 7%; }
.orders-card.managed-table-card .data-table col.col-key-refundAmount { width: 8%; }
.orders-card.managed-table-card .data-table col.col-key-status { width: 8%; }
.orders-card.managed-table-card .data-table col.col-key-createdAt { width: 11%; }
.orders-card.managed-table-card .data-table col.col-key-actions { width: 9%; }
.orders-card.managed-table-card .table-cell-action .actions { width: 86px; }

.users-card.managed-table-card .data-table col.col-key-username { width: 10%; }
.users-card.managed-table-card .data-table col.col-key-inviteCode { width: 8%; }
.users-card.managed-table-card .data-table col.col-key-blueDiamonds,
.users-card.managed-table-card .data-table col.col-key-available,
.users-card.managed-table-card .data-table col.col-key-points { width: 7.5%; }
.users-card.managed-table-card .data-table col.col-key-levelName { width: 8%; }
.users-card.managed-table-card .data-table col.col-key-registerSource { width: 8.5%; }
.users-card.managed-table-card .data-table col.col-key-lastBlueDiamondsChangedAt,
.users-card.managed-table-card .data-table col.col-key-lastGrowthPointsChangedAt { width: 10.5%; }
.users-card.managed-table-card .data-table col.col-key-userStatus { width: 7%; }
.users-card.managed-table-card .data-table col.col-key-actions { width: 10%; }
.users-card.managed-table-card .data-table td.table-cell-levelName,
.users-card.managed-table-card .data-table td.table-cell-userStatus {
  text-align: center !important;
}
.users-card.managed-table-card .table-cell-action .actions,
.users-card.managed-table-card .user-row-actions { width: 90px; }

.levels-card.managed-table-card .data-table col.col-key-levelTitle { width: 16%; }
.levels-card.managed-table-card .data-table col.col-key-requiredDiamonds { width: 14%; }
.levels-card.managed-table-card .data-table col.col-key-levelDesc { width: 34%; }
.levels-card.managed-table-card .data-table col.col-key-status { width: 10%; }
.levels-card.managed-table-card .data-table col.col-key-sort { width: 8%; }
.levels-card.managed-table-card .data-table col.col-key-actions { width: 12%; }
.levels-card.managed-table-card .data-table td.table-cell-levelTitle,
.levels-card.managed-table-card .data-table td.table-cell-requiredDiamonds,
.levels-card.managed-table-card .data-table td.table-cell-status,
.levels-card.managed-table-card .data-table td.table-cell-sort,
.levels-card.managed-table-card .data-table td.table-cell-action {
  text-align: center !important;
}
.levels-card.managed-table-card .data-table td.table-cell-levelDesc {
  text-align: left;
}
.levels-card.managed-table-card .table-cell-action .actions { width: 88px; }

@media (max-width: 640px) {
  .managed-table-card table.data-table,
  .managed-table-card table.data-table thead,
  .managed-table-card table.data-table tbody,
  .managed-table-card table.data-table tr,
  .managed-table-card table.data-table td {
    display: block;
    width: 100%;
    max-width: 100% !important;
  }
  .managed-table-card table.data-table thead { display: none; }
  .managed-table-card table.data-table tr {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
  }
  .managed-table-card table.data-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    height: auto;
    padding: 8px 0;
    border: 0;
    white-space: normal !important;
    text-align: right !important;
  }
  .managed-table-card table.data-table td::before {
    content: attr(data-label);
    flex: 0 0 7em;
    color: var(--muted);
    font-weight: 900;
    text-align: left;
  }
  .managed-table-card table.data-table td.table-cell-action {
    overflow: visible !important;
  }
  .managed-table-card .table-cell-action .actions,
  .managed-table-card .table-cell-action .action-stack,
  .managed-table-card .user-row-actions {
    width: min(90px, 42vw);
    margin-left: auto;
    margin-right: 0;
  }
}

/* 本次修复：表头不动，仅让后台 tbody 数据内容按既有列宽对齐 */
.managed-table-card table.data-table tbody td .table-cell-inner {
  display: flex;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  overflow: hidden;
}

.managed-table-card table.data-table tbody td.table-cell-center .table-cell-inner,
.managed-table-card table.data-table tbody td.table-cell-money .table-cell-inner,
.managed-table-card table.data-table tbody td.table-cell-number .table-cell-inner,
.managed-table-card table.data-table tbody td.table-cell-image .table-cell-inner,
.managed-table-card table.data-table tbody td.table-cell-status .table-cell-inner,
.managed-table-card table.data-table tbody td.table-cell-userStatus .table-cell-inner,
.managed-table-card table.data-table tbody td.table-cell-sort .table-cell-inner,
.managed-table-card table.data-table tbody td.table-cell-levelName .table-cell-inner,
.managed-table-card table.data-table tbody td.table-cell-action .table-cell-inner {
  justify-content: center;
  text-align: center;
}

.managed-table-card table.data-table tbody td.table-cell-text .table-cell-inner {
  justify-content: flex-start;
  text-align: left;
}

.managed-table-card table.data-table tbody td.table-cell-action .table-cell-inner {
  overflow: visible;
}

.managed-table-card table.data-table tbody td .table-cell-inner > .table-cell-ellipsis,
.managed-table-card table.data-table tbody td .table-cell-inner > .table-money-text {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100% !important;
}

.managed-table-card table.data-table tbody td.table-cell-text .table-cell-inner > .table-cell-ellipsis {
  width: 100%;
}

.managed-table-card table.data-table tbody td.table-cell-image .product-thumb,
.managed-table-card table.data-table tbody td.table-cell-image .image-placeholder,
.managed-table-card table.data-table tbody td.table-cell-status .badge,
.managed-table-card table.data-table tbody td.table-cell-userStatus .badge,
.managed-table-card table.data-table tbody td.table-cell-levelName .member-level-badge {
  margin-left: auto;
  margin-right: auto;
}

.managed-table-card table.data-table tbody td.table-cell-action .actions,
.managed-table-card table.data-table tbody td.table-cell-action .action-stack,
.managed-table-card table.data-table tbody td.table-cell-action .user-row-actions {
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 640px) {
  .managed-table-card table.data-table tbody td .table-cell-inner {
    flex: 1 1 auto;
    justify-content: flex-end;
    text-align: right;
  }

  .managed-table-card table.data-table tbody td.table-cell-action .table-cell-inner {
    justify-content: flex-end;
  }
}

/* 本次优化：会员中心权益图标与邀请返利价值强调 */
.user-summary-grid .user-benefit-card {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}
.user-summary-grid .stat-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #475467;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.benefit-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  font-style: normal;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 8px 16px rgba(29,99,237,.14);
}
.benefit-icon-diamond {
  background: linear-gradient(135deg, #dff8ff 0%, #38bdf8 45%, #1d63ed 100%);
  color: #ffffff;
}
.benefit-icon-points {
  background: linear-gradient(135deg, #fff7d6 0%, #facc15 48%, #f59e0b 100%);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 8px 16px rgba(245,158,11,.16);
}
.benefit-icon-level {
  background: linear-gradient(135deg, #ede9fe 0%, #8b5cf6 45%, #1d4ed8 100%);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 8px 16px rgba(124,58,237,.16);
}
.user-summary-grid .user-benefit-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
}
.rebate-amount .rebate-diamonds {
  color: var(--primary-dark);
  font-weight: 950;
}
.rebate-amount .rebate-separator {
  color: #475467;
  font-weight: 900;
}
.rebate-amount .rebate-value {
  color: var(--danger);
  font-weight: 950;
}

@media (max-width: 640px) {
  .user-summary-grid .user-benefit-card {
    min-height: 116px;
    padding: 14px;
  }
  .user-summary-grid .stat-title {
    gap: 6px;
  }
  .benefit-icon {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
    font-size: 13px;
  }
  .rebate-amount {
    display: block;
    max-width: 100%;
  }
}

/* 结构级修复：后台管理表格统一使用同一 colgroup / table-layout 列宽，并让 th 与 td 共用居中规则。 */
.managed-table-card .data-table-wrap,
.managed-table-card .table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
}

.managed-table-card table.admin-table,
.managed-table-card table.data-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed !important;
  border-collapse: collapse;
}

.managed-table-card table.admin-table th,
.managed-table-card table.admin-table td,
.managed-table-card table.data-table th,
.managed-table-card table.data-table td {
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
  padding: 14px 10px;
  text-align: center !important;
  vertical-align: middle !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.managed-table-card table.admin-table th,
.managed-table-card table.data-table th {
  line-height: 1.35;
}

.managed-table-card table.admin-table td .table-cell-inner,
.managed-table-card table.data-table td .table-cell-inner {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center !important;
  text-align: center !important;
  overflow: hidden;
}

.managed-table-card table.admin-table td.table-cell-action,
.managed-table-card table.data-table td.table-cell-action,
.managed-table-card table.admin-table td.table-cell-action .table-cell-inner,
.managed-table-card table.data-table td.table-cell-action .table-cell-inner {
  overflow: visible !important;
}

.managed-table-card table.admin-table .table-cell-ellipsis,
.managed-table-card table.admin-table .table-money-text,
.managed-table-card table.data-table .table-cell-ellipsis,
.managed-table-card table.data-table .table-money-text {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100% !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center !important;
}

.managed-table-card table.admin-table .product-thumb,
.managed-table-card table.admin-table .image-placeholder,
.managed-table-card table.admin-table .badge,
.managed-table-card table.admin-table .member-level-badge,
.managed-table-card table.data-table .product-thumb,
.managed-table-card table.data-table .image-placeholder,
.managed-table-card table.data-table .badge,
.managed-table-card table.data-table .member-level-badge {
  flex: 0 0 auto;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
}

.managed-table-card table.admin-table .action-stack,
.managed-table-card table.admin-table .actions,
.managed-table-card table.admin-table .user-row-actions,
.managed-table-card table.data-table .action-stack,
.managed-table-card table.data-table .actions,
.managed-table-card table.data-table .user-row-actions {
  display: flex;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px;
  width: min(92px, 100%);
  margin-left: auto !important;
  margin-right: auto !important;
  overflow: visible;
}

.managed-table-card table.admin-table .action-btn,
.managed-table-card table.admin-table .mini-btn,
.managed-table-card table.data-table .action-btn,
.managed-table-card table.data-table .mini-btn {
  width: 100%;
  min-width: 0;
  justify-content: center;
  text-align: center;
}

@media (max-width: 640px) {
  .managed-table-card table.admin-table td,
  .managed-table-card table.data-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right !important;
    white-space: normal;
    overflow: visible;
  }

  .managed-table-card table.admin-table td .table-cell-inner,
  .managed-table-card table.data-table td .table-cell-inner {
    flex: 1 1 auto;
    justify-content: flex-end !important;
    text-align: right !important;
  }

  .managed-table-card table.admin-table td.table-cell-action .table-cell-inner,
  .managed-table-card table.data-table td.table-cell-action .table-cell-inner {
    justify-content: flex-end !important;
  }

  .managed-table-card table.admin-table td.table-cell-action .actions,
  .managed-table-card table.admin-table td.table-cell-action .action-stack,
  .managed-table-card table.admin-table td.table-cell-action .user-row-actions,
  .managed-table-card table.data-table td.table-cell-action .actions,
  .managed-table-card table.data-table td.table-cell-action .action-stack,
  .managed-table-card table.data-table td.table-cell-action .user-row-actions {
    width: min(92px, 42vw);
    margin-left: auto !important;
    margin-right: 0 !important;
  }
}

/* 本次优化：会员中心与我的邀请视觉升级 */
.user-summary-grid {
  align-items: stretch;
  gap: 18px;
}
.user-summary-grid .user-benefit-card {
  position: relative;
  display: flex;
  min-height: 152px;
  flex-direction: column;
  justify-content: flex-start;
  padding: 20px 20px 18px;
  overflow: hidden;
  border: 1px solid rgba(147, 197, 253, .58);
  background:
    radial-gradient(circle at 84% 14%, rgba(14, 165, 233, .14), transparent 34%),
    linear-gradient(145deg, #ffffff 0%, #f8fbff 48%, #eef6ff 100%);
  box-shadow: 0 16px 34px rgba(29, 99, 237, .075);
}
.user-summary-grid .user-benefit-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -44px;
  width: 116px;
  height: 116px;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(29, 99, 237, .08), rgba(14, 165, 233, .02));
  transform: rotate(18deg);
  pointer-events: none;
}
.user-summary-grid .stat-title {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  color: #475467;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: .01em;
}
.user-summary-grid .benefit-icon {
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  filter: drop-shadow(0 7px 10px rgba(29, 99, 237, .16));
}
.user-summary-grid .benefit-icon-diamond .top { fill: #a7f3ff; }
.user-summary-grid .benefit-icon-diamond .left { fill: #38bdf8; }
.user-summary-grid .benefit-icon-diamond .center { fill: #1d63ed; }
.user-summary-grid .benefit-icon-diamond .right { fill: #0ea5e9; }
.user-summary-grid .benefit-icon-diamond .shine { fill: none; stroke: rgba(255,255,255,.88); stroke-width: 2.8; stroke-linecap: round; }
.user-summary-grid .benefit-icon-points .coin { fill: #facc15; }
.user-summary-grid .benefit-icon-points .coin-base { fill: #f59e0b; opacity: .9; }
.user-summary-grid .benefit-icon-points .star { fill: #fff7ed; stroke: rgba(180, 83, 9, .28); stroke-width: 1.3; }
.user-summary-grid .benefit-icon-level .crown { fill: #fbbf24; }
.user-summary-grid .benefit-icon-level .crown-band { fill: #f59e0b; }
.user-summary-grid .benefit-icon-level .gem { fill: #fff7ed; opacity: .94; }
.user-summary-grid .user-benefit-card strong {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 44px;
  margin: 18px 0 0;
  color: #0f172a;
  font-size: clamp(29px, 2.4vw, 38px);
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: -.035em;
}
.user-summary-grid .level-stat-card strong {
  font-size: clamp(29px, 2.4vw, 38px);
}
.user-summary-grid .level-stat-card .member-level-badge {
  min-width: 112px;
  height: 38px;
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 10px 20px rgba(29,99,237,.14);
}
.user-summary-grid .level-stat-card .level-mark {
  width: 19px;
  min-width: 19px;
  height: 19px;
  font-size: 11px;
}
.user-summary-grid .stat-help {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 12px;
  color: #7a879a;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.45;
}
.invite-card {
  border-color: rgba(219, 234, 254, .94);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}
.invite-summary-grid {
  gap: 16px;
  align-items: stretch;
}
.invite-summary-grid .invite-summary-item {
  display: flex;
  min-height: 148px;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
  padding: 18px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 12px 26px rgba(30, 64, 175, .055);
  overflow: hidden;
}
.invite-summary-grid .invite-summary-item b {
  color: #475467;
  font-size: 14px;
  font-weight: 950;
}
.invite-summary-grid .invite-summary-item > :not(b) {
  min-width: 0;
}
.invite-summary-grid .invite-summary-item:not(.inviter-summary) {
  color: #123a91;
  font-size: 23px;
  font-weight: 950;
  letter-spacing: -.01em;
}
.rebate-amount {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  color: var(--primary-dark);
  font-size: 22px;
  font-weight: 950;
  line-height: 1.2;
}
.rebate-diamonds,
.rebate-value {
  font-weight: 950;
}
.rebate-value {
  color: #dc2626;
}
.rebate-separator {
  color: #667085;
  font-size: 14px;
  font-weight: 850;
}
.inviter-summary .inviter-name {
  display: block;
  color: #101828;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.inviter-summary .empty-inviter {
  color: #64748b;
}
.inviter-summary .bind-inviter-btn {
  order: 3;
  width: fit-content;
  min-height: 40px;
  margin-top: 0;
  padding: 0 16px;
  border: 1px solid #bfdbfe;
  background: linear-gradient(135deg, #eaf2ff, #dff6ff);
  color: #1557c0;
  box-shadow: 0 8px 18px rgba(29, 99, 237, .12);
}
.inviter-summary .inviter-help {
  order: 4;
  max-width: 34em;
  margin: 0;
  color: #7a879a;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.invite-share-preview {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #f8fbff;
}
.invite-share-preview p {
  margin: 0;
  color: #344054;
  font-size: 14px;
  line-height: 1.55;
}
.invite-share-preview p + p {
  margin-top: 7px;
}
.invite-share-preview .invite-link-line {
  max-width: 100%;
  color: #1557c0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.invite-copy-actions {
  gap: 12px;
  margin-top: 16px;
}
.invite-copy-btn {
  min-width: 156px;
  min-height: 44px;
  padding: 0 18px;
}
.invite-record-section .card-head {
  margin-bottom: 14px;
}
.simple-invite-list {
  gap: 12px;
}
.simple-invite-row {
  min-height: 58px;
  padding: 14px 16px;
  border-color: #e0eaff;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff, #fbfdff);
}
.simple-invite-index {
  min-width: 28px;
  color: #1d63ed;
  font-size: 15px;
}
.simple-invite-person {
  gap: 8px;
}
.simple-invite-time {
  color: #667085;
  font-weight: 800;
}
@media (max-width: 1100px) {
  .user-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .invite-summary-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .user-summary-grid { grid-template-columns: 1fr !important; }
  .user-summary-grid .user-benefit-card { min-height: 138px; padding: 18px; }
  .invite-summary-grid .invite-summary-item { min-height: auto; padding: 16px; }
  .invite-copy-actions { gap: 10px; }
  .invite-copy-btn { width: 100%; }
  .rebate-amount { font-size: 20px; }
  .invite-share-preview .invite-link-line { white-space: nowrap; }
}

.receipt-template-card,
.points-decay-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #f8fafc;
}
.receipt-template-card h4,
.points-decay-card h4 { margin: 0 0 14px; font-size: 18px; }
.nested-form-grid { margin-top: 0; }
.receipt-template-textarea { min-height: 260px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; line-height: 1.55; }
.receipt-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.receipt-box textarea { min-height: 320px; white-space: pre-wrap; }

/* 本次优化：蓝钻积分模块四区设置卡片 */
.blue-diamond-settings-card {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
}
.settings-main-head {
  align-items: flex-start;
  margin-bottom: 20px;
}
.settings-main-head h3 { margin-bottom: 0; }
.settings-main-head .muted {
  margin: 8px 0 0;
  line-height: 1.6;
}
.settings-form {
  display: grid;
  gap: 18px;
}
.settings-section-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid #e5edf8;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .055);
}
.settings-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.settings-section-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.settings-section-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #f1f5ff;
  font-size: 20px;
}
.settings-section-title h4 {
  margin: 0;
  color: #172033;
  font-size: 17px;
  font-weight: 950;
}
.settings-section-title .muted {
  margin: 6px 0 0;
  line-height: 1.55;
}
.settings-section-switch {
  flex: 0 0 auto;
  padding-top: 2px;
}
.settings-section-grid {
  gap: 16px 18px;
}
.invite-reward-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.settings-section-grid .field { min-width: 0; }
.settings-section-grid .field label { margin-bottom: 8px; }
.settings-section-grid input,
.settings-section-grid textarea {
  border-radius: 14px;
  border-color: #dbe5f3;
  background: #fff;
}
.settings-section-grid textarea {
  min-height: 98px;
  resize: vertical;
}
.settings-single-field {
  max-width: calc(50% - 9px);
}
.settings-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 6px;
}
.settings-save-btn {
  width: auto;
  min-width: 132px;
  min-height: 44px;
  padding-inline: 24px;
  font-size: 14px;
}
.switch input:checked + span {
  background: linear-gradient(135deg, #22c7b8, #2563eb);
}
@media (max-width: 1100px) {
  .invite-reward-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .blue-diamond-settings-card { border-radius: 18px; }
  .settings-section-card {
    padding: 15px;
    border-radius: 16px;
  }
  .settings-section-head {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }
  .settings-section-switch { align-self: flex-end; }
  .settings-section-grid { grid-template-columns: 1fr; }
  .invite-reward-grid { grid-template-columns: 1fr; }
  .settings-single-field { max-width: none; }
  .settings-actions { justify-content: stretch; }
  .settings-save-btn {
    width: 100%;
    min-height: 46px;
  }
}

/* 用户侧蓝钻 / 积分 / 会员 / 邀请统一轻量卡片风格 */
.user-summary-grid,
.invite-summary-grid,
.user-consult-info-grid {
  align-items: stretch;
}
.user-summary-grid .user-info-card,
.invite-summary-grid .user-info-card,
.user-consult-info-grid .user-info-card,
.quick-user-benefit-grid .user-info-card {
  display: flex;
  min-width: 0;
  min-height: 132px;
  height: 100%;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  padding: 18px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 12px 26px rgba(30, 64, 175, .055);
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.user-summary-grid .user-info-card {
  justify-content: space-between;
}
.info-grid .user-info-card .user-info-head,
.detail-list .user-info-card .user-info-head,
.quick-user-info-grid .user-info-card .user-info-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.info-grid .user-info-card .user-info-head b,
.detail-list .user-info-card .user-info-head b,
.quick-user-info-grid .user-info-card .user-info-head b {
  display: block;
  margin: 0;
  color: #475467;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.25;
}
.benefit-icon-box {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  background: transparent;
}
.benefit-icon-box-diamond { background: linear-gradient(135deg, rgba(236, 254, 255, .78) 0%, rgba(224, 242, 254, .7) 100%); }
.benefit-icon-box-points { background: linear-gradient(135deg, rgba(255, 251, 235, .8) 0%, rgba(254, 243, 199, .7) 100%); }
.benefit-icon-box-level { background: linear-gradient(135deg, rgba(248, 250, 252, .9) 0%, rgba(224, 231, 255, .62) 100%); }
.benefit-icon-box-invite { background: linear-gradient(135deg, rgba(239, 246, 255, .78) 0%, rgba(224, 242, 254, .68) 100%); }
.benefit-icon-box-user { background: linear-gradient(135deg, rgba(248, 250, 252, .9) 0%, rgba(226, 232, 240, .7) 100%); }
.benefit-icon-box .benefit-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.benefit-icon-diamond .top { fill: #a7f3ff; }
.benefit-icon-diamond .left { fill: #38bdf8; }
.benefit-icon-diamond .center { fill: #1d63ed; }
.benefit-icon-diamond .right { fill: #0ea5e9; }
.benefit-icon-diamond .shine { fill: none; stroke: rgba(255,255,255,.9); stroke-width: 2.8; stroke-linecap: round; }
.benefit-icon-points .coin { fill: #facc15; }
.benefit-icon-points .coin-base { fill: #f59e0b; opacity: .9; }
.benefit-icon-points .star { fill: #fff7ed; stroke: rgba(180, 83, 9, .28); stroke-width: 1.3; }
.benefit-icon-level .crown { fill: #fbbf24; }
.benefit-icon-level .crown-band { fill: #f59e0b; }
.benefit-icon-level .gem { fill: #fff7ed; opacity: .94; }
.benefit-icon-invite path,
.benefit-icon-user circle,
.benefit-icon-user path {
  fill: none;
  stroke: #2563eb;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.benefit-icon-user circle { fill: #dbeafe; stroke: #1d63ed; }
.user-info-value {
  min-width: 0;
  color: #0f172a;
  font-size: clamp(27px, 2.2vw, 36px);
  font-weight: 950;
  line-height: 1.08;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.user-info-help {
  margin: auto 0 0;
  color: #344054;
  font-size: 13.5px;
  font-weight: 750;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.level-stat-card .user-info-value {
  display: flex;
  align-items: center;
  min-height: 39px;
  font-size: clamp(27px, 2.2vw, 36px);
}
.level-stat-card .member-level-badge,
.user-consult-info-grid .member-level-badge,
.quick-user-benefit-grid .member-level-badge {
  min-height: 38px;
  align-self: center;
  line-height: 1;
}
.invite-card .card-head .badge.ok { display: none; }
.invite-summary-grid .invite-summary-item:not(.inviter-summary),
.invite-summary-grid .invite-summary-item {
  color: inherit;
  font-size: inherit;
  letter-spacing: normal;
}
.invite-summary-grid .user-info-value {
  color: #123a91;
  font-size: clamp(23px, 2vw, 30px);
}
.invite-summary-grid .rebate-summary-card .user-info-value {
  color: inherit;
}
.rebate-amount {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
  color: var(--primary-dark);
  font-size: clamp(23px, 2vw, 30px);
  font-weight: 950;
  line-height: 1.2;
}
.rebate-amount .rebate-diamonds {
  color: var(--primary);
  font-size: 1em;
  font-weight: 950;
}
.rebate-amount .rebate-separator {
  color: #667085;
  font-size: .64em;
  font-weight: 850;
}
.rebate-amount .rebate-value {
  color: #dc2626;
  font-size: .82em;
  font-weight: 950;
}
.inviter-summary .inviter-name,
.inviter-summary .empty-inviter {
  color: #101828;
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 950;
  line-height: 1.2;
}
.inviter-summary .empty-inviter { color: #64748b; }
.inviter-summary .bind-inviter-btn {
  order: 3;
  width: fit-content;
  min-height: 40px;
  margin-top: 0;
  padding: 0 16px;
  border: 1px solid #bfdbfe;
  background: linear-gradient(135deg, #eaf2ff, #dff6ff);
  color: #1557c0;
  box-shadow: 0 8px 18px rgba(29, 99, 237, .12);
}
.inviter-summary .inviter-help { order: 4; margin-top: 0; }
.simple-invite-row {
  overflow: visible;
}
.simple-invite-index { display: none !important; }
.simple-invite-person { gap: 0; }
.user-consult-info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.user-consult-info-grid .user-info-card {
  min-height: 112px;
  padding: 14px;
}
.user-consult-info-grid .user-info-value {
  font-size: clamp(20px, 2vw, 25px);
}
.quick-user-benefit-grid .user-info-card {
  min-height: 86px;
  padding: 14px 16px;
  gap: 8px;
}
.quick-user-benefit-grid .user-info-value {
  font-size: 18px;
  line-height: 1.25;
}
.quick-user-benefit-grid .benefit-icon-box {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  border-radius: 11px;
}
.quick-user-benefit-grid .benefit-icon-box .benefit-icon {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}
@media (min-width: 1101px) {
  .user-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .user-summary-grid,
  .invite-summary-grid,
  .user-consult-info-grid,
  .quick-user-benefit-grid { grid-template-columns: 1fr !important; }
  .user-summary-grid .user-info-card,
  .invite-summary-grid .user-info-card,
  .user-consult-info-grid .user-info-card,
  .quick-user-benefit-grid .user-info-card {
    min-height: auto;
    padding: 16px;
  }
  .benefit-icon-box {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }
  .user-info-value,
  .invite-summary-grid .user-info-value,
  .inviter-summary .inviter-name,
  .inviter-summary .empty-inviter {
    font-size: 24px;
  }
  .rebate-amount {
    display: flex;
    font-size: 24px;
  }
  .invite-share-preview .invite-link-line {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .simple-invite-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .simple-invite-time {
    width: 100%;
    text-align: left;
    white-space: normal;
  }
  .inviter-summary .bind-inviter-btn {
    width: 100%;
  }
}

/* 本次优化：客服设置 5 分区与后台操作列轻量胶囊按钮 */
.payment-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 1560px;
  margin: 0;
}
.payment-card { padding: 24px; }
.payment-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.payment-section {
  padding: 18px;
  border: 1px solid #dbeafe;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 10px 24px rgba(30, 64, 175, .05);
}
.payment-section-head {
  margin-bottom: 14px;
}
.payment-section-head h4 {
  margin: 0 0 6px;
  color: var(--primary-dark);
  font-size: 17px;
  font-weight: 950;
}
.payment-section-head p { margin: 0; line-height: 1.65; }
.payment-basic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 1240px; }
.payment-form textarea { min-height: 126px; }
.payment-upload-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}
.payment-upload-actions { flex-wrap: wrap; gap: 10px; }
.payment-upload-btn,
.payment-clear-btn {
  min-height: 42px;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 900;
}
.payment-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 22px rgba(29, 99, 237, .16);
}
.payment-clear-btn {
  color: var(--primary-dark);
  background: #eaf2ff;
}
.receipt-template-card {
  padding: 0;
  border: 0;
  background: transparent;
}
.receipt-template-textarea { min-height: 280px !important; }
.receipt-variable-box {
  margin-top: 10px;
  padding: 13px;
  border: 1px dashed #bfdbfe;
  border-radius: 14px;
  background: #f8fbff;
}
.receipt-variable-box b {
  display: block;
  margin-bottom: 10px;
  color: #344054;
}
.receipt-variable-box div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.receipt-variable-box code {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--primary-dark);
  font-weight: 900;
}
.payment-save-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 24px;
  padding-top: 4px;
}
.payment-save-btn {
  min-width: 180px;
  min-height: 46px;
}
@media (max-width: 760px) {
  .payment-save-row {
    justify-content: stretch;
  }

  .payment-save-row .primary-btn {
    width: 100%;
  }
}

.action-stack,
.managed-table-card .table-cell-action .actions,
.managed-table-card .table-cell-action .action-stack,
.managed-table-card .user-row-actions {
  width: 84px;
  gap: 7px;
  align-items: center !important;
}
.action-stack .action-btn,
.managed-table-card .table-cell-action .action-btn,
.managed-table-card .table-cell-action .mini-btn,
.managed-table-card .action-btn.danger,
.managed-table-card .mini-btn.danger {
  width: 82px !important;
  min-height: 32px !important;
  padding: 6px 10px !important;
  border: 1px solid #d8e1ec !important;
  border-radius: 11px !important;
  background: #f4f7fb !important;
  color: #334155 !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}
.action-stack:not(.action-clicked) .action-btn:first-child,
.managed-table-card .table-cell-action .action-stack:not(.action-clicked) .action-btn:first-child {
  border-color: #d8eaff !important;
  background: #eef6ff !important;
  color: #1677ff !important;
}
.action-stack .action-btn:hover,
.managed-table-card .table-cell-action .action-btn:hover,
.managed-table-card .table-cell-action .mini-btn:hover,
.action-stack .action-btn.active,
.managed-table-card .table-cell-action .action-btn.active,
.managed-table-card .table-cell-action .mini-btn.active {
  border-color: transparent !important;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)) !important;
  color: #fff !important;
  box-shadow: none !important;
}
.managed-table-card .data-table col.col-actions,
.managed-table-card .data-table col.col-key-actions,
.products-card.managed-table-card .data-table col.col-actions,
.products-card.managed-table-card .data-table col.col-key-actions,
.orders-card.managed-table-card .data-table col.col-actions,
.orders-card.managed-table-card .data-table col.col-key-actions,
.users-card.managed-table-card .data-table col.col-actions,
.users-card.managed-table-card .data-table col.col-key-actions,
.levels-card.managed-table-card .data-table col.col-actions,
.levels-card.managed-table-card .data-table col.col-key-actions,
.points-card.managed-table-card .data-table col.col-actions,
.points-card.managed-table-card .data-table col.col-key-actions,
.invites-card.managed-table-card .data-table col.col-actions,
.invites-card.managed-table-card .data-table col.col-key-actions,
.costs-card.managed-table-card .data-table col.col-actions,
.costs-card.managed-table-card .data-table col.col-key-actions {
  width: 104px;
}

@media (max-width: 760px) {
  .payment-card { padding: 18px 14px; }
  .payment-section { padding: 15px; }
  .payment-basic-grid,
  .payment-section .form-grid {
    grid-template-columns: 1fr;
  }
  .payment-upload-panel {
    grid-template-columns: 1fr;
  }
  .qr-preview {
    width: 100%;
  }
  .payment-save-btn { width: 100%; }
}

/* 本次修复：邀请返利、会员中心信息栏图标与利润颜色最终覆盖 */
.rebate-amount {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
  color: var(--primary-dark);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 950;
  line-height: 1.22;
  letter-spacing: -.01em;
}
.rebate-amount .rebate-diamonds,
.rebate-amount .rebate-separator,
.rebate-amount .rebate-value {
  font-size: 1em;
  line-height: inherit;
  font-weight: 950;
}
.rebate-amount .rebate-diamonds { color: var(--primary); }
.rebate-amount .rebate-separator {
  color: #475467;
  font-weight: 850;
}
.rebate-amount .rebate-value { color: #dc2626; }
.user-summary-grid .user-info-card {
  min-height: 132px;
  height: 100%;
}
.user-summary-grid .user-info-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-summary-grid .benefit-icon-box {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  box-shadow: none;
}
.user-summary-grid .benefit-icon-box .benefit-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  filter: none;
}
.operation-stats .profit-neg strong { color: var(--success); }
.operation-stats .profit-pos strong { color: var(--danger); }
.operation-stats .profit-zero strong { color: #475467; }
@media (max-width: 760px) {
  .rebate-amount { font-size: 24px; }
  .user-summary-grid .benefit-icon-box {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }
}

/* 本次合并优化：后台操作列按钮、客服二维码按钮与我的订单积分栏最终覆盖 */
.payment-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.payment-upload-btn,
.payment-clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  min-height: 42px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.payment-upload-btn {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #2f80ed 0%, #1da1f2 100%);
  box-shadow: 0 4px 12px rgba(47, 128, 237, .16);
}
.payment-upload-btn:hover {
  background: linear-gradient(135deg, #3b8cf4 0%, #29a9f7 100%);
  box-shadow: 0 6px 16px rgba(47, 128, 237, .22);
  transform: translateY(-1px);
}
.payment-clear-btn {
  border: 1px solid #d9e6f2;
  color: #334155;
  background: #f8fbff;
  box-shadow: none;
}
.payment-clear-btn:hover {
  border-color: #93c5fd;
  color: #1677ff;
  background: #eef6ff;
}

.managed-table-card .table-cell-action .actions,
.managed-table-card .table-cell-action .action-stack,
.managed-table-card .user-row-actions {
  width: 92px;
  gap: 7px;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto;
}
.managed-table-card .table-cell-action .action-btn,
.managed-table-card .table-cell-action .mini-btn,
.managed-table-card .action-btn.danger,
.managed-table-card .mini-btn.danger {
  width: 88px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 14px !important;
  border: 1px solid #d9e6f2 !important;
  border-radius: 12px !important;
  color: #334155 !important;
  background: #f8fbff !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}
.managed-table-card .table-cell-action .action-stack:not(.action-clicked) .action-btn:first-child,
.managed-table-card .table-cell-action .action-stack:not(.action-clicked) .mini-btn:first-child {
  border-color: #d9e6f2 !important;
  color: #334155 !important;
  background: #f8fbff !important;
}
.managed-table-card .table-cell-action .action-btn:hover,
.managed-table-card .table-cell-action .mini-btn:hover {
  border-color: #93c5fd !important;
  color: #1677ff !important;
  background: #eaf4ff !important;
  box-shadow: none !important;
}
.managed-table-card .table-cell-action .action-btn:active,
.managed-table-card .table-cell-action .mini-btn:active,
.managed-table-card .table-cell-action .action-btn.active,
.managed-table-card .table-cell-action .mini-btn.active {
  border-color: #1677ff !important;
  color: #fff !important;
  background: #1677ff !important;
  box-shadow: none !important;
}

.user-friendly-records .order-record-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.user-friendly-records .order-record-grid span {
  min-width: 0;
}
.user-friendly-records .order-record-grid .record-time-text {
  max-width: 100%;
}

@media (max-width: 760px) {
  .user-friendly-records .order-record-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 430px) {
  .user-friendly-records .order-record-grid {
    grid-template-columns: 1fr !important;
  }
  .payment-upload-btn,
  .payment-clear-btn {
    width: 100%;
  }
}

.action-stack {
  width: 92px;
  gap: 7px;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto;
}
.action-stack .action-btn,
.action-stack .action-btn.danger {
  width: 88px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 14px !important;
  border: 1px solid #d9e6f2 !important;
  border-radius: 12px !important;
  color: #334155 !important;
  background: #f8fbff !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}
.action-stack:not(.action-clicked) .action-btn:first-child {
  border-color: #d9e6f2 !important;
  color: #334155 !important;
  background: #f8fbff !important;
}
.action-stack .action-btn:hover {
  border-color: #93c5fd !important;
  color: #1677ff !important;
  background: #eaf4ff !important;
  box-shadow: none !important;
}
.action-stack .action-btn:active,
.action-stack .action-btn.active {
  border-color: #1677ff !important;
  color: #fff !important;
  background: #1677ff !important;
  box-shadow: none !important;
}

/* 本次样式优化：后台操作列层级与客服二维码按钮最终覆盖 */
.managed-table-card .data-table th.table-action-column,
.managed-table-card .data-table td.table-cell-action,
.data-table th.table-action-column,
.data-table td.table-cell-action {
  text-align: center !important;
  vertical-align: middle !important;
  overflow: visible !important;
}
.managed-table-card .table-cell-action .table-cell-inner,
.data-table td.table-cell-action .table-cell-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.managed-table-card .table-cell-action .actions,
.managed-table-card .table-cell-action .action-stack,
.managed-table-card .user-row-actions,
.action-stack {
  width: 88px !important;
  max-width: 100%;
  margin: 0 auto !important;
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  flex-wrap: nowrap !important;
}
.managed-table-card .table-cell-action .action-btn,
.managed-table-card .table-cell-action .mini-btn,
.action-stack .action-btn,
.action-stack .action-btn.danger {
  width: 88px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 12px !important;
  border: 1px solid #d9e6f2 !important;
  border-radius: 12px !important;
  background: #f8fbff !important;
  color: #1e293b !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  text-align: center !important;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .12s ease, box-shadow .16s ease !important;
}
.managed-table-card .table-cell-action .action-stack:not(.action-clicked) .action-btn:first-child,
.managed-table-card .table-cell-action .action-stack:not(.action-clicked) .mini-btn:first-child,
.action-stack:not(.action-clicked) .action-btn:first-child {
  border-color: #d9e6f2 !important;
  background: #f8fbff !important;
  color: #1e293b !important;
}
.managed-table-card .table-cell-action .action-btn:hover,
.managed-table-card .table-cell-action .mini-btn:hover,
.action-stack .action-btn:hover {
  border-color: #93c5fd !important;
  background: #eaf4ff !important;
  color: #1677ff !important;
  box-shadow: none !important;
}
.managed-table-card .table-cell-action .action-btn:active,
.managed-table-card .table-cell-action .mini-btn:active,
.managed-table-card .table-cell-action .action-btn.active,
.managed-table-card .table-cell-action .mini-btn.active,
.action-stack .action-btn:active,
.action-stack .action-btn.active {
  border-color: #93c5fd !important;
  background: #dceeff !important;
  color: #1677ff !important;
  transform: translateY(1px) !important;
  box-shadow: none !important;
}
.managed-table-card .table-cell-action .action-btn.danger,
.managed-table-card .table-cell-action .mini-btn.danger,
.action-stack .action-btn.danger,
.action-stack .mini-btn.danger {
  border-color: #d9e6f2 !important;
  background: #f8fbff !important;
  color: #b42318 !important;
  box-shadow: none !important;
}
.managed-table-card .table-cell-action .action-btn.danger:hover,
.managed-table-card .table-cell-action .mini-btn.danger:hover,
.action-stack .action-btn.danger:hover,
.action-stack .mini-btn.danger:hover {
  border-color: #f3b5b5 !important;
  background: #fff1f1 !important;
  color: #b42318 !important;
  box-shadow: none !important;
}
.managed-table-card .table-cell-action .action-btn.danger:active,
.managed-table-card .table-cell-action .mini-btn.danger:active,
.managed-table-card .table-cell-action .action-btn.danger.active,
.managed-table-card .table-cell-action .mini-btn.danger.active,
.action-stack .action-btn.danger:active,
.action-stack .action-btn.danger.active,
.action-stack .mini-btn.danger:active,
.action-stack .mini-btn.danger.active {
  border-color: #f3b5b5 !important;
  background: #ffe6e6 !important;
  color: #b42318 !important;
  transform: translateY(1px) !important;
  box-shadow: none !important;
}
.managed-table-card .data-table col.col-actions,
.managed-table-card .data-table col.col-key-actions,
.data-table col.col-actions,
.data-table col.col-key-actions {
  width: 104px !important;
}

.payment-upload-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 16px !important;
}
.payment-upload-btn,
.payment-clear-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 28px !important;
  border-radius: 16px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease !important;
}
.payment-upload-btn {
  border: none !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%) !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18) !important;
}
.payment-upload-btn:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%) !important;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22) !important;
  transform: translateY(-1px) !important;
}
.payment-upload-btn:active {
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.16) !important;
  transform: translateY(0) !important;
}
.payment-clear-btn {
  border: 1px solid #d9e6f2 !important;
  color: #1e293b !important;
  background: #f8fbff !important;
  box-shadow: none !important;
}
.payment-clear-btn:hover {
  border-color: #93c5fd !important;
  color: #1677ff !important;
  background: #eef6ff !important;
  box-shadow: none !important;
}
.payment-clear-btn:active {
  transform: translateY(0) !important;
  background: #eaf4ff !important;
}

@media (max-width: 430px) {
  .payment-upload-actions {
    gap: 12px !important;
  }
  .payment-upload-btn,
  .payment-clear-btn {
    width: 100% !important;
    padding: 0 18px !important;
  }
}

/* 本次样式优化：二级标题、订单详情层级与后台操作按钮最终统一 */
.payment-section-head h4,
.settings-section-title h4 {
  color: #1455a0 !important;
  font-weight: 700 !important;
}
.order-detail-section h4 {
  color: #1e293b !important;
  font-weight: 700 !important;
}

.order-detail-summary span:not(.badge),
.order-metric-card span,
.order-detail-row span,
.order-detail-note-block b {
  color: #64748b !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}
.order-detail-summary strong,
.order-metric-card strong,
.order-detail-row strong,
.order-detail-note-block p {
  color: #1e293b !important;
  font-weight: 600 !important;
}
.order-detail-summary strong {
  font-size: 18px !important;
}
.order-metric-card {
  background: #fbfdff !important;
  border-color: var(--border) !important;
  box-shadow: none !important;
}
.order-metric-card strong {
  font-size: 16px !important;
}
.order-metric-card.primary {
  background: #f8fbff !important;
  border-color: #bfdbfe !important;
}
.order-metric-card.primary strong {
  color: #1677ff !important;
  font-size: 19px !important;
  font-weight: 700 !important;
}
.order-metric-card.refund {
  background: #fff !important;
  border-color: #fecaca !important;
}
.order-metric-card.refund strong {
  color: #dc2626 !important;
  font-size: 19px !important;
  font-weight: 700 !important;
}
.order-metric-card.diamond strong,
.order-metric-card.is-muted strong {
  color: #64748b !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}
.order-metric-card.diamond span::before { content: none !important; }
.order-detail-row strong,
.order-detail-note-block p {
  font-size: 15px !important;
}

.managed-table-card .table-cell-action .action-btn,
.managed-table-card .table-cell-action .mini-btn,
.action-stack .action-btn,
.action-stack .action-btn.danger,
.action-stack .mini-btn.danger {
  width: 88px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 12px !important;
  border: 1px solid #d9e6f2 !important;
  border-radius: 12px !important;
  background: #f8fbff !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}
.managed-table-card .table-cell-action .action-btn.action-primary,
.action-stack .action-btn.action-primary,
.action-stack:not(.action-clicked) .action-btn.action-primary:first-child {
  color: #1677ff !important;
}
.managed-table-card .table-cell-action .action-btn.action-primary:hover,
.action-stack .action-btn.action-primary:hover {
  border-color: #93c5fd !important;
  background: #eaf4ff !important;
  color: #1677ff !important;
}
.managed-table-card .table-cell-action .action-btn.action-primary:active,
.managed-table-card .table-cell-action .action-btn.action-primary.active,
.action-stack .action-btn.action-primary:active,
.action-stack .action-btn.action-primary.active {
  border-color: #93c5fd !important;
  background: #dceeff !important;
  color: #1677ff !important;
  transform: translateY(1px) !important;
}
.managed-table-card .table-cell-action .action-btn.action-secondary,
.managed-table-card .table-cell-action .action-btn.danger,
.managed-table-card .table-cell-action .mini-btn.danger,
.action-stack .action-btn.action-secondary,
.action-stack .action-btn.danger,
.action-stack .mini-btn.danger {
  border-color: #d9e6f2 !important;
  background: #f8fbff !important;
  color: #475569 !important;
}
.managed-table-card .table-cell-action .action-btn.action-secondary:hover,
.managed-table-card .table-cell-action .action-btn.danger:hover,
.managed-table-card .table-cell-action .mini-btn.danger:hover,
.action-stack .action-btn.action-secondary:hover,
.action-stack .action-btn.danger:hover,
.action-stack .mini-btn.danger:hover {
  border-color: #cbd5e1 !important;
  background: #f1f5f9 !important;
  color: #1e293b !important;
}
.managed-table-card .table-cell-action .action-btn.action-secondary:active,
.managed-table-card .table-cell-action .action-btn.action-secondary.active,
.managed-table-card .table-cell-action .action-btn.danger:active,
.managed-table-card .table-cell-action .mini-btn.danger:active,
.managed-table-card .table-cell-action .action-btn.danger.active,
.managed-table-card .table-cell-action .mini-btn.danger.active,
.action-stack .action-btn.action-secondary:active,
.action-stack .action-btn.action-secondary.active,
.action-stack .action-btn.danger:active,
.action-stack .action-btn.danger.active,
.action-stack .mini-btn.danger:active,
.action-stack .mini-btn.danger.active {
  border-color: #cbd5e1 !important;
  background: #e2e8f0 !important;
  color: #1e293b !important;
  transform: translateY(1px) !important;
}

/* 本次优化：充值订单详情信息栏标题与后台表格表头颜色统一 */
.order-metric-card span,
.order-detail-row span,
.order-detail-note-block b {
  color: #1e293b !important;
  font-weight: 600 !important;
}

.managed-table-card table.admin-table th,
.managed-table-card table.data-table th,
.stats-page table.data-table th,
table.data-table.admin-table th {
  color: #1455a0 !important;
  font-weight: 700 !important;
}

/* 本次优化：充值订单详情标题改回黑色，后台表格操作按钮按主次层级着色 */
.order-detail-section h4 {
  color: #1e293b !important;
  font-weight: 700 !important;
}

.managed-table-card .table-cell-action .action-stack:not(.action-clicked) .action-btn.action-primary:first-child,
.data-table td.table-cell-action .action-stack:not(.action-clicked) .action-btn.action-primary:first-child,
.managed-table-card .table-cell-action .action-btn.action-primary,
.data-table td.table-cell-action .action-btn.action-primary,
.action-stack .action-btn.action-primary {
  color: #1677ff !important;
}

.managed-table-card .table-cell-action .action-btn.action-primary:hover,
.data-table td.table-cell-action .action-btn.action-primary:hover,
.action-stack .action-btn.action-primary:hover,
.managed-table-card .table-cell-action .action-btn.action-primary:active,
.managed-table-card .table-cell-action .action-btn.action-primary.active,
.data-table td.table-cell-action .action-btn.action-primary:active,
.data-table td.table-cell-action .action-btn.action-primary.active,
.action-stack .action-btn.action-primary:active,
.action-stack .action-btn.action-primary.active {
  border-color: #93c5fd !important;
  background: #eaf4ff !important;
  color: #1677ff !important;
}

.managed-table-card .table-cell-action .action-btn.action-secondary,
.managed-table-card .table-cell-action .action-btn.danger,
.managed-table-card .table-cell-action .mini-btn.danger,
.data-table td.table-cell-action .action-btn.action-secondary,
.data-table td.table-cell-action .action-btn.danger,
.data-table td.table-cell-action .mini-btn.danger,
.action-stack .action-btn.action-secondary,
.action-stack .action-btn.danger,
.action-stack .mini-btn.danger {
  color: #475569 !important;
}

.managed-table-card .table-cell-action .action-btn.action-secondary:hover,
.managed-table-card .table-cell-action .action-btn.danger:hover,
.managed-table-card .table-cell-action .mini-btn.danger:hover,
.data-table td.table-cell-action .action-btn.action-secondary:hover,
.data-table td.table-cell-action .action-btn.danger:hover,
.data-table td.table-cell-action .mini-btn.danger:hover,
.action-stack .action-btn.action-secondary:hover,
.action-stack .action-btn.danger:hover,
.action-stack .mini-btn.danger:hover,
.managed-table-card .table-cell-action .action-btn.action-secondary:active,
.managed-table-card .table-cell-action .action-btn.action-secondary.active,
.managed-table-card .table-cell-action .action-btn.danger:active,
.managed-table-card .table-cell-action .mini-btn.danger:active,
.managed-table-card .table-cell-action .action-btn.danger.active,
.managed-table-card .table-cell-action .mini-btn.danger.active,
.data-table td.table-cell-action .action-btn.action-secondary:active,
.data-table td.table-cell-action .action-btn.action-secondary.active,
.data-table td.table-cell-action .action-btn.danger:active,
.data-table td.table-cell-action .mini-btn.danger:active,
.data-table td.table-cell-action .action-btn.danger.active,
.data-table td.table-cell-action .mini-btn.danger.active,
.action-stack .action-btn.action-secondary:active,
.action-stack .action-btn.action-secondary.active,
.action-stack .action-btn.danger:active,
.action-stack .action-btn.danger.active,
.action-stack .mini-btn.danger:active,
.action-stack .mini-btn.danger.active {
  border-color: #cbd5e1 !important;
  background: #f1f5f9 !important;
  color: #475569 !important;
}

/* 本次修复：后台操作蓝色、订单详情金额与客户商品信息栏最终统一 */
.managed-table-card table.admin-table th,
.managed-table-card table.data-table th,
.stats-page table.data-table th,
table.data-table.admin-table th {
  color: var(--table-header-blue) !important;
}

.managed-table-card .table-cell-action .action-stack:not(.action-clicked) .action-btn.action-primary:first-child,
.data-table td.table-cell-action .action-stack:not(.action-clicked) .action-btn.action-primary:first-child,
.managed-table-card .table-cell-action .action-btn.action-primary,
.data-table td.table-cell-action .action-btn.action-primary,
.action-stack .action-btn.action-primary,
.managed-table-card .table-cell-action .action-btn.action-primary:hover,
.data-table td.table-cell-action .action-btn.action-primary:hover,
.action-stack .action-btn.action-primary:hover,
.managed-table-card .table-cell-action .action-btn.action-primary:active,
.managed-table-card .table-cell-action .action-btn.action-primary.active,
.data-table td.table-cell-action .action-btn.action-primary:active,
.data-table td.table-cell-action .action-btn.action-primary.active,
.action-stack .action-btn.action-primary:active,
.action-stack .action-btn.action-primary.active {
  color: var(--table-header-blue) !important;
}

.managed-table-card .table-cell-action .action-btn.action-secondary,
.managed-table-card .table-cell-action .action-btn.danger,
.managed-table-card .table-cell-action .mini-btn.danger,
.data-table td.table-cell-action .action-btn.action-secondary,
.data-table td.table-cell-action .action-btn.danger,
.data-table td.table-cell-action .mini-btn.danger,
.action-stack .action-btn.action-secondary,
.action-stack .action-btn.danger,
.action-stack .mini-btn.danger,
.managed-table-card .table-cell-action .action-btn.action-secondary:hover,
.managed-table-card .table-cell-action .action-btn.danger:hover,
.managed-table-card .table-cell-action .mini-btn.danger:hover,
.data-table td.table-cell-action .action-btn.action-secondary:hover,
.data-table td.table-cell-action .action-btn.danger:hover,
.data-table td.table-cell-action .mini-btn.danger:hover,
.action-stack .action-btn.action-secondary:hover,
.action-stack .action-btn.danger:hover,
.action-stack .mini-btn.danger:hover,
.managed-table-card .table-cell-action .action-btn.action-secondary:active,
.managed-table-card .table-cell-action .action-btn.action-secondary.active,
.managed-table-card .table-cell-action .action-btn.danger:active,
.managed-table-card .table-cell-action .mini-btn.danger:active,
.managed-table-card .table-cell-action .action-btn.danger.active,
.managed-table-card .table-cell-action .mini-btn.danger.active,
.data-table td.table-cell-action .action-btn.action-secondary:active,
.data-table td.table-cell-action .action-btn.action-secondary.active,
.data-table td.table-cell-action .action-btn.danger:active,
.data-table td.table-cell-action .mini-btn.danger:active,
.data-table td.table-cell-action .action-btn.danger.active,
.data-table td.table-cell-action .mini-btn.danger.active,
.action-stack .action-btn.action-secondary:active,
.action-stack .action-btn.action-secondary.active,
.action-stack .action-btn.danger:active,
.action-stack .action-btn.danger.active,
.action-stack .mini-btn.danger:active,
.action-stack .mini-btn.danger.active {
  color: #475569 !important;
}

.order-detail-section h4 {
  color: #1e293b !important;
  font-weight: 700 !important;
}

.order-metric-grid,
.order-detail-customer-grid,
.order-detail-rows {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.order-detail-rows,
.order-detail-notes {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.order-metric-card,
.order-detail-row,
.order-detail-note-block {
  min-width: 0 !important;
  background: #f8fbff !important;
  border: 1px solid #d9e6f2 !important;
  border-radius: 12px !important;
  padding: 14px 16px !important;
  box-shadow: none !important;
}

.order-metric-card span,
.order-detail-row span,
.order-detail-note-block b {
  display: block !important;
  color: #1e293b !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  margin: 0 0 8px !important;
}

.order-metric-card strong,
.order-detail-row strong,
.order-detail-note-block p {
  display: block !important;
  color: #1e293b !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  overflow-wrap: anywhere !important;
}

.order-metric-card.primary,
.order-metric-card.refund,
.order-metric-card.is-muted,
.order-metric-card.diamond {
  background: #f8fbff !important;
  border-color: #d9e6f2 !important;
}

.order-metric-card.primary strong {
  color: var(--table-header-blue) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
}

.order-metric-card.refund strong {
  color: #dc2626 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
}

.order-metric-card.is-muted strong {
  color: #64748b !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
}

.order-metric-card.diamond strong {
  color: #1e293b !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
}

@media (max-width: 900px) {
  .order-metric-grid,
  .order-detail-customer-grid,
  .order-detail-rows {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 430px) {
  .order-metric-grid,
  .order-detail-customer-grid,
  .order-detail-rows {
    grid-template-columns: 1fr !important;
  }
}

/* 统一后台所有表格操作列按钮文字颜色 */
.managed-table-card .table-cell-action button,
.managed-table-card .table-cell-action .action-btn,
.managed-table-card .table-cell-action .mini-btn,
.data-table td.table-cell-action button,
.data-table td.table-cell-action .action-btn,
.data-table td.table-cell-action .mini-btn,
.action-stack button,
.action-stack .action-btn,
.action-stack .mini-btn,
.action-stack .action-btn.action-primary,
.action-stack .action-btn.action-secondary,
.action-stack .action-btn.danger,
.action-stack .mini-btn.danger {
  color: var(--table-header-blue) !important;
}

.managed-table-card .table-cell-action button:hover,
.managed-table-card .table-cell-action .action-btn:hover,
.managed-table-card .table-cell-action .mini-btn:hover,
.data-table td.table-cell-action button:hover,
.data-table td.table-cell-action .action-btn:hover,
.data-table td.table-cell-action .mini-btn:hover,
.action-stack button:hover,
.action-stack .action-btn:hover,
.action-stack .mini-btn:hover,
.action-stack .action-btn.action-primary:hover,
.action-stack .action-btn.action-secondary:hover,
.action-stack .action-btn.danger:hover,
.action-stack .mini-btn.danger:hover,
.managed-table-card .table-cell-action button:active,
.managed-table-card .table-cell-action .action-btn:active,
.managed-table-card .table-cell-action .mini-btn:active,
.managed-table-card .table-cell-action button.active,
.managed-table-card .table-cell-action .action-btn.active,
.managed-table-card .table-cell-action .mini-btn.active,
.data-table td.table-cell-action button:active,
.data-table td.table-cell-action .action-btn:active,
.data-table td.table-cell-action .mini-btn:active,
.data-table td.table-cell-action button.active,
.data-table td.table-cell-action .action-btn.active,
.data-table td.table-cell-action .mini-btn.active,
.action-stack button:active,
.action-stack .action-btn:active,
.action-stack .mini-btn:active,
.action-stack button.active,
.action-stack .action-btn.active,
.action-stack .mini-btn.active {
  border-color: #93c5fd !important;
  background: #eaf4ff !important;
  color: var(--table-header-blue) !important;
}

/* 本次优化：用户咨询弹窗商品链接区域 */
.product-link-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  margin: 10px 0 12px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
  box-shadow: 0 10px 24px rgba(30, 64, 175, .055);
  overflow: hidden;
}
.product-link-card b {
  display: block;
  margin-bottom: 5px;
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 950;
}
.product-link-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.product-link-btn {
  min-height: 40px;
  flex: 0 0 auto;
}
.product-link-switch {
  background: #fff;
}
@media (max-width: 640px) {
  .product-link-card {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 13px;
  }
  .product-link-btn {
    width: 100%;
  }
}

/* 本次修复：抽离并统一所有表格“操作”列按钮样式，复用编辑按钮的蓝色浅底风格 */
:root {
  --table-action-color: var(--table-header-blue);
  --table-action-border: #d9e6f2;
  --table-action-bg: #f8fbff;
  --table-action-hover-border: #93c5fd;
  --table-action-hover-bg: #eef6ff;
  --table-action-active-bg: #eaf4ff;
  --table-action-focus-ring: rgba(14, 165, 233, .16);
}

.table-action-btn,
.table-cell-action button,
.table-cell-action .mini-btn,
.table-cell-action .action-btn,
.action-stack button,
.action-stack .mini-btn,
.action-stack .action-btn,
.action-stack .action-btn.action-primary,
.action-stack .action-btn.action-secondary,
.action-stack .action-btn.danger,
.action-stack .mini-btn.danger,
.managed-table-card .table-cell-action button,
.managed-table-card .table-cell-action .mini-btn,
.managed-table-card .table-cell-action .action-btn,
.data-table td.table-cell-action button,
.data-table td.table-cell-action .mini-btn,
.data-table td.table-cell-action .action-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 88px !important;
  height: 32px !important;
  min-width: 88px !important;
  min-height: 32px !important;
  padding: 0 12px !important;
  border: 1px solid var(--table-action-border) !important;
  border-radius: 12px !important;
  background: var(--table-action-bg) !important;
  color: var(--table-action-color) !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  transform: none !important;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease !important;
}

.table-action-btn:hover,
.table-cell-action button:hover,
.table-cell-action .mini-btn:hover,
.table-cell-action .action-btn:hover,
.action-stack button:hover,
.action-stack .mini-btn:hover,
.action-stack .action-btn:hover,
.action-stack .action-btn.action-primary:hover,
.action-stack .action-btn.action-secondary:hover,
.action-stack .action-btn.danger:hover,
.action-stack .mini-btn.danger:hover,
.managed-table-card .table-cell-action button:hover,
.managed-table-card .table-cell-action .mini-btn:hover,
.managed-table-card .table-cell-action .action-btn:hover,
.data-table td.table-cell-action button:hover,
.data-table td.table-cell-action .mini-btn:hover,
.data-table td.table-cell-action .action-btn:hover {
  border-color: var(--table-action-hover-border) !important;
  background: var(--table-action-hover-bg) !important;
  color: var(--table-action-color) !important;
  box-shadow: none !important;
  transform: translateY(-1px) !important;
}

.table-action-btn:active,
.table-action-btn.active,
.table-cell-action button:active,
.table-cell-action button.active,
.table-cell-action .mini-btn:active,
.table-cell-action .mini-btn.active,
.table-cell-action .action-btn:active,
.table-cell-action .action-btn.active,
.action-stack button:active,
.action-stack button.active,
.action-stack .mini-btn:active,
.action-stack .mini-btn.active,
.action-stack .action-btn:active,
.action-stack .action-btn.active,
.action-stack .action-btn.action-primary:active,
.action-stack .action-btn.action-primary.active,
.action-stack .action-btn.action-secondary:active,
.action-stack .action-btn.action-secondary.active,
.action-stack .action-btn.danger:active,
.action-stack .action-btn.danger.active,
.action-stack .mini-btn.danger:active,
.action-stack .mini-btn.danger.active,
.managed-table-card .table-cell-action button:active,
.managed-table-card .table-cell-action button.active,
.managed-table-card .table-cell-action .mini-btn:active,
.managed-table-card .table-cell-action .mini-btn.active,
.managed-table-card .table-cell-action .action-btn:active,
.managed-table-card .table-cell-action .action-btn.active,
.data-table td.table-cell-action button:active,
.data-table td.table-cell-action button.active,
.data-table td.table-cell-action .mini-btn:active,
.data-table td.table-cell-action .mini-btn.active,
.data-table td.table-cell-action .action-btn:active,
.data-table td.table-cell-action .action-btn.active {
  border-color: var(--table-action-hover-border) !important;
  background: var(--table-action-active-bg) !important;
  color: var(--table-action-color) !important;
  box-shadow: none !important;
  transform: translateY(1px) !important;
}

.table-action-btn:focus-visible,
.table-cell-action button:focus-visible,
.table-cell-action .mini-btn:focus-visible,
.table-cell-action .action-btn:focus-visible,
.action-stack button:focus-visible,
.action-stack .mini-btn:focus-visible,
.action-stack .action-btn:focus-visible,
.managed-table-card .table-cell-action button:focus-visible,
.managed-table-card .table-cell-action .mini-btn:focus-visible,
.managed-table-card .table-cell-action .action-btn:focus-visible,
.data-table td.table-cell-action button:focus-visible,
.data-table td.table-cell-action .mini-btn:focus-visible,
.data-table td.table-cell-action .action-btn:focus-visible {
  outline: none !important;
  border-color: var(--table-action-hover-border) !important;
  background: var(--table-action-hover-bg) !important;
  color: var(--table-action-color) !important;
  box-shadow: 0 0 0 4px var(--table-action-focus-ring) !important;
}

/* 最终统一：后台表格“操作”列按钮强制复用同一套编辑按钮蓝色浅底样式 */
:root {
  --table-action-color: var(--table-header-blue, #1455a0);
  --table-action-border: #d9e6f2;
  --table-action-bg: #f8fbff;
  --table-action-hover-border: #93c5fd;
  --table-action-hover-bg: #eaf4ff;
  --table-action-focus-ring: rgba(20, 85, 160, .16);
}

#app table.data-table.admin-table th.table-cell-action,
#app table.data-table.admin-table th.table-action-column,
#app .managed-table-card table.data-table.admin-table th.table-cell-action,
#app .managed-table-card table.data-table.admin-table th.table-action-column {
  color: var(--table-action-color) !important;
  font-weight: 700 !important;
  text-align: center !important;
}

#app table.data-table.admin-table td.table-cell-action,
#app table.data-table.admin-table td.table-action-column,
#app .managed-table-card table.data-table.admin-table td.table-cell-action,
#app .managed-table-card table.data-table.admin-table td.table-action-column {
  overflow: visible !important;
  text-align: center !important;
}

#app table.data-table.admin-table td.table-cell-action .table-cell-inner,
#app table.data-table.admin-table td.table-action-column .table-cell-inner,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .table-cell-inner,
#app .managed-table-card table.data-table.admin-table td.table-action-column .table-cell-inner {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  min-width: 0 !important;
  overflow: visible !important;
}

#app .admin-table-action-stack,
#app table.data-table.admin-table td.table-cell-action .actions,
#app table.data-table.admin-table td.table-cell-action .action-stack,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .actions,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .action-stack,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .user-row-actions {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: center !important;
  flex-wrap: nowrap !important;
  gap: 7px !important;
  width: 92px !important;
  max-width: 100% !important;
  max-height: none !important;
  margin: 0 auto !important;
  overflow: visible !important;
}

#app table.data-table.admin-table td.table-cell-action button,
#app table.data-table.admin-table td.table-cell-action .mini-btn,
#app table.data-table.admin-table td.table-cell-action .action-btn,
#app table.data-table.admin-table td.table-cell-action .table-action-btn,
#app table.data-table.admin-table td.table-cell-action .admin-action-btn,
#app table.data-table.admin-table td.table-cell-action .admin-table-action-btn,
#app table.data-table.admin-table td.table-cell-action .danger,
#app table.data-table.admin-table td.table-cell-action .secondary,
#app table.data-table.admin-table td.table-cell-action .secondary-btn,
#app table.data-table.admin-table td.table-cell-action .ghost,
#app table.data-table.admin-table td.table-cell-action .ghost-btn,
#app table.data-table.admin-table td.table-cell-action .refund,
#app table.data-table.admin-table td.table-cell-action .reset-password-btn,
#app .managed-table-card table.data-table.admin-table td.table-cell-action button,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .mini-btn,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .action-btn,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .table-action-btn,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .admin-action-btn,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .admin-table-action-btn,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .danger,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .secondary,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .secondary-btn,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .ghost,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .ghost-btn,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .refund,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .reset-password-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 76px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 12px !important;
  border: 1px solid var(--table-action-border) !important;
  border-radius: 12px !important;
  background: var(--table-action-bg) !important;
  background-image: none !important;
  color: var(--table-action-color) !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  text-shadow: none !important;
  white-space: nowrap !important;
  opacity: 1 !important;
  transform: none !important;
}

#app table.data-table.admin-table td.table-cell-action button:hover,
#app table.data-table.admin-table td.table-cell-action .mini-btn:hover,
#app table.data-table.admin-table td.table-cell-action .action-btn:hover,
#app table.data-table.admin-table td.table-cell-action .table-action-btn:hover,
#app table.data-table.admin-table td.table-cell-action .admin-action-btn:hover,
#app table.data-table.admin-table td.table-cell-action .admin-table-action-btn:hover,
#app table.data-table.admin-table td.table-cell-action .danger:hover,
#app table.data-table.admin-table td.table-cell-action .secondary:hover,
#app table.data-table.admin-table td.table-cell-action .secondary-btn:hover,
#app table.data-table.admin-table td.table-cell-action .ghost:hover,
#app table.data-table.admin-table td.table-cell-action .ghost-btn:hover,
#app table.data-table.admin-table td.table-cell-action .refund:hover,
#app table.data-table.admin-table td.table-cell-action .reset-password-btn:hover,
#app table.data-table.admin-table td.table-cell-action button:active,
#app table.data-table.admin-table td.table-cell-action button.active,
#app table.data-table.admin-table td.table-cell-action .mini-btn:active,
#app table.data-table.admin-table td.table-cell-action .mini-btn.active,
#app table.data-table.admin-table td.table-cell-action .action-btn:active,
#app table.data-table.admin-table td.table-cell-action .action-btn.active,
#app table.data-table.admin-table td.table-cell-action .table-action-btn:active,
#app table.data-table.admin-table td.table-cell-action .table-action-btn.active,
#app table.data-table.admin-table td.table-cell-action .admin-action-btn:active,
#app table.data-table.admin-table td.table-cell-action .admin-action-btn.active,
#app table.data-table.admin-table td.table-cell-action .admin-table-action-btn:active,
#app table.data-table.admin-table td.table-cell-action .admin-table-action-btn.active,
#app .managed-table-card table.data-table.admin-table td.table-cell-action button:hover,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .mini-btn:hover,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .action-btn:hover,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .table-action-btn:hover,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .admin-action-btn:hover,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .admin-table-action-btn:hover,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .danger:hover,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .secondary:hover,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .secondary-btn:hover,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .ghost:hover,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .ghost-btn:hover,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .refund:hover,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .reset-password-btn:hover,
#app .managed-table-card table.data-table.admin-table td.table-cell-action button:active,
#app .managed-table-card table.data-table.admin-table td.table-cell-action button.active,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .mini-btn:active,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .mini-btn.active,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .action-btn:active,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .action-btn.active,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .table-action-btn:active,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .table-action-btn.active,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .admin-action-btn:active,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .admin-action-btn.active,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .admin-table-action-btn:active,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .admin-table-action-btn.active {
  border-color: var(--table-action-hover-border) !important;
  background: var(--table-action-hover-bg) !important;
  background-image: none !important;
  color: var(--table-action-color) !important;
  box-shadow: none !important;
  transform: translateY(-1px) !important;
}

#app table.data-table.admin-table td.table-cell-action button:focus-visible,
#app table.data-table.admin-table td.table-cell-action .mini-btn:focus-visible,
#app table.data-table.admin-table td.table-cell-action .action-btn:focus-visible,
#app table.data-table.admin-table td.table-cell-action .table-action-btn:focus-visible,
#app table.data-table.admin-table td.table-cell-action .admin-action-btn:focus-visible,
#app table.data-table.admin-table td.table-cell-action .admin-table-action-btn:focus-visible,
#app .managed-table-card table.data-table.admin-table td.table-cell-action button:focus-visible,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .mini-btn:focus-visible,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .action-btn:focus-visible,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .table-action-btn:focus-visible,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .admin-action-btn:focus-visible,
#app .managed-table-card table.data-table.admin-table td.table-cell-action .admin-table-action-btn:focus-visible {
  outline: none !important;
  border-color: var(--table-action-hover-border) !important;
  background: var(--table-action-hover-bg) !important;
  background-image: none !important;
  color: var(--table-action-color) !important;
  box-shadow: 0 0 0 4px var(--table-action-focus-ring) !important;
}

/* 用户端手机展示精简：后台入口与顶部操作区 */
.admin-entry {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}
.link-btn {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 800;
  cursor: pointer;
  padding: 6px 8px;
}
.link-btn:hover { color: var(--primary-dark); text-decoration: underline; }

@media (max-width: 640px) {
  .topbar { align-items: center; }
  .top-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    width: auto;
    flex-wrap: wrap;
  }
  .top-actions .primary-btn,
  .top-actions .secondary-btn,
  .top-actions .ghost-btn,
  .top-actions .mini-btn,
  .account-pill {
    width: auto;
    min-height: 34px;
    white-space: nowrap;
  }
  .top-actions .mini-btn,
  .top-actions .ghost-btn { padding: 8px 10px; }
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .filters button { flex: 0 0 auto; }
}


/* 注册邀请码准入与游客会员价提示 */
.invite-help-link, .guest-member-tip { padding: 0; min-height: auto; color: #2563eb; font-size: 13px; text-align: left; }
.guest-member-tip { margin-top: 3px; color: #64748b; font-weight: 600; }
.guest-member-tip:hover, .invite-help-link:hover { color: #1d4ed8; text-decoration: underline; }
.registration-invite-control-panel {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0 16px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fbff 0%, #eef7ff 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82);
}
.registration-invite-generate {
  display: flex;
  align-items: stretch;
  gap: 12px;
  min-width: 0;
}
.registration-invite-count-field {
  min-width: 210px;
  margin: 0;
}
.registration-invite-count-field label {
  margin-bottom: 8px;
  color: #1e3a8a;
  font-weight: 950;
}
.registration-count-input-wrap {
  display: flex;
  align-items: center;
  height: 48px;
  overflow: hidden;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(37,99,235,.08);
}
.registration-count-input-wrap input {
  width: 130px;
  height: 100%;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  font-size: 18px;
  font-weight: 900;
}
.registration-count-input-wrap span {
  padding: 0 14px;
  color: #2563eb;
  font-weight: 950;
}
.registration-generate-btn,
.registration-copy-unused-btn {
  align-self: flex-end;
  min-height: 48px;
  border-radius: 14px;
  font-weight: 950;
  white-space: nowrap;
}
.registration-copy-unused-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 230px;
  gap: 2px;
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.registration-copy-unused-btn small {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.registration-code-text { color: #0f172a; font-weight: 900; letter-spacing: .08em; }
.registration-invite-card .mini-btn, .registration-invite-card .danger-btn.mini-btn { margin: 2px 4px 2px 0; padding: 7px 10px; min-height: 34px; }
@media (max-width: 720px) {
  .registration-invite-control-panel,
  .registration-invite-generate { width: 100%; align-items: stretch; flex-direction: column; gap: 10px; }
  .registration-invite-count-field,
  .registration-copy-unused-btn { width: 100%; min-width: 0; }
  .registration-generate-btn,
  .registration-copy-unused-btn { width: 100%; }
}

/* 用户端手机商城首页改版 */
.user-topbar { justify-content: flex-end; }
.user-topbar h1 { display: none; }
.shop-mobile-home { display: grid; gap: 14px; margin-bottom: 18px; }
.shop-hero { position: relative; overflow: hidden; border-radius: 24px; padding: 18px; color: #fff; background: radial-gradient(circle at 82% 12%, rgba(255,255,255,.28), transparent 30%), linear-gradient(135deg, #1557d6 0%, #1d63ed 48%, #0ea5e9 100%); box-shadow: 0 18px 42px rgba(29,99,237,.22); }
.shop-hero::after { content: ""; position: absolute; right: -28px; bottom: -34px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,.12); pointer-events: none; }
.shop-hero-top { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.shop-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.shop-logo { width: 52px; height: 52px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; color: #1557d6; background: #fff; font-size: 24px; font-weight: 950; box-shadow: 0 12px 28px rgba(15,23,42,.16); }
.shop-title-block { min-width: 0; }
.shop-title-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.shop-title-line h2 { margin: 0; max-width: 168px; font-size: 20px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-title-line span { flex: 0 0 auto; padding: 3px 7px; border-radius: 999px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.25); font-size: 11px; font-weight: 900; }
.shop-title-block p, .shop-intro { margin: 6px 0 0; color: rgba(255,255,255,.84); font-size: 13px; }
.shop-intro { position: relative; z-index: 1; line-height: 1.55; margin-top: 14px; }
.shop-quick-actions { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }
.shop-quick-actions button { min-height: 42px; border-radius: 14px; background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.22); font-weight: 900; font-size: 13px; }
.shop-quick-actions .contact { background: #fff; color: #1557d6; }
.shop-search-panel, .shop-category-panel { border: 1px solid #e8eef8; border-radius: 20px; background: #fff; box-shadow: 0 12px 30px rgba(30,64,175,.07); padding: 14px; }
.shop-search-panel label { display: block; margin-bottom: 8px; color: #344054; font-size: 13px; font-weight: 900; }
.shop-search-panel > div { display: flex; gap: 8px; }
.shop-search-panel input { flex: 1; min-width: 0; min-height: 44px; border: 1px solid #dbe5f4; border-radius: 14px; padding: 0 13px; outline: none; }
.shop-search-panel button { min-height: 44px; padding: 0 12px; border-radius: 14px; color: #1557d6; background: #eaf2ff; font-weight: 900; }
.shop-section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.shop-section-title h3 { margin: 0; font-size: 18px; }
.shop-section-title span { color: #667085; font-size: 13px; font-weight: 800; }
.shop-category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.shop-category-card { position: relative; min-width: 0; min-height: 104px; text-align: left; padding: 13px; border-radius: 16px; border: 1px solid #edf1f7; background: #f7f8fa; color: #172033; display: flex; flex-direction: column; justify-content: center; gap: 7px; overflow: hidden; }
.shop-category-card.active { color: #fff; border-color: transparent; background: linear-gradient(135deg, #1d63ed, #0ea5e9); box-shadow: 0 14px 28px rgba(29,99,237,.22); }
.shop-category-icon { font-size: 22px; line-height: 1; }
.shop-category-name { font-size: 15px; line-height: 1.25; font-weight: 950; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-category-count { color: #667085; font-size: 12px; font-weight: 800; }
.shop-category-card.active .shop-category-count { color: rgba(255,255,255,.82); }
.shop-category-check { position: absolute; right: 10px; bottom: 8px; color: rgba(255,255,255,.32); font-size: 34px; font-weight: 950; }
.shop-card-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: auto; }
.shop-card-actions .secondary-btn { min-height: 42px; }
@media (max-width: 760px) {
  .user-topbar { position: fixed; top: 10px; right: 10px; z-index: 20; width: auto; min-height: 0; padding: 0; border: 0; background: transparent; backdrop-filter: none; }
  .user-topbar .top-actions { display: flex; width: auto; gap: 6px; }
  .user-topbar .top-actions .primary-btn, .user-topbar .top-actions .ghost-btn, .user-topbar .top-actions .mini-btn, .user-topbar .account-pill { width: auto; min-height: 34px; padding: 8px 10px; border-radius: 999px; font-size: 12px; box-shadow: 0 10px 22px rgba(15,23,42,.12); }
  .user-topbar .top-password-btn, .user-topbar .ghost-btn { display: none; }
  .content { padding-top: 12px; }
  .shop-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 430px) {
  .shop-hero { border-radius: 22px; padding: 16px; }
  .shop-logo { width: 48px; height: 48px; font-size: 22px; }
  .shop-title-line h2 { max-width: 150px; font-size: 18px; }
  .shop-category-card { min-height: 100px; padding: 12px; }
  .shop-quick-actions { gap: 7px; }
  .shop-quick-actions button { font-size: 12px; padding: 0 6px; }
}
@media (max-width: 375px) {
  .shop-title-line h2 { max-width: 132px; }
  .shop-category-card { min-height: 96px; }
  .shop-category-name { font-size: 14px; }
}

/* Auth page browsing escape */
.auth-shell { position: relative; }
.auth-back-btn {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 5;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: #1557d6;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(219,229,244,.96);
  box-shadow: 0 12px 28px rgba(15,23,42,.16);
  font-weight: 900;
}

/* Shop header account entry */
.shop-account-entry {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  max-width: 112px;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 22px rgba(29,99,237,.22);
  font-size: 12px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-page-topbar { display: none; }

/* Mobile registration invite manager cards */
.registration-code-list { display: none; }
.registration-code-card,
.invite-code-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.registration-code-actions,
.invite-code-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.registration-code-actions button,
.invite-code-actions button {
  flex: 1 1 calc(50% - 8px);
  min-width: 0;
}

@media (max-width: 720px) {
  body { overflow-x: hidden; }
  .auth-panel { padding: 78px 16px 24px; }
  .auth-back-btn { top: 14px; right: 14px; min-height: 38px; padding: 0 12px; }
  .shop-hero-top { align-items: flex-start; }
  .shop-identity { flex: 1 1 auto; min-width: 0; }
  .shop-account-entry { min-height: 36px; padding: 8px 12px; }
  .registration-invite-card { padding: 16px 14px; overflow: hidden; }
  .registration-invite-card .card-head { align-items: flex-start; flex-direction: column; }
  .registration-invite-control-panel { padding: 12px; }
  .registration-invite-control-panel button { width: 100%; white-space: normal; min-height: 44px; }
  .registration-invite-card > .table-wrap { display: none; }
  .registration-code-list { display: grid; gap: 12px; }
  .registration-code-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid #e8eef8;
    border-radius: 18px;
    background: #f8fafc;
  }
  .registration-code-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-width: 0; }
  .registration-code-main b { min-width: 0; overflow-wrap: anywhere; font-size: 16px; color: #0f172a; }
  .registration-code-actions { padding-top: 2px; }
  .registration-code-actions .mini-btn,
  .registration-code-actions .danger-btn.mini-btn { margin: 0; min-height: 40px; padding: 8px 10px; border-radius: 10px; white-space: nowrap; }
}

/* 用户前台移动端结构清理 */
.user-layout { grid-template-columns: minmax(0, 1fr); }
.user-layout > .sidebar { display: none; }
.user-layout .main { width: 100%; min-width: 0; }
.user-layout .content { width: min(1180px, 100%); margin: 0 auto; }
.shop-mobile-home { gap: 12px; }
.shop-hero {
  color: #fff;
  border: 1px solid rgba(255,255,255,.22);
  background:
    radial-gradient(circle at 88% 10%, rgba(255,255,255,.30), transparent 28%),
    radial-gradient(circle at 8% 100%, rgba(14,165,233,.30), transparent 34%),
    linear-gradient(135deg, #0f4fc5 0%, #1d63ed 52%, #0ea5e9 100%);
  box-shadow: 0 16px 36px rgba(29,99,237,.20);
}
.shop-hero::after { display: block; background: rgba(255,255,255,.10); }
.shop-logo { color: #1557d6; background: rgba(255,255,255,.96); border: 1px solid rgba(255,255,255,.45); box-shadow: 0 12px 28px rgba(15,23,42,.16); }
.shop-title-line h2 { max-width: 260px; color: #fff; letter-spacing: -.02em; }
.shop-title-block p,
.shop-intro { color: rgba(255,255,255,.84); }
.shop-intro { max-width: 760px; padding: 12px 13px; border-radius: 16px; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.13); backdrop-filter: blur(8px); }
.shop-quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 15px; }
.shop-quick-actions button { min-height: 46px; padding: 0 16px; border-radius: 16px; color: #1557d6; background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.38); box-shadow: 0 8px 18px rgba(15,23,42,.10); font-size: 14px; font-weight: 950; }
.shop-quick-actions .contact { color: #fff; background: linear-gradient(135deg, #2f7cff, #12b7f5); border-color: rgba(255,255,255,.18); box-shadow: 0 10px 22px rgba(15,91,202,.22); }
.shop-quick-actions button:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(15,23,42,.13); }
.shop-category-panel { border-radius: 22px; padding: 16px; }
.shop-category-grid { gap: 12px; }
.shop-category-card { min-height: 102px; border-radius: 18px; background: #f8fafc; }
.consult-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.consult-primary-btn,
.consult-secondary-btn { flex: 1 1 0; height: 46px; min-height: 46px; max-height: 46px; padding: 0 16px; border-radius: 16px; font-size: 14px; font-weight: 900; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.consult-primary-btn { color: #fff; background: linear-gradient(135deg, #1d63ed, #0ea5e9); box-shadow: 0 12px 24px rgba(29,99,237,.18); }
.consult-secondary-btn { color: #344054; background: #f1f5f9; }
@media (max-width: 760px) {
  .user-layout .content { padding: 12px 14px 20px; }
  .shop-page-topbar { display: none; }
  .shop-hero, .shop-category-panel, .shop-card { border-radius: 20px; }
  .shop-mobile-home { margin-bottom: 16px; }
  .modal-mask { padding: 12px; }
  .modal { max-height: calc(100vh - 24px); border-radius: 22px; }
  .modal-body { padding: 18px; }
  .consult-actions { gap: 10px; }
}
@media (max-width: 430px) {
  .user-layout .content { padding-left: 12px; padding-right: 12px; }
  .shop-hero { padding: 15px; }
  .shop-title-line h2 { max-width: 176px; }
  .consult-actions { flex-direction: column; }
  .consult-primary-btn, .consult-secondary-btn { width: 100%; flex: 0 0 auto; }
}

/* Registration invite manager: keep action buttons compact after removing created time. */
.layout:not(.user-layout) .content {
  width: 100%;
  max-width: none;
  padding: 24px clamp(20px, 2vw, 34px) 32px;
}

@media (min-width: 981px) {
  .layout:not(.user-layout) .content > .card,
  .layout:not(.user-layout) .content > section,
  .layout:not(.user-layout) .content > .toolbar {
    max-width: none;
  }

  .layout:not(.user-layout) .table-wrap {
    overflow-x: auto;
  }
}

.registration-invite-card .data-table col.col-key-registrationInviteCodeDisplay {
  width: 45%;
}
.registration-invite-card .data-table col.col-key-registrationInviteStatus {
  width: 20%;
}
.registration-invite-card .data-table col.col-actions,
.registration-invite-card .data-table col.col-key-actions {
  width: 260px;
}
.registration-invite-card .data-table td.table-cell-action .registration-code-action-stack {
  width: 100% !important;
  justify-content: center;
}
.registration-invite-card .data-table td.table-cell-action .registration-code-action-stack .mini-btn {
  width: auto !important;
  min-width: 76px;
}
.registration-invite-card .registration-code-actions .registration-code-action-stack {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  gap: 8px !important;
}
.registration-invite-card .registration-code-actions .registration-code-action-stack .mini-btn {
  flex: 1 1 calc(50% - 8px);
  width: auto !important;
  min-width: 0 !important;
}

/* Desktop admin density: use the available canvas without changing the blue
   sidebar or the member-facing/mobile layout. */
@media (min-width: 981px) {
  .layout:not(.user-layout) .content {
    padding: 26px clamp(16px, 1.35vw, 26px) 38px;
  }
  .layout:not(.user-layout) .stats-page {
    max-width: none;
    gap: 16px;
    font-size: 14px;
  }
  .layout:not(.user-layout) .stats-page .card,
  .layout:not(.user-layout) .content > .card,
  .layout:not(.user-layout) .content > section {
    padding: clamp(19px, 1.35vw, 25px);
  }
  .layout:not(.user-layout) .dashboard-kpis,
  .layout:not(.user-layout) .operation-stats {
    gap: 16px;
  }
  .layout:not(.user-layout) .dashboard-kpis .stat-card,
  .layout:not(.user-layout) .operation-stats .stat-card {
    min-height: 104px;
    padding: 20px 22px;
  }
  .layout:not(.user-layout) .dashboard-kpis .stat-card span,
  .layout:not(.user-layout) .operation-stats .stat-card span { font-size: 13px; }
  .layout:not(.user-layout) .dashboard-kpis .stat-card strong { font-size: clamp(29px, 2vw, 36px); }
  .layout:not(.user-layout) .operation-stats .stat-card strong { font-size: clamp(26px, 1.75vw, 32px); }
  .layout:not(.user-layout) .data-table th,
  .layout:not(.user-layout) .data-table td,
  .layout:not(.user-layout) .lottery-table th,
  .layout:not(.user-layout) .lottery-table td {
    padding: 13px 14px;
    font-size: 13px;
    line-height: 1.45;
  }
  .layout:not(.user-layout) .data-table th,
  .layout:not(.user-layout) .lottery-table th { font-size: 12px; }
  .layout:not(.user-layout) .data-table tbody tr,
  .layout:not(.user-layout) .lottery-table tbody tr { min-height: 54px; }
}

.lottery-product-rule-section { background:linear-gradient(135deg,#fbfdff,#f2f8ff); border-color:#d8e9fb; }
.lottery-product-rule { display:grid; grid-template-columns:minmax(0,1fr) minmax(130px,.42fr) auto; align-items:end; gap:12px; margin-top:10px; padding:13px; border:1px solid #dce9f7; border-radius:12px; background:#fff; }
.lottery-product-rule label { display:grid; gap:6px; color:#41536e; font-size:12px; font-weight:800; }
.lottery-product-rule select,.lottery-product-rule input { min-width:0; height:38px; border:1px solid #cbdced; border-radius:9px; padding:0 10px; background:#fff; color:#172033; font:inherit; }
.lottery-product-rule .mini-btn { min-height:38px; white-space:nowrap; }
@media (max-width:640px) { .lottery-product-rule { grid-template-columns:1fr; align-items:stretch; }.lottery-product-rule .mini-btn { width:100%; } }

/* 店铺头像上传与用户侧头像展示 */
.shop-logo.has-avatar {
  padding: 0;
  overflow: hidden;
  background: #fff;
}
.shop-logo.has-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.shop-avatar-upload-panel {
  margin-top: 14px;
}
.shop-avatar-preview {
  width: 86px;
  height: 86px;
  flex: 0 0 86px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  box-shadow: 0 10px 22px rgba(29,99,237,.12);
}
.shop-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.shop-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #1557d6;
  background: #fff;
  font-size: 30px;
  font-weight: 950;
}

/* 邀请管理恢复为邀请绑定关系单卡片，并为手机端提供卡片式展示 */
.invite-binding-mobile-list { display: none; }
.invites-card .card-head { align-items: flex-start; gap: 12px; }
.invites-card .card-head .badge { flex: 0 0 auto; }
.invites-card .card-head .muted { margin: 4px 0 0; }

@media (max-width: 640px) {
  .invites-card.managed-table-card { padding: 14px; }
  .invites-card .card-head { flex-direction: column; align-items: stretch; }
  .invites-card .card-head .badge { width: fit-content; }
  .invites-card .data-table-wrap { display: none; }
  .invite-binding-mobile-list { display: grid; gap: 10px; }
  .invite-binding-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e5eaf2;
    border-radius: 16px;
    background: #fff;
    min-width: 0;
  }
  .invite-binding-card-head,
  .invite-binding-grid {
    min-width: 0;
  }
  .invite-binding-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .invite-binding-card-head strong,
  .invite-binding-grid b {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .invite-binding-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 8px 10px;
    font-size: 13px;
  }
  .invite-binding-grid span { color: var(--muted); }
  .invite-binding-grid b { text-align: right; font-weight: 800; }
}

/* 邀请管理：绑定关系统计与移动端卡片适配 */
.invite-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.invite-stat-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
}
.invite-stat-card b {
  color: var(--muted);
  font-size: 13px;
}
.invite-stat-card span {
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
}
.invites-card.managed-table-card .data-table-wrap {
  overflow-x: auto;
}
.invites-card.managed-table-card table.data-table {
  min-width: 980px;
}

@media (max-width: 640px) {
  .invite-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .invite-stat-card {
    padding: 12px;
    min-width: 0;
  }
  .invite-stat-card span {
    font-size: 16px;
    overflow-wrap: anywhere;
  }
}
@media (max-width: 640px) {
  .invites-card > .empty:not(.invite-binding-mobile-list) { display: none; }
}

/* 本次修复：登录后用户端商品页 / 会员中心 / 我的邀请可切换入口 */
.user-front-tabs {
  position: sticky;
  top: 0;
  z-index: 12;
  width: min(1180px, calc(100% - 28px));
  margin: 12px auto 0;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid #e8eef8;
  border-radius: 18px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 12px 28px rgba(15,23,42,.08);
  backdrop-filter: blur(10px);
}
.user-front-tabs button {
  min-width: 0;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 13px;
  color: #344054;
  background: #f8fafc;
  font-size: 14px;
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-front-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #1d63ed, #0ea5e9);
  box-shadow: 0 10px 22px rgba(29,99,237,.18);
}
@media (max-width: 760px) {
  .user-front-tabs { width: calc(100% - 24px); margin-top: 10px; gap: 6px; padding: 6px; border-radius: 16px; }
  .user-front-tabs button { min-height: 38px; padding: 0 6px; font-size: 13px; }
}
@media (max-width: 375px) {
  .user-front-tabs button { font-size: 12px; }
}

/* 普通会员退出入口：仅用于前台会员中心，不影响后台管理员退出 */
.user-account-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.user-account-card h3 {
  margin: 0 0 6px;
}
.user-account-card p {
  margin: 0;
}
.user-logout-btn {
  flex: 0 0 auto;
  min-height: 42px;
}
@media (max-width: 640px) {
  .user-account-card {
    align-items: stretch;
    flex-direction: column;
    padding: 16px;
  }
  .user-logout-btn {
    width: 100%;
  }
}

/* 用户侧客服 / 邀请码弹窗按钮：统一主次按钮高度，避免移动端 flex 拉伸成大块空白。 */
.registration-invite-actions {
  align-items: center;
  justify-content: center;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 12px;
  margin-top: 16px;
}
.registration-invite-primary-btn,
.registration-invite-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  max-width: 190px;
  height: 46px;
  min-height: 46px;
  max-height: 46px;
  padding: 0 18px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.registration-invite-primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 12px 24px rgba(29, 99, 237, .18);
}
.registration-invite-secondary-btn {
  color: #344054;
  background: #eef2f7;
}
@media (max-width: 430px) {
  .registration-invite-actions {
    align-items: stretch;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
  }
  .registration-invite-primary-btn,
  .registration-invite-secondary-btn {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: none;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    padding: 0 12px;
    border-radius: 14px;
  }
}

/* 管理员后台手机端轻量优化：仅限制在窄屏，不影响 PC 端后台布局。 */
@media (max-width: 768px) {
  .layout:not(.user-layout) {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .layout:not(.user-layout) .sidebar {
    padding: 14px 12px 16px;
    border-radius: 0 0 20px 20px;
    gap: 12px;
  }

  .layout:not(.user-layout) .brand {
    padding: 4px 6px 10px;
  }

  .layout:not(.user-layout) .brand h2 {
    font-size: 20px;
    line-height: 1.25;
  }

  .layout:not(.user-layout) .brand p {
    margin-top: 5px;
    font-size: 12px;
  }

  .layout:not(.user-layout) .nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 0;
  }

  .layout:not(.user-layout) .nav button {
    min-width: 0;
    min-height: 40px;
    padding: 9px 6px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.25;
    text-align: center;
    justify-content: center;
    white-space: normal;
  }

  .layout:not(.user-layout) .local-tip {
    display: none;
  }

  .layout:not(.user-layout) .topbar {
    min-height: 0;
    padding: 12px;
    gap: 10px;
  }

  .layout:not(.user-layout) .topbar h1 {
    font-size: 20px;
    line-height: 1.25;
  }

  .layout:not(.user-layout) .top-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .layout:not(.user-layout) .top-actions > * {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 13px;
  }

  .layout:not(.user-layout) .account-pill {
    grid-column: 1 / -1;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.35;
  }

  .layout:not(.user-layout) .content {
    padding: 14px 12px 18px;
    overflow-x: hidden;
  }

  .layout:not(.user-layout) .card {
    padding: 15px;
    border-radius: 18px;
    margin-bottom: 14px;
  }

  .layout:not(.user-layout) .card h3 {
    font-size: 18px;
  }

  .layout:not(.user-layout) .stats-grid,
  .layout:not(.user-layout) .compact-stats,
  .layout:not(.user-layout) .dashboard-kpis,
  .layout:not(.user-layout) .operation-stats,
  .layout:not(.user-layout) .invite-stat-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .layout:not(.user-layout) .stat-card {
    padding: 15px;
    border-radius: 16px;
  }

  .layout:not(.user-layout) .stat-card span {
    font-size: 13px;
  }

  .layout:not(.user-layout) .stat-card strong {
    margin-top: 6px;
    font-size: 24px;
  }

  .layout:not(.user-layout) .toolbar,
  .layout:not(.user-layout) .filters,
  .layout:not(.user-layout) .actions {
    gap: 8px;
  }

  .layout:not(.user-layout) .toolbar > *,
  .layout:not(.user-layout) .filters > button {
    min-width: 0;
  }

  .layout:not(.user-layout) input,
  .layout:not(.user-layout) textarea,
  .layout:not(.user-layout) select,
  .layout:not(.user-layout) button {
    max-width: 100%;
  }
}

@media (max-width: 430px) {
  .layout:not(.user-layout) .nav {
    gap: 7px;
  }

  .layout:not(.user-layout) .nav button {
    min-height: 38px;
    padding: 8px 5px;
    font-size: 12.5px;
  }

  .layout:not(.user-layout) .top-actions {
    gap: 7px;
  }
}

/* 手机端后台功能按钮组统一样式：仅作用于管理员后台，不影响 PC 与用户端 */
@media (max-width: 768px) {
  .layout:not(.user-layout) .mobile-action-group,
  .layout:not(.user-layout) .top-actions,
  .layout:not(.user-layout) .stats-filter,
  .layout:not(.user-layout) .product-tabs,
  .layout:not(.user-layout) .filters,
  .layout:not(.user-layout) .toolbar > .actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 100%;
    align-items: stretch;
    overflow-x: hidden;
  }

  .layout:not(.user-layout) .mobile-action-group > button,
  .layout:not(.user-layout) .mobile-action-group > label,
  .layout:not(.user-layout) .top-actions > button,
  .layout:not(.user-layout) .stats-filter > button,
  .layout:not(.user-layout) .product-tabs > button,
  .layout:not(.user-layout) .filters > button,
  .layout:not(.user-layout) .toolbar > .actions > button,
  .layout:not(.user-layout) .toolbar > .actions > label {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    color: #334155;
    background: linear-gradient(135deg, #f8fbff, #eaf2ff);
    box-shadow: none;
  }

  .layout:not(.user-layout) .mobile-action-group > .active,
  .layout:not(.user-layout) .stats-filter > button.active,
  .layout:not(.user-layout) .product-tabs > button.active,
  .layout:not(.user-layout) .filters > button.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 12px 24px rgba(29, 99, 237, .20);
  }

  .layout:not(.user-layout) .admin-top-action-group .account-pill {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    justify-content: center;
    text-align: center;
    white-space: normal;
  }

  .layout:not(.user-layout) .admin-top-action-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .layout:not(.user-layout) .admin-backup-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 本次优化：管理员后台手机端模块功能按钮组选中态统一 */
@media (max-width: 768px) {
  .layout:not(.user-layout) .mobile-action-group {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 8px;
    max-width: 100%;
    overflow-x: hidden;
  }

  .layout:not(.user-layout) .mobile-action-group > button,
  .layout:not(.user-layout) .mobile-action-group > label {
    flex: 1 1 calc(50% - 8px);
    min-width: 132px;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    text-align: center;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    color: #24415f;
    background: linear-gradient(135deg, #f6f9fd, #eaf2ff);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .16);
  }

  .layout:not(.user-layout) .mobile-action-group > button.active,
  .layout:not(.user-layout) .mobile-action-group > label.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 10px 22px rgba(29, 99, 237, .22);
  }

  .layout:not(.user-layout) .admin-top-action-group {
    width: 100%;
    justify-content: stretch;
  }

  .layout:not(.user-layout) .admin-top-action-group .account-pill {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    text-align: center;
  }

  .layout:not(.user-layout) .admin-top-action-group > button {
    flex-basis: calc(33.333% - 8px);
    min-width: 104px;
  }

  .layout:not(.user-layout) .search-card .mobile-action-group,
  .layout:not(.user-layout) .toolbar .mobile-action-group,
  .layout:not(.user-layout) .admin-backup-actions {
    width: 100%;
  }

  .layout:not(.user-layout) .stats-filter.mobile-action-group {
    overflow-x: hidden;
    padding-bottom: 0;
  }

  .layout:not(.user-layout) .stats-filter.mobile-action-group > button {
    flex: 1 1 calc(50% - 8px);
  }
}

/* 本次修复：仅优化管理员后台手机端顶部按钮与商品分类弹窗 */
@media (max-width: 768px) {
  .layout:not(.user-layout) .topbar:not(.stats-topbar) .admin-quick-order-action {
    display: none !important;
  }

  .layout:not(.user-layout) .admin-top-action-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }

  .layout:not(.user-layout) .admin-top-action-group .account-pill {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    min-height: 38px;
    padding: 9px 11px;
    justify-content: flex-start;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .layout:not(.user-layout) .admin-top-action-group > .ghost-btn {
    flex: 0 0 auto;
    min-width: 76px;
    min-height: 38px;
    padding: 9px 11px;
    font-size: 13px;
  }

  .layout:not(.user-layout) .stats-topbar .admin-top-action-group .account-pill {
    flex-basis: calc(100% - 92px);
  }

  .layout:not(.user-layout) .stats-topbar .admin-top-action-group > .admin-quick-order-action,
  .layout:not(.user-layout) .stats-topbar .admin-top-action-group > .admin-export-action {
    flex: 1 1 calc(50% - 8px);
  }

  .category-manage-panel,
  .category-manage-panel .table-wrap,
  .category-manage-panel .data-table,
  .category-manage-panel .data-table tbody,
  .category-manage-panel .data-table tr,
  .category-manage-panel .data-table td,
  .category-manage-panel .table-cell-inner {
    min-width: 0;
    max-width: 100%;
  }

  .category-manage-toolbar {
    align-items: stretch;
  }

  .category-manage-toolbar .primary-btn {
    width: 100%;
    min-height: 42px;
  }

  .category-manage-panel .data-table colgroup,
  .category-manage-panel .data-table thead {
    display: none;
  }

  .category-manage-panel .data-table,
  .category-manage-panel .data-table tbody,
  .category-manage-panel .data-table tr,
  .category-manage-panel .data-table td {
    display: block;
    width: 100%;
  }

  .category-manage-panel .data-table tr {
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid #e8eef8;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(30, 64, 175, .07);
    overflow: hidden;
  }

  .category-manage-panel .data-table td {
    padding: 8px 0;
    border-bottom: 1px dashed #edf2f7;
    text-align: left !important;
    overflow: visible !important;
  }

  .category-manage-panel .data-table td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .category-manage-panel .data-table td .table-cell-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px;
    width: 100%;
    overflow: visible !important;
  }

  .category-manage-panel .data-table td::before {
    content: attr(data-label);
    float: left;
    width: 86px;
    min-width: 86px;
    color: var(--muted);
    font-weight: 900;
  }

  .category-manage-panel .table-cell-categoryIcon .table-cell-inner,
  .category-manage-panel .table-cell-name .table-cell-inner,
  .category-manage-panel .table-cell-productCount .table-cell-inner,
  .category-manage-panel .table-cell-sort .table-cell-inner,
  .category-manage-panel .table-cell-status .table-cell-inner,
  .category-manage-panel .table-cell-action .table-cell-inner {
    padding-left: 98px;
  }

  .category-manage-panel .emoji-cell {
    font-size: 22px;
    line-height: 1;
  }

  #app .category-manage-panel .admin-table-action-stack,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .actions,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .action-stack {
    flex-direction: row !important;
    width: auto !important;
    margin: 0 !important;
    gap: 8px !important;
  }

  #app .category-manage-panel table.data-table.admin-table td.table-cell-action button,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .mini-btn,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .action-btn,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .table-action-btn,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .admin-action-btn,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .admin-table-action-btn {
    width: 72px !important;
    min-width: 72px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 10px !important;
    flex: 0 0 auto !important;
  }
}

@media (max-width: 390px) {
  .layout:not(.user-layout) .admin-top-action-group .account-pill {
    font-size: 12px;
    padding-inline: 9px;
  }

  .layout:not(.user-layout) .admin-top-action-group > .ghost-btn {
    min-width: 68px;
    font-size: 12px;
    padding-inline: 9px;
  }
}

/* 本次修复：管理员后台手机端账号栏、统计按钮与商品分类卡片，仅作用于手机端后台 */
@media (max-width: 768px) {
  .layout:not(.user-layout) .admin-top-action-group {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  .layout:not(.user-layout) .admin-top-action-group .account-pill {
    order: 1;
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 40px !important;
    height: 40px !important;
    padding: 0 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .layout:not(.user-layout) .admin-top-action-group > .ghost-btn {
    order: 2;
    flex: 0 0 84px !important;
    width: 84px !important;
    min-width: 84px !important;
    max-width: 84px !important;
    min-height: 40px !important;
    height: 40px !important;
    padding: 0 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
    font-size: 0 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }

  .layout:not(.user-layout) .admin-top-action-group > .ghost-btn::before {
    content: "退出登录";
    font-size: 13px;
    font-weight: 850;
  }

  .layout:not(.user-layout) .admin-top-action-group > .admin-quick-order-action {
    order: 3;
    flex: 1 1 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
  }

  .layout:not(.user-layout) .stats-topbar .admin-top-action-group > .admin-export-action {
    display: none !important;
  }

  .category-manage-panel,
  .category-manage-panel .table-wrap,
  .category-manage-panel .data-table,
  .category-manage-panel .data-table tbody,
  .category-manage-panel .data-table tr,
  .category-manage-panel .data-table td,
  .category-manage-panel .table-cell-inner {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .category-manage-panel .data-table tr {
    display: block !important;
    width: 100% !important;
    padding: 14px !important;
    margin: 0 0 12px !important;
    border: 1px solid #e8eef8 !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 10px 24px rgba(30, 64, 175, .07) !important;
  }

  .category-manage-panel .data-table td {
    display: grid !important;
    grid-template-columns: 88px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 9px 0 !important;
    border-bottom: 1px dashed #edf2f7 !important;
    text-align: left !important;
  }

  .category-manage-panel .data-table td::before {
    float: none !important;
    width: auto !important;
    min-width: 0 !important;
    color: var(--muted) !important;
    font-weight: 900 !important;
    line-height: 1.3 !important;
  }

  .category-manage-panel .table-cell-categoryIcon .table-cell-inner,
  .category-manage-panel .table-cell-name .table-cell-inner,
  .category-manage-panel .table-cell-productCount .table-cell-inner,
  .category-manage-panel .table-cell-sort .table-cell-inner,
  .category-manage-panel .table-cell-status .table-cell-inner,
  .category-manage-panel .table-cell-action .table-cell-inner {
    padding-left: 0 !important;
  }

  .category-manage-panel .data-table td .table-cell-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  #app .category-manage-panel .admin-table-action-stack,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .actions,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .action-stack {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: stretch !important;
    width: 100% !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }

  #app .category-manage-panel table.data-table.admin-table td.table-cell-action button,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .mini-btn,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .action-btn,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .table-action-btn,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .admin-action-btn,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .admin-table-action-btn {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 10px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 390px) {
  .layout:not(.user-layout) .admin-top-action-group .account-pill {
    font-size: 12px !important;
    padding-inline: 10px !important;
  }

  .layout:not(.user-layout) .admin-top-action-group > .ghost-btn {
    flex-basis: 78px !important;
    width: 78px !important;
    min-width: 78px !important;
    max-width: 78px !important;
  }

  .layout:not(.user-layout) .admin-top-action-group > .ghost-btn::before {
    font-size: 12px !important;
  }

  .category-manage-panel .data-table td {
    grid-template-columns: 78px minmax(0, 1fr) !important;
  }
}

/* 本次优化：仅管理员后台手机端账号栏与按钮尺寸规范，保护 PC 与用户端 */
@media (max-width: 768px) {
  .layout:not(.user-layout) .admin-top-action-group {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .layout:not(.user-layout) .admin-top-action-group .account-pill,
  .layout:not(.user-layout) .admin-top-action-group > .ghost-btn {
    order: initial !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 0 12px !important;
    border-radius: 14px !important;
    font-size: 13px !important;
    font-weight: 850 !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .layout:not(.user-layout) .admin-top-action-group .account-pill {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    justify-content: flex-start !important;
    text-align: left !important;
  }

  .layout:not(.user-layout) .admin-top-action-group > .ghost-btn {
    flex: 0 0 112px !important;
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
    justify-content: center !important;
    text-align: center !important;
    background: #f2f5f9 !important;
    color: #475467 !important;
  }

  .layout:not(.user-layout) .admin-top-action-group > .ghost-btn::before {
    content: none !important;
  }

  .layout:not(.user-layout) .topbar:not(.stats-topbar) .admin-quick-order-action,
  .layout:not(.user-layout) .stats-topbar .admin-top-action-group > .admin-quick-order-action,
  .layout:not(.user-layout) .stats-topbar .admin-top-action-group > .admin-export-action {
    display: none !important;
  }

  .layout:not(.user-layout) .product-manage-toolbar .product-tabs {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .layout:not(.user-layout) .product-manage-toolbar .product-tab-btn {
    width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    padding: 0 14px !important;
    border-radius: 16px !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  .layout:not(.user-layout) .product-manage-toolbar .product-tab-btn.active {
    color: #fff !important;
    background: linear-gradient(135deg, var(--primary), var(--primary-2)) !important;
    box-shadow: 0 12px 24px rgba(29, 99, 237, .20) !important;
  }

  .layout:not(.user-layout) .product-manage-toolbar .product-tab-btn:not(.active) {
    color: #24415f !important;
    background: linear-gradient(135deg, #f8fbff, #eaf2ff) !important;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .16) !important;
  }

  body.admin-mode .modal-foot {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    align-items: center !important;
    padding: 14px 16px !important;
  }

  body.admin-mode .modal-foot button {
    width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    padding: 0 14px !important;
    border-radius: 16px !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    flex: 0 0 auto !important;
  }

  body.admin-mode .modal-foot .primary-btn {
    color: #fff !important;
    background: linear-gradient(135deg, var(--primary), var(--primary-2)) !important;
  }

  body.admin-mode .modal-foot .ghost-btn {
    color: #475467 !important;
    background: #f2f5f9 !important;
  }

  #app .category-manage-panel .admin-table-action-stack,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .actions,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .action-stack {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
    align-items: center !important;
  }

  #app .category-manage-panel table.data-table.admin-table td.table-cell-action button,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .mini-btn,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .action-btn,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .table-action-btn,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .admin-action-btn,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .admin-table-action-btn {
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    padding: 0 10px !important;
    border-radius: 14px !important;
    font-size: 14px !important;
    font-weight: 850 !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    overflow: visible !important;
  }
}

@media (max-width: 390px) {
  .layout:not(.user-layout) .admin-top-action-group > .ghost-btn {
    flex-basis: 104px !important;
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
  }

  .layout:not(.user-layout) .admin-top-action-group .account-pill,
  .layout:not(.user-layout) .admin-top-action-group > .ghost-btn {
    font-size: 12.5px !important;
    padding-inline: 10px !important;
  }
}

/* 本次修复：管理员后台手机端数据统计快捷录单、账号行与分类操作按钮 */
@media (max-width: 768px) {
  .layout:not(.user-layout) .admin-top-action-group {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 112px !important;
    gap: 10px !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .layout:not(.user-layout) .admin-top-action-group .account-pill,
  .layout:not(.user-layout) .admin-top-action-group > .ghost-btn {
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 0 12px !important;
    border-radius: 14px !important;
    font-size: 13px !important;
    font-weight: 850 !important;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .layout:not(.user-layout) .admin-top-action-group .account-pill {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    text-align: center !important;
  }

  .layout:not(.user-layout) .admin-top-action-group > .ghost-btn {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    flex-basis: auto !important;
    background: #f2f5f9 !important;
    color: #475467 !important;
    font-size: 0 !important;
  }

  .layout:not(.user-layout) .admin-top-action-group > .ghost-btn::before {
    content: "退出登录" !important;
    font-size: 13px !important;
    font-weight: 850 !important;
    line-height: 1.2 !important;
  }

  .layout:not(.user-layout) .topbar:not(.stats-topbar) .admin-top-action-group > .admin-quick-order-action,
  .layout:not(.user-layout) .admin-top-action-group > .admin-export-action {
    display: none !important;
  }

  .layout:not(.user-layout) .stats-topbar .admin-top-action-group > .admin-quick-order-action {
    display: flex !important;
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 0 14px !important;
    border-radius: 14px !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    font-size: 14px !important;
    font-weight: 900 !important;
  }

  #app .category-manage-panel .admin-table-action-stack,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .actions,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .action-stack {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    width: min(140px, 100%) !important;
    max-width: 100% !important;
  }

  #app .category-manage-panel table.data-table.admin-table td.table-cell-action button,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .mini-btn,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .action-btn,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .table-action-btn,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .admin-action-btn,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .admin-table-action-btn {
    width: 100% !important;
    min-width: 0 !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 48px !important;
    padding: 0 16px !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: visible !important;
  }
}

@media (max-width: 390px) {
  .layout:not(.user-layout) .admin-top-action-group {
    grid-template-columns: minmax(0, 1fr) 104px !important;
    gap: 8px !important;
  }

  .layout:not(.user-layout) .admin-top-action-group .account-pill,
  .layout:not(.user-layout) .admin-top-action-group > .ghost-btn::before {
    font-size: 12.5px !important;
  }
}

/* 最终修复：仅管理员后台手机端统一账号栏与商品分类操作按钮尺寸 */
@media (max-width: 768px) {
  .layout:not(.user-layout) .admin-top-action-group {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 140px !important;
    gap: 12px !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .layout:not(.user-layout) .admin-top-action-group .account-pill,
  .layout:not(.user-layout) .admin-top-action-group > .admin-logout-action {
    grid-row: 1 !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    padding: 0 14px !important;
    border: 1px solid var(--border) !important;
    border-radius: 18px !important;
    background: #fff !important;
    color: #344054 !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    align-self: center !important;
  }

  .layout:not(.user-layout) .admin-top-action-group .account-pill {
    grid-column: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .layout:not(.user-layout) .admin-top-action-group > .admin-logout-action {
    grid-column: 2 !important;
    width: 140px !important;
    min-width: 0 !important;
    max-width: 140px !important;
    flex: none !important;
    font-size: 15px !important;
  }

  .layout:not(.user-layout) .admin-top-action-group > .admin-logout-action::before {
    content: none !important;
  }

  .layout:not(.user-layout) .topbar:not(.stats-topbar) .admin-top-action-group > .admin-quick-order-action,
  .layout:not(.user-layout) .admin-top-action-group > .admin-export-action {
    display: none !important;
  }

  .layout:not(.user-layout) .stats-topbar .admin-top-action-group > .admin-quick-order-action {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }

  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .table-cell-inner {
    align-items: flex-start !important;
    justify-content: flex-start !important;
    overflow: visible !important;
  }

  #app .category-manage-panel .category-row-actions,
  #app .category-manage-panel .admin-table-action-stack.category-row-actions,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .category-row-actions.action-stack {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  #app .category-manage-panel .category-row-actions > button,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .category-row-actions > button,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .category-row-actions > .mini-btn,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .category-row-actions > .action-btn,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .category-row-actions > .table-action-btn,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .category-row-actions > .admin-action-btn,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .category-row-actions > .admin-table-action-btn {
    flex: none !important;
    align-self: flex-start !important;
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 0 16px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
  }
}

@media (max-width: 390px) {
  .layout:not(.user-layout) .admin-top-action-group {
    grid-template-columns: minmax(0, 1fr) 128px !important;
    gap: 10px !important;
  }

  .layout:not(.user-layout) .admin-top-action-group > .admin-logout-action {
    width: 128px !important;
    max-width: 128px !important;
  }
}

/* 本次修正：仅管理员后台手机端，固定分类操作按钮尺寸并恢复退出登录主按钮色 */
@media (max-width: 768px) {
  .layout:not(.user-layout) .admin-top-action-group > .admin-logout-action {
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    border-radius: 18px !important;
    color: #fff !important;
    background: linear-gradient(90deg, #2f6df6 0%, #1fa7ea 100%) !important;
    border: none !important;
    box-shadow: 0 12px 24px rgba(47, 109, 246, .18) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
  }

  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .table-cell-inner {
    align-items: flex-start !important;
    justify-content: flex-start !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }

  #app .category-manage-panel .category-row-actions,
  #app .category-manage-panel .admin-table-action-stack.category-row-actions,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .category-row-actions.action-stack {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: none !important;
    align-self: flex-start !important;
    overflow: visible !important;
  }

  #app .category-manage-panel .category-row-actions > button,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .category-row-actions > button,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .category-row-actions > .mini-btn,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .category-row-actions > .action-btn,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .category-row-actions > .table-action-btn,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .category-row-actions > .admin-action-btn,
  #app .category-manage-panel table.data-table.admin-table td.table-cell-action .category-row-actions > .admin-table-action-btn {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    border-radius: 16px !important;
    padding: 0 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: none !important;
    align-self: flex-start !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-align: center !important;
  }
}

/* 本次修复：仅手机端后台商品分类卡片操作按钮，覆盖旧的 flex:1 / stretch 冲突 */
@media (max-width: 768px) {
  body.admin-mode #app .category-manage-panel table.data-table.admin-table td.table-cell-action {
    align-items: flex-start !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body.admin-mode #app .category-manage-panel table.data-table.admin-table td.table-cell-action .table-cell-inner {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.admin-mode #app .category-manage-panel .mobile-category-actions,
  body.admin-mode #app .category-manage-panel table.data-table.admin-table td.table-cell-action .mobile-category-actions,
  body.admin-mode #app .category-manage-panel table.data-table.admin-table td.table-cell-action .category-row-actions.mobile-category-actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: 118px !important;
    min-width: 118px !important;
    max-width: 118px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: none !important;
    align-self: flex-start !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  body.admin-mode #app .category-manage-panel .mobile-category-actions > .mobile-category-action-btn,
  body.admin-mode #app .category-manage-panel table.data-table.admin-table td.table-cell-action .mobile-category-actions > .mobile-category-action-btn,
  body.admin-mode #app .category-manage-panel table.data-table.admin-table td.table-cell-action .category-row-actions.mobile-category-actions > .mobile-category-action-btn {
    width: 118px !important;
    min-width: 118px !important;
    max-width: 118px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 0 16px !important;
    border-radius: 16px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    flex: none !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    align-self: flex-start !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-align: center !important;
  }
}

@media (max-width: 768px) {
  .modal .category-manage-panel .category-mobile-card-table td.table-cell-action {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  .modal .category-manage-panel .category-mobile-card-table td.table-cell-action .table-cell-inner {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    overflow: visible !important;
  }

  .modal .category-manage-panel .category-mobile-card-table .mobile-category-actions,
  .modal .category-manage-panel .category-mobile-card-table .category-row-actions {
    width: 118px !important;
    min-width: 118px !important;
    max-width: 118px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    flex: 0 0 118px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .modal .category-manage-panel .category-mobile-card-table .mobile-category-action-btn {
    width: 118px !important;
    min-width: 118px !important;
    max-width: 118px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 0 16px !important;
    border-radius: 16px !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 44px !important;
    align-self: stretch !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    text-align: center !important;
  }

  .modal .category-manage-panel .category-mobile-card-table .mobile-category-action-btn:not(.danger) {
    color: #1557c0 !important;
    background: #eaf2ff !important;
    border: 1px solid #bfdbfe !important;
    box-shadow: none !important;
  }

  .modal .category-manage-panel .category-mobile-card-table .mobile-category-action-btn.danger {
    color: #b91c1c !important;
    background: #fee2e2 !important;
    border: 1px solid #fecaca !important;
    box-shadow: none !important;
  }
}

/* 会员运营：页签、主操作和表单内次操作共用一套蓝色按钮尺度。 */
.member-operations-shell {
  --member-action-blue: #2776d6;
  --member-action-blue-deep: #1557c0;
  --member-action-soft: #edf6ff;
  --member-action-line: #c7ddf5;
  gap: 18px;
}

.member-operations-shell .member-operations-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 8px;
  border: 1px solid #dce9f6;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fbff, #f0f7ff);
  box-shadow: 0 9px 24px rgba(24, 76, 143, .06);
}

.member-operations-shell .member-operation-tab,
.member-operations-shell .primary-btn,
.member-operations-shell .secondary-btn {
  min-height: 42px;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: .01em;
}

.member-operations-shell .member-operation-tab {
  flex: 1 1 126px;
  border: 1px solid transparent;
  color: #35516f;
  background: transparent;
  box-shadow: none;
}

.member-operations-shell .member-operation-tab:hover:not(.active),
.member-operations-shell .member-operation-tab:focus-visible:not(.active) {
  border-color: var(--member-action-line);
  color: var(--member-action-blue-deep);
  background: #fff;
  box-shadow: none;
  outline: none;
}

.member-operations-shell .member-operation-tab.active,
.member-operations-shell .primary-btn {
  color: #fff;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--member-action-blue), #1698e7);
  box-shadow: 0 10px 20px rgba(32, 104, 207, .20);
}

.member-operations-shell .member-operation-tab.active:hover,
.member-operations-shell .primary-btn:hover:not(:disabled) {
  box-shadow: 0 13px 24px rgba(32, 104, 207, .27);
}

.member-operations-shell .secondary-btn {
  color: var(--member-action-blue-deep);
  border: 1px solid var(--member-action-line);
  background: var(--member-action-soft);
  box-shadow: none;
}

.member-operations-shell .secondary-btn:hover:not(:disabled),
.member-operations-shell .secondary-btn:focus-visible:not(:disabled) {
  border-color: #8abdeb;
  color: #104d9e;
  background: #e2f1ff;
  box-shadow: 0 8px 16px rgba(32, 104, 207, .10);
  outline: none;
}

.member-operations-shell .primary-btn:disabled,
.member-operations-shell .secondary-btn:disabled,
.member-operations-shell .member-operation-tab:disabled {
  box-shadow: none;
  opacity: .52;
}

.member-operations-shell .toolbar .actions,
.member-operations-shell .section-action-head {
  align-items: center;
}

.member-operations-shell .lottery-form-section {
  border-radius: 14px;
  border-color: #dbe9f7;
  background: linear-gradient(135deg, #fbfdff, #f6faff);
}

@media (max-width: 760px) {
  .member-operations-shell .member-operations-tabs { gap: 7px; padding: 7px; }
  .member-operations-shell .member-operation-tab { flex-basis: calc(50% - 4px); }
  .member-operations-shell .member-operation-tab,
  .member-operations-shell .primary-btn,
  .member-operations-shell .secondary-btn { min-height: 44px; }
  .member-operations-shell .section-action-head { align-items: stretch; flex-direction: column; }
  .member-operations-shell .section-action-head .secondary-btn { width: 100%; }
}

/* 手机端后台：商品分类弹窗操作按钮最终样式修复 */
@media (max-width: 768px) {
  .modal .category-manage-panel .category-mobile-card-table td.table-cell-action {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    overflow: visible !important;
    align-items: center !important;
  }

  .modal .category-manage-panel .category-mobile-card-table td.table-cell-action .table-cell-inner {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
  }

  .modal .category-manage-panel .category-mobile-card-table .mobile-category-actions,
  .modal .category-manage-panel .category-mobile-card-table .category-row-actions {
    width: 126px !important;
    min-width: 126px !important;
    max-width: 126px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .modal .category-manage-panel .category-mobile-card-table .mobile-category-action-btn,
  .modal .category-manage-panel .category-mobile-card-table .mobile-category-action-btn.danger {
    width: 126px !important;
    min-width: 126px !important;
    max-width: 126px !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    padding: 0 16px !important;
    border-radius: 16px !important;
    border: 1px solid #cfe3fb !important;
    background: #f8fbff !important;
    color: #1557c0 !important;
    box-shadow: none !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 46px !important;
    white-space: nowrap !important;
    text-align: center !important;
  }

  .modal .category-manage-panel .category-mobile-card-table .mobile-category-action-btn:hover,
  .modal .category-manage-panel .category-mobile-card-table .mobile-category-action-btn.danger:hover {
    background: #eef6ff !important;
    color: #0f4fb8 !important;
    border-color: #93c5fd !important;
  }

  .modal .category-manage-panel .category-mobile-card-table .mobile-category-action-btn.active,
  .modal .category-manage-panel .category-mobile-card-table .mobile-category-action-btn.danger.active {
    background: linear-gradient(135deg, #1d63ed, #0ea5e9) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 10px 22px rgba(29, 99, 237, 0.18) !important;
  }
}

/* 用户侧找回密码弹窗：底部操作按钮始终保持等宽横向排列。 */
.forgot-password-modal .modal-foot {
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
}

.forgot-password-modal .modal-foot button {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

.forgot-password-modal .modal-foot .ghost-btn {
  color: #5f6f89;
  background: #eef3fb;
  border: 1px solid #d8e2f2;
  box-shadow: none;
}

.forgot-password-modal .modal-foot .primary-btn {
  color: #fff;
  background: linear-gradient(90deg, #2f6df6 0%, #21a1e8 100%);
  border: 0;
  box-shadow: 0 10px 22px rgba(47, 109, 246, .18);
}

/* 抽奖管理：沿用后台白卡、蓝色操作与表格节奏，不引入独立视觉主题。 */
.lottery-section { margin-top: 16px; }
.lottery-section .card-head { align-items: flex-start; }
.lottery-section .card-head h3 { margin-bottom: 4px; }
.lottery-section .card-head .muted { margin: 0; }
.lottery-table-wrap { overflow-x: auto !important; border: 1px solid #e5edf7; border-radius: 12px; }
.lottery-table { width: 100%; min-width: 920px; border-collapse: collapse; table-layout: fixed; background: #fff; }
.lottery-table th { padding: 11px 12px; color: #55657c; background: #f7faff; font-size: 12px; font-weight: 800; text-align: left; white-space: nowrap; }
.lottery-table td { padding: 12px; border-top: 1px solid #edf1f6; color: #28364b; font-size: 13px; line-height: 1.42; vertical-align: middle; }
.lottery-table td:first-child { width: 25%; }
.lottery-table td:nth-child(2) { width: 13%; }
.lottery-table td small, .lottery-table td b { display: block; }
.lottery-table td small { margin-top: 3px; color: #7b8799; font-size: 11px; }
.lottery-table tr.is-selected { background: #f0f7ff; }
.lottery-table tr.is-selected td:first-child { box-shadow: inset 3px 0 0 #2776d6; }
.lottery-prize-table { min-width: 1000px; }
.lottery-prize-table td:first-child { width: 21%; }
.lottery-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 220px; }
.lottery-actions .mini-btn { margin: 0; }
.status-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.status-pill.is-on { color: #147455; background: #eaf8f0; }
.status-pill.is-off { color: #7a8798; background: #eff3f7; }
.lottery-feedback { margin: 0 0 16px; color: #155a9d; background: #edf6ff; border: 1px solid #cfe5fb; }
.lottery-section .pagination { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 14px; color: #6b778b; font-size: 12px; }
.lottery-section .pagination .mini-btn[disabled] { opacity: .48; cursor: not-allowed; }

.member-operations-shell { display: grid; gap: 16px; }
.member-operations-tabs { display: flex; gap: 6px; padding: 6px; background: #fff; border: 1px solid #e5edf7; border-radius: 12px; box-shadow: 0 4px 14px rgba(25, 72, 137, .04); }
.member-operations-tabs button { min-height: 36px; padding: 0 16px; border: 0; border-radius: 8px; background: transparent; color: #62718a; font-weight: 700; cursor: pointer; }
.member-operations-tabs button.active { color: #fff; background: #2776d6; box-shadow: 0 3px 8px rgba(39, 118, 214, .22); }
.member-settings-card, .member-link-status-card { margin: 0; }
.member-link-status-card .card-head { align-items: flex-start; }
.table-link { padding: 0; border: 0; color: #226ec8; background: transparent; font: inherit; font-weight: 800; text-align: left; cursor: pointer; }
.table-link:hover { color: #155aa7; text-decoration: underline; }
.inline-filter { display: inline-flex; align-items: center; gap: 7px; color: #65738a; font-size: 12px; font-weight: 700; }
.inline-filter select { min-height: 32px; padding: 0 28px 0 9px; border: 1px solid #d8e3f1; border-radius: 7px; background: #fff; color: #40506a; }
.member-lottery-table { min-width: 1040px; }
.member-lottery-table td:first-child { width: 19%; }
.member-lottery-table td:nth-child(2) { width: 19%; }
.lottery-record-table { min-width: 1080px; }
.lottery-form-section { padding: 16px; border: 1px solid #e5edf7; border-radius: 10px; background: #fbfdff; }
.lottery-form-section h4 { margin: 0 0 12px; color: #253b5a; font-size: 14px; }
.lottery-form-grid, .lottery-draft-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lottery-form-grid label, .lottery-draft-grid label { display: grid; gap: 6px; color: #5f6e84; font-size: 12px; font-weight: 700; }
.lottery-form-grid input, .lottery-form-grid select, .lottery-form-grid textarea, .lottery-draft-grid input, .lottery-draft-grid select { width: 100%; box-sizing: border-box; }
.lottery-form-grid .full { grid-column: 1 / -1; }
.section-action-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-action-head h4 { margin-bottom: 4px; }
.section-action-head .muted { margin: 0; }
.lottery-draft-prize { margin-top: 10px; padding: 14px; border: 1px solid #dfe9f5; border-radius: 9px; background: #fff; }
.lottery-draft-prize header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: #314563; }
.lottery-draft-prize header small { margin-right: auto; color: #77869a; }
.lottery-draft-prize .danger { color: #c84242; }
.draft-switch { align-self: end; grid-template-columns: auto 1fr; align-items: center; min-height: 36px; }
.draft-switch input { width: auto; }
.draft-no-reward { display: flex; align-items: end; min-height: 36px; color: #748298; font-size: 12px; }
.lottery-probability-total { margin: 14px 0 0; font-weight: 800; }
.point-store-table { min-width: 920px; }
.point-store-thumbnail, .point-store-placeholder { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.point-store-placeholder { display: grid; place-items: center; background: #eef5ff; color: #3474bd; font-size: 11px; font-weight: 800; }
.point-redemption-table { min-width: 760px; }
.point-store-item-form .point-store-direct-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; padding: 16px; border: 1px solid #d6e7f8; border-radius: 12px; background: #f8fbff; }
.point-store-item-form .point-store-direct-fields[hidden] { display: none; }
.point-store-item-form .point-store-direct-fields .field { min-width: 0; }
.point-store-item-form .point-store-direct-fields .full { grid-column: 1 / -1; }
.point-store-item-form .point-store-direct-fields .muted { margin: 0; line-height: 1.6; }

@media (max-width: 760px) {
  .lottery-section { padding: 14px; }
  .lottery-section .card-head { display: flex; flex-wrap: wrap; gap: 10px; }
  .lottery-section .card-head .primary-btn { width: 100%; }
  .lottery-table-wrap { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
  .lottery-table-wrap .lottery-table,
  .lottery-table-wrap .lottery-table thead,
  .lottery-table-wrap .lottery-table tbody,
  .lottery-table-wrap .lottery-table tr,
  .lottery-table-wrap .lottery-table th,
  .lottery-table-wrap .lottery-table td { display: table-cell; width: auto; min-width: 0 !important; max-width: none !important; }
  .lottery-table-wrap .lottery-table { display: table; min-width: 860px; }
  .lottery-table-wrap .lottery-table thead { display: table-header-group; }
  .lottery-table-wrap .lottery-table tbody { display: table-row-group; }
  .lottery-table-wrap .lottery-table tr { display: table-row; margin: 0; padding: 0; border: 0; border-radius: 0; }
  .lottery-table-wrap .lottery-table th { display: table-cell; }
  .lottery-table-wrap .lottery-table td { display: table-cell; padding: 10px; border-top: 1px solid #edf1f6; text-align: left; white-space: normal !important; }
  .lottery-table-wrap .lottery-table td::before { content: none; }
  .lottery-actions { min-width: 180px; }
  .point-store-item-form .point-store-direct-fields { grid-template-columns: 1fr; }
  .lottery-section .pagination { justify-content: center; flex-wrap: wrap; }
}

/* 本次会员运营收口：保持原后台白卡与蓝色按钮，仅修正密集操作和设置头部。 */
.member-settings-head { align-items:flex-start; gap:16px; }
.member-settings-head > .primary-btn { flex:0 0 auto; min-width:104px; }
.member-settings-card #memberPortalSettingsForm { grid-template-columns:repeat(2,minmax(0,1fr)); }
.receipt-variable-btn { margin:4px 5px 0 0; border:1px solid #cfe0f4; border-radius:7px; padding:5px 8px; background:#f7fbff; color:#226ec8; font-size:12px; font-weight:700; cursor:pointer; }
.receipt-variable-btn:hover,.receipt-variable-btn:focus-visible { border-color:#8fc0ef; background:#edf6ff; outline:none; }
#app .users-card.managed-table-card .user-row-actions { width:112px !important; min-width:112px !important; }
#app .users-card.managed-table-card .user-row-actions .mini-btn { white-space:nowrap; }
@media (max-width:760px){.member-settings-head{align-items:stretch;flex-direction:column}.member-settings-head > .primary-btn{width:100%}.member-settings-card #memberPortalSettingsForm{grid-template-columns:1fr}#app .users-card.managed-table-card .user-row-actions{width:min(112px,42vw)!important;min-width:0!important;}}

/* 抽奖活动配置：以连续工作流组织原有字段与校验，不改变保存和发布规则。 */
#modal .modal.lottery-campaign-modal {
  width: min(1160px, 100%);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#modal .lottery-campaign-modal .modal-head,
#modal .lottery-campaign-modal .modal-foot {
  flex: 0 0 auto;
}

#modal .lottery-campaign-modal .modal-body {
  overflow: auto;
  padding: 18px 20px;
}

.lottery-campaign-composer {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.lottery-campaign-composer > .full {
  grid-column: 1 / -1;
}

.lottery-composer-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0 6px;
  border: 1px solid #dce9f7;
  border-radius: 12px;
  background: #fff;
}

.lottery-composer-steps button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-height: 58px;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #62728a;
  box-shadow: none;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.lottery-composer-steps button + button::before {
  position: absolute;
  top: 50%;
  left: -8px;
  width: 16px;
  height: 1px;
  background: #dbe6f3;
  content: "";
}

.lottery-composer-steps button span,
.lottery-stage-number {
  display: inline-grid;
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid #d5e2f1;
  border-radius: 50%;
  background: #f3f7fb;
  color: #6b7b92;
  font-size: 13px;
  font-weight: 900;
}

.lottery-composer-steps button.active {
  color: #155fc4;
}

.lottery-composer-steps button.active span {
  border-color: #1f72df;
  background: #1f72df;
  color: #fff;
}

.lottery-stage-section,
.lottery-campaign-composer .lottery-form-section {
  padding: 18px;
  border-color: #dce9f7;
  border-radius: 12px;
  background: #fff;
}

.lottery-stage-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.lottery-stage-head h4 {
  margin: 1px 0 4px;
  color: #203a5e;
  font-size: 16px;
}

.lottery-stage-head p {
  margin: 0;
  color: #6c7d94;
  font-size: 13px;
  line-height: 1.5;
}

.lottery-campaign-composer .lottery-form-grid {
  margin-top: 16px;
  column-gap: 20px;
  row-gap: 18px;
}

.lottery-campaign-composer .lottery-form-grid label,
.lottery-prize-table-row-main label,
.lottery-prize-description,
.lottery-product-rule label {
  gap: 7px;
  color: #4e617c;
  font-size: 12px;
}

.lottery-campaign-composer .lottery-form-grid input,
.lottery-campaign-composer .lottery-form-grid select,
.lottery-campaign-composer .lottery-form-grid textarea,
.lottery-prize-table input,
.lottery-prize-table select,
.lottery-product-rule input,
.lottery-product-rule select {
  min-height: 42px;
  border: 1px solid #dce6f2;
  border-radius: 8px;
  background: #fff;
  color: #24324a;
  font-size: 14px;
  line-height: 1.4;
  outline: none;
  box-shadow: none;
}

.lottery-campaign-composer .lottery-form-grid input:hover,
.lottery-campaign-composer .lottery-form-grid select:hover,
.lottery-campaign-composer .lottery-form-grid textarea:hover,
.lottery-prize-table input:hover,
.lottery-prize-table select:hover,
.lottery-product-rule input:hover,
.lottery-product-rule select:hover {
  border-color: #b8d1f0;
}

.lottery-campaign-composer .lottery-form-grid input:focus-visible,
.lottery-campaign-composer .lottery-form-grid select:focus-visible,
.lottery-campaign-composer .lottery-form-grid textarea:focus-visible,
.lottery-prize-table input:focus-visible,
.lottery-prize-table select:focus-visible,
.lottery-product-rule input:focus-visible,
.lottery-product-rule select:focus-visible {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.lottery-campaign-composer .lottery-form-grid input:disabled,
.lottery-campaign-composer .lottery-form-grid select:disabled,
.lottery-campaign-composer .lottery-form-grid textarea:disabled,
.lottery-prize-table input:disabled,
.lottery-prize-table select:disabled,
.lottery-product-rule input:disabled,
.lottery-product-rule select:disabled {
  border-color: #e2e8f0;
  background: #f4f7fb;
  color: #94a3b8;
}

.lottery-campaign-composer .lottery-form-grid input:user-invalid,
.lottery-campaign-composer .lottery-form-grid select:user-invalid,
.lottery-campaign-composer .lottery-form-grid textarea:user-invalid,
.lottery-prize-table input:user-invalid,
.lottery-prize-table select:user-invalid,
.lottery-product-rule input:user-invalid,
.lottery-product-rule select:user-invalid {
  border-color: #f0a3a3;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .10);
}

.lottery-campaign-composer .lottery-form-grid textarea {
  min-height: 94px;
  resize: vertical;
}

.lottery-campaign-composer .section-action-head {
  align-items: center;
  margin-bottom: 14px;
}

.lottery-campaign-composer .section-action-head > .secondary-btn {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 15px;
  white-space: nowrap;
}

.lottery-campaign-composer .lottery-product-rule-section {
  background: #fff;
}

.lottery-rule-table,
.lottery-prize-table {
  overflow: auto;
  border: 1px solid #deebf7;
  border-radius: 10px;
  background: #fff;
}

.lottery-rule-table-head,
.lottery-product-rule {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, .42fr) 88px 78px;
  gap: 12px;
  align-items: center;
  min-width: 650px;
}

.lottery-rule-table-head {
  min-height: 42px;
  padding: 0 13px;
  background: #f3f8fe;
  color: #59708f;
  font-size: 12px;
  font-weight: 800;
}

.lottery-campaign-composer .lottery-product-rule {
  margin: 0;
  padding: 11px 13px;
  border: 0;
  border-top: 1px solid #e8f0f8;
  border-radius: 0;
  background: #fff;
}

.lottery-product-rule .lottery-field-label {
  display: none;
}

.lottery-campaign-composer .lottery-product-rule label {
  display: grid;
}

.lottery-campaign-composer .lottery-product-rule .mini-btn {
  min-height: 36px;
  padding: 0 9px;
}

.lottery-rule-status {
  color: #20744d;
  font-size: 12px;
  font-weight: 800;
}

.lottery-config-empty {
  display: grid;
  min-height: 116px;
  place-content: center;
  gap: 6px;
  padding: 18px;
  background: #f8fbff;
  color: #6c7d94;
  text-align: center;
}

.lottery-config-empty b {
  color: #435a78;
  font-size: 14px;
}

.lottery-config-empty span {
  max-width: 560px;
  font-size: 13px;
  line-height: 1.5;
}

.lottery-prize-table-head,
.lottery-prize-table-row-main {
  display: grid;
  grid-template-columns: minmax(145px, 1.15fr) minmax(112px, .9fr) minmax(110px, .82fr) minmax(190px, 1.45fr) minmax(112px, .85fr) minmax(105px, .78fr) 68px 82px 78px;
  gap: 10px;
  align-items: center;
  min-width: 1190px;
}

.lottery-prize-table-head {
  min-height: 42px;
  padding: 0 13px;
  background: #f3f8fe;
  color: #59708f;
  font-size: 12px;
  font-weight: 800;
}

.lottery-campaign-composer .lottery-draft-prize {
  margin: 0;
  padding: 12px 13px 10px;
  border: 0;
  border-top: 1px solid #e8f0f8;
  border-radius: 0;
  background: #fff;
}

.lottery-prize-table-row-main label,
.lottery-prize-description {
  display: grid;
  min-width: 0;
  font-weight: 700;
}

.lottery-prize-table-row-main label > span,
.lottery-prize-description > span {
  display: none;
}

.lottery-prize-table-row-main label.lottery-probability-field > .lottery-probability-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.lottery-probability-input-wrap input {
  padding-right: 30px;
}

.lottery-probability-input-wrap b {
  position: absolute;
  right: 11px;
  color: #70829a;
  font-size: 13px;
  font-weight: 800;
  pointer-events: none;
}

[data-lottery-probability-total] {
  margin: 14px 0 0;
}

.lottery-prize-table .draft-no-reward {
  display: flex;
  align-items: center;
  min-height: 38px;
  color: #7a899c;
  font-size: 12px;
  line-height: 1.35;
}

.lottery-prize-table .draft-switch {
  display: grid;
  align-self: auto;
  grid-template-columns: 1fr;
  min-height: 0;
}

.lottery-prize-table .draft-switch input {
  width: auto;
  min-height: 0;
}

.lottery-prize-row-action {
  display: grid;
  gap: 5px;
  justify-items: start;
}

.lottery-prize-row-action small {
  color: #718198;
  font-size: 11px;
  white-space: nowrap;
}

.lottery-prize-row-action .mini-btn {
  min-height: 34px;
  padding: 0 9px;
}

.lottery-prize-cover {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 7px;
}

.lottery-prize-cover.is-empty {
  min-height: 38px;
  color: #7a899c;
  font-size: 12px;
}

.lottery-prize-cover-thumb {
  flex: 0 0 auto;
  display: grid;
  width: 36px;
  height: 54px;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 1px solid #a8cee9;
  border-radius: 7px;
  background: #f6fbff;
}

.lottery-prize-cover-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lottery-prize-cover > div:not(.lottery-prize-cover-actions) {
  display: grid;
  min-width: 82px;
  flex: 1 1 88px;
  gap: 2px;
}

.lottery-prize-cover > div b { color: #244d76; font-size: 12px; }
.lottery-prize-cover > div small { color: #73849a; font-size: 11px; line-height: 1.35; }
.lottery-prize-cover-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.lottery-prize-cover-actions .text-button { padding: 0; font-size: 11px; white-space: nowrap; }
.lottery-cover-confirm { display: flex !important; align-items: center; gap: 4px; flex: 1 1 100%; color: #526a84; font-size: 11px; font-weight: 700; }
.lottery-cover-confirm input { width: auto; min-height: 0; }
.lottery-cover-upload { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 30px !important; font-size: 11px; cursor: pointer; }
.lottery-cover-upload input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.lottery-card-image-preview { display: grid; justify-items: center; gap: 10px; }
.lottery-card-image-preview img { display: block; width: min(100%, 360px); max-height: min(70vh, 540px); object-fit: contain; border: 1px solid #cce0f1; border-radius: 12px; background: #f7fbff; }
.lottery-card-image-preview p { margin: 0; color: #647b93; font-size: 13px; }

.lottery-prize-description {
  margin-top: 10px;
}

.lottery-prize-description > span {
  display: block;
  margin-bottom: 6px;
}

.lottery-release-check {
  padding: 17px 18px;
  border: 1px solid #cfe1f5;
  border-radius: 12px;
  background: #f8fbff;
}

.lottery-release-check .lottery-stage-head {
  margin-bottom: 14px;
}

.lottery-readiness-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #d9e7f5;
  border-bottom: 1px solid #d9e7f5;
}

.lottery-readiness-grid article {
  min-width: 0;
  padding: 13px 15px;
  border-right: 1px solid #d9e7f5;
}

.lottery-readiness-grid article:first-child {
  padding-left: 0;
}

.lottery-readiness-grid article:last-child {
  border-right: 0;
}

.lottery-readiness-grid span,
.lottery-readiness-grid p {
  display: block;
  margin: 0;
  color: #718198;
  font-size: 12px;
  line-height: 1.45;
}

.lottery-readiness-grid strong {
  display: block;
  margin: 5px 0 4px;
  color: #203a5e;
  font-size: 21px;
  line-height: 1.1;
}

.lottery-readiness-grid .lottery-probability-total {
  color: #718198;
}

.lottery-readiness-grid .lottery-probability-total.negative {
  color: #b54708;
}

.lottery-readiness-grid .lottery-probability-total.positive {
  color: #20744d;
}

.lottery-release-status {
  margin: 13px 0 0;
  color: #5d7089;
  font-size: 13px;
  font-weight: 700;
}

.lottery-release-status.is-ready {
  color: #20744d;
}

.lottery-release-status.is-incomplete {
  color: #b54708;
}

@media (max-width: 900px) {
  #modal .modal.lottery-campaign-modal {
    width: min(900px, 100%);
  }

  .lottery-composer-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .lottery-composer-steps button + button::before {
    display: none;
  }

  .lottery-readiness-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lottery-readiness-grid article:nth-child(2) {
    border-right: 0;
  }

  .lottery-readiness-grid article:nth-child(-n+2) {
    border-bottom: 1px solid #d9e7f5;
  }
}

@media (max-width: 640px) {
  #modal .modal.lottery-campaign-modal {
    max-height: calc(100vh - 16px);
    border-radius: 18px;
  }

  #modal .lottery-campaign-modal .modal-body {
    padding: 14px;
  }

  .lottery-composer-steps {
    grid-template-columns: 1fr;
    padding: 5px;
  }

  .lottery-composer-steps button {
    min-height: 44px;
  }

  .lottery-stage-section,
  .lottery-campaign-composer .lottery-form-section,
  .lottery-release-check {
    padding: 14px;
  }

  .lottery-campaign-composer .lottery-form-grid {
    grid-template-columns: 1fr;
  }

  .lottery-campaign-composer .section-action-head {
    align-items: stretch;
    flex-direction: column;
  }

  .lottery-campaign-composer .section-action-head > .secondary-btn {
    width: 100%;
  }

  .lottery-rule-table-head {
    display: none;
  }

  .lottery-rule-table,
  .lottery-prize-table {
    overflow: visible;
  }

  .lottery-campaign-composer .lottery-product-rule,
  .lottery-prize-table-row-main {
    min-width: 0;
    grid-template-columns: 1fr;
  }

  .lottery-campaign-composer .lottery-product-rule {
    gap: 10px;
  }

  .lottery-product-rule .lottery-field-label,
  .lottery-prize-table-row-main label > span {
    display: block;
  }

  .lottery-prize-table-head {
    min-width: 0;
  }

  .lottery-prize-table .draft-no-reward {
    min-height: 0;
    padding: 8px 0;
  }

  .lottery-prize-row-action {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .lottery-readiness-grid {
    grid-template-columns: 1fr;
  }

  .lottery-readiness-grid article,
  .lottery-readiness-grid article:first-child,
  .lottery-readiness-grid article:nth-child(2) {
    padding: 12px 0;
    border-right: 0;
    border-bottom: 1px solid #d9e7f5;
  }

  .lottery-readiness-grid article:last-child {
    border-bottom: 0;
  }
}

/* 用户管理编辑器的最终优先级：后续通用表格规则不得恢复多操作按钮的列宽。 */
#modal .modal.user-editor-modal {
  width: min(1040px, 100%);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#modal .user-editor-modal .modal-body {
  overflow: auto;
  padding: 18px 20px;
  background: #f8fbff;
}

/* 用户资料与权益调整：同一套柔和蓝白字段与操作体系。 */
#modal .user-editor-modal .user-edit-section-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

#modal .user-editor-modal .user-edit-section-grid input[readonly] {
  border-color: #dce5ef;
  background: #f3f6f9;
  color: #617087;
  box-shadow: none;
}

#modal .user-editor-modal .user-invite-binding-field {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#modal .user-editor-modal .user-invite-binding-notice {
  margin: 6px 0 0;
  color: #718198;
  font-size: 12px;
  line-height: 1.45;
}

#modal .user-editor-modal .user-asset-adjustments {
  align-items: stretch;
  gap: 16px;
}

#modal .user-editor-modal .user-asset-adjustment-card {
  grid-template-rows: auto auto auto;
  gap: 14px;
  min-height: 218px;
  padding: 18px;
  border-color: #d8e6f4;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  box-shadow: 0 6px 16px rgba(32, 93, 166, .06);
}

#modal .user-editor-modal .user-asset-balance {
  padding-bottom: 12px;
  border-bottom: 1px solid #e6eef7;
}

#modal .user-editor-modal .user-asset-balance strong {
  color: #1769e0;
  font-size: 28px;
  letter-spacing: -.02em;
}

#modal .user-editor-modal .user-asset-balance p {
  min-height: 0;
  margin-top: 7px;
}

#modal .user-editor-modal .user-asset-adjustment-fields {
  align-self: end;
  gap: 12px;
}

/* 客服设置沿用后台内容区的安全边距，宽屏不再受内部最大宽度限制。 */
#app .content .payment-page {
  width: 100%;
  max-width: none;
  min-width: 0;
}

#app .content .payment-card,
#app .content .payment-form,
#app .content .payment-section,
#app .content .payment-section .form-grid,
#app .content .payment-section .payment-field.full,
#app .content .payment-section .receipt-template-card {
  width: 100%;
  max-width: none;
}

#app .content .payment-basic-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  max-width: none;
}

#modal .user-editor-modal .user-asset-adjustment-fields label {
  gap: 6px;
}

#modal .user-editor-modal .user-asset-adjustment-fields label > span {
  color: #52647a;
  font-size: 12px;
  font-weight: 800;
}

#modal .user-editor-modal .user-asset-adjustment-fields input {
  min-height: 42px;
  padding: 10px 12px;
  border-color: #d5e0ec;
  border-radius: 10px;
  font: inherit;
  color: #203a5e;
}

#modal .user-editor-modal .user-asset-adjustment-fields input:focus {
  border-color: #4c96ef;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(49, 132, 235, .14);
}

#modal .user-editor-modal .user-asset-adjust-btn {
  min-height: 42px;
  border-radius: 10px;
}

#modal .user-editor-modal .user-asset-adjust-btn:disabled {
  cursor: wait;
  opacity: .65;
}

#app .users-card.managed-table-card .user-row-actions {
  width: 64px !important;
  min-width: 64px !important;
}

#app .users-card.managed-table-card .data-table col.col-actions {
  width: 76px !important;
}

#app .users-card.managed-table-card .data-table td.table-cell-action {
  height: auto !important;
  padding: 6px !important;
}

#app .users-card.managed-table-card .user-row-actions .mini-btn {
  min-height: 30px;
  padding: 6px 8px;
}

@media (max-width: 900px) {
  .user-asset-adjustments { grid-template-columns: 1fr; }
  .user-asset-balance p { min-height: 0; }
}

@media (max-width: 640px) {
  #modal .modal.user-editor-modal {
    width: min(100%, calc(100vw - 16px));
    max-height: calc(100vh - 16px);
    border-radius: 18px;
  }

  #modal .user-editor-modal .modal-body { padding: 14px; }
  .user-editor-section { padding: 14px; }
  .user-edit-section-grid,
  .member-link-editor-summary { grid-template-columns: 1fr; }
  .member-link-editor-actions { display: grid; grid-template-columns: 1fr; }
}

/* 本轮会员身份、链接操作与快捷录单：只增强现有组件的可读性。 */
.member-level-badge .level-mark {
  display: block;
  flex: 0 0 18px;
  width: 18px;
  min-width: 18px;
  height: 18px;
  padding: 0;
  object-fit: contain;
  background: transparent;
  box-shadow: none;
}
.member-level-editor-field { display: grid; gap: 8px; margin: 0 0 12px; }
.member-level-editor-field > label { color: #718198; font-size: 12px; font-weight: 800; }
.member-link-editor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 14px;
}
.member-link-editor-actions > button { flex: 0 0 auto; min-height: 40px; }
.quick-deduction-hint { min-height: 18px; margin: 7px 0 0; color: #b45309; font-size: 12px; font-weight: 700; line-height: 1.45; }
.quick-deduction-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; padding: 12px 14px; border: 1px solid #dce9f7; border-radius: 12px; background: #f8fbff; color: #52667f; font-size: 12px; line-height: 1.45; }
.quick-deduction-summary span, .quick-deduction-summary b { min-width: 0; }
.quick-deduction-summary b { color: #1d63ed; font-size: 13px; }
.receipt-actions { justify-content: flex-end; margin-top: 12px; }
@media (max-width: 760px) {
  .quick-deduction-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .member-link-editor-actions { display: flex; flex-wrap: wrap; }
}

/* 抽奖活动编辑器：桌面端按同一列轨道排版，避免表头、数字框与操作列漂移。 */
#modal .modal.lottery-campaign-modal {
  width: min(1280px, calc(100vw - 32px));
}

#modal .lottery-campaign-modal .section-action-head > .secondary-btn {
  display: inline-flex;
  width: 144px;
  min-width: 144px;
  min-height: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid #b9d8f4;
  border-radius: 9px;
  background: #edf7ff;
  box-shadow: 0 4px 11px rgba(39, 113, 190, .09);
  color: #1762ae;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

#modal .lottery-campaign-modal .section-action-head > .secondary-btn:hover {
  border-color: #77b6e8;
  background: #dff1ff;
  box-shadow: 0 6px 14px rgba(39, 113, 190, .15);
}

#modal .lottery-campaign-modal .lottery-prize-table {
  overflow-x: hidden;
}

#modal .lottery-campaign-modal .lottery-prize-table-head,
#modal .lottery-campaign-modal .lottery-prize-table-row-main {
  grid-template-columns: minmax(140px, 1.25fr) minmax(112px, .88fr) minmax(106px, .76fr) minmax(154px, 1.13fr) minmax(102px, .78fr) minmax(94px, .72fr) 62px 80px 66px;
  column-gap: 12px;
  min-width: 0;
}

#modal .lottery-campaign-modal .lottery-prize-table-head {
  padding: 0 14px;
}

#modal .lottery-campaign-modal .lottery-prize-table-head > span {
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#modal .lottery-campaign-modal .lottery-prize-table-head > span:first-child,
#modal .lottery-campaign-modal .lottery-prize-table-head > span:nth-child(4) {
  text-align: left;
}

#modal .lottery-campaign-modal .lottery-draft-prize {
  padding: 12px 14px 11px;
}

#modal .lottery-campaign-modal .lottery-prize-table-row-main {
  align-items: start;
}

#modal .lottery-campaign-modal .lottery-prize-table-row-main > * {
  min-width: 0;
}

#modal .lottery-campaign-modal .lottery-prize-table-row-main input,
#modal .lottery-campaign-modal .lottery-prize-table-row-main select {
  width: 100%;
  min-width: 0;
}

#modal .lottery-campaign-modal .lottery-prize-table .draft-no-reward {
  min-height: 42px;
  padding: 0 2px;
}

#modal .lottery-campaign-modal .lottery-prize-cover {
  min-height: 42px;
  align-content: center;
  gap: 5px 6px;
}

#modal .lottery-campaign-modal .lottery-prize-cover-thumb {
  width: 32px;
  height: 42px;
  border-radius: 6px;
}

#modal .lottery-campaign-modal .lottery-prize-cover-meta {
  display: grid;
  min-width: 0;
  flex: 1 1 38px;
}

#modal .lottery-campaign-modal .lottery-cover-status {
  overflow: hidden;
  color: #58728d;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#modal .lottery-campaign-modal .lottery-cover-status.is-pending { color: #1762ae; }
#modal .lottery-campaign-modal .lottery-cover-status.is-warning { color: #b45309; }
#modal .lottery-campaign-modal .lottery-cover-status.is-error { color: #c43d3d; }

#modal .lottery-campaign-modal .lottery-cover-upload {
  min-height: 30px !important;
  padding: 0 8px;
  border-radius: 7px;
  white-space: nowrap;
}

#modal .lottery-campaign-modal .lottery-cover-upload.is-busy,
#modal .lottery-campaign-modal .lottery-cover-upload.is-busy input {
  cursor: wait;
  opacity: .72;
}

#modal .lottery-campaign-modal .lottery-cover-remove,
#modal .lottery-campaign-modal .lottery-cover-confirm-action {
  flex: 0 0 auto;
  padding: 0;
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
}

#modal .lottery-campaign-modal .draft-switch {
  justify-items: center;
  padding-top: 10px;
  text-align: center;
}

#modal .lottery-campaign-modal .draft-switch > span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

#modal .lottery-campaign-modal .lottery-prize-row-action {
  min-height: 42px;
  justify-items: center;
  padding-top: 4px;
}

#modal .lottery-campaign-modal .lottery-prize-row-action small {
  max-width: 66px;
  overflow: hidden;
  text-overflow: ellipsis;
}

#modal .lottery-campaign-modal .lottery-prize-row-action .mini-btn {
  min-width: 56px;
  padding: 0 8px;
}

#modal .lottery-campaign-modal .lottery-prize-description {
  margin-top: 12px;
}

#modal .lottery-campaign-modal #modalSave:disabled {
  cursor: wait;
  opacity: .72;
}

@media (max-width: 1100px) {
  #modal .modal.lottery-campaign-modal { width: min(1000px, calc(100vw - 24px)); }
  #modal .lottery-campaign-modal .lottery-prize-table { overflow-x: auto; }
  #modal .lottery-campaign-modal .lottery-prize-table-head,
  #modal .lottery-campaign-modal .lottery-prize-table-row-main { min-width: 1010px; }
}

@media (max-width: 640px) {
  #modal .lottery-campaign-modal .section-action-head > .secondary-btn { width: 100%; min-width: 0; }
  #modal .lottery-campaign-modal .lottery-prize-table { overflow: visible; }
  #modal .lottery-campaign-modal .lottery-prize-table-head,
  #modal .lottery-campaign-modal .lottery-prize-table-row-main { min-width: 0; }
  #modal .lottery-campaign-modal .lottery-prize-cover { min-height: 46px; }
  #modal .lottery-campaign-modal .draft-switch,
  #modal .lottery-campaign-modal .lottery-prize-row-action { justify-items: start; padding-top: 0; text-align: left; }
}

