/* =========================================
   layout.css - 布局组件系统 (完整变量版)
   ========================================= */
/* ===== 1. 底部智能导航栏 (Bottom Nav) ===== */
#bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 58px !important; /* 从60px改为50px */
    height: calc(58px + env(safe-area-inset-bottom)) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
    
    background-color: #4a5568 !important;
    background: #4a5568 !important;
    border-top: 1px solid #718096 !important;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.8) !important;
    z-index: 2147483647 !important;
    
    justify-content: space-around !important;
    align-items: center !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 哑光黑色导航 */
#bottom-nav {
    background-color: #1a1a1a !important; /* 哑光黑 */
    background: #1a1a1a !important;
    border-top: 1px solid #333 !important;
    box-shadow: 0 -1px 5px rgba(0,0,0,0.5) !important;
}


.nav-item-icon {
    font-size: 20px !important;
    margin-bottom: 2px !important;
}

.nav-item-label {
    font-size: 10px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
}

/* 非激活状态字体颜色 */
.bottom-nav-item {
    color: #d1d5db !important; /* 浅灰色 */
    /* 关键设置：作为定位基准 */
    position: relative !important;
    /* 关键设置：允许点击热区超出自身范围 */
    overflow: visible !important;
}

/* 激活状态字体颜色 */
.bottom-nav-item.active {
    color: #60a5fa !important; /* 亮蓝色 */
}

/* 小圆点颜色 */
.bottom-nav-item.active::after {
    color: #60a5fa !important; /* 和激活文字同色 */
}

/* =========================================================
   🔥 核心修改：增加点击区域（向上延伸45px，左右延伸25px）
   不影响任何现有视觉效果
   ========================================================= */
.bottom-nav-item::before {
    content: '' !important;
    position: absolute !important;
    
    /* ⬆️ 向上大幅延伸，覆盖上方区域 */
    top: -45px !important; 
    
    /* ⬅️➡️ 向左右扩充，防止点空 */
    left: -25px !important;
    right: -25px !important;
    
    /* ⬇️ 到底部 */
    bottom: 0 !important;
    
    /* 确保热区在最上层 */
    z-index: 1 !important;
    
    /* 透明背景，不影响视觉效果 */
    background: transparent !important;
    
    pointer-events: auto !important;
}
/* ===== 2. 顶部导航栏 (Header) ===== */
.header-priority-layout {
    background: linear-gradient(180deg, #1f2024 0%, var(--bg-black) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    margin: 8px 10px;
    padding: 0 12px;
    height: 44px;
    display: flex;
    align-items: center;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 100;
}

.priority-container {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* 齿轮图标 */
.priority-gear {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-dim);
    cursor: pointer;
    margin-right: 12px;
}

/* 品牌标题 */
.priority-brand {
    color: var(--primary-color);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* 分隔线 */
.priority-divider {
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 12px;
}

/* 用户信息 */
.priority-user {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.priority-dot {
    width: 6px;
    height: 6px;
    background: #555;
    border-radius: 50%;
}

.priority-user.active .priority-dot {
    background: var(--accent-green);
    box-shadow: 0 0 4px var(--accent-green);
}

.priority-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
}

.priority-user.active .priority-name {
    color: var(--accent-green);
}

/* 右侧 Luck 标识 */
.priority-luck {
    margin-left: auto;
    font-family: 'DIN Alternate', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent-blue);
    font-style: italic;
    padding-left: 10px;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

/* ===== 3. FAB 悬浮按钮容器 (布局部分) ===== */
/* Dashboard FAB */
.dashboard-fab-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.btn-dash-fab {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), #2980b9);
    color: white;
    font-size: 28px;
    border: none;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    display: flex; align-items: center; justify-content: center;
    line-height: 1; cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-dash-fab:active { transform: scale(0.92); }
.btn-dash-fab.active {
    transform: rotate(45deg);
    background: var(--accent-red);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

/* 子菜单 FAB */
.fab-menu {
    display: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 15px;
}
.fab-menu.visible { display: flex !important; }

.btn-fab-item {
    display: flex; align-items: center; justify-content: center;
    height: 40px; padding: 0 15px;
    border-radius: 20px; color: white; border: none;
    font-weight: bold; font-size: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    cursor: pointer; min-width: 100px;
}

/* 页面特定 FAB 容器 */
.pl-fab-container, 
.br-fab-container {
    position: fixed; bottom: 85px; right: 20px; z-index: 999;
}

/* 4. 移动端适配 */
@media (max-width: 360px) {
    .priority-brand { display: none; } /* 小屏隐藏标题 */
    .priority-divider { display: none; }
}
/* --- Swipe Gestures Styles --- */

/* 修改现有的 item 样式 */
.bottom-nav-item {
    /* 保持你原有的外观样式 (flex, color, padding 等) 不变 */
    /* ...原有的样式... */

    /* 🔥 关键 1: 设为相对定位，为了让伪元素以此为基准 */
    position: relative;
    /* 允许子元素(点击区)超出自身范围 */
    overflow: visible; 
}

/* 🔥 关键 2: 创建隐形点击区 */
.bottom-nav-item::after {
    content: '';
    position: absolute;
    
    /* 向上延伸 15px (这是最关键的，防止点高了没反应) */
    top: -15px; 
    
    /* 向左右延伸，填满按钮之间的空隙，实现无死角点击 */
    left: -10px;
    right: -10px;
    
    /* 向下延伸到底部 */
    bottom: 0;
    
    /* 确保在最上层 */
    z-index: 10;
    
    /* 🔴 调试用：你可以暂时把下面这行取消注释，看看那个红色区域有多大 */
    /* background: rgba(255, 0, 0, 0.2); */
}
/* ✅ 页面容器 - 修正版 */
/* ✅ 页面容器（修正了标点符号） */
.page-container {
    padding-top: 0 !important;
    margin-top: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    
    /* 关键：使用真实视口高度，减去导航栏高度 */
    min-height: calc(var(--real-vh, 1vh) * 100 - 58px - env(safe-area-inset-bottom)) !important;
    
    box-sizing: border-box;
}
#app-main {
    position: relative;
    top: 0;
    margin-top: 0 !important;
    padding-top: 0 !important;
}
body {
    overflow-x: hidden;
}

#app-main {
    padding-bottom: 0 !important;
}
/* 🔥 终极修复：防止登录后被 Header 二次下移 */
body.authenticated #app-main {
    top: 0 !important;
    transform: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ✅ 使用真实视口高度（替代 100vh） */
.page-container {
    min-height: calc(var(--real-vh, 1vh) * 100 - 58px - env(safe-area-inset-bottom)) !important;
}
/* ================================
   首页禁止 Header 滚动位移（关键修复）
   ================================ */
.uh-container[data-page="bankroll"] .uh-header.scrolling-up,
.uh-container[data-page="home"] .uh-header.scrolling-up {
    transform: none !important;
    opacity: 1 !important;
}
.uh-container[data-page="bankroll"] .uh-header.scrolling-up {
    outline: 2px solid red;
}
.uh-header.scrolling-up {
    outline: 3px solid red !important;
}

