/* =========================================================
   KiiChain Pay — 仪表盘样式
   ========================================================= */

/* =========================================================
   布局
   ========================================================= */
.pay-app {
    display: flex;
    min-height: 100vh;
    padding-top: var(--header-h);
    background: var(--bg);
}

/* =========================================================
   侧边栏
   ========================================================= */
.pay-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: #07071a;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    overflow-y: auto;
    transition: width .25s, transform .25s;
}
.pay-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border);
}
.pay-logo img { display: block; height: 26px; }
.pay-sidebar-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px;
}

.pay-nav {
    flex: 1;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pay-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    transition: all .2s;
    white-space: nowrap;
}
.pay-nav-item:hover {
    background: var(--glass);
    color: var(--text);
}
.pay-nav-item.active {
    background: linear-gradient(135deg, rgba(99,102,241,0.25), rgba(139,92,246,0.15));
    color: #fff;
}
.pay-nav-item.danger { color: #ef4444; }
.pay-nav-item.danger:hover { background: rgba(239,68,68,0.12); color: #ef4444; }
.pay-nav-item svg { flex-shrink: 0; opacity: .85; }

.pay-sidebar-footer {
    padding: 12px 10px;
    border-top: 1px solid var(--border);
}

/* =========================================================
   主内容区
   ========================================================= */
.pay-main {
    flex: 1;
    min-width: 0;
    padding: 24px 32px 60px;
    max-width: 1200px;
}

/* Beta 提示条 */
.pay-beta-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #fbbf24;
    flex-wrap: wrap;
}
.pay-beta-tag {
    display: inline-block;
    padding: 2px 10px;
    background: rgba(245,158,11,0.25);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    flex-shrink: 0;
}
.pay-beta-banner a { color: #fbbf24; text-decoration: underline; margin-left: auto; }
.pay-beta-close {
    background: transparent;
    border: none;
    color: #fbbf24;
    cursor: pointer;
    font-size: 16px;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}
.pay-beta-close:hover { background: rgba(245,158,11,0.2); }

/* 顶部栏 */
.pay-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}
.pay-page-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.pay-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 主题切换 */
.pay-theme-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-dim);
    cursor: pointer;
    transition: all .2s;
}
.pay-theme-btn:hover {
    color: var(--text);
    border-color: rgba(99,102,241,0.4);
    background: rgba(99,102,241,0.08);
}

/* 连接钱包按钮 */
.pay-wallet-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all .2s;
    box-shadow: 0 4px 16px rgba(139,92,246,0.3);
    white-space: nowrap;
}
.pay-wallet-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(139,92,246,0.5);
}

/* 用户徽章 */
.pay-user-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 100px;
    cursor: pointer;
    transition: all .2s;
}
.pay-user-badge:hover {
    border-color: rgba(99,102,241,0.4);
    background: rgba(99,102,241,0.08);
}
.pay-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.pay-user-info { display: flex; flex-direction: column; line-height: 1.2; }
.pay-user-name { font-size: 13px; font-weight: 600; color: var(--text); }
.pay-user-email { font-size: 11px; color: var(--text-muted); }
.pay-user-menu-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}
.pay-user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: rgba(15, 15, 36, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all .2s;
}
.pay-user-badge.open .pay-user-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.pay-user-menu a {
    display: block;
    padding: 9px 14px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    border-radius: 8px;
    transition: all .15s;
}
.pay-user-menu a:hover {
    background: rgba(99,102,241,0.12);
    color: var(--text);
}
.pay-user-menu a.danger { color: #ef4444; }
.pay-user-menu a.danger:hover { background: rgba(239,68,68,0.12); }

/* =========================================================
   投资组合（Portfolio）
   ========================================================= */
.pay-portfolio-section {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.pay-portfolio-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}
.pay-portfolio-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pay-portfolio-icon {
    color: var(--accent);
    flex-shrink: 0;
}
.pay-portfolio-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    letter-spacing: -0.01em;
}

