/* ===== 全局基础样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; background: #f0f2f5; color: #333; font-size: 14px; line-height: 1.6; }
a { color: #1677ff; text-decoration: none; }
a:hover { color: #0958d9; }

/* ===== 付款页面 ===== */
.pay-page { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.pay-container { background: #fff; border-radius: 16px; padding: 40px 30px; max-width: 420px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.15); }
.pay-header { text-align: center; margin-bottom: 30px; }
.pay-logo { margin-bottom: 16px; }
.pay-header h1 { font-size: 22px; color: #1a1a1a; margin-bottom: 6px; }
.pay-desc { color: #999; font-size: 14px; }
.pay-form { margin-top: 20px; }

.amount-display { text-align: center; padding: 20px 0; margin-bottom: 20px; }
.amount-display .currency { font-size: 24px; color: #333; vertical-align: top; margin-right: 4px; }
.amount-display .amount-value { font-size: 48px; font-weight: 700; color: #1a1a1a; }

.amount-input-wrap { display: flex; align-items: center; background: #f5f7fa; border: 2px solid #e8ecf1; border-radius: 12px; padding: 12px 16px; margin-bottom: 20px; transition: border-color 0.3s; }
.amount-input-wrap:focus-within { border-color: #1677ff; background: #fff; }
.amount-input-wrap .currency { font-size: 28px; color: #999; margin-right: 8px; font-weight: 300; }
.amount-input-wrap input { border: none; outline: none; background: transparent; font-size: 32px; font-weight: 600; width: 100%; color: #1a1a1a; }
.amount-input-wrap input::placeholder { color: #ccc; font-weight: 300; }
.amount-input-wrap input::-webkit-inner-spin-button,
.amount-input-wrap input::-webkit-outer-spin-button { -webkit-appearance: none; }
.amount-input-wrap input[type=number] { -moz-appearance: textfield; }

.pay-btn { display: block; width: 100%; padding: 14px; background: #1677ff; color: #fff; border: none; border-radius: 12px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s; text-align: center; }
.pay-btn:hover { background: #0958d9; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(22,119,255,0.4); }
.pay-btn:active { transform: translateY(0); }
.pay-btn:disabled { background: #ccc; cursor: not-allowed; transform: none; box-shadow: none; }

.pay-methods { text-align: center; margin-top: 16px; color: #bbb; font-size: 12px; }
.pay-footer { text-align: center; margin-top: 30px; color: #ccc; font-size: 12px; }
.pay-notice { padding: 14px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 20px; }
.pay-notice.error { background: #fff2f0; color: #ff4d4f; border: 1px solid #ffccc7; }

.back-btn { margin-top: 20px; background: #52c41a; display: inline-block; width: auto; padding: 10px 30px; }
.back-btn:hover { background: #389e0d; }

/* ===== 支付结果页 ===== */
.result-box { text-align: center; }
.result-icon { margin-bottom: 20px; }
.result-box h2 { font-size: 20px; color: #333; margin-bottom: 16px; }
.result-info { background: #f9fafb; border-radius: 10px; padding: 16px 20px; margin-bottom: 10px; }
.result-info p { margin: 6px 0; color: #666; font-size: 14px; }
.result-info strong { color: #1a1a1a; font-size: 16px; }
.result-info .tip { color: #999; font-size: 13px; margin-top: 10px; }

/* ===== 登录页面 ===== */
.login-page { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-container { width: 100%; max-width: 400px; }
.login-box { background: #fff; border-radius: 16px; padding: 40px 32px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.login-box h1 { text-align: center; font-size: 22px; color: #1a1a1a; margin-bottom: 4px; }
.login-desc { text-align: center; color: #999; margin-bottom: 30px; font-size: 14px; }
.login-form .form-group { margin-bottom: 18px; }
.login-form .form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; font-weight: 500; }
.login-form .form-group input { width: 100%; padding: 10px 14px; border: 1.5px solid #e0e0e0; border-radius: 8px; font-size: 14px; transition: border-color 0.3s; outline: none; }
.login-form .form-group input:focus { border-color: #1677ff; }

/* ===== 通用组件 ===== */
.btn { display: inline-block; padding: 10px 24px; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.3s; text-align: center; }
.btn-primary { background: #1677ff; color: #fff; }
.btn-primary:hover { background: #0958d9; }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.btn-warning { background: #faad14; color: #fff; }
.btn-warning:hover { background: #d48806; }

.alert { padding: 10px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; }
.alert-success { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.alert-error { background: #fff2f0; color: #ff4d4f; border: 1px solid #ffccc7; }

/* ===== 后台布局 ===== */
.admin-layout { display: flex; min-height: 100vh; }

.sidebar { width: 240px; background: #001529; color: #fff; display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; }
.sidebar-header { padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-header h2 { font-size: 16px; font-weight: 600; color: #fff; }
.sidebar-nav { flex: 1; padding: 10px 0; }
.nav-item { display: flex; align-items: center; padding: 12px 20px; color: rgba(255,255,255,0.65); font-size: 14px; transition: all 0.3s; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-item.active { color: #fff; background: #1677ff; }
.nav-icon { margin-right: 10px; font-size: 14px; width: 18px; text-align: center; }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,0.1); padding: 10px 0; }
.nav-item.logout:hover { background: rgba(255,77,79,0.2); color: #ff7875; }

.main-content { flex: 1; margin-left: 240px; padding: 24px 32px; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid #e8ecf1; }
.page-header h1 { font-size: 22px; font-weight: 600; color: #1a1a1a; }
.header-info { display: flex; align-items: center; gap: 16px; font-size: 13px; color: #999; }

.status-badge { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.status-badge.active { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.status-badge.inactive { background: #f5f5f5; color: #999; border: 1px solid #d9d9d9; }

/* ===== 统计卡片 ===== */
.section-title { font-size: 15px; font-weight: 600; color: #666; margin-bottom: 12px; margin-top: 8px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.stat-card.highlight { background: linear-gradient(135deg, #f6ffed, #e6fffb); border: 1px solid #b7eb8f; }
.stat-label { font-size: 13px; color: #999; margin-bottom: 8px; }
.stat-value { font-size: 26px; font-weight: 700; color: #1a1a1a; }
.text-blue { color: #1677ff !important; }
.text-green { color: #52c41a !important; }
.text-orange { color: #fa8c16 !important; }
.text-red { color: #ff4d4f !important; }

/* ===== 筛选栏 ===== */
.filter-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-btn { padding: 6px 16px; border-radius: 20px; font-size: 13px; color: #666; background: #f0f2f5; transition: all 0.3s; }
.filter-btn:hover { color: #1677ff; background: #e6f4ff; }
.filter-btn.active { color: #fff; background: #1677ff; }

/* ===== 数据表格 ===== */
.table-wrap { background: #fff; border-radius: 10px; overflow-x: auto; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.data-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.data-table th { background: #fafafa; padding: 12px 14px; text-align: left; font-size: 13px; font-weight: 600; color: #666; border-bottom: 1px solid #f0f0f0; white-space: nowrap; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid #f5f5f5; font-size: 13px; white-space: nowrap; }
.data-table tr:hover { background: #fafafa; }
.mono { font-family: 'SF Mono', 'Consolas', monospace; font-size: 12px; color: #666; }
.empty-text { text-align: center !important; color: #ccc; padding: 40px !important; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; font-weight: 500; }
.badge-gray { background: #f5f5f5; color: #999; }
.badge-green { background: #f6ffed; color: #52c41a; }
.badge-blue { background: #e6f4ff; color: #1677ff; }
.badge-red { background: #fff2f0; color: #ff4d4f; }

/* ===== 分页 ===== */
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; }
.page-btn { padding: 6px 16px; background: #fff; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 13px; color: #333; transition: all 0.3s; }
.page-btn:hover { color: #1677ff; border-color: #1677ff; }
.page-info { color: #999; font-size: 13px; }

/* ===== 设置页面 ===== */
.settings-card { background: #fff; border-radius: 10px; padding: 24px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.settings-card h3 { font-size: 16px; font-weight: 600; color: #1a1a1a; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid #f0f0f0; }
.settings-card .form-group { margin-bottom: 18px; }
.settings-card .form-group label { display: block; font-size: 13px; color: #333; margin-bottom: 6px; font-weight: 500; }
.settings-card .form-group input[type="text"],
.settings-card .form-group input[type="url"],
.settings-card .form-group input[type="number"],
.settings-card .form-group input[type="password"],
.settings-card .form-group textarea,
.settings-card .form-group select { width: 100%; max-width: 500px; padding: 8px 12px; border: 1.5px solid #e0e0e0; border-radius: 8px; font-size: 14px; transition: border-color 0.3s; outline: none; font-family: inherit; }
.settings-card .form-group input:focus,
.settings-card .form-group textarea:focus,
.settings-card .form-group select:focus { border-color: #1677ff; }
.settings-card textarea { resize: vertical; }

.form-tip { font-size: 12px; color: #999; margin-top: 4px; }
.form-tip.warning { color: #faad14; }
.required { color: #ff4d4f; }

.checkbox-label { display: flex; align-items: center; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; margin-right: 8px; accent-color: #1677ff; }
.checkbox-text { font-size: 14px; color: #333; }

/* ===== 响应式 ===== */
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; padding: 16px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .page-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .pay-container { padding: 30px 20px; }
}
