/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', 'SimHei', Arial, sans-serif;
    background-color: #f5f5f5;
}

/* 侧边栏样式 */
.sidebar {
    background-color: #fff;
    padding: 20px;
    min-height: calc(100vh - 100px);
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar .nav-link {
    color: #333;
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 5px;
    transition: all 0.3s;
}

.sidebar .nav-link:hover {
    background-color: #e9ecef;
    color: #0d6efd;
}

.sidebar .nav-link.active {
    background-color: #0d6efd;
    color: #fff;
}

.sidebar .nav-link i {
    margin-right: 8px;
}

/* 模块内容样式 */
.module-content {
    padding: 20px;
}

.card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: none;
    margin-bottom: 20px;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

/* 表格样式 */
.table {
    font-size: 14px;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
}

.table td {
    text-align: center;
    vertical-align: middle;
}

.table input[type="number"],
.table input[type="text"] {
    width: 100%;
    border: 1px solid #ced4da;
    padding: 5px;
    text-align: center;
    border-radius: 3px;
}

.table input[type="number"]:focus,
.table input[type="text"]:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.table tfoot th {
    background-color: #fff3cd;
    font-weight: bold;
}

.table tfoot tr.table-danger th {
    background-color: #f8d7da;
    color: #721c24;
}

.table tfoot tr.table-warning th {
    background-color: #fff3cd;
    color: #856404;
}

.table tfoot tr.table-info th {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* 投资预算表格特殊样式 */
.investment-category {
    background-color: #e7f3ff;
    font-weight: bold;
}

.investment-item {
    background-color: #fff;
}

.investment-item:hover {
    background-color: #f8f9fa;
}

/* 数字显示样式 */
.text-danger {
    font-weight: bold;
    font-size: 1.1em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
        margin-bottom: 20px;
    }
    
    .table {
        font-size: 12px;
    }
    
    .table input[type="number"],
    .table input[type="text"] {
        font-size: 12px;
        padding: 3px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,.1);
    border-radius: 50%;
    border-top-color: #0d6efd;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 提示信息 */
.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* 按钮样式增强 */
.btn {
    border-radius: 5px;
    padding: 8px 16px;
    font-weight: 500;
}

.btn i {
    margin-right: 5px;
}

/* 输入框组样式 */
.input-group {
    margin-bottom: 15px;
}

.input-group label {
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
}

/* 折叠面板样式 */
.collapse-header {
    cursor: pointer;
    padding: 10px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    margin-bottom: 10px;
    transition: background-color 0.3s;
}

.collapse-header:hover {
    background-color: #e9ecef;
}

.collapse-header i {
    margin-right: 8px;
    transition: transform 0.3s;
}

.collapse-header.collapsed i {
    transform: rotate(-90deg);
}

.collapse-content {
    padding: 10px;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 5px 5px;
    background-color: #fff;
}

