.user-avatar-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    margin-left: 15px;
    position: relative; 
}

.user-avatar-wrapper img.user-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    display: block;
}

.user-popup {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    background: #1d1d1d;
    color: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    width: 260px;
    z-index: 1000;
}

.user-popup .popup-info {
    text-align: left;
}

.user-popup p {
    margin-bottom: 10px;
    font-size: 0.75rem;
}

.user-popup p.user-name {
    font-size: 1.15rem;
    margin-bottom: 8px;
    display: block;
    line-height: 1.1;
    text-align: left;
    font-weight: 700;
}


.user-popup .roles {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 8px 0;
    justify-content: flex-start !important;
    align-items: center !important;
}


.user-popup .roles .role {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    min-width: unset;
    margin: 0; 
    box-shadow: 0 1px 0 rgba(0,0,0,0.15) inset;
}

.user-popup p.mc-name {
    font-size: 0.75rem;
    margin-bottom: 0px;
}
.user-popup p.mc-name-name {
    font-size: 0.65rem;
    color: #f4fc5cff;
}

.user-popup .popup-actions {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-popup button {
    display: block;
    width: 100%;
    margin: 0px;
    margin-top: 0px;
    padding: 8px;
    background: #2ecc71;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.user-popup button:hover {
    background: #27ae60;
}

nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

@media (max-width:420px) {
    .user-popup { width: 220px; }
    .user-popup .roles .role { font-size: 0.68rem; padding: 3px 6px; }
}