/* 主要样式 */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.section {
    flex: 1;
}

.footer {
    padding: 2rem 1.5rem 2rem;
}

/* 用户头像 */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 5px; /* 方形头像，轻微圆角 */
    object-fit: cover;
}

/* 表单样式 */
.form-card {
    max-width: 500px;
    margin: 0 auto;
}

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

/* 卡片样式 */
.card-equal-height {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-equal-height .card-footer {
    margin-top: auto;
}

/* 图表容器 */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* 日历样式 */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbdbdb;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-day:hover {
    background-color: #f5f5f5;
}

.calendar-day.has-records {
    background-color: #e8f5e9;
    font-weight: bold;
}

.calendar-day.today {
    background-color: #209cee;
    color: white;
}

.calendar-day.other-month {
    background-color: #f5f5f5;
    color: #b5b5b5;
}

/* 统计卡片 */
.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
}

.stat-income {
    color: #48c774;
}

.stat-expense {
    color: #f14668;
}

.stat-balance {
    color: #3273dc;
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .form-card {
        margin: 0 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
}

/* 头像上传 */
.avatar-preview {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

/* 下拉菜单 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 12rem;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.175);
}

.dropdown.is-active .dropdown-menu {
    display: block;
}

.dropdown-content {
    padding: 0.5rem 0;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.375rem 1.5rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    text-decoration: none;
}

.dropdown-item:hover {
    color: #16181b;
    background-color: #f8f9fa;
}

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid #e9ecef;
}

/* 导航栏下拉菜单 */
.navbar-item.has-dropdown {
    position: relative;
}

.navbar-item.has-dropdown:hover .navbar-dropdown {
    display: block;
}

.navbar-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 12rem;
    padding: 0.5rem 0;
    margin: 0;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.175);
    z-index: 1000;
}

.navbar-dropdown .navbar-item {
    display: block;
    width: 100%;
    padding: 0.375rem 1rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
}

.navbar-dropdown .navbar-item:hover {
    color: #16181b;
    background-color: #f8f9fa;
}

/* 按钮组 */
.button-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* 消息提示 */
.notification {
    margin-bottom: 1rem;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 3px solid rgba(0,0,0,.1);
    border-radius: 50%;
    border-top-color: #3273dc;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 查询记录页面的分页控件样式 */
.query-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 10px 0;
    border-top: 1px solid #eee;
}

.query-page-size {
    display: flex;
    align-items: center;
    gap: 10px;
}

.query-page-controls {
    display: flex;
    gap: 10px;
}

.mb-0 {
    margin-bottom: 0 !important;
}

@media screen and (max-width: 768px) {
    .query-pagination {
        flex-direction: column;
        gap: 15px;
    }

    .query-page-size {
        width: 100%;
        justify-content: center;
    }

    .query-page-controls {
        width: 100%;
        justify-content: center;
    }
}
