/* WpX 会员分销 - 推广中心样式 */
:root {
	--wpxma-primary: #4f6ef7;
	--wpxma-primary-2: #7a5af8;
	--wpxma-accent: #06b6a4;
	--wpxma-ink: #141a2a;
	--wpxma-sub: #6b7385;
	--wpxma-line: #e9ecf4;
	--wpxma-bg: #f5f6fb;
	--wpxma-card: #ffffff;
	--wpxma-radius: 16px;
	--wpxma-shadow: 0 10px 30px rgba(20, 26, 42, .06);
}

body.wpxma-body {
	margin: 0;
	background: var(--wpxma-bg);
	color: var(--wpxma-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	-webkit-font-smoothing: antialiased;
}
body.wpxma-body img { max-width: 100%; height: auto; }
.wpxma-app { max-width: 1180px; margin: 0 auto; padding: 0 16px 48px; box-sizing: border-box; }

.wpxma-top { padding: 18px 0 8px; }
.wpxma-top-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wpxma-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--wpxma-ink); text-decoration: none; font-size: 16px; }
.wpxma-brand-dot { width: 12px; height: 12px; border-radius: 4px; background: linear-gradient(135deg, var(--wpxma-primary), var(--wpxma-accent)); display: inline-block; }
.wpxma-top-user { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--wpxma-sub); }
.wpxma-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.wpxma-uname { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--wpxma-ink); font-weight: 600; }
.wpxma-exit { color: var(--wpxma-sub); text-decoration: none; padding: 6px 10px; border: 1px solid var(--wpxma-line); border-radius: 999px; background: #fff; }
.wpxma-exit:hover { color: var(--wpxma-primary); border-color: #c9d3ff; }

.wpxma-hero { margin-top: 10px; border-radius: 22px; padding: 28px; color: #fff; background: radial-gradient(1200px 300px at 10% -20%, rgba(255,255,255,.28), transparent 60%), linear-gradient(135deg, #4f6ef7 0%, #7a5af8 55%, #06b6a4 120%); box-shadow: 0 20px 45px rgba(79, 110, 247, .25); }
.wpxma-hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wpxma-hero-badge { display: inline-block; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.18); margin-bottom: 10px; letter-spacing: .5px; }
.wpxma-hero h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.25; color: #fff; }
.wpxma-hero p { margin: 0; font-size: 14px; color: rgba(255,255,255,.86); max-width: 560px; line-height: 1.7; }
.wpxma-hero-rate { text-align: right; min-width: 160px; }
.wpxma-hero-rate-num { font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.wpxma-hero-rate-label { font-size: 13px; opacity: .9; margin-top: 6px; }
.wpxma-hero-rate-sub { font-size: 12px; opacity: .8; margin-top: 6px; }

.wpxma-tabs { display: flex; gap: 6px; margin: 18px 0 16px; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.wpxma-tabs::-webkit-scrollbar { display: none; }
.wpxma-tab { flex: 0 0 auto; padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--wpxma-line); color: var(--wpxma-sub); font-size: 14px; text-decoration: none; transition: .18s; }
.wpxma-tab:hover { color: var(--wpxma-primary); border-color: #c9d3ff; }
.wpxma-tab.is-active { background: var(--wpxma-ink); border-color: var(--wpxma-ink); color: #fff; }

.wpxma-main { display: flex; flex-direction: column; gap: 16px; }
.wpxma-card { background: var(--wpxma-card); border: 1px solid var(--wpxma-line); border-radius: var(--wpxma-radius); padding: 22px; box-shadow: var(--wpxma-shadow); }
.wpxma-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.wpxma-card-head h2 { margin: 0; font-size: 17px; color: var(--wpxma-ink); }
.wpxma-muted { color: var(--wpxma-sub); font-size: 13px; line-height: 1.7; }
.wpxma-more { font-size: 13px; color: var(--wpxma-primary); text-decoration: none; }
.wpxma-note { font-size: 12px; color: var(--wpxma-sub); line-height: 1.7; }

.wpxma-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.wpxma-stats-3 { grid-template-columns: repeat(3, 1fr); }
.wpxma-stat { background: #fff; border: 1px solid var(--wpxma-line); border-radius: var(--wpxma-radius); padding: 18px; box-shadow: var(--wpxma-shadow); }
.wpxma-stat-label { font-size: 13px; color: var(--wpxma-sub); }
.wpxma-stat-value { font-size: 24px; font-weight: 800; margin: 8px 0 4px; letter-spacing: -.5px; }
.wpxma-stat-value small { font-size: 13px; font-weight: 500; color: var(--wpxma-sub); }
.wpxma-stat-value.is-accent { color: var(--wpxma-accent); }
.wpxma-stat-sub { font-size: 12px; color: var(--wpxma-sub); }
.wpxma-stat-sub a { color: var(--wpxma-primary); text-decoration: none; }

.wpxma-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; align-items: start; }

.wpxma-tag { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: #eef1ff; color: var(--wpxma-primary); }
.wpxma-tag-green { background: #e6faf6; color: var(--wpxma-accent); }

.wpxma-link-row { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px dashed #d8deee; border-radius: 12px; margin-bottom: 10px; background: #fbfcff; }
.wpxma-link-meta { flex: 1 1 auto; min-width: 0; }
.wpxma-link-label { display: block; font-size: 12px; color: var(--wpxma-sub); margin-bottom: 4px; }
.wpxma-input { width: 100%; box-sizing: border-box; border: 1px solid var(--wpxma-line); border-radius: 10px; padding: 9px 12px; font-size: 13px; background: #fff; color: var(--wpxma-ink); }
.wpxma-input:focus { outline: none; border-color: #b9c6ff; box-shadow: 0 0 0 3px rgba(79,110,247,.12); }
.wpxma-link-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #475069; }
.wpxma-link-actions { display: flex; gap: 8px; flex: 0 0 auto; }

.wpxma-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--wpxma-primary); background: var(--wpxma-primary); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; transition: .18s; }
.wpxma-btn:hover { filter: brightness(1.06); }
.wpxma-btn:disabled { opacity: .5; cursor: not-allowed; }
.wpxma-btn-primary { background: linear-gradient(135deg, var(--wpxma-primary), var(--wpxma-primary-2)); border: none; }
.wpxma-btn-ghost { background: #fff; color: var(--wpxma-primary); border: 1px solid #cfd8ff; }
.wpxma-btn-block { width: 100%; margin-top: 10px; }

.wpxma-qr-block { display: flex; gap: 18px; align-items: center; padding: 14px; background: #f8f9fe; border-radius: 14px; margin-top: 4px; }
.wpxma-qr img { width: 120px; height: 120px; border-radius: 10px; background: #fff; padding: 6px; border: 1px solid var(--wpxma-line); display: block; }
.wpxma-qr-tip strong { font-size: 14px; }
.wpxma-qr-tip p { margin: 6px 0 10px; font-size: 12px; color: var(--wpxma-sub); line-height: 1.6; }

.wpxma-table-wrap { overflow-x: auto; }
.wpxma-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wpxma-table th { text-align: left; font-weight: 600; color: var(--wpxma-sub); padding: 10px 8px; border-bottom: 1px solid var(--wpxma-line); white-space: nowrap; }
.wpxma-table td { padding: 11px 8px; border-bottom: 1px solid #f3f5fa; color: #2c3446; vertical-align: middle; }
.wpxma-table tr:last-child td { border-bottom: none; }
.wpxma-table tr.is-current td { background: #f6f8ff; }
.wpxma-table-compact th, .wpxma-table-compact td { padding: 8px 6px; }
.wpxma-ellipsis { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wpxma-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.wpxma-accent { color: var(--wpxma-accent); }

.wpxma-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; line-height: 1.7; background: #f1f3f9; color: var(--wpxma-sub); white-space: nowrap; }
.wpxma-badge-pending { background: #fff4e5; color: #b26a00; }
.wpxma-badge-settled, .wpxma-badge-approved { background: #e6faf6; color: #048b7d; }
.wpxma-badge-paid { background: #eef1ff; color: #3f5ae0; }
.wpxma-badge-processing { background: #f0ecff; color: #6b46e0; }
.wpxma-badge-invalid, .wpxma-badge-rejected { background: #ffecec; color: #c62828; }
.wpxma-badge-cancelled { background: #f1f3f9; color: #6b7385; }

.wpxma-mini-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.wpxma-mini-stats > div { background: #f8f9fe; border-radius: 12px; padding: 12px 14px; }
.wpxma-mini-stats span { display: block; font-size: 12px; color: var(--wpxma-sub); margin-bottom: 4px; }
.wpxma-mini-stats strong { font-size: 14px; }

.wpxma-rules { display: flex; flex-direction: column; gap: 10px; }
.wpxma-rules > div { display: flex; gap: 10px; font-size: 13px; color: #3a4256; line-height: 1.7; }
.wpxma-rules > div > span { flex: 0 0 22px; height: 22px; border-radius: 7px; background: #eef1ff; color: var(--wpxma-primary); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.wpxma-rules-plain > div { display: block; color: var(--wpxma-sub); font-size: 12.5px; padding-left: 0; }

.wpxma-empty { padding: 26px 10px; text-align: center; color: var(--wpxma-sub); font-size: 13px; background: #fafbff; border-radius: 12px; }
.wpxma-alert { background: #fff8e8; border: 1px solid #ffe3ae; color: #8a5b00; padding: 11px 14px; border-radius: 12px; font-size: 13px; line-height: 1.7; margin-bottom: 14px; }
.wpxma-alert a { color: #8a5b00; font-weight: 700; }

.wpxma-pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.wpxma-pager-info { font-size: 12px; color: var(--wpxma-sub); margin-right: 6px; }
.wpxma-page { min-width: 30px; height: 30px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--wpxma-line); color: var(--wpxma-sub); font-size: 12px; text-decoration: none; background: #fff; }
.wpxma-page.is-active { background: var(--wpxma-ink); border-color: var(--wpxma-ink); color: #fff; }

.wpxma-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.wpxma-chip { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--wpxma-line); background: #fff; color: var(--wpxma-sub); font-size: 12.5px; text-decoration: none; }
.wpxma-chip.is-active { background: #eef1ff; border-color: #c9d3ff; color: var(--wpxma-primary); font-weight: 600; }

.wpxma-form .wpxma-field { display: block; margin-bottom: 14px; }
.wpxma-field > span { display: block; font-size: 12.5px; color: var(--wpxma-sub); margin-bottom: 6px; }
.wpxma-input-group { display: flex; gap: 8px; }
.wpxma-input-group .wpxma-input { flex: 1; }
.wpxma-method-list { display: flex; gap: 10px; flex-wrap: wrap; }
.wpxma-method { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--wpxma-line); border-radius: 12px; cursor: pointer; font-size: 13px; background: #fff; }
.wpxma-method input { margin: 0; }
.wpxma-method em { font-style: normal; font-size: 11px; color: var(--wpxma-accent); }
.wpxma-method.is-active { border-color: #b9c6ff; box-shadow: 0 0 0 3px rgba(79,110,247,.1); }
.wpxma-fee-line { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--wpxma-sub); padding: 8px 0; border-bottom: 1px dashed var(--wpxma-line); }
.wpxma-fee-line strong { color: var(--wpxma-ink); }

.wpxma-account-mini h3 { font-size: 14px; margin: 4px 0 10px; }
.wpxma-account-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--wpxma-line); font-size: 13px; }
.wpxma-account-row img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid var(--wpxma-line); }
.wpxma-account-row em { font-style: normal; color: var(--wpxma-sub); }

.wpxma-account-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.wpxma-account-card { border: 1px solid var(--wpxma-line); border-radius: 14px; padding: 16px; background: #fcfdff; }
.wpxma-account-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.wpxma-account-head h3 { font-size: 15px; margin: 0; }
.wpxma-qr-upload { display: flex; align-items: center; gap: 12px; margin: 10px 0 12px; }
.wpxma-qr-preview { width: 96px; height: 96px; border: 1px dashed #cfd8ee; border-radius: 12px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; text-align: center; color: var(--wpxma-sub); font-size: 11px; line-height: 1.5; }
.wpxma-qr-preview img { width: 100%; height: 100%; object-fit: cover; }
.wpxma-qr-preview.is-empty:hover { border-color: var(--wpxma-primary); color: var(--wpxma-primary); }

.wpxma-user-cell { display: flex; align-items: center; gap: 8px; }
.wpxma-user-cell img { width: 26px; height: 26px; border-radius: 50%; }

.wpxma-footer { text-align: center; color: var(--wpxma-sub); font-size: 12px; padding: 26px 0 10px; }
.wpxma-footer-links { display: flex; gap: 14px; justify-content: center; }
.wpxma-footer-links a { color: var(--wpxma-sub); text-decoration: none; }
.wpxma-footer-links a:hover { color: var(--wpxma-primary); }

.wpxma-fab { position: fixed; right: 22px; bottom: 96px; z-index: 99990; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 10px 10px; border-radius: 999px; background: linear-gradient(135deg, #4f6ef7, #7a5af8); color: #fff !important; text-decoration: none !important; box-shadow: 0 12px 28px rgba(79,110,247,.4); font-size: 13px; font-weight: 600; }
.wpxma-fab-icon { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.22); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.wpxma-fab-badge { background: #ffd66b; color: #5a3b00; font-size: 11px; padding: 2px 7px; border-radius: 999px; }

.wpxma-toast { position: fixed; left: 50%; top: 24px; transform: translateX(-50%) translateY(-10px); background: rgba(20,26,42,.92); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 13px; z-index: 99999; opacity: 0; transition: .22s; pointer-events: none; }
.wpxma-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.wpxma-toast.is-error { background: #c62828; }

@media (max-width: 900px) {
	.wpxma-grid { grid-template-columns: 1fr; }
	.wpxma-stats { grid-template-columns: repeat(2, 1fr); }
	.wpxma-stats-3 { grid-template-columns: repeat(2, 1fr); }
	.wpxma-account-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	.wpxma-app { padding: 0 10px 40px; }
	.wpxma-hero { padding: 20px; border-radius: 18px; }
	.wpxma-hero-inner { flex-direction: column; align-items: flex-start; }
	.wpxma-hero h1 { font-size: 22px; }
	.wpxma-hero-rate { text-align: left; }
	.wpxma-hero-rate-num { font-size: 34px; }
	.wpxma-card { padding: 16px; border-radius: 14px; }
	.wpxma-stats, .wpxma-stats-3 { grid-template-columns: 1fr 1fr; gap: 10px; }
	.wpxma-stat { padding: 14px; }
	.wpxma-stat-value { font-size: 19px; }
	.wpxma-link-row { flex-direction: column; align-items: stretch; }
	.wpxma-link-actions { justify-content: flex-end; }
	.wpxma-qr-block { flex-direction: column; text-align: center; }
	.wpxma-mini-stats { grid-template-columns: 1fr; }
	.wpxma-fab { right: 12px; bottom: 84px; padding: 9px 13px 9px 9px; }
	.wpxma-fab-text { display: none; }
}

.wpxma-qr.is-error::after {
	content: "二维码加载失败\A请直接复制下方链接";
	white-space: pre;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 120px;
	height: 120px;
	border-radius: 10px;
	border: 1px dashed #cfd8ee;
	color: #6b7385;
	font-size: 12px;
	text-align: center;
	line-height: 1.6;
	background: #fff;
}