/* Estilos para o menu de navegação */
.nav-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    z-index: 1050;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0 15px;
    background: black;
}

.nav-header .menu-btn,
.nav-header .user-btn {
    background: none;
    border: none;
    color: white !important;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.nav-header .menu-btn:hover,
.nav-header .user-btn:hover {
    transform: scale(1.1);
}

.nav-header .user-btn {
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo {
    /*height: 40px;*/
    margin-left: 10px;
    margin-right: auto;
    object-fit: contain;
}

.sidebar {
    position: fixed;
    top: 50px;
    width: 350px;
    height: calc(100vh - 75px);
    background: #333;
    transition: 0.3s;
    z-index: 9990;
    padding-top: 20px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #6c757d transparent;
}

.sidebar::-webkit-scrollbar {
    width: 16px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: #6c757d;
    border-radius: 20px;
    border: 2px solid #343a40;
    background-clip: padding-box;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background-color: #495057;
}

#sidebar {
    left: -350px;
}

#sidebar.active {
    left: 0;
}

.sidebar.active {
    left: 0;
}

.sidebar a {
    display: block;
    padding: 10px 25px;
    color: white !important;
    text-decoration: none;
    transition: 0.3s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 15px;
    line-height: 17px;
}

.sidebar a:hover {
    background: #444;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
}

.user-menu {
    position: fixed;
    top: 50px;
    right: 0;
    width: 350px;
    background: #333;
    z-index: 9990;
    display: none;
    max-height: calc(100vh - 75px);
    overflow-y: auto;
    font-family: sans-serif;
}

.user-menu-section {
    padding: 10px 15px;
    color: #fff !important;
    font-size: 15px !important;
    line-height: 17px !important;
    font-weight: bold;
    text-transform: uppercase;
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-family: sans-serif !important;
}

.user-menu a {
    display: block;
    padding: 10px 25px;
    color: white !important;
    text-decoration: none;
    transition: 0.3s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 15px !important;
    line-height: 17px !important;
    font-family: sans-serif !important;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.username-text {
    color: white !important;
    margin-right: 5px;
    font-size: 14px;
}

.user-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.default-user-icon {
    font-size: 1.5rem;
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Menu do Utilizador */
#userMenu {
    position: fixed;
    top: 50px;
    right: -350px; /* Começa fora da tela à direita */
    left: auto; /* Remove o left definido para o .sidebar normal */
    width: 350px;
    height: calc(100vh - 75px);
    background: #333;
    transition: 0.3s;
    z-index: 9990;
    padding-top: 20px;
    overflow-y: auto;
}

#userMenu.active {
    right: 0;
    left: auto;
}

/* Estilos globais para links nos menus */
.sidebar a, 
.dropdown-menu a,
.user-menu a {
    color: white !important;
    text-decoration: none !important;
    font-size: 15px;
    line-height: 17px;
}

.sidebar a:hover, 
.dropdown-menu a:hover,
.user-menu a:hover {
    color: white !important;
    text-decoration: none !important;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Estilos para alinhamento consistente de ícones e texto em todos os menus */
.sidebar a,
.submenu-trigger,
.user-menu a {
    display: flex !important;
    align-items: center;
    padding: 10px 15px !important;
    font-size: 15px;
    line-height: 17px;
}

.sidebar a i,
.submenu-trigger i:first-child,
.user-menu a i {
    width: 25px;
    text-align: center;
    margin-right: 10px;
    font-size: 15px;
}

.submenu-trigger {
    justify-content: space-between;
}

.submenu-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
    width: auto !important;
}

.submenu {
    display: none;
    background: #444;
}

.submenu a {
    padding-left: 45px !important;
}

.submenu a i {
    width: 25px;
    text-align: center;
    margin-right: 10px;
}

.submenu-container {
    position: relative;
}

.submenu-container.active .submenu {
    display: block;
}

.submenu-container.active .submenu-arrow {
    transform: rotate(90deg);
}

.dropdown-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

/* Estilo para os ícones na dropdown de pesquisa */
.dropdown-item:hover i {
    color: white !important;
    transition: color 0.3s ease;
}
