/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
    -webkit-tap-highlight-color: transparent;
}

/* 页面容器 */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    background-color: white;
}

/* 页面切换 */
.page {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    background-color: white;
}

.page.active {
    display: block;
}

/* 标题样式 */
h1 {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin: 40px 0 10px;
    color: #333;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 20px 0 15px;
    color: #333;
}

h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 15px;
    color: #333;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background-color: #f9f9f9;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4CAF50;
    background-color: white;
}

.form-group.result {
    background-color: #f0f8f0;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0f0e0;
}

.result-value {
    font-size: 18px;
    font-weight: 600;
    color: #4CAF50;
    margin-top: 5px;
}

/* 按钮样式 */
.btn {
    display: block;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn.primary {
    background-color: #4CAF50;
    color: white;
}

.btn.primary:hover {
    background-color: #45a049;
}

/* 主页面样式 */
.header {
    background-color: #4CAF50;
    color: white;
    padding: 20px;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h2 {
    color: white;
    margin-top: 0;
}

.account-overview {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.account-item {
    text-align: center;
    flex: 1;
}

.account-name {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.account-balance {
    font-size: 16px;
    font-weight: 600;
}

/* 记账按钮 */
.add-record-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #4CAF50;
    color: white;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4);
    cursor: pointer;
    z-index: 100;
}

.add-record-btn:active {
    transform: scale(0.95);
}

/* 内容区域 */
.content {
    padding: 20px;
    margin-bottom: 80px;
}

.section {
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* 预算概览 */
.budget-overview {
    space-y: 10px;
}

.budget-item {
    margin-bottom: 15px;
}

.budget-name {
    font-size: 14px;
    margin-bottom: 5px;
    color: #666;
}

.budget-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #4CAF50;
    border-radius: 4px;
    transition: width 0.3s;
}

.budget-text {
    font-size: 12px;
    color: #666;
    min-width: 80px;
    text-align: right;
}

/* 记账记录 */
.record-list {
    overflow-y: auto;
    margin-bottom: 80px; /* 为底部导航栏留出空间 */
}

.record-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.record-item:last-child {
    border-bottom: none;
}

.record-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.record-info {
    flex: 1;
    cursor: pointer;
}

.record-info:hover {
    background-color: #f9f9f9;
    border-radius: 4px;
    padding: 5px;
    margin: -5px;
}

.record-account {
    font-size: 14px;
    font-weight: 500;
}

.record-note {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.record-actions {
    display: flex;
    align-items: center;
}

.record-amount {
    font-size: 16px;
    font-weight: 600;
    margin-right: 15px;
}

.record-amount.expense {
    color: #f44336;
}

.record-amount.income {
    color: #4CAF50;
}

.record-amount.transfer {
    color: #2196F3;
}

.delete-icon {
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
}

.delete-icon:hover {
    background-color: #ffebee;
    border-radius: 4px;
}

.empty-record {
    text-align: center;
    color: #999;
    padding: 30px 0;
    font-size: 14px;
}

/* 底部导航 */
.nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 99;
}

.nav-item {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    color: #666;
    text-decoration: none;
    font-size: 11px; /* 减小字体大小以适应4个导航项 */
}

.nav-item.active {
    color: #4CAF50;
    font-weight: 500;
}

/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    display: none;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-header + form {
    padding: 20px;
}

/* 单选按钮组 */
.radio-group {
    display: flex;
    gap: 10px;
}

.radio-item {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.radio-item input {
    display: none;
}

.radio-item span {
    font-size: 14px;
}

.radio-item input:checked + span {
    color: #4CAF50;
    font-weight: 500;
}

.radio-item:has(input:checked) {
    border-color: #4CAF50;
    background-color: #f0f8f0;
}

/* 快捷金额按钮 */
.quick-amounts {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.quick-amount {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #f9f9f9;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-amount:hover {
    border-color: #4CAF50;
    color: #4CAF50;
}

/* 响应式设计 */
@media screen and (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 22px;
        margin-top: 30px;
    }
    
    .header {
        padding: 15px;
    }
    
    .content {
        padding: 15px;
    }
    
    .add-record-btn {
        width: 55px;
        height: 55px;
        font-size: 28px;
    }
}

/* 动画效果 */
/* 移除页面切换动画，实现无缝切换 */

/* 预警样式 */
.budget-item.warning .progress-fill {
    background-color: #ff9800;
}

.budget-item.danger .progress-fill {
    background-color: #f44336;
}

.budget-item.danger .budget-text {
    color: #f44336;
    font-weight: 500;
}

/* 账户管理页面样式 */
.account-list {
    margin-top: 20px;
}

.account-section {
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

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

.account-header h3 {
    margin: 0;
    font-size: 16px;
}

.account-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.edit-account-btn {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.edit-account-btn:hover {
    border-color: #4CAF50;
    color: #4CAF50;
}

.subaccount-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.subaccount-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}



/* 页面头部样式 */
.page-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

/* 总资金页面头部居中 */
#total-funds-page .page-header {
    justify-content: center;
}

.back-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    margin-right: 10px;
    color: #333;
    padding: 5px;
}

.back-btn:hover {
    color: #4CAF50;
}

.add-subaccount-btn {
    padding: 6px 12px;
    border: 1px solid #4CAF50;
    border-radius: 6px;
    background-color: white;
    color: #4CAF50;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.add-subaccount-btn:hover {
    background-color: #f0f8f0;
}

.subaccount-list {
    space-y: 10px;
}

.subaccount-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.subaccount-item:last-child {
    border-bottom: none;
}

.subaccount-name {
    font-size: 14px;
    color: #333;
}

.edit-subaccount-btn {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.edit-subaccount-btn:hover {
    border-color: #4CAF50;
    color: #4CAF50;
}

/* 统计页面样式 */
.stats-content {
    padding-bottom: 100px;
}

/* 月份选择器样式 */
.month-selector {
    margin-bottom: 20px;
    position: relative;
}

#stats-month {
    width: 100%;
    padding: 10px 36px 10px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: #333;
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#stats-month:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.12);
}

#stats-month:hover {
    border-color: #bbb;
}

#records-month {
    width: 100%;
    padding: 10px 36px 10px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: #333;
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#records-month:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.12);
}

