/* 商户中心样式 */

/* 页面基础样式 */
.page {
	width: 100%;
	min-height: 100vh;
	background: #F8F8F8;
	position: relative;
}

/* 头部样式 */
.header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 60px;
	background: white;
	padding: 12px 16px;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid #E5E7EB;
	z-index: 1000;
	box-sizing: border-box;
}

.header-back {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 8px;
}

.back-icon {
	font-size: 24px;
	color: #111827;
}

.header-title {
	flex: 1;
	text-align: center;
	font-size: 18px;
	font-weight: bold;
	color: #111827;
}

.header-placeholder {
	width: 40px;
}

/* 内容区域 - 充值/提现页面专用 */
.page.merchant-recharge-page .content,
.page.merchant-withdraw-page .content {
	position: fixed !important;
	top: 60px !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	padding: 16px !important;
	padding-top: 16px !important;
	padding-bottom: 16px !important;
	box-sizing: border-box !important;
	background: #F8F8F8 !important;
	overflow-y: auto !important;
	-webkit-overflow-scrolling: touch !important;
	max-width: none !important;
	margin: 0 !important;
	height: auto !important;
}

/* 等级卡片 */
.level-card {
	background: white;
	border-radius: 12px;
	padding: 16px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	position: relative;
	cursor: pointer;
	transition: transform 0.2s;
}

.level-card:active {
	transform: scale(0.98);
}

.level-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

.level-title-wrapper {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.level-title {
	font-size: 14px;
	font-weight: 600;
	color: #111827;
}

.level-subtitle {
	font-size: 20px;
	font-weight: bold;
	color: #4F46E5;
}

.level-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	background: #FF6B35;
	color: white;
	padding: 4px 8px;
	border-radius: 12px;
	font-size: 10px;
	font-weight: bold;
}

.level-stars {
	display: flex;
	gap: 4px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.star-icon {
	font-size: 16px;
	color: #D1D5DB;
}

.star-icon.active {
	color: #FBBF24;
}

.level-balance {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

.balance-info {
	font-size: 20px;
	font-weight: bold;
	color: #10B981;
}

.star-info {
	font-size: 12px;
	color: #6B7280;
}

.level-progress {
	margin-top: 8px;
}

.progress-bar {
	width: 100%;
	height: 6px;
	background: #E5E7EB;
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 4px;
}

.progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #10B981 0%, #34D399 100%);
	border-radius: 3px;
	transition: width 0.3s;
}

.progress-text {
	font-size: 11px;
	color: #6B7280;
}

/* 用户详情卡片 */
.detail-card {
	background: white;
	border-radius: 12px;
	padding: 16px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	cursor: pointer;
	transition: transform 0.2s;
	position: relative;
	height: 100%;
	min-height: 140px;
}

.detail-card:active {
	transform: scale(0.98);
}

.detail-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	background: #FF6B35;
	color: white;
	padding: 4px 8px;
	border-radius: 12px;
	font-size: 10px;
	font-weight: bold;
}

.detail-icon-large {
	font-size: 48px;
	margin-bottom: 8px;
}

.detail-title-text {
	font-size: 16px;
	font-weight: bold;
	color: #111827;
	margin-bottom: 4px;
}

.detail-desc {
	font-size: 12px;
	color: #6B7280;
}

/* 余额提现充值卡片 */
.balance-card {
	background: white;
	border-radius: 12px;
	padding: 20px;
	margin-bottom: 16px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
}

.balance-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 1;
}

.balance-label {
	font-size: 14px;
	color: #6B7280;
	margin-bottom: 8px;
}

.balance-value {
	font-size: 24px;
	font-weight: bold;
	color: #111827;
}

.balance-actions {
	display: flex;
	gap: 12px;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #E5E7EB;
	width: 100%;
}

.balance-btn {
	flex: 1;
	padding: 12px;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s;
}

.balance-btn.recharge {
	background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
	color: white;
}

.balance-btn.withdraw {
	background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
	color: white;
}

.balance-btn:active {
	opacity: 0.8;
}

/* 任务区域 */
.task-section {
	margin-bottom: 24px;
}

.section-banner {
	background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
	color: white;
	padding: 12px 16px;
	border-radius: 12px;
	font-size: 16px;
	font-weight: bold;
	text-align: center;
	margin-bottom: 12px;
	box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

/* 卡片行 */
.card-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 12px;
}

.card-col {
	width: 100%;
}

.card-row:last-child {
	margin-bottom: 0;
}

/* 商户详情弹窗 */
.merchant-detail-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2500;
	backdrop-filter: blur(4px);
	animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.merchant-detail-content {
	background: white;
	border-radius: 16px;
	width: 90%;
	max-width: 400px;
	max-height: 80vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
	animation: slideUp 0.3s ease-out;
	position: relative;
	z-index: 2501;
}

