/* ===== 交易流水弹窗 —— Apple Design System =====
   强调色只用 --wm-blue；浅灰底、8px 圆角、毛玻璃遮罩、无边框。
   前台首页与管理后台共用这一份样式。 */

.wtxn-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    animation: wtxn-fade 0.22s ease;
}

.wtxn-overlay[hidden] { display: none; }

@keyframes wtxn-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wtxn-modal {
    width: 100%;
    max-width: 680px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
    overflow: hidden;
    animation: wtxn-rise 0.24s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes wtxn-rise {
    from { transform: translateY(16px) scale(0.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

/* ===== 头部 ===== */
.wtxn-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 28px 16px;
}

.wtxn-title {
    font-family: var(--font-display, -apple-system, 'SF Pro Display', sans-serif);
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.28px;
    line-height: 1.19;
    color: #1d1d1f;
}

.wtxn-sub {
    margin-top: 3px;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.48);
    font-variant-numeric: tabular-nums;
}

.wtxn-close {
    flex: none;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.19;
    padding: 7px 16px;
    border: none;
    border-radius: 980px;
    background: #f5f5f7;
    color: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.wtxn-close:hover { background: #e8e8ed; }

/* ===== 余额 ===== */
.wtxn-balance {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 28px 16px;
}

.wtxn-balance-item {
    background: #f5f5f7;
    border-radius: 8px;
    padding: 14px 18px;
}

.wtxn-balance-label {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.48);
}

.wtxn-balance-value {
    margin-top: 2px;
    font-family: var(--font-display, -apple-system, 'SF Pro Display', sans-serif);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.28px;
    line-height: 1.1;
    color: #1d1d1f;
    font-variant-numeric: tabular-nums;
}

/* ===== 流水列表 ===== */
.wtxn-list {
    flex: 1;
    min-height: 120px;
    overflow-y: auto;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    -webkit-overflow-scrolling: touch;
}

.wtxn-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 28px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.wtxn-row:last-child { border-bottom: none; }

.wtxn-badge {
    flex: none;
    min-width: 52px;
    text-align: center;
    padding: 5px 10px;
    border-radius: 980px;
    font-size: 13px;
    font-weight: 600;
    background: #f5f5f7;
    color: rgba(0, 0, 0, 0.8);
}

.wtxn-badge.in {
    background: rgba(0, 113, 227, 0.1);
    color: #0071e3;
}

.wtxn-main { flex: 1; min-width: 0; }

.wtxn-remark {
    font-size: 16px;
    letter-spacing: -0.28px;
    color: #1d1d1f;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wtxn-time {
    margin-top: 2px;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.48);
    font-variant-numeric: tabular-nums;
}

.wtxn-delta {
    flex: none;
    text-align: right;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.28px;
    color: rgba(0, 0, 0, 0.48);
    font-variant-numeric: tabular-nums;
}

.wtxn-delta.plus { color: #0071e3; }
.wtxn-delta.minus { color: rgba(0, 0, 0, 0.48); }

.wtxn-delta .wtxn-delta-sub {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.48);
}

.wtxn-empty {
    padding: 48px 28px;
    text-align: center;
    color: rgba(0, 0, 0, 0.48);
    font-size: 16px;
}

/* ===== 分页 ===== */
.wtxn-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 14px 28px 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.wtxn-pager[hidden] { display: none; }

.wtxn-pill {
    font-family: inherit;
    font-size: 15px;
    line-height: 1.19;
    letter-spacing: -0.28px;
    padding: 8px 20px;
    border: none;
    border-radius: 980px;
    background: #f5f5f7;
    color: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.wtxn-pill:disabled { opacity: 0.4; cursor: default; }
.wtxn-pill:not(:disabled):hover { background: #e8e8ed; }

.wtxn-page {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.48);
    font-variant-numeric: tabular-nums;
}

/* ===== 移动端：贴底抽屉 ===== */
@media (max-width: 734px) {
    .wtxn-overlay { padding: 0; align-items: flex-end; }
    .wtxn-modal {
        max-width: none;
        max-height: 92vh;
        border-radius: 8px 8px 0 0;
    }
    .wtxn-head { padding: 18px 20px 12px; }
    .wtxn-balance { padding: 0 20px 14px; gap: 10px; }
    .wtxn-balance-value { font-size: 22px; }
    .wtxn-row { padding: 12px 20px; }
    .wtxn-remark { white-space: normal; }
    .wtxn-pager { padding: 12px 20px 16px; }
}
