/* 全局样式 */
:root {
    --primary-color: #008080;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --light-text: #fff;
    --border-color: #ddd;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --border-radius: 4px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 200px;
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    box-shadow: var(--shadow);
    z-index: 100;
}

.sidebar-header {
    text-align: center;
    padding: 10px;
    margin-bottom: 20px;
}

.sidebar-header img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.sidebar-header h3 {
    font-size: 16px;
    margin-top: 5px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--light-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--light-text);
}

.sidebar-menu i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    margin-left: 200px;
    padding: 20px;
    transition: all 0.3s ease;
}

/* 卡片样式 */
.card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    background-color: var(--primary-color);
    color: var(--light-text);
    font-weight: bold;
}

.card-body {
    padding: 20px;
}

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

.stat-card {
    flex: 1;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin: 0 10px;
    text-align: center;
    position: relative;
}

.stat-card:first-child {
    margin-left: 0;
}

.stat-card:last-child {
    margin-right: 0;
}

.stat-card h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.stat-card p {
    color: #777;
    font-size: 14px;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    background-color: var(--primary-color);
    color: var(--light-text);
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tr:hover {
    background-color: #f1f1f1;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 128, 128, 0.2);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: var(--light-text);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 14px;
}

.btn:hover {
    opacity: 0.9;
}

.btn-success {
    background-color: var(--success-color);
}

.btn-danger {
    background-color: var(--danger-color);
}

.btn-warning {
    background-color: var(--warning-color);
    color: var(--text-color);
}

.btn-info {
    background-color: var(--info-color);
}

/* 图表容器 */
.chart-container {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}

/* 登录页面 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f5f5f5;
}

.login-form {
    width: 400px;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

/* 提示信息 */
.alert {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination a {
    color: var(--primary-color);
    padding: 8px 16px;
    text-decoration: none;
    border: 1px solid var(--border-color);
    margin: 0 4px;
    border-radius: var(--border-radius);
}

.pagination a.active {
    background-color: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

.pagination a:hover:not(.active) {
    background-color: #ddd;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
        overflow: hidden;
    }
    
    .sidebar-header h3 {
        display: none;
    }
    
    .sidebar-menu span {
        display: none;
    }
    
    .main-content {
        margin-left: 70px;
    }
    
    .stats-container {
        flex-direction: column;
    }
    
    .stat-card {
        margin: 10px 0;
    }
}

/* 日历样式 */
.calendar {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    border: 1px solid var(--border-color);
    padding: 10px;
    min-height: 80px;
    position: relative;
}

.calendar-day-header {
    text-align: center;
    font-weight: bold;
    padding: 5px;
    background-color: var(--primary-color);
    color: var(--light-text);
}

.calendar-day-number {
    position: absolute;
    top: 5px;
    right: 5px;
    font-weight: bold;
}

.calendar-event {
    background-color: rgba(0, 128, 128, 0.1);
    border-left: 3px solid var(--primary-color);
    padding: 3px 5px;
    margin-top: 5px;
    font-size: 12px;
    border-radius: 2px;
}

/* 排序和过滤 */
.filter-container {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-form {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.filter-group {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.filter-group label {
    margin-right: 10px;
}

.sort-header {
    cursor: pointer;
}

.sort-header:after {
    content: '\f0dc';
    font-family: 'Font Awesome 5 Free';
    margin-left: 5px;
    opacity: 0.5;
}

.sort-header.asc:after {
    content: '\f0de';
    opacity: 1;
}

.sort-header.desc:after {
    content: '\f0dd';
    opacity: 1;
} 

/* 收入/支出标签样式 */
.income-label {
    display: inline-block;
    padding: 2px 10px;
    background-color: var(--success-color);
    color: #fff;
    border-radius: 12px;
    font-weight: bold;
    font-size: 14px;
}
.expense-label {
    display: inline-block;
    padding: 2px 10px;
    background-color: var(--danger-color);
    color: #fff;
    border-radius: 12px;
    font-weight: bold;
    font-size: 14px;
} 