/* 历史记录页特定样式 */
.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 60px; /* 为底部导航留空间 */
}
.header {
    text-align: center;
    margin-bottom: 15px;
    padding: 10px 20px 0;
}
.title {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}
.subtitle {
    display: block;
    font-size: 12px;
    color: #666;
}
/* 标签导航 */
.tab-nav {
    display: flex;
    background: white;
    margin: 0 10px 10px;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}
.tab-nav-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}
.tab-nav-btn.active {
    background: #07C160;
    color: white;
}
.tab-nav-btn:active {
    transform: scale(0.98);
}
.history-list {
    flex: 1;
    padding: 0 10px 140px; /* 增加底部内边距，为底部操作栏留出空间 */
    overflow-y: auto;
}
.history-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}
.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}
.item-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    flex: 1;
    margin-right: 10px;
    line-height: 1.4;
}
.item-cost {
    font-size: 18px;
    font-weight: bold;
    color: #07C160;
    white-space: nowrap;
}
.item-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.detail-text {
    font-size: 12px;
    color: #666;
    background: #f5f5f5;
    padding: 6px 10px;
    border-radius: 10px;
}
.item-breakdown {
    background: #f9f9f9;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 12px;
}
.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
}
.breakdown-item:not(:last-child) {
    border-bottom: 1px solid #e5e5e5;
}
.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}
.item-time {
    font-size: 11px;
    color: #999;
}
.item-actions {
    display: flex;
    gap: 8px;
}
.btn-small {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-small:active {
    transform: scale(0.95);
}
.btn-small.delete {
    background: #ff4757;
    color: white;
}
.btn-small.share {
    background: #07C160;
    color: white;
}
/* 空状态 */
.empty-state {
    text-align: center;
    padding: 50px 0 140px; /* 增加底部内边距 */
}
.empty-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
}
.empty-text {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}
.empty-tip {
    display: block;
    font-size: 12px;
    color: #999;
}
.hidden {
    display: none !important;
}
/* 底部操作栏 - 修复重叠问题 */
.bottom-actions {
    position: fixed;
    bottom: 70px; /* 在底部导航上方 */
    left: 10px;
    right: 10px;
    background: white;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    gap: 10px;
    z-index: 99;
    margin: 0;
}
.bottom-actions .btn {
    flex: 1;
    height: 44px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.bottom-actions .btn:active {
    transform: scale(0.98);
}
.bottom-actions .btn.clear {
    background: #ff4757;
    color: white;
}
.bottom-actions .btn.clear:active {
    background: #ff3742;
}
/* 电脑端隐藏底部操作栏 */
@media (min-width: 768px) {
    .bottom-actions {
        display: none;
    }
    .history-list {
        padding-bottom: 60px; /* 电脑端恢复原来的值 */
    }
    .empty-state {
        padding-bottom: 50px; /* 电脑端恢复原来的值 */
    }
}
/* 小屏幕手机适配 */
@media (max-width: 320px) {
    .bottom-actions {
        bottom: 60px;
        left: 8px;
        right: 8px;
        padding: 10px;
    }
    .history-list {
        padding-bottom: 120px;
    }
    .empty-state {
        padding-bottom: 120px;
    }
}
/* 大屏幕手机适配 */
@media (min-width: 414px) and (max-width: 767px) {
    .bottom-actions {
        bottom: 80px;
        max-width: 400px;
        margin: 0 auto;
        left: 50%;
        transform: translateX(-50%);
    }
}
/* 加载动画 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}
/* ===== 确认删除弹窗样式 ===== */
.confirm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.confirm-modal.show {
    display: flex !important;
}
.confirm-modal .modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 280px;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.modal-header {
    padding: 20px 20px 0;
    text-align: center;
}
.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}
.modal-body {
    padding: 20px;
}
.confirm-text {
    text-align: center;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}
.modal-footer {
    display: flex;
    gap: 10px;
    padding: 0 20px 20px;
}
.modal-btn {
    flex: 1;
    height: 44px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.modal-btn:active {
    transform: scale(0.98);
}
.modal-btn.cancel {
    background: #f5f5f5;
    color: #666;
}
.modal-btn.confirm {
    background: #07C160;
    color: white;
}
.modal-btn.confirm:active {
    background: #06a652;
}
.modal-btn.cancel:active {
    background: #e5e5e5;
}
/* 弹窗动画 */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
/* 手机端弹窗特殊处理 */
@media (max-width: 768px) {
    .confirm-modal {
        z-index: 9999 !important;
    }
    .confirm-modal .modal-content {
        max-width: 85%;
        margin: 20px;
    }
    .confirm-modal.show {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
}
/* 强制隐藏类 */
.force-hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}