@keyframes slideUp {
	from {
		transform: translateY(30px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.merchant-detail-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	border-bottom: 1px solid #E5E7EB;
}

.merchant-detail-title {
	font-size: 18px;
	font-weight: bold;
	color: #111827;
}

.merchant-detail-close {
	font-size: 24px;
	color: #6B7280;
	cursor: pointer;
	padding: 4px;
	line-height: 1;
}

.merchant-detail-close:hover {
	color: #111827;
}

.merchant-detail-body {
	flex: 1;
	overflow-y: auto;
	padding: 16px 20px;
}

.detail-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid #F3F4F6;
}

.detail-item:last-child {
	border-bottom: none;
}

.detail-item-icon {
	font-size: 24px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #F3F4F6;
	border-radius: 8px;
	flex-shrink: 0;
}

.detail-item-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.detail-item-label {
	font-size: 12px;
	color: #6B7280;
}

.detail-item-value {
	font-size: 14px;
	font-weight: 600;
	color: #111827;
}

.detail-item-value.highlight {
	color: #10B981;
}

.detail-item-value.highlight-red {
	color: #EF4444;
}

.detail-item-value.highlight-blue {
	color: #3B82F6;
}

.detail-item-value.highlight-purple {
	color: #8B5CF6;
}

.detail-item-value.highlight-green {
	color: #10B981;
}

.detail-item-value.highlight-total {
	color: #4F46E5;
}

.merchant-detail-footer {
	padding: 16px 20px;
	border-top: 1px solid #E5E7EB;
}

.detail-btn {
	width: 100%;
	padding: 12px;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s;
}

.detail-btn.secondary {
	background: #F3F4F6;
	color: #111827;
}

.detail-btn.secondary:active:not(:disabled) {
	opacity: 0.8;
}

.detail-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* 表单区域 */
.page .form-area {
	padding: 0 !important;
	background: transparent !important;
	margin: 0 !important;
}

.page .balance-section {
	background: linear-gradient(135deg, #1966FF 0%, #4F46E5 100%) !important;
	border-radius: 12px !important;
	padding: 24px !important;
	margin-bottom: 16px !important;
	color: white !important;
	text-align: center !important;
	box-shadow: 0 4px 12px rgba(25, 102, 255, 0.3) !important;
	display: block !important;
}

.page .balance-label {
	display: block !important;
	font-size: 14px !important;
	opacity: 0.9 !important;
	margin-bottom: 8px !important;
	color: white !important;
}

.page .balance-value {
	display: block !important;
	font-size: 32px !important;
	font-weight: bold !important;
	margin-bottom: 8px !important;
	color: white !important;
}

.balance-hint {
	display: block;
	font-size: 12px;
	opacity: 0.8;
}

.page .amount-section {
	margin-bottom: 16px !important;
	background: #FFFFFF !important;
	border-radius: 12px !important;
	padding: 16px !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
	display: block !important;
	width: 100% !important;
	box-sizing: border-box !important;
}

.page .section-title {
	display: block !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	color: #111827 !important;
	margin-bottom: 16px !important;
}

.page .amount-grid {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr) !important;
	gap: 12px !important;
	margin-bottom: 16px !important;
}

.page .amount-item {
	background: #F9FAFB !important;
	border: 2px solid #E5E7EB !important;
	border-radius: 12px !important;
	padding: 16px !important;
	text-align: center !important;
	cursor: pointer !important;
	transition: all 0.2s !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

.amount-item.custom {
	grid-column: span 3;
}

.amount-item:hover {
	border-color: #4F46E5;
}

.page .amount-item.active {
	border-color: #4F46E5 !important;
	background: #EEF2FF !important;
}

.page .amount-text {
	font-size: 16px !important;
	font-weight: 500 !important;
	color: #111827 !important;
}

.page .amount-item.active .amount-text {
	color: #4F46E5 !important;
	font-weight: 600 !important;
}

.custom-amount-input {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #E5E7EB;
}

.custom-amount-input .amount-input {
	width: 100%;
	height: 48px;
	background: #F9FAFB;
	border: 2px solid #E5E7EB;
	border-radius: 12px;
	padding: 0 16px;
	font-size: 16px;
	color: #111827;
	box-sizing: border-box;
}

.custom-amount-input .amount-input:focus {
	border-color: #4F46E5;
	outline: none;
	background: white;
}

.amount-input-wrapper {
	display: flex;
	align-items: center;
	background: white;
	border: 2px solid #E5E7EB;
	border-radius: 12px;
	padding: 0 16px;
	margin-bottom: 8px;
}

.amount-symbol {
	font-size: 18px;
	font-weight: 500;
	color: #111827;
	margin-right: 8px;
}

.amount-input {
	flex: 1;
	height: 48px;
	border: none;
	outline: none;
	font-size: 18px;
	color: #111827;
}

.amount-hint {
	display: block;
	font-size: 12px;
	color: #6B7280;
	padding-left: 4px;
}

.page .payment-section {
	margin-bottom: 16px !important;
	background: #FFFFFF !important;
	border-radius: 12px !important;
	padding: 16px !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
	display: block !important;
	width: 100% !important;
	box-sizing: border-box !important;
}

.page .payment-methods {
	display: flex !important;
	flex-direction: column !important;
	gap: 12px !important;
}

.page .payment-item {
	background: #F9FAFB !important;
	border: 2px solid #E5E7EB !important;
	border-radius: 12px !important;
	padding: 16px !important;
	display: flex !important;
	align-items: center !important;
	gap: 12px !important;
	cursor: pointer !important;
	transition: all 0.2s !important;
}

.payment-item:hover {
	border-color: #4F46E5;
}

.page .payment-item.active {
	border-color: #4F46E5 !important;
	background: #EEF2FF !important;
}

.payment-icon {
	font-size: 24px;
}

.payment-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.payment-name {
	font-size: 16px;
	font-weight: 500;
	color: #111827;
}

.payment-desc {
	font-size: 12px;
	color: #6B7280;
}

.payment-check {
	font-size: 20px;
	color: #4F46E5;
	font-weight: bold;
}

.submit-section {
	margin-top: 16px;
	margin-bottom: 16px;
}

.page .submit-btn {
	width: 100% !important;
	background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%) !important;
	color: white !important;
	border: none !important;
	border-radius: 12px !important;
	padding: 16px !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	transition: opacity 0.2s !important;
	box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3) !important;
	display: block !important;
}