/* Toggle 开关 */
.pay-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-dim);
    user-select: none;
}
.pay-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.pay-toggle-slider {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
    background: rgba(255,255,255,0.1);
    border-radius: 100px;
    transition: background .25s;
    flex-shrink: 0;
}
.pay-toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform .25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.pay-toggle input:checked + .pay-toggle-slider {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
}
.pay-toggle input:checked + .pay-toggle-slider::after {
    transform: translateX(16px);
}
.pay-toggle-label { color: var(--text-dim); }

/* 表格容器 */
.pay-portfolio-table-wrap {
    overflow-x: auto;
    margin: 0 -24px;
    padding: 0 24px;
}
.pay-portfolio-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
    table-layout: fixed;
}

/* 表头 */
.pay-portfolio-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0;
    border-bottom: 1px solid var(--border);
    background: transparent;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
}
.pay-portfolio-table thead th.sortable {
    cursor: pointer;
    transition: color .2s;
}
.pay-portfolio-table thead th.sortable:hover {
    color: var(--text);
}
.th-inner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.sort-icons {
    display: inline-flex;
    flex-direction: column;
    gap: 0;
    line-height: 0;
    opacity: .35;
}
.sort-icons svg { display: block; }
.pay-portfolio-table thead th.sortable:hover .sort-icons { opacity: .6; }

/* 列宽 */
.col-expand   { width: 40px; }
.col-token    { width: 30%; }
.col-type     { width: 15%; }
.col-stable   { width: 12%; }
.col-price    { width: 20%; text-align: right !important; }
.col-balance  { width: 23%; text-align: right !important; }

.pay-portfolio-table thead th.col-price .th-inner,
.pay-portfolio-table thead th.col-balance .th-inner {
    display: inline-flex;
    justify-content: flex-end;
    width: 100%;
}

/* 行 */
.pay-portfolio-row {
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}
.pay-portfolio-row:last-child { border-bottom: none; }
.pay-portfolio-row:hover { background: rgba(255,255,255,0.02); }
.pay-portfolio-row.is-zero { opacity: .8; }

.pay-portfolio-row td {
    padding: 16px;
    font-size: 13px;
    vertical-align: middle;
}

/* 展开按钮 */
.col-expand { padding-left: 8px !important; padding-right: 4px !important; }
.pay-row-expand {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: all .2s;
}
.pay-row-expand:hover {
    color: var(--text);
    background: rgba(255,255,255,0.05);
}

