/* SafeX 资金管理系统 - 导航栏样式 */

/* 导航栏容器样式 */
.safex-navbar {
    background: linear-gradient(135deg, #E3F2FD 0%, #F0F8FF 100%);
    box-shadow: 0 2px 8px rgba(64, 158, 255, 0.15);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 64px;
    line-height: 64px;
    border-radius: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.safex-navbar:hover {
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.2);
}

/* 导航栏主体样式 */
.safex-navbar .layui-nav {
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

/* 导航项基础样式 */
.safex-navbar .layui-nav-item {
    margin: 0;
    transition: all 0.3s ease;
}

.safex-navbar .layui-nav-item:first-child {
    margin-left: 0;
}

.safex-navbar .layui-nav-item:not(:first-child) {
    margin-left: 30px;
}

/* 导航链接样式 */
.safex-navbar .layui-nav-item a {
    color: #1976D2;
    font-weight: 500;
    font-size: 14px;
    padding: 0 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 系统标题样式 */
.safex-navbar .layui-nav-item:first-child a {
    color: #1976D2;
    font-weight: 600;
    font-size: 16px;
    padding: 0 20px;
}

/* 导航链接悬停效果 */
.safex-navbar .layui-nav-item a:hover {
    color: #409EFF;
    background: transparent;
    transform: translateY(-1px);
    box-shadow: none;
}

/* 当前页面高亮样式 */
.safex-navbar .layui-nav-item.layui-this a,
.safex-navbar .layui-nav-item.layui-nav-itemed a {
    color: #409EFF !important;
    background: transparent;
    font-weight: 600;
    box-shadow: none;
}

.safex-navbar .layui-nav-item.layui-this a:hover {
    background: transparent;
    transform: translateY(-1px);
    box-shadow: none;
}

/* 图标样式 */
.safex-navbar .layui-icon {
    margin-right: 5px;
    font-size: 14px;
    vertical-align: middle;
}

.safex-navbar .layui-nav-item:first-child .layui-icon {
    font-size: 16px;
}

/* 导航栏底部分割线 */
.safex-navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(64, 158, 255, 0.3) 50%, transparent 100%);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .safex-navbar {
        height: 64px;
        line-height: 64px;
    }
    
    /* 移动端不需要额外的body padding-top，因为全局已设置 */
    
    /* 移动端隐藏第一个导航项（SafeX 资金管理系统）防止换行 */
    .safex-navbar .layui-nav-item:first-child {
        display: none;
    }
    
    .safex-navbar .layui-nav-item:not(:first-child) {
        margin-left: 15px;
    }
    
    .safex-navbar .layui-nav-item a {
        font-size: 13px;
        padding: 0 10px;
    }
    
    .safex-navbar .layui-icon {
        font-size: 14px;
    }
}

/* 超小屏幕设备优化 */
@media (max-width: 480px) {
    .safex-navbar {
        height: 64px;
        line-height: 64px;
    }
    
    /* 超小屏幕不需要额外的body padding-top，因为全局已设置 */
    
    /* 超小屏幕隐藏第一个导航项（SafeX 资金管理系统）防止换行 */
    .safex-navbar .layui-nav-item:first-child {
        display: none;
    }
    
    .safex-navbar .layui-nav-item:not(:first-child) {
        margin-left: 10px;
    }
    
    .safex-navbar .layui-nav-item a {
        font-size: 12px;
        padding: 0 8px;
    }
}



/* 动画效果 */
@keyframes navSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.safex-navbar {
    animation: navSlideIn 0.5s ease-out;
}

/* 导航项点击波纹效果 */
.safex-navbar .layui-nav-item a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(64, 158, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
    z-index: -1;
}

.safex-navbar .layui-nav-item a:active::before {
    width: 100%;
    height: 100%;
}

/* 导航栏基础样式覆盖 */
.safex-navbar .layui-nav {
    background: transparent !important;
    border-radius: 0 !important;
}

/* 导航栏整体容器样式增强 */
.safex-navbar.layui-header {
    border-bottom: 1px solid rgba(64, 158, 255, 0.15);
    backdrop-filter: blur(10px);
}

/* 页面整体优化样式 */
body {
    background: linear-gradient(90deg, #f5f7fa 0%, #c3cfe2 100%);
    padding-top: 64px; /* 为固定导航栏预留空间 */
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

/* 卡片悬停效果优化 */
.layui-card {
    transition: all 0.3s ease;
}

.layui-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(64, 158, 255, 0.15) !important;
}

/* 按钮样式优化 */
.layui-btn {
    border-radius: 6px;
    transition: all 0.3s ease;
}

.chart-period.layui-this {
    background: #409EFF !important;
    color: white !important;
    border-color: #409EFF !important;
}

.chart-period:hover {
    background: transparent !important;
    color: #409EFF !important;
    border-color: #409EFF !important;
}

/* 重复的导航样式已移除，统一使用.safex-navbar前缀的样式 */


/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(64, 158, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(64, 158, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(64, 158, 255, 0.5);
}

/* 用户信息区域样式 */
.layui-layout-right {
    float: right;
}

.layui-layout-right .layui-nav-item {
    margin-left: 0;
}

.layui-layout-right .layui-nav-item a {
    color: white;
    padding: 0 20px;
    transition: all 0.3s ease;
}

.layui-layout-right .layui-nav-item:hover a {
    background: rgba(255, 255, 255, 0.1);
}

.layui-layout-right .layui-nav-child {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    margin-top: 5px;
}

.layui-layout-right .layui-nav-child dd {
    margin: 0;
}

.layui-layout-right .layui-nav-child dd a {
    color: #333;
    padding: 10px 20px;
    border-radius: 6px;
    margin: 5px;
    transition: all 0.3s ease;
}

.layui-layout-right .layui-nav-child dd a:hover {
    background: rgba(64, 158, 255, 0.1);
    color: #409EFF;
}

.layui-layout-right .layui-nav-child dd a .layui-icon {
    margin-right: 8px;
    font-size: 14px;
}

/* 主题色变量定义 */
:root {
    --safex-primary-color: #409EFF;
    --safex-secondary-color: #1976D2;
    --safex-hover-bg: rgba(64, 158, 255, 0.1);
    --safex-active-bg: rgba(64, 158, 255, 0.15);
    --safex-shadow-light: rgba(64, 158, 255, 0.15);
    --safex-shadow-medium: rgba(64, 158, 255, 0.25);
    --safex-shadow-heavy: rgba(64, 158, 255, 0.3);
}