/* 主布局样式 */

.admin-layout {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: #fff;
    border-bottom: 1px solid #e6e6e6;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.admin-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.admin-sidebar {
    width: 240px;
    background: #304156;
    overflow-y: auto;
    transition: width 0.3s;
}

.admin-sidebar.collapsed {
    width: 64px;
}

.admin-main {
    flex: 1;
    background: #f5f5f5;
    overflow: auto;
    padding: 20px;
}

/* 侧边栏菜单样式 */
.sidebar-menu {
    border: none;
    background: transparent;
}

.sidebar-menu .el-menu-item,
.sidebar-menu .el-sub-menu__title {
    color: #bfcbd9;
    border-bottom: none;
}

.sidebar-menu .el-menu-item:hover,
.sidebar-menu .el-sub-menu__title:hover {
    background-color: #263445;
    color: #fff;
}

.sidebar-menu .el-menu-item.is-active {
    background-color: #409eff;
    color: #fff;
}

.sidebar-menu .el-sub-menu .el-menu-item {
    background-color: #1f2d3d;
    padding-left: 50px;
}

.sidebar-menu .el-sub-menu .el-menu-item:hover {
    background-color: #001528;
}

/* 头部样式 */
.header-left {
    display: flex;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    margin-left: 16px;
}

.header-logo {
    height: 36px;
    width: auto;
    margin-right: 10px;
}

.header-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.user-info:hover {
    background-color: #f5f5f5;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #409eff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-sidebar {
        position: fixed;
        left: -240px;
        top: 60px;
        height: calc(100vh - 60px);
        z-index: 1000;
        transition: left 0.3s;
    }
    
    .admin-sidebar.mobile-open {
        left: 0;
    }
    
    .admin-main {
        padding: 16px;
    }
}

/* AdminLayout 过渡动画 */
.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}

/* 移动端遮罩 */
.mobile-overlay {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

@media (max-width: 768px) {
    .mobile-overlay {
        display: block;
    }
}