/* 代币单元格 */
.pay-token-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pay-token-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.08);
    letter-spacing: -0.5px;
}
/* 各代币颜色 */
.pay-token-icon.token-kii   { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.pay-token-icon.token-wbtc  { background: linear-gradient(135deg, #f7931a, #c2410c); }
.pay-token-icon.token-btcb  { background: linear-gradient(135deg, #f0b90b, #d97706); }
.pay-token-icon.token-copm  { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.pay-token-icon.token-eth   { background: linear-gradient(135deg, #627eea, #4a68d6); }
.pay-token-icon.token-bnb   { background: linear-gradient(135deg, #f3ba2f, #d99a15); }
.pay-token-icon.token-brla  { background: linear-gradient(135deg, #10b981, #059669); }
.pay-token-icon.token-usdt  { background: linear-gradient(135deg, #26a17b, #1a7a5c); }
.pay-token-icon.token-usdc  { background: linear-gradient(135deg, #2775ca, #1e5fa3); }
.pay-token-icon.token-eurc  { background: linear-gradient(135deg, #2775ca, #1e5fa3); }
.pay-token-icon.token-trx   { background: linear-gradient(135deg, #ef4444, #b91c1c); }

.pay-token-info { min-width: 0; }
.pay-token-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.pay-token-symbol {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: 2px;
}

/* 类型徽章 */
.pay-type-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(99,102,241,0.15);
    color: #818cf8;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.5;
}
.pay-type-badge.type-stable  { background: rgba(16,185,129,0.15); color: #34d399; }
.pay-type-badge.type-native  { background: rgba(99,102,241,0.15); color: #818cf8; }
.pay-type-badge.type-wrapped { background: rgba(245,158,11,0.15); color: #fbbf24; }
.pay-type-badge.type-fiat    { background: rgba(34,211,238,0.15); color: #22d3ee; }

/* 稳定的 */
.pay-stable-text {
    font-size: 13px;
    color: var(--text-dim);
}
.pay-stable-text.yes { color: var(--success); }

/* 价格 */
.pay-price-value {
    font-size: 14px;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
}

/* 余额 */
.pay-portfolio-row .pay-balance-cell {
    text-align: right;
}
.pay-balance-amount {
    font-size: 14px;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.3;
}
.pay-balance-usd {
    font-size: 12px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    margin-top: 2px;
}

/* =========================================================
   表单卡片
   ========================================================= */
.pay-form-card,
.pay-activity-card,
.pay-leaderboard-card,
.pay-quests-card,
.pay-settings-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    max-width: 560px;
}
.pay-activity-card,
.pay-leaderboard-card,
.pay-settings-card { max-width: 800px; }

.pay-form-card h2,
.pay-activity-card h2,
.pay-leaderboard-card h2,
.pay-quests-card h2,
.pay-settings-card h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    margin-bottom: 8px;
}
.pay-form-desc {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.7;
}

.pay-form-group { margin-bottom: 18px; }
.pay-form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 6px;
}
.pay-input,
.pay-select {
    width: 100%;
    padding: 12px 14px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    transition: border-color .2s;
}
.pay-input:focus,
.pay-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.pay-form-hint {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 6px;
}

/* 按钮 */
.pay-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all .25s;
    width: 100%;
    margin-top: 8px;
}
.pay-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    box-shadow: 0 4px 18px rgba(99,102,241,0.3);
}
.pay-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(99,102,241,0.5);
}
.pay-btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.pay-btn-outline:hover {
    background: var(--glass);
    border-color: var(--primary);
}
.pay-btn-danger {
    background: rgba(239,68,68,0.12);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.3);
}
.pay-btn-danger:hover { background: rgba(239,68,68,0.25); }
.pay-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none !important;
}

/* =========================================================
   互换
   ========================================================= */
.pay-swap-box {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}
.pay-swap-side {
    padding: 16px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.pay-swap-side label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.pay-swap-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.pay-swap-input-row .pay-input { flex: 1; }
.pay-select-token {
    width: auto;
    min-width: 100px;
    flex-shrink: 0;
}
.pay-swap-direction {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-2);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all .2s;
}
.pay-swap-direction:hover {
    border-color: var(--primary);
    background: rgba(99,102,241,0.15);
    transform: translate(-50%, -50%) rotate(180deg);
}
.pay-swap-info {
    padding: 14px 16px;
    background: rgba(0,0,0,0.15);
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 13px;
}
.pay-swap-info-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    color: var(--text-dim);
}
.pay-swap-info-row span:last-child { color: var(--text); font-weight: 500; }

/* =========================================================
   活动
   ========================================================= */
.pay-activity-list { display: flex; flex-direction: column; }
.pay-activity-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.pay-activity-row:last-child { border-bottom: none; }
.pay-activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}
.pay-activity-icon.deposit    { background: rgba(16,185,129,0.15); color: #10b981; }
.pay-activity-icon.withdrawal { background: rgba(239,68,68,0.15);  color: #ef4444; }
.pay-activity-icon.swap       { background: rgba(99,102,241,0.15); color: #818cf8; }
.pay-activity-info { flex: 1; min-width: 0; }
.pay-activity-info strong { display: block; font-size: 14px; }
.pay-activity-info small  { color: var(--text-muted); font-size: 12px; }
.pay-activity-meta { text-align: right; }
.pay-activity-amount { font-weight: 600; font-size: 14px; }
.pay-activity-time   { color: var(--text-muted); font-size: 11px; }
.pay-activity-status {
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}
.pay-activity-status.pending   { background: rgba(245,158,11,0.15); color: #fbbf24; }
.pay-activity-status.completed { background: rgba(16,185,129,0.15); color: #10b981; }
.pay-activity-status.failed    { background: rgba(239,68,68,0.15);  color: #ef4444; }

/* =========================================================
   排行榜
   ========================================================= */
.pay-leaderboard-list { display: flex; flex-direction: column; }
.pay-leaderboard-row {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    transition: background .2s;
}
.pay-leaderboard-row:last-child { border-bottom: none; }
.pay-leaderboard-row:hover { background: rgba(255,255,255,0.02); }
.pay-leaderboard-row.top-1 { background: rgba(255,215,0,0.06); }
.pay-leaderboard-row.top-2 { background: rgba(192,192,192,0.05); }
.pay-leaderboard-row.top-3 { background: rgba(205,127,50,0.05); }
.pay-rank {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: var(--text-muted);
}
.top-1 .pay-rank { color: #ffd700; }
.top-2 .pay-rank { color: #c0c0c0; }
.top-3 .pay-rank { color: #cd7f32; }
.pay-addr { font-size: 14px; color: var(--text-dim); }
.pay-oro  { font-family: 'JetBrains Mono', monospace; font-weight: 600; color: var(--accent); }

/* =========================================================
   空状态
   ========================================================= */
.pay-empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}
.pay-empty-icon { font-size: 40px; margin-bottom: 12px; opacity: .6; }
.pay-empty-state p { font-size: 15px; margin-bottom: 6px; }
.pay-empty-state small { font-size: 13px; }

/* =========================================================
   个人资料
   ========================================================= */
.pay-profile-info { display: flex; flex-direction: column; }
.pay-profile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    gap: 12px;
}
.pay-profile-row:last-child { border-bottom: none; }
.pay-profile-row span:first-child { color: var(--text-muted); flex-shrink: 0; }
.pay-profile-row span:last-child  { color: var(--text); font-weight: 500; text-align: right; word-break: break-all; }

/* =========================================================
   设置
   ========================================================= */
.pay-settings-section {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}
.pay-settings-section:last-child { border-bottom: none; }
.pay-settings-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}
.pay-settings-section p {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 12px;
}
.pay-settings-section .pay-btn { width: auto; margin-top: 0; }
.pay-settings-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.pay-settings-actions .pay-btn { width: auto; margin-top: 0; }
.pay-danger-section {
    border-top: 1px solid rgba(239,68,68,0.2);
    margin-top: 8px;
    padding-top: 24px;
}
.pay-user-center-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    max-width: 800px;
}
.pay-user-center-card h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    margin-bottom: 24px;
}
.pay-kyc-status {
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
}
.pay-kyc-status.not_started { background: rgba(100,116,139,0.2); color: #94a3b8; }
.pay-kyc-status.pending    { background: rgba(245,158,11,0.15); color: #fbbf24; }
.pay-kyc-status.verified   { background: rgba(16,185,129,0.15); color: #10b981; }
.pay-kyc-status.rejected   { background: rgba(239,68,68,0.15);  color: #ef4444; }

/* =========================================================
   响应式（移动端）
   ========================================================= */

/* 平板 900px */
@media (max-width: 900px) {
    .pay-sidebar {
        position: fixed;
        left: 0;
        top: var(--header-h);
        z-index: 90;
        transform: translateX(-100%);
        box-shadow: 4px 0 30px rgba(0,0,0,0.5);
        width: 260px;
    }
    .pay-sidebar.open { transform: translateX(0); }
    .pay-sidebar-toggle { display: block; }
    .pay-main { padding: 20px 18px 60px; max-width: 100%; }
    .pay-portfolio-section { padding: 18px; }
    .pay-portfolio-title   { font-size: 18px; }
}

/* 手机 768px */
@media (max-width: 768px) {
    .pay-main { padding: 16px 12px 60px; }

    /* 顶部栏 */
    .pay-topbar {
        margin-bottom: 16px;
        gap: 10px;
    }
    .pay-page-title { font-size: 20px; }
    .pay-theme-btn {
        width: 34px;
        height: 34px;
    }
    .pay-wallet-btn {
        padding: 8px 14px;
        font-size: 12px;
    }
    .pay-user-info { display: none; }
    .pay-user-badge {
        padding: 4px 8px 4px 4px;
    }

    /* 投资组合标题区 */
    .pay-portfolio-section { padding: 16px; }
    .pay-portfolio-header {
        flex-direction: row;
        align-items: center;
        margin-bottom: 16px;
        gap: 10px;
    }
    .pay-portfolio-title   { font-size: 17px; }
    .pay-portfolio-icon    { width: 18px; height: 18px; }
    .pay-toggle            { font-size: 12px; }
    .pay-toggle-slider     { width: 34px; height: 20px; }
    .pay-toggle-slider::after { width: 14px; height: 14px; }
    .pay-toggle input:checked + .pay-toggle-slider::after { transform: translateX(14px); }

    /* 投资组合表格 → 卡片式 */
    .pay-portfolio-table-wrap {
        overflow-x: visible;
        margin: 0;
        padding: 0;
    }
    .pay-portfolio-table {
        min-width: auto;
        table-layout: auto;
    }
    .pay-portfolio-table thead { display: none; }

    .pay-portfolio-table tbody,
    .pay-portfolio-table tr,
    .pay-portfolio-table td {
        display: block;
        width: 100%;
    }
    .pay-portfolio-row {
        background: rgba(255,255,255,0.02);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 14px;
        margin-bottom: 10px;
        position: relative;
        border-bottom: 1px solid var(--border) !important;
    }
    .pay-portfolio-row:last-child { margin-bottom: 0; }

    .pay-portfolio-table td {
        padding: 0;
        border: none;
    }

    /* 隐藏展开按钮列 */
    .col-expand { display: none !important; }

    /* 代币行 */
    .col-token {
        display: block;
        margin-bottom: 12px;
        padding-right: 0 !important;
    }
    .pay-token-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    .pay-token-name { font-size: 15px; }

    /* 类型 / 稳定的 → 一横排展示 */
    .col-type,
    .col-stable {
        display: inline-block;
        width: auto !important;
        margin-right: 10px;
        margin-bottom: 10px;
    }
    .col-type::before,
    .col-stable::before {
        content: attr(data-label);
        display: inline-block;
        font-size: 11px;
        color: var(--text-muted);
        margin-right: 6px;
        text-transform: none;
    }

    /* 价格 → 显示在代币下方 */
    .col-price {
        display: block !important;
        text-align: left !important;
        margin-bottom: 8px;
        width: 100% !important;
    }
    .col-price::before {
        content: '价格：';
        font-size: 12px;
        color: var(--text-muted);
        margin-right: 8px;
    }
    .pay-price-value { font-size: 14px; }

    /* 余额 → 显示在右下 */
    .col-balance {
        display: block !important;
        text-align: right !important;
        width: 100% !important;
    }
    .pay-balance-cell {
        display: inline-flex;
        flex-direction: column;
        align-items: flex-end;
    }
    .pay-balance-amount { font-size: 15px; }
    .pay-balance-usd    { font-size: 12px; }

    /* 表单卡片 */
    .pay-form-card,
    .pay-activity-card,
    .pay-leaderboard-card,
    .pay-quests-card,
    .pay-settings-card,
    .pay-user-center-card {
        padding: 20px;
        max-width: 100%;
    }
    .pay-form-card h2,
    .pay-activity-card h2,
    .pay-leaderboard-card h2,
    .pay-quests-card h2,
    .pay-settings-card h2,
    .pay-user-center-card h2 {
        font-size: 18px;
    }

    /* 活动行 */
    .pay-activity-row {
        flex-wrap: wrap;
        gap: 10px;
    }
    .pay-activity-info { flex: 1 1 100%; }
    .pay-activity-meta { text-align: left; }
    .pay-activity-status { margin-left: auto; }

    /* 排行榜 */
    .pay-leaderboard-row {
        grid-template-columns: 36px 1fr auto;
        padding: 12px;
        gap: 8px;
    }
    .pay-rank { font-size: 16px; }
    .pay-addr { font-size: 12px; }
    .pay-oro  { font-size: 13px; }

    /* 个人资料 */
    .pay-profile-row { font-size: 13px; }

    /* 设置按钮 */
    .pay-settings-actions { flex-direction: column; }
    .pay-settings-actions .pay-btn { width: 100%; }
}

/* 小屏 480px */
@media (max-width: 480px) {
    .pay-main { padding: 12px 10px 60px; }
    .pay-page-title { font-size: 18px; }
    .pay-theme-btn  { display: none; }
    .pay-portfolio-section { padding: 14px; }
    .pay-portfolio-title   { font-size: 16px; }
    .pay-token-name { font-size: 14px; }
    .pay-token-icon { width: 32px; height: 32px; font-size: 13px; }

    .pay-form-card,
    .pay-activity-card,
    .pay-leaderboard-card,
    .pay-quests-card,
    .pay-settings-card,
    .pay-user-center-card { padding: 16px; }

    .pay-btn { padding: 10px 18px; font-size: 13px; }
}
/* =========================================================
   Pay 移动端侧边栏优化（完整展示所有菜单项）
   ========================================================= */
@media (max-width: 900px) {
    /* 侧边栏：全高抽屉 */
    .pay-sidebar {
        position: fixed !important;
        top: var(--header-h) !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 280px !important;
        max-width: 85vw !important;
        height: auto !important;
        transform: translateX(-100%);
        transition: transform .28s cubic-bezier(.4, 0, .2, 1);
        z-index: 999 !important;
        box-shadow: 4px 0 40px rgba(0,0,0,0.6);
        overflow-y: auto !important;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        display: flex;
        flex-direction: column;
    }
    .pay-sidebar.open {
        transform: translateX(0);
    }

    .pay-sidebar-toggle {
        display: block !important;
        color: var(--text);
    }

    /* 侧边栏头部固定 */
    .pay-sidebar-header {
        padding: 16px 18px;
        flex-shrink: 0;
    }

    /* 导航可滚动、完整显示 */
    .pay-nav {
        flex: 1;
        padding: 12px 10px 20px;
        display: flex;
        flex-direction: column;
        gap: 2px;
        overflow-y: auto;
    }

    .pay-nav-item {
        padding: 12px 14px;
        font-size: 15px;
        border-radius: 10px;
    }
    .pay-nav-item svg {
        width: 18px;
        height: 18px;
    }

    /* 底部固定 */
    .pay-sidebar-footer {
        flex-shrink: 0;
        padding: 12px 10px 20px;
        border-top: 1px solid var(--border);
        background: #07071a;
        position: sticky;
        bottom: 0;
    }

    /* 遮罩层 */
    .pay-sidebar-overlay {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.6);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s, visibility .25s;
    }
    .pay-sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    /* 主内容区 padding 减小 */
    .pay-main {
        padding: 16px 14px 80px !important;
        max-width: 100% !important;
    }

    /* 顶部栏 */
    .pay-topbar {
        margin-bottom: 16px;
        gap: 10px;
    }
    .pay-page-title { font-size: 20px; }

    /* 侧边栏切换按钮（汉堡）显示 */
    .pay-sidebar-toggle {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: rgba(255,255,255,0.03);
        border: 1px solid var(--border);
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .pay-sidebar {
        width: 260px !important;
    }
    .pay-nav-item {
        padding: 11px 12px;
        font-size: 14px;
    }
}