/* 全局样式 */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --text-color: #333;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #e1e1e1;
    margin-bottom: 20px;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: 700;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info span {
    margin-right: 15px;
    font-weight: 500;
}

.logout-btn {
    color: var(--danger-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.logout-btn:hover {
    opacity: 0.8;
}

/* 导航样式 */
.main-nav {
    margin-bottom: 30px;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav li {
    flex: 1;
    text-align: center;
}

.main-nav a {
    display: block;
    padding: 15px 10px;
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.main-nav a:hover {
    background-color: var(--light-color);
}

.main-nav a.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    font-weight: 500;
}

.main-nav i {
    font-size: 18px;
    margin-bottom: 5px;
    display: block;
}

.main-nav span {
    font-size: 14px;
}

/* 主内容区域 */
main {
    background-color: #fff;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
    min-height: 500px;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 20px 0;
    color: #777;
    font-size: 14px;
    border-top: 1px solid #e1e1e1;
    margin-top: 20px;
}

/* 卡片样式 */
.card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e1e1e1;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-color);
}

.card-body {
    padding: 10px 0;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.btn {
    display: inline-block;
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
}

.btn:hover {
    opacity: 0.9;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-success {
    background-color: var(--secondary-color);
}

.btn-danger {
    background-color: var(--danger-color);
}

.btn-warning {
    background-color: var(--warning-color);
}

.btn-sm {
    padding: 8px 15px;
    font-size: 14px;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e1e1;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table tr:hover {
    background-color: #f5f7fa;
}

/* 提示框样式 */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 数据看板样式 */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card i {
    font-size: 40px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.stat-card.income {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}

.stat-card.expense {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.stat-card.balance {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.stat-card:nth-child(4) {
    background: linear-gradient(135deg, #f39c12, #d35400);
    color: white;
}

.stat-card h3 {
    font-size: 16px;
    margin-top: 10px;
    font-weight: 500;
}

.stat-card .amount {
    font-size: 24px;
    font-weight: 700;
}

/* 图表容器 */
.chart-container {
    margin-top: 30px;
    height: 300px;
}

/* 移动端样式 */
body.mobile .container {
    padding: 0;
}

body.mobile header {
    padding: 15px;
    background-color: #20c997;
    color: white;
    margin-bottom: 0;
}

body.mobile .logo h1 {
    font-size: 20px;
    color: white;
}

body.mobile .main-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    margin-bottom: 0;
    border-radius: 0;
}

body.mobile .main-nav ul {
    justify-content: space-around;
}

body.mobile .main-nav a {
    padding: 10px 5px;
}

body.mobile .main-nav i {
    font-size: 20px;
}

body.mobile .main-nav span {
    font-size: 12px;
}

body.mobile main {
    padding: 15px;
    margin-bottom: 70px;
    box-shadow: none;
    border-radius: 0;
}

body.mobile .dashboard {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

body.mobile .stat-card {
    padding: 15px;
}

body.mobile .stat-card i {
    font-size: 30px;
    margin-bottom: 10px;
}

body.mobile .stat-card h3 {
    font-size: 14px;
    margin-bottom: 5px;
}

body.mobile .stat-card .amount {
    font-size: 20px;
}

body.mobile .form-group {
    margin-bottom: 15px;
}

body.mobile input[type="text"],
body.mobile input[type="password"],
body.mobile input[type="email"],
body.mobile input[type="number"],
body.mobile input[type="date"],
body.mobile select,
body.mobile textarea {
    padding: 10px;
    font-size: 15px;
}

body.mobile .btn {
    padding: 10px 15px;
}

/* 登录页面样式 */
.login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo h1 {
    color: var(--primary-color);
    font-size: 28px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
    }
    
    .main-nav li {
        flex: 0 0 33.333%;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* 手机端卡片式布局 */
.page-header {
    margin-bottom: 20px;
}

.page-header h1 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.monthly-summary {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.amount-card {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: var(--border-radius);
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    box-shadow: var(--box-shadow);
}

.amount-card.income {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.amount-card.expense {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.amount-card.balance {
    background: linear-gradient(135deg, #f39c12, #d35400);
}

.amount-card .label {
    font-size: 14px;
    margin-bottom: 5px;
    opacity: 0.9;
}

.amount-card .value {
    font-size: 20px;
    font-weight: 700;
}

/* 交易记录列表样式 */
.expense-list, .income-list, .asset-list, .transaction-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.expense-item, .income-item, .asset-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.expense-info, .income-info, .asset-info, .transaction-info {
    flex: 1;
}

.expense-category, .income-category, .transaction-category {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-weight: 500;
}

.expense-category i, .income-category i, .transaction-category i {
    margin-right: 8px;
    color: var(--primary-color);
}

.expense-date, .income-date, .asset-date, .transaction-date {
    font-size: 12px;
    color: #777;
    margin-bottom: 3px;
}

.expense-description, .income-description, .asset-description, .transaction-description {
    font-size: 14px;
    color: #555;
}

.expense-amount, .income-amount, .transaction-amount {
    font-weight: 700;
    font-size: 18px;
}

.expense-amount {
    color: var(--danger-color);
}

.income-amount {
    color: var(--secondary-color);
}

.asset-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
}

.asset-values {
    text-align: right;
}

.asset-original-value {
    font-weight: 700;
    font-size: 16px;
    color: var(--dark-color);
}

.asset-current-value {
    font-size: 14px;
    color: #777;
    margin-top: 3px;
}

.asset-depreciation {
    font-size: 12px;
    color: #777;
    margin-top: 3px;
}

/* 用户信息详情 */
.user-info-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.info-item .label {
    font-weight: 500;
    color: #777;
}

.info-item .value {
    font-weight: 500;
}

.no-data {
    text-align: center;
    padding: 20px;
    color: #777;
    font-style: italic;
}

/* 分区标题 */
.section-divider {
    margin: 25px 0 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.section-divider h2 {
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

/* 快速操作按钮 */
.quick-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.quick-action-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
}

.quick-action-btn:hover {
    transform: translateY(-3px);
}

.quick-action-btn i {
    font-size: 30px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.quick-action-btn:nth-child(1) i {
    color: var(--danger-color);
}

.quick-action-btn:nth-child(2) i {
    color: var(--secondary-color);
}

.quick-action-btn span {
    font-size: 14px;
    font-weight: 500;
}

/* 查看全部链接 */
.view-all-link {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

/* 最近交易 */
.recent-transactions {
    margin-bottom: 30px;
} 