#records-month:hover {
    border-color: #bbb;
}

.stats-summary {
    display: flex;
    justify-content: space-around;
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.stats-item {
    text-align: center;
}

.stats-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.stats-value {
    font-size: 18px;
    font-weight: 600;
}

.stats-value.income {
    color: #4CAF50;
}

.stats-value.expense {
    color: #f44336;
}

.stats-value.balance {
    color: #2196F3;
}

.chart-container {
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.chart-container h3 {
    margin-top: 0;
    font-size: 14px;
    color: #666;
}

.chart-placeholder {
    height: 200px;
    background-color: #f9f9f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    margin-top: 10px;
}

/* 列表容器样式 */
.list-container {
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.list-container h3 {
    margin-top: 0;
    font-size: 14px;
    color: #666;
}

.stats-list {
    margin-top: 10px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.list-item:last-child {
    border-bottom: none;
}

.list-label {
    font-size: 14px;
    color: #333;
}

.list-value {
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

.list-value.expense {
    color: #f44336;
}

.list-value.income {
    color: #4CAF50;
}

.empty-item {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}

/* 搜索容器样式 */
.search-container {
    margin-bottom: 15px;
}

.search-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background-color: #f9f9f9;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #4CAF50;
    background-color: white;
}

/* 合计金额样式 */
.stats-total {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* 设置页面样式 */
.settings-list {
    margin-top: 20px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

#settings-page .setting-item:first-child {
    box-shadow: none;
    border-bottom: none;
}

.setting-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.setting-btn:hover {
    border-color: #4CAF50;
    color: #4CAF50;
}

.setting-btn.danger {
    border-color: #f44336;
    color: #f44336;
}

.setting-btn.danger:hover {
    background-color: #ffebee;
}

/* 年度预算页面样式 */
#budget-page .container {
    padding-bottom: 100px; /* 为底部导航栏留出空间 */
}

.budget-category {
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.budget-category h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.budget-item-form {
    margin-bottom: 15px;
}

.budget-item-form label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #666;
}

.budget-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background-color: #f9f9f9;
    transition: border-color 0.3s;
}

.budget-input:focus {
    outline: none;
    border-color: #4CAF50;
    background-color: white;
}

/* 保存预算按钮样式 */
#budget-form .btn.primary {
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

/* 总资金页面样式 */
.total-funds-header {
    background-color: #4CAF50;
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.total-label {
    font-size: 16px;
    margin-bottom: 10px;
}

.total-amount {
    font-size: 24px;
    font-weight: 600;
}

.total-funds-page .record-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-list {
    margin-bottom: 80px;
}

.total-funds-page .record-item {
    cursor: pointer;
}

.total-funds-page .record-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.total-funds-page .record-info {
    flex: 1;
}

.total-funds-page .record-amount {
    flex: 1;
    text-align: right;
    margin-right: 15px;
}

.total-funds-page .record-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-width: 74px;
}

.total-funds-page .record-amount.positive {
    color: #4CAF50;
}

.total-funds-page .record-amount.negative {
    color: #f44336;
}

.total-funds-page .record-actions .edit-account-btn, .total-funds-page .record-actions .delete-account-btn {
    width: 32px;
    height: 32px;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0 !important;
}

.total-funds-page .record-actions .edit-account-btn {
    background-color: #2196F3 !important;
    color: white !important;
}

.total-funds-page .record-actions .edit-account-btn:hover {
    background-color: #1976D2 !important;
}

.total-funds-page .record-actions .edit-account-btn::before {
    content: 'E';
    font-size: 14px !important;
    font-weight: bold;
}

.total-funds-page .record-actions .delete-account-btn {
    background-color: #f44336 !important;
    color: white !important;
}

.total-funds-page .record-actions .delete-account-btn:hover {
    background-color: #d32f2f !important;
}

.total-funds-page .record-actions .delete-account-btn::before {
    content: 'X';
    font-size: 16px !important;
    font-weight: bold;
}

.add-account-btn {
    position: fixed;
    bottom: 80px;
    left: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #4CAF50;
    color: white;
    font-size: 30px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4);
    cursor: pointer;
    z-index: 100;
}

.add-account-btn:active {
    transform: scale(0.95);
}

/* 账户详情页面样式 */
.account-detail-header {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.account-detail-budget, .account-detail-balance {
    margin-bottom: 10px;
    font-size: 14px;
}

.account-detail-balance {
    font-weight: 600;
    color: #4CAF50;
}

/* 支出备注详情页面样式 */
.expense-note-summary {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.summary-item {
    margin-bottom: 10px;
    font-size: 14px;
}

.summary-label {
    color: #666;
    margin-right: 10px;
}

.summary-value {
    font-weight: 600;
    color: #333;
}

/* 登录注册页面样式 */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.login-footer a {
    color: #2196F3;
    text-decoration: none;
    margin-left: 5px;
}

/* 重置密码页面样式 */
.reset-password-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.reset-password-note {
    margin: 20px 0;
    color: #666;
    text-align: center;
}

.user-list {
    margin: 20px 0;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.user-info {
    flex: 1;
}

.user-phone {
    font-size: 16px;
    font-weight: bold;
}

.reset-user-password-btn {
    padding: 8px 16px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.reset-user-password-btn:hover {
    background-color: #1976D2;
}

/* 响应式设计 */
@media screen and (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 22px;
        margin-top: 30px;
    }
    
    .header {
        padding: 15px;
    }
    
    .content {
        padding: 15px;
    }
    
    .add-record-btn {
        width: 55px;
        height: 55px;
        font-size: 28px;
    }
    
    .stats-summary {
        padding: 15px;
    }
    
    .stats-value {
        font-size: 16px;
    }
    
    .chart-placeholder {
        height: 180px;
    }
    
    .budget-category {
        padding: 12px;
    }
    
    .budget-input {
        padding: 8px;
        font-size: 14px;
    }
    
    .total-amount {
        font-size: 20px;
    }
    
    .add-account-btn {
        width: 55px;
        height: 55px;
        font-size: 28px;
    }
}

/* 查看更多按钮 */
.view-more-btn {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background: #f0f0f0;
    color: #666;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}
.view-more-btn:hover { background: #e0e0e0; }

/* 记录管理页面 */
#records-page .page-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.back-btn { background: none; border: none; font-size: 16px; color: #007aff; cursor: pointer; padding: 4px 8px; }

.records-list { display: flex; flex-direction: column; gap: 8px; }
#records-page-list .record-item { background: #fff; border-radius: 10px; padding: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.edit-icon, .delete-icon { cursor: pointer; font-size: 16px; opacity: 0.7; padding: 4px; }
.edit-icon:hover, .delete-icon:hover { opacity: 1; }
/* 账号管理去掉下划线 */
#admin-page .settings-list .setting-item { border-bottom: none; box-shadow: none; margin-bottom: 6px; }

/* ========== AI记账样式 ========== */
/* AI记账入口按钮 */
.ai-record-btn {
    position: fixed;
    right: 70px;
    bottom: 80px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    z-index: 100;
    font-size: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.ai-record-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}
.ai-record-btn svg { flex-shrink: 0; }

/* AI记账弹窗 */
.ai-modal-content {
    max-width: 480px;
    width: 95vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
.ai-state {
    padding: 0 4px 4px;
    overflow-y: auto;
    flex: 1;
}
/* 上传区域 */
.ai-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border: 2px dashed #ddd;
    border-radius: 12px;
    margin-top: 12px;
    text-align: center;
    transition: border-color 0.2s;
}
.ai-upload-area.drag-over { border-color: #667eea; background: #f5f3ff; }
.ai-upload-title { font-size: 16px; font-weight: 600; color: #333; margin: 12px 0 4px; }
.ai-upload-sub { font-size: 13px; color: #999; margin: 0 0 16px; }
.ai-upload-btn { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; border: none; padding: 10px 24px; border-radius: 20px; font-size: 14px; cursor: pointer; }
.ai-upload-btn:hover { opacity: 0.9; }
/* 预览图 */
.ai-preview-box {
    display: flex;
    justify-content: center;
    margin-top: 12px;
    margin-bottom: 8px;
}
.ai-preview-img {
    max-width: 100%;
    max-height: 220px;
    border-radius: 8px;
    object-fit: contain;
    border: 1px solid #eee;
}
/* loading */
.ai-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    gap: 12px;
}
.ai-spinner {
    width: 36px; height: 36px;
    border: 3px solid #e8e8e8;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: ai-spin 0.8s linear infinite;
}
@keyframes ai-spin { to { transform: rotate(360deg); } }
#ai-loading-text { font-size: 14px; color: #666; margin: 0; }
/* 来源图 */
.ai-result-source {
    position: relative;
    display: flex;
    justify-content: center;
    margin-top: 12px;
    cursor: zoom-in;
}
.ai-result-img {
    max-width: 100%;
    max-height: 120px;
    border-radius: 8px;
    object-fit: contain;
    border: 1px solid #eee;
}
.ai-result-tip {
    position: absolute;
    bottom: 6px;
    right: 8px;
    font-size: 11px;
    color: #fff;
    background: rgba(0,0,0,0.4);
    padding: 2px 6px;
    border-radius: 4px;
}
.ai-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0 6px;
    font-size: 13px;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 8px;
}
/* 识别结果列表 */
.ai-records-list { display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow-y: auto; padding-right: 2px; }
/* 结果卡片 */
.ai-record-card {
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    border: 1.5px solid #e8e8e8;
    transition: border-color 0.2s;
}
.ai-record-card.confirmed { border-color: #22c55e; background: #fafffe; }
.ai-record-card.low-confidence { border-color: #f59e0b; background: #fffbeb; }
.ai-record-card.failed { border-color: #ef4444; background: #fff5f5; }
.ai-record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.ai-record-info { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.ai-record-index { font-size: 12px; color: #999; width: 20px; flex-shrink: 0; }
.ai-record-source-thumb {
    width: 36px; height: 36px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #eee;
    flex-shrink: 0;
}
.ai-record-meta { flex: 1; min-width: 0; }
.ai-record-amount { font-size: 15px; font-weight: 600; color: #333; }
.ai-record-target { font-size: 12px; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-record-sub { font-size: 11px; color: #aaa; margin-top: 1px; }
.ai-confirm-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; flex-shrink: 0; }
.badge-success { background: #dcfce7; color: #16a34a; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-error { background: #fee2e2; color: #dc2626; }
.badge-pending { background: #f3f4f6; color: #6b7280; }
.ai-record-actions { display: flex; gap: 6px; margin-top: 8px; }
.ai-btn-confirm {
    background: #667eea; color: #fff; border: none; padding: 5px 12px;
    border-radius: 6px; font-size: 12px; cursor: pointer;
}
.ai-btn-confirm:hover { opacity: 0.9; }
.ai-btn-confirmed {
    background: #22c55e; color: #fff; border: none; padding: 5px 12px;
    border-radius: 6px; font-size: 12px; cursor: default;
}
.ai-btn-edit { background: #f3f4f6; color: #666; border: none; padding: 5px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.ai-btn-edit:hover { background: #e5e7eb; }
.ai-btn-delete { background: #fee2e2; color: #dc2626; border: none; padding: 5px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.ai-btn-delete:hover { background: #fecaca; }
.ai-btn-readd { background: #eff6ff; color: #2563eb; border: none; padding: 5px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; }
/* 编辑表单 */
.ai-edit-form { display: none; margin-top: 10px; padding-top: 10px; border-top: 1px solid #f0f0f0; }
.ai-edit-form.active { display: block; }
.ai-edit-row { display: flex; gap: 8px; margin-bottom: 6px; }
.ai-edit-row .form-group { flex: 1; margin-bottom: 0; }
.ai-edit-row .form-group label { font-size: 11px; color: #999; display: block; margin-bottom: 2px; }
.ai-edit-row input, .ai-edit-row select { width: 100%; padding: 6px 8px; font-size: 13px; border: 1px solid #ddd; border-radius: 6px; box-sizing: border-box; }
.ai-type-toggle { display: flex; gap: 4px; }
.ai-type-toggle label { flex: 1; text-align: center; padding: 6px; font-size: 12px; border: 1px solid #ddd; border-radius: 6px; cursor: pointer; transition: all 0.2s; }
.ai-type-toggle input { display: none; }
.ai-type-toggle label:has(input:checked) { background: #667eea; color: #fff; border-color: #667eea; }
.ai-edit-footer { display: flex; justify-content: flex-end; margin-top: 8px; }
.ai-btn-save { background: #22c55e; color: #fff; border: none; padding: 6px 14px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.ai-btn-cancel-edit { background: #f3f4f6; color: #666; border: none; padding: 6px 14px; border-radius: 6px; font-size: 12px; cursor: pointer; margin-right: 6px; }
/* 底部统计 */
.ai-footer {
    padding: 12px 0 4px;
    border-top: 1px solid #f0f0f0;
    margin-top: 8px;
}
.ai-stat-row { display: flex; gap: 16px; margin-bottom: 10px; }
.ai-stat { font-size: 13px; color: #666; }
.ai-stat-divider { margin: 0 4px; color: #ddd; }
.ai-stat-amount { color: #e53e3e; font-weight: 600; }
.ai-submit-btn { width: 100%; }
.ai-submit-btn:disabled { background: #ccc !important; cursor: not-allowed !important; box-shadow: none !important; }
/* 记录多选框 */
.ai-record-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
    margin: auto 6px auto 0;
    accent-color: #667eea;
}
/* 记录右上角X删除按钮 */
.ai-record-delete {
    font-size: 16px;
    color: #ccc;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    flex-shrink: 0;
    margin-left: 4px;
    line-height: 1;
}
.ai-record-delete:hover {
    color: #dc2626;
    background: #fee2e2;
}
/* 全选 */
.ai-select-all-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}
.ai-select-all {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #667eea;
}
/* 图片放大弹窗 */
.ai-img-viewer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
}
.ai-img-viewer-close {
    position: absolute;
    top: -40px; right: 0;
    font-size: 28px;
    color: #fff;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 50%;
    width: 40px; height: 40px;
    cursor: pointer;
    line-height: 40px;
    text-align: center;
    z-index: 10;
}
.ai-img-viewer-content {
    position: relative;
}
