* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Microsoft YaHei', sans-serif; background-color: #ecf0f1; }

.top-bar {
    height: 50px;
    background-color: #2c3e50;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}
.top-bar .title { font-size: 16px; font-weight: bold; }
.top-bar .user-info { font-size: 14px; }

.container { display: flex; height: calc(100vh - 50px); }

.sidebar {
    width: 160px;
    background-color: #34495e;
    color: white;
    overflow-y: auto;
}
.menu-group { margin-bottom: 5px; }
.menu-title {
    padding: 12px 15px;
    background-color: #34495e;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 14px;
    transition: background-color 0.3s;
}
.menu-title:hover { background-color: #2c3e50; }
.menu-title.active { background-color: #1abc9c; }
.menu-title .icon { margin-right: 8px; font-size: 12px; }
.sub-menu {
    background-color: #2c3e50;
    display: none;
}
.sub-menu.active { display: block; }
.sub-menu-item {
    padding: 10px 15px 10px 40px;
    cursor: pointer;
    font-size: 13px;
    color: #bdc3c7;
    transition: background-color 0.3s;
}
.sub-menu-item:hover { background-color: #1abc9c; color: white; }
.sub-menu-item.active { background-color: #16a085; color: white; }

.content-area {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}
.content-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}
.content-header h1 {
    font-size: 24px;
    color: #2c3e50;
}
.content-header .breadcrumb {
    font-size: 13px;
    color: #7f8c8d;
    margin-top: 5px;
}

.panel {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}
.panel-title {
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}
.btn-primary {
    background-color: #3498db;
    color: white;
}
.btn-primary:hover { background-color: #2980b9; }
.btn-success {
    background-color: #2ecc71;
    color: white;
}
.btn-success:hover { background-color: #27ae60; }
.btn-danger {
    background-color: #e74c3c;
    color: white;
}
.btn-danger:hover { background-color: #c0392b; }

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.table th, .table td {
    padding: 6px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #2c3e50;
}
.table tr:hover { background-color: #f8f9fa; }

.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
}
.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}
.form-control:focus {
    outline: none;
    border-color: #3498db;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
}
.stat-card .value { font-size: 32px; font-weight: bold; }
.stat-card .label { font-size: 14px; opacity: 0.9; }

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal.active { display: flex; }
.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 550px;
}
.modal-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.modal-header h2 { font-size: 18px; color: #2c3e50; }

.flex-end { display: flex; justify-content: flex-end; gap: 10px; }

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.search-bar input { flex: 1; }

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}
.pagination button {
    padding: 6px 12px;
    margin: 0 5px;
    border: 1px solid #ddd;
    background-color: white;
    cursor: pointer;
    border-radius: 4px;
}
.pagination button.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

/* 资金状况页面特殊样式 */
.content-area.cash-position {
    background-color: #f5f5f5;
}

.tool-bar {
    background-color: #ecf0f1;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-radius: 4px;
}
.tool-bar .title {
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
}
.tool-bar .actions {
    display: flex;
    gap: 10px;
}

.btn-refresh {
    background-color: #1abc9c;
    color: white;
}
.btn-refresh:hover { background-color: #16a085; }
.btn-refresh:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}
.btn-export-excel {
    background-color: #3498db;
    color: white;
}
.btn-export-excel:hover { background-color: #2980b9; }
.btn-export-ppt {
    background-color: #9b59b6;
    color: white;
}
.btn-export-ppt:hover { background-color: #8e44ad; }

.period-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}
.period-selector label {
    font-size: 14px;
    color: #2c3e50;
}
.period-selector select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px;
    color: #7f8c8d;
    font-size: 16px;
}
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1abc9c;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.section-header {
    background-color: #34495e;
    color: white;
    padding: 10px 15px;
    margin: 20px 0 10px 0;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
}

.table-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 15px;
    overflow: hidden;
}
.table-header {
    padding: 12px 15px;
    background-color: #ffffff;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}
.table-header .table-title {
    font-size: 14px;
    font-weight: bold;
    color: #2980b9;
}
.table-header .table-title.analysis {
    color: #e67e22;
}
.table-header .table-title.ck-project {
    color: #27ae60;
}
.table-header .table-title.ssb-project {
    color: #8e44ad;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.data-table th, .data-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}
.data-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #2c3e50;
    white-space: nowrap;
}
.data-table th:first-child {
    width: 160px;
}
.data-table td {
    color: #34495e;
}
.data-table tr:hover td {
    background-color: #fafafa;
}
.data-table tr.even td {
    background-color: #ffffff;
}
.data-table tr.odd td {
    background-color: #f9f9f9;
}
.data-table tr.total td {
    background-color: #e8f6f3;
    font-weight: bold;
}
.data-table tr.total-analysis td {
    background-color: #fdf2e9;
    font-weight: bold;
}
.data-table td.right-align {
    text-align: right;
}

.analysis-table th:first-child {
    width: 150px;
}
.analysis-table th:nth-child(2), .analysis-table td:nth-child(2) {
    width: 100px;
    text-align: right;
}
.analysis-table th:nth-child(3), .analysis-table td:nth-child(3) {
    width: 80px;
    text-align: right;
}
.analysis-table th:nth-child(4), .analysis-table td:nth-child(4) {
    width: 110px;
    text-align: right;
}
.analysis-table th:nth-child(5), .analysis-table td:nth-child(5) {
    width: 80px;
    text-align: right;
}

.divider {
    height: 2px;
    background-color: #bdc3c7;
    margin: 25px 0;
}