.submit-btn:hover:not(.disabled) {
	opacity: 0.9;
}

.submit-btn.disabled {
	opacity: 0.5;
	cursor: not-allowed;
	box-shadow: none;
}

.submit-text {
	color: white;
}

/* 返回按钮 */
.header-back {
	cursor: pointer;
	padding: 8px;
}

.back-icon {
	font-size: 20px;
	color: #111827;
}

.header-placeholder {
	width: 40px;
}

/* 充值/提现页面特定样式 */

/* 历史记录链接 */
.page .history-link {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	padding: 12px 16px !important;
	margin-bottom: 16px !important;
	background: #FFFFFF !important;
	border-radius: 12px !important;
	cursor: pointer !important;
	transition: all 0.2s !important;
	color: #6366F1 !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
	width: 100% !important;
	box-sizing: border-box !important;
}

.history-link:hover {
	background: #F3F4F6;
}

.history-link:active {
	background: #E5E7EB;
}

.link-arrow {
	font-size: 18px;
	color: #6366F1;
}

/* 快速选择金额（提现页面） */
.quick-amount-section {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #E5E7EB;
}

.quick-amount-label {
	display: block;
	font-size: 12px;
	color: #6B7280;
	margin-bottom: 8px;
}

.quick-amount-buttons {
	display: flex;
	gap: 8px;
}

.quick-amount-btn {
	flex: 1;
	padding: 8px 12px;
	background: #F3F4F6;
	border: 1px solid #E5E7EB;
	border-radius: 8px;
	font-size: 14px;
	color: #111827;
	text-align: center;
	cursor: pointer;
	transition: all 0.2s;
}

.quick-amount-btn:hover {
	background: #E5E7EB;
	border-color: #6366F1;
}

.quick-amount-btn:active {
	background: #D1D5DB;
	transform: scale(0.98);
}

/* 历史记录弹窗 */
.history-modal-mask {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2500;
	backdrop-filter: blur(4px);
	animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.history-modal {
	background: white;
	border-radius: 16px;
	width: 90%;
	max-width: 400px;
	max-height: 80vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
	animation: slideUp 0.3s ease-out;
	position: relative;
	z-index: 2501;
}

@keyframes slideUp {
	from {
		transform: translateY(30px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.history-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	border-bottom: 1px solid #E5E7EB;
}

.history-modal-title {
	font-size: 18px;
	font-weight: bold;
	color: #111827;
}

.history-modal-close {
	font-size: 24px;
	color: #6B7280;
	cursor: pointer;
	padding: 4px;
	line-height: 1;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	transition: all 0.2s;
}

.history-modal-close:hover {
	background: #F3F4F6;
	color: #111827;
}

.history-modal-close:active {
	background: #E5E7EB;
}

.history-modal-body {
	flex: 1;
	overflow-y: auto;
	padding: 16px 20px;
	max-height: calc(80vh - 60px);
}

.history-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px solid #F3F4F6;
}

.history-item:last-child {
	border-bottom: none;
}

.history-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
}

.history-amount {
	font-size: 16px;
	font-weight: 600;
	color: #111827;
}

.history-time {
	font-size: 12px;
	color: #6B7280;
}

.history-status {
	font-size: 14px;
	font-weight: 500;
	padding: 4px 12px;
	border-radius: 12px;
}

/* 状态样式 */
.status-pending {
	color: #F59E0B;
	background: #FEF3C7;
}

.status-processing {
	color: #3B82F6;
	background: #DBEAFE;
}

.status-success {
	color: #10B981;
	background: #D1FAE5;
}

.status-failed {
	color: #EF4444;
	background: #FEE2E2;
}

.status-cancelled {
	color: #6B7280;
	background: #F3F4F6;
}

/* 空状态提示 */
.empty-tip {
	text-align: center;
	padding: 40px 20px;
	color: #9CA3AF;
	font-size: 14px;
}