/* 公共样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f7f8fa;
    font-size: 14px;
    color: #323233;
    padding-bottom: 50px;
}

/* 固定导航栏 - 页面顶部的主导航栏固定 */
#app > .van-nav-bar:first-child {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: #fff !important;
}

/* 有固定导航栏的页面需要顶部补白 */
.has-navbar,
#app:has(> .van-nav-bar:first-child) {
    padding-top: 46px;
}

/* 主题色 */
:root {
    --primary-color: #667eea;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-color: #07c160;
    --danger-color: #ee0a24;
    --warning-color: #ff976a;
}

/* 文字颜色 */
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }
.text-gray { color: #969799; }

/* 顶部渐变背景 */
.header-gradient {
    background: var(--primary-gradient);
    color: #fff;
    padding: 20px 15px;
}

/* 卡片样式 */
.card {
    background: #fff;
    border-radius: 8px;
    margin: 10px 15px;
    padding: 15px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

/* 统计数据 */
.stat-row {
    display: flex;
    justify-content: space-around;
    text-align: center;
    padding: 15px 0;
}

.stat-item .value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.stat-item .label {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* 金额显示 */
.amount {
    font-family: 'DIN Alternate', 'Helvetica Neue', Arial, sans-serif;
    font-weight: bold;
}

.amount-lg {
    font-size: 32px;
}

/* 按钮样式 */
.btn-gradient {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-size: 16px;
}

/* 底部安全区域 */
.safe-area-bottom {
    padding-bottom: constant(safe-area-inset-bottom);
    padding-bottom: env(safe-area-inset-bottom);
}

/* 列表项样式 */
.list-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #fff;
    border-bottom: 1px solid #ebedf0;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item .icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 20px;
}

.list-item .content {
    flex: 1;
}

.list-item .title {
    font-size: 15px;
    color: #323233;
}

.list-item .desc {
    font-size: 12px;
    color: #969799;
    margin-top: 4px;
}

.list-item .right {
    text-align: right;
}

/* 空状态 */
.empty-box {
    text-align: center;
    padding: 50px 0;
    color: #969799;
}

.empty-box .icon {
    font-size: 60px;
    color: #dcdee0;
}

.empty-box .text {
    margin-top: 15px;
    font-size: 14px;
}

/* 标签 */
.tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 4px;
}

.tag-primary {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
}

.tag-success {
    background: rgba(7, 193, 96, 0.1);
    color: var(--success-color);
}

.tag-danger {
    background: rgba(238, 10, 36, 0.1);
    color: var(--danger-color);
}

/* 加载中 */
.loading-box {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}
