/* ========================================
   ========== 全局样式 v1.0 ==========
   ======================================== */


/* ========== 1. 基础重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f7fa;
    padding: 10px 16px 0;
}


/* ========== 2. 通用组件 ========== */

/* ------ 2.1 Toast 提示 ------ */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 20px 32px;
    border-radius: 12px;
    font-size: 15px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    z-index: 999;
    text-align: center;
    max-width: 80%;
}
.toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ------ 2.2 空状态 / 加载状态 ------ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}
.empty-state .icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.cost-list-empty {
    text-align: center;
    padding: 30px 20px;
    color: #ccc;
    font-size: 14px;
}
.cost-list-loading {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}


/* ========== 3. 页面头部 & 导航 ========== */

/* ------ 3.1 主头部 ------ */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 16px;
    background: #fff;
    margin: -16px -16px 16px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid #e8ecf1;
}
.header h1 {
    font-size: 18px;
    color: #333;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.header-right .user-name {
    font-size: 14px;
    color: #666;
}

/* ------ 3.2 导航按钮 ------ */
.back-btn {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    border: 1px solid #667eea;
    border-radius: 6px;
}
.back-btn:active {
    background: #667eea;
    color: #fff;
}

.nav-link {
    font-size: 14px;
    color: #667eea;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}
.nav-link:active {
    background: #f0f2f5;
}

.logout-btn {
    font-size: 13px;
    color: #667eea;
    text-decoration: none;
    padding: 4px 12px;
    border: 1px solid #667eea;
    border-radius: 6px;
}
.logout-btn:active {
    background: #667eea;
    color: #fff;
}


/* ========== 4. 汉堡菜单 ========== */
.menu-toggle {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    color: #333;
    line-height: 1;
}
.menu-toggle:active {
    opacity: 0.6;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 200;
    display: none;
}
.menu-overlay.show {
    display: block;
}

.menu-panel {
    position: fixed;
    top: 0;
    right: -280px;
    width: 260px;
    height: 100%;
    background: #fff;
    z-index: 201;
    transition: right 0.3s ease;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.15);
    padding: 20px 0;
    overflow-y: auto;
}
.menu-panel.show {
    right: 0;
}

.menu-panel .menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px 16px;
    border-bottom: 1px solid #f0f2f5;
}
.menu-panel .menu-header .user-info {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}
.menu-panel .menu-header .menu-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #999;
    padding: 0 4px;
}
.menu-panel .menu-header .menu-close:active {
    color: #333;
}

.menu-panel .menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: #555;
    text-decoration: none;
    font-size: 15px;
    border-bottom: 1px solid #f5f6f8;
    transition: background 0.2s;
}
.menu-panel .menu-item:active {
    background: #f0f2f5;
}
.menu-panel .menu-item .icon {
    font-size: 18px;
    width: 28px;
    text-align: center;
}

.menu-panel .menu-divider {
    height: 8px;
    background: #f5f7fa;
    border-bottom: 1px solid #f0f2f5;
}


/* ========== 5. 页面底部 Footer ========== */
.app-footer {
    background: #fff;
    border-top: 1px solid #e8ecf1;
    padding: 10px 16px 30px;
    margin-top: 20px;
}
.footer-user {
    text-align: center;
    font-size: 14px;
    color: #555;
    padding-bottom: 6px;
}
.footer-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding-bottom: 6px;
}
.footer-btn {
    font-size: 13px;
    text-decoration: none;
    padding: 5px 20px;
    border-radius: 6px;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.footer-btn:active {
    transform: scale(0.96);
}
.footer-btn-primary {
    color: #667eea;
    border-color: #667eea;
    background: transparent;
}
.footer-btn-primary:active {
    background: #667eea;
    color: #fff;
}
.footer-btn-secondary {
    color: #ff9800;
    border-color: #ff9800;
    background: transparent;
}
.footer-btn-secondary:active {
    background: #ff9800;
    color: #fff;
}
.footer-btn-danger {
    color: #e74c3c;
    border-color: #e74c3c;
    background: transparent;
}
.footer-btn-danger:active {
    background: #e74c3c;
    color: #fff;
}
.footer-copyright {
    text-align: center;
    font-size: 11px;
    color: #ccc;
}

