/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
    -webkit-tap-highlight-color: transparent;
}

/* 页面容器 */
#app {
    min-height: 100vh;
    padding-bottom: 50px;
}

/* 页面通用样式 */
.page {
    display: none;
    padding: 15px;
}

.page.active {
    display: block;
}

/* 顶部banner */
.top-banner {
    width: 100%;
    height: auto;
    margin-bottom: 15px;
}

/* 统计卡片容器 */
.stats-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 10px;
}

/* 统计卡片 */
.stat-card {
    flex: 1;
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #999;
}

/* 快捷入口容器 */
.quick-actions {
    display: flex;
    justify-content: space-around;
    background-color: #fff;
    border-radius: 8px;
    padding: 20px 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 快捷入口项 */
.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.action-item:hover {
    background-color: #f0f0f0;
}

.action-item img {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
}

.action-item span {
    font-size: 12px;
    color: #333;
}

/* 最近记录容器 */
.recent-records {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 区块标题 */
.section-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

/* 记录列表 */
.record-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 记录项 */
.record-item {
    padding: 12px;
    border-radius: 6px;
    background-color: #fafafa;
    border-left: 4px solid #4CAF50;
}

.record-type {
    font-size: 12px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 8px;
    display: inline-block;
}

.record-type.balance {
    background-color: #e8f5e8;
    color: #4CAF50;
}

.record-type.countcard {
    background-color: #e3f2fd;
    color: #2196F3;
}

.record-info {
    margin-bottom: 8px;
}

.record-info .member {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    display: block;
    margin-bottom: 4px;
}

.record-info .staff {
    font-size: 12px;
    color: #666;
    display: block;
    margin-bottom: 4px;
}

.record-info .amount {
    font-size: 14px;
    font-weight: bold;
    color: #ff6b6b;
}

.record-extra {
    font-size: 12px;
    color: #999;
}

.record-extra .remark {
    display: block;
    margin-bottom: 4px;
}

.record-extra .record-time {
    font-size: 11px;
}

/* 底部导航栏 */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 50px;
    background-color: #fff;
    border-top: 1px solid #f0f0f0;
    z-index: 1000;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-item.active {
    color: #4CAF50;
}

.tab-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

.tab-item span {
    font-size: 10px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.form-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background-color: #fff;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background-color: #4CAF50;
    color: #fff;
}

.btn-primary:hover {
    background-color: #45a049;
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

.btn-danger {
    background-color: #ff6b6b;
    color: #fff;
}

.btn-danger:hover {
    background-color: #ee5a5a;
}

/* 列表样式 */
.list-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.list-item:hover {
    background-color: #f9f9f9;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item-info {
    flex: 1;
}

.list-item-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.list-item-desc {
    font-size: 12px;
    color: #666;
}

.list-item-actions {
    display: flex;
    gap: 10px;
}

/* 顶部导航栏 */
.header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 0 15px;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.header-back {
    cursor: pointer;
}

.header-back img {
    width: 24px;
    height: 24px;
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.empty-state img {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
}

.empty-state-text {
    font-size: 14px;
    color: #999;
}

/* 响应式设计 */
@media (max-width: 375px) {
    .stats-container {
        gap: 8px;
    }
    
    .stat-card {
        padding: 10px;
    }
    
    .stat-value {
        font-size: 16px;
    }
    
    .action-item img {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 320px) {
    .quick-actions {
        padding: 15px 5px;
    }
    
    .action-item span {
        font-size: 11px;
    }
}