/* 财务统计卡片样式 */
.finance-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 0 20px;
}

.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.stat-icon i {
    font-size: 24px;
    color: #fff;
}

.stat-icon.income {
    background-color: #4CAF50;
}

.stat-icon.expense {
    background-color: #f44336;
}

.stat-icon.balance {
    background-color: #2196F3;
}

.stat-info h3 {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.stat-info p {
    margin: 5px 0 0;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* 财务管理区域样式 */
.finance-management {
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0 20px;
}

/* 搜索和筛选区域样式 */
.search-filter {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-box {
    display: flex;
    gap: 10px;
}

.filter-box select,
.filter-box input[type="month"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
}

/* 财务表格样式 */
.finance-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.finance-table th,
.finance-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.finance-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.finance-table tr:hover {
    background-color: #f9f9f9;
}

/* 金额样式 */
.amount {
    font-weight: 600;
}

.amount.income {
    color: #4CAF50;
}

.amount.expense {
    color: #f44336;
}

/* 操作按钮样式 */
.action-buttons {
    display: flex;
    gap: 8px;
}

.action-buttons button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-edit {
    background-color: #2196F3;
    color: white;
}

.btn-delete {
    background-color: #f44336;
    color: white;
}

/* 模态框样式 */
.modal {
    display: none;  /* 默认隐藏 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

/* 显示模态框时的样式 */
.modal.show {
    display: flex;
}

.modal-content {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eef2f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8fafc;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #1a1a1a;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

.modal-body {
    padding: 24px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4b5563;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    transition: all 0.2s ease;
    background-color: #f8fafc;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
    background-color: #fff;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eef2f6;
}

.form-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #2196F3;
    color: white;
}

.btn-primary:hover {
    background-color: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.btn-secondary {
    background-color: #f1f5f9;
    color: #475569;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

/* 响应式调整 */
@media (max-width: 640px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .form-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .form-actions button {
        width: 100%;
    }
}

/* 响应式布局 */
@media (max-width: 768px) {
    .finance-stats {
        grid-template-columns: 1fr;
    }
    
    .search-filter {
        flex-direction: column;
    }
    
    .filter-box {
        width: 100%;
    }
    
    .finance-table {
        display: block;
        overflow-x: auto;
    }
} 