/* Top Bar Theme Styles */
body.has-topbar {
    padding-top: 60px;
}

body.has-topbar .sidebar {
    display: none;
}

body.has-topbar .main-content {
    margin-left: 0;
    width: 100%;
}

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.top-nav .navbar-brand {
    margin-right: 30px;
}

.top-nav .navbar-brand img {
    height: 40px;
}

.top-nav .nav-menu {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.top-nav .nav-item {
    position: relative;
    margin: 0 5px;
}

.top-nav .nav-link {
    color: #333;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.top-nav .nav-link i {
    margin-right: 5px;
}

.top-nav .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: none;
}

.top-nav .nav-item:hover .dropdown-menu {
    display: block;
}

.top-nav .dropdown-item {
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.top-nav .dropdown-item i {
    margin-right: 8px;
    width: 16px;
}

.top-nav .dropdown-item:hover {
    background: #f8f9fa;
}

.top-nav .user-profile {
    margin-left: auto;
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
}

.top-nav .user-profile:hover {
    background: #f8f9fa;
}

.top-nav .user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
    border: 2px solid #e9ecef;
}

.top-nav .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.top-nav .user-info {
    display: flex;
    flex-direction: column;
    margin-right: 10px;
}

.top-nav .user-info h6 {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.top-nav .user-info .user-role {
    font-size: 12px;
    color: #666;
}

.top-nav .user-profile .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    margin-top: 5px;
    display: none;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.top-nav .user-profile:hover .dropdown-menu {
    display: block;
}

.top-nav .user-profile .dropdown-item {
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.top-nav .user-profile .dropdown-item i {
    margin-right: 8px;
    width: 16px;
}

.top-nav .user-profile .dropdown-item:hover {
    background: #f8f9fa;
}

.top-nav .user-profile .dropdown-divider {
    margin: 5px 0;
    border-top: 1px solid #e9ecef;
}

/* Nested Dropdown Styles */
.top-nav .dropdown-submenu {
    position: relative;
}

.top-nav .dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
    display: none;
}

.top-nav .dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

.top-nav .dropdown-submenu > a:after {
    display: block;
    content: " ";
    float: right;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    border-width: 5px 0 5px 5px;
    border-left-color: #ccc;
    margin-top: 5px;
    margin-right: -10px;
}

.top-nav .dropdown-submenu:hover > a:after {
    border-left-color: #333;
}

/* Adjust dropdown positioning for better visibility */
.top-nav .dropdown-menu {
    margin-top: 0;
    border-radius: 0 4px 4px 4px;
}

.top-nav .dropdown-submenu .dropdown-menu {
    border-radius: 4px;
}

/* Responsive adjustments for nested dropdowns */
@media (max-width: 768px) {
    .top-nav .nav-menu {
        display: none;
    }
    
    .top-nav .nav-menu.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #fff;
        padding: 10px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .top-nav .nav-item {
        width: 100%;
    }
    
    .top-nav .dropdown-submenu .dropdown-menu {
        position: static;
        margin-left: 20px;
        border-left: 1px solid #eee;
    }
    
    .top-nav .dropdown-submenu > a:after {
        display: none;
    }
} 