: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, .version-note { 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); }
.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: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.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; }
}
@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;
}

.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 .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;
}
.settings-main-head {
  align-items: flex-start;
  margin-bottom: 18px;
}
.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: 18px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 58%, #f8fafc 100%);
  box-shadow: 0 10px 24px rgba(30, 64, 175, .05);
}
.settings-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.settings-section-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.settings-section-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #eef4ff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
  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;
}
.settings-section-grid .field {
  min-width: 0;
}
.settings-section-grid .field .muted {
  margin: 0;
  line-height: 1.45;
  font-size: 12px;
}
.settings-section-grid textarea {
  min-height: 96px;
}
.settings-save-row,
.settings-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 24px;
  padding-top: 4px;
}
.settings-save-row .primary-btn,
.settings-save-btn {
  width: min(360px, 100%);
  min-height: 46px;
  font-size: 14px;
}
@media (max-width: 760px) {
  .settings-save-row,
  .payment-save-row,
  .settings-actions {
    justify-content: stretch;
  }
  .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;
  }
  .settings-save-row .primary-btn,
  .payment-save-row .primary-btn,
  .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;
  max-width: 1180px;
  margin: 0 auto;
}
.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)); }
.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; }
}
